markdown-flow-ui 0.2.13 → 0.2.15

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 (475) hide show
  1. package/README.md +7 -0
  2. package/dist/_virtual/index.es3.js +5 -4
  3. package/dist/_virtual/index.es3.js.map +1 -1
  4. package/dist/_virtual/index.es4.js +4 -5
  5. package/dist/_virtual/index.es4.js.map +1 -1
  6. package/dist/_virtual/index3.cjs +1 -1
  7. package/dist/_virtual/index4.cjs +1 -1
  8. package/dist/assets/markdown-flow-ui.css +10 -1
  9. package/dist/components/ContentRender/CodeBlock.cjs +1 -1
  10. package/dist/components/ContentRender/CodeBlock.cjs.map +1 -1
  11. package/dist/components/ContentRender/CodeBlock.d.ts +5 -0
  12. package/dist/components/ContentRender/CodeBlock.es.js +41 -38
  13. package/dist/components/ContentRender/CodeBlock.es.js.map +1 -1
  14. package/dist/components/ContentRender/ContentRender.cjs +2 -2
  15. package/dist/components/ContentRender/ContentRender.cjs.map +1 -1
  16. package/dist/components/ContentRender/ContentRender.d.ts +9 -4
  17. package/dist/components/ContentRender/ContentRender.es.js +389 -298
  18. package/dist/components/ContentRender/ContentRender.es.js.map +1 -1
  19. package/dist/components/ContentRender/IframeSandbox.cjs +7 -7
  20. package/dist/components/ContentRender/IframeSandbox.cjs.map +1 -1
  21. package/dist/components/ContentRender/IframeSandbox.d.ts +5 -1
  22. package/dist/components/ContentRender/IframeSandbox.es.js +311 -266
  23. package/dist/components/ContentRender/IframeSandbox.es.js.map +1 -1
  24. package/dist/components/ContentRender/MarkdownFlowInput.cjs +1 -1
  25. package/dist/components/ContentRender/MarkdownFlowInput.cjs.map +1 -1
  26. package/dist/components/ContentRender/MarkdownFlowInput.d.ts +5 -1
  27. package/dist/components/ContentRender/MarkdownFlowInput.es.js +37 -32
  28. package/dist/components/ContentRender/MarkdownFlowInput.es.js.map +1 -1
  29. package/dist/components/ContentRender/SandboxApp.cjs +2 -2
  30. package/dist/components/ContentRender/SandboxApp.cjs.map +1 -1
  31. package/dist/components/ContentRender/SandboxApp.d.ts +5 -1
  32. package/dist/components/ContentRender/SandboxApp.es.js +108 -103
  33. package/dist/components/ContentRender/SandboxApp.es.js.map +1 -1
  34. package/dist/components/ContentRender/blackboard-vendor.d.ts +1 -1
  35. package/dist/components/ContentRender/contentRenderI18n.cjs +1 -1
  36. package/dist/components/ContentRender/contentRenderI18n.cjs.map +1 -1
  37. package/dist/components/ContentRender/contentRenderI18n.d.ts +6 -1
  38. package/dist/components/ContentRender/contentRenderI18n.es.js +5 -56
  39. package/dist/components/ContentRender/contentRenderI18n.es.js.map +1 -1
  40. package/dist/components/ContentRender/contentRenderI18n.test.d.ts +1 -0
  41. package/dist/components/ContentRender/index.cjs +1 -1
  42. package/dist/components/ContentRender/index.d.ts +11 -11
  43. package/dist/components/ContentRender/index.es.js +1 -2
  44. package/dist/components/ContentRender/index.es.js.map +1 -1
  45. package/dist/components/ContentRender/locales/contentRender.json.cjs +2 -0
  46. package/dist/components/ContentRender/locales/contentRender.json.cjs.map +1 -0
  47. package/dist/components/ContentRender/locales/contentRender.json.d.ts +90 -0
  48. package/dist/components/ContentRender/locales/contentRender.json.es.js +11 -0
  49. package/dist/components/ContentRender/locales/contentRender.json.es.js.map +1 -0
  50. package/dist/components/ContentRender/plugins/CustomVariable.cjs +1 -1
  51. package/dist/components/ContentRender/plugins/CustomVariable.cjs.map +1 -1
  52. package/dist/components/ContentRender/plugins/CustomVariable.d.ts +7 -3
  53. package/dist/components/ContentRender/plugins/CustomVariable.es.js +165 -151
  54. package/dist/components/ContentRender/plugins/CustomVariable.es.js.map +1 -1
  55. package/dist/components/ContentRender/plugins/MermaidChart.cjs +1 -1
  56. package/dist/components/ContentRender/plugins/MermaidChart.cjs.map +1 -1
  57. package/dist/components/ContentRender/plugins/MermaidChart.d.ts +1 -0
  58. package/dist/components/ContentRender/plugins/MermaidChart.es.js +68 -44
  59. package/dist/components/ContentRender/plugins/MermaidChart.es.js.map +1 -1
  60. package/dist/components/MarkdownFlow/MarkdownFlow.cjs +1 -1
  61. package/dist/components/MarkdownFlow/MarkdownFlow.cjs.map +1 -1
  62. package/dist/components/MarkdownFlow/MarkdownFlow.d.ts +12 -4
  63. package/dist/components/MarkdownFlow/MarkdownFlow.es.js +51 -39
  64. package/dist/components/MarkdownFlow/MarkdownFlow.es.js.map +1 -1
  65. package/dist/components/MarkdownFlow/ScrollToBottomButton.cjs +1 -1
  66. package/dist/components/MarkdownFlow/ScrollToBottomButton.cjs.map +1 -1
  67. package/dist/components/MarkdownFlow/ScrollToBottomButton.d.ts +31 -1
  68. package/dist/components/MarkdownFlow/ScrollToBottomButton.es.js +46 -17
  69. package/dist/components/MarkdownFlow/ScrollToBottomButton.es.js.map +1 -1
  70. package/dist/components/MarkdownFlow/ScrollToBottomControl.cjs +2 -0
  71. package/dist/components/MarkdownFlow/ScrollToBottomControl.cjs.map +1 -0
  72. package/dist/components/MarkdownFlow/ScrollToBottomControl.d.ts +18 -0
  73. package/dist/components/MarkdownFlow/ScrollToBottomControl.es.js +47 -0
  74. package/dist/components/MarkdownFlow/ScrollToBottomControl.es.js.map +1 -0
  75. package/dist/components/MarkdownFlow/ScrollableMarkdownFlow.cjs +1 -1
  76. package/dist/components/MarkdownFlow/ScrollableMarkdownFlow.cjs.map +1 -1
  77. package/dist/components/MarkdownFlow/ScrollableMarkdownFlow.d.ts +1 -1
  78. package/dist/components/MarkdownFlow/ScrollableMarkdownFlow.es.js +33 -52
  79. package/dist/components/MarkdownFlow/ScrollableMarkdownFlow.es.js.map +1 -1
  80. package/dist/components/MarkdownFlow/index.cjs +1 -1
  81. package/dist/components/MarkdownFlow/index.d.ts +9 -6
  82. package/dist/components/MarkdownFlow/index.es.js +6 -6
  83. package/dist/components/MarkdownFlow/index.es.js.map +1 -1
  84. package/dist/components/MarkdownFlow/useScrollToBottom.cjs +1 -1
  85. package/dist/components/MarkdownFlow/useScrollToBottom.cjs.map +1 -1
  86. package/dist/components/MarkdownFlow/useScrollToBottom.d.ts +40 -8
  87. package/dist/components/MarkdownFlow/useScrollToBottom.es.js +352 -83
  88. package/dist/components/MarkdownFlow/useScrollToBottom.es.js.map +1 -1
  89. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.cjs +1 -1
  90. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.cjs.map +1 -1
  91. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.d.ts +5 -3
  92. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.es.js +371 -324
  93. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.es.js.map +1 -1
  94. package/dist/components/MarkdownFlowEditor/components/CustomDialog.cjs +1 -1
  95. package/dist/components/MarkdownFlowEditor/components/CustomDialog.cjs.map +1 -1
  96. package/dist/components/MarkdownFlowEditor/components/CustomDialog.d.ts +10 -0
  97. package/dist/components/MarkdownFlowEditor/components/CustomDialog.es.js +22 -19
  98. package/dist/components/MarkdownFlowEditor/components/CustomDialog.es.js.map +1 -1
  99. package/dist/components/MarkdownFlowEditor/components/CustomPopover.cjs +1 -1
  100. package/dist/components/MarkdownFlowEditor/components/CustomPopover.cjs.map +1 -1
  101. package/dist/components/MarkdownFlowEditor/components/CustomPopover.d.ts +8 -0
  102. package/dist/components/MarkdownFlowEditor/components/CustomPopover.es.js +19 -15
  103. package/dist/components/MarkdownFlowEditor/components/CustomPopover.es.js.map +1 -1
  104. package/dist/components/MarkdownFlowEditor/components/EditorToolbar.cjs +1 -1
  105. package/dist/components/MarkdownFlowEditor/components/EditorToolbar.cjs.map +1 -1
  106. package/dist/components/MarkdownFlowEditor/components/EditorToolbar.d.ts +4 -1
  107. package/dist/components/MarkdownFlowEditor/components/EditorToolbar.es.js +99 -93
  108. package/dist/components/MarkdownFlowEditor/components/EditorToolbar.es.js.map +1 -1
  109. package/dist/components/MarkdownFlowEditor/components/ImageInject.cjs +1 -1
  110. package/dist/components/MarkdownFlowEditor/components/ImageInject.cjs.map +1 -1
  111. package/dist/components/MarkdownFlowEditor/components/ImageInject.d.ts +1 -1
  112. package/dist/components/MarkdownFlowEditor/components/ImageInject.es.js +183 -182
  113. package/dist/components/MarkdownFlowEditor/components/ImageInject.es.js.map +1 -1
  114. package/dist/components/MarkdownFlowEditor/components/VariableSearchDropdown.cjs +1 -1
  115. package/dist/components/MarkdownFlowEditor/components/VariableSearchDropdown.cjs.map +1 -1
  116. package/dist/components/MarkdownFlowEditor/components/VariableSearchDropdown.d.ts +1 -1
  117. package/dist/components/MarkdownFlowEditor/components/VariableSearchDropdown.es.js +107 -103
  118. package/dist/components/MarkdownFlowEditor/components/VariableSearchDropdown.es.js.map +1 -1
  119. package/dist/components/MarkdownFlowEditor/components/VariableSelect.cjs +1 -1
  120. package/dist/components/MarkdownFlowEditor/components/VariableSelect.cjs.map +1 -1
  121. package/dist/components/MarkdownFlowEditor/components/VariableSelect.d.ts +1 -1
  122. package/dist/components/MarkdownFlowEditor/components/VariableSelect.es.js +106 -106
  123. package/dist/components/MarkdownFlowEditor/components/VariableSelect.es.js.map +1 -1
  124. package/dist/components/MarkdownFlowEditor/components/VideoInject.cjs +1 -1
  125. package/dist/components/MarkdownFlowEditor/components/VideoInject.cjs.map +1 -1
  126. package/dist/components/MarkdownFlowEditor/components/VideoInject.es.js +64 -63
  127. package/dist/components/MarkdownFlowEditor/components/VideoInject.es.js.map +1 -1
  128. package/dist/components/MarkdownFlowEditor/components/icons/ButtonIcon.cjs +1 -1
  129. package/dist/components/MarkdownFlowEditor/components/icons/ButtonIcon.cjs.map +1 -1
  130. package/dist/components/MarkdownFlowEditor/components/icons/ButtonIcon.es.js +13 -13
  131. package/dist/components/MarkdownFlowEditor/components/icons/ButtonIcon.es.js.map +1 -1
  132. package/dist/components/MarkdownFlowEditor/components/icons/SearchBracesIcon.cjs +1 -1
  133. package/dist/components/MarkdownFlowEditor/components/icons/SearchBracesIcon.cjs.map +1 -1
  134. package/dist/components/MarkdownFlowEditor/components/icons/SearchBracesIcon.es.js +12 -12
  135. package/dist/components/MarkdownFlowEditor/components/icons/SearchBracesIcon.es.js.map +1 -1
  136. package/dist/components/MarkdownFlowEditor/editor-context.d.ts +1 -1
  137. package/dist/components/MarkdownFlowEditor/editorI18n.cjs +1 -1
  138. package/dist/components/MarkdownFlowEditor/editorI18n.cjs.map +1 -1
  139. package/dist/components/MarkdownFlowEditor/editorI18n.d.ts +290 -0
  140. package/dist/components/MarkdownFlowEditor/editorI18n.es.js +12 -8
  141. package/dist/components/MarkdownFlowEditor/editorI18n.es.js.map +1 -1
  142. package/dist/components/MarkdownFlowEditor/editorI18n.test.d.ts +1 -0
  143. package/dist/components/MarkdownFlowEditor/index.d.ts +6 -6
  144. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.cjs +2 -0
  145. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.cjs.map +1 -0
  146. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.d.ts +72 -0
  147. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.es.js +140 -0
  148. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.es.js.map +1 -0
  149. package/dist/components/MarkdownFlowEditor/locales/en-US.json.cjs +1 -1
  150. package/dist/components/MarkdownFlowEditor/locales/en-US.json.d.ts +2 -0
  151. package/dist/components/MarkdownFlowEditor/locales/en-US.json.es.js +118 -114
  152. package/dist/components/MarkdownFlowEditor/locales/en-US.json.es.js.map +1 -1
  153. package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.cjs +1 -1
  154. package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.d.ts +2 -0
  155. package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.es.js +118 -114
  156. package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.es.js.map +1 -1
  157. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.cjs +2 -0
  158. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.cjs.map +1 -0
  159. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.d.ts +72 -0
  160. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.es.js +140 -0
  161. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.es.js.map +1 -0
  162. package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.cjs +1 -1
  163. package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.d.ts +2 -0
  164. package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.es.js +70 -66
  165. package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.es.js.map +1 -1
  166. package/dist/components/MarkdownFlowEditor/plugins/ImgPlaceholder.cjs +1 -1
  167. package/dist/components/MarkdownFlowEditor/plugins/ImgPlaceholder.cjs.map +1 -1
  168. package/dist/components/MarkdownFlowEditor/plugins/ImgPlaceholder.es.js +40 -35
  169. package/dist/components/MarkdownFlowEditor/plugins/ImgPlaceholder.es.js.map +1 -1
  170. package/dist/components/MarkdownFlowEditor/plugins/PlaceholderWidget.d.ts +1 -1
  171. package/dist/components/MarkdownFlowEditor/plugins/VideoPlaceholder.cjs +1 -1
  172. package/dist/components/MarkdownFlowEditor/plugins/VideoPlaceholder.cjs.map +1 -1
  173. package/dist/components/MarkdownFlowEditor/plugins/VideoPlaceholder.es.js +27 -23
  174. package/dist/components/MarkdownFlowEditor/plugins/VideoPlaceholder.es.js.map +1 -1
  175. package/dist/components/MarkdownFlowEditor/plugins/mediaPlaceholderLabels.cjs +2 -0
  176. package/dist/components/MarkdownFlowEditor/plugins/mediaPlaceholderLabels.cjs.map +1 -0
  177. package/dist/components/MarkdownFlowEditor/plugins/mediaPlaceholderLabels.d.ts +7 -0
  178. package/dist/components/MarkdownFlowEditor/plugins/mediaPlaceholderLabels.es.js +12 -0
  179. package/dist/components/MarkdownFlowEditor/plugins/mediaPlaceholderLabels.es.js.map +1 -0
  180. package/dist/components/MarkdownFlowEditor/utils.d.ts +1 -1
  181. package/dist/components/Slide/MarkdownSlideScaling.cjs +1 -1
  182. package/dist/components/Slide/MarkdownSlideScaling.cjs.map +1 -1
  183. package/dist/components/Slide/MarkdownSlideScaling.d.ts +1 -1
  184. package/dist/components/Slide/MarkdownSlideScaling.es.js +20 -20
  185. package/dist/components/Slide/MarkdownSlideScaling.es.js.map +1 -1
  186. package/dist/components/Slide/MobilePlayerSettingsSheet.cjs +1 -1
  187. package/dist/components/Slide/MobilePlayerSettingsSheet.cjs.map +1 -1
  188. package/dist/components/Slide/MobilePlayerSettingsSheet.d.ts +7 -2
  189. package/dist/components/Slide/MobilePlayerSettingsSheet.es.js +61 -57
  190. package/dist/components/Slide/MobilePlayerSettingsSheet.es.js.map +1 -1
  191. package/dist/components/Slide/Player.cjs +1 -1
  192. package/dist/components/Slide/Player.cjs.map +1 -1
  193. package/dist/components/Slide/Player.d.ts +6 -6
  194. package/dist/components/Slide/Player.es.js +547 -541
  195. package/dist/components/Slide/Player.es.js.map +1 -1
  196. package/dist/components/Slide/Slide.cjs +1 -1
  197. package/dist/components/Slide/Slide.cjs.map +1 -1
  198. package/dist/components/Slide/Slide.d.ts +14 -12
  199. package/dist/components/Slide/Slide.es.js +745 -726
  200. package/dist/components/Slide/Slide.es.js.map +1 -1
  201. package/dist/components/Slide/SubtitleOverlay.cjs +1 -1
  202. package/dist/components/Slide/SubtitleOverlay.cjs.map +1 -1
  203. package/dist/components/Slide/SubtitleOverlay.d.ts +2 -2
  204. package/dist/components/Slide/SubtitleOverlay.es.js +17 -17
  205. package/dist/components/Slide/SubtitleOverlay.es.js.map +1 -1
  206. package/dist/components/Slide/diff-utils.d.ts +1 -1
  207. package/dist/components/Slide/index.d.ts +12 -12
  208. package/dist/components/Slide/locales/slide.json.cjs +2 -0
  209. package/dist/components/Slide/locales/slide.json.cjs.map +1 -0
  210. package/dist/components/Slide/locales/slide.json.d.ts +205 -0
  211. package/dist/components/Slide/locales/slide.json.es.js +11 -0
  212. package/dist/components/Slide/locales/slide.json.es.js.map +1 -0
  213. package/dist/components/Slide/slideI18n.cjs +1 -1
  214. package/dist/components/Slide/slideI18n.cjs.map +1 -1
  215. package/dist/components/Slide/slideI18n.d.ts +6 -3
  216. package/dist/components/Slide/slideI18n.es.js +10 -155
  217. package/dist/components/Slide/slideI18n.es.js.map +1 -1
  218. package/dist/components/Slide/useSlide.d.ts +1 -1
  219. package/dist/components/Slide/utils/appendedMarkerAdvance.d.ts +1 -1
  220. package/dist/components/Slide/utils/audioSegments.d.ts +1 -1
  221. package/dist/components/Slide/utils/interactionResolution.d.ts +2 -2
  222. package/dist/components/Slide/utils/listenModeElementList.d.ts +2 -2
  223. package/dist/components/Slide/utils/markdownScaling.d.ts +1 -1
  224. package/dist/components/Slide/utils/playerCustomActions.d.ts +2 -2
  225. package/dist/components/Slide/utils/playerKeyboardShortcuts.cjs +1 -1
  226. package/dist/components/Slide/utils/playerKeyboardShortcuts.cjs.map +1 -1
  227. package/dist/components/Slide/utils/playerKeyboardShortcuts.d.ts +1 -1
  228. package/dist/components/Slide/utils/playerKeyboardShortcuts.es.js +20 -20
  229. package/dist/components/Slide/utils/playerKeyboardShortcuts.es.js.map +1 -1
  230. package/dist/components/Slide/utils/runStreamFixture.d.ts +1 -1
  231. package/dist/components/Slide/utils/segmentSeek.d.ts +1 -1
  232. package/dist/components/Slide/utils/silentStepAutoAdvance.d.ts +1 -1
  233. package/dist/components/Slide/utils/streamingNavigation.d.ts +1 -1
  234. package/dist/components/Slide/utils/subtitleCue.d.ts +1 -1
  235. package/dist/components/Slide/utils/subtitleJumpNavigation.d.ts +1 -1
  236. package/dist/components/index.d.ts +22 -18
  237. package/dist/components/ui/button.cjs +1 -1
  238. package/dist/components/ui/button.cjs.map +1 -1
  239. package/dist/components/ui/button.es.js +12 -13
  240. package/dist/components/ui/button.es.js.map +1 -1
  241. package/dist/components/ui/checkbox.cjs +1 -1
  242. package/dist/components/ui/checkbox.cjs.map +1 -1
  243. package/dist/components/ui/checkbox.es.js +35 -35
  244. package/dist/components/ui/checkbox.es.js.map +1 -1
  245. package/dist/components/ui/dialog.cjs +1 -1
  246. package/dist/components/ui/dialog.cjs.map +1 -1
  247. package/dist/components/ui/dialog.d.ts +5 -1
  248. package/dist/components/ui/dialog.es.js +37 -37
  249. package/dist/components/ui/dialog.es.js.map +1 -1
  250. package/dist/components/ui/input.cjs +1 -1
  251. package/dist/components/ui/input.cjs.map +1 -1
  252. package/dist/components/ui/input.es.js +4 -4
  253. package/dist/components/ui/input.es.js.map +1 -1
  254. package/dist/components/ui/inputGroup/button.cjs +1 -1
  255. package/dist/components/ui/inputGroup/button.cjs.map +1 -1
  256. package/dist/components/ui/inputGroup/button.es.js +9 -10
  257. package/dist/components/ui/inputGroup/button.es.js.map +1 -1
  258. package/dist/components/ui/inputGroup/input-group.cjs +1 -1
  259. package/dist/components/ui/inputGroup/input-group.cjs.map +1 -1
  260. package/dist/components/ui/inputGroup/input-group.d.ts +1 -1
  261. package/dist/components/ui/inputGroup/input-group.es.js +10 -10
  262. package/dist/components/ui/inputGroup/input-group.es.js.map +1 -1
  263. package/dist/components/ui/inputGroup/textarea.cjs +1 -1
  264. package/dist/components/ui/inputGroup/textarea.cjs.map +1 -1
  265. package/dist/components/ui/inputGroup/textarea.es.js +3 -3
  266. package/dist/components/ui/inputGroup/textarea.es.js.map +1 -1
  267. package/dist/components/ui/loading-overlay-card.cjs +2 -2
  268. package/dist/components/ui/loading-overlay-card.cjs.map +1 -1
  269. package/dist/components/ui/loading-overlay-card.es.js +11 -11
  270. package/dist/components/ui/loading-overlay-card.es.js.map +1 -1
  271. package/dist/components/ui/popover.cjs +1 -1
  272. package/dist/components/ui/popover.cjs.map +1 -1
  273. package/dist/components/ui/popover.es.js +6 -6
  274. package/dist/components/ui/popover.es.js.map +1 -1
  275. package/dist/components/ui/tooltip.cjs +1 -1
  276. package/dist/components/ui/tooltip.cjs.map +1 -1
  277. package/dist/components/ui/tooltip.es.js +16 -16
  278. package/dist/components/ui/tooltip.es.js.map +1 -1
  279. package/dist/editor.d.ts +2 -2
  280. package/dist/fonts/KaTeX_AMS-Regular.ttf +0 -0
  281. package/dist/fonts/KaTeX_AMS-Regular.woff +0 -0
  282. package/dist/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  283. package/dist/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
  284. package/dist/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
  285. package/dist/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  286. package/dist/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
  287. package/dist/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
  288. package/dist/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  289. package/dist/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
  290. package/dist/fonts/KaTeX_Fraktur-Bold.woff +0 -0
  291. package/dist/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  292. package/dist/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
  293. package/dist/fonts/KaTeX_Fraktur-Regular.woff +0 -0
  294. package/dist/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  295. package/dist/fonts/KaTeX_Main-Bold.ttf +0 -0
  296. package/dist/fonts/KaTeX_Main-Bold.woff +0 -0
  297. package/dist/fonts/KaTeX_Main-Bold.woff2 +0 -0
  298. package/dist/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
  299. package/dist/fonts/KaTeX_Main-BoldItalic.woff +0 -0
  300. package/dist/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  301. package/dist/fonts/KaTeX_Main-Italic.ttf +0 -0
  302. package/dist/fonts/KaTeX_Main-Italic.woff +0 -0
  303. package/dist/fonts/KaTeX_Main-Italic.woff2 +0 -0
  304. package/dist/fonts/KaTeX_Main-Regular.ttf +0 -0
  305. package/dist/fonts/KaTeX_Main-Regular.woff +0 -0
  306. package/dist/fonts/KaTeX_Main-Regular.woff2 +0 -0
  307. package/dist/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
  308. package/dist/fonts/KaTeX_Math-BoldItalic.woff +0 -0
  309. package/dist/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  310. package/dist/fonts/KaTeX_Math-Italic.ttf +0 -0
  311. package/dist/fonts/KaTeX_Math-Italic.woff +0 -0
  312. package/dist/fonts/KaTeX_Math-Italic.woff2 +0 -0
  313. package/dist/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
  314. package/dist/fonts/KaTeX_SansSerif-Bold.woff +0 -0
  315. package/dist/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  316. package/dist/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
  317. package/dist/fonts/KaTeX_SansSerif-Italic.woff +0 -0
  318. package/dist/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  319. package/dist/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
  320. package/dist/fonts/KaTeX_SansSerif-Regular.woff +0 -0
  321. package/dist/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  322. package/dist/fonts/KaTeX_Script-Regular.ttf +0 -0
  323. package/dist/fonts/KaTeX_Script-Regular.woff +0 -0
  324. package/dist/fonts/KaTeX_Script-Regular.woff2 +0 -0
  325. package/dist/fonts/KaTeX_Size1-Regular.ttf +0 -0
  326. package/dist/fonts/KaTeX_Size1-Regular.woff +0 -0
  327. package/dist/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  328. package/dist/fonts/KaTeX_Size2-Regular.ttf +0 -0
  329. package/dist/fonts/KaTeX_Size2-Regular.woff +0 -0
  330. package/dist/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  331. package/dist/fonts/KaTeX_Size3-Regular.ttf +0 -0
  332. package/dist/fonts/KaTeX_Size3-Regular.woff +0 -0
  333. package/dist/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  334. package/dist/fonts/KaTeX_Size4-Regular.ttf +0 -0
  335. package/dist/fonts/KaTeX_Size4-Regular.woff +0 -0
  336. package/dist/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  337. package/dist/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
  338. package/dist/fonts/KaTeX_Typewriter-Regular.woff +0 -0
  339. package/dist/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  340. package/dist/index.cjs +1 -1
  341. package/dist/index.d.ts +2 -2
  342. package/dist/index.es.js +22 -19
  343. package/dist/index.es.js.map +1 -1
  344. package/dist/lib/locale.cjs +1 -1
  345. package/dist/lib/locale.cjs.map +1 -1
  346. package/dist/lib/locale.d.ts +5 -1
  347. package/dist/lib/locale.es.js +26 -13
  348. package/dist/lib/locale.es.js.map +1 -1
  349. package/dist/lib/locale.test.d.ts +1 -0
  350. package/dist/lib/useDetachedLanguage.cjs +2 -0
  351. package/dist/lib/useDetachedLanguage.cjs.map +1 -0
  352. package/dist/lib/useDetachedLanguage.d.ts +3 -0
  353. package/dist/lib/useDetachedLanguage.es.js +25 -0
  354. package/dist/lib/useDetachedLanguage.es.js.map +1 -0
  355. package/dist/lib/useResolvedDirection.cjs +2 -0
  356. package/dist/lib/useResolvedDirection.cjs.map +1 -0
  357. package/dist/lib/useResolvedDirection.d.ts +6 -0
  358. package/dist/lib/useResolvedDirection.es.js +37 -0
  359. package/dist/lib/useResolvedDirection.es.js.map +1 -0
  360. package/dist/markdown-flow-ui-lib.css +1 -1
  361. package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs +1 -1
  362. package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs.map +1 -1
  363. package/dist/node_modules/@radix-ui/react-arrow/dist/index.es.js +6 -6
  364. package/dist/node_modules/@radix-ui/react-arrow/dist/index.es.js.map +1 -1
  365. package/dist/node_modules/@radix-ui/react-context/dist/index.cjs +1 -1
  366. package/dist/node_modules/@radix-ui/react-context/dist/index.cjs.map +1 -1
  367. package/dist/node_modules/@radix-ui/react-context/dist/index.es.js +21 -21
  368. package/dist/node_modules/@radix-ui/react-context/dist/index.es.js.map +1 -1
  369. package/dist/node_modules/@radix-ui/react-dialog/dist/index.cjs +2 -2
  370. package/dist/node_modules/@radix-ui/react-dialog/dist/index.cjs.map +1 -1
  371. package/dist/node_modules/@radix-ui/react-dialog/dist/index.es.js +100 -100
  372. package/dist/node_modules/@radix-ui/react-dialog/dist/index.es.js.map +1 -1
  373. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +1 -1
  374. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs.map +1 -1
  375. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.es.js +38 -38
  376. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.es.js.map +1 -1
  377. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +1 -1
  378. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs.map +1 -1
  379. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.es.js +9 -9
  380. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.es.js.map +1 -1
  381. package/dist/node_modules/@radix-ui/react-popover/dist/index.cjs +1 -1
  382. package/dist/node_modules/@radix-ui/react-popover/dist/index.cjs.map +1 -1
  383. package/dist/node_modules/@radix-ui/react-popover/dist/index.es.js +95 -95
  384. package/dist/node_modules/@radix-ui/react-popover/dist/index.es.js.map +1 -1
  385. package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs +1 -1
  386. package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs.map +1 -1
  387. package/dist/node_modules/@radix-ui/react-popper/dist/index.es.js +48 -48
  388. package/dist/node_modules/@radix-ui/react-popper/dist/index.es.js.map +1 -1
  389. package/dist/node_modules/@radix-ui/react-portal/dist/index.cjs +1 -1
  390. package/dist/node_modules/@radix-ui/react-portal/dist/index.cjs.map +1 -1
  391. package/dist/node_modules/@radix-ui/react-portal/dist/index.es.js +6 -6
  392. package/dist/node_modules/@radix-ui/react-portal/dist/index.es.js.map +1 -1
  393. package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs +1 -1
  394. package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -1
  395. package/dist/node_modules/@radix-ui/react-primitive/dist/index.es.js +9 -9
  396. package/dist/node_modules/@radix-ui/react-primitive/dist/index.es.js.map +1 -1
  397. package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs +1 -1
  398. package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -1
  399. package/dist/node_modules/@radix-ui/react-slot/dist/index.es.js +17 -17
  400. package/dist/node_modules/@radix-ui/react-slot/dist/index.es.js.map +1 -1
  401. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.cjs +1 -1
  402. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.cjs.map +1 -1
  403. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.es.js +100 -100
  404. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.es.js.map +1 -1
  405. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs +1 -1
  406. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs.map +1 -1
  407. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.es.js +6 -6
  408. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.es.js.map +1 -1
  409. package/dist/node_modules/@uiw/react-codemirror/esm/index.cjs +1 -1
  410. package/dist/node_modules/@uiw/react-codemirror/esm/index.cjs.map +1 -1
  411. package/dist/node_modules/@uiw/react-codemirror/esm/index.es.js +27 -27
  412. package/dist/node_modules/@uiw/react-codemirror/esm/index.es.js.map +1 -1
  413. package/dist/node_modules/lucide-react/dist/esm/icons/{chevron-down.cjs → chevrons-down.cjs} +2 -2
  414. package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-down.cjs.map +1 -0
  415. package/dist/node_modules/lucide-react/dist/esm/icons/{chevron-down.es.js → chevrons-down.es.js} +6 -3
  416. package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-down.es.js.map +1 -0
  417. package/dist/node_modules/rc-input/es/BaseInput.cjs +1 -1
  418. package/dist/node_modules/rc-input/es/BaseInput.es.js +1 -1
  419. package/dist/node_modules/rc-textarea/es/ResizableTextArea.cjs +1 -1
  420. package/dist/node_modules/rc-textarea/es/ResizableTextArea.es.js +1 -1
  421. package/dist/node_modules/rc-textarea/es/TextArea.cjs +1 -1
  422. package/dist/node_modules/rc-textarea/es/TextArea.es.js +1 -1
  423. package/dist/node_modules/rc-textarea/es/index.cjs +1 -1
  424. package/dist/node_modules/rc-textarea/es/index.es.js +1 -1
  425. package/dist/node_modules/react-markdown/lib/index.cjs +1 -1
  426. package/dist/node_modules/react-markdown/lib/index.cjs.map +1 -1
  427. package/dist/node_modules/react-markdown/lib/index.es.js +39 -39
  428. package/dist/node_modules/react-markdown/lib/index.es.js.map +1 -1
  429. package/dist/node_modules/remark-flow/dist/interaction-plugin-core.cjs +1 -1
  430. package/dist/node_modules/remark-flow/dist/interaction-plugin-core.es.js +1 -1
  431. package/dist/renderer.cjs +1 -1
  432. package/dist/renderer.d.ts +18 -17
  433. package/dist/renderer.es.js +20 -17
  434. package/dist/renderer.es.js.map +1 -1
  435. package/dist/scroll.cjs +2 -0
  436. package/dist/scroll.cjs.map +1 -0
  437. package/dist/scroll.d.ts +6 -0
  438. package/dist/scroll.es.js +9 -0
  439. package/dist/scroll.es.js.map +1 -0
  440. package/dist/slide.d.ts +3 -3
  441. package/package.json +13 -2
  442. package/dist/_virtual/jsx-runtime.cjs +0 -2
  443. package/dist/_virtual/jsx-runtime.cjs.map +0 -1
  444. package/dist/_virtual/jsx-runtime.es.js +0 -6
  445. package/dist/_virtual/jsx-runtime.es.js.map +0 -1
  446. package/dist/_virtual/jsx-runtime.es2.js +0 -5
  447. package/dist/_virtual/jsx-runtime.es2.js.map +0 -1
  448. package/dist/_virtual/jsx-runtime2.cjs +0 -2
  449. package/dist/_virtual/jsx-runtime2.cjs.map +0 -1
  450. package/dist/_virtual/react-jsx-runtime.development.cjs +0 -2
  451. package/dist/_virtual/react-jsx-runtime.development.cjs.map +0 -1
  452. package/dist/_virtual/react-jsx-runtime.development.es.js +0 -5
  453. package/dist/_virtual/react-jsx-runtime.development.es.js.map +0 -1
  454. package/dist/_virtual/react-jsx-runtime.production.cjs +0 -2
  455. package/dist/_virtual/react-jsx-runtime.production.cjs.map +0 -1
  456. package/dist/_virtual/react-jsx-runtime.production.es.js +0 -5
  457. package/dist/_virtual/react-jsx-runtime.production.es.js.map +0 -1
  458. package/dist/lib/localeTextMap.cjs +0 -2
  459. package/dist/lib/localeTextMap.cjs.map +0 -1
  460. package/dist/lib/localeTextMap.es.js +0 -5
  461. package/dist/lib/localeTextMap.es.js.map +0 -1
  462. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.cjs.map +0 -1
  463. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.es.js.map +0 -1
  464. package/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs +0 -24
  465. package/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs.map +0 -1
  466. package/dist/node_modules/react/cjs/react-jsx-runtime.development.es.js +0 -409
  467. package/dist/node_modules/react/cjs/react-jsx-runtime.development.es.js.map +0 -1
  468. package/dist/node_modules/react/cjs/react-jsx-runtime.production.cjs +0 -10
  469. package/dist/node_modules/react/cjs/react-jsx-runtime.production.cjs.map +0 -1
  470. package/dist/node_modules/react/cjs/react-jsx-runtime.production.es.js +0 -36
  471. package/dist/node_modules/react/cjs/react-jsx-runtime.production.es.js.map +0 -1
  472. package/dist/node_modules/react/jsx-runtime.cjs +0 -2
  473. package/dist/node_modules/react/jsx-runtime.cjs.map +0 -1
  474. package/dist/node_modules/react/jsx-runtime.es.js +0 -11
  475. package/dist/node_modules/react/jsx-runtime.es.js.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../_virtual/jsx-runtime.cjs"),u=require("../../ui/button.cjs"),b=require("../../ui/input.cjs"),r=require("react"),N=require("../editor-context.cjs"),o=require("../utils/video.cjs"),V=require("../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),P=({value:a,onSelect:c})=>{const{t:s}=V.useTranslation(),{setDialogOpen:d}=r.useContext(N.default),[x,h]=r.useState(a?.resourceTitle||""),[l,R]=r.useState(a?.resourceUrl||""),[i,U]=r.useState(""),m=r.useRef(null),p=r.useRef(""),[f,j]=r.useState(""),g=r.useCallback(e=>o.biliVideoUrlRegexp.test(e)||o.youtubeVideoUrlRegexp.test(e),[]),E=r.useCallback(e=>o.getVideoEmbedUrl(e),[]),T=r.useCallback(e=>o.biliVideoUrlRegexp.test(e)?s("videoDefaultTitleBilibili"):o.youtubeVideoUrlRegexp.test(e)?s("videoDefaultTitleYoutube"):s("videoDefaultTitle","Video Title"),[s]),y=()=>{if(j(""),!g(l)){j(s("videoInvalidUrl","Please enter a valid Bilibili or YouTube video URL"));return}const e=E(l);if(p.current===e){v();return}U(e),p.current=e},w=()=>{if(!i)return;const e=x.trim()||T(l);try{const n=new URL(l).toString();c({resourceUrl:n,resourceTitle:e})}catch(n){console.log("error",n),c({resourceUrl:l,resourceTitle:e})}d(!1)},C=()=>{d(!1)},v=()=>{m.current};return r.useEffect(()=>{i&&setTimeout(v,2e3)},[i]),t.jsxRuntimeExports.jsxs("div",{className:"space-y-6",children:[t.jsxRuntimeExports.jsxs("div",{className:"space-y-2",children:[t.jsxRuntimeExports.jsx("label",{className:"text-sm font-medium text-foreground",children:s("videoUrlLabel","URL")}),t.jsxRuntimeExports.jsxs("div",{className:"flex gap-2",children:[t.jsxRuntimeExports.jsx(b.Input,{type:"text",value:l,onChange:e=>R(e.target.value?.trim()),placeholder:s("videoUrlPlaceholder","Please enter Bilibili or YouTube video URL"),autoComplete:"off"}),t.jsxRuntimeExports.jsx(u.Button,{className:"h-8",variant:"outline",type:"button",onClick:y,children:s("videoRunButton","Preview")})]}),!!f&&t.jsxRuntimeExports.jsx("p",{className:"text-xs text-destructive",children:f})]}),t.jsxRuntimeExports.jsxs("div",{className:"space-y-2",children:[t.jsxRuntimeExports.jsx("label",{className:"text-sm font-medium text-foreground",children:s("videoTitleLabel","Title")}),t.jsxRuntimeExports.jsx(b.Input,{value:x,onChange:e=>h(e.target.value.slice(0,100)),placeholder:s("videoTitlePlaceholder","Video Title"),maxLength:100})]}),t.jsxRuntimeExports.jsx("div",{className:`aspect-video overflow-hidden rounded-lg border border-muted ${i?"":"bg-black text-white flex items-center justify-center"}`,children:i?t.jsxRuntimeExports.jsx("iframe",{ref:m,title:"video-preview",className:"w-full h-full border-0",src:i,allowFullScreen:!0,allow:"autoplay; encrypted-media"}):t.jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center gap-3 text-sm",children:[t.jsxRuntimeExports.jsx("span",{className:"flex h-12 w-12 items-center justify-center rounded-full border border-white/40 text-lg",children:"▶"}),t.jsxRuntimeExports.jsx("span",{className:"text-xs text-white/70",children:s("videoPreviewPlaceholder","Preview will appear here")})]})}),t.jsxRuntimeExports.jsxs("div",{className:"flex justify-end gap-2",children:[t.jsxRuntimeExports.jsx(u.Button,{type:"button",variant:"outline",onClick:C,children:s("videoCancelButton","Cancel")}),t.jsxRuntimeExports.jsx(u.Button,{type:"button",onClick:w,disabled:!i,children:s("videoUseVideoButton","Use Video")})]})]})};exports.default=P;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),a=require("../../ui/button.cjs"),p=require("../../ui/input.cjs"),r=require("react"),V=require("../editor-context.cjs"),o=require("../utils/video.cjs"),P=require("../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),k=({value:c,onSelect:u})=>{const{t:l}=P.useTranslation(),{setDialogOpen:d}=r.useContext(V.default),[x,U]=r.useState(c?.resourceTitle||""),[s,g]=r.useState(c?.resourceUrl||""),[i,j]=r.useState(""),f=r.useRef(null),m=r.useRef(""),[v,b]=r.useState(""),T=r.useCallback(e=>o.biliVideoUrlRegexp.test(e)||o.youtubeVideoUrlRegexp.test(e),[]),y=r.useCallback(e=>o.getVideoEmbedUrl(e),[]),R=r.useCallback(e=>o.biliVideoUrlRegexp.test(e)?l("videoDefaultTitleBilibili"):o.youtubeVideoUrlRegexp.test(e)?l("videoDefaultTitleYoutube"):l("videoDefaultTitle","Video Title"),[l]),w=()=>{if(b(""),!T(s)){b(l("videoInvalidUrl","Please enter a valid Bilibili or YouTube video URL"));return}const e=y(s);if(m.current===e){h();return}j(e),m.current=e},C=()=>{if(!i)return;const e=x.trim()||R(s);try{const n=new URL(s).toString();u({resourceUrl:n,resourceTitle:e})}catch(n){console.log("error",n),u({resourceUrl:s,resourceTitle:e})}d(!1)},N=()=>{d(!1)},h=()=>{f.current};return r.useEffect(()=>{i&&setTimeout(h,2e3)},[i]),t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium text-foreground",children:l("videoUrlLabel","URL")}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(p.Input,{type:"text",value:s,dir:"ltr",onChange:e=>g(e.target.value?.trim()),placeholder:l("videoUrlPlaceholder","Please enter Bilibili or YouTube video URL"),autoComplete:"off"}),t.jsx(a.Button,{className:"h-8",variant:"outline",type:"button",onClick:w,children:l("videoRunButton","Preview")})]}),!!v&&t.jsx("p",{className:"text-xs text-destructive",children:v})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium text-foreground",children:l("videoTitleLabel","Title")}),t.jsx(p.Input,{value:x,onChange:e=>U(e.target.value.slice(0,100)),placeholder:l("videoTitlePlaceholder","Video Title"),maxLength:100})]}),t.jsx("div",{className:`aspect-video overflow-hidden rounded-lg border border-muted ${i?"":"bg-black text-white flex items-center justify-center"}`,children:i?t.jsx("iframe",{ref:f,title:l("videoPreviewTitle"),className:"w-full h-full border-0",src:i,allowFullScreen:!0,allow:"autoplay; encrypted-media"}):t.jsxs("div",{className:"flex flex-col items-center gap-3 text-sm",children:[t.jsx("span",{className:"flex h-12 w-12 items-center justify-center rounded-full border border-white/40 text-lg",children:"▶"}),t.jsx("span",{className:"text-xs text-white/70",children:l("videoPreviewPlaceholder","Preview will appear here")})]})}),t.jsxs("div",{className:"flex justify-end gap-2",children:[t.jsx(a.Button,{type:"button",variant:"outline",onClick:N,children:l("videoCancelButton","Cancel")}),t.jsx(a.Button,{type:"button",onClick:C,disabled:!i,children:l("videoUseVideoButton","Use Video")})]})]})};exports.default=k;
