markdown-flow-ui 0.1.83-beta.0 → 0.1.83-beta.10

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.
Files changed (38) hide show
  1. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/@braintree_sanitize-url@7.1.1/node_modules/@braintree/sanitize-url/dist/index.js +1 -1
  2. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js +1 -1
  3. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-YG6GDRKO.js +1 -1
  4. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-S3R3BYOJ.js +1 -1
  5. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-TZMSLE5B.js +1 -1
  6. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-LVOFAZNH.js +1 -1
  7. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-WL72ISMW.js +1 -1
  8. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-input@1.8.0_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-input/es/BaseInput.js +1 -1
  9. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/ResizableTextArea.js +1 -1
  10. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/TextArea.js +1 -1
  11. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/index.js +1 -1
  12. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-flow@0.1.6/node_modules/remark-flow/dist/remark-custom-variable.js +1 -1
  13. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-flow@0.1.6/node_modules/remark-flow/dist/remark-interaction.js +1 -1
  14. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/style-to-object@1.0.11/node_modules/style-to-object/cjs/index.js +1 -1
  15. package/dist/_virtual/index10.js +2 -2
  16. package/dist/_virtual/index3.js +4 -5
  17. package/dist/_virtual/index3.js.map +1 -1
  18. package/dist/_virtual/index4.js +5 -4
  19. package/dist/_virtual/index4.js.map +1 -1
  20. package/dist/_virtual/index7.js +2 -3
  21. package/dist/_virtual/index7.js.map +1 -1
  22. package/dist/_virtual/index8.js +3 -2
  23. package/dist/_virtual/index8.js.map +1 -1
  24. package/dist/components/ContentRender/ContentRender.js +91 -90
  25. package/dist/components/ContentRender/ContentRender.js.map +1 -1
  26. package/dist/components/ContentRender/IframeSandbox.d.ts +1 -0
  27. package/dist/components/ContentRender/IframeSandbox.js +107 -68
  28. package/dist/components/ContentRender/IframeSandbox.js.map +1 -1
  29. package/dist/components/ContentRender/SandboxApp.d.ts +0 -1
  30. package/dist/components/ContentRender/SandboxApp.js +72 -89
  31. package/dist/components/ContentRender/SandboxApp.js.map +1 -1
  32. package/dist/components/ContentRender/utils/split-content.d.ts +4 -1
  33. package/dist/components/ContentRender/utils/split-content.js +55 -24
  34. package/dist/components/ContentRender/utils/split-content.js.map +1 -1
  35. package/dist/components/ContentRender/utils/split-content.test.d.ts +1 -0
  36. package/dist/components/ui/inputGroup/textarea.js +1 -1
  37. package/dist/markdown-flow-ui-lib.css +1 -1
  38. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { __exports as c } from "../../../../../../../../../../_virtual/index10.js";
1
+ import { __exports as c } from "../../../../../../../../../../_virtual/index9.js";
2
2
  import { __require as v } from "./constants.js";
3
3
  var m;
