diff --git a/packages/app-mobile/pluginAssets/index.js b/packages/app-mobile/pluginAssets/index.js index 9d3fda4ccf..37712cde81 100644 --- a/packages/app-mobile/pluginAssets/index.js +++ b/packages/app-mobile/pluginAssets/index.js @@ -1,5 +1,5 @@ module.exports = { -hash:"6950f3929f5177b0bb2a0c039669810d", files: { +hash:"bccea4c7bed254bfbfa0fcf40f3f5cdf", files: { 'highlight.js/atom-one-dark-reasonable.css': { data: require('./highlight.js/atom-one-dark-reasonable.css.base64.js'), mime: 'text/css', encoding: 'base64' }, 'highlight.js/atom-one-light.css': { data: require('./highlight.js/atom-one-light.css.base64.js'), mime: 'text/css', encoding: 'base64' }, 'katex/fonts/KaTeX_AMS-Regular.woff2': { data: require('./katex/fonts/KaTeX_AMS-Regular.woff2.base64.js'), mime: 'application/octet-stream', encoding: 'base64' }, diff --git a/packages/app-mobile/pluginAssets/index.web.js b/packages/app-mobile/pluginAssets/index.web.js index 28155600de..12ebb2be10 100644 --- a/packages/app-mobile/pluginAssets/index.web.js +++ b/packages/app-mobile/pluginAssets/index.web.js @@ -1 +1 @@ -module.exports = {"hash":"6950f3929f5177b0bb2a0c039669810d","files":["highlight.js/atom-one-dark-reasonable.css","highlight.js/atom-one-light.css","katex/fonts/KaTeX_AMS-Regular.woff2","katex/fonts/KaTeX_Caligraphic-Bold.woff2","katex/fonts/KaTeX_Caligraphic-Regular.woff2","katex/fonts/KaTeX_Fraktur-Bold.woff2","katex/fonts/KaTeX_Fraktur-Regular.woff2","katex/fonts/KaTeX_Main-Bold.woff2","katex/fonts/KaTeX_Main-BoldItalic.woff2","katex/fonts/KaTeX_Main-Italic.woff2","katex/fonts/KaTeX_Main-Regular.woff2","katex/fonts/KaTeX_Math-BoldItalic.woff2","katex/fonts/KaTeX_Math-Italic.woff2","katex/fonts/KaTeX_SansSerif-Bold.woff2","katex/fonts/KaTeX_SansSerif-Italic.woff2","katex/fonts/KaTeX_SansSerif-Regular.woff2","katex/fonts/KaTeX_Script-Regular.woff2","katex/fonts/KaTeX_Size1-Regular.woff2","katex/fonts/KaTeX_Size2-Regular.woff2","katex/fonts/KaTeX_Size3-Regular.woff2","katex/fonts/KaTeX_Size4-Regular.woff2","katex/fonts/KaTeX_Typewriter-Regular.woff2","katex/katex.css","mermaid/mermaid.min.js","mermaid/mermaid_render.js"]} \ No newline at end of file +module.exports = {"hash":"bccea4c7bed254bfbfa0fcf40f3f5cdf","files":["highlight.js/atom-one-dark-reasonable.css","highlight.js/atom-one-light.css","katex/fonts/KaTeX_AMS-Regular.woff2","katex/fonts/KaTeX_Caligraphic-Bold.woff2","katex/fonts/KaTeX_Caligraphic-Regular.woff2","katex/fonts/KaTeX_Fraktur-Bold.woff2","katex/fonts/KaTeX_Fraktur-Regular.woff2","katex/fonts/KaTeX_Main-Bold.woff2","katex/fonts/KaTeX_Main-BoldItalic.woff2","katex/fonts/KaTeX_Main-Italic.woff2","katex/fonts/KaTeX_Main-Regular.woff2","katex/fonts/KaTeX_Math-BoldItalic.woff2","katex/fonts/KaTeX_Math-Italic.woff2","katex/fonts/KaTeX_SansSerif-Bold.woff2","katex/fonts/KaTeX_SansSerif-Italic.woff2","katex/fonts/KaTeX_SansSerif-Regular.woff2","katex/fonts/KaTeX_Script-Regular.woff2","katex/fonts/KaTeX_Size1-Regular.woff2","katex/fonts/KaTeX_Size2-Regular.woff2","katex/fonts/KaTeX_Size3-Regular.woff2","katex/fonts/KaTeX_Size4-Regular.woff2","katex/fonts/KaTeX_Typewriter-Regular.woff2","katex/katex.css","mermaid/mermaid.min.js","mermaid/mermaid_render.js"]} \ No newline at end of file diff --git a/packages/app-mobile/pluginAssets/mermaid/mermaid_render.js.base64.js b/packages/app-mobile/pluginAssets/mermaid/mermaid_render.js.base64.js index b941fd812e..16166f8ee3 100644 --- a/packages/app-mobile/pluginAssets/mermaid/mermaid_render.js.base64.js +++ b/packages/app-mobile/pluginAssets/mermaid/mermaid_render.js.base64.js @@ -1 +1 @@ -module.exports = `LyogZ2xvYmFsIG1lcm1ha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oKZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcignRE9NQ29udGVudExvYWRlZCcsICgpID0+IHsKCS8vIEluIHNvbWUgZW52aXJvbm1lbnRzLCB3ZSBjYW4gbG9hZCBNZXJtYWlkIGltbWVkaWF0ZWx5IChlLmcuIG1vYmlsZSkuCgkvLyBJZiB3ZSBkb24ndCBsb2FkIGl0IGltbWVkaWF0ZWx5IGluIHRoZXNlIGVudmlyb25tZW50cywgTWVybWFpZCBzZWVtcwoJLy8gdG8gaW5pdGlhbGl6ZSBhbmQgYXV0by1ydW4sIGJ1dCB3aXRob3V0IG91ciBjb25maWd1cmF0aW9uIGNoYW5nZXMuCglpZiAobWVybWFpZFJlYWR5KCkpIHsKCQltZXJtYWlkSW5pdCgpOwoJfSBlbHNlIHsKCQljbGVhckludGVydmFsKGluaXRJSURfKTsKCX0KfSk7Cg==`; \ No newline at end of file diff --git a/packages/renderer/assets/mermaid/mermaid_render.js b/packages/renderer/assets/mermaid/mermaid_render.js index 42128aa232..f8b7f6d14e 100644 --- a/packages/renderer/assets/mermaid/mermaid_render.js +++ b/packages/renderer/assets/mermaid/mermaid_render.js @@ -29,7 +29,7 @@ const initExportButtons = () => { const buttonContainer = button.parentElement; const mermaidElem = buttonContainer.nextElementSibling; - const rightClickEvent = new PointerEvent('contextmenu', {bubbles: true}); + const rightClickEvent = new PointerEvent('contextmenu', { bubbles: true }); rightClickEvent.target = mermaidElem; mermaidElem.dispatchEvent(rightClickEvent); };