@nocobase/plugin-block-markdown 2.0.0-alpha.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (330) hide show
  1. package/LICENSE.txt +172 -0
  2. package/README.md +1 -0
  3. package/build.config.ts +15 -0
  4. package/client.d.ts +2 -0
  5. package/client.js +1 -0
  6. package/dist/client/index.d.ts +9 -0
  7. package/dist/client/index.js +10 -0
  8. package/dist/client/locale.d.ts +10 -0
  9. package/dist/client/models/MarkdownBlockModel.d.ts +13 -0
  10. package/dist/client/models/index.d.ts +10 -0
  11. package/dist/client/plugin.d.ts +15 -0
  12. package/dist/client/vditor/dist/css/content-theme/ant-design.css +210 -0
  13. package/dist/client/vditor/dist/css/content-theme/dark.css +123 -0
  14. package/dist/client/vditor/dist/css/content-theme/light.css +101 -0
  15. package/dist/client/vditor/dist/css/content-theme/wechat.css +94 -0
  16. package/dist/client/vditor/dist/images/emoji/b3log.png +0 -0
  17. package/dist/client/vditor/dist/images/emoji/chainbook.png +0 -0
  18. package/dist/client/vditor/dist/images/emoji/doge.png +0 -0
  19. package/dist/client/vditor/dist/images/emoji/hacpai.png +0 -0
  20. package/dist/client/vditor/dist/images/emoji/huaji.gif +0 -0
  21. package/dist/client/vditor/dist/images/emoji/latke.png +0 -0
  22. package/dist/client/vditor/dist/images/emoji/liandi.png +0 -0
  23. package/dist/client/vditor/dist/images/emoji/lute.png +0 -0
  24. package/dist/client/vditor/dist/images/emoji/octocat.png +0 -0
  25. package/dist/client/vditor/dist/images/emoji/pipe.png +0 -0
  26. package/dist/client/vditor/dist/images/emoji/siyuan.png +0 -0
  27. package/dist/client/vditor/dist/images/emoji/solo.png +0 -0
  28. package/dist/client/vditor/dist/images/emoji/sym.png +0 -0
  29. package/dist/client/vditor/dist/images/emoji/trollface.png +0 -0
  30. package/dist/client/vditor/dist/images/emoji/vditor.png +0 -0
  31. package/dist/client/vditor/dist/images/emoji/wide.png +0 -0
  32. package/dist/client/vditor/dist/images/emoji/wulian.png +0 -0
  33. package/dist/client/vditor/dist/images/img-loading.svg +1 -0
  34. package/dist/client/vditor/dist/images/logo.png +0 -0
  35. package/dist/client/vditor/dist/index.css +1836 -0
  36. package/dist/client/vditor/dist/index.d.ts +76 -0
  37. package/dist/client/vditor/dist/index.min.js +10 -0
  38. package/dist/client/vditor/dist/js/abcjs/abcjs_basic.min.js +12 -0
  39. package/dist/client/vditor/dist/js/echarts/echarts.min.js +32 -0
  40. package/dist/client/vditor/dist/js/flowchart.js/flowchart.min.js +17 -0
  41. package/dist/client/vditor/dist/js/graphviz/full.render.js +99 -0
  42. package/dist/client/vditor/dist/js/graphviz/viz.js +342 -0
  43. package/dist/client/vditor/dist/js/highlight.js/highlight.pack.js +1626 -0
  44. package/dist/client/vditor/dist/js/highlight.js/solidity.min.js +82 -0
  45. package/dist/client/vditor/dist/js/highlight.js/styles/abap.css +155 -0
  46. package/dist/client/vditor/dist/js/highlight.js/styles/algol.css +143 -0
  47. package/dist/client/vditor/dist/js/highlight.js/styles/algol_nu.css +90 -0
  48. package/dist/client/vditor/dist/js/highlight.js/styles/ant-design.css +469 -0
  49. package/dist/client/vditor/dist/js/highlight.js/styles/arduino.css +157 -0
  50. package/dist/client/vditor/dist/js/highlight.js/styles/autumn.css +138 -0
  51. package/dist/client/vditor/dist/js/highlight.js/styles/borland.css +147 -0
  52. package/dist/client/vditor/dist/js/highlight.js/styles/bw.css +150 -0
  53. package/dist/client/vditor/dist/js/highlight.js/styles/colorful.css +158 -0
  54. package/dist/client/vditor/dist/js/highlight.js/styles/dracula.css +140 -0
  55. package/dist/client/vditor/dist/js/highlight.js/styles/emacs.css +167 -0
  56. package/dist/client/vditor/dist/js/highlight.js/styles/friendly.css +183 -0
  57. package/dist/client/vditor/dist/js/highlight.js/styles/fruity.css +123 -0
  58. package/dist/client/vditor/dist/js/highlight.js/styles/github.css +174 -0
  59. package/dist/client/vditor/dist/js/highlight.js/styles/igor.css +124 -0
  60. package/dist/client/vditor/dist/js/highlight.js/styles/lovelace.css +146 -0
  61. package/dist/client/vditor/dist/js/highlight.js/styles/manni.css +139 -0
  62. package/dist/client/vditor/dist/js/highlight.js/styles/monokai.css +132 -0
  63. package/dist/client/vditor/dist/js/highlight.js/styles/monokailight.css +180 -0
  64. package/dist/client/vditor/dist/js/highlight.js/styles/murphy.css +144 -0
  65. package/dist/client/vditor/dist/js/highlight.js/styles/native.css +164 -0
  66. package/dist/client/vditor/dist/js/highlight.js/styles/paraiso-dark.css +137 -0
  67. package/dist/client/vditor/dist/js/highlight.js/styles/paraiso-light.css +136 -0
  68. package/dist/client/vditor/dist/js/highlight.js/styles/pastie.css +180 -0
  69. package/dist/client/vditor/dist/js/highlight.js/styles/perldoc.css +141 -0
  70. package/dist/client/vditor/dist/js/highlight.js/styles/pygments.css +159 -0
  71. package/dist/client/vditor/dist/js/highlight.js/styles/rainbow_dash.css +164 -0
  72. package/dist/client/vditor/dist/js/highlight.js/styles/rrt.css +159 -0
  73. package/dist/client/vditor/dist/js/highlight.js/styles/solarized-dark.css +146 -0
  74. package/dist/client/vditor/dist/js/highlight.js/styles/solarized-dark256.css +146 -0
  75. package/dist/client/vditor/dist/js/highlight.js/styles/solarized-light.css +163 -0
  76. package/dist/client/vditor/dist/js/highlight.js/styles/swapoff.css +144 -0
  77. package/dist/client/vditor/dist/js/highlight.js/styles/tango.css +183 -0
  78. package/dist/client/vditor/dist/js/highlight.js/styles/trac.css +167 -0
  79. package/dist/client/vditor/dist/js/highlight.js/styles/vim.css +144 -0
  80. package/dist/client/vditor/dist/js/highlight.js/styles/vs.css +113 -0
  81. package/dist/client/vditor/dist/js/highlight.js/styles/xcode.css +174 -0
  82. package/dist/client/vditor/dist/js/highlight.js/yul.min.js +39 -0
  83. package/dist/client/vditor/dist/js/i18n/en_US.js +94 -0
  84. package/dist/client/vditor/dist/js/i18n/fr_FR.js +94 -0
  85. package/dist/client/vditor/dist/js/i18n/ja_JP.js +94 -0
  86. package/dist/client/vditor/dist/js/i18n/ko_KR.js +94 -0
  87. package/dist/client/vditor/dist/js/i18n/pt_BR.js +94 -0
  88. package/dist/client/vditor/dist/js/i18n/ru_RU.js +94 -0
  89. package/dist/client/vditor/dist/js/i18n/sv_SE.js +94 -0
  90. package/dist/client/vditor/dist/js/i18n/zh_CN.js +94 -0
  91. package/dist/client/vditor/dist/js/i18n/zh_TW.js +94 -0
  92. package/dist/client/vditor/dist/js/icons/ant.js +183 -0
  93. package/dist/client/vditor/dist/js/icons/material.js +204 -0
  94. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_AMS-Regular.ttf +0 -0
  95. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_AMS-Regular.woff +0 -0
  96. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  97. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
  98. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
  99. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  100. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
  101. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
  102. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  103. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
  104. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Fraktur-Bold.woff +0 -0
  105. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  106. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
  107. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Fraktur-Regular.woff +0 -0
  108. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  109. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Main-Bold.ttf +0 -0
  110. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Main-Bold.woff +0 -0
  111. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Main-Bold.woff2 +0 -0
  112. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
  113. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Main-BoldItalic.woff +0 -0
  114. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  115. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Main-Italic.ttf +0 -0
  116. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Main-Italic.woff +0 -0
  117. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Main-Italic.woff2 +0 -0
  118. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Main-Regular.ttf +0 -0
  119. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Main-Regular.woff +0 -0
  120. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Main-Regular.woff2 +0 -0
  121. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
  122. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Math-BoldItalic.woff +0 -0
  123. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  124. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Math-Italic.ttf +0 -0
  125. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Math-Italic.woff +0 -0
  126. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Math-Italic.woff2 +0 -0
  127. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
  128. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_SansSerif-Bold.woff +0 -0
  129. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  130. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
  131. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_SansSerif-Italic.woff +0 -0
  132. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  133. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
  134. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_SansSerif-Regular.woff +0 -0
  135. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  136. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Script-Regular.ttf +0 -0
  137. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Script-Regular.woff +0 -0
  138. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Script-Regular.woff2 +0 -0
  139. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Size1-Regular.ttf +0 -0
  140. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Size1-Regular.woff +0 -0
  141. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  142. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Size2-Regular.ttf +0 -0
  143. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Size2-Regular.woff +0 -0
  144. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  145. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Size3-Regular.ttf +0 -0
  146. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Size3-Regular.woff +0 -0
  147. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  148. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Size4-Regular.ttf +0 -0
  149. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Size4-Regular.woff +0 -0
  150. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  151. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
  152. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Typewriter-Regular.woff +0 -0
  153. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  154. package/dist/client/vditor/dist/js/katex/katex.min.css +1 -0
  155. package/dist/client/vditor/dist/js/katex/katex.min.js +10 -0
  156. package/dist/client/vditor/dist/js/katex/mhchem.min.js +10 -0
  157. package/dist/client/vditor/dist/js/lute/lute.min.js +80 -0
  158. package/dist/client/vditor/dist/js/markmap/katex.min.css +1 -0
  159. package/dist/client/vditor/dist/js/markmap/markmap.min.js +8260 -0
  160. package/dist/client/vditor/dist/js/markmap/prism.css +140 -0
  161. package/dist/client/vditor/dist/js/mathjax/LICENSE +202 -0
  162. package/dist/client/vditor/dist/js/mathjax/a11y/assistive-mml.js +10 -0
  163. package/dist/client/vditor/dist/js/mathjax/a11y/complexity.js +10 -0
  164. package/dist/client/vditor/dist/js/mathjax/a11y/explorer.js +10 -0
  165. package/dist/client/vditor/dist/js/mathjax/a11y/semantic-enrich.js +10 -0
  166. package/dist/client/vditor/dist/js/mathjax/input/asciimath.js +10 -0
  167. package/dist/client/vditor/dist/js/mathjax/input/mml/entities.js +10 -0
  168. package/dist/client/vditor/dist/js/mathjax/input/mml.js +10 -0
  169. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/action.js +10 -0
  170. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/all-packages.js +10 -0
  171. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/ams.js +10 -0
  172. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/amscd.js +10 -0
  173. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/autoload.js +10 -0
  174. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/bbox.js +10 -0
  175. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/boldsymbol.js +10 -0
  176. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/braket.js +10 -0
  177. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/bussproofs.js +10 -0
  178. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/cancel.js +10 -0
  179. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/color.js +10 -0
  180. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/colorV2.js +10 -0
  181. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/configMacros.js +10 -0
  182. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/enclose.js +10 -0
  183. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/extpfeil.js +10 -0
  184. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/html.js +10 -0
  185. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/mhchem.js +10 -0
  186. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/newcommand.js +10 -0
  187. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/noerrors.js +10 -0
  188. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/noundefined.js +10 -0
  189. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/physics.js +10 -0
  190. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/require.js +10 -0
  191. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/tagFormat.js +10 -0
  192. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/textmacros.js +10 -0
  193. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/unicode.js +10 -0
  194. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/verb.js +10 -0
  195. package/dist/client/vditor/dist/js/mathjax/input/tex-base.js +10 -0
  196. package/dist/client/vditor/dist/js/mathjax/input/tex-full.js +10 -0
  197. package/dist/client/vditor/dist/js/mathjax/input/tex.js +10 -0
  198. package/dist/client/vditor/dist/js/mathjax/sre/mathmaps/de.js +113 -0
  199. package/dist/client/vditor/dist/js/mathjax/sre/mathmaps/en.js +119 -0
  200. package/dist/client/vditor/dist/js/mathjax/sre/mathmaps/es.js +113 -0
  201. package/dist/client/vditor/dist/js/mathjax/sre/mathmaps/fr.js +113 -0
  202. package/dist/client/vditor/dist/js/mathjax/sre/mathmaps/mathmaps_ie.js +527 -0
  203. package/dist/client/vditor/dist/js/mathjax/sre/mathmaps/nemeth.js +113 -0
  204. package/dist/client/vditor/dist/js/mathjax/sre/sre-node.js +20 -0
  205. package/dist/client/vditor/dist/js/mathjax/sre/sre_browser.js +1642 -0
  206. package/dist/client/vditor/dist/js/mathjax/tex-svg-full.js +10 -0
  207. package/dist/client/vditor/dist/js/mermaid/mermaid.min.js +1768 -0
  208. package/dist/client/vditor/dist/js/plantuml/plantuml-encoder.min.js +10 -0
  209. package/dist/client/vditor/dist/method.d.ts +50 -0
  210. package/dist/client/vditor/dist/method.min.js +10 -0
  211. package/dist/client/vditor/dist/ts/constants.d.ts +45 -0
  212. package/dist/client/vditor/dist/ts/devtools/index.d.ts +7 -0
  213. package/dist/client/vditor/dist/ts/export/index.d.ts +5 -0
  214. package/dist/client/vditor/dist/ts/hint/index.d.ts +14 -0
  215. package/dist/client/vditor/dist/ts/ir/expandMarker.d.ts +2 -0
  216. package/dist/client/vditor/dist/ts/ir/highlightToolbarIR.d.ts +2 -0
  217. package/dist/client/vditor/dist/ts/ir/index.d.ts +13 -0
  218. package/dist/client/vditor/dist/ts/ir/input.d.ts +2 -0
  219. package/dist/client/vditor/dist/ts/ir/process.d.ts +9 -0
  220. package/dist/client/vditor/dist/ts/ir/processKeydown.d.ts +2 -0
  221. package/dist/client/vditor/dist/ts/markdown/abcRender.d.ts +1 -0
  222. package/dist/client/vditor/dist/ts/markdown/adapterRender.d.ts +37 -0
  223. package/dist/client/vditor/dist/ts/markdown/anchorRender.d.ts +1 -0
  224. package/dist/client/vditor/dist/ts/markdown/chartRender.d.ts +1 -0
  225. package/dist/client/vditor/dist/ts/markdown/codeRender.d.ts +2 -0
  226. package/dist/client/vditor/dist/ts/markdown/flowchartRender.d.ts +1 -0
  227. package/dist/client/vditor/dist/ts/markdown/getHTML.d.ts +2 -0
  228. package/dist/client/vditor/dist/ts/markdown/getMarkdown.d.ts +2 -0
  229. package/dist/client/vditor/dist/ts/markdown/graphvizRender.d.ts +1 -0
  230. package/dist/client/vditor/dist/ts/markdown/highlightRender.d.ts +2 -0
  231. package/dist/client/vditor/dist/ts/markdown/lazyLoadImageRender.d.ts +6 -0
  232. package/dist/client/vditor/dist/ts/markdown/markmapRender.d.ts +1 -0
  233. package/dist/client/vditor/dist/ts/markdown/mathRender.d.ts +10 -0
  234. package/dist/client/vditor/dist/ts/markdown/mediaRender.d.ts +1 -0
  235. package/dist/client/vditor/dist/ts/markdown/mermaidRender.d.ts +1 -0
  236. package/dist/client/vditor/dist/ts/markdown/mindmapRender.d.ts +1 -0
  237. package/dist/client/vditor/dist/ts/markdown/outlineRender.d.ts +2 -0
  238. package/dist/client/vditor/dist/ts/markdown/plantumlRender.d.ts +1 -0
  239. package/dist/client/vditor/dist/ts/markdown/previewRender.d.ts +3 -0
  240. package/dist/client/vditor/dist/ts/markdown/setLute.d.ts +2 -0
  241. package/dist/client/vditor/dist/ts/markdown/speechRender.d.ts +7 -0
  242. package/dist/client/vditor/dist/ts/outline/index.d.ts +7 -0
  243. package/dist/client/vditor/dist/ts/preview/image.d.ts +2 -0
  244. package/dist/client/vditor/dist/ts/preview/index.d.ts +10 -0
  245. package/dist/client/vditor/dist/ts/resize/index.d.ts +6 -0
  246. package/dist/client/vditor/dist/ts/sv/combineFootnote.d.ts +6 -0
  247. package/dist/client/vditor/dist/ts/sv/index.d.ts +13 -0
  248. package/dist/client/vditor/dist/ts/sv/inputEvent.d.ts +2 -0
  249. package/dist/client/vditor/dist/ts/sv/process.d.ts +12 -0
  250. package/dist/client/vditor/dist/ts/sv/processKeydown.d.ts +2 -0
  251. package/dist/client/vditor/dist/ts/tip/index.d.ts +6 -0
  252. package/dist/client/vditor/dist/ts/toolbar/Both.d.ts +5 -0
  253. package/dist/client/vditor/dist/ts/toolbar/Br.d.ts +4 -0
  254. package/dist/client/vditor/dist/ts/toolbar/CodeTheme.d.ts +6 -0
  255. package/dist/client/vditor/dist/ts/toolbar/ContentTheme.d.ts +6 -0
  256. package/dist/client/vditor/dist/ts/toolbar/Counter.d.ts +6 -0
  257. package/dist/client/vditor/dist/ts/toolbar/Custom.d.ts +5 -0
  258. package/dist/client/vditor/dist/ts/toolbar/Devtools.d.ts +5 -0
  259. package/dist/client/vditor/dist/ts/toolbar/Divider.d.ts +4 -0
  260. package/dist/client/vditor/dist/ts/toolbar/EditMode.d.ts +8 -0
  261. package/dist/client/vditor/dist/ts/toolbar/Emoji.d.ts +7 -0
  262. package/dist/client/vditor/dist/ts/toolbar/Export.d.ts +6 -0
  263. package/dist/client/vditor/dist/ts/toolbar/Fullscreen.d.ts +6 -0
  264. package/dist/client/vditor/dist/ts/toolbar/Headings.d.ts +7 -0
  265. package/dist/client/vditor/dist/ts/toolbar/Help.d.ts +5 -0
  266. package/dist/client/vditor/dist/ts/toolbar/Indent.d.ts +5 -0
  267. package/dist/client/vditor/dist/ts/toolbar/Info.d.ts +5 -0
  268. package/dist/client/vditor/dist/ts/toolbar/InsertAfter.d.ts +5 -0
  269. package/dist/client/vditor/dist/ts/toolbar/InsertBefore.d.ts +5 -0
  270. package/dist/client/vditor/dist/ts/toolbar/MenuItem.d.ts +5 -0
  271. package/dist/client/vditor/dist/ts/toolbar/Outdent.d.ts +5 -0
  272. package/dist/client/vditor/dist/ts/toolbar/Outline.d.ts +5 -0
  273. package/dist/client/vditor/dist/ts/toolbar/Preview.d.ts +6 -0
  274. package/dist/client/vditor/dist/ts/toolbar/Record.d.ts +6 -0
  275. package/dist/client/vditor/dist/ts/toolbar/Redo.d.ts +5 -0
  276. package/dist/client/vditor/dist/ts/toolbar/Undo.d.ts +5 -0
  277. package/dist/client/vditor/dist/ts/toolbar/Upload.d.ts +6 -0
  278. package/dist/client/vditor/dist/ts/toolbar/index.d.ts +9 -0
  279. package/dist/client/vditor/dist/ts/toolbar/setToolbar.d.ts +21 -0
  280. package/dist/client/vditor/dist/ts/ui/initUI.d.ts +10 -0
  281. package/dist/client/vditor/dist/ts/ui/setCodeTheme.d.ts +1 -0
  282. package/dist/client/vditor/dist/ts/ui/setContentTheme.d.ts +1 -0
  283. package/dist/client/vditor/dist/ts/ui/setPreviewMode.d.ts +2 -0
  284. package/dist/client/vditor/dist/ts/ui/setTheme.d.ts +2 -0
  285. package/dist/client/vditor/dist/ts/undo/index.d.ts +19 -0
  286. package/dist/client/vditor/dist/ts/upload/getElement.d.ts +2 -0
  287. package/dist/client/vditor/dist/ts/upload/index.d.ts +9 -0
  288. package/dist/client/vditor/dist/ts/upload/setHeaders.d.ts +2 -0
  289. package/dist/client/vditor/dist/ts/util/Options.d.ts +8 -0
  290. package/dist/client/vditor/dist/ts/util/RecordMedia.d.ts +18 -0
  291. package/dist/client/vditor/dist/ts/util/addScript.d.ts +2 -0
  292. package/dist/client/vditor/dist/ts/util/addStyle.d.ts +1 -0
  293. package/dist/client/vditor/dist/ts/util/code160to32.d.ts +1 -0
  294. package/dist/client/vditor/dist/ts/util/compatibility.d.ts +7 -0
  295. package/dist/client/vditor/dist/ts/util/editorCommonEvent.d.ts +10 -0
  296. package/dist/client/vditor/dist/ts/util/fixBrowserBehavior.d.ts +40 -0
  297. package/dist/client/vditor/dist/ts/util/function.d.ts +2 -0
  298. package/dist/client/vditor/dist/ts/util/getSelectText.d.ts +1 -0
  299. package/dist/client/vditor/dist/ts/util/hasClosest.d.ts +9 -0
  300. package/dist/client/vditor/dist/ts/util/hasClosestByHeadings.d.ts +2 -0
  301. package/dist/client/vditor/dist/ts/util/highlightToolbar.d.ts +2 -0
  302. package/dist/client/vditor/dist/ts/util/hotKey.d.ts +1 -0
  303. package/dist/client/vditor/dist/ts/util/log.d.ts +1 -0
  304. package/dist/client/vditor/dist/ts/util/merge.d.ts +1 -0
  305. package/dist/client/vditor/dist/ts/util/processCode.d.ts +3 -0
  306. package/dist/client/vditor/dist/ts/util/selection.d.ts +15 -0
  307. package/dist/client/vditor/dist/ts/util/toc.d.ts +6 -0
  308. package/dist/client/vditor/dist/ts/wysiwyg/afterRenderEvent.d.ts +6 -0
  309. package/dist/client/vditor/dist/ts/wysiwyg/highlightToolbarWYSIWYG.d.ts +5 -0
  310. package/dist/client/vditor/dist/ts/wysiwyg/index.d.ts +22 -0
  311. package/dist/client/vditor/dist/ts/wysiwyg/inlineTag.d.ts +11 -0
  312. package/dist/client/vditor/dist/ts/wysiwyg/input.d.ts +2 -0
  313. package/dist/client/vditor/dist/ts/wysiwyg/processKeydown.d.ts +3 -0
  314. package/dist/client/vditor/dist/ts/wysiwyg/renderDomByMd.d.ts +6 -0
  315. package/dist/client/vditor/dist/ts/wysiwyg/setHeading.d.ts +3 -0
  316. package/dist/client/vditor/dist/ts/wysiwyg/showCode.d.ts +2 -0
  317. package/dist/client/vditor/dist/ts/wysiwyg/toolbarEvent.d.ts +2 -0
  318. package/dist/client/vditor/dist/types/index.d.ts +866 -0
  319. package/dist/externalVersion.js +16 -0
  320. package/dist/index.d.ts +10 -0
  321. package/dist/index.js +48 -0
  322. package/dist/locale/en-US.json +1 -0
  323. package/dist/locale/zh-CN.json +1 -0
  324. package/dist/server/index.d.ts +9 -0
  325. package/dist/server/index.js +42 -0
  326. package/dist/server/plugin.d.ts +19 -0
  327. package/dist/server/plugin.js +54 -0
  328. package/package.json +21 -0
  329. package/server.d.ts +2 -0
  330. package/server.js +1 -0