4
4
  function g() {
@@ -1,4 +1,4 @@
1
- import { __module as s } from "../../../../../../../../_virtual/index8.js";
1
+ import { __module as s } from "../../../../../../../../_virtual/index10.js";
2
2
  /*!
3
3
  Copyright (c) 2018 Jed Watson.
4
4
  Licensed under the MIT License (MIT), see
@@ -4,7 +4,7 @@ import { setAccDescription as Be, getAccDescription as Ie, getAccTitle as Me, se
4
4
  import { __name as g, log as fe } from "./chunk-AGHRB4JF.js";
5
5
  import "../../../../../../d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.js";
6
6
  import "../../../../../../d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.js";
7
- import { d as je } from "../../../../../../../../../../../_virtual/index7.js";
7
+ import { d as je } from "../../../../../../../../../../../_virtual/index8.js";
8
8
  import jt from "../../../../../../d3-selection@3.0.0/node_modules/d3-selection/src/select.js";
9
9
  var Ft = (function() {
10
10
  var e = /* @__PURE__ */ g(function(_t, x, m, v) {
@@ -1,6 +1,6 @@
1
1
  import { common_default as b, assignWithDepth_default as E, directiveRegex as $, sanitizeDirective as X, detectType as Y } from "./chunk-ABZYJK2D.js";
2
2
  import { __name as s, log as g } from "./chunk-AGHRB4JF.js";
3
- import { d as G } from "../../../../../../../../../../../_virtual/index7.js";
3
+ import { d as G } from "../../../../../../../../../../../_virtual/index8.js";
4
4
  import "../../../../../../d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.js";
5
5
  import "../../../../../../d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.js";
6
6
  import w from "../../../../../../lodash-es@4.17.21/node_modules/lodash-es/memoize.js";
@@ -1,6 +1,6 @@
1
1
  import { lineBreakRegex as o } from "./chunk-ABZYJK2D.js";
2
2
  import { __name as n } from "./chunk-AGHRB4JF.js";
3
- import { d as l } from "../../../../../../../../../../../_virtual/index7.js";
3
+ import { d as l } from "../../../../../../../../../../../_virtual/index8.js";
4
4
  var x = /* @__PURE__ */ n((s, t) => {
5
5
  const r = s.append("rect");
6
6
  if (r.attr("x", t.x), r.attr("y", t.y), r.attr("fill", t.fill), r.attr("stroke", t.stroke), r.attr("width", t.width), r.attr("height", t.height), t.name && r.attr("name", t.name), t.rx && r.attr("rx", t.rx), t.ry && r.attr("ry", t.ry), t.attrs !== void 0)
@@ -1,7 +1,7 @@
1
1
  import { utils_default as ie } from "./chunk-S3R3BYOJ.js";
2
2
  import { getAccDescription as se, setAccDescription as ne, getDiagramTitle as ae, setDiagramTitle as oe, getAccTitle as ce, setAccTitle as le, getConfig2 as K, configureSvgSize as ue, common_default as de, clear as fe } from "./chunk-ABZYJK2D.js";
3
3
  import { __name as c, log as mt } from "./chunk-AGHRB4JF.js";
4
- import { d as he } from "../../../../../../../../../../../_virtual/index7.js";
4
+ import { d as he } from "../../../../../../../../../../../_virtual/index8.js";
5
5
  import L from "../../../../../../../../../../../_virtual/dayjs.min.js";
6
6
  import me from "../../../../../../../../../../../_virtual/isoWeek.js";
7
7
  import ke from "../../../../../../../../../../../_virtual/customParseFormat.js";
@@ -6,7 +6,7 @@ import { setConfig2 as ke, getConfig2 as st, configureSvgSize as Pe, assignWithD
6
6
  import { __name as f, log as Q } from "./chunk-AGHRB4JF.js";
7
7
  import "../../../../../../d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.js";
8
8
  import "../../../../../../d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.js";
9
- import { d as ne } from "../../../../../../../../../../../_virtual/index7.js";
9
+ import { d as ne } from "../../../../../../../../../../../_virtual/index8.js";
10
10
  import Mt from "../../../../../../d3-selection@3.0.0/node_modules/d3-selection/src/select.js";
11
11
  var Ut = (function() {
12
12
  var e = /* @__PURE__ */ f(function(pt, v, A, L) {
@@ -2,7 +2,7 @@ import $ from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/hel
2
2
  import oe from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/extends.js";
3
3
  import r from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/defineProperty.js";
4
4
  import te from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/typeof.js";
5
- import d from "../../../../../../../../../_virtual/index3.js";
5
+ import d from "../../../../../../../../../_virtual/index4.js";
6
6
  import l, { useRef as q, cloneElement as ie } from "react";
7
7
  import { hasPrefixSuffix as re, hasAddon as de } from "./utils/commonUtils.js";
8
8
  var xe = /* @__PURE__ */ l.forwardRef(function(e, z) {
@@ -4,7 +4,7 @@ import w from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/hel
4
4
  import J from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/typeof.js";
5
5
  import s from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/slicedToArray.js";
6
6
  import K from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js";
7
- import Q from "../../../../../../../../../_virtual/index3.js";
7
+ import Q from "../../../../../../../../../_virtual/index4.js";
8
8
  import ee from "../../../../rc-resize-observer@1.4.3_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-resize-observer/es/index.js";
9
9
  import M from "../../../../rc-util@5.44.4_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-util/es/hooks/useLayoutEffect.js";
10
10
  import te from "../../../../rc-util@5.44.4_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-util/es/hooks/useMergedState.js";
@@ -4,7 +4,7 @@ import d from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/hel
4
4
  import Ae from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js";
5
5
  import x from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/slicedToArray.js";
6
6
  import Fe from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js";
7
- import h from "../../../../../../../../../_virtual/index3.js";
7
+ import h from "../../../../../../../../../_virtual/index4.js";
8
8
  import Ne from "../../../../rc-input@1.8.0_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-input/es/BaseInput.js";
9
9
  import Te from "../../../../rc-util@5.44.4_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-util/es/hooks/useMergedState.js";
10
10
  import o, { useRef as Y, useImperativeHandle as $e, useEffect as Ie } from "react";
@@ -1,5 +1,5 @@
1
1
  import t from "./TextArea.js";
2
- import "../../../../../../../../../_virtual/index3.js";
2
+ import "../../../../../../../../../_virtual/index4.js";
3
3
  import "../../../../rc-resize-observer@1.4.3_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-resize-observer/es/index.js";
4
4
  import "../../../../rc-util@5.44.4_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-util/es/hooks/useLayoutEffect.js";
5
5
  import "react";
@@ -1,5 +1,5 @@
1
1
  import { __exports as a } from "../../../../../../../../../_virtual/remark-custom-variable.js";
2
- import g from "../../../../../../../../../_virtual/index4.js";
2
+ import g from "../../../../../../../../../_virtual/index3.js";
3
3
  import { __require as h } from "./interaction-parser.js";
4
4
  var m;
5
5
  function C() {
@@ -1,5 +1,5 @@
1
1
  import { __exports as n } from "../../../../../../../../../_virtual/remark-interaction.js";
2
- import I from "../../../../../../../../../_virtual/index4.js";
2
+ import I from "../../../../../../../../../_virtual/index3.js";
3
3
  import { __require as g } from "./interaction-parser.js";
4
4
  var m;
5
5
  function k() {
@@ -1,4 +1,4 @@
1
- import { __exports as r } from "../../../../../../../../../_virtual/index9.js";
1
+ import { __exports as r } from "../../../../../../../../../_virtual/index7.js";
2
2
  import { __require as p } from "../../../../inline-style-parser@0.2.4/node_modules/inline-style-parser/index.js";
3
3
  var f;
4
4
  function q() {
@@ -1,5 +1,5 @@
1
- var r = {};
1
+ var s = { exports: {} };
2
2
  export {
3
- r as __exports
3
+ s as __module
4
4
  };
5
5
  //# sourceMappingURL=index10.js.map
@@ -1,8 +1,7 @@
1
- import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
2
- import { __require as s } from "../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js";
3
- var e = s();
4
- const t = /* @__PURE__ */ r(e);
1
+ import { getAugmentedNamespace as e } from "./_commonjsHelpers.js";
2
+ import * as r from "../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/unist-util-visit@5.0.0/node_modules/unist-util-visit/index.js";
3
+ const m = /* @__PURE__ */ e(r);
5
4
  export {
6
- t as default
5
+ m as default
7
6
  };
8
7
  //# sourceMappingURL=index3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"index3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -1,7 +1,8 @@
1
- import { getAugmentedNamespace as e } from "./_commonjsHelpers.js";
2
- import * as r from "../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/unist-util-visit@5.0.0/node_modules/unist-util-visit/index.js";
3
- const m = /* @__PURE__ */ e(r);
1
+ import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
2
+ import { __require as s } from "../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js";
3
+ var e = s();
4
+ const t = /* @__PURE__ */ r(e);
4
5
  export {
5
- m as default
6
+ t as default
6
7
  };
7
8
  //# sourceMappingURL=index4.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index4.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
1
+ {"version":3,"file":"index4.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,6 +1,5 @@
1
- import { __require as r } from "../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/@braintree_sanitize-url@7.1.1/node_modules/@braintree/sanitize-url/dist/index.js";
2
- var i = r();
1
+ var r = {};
3
2
  export {
4
- i as d
3
+ r as __exports
5
4
  };
6
5
  //# sourceMappingURL=index7.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index7.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
1
+ {"version":3,"file":"index7.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,5 +1,6 @@
1
- var s = { exports: {} };
1
+ import { __require as r } from "../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/@braintree_sanitize-url@7.1.1/node_modules/@braintree/sanitize-url/dist/index.js";
2
+ var i = r();
2
3
  export {
3
- s as __module
4
+ i as d
4
5
  };
5
6
  //# sourceMappingURL=index8.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index8.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index8.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1,100 +1,100 @@
1
1
  import { j as t } from "../../_virtual/jsx-runtime.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
- import U, { useMemo as S, useRef as P, useEffect as L } from "react";
5
- import W from "../../_virtual/index.js";
4
+ import W, { useMemo as S, useRef as V, useEffect as L } from "react";
5
+ import q from "../../_virtual/index.js";
6
6
  /* empty css */
7
7
  /* empty css */
8
- import q from "./CodeBlock.js";
9
- import F from "./plugins/CustomVariable.js";
10
- import $ from "./plugins/MermaidChart.js";
11
- import G from "./useTypewriterStateMachine.js";
12
- import { preserveCustomVariableProperties as K, restoreCustomVariableProperties as D } from "./utils/custom-variable-props.js";
13
- import { subsetLanguages as J, highlightLanguages as O } from "./utils/highlight-languages.js";
14
- import { parseMarkdownSegments as Q, mermaidBlockIsComplete as X } from "./utils/mermaid-parse.js";
15
- import { normalizeInlineHtml as z } from "./utils/normalize-inline-html.js";
16
- import Y from "./IframeSandbox.js";
17
- import { splitContentSegments as Z } from "./utils/split-content.js";
18
- import { Markdown as E } from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/react-markdown@10.1.0_@types_react@19.2.2_react@19.0.1/node_modules/react-markdown/lib/index.js";
19
- import ee from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rehype-raw@7.0.0/node_modules/rehype-raw/lib/index.js";
20
- import te from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rehype-highlight@7.0.2/node_modules/rehype-highlight/lib/index.js";
21
- import re from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rehype-katex@7.0.1/node_modules/rehype-katex/lib/index.js";
22
- import ne from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-gfm@4.0.1/node_modules/remark-gfm/lib/index.js";
23
- import se from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-math@6.0.0/node_modules/remark-math/lib/index.js";
24
- import oe from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-breaks@4.0.0/node_modules/remark-breaks/lib/index.js";
25
- const ae = ({ svg: s }) => {
26
- const c = P(null);
8
+ import F from "./CodeBlock.js";
9
+ import G from "./plugins/CustomVariable.js";
10
+ import z from "./plugins/MermaidChart.js";
11
+ import K from "./useTypewriterStateMachine.js";
12
+ import { preserveCustomVariableProperties as D, restoreCustomVariableProperties as J } from "./utils/custom-variable-props.js";
13
+ import { subsetLanguages as O, highlightLanguages as Q } from "./utils/highlight-languages.js";
14
+ import { parseMarkdownSegments as X, mermaidBlockIsComplete as Y } from "./utils/mermaid-parse.js";
15
+ import { normalizeInlineHtml as H } from "./utils/normalize-inline-html.js";
16
+ import Z from "./IframeSandbox.js";
17
+ import { splitContentSegments as E } from "./utils/split-content.js";
18
+ import { Markdown as ee } from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/react-markdown@10.1.0_@types_react@19.2.2_react@19.0.1/node_modules/react-markdown/lib/index.js";
19
+ import te from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rehype-raw@7.0.0/node_modules/rehype-raw/lib/index.js";
20
+ import re from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rehype-highlight@7.0.2/node_modules/rehype-highlight/lib/index.js";
21
+ import ne from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rehype-katex@7.0.1/node_modules/rehype-katex/lib/index.js";
22
+ import se from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-gfm@4.0.1/node_modules/remark-gfm/lib/index.js";
23
+ import oe from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-math@6.0.0/node_modules/remark-math/lib/index.js";
24
+ import ae from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-breaks@4.0.0/node_modules/remark-breaks/lib/index.js";
25
+ const ie = ({ svg: s }) => {
26
+ const c = V(null);
27
27
  return L(() => {
28
28
  const o = c.current;
29
29
  if (!o) return;
30
- const a = o.shadowRoot ?? o.attachShadow({ mode: "open" }), x = "content-render-svg-style";
31
- let i = a.getElementById(x);
32
- i || (i = document.createElement("style"), i.id = x, i.textContent = `
30
+ const a = o.shadowRoot ?? o.attachShadow({ mode: "open" }), f = "content-render-svg-style";
31
+ let i = a.getElementById(f);
32
+ i || (i = document.createElement("style"), i.id = f, i.textContent = `
33
33
  svg { height: auto; display: inline-block; }
34
34
  svg.content-render-svg-el--responsive { width: 100%; max-width: 100%; }
35
35
  svg.content-render-svg-el--fixed { max-width: none; }
36
36
  `, a.appendChild(i)), Array.from(a.childNodes).filter(
37
37
  (r) => r !== i
38
38
  ).forEach((r) => a.removeChild(r));
39
- const g = document.createElement("template");
40
- g.innerHTML = s, a.append(g.content.cloneNode(!0));
41
- let v = !1, d = !1;
39
+ const x = document.createElement("template");
40
+ x.innerHTML = s, a.append(x.content.cloneNode(!0));
41
+ let g = !1, d = !1;
42
42
  a.querySelectorAll("svg").forEach((r) => {
43
- const j = r.getAttribute("viewBox");
44
- if (!j) return;
45
- const u = j.trim().split(/[\s,]+/).map((p) => Number(p));
43
+ const b = r.getAttribute("viewBox");
44
+ if (!b) return;
45
+ const u = b.trim().split(/[\s,]+/).map((w) => Number(w));
46
46
  if (u.length !== 4 || u.some(Number.isNaN)) return;
47
- const [, , h, l] = u, y = r.getAttribute("width"), N = r.getAttribute("height"), k = !!y && y !== "0", w = !!N && N !== "0";
48
- if (!k && !w) {
49
- v = !0, r.classList.add("content-render-svg-el--responsive"), r.classList.remove("content-render-svg-el--fixed"), r.style.width = "100%", r.style.height = "auto", !r.style.aspectRatio && l > 0 && (r.style.aspectRatio = `${h} / ${l}`);
47
+ const [, , h, l] = u, j = r.getAttribute("width"), y = r.getAttribute("height"), N = !!j && j !== "0", k = !!y && y !== "0";
48
+ if (!N && !k) {
49
+ g = !0, r.classList.add("content-render-svg-el--responsive"), r.classList.remove("content-render-svg-el--fixed"), r.style.width = "100%", r.style.height = "auto", !r.style.aspectRatio && l > 0 && (r.style.aspectRatio = `${h} / ${l}`);
50
50
  return;
51
51
  }
52
- d = !0, r.classList.add("content-render-svg-el--fixed"), r.classList.remove("content-render-svg-el--responsive"), !k && h > 0 && r.setAttribute("width", `${h}`), !w && l > 0 && r.setAttribute("height", `${l}`);
52
+ d = !0, r.classList.add("content-render-svg-el--fixed"), r.classList.remove("content-render-svg-el--responsive"), !N && h > 0 && r.setAttribute("width", `${h}`), !k && l > 0 && r.setAttribute("height", `${l}`);
53
53
  });
54
- const b = v && !d;
55
- o.classList.toggle("content-render-svg--responsive", b), o.classList.toggle("content-render-svg--fixed", !b);
54
+ const v = g && !d;
55
+ o.classList.toggle("content-render-svg--responsive", v), o.classList.toggle("content-render-svg--fixed", !v);
56
56
  }, [s]), /* @__PURE__ */ t.jsx("div", { className: "content-render-svg-scroll", children: /* @__PURE__ */ t.jsx("div", { className: "content-render-svg", ref: c }) });
57
- }, ie = [ne, se, W, oe], ce = [
58
- K,
59
- ee,
57
+ }, ce = [se, oe, q, ae], me = [
60
58
  D,
61
- [te, { languages: O, subset: J }],
62
- re
63
- ], H = ({ content: s, components: c }) => /* @__PURE__ */ t.jsx("div", { className: "markdown-renderer", children: /* @__PURE__ */ t.jsx(
64
- E,
59
+ te,
60
+ J,
61
+ [re, { languages: Q, subset: O }],
62
+ ne
63
+ ], P = ({ content: s, components: c }) => /* @__PURE__ */ t.jsx("div", { className: "markdown-renderer", children: /* @__PURE__ */ t.jsx(
64
+ ee,
65
65
  {
66
- remarkPlugins: ie,
67
- rehypePlugins: ce,
66
+ remarkPlugins: ce,
67
+ rehypePlugins: me,
68
68
  components: c,
69
69
  children: s
70
70
  }
71
- ) }), ze = ({
71
+ ) }), He = ({
72
72
  content: s,
73
73
  customRenderBar: c,
74
74
  onSend: o,
75
75
  typingSpeed: a = 30,
76
- enableTypewriter: x = !1,
76
+ enableTypewriter: f = !1,
77
77
  defaultButtonText: i,
78
78
  defaultInputText: A,
79
- defaultSelectedValues: g,
80
- readonly: v = !1,
79
+ defaultSelectedValues: x,
80
+ readonly: g = !1,
81
81
  onTypeFinished: d,
82
- confirmButtonText: b,
82
+ confirmButtonText: v,
83
83
  copyButtonText: r,
84
- copiedButtonText: j,
84
+ copiedButtonText: b,
85
85
  sandboxLoadingText: u,
86
86
  sandboxStyleLoadingText: h,
87
87
  sandboxScriptLoadingText: l,
88
- // sandboxFullscreenButtonText,
88
+ sandboxFullscreenButtonText: j,
89
89
  sandboxMode: y = "content",
90
90
  onClickCustomButtonAfterContent: N,
91
91
  beforeSend: k
92
92
  // tooltipMinLength,
93
93
  }) => {
94
- const w = S(
95
- () => z(s),
94
+ const B = S(
95
+ () => H(s),
96
96
  [s]
97
- ), C = {
97
+ ), w = {
98
98
  "custom-button-after-content": ({
99
99
  children: e
100
100
  }) => /* @__PURE__ */ t.jsx(
@@ -106,23 +106,23 @@ const ae = ({ svg: s }) => {
106
106
  }
107
107
  ),
108
108
  "custom-variable": (e) => /* @__PURE__ */ t.jsx(
109
- F,
109
+ G,
110
110
  {
111
111
  ...e,
112
- readonly: v,
112
+ readonly: g,
113
113
  defaultButtonText: i,
114
114
  defaultInputText: A,
115
- defaultSelectedValues: g,
115
+ defaultSelectedValues: x,
116
116
  onSend: o,
117
117
  beforeSend: k,
118
- confirmButtonText: b
118
+ confirmButtonText: v
119
119
  }
120
120
  ),
121
121
  code: (e) => {
122
122
  const { className: n, children: m, ...M } = e;
123
123
  if (/language-(\w+)/.exec(n || "")?.[1] === "mermaid") {
124
- const T = m?.toString().replace(/\n$/, "") || "", _ = X(s, T);
125
- return /* @__PURE__ */ t.jsx($, { chart: T, frozen: _ });
124
+ const $ = m?.toString().replace(/\n$/, "") || "", U = Y(s, $);
125
+ return /* @__PURE__ */ t.jsx(z, { chart: $, frozen: U });
126
126
  }
127
127
  return /* @__PURE__ */ t.jsx("code", { className: n, ...M, children: m });
128
128
  },
@@ -147,66 +147,67 @@ const ae = ({ svg: s }) => {
147
147
  ) : /* @__PURE__ */ t.jsx("input", { ...e }),
148
148
  a: ({ children: e, ...n }) => /* @__PURE__ */ t.jsx("a", { target: "_blank", rel: "noopener noreferrer", ...n, children: e }),
149
149
  pre: (e) => /* @__PURE__ */ t.jsx(
150
- q,
150
+ F,
151
151
  {
152
152
  ...e,
153
153
  copyButtonText: r,
154
- copiedButtonText: j
154
+ copiedButtonText: b
155
155
  }
156
156
  )
157
- }, { displayContent: p, isComplete: B } = G({
157
+ }, { displayContent: C, isComplete: I } = K({
158
158
  // processMarkdownText will let code block printf("You win!\n") become printf("You win!<br/>");
159
159
  // content: processMarkdownText(content),
160
- content: w,
160
+ content: B,
161
161
  typingSpeed: a,
162
- disabled: !x
163
- }), I = S(
164
- () => Z(s),
162
+ disabled: !f
163
+ }), T = S(
164
+ () => E(s),
165
165
  [s]
166
- ), f = I.some(
166
+ ), p = T.some(
167
167
  (e) => e.type === "sandbox"
168
- ), V = S(
169
- () => Q(p),
170
- [p]
171
- ), R = P(!1);
168
+ ), _ = S(
169
+ () => X(C),
170
+ [C]
171
+ ), R = V(!1);
172
172
  return L(() => {
173
- f || B && !R.current && (R.current = !0, d?.());
174
- }, [f, B, d]), L(() => {
175
- f || (R.current = !1);
176
- }, [f, s]), f ? /* @__PURE__ */ t.jsx("div", { className: "content-render markdown-body", children: I.map(
173
+ p || I && !R.current && (R.current = !0, d?.());
174
+ }, [p, I, d]), L(() => {
175
+ p || (R.current = !1);
176
+ }, [p, s]), p ? /* @__PURE__ */ t.jsx("div", { className: "content-render markdown-body", children: T.map(
177
177
  (e, n) => e.type === "sandbox" ? /* @__PURE__ */ t.jsx(
178
- Y,
178
+ Z,
179
179
  {
180
180
  content: e.value,
181
181
  className: "content-render-iframe",
182
182
  loadingText: u,
183
183
  styleLoadingText: h,
184
184
  scriptLoadingText: l,
185
+ fullScreenButtonText: j,
185
186
  mode: y
186
187
  },
187
188
  `sandbox-${n}`
188
189
  ) : /* @__PURE__ */ t.jsx(
189
- H,
190
+ P,
190
191
  {
191
- components: C,
192
- content: z(e.value)
192
+ components: w,
193
+ content: H(e.value)
193
194
  },
194
195
  `md-${n}`
195
196
  )
196
197
  ) }) : /* @__PURE__ */ t.jsxs("div", { className: "content-render markdown-body", children: [
197
- V.map((e, n) => {
198
+ _.map((e, n) => {
198
199
  if (e.type === "text")
199
200
  return /* @__PURE__ */ t.jsx(
200
- H,
201
+ P,
201
202
  {
202
- components: C,
203
+ components: w,
203
204
  content: e.value
204
205
  },
205
206
  n
206
207
  );
207
208
  if (e.type === "mermaid")
208
209
  return /* @__PURE__ */ t.jsx(
209
- $,
210
+ z,
210
211
  {
211
212
  chart: e.value,
212
213
  frozen: !e.complete
@@ -214,17 +215,17 @@ const ae = ({ svg: s }) => {
214
215
  n
215
216
  );
216
217
  if (e.type === "svg")
217
- return /* @__PURE__ */ t.jsx(ae, { svg: e.value }, n);
218
+ return /* @__PURE__ */ t.jsx(ie, { svg: e.value }, n);
218
219
  }),
219
- c && /* @__PURE__ */ t.jsx("div", { className: "content-render-custom-bar", children: U.createElement(c, {
220
+ c && /* @__PURE__ */ t.jsx("div", { className: "content-render-custom-bar", children: W.createElement(c, {
220
221
  content: s,
221
- displayContent: p,
222
+ displayContent: C,
222
223
  onSend: o
223
224
  }) })
224
225
  ] });
225
226
  };
226
227
  export {
227
- H as MarkdownRenderer,
228
- ze as default
228
+ P as MarkdownRenderer,
229
+ He as default
229
230
  };
230
231
  //# sourceMappingURL=ContentRender.js.map