markdown-flow-ui 0.3.2 → 0.3.4-dev.1

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 (265) hide show
  1. package/README.md +13 -0
  2. package/dist/_virtual/index.es8.js +2 -2
  3. package/dist/_virtual/index.es9.js +2 -2
  4. package/dist/_virtual/index8.cjs +1 -1
  5. package/dist/_virtual/index9.cjs +1 -1
  6. package/dist/assets/markdown-flow-ui.css +1 -10
  7. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.cjs +1 -1
  8. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.cjs.map +1 -1
  9. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.d.ts +2 -0
  10. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.es.js +275 -261
  11. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.es.js.map +1 -1
  12. package/dist/components/MarkdownFlowEditor/editorI18n.d.ts +22 -0
  13. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.cjs +1 -1
  14. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.d.ts +2 -1
  15. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.es.js +18 -16
  16. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.es.js.map +1 -1
  17. package/dist/components/MarkdownFlowEditor/locales/de-DE.json.cjs +1 -1
  18. package/dist/components/MarkdownFlowEditor/locales/de-DE.json.d.ts +2 -1
  19. package/dist/components/MarkdownFlowEditor/locales/de-DE.json.es.js +27 -25
  20. package/dist/components/MarkdownFlowEditor/locales/de-DE.json.es.js.map +1 -1
  21. package/dist/components/MarkdownFlowEditor/locales/en-US.json.cjs +1 -1
  22. package/dist/components/MarkdownFlowEditor/locales/en-US.json.d.ts +2 -1
  23. package/dist/components/MarkdownFlowEditor/locales/en-US.json.es.js +27 -25
  24. package/dist/components/MarkdownFlowEditor/locales/en-US.json.es.js.map +1 -1
  25. package/dist/components/MarkdownFlowEditor/locales/es-ES.json.cjs +1 -1
  26. package/dist/components/MarkdownFlowEditor/locales/es-ES.json.d.ts +2 -1
  27. package/dist/components/MarkdownFlowEditor/locales/es-ES.json.es.js +11 -9
  28. package/dist/components/MarkdownFlowEditor/locales/es-ES.json.es.js.map +1 -1
  29. package/dist/components/MarkdownFlowEditor/locales/fil-PH.json.cjs +1 -1
  30. package/dist/components/MarkdownFlowEditor/locales/fil-PH.json.d.ts +2 -1
  31. package/dist/components/MarkdownFlowEditor/locales/fil-PH.json.es.js +15 -13
  32. package/dist/components/MarkdownFlowEditor/locales/fil-PH.json.es.js.map +1 -1
  33. package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.cjs +1 -1
  34. package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.d.ts +2 -1
  35. package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.es.js +23 -21
  36. package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.es.js.map +1 -1
  37. package/dist/components/MarkdownFlowEditor/locales/ja-JP.json.cjs +1 -1
  38. package/dist/components/MarkdownFlowEditor/locales/ja-JP.json.d.ts +2 -1
  39. package/dist/components/MarkdownFlowEditor/locales/ja-JP.json.es.js +21 -19
  40. package/dist/components/MarkdownFlowEditor/locales/ja-JP.json.es.js.map +1 -1
  41. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.cjs +1 -1
  42. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.d.ts +2 -1
  43. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.es.js +20 -18
  44. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.es.js.map +1 -1
  45. package/dist/components/MarkdownFlowEditor/locales/ur-PK.json.cjs +1 -1
  46. package/dist/components/MarkdownFlowEditor/locales/ur-PK.json.d.ts +2 -1
  47. package/dist/components/MarkdownFlowEditor/locales/ur-PK.json.es.js +15 -13
  48. package/dist/components/MarkdownFlowEditor/locales/ur-PK.json.es.js.map +1 -1
  49. package/dist/components/MarkdownFlowEditor/locales/vi-VN.json.cjs +1 -1
  50. package/dist/components/MarkdownFlowEditor/locales/vi-VN.json.d.ts +2 -1
  51. package/dist/components/MarkdownFlowEditor/locales/vi-VN.json.es.js +29 -27
  52. package/dist/components/MarkdownFlowEditor/locales/vi-VN.json.es.js.map +1 -1
  53. package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.cjs +1 -1
  54. package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.d.ts +2 -1
  55. package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.es.js +25 -23
  56. package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.es.js.map +1 -1
  57. package/dist/components/MarkdownFlowEditor/plugins/ImgPlaceholder.cjs +1 -1
  58. package/dist/components/MarkdownFlowEditor/plugins/ImgPlaceholder.cjs.map +1 -1
  59. package/dist/components/MarkdownFlowEditor/plugins/ImgPlaceholder.es.js +23 -24
  60. package/dist/components/MarkdownFlowEditor/plugins/ImgPlaceholder.es.js.map +1 -1
  61. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.cjs +3 -3
  62. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.cjs.map +1 -1
  63. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.d.ts +5 -1
  64. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.es.js +161 -155
  65. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.es.js.map +1 -1
  66. package/dist/components/MarkdownFlowEditor/plugins/VideoPlaceholder.cjs +1 -1
  67. package/dist/components/MarkdownFlowEditor/plugins/VideoPlaceholder.cjs.map +1 -1
  68. package/dist/components/MarkdownFlowEditor/plugins/VideoPlaceholder.es.js +21 -22
  69. package/dist/components/MarkdownFlowEditor/plugins/VideoPlaceholder.es.js.map +1 -1
  70. package/dist/components/MarkdownFlowEditor/utils.cjs +1 -1
  71. package/dist/components/MarkdownFlowEditor/utils.cjs.map +1 -1
  72. package/dist/components/MarkdownFlowEditor/utils.d.ts +5 -1
  73. package/dist/components/MarkdownFlowEditor/utils.es.js +40 -41
  74. package/dist/components/MarkdownFlowEditor/utils.es.js.map +1 -1
  75. package/dist/markdown-flow-ui-lib.css +1 -1
  76. package/dist/markdown-flow-ui.css +1 -10
  77. package/dist/node_modules/@braintree/sanitize-url/dist/index.cjs +1 -1
  78. package/dist/node_modules/@braintree/sanitize-url/dist/index.es.js +1 -1
  79. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FOHPRMQF.cjs +2 -14
  80. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FOHPRMQF.cjs.map +1 -1
  81. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FOHPRMQF.es.js +6 -26
  82. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FOHPRMQF.es.js.map +1 -1
  83. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-ICYGCRZG.cjs +1 -1
  84. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-ICYGCRZG.cjs.map +1 -1
  85. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-ICYGCRZG.es.js +2 -6
  86. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-ICYGCRZG.es.js.map +1 -1
  87. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.es.js +1 -1
  88. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.es.js.map +1 -1
  89. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/dist/index.es.js +1 -1
  90. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/dist/index.es.js.map +1 -1
  91. package/dist/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-primitive/dist/index.es.js +1 -1
  92. package/dist/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-primitive/dist/index.es.js.map +1 -1
  93. package/dist/node_modules/@radix-ui/react-primitive/dist/index.es.js +1 -1
  94. package/dist/node_modules/@radix-ui/react-primitive/dist/index.es.js.map +1 -1
  95. package/dist/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.es.js +1 -1
  96. package/dist/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.es.js.map +1 -1
  97. package/dist/node_modules/@radix-ui/react-slot/dist/index.es.js +2 -2
  98. package/dist/node_modules/@radix-ui/react-slot/dist/index.es.js.map +1 -1
  99. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.es.js +1 -1
  100. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.es.js.map +1 -1
  101. package/dist/node_modules/classnames/index.cjs +1 -5
  102. package/dist/node_modules/classnames/index.cjs.map +1 -1
  103. package/dist/node_modules/classnames/index.es.js +1 -6
  104. package/dist/node_modules/classnames/index.es.js.map +1 -1
  105. package/dist/node_modules/cytoscape/dist/cytoscape.esm.cjs +3 -13
  106. package/dist/node_modules/cytoscape/dist/cytoscape.esm.cjs.map +1 -1
  107. package/dist/node_modules/cytoscape/dist/cytoscape.esm.es.js +15 -46
  108. package/dist/node_modules/cytoscape/dist/cytoscape.esm.es.js.map +1 -1
  109. package/dist/node_modules/d3-scale/src/ordinal.es.js +1 -1
  110. package/dist/node_modules/d3-scale/src/ordinal.es.js.map +1 -1
  111. package/dist/node_modules/dompurify/dist/purify.es.cjs +2 -2
  112. package/dist/node_modules/dompurify/dist/purify.es.cjs.map +1 -1
  113. package/dist/node_modules/dompurify/dist/purify.es.es.js +0 -2
  114. package/dist/node_modules/dompurify/dist/purify.es.es.js.map +1 -1
  115. package/dist/node_modules/highlight.js/lib/core.es.js +1 -1
  116. package/dist/node_modules/highlight.js/lib/core.es.js.map +1 -1
  117. package/dist/node_modules/katex/dist/katex.cjs +18 -18
  118. package/dist/node_modules/katex/dist/katex.cjs.map +1 -1
  119. package/dist/node_modules/katex/dist/katex.es.js +2716 -3120
  120. package/dist/node_modules/katex/dist/katex.es.js.map +1 -1
  121. package/dist/node_modules/lucide-react/dist/esm/Icon.cjs +1 -6
  122. package/dist/node_modules/lucide-react/dist/esm/Icon.cjs.map +1 -1
  123. package/dist/node_modules/lucide-react/dist/esm/Icon.es.js +0 -6
  124. package/dist/node_modules/lucide-react/dist/esm/Icon.es.js.map +1 -1
  125. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.cjs +1 -6
  126. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.cjs.map +1 -1
  127. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.es.js +0 -6
  128. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.es.js.map +1 -1
  129. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.cjs +1 -6
  130. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.cjs.map +1 -1
  131. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.es.js +0 -6
  132. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.es.js.map +1 -1
  133. package/dist/node_modules/lucide-react/dist/esm/icons/captions-off.cjs +1 -6
  134. package/dist/node_modules/lucide-react/dist/esm/icons/captions-off.cjs.map +1 -1
  135. package/dist/node_modules/lucide-react/dist/esm/icons/captions-off.es.js +0 -6
  136. package/dist/node_modules/lucide-react/dist/esm/icons/captions-off.es.js.map +1 -1
  137. package/dist/node_modules/lucide-react/dist/esm/icons/captions.cjs +1 -6
  138. package/dist/node_modules/lucide-react/dist/esm/icons/captions.cjs.map +1 -1
  139. package/dist/node_modules/lucide-react/dist/esm/icons/captions.es.js +0 -6
  140. package/dist/node_modules/lucide-react/dist/esm/icons/captions.es.js.map +1 -1
  141. package/dist/node_modules/lucide-react/dist/esm/icons/check.cjs +1 -6
  142. package/dist/node_modules/lucide-react/dist/esm/icons/check.cjs.map +1 -1
  143. package/dist/node_modules/lucide-react/dist/esm/icons/check.es.js +0 -6
  144. package/dist/node_modules/lucide-react/dist/esm/icons/check.es.js.map +1 -1
  145. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.cjs +1 -6
  146. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.cjs.map +1 -1
  147. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.es.js +0 -6
  148. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.es.js.map +1 -1
  149. package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-down.cjs +1 -6
  150. package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-down.cjs.map +1 -1
  151. package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-down.es.js +0 -6
  152. package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-down.es.js.map +1 -1
  153. package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.cjs +1 -6
  154. package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.cjs.map +1 -1
  155. package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.es.js +0 -6
  156. package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.es.js.map +1 -1
  157. package/dist/node_modules/lucide-react/dist/esm/icons/copy.cjs +1 -6
  158. package/dist/node_modules/lucide-react/dist/esm/icons/copy.cjs.map +1 -1
  159. package/dist/node_modules/lucide-react/dist/esm/icons/copy.es.js +0 -6
  160. package/dist/node_modules/lucide-react/dist/esm/icons/copy.es.js.map +1 -1
  161. package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.cjs +1 -6
  162. package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.cjs.map +1 -1
  163. package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.es.js +0 -6
  164. package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.es.js.map +1 -1
  165. package/dist/node_modules/lucide-react/dist/esm/icons/fast-forward.cjs +1 -6
  166. package/dist/node_modules/lucide-react/dist/esm/icons/fast-forward.cjs.map +1 -1
  167. package/dist/node_modules/lucide-react/dist/esm/icons/fast-forward.es.js +0 -6
  168. package/dist/node_modules/lucide-react/dist/esm/icons/fast-forward.es.js.map +1 -1
  169. package/dist/node_modules/lucide-react/dist/esm/icons/file-type.cjs +1 -6
  170. package/dist/node_modules/lucide-react/dist/esm/icons/file-type.cjs.map +1 -1
  171. package/dist/node_modules/lucide-react/dist/esm/icons/file-type.es.js +0 -6
  172. package/dist/node_modules/lucide-react/dist/esm/icons/file-type.es.js.map +1 -1
  173. package/dist/node_modules/lucide-react/dist/esm/icons/grip-horizontal.cjs +1 -6
  174. package/dist/node_modules/lucide-react/dist/esm/icons/grip-horizontal.cjs.map +1 -1
  175. package/dist/node_modules/lucide-react/dist/esm/icons/grip-horizontal.es.js +0 -6
  176. package/dist/node_modules/lucide-react/dist/esm/icons/grip-horizontal.es.js.map +1 -1
  177. package/dist/node_modules/lucide-react/dist/esm/icons/image.cjs +1 -6
  178. package/dist/node_modules/lucide-react/dist/esm/icons/image.cjs.map +1 -1
  179. package/dist/node_modules/lucide-react/dist/esm/icons/image.es.js +0 -6
  180. package/dist/node_modules/lucide-react/dist/esm/icons/image.es.js.map +1 -1
  181. package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.cjs +1 -6
  182. package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.cjs.map +1 -1
  183. package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.es.js +0 -6
  184. package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.es.js.map +1 -1
  185. package/dist/node_modules/lucide-react/dist/esm/icons/maximize.cjs +1 -6
  186. package/dist/node_modules/lucide-react/dist/esm/icons/maximize.cjs.map +1 -1
  187. package/dist/node_modules/lucide-react/dist/esm/icons/maximize.es.js +0 -6
  188. package/dist/node_modules/lucide-react/dist/esm/icons/maximize.es.js.map +1 -1
  189. package/dist/node_modules/lucide-react/dist/esm/icons/rewind.cjs +1 -6
  190. package/dist/node_modules/lucide-react/dist/esm/icons/rewind.cjs.map +1 -1
  191. package/dist/node_modules/lucide-react/dist/esm/icons/rewind.es.js +0 -6
  192. package/dist/node_modules/lucide-react/dist/esm/icons/rewind.es.js.map +1 -1
  193. package/dist/node_modules/lucide-react/dist/esm/icons/scan-line.cjs +1 -6
  194. package/dist/node_modules/lucide-react/dist/esm/icons/scan-line.cjs.map +1 -1
  195. package/dist/node_modules/lucide-react/dist/esm/icons/scan-line.es.js +0 -6
  196. package/dist/node_modules/lucide-react/dist/esm/icons/scan-line.es.js.map +1 -1
  197. package/dist/node_modules/lucide-react/dist/esm/icons/skip-back.cjs +1 -6
  198. package/dist/node_modules/lucide-react/dist/esm/icons/skip-back.cjs.map +1 -1
  199. package/dist/node_modules/lucide-react/dist/esm/icons/skip-back.es.js +0 -6
  200. package/dist/node_modules/lucide-react/dist/esm/icons/skip-back.es.js.map +1 -1
  201. package/dist/node_modules/lucide-react/dist/esm/icons/skip-forward.cjs +1 -6
  202. package/dist/node_modules/lucide-react/dist/esm/icons/skip-forward.cjs.map +1 -1
  203. package/dist/node_modules/lucide-react/dist/esm/icons/skip-forward.es.js +0 -6
  204. package/dist/node_modules/lucide-react/dist/esm/icons/skip-forward.es.js.map +1 -1
  205. package/dist/node_modules/lucide-react/dist/esm/icons/square-check.cjs +1 -6
  206. package/dist/node_modules/lucide-react/dist/esm/icons/square-check.cjs.map +1 -1
  207. package/dist/node_modules/lucide-react/dist/esm/icons/square-check.es.js +0 -6
  208. package/dist/node_modules/lucide-react/dist/esm/icons/square-check.es.js.map +1 -1
  209. package/dist/node_modules/lucide-react/dist/esm/icons/square-play.cjs +1 -6
  210. package/dist/node_modules/lucide-react/dist/esm/icons/square-play.cjs.map +1 -1
  211. package/dist/node_modules/lucide-react/dist/esm/icons/square-play.es.js +0 -6
  212. package/dist/node_modules/lucide-react/dist/esm/icons/square-play.es.js.map +1 -1
  213. package/dist/node_modules/lucide-react/dist/esm/icons/text-cursor-input.cjs +1 -6
  214. package/dist/node_modules/lucide-react/dist/esm/icons/text-cursor-input.cjs.map +1 -1
  215. package/dist/node_modules/lucide-react/dist/esm/icons/text-cursor-input.es.js +0 -6
  216. package/dist/node_modules/lucide-react/dist/esm/icons/text-cursor-input.es.js.map +1 -1
  217. package/dist/node_modules/lucide-react/dist/esm/icons/upload.cjs +1 -6
  218. package/dist/node_modules/lucide-react/dist/esm/icons/upload.cjs.map +1 -1
  219. package/dist/node_modules/lucide-react/dist/esm/icons/upload.es.js +0 -6
  220. package/dist/node_modules/lucide-react/dist/esm/icons/upload.es.js.map +1 -1
  221. package/dist/node_modules/lucide-react/dist/esm/icons/volume-2.cjs +1 -6
  222. package/dist/node_modules/lucide-react/dist/esm/icons/volume-2.cjs.map +1 -1
  223. package/dist/node_modules/lucide-react/dist/esm/icons/volume-2.es.js +0 -6
  224. package/dist/node_modules/lucide-react/dist/esm/icons/volume-2.es.js.map +1 -1
  225. package/dist/node_modules/lucide-react/dist/esm/icons/x.cjs +1 -6
  226. package/dist/node_modules/lucide-react/dist/esm/icons/x.cjs.map +1 -1
  227. package/dist/node_modules/lucide-react/dist/esm/icons/x.es.js +0 -6
  228. package/dist/node_modules/lucide-react/dist/esm/icons/x.es.js.map +1 -1
  229. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.cjs +1 -6
  230. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.cjs.map +1 -1
  231. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.es.js +0 -6
  232. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.es.js.map +1 -1
  233. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-VBNYF7ZC.cjs +1 -1
  234. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-VBNYF7ZC.cjs.map +1 -1
  235. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-VBNYF7ZC.es.js +1 -6
  236. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-VBNYF7ZC.es.js.map +1 -1
  237. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/dagre-VZM6K2ZE.cjs +1 -1
  238. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/dagre-VZM6K2ZE.cjs.map +1 -1
  239. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/dagre-VZM6K2ZE.es.js +0 -3
  240. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/dagre-VZM6K2ZE.es.js.map +1 -1
  241. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-B4RE2ZJO.cjs +1 -1
  242. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-B4RE2ZJO.cjs.map +1 -1
  243. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-B4RE2ZJO.es.js +0 -2
  244. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-B4RE2ZJO.es.js.map +1 -1
  245. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-7S7Q4E2Y.cjs +1 -1
  246. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-7S7Q4E2Y.cjs.map +1 -1
  247. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-7S7Q4E2Y.es.js +0 -1
  248. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-7S7Q4E2Y.es.js.map +1 -1
  249. package/dist/node_modules/mermaid/dist/mermaid.core.cjs +1 -3
  250. package/dist/node_modules/mermaid/dist/mermaid.core.cjs.map +1 -1
  251. package/dist/node_modules/mermaid/dist/mermaid.core.es.js +0 -4
  252. package/dist/node_modules/mermaid/dist/mermaid.core.es.js.map +1 -1
  253. package/dist/node_modules/rc-util/es/React/isFragment.es.js +1 -1
  254. package/dist/node_modules/rc-util/es/React/isFragment.es.js.map +1 -1
  255. package/dist/node_modules/rc-util/node_modules/react-is/cjs/react-is.development.cjs +1 -9
  256. package/dist/node_modules/rc-util/node_modules/react-is/cjs/react-is.development.cjs.map +1 -1
  257. package/dist/node_modules/rc-util/node_modules/react-is/cjs/react-is.development.es.js +2 -11
  258. package/dist/node_modules/rc-util/node_modules/react-is/cjs/react-is.development.es.js.map +1 -1
  259. package/dist/node_modules/rc-util/node_modules/react-is/cjs/react-is.production.min.cjs +1 -9
  260. package/dist/node_modules/rc-util/node_modules/react-is/cjs/react-is.production.min.cjs.map +1 -1
  261. package/dist/node_modules/rc-util/node_modules/react-is/cjs/react-is.production.min.es.js +2 -11
  262. package/dist/node_modules/rc-util/node_modules/react-is/cjs/react-is.production.min.es.js.map +1 -1
  263. package/dist/node_modules/style-mod/src/style-mod.es.js +1 -1
  264. package/dist/node_modules/style-mod/src/style-mod.es.js.map +1 -1
  265. package/package.json +21 -20