2
2
  //# sourceMappingURL=VideoInject.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"VideoInject.cjs","sources":["../../../../src/components/MarkdownFlowEditor/components/VideoInject.tsx"],"sourcesContent":["import { Button } from \"../../ui/button\";\nimport { Input } from \"../../ui/input\";\nimport React, {\n useState,\n useRef,\n useEffect,\n useContext,\n useCallback,\n} from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport EditorContext from \"../editor-context\";\nimport {\n biliVideoUrlRegexp,\n youtubeVideoUrlRegexp,\n getVideoEmbedUrl,\n} from \"../utils/video\";\n\ntype VideoInjectProps = {\n value?: {\n resourceTitle?: string;\n resourceUrl?: string;\n };\n onSelect: ({\n resourceUrl,\n resourceTitle,\n }: {\n resourceUrl: string;\n resourceTitle: string;\n }) => void;\n};\n\nconst VideoInject: React.FC<VideoInjectProps> = ({ value, onSelect }) => {\n const { t } = useTranslation();\n const { setDialogOpen } = useContext(EditorContext);\n const [title, setTitle] = useState(value?.resourceTitle || \"\");\n const [inputUrl, setInputUrl] = useState<string>(value?.resourceUrl || \"\");\n const [embedUrl, setEmbedUrl] = useState(\"\");\n const iframeRef = useRef<HTMLIFrameElement>(null);\n const lastUrlRef = useRef(\"\");\n const [errorTips, setErrorTips] = useState(\"\");\n\n const isValidVideoUrl = useCallback((url: string) => {\n return biliVideoUrlRegexp.test(url) || youtubeVideoUrlRegexp.test(url);\n }, []);\n\n const generateEmbedUrl = useCallback((url: string) => {\n return getVideoEmbedUrl(url);\n }, []);\n\n const getDefaultTitleForUrl = useCallback(\n (url: string) => {\n if (biliVideoUrlRegexp.test(url)) {\n return t(\"videoDefaultTitleBilibili\");\n }\n if (youtubeVideoUrlRegexp.test(url)) {\n return t(\"videoDefaultTitleYoutube\");\n }\n return t(\"videoDefaultTitle\", \"Video Title\");\n },\n [t]\n );\n\n const handleRun = () => {\n setErrorTips(\"\");\n if (!isValidVideoUrl(inputUrl)) {\n setErrorTips(\n t(\n \"videoInvalidUrl\",\n \"Please enter a valid Bilibili or YouTube video URL\"\n )\n );\n return;\n }\n\n const newEmbedUrl = generateEmbedUrl(inputUrl);\n\n if (lastUrlRef.current === newEmbedUrl) {\n checkVideoPlayback();\n return;\n }\n\n setEmbedUrl(newEmbedUrl);\n lastUrlRef.current = newEmbedUrl;\n };\n\n const handleSelect = () => {\n if (!embedUrl) {\n return;\n }\n\n const finalTitle = title.trim() || getDefaultTitleForUrl(inputUrl);\n\n try {\n const normalizedUrl = new URL(inputUrl).toString();\n onSelect({\n resourceUrl: normalizedUrl,\n resourceTitle: finalTitle,\n });\n } catch (error) {\n console.log(\"error\", error);\n onSelect({ resourceUrl: inputUrl, resourceTitle: finalTitle });\n }\n setDialogOpen(false);\n };\n\n const handleCancel = () => {\n setDialogOpen(false);\n };\n\n const checkVideoPlayback = () => {\n if (!iframeRef.current) return;\n };\n\n useEffect(() => {\n if (embedUrl) {\n setTimeout(checkVideoPlayback, 2000);\n }\n }, [embedUrl]);\n\n return (\n <div className=\"space-y-6\">\n <div className=\"space-y-2\">\n <label className=\"text-sm font-medium text-foreground\">\n {t(\"videoUrlLabel\", \"URL\")}\n </label>\n <div className=\"flex gap-2\">\n <Input\n type=\"text\"\n value={inputUrl}\n onChange={(e) => setInputUrl(e.target.value?.trim())}\n placeholder={t(\n \"videoUrlPlaceholder\",\n \"Please enter Bilibili or YouTube video URL\"\n )}\n autoComplete=\"off\"\n />\n <Button\n className=\"h-8\"\n variant=\"outline\"\n type=\"button\"\n onClick={handleRun}\n >\n {t(\"videoRunButton\", \"Preview\")}\n </Button>\n </div>\n {!!errorTips && <p className=\"text-xs text-destructive\">{errorTips}</p>}\n </div>\n\n <div className=\"space-y-2\">\n <label className=\"text-sm font-medium text-foreground\">\n {t(\"videoTitleLabel\", \"Title\")}\n </label>\n <Input\n value={title}\n onChange={(e) => setTitle(e.target.value.slice(0, 100))}\n placeholder={t(\"videoTitlePlaceholder\", \"Video Title\")}\n maxLength={100}\n />\n </div>\n\n <div\n className={`aspect-video overflow-hidden rounded-lg border border-muted ${\n embedUrl ? \"\" : \"bg-black text-white flex items-center justify-center\"\n }`}\n >\n {embedUrl ? (\n <iframe\n ref={iframeRef}\n title=\"video-preview\"\n className=\"w-full h-full border-0\"\n src={embedUrl}\n allowFullScreen\n allow=\"autoplay; encrypted-media\"\n />\n ) : (\n <div className=\"flex flex-col items-center gap-3 text-sm\">\n <span className=\"flex h-12 w-12 items-center justify-center rounded-full border border-white/40 text-lg\">\n ▶\n </span>\n <span className=\"text-xs text-white/70\">\n {t(\"videoPreviewPlaceholder\", \"Preview will appear here\")}\n </span>\n </div>\n )}\n </div>\n\n <div className=\"flex justify-end gap-2\">\n <Button type=\"button\" variant=\"outline\" onClick={handleCancel}>\n {t(\"videoCancelButton\", \"Cancel\")}\n </Button>\n <Button type=\"button\" onClick={handleSelect} disabled={!embedUrl}>\n {t(\"videoUseVideoButton\", \"Use Video\")}\n </Button>\n </div>\n </div>\n );\n};\nexport default VideoInject;\n"],"names":["VideoInject","value","onSelect","t","useTranslation","setDialogOpen","useContext","EditorContext","title","setTitle","useState","inputUrl","setInputUrl","embedUrl","setEmbedUrl","iframeRef","useRef","lastUrlRef","errorTips","setErrorTips","isValidVideoUrl","useCallback","url","biliVideoUrlRegexp","youtubeVideoUrlRegexp","generateEmbedUrl","getVideoEmbedUrl","getDefaultTitleForUrl","handleRun","newEmbedUrl","checkVideoPlayback","handleSelect","finalTitle","normalizedUrl","error","handleCancel","useEffect","jsxs","jsx","Input","Button"],"mappings":"oYA+BMA,EAA0C,CAAC,CAAE,MAAAC,EAAO,SAAAC,KAAe,CACvE,KAAM,CAAE,EAAAC,CAAA,EAAMC,iBAAA,EACR,CAAE,cAAAC,CAAA,EAAkBC,EA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W,GAAA,CAAA,CACb,EACF,EAEAmC,EAAAA,kBAAAA,IAAC,MAAA,CACC,UAAW,+DACTzB,EAAW,GAAK,sDAClB,GAEC,SAAAA,EACCyB,EAAAA,kBAAAA,IAAC,SAAA,CACC,IAAKvB,EACL,MAAM,gBACN,UAAU,yBACV,IAAKF,EACL,gBAAe,GACf,MAAM,2BAAA,CAAA,EAGRwB,EAAAA,kBAAAA,KAAC,MAAA,CAAI,UAAU,2CACb,SAAA,CAAAC,EAAAA,kBAAAA,IAAC,OAAA,CAAK,UAAU,yFAAyF,SAAA,IAEzG,0BACC,OAAA,CAAK,UAAU,wBACb,SAAAnC,EAAE,0BAA2B,0BAA0B,CAAA,CAC1D,CAAA,CAAA,CACF,CAAA,CAAA,EAIJkC,EAAAA,kBAAAA,KAAC,MAAA,CAAI,UAAU,yBACb,SAAA,CAAAC,EAAAA,kBAAAA,IAACE,EAAAA,OAAA,CAAO,KAAK,SAAS,QAAQ,UAAU,QAASL,EAC9C,SAAAhC,EAAE,oBAAqB,QAAQ,CAAA,CAClC,EACAmC,EAAAA,kBAAAA,IAACE,EAAAA,OAAA,CAAO,KAAK,SAAS,QAAST,EAAc,SAAU,CAAClB,EACrD,SAAAV,EAAE,sBAAuB,WAAW,CAAA,CACvC,CAAA,CAAA,CACF,CAAA,EACF,CAEJ"}
