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