markdown-flow-ui 0.2.14 → 0.2.16-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 (465) hide show
  1. package/README.md +7 -0
  2. package/dist/assets/markdown-flow-ui.css +10 -1
  3. package/dist/components/ContentRender/CodeBlock.cjs +1 -1
  4. package/dist/components/ContentRender/CodeBlock.cjs.map +1 -1
  5. package/dist/components/ContentRender/CodeBlock.d.ts +5 -0
  6. package/dist/components/ContentRender/CodeBlock.es.js +41 -38
  7. package/dist/components/ContentRender/CodeBlock.es.js.map +1 -1
  8. package/dist/components/ContentRender/ContentRender.cjs +2 -2
  9. package/dist/components/ContentRender/ContentRender.cjs.map +1 -1
  10. package/dist/components/ContentRender/ContentRender.d.ts +12 -4
  11. package/dist/components/ContentRender/ContentRender.es.js +436 -306
  12. package/dist/components/ContentRender/ContentRender.es.js.map +1 -1
  13. package/dist/components/ContentRender/IframeSandbox.cjs +7 -7
  14. package/dist/components/ContentRender/IframeSandbox.cjs.map +1 -1
  15. package/dist/components/ContentRender/IframeSandbox.d.ts +5 -1
  16. package/dist/components/ContentRender/IframeSandbox.es.js +311 -266
  17. package/dist/components/ContentRender/IframeSandbox.es.js.map +1 -1
  18. package/dist/components/ContentRender/MarkdownFlowInput.cjs +1 -1
  19. package/dist/components/ContentRender/MarkdownFlowInput.cjs.map +1 -1
  20. package/dist/components/ContentRender/MarkdownFlowInput.d.ts +5 -1
  21. package/dist/components/ContentRender/MarkdownFlowInput.es.js +37 -32
  22. package/dist/components/ContentRender/MarkdownFlowInput.es.js.map +1 -1
  23. package/dist/components/ContentRender/SandboxApp.cjs +2 -2
  24. package/dist/components/ContentRender/SandboxApp.cjs.map +1 -1
  25. package/dist/components/ContentRender/SandboxApp.d.ts +5 -1
  26. package/dist/components/ContentRender/SandboxApp.es.js +108 -103
  27. package/dist/components/ContentRender/SandboxApp.es.js.map +1 -1
  28. package/dist/components/ContentRender/blackboard-vendor.d.ts +1 -1
  29. package/dist/components/ContentRender/contentRenderI18n.cjs +1 -1
  30. package/dist/components/ContentRender/contentRenderI18n.cjs.map +1 -1
  31. package/dist/components/ContentRender/contentRenderI18n.d.ts +6 -1
  32. package/dist/components/ContentRender/contentRenderI18n.es.js +5 -56
  33. package/dist/components/ContentRender/contentRenderI18n.es.js.map +1 -1
  34. package/dist/components/ContentRender/contentRenderI18n.test.d.ts +1 -0
  35. package/dist/components/ContentRender/index.cjs +1 -1
  36. package/dist/components/ContentRender/index.d.ts +11 -11
  37. package/dist/components/ContentRender/index.es.js +1 -2
  38. package/dist/components/ContentRender/index.es.js.map +1 -1
  39. package/dist/components/ContentRender/locales/contentRender.json.cjs +2 -0
  40. package/dist/components/ContentRender/locales/contentRender.json.cjs.map +1 -0
  41. package/dist/components/ContentRender/locales/contentRender.json.d.ts +90 -0
  42. package/dist/components/ContentRender/locales/contentRender.json.es.js +11 -0
  43. package/dist/components/ContentRender/locales/contentRender.json.es.js.map +1 -0
  44. package/dist/components/ContentRender/plugins/CustomVariable.cjs +1 -1
  45. package/dist/components/ContentRender/plugins/CustomVariable.cjs.map +1 -1
  46. package/dist/components/ContentRender/plugins/CustomVariable.d.ts +7 -3
  47. package/dist/components/ContentRender/plugins/CustomVariable.es.js +165 -151
  48. package/dist/components/ContentRender/plugins/CustomVariable.es.js.map +1 -1
  49. package/dist/components/ContentRender/plugins/MermaidChart.cjs +1 -1
  50. package/dist/components/ContentRender/plugins/MermaidChart.cjs.map +1 -1
  51. package/dist/components/ContentRender/plugins/MermaidChart.d.ts +1 -0
  52. package/dist/components/ContentRender/plugins/MermaidChart.es.js +68 -44
  53. package/dist/components/ContentRender/plugins/MermaidChart.es.js.map +1 -1
  54. package/dist/components/ContentRender/typewriterPacing.fixtures.d.ts +14 -0
  55. package/dist/components/ContentRender/utils/typewriter-pacing.cjs +3 -0
  56. package/dist/components/ContentRender/utils/typewriter-pacing.cjs.map +1 -0
  57. package/dist/components/ContentRender/utils/typewriter-pacing.d.ts +27 -0
  58. package/dist/components/ContentRender/utils/typewriter-pacing.es.js +98 -0
  59. package/dist/components/ContentRender/utils/typewriter-pacing.es.js.map +1 -0
  60. package/dist/components/ContentRender/utils/typewriter-pacing.test.d.ts +1 -0
  61. package/dist/components/MarkdownFlow/MarkdownFlow.cjs +1 -1
  62. package/dist/components/MarkdownFlow/MarkdownFlow.cjs.map +1 -1
  63. package/dist/components/MarkdownFlow/MarkdownFlow.d.ts +12 -4
  64. package/dist/components/MarkdownFlow/MarkdownFlow.es.js +51 -39
  65. package/dist/components/MarkdownFlow/MarkdownFlow.es.js.map +1 -1
  66. package/dist/components/MarkdownFlow/ScrollToBottomButton.cjs +1 -1
  67. package/dist/components/MarkdownFlow/ScrollToBottomButton.cjs.map +1 -1
  68. package/dist/components/MarkdownFlow/ScrollToBottomButton.d.ts +31 -1
  69. package/dist/components/MarkdownFlow/ScrollToBottomButton.es.js +46 -17
  70. package/dist/components/MarkdownFlow/ScrollToBottomButton.es.js.map +1 -1
  71. package/dist/components/MarkdownFlow/ScrollToBottomControl.cjs +2 -0
  72. package/dist/components/MarkdownFlow/ScrollToBottomControl.cjs.map +1 -0
  73. package/dist/components/MarkdownFlow/ScrollToBottomControl.d.ts +18 -0
  74. package/dist/components/MarkdownFlow/ScrollToBottomControl.es.js +47 -0
  75. package/dist/components/MarkdownFlow/ScrollToBottomControl.es.js.map +1 -0
  76. package/dist/components/MarkdownFlow/ScrollableMarkdownFlow.cjs +1 -1
  77. package/dist/components/MarkdownFlow/ScrollableMarkdownFlow.cjs.map +1 -1
  78. package/dist/components/MarkdownFlow/ScrollableMarkdownFlow.d.ts +1 -1
  79. package/dist/components/MarkdownFlow/ScrollableMarkdownFlow.es.js +33 -52
  80. package/dist/components/MarkdownFlow/ScrollableMarkdownFlow.es.js.map +1 -1
  81. package/dist/components/MarkdownFlow/index.cjs +1 -1
  82. package/dist/components/MarkdownFlow/index.d.ts +9 -6
  83. package/dist/components/MarkdownFlow/index.es.js +6 -6
  84. package/dist/components/MarkdownFlow/index.es.js.map +1 -1
  85. package/dist/components/MarkdownFlow/useScrollToBottom.cjs +1 -1
  86. package/dist/components/MarkdownFlow/useScrollToBottom.cjs.map +1 -1
  87. package/dist/components/MarkdownFlow/useScrollToBottom.d.ts +40 -8
  88. package/dist/components/MarkdownFlow/useScrollToBottom.es.js +352 -83
  89. package/dist/components/MarkdownFlow/useScrollToBottom.es.js.map +1 -1
  90. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.cjs +1 -1
  91. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.cjs.map +1 -1
  92. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.d.ts +5 -3
  93. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.es.js +371 -324
  94. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.es.js.map +1 -1
  95. package/dist/components/MarkdownFlowEditor/components/CustomDialog.cjs +1 -1
  96. package/dist/components/MarkdownFlowEditor/components/CustomDialog.cjs.map +1 -1
  97. package/dist/components/MarkdownFlowEditor/components/CustomDialog.d.ts +10 -0
  98. package/dist/components/MarkdownFlowEditor/components/CustomDialog.es.js +22 -19
  99. package/dist/components/MarkdownFlowEditor/components/CustomDialog.es.js.map +1 -1
  100. package/dist/components/MarkdownFlowEditor/components/CustomPopover.cjs +1 -1
  101. package/dist/components/MarkdownFlowEditor/components/CustomPopover.cjs.map +1 -1
  102. package/dist/components/MarkdownFlowEditor/components/CustomPopover.d.ts +8 -0
  103. package/dist/components/MarkdownFlowEditor/components/CustomPopover.es.js +19 -15
  104. package/dist/components/MarkdownFlowEditor/components/CustomPopover.es.js.map +1 -1
  105. package/dist/components/MarkdownFlowEditor/components/EditorToolbar.cjs +1 -1
  106. package/dist/components/MarkdownFlowEditor/components/EditorToolbar.cjs.map +1 -1
  107. package/dist/components/MarkdownFlowEditor/components/EditorToolbar.d.ts +4 -1
  108. package/dist/components/MarkdownFlowEditor/components/EditorToolbar.es.js +99 -93
  109. package/dist/components/MarkdownFlowEditor/components/EditorToolbar.es.js.map +1 -1
  110. package/dist/components/MarkdownFlowEditor/components/ImageInject.cjs +1 -1
  111. package/dist/components/MarkdownFlowEditor/components/ImageInject.cjs.map +1 -1
  112. package/dist/components/MarkdownFlowEditor/components/ImageInject.d.ts +1 -1
  113. package/dist/components/MarkdownFlowEditor/components/ImageInject.es.js +183 -182
  114. package/dist/components/MarkdownFlowEditor/components/ImageInject.es.js.map +1 -1
  115. package/dist/components/MarkdownFlowEditor/components/VariableSearchDropdown.cjs +1 -1
  116. package/dist/components/MarkdownFlowEditor/components/VariableSearchDropdown.cjs.map +1 -1
  117. package/dist/components/MarkdownFlowEditor/components/VariableSearchDropdown.d.ts +1 -1
  118. package/dist/components/MarkdownFlowEditor/components/VariableSearchDropdown.es.js +107 -103
  119. package/dist/components/MarkdownFlowEditor/components/VariableSearchDropdown.es.js.map +1 -1
  120. package/dist/components/MarkdownFlowEditor/components/VariableSelect.cjs +1 -1
  121. package/dist/components/MarkdownFlowEditor/components/VariableSelect.cjs.map +1 -1
  122. package/dist/components/MarkdownFlowEditor/components/VariableSelect.d.ts +1 -1
  123. package/dist/components/MarkdownFlowEditor/components/VariableSelect.es.js +106 -106
  124. package/dist/components/MarkdownFlowEditor/components/VariableSelect.es.js.map +1 -1
  125. package/dist/components/MarkdownFlowEditor/components/VideoInject.cjs +1 -1
  126. package/dist/components/MarkdownFlowEditor/components/VideoInject.cjs.map +1 -1
  127. package/dist/components/MarkdownFlowEditor/components/VideoInject.es.js +64 -63
  128. package/dist/components/MarkdownFlowEditor/components/VideoInject.es.js.map +1 -1
  129. package/dist/components/MarkdownFlowEditor/components/icons/ButtonIcon.cjs +1 -1
  130. package/dist/components/MarkdownFlowEditor/components/icons/ButtonIcon.cjs.map +1 -1
  131. package/dist/components/MarkdownFlowEditor/components/icons/ButtonIcon.es.js +13 -13
  132. package/dist/components/MarkdownFlowEditor/components/icons/ButtonIcon.es.js.map +1 -1
  133. package/dist/components/MarkdownFlowEditor/components/icons/SearchBracesIcon.cjs +1 -1
  134. package/dist/components/MarkdownFlowEditor/components/icons/SearchBracesIcon.cjs.map +1 -1
  135. package/dist/components/MarkdownFlowEditor/components/icons/SearchBracesIcon.es.js +12 -12
  136. package/dist/components/MarkdownFlowEditor/components/icons/SearchBracesIcon.es.js.map +1 -1
  137. package/dist/components/MarkdownFlowEditor/editor-context.d.ts +1 -1
  138. package/dist/components/MarkdownFlowEditor/editorI18n.cjs +1 -1
  139. package/dist/components/MarkdownFlowEditor/editorI18n.cjs.map +1 -1
  140. package/dist/components/MarkdownFlowEditor/editorI18n.d.ts +290 -0
  141. package/dist/components/MarkdownFlowEditor/editorI18n.es.js +12 -8
  142. package/dist/components/MarkdownFlowEditor/editorI18n.es.js.map +1 -1
  143. package/dist/components/MarkdownFlowEditor/editorI18n.test.d.ts +1 -0
  144. package/dist/components/MarkdownFlowEditor/index.d.ts +6 -6
  145. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.cjs +2 -0
  146. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.cjs.map +1 -0
  147. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.d.ts +72 -0
  148. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.es.js +140 -0
  149. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.es.js.map +1 -0
  150. package/dist/components/MarkdownFlowEditor/locales/en-US.json.cjs +1 -1
  151. package/dist/components/MarkdownFlowEditor/locales/en-US.json.d.ts +2 -0
  152. package/dist/components/MarkdownFlowEditor/locales/en-US.json.es.js +118 -114
  153. package/dist/components/MarkdownFlowEditor/locales/en-US.json.es.js.map +1 -1
  154. package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.cjs +1 -1
  155. package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.d.ts +2 -0
  156. package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.es.js +118 -114
  157. package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.es.js.map +1 -1
  158. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.cjs +2 -0
  159. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.cjs.map +1 -0
  160. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.d.ts +72 -0
  161. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.es.js +140 -0
  162. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.es.js.map +1 -0
  163. package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.cjs +1 -1
  164. package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.d.ts +2 -0
  165. package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.es.js +70 -66
  166. package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.es.js.map +1 -1
  167. package/dist/components/MarkdownFlowEditor/plugins/ImgPlaceholder.cjs +1 -1
  168. package/dist/components/MarkdownFlowEditor/plugins/ImgPlaceholder.cjs.map +1 -1
  169. package/dist/components/MarkdownFlowEditor/plugins/ImgPlaceholder.es.js +40 -35
  170. package/dist/components/MarkdownFlowEditor/plugins/ImgPlaceholder.es.js.map +1 -1
  171. package/dist/components/MarkdownFlowEditor/plugins/PlaceholderWidget.d.ts +1 -1
  172. package/dist/components/MarkdownFlowEditor/plugins/VideoPlaceholder.cjs +1 -1
  173. package/dist/components/MarkdownFlowEditor/plugins/VideoPlaceholder.cjs.map +1 -1
  174. package/dist/components/MarkdownFlowEditor/plugins/VideoPlaceholder.es.js +27 -23
  175. package/dist/components/MarkdownFlowEditor/plugins/VideoPlaceholder.es.js.map +1 -1
  176. package/dist/components/MarkdownFlowEditor/plugins/mediaPlaceholderLabels.cjs +2 -0
  177. package/dist/components/MarkdownFlowEditor/plugins/mediaPlaceholderLabels.cjs.map +1 -0
  178. package/dist/components/MarkdownFlowEditor/plugins/mediaPlaceholderLabels.d.ts +7 -0
  179. package/dist/components/MarkdownFlowEditor/plugins/mediaPlaceholderLabels.es.js +12 -0
  180. package/dist/components/MarkdownFlowEditor/plugins/mediaPlaceholderLabels.es.js.map +1 -0
  181. package/dist/components/MarkdownFlowEditor/utils.d.ts +1 -1
  182. package/dist/components/Slide/MarkdownSlideScaling.cjs +1 -1
  183. package/dist/components/Slide/MarkdownSlideScaling.cjs.map +1 -1
  184. package/dist/components/Slide/MarkdownSlideScaling.d.ts +1 -1
  185. package/dist/components/Slide/MarkdownSlideScaling.es.js +20 -20
  186. package/dist/components/Slide/MarkdownSlideScaling.es.js.map +1 -1
  187. package/dist/components/Slide/MobilePlayerSettingsSheet.cjs +1 -1
  188. package/dist/components/Slide/MobilePlayerSettingsSheet.cjs.map +1 -1
  189. package/dist/components/Slide/MobilePlayerSettingsSheet.d.ts +7 -2
  190. package/dist/components/Slide/MobilePlayerSettingsSheet.es.js +61 -57
  191. package/dist/components/Slide/MobilePlayerSettingsSheet.es.js.map +1 -1
  192. package/dist/components/Slide/Player.cjs +1 -1
  193. package/dist/components/Slide/Player.cjs.map +1 -1
  194. package/dist/components/Slide/Player.d.ts +6 -6
  195. package/dist/components/Slide/Player.es.js +547 -541
  196. package/dist/components/Slide/Player.es.js.map +1 -1
  197. package/dist/components/Slide/Slide.cjs +1 -1
  198. package/dist/components/Slide/Slide.cjs.map +1 -1
  199. package/dist/components/Slide/Slide.d.ts +14 -12
  200. package/dist/components/Slide/Slide.es.js +745 -726
  201. package/dist/components/Slide/Slide.es.js.map +1 -1
  202. package/dist/components/Slide/SubtitleOverlay.cjs +1 -1
  203. package/dist/components/Slide/SubtitleOverlay.cjs.map +1 -1
  204. package/dist/components/Slide/SubtitleOverlay.d.ts +2 -2
  205. package/dist/components/Slide/SubtitleOverlay.es.js +17 -17
  206. package/dist/components/Slide/SubtitleOverlay.es.js.map +1 -1
  207. package/dist/components/Slide/diff-utils.d.ts +1 -1
  208. package/dist/components/Slide/index.d.ts +12 -12
  209. package/dist/components/Slide/locales/slide.json.cjs +2 -0
  210. package/dist/components/Slide/locales/slide.json.cjs.map +1 -0
  211. package/dist/components/Slide/locales/slide.json.d.ts +205 -0
  212. package/dist/components/Slide/locales/slide.json.es.js +11 -0
  213. package/dist/components/Slide/locales/slide.json.es.js.map +1 -0
  214. package/dist/components/Slide/slideI18n.cjs +1 -1
  215. package/dist/components/Slide/slideI18n.cjs.map +1 -1
  216. package/dist/components/Slide/slideI18n.d.ts +6 -3
  217. package/dist/components/Slide/slideI18n.es.js +10 -155
  218. package/dist/components/Slide/slideI18n.es.js.map +1 -1
  219. package/dist/components/Slide/useSlide.d.ts +1 -1
  220. package/dist/components/Slide/utils/appendedMarkerAdvance.d.ts +1 -1
  221. package/dist/components/Slide/utils/audioSegments.d.ts +1 -1
  222. package/dist/components/Slide/utils/interactionResolution.d.ts +2 -2
  223. package/dist/components/Slide/utils/listenModeElementList.d.ts +2 -2
  224. package/dist/components/Slide/utils/markdownScaling.d.ts +1 -1
  225. package/dist/components/Slide/utils/playerCustomActions.d.ts +2 -2
  226. package/dist/components/Slide/utils/playerKeyboardShortcuts.cjs +1 -1
  227. package/dist/components/Slide/utils/playerKeyboardShortcuts.cjs.map +1 -1
  228. package/dist/components/Slide/utils/playerKeyboardShortcuts.d.ts +1 -1
  229. package/dist/components/Slide/utils/playerKeyboardShortcuts.es.js +20 -20
  230. package/dist/components/Slide/utils/playerKeyboardShortcuts.es.js.map +1 -1
  231. package/dist/components/Slide/utils/runStreamFixture.d.ts +1 -1
  232. package/dist/components/Slide/utils/segmentSeek.d.ts +1 -1
  233. package/dist/components/Slide/utils/silentStepAutoAdvance.d.ts +1 -1
  234. package/dist/components/Slide/utils/streamingNavigation.d.ts +1 -1
  235. package/dist/components/Slide/utils/subtitleCue.d.ts +1 -1
  236. package/dist/components/Slide/utils/subtitleJumpNavigation.d.ts +1 -1
  237. package/dist/components/index.d.ts +22 -18
  238. package/dist/components/ui/button.cjs +1 -1
  239. package/dist/components/ui/button.cjs.map +1 -1
  240. package/dist/components/ui/button.es.js +12 -13
  241. package/dist/components/ui/button.es.js.map +1 -1
  242. package/dist/components/ui/checkbox.cjs +1 -1
  243. package/dist/components/ui/checkbox.cjs.map +1 -1
  244. package/dist/components/ui/checkbox.es.js +35 -35
  245. package/dist/components/ui/checkbox.es.js.map +1 -1
  246. package/dist/components/ui/dialog.cjs +1 -1
  247. package/dist/components/ui/dialog.cjs.map +1 -1
  248. package/dist/components/ui/dialog.d.ts +5 -1
  249. package/dist/components/ui/dialog.es.js +37 -37
  250. package/dist/components/ui/dialog.es.js.map +1 -1
  251. package/dist/components/ui/input.cjs +1 -1
  252. package/dist/components/ui/input.cjs.map +1 -1
  253. package/dist/components/ui/input.es.js +4 -4
  254. package/dist/components/ui/input.es.js.map +1 -1
  255. package/dist/components/ui/inputGroup/button.cjs +1 -1
  256. package/dist/components/ui/inputGroup/button.cjs.map +1 -1
  257. package/dist/components/ui/inputGroup/button.es.js +9 -10
  258. package/dist/components/ui/inputGroup/button.es.js.map +1 -1
  259. package/dist/components/ui/inputGroup/input-group.cjs +1 -1
  260. package/dist/components/ui/inputGroup/input-group.cjs.map +1 -1
  261. package/dist/components/ui/inputGroup/input-group.d.ts +1 -1
  262. package/dist/components/ui/inputGroup/input-group.es.js +10 -10
  263. package/dist/components/ui/inputGroup/input-group.es.js.map +1 -1
  264. package/dist/components/ui/inputGroup/textarea.cjs +1 -1
  265. package/dist/components/ui/inputGroup/textarea.cjs.map +1 -1
  266. package/dist/components/ui/inputGroup/textarea.es.js +2 -2
  267. package/dist/components/ui/inputGroup/textarea.es.js.map +1 -1
  268. package/dist/components/ui/loading-overlay-card.cjs +2 -2
  269. package/dist/components/ui/loading-overlay-card.cjs.map +1 -1
  270. package/dist/components/ui/loading-overlay-card.es.js +11 -11
  271. package/dist/components/ui/loading-overlay-card.es.js.map +1 -1
  272. package/dist/components/ui/popover.cjs +1 -1
  273. package/dist/components/ui/popover.cjs.map +1 -1
  274. package/dist/components/ui/popover.es.js +6 -6
  275. package/dist/components/ui/popover.es.js.map +1 -1
  276. package/dist/components/ui/tooltip.cjs +1 -1
  277. package/dist/components/ui/tooltip.cjs.map +1 -1
  278. package/dist/components/ui/tooltip.es.js +16 -16
  279. package/dist/components/ui/tooltip.es.js.map +1 -1
  280. package/dist/editor.d.ts +2 -2
  281. package/dist/fonts/KaTeX_AMS-Regular.ttf +0 -0
  282. package/dist/fonts/KaTeX_AMS-Regular.woff +0 -0
  283. package/dist/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  284. package/dist/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
  285. package/dist/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
  286. package/dist/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  287. package/dist/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
  288. package/dist/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
  289. package/dist/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  290. package/dist/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
  291. package/dist/fonts/KaTeX_Fraktur-Bold.woff +0 -0
  292. package/dist/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  293. package/dist/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
  294. package/dist/fonts/KaTeX_Fraktur-Regular.woff +0 -0
  295. package/dist/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  296. package/dist/fonts/KaTeX_Main-Bold.ttf +0 -0
  297. package/dist/fonts/KaTeX_Main-Bold.woff +0 -0
  298. package/dist/fonts/KaTeX_Main-Bold.woff2 +0 -0
  299. package/dist/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
  300. package/dist/fonts/KaTeX_Main-BoldItalic.woff +0 -0
  301. package/dist/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  302. package/dist/fonts/KaTeX_Main-Italic.ttf +0 -0
  303. package/dist/fonts/KaTeX_Main-Italic.woff +0 -0
  304. package/dist/fonts/KaTeX_Main-Italic.woff2 +0 -0
  305. package/dist/fonts/KaTeX_Main-Regular.ttf +0 -0
  306. package/dist/fonts/KaTeX_Main-Regular.woff +0 -0
  307. package/dist/fonts/KaTeX_Main-Regular.woff2 +0 -0
  308. package/dist/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
  309. package/dist/fonts/KaTeX_Math-BoldItalic.woff +0 -0
  310. package/dist/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  311. package/dist/fonts/KaTeX_Math-Italic.ttf +0 -0
  312. package/dist/fonts/KaTeX_Math-Italic.woff +0 -0
  313. package/dist/fonts/KaTeX_Math-Italic.woff2 +0 -0
  314. package/dist/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
  315. package/dist/fonts/KaTeX_SansSerif-Bold.woff +0 -0
  316. package/dist/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  317. package/dist/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
  318. package/dist/fonts/KaTeX_SansSerif-Italic.woff +0 -0
  319. package/dist/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  320. package/dist/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
  321. package/dist/fonts/KaTeX_SansSerif-Regular.woff +0 -0
  322. package/dist/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  323. package/dist/fonts/KaTeX_Script-Regular.ttf +0 -0
  324. package/dist/fonts/KaTeX_Script-Regular.woff +0 -0
  325. package/dist/fonts/KaTeX_Script-Regular.woff2 +0 -0
  326. package/dist/fonts/KaTeX_Size1-Regular.ttf +0 -0
  327. package/dist/fonts/KaTeX_Size1-Regular.woff +0 -0
  328. package/dist/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  329. package/dist/fonts/KaTeX_Size2-Regular.ttf +0 -0
  330. package/dist/fonts/KaTeX_Size2-Regular.woff +0 -0
  331. package/dist/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  332. package/dist/fonts/KaTeX_Size3-Regular.ttf +0 -0
  333. package/dist/fonts/KaTeX_Size3-Regular.woff +0 -0
  334. package/dist/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  335. package/dist/fonts/KaTeX_Size4-Regular.ttf +0 -0
  336. package/dist/fonts/KaTeX_Size4-Regular.woff +0 -0
  337. package/dist/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  338. package/dist/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
  339. package/dist/fonts/KaTeX_Typewriter-Regular.woff +0 -0
  340. package/dist/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  341. package/dist/index.cjs +1 -1
  342. package/dist/index.d.ts +2 -2
  343. package/dist/index.es.js +22 -19
  344. package/dist/index.es.js.map +1 -1
  345. package/dist/lib/locale.cjs +1 -1
  346. package/dist/lib/locale.cjs.map +1 -1
  347. package/dist/lib/locale.d.ts +5 -1
  348. package/dist/lib/locale.es.js +26 -13
  349. package/dist/lib/locale.es.js.map +1 -1
  350. package/dist/lib/locale.test.d.ts +1 -0
  351. package/dist/lib/useDetachedLanguage.cjs +2 -0
  352. package/dist/lib/useDetachedLanguage.cjs.map +1 -0
  353. package/dist/lib/useDetachedLanguage.d.ts +3 -0
  354. package/dist/lib/useDetachedLanguage.es.js +25 -0
  355. package/dist/lib/useDetachedLanguage.es.js.map +1 -0
  356. package/dist/lib/useResolvedDirection.cjs +2 -0
  357. package/dist/lib/useResolvedDirection.cjs.map +1 -0
  358. package/dist/lib/useResolvedDirection.d.ts +6 -0
  359. package/dist/lib/useResolvedDirection.es.js +37 -0
  360. package/dist/lib/useResolvedDirection.es.js.map +1 -0
  361. package/dist/markdown-flow-ui-lib.css +1 -1
  362. package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs +1 -1
  363. package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs.map +1 -1
  364. package/dist/node_modules/@radix-ui/react-arrow/dist/index.es.js +6 -6
  365. package/dist/node_modules/@radix-ui/react-arrow/dist/index.es.js.map +1 -1
  366. package/dist/node_modules/@radix-ui/react-context/dist/index.cjs +1 -1
  367. package/dist/node_modules/@radix-ui/react-context/dist/index.cjs.map +1 -1
  368. package/dist/node_modules/@radix-ui/react-context/dist/index.es.js +21 -21
  369. package/dist/node_modules/@radix-ui/react-context/dist/index.es.js.map +1 -1
  370. package/dist/node_modules/@radix-ui/react-dialog/dist/index.cjs +2 -2
  371. package/dist/node_modules/@radix-ui/react-dialog/dist/index.cjs.map +1 -1
  372. package/dist/node_modules/@radix-ui/react-dialog/dist/index.es.js +100 -100
  373. package/dist/node_modules/@radix-ui/react-dialog/dist/index.es.js.map +1 -1
  374. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +1 -1
  375. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs.map +1 -1
  376. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.es.js +38 -38
  377. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.es.js.map +1 -1
  378. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +1 -1
  379. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs.map +1 -1
  380. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.es.js +9 -9
  381. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.es.js.map +1 -1
  382. package/dist/node_modules/@radix-ui/react-popover/dist/index.cjs +1 -1
  383. package/dist/node_modules/@radix-ui/react-popover/dist/index.cjs.map +1 -1
  384. package/dist/node_modules/@radix-ui/react-popover/dist/index.es.js +95 -95
  385. package/dist/node_modules/@radix-ui/react-popover/dist/index.es.js.map +1 -1
  386. package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs +1 -1
  387. package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs.map +1 -1
  388. package/dist/node_modules/@radix-ui/react-popper/dist/index.es.js +48 -48
  389. package/dist/node_modules/@radix-ui/react-popper/dist/index.es.js.map +1 -1
  390. package/dist/node_modules/@radix-ui/react-portal/dist/index.cjs +1 -1
  391. package/dist/node_modules/@radix-ui/react-portal/dist/index.cjs.map +1 -1
  392. package/dist/node_modules/@radix-ui/react-portal/dist/index.es.js +6 -6
  393. package/dist/node_modules/@radix-ui/react-portal/dist/index.es.js.map +1 -1
  394. package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs +1 -1
  395. package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -1
  396. package/dist/node_modules/@radix-ui/react-primitive/dist/index.es.js +9 -9
  397. package/dist/node_modules/@radix-ui/react-primitive/dist/index.es.js.map +1 -1
  398. package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs +1 -1
  399. package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -1
  400. package/dist/node_modules/@radix-ui/react-slot/dist/index.es.js +17 -17
  401. package/dist/node_modules/@radix-ui/react-slot/dist/index.es.js.map +1 -1
  402. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.cjs +1 -1
  403. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.cjs.map +1 -1
  404. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.es.js +100 -100
  405. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.es.js.map +1 -1
  406. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs +1 -1
  407. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs.map +1 -1
  408. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.es.js +6 -6
  409. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.es.js.map +1 -1
  410. package/dist/node_modules/@uiw/react-codemirror/esm/index.cjs +1 -1
  411. package/dist/node_modules/@uiw/react-codemirror/esm/index.cjs.map +1 -1
  412. package/dist/node_modules/@uiw/react-codemirror/esm/index.es.js +27 -27
  413. package/dist/node_modules/@uiw/react-codemirror/esm/index.es.js.map +1 -1
  414. package/dist/node_modules/lucide-react/dist/esm/icons/{chevron-down.cjs → chevrons-down.cjs} +2 -2
  415. package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-down.cjs.map +1 -0
  416. package/dist/node_modules/lucide-react/dist/esm/icons/{chevron-down.es.js → chevrons-down.es.js} +6 -3
  417. package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-down.es.js.map +1 -0
  418. package/dist/node_modules/react-markdown/lib/index.cjs +1 -1
  419. package/dist/node_modules/react-markdown/lib/index.cjs.map +1 -1
  420. package/dist/node_modules/react-markdown/lib/index.es.js +39 -39
  421. package/dist/node_modules/react-markdown/lib/index.es.js.map +1 -1
  422. package/dist/renderer.cjs +1 -1
  423. package/dist/renderer.d.ts +18 -17
  424. package/dist/renderer.es.js +20 -17
  425. package/dist/renderer.es.js.map +1 -1
  426. package/dist/scroll.cjs +1 -1
  427. package/dist/scroll.d.ts +6 -3
  428. package/dist/scroll.es.js +4 -2
  429. package/dist/scroll.es.js.map +1 -1
  430. package/dist/slide.d.ts +3 -3
  431. package/package.json +5 -2
  432. package/dist/_virtual/jsx-runtime.cjs +0 -2
  433. package/dist/_virtual/jsx-runtime.cjs.map +0 -1
  434. package/dist/_virtual/jsx-runtime.es.js +0 -6
  435. package/dist/_virtual/jsx-runtime.es.js.map +0 -1
  436. package/dist/_virtual/jsx-runtime.es2.js +0 -5
  437. package/dist/_virtual/jsx-runtime.es2.js.map +0 -1
  438. package/dist/_virtual/jsx-runtime2.cjs +0 -2
  439. package/dist/_virtual/jsx-runtime2.cjs.map +0 -1
  440. package/dist/_virtual/react-jsx-runtime.development.cjs +0 -2
  441. package/dist/_virtual/react-jsx-runtime.development.cjs.map +0 -1
  442. package/dist/_virtual/react-jsx-runtime.development.es.js +0 -5
  443. package/dist/_virtual/react-jsx-runtime.development.es.js.map +0 -1
  444. package/dist/_virtual/react-jsx-runtime.production.cjs +0 -2
  445. package/dist/_virtual/react-jsx-runtime.production.cjs.map +0 -1
  446. package/dist/_virtual/react-jsx-runtime.production.es.js +0 -5
  447. package/dist/_virtual/react-jsx-runtime.production.es.js.map +0 -1
  448. package/dist/lib/localeTextMap.cjs +0 -2
  449. package/dist/lib/localeTextMap.cjs.map +0 -1
  450. package/dist/lib/localeTextMap.es.js +0 -5
  451. package/dist/lib/localeTextMap.es.js.map +0 -1
  452. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.cjs.map +0 -1
  453. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.es.js.map +0 -1
  454. package/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs +0 -24
  455. package/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs.map +0 -1
  456. package/dist/node_modules/react/cjs/react-jsx-runtime.development.es.js +0 -409
  457. package/dist/node_modules/react/cjs/react-jsx-runtime.development.es.js.map +0 -1
  458. package/dist/node_modules/react/cjs/react-jsx-runtime.production.cjs +0 -10
  459. package/dist/node_modules/react/cjs/react-jsx-runtime.production.cjs.map +0 -1
  460. package/dist/node_modules/react/cjs/react-jsx-runtime.production.es.js +0 -36
  461. package/dist/node_modules/react/cjs/react-jsx-runtime.production.es.js.map +0 -1
  462. package/dist/node_modules/react/jsx-runtime.cjs +0 -2
  463. package/dist/node_modules/react/jsx-runtime.cjs.map +0 -1
  464. package/dist/node_modules/react/jsx-runtime.es.js +0 -11
  465. package/dist/node_modules/react/jsx-runtime.es.js.map +0 -1