@@ -0,0 +1,342 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ /*
11
+ Viz.js 2.1.2 (Graphviz 2.40.1, Expat 2.2.5, Emscripten 1.37.36)
12
+ Copyright (c) 2014-2018 Michael Daines
13
+ Licensed under MIT license
14
+
15
+ This distribution contains other software in object code form:
16
+
17
+ Graphviz
18
+ Licensed under Eclipse Public License - v 1.0
19
+ http://www.graphviz.org
20
+
21
+ Expat
22
+ Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd and Clark Cooper
23
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers.
24
+ Licensed under MIT license
25
+ http://www.libexpat.org
26
+
27
+ zlib
28
+ Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
29
+ http://www.zlib.net/zlib_license.html
30
+ */
31
+ (function (global, factory) {
32
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
33
+ typeof define === 'function' && define.amd ? define(factory) :
34
+ (global.Viz = factory());
35
+ }(this, (function () { 'use strict';
36
+
37
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
38
+ return typeof obj;
39
+ } : function (obj) {
40
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
41
+ };
42
+
43
+ var classCallCheck = function (instance, Constructor) {
44
+ if (!(instance instanceof Constructor)) {
45
+ throw new TypeError("Cannot call a class as a function");
46
+ }
47
+ };
48
+
49
+ var createClass = function () {
50
+ function defineProperties(target, props) {
51
+ for (var i = 0; i < props.length; i++) {
52
+ var descriptor = props[i];
53
+ descriptor.enumerable = descriptor.enumerable || false;
54
+ descriptor.configurable = true;
55
+ if ("value" in descriptor) descriptor.writable = true;
56
+ Object.defineProperty(target, descriptor.key, descriptor);
57
+ }
58
+ }
59
+
60
+ return function (Constructor, protoProps, staticProps) {
61
+ if (protoProps) defineProperties(Constructor.prototype, protoProps);
62
+ if (staticProps) defineProperties(Constructor, staticProps);
63
+ return Constructor;
64
+ };
65
+ }();
66
+
67
+ var _extends = Object.assign || function (target) {
68
+ for (var i = 1; i < arguments.length; i++) {
69
+ var source = arguments[i];
70
+
71
+ for (var key in source) {
72
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
73
+ target[key] = source[key];
74
+ }
75
+ }
76
+ }
77
+
78
+ return target;
79
+ };
80
+
81
+ var WorkerWrapper = function () {
82
+ function WorkerWrapper(worker) {
83
+ var _this = this;
84
+
85
+ classCallCheck(this, WorkerWrapper);
86
+
87
+ this.worker = worker;
88
+ this.listeners = [];
89
+ this.nextId = 0;
90
+
91
+ this.worker.addEventListener('message', function (event) {
92
+ var id = event.data.id;
93
+ var error = event.data.error;
94
+ var result = event.data.result;
95
+
96
+ _this.listeners[id](error, result);
97
+ delete _this.listeners[id];
98
+ });
99
+ }
100
+
101
+ createClass(WorkerWrapper, [{
102
+ key: 'render',
103
+ value: function render(src, options) {
104
+ var _this2 = this;
105
+
106
+ return new Promise(function (resolve, reject) {
107
+ var id = _this2.nextId++;
108
+
109
+ _this2.listeners[id] = function (error, result) {
110
+ if (error) {
111
+ reject(new Error(error.message, error.fileName, error.lineNumber));
112
+ return;
113
+ }
114
+ resolve(result);
115
+ };
116
+
117
+ _this2.worker.postMessage({ id: id, src: src, options: options });
118
+ });
119
+ }
120
+ }]);
121
+ return WorkerWrapper;
122
+ }();
123
+
124
+ var ModuleWrapper = function ModuleWrapper(module, render) {
125
+ classCallCheck(this, ModuleWrapper);
126
+
127
+ var instance = module();
128
+ this.render = function (src, options) {
129
+ return new Promise(function (resolve, reject) {
130
+ try {
131
+ resolve(render(instance, src, options));
132
+ } catch (error) {
133
+ reject(error);
134
+ }
135
+ });
136
+ };
137
+ };
138
+
139
+ // https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding
140
+
141
+
142
+ function b64EncodeUnicode(str) {
143
+ return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function (match, p1) {
144
+ return String.fromCharCode('0x' + p1);
145
+ }));
146
+ }
147
+
148
+ function defaultScale() {
149
+ if ('devicePixelRatio' in window && window.devicePixelRatio > 1) {
150
+ return window.devicePixelRatio;
151
+ } else {
152
+ return 1;
153
+ }
154
+ }
155
+
156
+ function svgXmlToImageElement(svgXml) {
157
+ var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
158
+ _ref$scale = _ref.scale,
159
+ scale = _ref$scale === undefined ? defaultScale() : _ref$scale,
160
+ _ref$mimeType = _ref.mimeType,
161
+ mimeType = _ref$mimeType === undefined ? "image/png" : _ref$mimeType,
162
+ _ref$quality = _ref.quality,
163
+ quality = _ref$quality === undefined ? 1 : _ref$quality;
164
+
165
+ return new Promise(function (resolve, reject) {
166
+ var svgImage = new Image();
167
+
168
+ svgImage.onload = function () {
169
+ var canvas = document.createElement('canvas');
170
+ canvas.width = svgImage.width * scale;
171
+ canvas.height = svgImage.height * scale;
172
+
173
+ var context = canvas.getContext("2d");
174
+ context.drawImage(svgImage, 0, 0, canvas.width, canvas.height);
175
+
176
+ canvas.toBlob(function (blob) {
177
+ var image = new Image();
178
+ image.src = URL.createObjectURL(blob);
179
+ image.width = svgImage.width;
180
+ image.height = svgImage.height;
181
+
182
+ resolve(image);
183
+ }, mimeType, quality);
184
+ };
185
+
186
+ svgImage.onerror = function (e) {
187
+ var error;
188
+
189
+ if ('error' in e) {
190
+ error = e.error;
191
+ } else {
192
+ error = new Error('Error loading SVG');
193
+ }
194
+
195
+ reject(error);
196
+ };
197
+
198
+ svgImage.src = 'data:image/svg+xml;base64,' + b64EncodeUnicode(svgXml);
199
+ });
200
+ }
201
+
202
+ function svgXmlToImageElementFabric(svgXml) {
203
+ var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
204
+ _ref2$scale = _ref2.scale,
205
+ scale = _ref2$scale === undefined ? defaultScale() : _ref2$scale,
206
+ _ref2$mimeType = _ref2.mimeType,
207
+ mimeType = _ref2$mimeType === undefined ? 'image/png' : _ref2$mimeType,
208
+ _ref2$quality = _ref2.quality,
209
+ quality = _ref2$quality === undefined ? 1 : _ref2$quality;
210
+
211
+ var multiplier = scale;
212
+
213
+ var format = void 0;
214
+ if (mimeType == 'image/jpeg') {
215
+ format = 'jpeg';
216
+ } else if (mimeType == 'image/png') {
217
+ format = 'png';
218
+ }
219
+
220
+ return new Promise(function (resolve, reject) {
221
+ fabric.loadSVGFromString(svgXml, function (objects, options) {
222
+ // If there's something wrong with the SVG, Fabric may return an empty array of objects. Graphviz appears to give us at least one <g> element back even given an empty graph, so we will assume an error in this case.
223
+ if (objects.length == 0) {
224
+ reject(new Error('Error loading SVG with Fabric'));
225
+ }
226
+
227
+ var element = document.createElement("canvas");
228
+ element.width = options.width;
229
+ element.height = options.height;
230
+
231
+ var canvas = new fabric.Canvas(element, { enableRetinaScaling: false });
232
+ var obj = fabric.util.groupSVGElements(objects, options);
233
+ canvas.add(obj).renderAll();
234
+
235
+ var image = new Image();
236
+ image.src = canvas.toDataURL({ format: format, multiplier: multiplier, quality: quality });
237
+ image.width = options.width;
238
+ image.height = options.height;
239
+
240
+ resolve(image);
241
+ });
242
+ });
243
+ }
244
+
245
+ var Viz = function () {
246
+ function Viz() {
247
+ var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
248
+ workerURL = _ref3.workerURL,
249
+ worker = _ref3.worker,
250
+ Module = _ref3.Module,
251
+ render = _ref3.render;
252
+
253
+ classCallCheck(this, Viz);
254
+
255
+ if (typeof workerURL !== 'undefined') {
256
+ this.wrapper = new WorkerWrapper(new Worker(workerURL));
257
+ } else if (typeof worker !== 'undefined') {
258
+ this.wrapper = new WorkerWrapper(worker);
259
+ } else if (typeof Module !== 'undefined' && typeof render !== 'undefined') {
260
+ this.wrapper = new ModuleWrapper(Module, render);
261
+ } else if (typeof Viz.Module !== 'undefined' && typeof Viz.render !== 'undefined') {
262
+ this.wrapper = new ModuleWrapper(Viz.Module, Viz.render);
263
+ } else {
264
+ throw new Error('Must specify workerURL or worker option, Module and render options, or include one of full.render.js or lite.render.js after viz.js.');
265
+ }
266
+ }
267
+
268
+ createClass(Viz, [{
269
+ key: 'renderString',
270
+ value: function renderString(src) {
271
+ var _ref4 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
272
+ _ref4$format = _ref4.format,
273
+ format = _ref4$format === undefined ? 'svg' : _ref4$format,
274
+ _ref4$engine = _ref4.engine,
275
+ engine = _ref4$engine === undefined ? 'dot' : _ref4$engine,
276
+ _ref4$files = _ref4.files,
277
+ files = _ref4$files === undefined ? [] : _ref4$files,
278
+ _ref4$images = _ref4.images,
279
+ images = _ref4$images === undefined ? [] : _ref4$images,
280
+ _ref4$yInvert = _ref4.yInvert,
281
+ yInvert = _ref4$yInvert === undefined ? false : _ref4$yInvert,
282
+ _ref4$nop = _ref4.nop,
283
+ nop = _ref4$nop === undefined ? 0 : _ref4$nop;
284
+
285
+ for (var i = 0; i < images.length; i++) {
286
+ files.push({
287
+ path: images[i].path,
288
+ data: '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n<svg width="' + images[i].width + '" height="' + images[i].height + '"></svg>'
289
+ });
290
+ }
291
+
292
+ return this.wrapper.render(src, { format: format, engine: engine, files: files, images: images, yInvert: yInvert, nop: nop });
293
+ }
294
+ }, {
295
+ key: 'renderSVGElement',
296
+ value: function renderSVGElement(src) {
297
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
298
+
299
+ return this.renderString(src, _extends({}, options, { format: 'svg' })).then(function (str) {
300
+ var parser = new DOMParser();
301
+ return parser.parseFromString(str, 'image/svg+xml').documentElement;
302
+ });
303
+ }
304
+ }, {
305
+ key: 'renderImageElement',
306
+ value: function renderImageElement(src) {
307
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
308
+ var scale = options.scale,
309
+ mimeType = options.mimeType,
310
+ quality = options.quality;
311
+
312
+
313
+ return this.renderString(src, _extends({}, options, { format: 'svg' })).then(function (str) {
314
+ if ((typeof fabric === 'undefined' ? 'undefined' : _typeof(fabric)) === "object" && fabric.loadSVGFromString) {
315
+ return svgXmlToImageElementFabric(str, { scale: scale, mimeType: mimeType, quality: quality });
316
+ } else {
317
+ return svgXmlToImageElement(str, { scale: scale, mimeType: mimeType, quality: quality });
318
+ }
319
+ });
320
+ }
321
+ }, {
322
+ key: 'renderJSONObject',
323
+ value: function renderJSONObject(src) {
324
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
325
+ var format = options.format;
326
+
327
+
328
+ if (format !== 'json' || format !== 'json0') {
329
+ format = 'json';
330
+ }
331
+
332
+ return this.renderString(src, _extends({}, options, { format: format })).then(function (str) {
333
+ return JSON.parse(str);
334
+ });
335
+ }
336
+ }]);
337
+ return Viz;
338
+ }();
339
+
340
+ return Viz;
341
+
342
+ })));