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,4 +1,4 @@
|
|
|
1
|
-
import { MarkdownFlowLocale } from '../../lib/locale';
|
|
1
|
+
import { MarkdownFlowLocale } from '../../lib/locale.js';
|
|
2
2
|
export interface ContentRenderLocaleTexts {
|
|
3
3
|
confirmButtonText: string;
|
|
4
4
|
copyButtonText: string;
|
|
@@ -10,6 +10,11 @@ export interface ContentRenderLocaleTexts {
|
|
|
10
10
|
sandboxExitFullscreenButtonText: string;
|
|
11
11
|
sendButtonLabel: string;
|
|
12
12
|
scrollToBottomLabel: string;
|
|
13
|
+
mermaidLoadingText: string;
|
|
14
|
+
mermaidEmptyChartText: string;
|
|
15
|
+
mermaidErrorText: string;
|
|
16
|
+
footnoteLabel: string;
|
|
17
|
+
footnoteBackLabel: string;
|
|
13
18
|
}
|
|
14
19
|
export declare const CONTENT_RENDER_LOCALE_TEXTS: Record<MarkdownFlowLocale, ContentRenderLocaleTexts>;
|
|
15
20
|
export declare const getContentRenderLocaleTexts: (locale?: string | null) => ContentRenderLocaleTexts;
|
|
@@ -1,59 +1,8 @@
|
|
|
1
|
-
import { normalizeMarkdownFlowLocale as
|
|
2
|
-
import
|
|
3
|
-
const r = [
|
|
4
|
-
"confirmButtonText",
|
|
5
|
-
"copyButtonText",
|
|
6
|
-
"copiedButtonText",
|
|
7
|
-
"sandboxLoadingText",
|
|
8
|
-
"sandboxStyleLoadingText",
|
|
9
|
-
"sandboxScriptLoadingText",
|
|
10
|
-
"sandboxFullscreenButtonText",
|
|
11
|
-
"sandboxExitFullscreenButtonText",
|
|
12
|
-
"sendButtonLabel",
|
|
13
|
-
"scrollToBottomLabel"
|
|
14
|
-
], t = (e) => n(
|
|
15
|
-
r,
|
|
16
|
-
e
|
|
17
|
-
), i = {
|
|
18
|
-
"en-US": t([
|
|
19
|
-
"Submit",
|
|
20
|
-
"Copy",
|
|
21
|
-
"Copied",
|
|
22
|
-
"Loading content...",
|
|
23
|
-
"Building styles...",
|
|
24
|
-
"Building scripts cache...",
|
|
25
|
-
"Fullscreen",
|
|
26
|
-
"Exit fullscreen",
|
|
27
|
-
"Send",
|
|
28
|
-
"Scroll to bottom"
|
|
29
|
-
]),
|
|
30
|
-
"fr-FR": t([
|
|
31
|
-
"Soumettre",
|
|
32
|
-
"Copier",
|
|
33
|
-
"Copié",
|
|
34
|
-
"Chargement du contenu...",
|
|
35
|
-
"Génération des styles...",
|
|
36
|
-
"Génération du cache des scripts...",
|
|
37
|
-
"Plein écran",
|
|
38
|
-
"Quitter le plein écran",
|
|
39
|
-
"Envoyer",
|
|
40
|
-
"Faire défiler jusqu'en bas"
|
|
41
|
-
]),
|
|
42
|
-
"zh-CN": t([
|
|
43
|
-
"提交",
|
|
44
|
-
"复制",
|
|
45
|
-
"已复制",
|
|
46
|
-
"正在加载内容...",
|
|
47
|
-
"正在生成样式...",
|
|
48
|
-
"正在生成脚本缓存...",
|
|
49
|
-
"全屏浏览",
|
|
50
|
-
"退出全屏",
|
|
51
|
-
"发送",
|
|
52
|
-
"滚动到底部"
|
|
53
|
-
])
|
|
54
|
-
}, c = (e) => i[o(e)];
|
|
1
|
+
import { normalizeMarkdownFlowLocale as e } from "../../lib/locale.es.js";
|
|
2
|
+
import t from "./locales/contentRender.json.es.js";
|
|
3
|
+
const r = t, T = (o) => r[e(o)];
|
|
55
4
|
export {
|
|
56
|
-
|
|
57
|
-
|
|
5
|
+
r as CONTENT_RENDER_LOCALE_TEXTS,
|
|
6
|
+
T as getContentRenderLocaleTexts
|
|
58
7
|
};
|
|
59
8
|
//# sourceMappingURL=contentRenderI18n.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contentRenderI18n.es.js","sources":["../../../src/components/ContentRender/contentRenderI18n.ts"],"sourcesContent":["import {\n normalizeMarkdownFlowLocale,\n type MarkdownFlowLocale,\n} from \"../../lib/locale\";\nimport
|
|
1
|
+
{"version":3,"file":"contentRenderI18n.es.js","sources":["../../../src/components/ContentRender/contentRenderI18n.ts"],"sourcesContent":["import {\n normalizeMarkdownFlowLocale,\n type MarkdownFlowLocale,\n} from \"../../lib/locale\";\nimport localeTexts from \"./locales/contentRender.json\";\n\nexport interface ContentRenderLocaleTexts {\n confirmButtonText: string;\n copyButtonText: string;\n copiedButtonText: string;\n sandboxLoadingText: string;\n sandboxStyleLoadingText: string;\n sandboxScriptLoadingText: string;\n sandboxFullscreenButtonText: string;\n sandboxExitFullscreenButtonText: string;\n sendButtonLabel: string;\n scrollToBottomLabel: string;\n mermaidLoadingText: string;\n mermaidEmptyChartText: string;\n mermaidErrorText: string;\n footnoteLabel: string;\n footnoteBackLabel: string;\n}\n\nexport const CONTENT_RENDER_LOCALE_TEXTS: Record<\n MarkdownFlowLocale,\n ContentRenderLocaleTexts\n> = localeTexts;\n\nexport const getContentRenderLocaleTexts = (\n locale?: string | null\n): ContentRenderLocaleTexts =>\n CONTENT_RENDER_LOCALE_TEXTS[normalizeMarkdownFlowLocale(locale)];\n"],"names":["CONTENT_RENDER_LOCALE_TEXTS","localeTexts","getContentRenderLocaleTexts","locale","normalizeMarkdownFlowLocale"],"mappings":";;AAwBO,MAAMA,IAGTC,GAESC,IAA8B,CACzCC,MAEAH,EAA4BI,EAA4BD,CAAM,CAAC;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./ContentRender.cjs");require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./ContentRender.cjs");require("react/jsx-runtime");require("react");require("react-dom/client");require("../ui/inputGroup/input-group.cjs");exports.ContentRender=e.default;exports.default=e.default;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { default as ContentRender } from './ContentRender';
|
|
1
|
+
import { default as ContentRender } from './ContentRender.js';
|
|
2
2
|
export default ContentRender;
|
|
3
|
-
export { default as IframeSandbox } from './IframeSandbox';
|
|
4
|
-
export type { IframeSandboxProps } from './IframeSandbox';
|
|
5
|
-
export type { SandboxAppProps } from './SandboxApp';
|
|
6
|
-
export type { RenderSegment } from './utils/split-content';
|
|
7
|
-
export { splitContentSegments } from './utils/split-content';
|
|
8
|
-
export { default as ContentRender } from './ContentRender';
|
|
9
|
-
export type { ContentRenderProps } from './ContentRender';
|
|
10
|
-
export type { MarkdownFlowLocale } from '../../lib/locale';
|
|
11
|
-
export { default as MarkdownFlowInput } from './MarkdownFlowInput';
|
|
12
|
-
export type { MarkdownFlowInputProps } from './MarkdownFlowInput';
|
|
3
|
+
export { default as IframeSandbox } from './IframeSandbox.js';
|
|
4
|
+
export type { IframeSandboxProps } from './IframeSandbox.js';
|
|
5
|
+
export type { SandboxAppProps } from './SandboxApp.js';
|
|
6
|
+
export type { RenderSegment } from './utils/split-content.js';
|
|
7
|
+
export { splitContentSegments } from './utils/split-content.js';
|
|
8
|
+
export { default as ContentRender } from './ContentRender.js';
|
|
9
|
+
export type { ContentRenderProps, ContentRenderTypewriterPacing, ContentRenderTypewriterState, } from './ContentRender.js';
|
|
10
|
+
export type { MarkdownFlowLocale } from '../../lib/locale.js';
|
|
11
|
+
export { default as MarkdownFlowInput } from './MarkdownFlowInput.js';
|
|
12
|
+
export type { MarkdownFlowInputProps } from './MarkdownFlowInput.js';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import o from "./ContentRender.es.js";
|
|
2
|
-
import "
|
|
2
|
+
import "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
4
|
import "react-dom/client";
|
|
5
|
-
import "./contentRenderI18n.es.js";
|
|
6
5
|
import "../ui/inputGroup/input-group.es.js";
|
|
7
6
|
export {
|
|
8
7
|
o as ContentRender,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={"en-US":{confirmButtonText:"Submit",copyButtonText:"Copy",copiedButtonText:"Copied",sandboxLoadingText:"Loading content...",sandboxStyleLoadingText:"Building styles...",sandboxScriptLoadingText:"Building scripts cache...",sandboxFullscreenButtonText:"Fullscreen",sandboxExitFullscreenButtonText:"Exit fullscreen",sendButtonLabel:"Send",scrollToBottomLabel:"Scroll to bottom",mermaidLoadingText:"Loading Mermaid chart...",mermaidEmptyChartText:"Empty chart content",mermaidErrorText:"Unable to display the Mermaid chart",footnoteLabel:"Footnotes",footnoteBackLabel:"Back to reference {reference}"},"fr-FR":{confirmButtonText:"Soumettre",copyButtonText:"Copier",copiedButtonText:"Copié",sandboxLoadingText:"Chargement du contenu...",sandboxStyleLoadingText:"Génération des styles...",sandboxScriptLoadingText:"Génération du cache des scripts...",sandboxFullscreenButtonText:"Plein écran",sandboxExitFullscreenButtonText:"Quitter le plein écran",sendButtonLabel:"Envoyer",scrollToBottomLabel:"Faire défiler jusqu'en bas",mermaidLoadingText:"Chargement du diagramme Mermaid...",mermaidEmptyChartText:"Le diagramme est vide",mermaidErrorText:"Impossible d’afficher le diagramme Mermaid",footnoteLabel:"Notes de bas de page",footnoteBackLabel:"Retour à la référence {reference}"},"zh-CN":{confirmButtonText:"提交",copyButtonText:"复制",copiedButtonText:"已复制",sandboxLoadingText:"正在加载内容...",sandboxStyleLoadingText:"正在生成样式...",sandboxScriptLoadingText:"正在生成脚本缓存...",sandboxFullscreenButtonText:"全屏浏览",sandboxExitFullscreenButtonText:"退出全屏",sendButtonLabel:"发送",scrollToBottomLabel:"滚动到底部",mermaidLoadingText:"正在加载 Mermaid 图表...",mermaidEmptyChartText:"图表内容为空",mermaidErrorText:"无法显示 Mermaid 图表",footnoteLabel:"脚注",footnoteBackLabel:"返回正文引用 {reference}"},"ar-SA":{confirmButtonText:"إرسال",copyButtonText:"نسخ",copiedButtonText:"تم النسخ",sandboxLoadingText:"جارٍ تحميل المحتوى...",sandboxStyleLoadingText:"جارٍ إنشاء الأنماط...",sandboxScriptLoadingText:"جارٍ إنشاء ذاكرة التخزين المؤقت للبرامج النصية...",sandboxFullscreenButtonText:"ملء الشاشة",sandboxExitFullscreenButtonText:"الخروج من ملء الشاشة",sendButtonLabel:"إرسال",scrollToBottomLabel:"التمرير إلى الأسفل",mermaidLoadingText:"جارٍ تحميل مخطط Mermaid...",mermaidEmptyChartText:"محتوى المخطط فارغ",mermaidErrorText:"تعذّر عرض مخطط Mermaid",footnoteLabel:"الحواشي",footnoteBackLabel:"العودة إلى موضع الإحالة {reference}"},"th-TH":{confirmButtonText:"ส่งคำตอบ",copyButtonText:"คัดลอก",copiedButtonText:"คัดลอกแล้ว",sandboxLoadingText:"กำลังโหลดเนื้อหา...",sandboxStyleLoadingText:"กำลังสร้างสไตล์...",sandboxScriptLoadingText:"กำลังสร้างแคชสคริปต์...",sandboxFullscreenButtonText:"เต็มหน้าจอ",sandboxExitFullscreenButtonText:"ออกจากเต็มหน้าจอ",sendButtonLabel:"ส่ง",scrollToBottomLabel:"เลื่อนไปด้านล่าง",mermaidLoadingText:"กำลังโหลดแผนภาพ Mermaid...",mermaidEmptyChartText:"ไม่มีเนื้อหาในแผนภาพ",mermaidErrorText:"ไม่สามารถแสดงแผนภาพ Mermaid ได้",footnoteLabel:"เชิงอรรถ",footnoteBackLabel:"กลับไปยังจุดอ้างอิง {reference}"}};exports.default=e;
|
|
2
|
+
//# sourceMappingURL=contentRender.json.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contentRender.json.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"en-US": {
|
|
3
|
+
"confirmButtonText": "Submit",
|
|
4
|
+
"copyButtonText": "Copy",
|
|
5
|
+
"copiedButtonText": "Copied",
|
|
6
|
+
"sandboxLoadingText": "Loading content...",
|
|
7
|
+
"sandboxStyleLoadingText": "Building styles...",
|
|
8
|
+
"sandboxScriptLoadingText": "Building scripts cache...",
|
|
9
|
+
"sandboxFullscreenButtonText": "Fullscreen",
|
|
10
|
+
"sandboxExitFullscreenButtonText": "Exit fullscreen",
|
|
11
|
+
"sendButtonLabel": "Send",
|
|
12
|
+
"scrollToBottomLabel": "Scroll to bottom",
|
|
13
|
+
"mermaidLoadingText": "Loading Mermaid chart...",
|
|
14
|
+
"mermaidEmptyChartText": "Empty chart content",
|
|
15
|
+
"mermaidErrorText": "Unable to display the Mermaid chart",
|
|
16
|
+
"footnoteLabel": "Footnotes",
|
|
17
|
+
"footnoteBackLabel": "Back to reference {reference}"
|
|
18
|
+
},
|
|
19
|
+
"fr-FR": {
|
|
20
|
+
"confirmButtonText": "Soumettre",
|
|
21
|
+
"copyButtonText": "Copier",
|
|
22
|
+
"copiedButtonText": "Copié",
|
|
23
|
+
"sandboxLoadingText": "Chargement du contenu...",
|
|
24
|
+
"sandboxStyleLoadingText": "Génération des styles...",
|
|
25
|
+
"sandboxScriptLoadingText": "Génération du cache des scripts...",
|
|
26
|
+
"sandboxFullscreenButtonText": "Plein écran",
|
|
27
|
+
"sandboxExitFullscreenButtonText": "Quitter le plein écran",
|
|
28
|
+
"sendButtonLabel": "Envoyer",
|
|
29
|
+
"scrollToBottomLabel": "Faire défiler jusqu'en bas",
|
|
30
|
+
"mermaidLoadingText": "Chargement du diagramme Mermaid...",
|
|
31
|
+
"mermaidEmptyChartText": "Le diagramme est vide",
|
|
32
|
+
"mermaidErrorText": "Impossible d’afficher le diagramme Mermaid",
|
|
33
|
+
"footnoteLabel": "Notes de bas de page",
|
|
34
|
+
"footnoteBackLabel": "Retour à la référence {reference}"
|
|
35
|
+
},
|
|
36
|
+
"zh-CN": {
|
|
37
|
+
"confirmButtonText": "提交",
|
|
38
|
+
"copyButtonText": "复制",
|
|
39
|
+
"copiedButtonText": "已复制",
|
|
40
|
+
"sandboxLoadingText": "正在加载内容...",
|
|
41
|
+
"sandboxStyleLoadingText": "正在生成样式...",
|
|
42
|
+
"sandboxScriptLoadingText": "正在生成脚本缓存...",
|
|
43
|
+
"sandboxFullscreenButtonText": "全屏浏览",
|
|
44
|
+
"sandboxExitFullscreenButtonText": "退出全屏",
|
|
45
|
+
"sendButtonLabel": "发送",
|
|
46
|
+
"scrollToBottomLabel": "滚动到底部",
|
|
47
|
+
"mermaidLoadingText": "正在加载 Mermaid 图表...",
|
|
48
|
+
"mermaidEmptyChartText": "图表内容为空",
|
|
49
|
+
"mermaidErrorText": "无法显示 Mermaid 图表",
|
|
50
|
+
"footnoteLabel": "脚注",
|
|
51
|
+
"footnoteBackLabel": "返回正文引用 {reference}"
|
|
52
|
+
},
|
|
53
|
+
"ar-SA": {
|
|
54
|
+
"confirmButtonText": "إرسال",
|
|
55
|
+
"copyButtonText": "نسخ",
|
|
56
|
+
"copiedButtonText": "تم النسخ",
|
|
57
|
+
"sandboxLoadingText": "جارٍ تحميل المحتوى...",
|
|
58
|
+
"sandboxStyleLoadingText": "جارٍ إنشاء الأنماط...",
|
|
59
|
+
"sandboxScriptLoadingText": "جارٍ إنشاء ذاكرة التخزين المؤقت للبرامج النصية...",
|
|
60
|
+
"sandboxFullscreenButtonText": "ملء الشاشة",
|
|
61
|
+
"sandboxExitFullscreenButtonText": "الخروج من ملء الشاشة",
|
|
62
|
+
"sendButtonLabel": "إرسال",
|
|
63
|
+
"scrollToBottomLabel": "التمرير إلى الأسفل",
|
|
64
|
+
"mermaidLoadingText": "جارٍ تحميل مخطط Mermaid...",
|
|
65
|
+
"mermaidEmptyChartText": "محتوى المخطط فارغ",
|
|
66
|
+
"mermaidErrorText": "تعذّر عرض مخطط Mermaid",
|
|
67
|
+
"footnoteLabel": "الحواشي",
|
|
68
|
+
"footnoteBackLabel": "العودة إلى موضع الإحالة {reference}"
|
|
69
|
+
},
|
|
70
|
+
"th-TH": {
|
|
71
|
+
"confirmButtonText": "ส่งคำตอบ",
|
|
72
|
+
"copyButtonText": "คัดลอก",
|
|
73
|
+
"copiedButtonText": "คัดลอกแล้ว",
|
|
74
|
+
"sandboxLoadingText": "กำลังโหลดเนื้อหา...",
|
|
75
|
+
"sandboxStyleLoadingText": "กำลังสร้างสไตล์...",
|
|
76
|
+
"sandboxScriptLoadingText": "กำลังสร้างแคชสคริปต์...",
|
|
77
|
+
"sandboxFullscreenButtonText": "เต็มหน้าจอ",
|
|
78
|
+
"sandboxExitFullscreenButtonText": "ออกจากเต็มหน้าจอ",
|
|
79
|
+
"sendButtonLabel": "ส่ง",
|
|
80
|
+
"scrollToBottomLabel": "เลื่อนไปด้านล่าง",
|
|
81
|
+
"mermaidLoadingText": "กำลังโหลดแผนภาพ Mermaid...",
|
|
82
|
+
"mermaidEmptyChartText": "ไม่มีเนื้อหาในแผนภาพ",
|
|
83
|
+
"mermaidErrorText": "ไม่สามารถแสดงแผนภาพ Mermaid ได้",
|
|
84
|
+
"footnoteLabel": "เชิงอรรถ",
|
|
85
|
+
"footnoteBackLabel": "กลับไปยังจุดอ้างอิง {reference}"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
;
|
|
89
|
+
|
|
90
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
"en-US": { confirmButtonText: "Submit", copyButtonText: "Copy", copiedButtonText: "Copied", sandboxLoadingText: "Loading content...", sandboxStyleLoadingText: "Building styles...", sandboxScriptLoadingText: "Building scripts cache...", sandboxFullscreenButtonText: "Fullscreen", sandboxExitFullscreenButtonText: "Exit fullscreen", sendButtonLabel: "Send", scrollToBottomLabel: "Scroll to bottom", mermaidLoadingText: "Loading Mermaid chart...", mermaidEmptyChartText: "Empty chart content", mermaidErrorText: "Unable to display the Mermaid chart", footnoteLabel: "Footnotes", footnoteBackLabel: "Back to reference {reference}" },
|
|
3
|
+
"fr-FR": { confirmButtonText: "Soumettre", copyButtonText: "Copier", copiedButtonText: "Copié", sandboxLoadingText: "Chargement du contenu...", sandboxStyleLoadingText: "Génération des styles...", sandboxScriptLoadingText: "Génération du cache des scripts...", sandboxFullscreenButtonText: "Plein écran", sandboxExitFullscreenButtonText: "Quitter le plein écran", sendButtonLabel: "Envoyer", scrollToBottomLabel: "Faire défiler jusqu'en bas", mermaidLoadingText: "Chargement du diagramme Mermaid...", mermaidEmptyChartText: "Le diagramme est vide", mermaidErrorText: "Impossible d’afficher le diagramme Mermaid", footnoteLabel: "Notes de bas de page", footnoteBackLabel: "Retour à la référence {reference}" },
|
|
4
|
+
"zh-CN": { confirmButtonText: "提交", copyButtonText: "复制", copiedButtonText: "已复制", sandboxLoadingText: "正在加载内容...", sandboxStyleLoadingText: "正在生成样式...", sandboxScriptLoadingText: "正在生成脚本缓存...", sandboxFullscreenButtonText: "全屏浏览", sandboxExitFullscreenButtonText: "退出全屏", sendButtonLabel: "发送", scrollToBottomLabel: "滚动到底部", mermaidLoadingText: "正在加载 Mermaid 图表...", mermaidEmptyChartText: "图表内容为空", mermaidErrorText: "无法显示 Mermaid 图表", footnoteLabel: "脚注", footnoteBackLabel: "返回正文引用 {reference}" },
|
|
5
|
+
"ar-SA": { confirmButtonText: "إرسال", copyButtonText: "نسخ", copiedButtonText: "تم النسخ", sandboxLoadingText: "جارٍ تحميل المحتوى...", sandboxStyleLoadingText: "جارٍ إنشاء الأنماط...", sandboxScriptLoadingText: "جارٍ إنشاء ذاكرة التخزين المؤقت للبرامج النصية...", sandboxFullscreenButtonText: "ملء الشاشة", sandboxExitFullscreenButtonText: "الخروج من ملء الشاشة", sendButtonLabel: "إرسال", scrollToBottomLabel: "التمرير إلى الأسفل", mermaidLoadingText: "جارٍ تحميل مخطط Mermaid...", mermaidEmptyChartText: "محتوى المخطط فارغ", mermaidErrorText: "تعذّر عرض مخطط Mermaid", footnoteLabel: "الحواشي", footnoteBackLabel: "العودة إلى موضع الإحالة {reference}" },
|
|
6
|
+
"th-TH": { confirmButtonText: "ส่งคำตอบ", copyButtonText: "คัดลอก", copiedButtonText: "คัดลอกแล้ว", sandboxLoadingText: "กำลังโหลดเนื้อหา...", sandboxStyleLoadingText: "กำลังสร้างสไตล์...", sandboxScriptLoadingText: "กำลังสร้างแคชสคริปต์...", sandboxFullscreenButtonText: "เต็มหน้าจอ", sandboxExitFullscreenButtonText: "ออกจากเต็มหน้าจอ", sendButtonLabel: "ส่ง", scrollToBottomLabel: "เลื่อนไปด้านล่าง", mermaidLoadingText: "กำลังโหลดแผนภาพ Mermaid...", mermaidEmptyChartText: "ไม่มีเนื้อหาในแผนภาพ", mermaidErrorText: "ไม่สามารถแสดงแผนภาพ Mermaid ได้", footnoteLabel: "เชิงอรรถ", footnoteBackLabel: "กลับไปยังจุดอ้างอิง {reference}" }
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
e as default
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=contentRender.json.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contentRender.json.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),v=require("react"),z=require("../../ui/button.cjs"),J=require("../../ui/checkbox.cjs"),E=require("../MarkdownFlowInput.cjs"),D=require("../../ui/inputGroup/input-group.cjs"),K=require("../../../lib/utils.cjs"),P=require("../contentRenderI18n.cjs"),U=({node:c,readonly:i,selectedValues:e,inputValue:r,confirmButtonText:a,handleCheckboxChange:n,handleInputChange:m,handleKeyDown:x,handleConfirmClick:b})=>{const h=c.properties?.placeholder,u=i||e.length===0&&!r?.trim(),f=p=>s.jsx("span",{className:K.cn("multi-select-confirm-wrapper flex flex-col items-center",u?"opacity-50 cursor-not-allowed":"cursor-pointer",p),children:s.jsx("button",{type:"button",className:"multi-select-confirm-button text-sm font-medium text-primary",disabled:u,onClick:b,children:a})});return s.jsxs("span",{className:"multi-select-container flex w-full flex-col",children:[s.jsx("span",{className:"flex flex-wrap gap-y-[9px] gap-x-6",children:c.properties?.buttonTexts?.map((p,l)=>{const N=c.properties?.buttonValues?.[l],d=N!==void 0?N:p;return s.jsx(J.Checkbox,{label:p,disabled:i,checked:e.includes(d),onCheckedChange:C=>n(d,C),className:"text-sm"},l)})}),h?s.jsx("span",{className:"block mb-1 w-full max-w-[500px]",children:s.jsxs("span",{className:"multi-select-input-row flex w-full items-end gap-3",children:[s.jsx(D.InputGroup,{"data-disabled":i,className:"flex-1",children:s.jsx(D.InputGroupTextarea,{disabled:i,placeholder:h,value:r,onChange:m,onKeyDown:x,className:"text-sm px-3",title:h})}),f("shrink-0")]})}):f("self-start multi-select-confirm-wrapper--stacked")]})},A=({dir:c,lang:i,node:e,readonly:r,locale:a,resolvedDefaultButtonText:n,handleButtonClick:m,inputValue:x,handleInputChange:b,handleSendClick:h})=>s.jsxs("span",{className:"single-select-container inline-flex w-full flex-col",children:[s.jsx("span",{className:"flex flex-wrap gap-y-[9px] gap-x-2",children:e.properties?.buttonTexts?.map((u,f)=>{const p=e.properties?.buttonValues?.[f],l=p!==void 0?p:u;return s.jsx(z.Button,{disabled:r,variant:"outline",type:"button",size:"sm",onClick:()=>m(l),className:K.cn("max-w-full shrink whitespace-normal break-words text-start leading-5 h-auto min-h-8 px-3 py-1.5","hover:bg-gray-200",n===u&&"select"),children:u},f)})}),e.properties?.placeholder&&s.jsx("span",{className:"mt-[9px] mb-1",children:s.jsx(E.default,{dir:c,lang:i,disabled:r,locale:a,placeholder:e.properties.placeholder,value:x,onChange:b,onSend:h,title:e.properties.placeholder})})]}),H=({dir:c,lang:i,readonly:e,locale:r,placeholder:a,value:n,onChange:m,onSend:x})=>a?s.jsx(E.default,{dir:c,lang:i,disabled:e,locale:r,placeholder:a,value:n,onChange:m,onSend:x,title:a}):null,Q=({dir:c,lang:i,node:e,readonly:r,locale:a,defaultButtonText:n,defaultInputText:m,defaultSelectedValues:x,onSend:b,confirmButtonText:h,beforeSend:u=()=>!0})=>{const f=P.getContentRenderLocaleTexts(a),p=h||f.confirmButtonText,[l,N]=v.useState(m||""),[d,C]=v.useState(x||[]),M=JSON.stringify({buttonTexts:e.properties?.buttonTexts,buttonValues:e.properties?.buttonValues,isMultiSelect:e.properties?.isMultiSelect,placeholder:e.properties?.placeholder,variableName:e.properties?.variableName}),g=e.properties?.isMultiSelect??!1,O=e.properties?.buttonTexts||[],V=!g&&O.length===0&&!e.properties?.placeholder,S=e.properties?.variableName?.trim()||n||p,k=v.useMemo(()=>V?{...e,properties:{...e.properties||{},buttonTexts:[S],buttonValues:[S]}}:e,[S,e,V]),j=k.properties?.buttonTexts||[],y=k.properties?.buttonValues||[],q=!g&&j.length>0,R=t=>{const o={variableName:e.properties?.variableName||"",buttonText:t};u?.(o)&&b?.(o)},G=(t,o)=>{C(I=>o?[...I,t]:I.filter(_=>_!==t))},B=()=>{const t=d.length===0&&!l?.trim(),o={variableName:e.properties?.variableName||"",selectedValues:d,inputText:l?.trim()||void 0};r||t||u?.(o)&&b?.(o)},w=t=>{N(t.target.value)},F=t=>{t.nativeEvent.isComposing||t.keyCode===229||t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),g?d.length===0&&!l.trim()||B():T())},T=()=>{const t={variableName:e.properties?.variableName||"",inputText:l};u?.(t)&&b?.(t)},L=v.useMemo(()=>{if(!n)return;const t=y.indexOf(n);if(t>-1)return j[t]??n;const o=j.indexOf(n);if(o>-1)return j[o]},[n,j,y]);return v.useEffect(()=>{N(m||"")},[m,M]),v.useEffect(()=>{C(x||[])},[x,M]),s.jsxs("span",{className:"custom-variable-container inline-flex items-center flex-wrap",children:[g&&s.jsx(U,{node:e,readonly:r,selectedValues:d,inputValue:l,confirmButtonText:p,handleCheckboxChange:G,handleInputChange:w,handleKeyDown:F,handleConfirmClick:B}),!g&&q&&s.jsx(A,{dir:c,lang:i,node:k,readonly:r,locale:a,resolvedDefaultButtonText:L,handleButtonClick:R,inputValue:l,handleInputChange:w,handleSendClick:T}),!g&&!q&&e.properties?.placeholder&&s.jsx(H,{dir:c,lang:i,readonly:r,locale:a,placeholder:e.properties.placeholder,value:l,onChange:w,onSend:T})]})};exports.default=Q;
|
|
2
2
|
//# sourceMappingURL=CustomVariable.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomVariable.cjs","sources":["../../../../src/components/ContentRender/plugins/CustomVariable.tsx"],"sourcesContent":["import React from \"react\";\nimport type { Components } from \"react-markdown\";\nimport { OnSendContentParams } from \"../../types\";\nimport { Button } from \"../../ui/button\";\nimport { Checkbox } from \"../../ui/checkbox\";\nimport MarkdownFlowInput from \"../MarkdownFlowInput\";\nimport {\n InputGroup,\n InputGroupTextarea,\n} from \"../../ui/inputGroup/input-group\";\nimport type { MarkdownFlowLocale } from \"../../../lib/locale\";\nimport { cn } from \"../../../lib/utils\";\nimport { getContentRenderLocaleTexts } from \"../contentRenderI18n\";\n\n// Define custom variable node type\ninterface CustomVariableNode {\n tagName: \"custom-variable\";\n properties?: {\n variableName?: string;\n buttonTexts?: string[];\n buttonValues?: string[];\n placeholder?: string;\n isMultiSelect?: boolean;\n };\n}\n\n// Define custom variable component Props type\ninterface CustomVariableProps {\n node: CustomVariableNode;\n defaultButtonText?: string;\n defaultInputText?: string;\n defaultSelectedValues?: string[];\n locale?: MarkdownFlowLocale;\n readonly?: boolean;\n onSend?: (content: OnSendContentParams) => void;\n // Multi-select confirm button text (i18n support)\n confirmButtonText?: string;\n beforeSend?: (param: OnSendContentParams) => boolean;\n}\n\ninterface ComponentsWithCustomVariable extends Components {\n \"custom-variable\"?: React.ComponentType<CustomVariableProps>;\n}\n\n// Multi select section( with checkboxes and input)\ninterface MultiSelectSectionProps {\n node: CustomVariableNode;\n readonly?: boolean;\n selectedValues: string[];\n inputValue: string;\n confirmButtonText: string;\n handleCheckboxChange: (value: string, checked: boolean) => void;\n handleInputChange: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;\n handleKeyDown: (event: React.KeyboardEvent<HTMLTextAreaElement>) => void;\n handleConfirmClick: () => void;\n}\n\nconst MultiSelectSection = ({\n node,\n readonly,\n selectedValues,\n inputValue,\n confirmButtonText,\n handleCheckboxChange,\n handleInputChange,\n handleKeyDown,\n handleConfirmClick,\n}: MultiSelectSectionProps) => {\n const placeholder = node.properties?.placeholder;\n const confirmDisabled =\n readonly || (selectedValues.length === 0 && !inputValue?.trim());\n\n const renderConfirmButton = (extraWrapperClassName?: string) => (\n <span\n className={cn(\n \"multi-select-confirm-wrapper flex flex-col items-center\",\n confirmDisabled ? \"opacity-50 cursor-not-allowed\" : \"cursor-pointer\",\n extraWrapperClassName\n )}\n >\n <button\n type=\"button\"\n className=\"multi-select-confirm-button text-sm font-medium text-primary\"\n disabled={confirmDisabled}\n onClick={handleConfirmClick}\n >\n {confirmButtonText}\n </button>\n </span>\n );\n\n return (\n <span className=\"multi-select-container flex w-full flex-col\">\n <span className=\"flex flex-wrap gap-y-[9px] gap-x-6\">\n {node.properties?.buttonTexts?.map((text, index) => {\n const value = node.properties?.buttonValues?.[index];\n const buttonValue = value !== undefined ? value : text;\n return (\n <Checkbox\n key={index}\n label={text}\n disabled={readonly}\n checked={selectedValues.includes(buttonValue)}\n onCheckedChange={(checked) =>\n handleCheckboxChange(buttonValue, checked)\n }\n className=\"text-sm\"\n />\n );\n })}\n </span>\n {placeholder ? (\n <span className=\"block mb-1 w-full max-w-[500px]\">\n <span className=\"multi-select-input-row flex w-full items-end gap-3\">\n <InputGroup data-disabled={readonly} className=\"flex-1\">\n <InputGroupTextarea\n disabled={readonly}\n placeholder={placeholder}\n value={inputValue}\n onChange={handleInputChange}\n onKeyDown={handleKeyDown}\n className=\"text-sm px-3\"\n title={placeholder}\n />\n </InputGroup>\n {renderConfirmButton(\"shrink-0\")}\n </span>\n </span>\n ) : (\n renderConfirmButton(\"self-start multi-select-confirm-wrapper--stacked\")\n )}\n </span>\n );\n};\n\n// Single select section( with buttons and input)\ninterface SingleSelectSectionProps {\n node: CustomVariableNode;\n readonly?: boolean;\n locale?: MarkdownFlowLocale;\n resolvedDefaultButtonText?: string;\n handleButtonClick: (value: string) => void;\n inputValue: string;\n handleInputChange: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;\n handleSendClick: () => void;\n}\n\nconst SingleSelectSection = ({\n node,\n readonly,\n locale,\n resolvedDefaultButtonText,\n handleButtonClick,\n inputValue,\n handleInputChange,\n handleSendClick,\n}: SingleSelectSectionProps) => (\n <span className=\"single-select-container inline-flex w-full flex-col\">\n <span className=\"flex flex-wrap gap-y-[9px] gap-x-2\">\n {node.properties?.buttonTexts?.map((text, index) => {\n const value = node.properties?.buttonValues?.[index];\n const buttonValue = value !== undefined ? value : text;\n return (\n <Button\n key={index}\n disabled={readonly}\n variant=\"outline\"\n type=\"button\"\n size=\"sm\"\n onClick={() => handleButtonClick(buttonValue)}\n className={cn(\n \"max-w-full shrink whitespace-normal break-words text-left leading-5 h-auto min-h-8 px-3 py-1.5\",\n \"hover:bg-gray-200\",\n resolvedDefaultButtonText === text && \"select\"\n )}\n >\n {text}\n </Button>\n );\n })}\n </span>\n {node.properties?.placeholder && (\n <span className=\"mt-[9px] mb-1\">\n <MarkdownFlowInput\n disabled={readonly}\n locale={locale}\n placeholder={node.properties.placeholder}\n value={inputValue}\n onChange={handleInputChange}\n onSend={handleSendClick}\n title={node.properties.placeholder}\n />\n </span>\n )}\n </span>\n);\n\n// Pure input\ninterface InputSectionProps {\n readonly?: boolean;\n locale?: MarkdownFlowLocale;\n placeholder?: string;\n value: string;\n onChange: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;\n onSend: () => void;\n}\n\nconst InputSection = ({\n readonly,\n locale,\n placeholder,\n value,\n onChange,\n onSend,\n}: InputSectionProps) => {\n if (!placeholder) {\n return null;\n }\n\n return (\n <MarkdownFlowInput\n disabled={readonly}\n locale={locale}\n placeholder={placeholder}\n value={value}\n onChange={onChange}\n onSend={onSend}\n title={placeholder}\n />\n );\n};\n\n// Define custom variable component\nconst CustomButtonInputVariable = ({\n node,\n readonly,\n locale,\n defaultButtonText,\n defaultInputText,\n defaultSelectedValues,\n onSend,\n confirmButtonText,\n beforeSend = () => true,\n}: CustomVariableProps) => {\n const localeTexts = getContentRenderLocaleTexts(locale);\n const resolvedConfirmButtonText =\n confirmButtonText || localeTexts.confirmButtonText;\n const [inputValue, setInputValue] = React.useState(defaultInputText || \"\");\n const [selectedValues, setSelectedValues] = React.useState<string[]>(\n defaultSelectedValues || []\n );\n const interactionDefinitionKey = JSON.stringify({\n buttonTexts: node.properties?.buttonTexts,\n buttonValues: node.properties?.buttonValues,\n isMultiSelect: node.properties?.isMultiSelect,\n placeholder: node.properties?.placeholder,\n variableName: node.properties?.variableName,\n });\n const isMultiSelect = node.properties?.isMultiSelect ?? false;\n const baseButtonTexts = node.properties?.buttonTexts || [];\n const shouldUseFallbackButton =\n !isMultiSelect &&\n baseButtonTexts.length === 0 &&\n !node.properties?.placeholder;\n const fallbackButtonLabel =\n node.properties?.variableName?.trim() ||\n defaultButtonText ||\n resolvedConfirmButtonText;\n\n const singleSelectNode = React.useMemo<CustomVariableNode>(() => {\n if (!shouldUseFallbackButton) {\n return node;\n }\n return {\n ...node,\n properties: {\n ...(node.properties || {}),\n buttonTexts: [fallbackButtonLabel],\n buttonValues: [fallbackButtonLabel],\n },\n };\n }, [fallbackButtonLabel, node, shouldUseFallbackButton]);\n\n const singleSelectButtonTexts =\n singleSelectNode.properties?.buttonTexts || [];\n const singleSelectButtonValues =\n singleSelectNode.properties?.buttonValues || [];\n const isSingleSelect = !isMultiSelect && singleSelectButtonTexts.length > 0;\n\n const handleButtonClick = (value: string) => {\n const param = {\n variableName: node.properties?.variableName || \"\",\n buttonText: value,\n };\n if (!beforeSend?.(param)) return;\n onSend?.(param);\n };\n\n const handleCheckboxChange = (value: string, checked: boolean) => {\n setSelectedValues((prev) => {\n if (checked) {\n return [...prev, value];\n } else {\n return prev.filter((v) => v !== value);\n }\n });\n };\n\n const handleConfirmClick = () => {\n const noSelection = selectedValues.length === 0 && !inputValue?.trim();\n const param = {\n variableName: node.properties?.variableName || \"\",\n selectedValues,\n inputText: inputValue?.trim() || undefined,\n };\n if (readonly || noSelection) return;\n if (!beforeSend?.(param)) return;\n onSend?.(param);\n };\n\n const handleInputChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n setInputValue(e.target.value);\n };\n const handleKeyDown = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.nativeEvent.isComposing || e.keyCode === 229) {\n return;\n }\n if (e.key === \"Enter\" && !e.shiftKey) {\n e.preventDefault();\n if (isMultiSelect) {\n const noSelection = selectedValues.length === 0 && !inputValue.trim();\n if (!noSelection) handleConfirmClick();\n } else {\n handleSendClick();\n }\n }\n };\n const handleSendClick = () => {\n const param = {\n variableName: node.properties?.variableName || \"\",\n inputText: inputValue,\n };\n if (!beforeSend?.(param)) return;\n onSend?.(param);\n };\n\n const resolvedDefaultButtonText = React.useMemo(() => {\n if (!defaultButtonText) {\n return undefined;\n }\n const valueIndex = singleSelectButtonValues.indexOf(defaultButtonText);\n if (valueIndex > -1) {\n return singleSelectButtonTexts[valueIndex] ?? defaultButtonText;\n }\n const textIndex = singleSelectButtonTexts.indexOf(defaultButtonText);\n if (textIndex > -1) {\n return singleSelectButtonTexts[textIndex];\n }\n return undefined;\n }, [defaultButtonText, singleSelectButtonTexts, singleSelectButtonValues]);\n\n React.useEffect(() => {\n setInputValue(defaultInputText || \"\");\n }, [defaultInputText, interactionDefinitionKey]);\n\n React.useEffect(() => {\n setSelectedValues(defaultSelectedValues || []);\n }, [defaultSelectedValues, interactionDefinitionKey]);\n\n return (\n <span className=\"custom-variable-container inline-flex items-center flex-wrap\">\n {isMultiSelect && (\n <MultiSelectSection\n node={node}\n readonly={readonly}\n selectedValues={selectedValues}\n inputValue={inputValue}\n confirmButtonText={resolvedConfirmButtonText}\n handleCheckboxChange={handleCheckboxChange}\n handleInputChange={handleInputChange}\n handleKeyDown={handleKeyDown}\n handleConfirmClick={handleConfirmClick}\n />\n )}\n\n {!isMultiSelect && isSingleSelect && (\n <SingleSelectSection\n node={singleSelectNode}\n readonly={readonly}\n locale={locale}\n resolvedDefaultButtonText={resolvedDefaultButtonText}\n handleButtonClick={handleButtonClick}\n inputValue={inputValue}\n handleInputChange={handleInputChange}\n handleSendClick={handleSendClick}\n />\n )}\n\n {!isMultiSelect && !isSingleSelect && node.properties?.placeholder && (\n <InputSection\n readonly={readonly}\n locale={locale}\n placeholder={node.properties.placeholder}\n value={inputValue}\n onChange={handleInputChange}\n onSend={handleSendClick}\n />\n )}\n </span>\n );\n};\n\nexport default CustomButtonInputVariable;\nexport type {\n ComponentsWithCustomVariable,\n CustomVariableNode,\n CustomVariableProps,\n};\n"],"names":["MultiSelectSection","node","readonly","selectedValues","inputValue","confirmButtonText","handleCheckboxChange","handleInputChange","handleKeyDown","handleConfirmClick","placeholder","confirmDisabled","renderConfirmButton","extraWrapperClassName","jsx","cn","jsxs","text","index","value","buttonValue","Checkbox","checked","InputGroup","InputGroupTextarea","SingleSelectSection","locale","resolvedDefaultButtonText","handleButtonClick","handleSendClick","Button","MarkdownFlowInput","InputSection","onChange","onSend","CustomButtonInputVariable","defaultButtonText","defaultInputText","defaultSelectedValues","beforeSend","localeTexts","getContentRenderLocaleTexts","resolvedConfirmButtonText","setInputValue","React","setSelectedValues","interactionDefinitionKey","isMultiSelect","baseButtonTexts","shouldUseFallbackButton","fallbackButtonLabel","singleSelectNode","singleSelectButtonTexts","singleSelectButtonValues","isSingleSelect","param","prev","v","noSelection","e","valueIndex","textIndex"],"mappings":"yZAyDMA,EAAqB,CAAC,CAC1B,KAAAC,EACA,SAAAC,EACA,eAAAC,EACA,WAAAC,EACA,kBAAAC,EACA,qBAAAC,EACA,kBAAAC,EACA,cAAAC,EACA,mBAAAC,CACF,IAA+B,CAC7B,MAAMC,EAAcT,EAAK,YAAY,YAC/BU,EACJT,GAAaC,EAAe,SAAW,GAAK,CAACC,GAAY,KAAA,EAErDQ,EAAuBC,GAC3BC,EAAAA,kBAAAA,IAAC,OAAA,CACC,UAAWC,EAAAA,GACT,0DACAJ,EAAkB,gCAAkC,iBACpDE,CAAA,EAGF,SAAAC,EAAAA,kBAAAA,IAAC,SAAA,CACC,KAAK,SACL,UAAU,+DACV,SAAUH,EACV,QAASF,EAER,SAAAJ,CAAA,CAAA,CACH,CAAA,EAIJ,OACEW,EAAAA,kBAAAA,KAAC,OAAA,CAAK,UAAU,8CACd,SAAA,CAAAF,EAAAA,kBAAAA,IAA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EAAAA,kBAAAA,IAACkB,EAAA,CACC,SAAA9B,EACA,OAAAwB,EACA,YAAazB,EAAK,WAAW,YAC7B,MAAOG,EACP,SAAUG,EACV,OAAQsB,CAAA,CAAA,CACV,EAEJ,CAEJ"}
|
|
1
|
+
{"version":3,"file":"CustomVariable.cjs","sources":["../../../../src/components/ContentRender/plugins/CustomVariable.tsx"],"sourcesContent":["import React from \"react\";\nimport type { Components } from \"react-markdown\";\nimport { OnSendContentParams } from \"../../types\";\nimport { Button } from \"../../ui/button\";\nimport { Checkbox } from \"../../ui/checkbox\";\nimport MarkdownFlowInput from \"../MarkdownFlowInput\";\nimport {\n InputGroup,\n InputGroupTextarea,\n} from \"../../ui/inputGroup/input-group\";\nimport type { MarkdownFlowLocale } from \"../../../lib/locale\";\nimport { cn } from \"../../../lib/utils\";\nimport { getContentRenderLocaleTexts } from \"../contentRenderI18n\";\n\n// Define custom variable node type\ninterface CustomVariableNode {\n tagName: \"custom-variable\";\n properties?: {\n variableName?: string;\n buttonTexts?: string[];\n buttonValues?: string[];\n placeholder?: string;\n isMultiSelect?: boolean;\n };\n}\n\n// Define custom variable component Props type\ninterface CustomVariableProps {\n /** Explicit direction for nested input controls. */\n dir?: React.HTMLAttributes<HTMLDivElement>[\"dir\"];\n /** Explicit language for nested input controls. */\n lang?: string;\n node: CustomVariableNode;\n defaultButtonText?: string;\n defaultInputText?: string;\n defaultSelectedValues?: string[];\n locale?: MarkdownFlowLocale;\n readonly?: boolean;\n onSend?: (content: OnSendContentParams) => void;\n // Multi-select confirm button text (i18n support)\n confirmButtonText?: string;\n beforeSend?: (param: OnSendContentParams) => boolean;\n}\n\ninterface ComponentsWithCustomVariable extends Components {\n \"custom-variable\"?: React.ComponentType<CustomVariableProps>;\n}\n\n// Multi select section( with checkboxes and input)\ninterface MultiSelectSectionProps {\n node: CustomVariableNode;\n readonly?: boolean;\n selectedValues: string[];\n inputValue: string;\n confirmButtonText: string;\n handleCheckboxChange: (value: string, checked: boolean) => void;\n handleInputChange: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;\n handleKeyDown: (event: React.KeyboardEvent<HTMLTextAreaElement>) => void;\n handleConfirmClick: () => void;\n}\n\nconst MultiSelectSection = ({\n node,\n readonly,\n selectedValues,\n inputValue,\n confirmButtonText,\n handleCheckboxChange,\n handleInputChange,\n handleKeyDown,\n handleConfirmClick,\n}: MultiSelectSectionProps) => {\n const placeholder = node.properties?.placeholder;\n const confirmDisabled =\n readonly || (selectedValues.length === 0 && !inputValue?.trim());\n\n const renderConfirmButton = (extraWrapperClassName?: string) => (\n <span\n className={cn(\n \"multi-select-confirm-wrapper flex flex-col items-center\",\n confirmDisabled ? \"opacity-50 cursor-not-allowed\" : \"cursor-pointer\",\n extraWrapperClassName\n )}\n >\n <button\n type=\"button\"\n className=\"multi-select-confirm-button text-sm font-medium text-primary\"\n disabled={confirmDisabled}\n onClick={handleConfirmClick}\n >\n {confirmButtonText}\n </button>\n </span>\n );\n\n return (\n <span className=\"multi-select-container flex w-full flex-col\">\n <span className=\"flex flex-wrap gap-y-[9px] gap-x-6\">\n {node.properties?.buttonTexts?.map((text, index) => {\n const value = node.properties?.buttonValues?.[index];\n const buttonValue = value !== undefined ? value : text;\n return (\n <Checkbox\n key={index}\n label={text}\n disabled={readonly}\n checked={selectedValues.includes(buttonValue)}\n onCheckedChange={(checked) =>\n handleCheckboxChange(buttonValue, checked)\n }\n className=\"text-sm\"\n />\n );\n })}\n </span>\n {placeholder ? (\n <span className=\"block mb-1 w-full max-w-[500px]\">\n <span className=\"multi-select-input-row flex w-full items-end gap-3\">\n <InputGroup data-disabled={readonly} className=\"flex-1\">\n <InputGroupTextarea\n disabled={readonly}\n placeholder={placeholder}\n value={inputValue}\n onChange={handleInputChange}\n onKeyDown={handleKeyDown}\n className=\"text-sm px-3\"\n title={placeholder}\n />\n </InputGroup>\n {renderConfirmButton(\"shrink-0\")}\n </span>\n </span>\n ) : (\n renderConfirmButton(\"self-start multi-select-confirm-wrapper--stacked\")\n )}\n </span>\n );\n};\n\n// Single select section( with buttons and input)\ninterface SingleSelectSectionProps {\n dir?: CustomVariableProps[\"dir\"];\n lang?: string;\n node: CustomVariableNode;\n readonly?: boolean;\n locale?: MarkdownFlowLocale;\n resolvedDefaultButtonText?: string;\n handleButtonClick: (value: string) => void;\n inputValue: string;\n handleInputChange: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;\n handleSendClick: () => void;\n}\n\nconst SingleSelectSection = ({\n dir,\n lang,\n node,\n readonly,\n locale,\n resolvedDefaultButtonText,\n handleButtonClick,\n inputValue,\n handleInputChange,\n handleSendClick,\n}: SingleSelectSectionProps) => (\n <span className=\"single-select-container inline-flex w-full flex-col\">\n <span className=\"flex flex-wrap gap-y-[9px] gap-x-2\">\n {node.properties?.buttonTexts?.map((text, index) => {\n const value = node.properties?.buttonValues?.[index];\n const buttonValue = value !== undefined ? value : text;\n return (\n <Button\n key={index}\n disabled={readonly}\n variant=\"outline\"\n type=\"button\"\n size=\"sm\"\n onClick={() => handleButtonClick(buttonValue)}\n className={cn(\n \"max-w-full shrink whitespace-normal break-words text-start leading-5 h-auto min-h-8 px-3 py-1.5\",\n \"hover:bg-gray-200\",\n resolvedDefaultButtonText === text && \"select\"\n )}\n >\n {text}\n </Button>\n );\n })}\n </span>\n {node.properties?.placeholder && (\n <span className=\"mt-[9px] mb-1\">\n <MarkdownFlowInput\n dir={dir}\n lang={lang}\n disabled={readonly}\n locale={locale}\n placeholder={node.properties.placeholder}\n value={inputValue}\n onChange={handleInputChange}\n onSend={handleSendClick}\n title={node.properties.placeholder}\n />\n </span>\n )}\n </span>\n);\n\n// Pure input\ninterface InputSectionProps {\n dir?: CustomVariableProps[\"dir\"];\n lang?: string;\n readonly?: boolean;\n locale?: MarkdownFlowLocale;\n placeholder?: string;\n value: string;\n onChange: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;\n onSend: () => void;\n}\n\nconst InputSection = ({\n dir,\n lang,\n readonly,\n locale,\n placeholder,\n value,\n onChange,\n onSend,\n}: InputSectionProps) => {\n if (!placeholder) {\n return null;\n }\n\n return (\n <MarkdownFlowInput\n dir={dir}\n lang={lang}\n disabled={readonly}\n locale={locale}\n placeholder={placeholder}\n value={value}\n onChange={onChange}\n onSend={onSend}\n title={placeholder}\n />\n );\n};\n\n// Define custom variable component\nconst CustomButtonInputVariable = ({\n dir,\n lang,\n node,\n readonly,\n locale,\n defaultButtonText,\n defaultInputText,\n defaultSelectedValues,\n onSend,\n confirmButtonText,\n beforeSend = () => true,\n}: CustomVariableProps) => {\n const localeTexts = getContentRenderLocaleTexts(locale);\n const resolvedConfirmButtonText =\n confirmButtonText || localeTexts.confirmButtonText;\n const [inputValue, setInputValue] = React.useState(defaultInputText || \"\");\n const [selectedValues, setSelectedValues] = React.useState<string[]>(\n defaultSelectedValues || []\n );\n const interactionDefinitionKey = JSON.stringify({\n buttonTexts: node.properties?.buttonTexts,\n buttonValues: node.properties?.buttonValues,\n isMultiSelect: node.properties?.isMultiSelect,\n placeholder: node.properties?.placeholder,\n variableName: node.properties?.variableName,\n });\n const isMultiSelect = node.properties?.isMultiSelect ?? false;\n const baseButtonTexts = node.properties?.buttonTexts || [];\n const shouldUseFallbackButton =\n !isMultiSelect &&\n baseButtonTexts.length === 0 &&\n !node.properties?.placeholder;\n const fallbackButtonLabel =\n node.properties?.variableName?.trim() ||\n defaultButtonText ||\n resolvedConfirmButtonText;\n\n const singleSelectNode = React.useMemo<CustomVariableNode>(() => {\n if (!shouldUseFallbackButton) {\n return node;\n }\n return {\n ...node,\n properties: {\n ...(node.properties || {}),\n buttonTexts: [fallbackButtonLabel],\n buttonValues: [fallbackButtonLabel],\n },\n };\n }, [fallbackButtonLabel, node, shouldUseFallbackButton]);\n\n const singleSelectButtonTexts =\n singleSelectNode.properties?.buttonTexts || [];\n const singleSelectButtonValues =\n singleSelectNode.properties?.buttonValues || [];\n const isSingleSelect = !isMultiSelect && singleSelectButtonTexts.length > 0;\n\n const handleButtonClick = (value: string) => {\n const param = {\n variableName: node.properties?.variableName || \"\",\n buttonText: value,\n };\n if (!beforeSend?.(param)) return;\n onSend?.(param);\n };\n\n const handleCheckboxChange = (value: string, checked: boolean) => {\n setSelectedValues((prev) => {\n if (checked) {\n return [...prev, value];\n } else {\n return prev.filter((v) => v !== value);\n }\n });\n };\n\n const handleConfirmClick = () => {\n const noSelection = selectedValues.length === 0 && !inputValue?.trim();\n const param = {\n variableName: node.properties?.variableName || \"\",\n selectedValues,\n inputText: inputValue?.trim() || undefined,\n };\n if (readonly || noSelection) return;\n if (!beforeSend?.(param)) return;\n onSend?.(param);\n };\n\n const handleInputChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n setInputValue(e.target.value);\n };\n const handleKeyDown = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.nativeEvent.isComposing || e.keyCode === 229) {\n return;\n }\n if (e.key === \"Enter\" && !e.shiftKey) {\n e.preventDefault();\n if (isMultiSelect) {\n const noSelection = selectedValues.length === 0 && !inputValue.trim();\n if (!noSelection) handleConfirmClick();\n } else {\n handleSendClick();\n }\n }\n };\n const handleSendClick = () => {\n const param = {\n variableName: node.properties?.variableName || \"\",\n inputText: inputValue,\n };\n if (!beforeSend?.(param)) return;\n onSend?.(param);\n };\n\n const resolvedDefaultButtonText = React.useMemo(() => {\n if (!defaultButtonText) {\n return undefined;\n }\n const valueIndex = singleSelectButtonValues.indexOf(defaultButtonText);\n if (valueIndex > -1) {\n return singleSelectButtonTexts[valueIndex] ?? defaultButtonText;\n }\n const textIndex = singleSelectButtonTexts.indexOf(defaultButtonText);\n if (textIndex > -1) {\n return singleSelectButtonTexts[textIndex];\n }\n return undefined;\n }, [defaultButtonText, singleSelectButtonTexts, singleSelectButtonValues]);\n\n React.useEffect(() => {\n setInputValue(defaultInputText || \"\");\n }, [defaultInputText, interactionDefinitionKey]);\n\n React.useEffect(() => {\n setSelectedValues(defaultSelectedValues || []);\n }, [defaultSelectedValues, interactionDefinitionKey]);\n\n return (\n <span className=\"custom-variable-container inline-flex items-center flex-wrap\">\n {isMultiSelect && (\n <MultiSelectSection\n node={node}\n readonly={readonly}\n selectedValues={selectedValues}\n inputValue={inputValue}\n confirmButtonText={resolvedConfirmButtonText}\n handleCheckboxChange={handleCheckboxChange}\n handleInputChange={handleInputChange}\n handleKeyDown={handleKeyDown}\n handleConfirmClick={handleConfirmClick}\n />\n )}\n\n {!isMultiSelect && isSingleSelect && (\n <SingleSelectSection\n dir={dir}\n lang={lang}\n node={singleSelectNode}\n readonly={readonly}\n locale={locale}\n resolvedDefaultButtonText={resolvedDefaultButtonText}\n handleButtonClick={handleButtonClick}\n inputValue={inputValue}\n handleInputChange={handleInputChange}\n handleSendClick={handleSendClick}\n />\n )}\n\n {!isMultiSelect && !isSingleSelect && node.properties?.placeholder && (\n <InputSection\n dir={dir}\n lang={lang}\n readonly={readonly}\n locale={locale}\n placeholder={node.properties.placeholder}\n value={inputValue}\n onChange={handleInputChange}\n onSend={handleSendClick}\n />\n )}\n </span>\n );\n};\n\nexport default CustomButtonInputVariable;\nexport type {\n ComponentsWithCustomVariable,\n CustomVariableNode,\n CustomVariableProps,\n};\n"],"names":["MultiSelectSection","node","readonly","selectedValues","inputValue","confirmButtonText","handleCheckboxChange","handleInputChange","handleKeyDown","handleConfirmClick","placeholder","confirmDisabled","renderConfirmButton","extraWrapperClassName","jsx","cn","jsxs","text","index","value","buttonValue","Checkbox","checked","InputGroup","InputGroupTextarea","SingleSelectSection","dir","lang","locale","resolvedDefaultButtonText","handleButtonClick","handleSendClick","Button","MarkdownFlowInput","InputSection","onChange","onSend","CustomButtonInputVariable","defaultButtonText","defaultInputText","defaultSelectedValues","beforeSend","localeTexts","getContentRenderLocaleTexts","resolvedConfirmButtonText","setInputValue","React","setSelectedValues","interactionDefinitionKey","isMultiSelect","baseButtonTexts","shouldUseFallbackButton","fallbackButtonLabel","singleSelectNode","singleSelectButtonTexts","singleSelectButtonValues","isSingleSelect","param","prev","v","noSelection","e","valueIndex","textIndex"],"mappings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A,EAAkBS,CAAwB,CAAC,EAE/CF,EAAM,UAAU,IAAM,CACpBC,EAAkBP,GAAyB,EAAE,CAC/C,EAAG,CAACA,EAAuBQ,CAAwB,CAAC,EAGlDhC,EAAAA,KAAC,OAAA,CAAK,UAAU,+DACb,SAAA,CAAAiC,GACCnC,EAAAA,IAACd,EAAA,CACC,KAAAC,EACA,SAAAC,EACA,eAAAC,EACA,WAAAC,EACA,kBAAmBwC,EACnB,qBAAAtC,EACA,kBAAAC,EACA,cAAAC,EACA,mBAAAC,CAAA,CAAA,EAIH,CAACwC,GAAiBO,GACjB1C,EAAAA,IAACW,EAAA,CACC,IAAAC,EACA,KAAAC,EACA,KAAM0B,EACN,SAAAnD,EACA,OAAA0B,EACA,0BAAAC,EACA,kBAAAC,EACA,WAAA1B,EACA,kBAAAG,EACA,gBAAAwB,CAAA,CAAA,EAIH,CAACkB,GAAiB,CAACO,GAAkBvD,EAAK,YAAY,aACrDa,EAAAA,IAACoB,EAAA,CACC,IAAAR,EACA,KAAAC,EACA,SAAAzB,EACA,OAAA0B,EACA,YAAa3B,EAAK,WAAW,YAC7B,MAAOG,EACP,SAAUG,EACV,OAAQwB,CAAA,CAAA,CACV,EAEJ,CAEJ"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { Components } from 'react-markdown';
|
|
3
|
-
import { OnSendContentParams } from '../../types';
|
|
4
|
-
import { MarkdownFlowLocale } from '../../../lib/locale';
|
|
3
|
+
import { OnSendContentParams } from '../../types.js';
|
|
4
|
+
import { MarkdownFlowLocale } from '../../../lib/locale.js';
|
|
5
5
|
interface CustomVariableNode {
|
|
6
6
|
tagName: "custom-variable";
|
|
7
7
|
properties?: {
|
|
@@ -13,6 +13,10 @@ interface CustomVariableNode {
|
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
15
|
interface CustomVariableProps {
|
|
16
|
+
/** Explicit direction for nested input controls. */
|
|
17
|
+
dir?: React.HTMLAttributes<HTMLDivElement>["dir"];
|
|
18
|
+
/** Explicit language for nested input controls. */
|
|
19
|
+
lang?: string;
|
|
16
20
|
node: CustomVariableNode;
|
|
17
21
|
defaultButtonText?: string;
|
|
18
22
|
defaultInputText?: string;
|
|
@@ -26,6 +30,6 @@ interface CustomVariableProps {
|
|
|
26
30
|
interface ComponentsWithCustomVariable extends Components {
|
|
27
31
|
"custom-variable"?: React.ComponentType<CustomVariableProps>;
|
|
28
32
|
}
|
|
29
|
-
declare const CustomButtonInputVariable: ({ node, readonly, locale, defaultButtonText, defaultInputText, defaultSelectedValues, onSend, confirmButtonText, beforeSend, }: CustomVariableProps) => React.JSX.Element;
|
|
33
|
+
declare const CustomButtonInputVariable: ({ dir, lang, node, readonly, locale, defaultButtonText, defaultInputText, defaultSelectedValues, onSend, confirmButtonText, beforeSend, }: CustomVariableProps) => React.JSX.Element;
|
|
30
34
|
export default CustomButtonInputVariable;
|
|
31
35
|
export type { ComponentsWithCustomVariable, CustomVariableNode, CustomVariableProps, };
|