1
+ {"version":3,"file":"VideoInject.cjs","sources":["../../../../src/components/MarkdownFlowEditor/components/VideoInject.tsx"],"sourcesContent":["import { Button } from \"../../ui/button\";\nimport { Input } from \"../../ui/input\";\nimport React, {\n useState,\n useRef,\n useEffect,\n useContext,\n useCallback,\n} from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport EditorContext from \"../editor-context\";\nimport {\n biliVideoUrlRegexp,\n youtubeVideoUrlRegexp,\n getVideoEmbedUrl,\n} from \"../utils/video\";\n\ntype VideoInjectProps = {\n value?: {\n resourceTitle?: string;\n resourceUrl?: string;\n };\n onSelect: ({\n resourceUrl,\n resourceTitle,\n }: {\n resourceUrl: string;\n resourceTitle: string;\n }) => void;\n};\n\nconst VideoInject: React.FC<VideoInjectProps> = ({ value, onSelect }) => {\n const { t } = useTranslation();\n const { setDialogOpen } = useContext(EditorContext);\n const [title, setTitle] = useState(value?.resourceTitle || \"\");\n const [inputUrl, setInputUrl] = useState<string>(value?.resourceUrl || \"\");\n const [embedUrl, setEmbedUrl] = useState(\"\");\n const iframeRef = useRef<HTMLIFrameElement>(null);\n const lastUrlRef = useRef(\"\");\n const [errorTips, setErrorTips] = useState(\"\");\n\n const isValidVideoUrl = useCallback((url: string) => {\n return biliVideoUrlRegexp.test(url) || youtubeVideoUrlRegexp.test(url);\n }, []);\n\n const generateEmbedUrl = useCallback((url: string) => {\n return getVideoEmbedUrl(url);\n }, []);\n\n const getDefaultTitleForUrl = useCallback(\n (url: string) => {\n if (biliVideoUrlRegexp.test(url)) {\n return t(\"videoDefaultTitleBilibili\");\n }\n if (youtubeVideoUrlRegexp.test(url)) {\n return t(\"videoDefaultTitleYoutube\");\n }\n return t(\"videoDefaultTitle\", \"Video Title\");\n },\n [t]\n );\n\n const handleRun = () => {\n setErrorTips(\"\");\n if (!isValidVideoUrl(inputUrl)) {\n setErrorTips(\n t(\n \"videoInvalidUrl\",\n \"Please enter a valid Bilibili or YouTube video URL\"\n )\n );\n return;\n }\n\n const newEmbedUrl = generateEmbedUrl(inputUrl);\n\n if (lastUrlRef.current === newEmbedUrl) {\n checkVideoPlayback();\n return;\n }\n\n setEmbedUrl(newEmbedUrl);\n lastUrlRef.current = newEmbedUrl;\n };\n\n const handleSelect = () => {\n if (!embedUrl) {\n return;\n }\n\n const finalTitle = title.trim() || getDefaultTitleForUrl(inputUrl);\n\n try {\n const normalizedUrl = new URL(inputUrl).toString();\n onSelect({\n resourceUrl: normalizedUrl,\n resourceTitle: finalTitle,\n });\n } catch (error) {\n console.log(\"error\", error);\n onSelect({ resourceUrl: inputUrl, resourceTitle: finalTitle });\n }\n setDialogOpen(false);\n };\n\n const handleCancel = () => {\n setDialogOpen(false);\n };\n\n const checkVideoPlayback = () => {\n if (!iframeRef.current) return;\n };\n\n useEffect(() => {\n if (embedUrl) {\n setTimeout(checkVideoPlayback, 2000);\n }\n }, [embedUrl]);\n\n return (\n <div className=\"space-y-6\">\n <div className=\"space-y-2\">\n <label className=\"text-sm font-medium text-foreground\">\n {t(\"videoUrlLabel\", \"URL\")}\n </label>\n <div className=\"flex gap-2\">\n <Input\n type=\"text\"\n value={inputUrl}\n dir=\"ltr\"\n onChange={(e) => setInputUrl(e.target.value?.trim())}\n placeholder={t(\n \"videoUrlPlaceholder\",\n \"Please enter Bilibili or YouTube video URL\"\n )}\n autoComplete=\"off\"\n />\n <Button\n className=\"h-8\"\n variant=\"outline\"\n type=\"button\"\n onClick={handleRun}\n >\n {t(\"videoRunButton\", \"Preview\")}\n </Button>\n </div>\n {!!errorTips && <p className=\"text-xs text-destructive\">{errorTips}</p>}\n </div>\n\n <div className=\"space-y-2\">\n <label className=\"text-sm font-medium text-foreground\">\n {t(\"videoTitleLabel\", \"Title\")}\n </label>\n <Input\n value={title}\n onChange={(e) => setTitle(e.target.value.slice(0, 100))}\n placeholder={t(\"videoTitlePlaceholder\", \"Video Title\")}\n maxLength={100}\n />\n </div>\n\n <div\n className={`aspect-video overflow-hidden rounded-lg border border-muted ${\n embedUrl ? \"\" : \"bg-black text-white flex items-center justify-center\"\n }`}\n >\n {embedUrl ? (\n <iframe\n ref={iframeRef}\n title={t(\"videoPreviewTitle\")}\n className=\"w-full h-full border-0\"\n src={embedUrl}\n allowFullScreen\n allow=\"autoplay; encrypted-media\"\n />\n ) : (\n <div className=\"flex flex-col items-center gap-3 text-sm\">\n <span className=\"flex h-12 w-12 items-center justify-center rounded-full border border-white/40 text-lg\">\n ▶\n </span>\n <span className=\"text-xs text-white/70\">\n {t(\"videoPreviewPlaceholder\", \"Preview will appear here\")}\n </span>\n </div>\n )}\n </div>\n\n <div className=\"flex justify-end gap-2\">\n <Button type=\"button\" variant=\"outline\" onClick={handleCancel}>\n {t(\"videoCancelButton\", \"Cancel\")}\n </Button>\n <Button type=\"button\" onClick={handleSelect} disabled={!embedUrl}>\n {t(\"videoUseVideoButton\", \"Use Video\")}\n </Button>\n </div>\n </div>\n );\n};\nexport default VideoInject;\n"],"names":["VideoInject","value","onSelect","t","useTranslation","setDialogOpen","useContext","EditorContext","title","setTitle","useState","inputUrl","setInputUrl","embedUrl","setEmbedUrl","iframeRef","useRef","lastUrlRef","errorTips","setErrorTips","isValidVideoUrl","useCallback","url","biliVideoUrlRegexp","youtubeVideoUrlRegexp","generateEmbedUrl","getVideoEmbedUrl","getDefaultTitleForUrl","handleRun","newEmbedUrl","checkVideoPlayback","handleSelect","finalTitle","normalizedUrl","error","handleCancel","useEffect","jsxs","jsx","Input","Button"],"mappings":"oXA+BMA,EAA0C,CAAC,CAAE,MAAAC,EAAO,SAAAC,KAAe,CACvE,KAAM,CAAE,EAAAC,CAAA,EAAMC,iBAAA,EACR,CAAE,cAAAC,CAAA,EAAkBC,EAAAA,WAAWC,SAAa,EAC5C,CAACC,EAAOC,CAAQ,EAAIC,EAAAA,SAAST,GAAO,eAAiB,EAAE,EACvD,CAACU,EAAUC,CAAW,EAAIF,EAAAA,SAAiBT,GAAO,aAAe,EAAE,EACnE,CAACY,EAAUC,CAAW,EAAIJ,EAAAA,SAAS,EAAE,EACrCK,EAAYC,EAAAA,OAA0B,IAAI,EAC1CC,EAAaD,EAAAA,OAAO,EAAE,EACtB,CAACE,EAAWC,CAAY,EAAIT,EAAAA,SAAS,EAAE,EAEvCU,EAAkBC,cAAaC,GAC5BC,EAAAA,mBAAmB,KAAKD,CAAG,GAAKE,EAAAA,sBAAsB,KAAKF,CAAG,EACpE,CAAA,CAAE,EAECG,EAAmBJ,cAAaC,GAC7BI,EAAAA,iBAAiBJ,CAAG,EAC1B,CAAA,CAAE,EAECK,EAAwBN,EAAAA,YAC3BC,GACKC,EAAAA,mBAAmB,KAAKD,CAAG,EACtBnB,EAAE,2BAA2B,EAElCq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AAK,SAAS,QAAST,EAAc,SAAU,CAAClB,EACrD,SAAAV,EAAE,sBAAuB,WAAW,CAAA,CACvC,CAAA,CAAA,CACF,CAAA,EACF,CAEJ"}
@@ -1,120 +1,121 @@
1
- import { j as t } from "../../../_virtual/jsx-runtime.es.js";
2
- import { Button as n } from "../../ui/button.es.js";
3
- import { Input as b } from "../../ui/input.es.js";
4
- import { useContext as k, useState as s, useRef as U, useCallback as a, useEffect as B } from "react";
5
- import L from "../editor-context.es.js";
6
- import { biliVideoUrlRegexp as j, youtubeVideoUrlRegexp as g, getVideoEmbedUrl as D } from "../utils/video.es.js";
7
- import { useTranslation as I } from "../../../node_modules/react-i18next/dist/es/useTranslation.es.js";
8
- const A = ({ value: c, onSelect: d }) => {
9
- const { t: r } = I(), { setDialogOpen: u } = k(L), [m, T] = s(c?.resourceTitle || ""), [i, w] = s(c?.resourceUrl || ""), [l, y] = s(""), f = U(null), x = U(""), [p, h] = s(""), N = a((e) => j.test(e) || g.test(e), []), C = a((e) => D(e), []), R = a(
10
- (e) => j.test(e) ? r("videoDefaultTitleBilibili") : g.test(e) ? r("videoDefaultTitleYoutube") : r("videoDefaultTitle", "Video Title"),
11
- [r]
12
- ), V = () => {
13
- if (h(""), !N(i)) {
14
- h(
15
- r(
1
+ import { jsxs as o, jsx as r } from "react/jsx-runtime";
2
+ import { Button as a } from "../../ui/button.es.js";
3
+ import { Input as U } from "../../ui/input.es.js";
4
+ import { useContext as L, useState as n, useRef as g, useCallback as c, useEffect as j } from "react";
5
+ import D from "../editor-context.es.js";
6
+ import { biliVideoUrlRegexp as T, youtubeVideoUrlRegexp as w, getVideoEmbedUrl as I } from "../utils/video.es.js";
7
+ import { useTranslation as S } from "../../../node_modules/react-i18next/dist/es/useTranslation.es.js";
8
+ const G = ({ value: d, onSelect: u }) => {
9
+ const { t } = S(), { setDialogOpen: m } = L(D), [f, y] = n(d?.resourceTitle || ""), [i, N] = n(d?.resourceUrl || ""), [l, C] = n(""), p = g(null), h = g(""), [v, b] = n(""), R = c((e) => T.test(e) || w.test(e), []), V = c((e) => I(e), []), P = c(
10
+ (e) => T.test(e) ? t("videoDefaultTitleBilibili") : w.test(e) ? t("videoDefaultTitleYoutube") : t("videoDefaultTitle", "Video Title"),
11
+ [t]
12
+ ), k = () => {
13
+ if (b(""), !R(i)) {
14
+ b(
15
+ t(
16
16
  "videoInvalidUrl",
17
17
  "Please enter a valid Bilibili or YouTube video URL"
18
18
  )
19
19
  );
20
20
  return;
21
21
  }
22
- const e = C(i);
23
- if (x.current === e) {
24
- v();
22
+ const e = V(i);
23
+ if (h.current === e) {
24
+ x();
25
25
  return;
26
26
  }
27
- y(e), x.current = e;
28
- }, P = () => {
27
+ C(e), h.current = e;
28
+ }, B = () => {
29
29
  if (!l)
30
30
  return;
31
- const e = m.trim() || R(i);
31
+ const e = f.trim() || P(i);
32
32
  try {
33
- const o = new URL(i).toString();
34
- d({
35
- resourceUrl: o,
33
+ const s = new URL(i).toString();
34
+ u({
35
+ resourceUrl: s,
36
36
  resourceTitle: e
37
37
  });
38
- } catch (o) {
39
- console.log("error", o), d({ resourceUrl: i, resourceTitle: e });
38
+ } catch (s) {
39
+ console.log("error", s), u({ resourceUrl: i, resourceTitle: e });
40
40
  }
41
- u(!1);
41
+ m(!1);
42
42
  }, E = () => {
43
- u(!1);
44
- }, v = () => {
45
- f.current;
43
+ m(!1);
44
+ }, x = () => {
45
+ p.current;
46
46
  };
47
- return B(() => {
48
- l && setTimeout(v, 2e3);
49
- }, [l]), /* @__PURE__ */ t.jsxs("div", { className: "space-y-6", children: [
50
- /* @__PURE__ */ t.jsxs("div", { className: "space-y-2", children: [
51
- /* @__PURE__ */ t.jsx("label", { className: "text-sm font-medium text-foreground", children: r("videoUrlLabel", "URL") }),
52
- /* @__PURE__ */ t.jsxs("div", { className: "flex gap-2", children: [
53
- /* @__PURE__ */ t.jsx(
54
- b,
47
+ return j(() => {
48
+ l && setTimeout(x, 2e3);
49
+ }, [l]), /* @__PURE__ */ o("div", { className: "space-y-6", children: [
50
+ /* @__PURE__ */ o("div", { className: "space-y-2", children: [
51
+ /* @__PURE__ */ r("label", { className: "text-sm font-medium text-foreground", children: t("videoUrlLabel", "URL") }),
52
+ /* @__PURE__ */ o("div", { className: "flex gap-2", children: [
53
+ /* @__PURE__ */ r(
54
+ U,
55
55
  {
56
56
  type: "text",
57
57
  value: i,
58
- onChange: (e) => w(e.target.value?.trim()),
59
- placeholder: r(
58
+ dir: "ltr",
59
+ onChange: (e) => N(e.target.value?.trim()),
60
+ placeholder: t(
60
61
  "videoUrlPlaceholder",
61
62
  "Please enter Bilibili or YouTube video URL"
62
63
  ),
63
64
  autoComplete: "off"
64
65
  }
65
66
  ),
66
- /* @__PURE__ */ t.jsx(
67
- n,
67
+ /* @__PURE__ */ r(
68
+ a,
68
69
  {
69
70
  className: "h-8",
70
71
  variant: "outline",
71
72
  type: "button",
72
- onClick: V,
73
- children: r("videoRunButton", "Preview")
73
+ onClick: k,
74
+ children: t("videoRunButton", "Preview")
74
75
  }
75
76
  )
76
77
  ] }),
77
- !!p && /* @__PURE__ */ t.jsx("p", { className: "text-xs text-destructive", children: p })
78
+ !!v && /* @__PURE__ */ r("p", { className: "text-xs text-destructive", children: v })
78
79
  ] }),
79
- /* @__PURE__ */ t.jsxs("div", { className: "space-y-2", children: [
80
- /* @__PURE__ */ t.jsx("label", { className: "text-sm font-medium text-foreground", children: r("videoTitleLabel", "Title") }),
81
- /* @__PURE__ */ t.jsx(
82
- b,
80
+ /* @__PURE__ */ o("div", { className: "space-y-2", children: [
81
+ /* @__PURE__ */ r("label", { className: "text-sm font-medium text-foreground", children: t("videoTitleLabel", "Title") }),
82
+ /* @__PURE__ */ r(
83
+ U,
83
84
  {
84
- value: m,
85
- onChange: (e) => T(e.target.value.slice(0, 100)),
86
- placeholder: r("videoTitlePlaceholder", "Video Title"),
85
+ value: f,
86
+ onChange: (e) => y(e.target.value.slice(0, 100)),
87
+ placeholder: t("videoTitlePlaceholder", "Video Title"),
87
88
  maxLength: 100
88
89
  }
89
90
  )
90
91
  ] }),
91
- /* @__PURE__ */ t.jsx(
92
+ /* @__PURE__ */ r(
92
93
  "div",
93
94
  {
94
95
  className: `aspect-video overflow-hidden rounded-lg border border-muted ${l ? "" : "bg-black text-white flex items-center justify-center"}`,
95
- children: l ? /* @__PURE__ */ t.jsx(
96
+ children: l ? /* @__PURE__ */ r(
96
97
  "iframe",
97
98
  {
98
- ref: f,
99
- title: "video-preview",
99
+ ref: p,
100
+ title: t("videoPreviewTitle"),
100
101
  className: "w-full h-full border-0",
101
102
  src: l,
102
103
  allowFullScreen: !0,
103
104
  allow: "autoplay; encrypted-media"
104
105
  }
105
- ) : /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col items-center gap-3 text-sm", children: [
106
- /* @__PURE__ */ t.jsx("span", { className: "flex h-12 w-12 items-center justify-center rounded-full border border-white/40 text-lg", children: "▶" }),
107
- /* @__PURE__ */ t.jsx("span", { className: "text-xs text-white/70", children: r("videoPreviewPlaceholder", "Preview will appear here") })
106
+ ) : /* @__PURE__ */ o("div", { className: "flex flex-col items-center gap-3 text-sm", children: [
107
+ /* @__PURE__ */ r("span", { className: "flex h-12 w-12 items-center justify-center rounded-full border border-white/40 text-lg", children: "▶" }),
108
+ /* @__PURE__ */ r("span", { className: "text-xs text-white/70", children: t("videoPreviewPlaceholder", "Preview will appear here") })
108
109
  ] })
109
110
  }
110
111
  ),
111
- /* @__PURE__ */ t.jsxs("div", { className: "flex justify-end gap-2", children: [
112
- /* @__PURE__ */ t.jsx(n, { type: "button", variant: "outline", onClick: E, children: r("videoCancelButton", "Cancel") }),
113
- /* @__PURE__ */ t.jsx(n, { type: "button", onClick: P, disabled: !l, children: r("videoUseVideoButton", "Use Video") })
112
+ /* @__PURE__ */ o("div", { className: "flex justify-end gap-2", children: [
113
+ /* @__PURE__ */ r(a, { type: "button", variant: "outline", onClick: E, children: t("videoCancelButton", "Cancel") }),
114
+ /* @__PURE__ */ r(a, { type: "button", onClick: B, disabled: !l, children: t("videoUseVideoButton", "Use Video") })
114
115
  ] })
115
116
  ] });
116
117
  };
117
118
  export {
118
- A as default
119
+ G as default
119
120
  };
120
121
  //# sourceMappingURL=VideoInject.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VideoInject.es.js","sources":["../../../../src/components/MarkdownFlowEditor/components/VideoInject.tsx"],"sourcesContent":["import { Button } from \"../../ui/button\";\nimport { Input } from \"../../ui/input\";\nimport React, {\n useState,\n useRef,\n useEffect,\n useContext,\n useCallback,\n} from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport EditorContext from \"../editor-context\";\nimport {\n biliVideoUrlRegexp,\n youtubeVideoUrlRegexp,\n getVideoEmbedUrl,\n} from \"../utils/video\";\n\ntype VideoInjectProps = {\n value?: {\n resourceTitle?: string;\n resourceUrl?: string;\n };\n onSelect: ({\n resourceUrl,\n resourceTitle,\n }: {\n resourceUrl: string;\n resourceTitle: string;\n }) => void;\n};\n\nconst VideoInject: React.FC<VideoInjectProps> = ({ value, onSelect }) => {\n const { t } = useTranslation();\n const { setDialogOpen } = useContext(EditorContext);\n const [title, setTitle] = useState(value?.resourceTitle || \"\");\n const [inputUrl, setInputUrl] = useState<string>(value?.resourceUrl || \"\");\n const [embedUrl, setEmbedUrl] = useState(\"\");\n const iframeRef = useRef<HTMLIFrameElement>(null);\n const lastUrlRef = useRef(\"\");\n const [errorTips, setErrorTips] = useState(\"\");\n\n const isValidVideoUrl = useCallback((url: string) => {\n return biliVideoUrlRegexp.test(url) || youtubeVideoUrlRegexp.test(url);\n }, []);\n\n const generateEmbedUrl = useCallback((url: string) => {\n return getVideoEmbedUrl(url);\n }, []);\n\n const getDefaultTitleForUrl = useCallback(\n (url: string) => {\n if (biliVideoUrlRegexp.test(url)) {\n return t(\"videoDefaultTitleBilibili\");\n }\n if (youtubeVideoUrlRegexp.test(url)) {\n return t(\"videoDefaultTitleYoutube\");\n }\n return t(\"videoDefaultTitle\", \"Video Title\");\n },\n [t]\n );\n\n const handleRun = () => {\n setErrorTips(\"\");\n if (!isValidVideoUrl(inputUrl)) {\n setErrorTips(\n t(\n \"videoInvalidUrl\",\n \"Please enter a valid Bilibili or YouTube video URL\"\n )\n );\n return;\n }\n\n const newEmbedUrl = generateEmbedUrl(inputUrl);\n\n if (lastUrlRef.current === newEmbedUrl) {\n checkVideoPlayback();\n return;\n }\n\n setEmbedUrl(newEmbedUrl);\n lastUrlRef.current = newEmbedUrl;\n };\n\n const handleSelect = () => {\n if (!embedUrl) {\n return;\n }\n\n const finalTitle = title.trim() || getDefaultTitleForUrl(inputUrl);\n\n try {\n const normalizedUrl = new URL(inputUrl).toString();\n onSelect({\n resourceUrl: normalizedUrl,\n resourceTitle: finalTitle,\n });\n } catch (error) {\n console.log(\"error\", error);\n onSelect({ resourceUrl: inputUrl, resourceTitle: finalTitle });\n }\n setDialogOpen(false);\n };\n\n const handleCancel = () => {\n setDialogOpen(false);\n };\n\n const checkVideoPlayback = () => {\n if (!iframeRef.current) return;\n };\n\n useEffect(() => {\n if (embedUrl) {\n setTimeout(checkVideoPlayback, 2000);\n }\n }, [embedUrl]);\n\n return (\n <div className=\"space-y-6\">\n <div className=\"space-y-2\">\n <label className=\"text-sm font-medium text-foreground\">\n {t(\"videoUrlLabel\", \"URL\")}\n </label>\n <div className=\"flex gap-2\">\n <Input\n type=\"text\"\n value={inputUrl}\n onChange={(e) => setInputUrl(e.target.value?.trim())}\n placeholder={t(\n \"videoUrlPlaceholder\",\n \"Please enter Bilibili or YouTube video URL\"\n )}\n autoComplete=\"off\"\n />\n <Button\n className=\"h-8\"\n variant=\"outline\"\n type=\"button\"\n onClick={handleRun}\n >\n {t(\"videoRunButton\", \"Preview\")}\n </Button>\n </div>\n {!!errorTips && <p className=\"text-xs text-destructive\">{errorTips}</p>}\n </div>\n\n <div className=\"space-y-2\">\n <label className=\"text-sm font-medium text-foreground\">\n {t(\"videoTitleLabel\", \"Title\")}\n </label>\n <Input\n value={title}\n onChange={(e) => setTitle(e.target.value.slice(0, 100))}\n placeholder={t(\"videoTitlePlaceholder\", \"Video Title\")}\n maxLength={100}\n />\n </div>\n\n <div\n className={`aspect-video overflow-hidden rounded-lg border border-muted ${\n embedUrl ? \"\" : \"bg-black text-white flex items-center justify-center\"\n }`}\n >\n {embedUrl ? (\n <iframe\n ref={iframeRef}\n title=\"video-preview\"\n className=\"w-full h-full border-0\"\n src={embedUrl}\n allowFullScreen\n allow=\"autoplay; encrypted-media\"\n />\n ) : (\n <div className=\"flex flex-col items-center gap-3 text-sm\">\n <span className=\"flex h-12 w-12 items-center justify-center rounded-full border border-white/40 text-lg\">\n ▶\n </span>\n <span className=\"text-xs text-white/70\">\n {t(\"videoPreviewPlaceholder\", \"Preview will appear here\")}\n </span>\n </div>\n )}\n </div>\n\n <div className=\"flex justify-end gap-2\">\n <Button type=\"button\" variant=\"outline\" onClick={handleCancel}>\n {t(\"videoCancelButton\", \"Cancel\")}\n </Button>\n <Button type=\"button\" onClick={handleSelect} disabled={!embedUrl}>\n {t(\"videoUseVideoButton\", \"Use Video\")}\n </Button>\n </div>\n </div>\n );\n};\nexport default VideoInject;\n"],"names":["VideoInject","value","onSelect","t","useTranslation","setDialogOpen","useContext","EditorContext","title","setTitle","useState","inputUrl","setInputUrl","embedUrl","setEmbedUrl","iframeRef","useRef","lastUrlRef","errorTips","setErrorTips","isValidVideoUrl","useCallback","url","biliVideoUrlRegexp","youtubeVideoUrlRegexp","generateEmbedUrl","getVideoEmbedUrl","getDefaultTitleForUrl","handleRun","newEmbedUrl","checkVideoPlayback","handleSelect","finalTitle","normalizedUrl","error","handleCancel","useEffect","jsxs","jsx","Input","Button"],"mappings":";;;;;;;AA+BA,MAAMA,IAA0C,CAAC,EAAE,OAAAC,GAAO,UAAAC,QAAe;AACvE,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACR,EAAE,eAAAC,EAAA,IAAkBC,EAAWC,CAAa,GAC5C,CAACC,GAAOC,CAAQ,IAAIC,EAAST,GAAO,iBA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,"file":"VideoInject.es.js","sources":["../../../../src/components/MarkdownFlowEditor/components/VideoInject.tsx"],"sourcesContent":["import { Button } from \"../../ui/button\";\nimport { Input } from \"../../ui/input\";\nimport React, {\n useState,\n useRef,\n useEffect,\n useContext,\n useCallback,\n} from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport EditorContext from \"../editor-context\";\nimport {\n biliVideoUrlRegexp,\n youtubeVideoUrlRegexp,\n getVideoEmbedUrl,\n} from \"../utils/video\";\n\ntype VideoInjectProps = {\n value?: {\n resourceTitle?: string;\n resourceUrl?: string;\n };\n onSelect: ({\n resourceUrl,\n resourceTitle,\n }: {\n resourceUrl: string;\n resourceTitle: string;\n }) => void;\n};\n\nconst VideoInject: React.FC<VideoInjectProps> = ({ value, onSelect }) => {\n const { t } = useTranslation();\n const { setDialogOpen } = useContext(EditorContext);\n const [title, setTitle] = useState(value?.resourceTitle || \"\");\n const [inputUrl, setInputUrl] = useState<string>(value?.resourceUrl || \"\");\n const [embedUrl, setEmbedUrl] = useState(\"\");\n const iframeRef = useRef<HTMLIFrameElement>(null);\n const lastUrlRef = useRef(\"\");\n const [errorTips, setErrorTips] = useState(\"\");\n\n const isValidVideoUrl = useCallback((url: string) => {\n return biliVideoUrlRegexp.test(url) || youtubeVideoUrlRegexp.test(url);\n }, []);\n\n const generateEmbedUrl = useCallback((url: string) => {\n return getVideoEmbedUrl(url);\n }, []);\n\n const getDefaultTitleForUrl = useCallback(\n (url: string) => {\n if (biliVideoUrlRegexp.test(url)) {\n return t(\"videoDefaultTitleBilibili\");\n }\n if (youtubeVideoUrlRegexp.test(url)) {\n return t(\"videoDefaultTitleYoutube\");\n }\n return t(\"videoDefaultTitle\", \"Video Title\");\n },\n [t]\n );\n\n const handleRun = () => {\n setErrorTips(\"\");\n if (!isValidVideoUrl(inputUrl)) {\n setErrorTips(\n t(\n \"videoInvalidUrl\",\n \"Please enter a valid Bilibili or YouTube video URL\"\n )\n );\n return;\n }\n\n const newEmbedUrl = generateEmbedUrl(inputUrl);\n\n if (lastUrlRef.current === newEmbedUrl) {\n checkVideoPlayback();\n return;\n }\n\n setEmbedUrl(newEmbedUrl);\n lastUrlRef.current = newEmbedUrl;\n };\n\n const handleSelect = () => {\n if (!embedUrl) {\n return;\n }\n\n const finalTitle = title.trim() || getDefaultTitleForUrl(inputUrl);\n\n try {\n const normalizedUrl = new URL(inputUrl).toString();\n onSelect({\n resourceUrl: normalizedUrl,\n resourceTitle: finalTitle,\n });\n } catch (error) {\n console.log(\"error\", error);\n onSelect({ resourceUrl: inputUrl, resourceTitle: finalTitle });\n }\n setDialogOpen(false);\n };\n\n const handleCancel = () => {\n setDialogOpen(false);\n };\n\n const checkVideoPlayback = () => {\n if (!iframeRef.current) return;\n };\n\n useEffect(() => {\n if (embedUrl) {\n setTimeout(checkVideoPlayback, 2000);\n }\n }, [embedUrl]);\n\n return (\n <div className=\"space-y-6\">\n <div className=\"space-y-2\">\n <label className=\"text-sm font-medium text-foreground\">\n {t(\"videoUrlLabel\", \"URL\")}\n </label>\n <div className=\"flex gap-2\">\n <Input\n type=\"text\"\n value={inputUrl}\n dir=\"ltr\"\n onChange={(e) => setInputUrl(e.target.value?.trim())}\n placeholder={t(\n \"videoUrlPlaceholder\",\n \"Please enter Bilibili or YouTube video URL\"\n )}\n autoComplete=\"off\"\n />\n <Button\n className=\"h-8\"\n variant=\"outline\"\n type=\"button\"\n onClick={handleRun}\n >\n {t(\"videoRunButton\", \"Preview\")}\n </Button>\n </div>\n {!!errorTips && <p className=\"text-xs text-destructive\">{errorTips}</p>}\n </div>\n\n <div className=\"space-y-2\">\n <label className=\"text-sm font-medium text-foreground\">\n {t(\"videoTitleLabel\", \"Title\")}\n </label>\n <Input\n value={title}\n onChange={(e) => setTitle(e.target.value.slice(0, 100))}\n placeholder={t(\"videoTitlePlaceholder\", \"Video Title\")}\n maxLength={100}\n />\n </div>\n\n <div\n className={`aspect-video overflow-hidden rounded-lg border border-muted ${\n embedUrl ? \"\" : \"bg-black text-white flex items-center justify-center\"\n }`}\n >\n {embedUrl ? (\n <iframe\n ref={iframeRef}\n title={t(\"videoPreviewTitle\")}\n className=\"w-full h-full border-0\"\n src={embedUrl}\n allowFullScreen\n allow=\"autoplay; encrypted-media\"\n />\n ) : (\n <div className=\"flex flex-col items-center gap-3 text-sm\">\n <span className=\"flex h-12 w-12 items-center justify-center rounded-full border border-white/40 text-lg\">\n ▶\n </span>\n <span className=\"text-xs text-white/70\">\n {t(\"videoPreviewPlaceholder\", \"Preview will appear here\")}\n </span>\n </div>\n )}\n </div>\n\n <div className=\"flex justify-end gap-2\">\n <Button type=\"button\" variant=\"outline\" onClick={handleCancel}>\n {t(\"videoCancelButton\", \"Cancel\")}\n </Button>\n <Button type=\"button\" onClick={handleSelect} disabled={!embedUrl}>\n {t(\"videoUseVideoButton\", \"Use Video\")}\n </Button>\n </div>\n </div>\n );\n};\nexport default VideoInject;\n"],"names":["VideoInject","value","onSelect","useTranslation","setDialogOpen","useContext","EditorContext","title","setTitle","useState","inputUrl","setInputUrl","embedUrl","setEmbedUrl","iframeRef","useRef","lastUrlRef","errorTips","setErrorTips","isValidVideoUrl","useCallback","url","biliVideoUrlRegexp","youtubeVideoUrlRegexp","generateEmbedUrl","getVideoEmbedUrl","getDefaultTitleForUrl","handleRun","newEmbedUrl","checkVideoPlayback","handleSelect","finalTitle","normalizedUrl","error","handleCancel","useEffect","jsxs","jsx","Input","Button"],"mappings":";;;;;;;AA+BA,MAAMA,IAA0C,CAAC,EAAE,OAAAC,GAAO,UAAAC,QAAe;AACvE,QAAM,EAAE,EAAA,IAAMC,EAAA,GACR,EAAE,eAAAC,EAAA,IAAkBC,EAAWC,CAAa,GAC5C,CAACC,GAAOC,CAAQ,IAAIC,EAASR,GAAO,iBAAiB,EAAE,GACvD,CAACS,GAAUC,CAAW,IAAIF,EAAiBR,GAAO,eAAe,EAAE,GACnE,CAACW,GAAUC,CAAW,IAAIJ,EAAS,EAAE,GACrCK,IAAYC,EAA0B,IAAI,GAC1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AAyB,aAAa;AAAA,UACrD,WAAW;AAAA,QAAA;AAAA,MAAA;AAAA,IACb,GACF;AAAA,IAEA,gBAAA6B;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAW,+DACTzB,IAAW,KAAK,sDAClB;AAAA,QAEC,UAAAA,IACC,gBAAAyB;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,KAAKvB;AAAA,YACL,OAAO,EAAE,mBAAmB;AAAA,YAC5B,WAAU;AAAA,YACV,KAAKF;AAAA,YACL,iBAAe;AAAA,YACf,OAAM;AAAA,UAAA;AAAA,QAAA,IAGR,gBAAAwB,EAAC,OAAA,EAAI,WAAU,4CACb,UAAA;AAAA,UAAA,gBAAAC,EAAC,QAAA,EAAK,WAAU,0FAAyF,UAAA,KAEzG;AAAA,4BACC,QAAA,EAAK,WAAU,yBACb,UAAA,EAAE,2BAA2B,0BAA0B,EAAA,CAC1D;AAAA,QAAA,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,IAIJ,gBAAAD,EAAC,OAAA,EAAI,WAAU,0BACb,UAAA;AAAA,MAAA,gBAAAC,EAACE,GAAA,EAAO,MAAK,UAAS,SAAQ,WAAU,SAASL,GAC9C,UAAA,EAAE,qBAAqB,QAAQ,EAAA,CAClC;AAAA,MACA,gBAAAG,EAACE,GAAA,EAAO,MAAK,UAAS,SAAST,GAAc,UAAU,CAAClB,GACrD,UAAA,EAAE,uBAAuB,WAAW,EAAA,CACvC;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../../_virtual/jsx-runtime.cjs"),u=require("react"),i=require("../../../../lib/utils.cjs"),a=u.forwardRef(({className:s,size:e=18,...o},r)=>t.jsxRuntimeExports.jsxs("svg",{ref:r,xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 1024 1024",fill:"currentColor",className:i.cn("lucide lucide-button-icon",s),...o,children:[t.jsxRuntimeExports.jsx("path",{d:"M389.12 671.36a90.24 90.24 0 0 0 37.76-80 90.24 90.24 0 0 0-18.56-58.88 88.32 88.32 0 0 0-54.4-28.8 90.24 90.24 0 0 0 42.24-29.44 85.76 85.76 0 0 0 15.36-51.84 82.56 82.56 0 0 0-28.8-64 124.16 124.16 0 0 0-83.2-24.96H134.4v360.96h165.12a161.28 161.28 0 0 0 89.6-23.04ZM192 376.96h96a87.68 87.68 0 0 1 53.76 12.8 45.44 45.44 0 0 1 16.64 39.04 53.12 53.12 0 0 1-16.64 42.88 94.08 94.08 0 0 1-55.04 12.8H192Zm0 270.08V529.92h101.76a95.36 95.36 0 0 1 58.24 14.08 54.4 54.4 0 0 1 19.2 46.72 49.28 49.28 0 0 1-24.32 45.44 118.4 118.4 0 0 1-55.04 10.88ZM503.04 627.2a71.68 71.68 0 0 0 14.08 48 64 64 0 0 0 49.28 17.28h42.88v-44.16H576a22.4 22.4 0 0 1-14.72-5.12 28.16 28.16 0 0 1-4.48-16V475.52h60.16v-44.16h-60.8V346.24l-53.12 22.4v64H454.4v44.16h48.64ZM712.96 535.04a78.72 78.72 0 0 1 21.76-49.92 55.04 55.04 0 0 1 39.68-16c40.96 0 64 22.4 64 64v156.8h53.76V531.2c0-71.68-33.28-107.52-97.92-107.52a93.44 93.44 0 0 0-44.16 10.24 114.56 114.56 0 0 0-34.56 29.44v-32h-56.32v261.12h53.76Z"}),t.jsxRuntimeExports.jsx("path",{d:"M102.4 870.4h819.2A102.4 102.4 0 0 0 1024 768V256a102.4 102.4 0 0 0-102.4-102.4H102.4A102.4 102.4 0 0 0 0 256v512a102.4 102.4 0 0 0 102.4 102.4ZM64 256a38.4 38.4 0 0 1 38.4-38.4h819.2a38.4 38.4 0 0 1 38.4 38.4v512a38.4 38.4 0 0 1-38.4 38.4H102.4A38.4 38.4 0 0 1 64 768Z"})]}));a.displayName="ButtonIcon";exports.default=a;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),c=require("react"),r=require("../../../../lib/utils.cjs"),a=c.forwardRef(({className:o,size:t=18,...h},s)=>e.jsxs("svg",{ref:s,xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 1024 1024",fill:"currentColor",className:r.cn("lucide lucide-button-icon",o),...h,children:[e.jsx("path",{d:"M389.12 671.36a90.24 90.24 0 0 0 37.76-80 90.24 90.24 0 0 0-18.56-58.88 88.32 88.32 0 0 0-54.4-28.8 90.24 90.24 0 0 0 42.24-29.44 85.76 85.76 0 0 0 15.36-51.84 82.56 82.56 0 0 0-28.8-64 124.16 124.16 0 0 0-83.2-24.96H134.4v360.96h165.12a161.28 161.28 0 0 0 89.6-23.04ZM192 376.96h96a87.68 87.68 0 0 1 53.76 12.8 45.44 45.44 0 0 1 16.64 39.04 53.12 53.12 0 0 1-16.64 42.88 94.08 94.08 0 0 1-55.04 12.8H192Zm0 270.08V529.92h101.76a95.36 95.36 0 0 1 58.24 14.08 54.4 54.4 0 0 1 19.2 46.72 49.28 49.28 0 0 1-24.32 45.44 118.4 118.4 0 0 1-55.04 10.88ZM503.04 627.2a71.68 71.68 0 0 0 14.08 48 64 64 0 0 0 49.28 17.28h42.88v-44.16H576a22.4 22.4 0 0 1-14.72-5.12 28.16 28.16 0 0 1-4.48-16V475.52h60.16v-44.16h-60.8V346.24l-53.12 22.4v64H454.4v44.16h48.64ZM712.96 535.04a78.72 78.72 0 0 1 21.76-49.92 55.04 55.04 0 0 1 39.68-16c40.96 0 64 22.4 64 64v156.8h53.76V531.2c0-71.68-33.28-107.52-97.92-107.52a93.44 93.44 0 0 0-44.16 10.24 114.56 114.56 0 0 0-34.56 29.44v-32h-56.32v261.12h53.76Z"}),e.jsx("path",{d:"M102.4 870.4h819.2A102.4 102.4 0 0 0 1024 768V256a102.4 102.4 0 0 0-102.4-102.4H102.4A102.4 102.4 0 0 0 0 256v512a102.4 102.4 0 0 0 102.4 102.4ZM64 256a38.4 38.4 0 0 1 38.4-38.4h819.2a38.4 38.4 0 0 1 38.4 38.4v512a38.4 38.4 0 0 1-38.4 38.4H102.4A38.4 38.4 0 0 1 64 768Z"})]}));a.displayName="ButtonIcon";exports.default=a;
2
2
  //# sourceMappingURL=ButtonIcon.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonIcon.cjs","sources":["../../../../../src/components/MarkdownFlowEditor/components/icons/ButtonIcon.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { LucideProps } from \"lucide-react\";\nimport { cn } from \"../../../../lib/utils\";\n\nconst ButtonIcon = forwardRef<SVGSVGElement, LucideProps>(\n ({ className, size = 18, ...props }, ref) => (\n <svg\n ref={ref}\n xmlns=\"http://www.w3.org/2000/svg\"\n width={size}\n height={size}\n viewBox=\"0 0 1024 1024\"\n fill=\"currentColor\"\n className={cn(\"lucide lucide-button-icon\", className)}\n {...props}\n >\n <path d=\"M389.12 671.36a90.24 90.24 0 0 0 37.76-80 90.24 90.24 0 0 0-18.56-58.88 88.32 88.32 0 0 0-54.4-28.8 90.24 90.24 0 0 0 42.24-29.44 85.76 85.76 0 0 0 15.36-51.84 82.56 82.56 0 0 0-28.8-64 124.16 124.16 0 0 0-83.2-24.96H134.4v360.96h165.12a161.28 161.28 0 0 0 89.6-23.04ZM192 376.96h96a87.68 87.68 0 0 1 53.76 12.8 45.44 45.44 0 0 1 16.64 39.04 53.12 53.12 0 0 1-16.64 42.88 94.08 94.08 0 0 1-55.04 12.8H192Zm0 270.08V529.92h101.76a95.36 95.36 0 0 1 58.24 14.08 54.4 54.4 0 0 1 19.2 46.72 49.28 49.28 0 0 1-24.32 45.44 118.4 118.4 0 0 1-55.04 10.88ZM503.04 627.2a71.68 71.68 0 0 0 14.08 48 64 64 0 0 0 49.28 17.28h42.88v-44.16H576a22.4 22.4 0 0 1-14.72-5.12 28.16 28.16 0 0 1-4.48-16V475.52h60.16v-44.16h-60.8V346.24l-53.12 22.4v64H454.4v44.16h48.64ZM712.96 535.04a78.72 78.72 0 0 1 21.76-49.92 55.04 55.04 0 0 1 39.68-16c40.96 0 64 22.4 64 64v156.8h53.76V531.2c0-71.68-33.28-107.52-97.92-107.52a93.44 93.44 0 0 0-44.16 10.24 114.56 114.56 0 0 0-34.56 29.44v-32h-56.32v261.12h53.76Z\" />\n <path d=\"M102.4 870.4h819.2A102.4 102.4 0 0 0 1024 768V256a102.4 102.4 0 0 0-102.4-102.4H102.4A102.4 102.4 0 0 0 0 256v512a102.4 102.4 0 0 0 102.4 102.4ZM64 256a38.4 38.4 0 0 1 38.4-38.4h819.2a38.4 38.4 0 0 1 38.4 38.4v512a38.4 38.4 0 0 1-38.4 38.4H102.4A38.4 38.4 0 0 1 64 768Z\" />\n </svg>\n )\n);\n\nButtonIcon.displayName = \"ButtonIcon\";\n\nexport default ButtonIcon;\n"],"names":["ButtonIcon","forwardRef","className","size","props","ref","jsxs","cn","jsx"],"mappings":"8NAIMA,EAAaC,EAAAA,WACjB,CAAC,CAAE,UAAAC,EAAW,KAAAC,EAAO,GAAI,GAAGC,CAAA,EAASC,IACnCC,EAAAA,kBAAAA,KAAC,MAAA,CACC,IAAAD,EACA,MAAM,6BACN,MAAOF,EACP,OAAQA,EACR,QAAQ,gBACR,KAAK,eACL,UAAWI,EAAAA,GAAG,4BAA6BL,CAAS,EACnD,GAAGE,EAEJ,SAAA,CAAAI,EAAAA,kBAAAA,IAAC,OAAA,CAAK,EAAE,q9BAAA,CAAs9B,EAC99BA,EAAAA,kBAAAA,IAAC,OAAA,CAAK,EAAE,+QAAA,CAAgR,CAAA,CAAA,CAAA,CAG9R,EAEAR,EAAW,YAAc"}
1
+ {"version":3,"file":"ButtonIcon.cjs","sources":["../../../../../src/components/MarkdownFlowEditor/components/icons/ButtonIcon.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { LucideProps } from \"lucide-react\";\nimport { cn } from \"../../../../lib/utils\";\n\nconst ButtonIcon = forwardRef<SVGSVGElement, LucideProps>(\n ({ className, size = 18, ...props }, ref) => (\n <svg\n ref={ref}\n xmlns=\"http://www.w3.org/2000/svg\"\n width={size}\n height={size}\n viewBox=\"0 0 1024 1024\"\n fill=\"currentColor\"\n className={cn(\"lucide lucide-button-icon\", className)}\n {...props}\n >\n <path d=\"M389.12 671.36a90.24 90.24 0 0 0 37.76-80 90.24 90.24 0 0 0-18.56-58.88 88.32 88.32 0 0 0-54.4-28.8 90.24 90.24 0 0 0 42.24-29.44 85.76 85.76 0 0 0 15.36-51.84 82.56 82.56 0 0 0-28.8-64 124.16 124.16 0 0 0-83.2-24.96H134.4v360.96h165.12a161.28 161.28 0 0 0 89.6-23.04ZM192 376.96h96a87.68 87.68 0 0 1 53.76 12.8 45.44 45.44 0 0 1 16.64 39.04 53.12 53.12 0 0 1-16.64 42.88 94.08 94.08 0 0 1-55.04 12.8H192Zm0 270.08V529.92h101.76a95.36 95.36 0 0 1 58.24 14.08 54.4 54.4 0 0 1 19.2 46.72 49.28 49.28 0 0 1-24.32 45.44 118.4 118.4 0 0 1-55.04 10.88ZM503.04 627.2a71.68 71.68 0 0 0 14.08 48 64 64 0 0 0 49.28 17.28h42.88v-44.16H576a22.4 22.4 0 0 1-14.72-5.12 28.16 28.16 0 0 1-4.48-16V475.52h60.16v-44.16h-60.8V346.24l-53.12 22.4v64H454.4v44.16h48.64ZM712.96 535.04a78.72 78.72 0 0 1 21.76-49.92 55.04 55.04 0 0 1 39.68-16c40.96 0 64 22.4 64 64v156.8h53.76V531.2c0-71.68-33.28-107.52-97.92-107.52a93.44 93.44 0 0 0-44.16 10.24 114.56 114.56 0 0 0-34.56 29.44v-32h-56.32v261.12h53.76Z\" />\n <path d=\"M102.4 870.4h819.2A102.4 102.4 0 0 0 1024 768V256a102.4 102.4 0 0 0-102.4-102.4H102.4A102.4 102.4 0 0 0 0 256v512a102.4 102.4 0 0 0 102.4 102.4ZM64 256a38.4 38.4 0 0 1 38.4-38.4h819.2a38.4 38.4 0 0 1 38.4 38.4v512a38.4 38.4 0 0 1-38.4 38.4H102.4A38.4 38.4 0 0 1 64 768Z\" />\n </svg>\n )\n);\n\nButtonIcon.displayName = \"ButtonIcon\";\n\nexport default ButtonIcon;\n"],"names":["ButtonIcon","forwardRef","className","size","props","ref","jsxs","cn","jsx"],"mappings":"2MAIMA,EAAaC,EAAAA,WACjB,CAAC,CAAE,UAAAC,EAAW,KAAAC,EAAO,GAAI,GAAGC,CAAA,EAASC,IACnCC,EAAAA,KAAC,MAAA,CACC,IAAAD,EACA,MAAM,6BACN,MAAOF,EACP,OAAQA,EACR,QAAQ,gBACR,KAAK,eACL,UAAWI,EAAAA,GAAG,4BAA6BL,CAAS,EACnD,GAAGE,EAEJ,SAAA,CAAAI,EAAAA,IAAC,OAAA,CAAK,EAAE,q9BAAA,CAAs9B,EAC99BA,EAAAA,IAAC,OAAA,CAAK,EAAE,+QAAA,CAAgR,CAAA,CAAA,CAAA,CAG9R,EAEAR,EAAW,YAAc"}
@@ -1,27 +1,27 @@
1
- import { j as a } from "../../../../_virtual/jsx-runtime.es.js";
2
- import { forwardRef as s } from "react";
3
- import { cn as v } from "../../../../lib/utils.es.js";
4
- const c = s(
5
- ({ className: o, size: t = 18, ...h }, r) => /* @__PURE__ */ a.jsxs(
1
+ import { jsxs as v, jsx as h } from "react/jsx-runtime";
2
+ import { forwardRef as c } from "react";
3
+ import { cn as i } from "../../../../lib/utils.es.js";
4
+ const l = c(
5
+ ({ className: o, size: a = 18, ...t }, r) => /* @__PURE__ */ v(
6
6
  "svg",
7
7
  {
8
8
  ref: r,
9
9
  xmlns: "http://www.w3.org/2000/svg",
10
- width: t,
11
- height: t,
10
+ width: a,
11
+ height: a,
12
12
  viewBox: "0 0 1024 1024",
13
13
  fill: "currentColor",
14
- className: v("lucide lucide-button-icon", o),
15
- ...h,
14
+ className: i("lucide lucide-button-icon", o),
15
+ ...t,
16
16
  children: [
17
- /* @__PURE__ */ a.jsx("path", { d: "M389.12 671.36a90.24 90.24 0 0 0 37.76-80 90.24 90.24 0 0 0-18.56-58.88 88.32 88.32 0 0 0-54.4-28.8 90.24 90.24 0 0 0 42.24-29.44 85.76 85.76 0 0 0 15.36-51.84 82.56 82.56 0 0 0-28.8-64 124.16 124.16 0 0 0-83.2-24.96H134.4v360.96h165.12a161.28 161.28 0 0 0 89.6-23.04ZM192 376.96h96a87.68 87.68 0 0 1 53.76 12.8 45.44 45.44 0 0 1 16.64 39.04 53.12 53.12 0 0 1-16.64 42.88 94.08 94.08 0 0 1-55.04 12.8H192Zm0 270.08V529.92h101.76a95.36 95.36 0 0 1 58.24 14.08 54.4 54.4 0 0 1 19.2 46.72 49.28 49.28 0 0 1-24.32 45.44 118.4 118.4 0 0 1-55.04 10.88ZM503.04 627.2a71.68 71.68 0 0 0 14.08 48 64 64 0 0 0 49.28 17.28h42.88v-44.16H576a22.4 22.4 0 0 1-14.72-5.12 28.16 28.16 0 0 1-4.48-16V475.52h60.16v-44.16h-60.8V346.24l-53.12 22.4v64H454.4v44.16h48.64ZM712.96 535.04a78.72 78.72 0 0 1 21.76-49.92 55.04 55.04 0 0 1 39.68-16c40.96 0 64 22.4 64 64v156.8h53.76V531.2c0-71.68-33.28-107.52-97.92-107.52a93.44 93.44 0 0 0-44.16 10.24 114.56 114.56 0 0 0-34.56 29.44v-32h-56.32v261.12h53.76Z" }),
18
- /* @__PURE__ */ a.jsx("path", { d: "M102.4 870.4h819.2A102.4 102.4 0 0 0 1024 768V256a102.4 102.4 0 0 0-102.4-102.4H102.4A102.4 102.4 0 0 0 0 256v512a102.4 102.4 0 0 0 102.4 102.4ZM64 256a38.4 38.4 0 0 1 38.4-38.4h819.2a38.4 38.4 0 0 1 38.4 38.4v512a38.4 38.4 0 0 1-38.4 38.4H102.4A38.4 38.4 0 0 1 64 768Z" })
17
+ /* @__PURE__ */ h("path", { d: "M389.12 671.36a90.24 90.24 0 0 0 37.76-80 90.24 90.24 0 0 0-18.56-58.88 88.32 88.32 0 0 0-54.4-28.8 90.24 90.24 0 0 0 42.24-29.44 85.76 85.76 0 0 0 15.36-51.84 82.56 82.56 0 0 0-28.8-64 124.16 124.16 0 0 0-83.2-24.96H134.4v360.96h165.12a161.28 161.28 0 0 0 89.6-23.04ZM192 376.96h96a87.68 87.68 0 0 1 53.76 12.8 45.44 45.44 0 0 1 16.64 39.04 53.12 53.12 0 0 1-16.64 42.88 94.08 94.08 0 0 1-55.04 12.8H192Zm0 270.08V529.92h101.76a95.36 95.36 0 0 1 58.24 14.08 54.4 54.4 0 0 1 19.2 46.72 49.28 49.28 0 0 1-24.32 45.44 118.4 118.4 0 0 1-55.04 10.88ZM503.04 627.2a71.68 71.68 0 0 0 14.08 48 64 64 0 0 0 49.28 17.28h42.88v-44.16H576a22.4 22.4 0 0 1-14.72-5.12 28.16 28.16 0 0 1-4.48-16V475.52h60.16v-44.16h-60.8V346.24l-53.12 22.4v64H454.4v44.16h48.64ZM712.96 535.04a78.72 78.72 0 0 1 21.76-49.92 55.04 55.04 0 0 1 39.68-16c40.96 0 64 22.4 64 64v156.8h53.76V531.2c0-71.68-33.28-107.52-97.92-107.52a93.44 93.44 0 0 0-44.16 10.24 114.56 114.56 0 0 0-34.56 29.44v-32h-56.32v261.12h53.76Z" }),
18
+ /* @__PURE__ */ h("path", { d: "M102.4 870.4h819.2A102.4 102.4 0 0 0 1024 768V256a102.4 102.4 0 0 0-102.4-102.4H102.4A102.4 102.4 0 0 0 0 256v512a102.4 102.4 0 0 0 102.4 102.4ZM64 256a38.4 38.4 0 0 1 38.4-38.4h819.2a38.4 38.4 0 0 1 38.4 38.4v512a38.4 38.4 0 0 1-38.4 38.4H102.4A38.4 38.4 0 0 1 64 768Z" })
19
19
  ]
20
20
  }
21
21
  )
22
22
  );
23
- c.displayName = "ButtonIcon";
23
+ l.displayName = "ButtonIcon";
24
24
  export {
25
- c as default
25
+ l as default
26
26
  };
27
27
  //# sourceMappingURL=ButtonIcon.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonIcon.es.js","sources":["../../../../../src/components/MarkdownFlowEditor/components/icons/ButtonIcon.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { LucideProps } from \"lucide-react\";\nimport { cn } from \"../../../../lib/utils\";\n\nconst ButtonIcon = forwardRef<SVGSVGElement, LucideProps>(\n ({ className, size = 18, ...props }, ref) => (\n <svg\n ref={ref}\n xmlns=\"http://www.w3.org/2000/svg\"\n width={size}\n height={size}\n viewBox=\"0 0 1024 1024\"\n fill=\"currentColor\"\n className={cn(\"lucide lucide-button-icon\", className)}\n {...props}\n >\n <path d=\"M389.12 671.36a90.24 90.24 0 0 0 37.76-80 90.24 90.24 0 0 0-18.56-58.88 88.32 88.32 0 0 0-54.4-28.8 90.24 90.24 0 0 0 42.24-29.44 85.76 85.76 0 0 0 15.36-51.84 82.56 82.56 0 0 0-28.8-64 124.16 124.16 0 0 0-83.2-24.96H134.4v360.96h165.12a161.28 161.28 0 0 0 89.6-23.04ZM192 376.96h96a87.68 87.68 0 0 1 53.76 12.8 45.44 45.44 0 0 1 16.64 39.04 53.12 53.12 0 0 1-16.64 42.88 94.08 94.08 0 0 1-55.04 12.8H192Zm0 270.08V529.92h101.76a95.36 95.36 0 0 1 58.24 14.08 54.4 54.4 0 0 1 19.2 46.72 49.28 49.28 0 0 1-24.32 45.44 118.4 118.4 0 0 1-55.04 10.88ZM503.04 627.2a71.68 71.68 0 0 0 14.08 48 64 64 0 0 0 49.28 17.28h42.88v-44.16H576a22.4 22.4 0 0 1-14.72-5.12 28.16 28.16 0 0 1-4.48-16V475.52h60.16v-44.16h-60.8V346.24l-53.12 22.4v64H454.4v44.16h48.64ZM712.96 535.04a78.72 78.72 0 0 1 21.76-49.92 55.04 55.04 0 0 1 39.68-16c40.96 0 64 22.4 64 64v156.8h53.76V531.2c0-71.68-33.28-107.52-97.92-107.52a93.44 93.44 0 0 0-44.16 10.24 114.56 114.56 0 0 0-34.56 29.44v-32h-56.32v261.12h53.76Z\" />\n <path d=\"M102.4 870.4h819.2A102.4 102.4 0 0 0 1024 768V256a102.4 102.4 0 0 0-102.4-102.4H102.4A102.4 102.4 0 0 0 0 256v512a102.4 102.4 0 0 0 102.4 102.4ZM64 256a38.4 38.4 0 0 1 38.4-38.4h819.2a38.4 38.4 0 0 1 38.4 38.4v512a38.4 38.4 0 0 1-38.4 38.4H102.4A38.4 38.4 0 0 1 64 768Z\" />\n </svg>\n )\n);\n\nButtonIcon.displayName = \"ButtonIcon\";\n\nexport default ButtonIcon;\n"],"names":["ButtonIcon","forwardRef","className","size","props","ref","jsxs","cn","jsx"],"mappings":";;;AAIA,MAAMA,IAAaC;AAAA,EACjB,CAAC,EAAE,WAAAC,GAAW,MAAAC,IAAO,IAAI,GAAGC,EAAA,GAASC,MACnCC,gBAAAA,EAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAD;AAAA,MACA,OAAM;AAAA,MACN,OAAOF;AAAA,MACP,QAAQA;AAAA,MACR,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,WAAWI,EAAG,6BAA6BL,CAAS;AAAA,MACnD,GAAGE;AAAA,MAEJ,UAAA;AAAA,QAAAI,gBAAAA,EAAAA,IAAC,QAAA,EAAK,GAAE,s9BAAA,CAAs9B;AAAA,QAC99BA,gBAAAA,EAAAA,IAAC,QAAA,EAAK,GAAE,gRAAA,CAAgR;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG9R;AAEAR,EAAW,cAAc;"}
1
+ {"version":3,"file":"ButtonIcon.es.js","sources":["../../../../../src/components/MarkdownFlowEditor/components/icons/ButtonIcon.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { LucideProps } from \"lucide-react\";\nimport { cn } from \"../../../../lib/utils\";\n\nconst ButtonIcon = forwardRef<SVGSVGElement, LucideProps>(\n ({ className, size = 18, ...props }, ref) => (\n <svg\n ref={ref}\n xmlns=\"http://www.w3.org/2000/svg\"\n width={size}\n height={size}\n viewBox=\"0 0 1024 1024\"\n fill=\"currentColor\"\n className={cn(\"lucide lucide-button-icon\", className)}\n {...props}\n >\n <path d=\"M389.12 671.36a90.24 90.24 0 0 0 37.76-80 90.24 90.24 0 0 0-18.56-58.88 88.32 88.32 0 0 0-54.4-28.8 90.24 90.24 0 0 0 42.24-29.44 85.76 85.76 0 0 0 15.36-51.84 82.56 82.56 0 0 0-28.8-64 124.16 124.16 0 0 0-83.2-24.96H134.4v360.96h165.12a161.28 161.28 0 0 0 89.6-23.04ZM192 376.96h96a87.68 87.68 0 0 1 53.76 12.8 45.44 45.44 0 0 1 16.64 39.04 53.12 53.12 0 0 1-16.64 42.88 94.08 94.08 0 0 1-55.04 12.8H192Zm0 270.08V529.92h101.76a95.36 95.36 0 0 1 58.24 14.08 54.4 54.4 0 0 1 19.2 46.72 49.28 49.28 0 0 1-24.32 45.44 118.4 118.4 0 0 1-55.04 10.88ZM503.04 627.2a71.68 71.68 0 0 0 14.08 48 64 64 0 0 0 49.28 17.28h42.88v-44.16H576a22.4 22.4 0 0 1-14.72-5.12 28.16 28.16 0 0 1-4.48-16V475.52h60.16v-44.16h-60.8V346.24l-53.12 22.4v64H454.4v44.16h48.64ZM712.96 535.04a78.72 78.72 0 0 1 21.76-49.92 55.04 55.04 0 0 1 39.68-16c40.96 0 64 22.4 64 64v156.8h53.76V531.2c0-71.68-33.28-107.52-97.92-107.52a93.44 93.44 0 0 0-44.16 10.24 114.56 114.56 0 0 0-34.56 29.44v-32h-56.32v261.12h53.76Z\" />\n <path d=\"M102.4 870.4h819.2A102.4 102.4 0 0 0 1024 768V256a102.4 102.4 0 0 0-102.4-102.4H102.4A102.4 102.4 0 0 0 0 256v512a102.4 102.4 0 0 0 102.4 102.4ZM64 256a38.4 38.4 0 0 1 38.4-38.4h819.2a38.4 38.4 0 0 1 38.4 38.4v512a38.4 38.4 0 0 1-38.4 38.4H102.4A38.4 38.4 0 0 1 64 768Z\" />\n </svg>\n )\n);\n\nButtonIcon.displayName = \"ButtonIcon\";\n\nexport default ButtonIcon;\n"],"names":["ButtonIcon","forwardRef","className","size","props","ref","jsxs","cn","jsx"],"mappings":";;;AAIA,MAAMA,IAAaC;AAAA,EACjB,CAAC,EAAE,WAAAC,GAAW,MAAAC,IAAO,IAAI,GAAGC,EAAA,GAASC,MACnC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAD;AAAA,MACA,OAAM;AAAA,MACN,OAAOF;AAAA,MACP,QAAQA;AAAA,MACR,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,WAAWI,EAAG,6BAA6BL,CAAS;AAAA,MACnD,GAAGE;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAI,EAAC,QAAA,EAAK,GAAE,s9BAAA,CAAs9B;AAAA,QAC99B,gBAAAA,EAAC,QAAA,EAAK,GAAE,gRAAA,CAAgR;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG9R;AAEAR,EAAW,cAAc;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../../../_virtual/jsx-runtime.cjs"),i=require("react"),n=require("../../../../lib/utils.cjs"),r=i.forwardRef(({className:t,size:s=20,...c},o)=>e.jsxRuntimeExports.jsxs("svg",{ref:o,xmlns:"http://www.w3.org/2000/svg",width:s,height:s,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",className:n.cn("lucide lucide-search-braces",t),...c,children:[e.jsxRuntimeExports.jsx("circle",{cx:"11",cy:"11",r:"7"}),e.jsxRuntimeExports.jsx("line",{x1:"16.65",y1:"16.65",x2:"21",y2:"21"}),e.jsxRuntimeExports.jsx("path",{d:"M10 8c-1 0-1.5.5-1.5 1.5S8 11 7 11s1.5.5 1.5 1.5S9 14 10 14"}),e.jsxRuntimeExports.jsx("path",{d:"M12 8c1 0 1.5.5 1.5 1.5S14 11 15 11s-1.5.5-1.5 1.5S13 14 12 14"})]}));r.displayName="SearchBracesIcon";exports.default=r;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),i=require("react"),n=require("../../../../lib/utils.cjs"),s=i.forwardRef(({className:c,size:r=20,...t},o)=>e.jsxs("svg",{ref:o,xmlns:"http://www.w3.org/2000/svg",width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",className:n.cn("lucide lucide-search-braces",c),...t,children:[e.jsx("circle",{cx:"11",cy:"11",r:"7"}),e.jsx("line",{x1:"16.65",y1:"16.65",x2:"21",y2:"21"}),e.jsx("path",{d:"M10 8c-1 0-1.5.5-1.5 1.5S8 11 7 11s1.5.5 1.5 1.5S9 14 10 14"}),e.jsx("path",{d:"M12 8c1 0 1.5.5 1.5 1.5S14 11 15 11s-1.5.5-1.5 1.5S13 14 12 14"})]}));s.displayName="SearchBracesIcon";exports.default=s;
2
2
  //# sourceMappingURL=SearchBracesIcon.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"SearchBracesIcon.cjs","sources":["../../../../../src/components/MarkdownFlowEditor/components/icons/SearchBracesIcon.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { LucideProps } from \"lucide-react\";\nimport { cn } from \"../../../../lib/utils\";\n\nconst SearchBracesIcon = forwardRef<SVGSVGElement, LucideProps>(\n ({ className, size = 20, ...props }, ref) => (\n <svg\n ref={ref}\n xmlns=\"http://www.w3.org/2000/svg\"\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={cn(\"lucide lucide-search-braces\", className)}\n {...props}\n >\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <line x1=\"16.65\" y1=\"16.65\" x2=\"21\" y2=\"21\" />\n <path d=\"M10 8c-1 0-1.5.5-1.5 1.5S8 11 7 11s1.5.5 1.5 1.5S9 14 10 14\" />\n <path d=\"M12 8c1 0 1.5.5 1.5 1.5S14 11 15 11s-1.5.5-1.5 1.5S13 14 12 14\" />\n </svg>\n )\n);\n\nSearchBracesIcon.displayName = \"SearchBracesIcon\";\n\nexport default SearchBracesIcon;\n"],"names":["SearchBracesIcon","forwardRef","className","size","props","ref","jsxs","cn","jsx"],"mappings":"8NAIMA,EAAmBC,EAAAA,WACvB,CAAC,CAAE,UAAAC,EAAW,KAAAC,EAAO,GAAI,GAAGC,CAAA,EAASC,IACnCC,EAAAA,kBAAAA,KAAC,MAAA,CACC,IAAAD,EACA,MAAM,6BACN,MAAOF,EACP,OAAQA,EACR,QAAQ,YACR,KAAK,OACL,OAAO,eACP,cAAc,QACd,eAAe,QACf,UAAWI,EAAAA,GAAG,8BAA+BL,CAAS,EACrD,GAAGE,EAEJ,SAAA,CAAAI,wBAAC,UAAO,GAAG,KAAK,GAAG,KAAK,EAAE,IAAI,EAC9BA,EAAAA,kBAAAA,IAAC,QAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,KAAK,GAAG,IAAA,CAAK,EAC5CA,EAAAA,kBAAAA,IAAC,OAAA,CAAK,EAAE,6DAAA,CAA8D,EACtEA,EAAAA,kBAAAA,IAAC,OAAA,CAAK,EAAE,gEAAA,CAAiE,CAAA,CAAA,CAAA,CAG/E,EAEAR,EAAiB,YAAc"}
1
+ {"version":3,"file":"SearchBracesIcon.cjs","sources":["../../../../../src/components/MarkdownFlowEditor/components/icons/SearchBracesIcon.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { LucideProps } from \"lucide-react\";\nimport { cn } from \"../../../../lib/utils\";\n\nconst SearchBracesIcon = forwardRef<SVGSVGElement, LucideProps>(\n ({ className, size = 20, ...props }, ref) => (\n <svg\n ref={ref}\n xmlns=\"http://www.w3.org/2000/svg\"\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={cn(\"lucide lucide-search-braces\", className)}\n {...props}\n >\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <line x1=\"16.65\" y1=\"16.65\" x2=\"21\" y2=\"21\" />\n <path d=\"M10 8c-1 0-1.5.5-1.5 1.5S8 11 7 11s1.5.5 1.5 1.5S9 14 10 14\" />\n <path d=\"M12 8c1 0 1.5.5 1.5 1.5S14 11 15 11s-1.5.5-1.5 1.5S13 14 12 14\" />\n </svg>\n )\n);\n\nSearchBracesIcon.displayName = \"SearchBracesIcon\";\n\nexport default SearchBracesIcon;\n"],"names":["SearchBracesIcon","forwardRef","className","size","props","ref","jsxs","cn","jsx"],"mappings":"2MAIMA,EAAmBC,EAAAA,WACvB,CAAC,CAAE,UAAAC,EAAW,KAAAC,EAAO,GAAI,GAAGC,CAAA,EAASC,IACnCC,EAAAA,KAAC,MAAA,CACC,IAAAD,EACA,MAAM,6BACN,MAAOF,EACP,OAAQA,EACR,QAAQ,YACR,KAAK,OACL,OAAO,eACP,cAAc,QACd,eAAe,QACf,UAAWI,EAAAA,GAAG,8BAA+BL,CAAS,EACrD,GAAGE,EAEJ,SAAA,CAAAI,MAAC,UAAO,GAAG,KAAK,GAAG,KAAK,EAAE,IAAI,EAC9BA,EAAAA,IAAC,QAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,KAAK,GAAG,IAAA,CAAK,EAC5CA,EAAAA,IAAC,OAAA,CAAK,EAAE,6DAAA,CAA8D,EACtEA,EAAAA,IAAC,OAAA,CAAK,EAAE,gEAAA,CAAiE,CAAA,CAAA,CAAA,CAG/E,EAEAR,EAAiB,YAAc"}
@@ -1,11 +1,11 @@
1
- import { j as r } from "../../../../_virtual/jsx-runtime.es.js";
1
+ import { jsxs as a, jsx as r } from "react/jsx-runtime";
2
2
  import { forwardRef as t } from "react";
3
- import { cn as a } from "../../../../lib/utils.es.js";
4
- const i = t(
5
- ({ className: s, size: e = 20, ...o }, c) => /* @__PURE__ */ r.jsxs(
3
+ import { cn as i } from "../../../../lib/utils.es.js";
4
+ const n = t(
5
+ ({ className: c, size: e = 20, ...o }, s) => /* @__PURE__ */ a(
6
6
  "svg",
7
7
  {
8
- ref: c,
8
+ ref: s,
9
9
  xmlns: "http://www.w3.org/2000/svg",
10
10
  width: e,
11
11
  height: e,
@@ -14,19 +14,19 @@ const i = t(
14
14
  stroke: "currentColor",
15
15
  strokeLinecap: "round",
16
16
  strokeLinejoin: "round",
17
- className: a("lucide lucide-search-braces", s),
17
+ className: i("lucide lucide-search-braces", c),
18
18
  ...o,
19
19
  children: [
20
- /* @__PURE__ */ r.jsx("circle", { cx: "11", cy: "11", r: "7" }),
21
- /* @__PURE__ */ r.jsx("line", { x1: "16.65", y1: "16.65", x2: "21", y2: "21" }),
22
- /* @__PURE__ */ r.jsx("path", { d: "M10 8c-1 0-1.5.5-1.5 1.5S8 11 7 11s1.5.5 1.5 1.5S9 14 10 14" }),
23
- /* @__PURE__ */ r.jsx("path", { d: "M12 8c1 0 1.5.5 1.5 1.5S14 11 15 11s-1.5.5-1.5 1.5S13 14 12 14" })
20
+ /* @__PURE__ */ r("circle", { cx: "11", cy: "11", r: "7" }),
21
+ /* @__PURE__ */ r("line", { x1: "16.65", y1: "16.65", x2: "21", y2: "21" }),
22
+ /* @__PURE__ */ r("path", { d: "M10 8c-1 0-1.5.5-1.5 1.5S8 11 7 11s1.5.5 1.5 1.5S9 14 10 14" }),
23
+ /* @__PURE__ */ r("path", { d: "M12 8c1 0 1.5.5 1.5 1.5S14 11 15 11s-1.5.5-1.5 1.5S13 14 12 14" })
24
24
  ]
25
25
  }
26
26
  )
27
27
  );
28
- i.displayName = "SearchBracesIcon";
28
+ n.displayName = "SearchBracesIcon";
29
29
  export {
30
- i as default
30
+ n as default
31
31
  };
32
32
  //# sourceMappingURL=SearchBracesIcon.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SearchBracesIcon.es.js","sources":["../../../../../src/components/MarkdownFlowEditor/components/icons/SearchBracesIcon.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { LucideProps } from \"lucide-react\";\nimport { cn } from \"../../../../lib/utils\";\n\nconst SearchBracesIcon = forwardRef<SVGSVGElement, LucideProps>(\n ({ className, size = 20, ...props }, ref) => (\n <svg\n ref={ref}\n xmlns=\"http://www.w3.org/2000/svg\"\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={cn(\"lucide lucide-search-braces\", className)}\n {...props}\n >\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <line x1=\"16.65\" y1=\"16.65\" x2=\"21\" y2=\"21\" />\n <path d=\"M10 8c-1 0-1.5.5-1.5 1.5S8 11 7 11s1.5.5 1.5 1.5S9 14 10 14\" />\n <path d=\"M12 8c1 0 1.5.5 1.5 1.5S14 11 15 11s-1.5.5-1.5 1.5S13 14 12 14\" />\n </svg>\n )\n);\n\nSearchBracesIcon.displayName = \"SearchBracesIcon\";\n\nexport default SearchBracesIcon;\n"],"names":["SearchBracesIcon","forwardRef","className","size","props","ref","jsxs","cn","jsx"],"mappings":";;;AAIA,MAAMA,IAAmBC;AAAA,EACvB,CAAC,EAAE,WAAAC,GAAW,MAAAC,IAAO,IAAI,GAAGC,EAAA,GAASC,MACnCC,gBAAAA,EAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAD;AAAA,MACA,OAAM;AAAA,MACN,OAAOF;AAAA,MACP,QAAQA;AAAA,MACR,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,QAAO;AAAA,MACP,eAAc;AAAA,MACd,gBAAe;AAAA,MACf,WAAWI,EAAG,+BAA+BL,CAAS;AAAA,MACrD,GAAGE;AAAA,MAEJ,UAAA;AAAA,QAAAI,gBAAAA,MAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,KAAI;AAAA,QAC9BA,gBAAAA,EAAAA,IAAC,UAAK,IAAG,SAAQ,IAAG,SAAQ,IAAG,MAAK,IAAG,KAAA,CAAK;AAAA,QAC5CA,gBAAAA,EAAAA,IAAC,QAAA,EAAK,GAAE,8DAAA,CAA8D;AAAA,QACtEA,gBAAAA,EAAAA,IAAC,QAAA,EAAK,GAAE,iEAAA,CAAiE;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG/E;AAEAR,EAAiB,cAAc;"}
1
+ {"version":3,"file":"SearchBracesIcon.es.js","sources":["../../../../../src/components/MarkdownFlowEditor/components/icons/SearchBracesIcon.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { LucideProps } from \"lucide-react\";\nimport { cn } from \"../../../../lib/utils\";\n\nconst SearchBracesIcon = forwardRef<SVGSVGElement, LucideProps>(\n ({ className, size = 20, ...props }, ref) => (\n <svg\n ref={ref}\n xmlns=\"http://www.w3.org/2000/svg\"\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={cn(\"lucide lucide-search-braces\", className)}\n {...props}\n >\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <line x1=\"16.65\" y1=\"16.65\" x2=\"21\" y2=\"21\" />\n <path d=\"M10 8c-1 0-1.5.5-1.5 1.5S8 11 7 11s1.5.5 1.5 1.5S9 14 10 14\" />\n <path d=\"M12 8c1 0 1.5.5 1.5 1.5S14 11 15 11s-1.5.5-1.5 1.5S13 14 12 14\" />\n </svg>\n )\n);\n\nSearchBracesIcon.displayName = \"SearchBracesIcon\";\n\nexport default SearchBracesIcon;\n"],"names":["SearchBracesIcon","forwardRef","className","size","props","ref","jsxs","cn","jsx"],"mappings":";;;AAIA,MAAMA,IAAmBC;AAAA,EACvB,CAAC,EAAE,WAAAC,GAAW,MAAAC,IAAO,IAAI,GAAGC,EAAA,GAASC,MACnC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAD;AAAA,MACA,OAAM;AAAA,MACN,OAAOF;AAAA,MACP,QAAQA;AAAA,MACR,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,QAAO;AAAA,MACP,eAAc;AAAA,MACd,gBAAe;AAAA,MACf,WAAWI,EAAG,+BAA+BL,CAAS;AAAA,MACrD,GAAGE;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAI,EAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,KAAI;AAAA,QAC9B,gBAAAA,EAAC,UAAK,IAAG,SAAQ,IAAG,SAAQ,IAAG,MAAK,IAAG,KAAA,CAAK;AAAA,QAC5C,gBAAAA,EAAC,QAAA,EAAK,GAAE,8DAAA,CAA8D;AAAA,QACtE,gBAAAA,EAAC,QAAA,EAAK,GAAE,iEAAA,CAAiE;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG/E;AAEAR,EAAiB,cAAc;"}
@@ -1,3 +1,3 @@
1
- import { IEditorContext } from './types';
1
+ import { IEditorContext } from './types.js';
2
2
  declare const EditorContext: import('react').Context<IEditorContext>;
3
3
  export default EditorContext;
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./locales/en-US.json.cjs"),a=require("./locales/fr-FR.json.cjs"),s=require("./locales/zh-CN.json.cjs"),e=require("../../lib/locale.cjs"),n=e.DEFAULT_MARKDOWN_FLOW_LOCALE,o={"en-US":{translation:r.default},"fr-FR":{translation:a.default},"zh-CN":{translation:s.default}},l=t=>o[e.normalizeMarkdownFlowLocale(t)].translation;exports.DEFAULT_EDITOR_LOCALE=n;exports.editorLocaleResources=o;exports.getEditorLocaleMessages=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./locales/en-US.json.cjs"),a=require("./locales/fr-FR.json.cjs"),n=require("./locales/zh-CN.json.cjs"),s=require("./locales/ar-SA.json.cjs"),l=require("./locales/th-TH.json.cjs"),e=require("../../lib/locale.cjs"),i=e.DEFAULT_MARKDOWN_FLOW_LOCALE,t={"en-US":{translation:r.default},"fr-FR":{translation:a.default},"zh-CN":{translation:n.default},"ar-SA":{translation:s.default},"th-TH":{translation:l.default}},c=o=>t[e.normalizeMarkdownFlowLocale(o)].translation;exports.DEFAULT_EDITOR_LOCALE=i;exports.editorLocaleResources=t;exports.getEditorLocaleMessages=c;
2
2
  //# sourceMappingURL=editorI18n.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"editorI18n.cjs","sources":["../../../src/components/MarkdownFlowEditor/editorI18n.ts"],"sourcesContent":["import enUS from \"./locales/en-US.json\";\nimport frFR from \"./locales/fr-FR.json\";\nimport zhCN from \"./locales/zh-CN.json\";\nimport {\n DEFAULT_MARKDOWN_FLOW_LOCALE,\n normalizeMarkdownFlowLocale,\n} from \"../../lib/locale\";\n\nexport const DEFAULT_EDITOR_LOCALE = DEFAULT_MARKDOWN_FLOW_LOCALE;\n\nexport const editorLocaleResources = {\n \"en-US\": { translation: enUS },\n \"fr-FR\": { translation: frFR },\n \"zh-CN\": { translation: zhCN },\n} as const;\n\nexport const getEditorLocaleMessages = (locale?: string | null) =>\n editorLocaleResources[normalizeMarkdownFlowLocale(locale)].translation;\n"],"names":["DEFAULT_EDITOR_LOCALE","DEFAULT_MARKDOWN_FLOW_LOCALE","editorLocaleResources","enUS","frFR","zhCN","getEditorLocaleMessages","locale","normalizeMarkdownFlowLocale"],"mappings":"0OAQaA,EAAwBC,EAAAA,6BAExBC,EAAwB,CACnC,QAAS,CAAE,YAAaC,SAAA,EACxB,QAAS,CAAE,YAAaC,SAAA,EACxB,QAAS,CAAE,YAAaC,EAAAA,OAAA,CAC1B,EAEaC,EAA2BC,GACtCL,EAAsBM,EAAAA,4BAA4BD,CAAM,CAAC,EAAE"}
1
+ {"version":3,"file":"editorI18n.cjs","sources":["../../../src/components/MarkdownFlowEditor/editorI18n.ts"],"sourcesContent":["import enUS from \"./locales/en-US.json\";\nimport frFR from \"./locales/fr-FR.json\";\nimport zhCN from \"./locales/zh-CN.json\";\nimport arSA from \"./locales/ar-SA.json\";\nimport thTH from \"./locales/th-TH.json\";\nimport {\n DEFAULT_MARKDOWN_FLOW_LOCALE,\n normalizeMarkdownFlowLocale,\n} from \"../../lib/locale\";\n\nexport const DEFAULT_EDITOR_LOCALE = DEFAULT_MARKDOWN_FLOW_LOCALE;\n\nexport const editorLocaleResources = {\n \"en-US\": { translation: enUS },\n \"fr-FR\": { translation: frFR },\n \"zh-CN\": { translation: zhCN },\n \"ar-SA\": { translation: arSA },\n \"th-TH\": { translation: thTH },\n} as const;\n\nexport const getEditorLocaleMessages = (locale?: string | null) =>\n editorLocaleResources[normalizeMarkdownFlowLocale(locale)].translation;\n"],"names":["DEFAULT_EDITOR_LOCALE","DEFAULT_MARKDOWN_FLOW_LOCALE","editorLocaleResources","enUS","frFR","zhCN","arSA","thTH","getEditorLocaleMessages","locale","normalizeMarkdownFlowLocale"],"mappings":"sTAUaA,EAAwBC,EAAAA,6BAExBC,EAAwB,CACnC,QAAS,CAAE,YAAaC,SAAA,EACxB,QAAS,CAAE,YAAaC,SAAA,EACxB,QAAS,CAAE,YAAaC,SAAA,EACxB,QAAS,CAAE,YAAaC,SAAA,EACxB,QAAS,CAAE,YAAaC,EAAAA,OAAA,CAC1B,EAEaC,EAA2BC,GACtCP,EAAsBQ,EAAAA,4BAA4BD,CAAM,CAAC,EAAE"}