@@ -1,8 +1,8 @@
1
- const n = "Nhập '/' để chèn nội dung", o = "Nhập nội dung của bạn", t = "Nhập nội dung của bạn, gõ '/' để xem thêm tùy chọn", e = "Cài đặt", i = "Đóng", l = "Thêm hình ảnh", c = "Thêm video", h = "Nhập URL hình ảnh", W = "URL", a = "Xem trước", s = "Nhập tiêu đề hình ảnh", d = "Dùng hình ảnh", r = "Tên hình ảnh", u = "Tải lên", g = "Kéo thả tệp vào đây hoặc nhấp để tải lên", b = "Đang tải lên...", p = "Tải lên thành công", v = "Tải lên thất bại, vui lòng thử lại", m = "Thêm văn bản cố định", T = "Văn bản cố định", U = "Đường phân cách", C = "Tiêu đề hình ảnh", L = "Tỷ lệ", Z = "Hủy", B = "Nhập URL hình ảnh", I = "Nhập URL hình ảnh hợp lệ", x = "Nhập URL video Bilibili hoặc YouTube", _ = "URL", N = "Xem trước", V = "Dùng tài nguyên", P = "Nhập tiêu đề video", R = "Tiêu đề", f = "Tiêu đề video", D = "Video Bilibili", y = "Video YouTube", k = "Nhập URL video Bilibili hoặc YouTube hợp lệ", $ = "Hủy", Y = "Dùng video", E = "Bản xem trước sẽ xuất hiện ở đây", H = "Xem trước video", O = "Hình ảnh", S = "Video", X = "Văn bản cố định", q = "Chèn kết quả xác nhận", w = "Chèn liên kết", F = "Chèn nút", K = "Chèn lựa chọn đơn", M = "Lựa chọn 1", Q = "Lựa chọn 2", j = "Chèn lựa chọn nhiều đáp án", z = "Chèn ô nhập liệu", A = "Vui lòng nhập", G = "Chèn hình ảnh", J = "Chèn video", nn = {
1
+ const n = "Nhập '/' để chèn nội dung", o = "Nhập nội dung của bạn", e = "Nhập nội dung của bạn, gõ '/' để xem thêm tùy chọn", t = "Cài đặt", i = "Đóng", l = "Thêm hình ảnh", c = "Thêm video", h = "Nhập URL hình ảnh", Z = "URL", a = "Xem trước", s = "Nhập tiêu đề hình ảnh", d = "Dùng hình ảnh", r = "Tên hình ảnh", u = "Tải lên", g = "Kéo thả tệp vào đây hoặc nhấp để tải lên", b = "Đang tải lên...", p = "Tải lên thành công", v = "Tải lên thất bại, vui lòng thử lại", m = "Thêm văn bản cố định", T = "Văn bản cố định", U = "Đường phân cách", C = "Tiêu đề hình ảnh", L = "Tỷ lệ", _ = "Hủy", B = "Nhập URL hình ảnh", I = "Nhập URL hình ảnh hợp lệ", x = "Nhập URL video Bilibili hoặc YouTube", $ = "URL", N = "Xem trước", P = "Dùng tài nguyên", V = "Nhập tiêu đề video", R = "Tiêu đề", f = "Tiêu đề video", D = "Video Bilibili", y = "Video YouTube", k = "Nhập URL video Bilibili hoặc YouTube hợp lệ", nn = "Hủy", Y = "Dùng video", q = "Bản xem trước sẽ xuất hiện ở đây", E = "Xem trước video", H = "Hình ảnh", O = "Video", S = "Văn bản cố định", X = "Chèn kết quả xác nhận", w = "Chèn liên kết", F = "Chèn nút", K = "Chèn lựa chọn đơn", M = "Lựa chọn 1", Q = "Lựa chọn 2", j = "Chèn lựa chọn nhiều đáp án", z = "Chèn ô nhập liệu", A = "Vui lòng nhập", G = "Chèn hình ảnh", J = "Chèn video", W = "Câu hỏi của bạn", on = {
2
2
  placeholder: n,
3
3
  placeholderCodeEdit: o,
4
- placeholderQuickEdit: t,
5
- dialogTitle: e,
4
+ placeholderQuickEdit: e,
5
+ dialogTitle: t,
6
6
  dialogCloseLabel: i,
7
7
  dialogTitleImage: l,
8
8
  dialogTitleVideo: c,
@@ -28,8 +28,8 @@ const n = "Nhập '/' để chèn nội dung", o = "Nhập nội dung của bạ
28
28
  videoUrlPlaceholder: x,
29
29
  videoUrlLabel: "URL",
30
30
  videoRunButton: N,
31
- videoUseButton: V,
32
- videoTitlePlaceholder: P,
31
+ videoUseButton: P,
32
+ videoTitlePlaceholder: V,
33
33
  videoTitleLabel: R,
34
34
  videoDefaultTitle: f,
35
35
  videoDefaultTitleBilibili: D,
@@ -37,12 +37,12 @@ const n = "Nhập '/' để chèn nội dung", o = "Nhập nội dung của bạ
37
37
  videoInvalidUrl: k,
38
38
  videoCancelButton: "Hủy",
39
39
  videoUseVideoButton: Y,
40
- videoPreviewPlaceholder: E,
41
- videoPreviewTitle: H,
42
- slashImage: O,
43
- slashVideo: S,
44
- slashFixedText: X,
45
- toolbarConfirmOutput: q,
40
+ videoPreviewPlaceholder: q,
41
+ videoPreviewTitle: E,
42
+ slashImage: H,
43
+ slashVideo: O,
44
+ slashFixedText: S,
45
+ toolbarConfirmOutput: X,
46
46
  toolbarInsertLink: w,
47
47
  toolbarInsertButton: F,
48
48
  toolbarInsertSingleChoice: K,
@@ -52,17 +52,18 @@ const n = "Nhập '/' để chèn nội dung", o = "Nhập nội dung của bạ
52
52
  toolbarInsertInput: z,
53
53
  toolbarInputPlaceholder: A,
54
54
  toolbarInsertImage: G,
55
- toolbarInsertVideo: J
55
+ toolbarInsertVideo: J,
56
+ questionPlaceholder: W
56
57
  };
57
58
  export {
58
- nn as default,
59
+ on as default,
59
60
  i as dialogCloseLabel,
60
- e as dialogTitle,
61
+ t as dialogTitle,
61
62
  l as dialogTitleImage,
62
63
  c as dialogTitleVideo,
63
64
  m as fixedTextPlaceholder,
64
65
  T as fixedTextTooltip,
65
- Z as imageCancelButton,
66
+ _ as imageCancelButton,
66
67
  r as imageDefaultTitle,
67
68
  I as imageInvalidUrl,
68
69
  a as imageRunButton,
@@ -74,20 +75,21 @@ export {
74
75
  g as imageUploadPlaceholder,
75
76
  p as imageUploadSuccess,
76
77
  b as imageUploading,
77
- W as imageUrlLabel,
78
+ Z as imageUrlLabel,
78
79
  h as imageUrlPlaceholder,
79
80
  B as imageUrlRequired,
80
81
  d as imageUseButton,
81
82
  n as placeholder,
82
83
  o as placeholderCodeEdit,
83
- t as placeholderQuickEdit,
84
+ e as placeholderQuickEdit,
85
+ W as questionPlaceholder,
84
86
  U as slashDivider,
85
- X as slashFixedText,
86
- O as slashImage,
87
- S as slashVideo,
87
+ S as slashFixedText,
88
+ H as slashImage,
89
+ O as slashVideo,
88
90
  M as toolbarChoiceOption1,
89
91
  Q as toolbarChoiceOption2,
90
- q as toolbarConfirmOutput,
92
+ X as toolbarConfirmOutput,
91
93
  A as toolbarInputPlaceholder,
92
94
  F as toolbarInsertButton,
93
95
  G as toolbarInsertImage,
@@ -96,19 +98,19 @@ export {
96
98
  j as toolbarInsertMultiChoice,
97
99
  K as toolbarInsertSingleChoice,
98
100
  J as toolbarInsertVideo,
99
- $ as videoCancelButton,
101
+ nn as videoCancelButton,
100
102
  f as videoDefaultTitle,
101
103
  D as videoDefaultTitleBilibili,
102
104
  y as videoDefaultTitleYoutube,
103
105
  k as videoInvalidUrl,
104
- E as videoPreviewPlaceholder,
105
- H as videoPreviewTitle,
106
+ q as videoPreviewPlaceholder,
107
+ E as videoPreviewTitle,
106
108
  N as videoRunButton,
107
109
  R as videoTitleLabel,
108
- P as videoTitlePlaceholder,
109
- _ as videoUrlLabel,
110
+ V as videoTitlePlaceholder,
111
+ $ as videoUrlLabel,
110
112
  x as videoUrlPlaceholder,
111
- V as videoUseButton,
113
+ P as videoUseButton,
112
114
  Y as videoUseVideoButton
113
115
  };
114
116
  //# sourceMappingURL=vi-VN.json.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"vi-VN.json.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"vi-VN.json.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="输入'/'快速插入内容",o="请输入你的内容",t="请输入你的内容,输入 / 唤起更多",l="设置",i="关闭",a="添加图片",n="添加视频",s="请输入图片地址",d="URL",c="预览",r="请输入图片标题",u="使用图片",g="图片名称",b="上传",m="拖拽文件或点击上传",v="正在上传...",h="上传完成",T="上传失败,请重试",U="添加固定文本",p="固定文本",I="分割线",P="图片标题",B="缩放比例",C="取消",L="请输入图片地址",f="请输入有效的图片地址",x="请输入 B 站或 YouTube 视频链接",D="URL",R="预览",S="使用资源",V="请输入视频标题",O="标题",E="视频标题",Y="哔哩哔哩视频",k="YouTube 视频",w="请输入有效的 B 站或 YouTube 视频链接",M="取消",q="使用视频",F="预览将在这里显示",Q="视频预览",_="图片",j="视频",y="固定文本",z="插入确定内容",N="插入链接",A="插入按钮",G="插入单选",H="选项1",J="选项2",K="插入多选",W="插入输入框",X="请输入",Z="插入图片",$="插入视频",ee={placeholder:e,placeholderCodeEdit:o,placeholderQuickEdit:t,dialogTitle:l,dialogCloseLabel:i,dialogTitleImage:a,dialogTitleVideo:n,imageUrlPlaceholder:s,imageUrlLabel:d,imageRunButton:c,imageTitlePlaceholder:r,imageUseButton:u,imageDefaultTitle:g,imageUploadLabel:b,imageUploadPlaceholder:m,imageUploading:v,imageUploadSuccess:h,imageUploadError:T,fixedTextPlaceholder:U,fixedTextTooltip:p,slashDivider:I,imageTitleLabel:P,imageScaleLabel:B,imageCancelButton:C,imageUrlRequired:L,imageInvalidUrl:f,videoUrlPlaceholder:x,videoUrlLabel:D,videoRunButton:R,videoUseButton:S,videoTitlePlaceholder:V,videoTitleLabel:O,videoDefaultTitle:E,videoDefaultTitleBilibili:Y,videoDefaultTitleYoutube:k,videoInvalidUrl:w,videoCancelButton:M,videoUseVideoButton:q,videoPreviewPlaceholder:F,videoPreviewTitle:Q,slashImage:_,slashVideo:j,slashFixedText:y,toolbarConfirmOutput:z,toolbarInsertLink:N,toolbarInsertButton:A,toolbarInsertSingleChoice:G,toolbarChoiceOption1:H,toolbarChoiceOption2:J,toolbarInsertMultiChoice:K,toolbarInsertInput:W,toolbarInputPlaceholder:X,toolbarInsertImage:Z,toolbarInsertVideo:$};exports.default=ee;exports.dialogCloseLabel=i;exports.dialogTitle=l;exports.dialogTitleImage=a;exports.dialogTitleVideo=n;exports.fixedTextPlaceholder=U;exports.fixedTextTooltip=p;exports.imageCancelButton=C;exports.imageDefaultTitle=g;exports.imageInvalidUrl=f;exports.imageRunButton=c;exports.imageScaleLabel=B;exports.imageTitleLabel=P;exports.imageTitlePlaceholder=r;exports.imageUploadError=T;exports.imageUploadLabel=b;exports.imageUploadPlaceholder=m;exports.imageUploadSuccess=h;exports.imageUploading=v;exports.imageUrlLabel=d;exports.imageUrlPlaceholder=s;exports.imageUrlRequired=L;exports.imageUseButton=u;exports.placeholder=e;exports.placeholderCodeEdit=o;exports.placeholderQuickEdit=t;exports.slashDivider=I;exports.slashFixedText=y;exports.slashImage=_;exports.slashVideo=j;exports.toolbarChoiceOption1=H;exports.toolbarChoiceOption2=J;exports.toolbarConfirmOutput=z;exports.toolbarInputPlaceholder=X;exports.toolbarInsertButton=A;exports.toolbarInsertImage=Z;exports.toolbarInsertInput=W;exports.toolbarInsertLink=N;exports.toolbarInsertMultiChoice=K;exports.toolbarInsertSingleChoice=G;exports.toolbarInsertVideo=$;exports.videoCancelButton=M;exports.videoDefaultTitle=E;exports.videoDefaultTitleBilibili=Y;exports.videoDefaultTitleYoutube=k;exports.videoInvalidUrl=w;exports.videoPreviewPlaceholder=F;exports.videoPreviewTitle=Q;exports.videoRunButton=R;exports.videoTitleLabel=O;exports.videoTitlePlaceholder=V;exports.videoUrlLabel=D;exports.videoUrlPlaceholder=x;exports.videoUseButton=S;exports.videoUseVideoButton=q;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="输入'/'快速插入内容",o="请输入你的内容",t="请输入你的内容,输入 / 唤起更多",l="设置",i="关闭",a="添加图片",n="添加视频",s="请输入图片地址",c="URL",d="预览",r="请输入图片标题",u="使用图片",g="图片名称",b="上传",h="拖拽文件或点击上传",m="正在上传...",v="上传完成",T="上传失败,请重试",U="添加固定文本",p="固定文本",I="分割线",P="图片标题",B="缩放比例",C="取消",L="请输入图片地址",f="请输入有效的图片地址",x="请输入 B 站或 YouTube 视频链接",D="URL",R="预览",S="使用资源",V="请输入视频标题",O="标题",E="视频标题",Y="哔哩哔哩视频",k="YouTube 视频",q="请输入有效的 B 站或 YouTube 视频链接",w="取消",M="使用视频",F="预览将在这里显示",Q="视频预览",_="图片",j="视频",y="固定文本",z="插入确定内容",N="插入链接",A="插入按钮",G="插入单选",H="选项1",J="选项2",K="插入多选",W="插入输入框",X="请输入",Z="插入图片",$="插入视频",ee="你的问题",oe={placeholder:e,placeholderCodeEdit:o,placeholderQuickEdit:t,dialogTitle:l,dialogCloseLabel:i,dialogTitleImage:a,dialogTitleVideo:n,imageUrlPlaceholder:s,imageUrlLabel:c,imageRunButton:d,imageTitlePlaceholder:r,imageUseButton:u,imageDefaultTitle:g,imageUploadLabel:b,imageUploadPlaceholder:h,imageUploading:m,imageUploadSuccess:v,imageUploadError:T,fixedTextPlaceholder:U,fixedTextTooltip:p,slashDivider:I,imageTitleLabel:P,imageScaleLabel:B,imageCancelButton:C,imageUrlRequired:L,imageInvalidUrl:f,videoUrlPlaceholder:x,videoUrlLabel:D,videoRunButton:R,videoUseButton:S,videoTitlePlaceholder:V,videoTitleLabel:O,videoDefaultTitle:E,videoDefaultTitleBilibili:Y,videoDefaultTitleYoutube:k,videoInvalidUrl:q,videoCancelButton:w,videoUseVideoButton:M,videoPreviewPlaceholder:F,videoPreviewTitle:Q,slashImage:_,slashVideo:j,slashFixedText:y,toolbarConfirmOutput:z,toolbarInsertLink:N,toolbarInsertButton:A,toolbarInsertSingleChoice:G,toolbarChoiceOption1:H,toolbarChoiceOption2:J,toolbarInsertMultiChoice:K,toolbarInsertInput:W,toolbarInputPlaceholder:X,toolbarInsertImage:Z,toolbarInsertVideo:$,questionPlaceholder:ee};exports.default=oe;exports.dialogCloseLabel=i;exports.dialogTitle=l;exports.dialogTitleImage=a;exports.dialogTitleVideo=n;exports.fixedTextPlaceholder=U;exports.fixedTextTooltip=p;exports.imageCancelButton=C;exports.imageDefaultTitle=g;exports.imageInvalidUrl=f;exports.imageRunButton=d;exports.imageScaleLabel=B;exports.imageTitleLabel=P;exports.imageTitlePlaceholder=r;exports.imageUploadError=T;exports.imageUploadLabel=b;exports.imageUploadPlaceholder=h;exports.imageUploadSuccess=v;exports.imageUploading=m;exports.imageUrlLabel=c;exports.imageUrlPlaceholder=s;exports.imageUrlRequired=L;exports.imageUseButton=u;exports.placeholder=e;exports.placeholderCodeEdit=o;exports.placeholderQuickEdit=t;exports.questionPlaceholder=ee;exports.slashDivider=I;exports.slashFixedText=y;exports.slashImage=_;exports.slashVideo=j;exports.toolbarChoiceOption1=H;exports.toolbarChoiceOption2=J;exports.toolbarConfirmOutput=z;exports.toolbarInputPlaceholder=X;exports.toolbarInsertButton=A;exports.toolbarInsertImage=Z;exports.toolbarInsertInput=W;exports.toolbarInsertLink=N;exports.toolbarInsertMultiChoice=K;exports.toolbarInsertSingleChoice=G;exports.toolbarInsertVideo=$;exports.videoCancelButton=w;exports.videoDefaultTitle=E;exports.videoDefaultTitleBilibili=Y;exports.videoDefaultTitleYoutube=k;exports.videoInvalidUrl=q;exports.videoPreviewPlaceholder=F;exports.videoPreviewTitle=Q;exports.videoRunButton=R;exports.videoTitleLabel=O;exports.videoTitlePlaceholder=V;exports.videoUrlLabel=D;exports.videoUrlPlaceholder=x;exports.videoUseButton=S;exports.videoUseVideoButton=M;
2
2
  //# sourceMappingURL=zh-CN.json.cjs.map
@@ -52,7 +52,8 @@ declare const _default: {
52
52
  "toolbarInsertInput": "插入输入框",
53
53
  "toolbarInputPlaceholder": "请输入",
54
54
  "toolbarInsertImage": "插入图片",
55
- "toolbarInsertVideo": "插入视频"
55
+ "toolbarInsertVideo": "插入视频",
56
+ "questionPlaceholder": "你的问题"
56
57
  }
57
58
  ;
58
59
 
@@ -1,4 +1,4 @@
1
- const o = "输入'/'快速插入内容", e = "请输入你的内容", t = "请输入你的内容,输入 / 唤起更多", F = "设置", M = "关闭", l = "添加图片", i = "添加视频", n = "请输入图片地址", N = "URL", Q = "预览", a = "请输入图片标题", s = "使用图片", c = "图片名称", j = "上传", d = "拖拽文件或点击上传", r = "正在上传...", u = "上传完成", g = "上传失败,请重试", b = "添加固定文本", h = "固定文本", y = "分割线", m = "图片标题", v = "缩放比例", A = "取消", T = "请输入图片地址", U = "请输入有效的图片地址", p = "请输入 B 站或 YouTube 视频链接", G = "URL", H = "预览", I = "使用资源", B = "请输入视频标题", J = "标题", C = "视频标题", L = "哔哩哔哩视频", P = "YouTube 视频", f = "请输入有效的 B 站或 YouTube 视频链接", K = "取消", x = "使用视频", R = "预览将在这里显示", D = "视频预览", W = "图片", X = "视频", O = "固定文本", V = "插入确定内容", Y = "插入链接", E = "插入按钮", S = "插入单选", Z = "选项1", _ = "选项2", k = "插入多选", w = "插入输入框", $ = "请输入", q = "插入图片", z = "插入视频", oo = {
1
+ const o = "输入'/'快速插入内容", e = "请输入你的内容", t = "请输入你的内容,输入 / 唤起更多", M = "设置", N = "关闭", l = "添加图片", i = "添加视频", n = "请输入图片地址", Q = "URL", j = "预览", a = "请输入图片标题", s = "使用图片", c = "图片名称", y = "上传", d = "拖拽文件或点击上传", r = "正在上传...", u = "上传完成", g = "上传失败,请重试", b = "添加固定文本", h = "固定文本", A = "分割线", m = "图片标题", v = "缩放比例", G = "取消", T = "请输入图片地址", U = "请输入有效的图片地址", p = "请输入 B 站或 YouTube 视频链接", H = "URL", J = "预览", I = "使用资源", B = "请输入视频标题", K = "标题", C = "视频标题", L = "哔哩哔哩视频", P = "YouTube 视频", f = "请输入有效的 B 站或 YouTube 视频链接", W = "取消", x = "使用视频", R = "预览将在这里显示", D = "视频预览", X = "图片", Z = "视频", O = "固定文本", V = "插入确定内容", Y = "插入链接", E = "插入按钮", S = "插入单选", _ = "选项1", $ = "选项2", k = "插入多选", q = "插入输入框", oo = "请输入", w = "插入图片", z = "插入视频", F = "你的问题", eo = {
2
2
  placeholder: o,
3
3
  placeholderCodeEdit: e,
4
4
  placeholderQuickEdit: t,
@@ -49,64 +49,66 @@ const o = "输入'/'快速插入内容", e = "请输入你的内容", t = "请
49
49
  toolbarChoiceOption1: "选项1",
50
50
  toolbarChoiceOption2: "选项2",
51
51
  toolbarInsertMultiChoice: k,
52
- toolbarInsertInput: w,
52
+ toolbarInsertInput: q,
53
53
  toolbarInputPlaceholder: "请输入",
54
- toolbarInsertImage: q,
55
- toolbarInsertVideo: z
54
+ toolbarInsertImage: w,
55
+ toolbarInsertVideo: z,
56
+ questionPlaceholder: F
56
57
  };
57
58
  export {
58
- oo as default,
59
- M as dialogCloseLabel,
60
- F as dialogTitle,
59
+ eo as default,
60
+ N as dialogCloseLabel,
61
+ M as dialogTitle,
61
62
  l as dialogTitleImage,
62
63
  i as dialogTitleVideo,
63
64
  b as fixedTextPlaceholder,
64
65
  h as fixedTextTooltip,
65
- A as imageCancelButton,
66
+ G as imageCancelButton,
66
67
  c as imageDefaultTitle,
67
68
  U as imageInvalidUrl,
68
- Q as imageRunButton,
69
+ j as imageRunButton,
69
70
  v as imageScaleLabel,
70
71
  m as imageTitleLabel,
71
72
  a as imageTitlePlaceholder,
72
73
  g as imageUploadError,
73
- j as imageUploadLabel,
74
+ y as imageUploadLabel,
74
75
  d as imageUploadPlaceholder,
75
76
  u as imageUploadSuccess,
76
77
  r as imageUploading,
77
- N as imageUrlLabel,
78
+ Q as imageUrlLabel,
78
79
  n as imageUrlPlaceholder,
79
80
  T as imageUrlRequired,
80
81
  s as imageUseButton,
81
82
  o as placeholder,
82
83
  e as placeholderCodeEdit,
83
84
  t as placeholderQuickEdit,
84
- y as slashDivider,
85
+ F as questionPlaceholder,
86
+ A as slashDivider,
85
87
  O as slashFixedText,
86
- W as slashImage,
87
- X as slashVideo,
88
- Z as toolbarChoiceOption1,
89
- _ as toolbarChoiceOption2,
88
+ X as slashImage,
89
+ Z as slashVideo,
90
+ _ as toolbarChoiceOption1,
91
+ $ as toolbarChoiceOption2,
90
92
  V as toolbarConfirmOutput,
91
- $ as toolbarInputPlaceholder,
93
+ oo as toolbarInputPlaceholder,
92
94
  E as toolbarInsertButton,
93
- q as toolbarInsertImage,
94
- w as toolbarInsertInput,
95
+ w as toolbarInsertImage,
96
+ q as toolbarInsertInput,
95
97
  Y as toolbarInsertLink,
96
98
  k as toolbarInsertMultiChoice,
97
99
  S as toolbarInsertSingleChoice,
98
100
  z as toolbarInsertVideo,
99
- K as videoCancelButton,
101
+ W as videoCancelButton,
100
102
  C as videoDefaultTitle,
101
103
  L as videoDefaultTitleBilibili,
102
104
  P as videoDefaultTitleYoutube,
103
105
  f as videoInvalidUrl,
104
106
  R as videoPreviewPlaceholder,
105
107
  D as videoPreviewTitle,
106
- H as videoRunButton,
107
- J as videoTitleLabel,
108
+ J as videoRunButton,
109
+ K as videoTitleLabel,
108
110
  B as videoTitlePlaceholder,
109
- G as videoUrlLabel,
111
+ H as videoUrlLabel,
110
112
  p as videoUrlPlaceholder,
111
113
  I as videoUseButton,
112
114
  x as videoUseVideoButton
@@ -1 +1 @@
1
- {"version":3,"file":"zh-CN.json.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"zh-CN.json.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("../../../node_modules/@codemirror/view/dist/index.cjs"),f=require("../types.cjs"),x=require("../utils.cjs"),b=require("./PlaceholderWidget.cjs"),u=require("./mediaPlaceholderLabels.cjs"),P=require("../../../_virtual/index.cjs"),w=/!\[([^\]]*)\]\(([^)]+)\)|<img\b[^>]*>/i,M=/===\s*(?:!\[[^\]]*\]\([^)]+\)|<img\b[^>]*>)\s*===|!\[[^\]]*\]\([^)]+\)|<img\b[^>]*>/gi,l=(e,c)=>{const t=new RegExp(`${c}\\s*=\\s*("(.*?)"|'(.*?)'|([^\\s"'<>]+))`,"i"),r=e.match(t);if(r)return r[2]??r[3]??r[4]},D=e=>Math.max(1,Math.min(1e3,Math.round(e))),q=e=>{const c=e?.[0]??"",t=x.unwrapFixedOutput(c),r=/^\s*===/.test(c);if(/^<img\b/i.test(t)){const n=l(t,"src")??"",d=l(t,"alt")??l(t,"title")??"",h=l(t,"width");let m;if(h){const g=Number.parseFloat(h);Number.isFinite(g)&&(m=D(g))}return{text:d,url:n,title:d,scalePercent:m,fixedOutput:r}}const s=t.match(w),o=s?.[1]??"",a=s?.[2]??"";return{text:o,url:a,title:o,scalePercent:void 0,fixedOutput:r}},p=e=>{const c=P.distExports.findDocumentVariableMarkers(e.state.doc.toString()).filter(t=>t.name!==null);return new i.MatchDecorator({regexp:M,decoration:(t,r,s)=>{const o=s+t[0].length;if(c.some(n=>s<n.end&&o>n.start))return null;const a=q(t);return i.Decoration.replace({widget:new b.default(a.text||r.state.facet(u.mediaPlaceholderLabels).image,{tag:"image",url:a.url,title:a.title,scalePercent:a.scalePercent,fixedOutput:a.fixedOutput},"tag-image",f.SelectedOption.Image,r)})}})},v=i.ViewPlugin.fromClass(class{constructor(e){this.matcher=p(e),this.placeholders=this.matcher.createDeco(e)}update(e){if(e.docChanged&&(this.matcher=p(e.view)),e.docChanged||e.startState.facet(u.mediaPlaceholderLabels)!==e.state.facet(u.mediaPlaceholderLabels)){this.placeholders=this.matcher.createDeco(e.view);return}this.placeholders=this.matcher.updateDeco(e,this.placeholders)}},{decorations:e=>e.placeholders,provide:e=>i.EditorView.atomicRanges.of(c=>c.plugin(e)?.placeholders||i.Decoration.none)});exports.default=v;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("../../../node_modules/@codemirror/view/dist/index.cjs"),x=require("../types.cjs"),p=require("../utils.cjs"),b=require("./PlaceholderWidget.cjs"),u=require("./mediaPlaceholderLabels.cjs"),P=/!\[([^\]]*)\]\(([^)]+)\)|<img\b[^>]*>/i,w=/===\s*(?:!\[[^\]]*\]\([^)]+\)|<img\b[^>]*>)\s*===|!\[[^\]]*\]\([^)]+\)|<img\b[^>]*>/gi,l=(e,c)=>{const t=new RegExp(`${c}\\s*=\\s*("(.*?)"|'(.*?)'|([^\\s"'<>]+))`,"i"),r=e.match(t);if(r)return r[2]??r[3]??r[4]},M=e=>Math.max(1,Math.min(1e3,Math.round(e))),D=e=>{const c=e?.[0]??"",t=p.unwrapFixedOutput(c),r=/^\s*===/.test(c);if(/^<img\b/i.test(t)){const n=l(t,"src")??"",d=l(t,"alt")??l(t,"title")??"",h=l(t,"width");let m;if(h){const g=Number.parseFloat(h);Number.isFinite(g)&&(m=M(g))}return{text:d,url:n,title:d,scalePercent:m,fixedOutput:r}}const s=t.match(P),o=s?.[1]??"",a=s?.[2]??"";return{text:o,url:a,title:o,scalePercent:void 0,fixedOutput:r}},f=e=>{const c=p.findDocumentVariableMarkers(e.state.doc.toString()).filter(t=>t.name!==null);return new i.MatchDecorator({regexp:w,decoration:(t,r,s)=>{const o=s+t[0].length;if(c.some(n=>s<n.end&&o>n.start))return null;const a=D(t);return i.Decoration.replace({widget:new b.default(a.text||r.state.facet(u.mediaPlaceholderLabels).image,{tag:"image",url:a.url,title:a.title,scalePercent:a.scalePercent,fixedOutput:a.fixedOutput},"tag-image",x.SelectedOption.Image,r)})}})},v=i.ViewPlugin.fromClass(class{constructor(e){this.matcher=f(e),this.placeholders=this.matcher.createDeco(e)}update(e){if(e.docChanged&&(this.matcher=f(e.view)),e.docChanged||e.startState.facet(u.mediaPlaceholderLabels)!==e.state.facet(u.mediaPlaceholderLabels)){this.placeholders=this.matcher.createDeco(e.view);return}this.placeholders=this.matcher.updateDeco(e,this.placeholders)}},{decorations:e=>e.placeholders,provide:e=>i.EditorView.atomicRanges.of(c=>c.plugin(e)?.placeholders||i.Decoration.none)});exports.default=v;
2
2
  //# sourceMappingURL=ImgPlaceholder.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ImgPlaceholder.cjs","sources":["../../../../src/components/MarkdownFlowEditor/plugins/ImgPlaceholder.ts"],"sourcesContent":["import {\n EditorView,\n Decoration,\n DecorationSet,\n ViewPlugin,\n ViewUpdate,\n MatchDecorator,\n} from \"@codemirror/view\";\nimport { SelectedOption } from \"../types\";\nimport { findDocumentVariableMarkers, unwrapFixedOutput } from \"../utils\";\nimport PlaceholderWidget from \"./PlaceholderWidget\";\nimport { mediaPlaceholderLabels } from \"./mediaPlaceholderLabels\";\n\nconst imageMarkupRegexp = /!\\[([^\\]]*)\\]\\(([^)]+)\\)|<img\\b[^>]*>/i;\nconst agiImgContextRegexp =\n /===\\s*(?:!\\[[^\\]]*\\]\\([^)]+\\)|<img\\b[^>]*>)\\s*===|!\\[[^\\]]*\\]\\([^)]+\\)|<img\\b[^>]*>/gi;\n\nconst extractAttributeValue = (tag: string, attribute: string) => {\n const regexp = new RegExp(\n `${attribute}\\\\s*=\\\\s*(\"(.*?)\"|'(.*?)'|([^\\\\s\"'<>]+))`,\n \"i\"\n );\n const match = tag.match(regexp);\n if (!match) return undefined;\n return match[2] ?? match[3] ?? match[4];\n};\n\nconst clampScalePercent = (value: number) =>\n Math.max(1, Math.min(1000, Math.round(value)));\n\nconst getImageMatchInfo = (match: RegExpMatchArray) => {\n const source = match?.[0] ?? \"\";\n const raw = unwrapFixedOutput(source);\n const fixedOutput = /^\\s*===/.test(source);\n if (/^<img\\b/i.test(raw)) {\n const src = extractAttributeValue(raw, \"src\") ?? \"\";\n const alt =\n extractAttributeValue(raw, \"alt\") ??\n extractAttributeValue(raw, \"title\") ??\n \"\";\n const widthAttr = extractAttributeValue(raw, \"width\");\n let scalePercent: number | undefined;\n if (widthAttr) {\n const numeric = Number.parseFloat(widthAttr);\n if (Number.isFinite(numeric)) {\n scalePercent = clampScalePercent(numeric);\n }\n }\n return {\n text: alt,\n url: src,\n title: alt,\n scalePercent,\n fixedOutput,\n };\n }\n const markdownMatch = raw.match(imageMarkupRegexp);\n const title = markdownMatch?.[1] ?? \"\";\n const url = markdownMatch?.[2] ?? \"\";\n return {\n text: title,\n url,\n title,\n scalePercent: undefined,\n fixedOutput,\n };\n};\n\nconst createImageUrlMatcher = (view: EditorView) => {\n const variables = findDocumentVariableMarkers(\n view.state.doc.toString()\n ).filter((marker) => marker.name !== null);\n return new MatchDecorator({\n regexp: agiImgContextRegexp,\n decoration: (match, view, from) => {\n const to = from + match[0].length;\n if (variables.some((marker) => from < marker.end && to > marker.start)) {\n return null;\n }\n const info = getImageMatchInfo(match);\n return Decoration.replace({\n widget: new PlaceholderWidget(\n info.text || view.state.facet(mediaPlaceholderLabels).image,\n {\n tag: \"image\",\n url: info.url,\n title: info.title,\n scalePercent: info.scalePercent,\n fixedOutput: info.fixedOutput,\n },\n \"tag-image\",\n SelectedOption.Image,\n view\n ),\n });\n },\n });\n};\n\nconst ImgPlaceholder = ViewPlugin.fromClass(\n class {\n placeholders: DecorationSet;\n matcher: MatchDecorator;\n constructor(view: EditorView) {\n this.matcher = createImageUrlMatcher(view);\n this.placeholders = this.matcher.createDeco(view);\n }\n update(update: ViewUpdate) {\n if (update.docChanged) {\n this.matcher = createImageUrlMatcher(update.view);\n }\n if (\n update.docChanged ||\n update.startState.facet(mediaPlaceholderLabels) !==\n update.state.facet(mediaPlaceholderLabels)\n ) {\n this.placeholders = this.matcher.createDeco(update.view);\n return;\n }\n this.placeholders = this.matcher.updateDeco(update, this.placeholders);\n }\n },\n {\n decorations: (instance) => instance.placeholders,\n provide: (plugin) =>\n EditorView.atomicRanges.of((view) => {\n return view.plugin(plugin)?.placeholders || Decoration.none;\n }),\n }\n);\n\nexport default ImgPlaceholder;\n"],"names":["imageMarkupRegexp","agiImgContextRegexp","extractAttributeValue","tag","attribute","regexp","match","clampScalePercent","value","getImageMatchInfo","source","raw","unwrapFixedOutput","fixedOutput","src","alt","widthAttr","scalePercent","numeric","markdownMatch","title","url","createImageUrlMatcher","view","variables","findDocumentVariableMarkers","marker","MatchDecorator","from","to","info","Decoration","PlaceholderWidget","mediaPlaceholderLabels","SelectedOption","ImgPlaceholder","ViewPlugin","update","instance","plugin","EditorView"],"mappings":"iWAaMA,EAAoB,yCACpBC,EACJ,wFAEIC,EAAwB,CAACC,EAAaC,IAAsB,CAChE,MAAMC,EAAS,IAAI,OACjB,GAAGD,CAAS,2CACZ,GAAA,EAEIE,EAAQH,EAAI,MAAME,CAAM,EAC9B,GAAKC,EACL,OAAOA,EAAM,CAAC,GAAKA,EAAM,CAAC,GAAKA,EAAM,CAAC,CACxC,EAEMC,EAAqBC,GACzB,KAAK,IAAI,EAAG,KAAK,IAAI,IAAM,KAAK,MAAMA,CAAK,CAAC,CAAC,EAEzCC,EAAqBH,GAA4B,CACrD,MAAMI,EAASJ,IAAQ,CAAC,GAAK,GACvBK,EAAMC,EAAAA,kBAAkBF,CAAM,EAC9BG,EAAc,UAAU,KAAKH,CAAM,EACzC,GAAI,WAAW,KAAKC,CAAG,EAAG,CACxB,MAAMG,EAAMZ,EAAsBS,EAAK,KAAK,GAAK,GAC3CI,EACJb,EAAsBS,EAAK,KAAK,GAChCT,EAAsBS,EAAK,OAAO,GAClC,GACIK,EAAYd,EAAsBS,EAAK,OAAO,EACpD,IAAIM,EACJ,GAAID,EAAW,CACb,MAAME,EAAU,OAAO,WAAWF,CAAS,EACvC,OAAO,SAASE,CAAO,IACzBD,EAAeV,EAAkBW,CAAO,EAE5C,CACA,MAAO,CACL,KAAMH,EACN,IAAKD,EACL,MAAOC,EACP,aAAAE,EACA,YAAAJ,CAAA,CAEJ,CACA,MAAMM,EAAgBR,EAAI,MAAMX,CAAiB,EAC3CoB,EAAQD,IAAgB,CAAC,GAAK,GAC9BE,EAAMF,IAAgB,CAAC,GAAK,GAClC,MAAO,CACL,KAAMC,EACN,IAAAC,EACA,MAAAD,EACA,aAAc,OACd,YAAAP,CAAA,CAEJ,EAEMS,EAAyBC,GAAqB,CAClD,MAAMC,EAAYC,EAAAA,YAAAA,4BAChBF,EAAK,MAAM,IAAI,SAAA,CAAS,EACxB,OAAQG,GAAWA,EAAO,OAAS,IAAI,EACzC,OAAO,IAAIC,EAAAA,eAAe,CACxB,OAAQ1B,EACR,WAAY,CAACK,EAAOiB,EAAMK,IAAS,CACjC,MAAMC,EAAKD,EAAOtB,EAAM,CAAC,EAAE,OAC3B,GAAIkB,EAAU,KAAME,GAAWE,EAAOF,EAAO,KAAOG,EAAKH,EAAO,KAAK,EACnE,OAAO,KAET,MAAMI,EAAOrB,EAAkBH,CAAK,EACpC,OAAOyB,EAAAA,WAAW,QAAQ,CACxB,OAAQ,IAAIC,EAAAA,QACVF,EAAK,MAAQP,EAAK,MAAM,MAAMU,EAAAA,sBAAsB,EAAE,MACtD,CACE,IAAK,QACL,IAAKH,EAAK,IACV,MAAOA,EAAK,MACZ,aAAcA,EAAK,aACnB,YAAaA,EAAK,WAAA,EAEpB,YACAI,EAAAA,eAAe,MACfX,CAAA,CACF,CACD,CACH,CAAA,CACD,CACH,EAEMY,EAAiBC,EAAAA,WAAW,UAChC,KAAM,CAGJ,YAAYb,EAAkB,CAC5B,KAAK,QAAUD,EAAsBC,CAAI,EACzC,KAAK,aAAe,KAAK,QAAQ,WAAWA,CAAI,CAClD,CACA,OAAOc,EAAoB,CAIzB,GAHIA,EAAO,aACT,KAAK,QAAUf,EAAsBe,EAAO,IAAI,GAGhDA,EAAO,YACPA,EAAO,WAAW,MAAMJ,wBAAsB,IAC5CI,EAAO,MAAM,MAAMJ,EAAAA,sBAAsB,EAC3C,CACA,KAAK,aAAe,KAAK,QAAQ,WAAWI,EAAO,IAAI,EACvD,MACF,CACA,KAAK,aAAe,KAAK,QAAQ,WAAWA,EAAQ,KAAK,YAAY,CACvE,CAAA,EAEF,CACE,YAAcC,GAAaA,EAAS,aACpC,QAAUC,GACRC,EAAAA,WAAW,aAAa,GAAIjB,GACnBA,EAAK,OAAOgB,CAAM,GAAG,cAAgBR,EAAAA,WAAW,IACxD,CAAA,CAEP"}
