markdown-flow-ui 0.3.4 → 0.3.5
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/dist/_virtual/{advancedFormat.es2.js → advancedFormat2.es.js} +1 -1
- package/dist/_virtual/advancedFormat2.es.js.map +1 -0
- package/dist/_virtual/core.cjs +1 -1
- package/dist/_virtual/core.es.js +1 -1
- package/dist/_virtual/{cose-base.es2.js → cose-base2.es.js} +1 -1
- package/dist/_virtual/cose-base2.es.js.map +1 -0
- package/dist/_virtual/{customParseFormat.es2.js → customParseFormat2.es.js} +1 -1
- package/dist/_virtual/customParseFormat2.es.js.map +1 -0
- package/dist/_virtual/cytoscape-cose-bilkent2.es.js +5 -0
- package/dist/_virtual/cytoscape-cose-bilkent2.es.js.map +1 -0
- package/dist/_virtual/{cytoscape-fcose.es2.js → cytoscape-fcose2.es.js} +1 -1
- package/dist/_virtual/cytoscape-fcose2.es.js.map +1 -0
- package/dist/_virtual/{dayjs.min2.cjs → dayjs2.min.cjs} +1 -1
- package/dist/_virtual/dayjs2.min.cjs.map +1 -0
- package/dist/_virtual/{dayjs.min.es2.js → dayjs2.min.es.js} +1 -1
- package/dist/_virtual/dayjs2.min.es.js.map +1 -0
- package/dist/_virtual/{duration.es2.js → duration2.es.js} +1 -1
- package/dist/_virtual/duration2.es.js.map +1 -0
- package/dist/_virtual/{index.es10.js → index10.es.js} +1 -1
- package/dist/_virtual/index10.es.js.map +1 -0
- package/dist/_virtual/{index.es11.js → index11.es.js} +1 -1
- package/dist/_virtual/index11.es.js.map +1 -0
- package/dist/_virtual/{index.es12.js → index12.es.js} +1 -1
- package/dist/_virtual/index12.es.js.map +1 -0
- package/dist/_virtual/{index.es9.js → index2.es.js} +1 -1
- package/dist/_virtual/index2.es.js.map +1 -0
- package/dist/_virtual/index3.cjs +1 -1
- package/dist/_virtual/{index.es4.js → index3.es.js} +1 -1
- package/dist/_virtual/index3.es.js.map +1 -0
- package/dist/_virtual/index4.cjs +1 -1
- package/dist/_virtual/{index.es3.js → index4.es.js} +1 -1
- package/dist/_virtual/index4.es.js.map +1 -0
- package/dist/_virtual/{index.es5.js → index5.es.js} +1 -1
- package/dist/_virtual/index5.es.js.map +1 -0
- package/dist/_virtual/index6.cjs +1 -1
- package/dist/_virtual/{index.es7.js → index6.es.js} +1 -1
- package/dist/_virtual/index6.es.js.map +1 -0
- package/dist/_virtual/index7.cjs +1 -1
- package/dist/_virtual/{index.es6.js → index7.es.js} +1 -1
- package/dist/_virtual/index7.es.js.map +1 -0
- package/dist/_virtual/{index.es8.js → index8.es.js} +1 -1
- package/dist/_virtual/index8.es.js.map +1 -0
- package/dist/_virtual/{index.es2.js → index9.es.js} +1 -1
- package/dist/_virtual/index9.es.js.map +1 -0
- package/dist/_virtual/{isoWeek.es2.js → isoWeek2.es.js} +1 -1
- package/dist/_virtual/isoWeek2.es.js.map +1 -0
- package/dist/_virtual/{layout-base.es2.js → layout-base2.es.js} +1 -1
- package/dist/_virtual/layout-base2.es.js.map +1 -0
- package/dist/components/ContentRender/ContentRender.cjs.map +1 -1
- package/dist/components/ContentRender/ContentRender.es.js.map +1 -1
- package/dist/components/ContentRender/IframeSandbox.es.js +1 -1
- package/dist/components/ContentRender/plugins/MermaidChart.cjs.map +1 -1
- package/dist/components/ContentRender/utils/video-markdown-run.es.js +2 -2
- package/dist/components/MarkdownFlow/ScrollToBottomControl.cjs +1 -1
- package/dist/components/MarkdownFlow/ScrollToBottomControl.cjs.map +1 -1
- package/dist/components/MarkdownFlow/ScrollToBottomControl.es.js +1 -1
- package/dist/components/MarkdownFlowEditor/components/EditorToolbar.cjs.map +1 -1
- package/dist/components/Slide/Slide.es.js +3 -3
- package/dist/components/ui/inputGroup/input-group.d.ts +1 -1
- package/dist/components/ui/inputGroup/textarea.cjs +1 -1
- package/dist/components/ui/inputGroup/textarea.es.js +1 -1
- package/dist/components/ui/tooltip.cjs +1 -1
- package/dist/components/ui/tooltip.cjs.map +1 -1
- package/dist/components/ui/tooltip.es.js +12 -12
- package/dist/index.cjs +1 -1
- package/dist/index.es.js +3 -3
- package/dist/markdown-flow-ui-lib.css +2 -2
- package/dist/node_modules/@babel/runtime/helpers/esm/toPrimitive.cjs +1 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/toPrimitive.cjs.map +1 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/toPrimitive.es.js +4 -4
- package/dist/node_modules/@babel/runtime/helpers/esm/toPrimitive.es.js.map +1 -1
- package/dist/node_modules/@braintree/sanitize-url/dist/index.es.js +1 -1
- package/dist/node_modules/@codemirror/autocomplete/dist/index.cjs +1 -1
- package/dist/node_modules/@codemirror/autocomplete/dist/index.cjs.map +1 -1
- package/dist/node_modules/@codemirror/autocomplete/dist/index.es.js +172 -159
- package/dist/node_modules/@codemirror/autocomplete/dist/index.es.js.map +1 -1
- package/dist/node_modules/@codemirror/commands/dist/index.cjs +1 -1
- package/dist/node_modules/@codemirror/commands/dist/index.cjs.map +1 -1
- package/dist/node_modules/@codemirror/commands/dist/index.es.js +376 -333
- package/dist/node_modules/@codemirror/commands/dist/index.es.js.map +1 -1
- package/dist/node_modules/@codemirror/lang-css/dist/index.es.js +3 -3
- package/dist/node_modules/@codemirror/lang-html/dist/index.cjs +1 -1
- package/dist/node_modules/@codemirror/lang-html/dist/index.cjs.map +1 -1
- package/dist/node_modules/@codemirror/lang-html/dist/index.es.js +238 -228
- package/dist/node_modules/@codemirror/lang-html/dist/index.es.js.map +1 -1
- package/dist/node_modules/@codemirror/lang-javascript/dist/index.cjs +4 -4
- package/dist/node_modules/@codemirror/lang-javascript/dist/index.cjs.map +1 -1
- package/dist/node_modules/@codemirror/lang-javascript/dist/index.es.js +62 -50
- package/dist/node_modules/@codemirror/lang-javascript/dist/index.es.js.map +1 -1
- package/dist/node_modules/@codemirror/lang-markdown/dist/index.cjs +1 -1
- package/dist/node_modules/@codemirror/lang-markdown/dist/index.cjs.map +1 -1
- package/dist/node_modules/@codemirror/lang-markdown/dist/index.es.js +237 -207
- package/dist/node_modules/@codemirror/lang-markdown/dist/index.es.js.map +1 -1
- package/dist/node_modules/@codemirror/language/dist/index.cjs +1 -1
- package/dist/node_modules/@codemirror/language/dist/index.cjs.map +1 -1
- package/dist/node_modules/@codemirror/language/dist/index.es.js +302 -296
- package/dist/node_modules/@codemirror/language/dist/index.es.js.map +1 -1
- package/dist/node_modules/@codemirror/lint/dist/index.cjs +1 -1
- package/dist/node_modules/@codemirror/lint/dist/index.cjs.map +1 -1
- package/dist/node_modules/@codemirror/lint/dist/index.es.js +281 -236
- package/dist/node_modules/@codemirror/lint/dist/index.es.js.map +1 -1
- package/dist/node_modules/@codemirror/search/dist/index.cjs +2 -2
- package/dist/node_modules/@codemirror/search/dist/index.cjs.map +1 -1
- package/dist/node_modules/@codemirror/search/dist/index.es.js +427 -454
- package/dist/node_modules/@codemirror/search/dist/index.es.js.map +1 -1
- package/dist/node_modules/@codemirror/state/dist/index.cjs +5 -5
- package/dist/node_modules/@codemirror/state/dist/index.cjs.map +1 -1
- package/dist/node_modules/@codemirror/state/dist/index.es.js +556 -509
- package/dist/node_modules/@codemirror/state/dist/index.es.js.map +1 -1
- package/dist/node_modules/@codemirror/view/dist/index.cjs +5 -5
- package/dist/node_modules/@codemirror/view/dist/index.cjs.map +1 -1
- package/dist/node_modules/@codemirror/view/dist/index.es.js +3982 -3507
- package/dist/node_modules/@codemirror/view/dist/index.es.js.map +1 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +1 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.cjs.map +1 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.es.js +288 -309
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.es.js.map +1 -1
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +1 -1
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs.map +1 -1
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.es.js +244 -252
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.es.js.map +1 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs +1 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs.map +1 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs +1 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs.map +1 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.es.js +8 -8
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.es.js.map +1 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.es.js +47 -47
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.es.js.map +1 -1
- package/dist/node_modules/@lezer/common/dist/index.cjs +1 -1
- package/dist/node_modules/@lezer/common/dist/index.cjs.map +1 -1
- package/dist/node_modules/@lezer/common/dist/index.es.js +266 -253
- package/dist/node_modules/@lezer/common/dist/index.es.js.map +1 -1
- package/dist/node_modules/@lezer/css/dist/index.cjs +1 -1
- package/dist/node_modules/@lezer/css/dist/index.cjs.map +1 -1
- package/dist/node_modules/@lezer/css/dist/index.es.js +95 -87
- package/dist/node_modules/@lezer/css/dist/index.es.js.map +1 -1
- package/dist/node_modules/@lezer/highlight/dist/index.cjs +1 -1
- package/dist/node_modules/@lezer/highlight/dist/index.cjs.map +1 -1
- package/dist/node_modules/@lezer/highlight/dist/index.es.js +150 -139
- package/dist/node_modules/@lezer/highlight/dist/index.es.js.map +1 -1
- package/dist/node_modules/@lezer/html/dist/index.cjs +1 -1
- package/dist/node_modules/@lezer/html/dist/index.cjs.map +1 -1
- package/dist/node_modules/@lezer/html/dist/index.es.js +88 -95
- package/dist/node_modules/@lezer/html/dist/index.es.js.map +1 -1
- package/dist/node_modules/@lezer/javascript/dist/index.cjs +1 -1
- package/dist/node_modules/@lezer/javascript/dist/index.cjs.map +1 -1
- package/dist/node_modules/@lezer/javascript/dist/index.es.js +49 -49
- package/dist/node_modules/@lezer/javascript/dist/index.es.js.map +1 -1
- package/dist/node_modules/@lezer/lr/dist/index.cjs +1 -1
- package/dist/node_modules/@lezer/lr/dist/index.cjs.map +1 -1
- package/dist/node_modules/@lezer/lr/dist/index.es.js +148 -137
- package/dist/node_modules/@lezer/lr/dist/index.es.js.map +1 -1
- package/dist/node_modules/@lezer/markdown/dist/index.cjs +5 -5
- package/dist/node_modules/@lezer/markdown/dist/index.cjs.map +1 -1
- package/dist/node_modules/@lezer/markdown/dist/index.es.js +305 -269
- package/dist/node_modules/@lezer/markdown/dist/index.es.js.map +1 -1
- package/dist/node_modules/@marijn/find-cluster-break/src/index.cjs +1 -1
- package/dist/node_modules/@marijn/find-cluster-break/src/index.cjs.map +1 -1
- package/dist/node_modules/@marijn/find-cluster-break/src/index.es.js +31 -31
- package/dist/node_modules/@marijn/find-cluster-break/src/index.es.js.map +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/architecture-7GRP2DOG.es.js +4 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/architecture-7GRP2DOG.es.js.map +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-2ZTRR5NV.es.js +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-3Z5EZCMW.es.js +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-5V3GS4D5.es.js +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-6AZGARVD.es.js +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-6EIED4P4.es.js +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-6K3QC6MW.es.js +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-6TQVIW2G.es.js +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-747NJXEK.es.js +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-I5DQTOEV.es.js +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-ICYGCRZG.es.js +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-IH6LHLGP.es.js +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-KI3K4JFJ.es.js +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-OUJLGHUK.es.js +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-UY3FDG6J.es.js +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-XHIXRSVI.es.js +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/cynefin-OW5HDTMX.es.js +4 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/cynefin-OW5HDTMX.es.js.map +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/eventmodeling-NTZA5JFV.es.js +4 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/eventmodeling-NTZA5JFV.es.js.map +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/gitGraph-4MIJSDKK.es.js +3 -2
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/gitGraph-4MIJSDKK.es.js.map +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-A6RAGUB7.es.js +4 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-A6RAGUB7.es.js.map +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-AYTQ26CC.es.js +4 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-AYTQ26CC.es.js.map +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-WAS4IAKB.es.js +4 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-WAS4IAKB.es.js.map +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-RG4KPBEZ.es.js +4 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-RG4KPBEZ.es.js.map +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/railroad-74A4TZTK.es.js +4 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/railroad-74A4TZTK.es.js.map +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/railroad-abnf-HS5TGJTU.es.js +4 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/railroad-abnf-HS5TGJTU.es.js.map +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/railroad-ebnf-LZEXJU2U.es.js +4 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/railroad-ebnf-LZEXJU2U.es.js.map +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/railroad-peg-WCYAUIDC.es.js +4 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/railroad-peg-WCYAUIDC.es.js.map +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treeView-Q6P3EWNA.es.js +4 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treeView-Q6P3EWNA.es.js.map +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-WGGIJYW6.es.js +4 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-WGGIJYW6.es.js.map +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/wardley-WFR3VGLG.es.js +4 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/wardley-WFR3VGLG.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/primitive/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/primitive/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/primitive/dist/index.es.js +46 -6
- package/dist/node_modules/@radix-ui/primitive/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.es.js +20 -16
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-context/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-context/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-context/dist/index.es.js +71 -43
- package/dist/node_modules/@radix-ui/react-context/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.es.js +16 -16
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.es.js +184 -96
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.es.js +3 -3
- package/dist/node_modules/@radix-ui/react-id/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-id/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-id/dist/index.es.js +10 -9
- package/dist/node_modules/@radix-ui/react-id/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-portal/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-portal/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-portal/dist/index.es.js +14 -12
- package/dist/node_modules/@radix-ui/react-portal/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-presence/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-presence/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-presence/dist/index.es.js +70 -37
- package/dist/node_modules/@radix-ui/react-presence/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.es.js +16 -14
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-slot/dist/index.es.js +1 -1
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.es.js +261 -250
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/primitive/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/primitive/dist/index.es.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-arrow/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-arrow/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-arrow/dist/index.es.js +25 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-arrow/dist/index.es.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-context/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-context/dist/index.es.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/{react-dialog → react-tooltip}/node_modules/@radix-ui/react-dismissable-layer/dist/index.es.js +1 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-dismissable-layer/dist/index.es.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-focus-scope/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-focus-scope/dist/index.es.js +105 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-focus-scope/dist/index.es.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-popper/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-popper/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-popper/dist/index.es.js +271 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-popper/dist/index.es.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-portal/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-portal/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/{react-dialog → react-tooltip}/node_modules/@radix-ui/react-portal/dist/index.es.js +1 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-portal/dist/index.es.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-primitive/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/{react-focus-scope → react-tooltip}/node_modules/@radix-ui/react-primitive/dist/index.es.js +1 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-primitive/dist/index.es.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.es.js +94 -7
- 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/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-callback-ref/dist/index.es.js +16 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-callback-ref/dist/index.es.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/{react-dialog → react-tooltip}/node_modules/@radix-ui/react-use-controllable-state/dist/index.es.js +2 -2
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-controllable-state/dist/index.es.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.es.js +8 -6
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.es.js +56 -39
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-effect-event/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-effect-event/dist/index.es.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.es.js +28 -21
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.es.js +15 -15
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-primitive/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/{react-dialog → react-visually-hidden}/node_modules/@radix-ui/react-primitive/dist/index.es.js +1 -1
- package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-primitive/dist/index.es.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-slot/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-slot/dist/index.es.js +99 -0
- package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-slot/dist/index.es.js.map +1 -0
- package/dist/node_modules/@uiw/codemirror-extensions-basic-setup/esm/index.cjs +1 -1
- package/dist/node_modules/@uiw/codemirror-extensions-basic-setup/esm/index.cjs.map +1 -1
- package/dist/node_modules/@uiw/codemirror-extensions-basic-setup/esm/index.es.js +11 -13
- package/dist/node_modules/@uiw/codemirror-extensions-basic-setup/esm/index.es.js.map +1 -1
- package/dist/node_modules/@uiw/react-codemirror/esm/getDefaultExtensions.cjs +1 -1
- package/dist/node_modules/@uiw/react-codemirror/esm/getDefaultExtensions.cjs.map +1 -1
- package/dist/node_modules/@uiw/react-codemirror/esm/getDefaultExtensions.es.js +20 -27
- package/dist/node_modules/@uiw/react-codemirror/esm/getDefaultExtensions.es.js.map +1 -1
- package/dist/node_modules/@uiw/react-codemirror/esm/index.cjs +1 -1
- package/dist/node_modules/@uiw/react-codemirror/esm/index.cjs.map +1 -1
- package/dist/node_modules/@uiw/react-codemirror/esm/index.es.js +51 -80
- package/dist/node_modules/@uiw/react-codemirror/esm/index.es.js.map +1 -1
- package/dist/node_modules/@uiw/react-codemirror/esm/theme/dimensionTheme.cjs +2 -0
- package/dist/node_modules/@uiw/react-codemirror/esm/theme/dimensionTheme.cjs.map +1 -0
- package/dist/node_modules/@uiw/react-codemirror/esm/theme/dimensionTheme.es.js +33 -0
- package/dist/node_modules/@uiw/react-codemirror/esm/theme/dimensionTheme.es.js.map +1 -0
- package/dist/node_modules/@uiw/react-codemirror/esm/useCodeMirror.cjs +1 -1
- package/dist/node_modules/@uiw/react-codemirror/esm/useCodeMirror.cjs.map +1 -1
- package/dist/node_modules/@uiw/react-codemirror/esm/useCodeMirror.es.js +64 -98
- package/dist/node_modules/@uiw/react-codemirror/esm/useCodeMirror.es.js.map +1 -1
- package/dist/node_modules/@ungap/structured-clone/esm/deserialize.cjs +1 -1
- package/dist/node_modules/@ungap/structured-clone/esm/deserialize.cjs.map +1 -1
- package/dist/node_modules/@ungap/structured-clone/esm/deserialize.es.js +65 -42
- package/dist/node_modules/@ungap/structured-clone/esm/deserialize.es.js.map +1 -1
- package/dist/node_modules/@ungap/structured-clone/esm/serialize.cjs +1 -1
- package/dist/node_modules/@ungap/structured-clone/esm/serialize.cjs.map +1 -1
- package/dist/node_modules/@ungap/structured-clone/esm/serialize.es.js +62 -58
- package/dist/node_modules/@ungap/structured-clone/esm/serialize.es.js.map +1 -1
- package/dist/node_modules/classnames/index.es.js +1 -1
- package/dist/node_modules/clsx/dist/clsx.cjs +1 -1
- package/dist/node_modules/clsx/dist/clsx.cjs.map +1 -1
- package/dist/node_modules/clsx/dist/clsx.es.js +7 -8
- package/dist/node_modules/clsx/dist/clsx.es.js.map +1 -1
- package/dist/node_modules/cose-base/cose-base.es.js +1 -1
- package/dist/node_modules/cytoscape-cose-bilkent/cytoscape-cose-bilkent.es.js +1 -1
- package/dist/node_modules/cytoscape-fcose/cytoscape-fcose.es.js +1 -1
- package/dist/node_modules/d3-color/src/lab.cjs +1 -1
- package/dist/node_modules/d3-color/src/lab.cjs.map +1 -1
- package/dist/node_modules/d3-color/src/lab.es.js +4 -5
- package/dist/node_modules/d3-format/src/defaultLocale.cjs +1 -1
- package/dist/node_modules/d3-format/src/defaultLocale.cjs.map +1 -1
- package/dist/node_modules/d3-format/src/defaultLocale.es.js +3 -4
- package/dist/node_modules/d3-time-format/src/defaultLocale.cjs +1 -1
- package/dist/node_modules/d3-time-format/src/defaultLocale.cjs.map +1 -1
- package/dist/node_modules/d3-time-format/src/defaultLocale.es.js +2 -3
- package/dist/node_modules/d3-time-format/src/locale.es.js +14 -14
- package/dist/node_modules/d3-transition/src/selection/transition.cjs +1 -1
- package/dist/node_modules/d3-transition/src/selection/transition.es.js +4 -4
- package/dist/node_modules/d3-transition/src/transition/interpolate.cjs +1 -1
- package/dist/node_modules/d3-transition/src/transition/interpolate.es.js +3 -3
- package/dist/node_modules/dagre-d3-es/src/dagre/layout.cjs +1 -1
- package/dist/node_modules/dagre-d3-es/src/dagre/layout.es.js +7 -7
- package/dist/node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.cjs +1 -1
- package/dist/node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.es.js +4 -4
- package/dist/node_modules/dagre-d3-es/src/dagre/position/bk.cjs +1 -1
- package/dist/node_modules/dagre-d3-es/src/dagre/position/bk.es.js +14 -14
- package/dist/node_modules/dagre-d3-es/src/dagre/util.cjs +1 -1
- package/dist/node_modules/dagre-d3-es/src/dagre/util.es.js +7 -7
- package/dist/node_modules/dayjs/dayjs.min.cjs +1 -1
- package/dist/node_modules/dayjs/dayjs.min.es.js +1 -1
- package/dist/node_modules/dayjs/plugin/advancedFormat.es.js +1 -1
- package/dist/node_modules/dayjs/plugin/customParseFormat.es.js +1 -1
- package/dist/node_modules/dayjs/plugin/duration.es.js +1 -1
- package/dist/node_modules/dayjs/plugin/isoWeek.es.js +1 -1
- package/dist/node_modules/decode-named-character-reference/index.dom.cjs.map +1 -1
- package/dist/node_modules/decode-named-character-reference/index.dom.es.js +1 -5
- package/dist/node_modules/decode-named-character-reference/index.dom.es.js.map +1 -1
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.cjs +1 -1
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.es.js +1 -1
- package/dist/node_modules/hast-util-to-parse5/lib/index.cjs +1 -1
- package/dist/node_modules/hast-util-to-parse5/lib/index.cjs.map +1 -1
- package/dist/node_modules/hast-util-to-parse5/lib/index.es.js +2 -2
- package/dist/node_modules/hast-util-to-parse5/lib/index.es.js.map +1 -1
- package/dist/node_modules/hast-util-to-text/lib/index.cjs +3 -3
- package/dist/node_modules/hast-util-to-text/lib/index.cjs.map +1 -1
- package/dist/node_modules/hast-util-to-text/lib/index.es.js +136 -84
- package/dist/node_modules/hast-util-to-text/lib/index.es.js.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/c.cjs +1 -1
- package/dist/node_modules/highlight.js/es/languages/c.cjs.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/c.es.js +122 -63
- package/dist/node_modules/highlight.js/es/languages/c.es.js.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/cpp.cjs +1 -1
- package/dist/node_modules/highlight.js/es/languages/cpp.cjs.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/cpp.es.js +65 -48
- package/dist/node_modules/highlight.js/es/languages/cpp.es.js.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/css.cjs +1 -1
- package/dist/node_modules/highlight.js/es/languages/css.cjs.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/css.es.js +17 -6
- package/dist/node_modules/highlight.js/es/languages/css.es.js.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/go.cjs +1 -1
- package/dist/node_modules/highlight.js/es/languages/go.cjs.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/go.es.js +7 -2
- package/dist/node_modules/highlight.js/es/languages/go.es.js.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/java.cjs +1 -1
- package/dist/node_modules/highlight.js/es/languages/java.cjs.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/java.es.js +48 -39
- package/dist/node_modules/highlight.js/es/languages/java.es.js.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/javascript.cjs +1 -1
- package/dist/node_modules/highlight.js/es/languages/javascript.cjs.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/javascript.es.js +4 -2
- package/dist/node_modules/highlight.js/es/languages/javascript.es.js.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/json.cjs +1 -1
- package/dist/node_modules/highlight.js/es/languages/json.cjs.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/json.es.js +15 -9
- package/dist/node_modules/highlight.js/es/languages/json.es.js.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/lua.cjs +1 -1
- package/dist/node_modules/highlight.js/es/languages/lua.cjs.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/lua.es.js +1 -1
- package/dist/node_modules/highlight.js/es/languages/lua.es.js.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/markdown.cjs +1 -1
- package/dist/node_modules/highlight.js/es/languages/markdown.cjs.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/markdown.es.js +9 -10
- package/dist/node_modules/highlight.js/es/languages/markdown.es.js.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/php.cjs +2 -2
- package/dist/node_modules/highlight.js/es/languages/php.cjs.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/php.es.js +39 -33
- package/dist/node_modules/highlight.js/es/languages/php.es.js.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/python.cjs +1 -1
- package/dist/node_modules/highlight.js/es/languages/python.cjs.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/python.es.js +20 -15
- package/dist/node_modules/highlight.js/es/languages/python.es.js.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/rust.cjs +1 -1
- package/dist/node_modules/highlight.js/es/languages/rust.cjs.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/rust.es.js +40 -26
- package/dist/node_modules/highlight.js/es/languages/rust.es.js.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/scss.cjs +1 -1
- package/dist/node_modules/highlight.js/es/languages/scss.cjs.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/scss.es.js +36 -25
- package/dist/node_modules/highlight.js/es/languages/scss.es.js.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/shell.cjs +1 -1
- package/dist/node_modules/highlight.js/es/languages/shell.cjs.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/shell.es.js +1 -1
- package/dist/node_modules/highlight.js/es/languages/shell.es.js.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/typescript.cjs +1 -1
- package/dist/node_modules/highlight.js/es/languages/typescript.cjs.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/typescript.es.js +4 -2
- package/dist/node_modules/highlight.js/es/languages/typescript.es.js.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/xml.cjs +1 -1
- package/dist/node_modules/highlight.js/es/languages/xml.cjs.map +1 -1
- package/dist/node_modules/highlight.js/es/languages/xml.es.js +9 -16
- package/dist/node_modules/highlight.js/es/languages/xml.es.js.map +1 -1
- package/dist/node_modules/inline-style-parser/cjs/index.cjs +3 -0
- package/dist/node_modules/inline-style-parser/cjs/index.cjs.map +1 -0
- package/dist/node_modules/inline-style-parser/{index.es.js → cjs/index.es.js} +24 -24
- package/dist/node_modules/inline-style-parser/cjs/index.es.js.map +1 -0
- package/dist/node_modules/layout-base/layout-base.es.js +1 -1
- package/dist/node_modules/lowlight/lib/common.cjs +1 -1
- package/dist/node_modules/lowlight/lib/common.cjs.map +1 -1
- package/dist/node_modules/lowlight/lib/common.es.js +37 -37
- package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/core.cjs +1 -1
- package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/core.es.js +1 -1
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/arduino.cjs +2 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/arduino.cjs.map +1 -0
- package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/languages/arduino.es.js +10 -14
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/arduino.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/bash.cjs +2 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/bash.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/bash.es.js +378 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/bash.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/c.cjs +2 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/c.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/c.es.js +278 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/c.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/cpp.cjs +2 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/cpp.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/cpp.es.js +518 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/cpp.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/csharp.cjs +2 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/csharp.cjs.map +1 -0
- package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/languages/csharp.es.js +1 -1
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/csharp.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/css.cjs +2 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/css.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/css.es.js +930 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/css.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/diff.cjs +2 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/diff.cjs.map +1 -0
- package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/languages/diff.es.js +10 -3
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/diff.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/go.cjs +2 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/go.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/go.es.js +152 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/go.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/graphql.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/graphql.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/ini.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/ini.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/java.cjs +2 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/java.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/java.es.js +241 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/java.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/javascript.cjs +2 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/javascript.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/javascript.es.js +660 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/javascript.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/json.cjs +2 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/json.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/json.es.js +45 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/json.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/kotlin.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/kotlin.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/less.cjs +2 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/less.cjs.map +1 -0
- package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/languages/less.es.js +10 -4
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/less.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/lua.cjs +2 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/lua.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/lua.es.js +60 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/lua.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/makefile.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/makefile.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/markdown.cjs +2 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/markdown.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/markdown.es.js +217 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/markdown.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/objectivec.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/objectivec.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/perl.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/perl.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/php-template.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/php-template.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/php.cjs +3 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/php.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/php.es.js +573 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/php.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/plaintext.cjs +2 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/plaintext.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/plaintext.es.js +14 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/plaintext.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/python-repl.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/python-repl.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/python.cjs +2 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/python.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/python.es.js +400 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/python.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/r.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/r.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/ruby.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/ruby.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/rust.cjs +2 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/rust.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/rust.es.js +306 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/rust.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/scss.cjs +2 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/scss.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/scss.es.js +915 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/scss.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/shell.cjs +2 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/shell.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/shell.es.js +26 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/shell.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/sql.cjs +2 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/sql.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/sql.es.js +616 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/sql.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/swift.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/swift.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/typescript.cjs +2 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/typescript.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/typescript.es.js +755 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/typescript.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/vbnet.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/vbnet.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/wasm.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/wasm.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/xml.cjs +2 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/xml.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/xml.es.js +220 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/xml.es.js.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/yaml.cjs +2 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/yaml.cjs.map +1 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/yaml.es.js +184 -0
- package/dist/node_modules/lowlight/node_modules/highlight.js/es/languages/yaml.es.js.map +1 -0
- package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/lib/core.cjs +3 -3
- package/dist/node_modules/lowlight/node_modules/highlight.js/lib/core.cjs.map +1 -0
- package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/lib/core.es.js +66 -66
- package/dist/node_modules/lowlight/node_modules/highlight.js/lib/core.es.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/Icon.es.js +3 -3
- package/dist/node_modules/mdast-util-find-and-replace/lib/index.cjs +1 -1
- package/dist/node_modules/mdast-util-find-and-replace/lib/index.cjs.map +1 -1
- package/dist/node_modules/mdast-util-find-and-replace/lib/index.es.js +58 -56
- package/dist/node_modules/mdast-util-find-and-replace/lib/index.es.js.map +1 -1
- package/dist/node_modules/mdast-util-from-markdown/lib/index.cjs +1 -1
- package/dist/node_modules/mdast-util-from-markdown/lib/index.cjs.map +1 -1
- package/dist/node_modules/mdast-util-from-markdown/lib/index.es.js +274 -223
- package/dist/node_modules/mdast-util-from-markdown/lib/index.es.js.map +1 -1
- package/dist/node_modules/mdast-util-gfm-strikethrough/lib/index.cjs +1 -1
- package/dist/node_modules/mdast-util-gfm-strikethrough/lib/index.cjs.map +1 -1
- package/dist/node_modules/mdast-util-gfm-strikethrough/lib/index.es.js +21 -17
- package/dist/node_modules/mdast-util-gfm-strikethrough/lib/index.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/footer.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/footer.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/blockquote.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/blockquote.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/break.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/break.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/code.cjs +2 -2
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/code.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/code.es.js +7 -7
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/code.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/delete.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/delete.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/emphasis.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/emphasis.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/heading.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/heading.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/html.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/html.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/image-reference.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/image-reference.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/image.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/image.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/index.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/index.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/inline-code.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/inline-code.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/link-reference.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/link-reference.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/link.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/link.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/list-item.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/list-item.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/list.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/list.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/paragraph.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/paragraph.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/root.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/root.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/strong.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/strong.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-cell.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-cell.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-row.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-row.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/text.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/text.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/index.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/index.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/revert.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/revert.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/state.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-hast/lib/state.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/blockquote.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/blockquote.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/break.cjs +3 -3
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/break.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/break.es.js +9 -7
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/break.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/code.cjs +2 -2
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/code.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/code.es.js +6 -6
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/code.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/definition.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/definition.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/emphasis.cjs +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/emphasis.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/emphasis.es.js +17 -29
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/emphasis.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/heading.cjs +5 -5
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/heading.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/heading.es.js +12 -11
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/heading.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/html.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/html.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/image-reference.cjs +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/image-reference.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/image-reference.es.js +14 -12
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/image-reference.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/image.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/image.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/inline-code.cjs +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/inline-code.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/inline-code.es.js +6 -6
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/inline-code.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/link-reference.cjs +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/link-reference.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/link-reference.es.js +15 -13
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/link-reference.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/link.cjs +2 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/link.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/link.es.js +42 -32
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/link.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/list-item.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/list-item.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/list.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/list.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/paragraph.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/paragraph.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/root.cjs +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/root.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/root.es.js +8 -6
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/root.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/strong.cjs +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/strong.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/strong.es.js +17 -29
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/strong.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/text.cjs +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/text.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/text.es.js +8 -3
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/text.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/character.cjs +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/character.cjs.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/character.es.js +13 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/character.es.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-fence.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-fence.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-quote.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-quote.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-strong.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-strong.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.cjs +4 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.cjs.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.es.js +263 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.es.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/encode-info.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/encode-info.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.cjs +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.es.js +2 -2
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.cjs +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.es.js +2 -2
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.es.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/html-kind.cjs +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/html-kind.cjs.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/html-kind.es.js +22 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/html-kind.es.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.cjs.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.es.js.map +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-VBNYF7ZC.cjs +2 -2
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-VBNYF7ZC.es.js +4 -4
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-5PPSVZJV.cjs +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-5PPSVZJV.es.js +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-2GRJ4B5K.cjs +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-2GRJ4B5K.es.js +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-JQJVKLGR.cjs +2 -2
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-JQJVKLGR.es.js +4 -4
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-NSK5VX7P.cjs +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-NSK5VX7P.es.js +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-WRU74C26.es.js +3 -3
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-JCYQIIEL.cjs +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-JCYQIIEL.es.js +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-OCEON4UE.cjs +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-OCEON4UE.es.js +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-B4RE2ZJO.cjs +3 -3
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-B4RE2ZJO.es.js +4 -4
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/erDiagram-JOGREHBK.cjs +2 -2
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/erDiagram-JOGREHBK.es.js +4 -4
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-UKHOOZJN.cjs +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-UKHOOZJN.es.js +5 -4
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-UKHOOZJN.es.js.map +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-PKOTCBZU.cjs +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-PKOTCBZU.es.js +2 -2
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/mindmap-definition-FAOFIHXS.cjs +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/mindmap-definition-FAOFIHXS.cjs.map +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/mindmap-definition-FAOFIHXS.es.js +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/quadrantDiagram-CIZ2JOQS.cjs +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/quadrantDiagram-CIZ2JOQS.es.js +4 -4
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-W5VNT64P.cjs +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-W5VNT64P.es.js +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-SI44F4Z6.cjs +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-SI44F4Z6.es.js +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-OKZ733FA.cjs +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-OKZ733FA.es.js +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-v2-UEYNNEHI.cjs +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-v2-UEYNNEHI.es.js +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/swimlanesDiagram-ULZ7WXOC.cjs +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/swimlanesDiagram-ULZ7WXOC.es.js +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-T6HMQDX7.cjs +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-T6HMQDX7.es.js +2 -2
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/xychartDiagram-ELKLHX3M.es.js +4 -4
- package/dist/node_modules/mermaid/dist/mermaid.core.cjs +1 -1
- package/dist/node_modules/mermaid/dist/mermaid.core.es.js +1 -1
- package/dist/node_modules/micromark/lib/constructs.cjs +1 -1
- package/dist/node_modules/micromark/lib/constructs.es.js +13 -13
- package/dist/node_modules/micromark-factory-space/index.cjs +1 -1
- package/dist/node_modules/micromark-factory-space/index.cjs.map +1 -1
- package/dist/node_modules/micromark-factory-space/index.es.js +9 -9
- package/dist/node_modules/micromark-factory-space/index.es.js.map +1 -1
- package/dist/node_modules/parse5/dist/parser/index.es.js +1 -1
- package/dist/node_modules/parse5/dist/tokenizer/index.cjs +1 -1
- package/dist/node_modules/parse5/dist/tokenizer/index.cjs.map +1 -1
- package/dist/node_modules/parse5/dist/tokenizer/index.es.js +2 -2
- package/dist/node_modules/parse5/node_modules/entities/dist/esm/decode-codepoint.cjs.map +1 -0
- package/dist/node_modules/parse5/node_modules/entities/dist/esm/decode-codepoint.es.js.map +1 -0
- package/dist/node_modules/parse5/node_modules/entities/dist/esm/decode.cjs.map +1 -0
- package/dist/node_modules/parse5/node_modules/entities/dist/esm/decode.es.js.map +1 -0
- package/dist/node_modules/parse5/node_modules/entities/dist/esm/generated/decode-data-html.cjs.map +1 -0
- package/dist/node_modules/parse5/node_modules/entities/dist/esm/generated/decode-data-html.es.js.map +1 -0
- package/dist/node_modules/property-information/lib/html.cjs +1 -1
- package/dist/node_modules/property-information/lib/html.cjs.map +1 -1
- package/dist/node_modules/property-information/lib/html.es.js +16 -6
- package/dist/node_modules/property-information/lib/html.es.js.map +1 -1
- package/dist/node_modules/property-information/lib/svg.cjs +1 -1
- package/dist/node_modules/property-information/lib/svg.cjs.map +1 -1
- package/dist/node_modules/property-information/lib/svg.es.js +4 -2
- package/dist/node_modules/property-information/lib/svg.es.js.map +1 -1
- package/dist/node_modules/rc-input/es/BaseInput.cjs +1 -1
- package/dist/node_modules/rc-input/es/BaseInput.es.js +1 -1
- package/dist/node_modules/rc-textarea/es/ResizableTextArea.cjs +1 -1
- package/dist/node_modules/rc-textarea/es/ResizableTextArea.es.js +1 -1
- package/dist/node_modules/rc-textarea/es/TextArea.cjs +1 -1
- package/dist/node_modules/rc-textarea/es/TextArea.es.js +1 -1
- package/dist/node_modules/rc-textarea/es/index.cjs +1 -1
- package/dist/node_modules/rc-textarea/es/index.es.js +1 -1
- package/dist/node_modules/rc-util/es/ref.es.js +1 -1
- package/dist/node_modules/rc-util/node_modules/react-is/index.es.js +1 -1
- package/dist/node_modules/react-i18next/dist/es/useTranslation.cjs +1 -1
- package/dist/node_modules/react-i18next/dist/es/useTranslation.es.js +7 -7
- package/dist/node_modules/remark-flow/dist/index.es.js +1 -1
- package/dist/node_modules/remark-flow/dist/interaction-parser.cjs.map +1 -1
- package/dist/node_modules/remark-flow/dist/interaction-parser.es.js +2 -2
- package/dist/node_modules/remark-flow/dist/interaction-parser.es.js.map +1 -1
- package/dist/node_modules/remark-flow/dist/interaction-plugin-core.cjs +1 -1
- package/dist/node_modules/remark-flow/dist/interaction-plugin-core.es.js +1 -1
- package/dist/node_modules/style-mod/src/style-mod.cjs +3 -3
- package/dist/node_modules/style-mod/src/style-mod.cjs.map +1 -1
- package/dist/node_modules/style-mod/src/style-mod.es.js +37 -35
- package/dist/node_modules/style-mod/src/style-mod.es.js.map +1 -1
- package/dist/node_modules/style-to-object/cjs/index.cjs +1 -1
- package/dist/node_modules/style-to-object/cjs/index.cjs.map +1 -1
- package/dist/node_modules/style-to-object/cjs/index.es.js +15 -15
- package/dist/node_modules/style-to-object/cjs/index.es.js.map +1 -1
- package/dist/node_modules/stylis/src/Parser.cjs +1 -1
- package/dist/node_modules/stylis/src/Parser.cjs.map +1 -1
- package/dist/node_modules/stylis/src/Parser.es.js +63 -52
- package/dist/node_modules/stylis/src/Parser.es.js.map +1 -1
- package/dist/node_modules/stylis/src/Utility.cjs +1 -1
- package/dist/node_modules/stylis/src/Utility.cjs.map +1 -1
- package/dist/node_modules/stylis/src/Utility.es.js +20 -24
- package/dist/node_modules/stylis/src/Utility.es.js.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.es.js +828 -561
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.es.js.map +1 -1
- package/dist/node_modules/ts-dedent/esm/index.cjs +5 -5
- package/dist/node_modules/ts-dedent/esm/index.cjs.map +1 -1
- package/dist/node_modules/ts-dedent/esm/index.es.js +20 -21
- package/dist/node_modules/ts-dedent/esm/index.es.js.map +1 -1
- package/dist/node_modules/unified/lib/index.es.js +1 -1
- package/dist/node_modules/unist-util-is/lib/index.cjs.map +1 -1
- package/dist/node_modules/unist-util-is/lib/index.es.js +8 -1
- package/dist/node_modules/unist-util-is/lib/index.es.js.map +1 -1
- package/dist/node_modules/unist-util-visit/lib/index.cjs +1 -1
- package/dist/node_modules/unist-util-visit/lib/index.cjs.map +1 -1
- package/dist/node_modules/unist-util-visit/lib/index.es.js +22 -12
- package/dist/node_modules/unist-util-visit/lib/index.es.js.map +1 -1
- package/dist/node_modules/unist-util-visit-parents/lib/color.cjs.map +1 -1
- package/dist/node_modules/unist-util-visit-parents/lib/color.es.js.map +1 -1
- package/dist/node_modules/unist-util-visit-parents/lib/index.cjs +1 -1
- package/dist/node_modules/unist-util-visit-parents/lib/index.cjs.map +1 -1
- package/dist/node_modules/unist-util-visit-parents/lib/index.es.js +72 -37
- package/dist/node_modules/unist-util-visit-parents/lib/index.es.js.map +1 -1
- package/dist/node_modules/uuid/dist/rng.cjs +2 -0
- package/dist/node_modules/uuid/dist/rng.cjs.map +1 -0
- package/dist/node_modules/uuid/dist/rng.es.js +8 -0
- package/dist/node_modules/uuid/dist/rng.es.js.map +1 -0
- package/dist/node_modules/uuid/dist/stringify.cjs.map +1 -0
- package/dist/node_modules/uuid/dist/stringify.es.js.map +1 -0
- package/dist/node_modules/uuid/dist/v4.cjs +2 -0
- package/dist/node_modules/uuid/dist/v4.cjs.map +1 -0
- package/dist/node_modules/uuid/dist/v4.es.js +16 -0
- package/dist/node_modules/uuid/dist/v4.es.js.map +1 -0
- package/dist/renderer.cjs +1 -1
- package/dist/renderer.es.js +3 -3
- package/dist/scroll.cjs +1 -1
- package/dist/scroll.es.js +2 -2
- package/package.json +18 -14
- package/dist/_virtual/advancedFormat.es2.js.map +0 -1
- package/dist/_virtual/cose-base.es2.js.map +0 -1
- package/dist/_virtual/customParseFormat.es2.js.map +0 -1
- package/dist/_virtual/cytoscape-cose-bilkent.es2.js +0 -5
- package/dist/_virtual/cytoscape-cose-bilkent.es2.js.map +0 -1
- package/dist/_virtual/cytoscape-fcose.es2.js.map +0 -1
- package/dist/_virtual/dayjs.min.es2.js.map +0 -1
- package/dist/_virtual/dayjs.min2.cjs.map +0 -1
- package/dist/_virtual/duration.es2.js.map +0 -1
- package/dist/_virtual/index.es10.js.map +0 -1
- package/dist/_virtual/index.es11.js.map +0 -1
- package/dist/_virtual/index.es12.js.map +0 -1
- package/dist/_virtual/index.es2.js.map +0 -1
- package/dist/_virtual/index.es3.js.map +0 -1
- package/dist/_virtual/index.es4.js.map +0 -1
- package/dist/_virtual/index.es5.js.map +0 -1
- package/dist/_virtual/index.es6.js.map +0 -1
- package/dist/_virtual/index.es7.js.map +0 -1
- package/dist/_virtual/index.es8.js.map +0 -1
- package/dist/_virtual/index.es9.js.map +0 -1
- package/dist/_virtual/isoWeek.es2.js.map +0 -1
- package/dist/_virtual/layout-base.es2.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.es.js +0 -25
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/primitive/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/primitive/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-compose-refs/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-compose-refs/dist/index.es.js +0 -34
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-compose-refs/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id/dist/index.es.js +0 -15
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/dist/index.es.js +0 -104
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-callback-ref/dist/index.es.js +0 -13
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-callback-ref/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-effect-event/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-effect-event/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-layout-effect/dist/index.es.js +0 -7
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-layout-effect/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-compose-refs/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-compose-refs/dist/index.es.js +0 -34
- package/dist/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-compose-refs/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-primitive/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-primitive/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-use-callback-ref/dist/index.es.js +0 -13
- package/dist/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-use-callback-ref/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-popper/dist/index.es.js +0 -220
- package/dist/node_modules/@radix-ui/react-popper/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.es.js +0 -50
- package/dist/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-slot/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-slot/node_modules/@radix-ui/react-compose-refs/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-slot/node_modules/@radix-ui/react-compose-refs/dist/index.es.js +0 -34
- package/dist/node_modules/@radix-ui/react-slot/node_modules/@radix-ui/react-compose-refs/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.es.js +0 -15
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.es.js.map +0 -1
- package/dist/node_modules/entities/dist/esm/decode-codepoint.cjs.map +0 -1
- package/dist/node_modules/entities/dist/esm/decode-codepoint.es.js.map +0 -1
- package/dist/node_modules/entities/dist/esm/decode.cjs.map +0 -1
- package/dist/node_modules/entities/dist/esm/decode.es.js.map +0 -1
- package/dist/node_modules/entities/dist/esm/generated/decode-data-html.cjs.map +0 -1
- package/dist/node_modules/entities/dist/esm/generated/decode-data-html.es.js.map +0 -1
- package/dist/node_modules/hast-util-is-element/lib/index.cjs +0 -2
- package/dist/node_modules/hast-util-is-element/lib/index.cjs.map +0 -1
- package/dist/node_modules/hast-util-is-element/lib/index.es.js +0 -66
- package/dist/node_modules/hast-util-is-element/lib/index.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/index.cjs +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/index.cjs.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/index.es.js +0 -13
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/index.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/aria.cjs +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/aria.cjs.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/aria.es.js +0 -62
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/aria.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/find.cjs +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/find.cjs.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/find.es.js +0 -34
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/find.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/html.cjs +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/html.cjs.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/html.es.js +0 -369
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/html.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/normalize.cjs +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/normalize.cjs.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/normalize.es.js +0 -7
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/normalize.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/svg.cjs +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/svg.cjs.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/svg.es.js +0 -567
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/svg.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-insensitive-transform.cjs +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-insensitive-transform.cjs.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-insensitive-transform.es.js +0 -8
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-insensitive-transform.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-sensitive-transform.cjs +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-sensitive-transform.cjs.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-sensitive-transform.es.js +0 -7
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-sensitive-transform.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/create.cjs +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/create.cjs.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/create.es.js +0 -23
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/create.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/defined-info.cjs +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/defined-info.cjs.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/defined-info.es.js +0 -28
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/defined-info.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/info.cjs +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/info.cjs.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/info.es.js +0 -24
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/info.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/merge.cjs +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/merge.cjs.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/merge.es.js +0 -12
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/merge.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/schema.cjs +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/schema.cjs.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/schema.es.js +0 -18
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/schema.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/types.cjs +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/types.cjs.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/types.es.js +0 -15
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/types.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xlink.cjs +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xlink.cjs.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xlink.es.js +0 -20
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xlink.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xml.cjs +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xml.cjs.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xml.es.js +0 -12
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xml.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xmlns.cjs +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xmlns.cjs.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xmlns.es.js +0 -12
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xmlns.es.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/arduino.cjs +0 -2
- package/dist/node_modules/highlight.js/es/languages/arduino.cjs.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/arduino.es.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/csharp.cjs +0 -2
- package/dist/node_modules/highlight.js/es/languages/csharp.cjs.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/csharp.es.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/diff.cjs +0 -2
- package/dist/node_modules/highlight.js/es/languages/diff.cjs.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/diff.es.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/graphql.cjs.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/graphql.es.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/ini.cjs.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/ini.es.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/kotlin.cjs.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/kotlin.es.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/less.cjs +0 -2
- package/dist/node_modules/highlight.js/es/languages/less.cjs.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/less.es.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/makefile.cjs.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/makefile.es.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/objectivec.cjs.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/objectivec.es.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/perl.cjs.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/perl.es.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/php-template.cjs.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/php-template.es.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/python-repl.cjs.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/python-repl.es.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/r.cjs.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/r.es.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/ruby.cjs.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/ruby.es.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/swift.cjs.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/swift.es.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/vbnet.cjs.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/vbnet.es.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/wasm.cjs.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/wasm.es.js.map +0 -1
- package/dist/node_modules/highlight.js/lib/core.cjs.map +0 -1
- package/dist/node_modules/highlight.js/lib/core.es.js.map +0 -1
- package/dist/node_modules/inline-style-parser/index.cjs +0 -3
- package/dist/node_modules/inline-style-parser/index.cjs.map +0 -1
- package/dist/node_modules/inline-style-parser/index.es.js.map +0 -1
- package/dist/node_modules/unist-util-find-after/lib/index.cjs +0 -2
- package/dist/node_modules/unist-util-find-after/lib/index.cjs.map +0 -1
- package/dist/node_modules/unist-util-find-after/lib/index.es.js +0 -33
- package/dist/node_modules/unist-util-find-after/lib/index.es.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/native.cjs +0 -2
- package/dist/node_modules/uuid/dist/esm-browser/native.cjs.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/native.es.js +0 -5
- package/dist/node_modules/uuid/dist/esm-browser/native.es.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/rng.cjs +0 -2
- package/dist/node_modules/uuid/dist/esm-browser/rng.cjs.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/rng.es.js +0 -14
- package/dist/node_modules/uuid/dist/esm-browser/rng.es.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/stringify.cjs.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/stringify.es.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.cjs +0 -2
- package/dist/node_modules/uuid/dist/esm-browser/v4.cjs.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.es.js +0 -16
- package/dist/node_modules/uuid/dist/esm-browser/v4.es.js.map +0 -1
- /package/dist/node_modules/@radix-ui/{react-dialog → react-tooltip}/node_modules/@radix-ui/primitive/dist/index.cjs +0 -0
- /package/dist/node_modules/@radix-ui/{react-dialog → react-tooltip}/node_modules/@radix-ui/primitive/dist/index.es.js +0 -0
- /package/dist/node_modules/@radix-ui/{react-dialog → react-tooltip}/node_modules/@radix-ui/react-context/dist/index.cjs +0 -0
- /package/dist/node_modules/@radix-ui/{react-dialog → react-tooltip}/node_modules/@radix-ui/react-context/dist/index.es.js +0 -0
- /package/dist/node_modules/@radix-ui/{react-dialog/node_modules/@radix-ui/react-use-effect-event → react-use-effect-event}/dist/index.cjs +0 -0
- /package/dist/node_modules/@radix-ui/{react-dialog/node_modules/@radix-ui/react-use-effect-event → react-use-effect-event}/dist/index.es.js +0 -0
- /package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/core.cjs.map +0 -0
- /package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/core.es.js.map +0 -0
- /package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/languages/graphql.cjs +0 -0
- /package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/languages/graphql.es.js +0 -0
- /package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/languages/ini.cjs +0 -0
- /package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/languages/ini.es.js +0 -0
- /package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/languages/kotlin.cjs +0 -0
- /package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/languages/kotlin.es.js +0 -0
- /package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/languages/makefile.cjs +0 -0
- /package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/languages/makefile.es.js +0 -0
- /package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/languages/objectivec.cjs +0 -0
- /package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/languages/objectivec.es.js +0 -0
- /package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/languages/perl.cjs +0 -0
- /package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/languages/perl.es.js +0 -0
- /package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/languages/php-template.cjs +0 -0
- /package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/languages/php-template.es.js +0 -0
- /package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/languages/python-repl.cjs +0 -0
- /package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/languages/python-repl.es.js +0 -0
- /package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/languages/r.cjs +0 -0
- /package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/languages/r.es.js +0 -0
- /package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/languages/ruby.cjs +0 -0
- /package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/languages/ruby.es.js +0 -0
- /package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/languages/swift.cjs +0 -0
- /package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/languages/swift.es.js +0 -0
- /package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/languages/vbnet.cjs +0 -0
- /package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/languages/vbnet.es.js +0 -0
- /package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/languages/wasm.cjs +0 -0
- /package/dist/node_modules/{highlight.js → lowlight/node_modules/highlight.js}/es/languages/wasm.es.js +0 -0
- /package/dist/node_modules/{entities → parse5/node_modules/entities}/dist/esm/decode-codepoint.cjs +0 -0
- /package/dist/node_modules/{entities → parse5/node_modules/entities}/dist/esm/decode-codepoint.es.js +0 -0
- /package/dist/node_modules/{entities → parse5/node_modules/entities}/dist/esm/decode.cjs +0 -0
- /package/dist/node_modules/{entities → parse5/node_modules/entities}/dist/esm/decode.es.js +0 -0
- /package/dist/node_modules/{entities → parse5/node_modules/entities}/dist/esm/generated/decode-data-html.cjs +0 -0
- /package/dist/node_modules/{entities → parse5/node_modules/entities}/dist/esm/generated/decode-data-html.es.js +0 -0
- /package/dist/node_modules/uuid/dist/{esm-browser/stringify.cjs → stringify.cjs} +0 -0
- /package/dist/node_modules/uuid/dist/{esm-browser/stringify.es.js → stringify.es.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentRender.es.js","sources":["../../../src/components/ContentRender/ContentRender.tsx"],"sourcesContent":["import { trimVariablePadding } from \"remark-flow\";\nimport React, { useEffect, useMemo, useRef, useState } from \"react\";\nimport ReactMarkdown from \"react-markdown\";\nimport rehypeHighlight from \"rehype-highlight\";\nimport rehypeKatex from \"rehype-katex\";\nimport rehypeRaw from \"rehype-raw\";\nimport { unified, type PluggableList, type Plugin } from \"unified\";\nimport remarkRehype from \"remark-rehype\";\nimport type { Element, Root } from \"hast\";\nimport { CustomRenderBarProps, OnSendContentParams } from \"../types\";\nimport { sanitizeInvalidTagName } from \"./utils/sanitize-invalid-tag-name\";\nimport { stripSvgTextLineBreaks } from \"./utils/strip-svg-text-line-breaks\";\nimport \"./contentRender.css\";\nimport \"./github-markdown-light.css\";\nimport \"highlight.js/styles/github.css\";\nimport \"katex/dist/katex.min.css\";\nimport CodeBlock, { CodeBlockContext } from \"./CodeBlock\";\nimport CustomButtonInputVariable, {\n ComponentsWithCustomVariable,\n} from \"./plugins/CustomVariable\";\nimport MermaidChart, { type MermaidChartProps } from \"./plugins/MermaidChart\";\nimport {\n preserveCustomVariableProperties,\n restoreCustomVariableProperties,\n} from \"./utils/custom-variable-props\";\nimport {\n highlightLanguages,\n subsetLanguages,\n} from \"./utils/highlight-languages\";\nimport {\n parseMarkdownSegments,\n mermaidBlockIsComplete,\n} from \"./utils/mermaid-parse\";\nimport {\n getInlineCodeRanges,\n getMarkdownSourceAnalysis,\n} from \"./utils/inline-code-ranges\";\nimport { remarkPlugins } from \"./utils/markdown-plugins\";\nimport { normalizeInlineHtml } from \"./utils/normalize-inline-html\";\nimport {\n escapeTypedMarkdownMetadata,\n type MarkdownMetadataRange,\n} from \"./utils/escape-typed-metadata\";\nimport IframeSandbox from \"./IframeSandbox\";\nimport {\n appendContentAwareTypewriterQueue,\n CONTENT_AWARE_TYPEWRITER_TICK_BUDGET,\n consumeContentAwareTypewriterQueue,\n getTrailingTypewriterGrapheme,\n isContentAwareTypewriterQueueEmpty,\n type ContentAwareTypewriterQueue,\n} from \"./utils/typewriter-pacing\";\nimport {\n normalizeWrappedSandboxContent,\n splitContentSegments,\n type RenderSegment,\n} from \"./utils/split-content\";\nimport {\n getInteractionDefaultValues,\n type InteractionDefaultValueOptions,\n} from \"../../lib/interaction-defaults\";\nimport {\n getMarkdownFlowDirection,\n getMarkdownFlowLanguage,\n type MarkdownFlowLocale,\n} from \"../../lib/locale\";\nimport { getContentRenderLocaleTexts } from \"./contentRenderI18n\";\nimport {\n createVideoMarkdownRunPlan,\n cloneVideoMarkdownSourceTree,\n projectVideoMarkdownRun,\n prepareVideoMarkdownRun,\n getVideoMarkdownNodeState,\n type VideoMarkdownRunPlan,\n} from \"./utils/video-markdown-run\";\n\nconst FIXED_TYPEWRITER_CHUNK_SIZE = 2;\n\nexport type ContentRenderTypewriterPacing = \"fixed\" | \"content-aware\";\n\n// Define component Props type\nexport interface ContentRenderProps {\n content: string;\n contentType?: string;\n /** Locale used for built-in UI text when a more specific text prop is not provided. */\n locale?: MarkdownFlowLocale;\n /** Overrides the locale-derived language; omitted values inherit from the host. */\n lang?: string;\n /** Overrides locale-derived direction; omitted values inherit when no locale is set. */\n dir?: React.HTMLAttributes<HTMLDivElement>[\"dir\"];\n /**\n * Callback invoked when the custom button after content is clicked.\n * This button is rendered via the `<custom-button-after-content>` tag in markdown content.\n * @example\n * ```tsx\n * <ContentRender\n * content=\"Hello <custom-button-after-content>Ask</custom-button-after-content>\"\n * onClickCustomButtonAfterContent={() => console.log('Button clicked')}\n * />\n * ```\n */\n customRenderBar?: CustomRenderBarProps;\n onClickCustomButtonAfterContent?: () => void;\n onSend?: (content: OnSendContentParams) => void;\n typingSpeed?: number;\n /** Types prose only; following HTML renders progressively once preceding prose is displayed. */\n enableTypewriter?: boolean;\n /** Controls how much text is revealed per tick. Defaults to the legacy fixed pacing. */\n typewriterPacing?: ContentRenderTypewriterPacing;\n onTypeFinished?: () => void;\n onTypewriterStateChange?: (state: ContentRenderTypewriterState) => void;\n userInput?: string;\n interactionDefaultValueOptions?: InteractionDefaultValueOptions;\n defaultButtonText?: string;\n defaultInputText?: string; // Text input by user\n defaultSelectedValues?: string[]; // Default selected values for multi-select\n readonly?: boolean;\n // Multi-select confirm button text (i18n support)\n confirmButtonText?: string;\n // Copy button text (i18n support)\n copyButtonText?: string;\n // Copied state text (i18n support)\n copiedButtonText?: string;\n // Dynamic interaction format for multi-select support\n dynamicInteractionFormat?: string;\n // Loading text before first HTML block renders inside iframe (i18n support)\n sandboxLoadingText?: string;\n // Loading text while styles are being generated inside iframe\n sandboxStyleLoadingText?: string;\n // Loading text while scripts are being cached/executed inside iframe\n sandboxScriptLoadingText?: string;\n // Disable sandbox loading overlays when upper layers have already entered an error state\n disableSandboxLoadingOverlay?: boolean;\n // Fullscreen button text for iframe sandbox\n sandboxFullscreenButtonText?: string;\n // Exit fullscreen button text for iframe sandbox\n sandboxExitFullscreenButtonText?: string;\n // Sandbox render mode\n sandboxMode?: \"content\" | \"blackboard\";\n beforeSend?: (param: OnSendContentParams) => boolean;\n}\n\nexport interface ContentRenderTypewriterState {\n isTypewriterEnabled: boolean;\n isTyping: boolean;\n isComplete: boolean;\n /** Received source units already displayed, including unpaced HTML. */\n renderedLength: number;\n totalLength: number;\n}\n\n// Render svg string via Shadow DOM to avoid markdown wrapping\nconst SvgBlockInShadow: React.FC<{ svg: string; inline?: boolean }> = ({\n svg,\n inline = false,\n}) => {\n const hostRef = useRef<HTMLElement | null>(null);\n const Wrapper = inline ? \"span\" : \"div\";\n\n useEffect(() => {\n const host = hostRef.current;\n if (!host) return;\n const shadowRoot = host.shadowRoot ?? host.attachShadow({ mode: \"open\" });\n const styleId = \"content-render-svg-style\";\n let styleEl = shadowRoot.getElementById(styleId) as HTMLStyleElement | null;\n\n if (!styleEl) {\n styleEl = document.createElement(\"style\");\n styleEl.id = styleId;\n // Keep intrinsic SVG width so the wrapper can scroll horizontally when needed\n styleEl.textContent = `\n svg { height: auto; display: inline-block; }\n svg.content-render-svg-el--responsive { width: 100%; max-width: 100%; }\n svg.content-render-svg-el--fixed { max-width: none; }\n `;\n shadowRoot.appendChild(styleEl);\n }\n\n const nodesToRemove = Array.from(shadowRoot.childNodes).filter(\n (node) => node !== styleEl\n );\n nodesToRemove.forEach((node) => shadowRoot.removeChild(node));\n\n const template = document.createElement(\"template\");\n const cleanedSvg = stripSvgTextLineBreaks(svg);\n template.innerHTML = cleanedSvg;\n shadowRoot.append(template.content.cloneNode(true));\n\n let hasResponsiveSvg = false;\n let hasFixedSvg = false;\n\n shadowRoot.querySelectorAll(\"svg\").forEach((svgEl) => {\n // Derive responsive sizing from viewBox so pure viewBox SVGs stay visible and fluid\n const viewBox = svgEl.getAttribute(\"viewBox\");\n if (!viewBox) return;\n\n const dimensions = viewBox\n .trim()\n .split(/[\\s,]+/)\n .map((value) => Number(value));\n\n if (dimensions.length !== 4 || dimensions.some(Number.isNaN)) return;\n\n const [, , viewBoxWidth, viewBoxHeight] = dimensions;\n const widthAttr = svgEl.getAttribute(\"width\");\n const heightAttr = svgEl.getAttribute(\"height\");\n const isRelativeLength = (value?: string | null) => {\n if (!value) return false;\n const normalized = value.trim().toLowerCase();\n return normalized === \"auto\" || normalized.endsWith(\"%\");\n };\n const toNumericLength = (value?: string | null) => {\n if (!value) return null;\n const normalized = value.trim().toLowerCase();\n if (normalized === \"auto\" || normalized.endsWith(\"%\")) {\n return null;\n }\n const parsed = Number.parseFloat(normalized);\n return Number.isNaN(parsed) ? null : parsed;\n };\n // Treat percentage/auto sizing as responsive so viewBox drives the layout\n const isWidthRelative = isRelativeLength(widthAttr);\n const isHeightRelative = isRelativeLength(heightAttr);\n const widthMissing = !widthAttr || widthAttr === \"0\";\n const heightMissing = !heightAttr || heightAttr === \"0\";\n const numericWidth = toNumericLength(widthAttr);\n const numericHeight = toNumericLength(heightAttr);\n const matchesViewBox =\n numericWidth === viewBoxWidth && numericHeight === viewBoxHeight;\n\n // Prefer responsive layout when sizing is relative or matches the viewBox\n const shouldUseResponsiveSize =\n isWidthRelative ||\n isHeightRelative ||\n (widthMissing && heightMissing) ||\n matchesViewBox;\n\n if (shouldUseResponsiveSize) {\n hasResponsiveSvg = true;\n svgEl.classList.add(\"content-render-svg-el--responsive\");\n svgEl.classList.remove(\"content-render-svg-el--fixed\");\n svgEl.style.width = \"100%\";\n svgEl.style.height = \"auto\";\n if (!svgEl.style.aspectRatio && viewBoxHeight > 0) {\n svgEl.style.aspectRatio = `${viewBoxWidth} / ${viewBoxHeight}`;\n }\n return;\n }\n\n hasFixedSvg = true;\n svgEl.classList.add(\"content-render-svg-el--fixed\");\n svgEl.classList.remove(\"content-render-svg-el--responsive\");\n if (widthMissing && viewBoxWidth > 0) {\n svgEl.setAttribute(\"width\", `${viewBoxWidth}`);\n }\n if (heightMissing && viewBoxHeight > 0) {\n svgEl.setAttribute(\"height\", `${viewBoxHeight}`);\n }\n });\n\n const hostResponsive = hasResponsiveSvg && !hasFixedSvg;\n host.classList.toggle(\"content-render-svg--responsive\", hostResponsive);\n host.classList.toggle(\"content-render-svg--fixed\", !hostResponsive);\n }, [svg]);\n\n return (\n <Wrapper className=\"content-render-svg-scroll\">\n <Wrapper\n className=\"content-render-svg\"\n ref={(node) => {\n hostRef.current = node;\n }}\n />\n </Wrapper>\n );\n};\n\n// Extended component interface\ntype CustomComponents = ComponentsWithCustomVariable & {\n \"custom-button-after-content\"?: React.ComponentType<{\n children: React.ReactNode;\n }>;\n};\n\ntype MarkdownComponentRuntimeValues = {\n direction?: ContentRenderProps[\"dir\"];\n language?: string;\n mermaidMessages: MermaidChartProps[\"messages\"];\n beforeSend?: (param: OnSendContentParams) => boolean;\n locale?: MarkdownFlowLocale;\n onClickCustomButtonAfterContent?: () => void;\n onSend?: (content: OnSendContentParams) => void;\n readonly: boolean;\n renderContent: string;\n resolvedConfirmButtonText: string;\n resolvedCopiedButtonText: string;\n resolvedCopyButtonText: string;\n resolvedDefaultButtonText?: string;\n resolvedDefaultInputText?: string;\n resolvedDefaultSelectedValues?: string[];\n};\n\nconst MarkdownComponentRuntimeContext =\n React.createContext<React.RefObject<MarkdownComponentRuntimeValues> | null>(\n null\n );\n\nconst MarkdownCode = (\n props: React.ComponentProps<\"code\"> & { receivedTree?: boolean }\n) => {\n const { receivedTree, ...codeProps } = props;\n const runtimeValuesRef = React.useContext(MarkdownComponentRuntimeContext);\n const isInCodeBlock = React.useContext(CodeBlockContext);\n if (!runtimeValuesRef) {\n throw new Error(\"Markdown code renderer requires ContentRender context.\");\n }\n const { className, children, ...rest } = codeProps as {\n className?: string;\n children?: React.ReactNode;\n dir?: string;\n };\n const match = /language-(\\w+)/.exec(className || \"\");\n const language = match?.[1];\n if (language === \"mermaid\") {\n const chartContent = children?.toString().replace(/\\n$/, \"\") || \"\";\n const complete = mermaidBlockIsComplete(\n runtimeValuesRef.current.renderContent,\n chartContent\n );\n // The received-tree path replaces standalone Mermaid segments, whose\n // unfinished charts freeze until the closing fence reaches the prose budget.\n const frozen = receivedTree ? !complete : complete;\n return (\n <MermaidChart\n chart={chartContent}\n frozen={frozen}\n messages={runtimeValuesRef.current.mermaidMessages}\n />\n );\n }\n\n return (\n <code\n className={className}\n {...rest}\n dir={rest.dir ?? (isInCodeBlock ? undefined : \"ltr\")}\n >\n {children}\n </code>\n );\n};\n\nconst sourceRehypePlugins: PluggableList = [\n preserveCustomVariableProperties,\n rehypeRaw,\n sanitizeInvalidTagName,\n restoreCustomVariableProperties,\n];\nconst formattingRehypePlugins: PluggableList = [\n [rehypeHighlight, { languages: highlightLanguages, subset: subsetLanguages }],\n rehypeKatex,\n];\nconst rehypePlugins: PluggableList = [\n ...sourceRehypePlugins,\n ...formattingRehypePlugins,\n];\n\nexport const MarkdownRenderer: React.FC<{\n content: string;\n components: CustomComponents;\n locale?: MarkdownFlowLocale;\n}> = ({ content: markdownContent, components, locale }) => {\n const texts = getContentRenderLocaleTexts(locale);\n return (\n <div className=\"markdown-renderer\">\n <ReactMarkdown\n remarkPlugins={remarkPlugins}\n rehypePlugins={rehypePlugins}\n remarkRehypeOptions={{\n footnoteLabel: texts.footnoteLabel,\n footnoteBackLabel: (referenceIndex, rereferenceIndex) => {\n const reference =\n String(referenceIndex + 1) +\n (rereferenceIndex > 1 ? `-${rereferenceIndex}` : \"\");\n return texts.footnoteBackLabel.replace(\"{reference}\", reference);\n },\n }}\n components={components}\n >\n {markdownContent}\n </ReactMarkdown>\n </div>\n );\n};\n\n// ReactMarkdown still owns URL handling and JSX conversion. Its parser is\n// bypassed because the received source was already parsed and transformed.\nconst usePreparedTree: Plugin = function () {\n this.parser = () => ({ type: \"root\", children: [] });\n};\n\nconst StableVideoMarkdownRenderer: React.FC<{\n plan: VideoMarkdownRunPlan;\n renderedSegments: readonly RenderSegment[];\n components: CustomComponents;\n locale?: MarkdownFlowLocale;\n}> = ({ plan, renderedSegments, components, locale }) => {\n const prepared = useMemo(() => {\n const texts = getContentRenderLocaleTexts(locale);\n const sourceProcessor = unified()\n .use(remarkPlugins)\n .use(remarkRehype, {\n allowDangerousHtml: true,\n footnoteLabel: texts.footnoteLabel,\n footnoteBackLabel: (referenceIndex, rereferenceIndex) =>\n texts.footnoteBackLabel.replace(\n \"{reference}\",\n String(referenceIndex + 1) +\n (rereferenceIndex > 1 ? `-${rereferenceIndex}` : \"\")\n ),\n })\n .use(sourceRehypePlugins);\n const formattingProcessor = unified().use(formattingRehypePlugins);\n const tree = sourceProcessor.runSync(\n cloneVideoMarkdownSourceTree(plan),\n plan.markdownSource\n ) as Root;\n return prepareVideoMarkdownRun(\n plan,\n tree,\n (value) => formattingProcessor.runSync(value, plan.fullSource) as Root\n );\n }, [plan, locale]);\n const projected = useMemo(\n () => projectVideoMarkdownRun(prepared, renderedSegments),\n [prepared, renderedSegments]\n );\n const originalComponents = useRef(components);\n originalComponents.current = components;\n const wrappers = useRef(\n new Map<\n string,\n React.ComponentType<{\n node: Element;\n children?: React.ReactNode;\n }>\n >()\n );\n const stableComponents = useMemo(() => {\n const tags = new Set<string>();\n const collect = (node: Root | Root[\"children\"][number]) => {\n if (node.type === \"element\") tags.add(node.tagName);\n if (\"children\" in node) node.children.forEach(collect);\n };\n collect(prepared.tree!);\n const result: Record<\n string,\n React.ComponentType<{\n node: Element;\n children?: React.ReactNode;\n }>\n > = {};\n for (const tag of tags) {\n if (!wrappers.current.has(tag)) {\n const Component = ({\n node,\n children,\n ...props\n }: {\n node: Element;\n children?: React.ReactNode;\n }) => {\n const state = getVideoMarkdownNodeState(node);\n if (state?.svg) {\n return state.svgSource ? (\n <SvgBlockInShadow svg={state.svgSource} inline />\n ) : null;\n }\n if (state?.atomic) {\n return state.active ? <>{children}</> : null;\n }\n if (state?.active === false && tag !== \"a\") return null;\n const current = originalComponents.current as Record<\n string,\n React.ElementType\n >;\n const Original = current[tag];\n const visibleProps =\n state?.active === false\n ? { ...props, href: undefined, tabIndex: -1 }\n : props;\n return Original\n ? React.createElement(\n Original,\n {\n ...visibleProps,\n node,\n ...(Original === MarkdownCode ? { receivedTree: true } : {}),\n },\n children\n )\n : React.createElement(tag, visibleProps, children);\n };\n Component.displayName = `StableMarkdown(${tag})`;\n wrappers.current.set(tag, Component);\n }\n result[tag] = wrappers.current.get(tag)!;\n }\n return result as CustomComponents;\n }, [prepared]);\n const preparedPlugins = useMemo<PluggableList>(\n () => [() => () => projected],\n [projected]\n );\n return (\n <div className=\"markdown-renderer\">\n <ReactMarkdown\n remarkPlugins={[usePreparedTree]}\n rehypePlugins={preparedPlugins}\n components={stableComponents}\n >\n {\"\"}\n </ReactMarkdown>\n </div>\n );\n};\n\nconst isImmediateSegment = (segment: RenderSegment) =>\n segment.type === \"markdown\" && segment.immediate === true;\n\nconst mergeNonSandboxSegments = (segments: RenderSegment[]) => {\n if (segments.length <= 1) return segments;\n const merged: RenderSegment[] = [];\n\n segments.forEach((segment) => {\n if (segment.type === \"sandbox\" || isImmediateSegment(segment)) {\n merged.push(segment);\n return;\n }\n\n const last = merged[merged.length - 1];\n if (last && last.type !== \"sandbox\" && !isImmediateSegment(last)) {\n merged[merged.length - 1] = {\n type: \"markdown\",\n value: `${last.value}${segment.value}`,\n };\n return;\n }\n\n merged.push({ type: \"markdown\", value: segment.value });\n });\n\n return merged;\n};\n\nconst closeTypedInlineCode = (\n visible: string,\n source: string,\n ranges: ReturnType<typeof getInlineCodeRanges>\n) => {\n if (visible.length >= source.length) return visible;\n const range = ranges.find(\n ({ start, end }) => start < visible.length && visible.length < end\n );\n if (!range) return visible;\n const delimiter = /^`+/.exec(source.slice(range.start))?.[0];\n if (!delimiter || visible.length < range.start + delimiter.length) {\n return visible;\n }\n const closingStart = range.end - delimiter.length;\n if (visible.length > closingStart) {\n return visible + delimiter.slice(visible.length - closingStart);\n }\n // Close only the render copy so a typed prefix cannot activate code as HTML.\n return visible + (visible.endsWith(\"`\") ? \" \" : \"\") + delimiter;\n};\n\nconst protectTypedMarkdownPrefix = (\n visible: string,\n source: string,\n inlineCodeRanges: ReturnType<typeof getInlineCodeRanges>,\n metadataRanges: readonly MarkdownMetadataRange[],\n sourceOffset = 0\n) => {\n // Both protections use raw coordinates. Append any synthetic code delimiter\n // after escaping so encoded '<' characters cannot shift the typing budget.\n const closed = closeTypedInlineCode(visible, source, inlineCodeRanges);\n return (\n escapeTypedMarkdownMetadata(visible, metadataRanges, sourceOffset) +\n closed.slice(visible.length)\n );\n};\n\nconst splitTextByCharacterChunk = (value: string, chunkSize: number) => {\n const safeChunkSize = Math.max(1, chunkSize);\n const characters = Array.from(value);\n\n return {\n chunk: characters.slice(0, safeChunkSize).join(\"\"),\n rest: characters.slice(safeChunkSize).join(\"\"),\n };\n};\n\nconst areStringArraysEqual = (left?: string[], right?: string[]) => {\n if (left === right) {\n return true;\n }\n if (!left || !right || left.length !== right.length) {\n return false;\n }\n return left.every((value, index) => value === right[index]);\n};\n\nconst useStableStringArray = (values?: string[]) => {\n const valuesRef = useRef<string[] | undefined>(values);\n\n if (!areStringArraysEqual(valuesRef.current, values)) {\n valuesRef.current = values;\n }\n\n return valuesRef.current;\n};\n\nconst ContentRender: React.FC<ContentRenderProps> = ({\n content,\n contentType,\n locale,\n lang,\n dir,\n customRenderBar,\n onSend,\n typingSpeed = 30,\n enableTypewriter = false,\n typewriterPacing = \"fixed\",\n onTypeFinished,\n onTypewriterStateChange,\n userInput,\n interactionDefaultValueOptions,\n defaultButtonText,\n defaultInputText,\n defaultSelectedValues,\n readonly = false,\n confirmButtonText,\n copyButtonText,\n copiedButtonText,\n sandboxLoadingText,\n sandboxStyleLoadingText,\n sandboxScriptLoadingText,\n disableSandboxLoadingOverlay = false,\n sandboxFullscreenButtonText,\n sandboxExitFullscreenButtonText,\n sandboxMode = \"content\",\n onClickCustomButtonAfterContent,\n beforeSend,\n}) => {\n const localeTexts = getContentRenderLocaleTexts(locale);\n const mermaidMessages = useMemo(\n () => ({\n loading: localeTexts.mermaidLoadingText,\n emptyChart: localeTexts.mermaidEmptyChartText,\n error: localeTexts.mermaidErrorText,\n }),\n [localeTexts]\n );\n const direction = dir ?? getMarkdownFlowDirection(locale);\n const language = lang ?? getMarkdownFlowLanguage(locale);\n const resolvedConfirmButtonText =\n confirmButtonText || localeTexts.confirmButtonText;\n const resolvedCopyButtonText = copyButtonText || localeTexts.copyButtonText;\n const resolvedCopiedButtonText =\n copiedButtonText || localeTexts.copiedButtonText;\n const resolvedSandboxFullscreenButtonText =\n sandboxFullscreenButtonText || localeTexts.sandboxFullscreenButtonText;\n const resolvedSandboxExitFullscreenButtonText =\n sandboxExitFullscreenButtonText ||\n localeTexts.sandboxExitFullscreenButtonText;\n const shouldApplyTypewriterByContentType =\n !contentType || contentType === \"text\";\n const isTypewriterEnabled =\n Boolean(enableTypewriter) && shouldApplyTypewriterByContentType;\n const sourceContent = useMemo(\n () => normalizeWrappedSandboxContent(content),\n [content]\n );\n const sourceAnalysis = useMemo(\n () => getMarkdownSourceAnalysis(sourceContent),\n [sourceContent]\n );\n // Parse the received source, never a typewriter-truncated HTML string.\n const sourceSegments = useMemo(() => {\n const segments = mergeNonSandboxSegments(\n splitContentSegments(sourceContent, true, true, sourceAnalysis)\n );\n if (\n sourceContent !== content &&\n segments.length &&\n (segments[0].type === \"sandbox\" || isImmediateSegment(segments[0]))\n ) {\n // The removed opening quote occupied a prose slot before the wrapper\n // completed. Retain its empty slot so the existing iframe keeps its key.\n return [{ type: \"text\" as const, value: \"\" }, ...segments];\n }\n return segments;\n }, [content, sourceContent, sourceAnalysis]);\n const hasRichSegments = sourceSegments.some(\n (segment) => segment.type === \"sandbox\" || isImmediateSegment(segment)\n );\n const typewriterContent = hasRichSegments\n ? sourceSegments\n .filter(\n (segment) =>\n segment.type !== \"sandbox\" && !isImmediateSegment(segment)\n )\n .map((segment) => segment.value)\n .join(\"\")\n : sourceContent;\n const typewriterTickMs = Math.max(0, typingSpeed);\n const fixedTypewriterContentVersion =\n typewriterPacing === \"fixed\" ? typewriterContent : undefined;\n const [displayContent, setDisplayContent] = useState(() =>\n isTypewriterEnabled ? \"\" : typewriterContent\n );\n const displayContentRef = useRef(displayContent);\n const pendingContentRef = useRef(\"\");\n const contentAwareQueueRef = useRef<ContentAwareTypewriterQueue>({\n tokens: [],\n head: 0,\n trailingGrapheme: \"\",\n });\n const contentAwareBudgetRef = useRef(0);\n const previousTypewriterEnabledRef = useRef(isTypewriterEnabled);\n const previousTypewriterPacingRef = useRef(typewriterPacing);\n const previousSourceContentRef = useRef(typewriterContent);\n const previousReceivedContentRef = useRef(content);\n const hasReportedTypeFinishedRef = useRef(false);\n const [typewriterWakeVersion, setTypewriterWakeVersion] = useState(0);\n\n useEffect(() => {\n const wasTypewriterEnabled = previousTypewriterEnabledRef.current;\n const previousTypewriterPacing = previousTypewriterPacingRef.current;\n const previousSourceContent = previousSourceContentRef.current;\n const wasPending = Boolean(pendingContentRef.current);\n const receivedContentChanged =\n previousReceivedContentRef.current !== content;\n const receivedContentAppended =\n receivedContentChanged &&\n content.startsWith(previousReceivedContentRef.current);\n previousReceivedContentRef.current = content;\n\n previousTypewriterEnabledRef.current = isTypewriterEnabled;\n previousTypewriterPacingRef.current = typewriterPacing;\n previousSourceContentRef.current = typewriterContent;\n\n if (\n receivedContentChanged ||\n isTypewriterEnabled !== wasTypewriterEnabled\n ) {\n hasReportedTypeFinishedRef.current = false;\n }\n\n const clearPendingContent = () => {\n pendingContentRef.current = \"\";\n contentAwareQueueRef.current = {\n tokens: [],\n head: 0,\n trailingGrapheme: \"\",\n };\n contentAwareBudgetRef.current = 0;\n };\n\n const updateDisplayContent = (nextContent: string) => {\n displayContentRef.current = nextContent;\n setDisplayContent(nextContent);\n };\n\n if (!isTypewriterEnabled) {\n clearPendingContent();\n updateDisplayContent(typewriterContent);\n return;\n }\n\n if (!wasTypewriterEnabled) {\n clearPendingContent();\n updateDisplayContent(\"\");\n }\n\n let visibleContent = !wasTypewriterEnabled ? \"\" : displayContentRef.current;\n\n if (!typewriterContent.startsWith(visibleContent)) {\n clearPendingContent();\n if (!receivedContentAppended) {\n updateDisplayContent(typewriterContent);\n if (typewriterPacing === \"content-aware\") {\n contentAwareQueueRef.current = {\n tokens: [],\n head: 0,\n trailingGrapheme: getTrailingTypewriterGrapheme(typewriterContent),\n };\n }\n return;\n }\n // A newly recognized HTML tag can replace a previously literal prefix.\n // Keep the shared prose visible and pace only the newly received prose.\n let sharedLength = 0;\n while (\n sharedLength < visibleContent.length &&\n sharedLength < typewriterContent.length &&\n visibleContent[sharedLength] === typewriterContent[sharedLength]\n ) {\n sharedLength += 1;\n }\n visibleContent = visibleContent.slice(0, sharedLength);\n updateDisplayContent(visibleContent);\n }\n\n let nextPendingContent = typewriterContent.slice(visibleContent.length);\n if (!nextPendingContent) {\n pendingContentRef.current = \"\";\n contentAwareBudgetRef.current = 0;\n contentAwareQueueRef.current =\n typewriterPacing === \"content-aware\"\n ? {\n tokens: [],\n head: 0,\n trailingGrapheme: getTrailingTypewriterGrapheme(visibleContent),\n }\n : { tokens: [], head: 0, trailingGrapheme: \"\" };\n return;\n }\n\n if (typewriterPacing === \"content-aware\") {\n const previousPendingContent = previousSourceContent.slice(\n visibleContent.length\n );\n const canAppendToCachedQueue =\n wasTypewriterEnabled &&\n previousTypewriterPacing === \"content-aware\" &&\n typewriterContent.startsWith(previousSourceContent) &&\n pendingContentRef.current === previousPendingContent;\n\n if (canAppendToCachedQueue) {\n const appended = appendContentAwareTypewriterQueue(\n contentAwareQueueRef.current,\n typewriterContent.slice(previousSourceContent.length)\n );\n contentAwareQueueRef.current = appended.queue;\n\n if (appended.immediateChunk) {\n nextPendingContent = nextPendingContent.slice(\n appended.immediateChunk.length\n );\n updateDisplayContent(`${visibleContent}${appended.immediateChunk}`);\n }\n } else {\n const appended = appendContentAwareTypewriterQueue(\n {\n tokens: [],\n head: 0,\n trailingGrapheme: getTrailingTypewriterGrapheme(visibleContent),\n },\n nextPendingContent\n );\n contentAwareQueueRef.current = appended.queue;\n\n if (appended.immediateChunk) {\n nextPendingContent = nextPendingContent.slice(\n appended.immediateChunk.length\n );\n updateDisplayContent(`${visibleContent}${appended.immediateChunk}`);\n }\n\n contentAwareBudgetRef.current = 0;\n }\n } else {\n contentAwareQueueRef.current = {\n tokens: [],\n head: 0,\n trailingGrapheme: \"\",\n };\n contentAwareBudgetRef.current = 0;\n }\n\n pendingContentRef.current = nextPendingContent;\n\n if (!wasPending && nextPendingContent) {\n setTypewriterWakeVersion((version) => version + 1);\n }\n }, [content, typewriterContent, isTypewriterEnabled, typewriterPacing]);\n\n useEffect(() => {\n if (!isTypewriterEnabled) {\n return;\n }\n\n if (\n hasReportedTypeFinishedRef.current ||\n pendingContentRef.current ||\n displayContent !== typewriterContent\n ) {\n return;\n }\n\n hasReportedTypeFinishedRef.current = true;\n onTypeFinished?.();\n }, [\n content,\n typewriterContent,\n displayContent,\n isTypewriterEnabled,\n onTypeFinished,\n ]);\n\n useEffect(() => {\n if (!isTypewriterEnabled || !pendingContentRef.current) {\n return undefined;\n }\n\n const typewriterTimer = window.setTimeout(() => {\n if (!pendingContentRef.current) {\n return;\n }\n\n let chunk = \"\";\n\n if (typewriterPacing === \"content-aware\") {\n const result = consumeContentAwareTypewriterQueue(\n contentAwareQueueRef.current,\n contentAwareBudgetRef.current + CONTENT_AWARE_TYPEWRITER_TICK_BUDGET\n );\n\n chunk = result.chunk;\n contentAwareQueueRef.current = result.queue;\n\n if (isContentAwareTypewriterQueueEmpty(result.queue)) {\n contentAwareBudgetRef.current = 0;\n } else {\n contentAwareBudgetRef.current = result.remainingBudget;\n }\n } else {\n const fixedChunk = splitTextByCharacterChunk(\n pendingContentRef.current,\n FIXED_TYPEWRITER_CHUNK_SIZE\n );\n chunk = fixedChunk.chunk;\n }\n\n if (!chunk) {\n return;\n }\n\n pendingContentRef.current = pendingContentRef.current.slice(chunk.length);\n if (!pendingContentRef.current) {\n contentAwareQueueRef.current =\n typewriterPacing === \"content-aware\"\n ? {\n tokens: [],\n head: 0,\n trailingGrapheme: contentAwareQueueRef.current.trailingGrapheme,\n }\n : { tokens: [], head: 0, trailingGrapheme: \"\" };\n contentAwareBudgetRef.current = 0;\n }\n\n const nextDisplayContent = `${displayContentRef.current}${chunk}`;\n displayContentRef.current = nextDisplayContent;\n setDisplayContent(nextDisplayContent);\n }, typewriterTickMs);\n\n return () => window.clearTimeout(typewriterTimer);\n }, [\n displayContent,\n fixedTypewriterContentVersion,\n isTypewriterEnabled,\n typewriterPacing,\n typewriterTickMs,\n typewriterWakeVersion,\n ]);\n\n const mergedRenderSegments = useMemo(() => {\n let textOffset = 0;\n return sourceSegments.map((segment) => {\n if (!isTypewriterEnabled) return segment;\n if (segment.type === \"sandbox\" || isImmediateSegment(segment)) {\n // HTML skips the prose budget only after earlier prose has caught up.\n // Retain its source slot so later updates keep the same render key.\n return displayContent.length >= textOffset\n ? segment\n : { ...segment, value: \"\" };\n }\n const value = displayContent.slice(\n textOffset,\n textOffset + segment.value.length\n );\n textOffset += segment.value.length;\n // Keep empty prose slots so an existing sandbox never changes its key.\n return { ...segment, value };\n });\n }, [sourceSegments, displayContent, isTypewriterEnabled]);\n const typewriterState = useMemo<ContentRenderTypewriterState>(\n () => ({\n isTypewriterEnabled,\n isTyping: isTypewriterEnabled && displayContent !== typewriterContent,\n isComplete: displayContent === typewriterContent,\n renderedLength:\n content.length -\n sourceSegments.reduce(\n (remaining, segment, index) =>\n remaining +\n segment.value.length -\n mergedRenderSegments[index].value.length,\n 0\n ),\n totalLength: content.length,\n }),\n [\n content,\n typewriterContent,\n displayContent,\n isTypewriterEnabled,\n sourceSegments,\n mergedRenderSegments,\n ]\n );\n\n useEffect(() => {\n onTypewriterStateChange?.(typewriterState);\n }, [onTypewriterStateChange, typewriterState]);\n const sourceSegmentOffsets = useMemo(() => {\n let offset = 0;\n return sourceSegments.map((segment) => {\n const start = offset;\n offset += segment.value.length;\n return start;\n });\n }, [sourceSegments]);\n const sourceInlineCodeRanges = useMemo(\n () =>\n isTypewriterEnabled\n ? sourceSegments.map((segment) =>\n segment.type === \"sandbox\" || isImmediateSegment(segment)\n ? []\n : segment.value === sourceContent\n ? sourceAnalysis.inline\n : getInlineCodeRanges(segment.value)\n )\n : [],\n [isTypewriterEnabled, sourceSegments, sourceContent, sourceAnalysis]\n );\n const safeRichMarkdownContent = useMemo(\n () =>\n hasRichSegments\n ? mergedRenderSegments.map((segment, index) =>\n segment.type === \"sandbox\" || isImmediateSegment(segment)\n ? segment.value\n : isTypewriterEnabled\n ? protectTypedMarkdownPrefix(\n segment.value,\n sourceSegments[index].value,\n sourceInlineCodeRanges[index] ?? [],\n sourceAnalysis.metadata,\n sourceSegmentOffsets[index]\n )\n : escapeTypedMarkdownMetadata(\n segment.value,\n sourceAnalysis.metadata,\n sourceSegmentOffsets[index]\n )\n )\n : [],\n [\n hasRichSegments,\n isTypewriterEnabled,\n mergedRenderSegments,\n sourceInlineCodeRanges,\n sourceSegments,\n sourceAnalysis.metadata,\n sourceSegmentOffsets,\n ]\n );\n const richRenderRuns = useMemo(() => {\n const runs: Array<{\n indices: number[];\n sandbox: boolean;\n plan?: ReturnType<typeof createVideoMarkdownRunPlan>;\n }> = [];\n sourceSegments.forEach((segment, index) => {\n const previous = runs.at(-1);\n if (segment.type !== \"sandbox\" && previous && !previous.sandbox) {\n previous.indices.push(index);\n } else {\n runs.push({ indices: [index], sandbox: segment.type === \"sandbox\" });\n }\n });\n for (const run of runs) {\n if (\n !run.sandbox &&\n run.indices.some((index) => isImmediateSegment(sourceSegments[index]))\n ) {\n const segments = run.indices.map((index) => sourceSegments[index]);\n const fullSource = segments.map((segment) => segment.value).join(\"\");\n run.plan = createVideoMarkdownRunPlan(\n segments,\n fullSource === sourceContent ? sourceAnalysis : undefined\n );\n }\n }\n return runs;\n }, [sourceSegments, sourceContent, sourceAnalysis]);\n const renderContent = hasRichSegments\n ? mergedRenderSegments.map((segment) => segment.value).join(\"\")\n : isTypewriterEnabled\n ? displayContent\n : sourceContent;\n const normalizedContent = useMemo(\n () => (customRenderBar ? normalizeInlineHtml(renderContent) : \"\"),\n [customRenderBar, renderContent]\n );\n\n const safeMarkdownContent = useMemo(\n () =>\n hasRichSegments\n ? \"\"\n : normalizeInlineHtml(\n isTypewriterEnabled\n ? protectTypedMarkdownPrefix(\n renderContent,\n sourceContent,\n sourceInlineCodeRanges[0] ?? [],\n sourceAnalysis.metadata\n )\n : escapeTypedMarkdownMetadata(\n renderContent,\n sourceAnalysis.metadata\n )\n ),\n [\n sourceContent,\n hasRichSegments,\n isTypewriterEnabled,\n renderContent,\n sourceInlineCodeRanges,\n sourceAnalysis.metadata,\n ]\n );\n\n const interactionDefaults = useMemo(\n () =>\n getInteractionDefaultValues(\n renderContent,\n userInput,\n interactionDefaultValueOptions\n ),\n [interactionDefaultValueOptions, renderContent, userInput]\n );\n\n const resolvedDefaultButtonText =\n (defaultButtonText ? trimVariablePadding(defaultButtonText) : undefined) ||\n interactionDefaults.buttonText;\n const resolvedDefaultInputText =\n defaultInputText?.trim() || interactionDefaults.inputText;\n const fallbackSelectedValues = useMemo(\n () =>\n userInput\n ? userInput\n .split(\",\")\n .map((value) => trimVariablePadding(value))\n .filter(Boolean)\n : undefined,\n [userInput]\n );\n const resolvedDefaultSelectedValues = defaultSelectedValues?.length\n ? defaultSelectedValues\n : interactionDefaults.selectedValues || fallbackSelectedValues;\n const stableDefaultSelectedValues = useStableStringArray(\n resolvedDefaultSelectedValues\n );\n const componentRuntimeValuesRef = useRef<MarkdownComponentRuntimeValues>({\n direction,\n language,\n mermaidMessages,\n beforeSend,\n locale,\n onClickCustomButtonAfterContent,\n onSend,\n readonly,\n renderContent,\n resolvedConfirmButtonText,\n resolvedCopiedButtonText,\n resolvedCopyButtonText,\n resolvedDefaultButtonText,\n resolvedDefaultInputText,\n resolvedDefaultSelectedValues: stableDefaultSelectedValues,\n });\n\n componentRuntimeValuesRef.current = {\n direction,\n language,\n mermaidMessages,\n beforeSend,\n locale,\n onClickCustomButtonAfterContent,\n onSend,\n readonly,\n renderContent,\n resolvedConfirmButtonText,\n resolvedCopiedButtonText,\n resolvedCopyButtonText,\n resolvedDefaultButtonText,\n resolvedDefaultInputText,\n resolvedDefaultSelectedValues: stableDefaultSelectedValues,\n };\n\n const components = useMemo<CustomComponents>(\n () => ({\n \"custom-button-after-content\": ({\n children,\n }: {\n children: React.ReactNode;\n }) => {\n return (\n <button\n className=\"content-render-custom-button-after-content\"\n onClick={\n componentRuntimeValuesRef.current.onClickCustomButtonAfterContent\n }\n >\n <span className=\"content-render-custom-button-after-content-inner\">\n {children}\n </span>\n </button>\n );\n },\n \"custom-variable\": (props) => (\n <CustomButtonInputVariable\n {...props}\n readonly={componentRuntimeValuesRef.current.readonly}\n defaultButtonText={\n componentRuntimeValuesRef.current.resolvedDefaultButtonText\n }\n defaultInputText={\n componentRuntimeValuesRef.current.resolvedDefaultInputText\n }\n defaultSelectedValues={\n componentRuntimeValuesRef.current.resolvedDefaultSelectedValues\n }\n onSend={componentRuntimeValuesRef.current.onSend}\n beforeSend={componentRuntimeValuesRef.current.beforeSend}\n locale={componentRuntimeValuesRef.current.locale}\n dir={componentRuntimeValuesRef.current.direction}\n lang={componentRuntimeValuesRef.current.language}\n confirmButtonText={\n componentRuntimeValuesRef.current.resolvedConfirmButtonText\n }\n />\n ),\n code: MarkdownCode,\n table: ({ ...props }) => (\n <div className=\"content-render-table-container\">\n <table className=\"content-render-table\" {...props} />\n </div>\n ),\n th: ({ ...props }) => <th className=\"content-render-th\" {...props} />,\n td: ({ ...props }) => <td className=\"content-render-td\" {...props} />,\n tr: ({ ...props }) => <tr className=\"content-render-tr\" {...props} />,\n li: ({ node, ...props }) => {\n const className = node?.properties?.className;\n const hasTaskListItem =\n (typeof className === \"string\" &&\n className.includes(\"task-list-item\")) ||\n (Array.isArray(className) && className.includes(\"task-list-item\"));\n if (hasTaskListItem) {\n return <li className=\"content-render-task-list-item\" {...props} />;\n }\n return <li {...props} />;\n },\n ol: ({ ...props }) => <ol className=\"content-render-ol\" {...props} />,\n ul: ({ ...props }) => <ul className=\"content-render-ul\" {...props} />,\n input: ({ ...props }) => {\n if (props.type === \"checkbox\") {\n return (\n <input\n type=\"checkbox\"\n className=\"content-render-checkbox\"\n disabled\n {...props}\n />\n );\n }\n return <input {...props} />;\n },\n a: ({ children, ...props }) => (\n <a target=\"_blank\" rel=\"noopener noreferrer\" {...props}>\n {children}\n </a>\n ),\n pre: (props) => (\n <CodeBlock\n {...props}\n copyButtonText={\n componentRuntimeValuesRef.current.resolvedCopyButtonText\n }\n copiedButtonText={\n componentRuntimeValuesRef.current.resolvedCopiedButtonText\n }\n />\n ),\n }),\n []\n );\n\n const segments = useMemo(\n () => parseMarkdownSegments(safeMarkdownContent),\n [safeMarkdownContent]\n );\n\n const renderMarkdownSegments = (raw: string, keyPrefix: string) => {\n const normalized = normalizeInlineHtml(raw);\n const parsed = parseMarkdownSegments(normalized);\n\n return parsed.map((seg, index) => {\n const key = `${keyPrefix}-${seg.type}-${index}`;\n\n if (seg.type === \"text\") {\n return (\n <MarkdownComponentRuntimeContext.Provider\n key={key}\n value={componentRuntimeValuesRef}\n >\n <MarkdownRenderer\n locale={locale}\n components={components}\n content={seg.value}\n />\n </MarkdownComponentRuntimeContext.Provider>\n );\n }\n\n if (seg.type === \"mermaid\") {\n return (\n <MermaidChart\n key={key}\n chart={seg.value}\n frozen={!seg.complete}\n messages={mermaidMessages}\n />\n );\n }\n\n if (seg.type === \"svg\") {\n return <SvgBlockInShadow key={key} svg={seg.value} />;\n }\n\n return null;\n });\n };\n\n const customBar = customRenderBar ? (\n <div className=\"content-render-custom-bar\">\n {React.createElement(customRenderBar, {\n content,\n displayContent: normalizedContent,\n onSend,\n })}\n </div>\n ) : null;\n\n if (hasRichSegments) {\n return (\n <div\n className=\"content-render markdown-body\"\n dir={direction}\n lang={language}\n >\n {richRenderRuns.map((run) => {\n const idx = run.indices[0];\n const segment = mergedRenderSegments[idx];\n if (run.sandbox)\n return segment.type === \"sandbox\" &&\n segment.value &&\n !segment.pending ? (\n <IframeSandbox\n key={`sandbox-${idx}`}\n hideFullScreen\n type=\"sandbox\"\n content={segment.value}\n className=\"content-render-iframe\"\n locale={locale}\n dir={direction}\n lang={language}\n loadingText={sandboxLoadingText}\n styleLoadingText={sandboxStyleLoadingText}\n scriptLoadingText={sandboxScriptLoadingText}\n disableLoadingOverlay={disableSandboxLoadingOverlay}\n fullScreenButtonText={resolvedSandboxFullscreenButtonText}\n exitFullScreenButtonText={\n resolvedSandboxExitFullscreenButtonText\n }\n mode={sandboxMode}\n />\n ) : null;\n if (run.plan)\n return (\n <MarkdownComponentRuntimeContext.Provider\n key={`md-${idx}`}\n value={componentRuntimeValuesRef}\n >\n <StableVideoMarkdownRenderer\n locale={locale}\n components={components}\n plan={run.plan}\n renderedSegments={run.indices.map(\n (index) => mergedRenderSegments[index]\n )}\n />\n </MarkdownComponentRuntimeContext.Provider>\n );\n return run.indices.map((index) => (\n <React.Fragment key={`md-${index}`}>\n {mergedRenderSegments[index].type === \"markdown\" &&\n mergedRenderSegments[index].pending\n ? null\n : renderMarkdownSegments(\n safeRichMarkdownContent[index],\n `md-${index}`\n )}\n </React.Fragment>\n ));\n })}\n {customBar}\n </div>\n );\n }\n\n return (\n <div\n className=\"content-render markdown-body\"\n dir={direction}\n lang={language}\n >\n {segments.map((seg, index) => {\n if (seg.type === \"text\") {\n return (\n <MarkdownComponentRuntimeContext.Provider\n key={index}\n value={componentRuntimeValuesRef}\n >\n <MarkdownRenderer\n locale={locale}\n components={components}\n content={seg.value}\n />\n </MarkdownComponentRuntimeContext.Provider>\n );\n }\n\n if (seg.type === \"mermaid\") {\n return (\n <MermaidChart\n key={index}\n chart={seg.value}\n frozen={!seg.complete}\n messages={mermaidMessages}\n />\n );\n }\n\n if (seg.type === \"svg\") {\n return <SvgBlockInShadow key={index} svg={seg.value} />;\n }\n })}\n\n {customBar}\n </div>\n );\n};\n\nexport default ContentRender;\n"],"names":["FIXED_TYPEWRITER_CHUNK_SIZE","SvgBlockInShadow","svg","inline","hostRef","useRef","Wrapper","useEffect","host","shadowRoot","styleId","styleEl","node","template","cleanedSvg","stripSvgTextLineBreaks","hasResponsiveSvg","hasFixedSvg","svgEl","viewBox","dimensions","value","viewBoxWidth","viewBoxHeight","widthAttr","heightAttr","isRelativeLength","normalized","toNumericLength","parsed","isWidthRelative","isHeightRelative","widthMissing","heightMissing","numericWidth","numericHeight","hostResponsive","jsx","MarkdownComponentRuntimeContext","React","MarkdownCode","props","receivedTree","codeProps","runtimeValuesRef","isInCodeBlock","CodeBlockContext","className","children","rest","chartContent","complete","mermaidBlockIsComplete","MermaidChart","sourceRehypePlugins","preserveCustomVariableProperties","rehypeRaw","sanitizeInvalidTagName","restoreCustomVariableProperties","formattingRehypePlugins","rehypeHighlight","highlightLanguages","subsetLanguages","rehypeKatex","rehypePlugins","MarkdownRenderer","markdownContent","components","locale","texts","getContentRenderLocaleTexts","ReactMarkdown","remarkPlugins","referenceIndex","rereferenceIndex","reference","usePreparedTree","StableVideoMarkdownRenderer","plan","renderedSegments","prepared","useMemo","sourceProcessor","unified","remarkRehype","formattingProcessor","tree","cloneVideoMarkdownSourceTree","prepareVideoMarkdownRun","projected","projectVideoMarkdownRun","originalComponents","wrappers","stableComponents","tags","collect","result","tag","Component","state","getVideoMarkdownNodeState","Fragment","Original","visibleProps","preparedPlugins","isImmediateSegment","segment","mergeNonSandboxSegments","segments","merged","last","closeTypedInlineCode","visible","source","ranges","range","start","end","delimiter","closingStart","protectTypedMarkdownPrefix","inlineCodeRanges","metadataRanges","sourceOffset","closed","escapeTypedMarkdownMetadata","splitTextByCharacterChunk","chunkSize","safeChunkSize","characters","areStringArraysEqual","left","right","index","useStableStringArray","values","valuesRef","ContentRender","content","contentType","lang","dir","customRenderBar","onSend","typingSpeed","enableTypewriter","typewriterPacing","onTypeFinished","onTypewriterStateChange","userInput","interactionDefaultValueOptions","defaultButtonText","defaultInputText","defaultSelectedValues","readonly","confirmButtonText","copyButtonText","copiedButtonText","sandboxLoadingText","sandboxStyleLoadingText","sandboxScriptLoadingText","disableSandboxLoadingOverlay","sandboxFullscreenButtonText","sandboxExitFullscreenButtonText","sandboxMode","onClickCustomButtonAfterContent","beforeSend","localeTexts","mermaidMessages","direction","getMarkdownFlowDirection","language","getMarkdownFlowLanguage","resolvedConfirmButtonText","resolvedCopyButtonText","resolvedCopiedButtonText","resolvedSandboxFullscreenButtonText","resolvedSandboxExitFullscreenButtonText","isTypewriterEnabled","sourceContent","normalizeWrappedSandboxContent","sourceAnalysis","getMarkdownSourceAnalysis","sourceSegments","splitContentSegments","hasRichSegments","typewriterContent","typewriterTickMs","fixedTypewriterContentVersion","displayContent","setDisplayContent","useState","displayContentRef","pendingContentRef","contentAwareQueueRef","contentAwareBudgetRef","previousTypewriterEnabledRef","previousTypewriterPacingRef","previousSourceContentRef","previousReceivedContentRef","hasReportedTypeFinishedRef","typewriterWakeVersion","setTypewriterWakeVersion","wasTypewriterEnabled","previousTypewriterPacing","previousSourceContent","wasPending","receivedContentChanged","receivedContentAppended","clearPendingContent","updateDisplayContent","nextContent","visibleContent","getTrailingTypewriterGrapheme","sharedLength","nextPendingContent","previousPendingContent","appended","appendContentAwareTypewriterQueue","version","typewriterTimer","chunk","consumeContentAwareTypewriterQueue","CONTENT_AWARE_TYPEWRITER_TICK_BUDGET","isContentAwareTypewriterQueueEmpty","nextDisplayContent","mergedRenderSegments","textOffset","typewriterState","remaining","sourceSegmentOffsets","offset","sourceInlineCodeRanges","getInlineCodeRanges","safeRichMarkdownContent","richRenderRuns","runs","previous","run","fullSource","createVideoMarkdownRunPlan","renderContent","normalizedContent","normalizeInlineHtml","safeMarkdownContent","interactionDefaults","getInteractionDefaultValues","resolvedDefaultButtonText","trimVariablePadding","resolvedDefaultInputText","fallbackSelectedValues","resolvedDefaultSelectedValues","stableDefaultSelectedValues","componentRuntimeValuesRef","CustomButtonInputVariable","CodeBlock","parseMarkdownSegments","renderMarkdownSegments","raw","keyPrefix","seg","key","customBar","jsxs","idx","IframeSandbox"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4EA,MAAMA,KAA8B,GA4E9BC,KAAgE,CAAC;AAAA,EACrE,KAAAC;AAAA,EACA,QAAAC,IAAS;AACX,MAAM;AACJ,QAAMC,IAAUC,EAA2B,IAAI,GACzCC,IAAUH,IAAS,SAAS;AAElC,SAAAI,GAAU,MAAM;AACd,UAAMC,IAAOJ,EAAQ;AACrB,QAAI,CAACI,EAAM;AACX,UAAMC,IAAaD,EAAK,cAAcA,EAAK,aAAa,EAAE,MAAM,QAAQ,GAClEE,IAAU;AAChB,QAAIC,IAAUF,EAAW,eAAeC,CAAO;AAE/C,IAAKC,MACHA,IAAU,SAAS,cAAc,OAAO,GACxCA,EAAQ,KAAKD,GAEbC,EAAQ,cAAc;AAAA;AAAA;AAAA;AAAA,SAKtBF,EAAW,YAAYE,CAAO,IAGV,MAAM,KAAKF,EAAW,UAAU,EAAE;AAAA,MACtD,CAACG,MAASA,MAASD;AAAA,IAAA,EAEP,QAAQ,CAACC,MAASH,EAAW,YAAYG,CAAI,CAAC;AAE5D,UAAMC,IAAW,SAAS,cAAc,UAAU,GAC5CC,IAAaC,GAAuBb,CAAG;AAC7C,IAAAW,EAAS,YAAYC,GACrBL,EAAW,OAAOI,EAAS,QAAQ,UAAU,EAAI,CAAC;AAElD,QAAIG,IAAmB,IACnBC,IAAc;AAElB,IAAAR,EAAW,iBAAiB,KAAK,EAAE,QAAQ,CAACS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ACf,mBACE,gBAAA/N;AAAA,cAACgB;AAAA,cAAA;AAAA,gBAEC,OAAO+M,EAAI;AAAA,gBACX,QAAQ,CAACA,EAAI;AAAA,gBACb,UAAU5F;AAAA,cAAA;AAAA,cAHLnC;AAAA,YAAA;AAQX,cAAI+H,EAAI,SAAS;AACf,mBAAO,gBAAA/N,EAACpC,IAAA,EAA6B,KAAKmQ,EAAI,SAAhB/H,CAAuB;AAAA,QAEzD,CAAC;AAAA,QAEAiI;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
1
|
+
{"version":3,"file":"ContentRender.es.js","sources":["../../../src/components/ContentRender/ContentRender.tsx"],"sourcesContent":["import { trimVariablePadding } from \"remark-flow\";\nimport React, { useEffect, useMemo, useRef, useState } from \"react\";\nimport ReactMarkdown from \"react-markdown\";\nimport rehypeHighlight from \"rehype-highlight\";\nimport rehypeKatex from \"rehype-katex\";\nimport rehypeRaw from \"rehype-raw\";\nimport { unified, type PluggableList, type Plugin } from \"unified\";\nimport remarkRehype from \"remark-rehype\";\nimport type { Element, Root } from \"hast\";\nimport { CustomRenderBarProps, OnSendContentParams } from \"../types\";\nimport { sanitizeInvalidTagName } from \"./utils/sanitize-invalid-tag-name\";\nimport { stripSvgTextLineBreaks } from \"./utils/strip-svg-text-line-breaks\";\nimport \"./contentRender.css\";\nimport \"./github-markdown-light.css\";\nimport \"highlight.js/styles/github.css\";\nimport \"katex/dist/katex.min.css\";\nimport CodeBlock, { CodeBlockContext } from \"./CodeBlock\";\nimport CustomButtonInputVariable, {\n ComponentsWithCustomVariable,\n} from \"./plugins/CustomVariable\";\nimport MermaidChart, { type MermaidChartProps } from \"./plugins/MermaidChart\";\nimport {\n preserveCustomVariableProperties,\n restoreCustomVariableProperties,\n} from \"./utils/custom-variable-props\";\nimport {\n highlightLanguages,\n subsetLanguages,\n} from \"./utils/highlight-languages\";\nimport {\n parseMarkdownSegments,\n mermaidBlockIsComplete,\n} from \"./utils/mermaid-parse\";\nimport {\n getInlineCodeRanges,\n getMarkdownSourceAnalysis,\n} from \"./utils/inline-code-ranges\";\nimport { remarkPlugins } from \"./utils/markdown-plugins\";\nimport { normalizeInlineHtml } from \"./utils/normalize-inline-html\";\nimport {\n escapeTypedMarkdownMetadata,\n type MarkdownMetadataRange,\n} from \"./utils/escape-typed-metadata\";\nimport IframeSandbox from \"./IframeSandbox\";\nimport {\n appendContentAwareTypewriterQueue,\n CONTENT_AWARE_TYPEWRITER_TICK_BUDGET,\n consumeContentAwareTypewriterQueue,\n getTrailingTypewriterGrapheme,\n isContentAwareTypewriterQueueEmpty,\n type ContentAwareTypewriterQueue,\n} from \"./utils/typewriter-pacing\";\nimport {\n normalizeWrappedSandboxContent,\n splitContentSegments,\n type RenderSegment,\n} from \"./utils/split-content\";\nimport {\n getInteractionDefaultValues,\n type InteractionDefaultValueOptions,\n} from \"../../lib/interaction-defaults\";\nimport {\n getMarkdownFlowDirection,\n getMarkdownFlowLanguage,\n type MarkdownFlowLocale,\n} from \"../../lib/locale\";\nimport { getContentRenderLocaleTexts } from \"./contentRenderI18n\";\nimport {\n createVideoMarkdownRunPlan,\n cloneVideoMarkdownSourceTree,\n projectVideoMarkdownRun,\n prepareVideoMarkdownRun,\n getVideoMarkdownNodeState,\n type VideoMarkdownRunPlan,\n} from \"./utils/video-markdown-run\";\n\nconst FIXED_TYPEWRITER_CHUNK_SIZE = 2;\n\nexport type ContentRenderTypewriterPacing = \"fixed\" | \"content-aware\";\n\n// Define component Props type\nexport interface ContentRenderProps {\n content: string;\n contentType?: string;\n /** Locale used for built-in UI text when a more specific text prop is not provided. */\n locale?: MarkdownFlowLocale;\n /** Overrides the locale-derived language; omitted values inherit from the host. */\n lang?: string;\n /** Overrides locale-derived direction; omitted values inherit when no locale is set. */\n dir?: React.HTMLAttributes<HTMLDivElement>[\"dir\"];\n /**\n * Callback invoked when the custom button after content is clicked.\n * This button is rendered via the `<custom-button-after-content>` tag in markdown content.\n * @example\n * ```tsx\n * <ContentRender\n * content=\"Hello <custom-button-after-content>Ask</custom-button-after-content>\"\n * onClickCustomButtonAfterContent={() => console.log('Button clicked')}\n * />\n * ```\n */\n customRenderBar?: CustomRenderBarProps;\n onClickCustomButtonAfterContent?: () => void;\n onSend?: (content: OnSendContentParams) => void;\n typingSpeed?: number;\n /** Types prose only; following HTML renders progressively once preceding prose is displayed. */\n enableTypewriter?: boolean;\n /** Controls how much text is revealed per tick. Defaults to the legacy fixed pacing. */\n typewriterPacing?: ContentRenderTypewriterPacing;\n onTypeFinished?: () => void;\n onTypewriterStateChange?: (state: ContentRenderTypewriterState) => void;\n userInput?: string;\n interactionDefaultValueOptions?: InteractionDefaultValueOptions;\n defaultButtonText?: string;\n defaultInputText?: string; // Text input by user\n defaultSelectedValues?: string[]; // Default selected values for multi-select\n readonly?: boolean;\n // Multi-select confirm button text (i18n support)\n confirmButtonText?: string;\n // Copy button text (i18n support)\n copyButtonText?: string;\n // Copied state text (i18n support)\n copiedButtonText?: string;\n // Dynamic interaction format for multi-select support\n dynamicInteractionFormat?: string;\n // Loading text before first HTML block renders inside iframe (i18n support)\n sandboxLoadingText?: string;\n // Loading text while styles are being generated inside iframe\n sandboxStyleLoadingText?: string;\n // Loading text while scripts are being cached/executed inside iframe\n sandboxScriptLoadingText?: string;\n // Disable sandbox loading overlays when upper layers have already entered an error state\n disableSandboxLoadingOverlay?: boolean;\n // Fullscreen button text for iframe sandbox\n sandboxFullscreenButtonText?: string;\n // Exit fullscreen button text for iframe sandbox\n sandboxExitFullscreenButtonText?: string;\n // Sandbox render mode\n sandboxMode?: \"content\" | \"blackboard\";\n beforeSend?: (param: OnSendContentParams) => boolean;\n}\n\nexport interface ContentRenderTypewriterState {\n isTypewriterEnabled: boolean;\n isTyping: boolean;\n isComplete: boolean;\n /** Received source units already displayed, including unpaced HTML. */\n renderedLength: number;\n totalLength: number;\n}\n\n// Render svg string via Shadow DOM to avoid markdown wrapping\nconst SvgBlockInShadow: React.FC<{ svg: string; inline?: boolean }> = ({\n svg,\n inline = false,\n}) => {\n const hostRef = useRef<HTMLElement | null>(null);\n const Wrapper = inline ? \"span\" : \"div\";\n\n useEffect(() => {\n const host = hostRef.current;\n if (!host) return;\n const shadowRoot = host.shadowRoot ?? host.attachShadow({ mode: \"open\" });\n const styleId = \"content-render-svg-style\";\n let styleEl = shadowRoot.getElementById(styleId) as HTMLStyleElement | null;\n\n if (!styleEl) {\n styleEl = document.createElement(\"style\");\n styleEl.id = styleId;\n // Keep intrinsic SVG width so the wrapper can scroll horizontally when needed\n styleEl.textContent = `\n svg { height: auto; display: inline-block; }\n svg.content-render-svg-el--responsive { width: 100%; max-width: 100%; }\n svg.content-render-svg-el--fixed { max-width: none; }\n `;\n shadowRoot.appendChild(styleEl);\n }\n\n const nodesToRemove = Array.from(shadowRoot.childNodes).filter(\n (node) => node !== styleEl\n );\n nodesToRemove.forEach((node) => shadowRoot.removeChild(node));\n\n const template = document.createElement(\"template\");\n const cleanedSvg = stripSvgTextLineBreaks(svg);\n template.innerHTML = cleanedSvg;\n shadowRoot.append(template.content.cloneNode(true));\n\n let hasResponsiveSvg = false;\n let hasFixedSvg = false;\n\n shadowRoot.querySelectorAll(\"svg\").forEach((svgEl) => {\n // Derive responsive sizing from viewBox so pure viewBox SVGs stay visible and fluid\n const viewBox = svgEl.getAttribute(\"viewBox\");\n if (!viewBox) return;\n\n const dimensions = viewBox\n .trim()\n .split(/[\\s,]+/)\n .map((value) => Number(value));\n\n if (dimensions.length !== 4 || dimensions.some(Number.isNaN)) return;\n\n const [, , viewBoxWidth, viewBoxHeight] = dimensions;\n const widthAttr = svgEl.getAttribute(\"width\");\n const heightAttr = svgEl.getAttribute(\"height\");\n const isRelativeLength = (value?: string | null) => {\n if (!value) return false;\n const normalized = value.trim().toLowerCase();\n return normalized === \"auto\" || normalized.endsWith(\"%\");\n };\n const toNumericLength = (value?: string | null) => {\n if (!value) return null;\n const normalized = value.trim().toLowerCase();\n if (normalized === \"auto\" || normalized.endsWith(\"%\")) {\n return null;\n }\n const parsed = Number.parseFloat(normalized);\n return Number.isNaN(parsed) ? null : parsed;\n };\n // Treat percentage/auto sizing as responsive so viewBox drives the layout\n const isWidthRelative = isRelativeLength(widthAttr);\n const isHeightRelative = isRelativeLength(heightAttr);\n const widthMissing = !widthAttr || widthAttr === \"0\";\n const heightMissing = !heightAttr || heightAttr === \"0\";\n const numericWidth = toNumericLength(widthAttr);\n const numericHeight = toNumericLength(heightAttr);\n const matchesViewBox =\n numericWidth === viewBoxWidth && numericHeight === viewBoxHeight;\n\n // Prefer responsive layout when sizing is relative or matches the viewBox\n const shouldUseResponsiveSize =\n isWidthRelative ||\n isHeightRelative ||\n (widthMissing && heightMissing) ||\n matchesViewBox;\n\n if (shouldUseResponsiveSize) {\n hasResponsiveSvg = true;\n svgEl.classList.add(\"content-render-svg-el--responsive\");\n svgEl.classList.remove(\"content-render-svg-el--fixed\");\n svgEl.style.width = \"100%\";\n svgEl.style.height = \"auto\";\n if (!svgEl.style.aspectRatio && viewBoxHeight > 0) {\n svgEl.style.aspectRatio = `${viewBoxWidth} / ${viewBoxHeight}`;\n }\n return;\n }\n\n hasFixedSvg = true;\n svgEl.classList.add(\"content-render-svg-el--fixed\");\n svgEl.classList.remove(\"content-render-svg-el--responsive\");\n if (widthMissing && viewBoxWidth > 0) {\n svgEl.setAttribute(\"width\", `${viewBoxWidth}`);\n }\n if (heightMissing && viewBoxHeight > 0) {\n svgEl.setAttribute(\"height\", `${viewBoxHeight}`);\n }\n });\n\n const hostResponsive = hasResponsiveSvg && !hasFixedSvg;\n host.classList.toggle(\"content-render-svg--responsive\", hostResponsive);\n host.classList.toggle(\"content-render-svg--fixed\", !hostResponsive);\n }, [svg]);\n\n return (\n <Wrapper className=\"content-render-svg-scroll\">\n <Wrapper\n className=\"content-render-svg\"\n ref={(node) => {\n hostRef.current = node;\n }}\n />\n </Wrapper>\n );\n};\n\n// Extended component interface\ntype CustomComponents = ComponentsWithCustomVariable & {\n \"custom-button-after-content\"?: React.ComponentType<{\n children: React.ReactNode;\n }>;\n};\n\ntype MarkdownComponentRuntimeValues = {\n direction?: ContentRenderProps[\"dir\"];\n language?: string;\n mermaidMessages: MermaidChartProps[\"messages\"];\n beforeSend?: (param: OnSendContentParams) => boolean;\n locale?: MarkdownFlowLocale;\n onClickCustomButtonAfterContent?: () => void;\n onSend?: (content: OnSendContentParams) => void;\n readonly: boolean;\n renderContent: string;\n resolvedConfirmButtonText: string;\n resolvedCopiedButtonText: string;\n resolvedCopyButtonText: string;\n resolvedDefaultButtonText?: string;\n resolvedDefaultInputText?: string;\n resolvedDefaultSelectedValues?: string[];\n};\n\nconst MarkdownComponentRuntimeContext =\n React.createContext<React.RefObject<MarkdownComponentRuntimeValues> | null>(\n null\n );\n\nconst MarkdownCode = (\n props: React.ComponentProps<\"code\"> & { receivedTree?: boolean }\n) => {\n const { receivedTree, ...codeProps } = props;\n const runtimeValuesRef = React.useContext(MarkdownComponentRuntimeContext);\n const isInCodeBlock = React.useContext(CodeBlockContext);\n if (!runtimeValuesRef) {\n throw new Error(\"Markdown code renderer requires ContentRender context.\");\n }\n const { className, children, ...rest } = codeProps as {\n className?: string;\n children?: React.ReactNode;\n dir?: string;\n };\n const match = /language-(\\w+)/.exec(className || \"\");\n const language = match?.[1];\n if (language === \"mermaid\") {\n const chartContent = children?.toString().replace(/\\n$/, \"\") || \"\";\n const complete = mermaidBlockIsComplete(\n runtimeValuesRef.current.renderContent,\n chartContent\n );\n // The received-tree path replaces standalone Mermaid segments, whose\n // unfinished charts freeze until the closing fence reaches the prose budget.\n const frozen = receivedTree ? !complete : complete;\n return (\n <MermaidChart\n chart={chartContent}\n frozen={frozen}\n messages={runtimeValuesRef.current.mermaidMessages}\n />\n );\n }\n\n return (\n <code\n className={className}\n {...rest}\n dir={rest.dir ?? (isInCodeBlock ? undefined : \"ltr\")}\n >\n {children}\n </code>\n );\n};\n\nconst sourceRehypePlugins: PluggableList = [\n preserveCustomVariableProperties,\n rehypeRaw,\n sanitizeInvalidTagName,\n restoreCustomVariableProperties,\n];\nconst formattingRehypePlugins: PluggableList = [\n [rehypeHighlight, { languages: highlightLanguages, subset: subsetLanguages }],\n rehypeKatex,\n];\nconst rehypePlugins: PluggableList = [\n ...sourceRehypePlugins,\n ...formattingRehypePlugins,\n];\n\nexport const MarkdownRenderer: React.FC<{\n content: string;\n components: CustomComponents;\n locale?: MarkdownFlowLocale;\n}> = ({ content: markdownContent, components, locale }) => {\n const texts = getContentRenderLocaleTexts(locale);\n return (\n <div className=\"markdown-renderer\">\n <ReactMarkdown\n remarkPlugins={remarkPlugins}\n rehypePlugins={rehypePlugins}\n remarkRehypeOptions={{\n footnoteLabel: texts.footnoteLabel,\n footnoteBackLabel: (referenceIndex, rereferenceIndex) => {\n const reference =\n String(referenceIndex + 1) +\n (rereferenceIndex > 1 ? `-${rereferenceIndex}` : \"\");\n return texts.footnoteBackLabel.replace(\"{reference}\", reference);\n },\n }}\n components={components}\n >\n {markdownContent}\n </ReactMarkdown>\n </div>\n );\n};\n\n// ReactMarkdown still owns URL handling and JSX conversion. Its parser is\n// bypassed because the received source was already parsed and transformed.\nconst usePreparedTree: Plugin = function () {\n this.parser = () => ({ type: \"root\", children: [] });\n};\n\nconst StableVideoMarkdownRenderer: React.FC<{\n plan: VideoMarkdownRunPlan;\n renderedSegments: readonly RenderSegment[];\n components: CustomComponents;\n locale?: MarkdownFlowLocale;\n}> = ({ plan, renderedSegments, components, locale }) => {\n const prepared = useMemo(() => {\n const texts = getContentRenderLocaleTexts(locale);\n const sourceProcessor = unified()\n .use(remarkPlugins)\n .use(remarkRehype, {\n allowDangerousHtml: true,\n footnoteLabel: texts.footnoteLabel,\n footnoteBackLabel: (referenceIndex, rereferenceIndex) =>\n texts.footnoteBackLabel.replace(\n \"{reference}\",\n String(referenceIndex + 1) +\n (rereferenceIndex > 1 ? `-${rereferenceIndex}` : \"\")\n ),\n })\n .use(sourceRehypePlugins);\n const formattingProcessor = unified().use(formattingRehypePlugins);\n const tree = sourceProcessor.runSync(\n cloneVideoMarkdownSourceTree(plan),\n plan.markdownSource\n ) as Root;\n return prepareVideoMarkdownRun(\n plan,\n tree,\n (value) => formattingProcessor.runSync(value, plan.fullSource) as Root\n );\n }, [plan, locale]);\n const projected = useMemo(\n () => projectVideoMarkdownRun(prepared, renderedSegments),\n [prepared, renderedSegments]\n );\n const originalComponents = useRef(components);\n originalComponents.current = components;\n const wrappers = useRef(\n new Map<\n string,\n React.ComponentType<{\n node: Element;\n children?: React.ReactNode;\n }>\n >()\n );\n const stableComponents = useMemo(() => {\n const tags = new Set<string>();\n const collect = (node: Root | Root[\"children\"][number]) => {\n if (node.type === \"element\") tags.add(node.tagName);\n if (\"children\" in node) node.children.forEach(collect);\n };\n collect(prepared.tree!);\n const result: Record<\n string,\n React.ComponentType<{\n node: Element;\n children?: React.ReactNode;\n }>\n > = {};\n for (const tag of tags) {\n if (!wrappers.current.has(tag)) {\n const Component = ({\n node,\n children,\n ...props\n }: {\n node: Element;\n children?: React.ReactNode;\n }) => {\n const state = getVideoMarkdownNodeState(node);\n if (state?.svg) {\n return state.svgSource ? (\n <SvgBlockInShadow svg={state.svgSource} inline />\n ) : null;\n }\n if (state?.atomic) {\n return state.active ? <>{children}</> : null;\n }\n if (state?.active === false && tag !== \"a\") return null;\n const current = originalComponents.current as Record<\n string,\n React.ElementType\n >;\n const Original = current[tag];\n const visibleProps =\n state?.active === false\n ? { ...props, href: undefined, tabIndex: -1 }\n : props;\n return Original\n ? React.createElement(\n Original,\n {\n ...visibleProps,\n node,\n ...(Original === MarkdownCode ? { receivedTree: true } : {}),\n },\n children\n )\n : React.createElement(tag, visibleProps, children);\n };\n Component.displayName = `StableMarkdown(${tag})`;\n wrappers.current.set(tag, Component);\n }\n result[tag] = wrappers.current.get(tag)!;\n }\n return result as CustomComponents;\n }, [prepared]);\n const preparedPlugins = useMemo<PluggableList>(\n () => [() => () => projected],\n [projected]\n );\n return (\n <div className=\"markdown-renderer\">\n <ReactMarkdown\n remarkPlugins={[usePreparedTree]}\n rehypePlugins={preparedPlugins}\n components={stableComponents}\n >\n {\"\"}\n </ReactMarkdown>\n </div>\n );\n};\n\nconst isImmediateSegment = (segment: RenderSegment) =>\n segment.type === \"markdown\" && segment.immediate === true;\n\nconst mergeNonSandboxSegments = (segments: RenderSegment[]) => {\n if (segments.length <= 1) return segments;\n const merged: RenderSegment[] = [];\n\n segments.forEach((segment) => {\n if (segment.type === \"sandbox\" || isImmediateSegment(segment)) {\n merged.push(segment);\n return;\n }\n\n const last = merged[merged.length - 1];\n if (last && last.type !== \"sandbox\" && !isImmediateSegment(last)) {\n merged[merged.length - 1] = {\n type: \"markdown\",\n value: `${last.value}${segment.value}`,\n };\n return;\n }\n\n merged.push({ type: \"markdown\", value: segment.value });\n });\n\n return merged;\n};\n\nconst closeTypedInlineCode = (\n visible: string,\n source: string,\n ranges: ReturnType<typeof getInlineCodeRanges>\n) => {\n if (visible.length >= source.length) return visible;\n const range = ranges.find(\n ({ start, end }) => start < visible.length && visible.length < end\n );\n if (!range) return visible;\n const delimiter = /^`+/.exec(source.slice(range.start))?.[0];\n if (!delimiter || visible.length < range.start + delimiter.length) {\n return visible;\n }\n const closingStart = range.end - delimiter.length;\n if (visible.length > closingStart) {\n return visible + delimiter.slice(visible.length - closingStart);\n }\n // Close only the render copy so a typed prefix cannot activate code as HTML.\n return visible + (visible.endsWith(\"`\") ? \" \" : \"\") + delimiter;\n};\n\nconst protectTypedMarkdownPrefix = (\n visible: string,\n source: string,\n inlineCodeRanges: ReturnType<typeof getInlineCodeRanges>,\n metadataRanges: readonly MarkdownMetadataRange[],\n sourceOffset = 0\n) => {\n // Both protections use raw coordinates. Append any synthetic code delimiter\n // after escaping so encoded '<' characters cannot shift the typing budget.\n const closed = closeTypedInlineCode(visible, source, inlineCodeRanges);\n return (\n escapeTypedMarkdownMetadata(visible, metadataRanges, sourceOffset) +\n closed.slice(visible.length)\n );\n};\n\nconst splitTextByCharacterChunk = (value: string, chunkSize: number) => {\n const safeChunkSize = Math.max(1, chunkSize);\n const characters = Array.from(value);\n\n return {\n chunk: characters.slice(0, safeChunkSize).join(\"\"),\n rest: characters.slice(safeChunkSize).join(\"\"),\n };\n};\n\nconst areStringArraysEqual = (left?: string[], right?: string[]) => {\n if (left === right) {\n return true;\n }\n if (!left || !right || left.length !== right.length) {\n return false;\n }\n return left.every((value, index) => value === right[index]);\n};\n\nconst useStableStringArray = (values?: string[]) => {\n const valuesRef = useRef<string[] | undefined>(values);\n\n if (!areStringArraysEqual(valuesRef.current, values)) {\n valuesRef.current = values;\n }\n\n return valuesRef.current;\n};\n\nconst ContentRender: React.FC<ContentRenderProps> = ({\n content,\n contentType,\n locale,\n lang,\n dir,\n customRenderBar,\n onSend,\n typingSpeed = 30,\n enableTypewriter = false,\n typewriterPacing = \"fixed\",\n onTypeFinished,\n onTypewriterStateChange,\n userInput,\n interactionDefaultValueOptions,\n defaultButtonText,\n defaultInputText,\n defaultSelectedValues,\n readonly = false,\n confirmButtonText,\n copyButtonText,\n copiedButtonText,\n sandboxLoadingText,\n sandboxStyleLoadingText,\n sandboxScriptLoadingText,\n disableSandboxLoadingOverlay = false,\n sandboxFullscreenButtonText,\n sandboxExitFullscreenButtonText,\n sandboxMode = \"content\",\n onClickCustomButtonAfterContent,\n beforeSend,\n}) => {\n const localeTexts = getContentRenderLocaleTexts(locale);\n const mermaidMessages = useMemo(\n () => ({\n loading: localeTexts.mermaidLoadingText,\n emptyChart: localeTexts.mermaidEmptyChartText,\n error: localeTexts.mermaidErrorText,\n }),\n [localeTexts]\n );\n const direction = dir ?? getMarkdownFlowDirection(locale);\n const language = lang ?? getMarkdownFlowLanguage(locale);\n const resolvedConfirmButtonText =\n confirmButtonText || localeTexts.confirmButtonText;\n const resolvedCopyButtonText = copyButtonText || localeTexts.copyButtonText;\n const resolvedCopiedButtonText =\n copiedButtonText || localeTexts.copiedButtonText;\n const resolvedSandboxFullscreenButtonText =\n sandboxFullscreenButtonText || localeTexts.sandboxFullscreenButtonText;\n const resolvedSandboxExitFullscreenButtonText =\n sandboxExitFullscreenButtonText ||\n localeTexts.sandboxExitFullscreenButtonText;\n const shouldApplyTypewriterByContentType =\n !contentType || contentType === \"text\";\n const isTypewriterEnabled =\n Boolean(enableTypewriter) && shouldApplyTypewriterByContentType;\n const sourceContent = useMemo(\n () => normalizeWrappedSandboxContent(content),\n [content]\n );\n const sourceAnalysis = useMemo(\n () => getMarkdownSourceAnalysis(sourceContent),\n [sourceContent]\n );\n // Parse the received source, never a typewriter-truncated HTML string.\n const sourceSegments = useMemo(() => {\n const segments = mergeNonSandboxSegments(\n splitContentSegments(sourceContent, true, true, sourceAnalysis)\n );\n if (\n sourceContent !== content &&\n segments.length &&\n (segments[0].type === \"sandbox\" || isImmediateSegment(segments[0]))\n ) {\n // The removed opening quote occupied a prose slot before the wrapper\n // completed. Retain its empty slot so the existing iframe keeps its key.\n return [{ type: \"text\" as const, value: \"\" }, ...segments];\n }\n return segments;\n }, [content, sourceContent, sourceAnalysis]);\n const hasRichSegments = sourceSegments.some(\n (segment) => segment.type === \"sandbox\" || isImmediateSegment(segment)\n );\n const typewriterContent = hasRichSegments\n ? sourceSegments\n .filter(\n (segment) =>\n segment.type !== \"sandbox\" && !isImmediateSegment(segment)\n )\n .map((segment) => segment.value)\n .join(\"\")\n : sourceContent;\n const typewriterTickMs = Math.max(0, typingSpeed);\n const fixedTypewriterContentVersion =\n typewriterPacing === \"fixed\" ? typewriterContent : undefined;\n const [displayContent, setDisplayContent] = useState(() =>\n isTypewriterEnabled ? \"\" : typewriterContent\n );\n const displayContentRef = useRef(displayContent);\n const pendingContentRef = useRef(\"\");\n const contentAwareQueueRef = useRef<ContentAwareTypewriterQueue>({\n tokens: [],\n head: 0,\n trailingGrapheme: \"\",\n });\n const contentAwareBudgetRef = useRef(0);\n const previousTypewriterEnabledRef = useRef(isTypewriterEnabled);\n const previousTypewriterPacingRef = useRef(typewriterPacing);\n const previousSourceContentRef = useRef(typewriterContent);\n const previousReceivedContentRef = useRef(content);\n const hasReportedTypeFinishedRef = useRef(false);\n const [typewriterWakeVersion, setTypewriterWakeVersion] = useState(0);\n\n useEffect(() => {\n const wasTypewriterEnabled = previousTypewriterEnabledRef.current;\n const previousTypewriterPacing = previousTypewriterPacingRef.current;\n const previousSourceContent = previousSourceContentRef.current;\n const wasPending = Boolean(pendingContentRef.current);\n const receivedContentChanged =\n previousReceivedContentRef.current !== content;\n const receivedContentAppended =\n receivedContentChanged &&\n content.startsWith(previousReceivedContentRef.current);\n previousReceivedContentRef.current = content;\n\n previousTypewriterEnabledRef.current = isTypewriterEnabled;\n previousTypewriterPacingRef.current = typewriterPacing;\n previousSourceContentRef.current = typewriterContent;\n\n if (\n receivedContentChanged ||\n isTypewriterEnabled !== wasTypewriterEnabled\n ) {\n hasReportedTypeFinishedRef.current = false;\n }\n\n const clearPendingContent = () => {\n pendingContentRef.current = \"\";\n contentAwareQueueRef.current = {\n tokens: [],\n head: 0,\n trailingGrapheme: \"\",\n };\n contentAwareBudgetRef.current = 0;\n };\n\n const updateDisplayContent = (nextContent: string) => {\n displayContentRef.current = nextContent;\n setDisplayContent(nextContent);\n };\n\n if (!isTypewriterEnabled) {\n clearPendingContent();\n updateDisplayContent(typewriterContent);\n return;\n }\n\n if (!wasTypewriterEnabled) {\n clearPendingContent();\n updateDisplayContent(\"\");\n }\n\n let visibleContent = !wasTypewriterEnabled ? \"\" : displayContentRef.current;\n\n if (!typewriterContent.startsWith(visibleContent)) {\n clearPendingContent();\n if (!receivedContentAppended) {\n updateDisplayContent(typewriterContent);\n if (typewriterPacing === \"content-aware\") {\n contentAwareQueueRef.current = {\n tokens: [],\n head: 0,\n trailingGrapheme: getTrailingTypewriterGrapheme(typewriterContent),\n };\n }\n return;\n }\n // A newly recognized HTML tag can replace a previously literal prefix.\n // Keep the shared prose visible and pace only the newly received prose.\n let sharedLength = 0;\n while (\n sharedLength < visibleContent.length &&\n sharedLength < typewriterContent.length &&\n visibleContent[sharedLength] === typewriterContent[sharedLength]\n ) {\n sharedLength += 1;\n }\n visibleContent = visibleContent.slice(0, sharedLength);\n updateDisplayContent(visibleContent);\n }\n\n let nextPendingContent = typewriterContent.slice(visibleContent.length);\n if (!nextPendingContent) {\n pendingContentRef.current = \"\";\n contentAwareBudgetRef.current = 0;\n contentAwareQueueRef.current =\n typewriterPacing === \"content-aware\"\n ? {\n tokens: [],\n head: 0,\n trailingGrapheme: getTrailingTypewriterGrapheme(visibleContent),\n }\n : { tokens: [], head: 0, trailingGrapheme: \"\" };\n return;\n }\n\n if (typewriterPacing === \"content-aware\") {\n const previousPendingContent = previousSourceContent.slice(\n visibleContent.length\n );\n const canAppendToCachedQueue =\n wasTypewriterEnabled &&\n previousTypewriterPacing === \"content-aware\" &&\n typewriterContent.startsWith(previousSourceContent) &&\n pendingContentRef.current === previousPendingContent;\n\n if (canAppendToCachedQueue) {\n const appended = appendContentAwareTypewriterQueue(\n contentAwareQueueRef.current,\n typewriterContent.slice(previousSourceContent.length)\n );\n contentAwareQueueRef.current = appended.queue;\n\n if (appended.immediateChunk) {\n nextPendingContent = nextPendingContent.slice(\n appended.immediateChunk.length\n );\n updateDisplayContent(`${visibleContent}${appended.immediateChunk}`);\n }\n } else {\n const appended = appendContentAwareTypewriterQueue(\n {\n tokens: [],\n head: 0,\n trailingGrapheme: getTrailingTypewriterGrapheme(visibleContent),\n },\n nextPendingContent\n );\n contentAwareQueueRef.current = appended.queue;\n\n if (appended.immediateChunk) {\n nextPendingContent = nextPendingContent.slice(\n appended.immediateChunk.length\n );\n updateDisplayContent(`${visibleContent}${appended.immediateChunk}`);\n }\n\n contentAwareBudgetRef.current = 0;\n }\n } else {\n contentAwareQueueRef.current = {\n tokens: [],\n head: 0,\n trailingGrapheme: \"\",\n };\n contentAwareBudgetRef.current = 0;\n }\n\n pendingContentRef.current = nextPendingContent;\n\n if (!wasPending && nextPendingContent) {\n setTypewriterWakeVersion((version) => version + 1);\n }\n }, [content, typewriterContent, isTypewriterEnabled, typewriterPacing]);\n\n useEffect(() => {\n if (!isTypewriterEnabled) {\n return;\n }\n\n if (\n hasReportedTypeFinishedRef.current ||\n pendingContentRef.current ||\n displayContent !== typewriterContent\n ) {\n return;\n }\n\n hasReportedTypeFinishedRef.current = true;\n onTypeFinished?.();\n }, [\n content,\n typewriterContent,\n displayContent,\n isTypewriterEnabled,\n onTypeFinished,\n ]);\n\n useEffect(() => {\n if (!isTypewriterEnabled || !pendingContentRef.current) {\n return undefined;\n }\n\n const typewriterTimer = window.setTimeout(() => {\n if (!pendingContentRef.current) {\n return;\n }\n\n let chunk = \"\";\n\n if (typewriterPacing === \"content-aware\") {\n const result = consumeContentAwareTypewriterQueue(\n contentAwareQueueRef.current,\n contentAwareBudgetRef.current + CONTENT_AWARE_TYPEWRITER_TICK_BUDGET\n );\n\n chunk = result.chunk;\n contentAwareQueueRef.current = result.queue;\n\n if (isContentAwareTypewriterQueueEmpty(result.queue)) {\n contentAwareBudgetRef.current = 0;\n } else {\n contentAwareBudgetRef.current = result.remainingBudget;\n }\n } else {\n const fixedChunk = splitTextByCharacterChunk(\n pendingContentRef.current,\n FIXED_TYPEWRITER_CHUNK_SIZE\n );\n chunk = fixedChunk.chunk;\n }\n\n if (!chunk) {\n return;\n }\n\n pendingContentRef.current = pendingContentRef.current.slice(chunk.length);\n if (!pendingContentRef.current) {\n contentAwareQueueRef.current =\n typewriterPacing === \"content-aware\"\n ? {\n tokens: [],\n head: 0,\n trailingGrapheme: contentAwareQueueRef.current.trailingGrapheme,\n }\n : { tokens: [], head: 0, trailingGrapheme: \"\" };\n contentAwareBudgetRef.current = 0;\n }\n\n const nextDisplayContent = `${displayContentRef.current}${chunk}`;\n displayContentRef.current = nextDisplayContent;\n setDisplayContent(nextDisplayContent);\n }, typewriterTickMs);\n\n return () => window.clearTimeout(typewriterTimer);\n }, [\n displayContent,\n fixedTypewriterContentVersion,\n isTypewriterEnabled,\n typewriterPacing,\n typewriterTickMs,\n typewriterWakeVersion,\n ]);\n\n const mergedRenderSegments = useMemo(() => {\n let textOffset = 0;\n return sourceSegments.map((segment) => {\n if (!isTypewriterEnabled) return segment;\n if (segment.type === \"sandbox\" || isImmediateSegment(segment)) {\n // HTML skips the prose budget only after earlier prose has caught up.\n // Retain its source slot so later updates keep the same render key.\n return displayContent.length >= textOffset\n ? segment\n : { ...segment, value: \"\" };\n }\n const value = displayContent.slice(\n textOffset,\n textOffset + segment.value.length\n );\n textOffset += segment.value.length;\n // Keep empty prose slots so an existing sandbox never changes its key.\n return { ...segment, value };\n });\n }, [sourceSegments, displayContent, isTypewriterEnabled]);\n const typewriterState = useMemo<ContentRenderTypewriterState>(\n () => ({\n isTypewriterEnabled,\n isTyping: isTypewriterEnabled && displayContent !== typewriterContent,\n isComplete: displayContent === typewriterContent,\n renderedLength:\n content.length -\n sourceSegments.reduce(\n (remaining, segment, index) =>\n remaining +\n segment.value.length -\n mergedRenderSegments[index].value.length,\n 0\n ),\n totalLength: content.length,\n }),\n [\n content,\n typewriterContent,\n displayContent,\n isTypewriterEnabled,\n sourceSegments,\n mergedRenderSegments,\n ]\n );\n\n useEffect(() => {\n onTypewriterStateChange?.(typewriterState);\n }, [onTypewriterStateChange, typewriterState]);\n const sourceSegmentOffsets = useMemo(() => {\n let offset = 0;\n return sourceSegments.map((segment) => {\n const start = offset;\n offset += segment.value.length;\n return start;\n });\n }, [sourceSegments]);\n const sourceInlineCodeRanges = useMemo(\n () =>\n isTypewriterEnabled\n ? sourceSegments.map((segment) =>\n segment.type === \"sandbox\" || isImmediateSegment(segment)\n ? []\n : segment.value === sourceContent\n ? sourceAnalysis.inline\n : getInlineCodeRanges(segment.value)\n )\n : [],\n [isTypewriterEnabled, sourceSegments, sourceContent, sourceAnalysis]\n );\n const safeRichMarkdownContent = useMemo(\n () =>\n hasRichSegments\n ? mergedRenderSegments.map((segment, index) =>\n segment.type === \"sandbox\" || isImmediateSegment(segment)\n ? segment.value\n : isTypewriterEnabled\n ? protectTypedMarkdownPrefix(\n segment.value,\n sourceSegments[index].value,\n sourceInlineCodeRanges[index] ?? [],\n sourceAnalysis.metadata,\n sourceSegmentOffsets[index]\n )\n : escapeTypedMarkdownMetadata(\n segment.value,\n sourceAnalysis.metadata,\n sourceSegmentOffsets[index]\n )\n )\n : [],\n [\n hasRichSegments,\n isTypewriterEnabled,\n mergedRenderSegments,\n sourceInlineCodeRanges,\n sourceSegments,\n sourceAnalysis.metadata,\n sourceSegmentOffsets,\n ]\n );\n const richRenderRuns = useMemo(() => {\n const runs: Array<{\n indices: number[];\n sandbox: boolean;\n plan?: ReturnType<typeof createVideoMarkdownRunPlan>;\n }> = [];\n sourceSegments.forEach((segment, index) => {\n const previous = runs.at(-1);\n if (segment.type !== \"sandbox\" && previous && !previous.sandbox) {\n previous.indices.push(index);\n } else {\n runs.push({ indices: [index], sandbox: segment.type === \"sandbox\" });\n }\n });\n for (const run of runs) {\n if (\n !run.sandbox &&\n run.indices.some((index) => isImmediateSegment(sourceSegments[index]))\n ) {\n const segments = run.indices.map((index) => sourceSegments[index]);\n const fullSource = segments.map((segment) => segment.value).join(\"\");\n run.plan = createVideoMarkdownRunPlan(\n segments,\n fullSource === sourceContent ? sourceAnalysis : undefined\n );\n }\n }\n return runs;\n }, [sourceSegments, sourceContent, sourceAnalysis]);\n const renderContent = hasRichSegments\n ? mergedRenderSegments.map((segment) => segment.value).join(\"\")\n : isTypewriterEnabled\n ? displayContent\n : sourceContent;\n const normalizedContent = useMemo(\n () => (customRenderBar ? normalizeInlineHtml(renderContent) : \"\"),\n [customRenderBar, renderContent]\n );\n\n const safeMarkdownContent = useMemo(\n () =>\n hasRichSegments\n ? \"\"\n : normalizeInlineHtml(\n isTypewriterEnabled\n ? protectTypedMarkdownPrefix(\n renderContent,\n sourceContent,\n sourceInlineCodeRanges[0] ?? [],\n sourceAnalysis.metadata\n )\n : escapeTypedMarkdownMetadata(\n renderContent,\n sourceAnalysis.metadata\n )\n ),\n [\n sourceContent,\n hasRichSegments,\n isTypewriterEnabled,\n renderContent,\n sourceInlineCodeRanges,\n sourceAnalysis.metadata,\n ]\n );\n\n const interactionDefaults = useMemo(\n () =>\n getInteractionDefaultValues(\n renderContent,\n userInput,\n interactionDefaultValueOptions\n ),\n [interactionDefaultValueOptions, renderContent, userInput]\n );\n\n const resolvedDefaultButtonText =\n (defaultButtonText ? trimVariablePadding(defaultButtonText) : undefined) ||\n interactionDefaults.buttonText;\n const resolvedDefaultInputText =\n defaultInputText?.trim() || interactionDefaults.inputText;\n const fallbackSelectedValues = useMemo(\n () =>\n userInput\n ? userInput\n .split(\",\")\n .map((value) => trimVariablePadding(value))\n .filter(Boolean)\n : undefined,\n [userInput]\n );\n const resolvedDefaultSelectedValues = defaultSelectedValues?.length\n ? defaultSelectedValues\n : interactionDefaults.selectedValues || fallbackSelectedValues;\n const stableDefaultSelectedValues = useStableStringArray(\n resolvedDefaultSelectedValues\n );\n const componentRuntimeValuesRef = useRef<MarkdownComponentRuntimeValues>({\n direction,\n language,\n mermaidMessages,\n beforeSend,\n locale,\n onClickCustomButtonAfterContent,\n onSend,\n readonly,\n renderContent,\n resolvedConfirmButtonText,\n resolvedCopiedButtonText,\n resolvedCopyButtonText,\n resolvedDefaultButtonText,\n resolvedDefaultInputText,\n resolvedDefaultSelectedValues: stableDefaultSelectedValues,\n });\n\n componentRuntimeValuesRef.current = {\n direction,\n language,\n mermaidMessages,\n beforeSend,\n locale,\n onClickCustomButtonAfterContent,\n onSend,\n readonly,\n renderContent,\n resolvedConfirmButtonText,\n resolvedCopiedButtonText,\n resolvedCopyButtonText,\n resolvedDefaultButtonText,\n resolvedDefaultInputText,\n resolvedDefaultSelectedValues: stableDefaultSelectedValues,\n };\n\n const components = useMemo<CustomComponents>(\n () => ({\n \"custom-button-after-content\": ({\n children,\n }: {\n children: React.ReactNode;\n }) => {\n return (\n <button\n className=\"content-render-custom-button-after-content\"\n onClick={\n componentRuntimeValuesRef.current.onClickCustomButtonAfterContent\n }\n >\n <span className=\"content-render-custom-button-after-content-inner\">\n {children}\n </span>\n </button>\n );\n },\n \"custom-variable\": (props) => (\n <CustomButtonInputVariable\n {...props}\n readonly={componentRuntimeValuesRef.current.readonly}\n defaultButtonText={\n componentRuntimeValuesRef.current.resolvedDefaultButtonText\n }\n defaultInputText={\n componentRuntimeValuesRef.current.resolvedDefaultInputText\n }\n defaultSelectedValues={\n componentRuntimeValuesRef.current.resolvedDefaultSelectedValues\n }\n onSend={componentRuntimeValuesRef.current.onSend}\n beforeSend={componentRuntimeValuesRef.current.beforeSend}\n locale={componentRuntimeValuesRef.current.locale}\n dir={componentRuntimeValuesRef.current.direction}\n lang={componentRuntimeValuesRef.current.language}\n confirmButtonText={\n componentRuntimeValuesRef.current.resolvedConfirmButtonText\n }\n />\n ),\n code: MarkdownCode,\n table: ({ ...props }) => (\n <div className=\"content-render-table-container\">\n <table className=\"content-render-table\" {...props} />\n </div>\n ),\n th: ({ ...props }) => <th className=\"content-render-th\" {...props} />,\n td: ({ ...props }) => <td className=\"content-render-td\" {...props} />,\n tr: ({ ...props }) => <tr className=\"content-render-tr\" {...props} />,\n li: ({ node, ...props }) => {\n const className: unknown = node?.properties?.className;\n const hasTaskListItem =\n (typeof className === \"string\" &&\n className.includes(\"task-list-item\")) ||\n (Array.isArray(className) && className.includes(\"task-list-item\"));\n if (hasTaskListItem) {\n return <li className=\"content-render-task-list-item\" {...props} />;\n }\n return <li {...props} />;\n },\n ol: ({ ...props }) => <ol className=\"content-render-ol\" {...props} />,\n ul: ({ ...props }) => <ul className=\"content-render-ul\" {...props} />,\n input: ({ ...props }) => {\n if (props.type === \"checkbox\") {\n return (\n <input\n type=\"checkbox\"\n className=\"content-render-checkbox\"\n disabled\n {...props}\n />\n );\n }\n return <input {...props} />;\n },\n a: ({ children, ...props }) => (\n <a target=\"_blank\" rel=\"noopener noreferrer\" {...props}>\n {children}\n </a>\n ),\n pre: (props) => (\n <CodeBlock\n {...props}\n copyButtonText={\n componentRuntimeValuesRef.current.resolvedCopyButtonText\n }\n copiedButtonText={\n componentRuntimeValuesRef.current.resolvedCopiedButtonText\n }\n />\n ),\n }),\n []\n );\n\n const segments = useMemo(\n () => parseMarkdownSegments(safeMarkdownContent),\n [safeMarkdownContent]\n );\n\n const renderMarkdownSegments = (raw: string, keyPrefix: string) => {\n const normalized = normalizeInlineHtml(raw);\n const parsed = parseMarkdownSegments(normalized);\n\n return parsed.map((seg, index) => {\n const key = `${keyPrefix}-${seg.type}-${index}`;\n\n if (seg.type === \"text\") {\n return (\n <MarkdownComponentRuntimeContext.Provider\n key={key}\n value={componentRuntimeValuesRef}\n >\n <MarkdownRenderer\n locale={locale}\n components={components}\n content={seg.value}\n />\n </MarkdownComponentRuntimeContext.Provider>\n );\n }\n\n if (seg.type === \"mermaid\") {\n return (\n <MermaidChart\n key={key}\n chart={seg.value}\n frozen={!seg.complete}\n messages={mermaidMessages}\n />\n );\n }\n\n if (seg.type === \"svg\") {\n return <SvgBlockInShadow key={key} svg={seg.value} />;\n }\n\n return null;\n });\n };\n\n const customBar = customRenderBar ? (\n <div className=\"content-render-custom-bar\">\n {React.createElement(customRenderBar, {\n content,\n displayContent: normalizedContent,\n onSend,\n })}\n </div>\n ) : null;\n\n if (hasRichSegments) {\n return (\n <div\n className=\"content-render markdown-body\"\n dir={direction}\n lang={language}\n >\n {richRenderRuns.map((run) => {\n const idx = run.indices[0];\n const segment = mergedRenderSegments[idx];\n if (run.sandbox)\n return segment.type === \"sandbox\" &&\n segment.value &&\n !segment.pending ? (\n <IframeSandbox\n key={`sandbox-${idx}`}\n hideFullScreen\n type=\"sandbox\"\n content={segment.value}\n className=\"content-render-iframe\"\n locale={locale}\n dir={direction}\n lang={language}\n loadingText={sandboxLoadingText}\n styleLoadingText={sandboxStyleLoadingText}\n scriptLoadingText={sandboxScriptLoadingText}\n disableLoadingOverlay={disableSandboxLoadingOverlay}\n fullScreenButtonText={resolvedSandboxFullscreenButtonText}\n exitFullScreenButtonText={\n resolvedSandboxExitFullscreenButtonText\n }\n mode={sandboxMode}\n />\n ) : null;\n if (run.plan)\n return (\n <MarkdownComponentRuntimeContext.Provider\n key={`md-${idx}`}\n value={componentRuntimeValuesRef}\n >\n <StableVideoMarkdownRenderer\n locale={locale}\n components={components}\n plan={run.plan}\n renderedSegments={run.indices.map(\n (index) => mergedRenderSegments[index]\n )}\n />\n </MarkdownComponentRuntimeContext.Provider>\n );\n return run.indices.map((index) => (\n <React.Fragment key={`md-${index}`}>\n {mergedRenderSegments[index].type === \"markdown\" &&\n mergedRenderSegments[index].pending\n ? null\n : renderMarkdownSegments(\n safeRichMarkdownContent[index],\n `md-${index}`\n )}\n </React.Fragment>\n ));\n })}\n {customBar}\n </div>\n );\n }\n\n return (\n <div\n className=\"content-render markdown-body\"\n dir={direction}\n lang={language}\n >\n {segments.map((seg, index) => {\n if (seg.type === \"text\") {\n return (\n <MarkdownComponentRuntimeContext.Provider\n key={index}\n value={componentRuntimeValuesRef}\n >\n <MarkdownRenderer\n locale={locale}\n components={components}\n content={seg.value}\n />\n </MarkdownComponentRuntimeContext.Provider>\n );\n }\n\n if (seg.type === \"mermaid\") {\n return (\n <MermaidChart\n key={index}\n chart={seg.value}\n frozen={!seg.complete}\n messages={mermaidMessages}\n />\n );\n }\n\n if (seg.type === \"svg\") {\n return <SvgBlockInShadow key={index} svg={seg.value} />;\n }\n })}\n\n {customBar}\n </div>\n );\n};\n\nexport default ContentRender;\n"],"names":["FIXED_TYPEWRITER_CHUNK_SIZE","SvgBlockInShadow","svg","inline","hostRef","useRef","Wrapper","useEffect","host","shadowRoot","styleId","styleEl","node","template","cleanedSvg","stripSvgTextLineBreaks","hasResponsiveSvg","hasFixedSvg","svgEl","viewBox","dimensions","value","viewBoxWidth","viewBoxHeight","widthAttr","heightAttr","isRelativeLength","normalized","toNumericLength","parsed","isWidthRelative","isHeightRelative","widthMissing","heightMissing","numericWidth","numericHeight","hostResponsive","jsx","MarkdownComponentRuntimeContext","React","MarkdownCode","props","receivedTree","codeProps","runtimeValuesRef","isInCodeBlock","CodeBlockContext","className","children","rest","chartContent","complete","mermaidBlockIsComplete","MermaidChart","sourceRehypePlugins","preserveCustomVariableProperties","rehypeRaw","sanitizeInvalidTagName","restoreCustomVariableProperties","formattingRehypePlugins","rehypeHighlight","highlightLanguages","subsetLanguages","rehypeKatex","rehypePlugins","MarkdownRenderer","markdownContent","components","locale","texts","getContentRenderLocaleTexts","ReactMarkdown","remarkPlugins","referenceIndex","rereferenceIndex","reference","usePreparedTree","StableVideoMarkdownRenderer","plan","renderedSegments","prepared","useMemo","sourceProcessor","unified","remarkRehype","formattingProcessor","tree","cloneVideoMarkdownSourceTree","prepareVideoMarkdownRun","projected","projectVideoMarkdownRun","originalComponents","wrappers","stableComponents","tags","collect","result","tag","Component","state","getVideoMarkdownNodeState","Fragment","Original","visibleProps","preparedPlugins","isImmediateSegment","segment","mergeNonSandboxSegments","segments","merged","last","closeTypedInlineCode","visible","source","ranges","range","start","end","delimiter","closingStart","protectTypedMarkdownPrefix","inlineCodeRanges","metadataRanges","sourceOffset","closed","escapeTypedMarkdownMetadata","splitTextByCharacterChunk","chunkSize","safeChunkSize","characters","areStringArraysEqual","left","right","index","useStableStringArray","values","valuesRef","ContentRender","content","contentType","lang","dir","customRenderBar","onSend","typingSpeed","enableTypewriter","typewriterPacing","onTypeFinished","onTypewriterStateChange","userInput","interactionDefaultValueOptions","defaultButtonText","defaultInputText","defaultSelectedValues","readonly","confirmButtonText","copyButtonText","copiedButtonText","sandboxLoadingText","sandboxStyleLoadingText","sandboxScriptLoadingText","disableSandboxLoadingOverlay","sandboxFullscreenButtonText","sandboxExitFullscreenButtonText","sandboxMode","onClickCustomButtonAfterContent","beforeSend","localeTexts","mermaidMessages","direction","getMarkdownFlowDirection","language","getMarkdownFlowLanguage","resolvedConfirmButtonText","resolvedCopyButtonText","resolvedCopiedButtonText","resolvedSandboxFullscreenButtonText","resolvedSandboxExitFullscreenButtonText","isTypewriterEnabled","sourceContent","normalizeWrappedSandboxContent","sourceAnalysis","getMarkdownSourceAnalysis","sourceSegments","splitContentSegments","hasRichSegments","typewriterContent","typewriterTickMs","fixedTypewriterContentVersion","displayContent","setDisplayContent","useState","displayContentRef","pendingContentRef","contentAwareQueueRef","contentAwareBudgetRef","previousTypewriterEnabledRef","previousTypewriterPacingRef","previousSourceContentRef","previousReceivedContentRef","hasReportedTypeFinishedRef","typewriterWakeVersion","setTypewriterWakeVersion","wasTypewriterEnabled","previousTypewriterPacing","previousSourceContent","wasPending","receivedContentChanged","receivedContentAppended","clearPendingContent","updateDisplayContent","nextContent","visibleContent","getTrailingTypewriterGrapheme","sharedLength","nextPendingContent","previousPendingContent","appended","appendContentAwareTypewriterQueue","version","typewriterTimer","chunk","consumeContentAwareTypewriterQueue","CONTENT_AWARE_TYPEWRITER_TICK_BUDGET","isContentAwareTypewriterQueueEmpty","nextDisplayContent","mergedRenderSegments","textOffset","typewriterState","remaining","sourceSegmentOffsets","offset","sourceInlineCodeRanges","getInlineCodeRanges","safeRichMarkdownContent","richRenderRuns","runs","previous","run","fullSource","createVideoMarkdownRunPlan","renderContent","normalizedContent","normalizeInlineHtml","safeMarkdownContent","interactionDefaults","getInteractionDefaultValues","resolvedDefaultButtonText","trimVariablePadding","resolvedDefaultInputText","fallbackSelectedValues","resolvedDefaultSelectedValues","stableDefaultSelectedValues","componentRuntimeValuesRef","CustomButtonInputVariable","CodeBlock","parseMarkdownSegments","renderMarkdownSegments","raw","keyPrefix","seg","key","customBar","jsxs","idx","IframeSandbox"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4EA,MAAMA,KAA8B,GA4E9BC,KAAgE,CAAC;AAAA,EACrE,KAAAC;AAAA,EACA,QAAAC,IAAS;AACX,MAAM;AACJ,QAAMC,IAAUC,EAA2B,IAAI,GACzCC,IAAUH,IAAS,SAAS;AAElC,SAAAI,GAAU,MAAM;AACd,UAAMC,IAAOJ,EAAQ;AACrB,QAAI,CAACI,EAAM;AACX,UAAMC,IAAaD,EAAK,cAAcA,EAAK,aAAa,EAAE,MAAM,QAAQ,GAClEE,IAAU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CACD;AAAA,QACH,CAAC;AAAA,QACAiI;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,IAML,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACV,KAAK9F;AAAA,MACL,MAAME;AAAA,MAEL,UAAA;AAAA,QAAA/D,GAAS,IAAI,CAACwJ,GAAK/H,MAAU;AAC5B,cAAI+H,EAAI,SAAS;AACf,mBACE,gBAAA/N;AAAA,cAACC,GAAgC;AAAA,cAAhC;AAAA,gBAEC,OAAOuN;AAAA,gBAEP,UAAA,gBAAAxN;AAAA,kBAAC4B;AAAA,kBAAA;AAAA,oBACC,QAAAG;AAAA,oBACA,YAAAD;AAAA,oBACA,SAASiM,EAAI;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACf;AAAA,cAPK/H;AAAA,YAAA;AAYX,cAAI+H,EAAI,SAAS;AACf,mBACE,gBAAA/N;AAAA,cAACgB;AAAA,cAAA;AAAA,gBAEC,OAAO+M,EAAI;AAAA,gBACX,QAAQ,CAACA,EAAI;AAAA,gBACb,UAAU5F;AAAA,cAAA;AAAA,cAHLnC;AAAA,YAAA;AAQX,cAAI+H,EAAI,SAAS;AACf,mBAAO,gBAAA/N,EAACpC,IAAA,EAA6B,KAAKmQ,EAAI,SAAhB/H,CAAuB;AAAA,QAEzD,CAAC;AAAA,QAEAiI;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -4,7 +4,7 @@ import { createRoot as kt } from "react-dom/client";
|
|
|
4
4
|
import At from "./SandboxApp.es.js";
|
|
5
5
|
import { normalizeContentViewportMinHeight as Ft } from "./utils/content-viewport-min-height.es.js";
|
|
6
6
|
import _t from "./ContentRender.es.js";
|
|
7
|
-
import {
|
|
7
|
+
import { EMPTY_ROOT_HEIGHT_META as Dt, inspectViewportHeightFromHtmlRootString as tt, parseExplicitHeight as nt, inspectViewportHeightFromNodeChain as It, resolveExplicitHeightFromNodeChain as Ot } from "./utils/iframe-viewport-height.es.js";
|
|
8
8
|
import { SANDBOX_INTERACTION_MESSAGE_TYPE as Nt, SANDBOX_INTERACTION_MESSAGE_SOURCE as Vt } from "../../lib/sandboxInteraction.es.js";
|
|
9
9
|
import { injectScalingSystem as Bt } from "./utils/iframe-scaling.es.js";
|
|
10
10
|
import { getMarkdownFlowDirection as Wt, getMarkdownFlowLanguage as zt } from "../../lib/locale.es.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MermaidChart.cjs","sources":["../../../../src/components/ContentRender/plugins/MermaidChart.tsx"],"sourcesContent":["import React, { useEffect, useState } from \"react\";\nimport mermaid, { type ParseResult } from \"mermaid\";\nimport { CJK_SAFE_SANS_FONT_FAMILY } from \"../cjkFontFamily\";\n\nexport interface MermaidChartProps {\n chart: string;\n messages?: {\n emptyChart?: string;\n loading?: string;\n error?: string;\n badge?: string;\n };\n frozen?: boolean;\n}\n\nconst DEFAULT_MESSAGES = {\n emptyChart: \"Empty chart content\",\n loading: \"Loading Mermaid chart...\",\n error: \"Unable to display the Mermaid chart\",\n badge: \"mermaid\",\n} as const;\n\nconst preprocessChart = (raw: string) =>\n raw.trim().replace(/^_streaming\\s*/i, \"\");\n\nlet renderSequence = 0;\n\nconst createMeasurementContainer = (parsed: ParseResult | false) => {\n const container = document.createElement(\"div\");\n container.className = \"content-render-mermaid-measurement\";\n let width = document.documentElement.clientWidth || window.innerWidth;\n if (parsed && parsed.diagramType === \"xychart\") {\n // XY charts measure text after setting their fixed SVG viewBox. Keep that\n // SVG at its natural size while measuring, even on a narrow screen.\n width = Math.max(\n width,\n parsed.config.xyChart?.width ??\n mermaid.mermaidAPI.defaultConfig.xyChart!.width!\n );\n }\n Object.assign(container.style, {\n position: \"fixed\",\n top: \"0\",\n left: \"0\",\n width: `${width}px`,\n display: \"block\",\n visibility: \"hidden\",\n pointerEvents: \"none\",\n margin: \"0\",\n padding: \"0\",\n border: \"0\",\n transformOrigin: \"0 0\",\n });\n container.setAttribute(\"aria-hidden\", \"true\");\n document.body.appendChild(container);\n\n // Mermaid uses screen-space getBoundingClientRect values as SVG units.\n // Cancel inherited scaling locally without changing the consumer's body.\n const probe = document.createElement(\"div\");\n Object.assign(probe.style, {\n width: \"100px\",\n height: \"100px\",\n padding: \"0\",\n border: \"0\",\n margin: \"0\",\n boxSizing: \"border-box\",\n });\n container.appendChild(probe);\n const bounds = probe.getBoundingClientRect();\n if (bounds.width > 0 && bounds.height > 0) {\n container.style.transform = `scale(${100 / bounds.width}, ${100 / bounds.height})`;\n }\n probe.remove();\n return container;\n};\n\nconst fitXYViewBox = (svg: string, container: HTMLElement) => {\n container.innerHTML = svg;\n const element = container.querySelector(\"svg\");\n if (!element?.hasAttribute(\"viewBox\")) return svg;\n const viewBox = element.viewBox.baseVal;\n const screenToSvg = element.getScreenCTM()?.inverse();\n if (!screenToSvg) return svg;\n // Some fonts extend above the top tick's middle-aligned baseline. Include\n // their actual glyph bounds instead of clipping them to the fixed XY canvas.\n let left = viewBox.x;\n let top = viewBox.y;\n let right = viewBox.x + viewBox.width;\n let bottom = viewBox.y + viewBox.height;\n const labels = element.querySelectorAll<SVGGraphicsElement>(\n \".left-axis .label, .right-axis .label, .top-axis .label, .bottom-axis .label\"\n );\n for (const label of labels) {\n const transform = label.getScreenCTM();\n if (!transform) continue;\n const matrix = screenToSvg.multiply(transform);\n const bounds = label.getBBox();\n for (const x of [bounds.x, bounds.x + bounds.width]) {\n for (const y of [bounds.y, bounds.y + bounds.height]) {\n const point = new DOMPoint(x, y).matrixTransform(matrix);\n if (!Number.isFinite(point.x) || !Number.isFinite(point.y)) continue;\n left = Math.min(left, Math.floor(point.x));\n top = Math.min(top, Math.floor(point.y));\n right = Math.max(right, Math.ceil(point.x));\n bottom = Math.max(bottom, Math.ceil(point.y));\n }\n }\n }\n if (\n left === viewBox.x &&\n top === viewBox.y &&\n right === viewBox.x + viewBox.width &&\n bottom === viewBox.y + viewBox.height\n ) {\n return svg;\n }\n element.setAttribute(\n \"viewBox\",\n `${left} ${top} ${right - left} ${bottom - top}`\n );\n return element.outerHTML;\n};\n\nconst MermaidChart: React.FC<MermaidChartProps> = ({\n chart,\n messages,\n frozen,\n}) => {\n const [svg, setSvg] = useState(\"\");\n const [error, setError] = useState(\"\");\n const [hasRendered, setHasRendered] = useState(false);\n\n const renderChart = async () => {\n try {\n const cleaned = preprocessChart(chart);\n\n if (!cleaned) {\n setError(\"\");\n setSvg(\"\");\n return;\n }\n\n // Initialize Mermaid with an explicit CJK-safe font stack.\n // Using a concrete stack avoids clipping caused by `inherit` resolving to\n // Storybook's default font during off-screen rendering.\n mermaid.initialize({\n startOnLoad: false,\n theme: \"default\",\n securityLevel: \"loose\",\n fontFamily: CJK_SAFE_SANS_FONT_FAMILY,\n themeVariables: {\n fontFamily: CJK_SAFE_SANS_FONT_FAMILY,\n },\n });\n\n // use mermaid.parse to check for errors\n let parsed: ParseResult | false;\n try {\n parsed = await mermaid.parse(cleaned);\n } catch (parseErr) {\n const parseErrorMsg = String(parseErr).toLowerCase();\n setError(parseErrorMsg);\n setSvg(\"\");\n // once render success, setHasRendered flag\n setHasRendered(true);\n return;\n }\n\n const id = `mermaid-${Date.now()}-${++renderSequence}`;\n\n const container = createMeasurementContainer(parsed);\n try {\n const { svg: renderedSvg } = await mermaid.render(\n id,\n cleaned,\n container\n );\n let displaySvg = renderedSvg;\n if (parsed && parsed.diagramType === \"xychart\") {\n try {\n displaySvg = fitXYViewBox(renderedSvg, container);\n } catch {\n // Geometry fitting is optional; preserve a successful diagram if\n // the browser cannot measure its glyphs.\n displaySvg = renderedSvg;\n }\n }\n setSvg(displaySvg);\n setError(\"\");\n } finally {\n container.remove();\n }\n } catch (err) {\n const errorMsg = String(err).toLowerCase();\n setError(errorMsg);\n setSvg(\"\");\n }\n };\n\n useEffect(() => {\n if (frozen && hasRendered) return; // 核心:被冻结就不渲染\n renderChart();\n }, [chart, frozen]);\n\n const cleanedChart = preprocessChart(chart);\n if (error || !cleanedChart) {\n const displayChart = cleanedChart || chart.trim();\n return (\n <div\n className=\"my-4 border border-gray-200 rounded-lg bg-gray-50\"\n data-mermaid-error={error || undefined}\n >\n <div className=\"px-4 py-3 bg-gray-100 border-b border-gray-200 flex items-center gap-2\">\n <span className=\"text-yellow-600\">⚠️</span>\n <span\n dir=\"auto\"\n className=\"text-sm text-yellow-700 font-medium whitespace-pre-wrap\"\n >\n {cleanedChart\n ? (messages?.error ?? DEFAULT_MESSAGES.error)\n : (messages?.emptyChart ?? DEFAULT_MESSAGES.emptyChart)}\n </span>\n </div>\n <div className=\"relative\">\n <pre\n dir=\"ltr\"\n className=\"p-4 text-sm font-mono text-yellow-800 text-start [unicode-bidi:isolate]\"\n >\n <code>{displayChart}</code>\n </pre>\n <div className=\"absolute top-2 right-2 px-2 py-1 text-xs text-yellow-700 bg-white/90 rounded border border-gray-200\">\n {messages?.badge ?? DEFAULT_MESSAGES.badge}\n </div>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"my-4 text-center overflow-auto content-render-mermaid\">\n {svg ? (\n <div\n className=\"content-render-mermaid-inner\"\n dangerouslySetInnerHTML={{ __html: svg }}\n />\n ) : (\n <div className=\"py-8 text-gray-500 italic\">\n {messages?.loading ?? DEFAULT_MESSAGES.loading}\n </div>\n )}\n </div>\n );\n};\n\nexport default React.memo(MermaidChart, (prev, next) => {\n return (\n prev.chart === next.chart &&\n prev.frozen === next.frozen &&\n prev.messages?.emptyChart === next.messages?.emptyChart &&\n prev.messages?.loading === next.messages?.loading &&\n prev.messages?.error === next.messages?.error &&\n prev.messages?.badge === next.messages?.badge\n );\n});\n"],"names":["DEFAULT_MESSAGES","preprocessChart","raw","renderSequence","createMeasurementContainer","parsed","container","width","mermaid","probe","bounds","fitXYViewBox","svg","element","viewBox","screenToSvg","left","top","right","bottom","labels","label","transform","matrix","y","point","MermaidChart","chart","messages","frozen","setSvg","useState","error","setError","hasRendered","setHasRendered","renderChart","cleaned","CJK_SAFE_SANS_FONT_FAMILY","parseErr","parseErrorMsg","id","renderedSvg","displaySvg","err","errorMsg","useEffect","cleanedChart","displayChart","jsxs","jsx","MermaidChart$1","React","prev","next"],"mappings":"uQAeMA,EAAmB,CACvB,WAAY,sBACZ,QAAS,2BACT,MAAO,sCACP,MAAO,SACT,EAEMC,EAAmBC,GACvBA,EAAI,OAAO,QAAQ,kBAAmB,EAAE,EAE1C,IAAIC,EAAiB,EAErB,MAAMC,EAA8BC,GAAgC,CAClE,MAAMC,EAAY,SAAS,cAAc,KAAK,EAC9CA,EAAU,UAAY,qCACtB,IAAIC,EAAQ,SAAS,gBAAgB,aAAe,OAAO,WACvDF,GAAUA,EAAO,cAAgB,YAGnCE,EAAQ,KAAK,IACXA,EACAF,EAAO,OAAO,SAAS,OACrBG,EAAAA,QAAQ,WAAW,cAAc,QAAS,KAAA,GAGhD,OAAO,OAAOF,EAAU,MAAO,CAC7B,SAAU,QACV,IAAK,IACL,KAAM,IACN,MAAO,GAAGC,CAAK,KACf,QAAS,QACT,WAAY,SACZ,cAAe,OACf,OAAQ,IACR,QAAS,IACT,OAAQ,IACR,gBAAiB,KAAA,CAClB,EACDD,EAAU,aAAa,cAAe,MAAM,EAC5C,SAAS,KAAK,YAAYA,CAAS,EAInC,MAAMG,EAAQ,SAAS,cAAc,KAAK,EAC1C,OAAO,OAAOA,EAAM,MAAO,CACzB,MAAO,QACP,OAAQ,QACR,QAAS,IACT,OAAQ,IACR,OAAQ,IACR,UAAW,YAAA,CACZ,EACDH,EAAU,YAAYG,CAAK,EAC3B,MAAMC,EAASD,EAAM,sBAAA,EACrB,OAAIC,EAAO,MAAQ,GAAKA,EAAO,OAAS,IACtCJ,EAAU,MAAM,UAAY,SAAS,IAAMI,EAAO,KAAK,KAAK,IAAMA,EAAO,MAAM,KAEjFD,EAAM,OAAA,EACCH,CACT,EAEMK,EAAe,CAACC,EAAaN,IAA2B,CAC5DA,EAAU,UAAYM,EACtB,MAAMC,EAAUP,EAAU,cAAc,KAAK,EAC7C,GAAI,CAACO,GAAS,aAAa,SAA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EAAK,UAAU,QAAUC,EAAK,UAAU,OACxCD,EAAK,UAAU,QAAUC,EAAK,UAAU,KAE3C"}
|
|
1
|
+
{"version":3,"file":"MermaidChart.cjs","sources":["../../../../src/components/ContentRender/plugins/MermaidChart.tsx"],"sourcesContent":["import React, { useEffect, useState } from \"react\";\nimport mermaid, { type ParseResult } from \"mermaid\";\nimport { CJK_SAFE_SANS_FONT_FAMILY } from \"../cjkFontFamily\";\n\nexport interface MermaidChartProps {\n chart: string;\n messages?: {\n emptyChart?: string;\n loading?: string;\n error?: string;\n badge?: string;\n };\n frozen?: boolean;\n}\n\nconst DEFAULT_MESSAGES = {\n emptyChart: \"Empty chart content\",\n loading: \"Loading Mermaid chart...\",\n error: \"Unable to display the Mermaid chart\",\n badge: \"mermaid\",\n} as const;\n\nconst preprocessChart = (raw: string) =>\n raw.trim().replace(/^_streaming\\s*/i, \"\");\n\nlet renderSequence = 0;\n\nconst createMeasurementContainer = (parsed: ParseResult | false) => {\n const container = document.createElement(\"div\");\n container.className = \"content-render-mermaid-measurement\";\n let width = document.documentElement.clientWidth || window.innerWidth;\n if (parsed && parsed.diagramType === \"xychart\") {\n // XY charts measure text after setting their fixed SVG viewBox. Keep that\n // SVG at its natural size while measuring, even on a narrow screen.\n width = Math.max(\n width,\n parsed.config.xyChart?.width ??\n mermaid.mermaidAPI.defaultConfig.xyChart!.width!\n );\n }\n Object.assign(container.style, {\n position: \"fixed\",\n top: \"0\",\n left: \"0\",\n width: `${width}px`,\n display: \"block\",\n visibility: \"hidden\",\n pointerEvents: \"none\",\n margin: \"0\",\n padding: \"0\",\n border: \"0\",\n transformOrigin: \"0 0\",\n });\n container.setAttribute(\"aria-hidden\", \"true\");\n document.body.appendChild(container);\n\n // Mermaid uses screen-space getBoundingClientRect values as SVG units.\n // Cancel inherited scaling locally without changing the consumer's body.\n const probe = document.createElement(\"div\");\n Object.assign(probe.style, {\n width: \"100px\",\n height: \"100px\",\n padding: \"0\",\n border: \"0\",\n margin: \"0\",\n boxSizing: \"border-box\",\n });\n container.appendChild(probe);\n const bounds = probe.getBoundingClientRect();\n if (bounds.width > 0 && bounds.height > 0) {\n container.style.transform = `scale(${100 / bounds.width}, ${100 / bounds.height})`;\n }\n probe.remove();\n return container;\n};\n\nconst fitXYViewBox = (svg: string, container: HTMLElement) => {\n container.innerHTML = svg;\n const element = container.querySelector(\"svg\");\n if (!element?.hasAttribute(\"viewBox\")) return svg;\n const viewBox = element.viewBox.baseVal;\n const screenToSvg = element.getScreenCTM()?.inverse();\n if (!screenToSvg) return svg;\n // Some fonts extend above the top tick's middle-aligned baseline. Include\n // their actual glyph bounds instead of clipping them to the fixed XY canvas.\n let left = viewBox.x;\n let top = viewBox.y;\n let right = viewBox.x + viewBox.width;\n let bottom = viewBox.y + viewBox.height;\n const labels = element.querySelectorAll<SVGGraphicsElement>(\n \".left-axis .label, .right-axis .label, .top-axis .label, .bottom-axis .label\"\n );\n for (const label of labels) {\n const transform = label.getScreenCTM();\n if (!transform) continue;\n const matrix = screenToSvg.multiply(transform);\n const bounds = label.getBBox();\n for (const x of [bounds.x, bounds.x + bounds.width]) {\n for (const y of [bounds.y, bounds.y + bounds.height]) {\n const point = new DOMPoint(x, y).matrixTransform(matrix);\n if (!Number.isFinite(point.x) || !Number.isFinite(point.y)) continue;\n left = Math.min(left, Math.floor(point.x));\n top = Math.min(top, Math.floor(point.y));\n right = Math.max(right, Math.ceil(point.x));\n bottom = Math.max(bottom, Math.ceil(point.y));\n }\n }\n }\n if (\n left === viewBox.x &&\n top === viewBox.y &&\n right === viewBox.x + viewBox.width &&\n bottom === viewBox.y + viewBox.height\n ) {\n return svg;\n }\n element.setAttribute(\n \"viewBox\",\n `${left} ${top} ${right - left} ${bottom - top}`\n );\n return element.outerHTML;\n};\n\nconst MermaidChart: React.FC<MermaidChartProps> = ({\n chart,\n messages,\n frozen,\n}) => {\n const [svg, setSvg] = useState(\"\");\n const [error, setError] = useState(\"\");\n const [hasRendered, setHasRendered] = useState(false);\n\n const renderChart = async () => {\n try {\n const cleaned = preprocessChart(chart);\n\n if (!cleaned) {\n setError(\"\");\n setSvg(\"\");\n return;\n }\n\n // Initialize Mermaid with an explicit CJK-safe font stack.\n // Using a concrete stack avoids clipping caused by `inherit` resolving to\n // Storybook's default font during off-screen rendering.\n mermaid.initialize({\n startOnLoad: false,\n theme: \"default\",\n securityLevel: \"loose\",\n fontFamily: CJK_SAFE_SANS_FONT_FAMILY,\n themeVariables: {\n fontFamily: CJK_SAFE_SANS_FONT_FAMILY,\n },\n });\n\n // use mermaid.parse to check for errors\n let parsed: ParseResult | false;\n try {\n parsed = await mermaid.parse(cleaned);\n } catch (parseErr) {\n const parseErrorMsg = String(parseErr).toLowerCase();\n setError(parseErrorMsg);\n setSvg(\"\");\n // once render success, setHasRendered flag\n setHasRendered(true);\n return;\n }\n\n const id = `mermaid-${Date.now()}-${++renderSequence}`;\n\n const container = createMeasurementContainer(parsed);\n try {\n const { svg: renderedSvg } = await mermaid.render(\n id,\n cleaned,\n container\n );\n let displaySvg = renderedSvg;\n if (parsed && parsed.diagramType === \"xychart\") {\n try {\n displaySvg = fitXYViewBox(renderedSvg, container);\n } catch {\n // Geometry fitting is optional; preserve a successful diagram if\n // the browser cannot measure its glyphs.\n displaySvg = renderedSvg;\n }\n }\n setSvg(displaySvg);\n setError(\"\");\n } finally {\n container.remove();\n }\n } catch (err) {\n const errorMsg = String(err).toLowerCase();\n setError(errorMsg);\n setSvg(\"\");\n }\n };\n\n useEffect(() => {\n if (frozen && hasRendered) return; // 核心:被冻结就不渲染\n renderChart();\n }, [chart, frozen]);\n\n const cleanedChart = preprocessChart(chart);\n if (error || !cleanedChart) {\n const displayChart = cleanedChart || chart.trim();\n return (\n <div\n className=\"my-4 border border-gray-200 rounded-lg bg-gray-50\"\n data-mermaid-error={error || undefined}\n >\n <div className=\"px-4 py-3 bg-gray-100 border-b border-gray-200 flex items-center gap-2\">\n <span className=\"text-yellow-600\">⚠️</span>\n <span\n dir=\"auto\"\n className=\"text-sm text-yellow-700 font-medium whitespace-pre-wrap\"\n >\n {cleanedChart\n ? (messages?.error ?? DEFAULT_MESSAGES.error)\n : (messages?.emptyChart ?? DEFAULT_MESSAGES.emptyChart)}\n </span>\n </div>\n <div className=\"relative\">\n <pre\n dir=\"ltr\"\n className=\"p-4 text-sm font-mono text-yellow-800 text-start [unicode-bidi:isolate]\"\n >\n <code>{displayChart}</code>\n </pre>\n <div className=\"absolute top-2 right-2 px-2 py-1 text-xs text-yellow-700 bg-white/90 rounded border border-gray-200\">\n {messages?.badge ?? DEFAULT_MESSAGES.badge}\n </div>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"my-4 text-center overflow-auto content-render-mermaid\">\n {svg ? (\n <div\n className=\"content-render-mermaid-inner\"\n dangerouslySetInnerHTML={{ __html: svg }}\n />\n ) : (\n <div className=\"py-8 text-gray-500 italic\">\n {messages?.loading ?? DEFAULT_MESSAGES.loading}\n </div>\n )}\n </div>\n );\n};\n\nexport default React.memo(MermaidChart, (prev, next) => {\n return (\n prev.chart === next.chart &&\n prev.frozen === next.frozen &&\n prev.messages?.emptyChart === next.messages?.emptyChart &&\n prev.messages?.loading === next.messages?.loading &&\n prev.messages?.error === next.messages?.error &&\n prev.messages?.badge === next.messages?.badge\n );\n});\n"],"names":["DEFAULT_MESSAGES","preprocessChart","raw","renderSequence","createMeasurementContainer","parsed","container","width","mermaid","probe","bounds","fitXYViewBox","svg","element","viewBox","screenToSvg","left","top","right","bottom","labels","label","transform","matrix","y","point","MermaidChart","chart","messages","frozen","setSvg","useState","error","setError","hasRendered","setHasRendered","renderChart","cleaned","CJK_SAFE_SANS_FONT_FAMILY","parseErr","parseErrorMsg","id","renderedSvg","displaySvg","err","errorMsg","useEffect","cleanedChart","displayChart","jsxs","jsx","React","prev","next"],"mappings":"uQAeMA,EAAmB,CACvB,WAAY,sBACZ,QAAS,2BACT,MAAO,sCACP,MAAO,SACT,EAEMC,EAAmBC,GACvBA,EAAI,OAAO,QAAQ,kBAAmB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C,OACEsB,EAAAA,KAAC,MAAA,CACC,UAAU,oDACV,qBAAoBjB,GAAS,OAE7B,SAAA,CAAAiB,EAAAA,KAAC,MAAA,CAAI,UAAU,yEACb,SAAA,CAAAC,EAAAA,IAAC,OAAA,CAAK,UAAU,kBAAkB,SAAA,KAAE,EACpCA,EAAAA,IAAC,OAAA,CACC,IAAI,OACJ,UAAU,0DAET,WACItB,GAAU,OAAS5B,EAAiB,MACpC4B,GAAU,YAAc5B,EAAiB,UAAA,CAAA,CAChD,EACF,EACAiD,EAAAA,KAAC,MAAA,CAAI,UAAU,WACb,SAAA,CAAAC,EAAAA,IAAC,MAAA,CACC,IAAI,MACJ,UAAU,0EAEV,SAAAA,EAAAA,IAAC,QAAM,SAAAF,CAAA,CAAa,CAAA,CAAA,QAErB,MAAA,CAAI,UAAU,sGACZ,SAAApB,GAAU,OAAS5B,EAAiB,KAAA,CACvC,CAAA,CAAA,CACF,CAAA,CAAA,CAAA,CAGN,CAEA,OACEkD,EAAAA,IAAC,MAAA,CAAI,UAAU,wDACZ,SAAAtC,EACCsC,EAAAA,IAAC,MAAA,CACC,UAAU,+BACV,wBAAyB,CAAE,OAAQtC,CAAA,CAAI,CAAA,QAGxC,MAAA,CAAI,UAAU,4BACZ,SAAAgB,GAAU,SAAW5B,EAAiB,OAAA,CACzC,CAAA,CAEJ,CAEJ,EAEA0B,EAAeyB,EAAM,KAAKzB,EAAc,CAAC0B,EAAMC,IAE3CD,EAAK,QAAUC,EAAK,OACpBD,EAAK,SAAWC,EAAK,QACrBD,EAAK,UAAU,aAAeC,EAAK,UAAU,YAC7CD,EAAK,UAAU,UAAYC,EAAK,UAAU,SAC1CD,EAAK,UAAU,QAAUC,EAAK,UAAU,OACxCD,EAAK,UAAU,QAAUC,EAAK,UAAU,KAE3C"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { decodeString as j } from "../../../node_modules/micromark-util-decode-string/index.es.js";
|
|
2
2
|
import { getMarkdownSourceAnalysis as U } from "./inline-code-ranges.es.js";
|
|
3
3
|
import { normalizeInlineHtml as K } from "./normalize-inline-html.es.js";
|
|
4
|
-
import { readHtmlMarkup as L,
|
|
4
|
+
import { readHtmlMarkup as L, isHtmlRawTextTag as q, findStreamingHtmlElementEnd as D } from "./html-block-end.es.js";
|
|
5
5
|
const F = "contentRenderVisibility", b = (e, a) => {
|
|
6
6
|
let o = 0, n = e.length;
|
|
7
7
|
for (; o < n; ) {
|
|
@@ -32,7 +32,7 @@ const F = "contentRenderVisibility", b = (e, a) => {
|
|
|
32
32
|
const i = L(e, d);
|
|
33
33
|
if (i.kind === "incomplete")
|
|
34
34
|
return /^<svg(?=[\s/>]|$)/i.test(e.slice(d)) ? { start: d, end: e.length } : void 0;
|
|
35
|
-
o = i.kind === "tag" && !i.closing && !i.selfClosing &&
|
|
35
|
+
o = i.kind === "tag" && !i.closing && !i.selfClosing && q(i.name) ? D(e, d) : i.kind === "invalid" ? d + 1 : i.end;
|
|
36
36
|
}
|
|
37
37
|
}, J = (e, a) => {
|
|
38
38
|
if (e === a) return;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("react/jsx-runtime"),b=require("./ScrollToBottomButton.cjs"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("react/jsx-runtime"),b=require("./ScrollToBottomButton.cjs"),f=require("./useScrollToBottom.cjs"),o=({viewportRef:t,contentRef:l,endRef:e,scrollTarget:r,pageScrollFallback:u,scrollThreshold:c,contentVersion:s,followNewContent:n,autoScrollOnInit:i,behavior:m,onScrollToBottom:B,...S})=>{const{showScrollToBottom:T,scrollToBottom:a}=f.default(t,{contentRef:l,endRef:e,scrollTarget:r,pageScrollFallback:u,scrollThreshold:c,contentVersion:s,followNewContent:n,autoScrollOnInit:i,behavior:m});return d.jsx(b.ScrollToBottomButton,{...S,visible:T,onClick:()=>{a(),B?.()}})};exports.ScrollToBottomControl=o;exports.default=o;
|
|
2
2
|
//# sourceMappingURL=ScrollToBottomControl.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollToBottomControl.cjs","sources":["../../../src/components/MarkdownFlow/ScrollToBottomControl.tsx"],"sourcesContent":["import React, { type RefObject } from \"react\";\nimport ScrollToBottomButton, {\n type ScrollToBottomButtonProps,\n} from \"./ScrollToBottomButton\";\nimport useScrollToBottom, {\n type UseScrollToBottomOptions,\n} from \"./useScrollToBottom\";\n\nexport interface ScrollToBottomControlProps\n extends\n UseScrollToBottomOptions,\n Omit<ScrollToBottomButtonProps, \"onClick\" | \"visible\"> {\n /** Existing host viewport; no wrapper or content ownership is required. */\n viewportRef: RefObject<HTMLElement | null>;\n /** Optional notification after the control requests a scroll to the end. */\n onScrollToBottom?: () => void;\n}\n\n/**\n * Complete scroll-to-bottom control for streaming or asynchronously growing content.\n *\n * The control owns target resolution, follow state, visibility, click behavior,\n * the accessible icon button, and optional portal rendering. Consumers only\n * provide host refs, localized text, and layout inputs.\n */\nexport const ScrollToBottomControl: React.FC<ScrollToBottomControlProps> = ({\n viewportRef,\n contentRef,\n endRef,\n scrollTarget,\n pageScrollFallback,\n scrollThreshold,\n contentVersion,\n followNewContent,\n autoScrollOnInit,\n behavior,\n onScrollToBottom,\n ...buttonProps\n}) => {\n const { showScrollToBottom, scrollToBottom } = useScrollToBottom(\n viewportRef,\n {\n contentRef,\n endRef,\n scrollTarget,\n pageScrollFallback,\n scrollThreshold,\n contentVersion,\n followNewContent,\n autoScrollOnInit,\n behavior,\n }\n );\n\n return (\n <ScrollToBottomButton\n {...buttonProps}\n visible={showScrollToBottom}\n onClick={() => {\n scrollToBottom();\n onScrollToBottom?.();\n }}\n />\n );\n};\n\nexport default ScrollToBottomControl;\n"],"names":["ScrollToBottomControl","viewportRef","contentRef","endRef","scrollTarget","pageScrollFallback","scrollThreshold","contentVersion","followNewContent","autoScrollOnInit","behavior","onScrollToBottom","buttonProps","showScrollToBottom","scrollToBottom","useScrollToBottom","jsx","ScrollToBottomButton"],"mappings":"8NAyBaA,EAA8D,CAAC,CAC1E,YAAAC,EACA,WAAAC,EACA,OAAAC,EACA,aAAAC,EACA,mBAAAC,EACA,gBAAAC,EACA,eAAAC,EACA,iBAAAC,EACA,iBAAAC,EACA,SAAAC,EACA,iBAAAC,EACA,GAAGC,CACL,IAAM,CACJ,KAAM,CAAE,mBAAAC,EAAoB,eAAAC,CAAA,EAAmBC,EAAAA,
|
|
1
|
+
{"version":3,"file":"ScrollToBottomControl.cjs","sources":["../../../src/components/MarkdownFlow/ScrollToBottomControl.tsx"],"sourcesContent":["import React, { type RefObject } from \"react\";\nimport ScrollToBottomButton, {\n type ScrollToBottomButtonProps,\n} from \"./ScrollToBottomButton\";\nimport useScrollToBottom, {\n type UseScrollToBottomOptions,\n} from \"./useScrollToBottom\";\n\nexport interface ScrollToBottomControlProps\n extends\n UseScrollToBottomOptions,\n Omit<ScrollToBottomButtonProps, \"onClick\" | \"visible\"> {\n /** Existing host viewport; no wrapper or content ownership is required. */\n viewportRef: RefObject<HTMLElement | null>;\n /** Optional notification after the control requests a scroll to the end. */\n onScrollToBottom?: () => void;\n}\n\n/**\n * Complete scroll-to-bottom control for streaming or asynchronously growing content.\n *\n * The control owns target resolution, follow state, visibility, click behavior,\n * the accessible icon button, and optional portal rendering. Consumers only\n * provide host refs, localized text, and layout inputs.\n */\nexport const ScrollToBottomControl: React.FC<ScrollToBottomControlProps> = ({\n viewportRef,\n contentRef,\n endRef,\n scrollTarget,\n pageScrollFallback,\n scrollThreshold,\n contentVersion,\n followNewContent,\n autoScrollOnInit,\n behavior,\n onScrollToBottom,\n ...buttonProps\n}) => {\n const { showScrollToBottom, scrollToBottom } = useScrollToBottom(\n viewportRef,\n {\n contentRef,\n endRef,\n scrollTarget,\n pageScrollFallback,\n scrollThreshold,\n contentVersion,\n followNewContent,\n autoScrollOnInit,\n behavior,\n }\n );\n\n return (\n <ScrollToBottomButton\n {...buttonProps}\n visible={showScrollToBottom}\n onClick={() => {\n scrollToBottom();\n onScrollToBottom?.();\n }}\n />\n );\n};\n\nexport default ScrollToBottomControl;\n"],"names":["ScrollToBottomControl","viewportRef","contentRef","endRef","scrollTarget","pageScrollFallback","scrollThreshold","contentVersion","followNewContent","autoScrollOnInit","behavior","onScrollToBottom","buttonProps","showScrollToBottom","scrollToBottom","useScrollToBottom","jsx","ScrollToBottomButton"],"mappings":"8NAyBaA,EAA8D,CAAC,CAC1E,YAAAC,EACA,WAAAC,EACA,OAAAC,EACA,aAAAC,EACA,mBAAAC,EACA,gBAAAC,EACA,eAAAC,EACA,iBAAAC,EACA,iBAAAC,EACA,SAAAC,EACA,iBAAAC,EACA,GAAGC,CACL,IAAM,CACJ,KAAM,CAAE,mBAAAC,EAAoB,eAAAC,CAAA,EAAmBC,EAAAA,QAC7Cd,EACA,CACE,WAAAC,EACA,OAAAC,EACA,aAAAC,EACA,mBAAAC,EACA,gBAAAC,EACA,eAAAC,EACA,iBAAAC,EACA,iBAAAC,EACA,SAAAC,CAAA,CACF,EAGF,OACEM,EAAAA,IAACC,EAAAA,qBAAA,CACE,GAAGL,EACJ,QAASC,EACT,QAAS,IAAM,CACbC,EAAA,EACAH,IAAA,CACF,CAAA,CAAA,CAGN"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as u } from "react/jsx-runtime";
|
|
2
2
|
import { ScrollToBottomButton as S } from "./ScrollToBottomButton.es.js";
|
|
3
|
-
import
|
|
3
|
+
import a from "./useScrollToBottom.es.js";
|
|
4
4
|
const d = ({
|
|
5
5
|
viewportRef: o,
|
|
6
6
|
contentRef: t,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorToolbar.cjs","sources":["../../../../src/components/MarkdownFlowEditor/components/EditorToolbar.tsx"],"sourcesContent":["import { memo, useCallback } from \"react\";\nimport {\n FileType,\n Image as ImageIcon,\n TextCursorInput,\n SquareCheck,\n SquarePlay,\n CircleCheck,\n} from \"lucide-react\";\nimport { SelectedOption } from \"../types\";\nimport ButtonIcon from \"./icons/ButtonIcon\";\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"../../ui/tooltip\";\nimport type { MarkdownFlowDirection } from \"../../../lib/locale\";\n\ntype ToolbarLabels = {\n confirmOutput: string | undefined;\n insertLink: string | undefined;\n insertButton: string | undefined;\n insertSingleChoice: string | undefined;\n insertMultiChoice: string | undefined;\n insertInput: string | undefined;\n image: string;\n video: string;\n};\n\ninterface EditorToolbarProps {\n disabled?: boolean;\n labels: ToolbarLabels;\n tooltipDirection?: MarkdownFlowDirection;\n tooltipLanguage?: string;\n onSelect: (selectedOption: SelectedOption) => void;\n onInsertConfirmOutput?: () => void;\n onInsertLink?: () => void;\n onInsertButton?: () => void;\n onInsertSingleChoice?: () => void;\n onInsertMultiChoice?: () => void;\n onInsertInputField?: () => void;\n rightSlot?: React.ReactNode;\n}\n\n/**\n * EditorToolbar renders quick action buttons that mirror the slash commands.\n */\nconst ICON_SIZE = 18;\n\nconst EditorToolbar: React.FC<EditorToolbarProps> = ({\n disabled = false,\n labels,\n tooltipDirection,\n tooltipLanguage,\n onSelect,\n onInsertConfirmOutput,\n onInsertButton,\n onInsertSingleChoice,\n onInsertMultiChoice,\n onInsertInputField,\n rightSlot,\n}) => {\n const handleConfirmOutput = useCallback(() => {\n if (disabled) {\n return;\n }\n onInsertConfirmOutput?.();\n }, [disabled, onInsertConfirmOutput]);\n\n const handleInsertButton = useCallback(() => {\n if (disabled) {\n return;\n }\n onInsertButton?.();\n }, [disabled, onInsertButton]);\n\n const handleInsertSingleChoice = useCallback(() => {\n if (disabled) {\n return;\n }\n onInsertSingleChoice?.();\n }, [disabled, onInsertSingleChoice]);\n\n const handleInsertMultiChoice = useCallback(() => {\n if (disabled) {\n return;\n }\n onInsertMultiChoice?.();\n }, [disabled, onInsertMultiChoice]);\n\n const handleInsertInputField = useCallback(() => {\n if (disabled) {\n return;\n }\n onInsertInputField?.();\n }, [disabled, onInsertInputField]);\n\n const tooltipContentProps = {\n dir: tooltipDirection,\n lang: tooltipLanguage,\n side: \"top\" as const,\n };\n\n return (\n <TooltipProvider delayDuration={150}>\n <div className=\"markdown-flow-editor-toolbar\" aria-disabled={disabled}>\n <div className=\"markdown-flow-editor-toolbar-left\">\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n disabled={disabled}\n onClick={handleInsertSingleChoice}\n aria-label={labels.insertSingleChoice}\n >\n <CircleCheck strokeWidth={1.75} size={ICON_SIZE} />\n </button>\n </TooltipTrigger>\n <TooltipContent {...tooltipContentProps}>\n {labels.insertSingleChoice ?? \"\"}\n </TooltipContent>\n </Tooltip>\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n disabled={disabled}\n onClick={handleInsertMultiChoice}\n aria-label={labels.insertMultiChoice}\n >\n <SquareCheck strokeWidth={1.75} size={ICON_SIZE} />\n </button>\n </TooltipTrigger>\n <TooltipContent {...tooltipContentProps}>\n {labels.insertMultiChoice ?? \"\"}\n </TooltipContent>\n </Tooltip>\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n disabled={disabled}\n onClick={handleInsertInputField}\n aria-label={labels.insertInput}\n >\n <TextCursorInput strokeWidth={1.75} size={ICON_SIZE} />\n </button>\n </TooltipTrigger>\n <TooltipContent {...tooltipContentProps}>\n {labels.insertInput ?? \"\"}\n </TooltipContent>\n </Tooltip>\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n disabled={disabled}\n onClick={handleInsertButton}\n aria-label={labels.insertButton}\n >\n <ButtonIcon strokeWidth={1.75} size={ICON_SIZE} />\n </button>\n </TooltipTrigger>\n <TooltipContent {...tooltipContentProps}>\n {labels.insertButton ?? \"\"}\n </TooltipContent>\n </Tooltip>\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n disabled={disabled}\n onClick={handleConfirmOutput}\n aria-label={labels.confirmOutput}\n >\n <FileType strokeWidth={1.75} size={ICON_SIZE} />\n </button>\n </TooltipTrigger>\n <TooltipContent {...tooltipContentProps}>\n {labels.confirmOutput ?? \"\"}\n </TooltipContent>\n </Tooltip>\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n disabled={disabled}\n onClick={() => onSelect(SelectedOption.Image)}\n aria-label={labels.image}\n >\n <ImageIcon strokeWidth={1.75} size={ICON_SIZE} />\n </button>\n </TooltipTrigger>\n <TooltipContent {...tooltipContentProps}>\n {labels.image ?? \"\"}\n </TooltipContent>\n </Tooltip>\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n disabled={disabled}\n onClick={() => onSelect(SelectedOption.Video)}\n aria-label={labels.video}\n >\n <SquarePlay strokeWidth={1.75} size={ICON_SIZE} />\n </button>\n </TooltipTrigger>\n <TooltipContent {...tooltipContentProps}>\n {labels.video ?? \"\"}\n </TooltipContent>\n </Tooltip>\n </div>\n {rightSlot ? (\n <div className=\"markdown-flow-editor-toolbar-right-wrapper\">\n {rightSlot}\n </div>\n ) : null}\n </div>\n </TooltipProvider>\n );\n};\n\nexport default memo(EditorToolbar);\n"],"names":["ICON_SIZE","EditorToolbar","disabled","labels","tooltipDirection","tooltipLanguage","onSelect","onInsertConfirmOutput","onInsertButton","onInsertSingleChoice","onInsertMultiChoice","onInsertInputField","rightSlot","handleConfirmOutput","useCallback","handleInsertButton","handleInsertSingleChoice","handleInsertMultiChoice","handleInsertInputField","tooltipContentProps","jsx","TooltipProvider","jsxs","Tooltip","TooltipTrigger","CircleCheck","TooltipContent","SquareCheck","TextCursorInput","ButtonIcon","FileType","SelectedOption","ImageIcon","SquarePlay","EditorToolbar$1","memo"],"mappings":"8tBAgDMA,EAAY,GAEZC,EAA8C,CAAC,CACnD,SAAAC,EAAW,GACX,OAAAC,EACA,iBAAAC,EACA,gBAAAC,EACA,SAAAC,EACA,sBAAAC,EACA,eAAAC,EAC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eAAiB,EAAA,CAC3B,CAAA,EACF,SACCoB,EAAAA,QAAA,CACC,SAAA,CAAAH,EAAAA,IAACI,EAAAA,eAAA,CAAe,QAAO,GACrB,SAAAJ,EAAAA,IAAC,SAAA,CACC,KAAK,SACL,SAAAlB,EACA,QAAS,IAAMI,EAASyB,EAAAA,eAAe,KAAK,EAC5C,aAAY5B,EAAO,MAEnB,SAAAiB,EAAAA,IAACY,UAAA,CAAU,YAAa,KAAM,KAAMhC,CAAA,CAAW,CAAA,CAAA,EAEnD,QACC0B,EAAAA,eAAA,CAAgB,GAAGP,EACjB,SAAAhB,EAAO,OAAS,EAAA,CACnB,CAAA,EACF,SACCoB,EAAAA,QAAA,CACC,SAAA,CAAAH,EAAAA,IAACI,EAAAA,eAAA,CAAe,QAAO,GACrB,SAAAJ,EAAAA,IAAC,SAAA,CACC,KAAK,SACL,SAAAlB,EACA,QAAS,IAAMI,EAASyB,EAAAA,eAAe,KAAK,EAC5C,aAAY5B,EAAO,MAEnB,SAAAiB,EAAAA,IAACa,UAAA,CAAW,YAAa,KAAM,KAAMjC,CAAA,CAAW,CAAA,CAAA,EAEpD,QACC0B,EAAAA,eAAA,CAAgB,GAAGP,EACjB,SAAAhB,EAAO,OAAS,EAAA,CACnB,CAAA,CAAA,CACF,CAAA,EACF,EACCS,EACCQ,EAAAA,IAAC,MAAA,CAAI,UAAU,6CACZ,WACH,EACE,IAAA,CAAA,CACN,CAAA,CACF,CAEJ,EAEAc,EAAeC,EAAAA,KAAKlC,CAAa"}
|
|
1
|
+
{"version":3,"file":"EditorToolbar.cjs","sources":["../../../../src/components/MarkdownFlowEditor/components/EditorToolbar.tsx"],"sourcesContent":["import { memo, useCallback } from \"react\";\nimport {\n FileType,\n Image as ImageIcon,\n TextCursorInput,\n SquareCheck,\n SquarePlay,\n CircleCheck,\n} from \"lucide-react\";\nimport { SelectedOption } from \"../types\";\nimport ButtonIcon from \"./icons/ButtonIcon\";\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"../../ui/tooltip\";\nimport type { MarkdownFlowDirection } from \"../../../lib/locale\";\n\ntype ToolbarLabels = {\n confirmOutput: string | undefined;\n insertLink: string | undefined;\n insertButton: string | undefined;\n insertSingleChoice: string | undefined;\n insertMultiChoice: string | undefined;\n insertInput: string | undefined;\n image: string;\n video: string;\n};\n\ninterface EditorToolbarProps {\n disabled?: boolean;\n labels: ToolbarLabels;\n tooltipDirection?: MarkdownFlowDirection;\n tooltipLanguage?: string;\n onSelect: (selectedOption: SelectedOption) => void;\n onInsertConfirmOutput?: () => void;\n onInsertLink?: () => void;\n onInsertButton?: () => void;\n onInsertSingleChoice?: () => void;\n onInsertMultiChoice?: () => void;\n onInsertInputField?: () => void;\n rightSlot?: React.ReactNode;\n}\n\n/**\n * EditorToolbar renders quick action buttons that mirror the slash commands.\n */\nconst ICON_SIZE = 18;\n\nconst EditorToolbar: React.FC<EditorToolbarProps> = ({\n disabled = false,\n labels,\n tooltipDirection,\n tooltipLanguage,\n onSelect,\n onInsertConfirmOutput,\n onInsertButton,\n onInsertSingleChoice,\n onInsertMultiChoice,\n onInsertInputField,\n rightSlot,\n}) => {\n const handleConfirmOutput = useCallback(() => {\n if (disabled) {\n return;\n }\n onInsertConfirmOutput?.();\n }, [disabled, onInsertConfirmOutput]);\n\n const handleInsertButton = useCallback(() => {\n if (disabled) {\n return;\n }\n onInsertButton?.();\n }, [disabled, onInsertButton]);\n\n const handleInsertSingleChoice = useCallback(() => {\n if (disabled) {\n return;\n }\n onInsertSingleChoice?.();\n }, [disabled, onInsertSingleChoice]);\n\n const handleInsertMultiChoice = useCallback(() => {\n if (disabled) {\n return;\n }\n onInsertMultiChoice?.();\n }, [disabled, onInsertMultiChoice]);\n\n const handleInsertInputField = useCallback(() => {\n if (disabled) {\n return;\n }\n onInsertInputField?.();\n }, [disabled, onInsertInputField]);\n\n const tooltipContentProps = {\n dir: tooltipDirection,\n lang: tooltipLanguage,\n side: \"top\" as const,\n };\n\n return (\n <TooltipProvider delayDuration={150}>\n <div className=\"markdown-flow-editor-toolbar\" aria-disabled={disabled}>\n <div className=\"markdown-flow-editor-toolbar-left\">\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n disabled={disabled}\n onClick={handleInsertSingleChoice}\n aria-label={labels.insertSingleChoice}\n >\n <CircleCheck strokeWidth={1.75} size={ICON_SIZE} />\n </button>\n </TooltipTrigger>\n <TooltipContent {...tooltipContentProps}>\n {labels.insertSingleChoice ?? \"\"}\n </TooltipContent>\n </Tooltip>\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n disabled={disabled}\n onClick={handleInsertMultiChoice}\n aria-label={labels.insertMultiChoice}\n >\n <SquareCheck strokeWidth={1.75} size={ICON_SIZE} />\n </button>\n </TooltipTrigger>\n <TooltipContent {...tooltipContentProps}>\n {labels.insertMultiChoice ?? \"\"}\n </TooltipContent>\n </Tooltip>\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n disabled={disabled}\n onClick={handleInsertInputField}\n aria-label={labels.insertInput}\n >\n <TextCursorInput strokeWidth={1.75} size={ICON_SIZE} />\n </button>\n </TooltipTrigger>\n <TooltipContent {...tooltipContentProps}>\n {labels.insertInput ?? \"\"}\n </TooltipContent>\n </Tooltip>\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n disabled={disabled}\n onClick={handleInsertButton}\n aria-label={labels.insertButton}\n >\n <ButtonIcon strokeWidth={1.75} size={ICON_SIZE} />\n </button>\n </TooltipTrigger>\n <TooltipContent {...tooltipContentProps}>\n {labels.insertButton ?? \"\"}\n </TooltipContent>\n </Tooltip>\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n disabled={disabled}\n onClick={handleConfirmOutput}\n aria-label={labels.confirmOutput}\n >\n <FileType strokeWidth={1.75} size={ICON_SIZE} />\n </button>\n </TooltipTrigger>\n <TooltipContent {...tooltipContentProps}>\n {labels.confirmOutput ?? \"\"}\n </TooltipContent>\n </Tooltip>\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n disabled={disabled}\n onClick={() => onSelect(SelectedOption.Image)}\n aria-label={labels.image}\n >\n <ImageIcon strokeWidth={1.75} size={ICON_SIZE} />\n </button>\n </TooltipTrigger>\n <TooltipContent {...tooltipContentProps}>\n {labels.image ?? \"\"}\n </TooltipContent>\n </Tooltip>\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n disabled={disabled}\n onClick={() => onSelect(SelectedOption.Video)}\n aria-label={labels.video}\n >\n <SquarePlay strokeWidth={1.75} size={ICON_SIZE} />\n </button>\n </TooltipTrigger>\n <TooltipContent {...tooltipContentProps}>\n {labels.video ?? \"\"}\n </TooltipContent>\n </Tooltip>\n </div>\n {rightSlot ? (\n <div className=\"markdown-flow-editor-toolbar-right-wrapper\">\n {rightSlot}\n </div>\n ) : null}\n </div>\n </TooltipProvider>\n );\n};\n\nexport default memo(EditorToolbar);\n"],"names":["ICON_SIZE","EditorToolbar","disabled","labels","tooltipDirection","tooltipLanguage","onSelect","onInsertConfirmOutput","onInsertButton","onInsertSingleChoice","onInsertMultiChoice","onInsertInputField","rightSlot","handleConfirmOutput","useCallback","handleInsertButton","handleInsertSingleChoice","handleInsertMultiChoice","handleInsertInputField","tooltipContentProps","jsx","TooltipProvider","jsxs","Tooltip","TooltipTrigger","CircleCheck","TooltipContent","SquareCheck","TextCursorInput","ButtonIcon","FileType","SelectedOption","ImageIcon","SquarePlay","memo"],"mappings":"8tBAgDMA,EAAY,GAEZC,EAA8C,CAAC,CACnD,SAAAC,EAAW,GACX,OAAAC,EACA,iBAAAC,EACA,gBAAAC,EACA,SAAAC,EACA,sBAAAC,EACA,eAAAC,EACA,qBAAAC,EACA,oBAAAC,EACA,mBAAAC,EACA,UAAAC,CACF,IAAM,CACJ,MAAMC,EAAsBC,EAAAA,YAAY,IAAM,CACxCZ,GAGJK,IAAA,CACF,EAAG,CAACL,EAAUK,CAAqB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