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.
- package/README.md +7 -0
- package/dist/_virtual/index.es3.js +5 -4
- package/dist/_virtual/index.es3.js.map +1 -1
- package/dist/_virtual/index.es4.js +4 -5
- package/dist/_virtual/index.es4.js.map +1 -1
- package/dist/_virtual/index3.cjs +1 -1
- package/dist/_virtual/index4.cjs +1 -1
- package/dist/assets/markdown-flow-ui.css +10 -1
- package/dist/components/ContentRender/CodeBlock.cjs +1 -1
- package/dist/components/ContentRender/CodeBlock.cjs.map +1 -1
- package/dist/components/ContentRender/CodeBlock.d.ts +5 -0
- package/dist/components/ContentRender/CodeBlock.es.js +41 -38
- package/dist/components/ContentRender/CodeBlock.es.js.map +1 -1
- package/dist/components/ContentRender/ContentRender.cjs +2 -2
- package/dist/components/ContentRender/ContentRender.cjs.map +1 -1
- package/dist/components/ContentRender/ContentRender.d.ts +9 -4
- package/dist/components/ContentRender/ContentRender.es.js +389 -298
- package/dist/components/ContentRender/ContentRender.es.js.map +1 -1
- package/dist/components/ContentRender/IframeSandbox.cjs +7 -7
- package/dist/components/ContentRender/IframeSandbox.cjs.map +1 -1
- package/dist/components/ContentRender/IframeSandbox.d.ts +5 -1
- package/dist/components/ContentRender/IframeSandbox.es.js +311 -266
- package/dist/components/ContentRender/IframeSandbox.es.js.map +1 -1
- package/dist/components/ContentRender/MarkdownFlowInput.cjs +1 -1
- package/dist/components/ContentRender/MarkdownFlowInput.cjs.map +1 -1
- package/dist/components/ContentRender/MarkdownFlowInput.d.ts +5 -1
- package/dist/components/ContentRender/MarkdownFlowInput.es.js +37 -32
- package/dist/components/ContentRender/MarkdownFlowInput.es.js.map +1 -1
- package/dist/components/ContentRender/SandboxApp.cjs +2 -2
- package/dist/components/ContentRender/SandboxApp.cjs.map +1 -1
- package/dist/components/ContentRender/SandboxApp.d.ts +5 -1
- package/dist/components/ContentRender/SandboxApp.es.js +108 -103
- package/dist/components/ContentRender/SandboxApp.es.js.map +1 -1
- package/dist/components/ContentRender/blackboard-vendor.d.ts +1 -1
- package/dist/components/ContentRender/contentRenderI18n.cjs +1 -1
- package/dist/components/ContentRender/contentRenderI18n.cjs.map +1 -1
- package/dist/components/ContentRender/contentRenderI18n.d.ts +6 -1
- package/dist/components/ContentRender/contentRenderI18n.es.js +5 -56
- package/dist/components/ContentRender/contentRenderI18n.es.js.map +1 -1
- package/dist/components/ContentRender/contentRenderI18n.test.d.ts +1 -0
- package/dist/components/ContentRender/index.cjs +1 -1
- package/dist/components/ContentRender/index.d.ts +11 -11
- package/dist/components/ContentRender/index.es.js +1 -2
- package/dist/components/ContentRender/index.es.js.map +1 -1
- package/dist/components/ContentRender/locales/contentRender.json.cjs +2 -0
- package/dist/components/ContentRender/locales/contentRender.json.cjs.map +1 -0
- package/dist/components/ContentRender/locales/contentRender.json.d.ts +90 -0
- package/dist/components/ContentRender/locales/contentRender.json.es.js +11 -0
- package/dist/components/ContentRender/locales/contentRender.json.es.js.map +1 -0
- package/dist/components/ContentRender/plugins/CustomVariable.cjs +1 -1
- package/dist/components/ContentRender/plugins/CustomVariable.cjs.map +1 -1
- package/dist/components/ContentRender/plugins/CustomVariable.d.ts +7 -3
- package/dist/components/ContentRender/plugins/CustomVariable.es.js +165 -151
- package/dist/components/ContentRender/plugins/CustomVariable.es.js.map +1 -1
- package/dist/components/ContentRender/plugins/MermaidChart.cjs +1 -1
- package/dist/components/ContentRender/plugins/MermaidChart.cjs.map +1 -1
- package/dist/components/ContentRender/plugins/MermaidChart.d.ts +1 -0
- package/dist/components/ContentRender/plugins/MermaidChart.es.js +68 -44
- package/dist/components/ContentRender/plugins/MermaidChart.es.js.map +1 -1
- package/dist/components/MarkdownFlow/MarkdownFlow.cjs +1 -1
- package/dist/components/MarkdownFlow/MarkdownFlow.cjs.map +1 -1
- package/dist/components/MarkdownFlow/MarkdownFlow.d.ts +12 -4
- package/dist/components/MarkdownFlow/MarkdownFlow.es.js +51 -39
- package/dist/components/MarkdownFlow/MarkdownFlow.es.js.map +1 -1
- package/dist/components/MarkdownFlow/ScrollToBottomButton.cjs +1 -1
- package/dist/components/MarkdownFlow/ScrollToBottomButton.cjs.map +1 -1
- package/dist/components/MarkdownFlow/ScrollToBottomButton.d.ts +31 -1
- package/dist/components/MarkdownFlow/ScrollToBottomButton.es.js +46 -17
- package/dist/components/MarkdownFlow/ScrollToBottomButton.es.js.map +1 -1
- package/dist/components/MarkdownFlow/ScrollToBottomControl.cjs +2 -0
- package/dist/components/MarkdownFlow/ScrollToBottomControl.cjs.map +1 -0
- package/dist/components/MarkdownFlow/ScrollToBottomControl.d.ts +18 -0
- package/dist/components/MarkdownFlow/ScrollToBottomControl.es.js +47 -0
- package/dist/components/MarkdownFlow/ScrollToBottomControl.es.js.map +1 -0
- package/dist/components/MarkdownFlow/ScrollableMarkdownFlow.cjs +1 -1
- package/dist/components/MarkdownFlow/ScrollableMarkdownFlow.cjs.map +1 -1
- package/dist/components/MarkdownFlow/ScrollableMarkdownFlow.d.ts +1 -1
- package/dist/components/MarkdownFlow/ScrollableMarkdownFlow.es.js +33 -52
- package/dist/components/MarkdownFlow/ScrollableMarkdownFlow.es.js.map +1 -1
- package/dist/components/MarkdownFlow/index.cjs +1 -1
- package/dist/components/MarkdownFlow/index.d.ts +9 -6
- package/dist/components/MarkdownFlow/index.es.js +6 -6
- package/dist/components/MarkdownFlow/index.es.js.map +1 -1
- package/dist/components/MarkdownFlow/useScrollToBottom.cjs +1 -1
- package/dist/components/MarkdownFlow/useScrollToBottom.cjs.map +1 -1
- package/dist/components/MarkdownFlow/useScrollToBottom.d.ts +40 -8
- package/dist/components/MarkdownFlow/useScrollToBottom.es.js +352 -83
- package/dist/components/MarkdownFlow/useScrollToBottom.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.cjs.map +1 -1
- package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.d.ts +5 -3
- package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.es.js +371 -324
- package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/components/CustomDialog.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/components/CustomDialog.cjs.map +1 -1
- package/dist/components/MarkdownFlowEditor/components/CustomDialog.d.ts +10 -0
- package/dist/components/MarkdownFlowEditor/components/CustomDialog.es.js +22 -19
- package/dist/components/MarkdownFlowEditor/components/CustomDialog.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/components/CustomPopover.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/components/CustomPopover.cjs.map +1 -1
- package/dist/components/MarkdownFlowEditor/components/CustomPopover.d.ts +8 -0
- package/dist/components/MarkdownFlowEditor/components/CustomPopover.es.js +19 -15
- package/dist/components/MarkdownFlowEditor/components/CustomPopover.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/components/EditorToolbar.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/components/EditorToolbar.cjs.map +1 -1
- package/dist/components/MarkdownFlowEditor/components/EditorToolbar.d.ts +4 -1
- package/dist/components/MarkdownFlowEditor/components/EditorToolbar.es.js +99 -93
- package/dist/components/MarkdownFlowEditor/components/EditorToolbar.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/components/ImageInject.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/components/ImageInject.cjs.map +1 -1
- package/dist/components/MarkdownFlowEditor/components/ImageInject.d.ts +1 -1
- package/dist/components/MarkdownFlowEditor/components/ImageInject.es.js +183 -182
- package/dist/components/MarkdownFlowEditor/components/ImageInject.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/components/VariableSearchDropdown.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/components/VariableSearchDropdown.cjs.map +1 -1
- package/dist/components/MarkdownFlowEditor/components/VariableSearchDropdown.d.ts +1 -1
- package/dist/components/MarkdownFlowEditor/components/VariableSearchDropdown.es.js +107 -103
- package/dist/components/MarkdownFlowEditor/components/VariableSearchDropdown.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/components/VariableSelect.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/components/VariableSelect.cjs.map +1 -1
- package/dist/components/MarkdownFlowEditor/components/VariableSelect.d.ts +1 -1
- package/dist/components/MarkdownFlowEditor/components/VariableSelect.es.js +106 -106
- package/dist/components/MarkdownFlowEditor/components/VariableSelect.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/components/VideoInject.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/components/VideoInject.cjs.map +1 -1
- package/dist/components/MarkdownFlowEditor/components/VideoInject.es.js +64 -63
- package/dist/components/MarkdownFlowEditor/components/VideoInject.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/components/icons/ButtonIcon.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/components/icons/ButtonIcon.cjs.map +1 -1
- package/dist/components/MarkdownFlowEditor/components/icons/ButtonIcon.es.js +13 -13
- package/dist/components/MarkdownFlowEditor/components/icons/ButtonIcon.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/components/icons/SearchBracesIcon.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/components/icons/SearchBracesIcon.cjs.map +1 -1
- package/dist/components/MarkdownFlowEditor/components/icons/SearchBracesIcon.es.js +12 -12
- package/dist/components/MarkdownFlowEditor/components/icons/SearchBracesIcon.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/editor-context.d.ts +1 -1
- package/dist/components/MarkdownFlowEditor/editorI18n.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/editorI18n.cjs.map +1 -1
- package/dist/components/MarkdownFlowEditor/editorI18n.d.ts +290 -0
- package/dist/components/MarkdownFlowEditor/editorI18n.es.js +12 -8
- package/dist/components/MarkdownFlowEditor/editorI18n.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/editorI18n.test.d.ts +1 -0
- package/dist/components/MarkdownFlowEditor/index.d.ts +6 -6
- package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.cjs +2 -0
- package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.cjs.map +1 -0
- package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.d.ts +72 -0
- package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.es.js +140 -0
- package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.es.js.map +1 -0
- package/dist/components/MarkdownFlowEditor/locales/en-US.json.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/locales/en-US.json.d.ts +2 -0
- package/dist/components/MarkdownFlowEditor/locales/en-US.json.es.js +118 -114
- package/dist/components/MarkdownFlowEditor/locales/en-US.json.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.d.ts +2 -0
- package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.es.js +118 -114
- package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/locales/th-TH.json.cjs +2 -0
- package/dist/components/MarkdownFlowEditor/locales/th-TH.json.cjs.map +1 -0
- package/dist/components/MarkdownFlowEditor/locales/th-TH.json.d.ts +72 -0
- package/dist/components/MarkdownFlowEditor/locales/th-TH.json.es.js +140 -0
- package/dist/components/MarkdownFlowEditor/locales/th-TH.json.es.js.map +1 -0
- package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.d.ts +2 -0
- package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.es.js +70 -66
- package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/plugins/ImgPlaceholder.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/plugins/ImgPlaceholder.cjs.map +1 -1
- package/dist/components/MarkdownFlowEditor/plugins/ImgPlaceholder.es.js +40 -35
- package/dist/components/MarkdownFlowEditor/plugins/ImgPlaceholder.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/plugins/PlaceholderWidget.d.ts +1 -1
- package/dist/components/MarkdownFlowEditor/plugins/VideoPlaceholder.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/plugins/VideoPlaceholder.cjs.map +1 -1
- package/dist/components/MarkdownFlowEditor/plugins/VideoPlaceholder.es.js +27 -23
- package/dist/components/MarkdownFlowEditor/plugins/VideoPlaceholder.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/plugins/mediaPlaceholderLabels.cjs +2 -0
- package/dist/components/MarkdownFlowEditor/plugins/mediaPlaceholderLabels.cjs.map +1 -0
- package/dist/components/MarkdownFlowEditor/plugins/mediaPlaceholderLabels.d.ts +7 -0
- package/dist/components/MarkdownFlowEditor/plugins/mediaPlaceholderLabels.es.js +12 -0
- package/dist/components/MarkdownFlowEditor/plugins/mediaPlaceholderLabels.es.js.map +1 -0
- package/dist/components/MarkdownFlowEditor/utils.d.ts +1 -1
- package/dist/components/Slide/MarkdownSlideScaling.cjs +1 -1
- package/dist/components/Slide/MarkdownSlideScaling.cjs.map +1 -1
- package/dist/components/Slide/MarkdownSlideScaling.d.ts +1 -1
- package/dist/components/Slide/MarkdownSlideScaling.es.js +20 -20
- package/dist/components/Slide/MarkdownSlideScaling.es.js.map +1 -1
- package/dist/components/Slide/MobilePlayerSettingsSheet.cjs +1 -1
- package/dist/components/Slide/MobilePlayerSettingsSheet.cjs.map +1 -1
- package/dist/components/Slide/MobilePlayerSettingsSheet.d.ts +7 -2
- package/dist/components/Slide/MobilePlayerSettingsSheet.es.js +61 -57
- package/dist/components/Slide/MobilePlayerSettingsSheet.es.js.map +1 -1
- package/dist/components/Slide/Player.cjs +1 -1
- package/dist/components/Slide/Player.cjs.map +1 -1
- package/dist/components/Slide/Player.d.ts +6 -6
- package/dist/components/Slide/Player.es.js +547 -541
- package/dist/components/Slide/Player.es.js.map +1 -1
- package/dist/components/Slide/Slide.cjs +1 -1
- package/dist/components/Slide/Slide.cjs.map +1 -1
- package/dist/components/Slide/Slide.d.ts +14 -12
- package/dist/components/Slide/Slide.es.js +745 -726
- package/dist/components/Slide/Slide.es.js.map +1 -1
- package/dist/components/Slide/SubtitleOverlay.cjs +1 -1
- package/dist/components/Slide/SubtitleOverlay.cjs.map +1 -1
- package/dist/components/Slide/SubtitleOverlay.d.ts +2 -2
- package/dist/components/Slide/SubtitleOverlay.es.js +17 -17
- package/dist/components/Slide/SubtitleOverlay.es.js.map +1 -1
- package/dist/components/Slide/diff-utils.d.ts +1 -1
- package/dist/components/Slide/index.d.ts +12 -12
- package/dist/components/Slide/locales/slide.json.cjs +2 -0
- package/dist/components/Slide/locales/slide.json.cjs.map +1 -0
- package/dist/components/Slide/locales/slide.json.d.ts +205 -0
- package/dist/components/Slide/locales/slide.json.es.js +11 -0
- package/dist/components/Slide/locales/slide.json.es.js.map +1 -0
- package/dist/components/Slide/slideI18n.cjs +1 -1
- package/dist/components/Slide/slideI18n.cjs.map +1 -1
- package/dist/components/Slide/slideI18n.d.ts +6 -3
- package/dist/components/Slide/slideI18n.es.js +10 -155
- package/dist/components/Slide/slideI18n.es.js.map +1 -1
- package/dist/components/Slide/useSlide.d.ts +1 -1
- package/dist/components/Slide/utils/appendedMarkerAdvance.d.ts +1 -1
- package/dist/components/Slide/utils/audioSegments.d.ts +1 -1
- package/dist/components/Slide/utils/interactionResolution.d.ts +2 -2
- package/dist/components/Slide/utils/listenModeElementList.d.ts +2 -2
- package/dist/components/Slide/utils/markdownScaling.d.ts +1 -1
- package/dist/components/Slide/utils/playerCustomActions.d.ts +2 -2
- package/dist/components/Slide/utils/playerKeyboardShortcuts.cjs +1 -1
- package/dist/components/Slide/utils/playerKeyboardShortcuts.cjs.map +1 -1
- package/dist/components/Slide/utils/playerKeyboardShortcuts.d.ts +1 -1
- package/dist/components/Slide/utils/playerKeyboardShortcuts.es.js +20 -20
- package/dist/components/Slide/utils/playerKeyboardShortcuts.es.js.map +1 -1
- package/dist/components/Slide/utils/runStreamFixture.d.ts +1 -1
- package/dist/components/Slide/utils/segmentSeek.d.ts +1 -1
- package/dist/components/Slide/utils/silentStepAutoAdvance.d.ts +1 -1
- package/dist/components/Slide/utils/streamingNavigation.d.ts +1 -1
- package/dist/components/Slide/utils/subtitleCue.d.ts +1 -1
- package/dist/components/Slide/utils/subtitleJumpNavigation.d.ts +1 -1
- package/dist/components/index.d.ts +22 -18
- package/dist/components/ui/button.cjs +1 -1
- package/dist/components/ui/button.cjs.map +1 -1
- package/dist/components/ui/button.es.js +12 -13
- package/dist/components/ui/button.es.js.map +1 -1
- package/dist/components/ui/checkbox.cjs +1 -1
- package/dist/components/ui/checkbox.cjs.map +1 -1
- package/dist/components/ui/checkbox.es.js +35 -35
- package/dist/components/ui/checkbox.es.js.map +1 -1
- package/dist/components/ui/dialog.cjs +1 -1
- package/dist/components/ui/dialog.cjs.map +1 -1
- package/dist/components/ui/dialog.d.ts +5 -1
- package/dist/components/ui/dialog.es.js +37 -37
- package/dist/components/ui/dialog.es.js.map +1 -1
- package/dist/components/ui/input.cjs +1 -1
- package/dist/components/ui/input.cjs.map +1 -1
- package/dist/components/ui/input.es.js +4 -4
- package/dist/components/ui/input.es.js.map +1 -1
- package/dist/components/ui/inputGroup/button.cjs +1 -1
- package/dist/components/ui/inputGroup/button.cjs.map +1 -1
- package/dist/components/ui/inputGroup/button.es.js +9 -10
- package/dist/components/ui/inputGroup/button.es.js.map +1 -1
- package/dist/components/ui/inputGroup/input-group.cjs +1 -1
- package/dist/components/ui/inputGroup/input-group.cjs.map +1 -1
- package/dist/components/ui/inputGroup/input-group.d.ts +1 -1
- package/dist/components/ui/inputGroup/input-group.es.js +10 -10
- package/dist/components/ui/inputGroup/input-group.es.js.map +1 -1
- package/dist/components/ui/inputGroup/textarea.cjs +1 -1
- package/dist/components/ui/inputGroup/textarea.cjs.map +1 -1
- package/dist/components/ui/inputGroup/textarea.es.js +3 -3
- package/dist/components/ui/inputGroup/textarea.es.js.map +1 -1
- package/dist/components/ui/loading-overlay-card.cjs +2 -2
- package/dist/components/ui/loading-overlay-card.cjs.map +1 -1
- package/dist/components/ui/loading-overlay-card.es.js +11 -11
- package/dist/components/ui/loading-overlay-card.es.js.map +1 -1
- package/dist/components/ui/popover.cjs +1 -1
- package/dist/components/ui/popover.cjs.map +1 -1
- package/dist/components/ui/popover.es.js +6 -6
- package/dist/components/ui/popover.es.js.map +1 -1
- package/dist/components/ui/tooltip.cjs +1 -1
- package/dist/components/ui/tooltip.cjs.map +1 -1
- package/dist/components/ui/tooltip.es.js +16 -16
- package/dist/components/ui/tooltip.es.js.map +1 -1
- package/dist/editor.d.ts +2 -2
- package/dist/fonts/KaTeX_AMS-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_AMS-Regular.woff +0 -0
- package/dist/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- package/dist/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- package/dist/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/dist/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Main-Bold.ttf +0 -0
- package/dist/fonts/KaTeX_Main-Bold.woff +0 -0
- package/dist/fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/dist/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- package/dist/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- package/dist/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/dist/fonts/KaTeX_Main-Italic.ttf +0 -0
- package/dist/fonts/KaTeX_Main-Italic.woff +0 -0
- package/dist/fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/dist/fonts/KaTeX_Main-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Main-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- package/dist/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- package/dist/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/dist/fonts/KaTeX_Math-Italic.ttf +0 -0
- package/dist/fonts/KaTeX_Math-Italic.woff +0 -0
- package/dist/fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/dist/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- package/dist/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- package/dist/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/dist/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- package/dist/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- package/dist/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/dist/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- package/dist/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Script-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Script-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Size1-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Size1-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Size2-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Size2-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Size3-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Size3-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Size4-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Size4-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.es.js +22 -19
- package/dist/index.es.js.map +1 -1
- package/dist/lib/locale.cjs +1 -1
- package/dist/lib/locale.cjs.map +1 -1
- package/dist/lib/locale.d.ts +5 -1
- package/dist/lib/locale.es.js +26 -13
- package/dist/lib/locale.es.js.map +1 -1
- package/dist/lib/locale.test.d.ts +1 -0
- package/dist/lib/useDetachedLanguage.cjs +2 -0
- package/dist/lib/useDetachedLanguage.cjs.map +1 -0
- package/dist/lib/useDetachedLanguage.d.ts +3 -0
- package/dist/lib/useDetachedLanguage.es.js +25 -0
- package/dist/lib/useDetachedLanguage.es.js.map +1 -0
- package/dist/lib/useResolvedDirection.cjs +2 -0
- package/dist/lib/useResolvedDirection.cjs.map +1 -0
- package/dist/lib/useResolvedDirection.d.ts +6 -0
- package/dist/lib/useResolvedDirection.es.js +37 -0
- package/dist/lib/useResolvedDirection.es.js.map +1 -0
- package/dist/markdown-flow-ui-lib.css +1 -1
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.es.js +6 -6
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-context/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-context/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-context/dist/index.es.js +21 -21
- package/dist/node_modules/@radix-ui/react-context/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.cjs +2 -2
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.es.js +100 -100
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.es.js +38 -38
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.es.js +9 -9
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-popover/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-popover/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-popover/dist/index.es.js +95 -95
- package/dist/node_modules/@radix-ui/react-popover/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-popper/dist/index.es.js +48 -48
- package/dist/node_modules/@radix-ui/react-popper/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-portal/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-portal/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-portal/dist/index.es.js +6 -6
- package/dist/node_modules/@radix-ui/react-portal/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.es.js +9 -9
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-slot/dist/index.es.js +17 -17
- package/dist/node_modules/@radix-ui/react-slot/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.es.js +100 -100
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.es.js +6 -6
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.es.js.map +1 -1
- package/dist/node_modules/@uiw/react-codemirror/esm/index.cjs +1 -1
- package/dist/node_modules/@uiw/react-codemirror/esm/index.cjs.map +1 -1
- package/dist/node_modules/@uiw/react-codemirror/esm/index.es.js +27 -27
- package/dist/node_modules/@uiw/react-codemirror/esm/index.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/{chevron-down.cjs → chevrons-down.cjs} +2 -2
- package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-down.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/{chevron-down.es.js → chevrons-down.es.js} +6 -3
- package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-down.es.js.map +1 -0
- package/dist/node_modules/rc-input/es/BaseInput.cjs +1 -1
- package/dist/node_modules/rc-input/es/BaseInput.es.js +1 -1
- package/dist/node_modules/rc-textarea/es/ResizableTextArea.cjs +1 -1
- package/dist/node_modules/rc-textarea/es/ResizableTextArea.es.js +1 -1
- package/dist/node_modules/rc-textarea/es/TextArea.cjs +1 -1
- package/dist/node_modules/rc-textarea/es/TextArea.es.js +1 -1
- package/dist/node_modules/rc-textarea/es/index.cjs +1 -1
- package/dist/node_modules/rc-textarea/es/index.es.js +1 -1
- package/dist/node_modules/react-markdown/lib/index.cjs +1 -1
- package/dist/node_modules/react-markdown/lib/index.cjs.map +1 -1
- package/dist/node_modules/react-markdown/lib/index.es.js +39 -39
- package/dist/node_modules/react-markdown/lib/index.es.js.map +1 -1
- package/dist/node_modules/remark-flow/dist/interaction-plugin-core.cjs +1 -1
- package/dist/node_modules/remark-flow/dist/interaction-plugin-core.es.js +1 -1
- package/dist/renderer.cjs +1 -1
- package/dist/renderer.d.ts +18 -17
- package/dist/renderer.es.js +20 -17
- package/dist/renderer.es.js.map +1 -1
- package/dist/scroll.cjs +2 -0
- package/dist/scroll.cjs.map +1 -0
- package/dist/scroll.d.ts +6 -0
- package/dist/scroll.es.js +9 -0
- package/dist/scroll.es.js.map +1 -0
- package/dist/slide.d.ts +3 -3
- package/package.json +13 -2
- package/dist/_virtual/jsx-runtime.cjs +0 -2
- package/dist/_virtual/jsx-runtime.cjs.map +0 -1
- package/dist/_virtual/jsx-runtime.es.js +0 -6
- package/dist/_virtual/jsx-runtime.es.js.map +0 -1
- package/dist/_virtual/jsx-runtime.es2.js +0 -5
- package/dist/_virtual/jsx-runtime.es2.js.map +0 -1
- package/dist/_virtual/jsx-runtime2.cjs +0 -2
- package/dist/_virtual/jsx-runtime2.cjs.map +0 -1
- package/dist/_virtual/react-jsx-runtime.development.cjs +0 -2
- package/dist/_virtual/react-jsx-runtime.development.cjs.map +0 -1
- package/dist/_virtual/react-jsx-runtime.development.es.js +0 -5
- package/dist/_virtual/react-jsx-runtime.development.es.js.map +0 -1
- package/dist/_virtual/react-jsx-runtime.production.cjs +0 -2
- package/dist/_virtual/react-jsx-runtime.production.cjs.map +0 -1
- package/dist/_virtual/react-jsx-runtime.production.es.js +0 -5
- package/dist/_virtual/react-jsx-runtime.production.es.js.map +0 -1
- package/dist/lib/localeTextMap.cjs +0 -2
- package/dist/lib/localeTextMap.cjs.map +0 -1
- package/dist/lib/localeTextMap.es.js +0 -5
- package/dist/lib/localeTextMap.es.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.cjs.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.es.js.map +0 -1
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs +0 -24
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs.map +0 -1
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.es.js +0 -409
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.es.js.map +0 -1
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.cjs +0 -10
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.cjs.map +0 -1
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.es.js +0 -36
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.es.js.map +0 -1
- package/dist/node_modules/react/jsx-runtime.cjs +0 -2
- package/dist/node_modules/react/jsx-runtime.cjs.map +0 -1
- package/dist/node_modules/react/jsx-runtime.es.js +0 -11
- 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("
|
|
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
|
|
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":"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"}
|
|
@@ -1,120 +1,121 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Button as
|
|
3
|
-
import { Input as
|
|
4
|
-
import { useContext as
|
|
5
|
-
import
|
|
6
|
-
import { biliVideoUrlRegexp as
|
|
7
|
-
import { useTranslation as
|
|
8
|
-
const
|
|
9
|
-
const { t
|
|
10
|
-
(e) =>
|
|
11
|
-
[
|
|
12
|
-
),
|
|
13
|
-
if (
|
|
14
|
-
|
|
15
|
-
|
|
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 =
|
|
23
|
-
if (
|
|
24
|
-
|
|
22
|
+
const e = V(i);
|
|
23
|
+
if (h.current === e) {
|
|
24
|
+
x();
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
},
|
|
27
|
+
C(e), h.current = e;
|
|
28
|
+
}, B = () => {
|
|
29
29
|
if (!l)
|
|
30
30
|
return;
|
|
31
|
-
const e =
|
|
31
|
+
const e = f.trim() || P(i);
|
|
32
32
|
try {
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
resourceUrl:
|
|
33
|
+
const s = new URL(i).toString();
|
|
34
|
+
u({
|
|
35
|
+
resourceUrl: s,
|
|
36
36
|
resourceTitle: e
|
|
37
37
|
});
|
|
38
|
-
} catch (
|
|
39
|
-
console.log("error",
|
|
38
|
+
} catch (s) {
|
|
39
|
+
console.log("error", s), u({ resourceUrl: i, resourceTitle: e });
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
m(!1);
|
|
42
42
|
}, E = () => {
|
|
43
|
-
|
|
44
|
-
},
|
|
45
|
-
|
|
43
|
+
m(!1);
|
|
44
|
+
}, x = () => {
|
|
45
|
+
p.current;
|
|
46
46
|
};
|
|
47
|
-
return
|
|
48
|
-
l && setTimeout(
|
|
49
|
-
}, [l]), /* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
|
|
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
|
-
|
|
59
|
-
|
|
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__ */
|
|
67
|
-
|
|
67
|
+
/* @__PURE__ */ r(
|
|
68
|
+
a,
|
|
68
69
|
{
|
|
69
70
|
className: "h-8",
|
|
70
71
|
variant: "outline",
|
|
71
72
|
type: "button",
|
|
72
|
-
onClick:
|
|
73
|
-
children:
|
|
73
|
+
onClick: k,
|
|
74
|
+
children: t("videoRunButton", "Preview")
|
|
74
75
|
}
|
|
75
76
|
)
|
|
76
77
|
] }),
|
|
77
|
-
!!
|
|
78
|
+
!!v && /* @__PURE__ */ r("p", { className: "text-xs text-destructive", children: v })
|
|
78
79
|
] }),
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
|
|
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:
|
|
85
|
-
onChange: (e) =>
|
|
86
|
-
placeholder:
|
|
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__ */
|
|
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__ */
|
|
96
|
+
children: l ? /* @__PURE__ */ r(
|
|
96
97
|
"iframe",
|
|
97
98
|
{
|
|
98
|
-
ref:
|
|
99
|
-
title: "
|
|
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__ */
|
|
106
|
-
/* @__PURE__ */
|
|
107
|
-
/* @__PURE__ */
|
|
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__ */
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
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
|
|
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 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":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
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":"
|
|
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 {
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { cn as
|
|
4
|
-
const
|
|
5
|
-
({ className: o, size:
|
|
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:
|
|
11
|
-
height:
|
|
10
|
+
width: a,
|
|
11
|
+
height: a,
|
|
12
12
|
viewBox: "0 0 1024 1024",
|
|
13
13
|
fill: "currentColor",
|
|
14
|
-
className:
|
|
15
|
-
...
|
|
14
|
+
className: i("lucide lucide-button-icon", o),
|
|
15
|
+
...t,
|
|
16
16
|
children: [
|
|
17
|
-
/* @__PURE__ */
|
|
18
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
23
|
+
l.displayName = "ButtonIcon";
|
|
24
24
|
export {
|
|
25
|
-
|
|
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,
|
|
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("
|
|
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":"
|
|
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 {
|
|
1
|
+
import { jsxs as a, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as t } from "react";
|
|
3
|
-
import { cn as
|
|
4
|
-
const
|
|
5
|
-
({ className:
|
|
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:
|
|
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:
|
|
17
|
+
className: i("lucide lucide-search-braces", c),
|
|
18
18
|
...o,
|
|
19
19
|
children: [
|
|
20
|
-
/* @__PURE__ */ r
|
|
21
|
-
/* @__PURE__ */ r
|
|
22
|
-
/* @__PURE__ */ r
|
|
23
|
-
/* @__PURE__ */ r
|
|
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
|
-
|
|
28
|
+
n.displayName = "SearchBracesIcon";
|
|
29
29
|
export {
|
|
30
|
-
|
|
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,
|
|
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,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"),
|
|
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":"
|
|
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"}
|