markdown-flow-ui 0.3.2 → 0.3.4-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 +13 -0
- package/dist/_virtual/index.es8.js +2 -2
- package/dist/_virtual/index.es9.js +2 -2
- package/dist/_virtual/index8.cjs +1 -1
- package/dist/_virtual/index9.cjs +1 -1
- package/dist/assets/markdown-flow-ui.css +1 -10
- package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.cjs.map +1 -1
- package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.d.ts +2 -0
- package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.es.js +275 -261
- package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/editorI18n.d.ts +22 -0
- package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.d.ts +2 -1
- package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.es.js +18 -16
- package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/locales/de-DE.json.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/locales/de-DE.json.d.ts +2 -1
- package/dist/components/MarkdownFlowEditor/locales/de-DE.json.es.js +27 -25
- package/dist/components/MarkdownFlowEditor/locales/de-DE.json.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/locales/en-US.json.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/locales/en-US.json.d.ts +2 -1
- package/dist/components/MarkdownFlowEditor/locales/en-US.json.es.js +27 -25
- package/dist/components/MarkdownFlowEditor/locales/en-US.json.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/locales/es-ES.json.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/locales/es-ES.json.d.ts +2 -1
- package/dist/components/MarkdownFlowEditor/locales/es-ES.json.es.js +11 -9
- package/dist/components/MarkdownFlowEditor/locales/es-ES.json.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/locales/fil-PH.json.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/locales/fil-PH.json.d.ts +2 -1
- package/dist/components/MarkdownFlowEditor/locales/fil-PH.json.es.js +15 -13
- package/dist/components/MarkdownFlowEditor/locales/fil-PH.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 -1
- package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.es.js +23 -21
- package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/locales/ja-JP.json.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/locales/ja-JP.json.d.ts +2 -1
- package/dist/components/MarkdownFlowEditor/locales/ja-JP.json.es.js +21 -19
- package/dist/components/MarkdownFlowEditor/locales/ja-JP.json.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/locales/th-TH.json.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/locales/th-TH.json.d.ts +2 -1
- package/dist/components/MarkdownFlowEditor/locales/th-TH.json.es.js +20 -18
- package/dist/components/MarkdownFlowEditor/locales/th-TH.json.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/locales/ur-PK.json.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/locales/ur-PK.json.d.ts +2 -1
- package/dist/components/MarkdownFlowEditor/locales/ur-PK.json.es.js +15 -13
- package/dist/components/MarkdownFlowEditor/locales/ur-PK.json.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/locales/vi-VN.json.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/locales/vi-VN.json.d.ts +2 -1
- package/dist/components/MarkdownFlowEditor/locales/vi-VN.json.es.js +29 -27
- package/dist/components/MarkdownFlowEditor/locales/vi-VN.json.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.d.ts +2 -1
- package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.es.js +25 -23
- 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 +23 -24
- package/dist/components/MarkdownFlowEditor/plugins/ImgPlaceholder.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.cjs +3 -3
- package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.cjs.map +1 -1
- package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.d.ts +5 -1
- package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.es.js +161 -155
- package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.es.js.map +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 +21 -22
- package/dist/components/MarkdownFlowEditor/plugins/VideoPlaceholder.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/utils.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/utils.cjs.map +1 -1
- package/dist/components/MarkdownFlowEditor/utils.d.ts +5 -1
- package/dist/components/MarkdownFlowEditor/utils.es.js +40 -41
- package/dist/components/MarkdownFlowEditor/utils.es.js.map +1 -1
- package/dist/markdown-flow-ui-lib.css +1 -1
- package/dist/markdown-flow-ui.css +1 -10
- package/dist/node_modules/@braintree/sanitize-url/dist/index.cjs +1 -1
- package/dist/node_modules/@braintree/sanitize-url/dist/index.es.js +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FOHPRMQF.cjs +2 -14
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FOHPRMQF.cjs.map +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FOHPRMQF.es.js +6 -26
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FOHPRMQF.es.js.map +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-ICYGCRZG.cjs +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-ICYGCRZG.cjs.map +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-ICYGCRZG.es.js +2 -6
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-ICYGCRZG.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.es.js +1 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/dist/index.es.js +1 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-primitive/dist/index.es.js +1 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-primitive/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.es.js +1 -1
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.es.js +1 -1
- package/dist/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-slot/dist/index.es.js +2 -2
- package/dist/node_modules/@radix-ui/react-slot/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.es.js +1 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.es.js.map +1 -1
- package/dist/node_modules/classnames/index.cjs +1 -5
- package/dist/node_modules/classnames/index.cjs.map +1 -1
- package/dist/node_modules/classnames/index.es.js +1 -6
- package/dist/node_modules/classnames/index.es.js.map +1 -1
- package/dist/node_modules/cytoscape/dist/cytoscape.esm.cjs +3 -13
- package/dist/node_modules/cytoscape/dist/cytoscape.esm.cjs.map +1 -1
- package/dist/node_modules/cytoscape/dist/cytoscape.esm.es.js +15 -46
- package/dist/node_modules/cytoscape/dist/cytoscape.esm.es.js.map +1 -1
- package/dist/node_modules/d3-scale/src/ordinal.es.js +1 -1
- package/dist/node_modules/d3-scale/src/ordinal.es.js.map +1 -1
- package/dist/node_modules/dompurify/dist/purify.es.cjs +2 -2
- package/dist/node_modules/dompurify/dist/purify.es.cjs.map +1 -1
- package/dist/node_modules/dompurify/dist/purify.es.es.js +0 -2
- package/dist/node_modules/dompurify/dist/purify.es.es.js.map +1 -1
- package/dist/node_modules/highlight.js/lib/core.es.js +1 -1
- package/dist/node_modules/highlight.js/lib/core.es.js.map +1 -1
- package/dist/node_modules/katex/dist/katex.cjs +18 -18
- package/dist/node_modules/katex/dist/katex.cjs.map +1 -1
- package/dist/node_modules/katex/dist/katex.es.js +2716 -3120
- package/dist/node_modules/katex/dist/katex.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/Icon.cjs +1 -6
- package/dist/node_modules/lucide-react/dist/esm/Icon.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/Icon.es.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/Icon.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.cjs +1 -6
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.es.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.cjs +1 -6
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.es.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/captions-off.cjs +1 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/captions-off.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/captions-off.es.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/captions-off.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/captions.cjs +1 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/captions.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/captions.es.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/captions.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/check.cjs +1 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/check.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/check.es.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/check.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.cjs +1 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.es.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-down.cjs +1 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-down.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-down.es.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-down.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.cjs +1 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.es.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/copy.cjs +1 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/copy.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/copy.es.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/copy.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.cjs +1 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.es.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/fast-forward.cjs +1 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/fast-forward.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/fast-forward.es.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/fast-forward.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/file-type.cjs +1 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/file-type.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/file-type.es.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/file-type.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/grip-horizontal.cjs +1 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/grip-horizontal.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/grip-horizontal.es.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/grip-horizontal.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/image.cjs +1 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/image.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/image.es.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/image.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.cjs +1 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.es.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/maximize.cjs +1 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/maximize.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/maximize.es.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/maximize.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/rewind.cjs +1 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/rewind.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/rewind.es.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/rewind.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/scan-line.cjs +1 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/scan-line.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/scan-line.es.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/scan-line.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/skip-back.cjs +1 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/skip-back.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/skip-back.es.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/skip-back.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/skip-forward.cjs +1 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/skip-forward.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/skip-forward.es.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/skip-forward.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/square-check.cjs +1 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/square-check.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/square-check.es.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/square-check.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/square-play.cjs +1 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/square-play.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/square-play.es.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/square-play.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/text-cursor-input.cjs +1 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/text-cursor-input.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/text-cursor-input.es.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/text-cursor-input.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/upload.cjs +1 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/upload.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/upload.es.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/upload.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/volume-2.cjs +1 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/volume-2.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/volume-2.es.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/volume-2.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/x.cjs +1 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/x.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/x.es.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/x.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.cjs +1 -6
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.es.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.es.js.map +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-VBNYF7ZC.cjs +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-VBNYF7ZC.cjs.map +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-VBNYF7ZC.es.js +1 -6
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-VBNYF7ZC.es.js.map +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/dagre-VZM6K2ZE.cjs +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/dagre-VZM6K2ZE.cjs.map +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/dagre-VZM6K2ZE.es.js +0 -3
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/dagre-VZM6K2ZE.es.js.map +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-B4RE2ZJO.cjs +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-B4RE2ZJO.cjs.map +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-B4RE2ZJO.es.js +0 -2
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-B4RE2ZJO.es.js.map +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-7S7Q4E2Y.cjs +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-7S7Q4E2Y.cjs.map +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-7S7Q4E2Y.es.js +0 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-7S7Q4E2Y.es.js.map +1 -1
- package/dist/node_modules/mermaid/dist/mermaid.core.cjs +1 -3
- package/dist/node_modules/mermaid/dist/mermaid.core.cjs.map +1 -1
- package/dist/node_modules/mermaid/dist/mermaid.core.es.js +0 -4
- package/dist/node_modules/mermaid/dist/mermaid.core.es.js.map +1 -1
- package/dist/node_modules/rc-util/es/React/isFragment.es.js +1 -1
- package/dist/node_modules/rc-util/es/React/isFragment.es.js.map +1 -1
- package/dist/node_modules/rc-util/node_modules/react-is/cjs/react-is.development.cjs +1 -9
- package/dist/node_modules/rc-util/node_modules/react-is/cjs/react-is.development.cjs.map +1 -1
- package/dist/node_modules/rc-util/node_modules/react-is/cjs/react-is.development.es.js +2 -11
- package/dist/node_modules/rc-util/node_modules/react-is/cjs/react-is.development.es.js.map +1 -1
- package/dist/node_modules/rc-util/node_modules/react-is/cjs/react-is.production.min.cjs +1 -9
- package/dist/node_modules/rc-util/node_modules/react-is/cjs/react-is.production.min.cjs.map +1 -1
- package/dist/node_modules/rc-util/node_modules/react-is/cjs/react-is.production.min.es.js +2 -11
- package/dist/node_modules/rc-util/node_modules/react-is/cjs/react-is.production.min.es.js.map +1 -1
- package/dist/node_modules/style-mod/src/style-mod.es.js +1 -1
- package/dist/node_modules/style-mod/src/style-mod.es.js.map +1 -1
- package/package.json +21 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownFlowEditor.es.js","sources":["../../../src/components/MarkdownFlowEditor/MarkdownFlowEditor.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState, useCallback, useRef, useEffect, useMemo } from \"react\";\nimport CodeMirror from \"@uiw/react-codemirror\";\nimport { autocompletion } from \"@codemirror/autocomplete\";\nimport { EditorView, ViewUpdate } from \"@codemirror/view\";\nimport { markdown } from \"@codemirror/lang-markdown\";\nimport {\n syntaxHighlighting,\n defaultHighlightStyle,\n} from \"@codemirror/language\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"../ui/tooltip\";\nimport CustomDialog from \"./components/CustomDialog\";\nimport EditorToolbar from \"./components/EditorToolbar\";\nimport EditorContext from \"./editor-context\";\nimport ImageInject from \"./components/ImageInject\";\nimport VideoInject from \"./components/VideoInject\";\nimport {\n SelectedOption,\n IEditorContext,\n Variable,\n SelectContentInfo,\n EditorAction,\n EditorApi,\n} from \"./types\";\nimport \"./markdownFlowEditor.css\";\n\nimport {\n createSlashCommands,\n parseContentInfo,\n getImageContentToInsert,\n getVideoContentToInsert,\n} from \"./utils\";\nimport ImgPlaceholder from \"./plugins/ImgPlaceholder\";\nimport VideoPlaceholder from \"./plugins/VideoPlaceholder\";\nimport { mediaPlaceholderLabels } from \"./plugins/mediaPlaceholderLabels\";\nimport SyntaxHighlighter from \"./plugins/SyntaxHighlighter\";\n// import createFixedTextPlaceholder from \"./plugins/FixedTextPlaceholder\";\n// import DividerPlaceholder from \"./plugins/DividerPlaceholder\";\nimport { initReactI18next, useTranslation } from \"react-i18next\";\nimport i18next from \"i18next\";\nimport { UploadProps } from \"./uploadTypes\";\nimport {\n DEFAULT_EDITOR_LOCALE,\n editorLocaleResources,\n getEditorLocaleMessages,\n} from \"./editorI18n\";\nimport {\n getMarkdownFlowDirection,\n getMarkdownFlowLanguage,\n normalizeMarkdownFlowLocale,\n type MarkdownFlowLocale,\n} from \"../../lib/locale\";\nimport { useDetachedLanguage } from \"../../lib/useDetachedLanguage\";\nimport { useResolvedDirection } from \"../../lib/useResolvedDirection\";\n\nif (!i18next.isInitialized) {\n i18next.use(initReactI18next).init({\n resources: editorLocaleResources,\n lng: DEFAULT_EDITOR_LOCALE,\n fallbackLng: DEFAULT_EDITOR_LOCALE,\n interpolation: { escapeValue: false },\n });\n} else {\n Object.entries(editorLocaleResources).forEach(([lng, resource]) => {\n i18next.addResourceBundle(\n lng,\n \"translation\",\n resource.translation,\n true,\n true\n );\n });\n}\n\nexport enum EditMode {\n CodeEdit = \"codeEdit\",\n QuickEdit = \"quickEdit\",\n}\n\ntype EditorProps = {\n content?: string;\n editMode?: EditMode;\n /** @deprecated Variable picking is no longer supported. Retained for compatibility. */\n variables?: Variable[];\n /** @deprecated Variable picking is no longer supported. Retained for compatibility. */\n systemVariables?: Variable[];\n onChange?: (value: string) => void;\n onBlur?: () => void;\n locale?: MarkdownFlowLocale;\n /** Overrides the locale-derived language. */\n lang?: string;\n uploadProps?: UploadProps;\n disabled?: boolean;\n toolbarActionsRight?: EditorAction[];\n onReady?: (api: EditorApi) => void;\n};\n\nconst Editor: React.FC<EditorProps> = ({\n content = \"\",\n editMode = EditMode.CodeEdit,\n onChange,\n onBlur,\n locale,\n lang,\n uploadProps,\n disabled = false,\n toolbarActionsRight,\n onReady,\n}) => {\n const { t, i18n } = useTranslation();\n const resolvedLocale = normalizeMarkdownFlowLocale(\n locale ?? DEFAULT_EDITOR_LOCALE\n );\n const direction = getMarkdownFlowDirection(locale);\n const language = lang ?? getMarkdownFlowLanguage(locale);\n\n useEffect(() => {\n if (i18n.language !== resolvedLocale) {\n i18n.changeLanguage(resolvedLocale);\n }\n }, [i18n, resolvedLocale]);\n\n const currentStrings = getEditorLocaleMessages(resolvedLocale);\n const toolbarLabels = useMemo(\n () => ({\n image: t(\"toolbarInsertImage\", {\n defaultValue: \"Insert image\",\n }),\n video: t(\"toolbarInsertVideo\", {\n defaultValue: \"Insert video\",\n }),\n confirmOutput: t(\"toolbarConfirmOutput\", {\n defaultValue: \"Confirm output\",\n }),\n insertLink: t(\"toolbarInsertLink\", {\n defaultValue: \"Insert link\",\n }),\n insertButton: t(\"toolbarInsertButton\", {\n defaultValue: \"Insert button\",\n }),\n insertSingleChoice: t(\"toolbarInsertSingleChoice\", {\n defaultValue: \"Insert single choice\",\n }),\n insertMultiChoice: t(\"toolbarInsertMultiChoice\", {\n defaultValue: \"Insert multi choice\",\n }),\n insertInput: t(\"toolbarInsertInput\", {\n defaultValue: \"Insert input\",\n }),\n singleChoiceOption1: t(\"toolbarChoiceOption1\", {\n defaultValue: \"Option 1\",\n }),\n singleChoiceOption2: t(\"toolbarChoiceOption2\", {\n defaultValue: \"Option 2\",\n }),\n inputPlaceholder: t(\"toolbarInputPlaceholder\", {\n defaultValue: \"Please enter\",\n }),\n }),\n [t]\n );\n const placeholderText =\n editMode === EditMode.QuickEdit\n ? t(\"placeholderQuickEdit\", {\n defaultValue: t(\"placeholderCodeEdit\", {\n defaultValue: t(\"placeholder\"),\n }),\n })\n : t(\"placeholderCodeEdit\", { defaultValue: t(\"placeholder\") });\n const [dialogOpen, setDialogOpen] = useState(false);\n const editorRootRef = useRef<HTMLDivElement>(null);\n const portalLanguage = useDetachedLanguage(editorRootRef, language);\n const { resolvedDirection: portalDirection } = useResolvedDirection(\n editorRootRef,\n direction\n );\n const [selectedOption, setSelectedOption] = useState<SelectedOption>(\n SelectedOption.Empty\n );\n const [selectContentInfo, setSelectContentInfo] =\n useState<SelectContentInfo | null>();\n const editorViewRef = useRef<EditorView | null>(null);\n const editorContextValue: IEditorContext = {\n selectedOption,\n setSelectedOption,\n dialogOpen,\n setDialogOpen,\n };\n\n useEffect(() => {\n if (!disabled) {\n return;\n }\n setDialogOpen(false);\n setSelectedOption(SelectedOption.Empty);\n setSelectContentInfo(null);\n }, [disabled, setDialogOpen, setSelectedOption, setSelectContentInfo]);\n\n // const insertFixedText = useCallback(() => {\n // if (!editorViewRef.current) return;\n // const view = editorViewRef.current;\n // const { state, dispatch } = view;\n // const selection = state.selection.main;\n // const selectedText = state.sliceDoc(selection.from, selection.to);\n // const startTag = \"===\";\n // const endTag = \"===\";\n // const insertContent = `${startTag}${selectedText ?? \"\"}${endTag}`;\n\n // dispatch({\n // changes: {\n // from: selection.from,\n // to: selection.to,\n // insert: insertContent,\n // },\n // selection: {\n // anchor: selection.from + startTag.length + (selectedText?.length ?? 0),\n // },\n // });\n // view.focus();\n // }, []);\n\n // const insertDivider = useCallback(() => {\n // if (!editorViewRef.current) return;\n // const view = editorViewRef.current;\n // const { state, dispatch } = view;\n // const selection = state.selection.main;\n // const insertContent = `\\n\\n---\\n\\n`;\n\n // dispatch({\n // changes: {\n // from: selection.from,\n // to: selection.to,\n // insert: insertContent,\n // },\n // selection: {\n // anchor: selection.from + insertContent.length,\n // },\n // });\n // view.focus();\n // }, []);\n\n const onSelectedOption = useCallback(\n (option: SelectedOption) => {\n if (disabled) {\n return;\n }\n // if (option === SelectedOption.FixedText) {\n // insertFixedText();\n // setSelectedOption(SelectedOption.Empty);\n // setDialogOpen(false);\n // setSelectContentInfo(null);\n // return;\n // }\n\n // if (option === SelectedOption.Divider) {\n // insertDivider();\n // setSelectedOption(SelectedOption.Empty);\n // setDialogOpen(false);\n // setSelectContentInfo(null);\n // return;\n // }\n\n setSelectedOption(option);\n\n setDialogOpen(true);\n },\n [disabled]\n );\n\n const insertText = useCallback(\n (text: string) => {\n if (disabled || !editorViewRef.current) return;\n\n const { state, dispatch } = editorViewRef.current;\n const from = state.selection.main.from;\n\n dispatch({\n changes: { from, insert: text },\n selection: { anchor: from + text.length },\n });\n },\n [editorViewRef, disabled]\n );\n\n const replaceSelection = useCallback(\n (text: string) => {\n if (disabled || !editorViewRef.current) {\n return;\n }\n const { state, dispatch } = editorViewRef.current;\n const selection = state.selection.main;\n dispatch({\n changes: { from: selection.from, to: selection.to, insert: text },\n selection: { anchor: selection.from + text.length },\n });\n },\n [disabled]\n );\n\n const focusEditor = useCallback(() => {\n editorViewRef.current?.focus();\n }, []);\n\n const getContent = useCallback(() => {\n return editorViewRef.current?.state.doc.toString() ?? \"\";\n }, []);\n\n const setContent = useCallback(\n (text: string) => {\n if (disabled) {\n return;\n }\n if (!editorViewRef.current) {\n onChange?.(text);\n return;\n }\n const view = editorViewRef.current;\n const { state, dispatch } = view;\n dispatch({\n changes: { from: 0, to: state.doc.length, insert: text },\n selection: { anchor: text.length },\n });\n },\n [disabled, onChange]\n );\n\n const deleteSelectedContent = useCallback(() => {\n if (disabled) {\n return;\n }\n if (\n !selectContentInfo ||\n !editorViewRef.current ||\n selectContentInfo.from === -1\n )\n return;\n\n const { from, to } = selectContentInfo;\n const { dispatch } = editorViewRef.current;\n\n dispatch({\n changes: { from, to, insert: \"\" },\n });\n }, [selectContentInfo, editorViewRef, disabled]);\n\n const insertConfirmOutputMarker = useCallback(() => {\n if (disabled || !editorViewRef.current) {\n return;\n }\n const view = editorViewRef.current;\n const { state, dispatch } = view;\n const selection = state.selection.main;\n const template = \"======\";\n dispatch({\n changes: {\n from: selection.from,\n to: selection.to,\n insert: template,\n },\n selection: {\n anchor: selection.from + 3,\n },\n });\n view.focus();\n }, [disabled]);\n\n const insertLinkTemplate = useCallback(() => {\n if (disabled || !editorViewRef.current) {\n return;\n }\n const view = editorViewRef.current;\n const { state, dispatch } = view;\n const selection = state.selection.main;\n const template = \"[]()\";\n dispatch({\n changes: {\n from: selection.from,\n to: selection.to,\n insert: template,\n },\n selection: {\n anchor: selection.from + 1,\n },\n });\n view.focus();\n }, [disabled]);\n\n const insertButtonTemplate = useCallback(() => {\n if (disabled || !editorViewRef.current) {\n return;\n }\n const view = editorViewRef.current;\n const { state, dispatch } = view;\n const selection = state.selection.main;\n const template = \"?[]\";\n dispatch({\n changes: {\n from: selection.from,\n to: selection.to,\n insert: template,\n },\n selection: {\n anchor: selection.from + 2,\n },\n });\n view.focus();\n }, [disabled]);\n\n const insertSingleChoiceTemplate = useCallback(() => {\n if (disabled || !editorViewRef.current) {\n return;\n }\n const view = editorViewRef.current;\n const { state, dispatch } = view;\n const selection = state.selection.main;\n const optionLabel1 = toolbarLabels.singleChoiceOption1;\n const optionLabel2 = toolbarLabels.singleChoiceOption2;\n const template = `?[%{{ }} ${optionLabel1} | ${optionLabel2}]`;\n dispatch({\n changes: {\n from: selection.from,\n to: selection.to,\n insert: template,\n },\n selection: {\n anchor: selection.from + 6,\n },\n });\n view.focus();\n }, [\n disabled,\n toolbarLabels.singleChoiceOption1,\n toolbarLabels.singleChoiceOption2,\n ]);\n\n const insertMultiChoiceTemplate = useCallback(() => {\n if (disabled || !editorViewRef.current) {\n return;\n }\n const view = editorViewRef.current;\n const { state, dispatch } = view;\n const selection = state.selection.main;\n const optionLabel1 = toolbarLabels.singleChoiceOption1;\n const optionLabel2 = toolbarLabels.singleChoiceOption2;\n const template = `?[%{{ }} ${optionLabel1} || ${optionLabel2}]`;\n dispatch({\n changes: {\n from: selection.from,\n to: selection.to,\n insert: template,\n },\n selection: {\n anchor: selection.from + 6,\n },\n });\n view.focus();\n }, [\n disabled,\n toolbarLabels.singleChoiceOption1,\n toolbarLabels.singleChoiceOption2,\n ]);\n\n const insertInputFieldTemplate = useCallback(() => {\n if (disabled || !editorViewRef.current) {\n return;\n }\n const view = editorViewRef.current;\n const { state, dispatch } = view;\n const selection = state.selection.main;\n const placeholder = toolbarLabels.inputPlaceholder ?? \"请输入\";\n const template = `?[%{{ }}...${placeholder}]`;\n dispatch({\n changes: {\n from: selection.from,\n to: selection.to,\n insert: template,\n },\n selection: {\n anchor: selection.from + 6,\n },\n });\n view.focus();\n }, [disabled, toolbarLabels.inputPlaceholder]);\n\n const handleSelectImage = useCallback(\n ({\n resourceUrl,\n resourceTitle,\n scalePercent,\n }: {\n resourceUrl?: string;\n resourceTitle?: string;\n scalePercent?: number;\n }) => {\n if (!resourceUrl || disabled) return;\n const textToInsert = getImageContentToInsert({\n resourceUrl,\n resourceTitle,\n scalePercent,\n });\n if (selectContentInfo?.type === SelectedOption.Image) {\n deleteSelectedContent();\n if (!editorViewRef.current) return;\n const { dispatch } = editorViewRef.current;\n dispatch({\n changes: { from: selectContentInfo.from, insert: textToInsert },\n });\n } else {\n insertText(textToInsert);\n }\n setDialogOpen(false);\n },\n [deleteSelectedContent, disabled, insertText, selectContentInfo]\n );\n\n const handleSelectVideo = useCallback(\n ({\n resourceUrl,\n resourceTitle,\n }: {\n resourceUrl: string;\n resourceTitle: string;\n }) => {\n if (disabled) {\n return;\n }\n const textToInsert = getVideoContentToInsert(resourceUrl, resourceTitle);\n if (selectContentInfo?.type === SelectedOption.Video) {\n deleteSelectedContent();\n if (!editorViewRef.current) return;\n const { dispatch } = editorViewRef.current;\n dispatch({\n changes: { from: selectContentInfo.from, insert: textToInsert },\n });\n } else {\n insertText(textToInsert);\n }\n setDialogOpen(false);\n },\n [deleteSelectedContent, disabled, insertText, selectContentInfo]\n );\n\n const slashCommandsExtension = useCallback(() => {\n return autocompletion({\n override: [\n createSlashCommands(onSelectedOption, {\n // divider: currentStrings.slashDivider,\n // fixedText: currentStrings.slashFixedText,\n image: currentStrings.slashImage,\n video: currentStrings.slashVideo,\n }),\n ],\n });\n }, [\n // currentStrings.slashDivider,\n // currentStrings.slashFixedText,\n currentStrings.slashImage,\n currentStrings.slashVideo,\n onSelectedOption,\n ]);\n\n // const fixedTextPlaceholderExtension = useMemo(\n // () =>\n // createFixedTextPlaceholder(\n // currentStrings.fixedTextPlaceholder ?? \"添加固定文本\",\n // currentStrings.fixedTextTooltip ??\n // currentStrings.slashFixedText ??\n // \"固定文本\"\n // ),\n // [\n // currentStrings.fixedTextPlaceholder,\n // currentStrings.fixedTextTooltip,\n // currentStrings.slashFixedText,\n // ]\n // );\n\n const handleEditorUpdate = useCallback((update: ViewUpdate) => {\n editorViewRef.current = update.view;\n }, []);\n\n const handleTagClick = useCallback(\n (event: any) => {\n event.stopPropagation();\n if (disabled) {\n return;\n }\n const { type, from, to, dataset } = event.detail;\n const value = parseContentInfo(type, dataset);\n setSelectContentInfo({\n type,\n value,\n from,\n to,\n });\n setSelectedOption(type);\n\n setDialogOpen(true);\n },\n [disabled]\n );\n\n useEffect(() => {\n if (!dialogOpen) {\n setSelectedOption(SelectedOption.Empty);\n setSelectContentInfo(null);\n }\n }, [dialogOpen]);\n\n useEffect(() => {\n const handleWrap = (e: any) => {\n if (e.detail.view === editorViewRef.current) {\n handleTagClick(e);\n }\n };\n window.addEventListener(\"globalTagClick\", handleWrap);\n return () => {\n window.removeEventListener(\"globalTagClick\", handleWrap);\n };\n }, [handleTagClick]);\n\n const imagePlaceholderTitle = t(\"imageDefaultTitle\");\n const videoPlaceholderTitle = t(\"videoDefaultTitle\");\n const mediaPlaceholderLabelsExtension = useMemo(\n () =>\n mediaPlaceholderLabels.of({\n image: imagePlaceholderTitle,\n video: videoPlaceholderTitle,\n }),\n [imagePlaceholderTitle, videoPlaceholderTitle]\n );\n\n const editorExtensions = useMemo(() => {\n const extensions = [\n EditorView.lineWrapping,\n markdown(),\n syntaxHighlighting(defaultHighlightStyle),\n SyntaxHighlighter,\n ];\n\n if (!disabled) {\n extensions.push(slashCommandsExtension());\n }\n\n if (editMode === EditMode.QuickEdit) {\n extensions.push(\n mediaPlaceholderLabelsExtension,\n ImgPlaceholder,\n VideoPlaceholder\n // fixedTextPlaceholderExtension,\n // DividerPlaceholder,\n );\n }\n\n extensions.push(\n EditorView.updateListener.of((update) => {\n handleEditorUpdate(update);\n })\n );\n\n return extensions;\n }, [\n disabled,\n editMode,\n slashCommandsExtension,\n handleEditorUpdate,\n mediaPlaceholderLabelsExtension,\n ]);\n\n const handleContentChange = useCallback(\n (value: string) => {\n if (disabled) {\n return;\n }\n onChange?.(value);\n },\n [onChange, disabled]\n );\n\n const editorApi = useMemo(\n () => ({\n insertTextAtCursor: insertText,\n replaceSelection,\n focus: focusEditor,\n getContent,\n setContent,\n }),\n [focusEditor, getContent, insertText, replaceSelection, setContent]\n );\n\n const handleToolbarActionClick = useCallback(\n (action: EditorAction) => {\n if (disabled || \"render\" in action) {\n return;\n }\n action.onClick?.(editorApi);\n },\n [disabled, editorApi]\n );\n\n const toolbarRightSlot = useMemo(() => {\n if (!toolbarActionsRight?.length) {\n return null;\n }\n return (\n <div className=\"markdown-flow-editor-toolbar-right\">\n {toolbarActionsRight.map((action) => {\n if (\"render\" in action) {\n return (\n <div\n className=\"markdown-flow-editor-toolbar-right-item\"\n key={action.key}\n >\n {action.render(editorApi)}\n </div>\n );\n }\n const ariaLabel = action.label || action.tooltip || undefined;\n const button = (\n <button\n type=\"button\"\n key={action.key}\n disabled={disabled || action.disabled}\n onClick={() => handleToolbarActionClick(action)}\n className=\"markdown-flow-editor-toolbar-right-button\"\n aria-label={ariaLabel}\n title={action.label || action.tooltip}\n >\n {action.icon ? (\n <span className=\"toolbar-right-icon\">{action.icon}</span>\n ) : null}\n {action.label ? (\n <span className=\"toolbar-right-label\">{action.label}</span>\n ) : null}\n </button>\n );\n const wrapped = action.tooltip ? (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent\n side=\"top\"\n dir={portalDirection}\n lang={portalLanguage}\n >\n {action.tooltip}\n </TooltipContent>\n </Tooltip>\n ) : (\n button\n );\n return (\n <div\n className=\"markdown-flow-editor-toolbar-right-item\"\n key={action.key}\n >\n {wrapped}\n </div>\n );\n })}\n </div>\n );\n }, [\n disabled,\n editorApi,\n handleToolbarActionClick,\n portalDirection,\n portalLanguage,\n toolbarActionsRight,\n ]);\n\n useEffect(() => {\n onReady?.(editorApi);\n }, [editorApi]);\n\n return (\n <div\n className=\"markdown-flow-editor\"\n ref={editorRootRef}\n dir={direction}\n lang={language}\n data-disabled={disabled ? \"true\" : undefined}\n aria-disabled={disabled}\n >\n <EditorToolbar\n disabled={disabled}\n labels={toolbarLabels}\n tooltipDirection={portalDirection}\n tooltipLanguage={portalLanguage}\n onSelect={onSelectedOption}\n onInsertConfirmOutput={insertConfirmOutputMarker}\n onInsertLink={insertLinkTemplate}\n onInsertButton={insertButtonTemplate}\n onInsertSingleChoice={insertSingleChoiceTemplate}\n onInsertMultiChoice={insertMultiChoiceTemplate}\n onInsertInputField={insertInputFieldTemplate}\n rightSlot={toolbarRightSlot}\n />\n <div className=\"markdown-flow-editor-body relative overflow-auto\">\n <EditorContext.Provider value={editorContextValue}>\n <CodeMirror\n extensions={editorExtensions}\n basicSetup={{\n lineNumbers: false,\n searchKeymap: false,\n syntaxHighlighting: true,\n highlightActiveLine: true,\n highlightActiveLineGutter: true,\n foldGutter: false,\n }}\n className=\"rounded-md\"\n placeholder={placeholderText}\n value={content}\n theme=\"light\"\n minHeight=\"2rem\"\n editable={!disabled}\n onChange={handleContentChange}\n onBlur={onBlur}\n />\n {!disabled && (\n <CustomDialog\n dir={portalDirection}\n lang={portalLanguage}\n labels={{\n closeButtonLabel: t(\"dialogCloseLabel\"),\n title:\n selectedOption === SelectedOption.Image\n ? t(\"dialogTitleImage\")\n : selectedOption === SelectedOption.Video\n ? t(\"dialogTitleVideo\")\n : t(\"dialogTitle\"),\n }}\n >\n {selectedOption === SelectedOption.Image && (\n <ImageInject\n value={selectContentInfo?.value}\n onSelect={handleSelectImage}\n uploadProps={uploadProps}\n />\n )}\n {selectedOption === SelectedOption.Video && (\n <VideoInject\n value={selectContentInfo?.value}\n onSelect={handleSelectVideo}\n />\n )}\n </CustomDialog>\n )}\n </EditorContext.Provider>\n </div>\n </div>\n );\n};\n\nexport default Editor;\n"],"names":["i18next","editorLocaleResources","lng","resource","initReactI18next","DEFAULT_EDITOR_LOCALE","Editor","content","editMode","onChange","onBlur","locale","lang","uploadProps","disabled","toolbarActionsRight","onReady","t","i18n","useTranslation","resolvedLocale","normalizeMarkdownFlowLocale","direction","getMarkdownFlowDirection","language","getMarkdownFlowLanguage","useEffect","currentStrings","getEditorLocaleMessages","toolbarLabels","useMemo","placeholderText","dialogOpen","setDialogOpen","useState","editorRootRef","useRef","portalLanguage","useDetachedLanguage","portalDirection","useResolvedDirection","selectedOption","setSelectedOption","SelectedOption","selectContentInfo","setSelectContentInfo","editorViewRef","editorContextValue","onSelectedOption","useCallback","option","insertText","text","state","dispatch","from","replaceSelection","selection","focusEditor","getContent","setContent","view","deleteSelectedContent","to","insertConfirmOutputMarker","insertLinkTemplate","insertButtonTemplate","insertSingleChoiceTemplate","optionLabel1","optionLabel2","template","insertMultiChoiceTemplate","insertInputFieldTemplate","handleSelectImage","resourceUrl","resourceTitle","scalePercent","textToInsert","getImageContentToInsert","handleSelectVideo","getVideoContentToInsert","slashCommandsExtension","autocompletion","createSlashCommands","handleEditorUpdate","update","handleTagClick","event","type","dataset","value","parseContentInfo","handleWrap","e","imagePlaceholderTitle","videoPlaceholderTitle","mediaPlaceholderLabelsExtension","mediaPlaceholderLabels","editorExtensions","extensions","EditorView","markdown","syntaxHighlighting","defaultHighlightStyle","SyntaxHighlighter","ImgPlaceholder","VideoPlaceholder","handleContentChange","editorApi","handleToolbarActionClick","action","toolbarRightSlot","jsx","ariaLabel","button","jsxs","wrapped","Tooltip","TooltipTrigger","TooltipContent","EditorToolbar","EditorContext","CodeMirror","CustomDialog","ImageInject","VideoInject"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDKA,EAAQ,gBAQX,OAAO,QAAQC,EAAqB,EAAE,QAAQ,CAAC,CAACC,GAAKC,CAAQ,MAAM;AACjEH,EAAAA,EAAQ;AAAA,IACNE;AAAA,IACA;AAAA,IACAC,EAAS;AAAA,IACT;AAAA,IACA;AAAA,EAAA;AAEJ,CAAC,IAfDH,EAAQ,IAAII,EAAgB,EAAE,KAAK;AAAA,EACjC,WAAWH;AAAA,EACX,KAAKI;AAAA,EACL,aAAaA;AAAA,EACb,eAAe,EAAE,aAAa,GAAA;AAAM,CACrC;AAoCH,MAAMC,KAAgC,CAAC;AAAA,EACrC,SAAAC,IAAU;AAAA,EACV,UAAAC,IAAW;AAAA,EACX,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,MAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,qBAAAC;AAAA,EACA,SAAAC;AACF,MAAM;AACJ,QAAM,EAAE,GAAAC,GAAG,MAAAC,EAAA,IAASC,GAAA,GACdC,IAAiBC;AAAA,IACrBV,KAAUN;AAAA,EAAA,GAENiB,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AA,cAEd,WAAU;AAAA,cACV,aAAanE;AAAA,cACb,OAAOxB;AAAA,cACP,OAAM;AAAA,cACN,WAAU;AAAA,cACV,UAAU,CAACO;AAAA,cACX,UAAU6F;AAAA,cACV,QAAAjG;AAAA,YAAA;AAAA,UAAA;AAAA,UAED,CAACI,KACA,gBAAAqG;AAAA,YAACQ;AAAA,YAAA;AAAA,cACC,KAAKpF;AAAA,cACL,MAAMF;AAAA,cACN,QAAQ;AAAA,gBACN,kBAAkBpB,EAAE,kBAAkB;AAAA,gBACtC,OACEwB,MAAmBE,EAAe,QAC9B1B,EAAE,kBAAkB,IACpBwB,MAAmBE,EAAe,QAChC1B,EAAE,kBAAkB,IACpBA,EAAE,aAAa;AAAA,cAAA;AAAA,cAGxB,UAAA;AAAA,gBAAAwB,MAAmBE,EAAe,SACjC,gBAAAqE;AAAA,kBAACY;AAAA,kBAAA;AAAA,oBACC,OAAOhF,GAAmB;AAAA,oBAC1B,UAAU6B;AAAA,oBACV,aAAA5D;AAAA,kBAAA;AAAA,gBAAA;AAAA,gBAGH4B,MAAmBE,EAAe,SACjC,gBAAAqE;AAAA,kBAACa;AAAA,kBAAA;AAAA,oBACC,OAAOjF,GAAmB;AAAA,oBAC1B,UAAUmC;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACZ;AAAA,YAAA;AAAA,UAAA;AAAA,QAEJ,EAAA,CAEJ,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
1
|
+
{"version":3,"file":"MarkdownFlowEditor.es.js","sources":["../../../src/components/MarkdownFlowEditor/MarkdownFlowEditor.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState, useCallback, useRef, useEffect, useMemo } from \"react\";\nimport CodeMirror from \"@uiw/react-codemirror\";\nimport { autocompletion } from \"@codemirror/autocomplete\";\nimport { EditorView, ViewUpdate } from \"@codemirror/view\";\nimport { markdown } from \"@codemirror/lang-markdown\";\nimport {\n syntaxHighlighting,\n defaultHighlightStyle,\n} from \"@codemirror/language\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"../ui/tooltip\";\nimport CustomDialog from \"./components/CustomDialog\";\nimport EditorToolbar from \"./components/EditorToolbar\";\nimport EditorContext from \"./editor-context\";\nimport ImageInject from \"./components/ImageInject\";\nimport VideoInject from \"./components/VideoInject\";\nimport {\n SelectedOption,\n IEditorContext,\n Variable,\n SelectContentInfo,\n EditorAction,\n EditorApi,\n} from \"./types\";\nimport \"./markdownFlowEditor.css\";\n\nimport {\n createSlashCommands,\n parseContentInfo,\n getImageContentToInsert,\n getVideoContentToInsert,\n} from \"./utils\";\nimport ImgPlaceholder from \"./plugins/ImgPlaceholder\";\nimport VideoPlaceholder from \"./plugins/VideoPlaceholder\";\nimport { mediaPlaceholderLabels } from \"./plugins/mediaPlaceholderLabels\";\nimport SyntaxHighlighter, {\n QuestionSyntaxHighlighter,\n} from \"./plugins/SyntaxHighlighter\";\n// import createFixedTextPlaceholder from \"./plugins/FixedTextPlaceholder\";\n// import DividerPlaceholder from \"./plugins/DividerPlaceholder\";\nimport { initReactI18next, useTranslation } from \"react-i18next\";\nimport i18next from \"i18next\";\nimport { UploadProps } from \"./uploadTypes\";\nimport {\n DEFAULT_EDITOR_LOCALE,\n editorLocaleResources,\n getEditorLocaleMessages,\n} from \"./editorI18n\";\nimport {\n getMarkdownFlowDirection,\n getMarkdownFlowLanguage,\n normalizeMarkdownFlowLocale,\n type MarkdownFlowLocale,\n} from \"../../lib/locale\";\nimport { useDetachedLanguage } from \"../../lib/useDetachedLanguage\";\nimport { useResolvedDirection } from \"../../lib/useResolvedDirection\";\n\nif (!i18next.isInitialized) {\n i18next.use(initReactI18next).init({\n resources: editorLocaleResources,\n lng: DEFAULT_EDITOR_LOCALE,\n fallbackLng: DEFAULT_EDITOR_LOCALE,\n interpolation: { escapeValue: false },\n });\n} else {\n Object.entries(editorLocaleResources).forEach(([lng, resource]) => {\n i18next.addResourceBundle(\n lng,\n \"translation\",\n resource.translation,\n true,\n true\n );\n });\n}\n\nexport enum EditMode {\n CodeEdit = \"codeEdit\",\n QuickEdit = \"quickEdit\",\n}\n\ntype EditorProps = {\n content?: string;\n editMode?: EditMode;\n /** Insert localized question text for question-based memory authoring. */\n questionMode?: boolean;\n /** @deprecated Variable picking is no longer supported. Retained for compatibility. */\n variables?: Variable[];\n /** @deprecated Variable picking is no longer supported. Retained for compatibility. */\n systemVariables?: Variable[];\n onChange?: (value: string) => void;\n onBlur?: () => void;\n locale?: MarkdownFlowLocale;\n /** Overrides the locale-derived language. */\n lang?: string;\n uploadProps?: UploadProps;\n disabled?: boolean;\n toolbarActionsRight?: EditorAction[];\n onReady?: (api: EditorApi) => void;\n};\n\nconst Editor: React.FC<EditorProps> = ({\n content = \"\",\n editMode = EditMode.CodeEdit,\n questionMode = false,\n onChange,\n onBlur,\n locale,\n lang,\n uploadProps,\n disabled = false,\n toolbarActionsRight,\n onReady,\n}) => {\n const { t, i18n } = useTranslation();\n const resolvedLocale = normalizeMarkdownFlowLocale(\n locale ?? DEFAULT_EDITOR_LOCALE\n );\n const direction = getMarkdownFlowDirection(locale);\n const language = lang ?? getMarkdownFlowLanguage(locale);\n\n useEffect(() => {\n if (i18n.language !== resolvedLocale) {\n i18n.changeLanguage(resolvedLocale);\n }\n }, [i18n, resolvedLocale]);\n\n const currentStrings = getEditorLocaleMessages(resolvedLocale);\n const toolbarLabels = useMemo(\n () => ({\n image: t(\"toolbarInsertImage\", {\n defaultValue: \"Insert image\",\n }),\n video: t(\"toolbarInsertVideo\", {\n defaultValue: \"Insert video\",\n }),\n confirmOutput: t(\"toolbarConfirmOutput\", {\n defaultValue: \"Confirm output\",\n }),\n insertLink: t(\"toolbarInsertLink\", {\n defaultValue: \"Insert link\",\n }),\n insertButton: t(\"toolbarInsertButton\", {\n defaultValue: \"Insert button\",\n }),\n insertSingleChoice: t(\"toolbarInsertSingleChoice\", {\n defaultValue: \"Insert single choice\",\n }),\n insertMultiChoice: t(\"toolbarInsertMultiChoice\", {\n defaultValue: \"Insert multi choice\",\n }),\n insertInput: t(\"toolbarInsertInput\", {\n defaultValue: \"Insert input\",\n }),\n singleChoiceOption1: t(\"toolbarChoiceOption1\", {\n defaultValue: \"Option 1\",\n }),\n singleChoiceOption2: t(\"toolbarChoiceOption2\", {\n defaultValue: \"Option 2\",\n }),\n inputPlaceholder: t(\"toolbarInputPlaceholder\", {\n defaultValue: \"Please enter\",\n }),\n }),\n [t]\n );\n const placeholderText =\n editMode === EditMode.QuickEdit\n ? t(\"placeholderQuickEdit\", {\n defaultValue: t(\"placeholderCodeEdit\", {\n defaultValue: t(\"placeholder\"),\n }),\n })\n : t(\"placeholderCodeEdit\", { defaultValue: t(\"placeholder\") });\n const [dialogOpen, setDialogOpen] = useState(false);\n const editorRootRef = useRef<HTMLDivElement>(null);\n const portalLanguage = useDetachedLanguage(editorRootRef, language);\n const { resolvedDirection: portalDirection } = useResolvedDirection(\n editorRootRef,\n direction\n );\n const [selectedOption, setSelectedOption] = useState<SelectedOption>(\n SelectedOption.Empty\n );\n const [selectContentInfo, setSelectContentInfo] =\n useState<SelectContentInfo | null>();\n const editorViewRef = useRef<EditorView | null>(null);\n const editorContextValue: IEditorContext = {\n selectedOption,\n setSelectedOption,\n dialogOpen,\n setDialogOpen,\n };\n\n useEffect(() => {\n if (!disabled) {\n return;\n }\n setDialogOpen(false);\n setSelectedOption(SelectedOption.Empty);\n setSelectContentInfo(null);\n }, [disabled, setDialogOpen, setSelectedOption, setSelectContentInfo]);\n\n // const insertFixedText = useCallback(() => {\n // if (!editorViewRef.current) return;\n // const view = editorViewRef.current;\n // const { state, dispatch } = view;\n // const selection = state.selection.main;\n // const selectedText = state.sliceDoc(selection.from, selection.to);\n // const startTag = \"===\";\n // const endTag = \"===\";\n // const insertContent = `${startTag}${selectedText ?? \"\"}${endTag}`;\n\n // dispatch({\n // changes: {\n // from: selection.from,\n // to: selection.to,\n // insert: insertContent,\n // },\n // selection: {\n // anchor: selection.from + startTag.length + (selectedText?.length ?? 0),\n // },\n // });\n // view.focus();\n // }, []);\n\n // const insertDivider = useCallback(() => {\n // if (!editorViewRef.current) return;\n // const view = editorViewRef.current;\n // const { state, dispatch } = view;\n // const selection = state.selection.main;\n // const insertContent = `\\n\\n---\\n\\n`;\n\n // dispatch({\n // changes: {\n // from: selection.from,\n // to: selection.to,\n // insert: insertContent,\n // },\n // selection: {\n // anchor: selection.from + insertContent.length,\n // },\n // });\n // view.focus();\n // }, []);\n\n const onSelectedOption = useCallback(\n (option: SelectedOption) => {\n if (disabled) {\n return;\n }\n // if (option === SelectedOption.FixedText) {\n // insertFixedText();\n // setSelectedOption(SelectedOption.Empty);\n // setDialogOpen(false);\n // setSelectContentInfo(null);\n // return;\n // }\n\n // if (option === SelectedOption.Divider) {\n // insertDivider();\n // setSelectedOption(SelectedOption.Empty);\n // setDialogOpen(false);\n // setSelectContentInfo(null);\n // return;\n // }\n\n setSelectedOption(option);\n\n setDialogOpen(true);\n },\n [disabled]\n );\n\n const insertText = useCallback(\n (text: string) => {\n if (disabled || !editorViewRef.current) return;\n\n const { state, dispatch } = editorViewRef.current;\n const from = state.selection.main.from;\n\n dispatch({\n changes: { from, insert: text },\n selection: { anchor: from + text.length },\n });\n },\n [editorViewRef, disabled]\n );\n\n const replaceSelection = useCallback(\n (text: string) => {\n if (disabled || !editorViewRef.current) {\n return;\n }\n const { state, dispatch } = editorViewRef.current;\n const selection = state.selection.main;\n dispatch({\n changes: { from: selection.from, to: selection.to, insert: text },\n selection: { anchor: selection.from + text.length },\n });\n },\n [disabled]\n );\n\n const focusEditor = useCallback(() => {\n editorViewRef.current?.focus();\n }, []);\n\n const getContent = useCallback(() => {\n return editorViewRef.current?.state.doc.toString() ?? \"\";\n }, []);\n\n const setContent = useCallback(\n (text: string) => {\n if (disabled) {\n return;\n }\n if (!editorViewRef.current) {\n onChange?.(text);\n return;\n }\n const view = editorViewRef.current;\n const { state, dispatch } = view;\n dispatch({\n changes: { from: 0, to: state.doc.length, insert: text },\n selection: { anchor: text.length },\n });\n },\n [disabled, onChange]\n );\n\n const deleteSelectedContent = useCallback(() => {\n if (disabled) {\n return;\n }\n if (\n !selectContentInfo ||\n !editorViewRef.current ||\n selectContentInfo.from === -1\n )\n return;\n\n const { from, to } = selectContentInfo;\n const { dispatch } = editorViewRef.current;\n\n dispatch({\n changes: { from, to, insert: \"\" },\n });\n }, [selectContentInfo, editorViewRef, disabled]);\n\n const insertConfirmOutputMarker = useCallback(() => {\n if (disabled || !editorViewRef.current) {\n return;\n }\n const view = editorViewRef.current;\n const { state, dispatch } = view;\n const selection = state.selection.main;\n const template = \"======\";\n dispatch({\n changes: {\n from: selection.from,\n to: selection.to,\n insert: template,\n },\n selection: {\n anchor: selection.from + 3,\n },\n });\n view.focus();\n }, [disabled]);\n\n const insertLinkTemplate = useCallback(() => {\n if (disabled || !editorViewRef.current) {\n return;\n }\n const view = editorViewRef.current;\n const { state, dispatch } = view;\n const selection = state.selection.main;\n const template = \"[]()\";\n dispatch({\n changes: {\n from: selection.from,\n to: selection.to,\n insert: template,\n },\n selection: {\n anchor: selection.from + 1,\n },\n });\n view.focus();\n }, [disabled]);\n\n const insertButtonTemplate = useCallback(() => {\n if (disabled || !editorViewRef.current) {\n return;\n }\n const view = editorViewRef.current;\n const { state, dispatch } = view;\n const selection = state.selection.main;\n const template = \"?[]\";\n dispatch({\n changes: {\n from: selection.from,\n to: selection.to,\n insert: template,\n },\n selection: {\n anchor: selection.from + 2,\n },\n });\n view.focus();\n }, [disabled]);\n\n const insertSingleChoiceTemplate = useCallback(() => {\n if (disabled || !editorViewRef.current) {\n return;\n }\n const view = editorViewRef.current;\n const { state, dispatch } = view;\n const selection = state.selection.main;\n const optionLabel1 = toolbarLabels.singleChoiceOption1;\n const optionLabel2 = toolbarLabels.singleChoiceOption2;\n const template = `?[%{{ ${questionMode ? currentStrings.questionPlaceholder : \"\"} }} ${optionLabel1} | ${optionLabel2}]`;\n dispatch({\n changes: {\n from: selection.from,\n to: selection.to,\n insert: template,\n },\n selection: {\n anchor: selection.from + 6,\n head:\n selection.from +\n 6 +\n (questionMode ? currentStrings.questionPlaceholder.length : 0),\n },\n });\n view.focus();\n }, [\n disabled,\n toolbarLabels.singleChoiceOption1,\n toolbarLabels.singleChoiceOption2,\n questionMode,\n currentStrings.questionPlaceholder,\n ]);\n\n const insertMultiChoiceTemplate = useCallback(() => {\n if (disabled || !editorViewRef.current) {\n return;\n }\n const view = editorViewRef.current;\n const { state, dispatch } = view;\n const selection = state.selection.main;\n const optionLabel1 = toolbarLabels.singleChoiceOption1;\n const optionLabel2 = toolbarLabels.singleChoiceOption2;\n const template = `?[%{{ ${questionMode ? currentStrings.questionPlaceholder : \"\"} }} ${optionLabel1} || ${optionLabel2}]`;\n dispatch({\n changes: {\n from: selection.from,\n to: selection.to,\n insert: template,\n },\n selection: {\n anchor: selection.from + 6,\n head:\n selection.from +\n 6 +\n (questionMode ? currentStrings.questionPlaceholder.length : 0),\n },\n });\n view.focus();\n }, [\n disabled,\n toolbarLabels.singleChoiceOption1,\n toolbarLabels.singleChoiceOption2,\n questionMode,\n currentStrings.questionPlaceholder,\n ]);\n\n const insertInputFieldTemplate = useCallback(() => {\n if (disabled || !editorViewRef.current) {\n return;\n }\n const view = editorViewRef.current;\n const { state, dispatch } = view;\n const selection = state.selection.main;\n const placeholder = toolbarLabels.inputPlaceholder ?? \"请输入\";\n const template = `?[%{{ ${questionMode ? currentStrings.questionPlaceholder : \"\"} }}...${placeholder}]`;\n dispatch({\n changes: {\n from: selection.from,\n to: selection.to,\n insert: template,\n },\n selection: {\n anchor: selection.from + 6,\n head:\n selection.from +\n 6 +\n (questionMode ? currentStrings.questionPlaceholder.length : 0),\n },\n });\n view.focus();\n }, [\n disabled,\n toolbarLabels.inputPlaceholder,\n questionMode,\n currentStrings.questionPlaceholder,\n ]);\n\n const handleSelectImage = useCallback(\n ({\n resourceUrl,\n resourceTitle,\n scalePercent,\n }: {\n resourceUrl?: string;\n resourceTitle?: string;\n scalePercent?: number;\n }) => {\n if (!resourceUrl || disabled) return;\n const textToInsert = getImageContentToInsert({\n resourceUrl,\n resourceTitle,\n scalePercent,\n });\n if (selectContentInfo?.type === SelectedOption.Image) {\n deleteSelectedContent();\n if (!editorViewRef.current) return;\n const { dispatch } = editorViewRef.current;\n dispatch({\n changes: { from: selectContentInfo.from, insert: textToInsert },\n });\n } else {\n insertText(textToInsert);\n }\n setDialogOpen(false);\n },\n [deleteSelectedContent, disabled, insertText, selectContentInfo]\n );\n\n const handleSelectVideo = useCallback(\n ({\n resourceUrl,\n resourceTitle,\n }: {\n resourceUrl: string;\n resourceTitle: string;\n }) => {\n if (disabled) {\n return;\n }\n const textToInsert = getVideoContentToInsert(resourceUrl, resourceTitle);\n if (selectContentInfo?.type === SelectedOption.Video) {\n deleteSelectedContent();\n if (!editorViewRef.current) return;\n const { dispatch } = editorViewRef.current;\n dispatch({\n changes: { from: selectContentInfo.from, insert: textToInsert },\n });\n } else {\n insertText(textToInsert);\n }\n setDialogOpen(false);\n },\n [deleteSelectedContent, disabled, insertText, selectContentInfo]\n );\n\n const slashCommandsExtension = useCallback(() => {\n return autocompletion({\n override: [\n createSlashCommands(onSelectedOption, {\n // divider: currentStrings.slashDivider,\n // fixedText: currentStrings.slashFixedText,\n image: currentStrings.slashImage,\n video: currentStrings.slashVideo,\n }),\n ],\n });\n }, [\n // currentStrings.slashDivider,\n // currentStrings.slashFixedText,\n currentStrings.slashImage,\n currentStrings.slashVideo,\n onSelectedOption,\n ]);\n\n // const fixedTextPlaceholderExtension = useMemo(\n // () =>\n // createFixedTextPlaceholder(\n // currentStrings.fixedTextPlaceholder ?? \"添加固定文本\",\n // currentStrings.fixedTextTooltip ??\n // currentStrings.slashFixedText ??\n // \"固定文本\"\n // ),\n // [\n // currentStrings.fixedTextPlaceholder,\n // currentStrings.fixedTextTooltip,\n // currentStrings.slashFixedText,\n // ]\n // );\n\n const handleEditorUpdate = useCallback((update: ViewUpdate) => {\n editorViewRef.current = update.view;\n }, []);\n\n const handleTagClick = useCallback(\n (event: any) => {\n event.stopPropagation();\n if (disabled) {\n return;\n }\n const { type, from, to, dataset } = event.detail;\n const value = parseContentInfo(type, dataset);\n setSelectContentInfo({\n type,\n value,\n from,\n to,\n });\n setSelectedOption(type);\n\n setDialogOpen(true);\n },\n [disabled]\n );\n\n useEffect(() => {\n if (!dialogOpen) {\n setSelectedOption(SelectedOption.Empty);\n setSelectContentInfo(null);\n }\n }, [dialogOpen]);\n\n useEffect(() => {\n const handleWrap = (e: any) => {\n if (e.detail.view === editorViewRef.current) {\n handleTagClick(e);\n }\n };\n window.addEventListener(\"globalTagClick\", handleWrap);\n return () => {\n window.removeEventListener(\"globalTagClick\", handleWrap);\n };\n }, [handleTagClick]);\n\n const imagePlaceholderTitle = t(\"imageDefaultTitle\");\n const videoPlaceholderTitle = t(\"videoDefaultTitle\");\n const mediaPlaceholderLabelsExtension = useMemo(\n () =>\n mediaPlaceholderLabels.of({\n image: imagePlaceholderTitle,\n video: videoPlaceholderTitle,\n }),\n [imagePlaceholderTitle, videoPlaceholderTitle]\n );\n\n const editorExtensions = useMemo(() => {\n const extensions = [\n EditorView.lineWrapping,\n markdown(),\n syntaxHighlighting(defaultHighlightStyle),\n questionMode ? QuestionSyntaxHighlighter : SyntaxHighlighter,\n ];\n\n if (!disabled) {\n extensions.push(slashCommandsExtension());\n }\n\n if (editMode === EditMode.QuickEdit) {\n extensions.push(\n mediaPlaceholderLabelsExtension,\n ImgPlaceholder,\n VideoPlaceholder\n // fixedTextPlaceholderExtension,\n // DividerPlaceholder,\n );\n }\n\n extensions.push(\n EditorView.updateListener.of((update) => {\n handleEditorUpdate(update);\n })\n );\n\n return extensions;\n }, [\n disabled,\n editMode,\n slashCommandsExtension,\n handleEditorUpdate,\n mediaPlaceholderLabelsExtension,\n questionMode,\n ]);\n\n const handleContentChange = useCallback(\n (value: string) => {\n if (disabled) {\n return;\n }\n onChange?.(value);\n },\n [onChange, disabled]\n );\n\n const editorApi = useMemo(\n () => ({\n insertTextAtCursor: insertText,\n replaceSelection,\n focus: focusEditor,\n getContent,\n setContent,\n }),\n [focusEditor, getContent, insertText, replaceSelection, setContent]\n );\n\n const handleToolbarActionClick = useCallback(\n (action: EditorAction) => {\n if (disabled || \"render\" in action) {\n return;\n }\n action.onClick?.(editorApi);\n },\n [disabled, editorApi]\n );\n\n const toolbarRightSlot = useMemo(() => {\n if (!toolbarActionsRight?.length) {\n return null;\n }\n return (\n <div className=\"markdown-flow-editor-toolbar-right\">\n {toolbarActionsRight.map((action) => {\n if (\"render\" in action) {\n return (\n <div\n className=\"markdown-flow-editor-toolbar-right-item\"\n key={action.key}\n >\n {action.render(editorApi)}\n </div>\n );\n }\n const ariaLabel = action.label || action.tooltip || undefined;\n const button = (\n <button\n type=\"button\"\n key={action.key}\n disabled={disabled || action.disabled}\n onClick={() => handleToolbarActionClick(action)}\n className=\"markdown-flow-editor-toolbar-right-button\"\n aria-label={ariaLabel}\n title={action.label || action.tooltip}\n >\n {action.icon ? (\n <span className=\"toolbar-right-icon\">{action.icon}</span>\n ) : null}\n {action.label ? (\n <span className=\"toolbar-right-label\">{action.label}</span>\n ) : null}\n </button>\n );\n const wrapped = action.tooltip ? (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent\n side=\"top\"\n dir={portalDirection}\n lang={portalLanguage}\n >\n {action.tooltip}\n </TooltipContent>\n </Tooltip>\n ) : (\n button\n );\n return (\n <div\n className=\"markdown-flow-editor-toolbar-right-item\"\n key={action.key}\n >\n {wrapped}\n </div>\n );\n })}\n </div>\n );\n }, [\n disabled,\n editorApi,\n handleToolbarActionClick,\n portalDirection,\n portalLanguage,\n toolbarActionsRight,\n ]);\n\n useEffect(() => {\n onReady?.(editorApi);\n }, [editorApi]);\n\n return (\n <div\n className=\"markdown-flow-editor\"\n ref={editorRootRef}\n dir={direction}\n lang={language}\n data-disabled={disabled ? \"true\" : undefined}\n aria-disabled={disabled}\n >\n <EditorToolbar\n disabled={disabled}\n labels={toolbarLabels}\n tooltipDirection={portalDirection}\n tooltipLanguage={portalLanguage}\n onSelect={onSelectedOption}\n onInsertConfirmOutput={insertConfirmOutputMarker}\n onInsertLink={insertLinkTemplate}\n onInsertButton={insertButtonTemplate}\n onInsertSingleChoice={insertSingleChoiceTemplate}\n onInsertMultiChoice={insertMultiChoiceTemplate}\n onInsertInputField={insertInputFieldTemplate}\n rightSlot={toolbarRightSlot}\n />\n <div className=\"markdown-flow-editor-body relative overflow-auto\">\n <EditorContext.Provider value={editorContextValue}>\n <CodeMirror\n extensions={editorExtensions}\n basicSetup={{\n lineNumbers: false,\n searchKeymap: false,\n syntaxHighlighting: true,\n highlightActiveLine: true,\n highlightActiveLineGutter: true,\n foldGutter: false,\n }}\n className=\"rounded-md\"\n placeholder={placeholderText}\n value={content}\n theme=\"light\"\n minHeight=\"2rem\"\n editable={!disabled}\n onChange={handleContentChange}\n onBlur={onBlur}\n />\n {!disabled && (\n <CustomDialog\n dir={portalDirection}\n lang={portalLanguage}\n labels={{\n closeButtonLabel: t(\"dialogCloseLabel\"),\n title:\n selectedOption === SelectedOption.Image\n ? t(\"dialogTitleImage\")\n : selectedOption === SelectedOption.Video\n ? t(\"dialogTitleVideo\")\n : t(\"dialogTitle\"),\n }}\n >\n {selectedOption === SelectedOption.Image && (\n <ImageInject\n value={selectContentInfo?.value}\n onSelect={handleSelectImage}\n uploadProps={uploadProps}\n />\n )}\n {selectedOption === SelectedOption.Video && (\n <VideoInject\n value={selectContentInfo?.value}\n onSelect={handleSelectVideo}\n />\n )}\n </CustomDialog>\n )}\n </EditorContext.Provider>\n </div>\n </div>\n );\n};\n\nexport default Editor;\n"],"names":["i18next","editorLocaleResources","lng","resource","initReactI18next","DEFAULT_EDITOR_LOCALE","Editor","content","editMode","questionMode","onChange","onBlur","locale","lang","uploadProps","disabled","toolbarActionsRight","onReady","t","i18n","useTranslation","resolvedLocale","normalizeMarkdownFlowLocale","direction","getMarkdownFlowDirection","language","getMarkdownFlowLanguage","useEffect","currentStrings","getEditorLocaleMessages","toolbarLabels","useMemo","placeholderText","dialogOpen","setDialogOpen","useState","editorRootRef","useRef","portalLanguage","useDetachedLanguage","portalDirection","useResolvedDirection","selectedOption","setSelectedOption","SelectedOption","selectContentInfo","setSelectContentInfo","editorViewRef","editorContextValue","onSelectedOption","useCallback","option","insertText","text","state","dispatch","from","replaceSelection","selection","focusEditor","getContent","setContent","view","deleteSelectedContent","to","insertConfirmOutputMarker","insertLinkTemplate","insertButtonTemplate","insertSingleChoiceTemplate","optionLabel1","optionLabel2","template","insertMultiChoiceTemplate","insertInputFieldTemplate","placeholder","handleSelectImage","resourceUrl","resourceTitle","scalePercent","textToInsert","getImageContentToInsert","handleSelectVideo","getVideoContentToInsert","slashCommandsExtension","autocompletion","createSlashCommands","handleEditorUpdate","update","handleTagClick","event","type","dataset","value","parseContentInfo","handleWrap","e","imagePlaceholderTitle","videoPlaceholderTitle","mediaPlaceholderLabelsExtension","mediaPlaceholderLabels","editorExtensions","extensions","EditorView","markdown","syntaxHighlighting","defaultHighlightStyle","QuestionSyntaxHighlighter","SyntaxHighlighter","ImgPlaceholder","VideoPlaceholder","handleContentChange","editorApi","handleToolbarActionClick","action","toolbarRightSlot","jsx","ariaLabel","button","jsxs","wrapped","Tooltip","TooltipTrigger","TooltipContent","EditorToolbar","EditorContext","CodeMirror","CustomDialog","ImageInject","VideoInject"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA0DKA,EAAQ,gBAQX,OAAO,QAAQC,EAAqB,EAAE,QAAQ,CAAC,CAACC,GAAKC,CAAQ,MAAM;AACjEH,EAAAA,EAAQ;AAAA,IACNE;AAAA,IACA;AAAA,IACAC,EAAS;AAAA,IACT;AAAA,IACA;AAAA,EAAA;AAEJ,CAAC,IAfDH,EAAQ,IAAII,EAAgB,EAAE,KAAK;AAAA,EACjC,WAAWH;AAAA,EACX,KAAKI;AAAA,EACL,aAAaA;AAAA,EACb,eAAe,EAAE,aAAa,GAAA;AAAM,CACrC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,EAAe,QAChC1B,EAAE,kBAAkB,IACpBA,EAAE,aAAa;AAAA,cAAA;AAAA,cAGxB,UAAA;AAAA,gBAAAwB,MAAmBE,EAAe,SACjC,gBAAAuE;AAAA,kBAACY;AAAA,kBAAA;AAAA,oBACC,OAAOlF,GAAmB;AAAA,oBAC1B,UAAU8B;AAAA,oBACV,aAAA7D;AAAA,kBAAA;AAAA,gBAAA;AAAA,gBAGH4B,MAAmBE,EAAe,SACjC,gBAAAuE;AAAA,kBAACa;AAAA,kBAAA;AAAA,oBACC,OAAOnF,GAAmB;AAAA,oBAC1B,UAAUoC;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACZ;AAAA,YAAA;AAAA,UAAA;AAAA,QAEJ,EAAA,CAEJ,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -56,6 +56,7 @@ export declare const editorLocaleResources: {
|
|
|
56
56
|
toolbarInputPlaceholder: string;
|
|
57
57
|
toolbarInsertImage: string;
|
|
58
58
|
toolbarInsertVideo: string;
|
|
59
|
+
questionPlaceholder: string;
|
|
59
60
|
};
|
|
60
61
|
};
|
|
61
62
|
readonly "es-ES": {
|
|
@@ -114,6 +115,7 @@ export declare const editorLocaleResources: {
|
|
|
114
115
|
toolbarInputPlaceholder: string;
|
|
115
116
|
toolbarInsertImage: string;
|
|
116
117
|
toolbarInsertVideo: string;
|
|
118
|
+
questionPlaceholder: string;
|
|
117
119
|
};
|
|
118
120
|
};
|
|
119
121
|
readonly "fr-FR": {
|
|
@@ -172,6 +174,7 @@ export declare const editorLocaleResources: {
|
|
|
172
174
|
toolbarInputPlaceholder: string;
|
|
173
175
|
toolbarInsertImage: string;
|
|
174
176
|
toolbarInsertVideo: string;
|
|
177
|
+
questionPlaceholder: string;
|
|
175
178
|
};
|
|
176
179
|
};
|
|
177
180
|
readonly "zh-CN": {
|
|
@@ -230,6 +233,7 @@ export declare const editorLocaleResources: {
|
|
|
230
233
|
toolbarInputPlaceholder: string;
|
|
231
234
|
toolbarInsertImage: string;
|
|
232
235
|
toolbarInsertVideo: string;
|
|
236
|
+
questionPlaceholder: string;
|
|
233
237
|
};
|
|
234
238
|
};
|
|
235
239
|
readonly "ar-SA": {
|
|
@@ -288,6 +292,7 @@ export declare const editorLocaleResources: {
|
|
|
288
292
|
toolbarInputPlaceholder: string;
|
|
289
293
|
toolbarInsertImage: string;
|
|
290
294
|
toolbarInsertVideo: string;
|
|
295
|
+
questionPlaceholder: string;
|
|
291
296
|
};
|
|
292
297
|
};
|
|
293
298
|
readonly "th-TH": {
|
|
@@ -346,6 +351,7 @@ export declare const editorLocaleResources: {
|
|
|
346
351
|
toolbarInputPlaceholder: string;
|
|
347
352
|
toolbarInsertImage: string;
|
|
348
353
|
toolbarInsertVideo: string;
|
|
354
|
+
questionPlaceholder: string;
|
|
349
355
|
};
|
|
350
356
|
};
|
|
351
357
|
readonly "de-DE": {
|
|
@@ -404,6 +410,7 @@ export declare const editorLocaleResources: {
|
|
|
404
410
|
toolbarInputPlaceholder: string;
|
|
405
411
|
toolbarInsertImage: string;
|
|
406
412
|
toolbarInsertVideo: string;
|
|
413
|
+
questionPlaceholder: string;
|
|
407
414
|
};
|
|
408
415
|
};
|
|
409
416
|
readonly "ja-JP": {
|
|
@@ -462,6 +469,7 @@ export declare const editorLocaleResources: {
|
|
|
462
469
|
toolbarInputPlaceholder: string;
|
|
463
470
|
toolbarInsertImage: string;
|
|
464
471
|
toolbarInsertVideo: string;
|
|
472
|
+
questionPlaceholder: string;
|
|
465
473
|
};
|
|
466
474
|
};
|
|
467
475
|
readonly "ur-PK": {
|
|
@@ -520,6 +528,7 @@ export declare const editorLocaleResources: {
|
|
|
520
528
|
toolbarInputPlaceholder: string;
|
|
521
529
|
toolbarInsertImage: string;
|
|
522
530
|
toolbarInsertVideo: string;
|
|
531
|
+
questionPlaceholder: string;
|
|
523
532
|
};
|
|
524
533
|
};
|
|
525
534
|
readonly "fil-PH": {
|
|
@@ -578,6 +587,7 @@ export declare const editorLocaleResources: {
|
|
|
578
587
|
toolbarInputPlaceholder: string;
|
|
579
588
|
toolbarInsertImage: string;
|
|
580
589
|
toolbarInsertVideo: string;
|
|
590
|
+
questionPlaceholder: string;
|
|
581
591
|
};
|
|
582
592
|
};
|
|
583
593
|
readonly "vi-VN": {
|
|
@@ -636,6 +646,7 @@ export declare const editorLocaleResources: {
|
|
|
636
646
|
toolbarInputPlaceholder: string;
|
|
637
647
|
toolbarInsertImage: string;
|
|
638
648
|
toolbarInsertVideo: string;
|
|
649
|
+
questionPlaceholder: string;
|
|
639
650
|
};
|
|
640
651
|
};
|
|
641
652
|
};
|
|
@@ -694,6 +705,7 @@ export declare const getEditorLocaleMessages: (locale?: string | null) => {
|
|
|
694
705
|
toolbarInputPlaceholder: string;
|
|
695
706
|
toolbarInsertImage: string;
|
|
696
707
|
toolbarInsertVideo: string;
|
|
708
|
+
questionPlaceholder: string;
|
|
697
709
|
} | {
|
|
698
710
|
placeholder: string;
|
|
699
711
|
placeholderCodeEdit: string;
|
|
@@ -749,6 +761,7 @@ export declare const getEditorLocaleMessages: (locale?: string | null) => {
|
|
|
749
761
|
toolbarInputPlaceholder: string;
|
|
750
762
|
toolbarInsertImage: string;
|
|
751
763
|
toolbarInsertVideo: string;
|
|
764
|
+
questionPlaceholder: string;
|
|
752
765
|
} | {
|
|
753
766
|
placeholder: string;
|
|
754
767
|
placeholderCodeEdit: string;
|
|
@@ -804,6 +817,7 @@ export declare const getEditorLocaleMessages: (locale?: string | null) => {
|
|
|
804
817
|
toolbarInputPlaceholder: string;
|
|
805
818
|
toolbarInsertImage: string;
|
|
806
819
|
toolbarInsertVideo: string;
|
|
820
|
+
questionPlaceholder: string;
|
|
807
821
|
} | {
|
|
808
822
|
placeholder: string;
|
|
809
823
|
placeholderCodeEdit: string;
|
|
@@ -859,6 +873,7 @@ export declare const getEditorLocaleMessages: (locale?: string | null) => {
|
|
|
859
873
|
toolbarInputPlaceholder: string;
|
|
860
874
|
toolbarInsertImage: string;
|
|
861
875
|
toolbarInsertVideo: string;
|
|
876
|
+
questionPlaceholder: string;
|
|
862
877
|
} | {
|
|
863
878
|
placeholder: string;
|
|
864
879
|
placeholderCodeEdit: string;
|
|
@@ -914,6 +929,7 @@ export declare const getEditorLocaleMessages: (locale?: string | null) => {
|
|
|
914
929
|
toolbarInputPlaceholder: string;
|
|
915
930
|
toolbarInsertImage: string;
|
|
916
931
|
toolbarInsertVideo: string;
|
|
932
|
+
questionPlaceholder: string;
|
|
917
933
|
} | {
|
|
918
934
|
placeholder: string;
|
|
919
935
|
placeholderCodeEdit: string;
|
|
@@ -969,6 +985,7 @@ export declare const getEditorLocaleMessages: (locale?: string | null) => {
|
|
|
969
985
|
toolbarInputPlaceholder: string;
|
|
970
986
|
toolbarInsertImage: string;
|
|
971
987
|
toolbarInsertVideo: string;
|
|
988
|
+
questionPlaceholder: string;
|
|
972
989
|
} | {
|
|
973
990
|
placeholder: string;
|
|
974
991
|
placeholderCodeEdit: string;
|
|
@@ -1024,6 +1041,7 @@ export declare const getEditorLocaleMessages: (locale?: string | null) => {
|
|
|
1024
1041
|
toolbarInputPlaceholder: string;
|
|
1025
1042
|
toolbarInsertImage: string;
|
|
1026
1043
|
toolbarInsertVideo: string;
|
|
1044
|
+
questionPlaceholder: string;
|
|
1027
1045
|
} | {
|
|
1028
1046
|
placeholder: string;
|
|
1029
1047
|
placeholderCodeEdit: string;
|
|
@@ -1079,6 +1097,7 @@ export declare const getEditorLocaleMessages: (locale?: string | null) => {
|
|
|
1079
1097
|
toolbarInputPlaceholder: string;
|
|
1080
1098
|
toolbarInsertImage: string;
|
|
1081
1099
|
toolbarInsertVideo: string;
|
|
1100
|
+
questionPlaceholder: string;
|
|
1082
1101
|
} | {
|
|
1083
1102
|
placeholder: string;
|
|
1084
1103
|
placeholderCodeEdit: string;
|
|
@@ -1134,6 +1153,7 @@ export declare const getEditorLocaleMessages: (locale?: string | null) => {
|
|
|
1134
1153
|
toolbarInputPlaceholder: string;
|
|
1135
1154
|
toolbarInsertImage: string;
|
|
1136
1155
|
toolbarInsertVideo: string;
|
|
1156
|
+
questionPlaceholder: string;
|
|
1137
1157
|
} | {
|
|
1138
1158
|
placeholder: string;
|
|
1139
1159
|
placeholderCodeEdit: string;
|
|
@@ -1189,6 +1209,7 @@ export declare const getEditorLocaleMessages: (locale?: string | null) => {
|
|
|
1189
1209
|
toolbarInputPlaceholder: string;
|
|
1190
1210
|
toolbarInsertImage: string;
|
|
1191
1211
|
toolbarInsertVideo: string;
|
|
1212
|
+
questionPlaceholder: string;
|
|
1192
1213
|
} | {
|
|
1193
1214
|
placeholder: string;
|
|
1194
1215
|
placeholderCodeEdit: string;
|
|
@@ -1244,4 +1265,5 @@ export declare const getEditorLocaleMessages: (locale?: string | null) => {
|
|
|
1244
1265
|
toolbarInputPlaceholder: string;
|
|
1245
1266
|
toolbarInsertImage: string;
|
|
1246
1267
|
toolbarInsertVideo: string;
|
|
1268
|
+
questionPlaceholder: string;
|
|
1247
1269
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="اكتب '/' لإدراج محتوى بسرعة",o="أدخل المحتوى الذي تريد كتابته",t="أدخل المحتوى، واكتب / لعرض المزيد",l="الإعدادات",i="إغلاق",a="إضافة صورة",n="إضافة فيديو",s="أدخل رابط الصورة",
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="اكتب '/' لإدراج محتوى بسرعة",o="أدخل المحتوى الذي تريد كتابته",t="أدخل المحتوى، واكتب / لعرض المزيد",l="الإعدادات",i="إغلاق",a="إضافة صورة",n="إضافة فيديو",s="أدخل رابط الصورة",c="URL",d="معاينة",r="أدخل عنوان الصورة",u="استخدام الصورة",g="اسم الصورة",b="رفع",m="اسحب الملفات أو انقر للرفع",h="جارٍ الرفع...",v="اكتمل الرفع",T="فشل الرفع، يرجى المحاولة مرة أخرى",U="إضافة نص ثابت",p="نص ثابت",I="خط فاصل",P="عنوان الصورة",B="نسبة التحجيم",C="إلغاء",L="يرجى إدخال رابط الصورة",f="يرجى إدخال رابط صورة صالح",x="أدخل رابط فيديو من Bilibili أو YouTube",D="URL",S="معاينة",R="استخدام المورد",V="أدخل عنوان الفيديو",O="العنوان",E="عنوان الفيديو",Y="فيديو Bilibili",k="فيديو YouTube",q="يرجى إدخال رابط فيديو صالح من Bilibili أو YouTube",w="إلغاء",M="استخدام الفيديو",F="ستظهر المعاينة هنا",Q="معاينة الفيديو",_="صورة",j="فيديو",y="نص ثابت",A="إدراج ناتج التأكيد",z="إدراج رابط",G="إدراج زر",H="إدراج اختيار واحد",J="الخيار 1",K="الخيار 2",N="إدراج اختيار متعدد",W="إدراج حقل إدخال",X="يرجى الإدخال",Z="إدراج صورة",$="إدراج فيديو",ee="سؤالك",oe={placeholder:e,placeholderCodeEdit:o,placeholderQuickEdit:t,dialogTitle:l,dialogCloseLabel:i,dialogTitleImage:a,dialogTitleVideo:n,imageUrlPlaceholder:s,imageUrlLabel:c,imageRunButton:d,imageTitlePlaceholder:r,imageUseButton:u,imageDefaultTitle:g,imageUploadLabel:b,imageUploadPlaceholder:m,imageUploading:h,imageUploadSuccess:v,imageUploadError:T,fixedTextPlaceholder:U,fixedTextTooltip:p,slashDivider:I,imageTitleLabel:P,imageScaleLabel:B,imageCancelButton:C,imageUrlRequired:L,imageInvalidUrl:f,videoUrlPlaceholder:x,videoUrlLabel:D,videoRunButton:S,videoUseButton:R,videoTitlePlaceholder:V,videoTitleLabel:O,videoDefaultTitle:E,videoDefaultTitleBilibili:Y,videoDefaultTitleYoutube:k,videoInvalidUrl:q,videoCancelButton:w,videoUseVideoButton:M,videoPreviewPlaceholder:F,videoPreviewTitle:Q,slashImage:_,slashVideo:j,slashFixedText:y,toolbarConfirmOutput:A,toolbarInsertLink:z,toolbarInsertButton:G,toolbarInsertSingleChoice:H,toolbarChoiceOption1:J,toolbarChoiceOption2:K,toolbarInsertMultiChoice:N,toolbarInsertInput:W,toolbarInputPlaceholder:X,toolbarInsertImage:Z,toolbarInsertVideo:$,questionPlaceholder:ee};exports.default=oe;exports.dialogCloseLabel=i;exports.dialogTitle=l;exports.dialogTitleImage=a;exports.dialogTitleVideo=n;exports.fixedTextPlaceholder=U;exports.fixedTextTooltip=p;exports.imageCancelButton=C;exports.imageDefaultTitle=g;exports.imageInvalidUrl=f;exports.imageRunButton=d;exports.imageScaleLabel=B;exports.imageTitleLabel=P;exports.imageTitlePlaceholder=r;exports.imageUploadError=T;exports.imageUploadLabel=b;exports.imageUploadPlaceholder=m;exports.imageUploadSuccess=v;exports.imageUploading=h;exports.imageUrlLabel=c;exports.imageUrlPlaceholder=s;exports.imageUrlRequired=L;exports.imageUseButton=u;exports.placeholder=e;exports.placeholderCodeEdit=o;exports.placeholderQuickEdit=t;exports.questionPlaceholder=ee;exports.slashDivider=I;exports.slashFixedText=y;exports.slashImage=_;exports.slashVideo=j;exports.toolbarChoiceOption1=J;exports.toolbarChoiceOption2=K;exports.toolbarConfirmOutput=A;exports.toolbarInputPlaceholder=X;exports.toolbarInsertButton=G;exports.toolbarInsertImage=Z;exports.toolbarInsertInput=W;exports.toolbarInsertLink=z;exports.toolbarInsertMultiChoice=N;exports.toolbarInsertSingleChoice=H;exports.toolbarInsertVideo=$;exports.videoCancelButton=w;exports.videoDefaultTitle=E;exports.videoDefaultTitleBilibili=Y;exports.videoDefaultTitleYoutube=k;exports.videoInvalidUrl=q;exports.videoPreviewPlaceholder=F;exports.videoPreviewTitle=Q;exports.videoRunButton=S;exports.videoTitleLabel=O;exports.videoTitlePlaceholder=V;exports.videoUrlLabel=D;exports.videoUrlPlaceholder=x;exports.videoUseButton=R;exports.videoUseVideoButton=M;
|
|
2
2
|
//# sourceMappingURL=ar-SA.json.cjs.map
|
|
@@ -52,7 +52,8 @@ declare const _default: {
|
|
|
52
52
|
"toolbarInsertInput": "إدراج حقل إدخال",
|
|
53
53
|
"toolbarInputPlaceholder": "يرجى الإدخال",
|
|
54
54
|
"toolbarInsertImage": "إدراج صورة",
|
|
55
|
-
"toolbarInsertVideo": "إدراج فيديو"
|
|
55
|
+
"toolbarInsertVideo": "إدراج فيديو",
|
|
56
|
+
"questionPlaceholder": "سؤالك"
|
|
56
57
|
}
|
|
57
58
|
;
|
|
58
59
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const o = "اكتب '/' لإدراج محتوى بسرعة", e = "أدخل المحتوى الذي تريد كتابته", t = "أدخل المحتوى، واكتب / لعرض المزيد", l = "الإعدادات", i = "إغلاق", n = "إضافة صورة", a = "إضافة فيديو", s = "أدخل رابط الصورة",
|
|
1
|
+
const o = "اكتب '/' لإدراج محتوى بسرعة", e = "أدخل المحتوى الذي تريد كتابته", t = "أدخل المحتوى، واكتب / لعرض المزيد", l = "الإعدادات", i = "إغلاق", n = "إضافة صورة", a = "إضافة فيديو", s = "أدخل رابط الصورة", _ = "URL", c = "معاينة", d = "أدخل عنوان الصورة", r = "استخدام الصورة", u = "اسم الصورة", $ = "رفع", b = "اسحب الملفات أو انقر للرفع", g = "جارٍ الرفع...", m = "اكتمل الرفع", h = "فشل الرفع، يرجى المحاولة مرة أخرى", v = "إضافة نص ثابت", U = "نص ثابت", T = "خط فاصل", p = "عنوان الصورة", I = "نسبة التحجيم", L = "إلغاء", B = "يرجى إدخال رابط الصورة", P = "يرجى إدخال رابط صورة صالح", C = "أدخل رابط فيديو من Bilibili أو YouTube", oo = "URL", f = "معاينة", x = "استخدام المورد", D = "أدخل عنوان الفيديو", R = "العنوان", S = "عنوان الفيديو", V = "فيديو Bilibili", Y = "فيديو YouTube", E = "يرجى إدخال رابط فيديو صالح من Bilibili أو YouTube", O = "إلغاء", k = "استخدام الفيديو", q = "ستظهر المعاينة هنا", w = "معاينة الفيديو", A = "صورة", F = "فيديو", M = "نص ثابت", Q = "إدراج ناتج التأكيد", j = "إدراج رابط", y = "إدراج زر", z = "إدراج اختيار واحد", G = "الخيار 1", H = "الخيار 2", J = "إدراج اختيار متعدد", K = "إدراج حقل إدخال", N = "يرجى الإدخال", W = "إدراج صورة", X = "إدراج فيديو", Z = "سؤالك", eo = {
|
|
2
2
|
placeholder: o,
|
|
3
3
|
placeholderCodeEdit: e,
|
|
4
4
|
placeholderQuickEdit: t,
|
|
@@ -16,9 +16,9 @@ const o = "اكتب '/' لإدراج محتوى بسرعة", e = "أدخل ال
|
|
|
16
16
|
imageUploadPlaceholder: b,
|
|
17
17
|
imageUploading: g,
|
|
18
18
|
imageUploadSuccess: m,
|
|
19
|
-
imageUploadError:
|
|
20
|
-
fixedTextPlaceholder:
|
|
21
|
-
fixedTextTooltip:
|
|
19
|
+
imageUploadError: h,
|
|
20
|
+
fixedTextPlaceholder: v,
|
|
21
|
+
fixedTextTooltip: U,
|
|
22
22
|
slashDivider: T,
|
|
23
23
|
imageTitleLabel: p,
|
|
24
24
|
imageScaleLabel: I,
|
|
@@ -37,8 +37,8 @@ const o = "اكتب '/' لإدراج محتوى بسرعة", e = "أدخل ال
|
|
|
37
37
|
videoInvalidUrl: E,
|
|
38
38
|
videoCancelButton: O,
|
|
39
39
|
videoUseVideoButton: k,
|
|
40
|
-
videoPreviewPlaceholder:
|
|
41
|
-
videoPreviewTitle:
|
|
40
|
+
videoPreviewPlaceholder: q,
|
|
41
|
+
videoPreviewTitle: w,
|
|
42
42
|
slashImage: A,
|
|
43
43
|
slashVideo: F,
|
|
44
44
|
slashFixedText: M,
|
|
@@ -52,16 +52,17 @@ const o = "اكتب '/' لإدراج محتوى بسرعة", e = "أدخل ال
|
|
|
52
52
|
toolbarInsertInput: K,
|
|
53
53
|
toolbarInputPlaceholder: N,
|
|
54
54
|
toolbarInsertImage: W,
|
|
55
|
-
toolbarInsertVideo: X
|
|
55
|
+
toolbarInsertVideo: X,
|
|
56
|
+
questionPlaceholder: Z
|
|
56
57
|
};
|
|
57
58
|
export {
|
|
58
|
-
|
|
59
|
+
eo as default,
|
|
59
60
|
i as dialogCloseLabel,
|
|
60
61
|
l as dialogTitle,
|
|
61
62
|
n as dialogTitleImage,
|
|
62
63
|
a as dialogTitleVideo,
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
v as fixedTextPlaceholder,
|
|
65
|
+
U as fixedTextTooltip,
|
|
65
66
|
L as imageCancelButton,
|
|
66
67
|
u as imageDefaultTitle,
|
|
67
68
|
P as imageInvalidUrl,
|
|
@@ -69,18 +70,19 @@ export {
|
|
|
69
70
|
I as imageScaleLabel,
|
|
70
71
|
p as imageTitleLabel,
|
|
71
72
|
d as imageTitlePlaceholder,
|
|
72
|
-
|
|
73
|
-
|
|
73
|
+
h as imageUploadError,
|
|
74
|
+
$ as imageUploadLabel,
|
|
74
75
|
b as imageUploadPlaceholder,
|
|
75
76
|
m as imageUploadSuccess,
|
|
76
77
|
g as imageUploading,
|
|
77
|
-
|
|
78
|
+
_ as imageUrlLabel,
|
|
78
79
|
s as imageUrlPlaceholder,
|
|
79
80
|
B as imageUrlRequired,
|
|
80
81
|
r as imageUseButton,
|
|
81
82
|
o as placeholder,
|
|
82
83
|
e as placeholderCodeEdit,
|
|
83
84
|
t as placeholderQuickEdit,
|
|
85
|
+
Z as questionPlaceholder,
|
|
84
86
|
T as slashDivider,
|
|
85
87
|
M as slashFixedText,
|
|
86
88
|
A as slashImage,
|
|
@@ -101,12 +103,12 @@ export {
|
|
|
101
103
|
V as videoDefaultTitleBilibili,
|
|
102
104
|
Y as videoDefaultTitleYoutube,
|
|
103
105
|
E as videoInvalidUrl,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
+
q as videoPreviewPlaceholder,
|
|
107
|
+
w as videoPreviewTitle,
|
|
106
108
|
f as videoRunButton,
|
|
107
109
|
R as videoTitleLabel,
|
|
108
110
|
D as videoTitlePlaceholder,
|
|
109
|
-
|
|
111
|
+
oo as videoUrlLabel,
|
|
110
112
|
C as videoUrlPlaceholder,
|
|
111
113
|
x as videoUseButton,
|
|
112
114
|
k as videoUseVideoButton
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ar-SA.json.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ar-SA.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 e="Gib '/' ein, um Inhalte einzufügen",i="Gib deinen Inhalt ein",o="Gib deinen Inhalt ein und tippe '/' für weitere Optionen",t="Einstellungen",l="Schließen",n="Bild hinzufügen",a="Video hinzufügen",d="Gib die Bild-URL ein",s="URL",
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="Gib '/' ein, um Inhalte einzufügen",i="Gib deinen Inhalt ein",o="Gib deinen Inhalt ein und tippe '/' für weitere Optionen",t="Einstellungen",l="Schließen",n="Bild hinzufügen",a="Video hinzufügen",d="Gib die Bild-URL ein",s="URL",r="Vorschau",c="Gib den Bildtitel ein",u="Bild verwenden",g="Bildname",h="Hochladen",b="Dateien hierher ziehen oder zum Hochladen klicken",v="Wird hochgeladen...",m="Hochladen abgeschlossen",T="Hochladen fehlgeschlagen. Bitte versuche es erneut.",U="Feststehenden Text hinzufügen",f="Feststehender Text",p="Trennlinie",B="Bildtitel",I="Skalierung",L="Abbrechen",P="Gib die Bild-URL ein",V="Gib eine gültige Bild-URL ein",C="Gib eine Bilibili- oder YouTube-Video-URL ein",x="URL",R="Vorschau",D="Ressource verwenden",w="Gib den Videotitel ein",S="Titel",E="Videotitel",G="Bilibili-Video",O="YouTube-Video",k="Gib eine gültige Bilibili- oder YouTube-Video-URL ein",z="Abbrechen",F="Video verwenden",M="Die Vorschau wird hier angezeigt",Y="Videovorschau",q="Bild",H="Video",A="Feststehender Text",Q="Bestätigungsausgabe einfügen",_="Link einfügen",j="Schaltfläche einfügen",y="Einfachauswahl einfügen",W="Option 1",J="Option 2",K="Mehrfachauswahl einfügen",N="Eingabefeld einfügen",X="Bitte eingeben",Z="Bild einfügen",$="Video einfügen",ee="Ihre Frage",ie={placeholder:e,placeholderCodeEdit:i,placeholderQuickEdit:o,dialogTitle:t,dialogCloseLabel:l,dialogTitleImage:n,dialogTitleVideo:a,imageUrlPlaceholder:d,imageUrlLabel:s,imageRunButton:r,imageTitlePlaceholder:c,imageUseButton:u,imageDefaultTitle:g,imageUploadLabel:h,imageUploadPlaceholder:b,imageUploading:v,imageUploadSuccess:m,imageUploadError:T,fixedTextPlaceholder:U,fixedTextTooltip:f,slashDivider:p,imageTitleLabel:B,imageScaleLabel:I,imageCancelButton:L,imageUrlRequired:P,imageInvalidUrl:V,videoUrlPlaceholder:C,videoUrlLabel:x,videoRunButton:R,videoUseButton:D,videoTitlePlaceholder:w,videoTitleLabel:S,videoDefaultTitle:E,videoDefaultTitleBilibili:G,videoDefaultTitleYoutube:O,videoInvalidUrl:k,videoCancelButton:z,videoUseVideoButton:F,videoPreviewPlaceholder:M,videoPreviewTitle:Y,slashImage:q,slashVideo:H,slashFixedText:A,toolbarConfirmOutput:Q,toolbarInsertLink:_,toolbarInsertButton:j,toolbarInsertSingleChoice:y,toolbarChoiceOption1:W,toolbarChoiceOption2:J,toolbarInsertMultiChoice:K,toolbarInsertInput:N,toolbarInputPlaceholder:X,toolbarInsertImage:Z,toolbarInsertVideo:$,questionPlaceholder:ee};exports.default=ie;exports.dialogCloseLabel=l;exports.dialogTitle=t;exports.dialogTitleImage=n;exports.dialogTitleVideo=a;exports.fixedTextPlaceholder=U;exports.fixedTextTooltip=f;exports.imageCancelButton=L;exports.imageDefaultTitle=g;exports.imageInvalidUrl=V;exports.imageRunButton=r;exports.imageScaleLabel=I;exports.imageTitleLabel=B;exports.imageTitlePlaceholder=c;exports.imageUploadError=T;exports.imageUploadLabel=h;exports.imageUploadPlaceholder=b;exports.imageUploadSuccess=m;exports.imageUploading=v;exports.imageUrlLabel=s;exports.imageUrlPlaceholder=d;exports.imageUrlRequired=P;exports.imageUseButton=u;exports.placeholder=e;exports.placeholderCodeEdit=i;exports.placeholderQuickEdit=o;exports.questionPlaceholder=ee;exports.slashDivider=p;exports.slashFixedText=A;exports.slashImage=q;exports.slashVideo=H;exports.toolbarChoiceOption1=W;exports.toolbarChoiceOption2=J;exports.toolbarConfirmOutput=Q;exports.toolbarInputPlaceholder=X;exports.toolbarInsertButton=j;exports.toolbarInsertImage=Z;exports.toolbarInsertInput=N;exports.toolbarInsertLink=_;exports.toolbarInsertMultiChoice=K;exports.toolbarInsertSingleChoice=y;exports.toolbarInsertVideo=$;exports.videoCancelButton=z;exports.videoDefaultTitle=E;exports.videoDefaultTitleBilibili=G;exports.videoDefaultTitleYoutube=O;exports.videoInvalidUrl=k;exports.videoPreviewPlaceholder=M;exports.videoPreviewTitle=Y;exports.videoRunButton=R;exports.videoTitleLabel=S;exports.videoTitlePlaceholder=w;exports.videoUrlLabel=x;exports.videoUrlPlaceholder=C;exports.videoUseButton=D;exports.videoUseVideoButton=F;
|
|
2
2
|
//# sourceMappingURL=de-DE.json.cjs.map
|
|
@@ -52,7 +52,8 @@ declare const _default: {
|
|
|
52
52
|
"toolbarInsertInput": "Eingabefeld einfügen",
|
|
53
53
|
"toolbarInputPlaceholder": "Bitte eingeben",
|
|
54
54
|
"toolbarInsertImage": "Bild einfügen",
|
|
55
|
-
"toolbarInsertVideo": "Video einfügen"
|
|
55
|
+
"toolbarInsertVideo": "Video einfügen",
|
|
56
|
+
"questionPlaceholder": "Ihre Frage"
|
|
56
57
|
}
|
|
57
58
|
;
|
|
58
59
|
|