@@ -1,303 +1,312 @@
1
- import { j as l } from "../../_virtual/jsx-runtime.es.js";
2
- import { useEffect as b, useMemo as L, useState as S, useRef as ee, useCallback as a } from "react";
3
- import Fe from "../../node_modules/@uiw/react-codemirror/esm/index.es.js";
4
- import { autocompletion as $e } from "../../node_modules/@codemirror/autocomplete/dist/index.es.js";
5
- import { EditorView as ge } from "../../node_modules/@codemirror/view/dist/index.es.js";
6
- import { markdown as De } from "../../node_modules/@codemirror/lang-markdown/dist/index.es.js";
7
- import { syntaxHighlighting as He, defaultHighlightStyle as qe } from "../../node_modules/@codemirror/language/dist/index.es.js";
8
- import { Tooltip as Me, TooltipTrigger as _e, TooltipContent as Ge } from "../ui/tooltip.es.js";
9
- import We from "./components/CustomDialog.es.js";
10
- import Qe from "./components/CustomPopover.es.js";
11
- import Ue from "./components/EditorToolbar.es.js";
12
- import Ye from "./components/VariableSearchDropdown.es.js";
13
- import Je from "./editor-context.es.js";
14
- import Ke from "./components/ImageInject.es.js";
15
- import Xe from "./components/VideoInject.es.js";
16
- import Ze from "./components/VariableSelect.es.js";
17
- import { SelectedOption as m } from "./types.es.js";
1
+ import { jsx as m, jsxs as $ } from "react/jsx-runtime";
2
+ import { useEffect as b, useMemo as w, useState as v, useRef as U, useCallback as s } from "react";
3
+ import Ue from "../../node_modules/@uiw/react-codemirror/esm/index.es.js";
4
+ import { autocompletion as Ye } from "../../node_modules/@codemirror/autocomplete/dist/index.es.js";
5
+ import { EditorView as Le } from "../../node_modules/@codemirror/view/dist/index.es.js";
6
+ import { markdown as Je } from "../../node_modules/@codemirror/lang-markdown/dist/index.es.js";
7
+ import { syntaxHighlighting as Ke, defaultHighlightStyle as Xe } from "../../node_modules/@codemirror/language/dist/index.es.js";
8
+ import { Tooltip as Ze, TooltipTrigger as et, TooltipContent as tt } from "../ui/tooltip.es.js";
9
+ import ot from "./components/CustomDialog.es.js";
10
+ import nt from "./components/CustomPopover.es.js";
11
+ import rt from "./components/EditorToolbar.es.js";
12
+ import it from "./components/VariableSearchDropdown.es.js";
13
+ import at from "./editor-context.es.js";
14
+ import st from "./components/ImageInject.es.js";
15
+ import lt from "./components/VideoInject.es.js";
16
+ import ct from "./components/VariableSelect.es.js";
17
+ import { SelectedOption as f } from "./types.es.js";
18
18
  /* empty css */