1
+ {"version":3,"file":"ImgPlaceholder.cjs","sources":["../../../../src/components/MarkdownFlowEditor/plugins/ImgPlaceholder.ts"],"sourcesContent":["import {\n EditorView,\n Decoration,\n DecorationSet,\n ViewPlugin,\n ViewUpdate,\n MatchDecorator,\n} from \"@codemirror/view\";\nimport { SelectedOption } from \"../types\";\nimport { findDocumentVariableMarkers, unwrapFixedOutput } from \"../utils\";\nimport PlaceholderWidget from \"./PlaceholderWidget\";\nimport { mediaPlaceholderLabels } from \"./mediaPlaceholderLabels\";\n\nconst imageMarkupRegexp = /!\\[([^\\]]*)\\]\\(([^)]+)\\)|<img\\b[^>]*>/i;\nconst agiImgContextRegexp =\n /===\\s*(?:!\\[[^\\]]*\\]\\([^)]+\\)|<img\\b[^>]*>)\\s*===|!\\[[^\\]]*\\]\\([^)]+\\)|<img\\b[^>]*>/gi;\n\nconst extractAttributeValue = (tag: string, attribute: string) => {\n const regexp = new RegExp(\n `${attribute}\\\\s*=\\\\s*(\"(.*?)\"|'(.*?)'|([^\\\\s\"'<>]+))`,\n \"i\"\n );\n const match = tag.match(regexp);\n if (!match) return undefined;\n return match[2] ?? match[3] ?? match[4];\n};\n\nconst clampScalePercent = (value: number) =>\n Math.max(1, Math.min(1000, Math.round(value)));\n\nconst getImageMatchInfo = (match: RegExpMatchArray) => {\n const source = match?.[0] ?? \"\";\n const raw = unwrapFixedOutput(source);\n const fixedOutput = /^\\s*===/.test(source);\n if (/^<img\\b/i.test(raw)) {\n const src = extractAttributeValue(raw, \"src\") ?? \"\";\n const alt =\n extractAttributeValue(raw, \"alt\") ??\n extractAttributeValue(raw, \"title\") ??\n \"\";\n const widthAttr = extractAttributeValue(raw, \"width\");\n let scalePercent: number | undefined;\n if (widthAttr) {\n const numeric = Number.parseFloat(widthAttr);\n if (Number.isFinite(numeric)) {\n scalePercent = clampScalePercent(numeric);\n }\n }\n return {\n text: alt,\n url: src,\n title: alt,\n scalePercent,\n fixedOutput,\n };\n }\n const markdownMatch = raw.match(imageMarkupRegexp);\n const title = markdownMatch?.[1] ?? \"\";\n const url = markdownMatch?.[2] ?? \"\";\n return {\n text: title,\n url,\n title,\n scalePercent: undefined,\n fixedOutput,\n };\n};\n\nconst createImageUrlMatcher = (view: EditorView) => {\n const variables = findDocumentVariableMarkers(\n view.state.doc.toString()\n ).filter((marker) => marker.name !== null);\n return new MatchDecorator({\n regexp: agiImgContextRegexp,\n decoration: (match, view, from) => {\n const to = from + match[0].length;\n if (variables.some((marker) => from < marker.end && to > marker.start)) {\n return null;\n }\n const info = getImageMatchInfo(match);\n return Decoration.replace({\n widget: new PlaceholderWidget(\n info.text || view.state.facet(mediaPlaceholderLabels).image,\n {\n tag: \"image\",\n url: info.url,\n title: info.title,\n scalePercent: info.scalePercent,\n fixedOutput: info.fixedOutput,\n },\n \"tag-image\",\n SelectedOption.Image,\n view\n ),\n });\n },\n });\n};\n\nconst ImgPlaceholder = ViewPlugin.fromClass(\n class {\n placeholders: DecorationSet;\n matcher: MatchDecorator;\n constructor(view: EditorView) {\n this.matcher = createImageUrlMatcher(view);\n this.placeholders = this.matcher.createDeco(view);\n }\n update(update: ViewUpdate) {\n if (update.docChanged) {\n this.matcher = createImageUrlMatcher(update.view);\n }\n if (\n update.docChanged ||\n update.startState.facet(mediaPlaceholderLabels) !==\n update.state.facet(mediaPlaceholderLabels)\n ) {\n this.placeholders = this.matcher.createDeco(update.view);\n return;\n }\n this.placeholders = this.matcher.updateDeco(update, this.placeholders);\n }\n },\n {\n decorations: (instance) => instance.placeholders,\n provide: (plugin) =>\n EditorView.atomicRanges.of((view) => {\n return view.plugin(plugin)?.placeholders || Decoration.none;\n }),\n }\n);\n\nexport default ImgPlaceholder;\n"],"names":["imageMarkupRegexp","agiImgContextRegexp","extractAttributeValue","tag","attribute","regexp","match","clampScalePercent","value","getImageMatchInfo","source","raw","unwrapFixedOutput","fixedOutput","src","alt","widthAttr","scalePercent","numeric","markdownMatch","title","url","createImageUrlMatcher","view","variables","findDocumentVariableMarkers","marker","MatchDecorator","from","to","info","Decoration","PlaceholderWidget","mediaPlaceholderLabels","SelectedOption","ImgPlaceholder","ViewPlugin","update","instance","plugin","EditorView"],"mappings":"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"}
@@ -1,9 +1,8 @@
1
1
  import { ViewPlugin as f, EditorView as x, Decoration as p, MatchDecorator as w } from "../../../node_modules/@codemirror/view/dist/index.es.js";