19
- import { extractVariableNames as et, getImageContentToInsert as tt, getVideoContentToInsert as ot, createSlashCommands as nt, parseContentInfo as rt, createVariableExpressionRegexp as st } from "./utils.es.js";
20
- import it from "./plugins/ImgPlaceholder.es.js";
21
- import at from "./plugins/VideoPlaceholder.es.js";
22
- import lt from "./plugins/VariablePlaceholder.es.js";
23
- import ct from "./plugins/SyntaxHighlighter.es.js";
24
- import te from "../../node_modules/i18next/dist/esm/i18next.es.js";
25
- import { DEFAULT_EDITOR_LOCALE as oe, editorLocaleResources as de, getEditorLocaleMessages as ut } from "./editorI18n.es.js";
26
- import { normalizeMarkdownFlowLocale as mt } from "../../lib/locale.es.js";
27
- import { initReactI18next as ft } from "../../node_modules/react-i18next/dist/es/initReactI18next.es.js";
28
- import { useTranslation as ht } from "../../node_modules/react-i18next/dist/es/useTranslation.es.js";
29
- te.isInitialized ? Object.entries(de).forEach(([C, f]) => {
30
- te.addResourceBundle(
19
+ import { extractVariableNames as ut, getImageContentToInsert as mt, getVideoContentToInsert as ft, createSlashCommands as ht, parseContentInfo as pt, createVariableExpressionRegexp as gt } from "./utils.es.js";
20
+ import dt from "./plugins/ImgPlaceholder.es.js";
21
+ import Vt from "./plugins/VideoPlaceholder.es.js";
22
+ import { mediaPlaceholderLabels as Ct } from "./plugins/mediaPlaceholderLabels.es.js";
23
+ import bt from "./plugins/VariablePlaceholder.es.js";
24
+ import St from "./plugins/SyntaxHighlighter.es.js";
25
+ import ie from "../../node_modules/i18next/dist/esm/i18next.es.js";
26
+ import { DEFAULT_EDITOR_LOCALE as ae, editorLocaleResources as Ee, getEditorLocaleMessages as It } from "./editorI18n.es.js";
27
+ import { normalizeMarkdownFlowLocale as wt, getMarkdownFlowDirection as vt, getMarkdownFlowLanguage as Lt } from "../../lib/locale.es.js";
28
+ import { useDetachedLanguage as Et } from "../../lib/useDetachedLanguage.es.js";
29
+ import { useResolvedDirection as Tt } from "../../lib/useResolvedDirection.es.js";
30
+ import { initReactI18next as kt } from "../../node_modules/react-i18next/dist/es/initReactI18next.es.js";
31
+ import { useTranslation as Ot } from "../../node_modules/react-i18next/dist/es/useTranslation.es.js";
32
+ ie.isInitialized ? Object.entries(Ee).forEach(([C, h]) => {
33
+ ie.addResourceBundle(
31
34
  C,
32
35
  "translation",
33
- f.translation,
36
+ h.translation,
34
37
  !0,
35
38
  !0
36
39
  );
37
- }) : te.use(ft).init({
38
- resources: de,
39
- lng: oe,
40
- fallbackLng: oe,
40
+ }) : ie.use(kt).init({
41
+ resources: Ee,
42
+ lng: ae,
43
+ fallbackLng: ae,
41
44
  interpolation: { escapeValue: !1 }
42
45
  });
43
- const Ve = [], Ce = (C, f) => {
44
- if (!C || f < 0)
46
+ const Te = [], ke = (C, h) => {
47
+ if (!C || h < 0)
45
48
  return !1;
46
- const T = st();
47
- let x;
48
- for (; (x = T.exec(C)) !== null; ) {
49
- const v = x.index ?? 0, _ = v + x[0].length, G = v + 2, W = _ - 2;
50
- if (f >= G && f <= W)
49
+ const O = gt();
50
+ let L;
51
+ for (; (L = O.exec(C)) !== null; ) {
52
+ const E = L.index ?? 0, Y = E + L[0].length, R = E + 2, J = Y - 2;
53
+ if (h >= R && h <= J)
51
54
  return !0;
52
- T.lastIndex === x.index && T.lastIndex++;
55
+ O.lastIndex === L.index && O.lastIndex++;
53
56
  }
54
57
  return !1;
55
- }, pt = (C = "") => `{{${C}}}`, Mt = ({
58
+ }, xt = (C = "") => `{{${C}}}`, so = ({
56
59
  content: C = "",
57
- editMode: f = "codeEdit",
58
- variables: T,
59
- systemVariables: x,
60
- onChange: v,
61
- onBlur: _,
62
- locale: G = oe,
63
- uploadProps: W,
60
+ editMode: h = "codeEdit",
61
+ variables: O,
62
+ systemVariables: L,
63
+ onChange: E,
64
+ onBlur: Y,
65
+ locale: R,
66
+ lang: J,
67
+ uploadProps: Oe,
64
68
  disabled: n = !1,
65
- toolbarActionsRight: Q,
66
- onReady: be
69
+ toolbarActionsRight: K,
70
+ onReady: xe
67
71
  }) => {
68
- const { t: i, i18n: B } = ht(), F = mt(G || B.language);
72
+ const { t: a, i18n: X } = Ot(), j = wt(
73
+ R ?? ae
74
+ ), se = vt(R), le = J ?? Lt(R);
69
75
  b(() => {
70
- B.language !== F && B.changeLanguage(F);
71
- }, [B, F]);
72
- const O = ut(F), d = L(
76
+ X.language !== j && X.changeLanguage(j);
77
+ }, [X, j]);
78
+ const x = It(j), V = w(
73
79
  () => ({
74
- image: i("toolbarInsertImage", {
80
+ image: a("toolbarInsertImage", {
75
81
  defaultValue: "Insert image"
76
82
  }),
77
- video: i("toolbarInsertVideo", {
83
+ video: a("toolbarInsertVideo", {
78
84
  defaultValue: "Insert video"
79
85
  }),
80
- variable: i("slashVariable", {
86
+ variable: a("slashVariable", {
81
87
  defaultValue: "Variable"
82
88
  }),
83
- addVariable: i("toolbarInsertNewVariable", {
89
+ addVariable: a("toolbarInsertNewVariable", {
84
90
  defaultValue: "Insert new variable"
85
91
  }),
86
- search: i("toolbarInsertExistingVariable", {
92
+ search: a("toolbarInsertExistingVariable", {
87
93
  defaultValue: "Insert existing variable"
88
94
  }),
89
- confirmOutput: i("toolbarConfirmOutput", {
95
+ confirmOutput: a("toolbarConfirmOutput", {
90
96
  defaultValue: "Confirm output"
91
97
  }),
92
- insertLink: i("toolbarInsertLink", {
98
+ insertLink: a("toolbarInsertLink", {
93
99
  defaultValue: "Insert link"
94
100
  }),
95
- insertButton: i("toolbarInsertButton", {
101
+ insertButton: a("toolbarInsertButton", {
96
102
  defaultValue: "Insert button"
97
103
  }),
98
- insertSingleChoice: i("toolbarInsertSingleChoice", {
104
+ insertSingleChoice: a("toolbarInsertSingleChoice", {
99
105
  defaultValue: "Insert single choice"
100
106
  }),
101
- insertMultiChoice: i("toolbarInsertMultiChoice", {
107
+ insertMultiChoice: a("toolbarInsertMultiChoice", {
102
108
  defaultValue: "Insert multi choice"
103
109
  }),
104
- insertInput: i("toolbarInsertInput", {
110
+ insertInput: a("toolbarInsertInput", {
105
111
  defaultValue: "Insert input"
106
112
  }),
107
- singleChoiceOption1: i("toolbarChoiceOption1", {
113
+ singleChoiceOption1: a("toolbarChoiceOption1", {
108
114
  defaultValue: "Option 1"
109
115
  }),
110
- singleChoiceOption2: i("toolbarChoiceOption2", {
116
+ singleChoiceOption2: a("toolbarChoiceOption2", {
111
117
  defaultValue: "Option 2"
112
118
  }),
113
- inputPlaceholder: i("toolbarInputPlaceholder", {
119
+ inputPlaceholder: a("toolbarInputPlaceholder", {
114
120
  defaultValue: "Please enter"
115
121
  })
116
122
  }),
117
- [i]
118
- ), Ie = L(
123
+ [a]
124
+ ), ye = w(
119
125
  () => ({
120
- searchPlaceholder: i("variableSearchPlaceholder", {
126
+ searchPlaceholder: a("variableSearchPlaceholder", {
121
127
  defaultValue: "Search variable"
122
128
  }),
123
- systemLabel: i("variableSectionSystem", "System Variables"),
124
- customLabel: i("variableSectionCustom", "Custom Variables"),
125
- emptyLabel: i("variableNotFound", "No variables found")
129
+ systemLabel: a("variableSectionSystem", "System Variables"),
130
+ customLabel: a("variableSectionCustom", "Custom Variables"),
131
+ emptyLabel: a("variableNotFound", "No variables found")
126
132
  }),
127
- [i]
128
- ), Se = f === "quickEdit" ? i("placeholderQuickEdit", {
129
- defaultValue: i("placeholderCodeEdit", {
130
- defaultValue: i("placeholder")
133
+ [a]
134
+ ), Pe = h === "quickEdit" ? a("placeholderQuickEdit", {
135
+ defaultValue: a("placeholderCodeEdit", {
136
+ defaultValue: a("placeholder")
131
137
  })
132
- }) : i("placeholderCodeEdit", { defaultValue: i("placeholder") }), A = L(() => {
138
+ }) : a("placeholderCodeEdit", { defaultValue: a("placeholder") }), A = w(() => {
133
139
  const e = /* @__PURE__ */ new Set();
134
- return (x ?? Ve).filter((o) => {
140
+ return (L ?? Te).filter((o) => {
135
141
  const r = typeof o?.name == "string" ? o.name.toLowerCase() : "";
136
142
  return !r || e.has(r) ? !1 : (e.add(r), !0);
137
143
  });
138
- }, [x]), U = L(() => {
144
+ }, [L]), Z = w(() => {
139
145
  const e = new Set(
140
146
  A.map((r) => r.name.toLowerCase())
141
147
  ), o = /* @__PURE__ */ new Set();
142
- return (T ?? Ve).filter((r) => {
148
+ return (O ?? Te).filter((r) => {
143
149
  const t = typeof r?.name == "string" ? r.name.toLowerCase() : "";
144
150
  return !t || e.has(t) || o.has(t) ? !1 : (o.add(t), !0);
145
151
  });
146
- }, [T, A]), [Y, w] = S(!1), [J, k] = S(!1), [xe, R] = S(null), [ne, K] = S(
147
- U
148
- ), [$, ve] = S(
152
+ }, [O, A]), [ee, T] = v(!1), [te, y] = v(!1), H = U(null), z = Et(H, le), { resolvedDirection: B } = Tt(
153
+ H,
154
+ se
155
+ ), [Ne, F] = v(null), [ce, oe] = v(
156
+ Z
157
+ ), [q, De] = v(
149
158
  A
150
159
  );
151
160
  b(() => {
152
- K(U);
153
- }, [U]), b(() => {
154
- ve(A);
161
+ oe(Z);
162
+ }, [Z]), b(() => {
163
+ De(A);
155
164
  }, [A]);
156
- const [I, E] = S(
157
- m.Empty
158
- ), [c, z] = S(), s = ee(null), D = ee(null), H = ee(null), [X, re] = S(!1), g = a(() => {
159
- re(!1), H.current = null;
160
- }, []), we = a(
165
+ const [S, k] = v(
166
+ f.Empty
167
+ ), [l, M] = v(), i = U(null), _ = U(null), G = U(null), [ne, ue] = v(!1), g = s(() => {
168
+ ue(!1), G.current = null;
169
+ }, []), Re = s(
161
170
  (e) => {
162
171
  if (!n) {
163
- if (X && H.current === e) {
172
+ if (ne && G.current === e) {
164
173
  g();
165
174
  return;
166
175
  }
167
- H.current = e, re(!0);
176
+ G.current = e, ue(!0);
168
177
  }
169
178
  },
170
- [g, n, X]
171
- ), Ee = {
172
- selectedOption: I,
173
- setSelectedOption: E,
174
- dialogOpen: Y,
175
- setDialogOpen: w,
176
- popoverOpen: J,
177
- setPopoverOpen: k,
178
- popoverPosition: xe,
179
- setPopoverPosition: R
179
+ [g, n, ne]
180
+ ), Ae = {
181
+ selectedOption: S,
182
+ setSelectedOption: k,
183
+ dialogOpen: ee,
184
+ setDialogOpen: T,
185
+ popoverOpen: te,
186
+ setPopoverOpen: y,
187
+ popoverPosition: Ne,
188
+ setPopoverPosition: F
180
189
  };
181
190
  b(() => {
182
- n && (w(!1), k(!1), E(m.Empty), z(null), R(null), g());
191
+ n && (T(!1), y(!1), k(f.Empty), M(null), F(null), g());
183
192
  }, [
184
193
  g,
185
194
  n,
186
- w,
195
+ T,
196
+ y,
197
+ F,
187
198
  k,
188
- R,
189
- E,
190
- z
199
+ M
191
200
  ]);
192
- const y = a(
201
+ const P = s(
193
202
  (e) => {
194
- if (f !== "quickEdit" || !e)
203
+ if (h !== "quickEdit" || !e)
195
204
  return;
196
- const o = et(e);
205
+ const o = ut(e);
197
206
  if (!o.length)
198
207
  return;
199
208
  const r = new Set(
200
- $.map((t) => t.name.toLowerCase())
209
+ q.map((t) => t.name.toLowerCase())
201
210
  );
202
- K((t) => {
203
- const u = new Set(
204
- t.map((V) => V.name.toLowerCase())
205
- ), h = /* @__PURE__ */ new Set(), p = [];
206
- return o.forEach((V) => {
207
- const N = V.toLowerCase();
208
- !V || r.has(N) || u.has(N) || h.has(N) || (p.push({ name: V }), h.add(N));
211
+ oe((t) => {
212
+ const c = new Set(
213
+ t.map((d) => d.name.toLowerCase())
214
+ ), u = /* @__PURE__ */ new Set(), p = [];
215
+ return o.forEach((d) => {
216
+ const I = d.toLowerCase();
217
+ !d || r.has(I) || c.has(I) || u.has(I) || (p.push({ name: d }), u.add(I));
209
218
  }), p.length ? [...p, ...t] : t;
210
219
  });
211
220
  },
212
- [f, $]
221
+ [h, q]
213
222
  );
214
223
  b(() => {
215
- y(C);
216
- }, [C, y]);
217
- const Z = a(
224
+ P(C);
225
+ }, [C, P]);
226
+ const re = s(
218
227
  (e) => {
219
228
  if (!n)
220
- if (g(), E(e), e === m.Variable) {
221
- if (s.current) {
222
- const { state: o } = s.current, r = o.selection.main.from, t = s.current.coordsAtPos(r);
223
- t && R({
229
+ if (g(), k(e), e === f.Variable) {
230
+ if (i.current) {
231
+ const { state: o } = i.current, r = o.selection.main.from, t = i.current.coordsAtPos(r);
232
+ t && F({
224
233
  x: t.left,
225
234
  y: t.bottom
226
235
  });
227
236
  }
228
- k(!0);
237
+ y(!0);
229
238
  } else
230
- w(!0);
239
+ T(!0);
231
240
  },
232
241
  [g, n]
233
- ), j = a(
242
+ ), N = s(
234
243
  (e) => {
235
- if (n || !s.current) return;
236
- const { state: o, dispatch: r } = s.current, t = o.selection.main.from;
244
+ if (n || !i.current) return;
245
+ const { state: o, dispatch: r } = i.current, t = o.selection.main.from;
237
246
  r({
238
247
  changes: { from: t, insert: e },
239
248
  selection: { anchor: t + e.length }
240
249
  });
241
250
  },
242
- [s, n]
243
- ), se = a(
251
+ [i, n]
252
+ ), me = s(
244
253
  (e) => {
245
- if (n || !s.current)
254
+ if (n || !i.current)
246
255
  return;
247
- const { state: o, dispatch: r } = s.current, t = o.selection.main;
256
+ const { state: o, dispatch: r } = i.current, t = o.selection.main;
248
257
  r({
249
258
  changes: { from: t.from, to: t.to, insert: e },
250
259
  selection: { anchor: t.from + e.length }
251
260
  });
252
261
  },
253
262
  [n]
254
- ), ie = a(() => {
255
- s.current?.focus();
256
- }, []), ae = a(() => s.current?.state.doc.toString() ?? "", []), le = a(
263
+ ), fe = s(() => {
264
+ i.current?.focus();
265
+ }, []), he = s(() => i.current?.state.doc.toString() ?? "", []), pe = s(
257
266
  (e) => {
258
267
  if (n)
259
268
  return;
260
- if (!s.current) {
261
- v?.(e);
269
+ if (!i.current) {
270
+ E?.(e);
262
271
  return;
263
272
  }
264
- const o = s.current, { state: r, dispatch: t } = o;
273
+ const o = i.current, { state: r, dispatch: t } = o;
265
274
  t({
266
275
  changes: { from: 0, to: r.doc.length, insert: e },
267
276
  selection: { anchor: e.length }
268
277
  });
269
278
  },
270
- [n, v]
271
- ), q = a(() => {
272
- if (n || !c || !s.current || c.from === -1)
279
+ [n, E]
280
+ ), W = s(() => {
281
+ if (n || !l || !i.current || l.from === -1)
273
282
  return;
274
- const { from: e, to: o } = c, { dispatch: r } = s.current;
283
+ const { from: e, to: o } = l, { dispatch: r } = i.current;
275
284
  r({
276
285
  changes: { from: e, to: o, insert: "" }
277
286
  });
278
- }, [c, s, n]), M = a(
287
+ }, [l, i, n]), Q = s(
279
288
  (e, o, r = !1) => {
280
- if (n || !s.current)
289
+ if (n || !i.current)
281
290
  return;
282
- const t = s.current, { state: u, dispatch: h } = t, p = o ?? u.selection.main, V = pt(e), N = r ? V.length : 2 + e.length;
283
- h({
291
+ const t = i.current, { state: c, dispatch: u } = t, p = o ?? c.selection.main, d = xt(e), I = r ? d.length : 2 + e.length;
292
+ u({
284
293
  changes: {
285
294
  from: p.from,
286
295
  to: p.to,
287
- insert: V
296
+ insert: d
288
297
  },
289
298
  selection: {
290
- anchor: p.from + N
299
+ anchor: p.from + I
291
300
  }
292
301
  }), t.focus();
293
302
  },
294
303
  [n]
295
- ), Le = a(() => {
296
- n || (g(), M(""));
297
- }, [g, n, M]), Te = a(() => {
298
- if (n || !s.current)
304
+ ), ze = s(() => {
305
+ n || (g(), Q(""));
306
+ }, [g, n, Q]), Be = s(() => {
307
+ if (n || !i.current)
299
308
  return;
300
- const e = s.current, { state: o, dispatch: r } = e, t = o.selection.main;
309
+ const e = i.current, { state: o, dispatch: r } = e, t = o.selection.main;
301
310
  r({
302
311
  changes: {
303
312
  from: t.from,
@@ -308,10 +317,10 @@ const Ve = [], Ce = (C, f) => {
308
317
  anchor: t.from + 3
309
318
  }
310
319
  }), e.focus();
311
- }, [n]), Oe = a(() => {
312
- if (n || !s.current)
320
+ }, [n]), Fe = s(() => {
321
+ if (n || !i.current)
313
322
  return;
314
- const e = s.current, { state: o, dispatch: r } = e, t = o.selection.main;
323
+ const e = i.current, { state: o, dispatch: r } = e, t = o.selection.main;
315
324
  r({
316
325
  changes: {
317
326
  from: t.from,
@@ -322,10 +331,10 @@ const Ve = [], Ce = (C, f) => {
322
331
  anchor: t.from + 1
323
332
  }
324
333
  }), e.focus();
325
- }, [n]), ke = a(() => {
326
- if (n || !s.current)
334
+ }, [n]), Me = s(() => {
335
+ if (n || !i.current)
327
336
  return;
328
- const e = s.current, { state: o, dispatch: r } = e, t = o.selection.main;
337
+ const e = i.current, { state: o, dispatch: r } = e, t = o.selection.main;
329
338
  r({
330
339
  changes: {
331
340
  from: t.from,
@@ -336,10 +345,10 @@ const Ve = [], Ce = (C, f) => {
336
345
  anchor: t.from + 2
337
346
  }
338
347
  }), e.focus();
339
- }, [n]), ye = a(() => {
340
- if (n || !s.current)
348
+ }, [n]), $e = s(() => {
349
+ if (n || !i.current)
341
350
  return;
342
- const e = s.current, { state: o, dispatch: r } = e, t = o.selection.main, u = d.singleChoiceOption1, h = d.singleChoiceOption2, p = `?[%{{}} ${u} | ${h}]`;
351
+ const e = i.current, { state: o, dispatch: r } = e, t = o.selection.main, c = V.singleChoiceOption1, u = V.singleChoiceOption2, p = `?[%{{}} ${c} | ${u}]`;
343
352
  r({
344
353
  changes: {
345
354
  from: t.from,
@@ -352,12 +361,12 @@ const Ve = [], Ce = (C, f) => {
352
361
  }), e.focus();
353
362
  }, [
354
363
  n,
355
- d.singleChoiceOption1,
356
- d.singleChoiceOption2
357
- ]), je = a(() => {
358
- if (n || !s.current)
364
+ V.singleChoiceOption1,
365
+ V.singleChoiceOption2
366
+ ]), je = s(() => {
367
+ if (n || !i.current)
359
368
  return;
360
- const e = s.current, { state: o, dispatch: r } = e, t = o.selection.main, u = d.singleChoiceOption1, h = d.singleChoiceOption2, p = `?[%{{}} ${u} || ${h}]`;
369
+ const e = i.current, { state: o, dispatch: r } = e, t = o.selection.main, c = V.singleChoiceOption1, u = V.singleChoiceOption2, p = `?[%{{}} ${c} || ${u}]`;
361
370
  r({
362
371
  changes: {
363
372
  from: t.from,
@@ -370,209 +379,232 @@ const Ve = [], Ce = (C, f) => {
370
379
  }), e.focus();
371
380
  }, [
372
381
  n,
373
- d.singleChoiceOption1,
374
- d.singleChoiceOption2
375
- ]), Pe = a(() => {
376
- if (n || !s.current)
382
+ V.singleChoiceOption1,
383
+ V.singleChoiceOption2
384
+ ]), He = s(() => {
385
+ if (n || !i.current)
377
386
  return;
378
- const e = s.current, { state: o, dispatch: r } = e, t = o.selection.main, h = `?[%{{}}...${d.inputPlaceholder ?? "请输入"}]`;
387
+ const e = i.current, { state: o, dispatch: r } = e, t = o.selection.main, u = `?[%{{}}...${V.inputPlaceholder ?? "请输入"}]`;
379
388
  r({
380
389
  changes: {
381
390
  from: t.from,
382
391
  to: t.to,
383
- insert: h
392
+ insert: u
384
393
  },
385
394
  selection: {
386
395
  anchor: t.from + 5
387
396
  }
388
397
  }), e.focus();
389
- }, [n, d.inputPlaceholder]), Ne = a(
398
+ }, [n, V.inputPlaceholder]), qe = s(
390
399
  ({
391
400
  resourceUrl: e,
392
401
  resourceTitle: o,
393
402
  scalePercent: r
394
403
  }) => {
395
404
  if (!e || n) return;
396
- const t = tt({
405
+ const t = mt({
397
406
  resourceUrl: e,
398
407
  resourceTitle: o,
399
408
  scalePercent: r
400
409
  });
401
- if (c?.type === m.Image) {
402
- if (q(), !s.current) return;
403
- const { dispatch: u } = s.current;
404
- u({
405
- changes: { from: c.from, insert: t }
410
+ if (l?.type === f.Image) {
411
+ if (W(), !i.current) return;
412
+ const { dispatch: c } = i.current;
413
+ c({
414
+ changes: { from: l.from, insert: t }
406
415
  });
407
416
  } else
408
- j(t);
409
- w(!1);
417
+ N(t);
418
+ T(!1);
410
419
  },
411
- [q, n, j, c]
412
- ), Ae = a(
420
+ [W, n, N, l]
421
+ ), _e = s(
413
422
  ({
414
423
  resourceUrl: e,
415
424
  resourceTitle: o
416
425
  }) => {
417
426
  if (n)
418
427
  return;
419
- const r = ot(e, o);
420
- if (c?.type === m.Video) {
421
- if (q(), !s.current) return;
422
- const { dispatch: t } = s.current;
428
+ const r = ft(e, o);
429
+ if (l?.type === f.Video) {
430
+ if (W(), !i.current) return;
431
+ const { dispatch: t } = i.current;
423
432
  t({
424
- changes: { from: c.from, insert: r }
433
+ changes: { from: l.from, insert: r }
425
434
  });
426
435
  } else
427
- j(r);
428
- w(!1);
436
+ N(r);
437
+ T(!1);
429
438
  },
430
- [q, n, j, c]
431
- ), ce = a(
439
+ [W, n, N, l]
440
+ ), ge = s(
432
441
  (e) => {
433
442
  if (n)
434
443
  return;
435
- const o = c?.type === m.Variable ? { from: c.from, to: c.to } : void 0;
436
- M(e.name, o, !0), k(!1), g();
444
+ const o = l?.type === f.Variable ? { from: l.from, to: l.to } : void 0;
445
+ Q(e.name, o, !0), y(!1), g();
437
446
  },
438
- [n, M, c, g]
439
- ), ue = a(() => $e({
447
+ [n, Q, l, g]
448
+ ), de = s(() => Ye({
440
449
  override: [
441
- nt(Z, {
450
+ ht(re, {
442
451
  // divider: currentStrings.slashDivider,
443
452
  // fixedText: currentStrings.slashFixedText,
444
- image: O.slashImage,
445
- video: O.slashVideo,
446
- variable: O.slashVariable
453
+ image: x.slashImage,
454
+ video: x.slashVideo,
455
+ variable: x.slashVariable
447
456
  })
448
457
  ]
449
458
  }), [
450
459
  // currentStrings.slashDivider,
451
460
  // currentStrings.slashFixedText,
452
- O.slashImage,
453
- O.slashVideo,
454
- O.slashVariable,
455
- Z
456
- ]), me = a(
461
+ x.slashImage,
462
+ x.slashVideo,
463
+ x.slashVariable,
464
+ re
465
+ ]), Ve = s(
457
466
  (e) => {
458
- if (s.current = e.view, f === "quickEdit" && D.current && e.selectionSet) {
467
+ if (i.current = e.view, h === "quickEdit" && _.current && e.selectionSet) {
459
468
  const o = e.state.selection.main.head, r = e.state.doc.toString();
460
- Ce(
469
+ ke(
461
470
  r,
462
471
  o
463
- ) || (y(r), D.current = null);
472
+ ) || (P(r), _.current = null);
464
473
  }
465
474
  },
466
- [y, f]
467
- ), fe = a(
475
+ [P, h]
476
+ ), Ce = s(
468
477
  (e) => {
469
478
  if (e.stopPropagation(), n)
470
479
  return;
471
- const { type: o, from: r, to: t, dataset: u, target: h } = e.detail, p = rt(o, u);
472
- if (z({
480
+ const { type: o, from: r, to: t, dataset: c, target: u } = e.detail, p = pt(o, c);
481
+ if (M({
473
482
  type: o,
474
483
  value: p,
475
484
  from: r,
476
485
  to: t
477
- }), E(o), o === m.Variable) {
478
- if (h) {
479
- const V = h.getBoundingClientRect();
480
- R({
481
- x: V.left,
482
- y: V.bottom
486
+ }), k(o), o === f.Variable) {
487
+ if (u) {
488
+ const d = u.getBoundingClientRect(), I = u.ownerDocument.defaultView?.getComputedStyle(
489
+ H.current ?? u
490
+ ).direction;
491
+ F({
492
+ x: I === "rtl" ? d.right : d.left,
493
+ y: d.bottom
483
494
  });
484
495
  }
485
- k(!0);
496
+ y(!0);
486
497
  } else
487
- w(!0);
498
+ T(!0);
488
499
  },
489
500
  [n]
490
501
  );
491
502
  b(() => {
492
- Y || (E(m.Empty), z(null));
493
- }, [Y]), b(() => {
494
- !J && I === m.Variable && (E(m.Empty), z(null));
495
- }, [J, I]), b(() => {
503
+ ee || (k(f.Empty), M(null));
504
+ }, [ee]), b(() => {
505
+ !te && S === f.Variable && (k(f.Empty), M(null));
506
+ }, [te, S]), b(() => {
496
507
  const e = (o) => {
497
- o.detail.view === s.current && fe(o);
508
+ o.detail.view === i.current && Ce(o);
498
509
  };
499
510
  return window.addEventListener("globalTagClick", e), () => {
500
511
  window.removeEventListener("globalTagClick", e);
501
512
  };
502
- }, [fe]);
503
- const Re = L(() => {
513
+ }, [Ce]);
514
+ const be = a("imageDefaultTitle"), Se = a("videoDefaultTitle"), Ie = w(
515
+ () => Ct.of({
516
+ image: be,
517
+ video: Se
518
+ }),
519
+ [be, Se]
520
+ ), Ge = w(() => {
504
521
  const e = [
505
- ge.lineWrapping,
506
- De(),
507
- He(qe),
508
- ct
522
+ Le.lineWrapping,
523
+ Je(),
524
+ Ke(Xe),
525
+ St
509
526
  ];
510
- return n || e.push(ue()), f === "quickEdit" && e.push(
511
- it,
512
- at,
513
- lt
527
+ return n || e.push(de()), h === "quickEdit" && e.push(
528
+ Ie,
529
+ dt,
530
+ Vt,
531
+ bt
514
532
  // fixedTextPlaceholderExtension,
515
533
  // DividerPlaceholder,
516
534
  ), e.push(
517
- ge.updateListener.of((o) => {
518
- me(o);
535
+ Le.updateListener.of((o) => {
536
+ Ve(o);
519
537
  })
520
538
  ), e;
521
- }, [n, f, ue, me]), ze = a(
539
+ }, [
540
+ n,
541
+ h,
542
+ de,
543
+ Ve,
544
+ Ie
545
+ ]), We = s(
522
546
  (e) => {
523
547
  if (n)
524
548
  return;
525
- const o = s.current?.state.selection.main.head ?? -1;
526
- Ce(
549
+ const o = i.current?.state.selection.main.head ?? -1;
550
+ ke(
527
551
  e,
528
552
  o
529
- ) ? D.current = e : (D.current = null, y(e)), v?.(e);
553
+ ) ? _.current = e : (_.current = null, P(e)), E?.(e);
530
554
  },
531
- [y, v, n]
532
- ), he = !n && X, P = L(
555
+ [P, E, n]
556
+ ), we = !n && ne, D = w(
533
557
  () => ({
534
- insertTextAtCursor: j,
535
- replaceSelection: se,
536
- focus: ie,
537
- getContent: ae,
538
- setContent: le
558
+ insertTextAtCursor: N,
559
+ replaceSelection: me,
560
+ focus: fe,
561
+ getContent: he,
562
+ setContent: pe
539
563
  }),
540
- [ie, ae, j, se, le]
541
- ), pe = a(
564
+ [fe, he, N, me, pe]
565
+ ), ve = s(
542
566
  (e) => {
543
- n || "render" in e || e.onClick?.(P);
567
+ n || "render" in e || e.onClick?.(D);
544
568
  },
545
- [n, P]
546
- ), Be = L(() => Q?.length ? /* @__PURE__ */ l.jsx("div", { className: "markdown-flow-editor-toolbar-right", children: Q.map((e) => {
569
+ [n, D]
570
+ ), Qe = w(() => K?.length ? /* @__PURE__ */ m("div", { className: "markdown-flow-editor-toolbar-right", children: K.map((e) => {
547
571
  if ("render" in e)
548
- return /* @__PURE__ */ l.jsx(
572
+ return /* @__PURE__ */ m(
549
573
  "div",
550
574
  {
551
575
  className: "markdown-flow-editor-toolbar-right-item",
552
- children: e.render(P)
576
+ children: e.render(D)
553
577
  },
554
578
  e.key
555
579
  );
556
- const o = e.label || e.tooltip || void 0, r = /* @__PURE__ */ l.jsxs(
580
+ const o = e.label || e.tooltip || void 0, r = /* @__PURE__ */ $(
557
581
  "button",
558
582
  {
559
583
  type: "button",
560
584
  disabled: n || e.disabled,
561
- onClick: () => pe(e),
585
+ onClick: () => ve(e),
562
586
  className: "markdown-flow-editor-toolbar-right-button",
563
587
  "aria-label": o,
564
588
  title: e.label || e.tooltip,
565
589
  children: [
566
- e.icon ? /* @__PURE__ */ l.jsx("span", { className: "toolbar-right-icon", children: e.icon }) : null,
567
- e.label ? /* @__PURE__ */ l.jsx("span", { className: "toolbar-right-label", children: e.label }) : null
590
+ e.icon ? /* @__PURE__ */ m("span", { className: "toolbar-right-icon", children: e.icon }) : null,
591
+ e.label ? /* @__PURE__ */ m("span", { className: "toolbar-right-label", children: e.label }) : null
568
592
  ]
569
593
  },
570
594
  e.key
571
- ), t = e.tooltip ? /* @__PURE__ */ l.jsxs(Me, { children: [
572
- /* @__PURE__ */ l.jsx(_e, { asChild: !0, children: r }),
573
- /* @__PURE__ */ l.jsx(Ge, { side: "top", children: e.tooltip })
595
+ ), t = e.tooltip ? /* @__PURE__ */ $(Ze, { children: [
596
+ /* @__PURE__ */ m(et, { asChild: !0, children: r }),
597
+ /* @__PURE__ */ m(
598
+ tt,
599
+ {
600
+ side: "top",
601
+ dir: B,
602
+ lang: z,
603
+ children: e.tooltip
604
+ }
605
+ )
574
606
  ] }) : r;
575
- return /* @__PURE__ */ l.jsx(
607
+ return /* @__PURE__ */ m(
576
608
  "div",
577
609
  {
578
610
  className: "markdown-flow-editor-toolbar-right-item",
@@ -580,52 +612,64 @@ const Ve = [], Ce = (C, f) => {
580
612
  },
581
613
  e.key
582
614
  );
583
- }) }) : null, [n, P, pe, Q]);
615
+ }) }) : null, [
616
+ n,
617
+ D,
618
+ ve,
619
+ B,
620
+ z,
621
+ K
622
+ ]);
584
623
  return b(() => {
585
- be?.(P);
586
- }, [P]), /* @__PURE__ */ l.jsxs(
624
+ xe?.(D);
625
+ }, [D]), /* @__PURE__ */ $(
587
626
  "div",
588
627
  {
589
628
  className: "markdown-flow-editor",
629
+ ref: H,
630
+ dir: se,
631
+ lang: le,
590
632
  "data-disabled": n ? "true" : void 0,
591
633
  "aria-disabled": n,
592
634
  children: [
593
- /* @__PURE__ */ l.jsx(
594
- Ue,
635
+ /* @__PURE__ */ m(
636
+ rt,
595
637
  {
596
638
  disabled: n,
597
- labels: d,
598
- onSelect: Z,
599
- onInsertVariablePlaceholder: Le,
600
- onVariableSearchToggle: we,
639
+ labels: V,
640
+ tooltipDirection: B,
641
+ tooltipLanguage: z,
642
+ onSelect: re,
643
+ onInsertVariablePlaceholder: ze,
644
+ onVariableSearchToggle: Re,
601
645
  onVariableSearchClose: g,
602
- onInsertConfirmOutput: Te,
603
- onInsertLink: Oe,
604
- onInsertButton: ke,
605
- onInsertSingleChoice: ye,
646
+ onInsertConfirmOutput: Be,
647
+ onInsertLink: Fe,
648
+ onInsertButton: Me,
649
+ onInsertSingleChoice: $e,
606
650
  onInsertMultiChoice: je,
607
- onInsertInputField: Pe,
608
- variableSearchActive: he,
609
- rightSlot: Be
651
+ onInsertInputField: He,
652
+ variableSearchActive: we,
653
+ rightSlot: Qe
610
654
  }
611
655
  ),
612
- /* @__PURE__ */ l.jsx(
613
- Ye,
656
+ /* @__PURE__ */ m(
657
+ it,
614
658
  {
615
- open: he,
616
- anchorElement: H.current,
659
+ open: we,
660
+ anchorElement: G.current,
617
661
  onClose: g,
618
- onSelect: ce,
619
- variables: ne,
620
- systemVariables: $,
621
- labels: Ie
662
+ onSelect: ge,
663
+ variables: ce,
664
+ systemVariables: q,
665
+ labels: ye
622
666
  }
623
667
  ),
624
- /* @__PURE__ */ l.jsx("div", { className: "markdown-flow-editor-body relative overflow-auto", children: /* @__PURE__ */ l.jsxs(Je.Provider, { value: Ee, children: [
625
- /* @__PURE__ */ l.jsx(
626
- Fe,
668
+ /* @__PURE__ */ m("div", { className: "markdown-flow-editor-body relative overflow-auto", children: /* @__PURE__ */ $(at.Provider, { value: Ae, children: [
669
+ /* @__PURE__ */ m(
670
+ Ue,
627
671
  {
628
- extensions: Re,
672
+ extensions: Ge,
629
673
  basicSetup: {
630
674
  lineNumbers: !1,
631
675
  syntaxHighlighting: !0,
@@ -634,52 +678,55 @@ const Ve = [], Ce = (C, f) => {
634
678
  foldGutter: !1
635
679
  },
636
680
  className: "rounded-md",
637
- placeholder: Se,
681
+ placeholder: Pe,
638
682
  value: C,
639
683
  theme: "light",
640
684
  minHeight: "2rem",
641
685
  editable: !n,
642
- onChange: ze,
643
- onBlur: _
686
+ onChange: We,
687
+ onBlur: Y
644
688
  }
645
689
  ),
646
- !n && /* @__PURE__ */ l.jsxs(
647
- We,
690
+ !n && /* @__PURE__ */ $(
691
+ ot,
648
692
  {
693
+ dir: B,
694
+ lang: z,
649
695
  labels: {
650
- title: I === m.Image ? i("dialogTitleImage") : I === m.Video ? i("dialogTitleVideo") : I === m.Variable ? i("dialogTitleVariable") : i("dialogTitle")
696
+ closeButtonLabel: a("dialogCloseLabel"),
697
+ title: S === f.Image ? a("dialogTitleImage") : S === f.Video ? a("dialogTitleVideo") : S === f.Variable ? a("dialogTitleVariable") : a("dialogTitle")
651
698
  },
652
699
  children: [
653
- I === m.Image && /* @__PURE__ */ l.jsx(
654
- Ke,
700
+ S === f.Image && /* @__PURE__ */ m(
701
+ st,
655
702
  {
656
- value: c?.value,
657
- onSelect: Ne,
658
- uploadProps: W
703
+ value: l?.value,
704
+ onSelect: qe,
705
+ uploadProps: Oe
659
706
  }
660
707
  ),
661
- I === m.Video && /* @__PURE__ */ l.jsx(
662
- Xe,
708
+ S === f.Video && /* @__PURE__ */ m(
709
+ lt,
663
710
  {
664
- value: c?.value,
665
- onSelect: Ae
711
+ value: l?.value,
712
+ onSelect: _e
666
713
  }
667
714
  )
668
715
  ]
669
716
  }
670
717
  ),
671
- !n && /* @__PURE__ */ l.jsx(Qe, { children: /* @__PURE__ */ l.jsx(
672
- Ze,
718
+ !n && /* @__PURE__ */ m(nt, { dir: B, lang: z, children: /* @__PURE__ */ m(
719
+ ct,
673
720
  {
674
- variables: ne,
675
- systemVariables: $,
676
- selectedName: c?.value?.variableName,
677
- onSelect: ce,
721
+ variables: ce,
722
+ systemVariables: q,
723
+ selectedName: l?.value?.variableName,
724
+ onSelect: ge,
678
725
  onAddVariable: (e) => {
679
- K((o) => {
726
+ oe((o) => {
680
727
  const r = e.name.toLowerCase();
681
728
  return o.some(
682
- (u) => u.name.toLowerCase() === r
729
+ (c) => c.name.toLowerCase() === r
683
730
  ) ? o : [e, ...o];
684
731
  });
685
732
  }
@@ -691,6 +738,6 @@ const Ve = [], Ce = (C, f) => {
691
738
  );
692
739
  };
693
740
  export {
694
- Mt as default
741
+ so as default
695
742
  };
696
743
  //# sourceMappingURL=MarkdownFlowEditor.es.js.map