2
2
  import { SelectedOption as b } from "../types.es.js";
3
- import { unwrapFixedOutput as M } from "../utils.es.js";
4
- import P from "./PlaceholderWidget.es.js";
3
+ import { findDocumentVariableMarkers as M, unwrapFixedOutput as P } from "../utils.es.js";
4
+ import D from "./PlaceholderWidget.es.js";
5
5
  import { mediaPlaceholderLabels as l } from "./mediaPlaceholderLabels.es.js";
6
- import { d as D } from "../../../_virtual/index.es.js";
7
6
  const I = /!\[([^\]]*)\]\(([^)]+)\)|<img\b[^>]*>/i, O = /===\s*(?:!\[[^\]]*\]\([^)]+\)|<img\b[^>]*>)\s*===|!\[[^\]]*\]\([^)]+\)|<img\b[^>]*>/gi, n = (t, c) => {
8
7
  const e = new RegExp(
9
8
  `${c}\\s*=\\s*("(.*?)"|'(.*?)'|([^\\s"'<>]+))`,
@@ -12,50 +11,50 @@ const I = /!\[([^\]]*)\]\(([^)]+)\)|<img\b[^>]*>/i, O = /===\s*(?:!\[[^\]]*\]\([
12
11
  if (r)
13
12
  return r[2] ?? r[3] ?? r[4];
14
13
  }, v = (t) => Math.max(1, Math.min(1e3, Math.round(t))), C = (t) => {
15
- const c = t?.[0] ?? "", e = M(c), r = /^\s*===/.test(c);
14
+ const c = t?.[0] ?? "", e = P(c), r = /^\s*===/.test(c);
16
15
  if (/^<img\b/i.test(e)) {
17
16
  const s = n(e, "src") ?? "", m = n(e, "alt") ?? n(e, "title") ?? "", h = n(e, "width");
18
- let d;
17
+ let u;
19
18
  if (h) {
20
- const u = Number.parseFloat(h);
21
- Number.isFinite(u) && (d = v(u));
19
+ const g = Number.parseFloat(h);
20
+ Number.isFinite(g) && (u = v(g));
22
21
  }
23
22
  return {
24
23
  text: m,
25
24
  url: s,
26
25
  title: m,
27
- scalePercent: d,
26
+ scalePercent: u,
28
27
  fixedOutput: r
29
28
  };
30
29
  }
31
- const a = e.match(I), i = a?.[1] ?? "", o = a?.[2] ?? "";
30
+ const o = e.match(I), i = o?.[1] ?? "", a = o?.[2] ?? "";
32
31
  return {
33
32
  text: i,
34
- url: o,
33
+ url: a,
35
34
  title: i,
36
35
  scalePercent: void 0,
37
36
  fixedOutput: r
38
37
  };
39
- }, g = (t) => {
40
- const c = D.findDocumentVariableMarkers(
38
+ }, d = (t) => {
39
+ const c = M(
41
40
  t.state.doc.toString()
42
41
  ).filter((e) => e.name !== null);
43
42
  return new w({
44
43
  regexp: O,
45
- decoration: (e, r, a) => {
46
- const i = a + e[0].length;
47
- if (c.some((s) => a < s.end && i > s.start))
44
+ decoration: (e, r, o) => {
45
+ const i = o + e[0].length;
46
+ if (c.some((s) => o < s.end && i > s.start))
48
47
  return null;
49
- const o = C(e);
48
+ const a = C(e);
50
49
  return p.replace({
51
- widget: new P(
52
- o.text || r.state.facet(l).image,
50
+ widget: new D(
51
+ a.text || r.state.facet(l).image,
53
52
  {
54
53
  tag: "image",
55
- url: o.url,
56
- title: o.title,
57
- scalePercent: o.scalePercent,
58
- fixedOutput: o.fixedOutput
54
+ url: a.url,
55
+ title: a.title,
56
+ scalePercent: a.scalePercent,
57
+ fixedOutput: a.fixedOutput
59
58
  },
60
59
  "tag-image",
61
60
  b.Image,
@@ -67,10 +66,10 @@ const I = /!\[([^\]]*)\]\(([^)]+)\)|<img\b[^>]*>/i, O = /===\s*(?:!\[[^\]]*\]\([
67
66
  }, A = f.fromClass(
68
67
  class {
69
68
  constructor(t) {
70
- this.matcher = g(t), this.placeholders = this.matcher.createDeco(t);
69
+ this.matcher = d(t), this.placeholders = this.matcher.createDeco(t);
71
70
  }
72
71
  update(t) {
73
- if (t.docChanged && (this.matcher = g(t.view)), t.docChanged || t.startState.facet(l) !== t.state.facet(l)) {
72
+ if (t.docChanged && (this.matcher = d(t.view)), t.docChanged || t.startState.facet(l) !== t.state.facet(l)) {
74
73
  this.placeholders = this.matcher.createDeco(t.view);
75
74
  return;
76
75
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ImgPlaceholder.es.js","sources":["../../../../src/components/MarkdownFlowEditor/plugins/ImgPlaceholder.ts"],"sourcesContent":["import {\n EditorView,\n Decoration,\n DecorationSet,\n ViewPlugin,\n ViewUpdate,\n MatchDecorator,\n} from \"@codemirror/view\";\nimport { SelectedOption } from \"../types\";\nimport { findDocumentVariableMarkers, unwrapFixedOutput } from \"../utils\";\nimport PlaceholderWidget from \"./PlaceholderWidget\";\nimport { mediaPlaceholderLabels } from \"./mediaPlaceholderLabels\";\n\nconst imageMarkupRegexp = /!\\[([^\\]]*)\\]\\(([^)]+)\\)|<img\\b[^>]*>/i;\nconst agiImgContextRegexp =\n /===\\s*(?:!\\[[^\\]]*\\]\\([^)]+\\)|<img\\b[^>]*>)\\s*===|!\\[[^\\]]*\\]\\([^)]+\\)|<img\\b[^>]*>/gi;\n\nconst extractAttributeValue = (tag: string, attribute: string) => {\n const regexp = new RegExp(\n `${attribute}\\\\s*=\\\\s*(\"(.*?)\"|'(.*?)'|([^\\\\s\"'<>]+))`,\n \"i\"\n );\n const match = tag.match(regexp);\n if (!match) return undefined;\n return match[2] ?? match[3] ?? match[4];\n};\n\nconst clampScalePercent = (value: number) =>\n Math.max(1, Math.min(1000, Math.round(value)));\n\nconst getImageMatchInfo = (match: RegExpMatchArray) => {\n const source = match?.[0] ?? \"\";\n const raw = unwrapFixedOutput(source);\n const fixedOutput = /^\\s*===/.test(source);\n if (/^<img\\b/i.test(raw)) {\n const src = extractAttributeValue(raw, \"src\") ?? \"\";\n const alt =\n extractAttributeValue(raw, \"alt\") ??\n extractAttributeValue(raw, \"title\") ??\n \"\";\n const widthAttr = extractAttributeValue(raw, \"width\");\n let scalePercent: number | undefined;\n if (widthAttr) {\n const numeric = Number.parseFloat(widthAttr);\n if (Number.isFinite(numeric)) {\n scalePercent = clampScalePercent(numeric);\n }\n }\n return {\n text: alt,\n url: src,\n title: alt,\n scalePercent,\n fixedOutput,\n };\n }\n const markdownMatch = raw.match(imageMarkupRegexp);\n const title = markdownMatch?.[1] ?? \"\";\n const url = markdownMatch?.[2] ?? \"\";\n return {\n text: title,\n url,\n title,\n scalePercent: undefined,\n fixedOutput,\n };\n};\n\nconst createImageUrlMatcher = (view: EditorView) => {\n const variables = findDocumentVariableMarkers(\n view.state.doc.toString()\n ).filter((marker) => marker.name !== null);\n return new MatchDecorator({\n regexp: agiImgContextRegexp,\n decoration: (match, view, from) => {\n const to = from + match[0].length;\n if (variables.some((marker) => from < marker.end && to > marker.start)) {\n return null;\n }\n const info = getImageMatchInfo(match);\n return Decoration.replace({\n widget: new PlaceholderWidget(\n info.text || view.state.facet(mediaPlaceholderLabels).image,\n {\n tag: \"image\",\n url: info.url,\n title: info.title,\n scalePercent: info.scalePercent,\n fixedOutput: info.fixedOutput,\n },\n \"tag-image\",\n SelectedOption.Image,\n view\n ),\n });\n },\n });\n};\n\nconst ImgPlaceholder = ViewPlugin.fromClass(\n class {\n placeholders: DecorationSet;\n matcher: MatchDecorator;\n constructor(view: EditorView) {\n this.matcher = createImageUrlMatcher(view);\n this.placeholders = this.matcher.createDeco(view);\n }\n update(update: ViewUpdate) {\n if (update.docChanged) {\n this.matcher = createImageUrlMatcher(update.view);\n }\n if (\n update.docChanged ||\n update.startState.facet(mediaPlaceholderLabels) !==\n update.state.facet(mediaPlaceholderLabels)\n ) {\n this.placeholders = this.matcher.createDeco(update.view);\n return;\n }\n this.placeholders = this.matcher.updateDeco(update, this.placeholders);\n }\n },\n {\n decorations: (instance) => instance.placeholders,\n provide: (plugin) =>\n EditorView.atomicRanges.of((view) => {\n return view.plugin(plugin)?.placeholders || Decoration.none;\n }),\n }\n);\n\nexport default ImgPlaceholder;\n"],"names":["imageMarkupRegexp","agiImgContextRegexp","extractAttributeValue","tag","attribute","regexp","match","clampScalePercent","value","getImageMatchInfo","source","raw","unwrapFixedOutput","fixedOutput","src","alt","widthAttr","scalePercent","numeric","markdownMatch","title","url","createImageUrlMatcher","view","variables","findDocumentVariableMarkers","marker","MatchDecorator","from","to","info","Decoration","PlaceholderWidget","mediaPlaceholderLabels","SelectedOption","ImgPlaceholder","ViewPlugin","update","instance","plugin","EditorView"],"mappings":"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"}
1
+ {"version":3,"file":"ImgPlaceholder.es.js","sources":["../../../../src/components/MarkdownFlowEditor/plugins/ImgPlaceholder.ts"],"sourcesContent":["import {\n EditorView,\n Decoration,\n DecorationSet,\n ViewPlugin,\n ViewUpdate,\n MatchDecorator,\n} from \"@codemirror/view\";\nimport { SelectedOption } from \"../types\";\nimport { findDocumentVariableMarkers, unwrapFixedOutput } from \"../utils\";\nimport PlaceholderWidget from \"./PlaceholderWidget\";\nimport { mediaPlaceholderLabels } from \"./mediaPlaceholderLabels\";\n\nconst imageMarkupRegexp = /!\\[([^\\]]*)\\]\\(([^)]+)\\)|<img\\b[^>]*>/i;\nconst agiImgContextRegexp =\n /===\\s*(?:!\\[[^\\]]*\\]\\([^)]+\\)|<img\\b[^>]*>)\\s*===|!\\[[^\\]]*\\]\\([^)]+\\)|<img\\b[^>]*>/gi;\n\nconst extractAttributeValue = (tag: string, attribute: string) => {\n const regexp = new RegExp(\n `${attribute}\\\\s*=\\\\s*(\"(.*?)\"|'(.*?)'|([^\\\\s\"'<>]+))`,\n \"i\"\n );\n const match = tag.match(regexp);\n if (!match) return undefined;\n return match[2] ?? match[3] ?? match[4];\n};\n\nconst clampScalePercent = (value: number) =>\n Math.max(1, Math.min(1000, Math.round(value)));\n\nconst getImageMatchInfo = (match: RegExpMatchArray) => {\n const source = match?.[0] ?? \"\";\n const raw = unwrapFixedOutput(source);\n const fixedOutput = /^\\s*===/.test(source);\n if (/^<img\\b/i.test(raw)) {\n const src = extractAttributeValue(raw, \"src\") ?? \"\";\n const alt =\n extractAttributeValue(raw, \"alt\") ??\n extractAttributeValue(raw, \"title\") ??\n \"\";\n const widthAttr = extractAttributeValue(raw, \"width\");\n let scalePercent: number | undefined;\n if (widthAttr) {\n const numeric = Number.parseFloat(widthAttr);\n if (Number.isFinite(numeric)) {\n scalePercent = clampScalePercent(numeric);\n }\n }\n return {\n text: alt,\n url: src,\n title: alt,\n scalePercent,\n fixedOutput,\n };\n }\n const markdownMatch = raw.match(imageMarkupRegexp);\n const title = markdownMatch?.[1] ?? \"\";\n const url = markdownMatch?.[2] ?? \"\";\n return {\n text: title,\n url,\n title,\n scalePercent: undefined,\n fixedOutput,\n };\n};\n\nconst createImageUrlMatcher = (view: EditorView) => {\n const variables = findDocumentVariableMarkers(\n view.state.doc.toString()\n ).filter((marker) => marker.name !== null);\n return new MatchDecorator({\n regexp: agiImgContextRegexp,\n decoration: (match, view, from) => {\n const to = from + match[0].length;\n if (variables.some((marker) => from < marker.end && to > marker.start)) {\n return null;\n }\n const info = getImageMatchInfo(match);\n return Decoration.replace({\n widget: new PlaceholderWidget(\n info.text || view.state.facet(mediaPlaceholderLabels).image,\n {\n tag: \"image\",\n url: info.url,\n title: info.title,\n scalePercent: info.scalePercent,\n fixedOutput: info.fixedOutput,\n },\n \"tag-image\",\n SelectedOption.Image,\n view\n ),\n });\n },\n });\n};\n\nconst ImgPlaceholder = ViewPlugin.fromClass(\n class {\n placeholders: DecorationSet;\n matcher: MatchDecorator;\n constructor(view: EditorView) {\n this.matcher = createImageUrlMatcher(view);\n this.placeholders = this.matcher.createDeco(view);\n }\n update(update: ViewUpdate) {\n if (update.docChanged) {\n this.matcher = createImageUrlMatcher(update.view);\n }\n if (\n update.docChanged ||\n update.startState.facet(mediaPlaceholderLabels) !==\n update.state.facet(mediaPlaceholderLabels)\n ) {\n this.placeholders = this.matcher.createDeco(update.view);\n return;\n }\n this.placeholders = this.matcher.updateDeco(update, this.placeholders);\n }\n },\n {\n decorations: (instance) => instance.placeholders,\n provide: (plugin) =>\n EditorView.atomicRanges.of((view) => {\n return view.plugin(plugin)?.placeholders || Decoration.none;\n }),\n }\n);\n\nexport default ImgPlaceholder;\n"],"names":["imageMarkupRegexp","agiImgContextRegexp","extractAttributeValue","tag","attribute","regexp","match","clampScalePercent","value","getImageMatchInfo","source","raw","unwrapFixedOutput","fixedOutput","src","alt","widthAttr","scalePercent","numeric","markdownMatch","title","url","createImageUrlMatcher","view","variables","findDocumentVariableMarkers","marker","MatchDecorator","from","to","info","Decoration","PlaceholderWidget","mediaPlaceholderLabels","SelectedOption","ImgPlaceholder","ViewPlugin","update","instance","plugin","EditorView"],"mappings":"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"}
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const A=require("../../../node_modules/@codemirror/view/dist/index.cjs"),P=require("../../../node_modules/@codemirror/state/dist/index.cjs"),_=require("../../ContentRender/utils/inline-code-ranges.cjs"),R=require("../../../_virtual/index.cjs"),F=/<!--[\s\S]*?-->/g,W=n=>{const i=R.distExports.findVariableMarkers(n),f=n.indexOf("{{",i.at(-1)?.end??0);return f===-1?i:[...i,{start:f,end:n.length,name:null}]},M=new RegExp(`\\?\\[(${R.distExports.INTERACTION_CONTENT_SOURCE})\\](?!\\()`,"g"),$=n=>_.getMarkdownSourceAnalysis(n).interactions;function L(n,i){const f=[];let l=null,s=0;for(;s<=n.length;){const u=n.indexOf(`
2
- `,s),e=u===-1?n.length:u;if(n.slice(s,e).trim()==="!==="&&!i(s)&&(l===null?l=s:(f.push({from:l,to:e,className:"syntax-fixed"}),l=null)),u===-1)break;s=u+1}return f}function j(n,i,f){const l=[];let s=0;const u=t=>{for(;s<i.length&&i[s].to<=t;)s++;const r=i[s];return!!r&&t>=r.from&&t<r.to};let e=0;for(;e<=n.length;){const t=n.indexOf(`
3
- `,e),r=t===-1?n.length:t,d=n.slice(e,r),x=[];let g=0;for(;g<d.length;){const c=d.indexOf("===",g);if(c===-1)break;const p=e+c;!(p>0&&n[p-1]==="!")&&!u(p)&&!f(p)&&x.push(p),g=c+3}for(let c=0;c+1<x.length;c+=2)l.push({from:x[c],to:x[c+1]+3,className:"syntax-fixed"});if(t===-1)break;e=t+1}return l}function T(n,i){const f=[];let l;for(F.lastIndex=0;(l=F.exec(n))!==null;)i(l.index)||f.push({from:l.index,to:l.index+l[0].length,className:"syntax-comment"});return f}function B(n){const i=R.distExports.findDocumentVariableMarkers(n),f=e=>i.some(t=>e>=t.start&&e<t.end),l=T(n,f),s=[...L(n,f),...j(n,l,f),...l].sort((e,t)=>e.from!==t.from?e.from-t.from:t.to-e.to),u=[];for(const e of s){const t=u[u.length-1];(!t||e.from>=t.to)&&u.push(e)}return u}function D(n,i=()=>!1){const f=[],l=R.distExports.findDocumentVariableMarkers(n),s=[];M.lastIndex=0;const u=(t,r)=>s.some(d=>!(r<=d.from||t>=d.to)),e=(t,r,d)=>t>=r||u(t,r)?!1:(s.push({from:t,to:r}),f.push({from:t,to:r,className:d}),!0);for(const t of B(n))e(t.from,t.to,t.className);for(const t of $(n)){M.lastIndex=t.start;const r=M.exec(n);if(!r||r.index!==t.start||r.index+r[0].length!==t.end)continue;const d=r.index,x=r.index+r[0].length,g=r[1],c=d+2;if(u(d,x)||l.some(b=>b.start<=d&&d<b.end))continue;e(d,d+1,"syntax-keyword"),e(d+1,d+2,"syntax-bracket"),e(x-1,x,"syntax-bracket");const p=W(g),y=p[0],E=y?y.start-1:-1,V=E>=0&&g[E]==="%"&&R.distExports.trimVariablePadding(g.slice(0,E))==="";if(g.startsWith("%")||V){let b="syntax-percent-invalid";if(y&&V){const o=c+y.start,h=c+y.end,I=i(o,h);b=y.name!==null&&!I?"syntax-percent-valid":"syntax-percent-invalid"}const v=c+(V?E:0);e(v,v+1,b);const O=[],S=[],N=[];for(const o of p)S.push({from:c+o.start,to:c+o.end,className:o.name===null?"syntax-variable-invalid":"syntax-variable"});let m=0;for(;m<g.length;){const o=S.find(I=>c+m===I.from);if(o){m=o.to-c;continue}if(R.distExports.isEscape(g,m)){m+=2;continue}const h=g.startsWith("||",m)?"||":g[m]==="|"?"|":g.startsWith("...",m)?"...":null;if(!h){m+=1;continue}O.push({from:c+m,to:c+m+h.length}),m+=h.length}const a=[...O.map(o=>({...o,className:"syntax-keyword"})),...S.map(o=>({...o,className:o.className}))].sort((o,h)=>o.from!==h.from?o.from-h.from:o.to-h.to);for(const o of a)o.className.startsWith("syntax-variable")&&i(o.from,o.to)||e(o.from,o.to,o.className)&&N.push({from:o.from,to:o.to});const w=v+1,C=x-1;let k=w;const H=N.sort((o,h)=>o.from!==h.from?o.from-h.from:o.to-h.to);for(const o of H)k<o.from&&e(k,o.from,"syntax-string"),k=Math.max(k,o.to);k<C&&e(k,C,"syntax-string")}else{const b=[],v=[];for(const a of W(g))b.push({from:c+a.start,to:c+a.end,className:a.name===null?"syntax-variable-invalid":"syntax-variable"});const O=b.sort((a,w)=>a.from!==w.from?a.from-w.from:a.to-w.to);for(const a of O)a.className.startsWith("syntax-variable")&&i(a.from,a.to)||e(a.from,a.to,a.className)&&v.push({from:a.from,to:a.to});const S=c,N=x-1;let m=S;for(const a of v)m<a.from&&e(m,a.from,"syntax-button-text"),m=Math.max(m,a.to);m<N&&e(m,N,"syntax-button-text")}}for(const t of l)t.name!==null&&!i(t.start,t.end)&&e(t.start,t.end,"syntax-variable");return f.sort((t,r)=>t.from!==r.from?t.from-r.from:r.to-t.to),f}function q(n){const i=new P.RangeSetBuilder,f=n.state.doc.toString(),l=D(f,(s,u)=>n.state.selection.ranges.some(e=>e.from>=s&&e.to<=u));for(const s of l)if(s.from<s.to)try{i.add(s.from,s.to,A.Decoration.mark({class:s.className}))}catch(u){console.warn("SyntaxHighlighter: Failed to add decoration",s,u)}return i.finish()}const U=A.ViewPlugin.fromClass(class{constructor(n){this.decorations=q(n)}update(n){(n.docChanged||n.viewportChanged||n.selectionSet)&&(this.decorations=q(n.view))}},{decorations:n=>n.decorations});exports.collectOuterBlockRanges=B;exports.collectSyntaxHighlightRanges=D;exports.default=U;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const A=require("../../../node_modules/@codemirror/view/dist/index.cjs"),L=require("../../../node_modules/@codemirror/state/dist/index.cjs"),Q=require("../../ContentRender/utils/inline-code-ranges.cjs"),B=require("../../../_virtual/index.cjs"),E=require("../utils.cjs"),F=/<!--[\s\S]*?-->/g,W=n=>{const s=E.findVariableMarkers(n),f=n.indexOf("{{",s.at(-1)?.end??0);return f===-1?s:[...s,{start:f,end:n.length,name:null}]},C=new RegExp(`\\?\\[(${B.distExports.INTERACTION_CONTENT_SOURCE})\\](?!\\()`,"g"),j=n=>Q.getMarkdownSourceAnalysis(n).interactions;function T(n,s){const f=[];let i=null,d=0;for(;d<=n.length;){const a=n.indexOf(`
2
+ `,d),r=a===-1?n.length:a;if(n.slice(d,r).trim()==="!==="&&!s(d)&&(i===null?i=d:(f.push({from:i,to:r,className:"syntax-fixed"}),i=null)),a===-1)break;d=a+1}return f}function U(n,s,f){const i=[];let d=0;const a=t=>{for(;d<s.length&&s[d].to<=t;)d++;const o=s[d];return!!o&&t>=o.from&&t<o.to};let r=0;for(;r<=n.length;){const t=n.indexOf(`
3
+ `,r),o=t===-1?n.length:t,l=n.slice(r,o),g=[];let p=0;for(;p<l.length;){const u=l.indexOf("===",p);if(u===-1)break;const h=r+u;!(h>0&&n[h-1]==="!")&&!a(h)&&!f(h)&&g.push(h),p=u+3}for(let u=0;u+1<g.length;u+=2)i.push({from:g[u],to:g[u+1]+3,className:"syntax-fixed"});if(t===-1)break;r=t+1}return i}function z(n,s){const f=[];let i;for(F.lastIndex=0;(i=F.exec(n))!==null;)s(i.index)||f.push({from:i.index,to:i.index+i[0].length,className:"syntax-comment"});return f}function D(n){const s=E.findDocumentVariableMarkers(n),f=r=>s.some(t=>r>=t.start&&r<t.end),i=z(n,f),d=[...T(n,f),...U(n,i,f),...i].sort((r,t)=>r.from!==t.from?r.from-t.from:t.to-r.to),a=[];for(const r of d){const t=a[a.length-1];(!t||r.from>=t.to)&&a.push(r)}return a}function P(n,s=()=>!1,f=!1){const i=[],d=E.findDocumentVariableMarkers(n),a=[];C.lastIndex=0;const r=(o,l)=>a.some(g=>!(l<=g.from||o>=g.to)),t=(o,l,g)=>o>=l||r(o,l)?!1:(a.push({from:o,to:l}),i.push({from:o,to:l,className:g}),!0);for(const o of D(n))t(o.from,o.to,o.className);for(const o of j(n)){C.lastIndex=o.start;const l=C.exec(n);if(!l||l.index!==o.start||l.index+l[0].length!==o.end)continue;const g=l.index,p=l.index+l[0].length,u=l[1],h=g+2;if(r(g,p)||d.some(y=>y.start<=g&&g<y.end))continue;t(g,g+1,"syntax-keyword"),t(g+1,g+2,"syntax-bracket"),t(p-1,p,"syntax-bracket");const V=W(u),b=V[0],w=b?b.start-1:-1,I=w>=0&&u[w]==="%"&&E.trimVariablePadding(u.slice(0,w))==="";if(u.startsWith("%")||I){let y="syntax-percent-invalid";if(b&&I){const e=h+b.start,x=h+b.end,M=s(e,x);y=b.name!==null&&!M?"syntax-percent-valid":"syntax-percent-invalid"}const v=h+(I?w:0);t(v,v+1,y);const O=[],k=[],R=[];for(const e of V)k.push({from:h+e.start,to:h+e.end,className:e.name===null?"syntax-variable-invalid":"syntax-variable"});let m=0;for(;m<u.length;){const e=k.find(M=>h+m===M.from);if(e){m=e.to-h;continue}if(B.distExports.isEscape(u,m)){m+=2;continue}const x=u.startsWith("||",m)?"||":u[m]==="|"?"|":u.startsWith("...",m)?"...":null;if(!x){m+=1;continue}O.push({from:h+m,to:h+m+x.length}),m+=x.length}const c=[...O.map(e=>({...e,className:"syntax-keyword"})),...k.map(e=>({...e,className:e.className}))].sort((e,x)=>e.from!==x.from?e.from-x.from:e.to-x.to);for(const e of c)e.className.startsWith("syntax-variable")&&s(e.from,e.to)||t(e.from,e.to,e.className)&&R.push({from:e.from,to:e.to});const N=v+1,H=p-1;let S=N;const $=R.sort((e,x)=>e.from!==x.from?e.from-x.from:e.to-x.to);for(const e of $)S<e.from&&t(S,e.from,"syntax-string"),S=Math.max(S,e.to);S<H&&t(S,H,"syntax-string")}else{const y=[],v=[];for(const c of W(u))y.push({from:h+c.start,to:h+c.end,className:c.name===null?"syntax-variable-invalid":"syntax-variable"});const O=y.sort((c,N)=>c.from!==N.from?c.from-N.from:c.to-N.to);for(const c of O)c.className.startsWith("syntax-variable")&&s(c.from,c.to)||t(c.from,c.to,c.className)&&v.push({from:c.from,to:c.to});const k=h,R=p-1;let m=k;for(const c of v)m<c.from&&t(m,c.from,"syntax-button-text"),m=Math.max(m,c.to);m<R&&t(m,R,"syntax-button-text")}}for(const o of f?[]:d)o.name!==null&&!s(o.start,o.end)&&t(o.start,o.end,"syntax-variable");return i.sort((o,l)=>o.from!==l.from?o.from-l.from:l.to-o.to),i}function q(n,s=!1){const f=new L.RangeSetBuilder,i=n.state.doc.toString(),d=P(i,(a,r)=>n.state.selection.ranges.some(t=>t.from>=a&&t.to<=r),s);for(const a of d)if(a.from<a.to)try{f.add(a.from,a.to,A.Decoration.mark({class:a.className}))}catch(r){console.warn("SyntaxHighlighter: Failed to add decoration",a,r)}return f.finish()}const _=(n=!1)=>A.ViewPlugin.fromClass(class{constructor(s){this.decorations=q(s,n)}update(s){(s.docChanged||s.viewportChanged||s.selectionSet)&&(this.decorations=q(s.view,n))}},{decorations:s=>s.decorations}),G=_(),J=_(!0);exports.QuestionSyntaxHighlighter=J;exports.collectOuterBlockRanges=D;exports.collectSyntaxHighlightRanges=P;exports.default=G;
4
4
  //# sourceMappingURL=SyntaxHighlighter.cjs.map