markdown-flow-ui 0.2.36-dev.1 → 0.3.0-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/README.md +11 -11
  2. package/dist/_virtual/index.es10.js +2 -2
  3. package/dist/_virtual/index.es3.js +5 -4
  4. package/dist/_virtual/index.es3.js.map +1 -1
  5. package/dist/_virtual/index.es4.js +4 -5
  6. package/dist/_virtual/index.es4.js.map +1 -1
  7. package/dist/_virtual/index.es5.js +5 -5
  8. package/dist/_virtual/index.es6.js +5 -3
  9. package/dist/_virtual/index.es6.js.map +1 -1
  10. package/dist/_virtual/index.es7.js +3 -5
  11. package/dist/_virtual/index.es7.js.map +1 -1
  12. package/dist/_virtual/index.es9.js +2 -2
  13. package/dist/_virtual/index10.cjs +1 -1
  14. package/dist/_virtual/index3.cjs +1 -1
  15. package/dist/_virtual/index4.cjs +1 -1
  16. package/dist/_virtual/index5.cjs +1 -1
  17. package/dist/_virtual/index6.cjs +1 -1
  18. package/dist/_virtual/index7.cjs +1 -1
  19. package/dist/_virtual/index9.cjs +1 -1
  20. package/dist/_virtual/variable-marker.cjs +2 -0
  21. package/dist/_virtual/variable-marker.cjs.map +1 -0
  22. package/dist/_virtual/variable-marker.es.js +5 -0
  23. package/dist/_virtual/variable-marker.es.js.map +1 -0
  24. package/dist/components/ContentRender/ContentRender.cjs +2 -2
  25. package/dist/components/ContentRender/ContentRender.cjs.map +1 -1
  26. package/dist/components/ContentRender/ContentRender.es.js +206 -205
  27. package/dist/components/ContentRender/ContentRender.es.js.map +1 -1
  28. package/dist/components/ContentRender/utils/inline-code-ranges.cjs +9 -9
  29. package/dist/components/ContentRender/utils/inline-code-ranges.cjs.map +1 -1
  30. package/dist/components/ContentRender/utils/inline-code-ranges.d.ts +3 -0
  31. package/dist/components/ContentRender/utils/inline-code-ranges.es.js +185 -161
  32. package/dist/components/ContentRender/utils/inline-code-ranges.es.js.map +1 -1
  33. package/dist/components/ContentRender/utils/mermaid-parse.cjs +4 -4
  34. package/dist/components/ContentRender/utils/mermaid-parse.cjs.map +1 -1
  35. package/dist/components/ContentRender/utils/mermaid-parse.es.js +53 -48
  36. package/dist/components/ContentRender/utils/mermaid-parse.es.js.map +1 -1
  37. package/dist/components/ContentRender/utils/split-content.cjs +6 -6
  38. package/dist/components/ContentRender/utils/split-content.cjs.map +1 -1
  39. package/dist/components/ContentRender/utils/split-content.d.ts +1 -0
  40. package/dist/components/ContentRender/utils/split-content.es.js +361 -313
  41. package/dist/components/ContentRender/utils/split-content.es.js.map +1 -1
  42. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.cjs +1 -1
  43. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.cjs.map +1 -1
  44. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.es.js +278 -283
  45. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.es.js.map +1 -1
  46. package/dist/components/MarkdownFlowEditor/components/VariableSelect.cjs +1 -1
  47. package/dist/components/MarkdownFlowEditor/components/VariableSelect.cjs.map +1 -1
  48. package/dist/components/MarkdownFlowEditor/components/VariableSelect.es.js +57 -58
  49. package/dist/components/MarkdownFlowEditor/components/VariableSelect.es.js.map +1 -1
  50. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.cjs +1 -1
  51. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.d.ts +1 -1
  52. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.es.js +1 -1
  53. package/dist/components/MarkdownFlowEditor/locales/de-DE.json.cjs +1 -1
  54. package/dist/components/MarkdownFlowEditor/locales/de-DE.json.d.ts +1 -1
  55. package/dist/components/MarkdownFlowEditor/locales/de-DE.json.es.js +19 -19
  56. package/dist/components/MarkdownFlowEditor/locales/en-US.json.cjs +1 -1
  57. package/dist/components/MarkdownFlowEditor/locales/en-US.json.d.ts +1 -1
  58. package/dist/components/MarkdownFlowEditor/locales/en-US.json.es.js +5 -5
  59. package/dist/components/MarkdownFlowEditor/locales/es-ES.json.cjs +1 -1
  60. package/dist/components/MarkdownFlowEditor/locales/es-ES.json.d.ts +1 -1
  61. package/dist/components/MarkdownFlowEditor/locales/es-ES.json.es.js +1 -1
  62. package/dist/components/MarkdownFlowEditor/locales/fil-PH.json.cjs +1 -1
  63. package/dist/components/MarkdownFlowEditor/locales/fil-PH.json.d.ts +1 -1
  64. package/dist/components/MarkdownFlowEditor/locales/fil-PH.json.es.js +15 -15
  65. package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.cjs +1 -1
  66. package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.d.ts +1 -1
  67. package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.es.js +13 -13
  68. package/dist/components/MarkdownFlowEditor/locales/ja-JP.json.cjs +1 -1
  69. package/dist/components/MarkdownFlowEditor/locales/ja-JP.json.d.ts +1 -1
  70. package/dist/components/MarkdownFlowEditor/locales/ja-JP.json.es.js +1 -1
  71. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.cjs +1 -1
  72. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.d.ts +1 -1
  73. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.es.js +1 -1
  74. package/dist/components/MarkdownFlowEditor/locales/ur-PK.json.cjs +1 -1
  75. package/dist/components/MarkdownFlowEditor/locales/ur-PK.json.d.ts +1 -1
  76. package/dist/components/MarkdownFlowEditor/locales/ur-PK.json.es.js +1 -1
  77. package/dist/components/MarkdownFlowEditor/locales/vi-VN.json.cjs +1 -1
  78. package/dist/components/MarkdownFlowEditor/locales/vi-VN.json.d.ts +1 -1
  79. package/dist/components/MarkdownFlowEditor/locales/vi-VN.json.es.js +15 -15
  80. package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.cjs +1 -1
  81. package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.d.ts +1 -1
  82. package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.es.js +1 -1
  83. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.cjs +3 -3
  84. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.cjs.map +1 -1
  85. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.es.js +177 -176
  86. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.es.js.map +1 -1
  87. package/dist/components/MarkdownFlowEditor/plugins/VariablePlaceholder.cjs +2 -1
  88. package/dist/components/MarkdownFlowEditor/plugins/VariablePlaceholder.cjs.map +1 -1
  89. package/dist/components/MarkdownFlowEditor/plugins/VariablePlaceholder.d.ts +3 -1
  90. package/dist/components/MarkdownFlowEditor/plugins/VariablePlaceholder.es.js +38 -55
  91. package/dist/components/MarkdownFlowEditor/plugins/VariablePlaceholder.es.js.map +1 -1
  92. package/dist/components/MarkdownFlowEditor/utils.cjs +1 -1
  93. package/dist/components/MarkdownFlowEditor/utils.cjs.map +1 -1
  94. package/dist/components/MarkdownFlowEditor/utils.d.ts +2 -2
  95. package/dist/components/MarkdownFlowEditor/utils.es.js +34 -31
  96. package/dist/components/MarkdownFlowEditor/utils.es.js.map +1 -1
  97. package/dist/components/ui/inputGroup/textarea.cjs +1 -1
  98. package/dist/components/ui/inputGroup/textarea.es.js +1 -1
  99. package/dist/lib/interaction-defaults.cjs +1 -1
  100. package/dist/lib/interaction-defaults.cjs.map +1 -1
  101. package/dist/lib/interaction-defaults.es.js +124 -133
  102. package/dist/lib/interaction-defaults.es.js.map +1 -1
  103. package/dist/lib/interaction-defaults.failure.test.d.ts +1 -0
  104. package/dist/node_modules/classnames/index.cjs +1 -1
  105. package/dist/node_modules/classnames/index.es.js +1 -1
  106. package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.cjs +1 -1
  107. package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.es.js +1 -1
  108. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-AAMF2YG6.cjs +1 -1
  109. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-AAMF2YG6.es.js +1 -1
  110. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-OMD6QJNC.cjs +1 -1
  111. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-OMD6QJNC.es.js +1 -1
  112. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-U37J5Y7L.cjs +1 -1
  113. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-U37J5Y7L.es.js +1 -1
  114. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-WV7ZQ7D5.cjs +1 -1
  115. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-WV7ZQ7D5.es.js +1 -1
  116. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-4MX5Z3NR.cjs +1 -1
  117. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-4MX5Z3NR.es.js +1 -1
  118. package/dist/node_modules/rc-input/es/BaseInput.cjs +1 -1
  119. package/dist/node_modules/rc-input/es/BaseInput.es.js +1 -1
  120. package/dist/node_modules/rc-textarea/es/ResizableTextArea.cjs +1 -1
  121. package/dist/node_modules/rc-textarea/es/ResizableTextArea.es.js +1 -1
  122. package/dist/node_modules/rc-textarea/es/TextArea.cjs +1 -1
  123. package/dist/node_modules/rc-textarea/es/TextArea.es.js +1 -1
  124. package/dist/node_modules/rc-textarea/es/index.cjs +1 -1
  125. package/dist/node_modules/rc-textarea/es/index.es.js +1 -1
  126. package/dist/node_modules/remark-flow/dist/escaping.cjs +2 -2
  127. package/dist/node_modules/remark-flow/dist/escaping.cjs.map +1 -1
  128. package/dist/node_modules/remark-flow/dist/escaping.es.js +128 -63
  129. package/dist/node_modules/remark-flow/dist/escaping.es.js.map +1 -1
  130. package/dist/node_modules/remark-flow/dist/index.cjs +1 -1
  131. package/dist/node_modules/remark-flow/dist/index.cjs.map +1 -1
  132. package/dist/node_modules/remark-flow/dist/index.es.js +49 -37
  133. package/dist/node_modules/remark-flow/dist/index.es.js.map +1 -1
  134. package/dist/node_modules/remark-flow/dist/interaction-parser.cjs +1 -1
  135. package/dist/node_modules/remark-flow/dist/interaction-parser.cjs.map +1 -1
  136. package/dist/node_modules/remark-flow/dist/interaction-parser.es.js +260 -255
  137. package/dist/node_modules/remark-flow/dist/interaction-parser.es.js.map +1 -1
  138. package/dist/node_modules/remark-flow/dist/interaction-plugin-core.cjs +1 -1
  139. package/dist/node_modules/remark-flow/dist/interaction-plugin-core.cjs.map +1 -1
  140. package/dist/node_modules/remark-flow/dist/interaction-plugin-core.es.js +71 -42
  141. package/dist/node_modules/remark-flow/dist/interaction-plugin-core.es.js.map +1 -1
  142. package/dist/node_modules/remark-flow/dist/interaction-syntax.cjs +1 -1
  143. package/dist/node_modules/remark-flow/dist/interaction-syntax.cjs.map +1 -1
  144. package/dist/node_modules/remark-flow/dist/interaction-syntax.es.js +500 -46
  145. package/dist/node_modules/remark-flow/dist/interaction-syntax.es.js.map +1 -1
  146. package/dist/node_modules/remark-flow/dist/variable-marker.cjs +2 -0
  147. package/dist/node_modules/remark-flow/dist/variable-marker.cjs.map +1 -0
  148. package/dist/node_modules/remark-flow/dist/variable-marker.es.js +77 -0
  149. package/dist/node_modules/remark-flow/dist/variable-marker.es.js.map +1 -0
  150. package/dist/node_modules/remark-flow/dist/variable-name.cjs +14 -1
  151. package/dist/node_modules/remark-flow/dist/variable-name.cjs.map +1 -1
  152. package/dist/node_modules/remark-flow/dist/variable-name.es.js +742 -25
  153. package/dist/node_modules/remark-flow/dist/variable-name.es.js.map +1 -1
  154. package/dist/node_modules/style-to-object/cjs/index.cjs +1 -1
  155. package/dist/node_modules/style-to-object/cjs/index.cjs.map +1 -1
  156. package/dist/node_modules/style-to-object/cjs/index.es.js +1 -1
  157. package/dist/node_modules/unified/lib/index.cjs +1 -1
  158. package/dist/node_modules/unified/lib/index.es.js +1 -1
  159. package/package.json +2 -2
@@ -1,60 +1,61 @@
1
- import { jsx as r, jsxs as ze, Fragment as ut } from "react/jsx-runtime";
2
- import Z, { useMemo as f, useState as Fe, useRef as b, useEffect as te } from "react";
3
- import { sanitizeInvalidTagName as lt } from "./utils/sanitize-invalid-tag-name.es.js";
4
- import { stripSvgTextLineBreaks as dt } from "./utils/strip-svg-text-line-breaks.es.js";
1
+ import { jsx as r, jsxs as ze, Fragment as lt } from "react/jsx-runtime";
2
+ import { d as Fe } from "../../_virtual/index.es.js";
3
+ import Z, { useMemo as f, useState as Ge, useRef as b, useEffect as te } from "react";
4
+ import { sanitizeInvalidTagName as dt } from "./utils/sanitize-invalid-tag-name.es.js";
5
+ import { stripSvgTextLineBreaks as mt } from "./utils/strip-svg-text-line-breaks.es.js";
5
6
  /* empty css */
6
7
  /* empty css */
7
8
  /* empty css */
8
9
  /* empty css */
9
- import mt, { CodeBlockContext as pt } from "./CodeBlock.es.js";
10
- import ft from "./plugins/CustomVariable.es.js";
10
+ import pt, { CodeBlockContext as ft } from "./CodeBlock.es.js";
11
+ import ht from "./plugins/CustomVariable.es.js";
11
12
  import Ce from "./plugins/MermaidChart.es.js";
12
- import { preserveCustomVariableProperties as ht, restoreCustomVariableProperties as gt } from "./utils/custom-variable-props.es.js";
13
- import { subsetLanguages as vt, highlightLanguages as xt } from "./utils/highlight-languages.es.js";
14
- import { parseMarkdownSegments as Ge, mermaidBlockIsComplete as yt } from "./utils/mermaid-parse.es.js";
15
- import { getMarkdownSourceAnalysis as wt, getInlineCodeRanges as Ct } from "./utils/inline-code-ranges.es.js";
16
- import { remarkPlugins as Qe } from "./utils/markdown-plugins.es.js";
13
+ import { preserveCustomVariableProperties as gt, restoreCustomVariableProperties as vt } from "./utils/custom-variable-props.es.js";
14
+ import { subsetLanguages as xt, highlightLanguages as yt } from "./utils/highlight-languages.es.js";
15
+ import { parseMarkdownSegments as _e, mermaidBlockIsComplete as wt } from "./utils/mermaid-parse.es.js";
16
+ import { getMarkdownSourceAnalysis as Ct, getInlineCodeRanges as kt } from "./utils/inline-code-ranges.es.js";
17
+ import { remarkPlugins as Oe } from "./utils/markdown-plugins.es.js";
17
18
  import { normalizeInlineHtml as ye } from "./utils/normalize-inline-html.es.js";
18
19
  import { escapeTypedMarkdownMetadata as ke } from "./utils/escape-typed-metadata.es.js";
19
- import kt from "./IframeSandbox.es.js";
20
- import { getTrailingTypewriterGrapheme as we, appendContentAwareTypewriterQueue as _e, consumeContentAwareTypewriterQueue as Tt, CONTENT_AWARE_TYPEWRITER_TICK_BUDGET as bt, isContentAwareTypewriterQueueEmpty as St } from "./utils/typewriter-pacing.es.js";
21
- import { normalizeWrappedSandboxContent as Rt, splitContentSegments as Bt } from "./utils/split-content.es.js";
22
- import { getInteractionDefaultValues as Nt } from "../../lib/interaction-defaults.es.js";
23
- import { getMarkdownFlowDirection as Lt, getMarkdownFlowLanguage as Mt } from "../../lib/locale.es.js";
20
+ import Tt from "./IframeSandbox.es.js";
21
+ import { getTrailingTypewriterGrapheme as we, appendContentAwareTypewriterQueue as je, consumeContentAwareTypewriterQueue as bt, CONTENT_AWARE_TYPEWRITER_TICK_BUDGET as St, isContentAwareTypewriterQueueEmpty as Rt } from "./utils/typewriter-pacing.es.js";
22
+ import { normalizeWrappedSandboxContent as Bt, splitContentSegments as Nt } from "./utils/split-content.es.js";
23
+ import { getInteractionDefaultValues as Lt } from "../../lib/interaction-defaults.es.js";
24
+ import { getMarkdownFlowDirection as Mt, getMarkdownFlowLanguage as At } from "../../lib/locale.es.js";
24
25
  import { getContentRenderLocaleTexts as be } from "./contentRenderI18n.es.js";
25
- import { createVideoMarkdownRunPlan as At, cloneVideoMarkdownSourceTree as Vt, prepareVideoMarkdownRun as $t, projectVideoMarkdownRun as Et, getVideoMarkdownNodeState as It } from "./utils/video-markdown-run.es.js";
26
- import { unified as je } from "../../node_modules/unified/lib/index.es.js";
27
- import Pt from "../../node_modules/remark-rehype/lib/index.es.js";
28
- import Dt from "../../node_modules/rehype-raw/lib/index.es.js";
29
- import Wt from "../../node_modules/rehype-highlight/lib/index.es.js";
30
- import zt from "../../node_modules/rehype-katex/lib/index.es.js";
31
- import { Markdown as Oe } from "../../node_modules/react-markdown/lib/index.es.js";
32
- const Ft = 2, Te = ({
26
+ import { createVideoMarkdownRunPlan as Vt, cloneVideoMarkdownSourceTree as $t, prepareVideoMarkdownRun as Et, projectVideoMarkdownRun as Pt, getVideoMarkdownNodeState as It } from "./utils/video-markdown-run.es.js";
27
+ import { unified as He } from "../../node_modules/unified/lib/index.es.js";
28
+ import Dt from "../../node_modules/remark-rehype/lib/index.es.js";
29
+ import Wt from "../../node_modules/rehype-raw/lib/index.es.js";
30
+ import zt from "../../node_modules/rehype-highlight/lib/index.es.js";
31
+ import Ft from "../../node_modules/rehype-katex/lib/index.es.js";
32
+ import { Markdown as Ue } from "../../node_modules/react-markdown/lib/index.es.js";
33
+ const Gt = 2, Te = ({
33
34
  svg: t,
34
35
  inline: o = !1
35
36
  }) => {
36
- const s = b(null), a = o ? "span" : "div";
37
+ const s = b(null), c = o ? "span" : "div";
37
38
  return te(() => {
38
- const i = s.current;
39
- if (!i) return;
40
- const l = i.shadowRoot ?? i.attachShadow({ mode: "open" }), x = "content-render-svg-style";
39
+ const u = s.current;
40
+ if (!u) return;
41
+ const l = u.shadowRoot ?? u.attachShadow({ mode: "open" }), x = "content-render-svg-style";
41
42
  let g = l.getElementById(x);
42
43
  g || (g = document.createElement("style"), g.id = x, g.textContent = `
43
44
  svg { height: auto; display: inline-block; }
44
45
  svg.content-render-svg-el--responsive { width: 100%; max-width: 100%; }
45
46
  svg.content-render-svg-el--fixed { max-width: none; }
46
47
  `, l.appendChild(g)), Array.from(l.childNodes).filter(
47
- (u) => u !== g
48
- ).forEach((u) => l.removeChild(u));
49
- const y = document.createElement("template"), S = dt(t);
48
+ (i) => i !== g
49
+ ).forEach((i) => l.removeChild(i));
50
+ const y = document.createElement("template"), S = mt(t);
50
51
  y.innerHTML = S, l.append(y.content.cloneNode(!0));
51
52
  let R = !1, T = !1;
52
- l.querySelectorAll("svg").forEach((u) => {
53
- const P = u.getAttribute("viewBox");
54
- if (!P) return;
55
- const D = P.trim().split(/[\s,]+/).map((L) => Number(L));
53
+ l.querySelectorAll("svg").forEach((i) => {
54
+ const I = i.getAttribute("viewBox");
55
+ if (!I) return;
56
+ const D = I.trim().split(/[\s,]+/).map((L) => Number(L));
56
57
  if (D.length !== 4 || D.some(Number.isNaN)) return;
57
- const [, , W, C] = D, U = u.getAttribute("width"), z = u.getAttribute("height"), K = (L) => {
58
+ const [, , W, C] = D, U = i.getAttribute("width"), z = i.getAttribute("height"), K = (L) => {
58
59
  if (!L) return !1;
59
60
  const M = L.trim().toLowerCase();
60
61
  return M === "auto" || M.endsWith("%");
@@ -67,32 +68,32 @@ const Ft = 2, Te = ({
67
68
  return Number.isNaN(q) ? null : q;
68
69
  }, ue = K(U), le = K(z), re = !U || U === "0", oe = !z || z === "0", de = ne(U), se = ne(z);
69
70
  if (ue || le || re && oe || de === W && se === C) {
70
- R = !0, u.classList.add("content-render-svg-el--responsive"), u.classList.remove("content-render-svg-el--fixed"), u.style.width = "100%", u.style.height = "auto", !u.style.aspectRatio && C > 0 && (u.style.aspectRatio = `${W} / ${C}`);
71
+ R = !0, i.classList.add("content-render-svg-el--responsive"), i.classList.remove("content-render-svg-el--fixed"), i.style.width = "100%", i.style.height = "auto", !i.style.aspectRatio && C > 0 && (i.style.aspectRatio = `${W} / ${C}`);
71
72
  return;
72
73
  }
73
- T = !0, u.classList.add("content-render-svg-el--fixed"), u.classList.remove("content-render-svg-el--responsive"), re && W > 0 && u.setAttribute("width", `${W}`), oe && C > 0 && u.setAttribute("height", `${C}`);
74
+ T = !0, i.classList.add("content-render-svg-el--fixed"), i.classList.remove("content-render-svg-el--responsive"), re && W > 0 && i.setAttribute("width", `${W}`), oe && C > 0 && i.setAttribute("height", `${C}`);
74
75
  });
75
76
  const p = R && !T;
76
- i.classList.toggle("content-render-svg--responsive", p), i.classList.toggle("content-render-svg--fixed", !p);
77
- }, [t]), /* @__PURE__ */ r(a, { className: "content-render-svg-scroll", children: /* @__PURE__ */ r(
78
- a,
77
+ u.classList.toggle("content-render-svg--responsive", p), u.classList.toggle("content-render-svg--fixed", !p);
78
+ }, [t]), /* @__PURE__ */ r(c, { className: "content-render-svg-scroll", children: /* @__PURE__ */ r(
79
+ c,
79
80
  {
80
81
  className: "content-render-svg",
81
- ref: (i) => {
82
- s.current = i;
82
+ ref: (u) => {
83
+ s.current = u;
83
84
  }
84
85
  }
85
86
  ) });
86
87
  }, ie = Z.createContext(
87
88
  null
88
- ), Ue = (t) => {
89
- const { receivedTree: o, ...s } = t, a = Z.useContext(ie), i = Z.useContext(pt);
90
- if (!a)
89
+ ), Ke = (t) => {
90
+ const { receivedTree: o, ...s } = t, c = Z.useContext(ie), u = Z.useContext(ft);
91
+ if (!c)
91
92
  throw new Error("Markdown code renderer requires ContentRender context.");
92
93
  const { className: l, children: x, ...g } = s;
93
94
  if (/language-(\w+)/.exec(l || "")?.[1] === "mermaid") {
94
- const S = x?.toString().replace(/\n$/, "") || "", R = yt(
95
- a.current.renderContent,
95
+ const S = x?.toString().replace(/\n$/, "") || "", R = wt(
96
+ c.current.renderContent,
96
97
  S
97
98
  );
98
99
  return /* @__PURE__ */ r(
@@ -100,7 +101,7 @@ const Ft = 2, Te = ({
100
101
  {
101
102
  chart: S,
102
103
  frozen: o ? !R : R,
103
- messages: a.current.mermaidMessages
104
+ messages: c.current.mermaidMessages
104
105
  }
105
106
  );
106
107
  }
@@ -109,62 +110,62 @@ const Ft = 2, Te = ({
109
110
  {
110
111
  className: l,
111
112
  ...g,
112
- dir: g.dir ?? (i ? void 0 : "ltr"),
113
+ dir: g.dir ?? (u ? void 0 : "ltr"),
113
114
  children: x
114
115
  }
115
116
  );
116
- }, Ke = [
117
- ht,
118
- Dt,
119
- lt,
120
- gt
121
- ], Ye = [
122
- [Wt, { languages: xt, subset: vt }],
123
- zt
124
- ], Gt = [
125
- ...Ke,
126
- ...Ye
127
- ], He = ({ content: t, components: o, locale: s }) => {
128
- const a = be(s);
117
+ }, Ye = [
118
+ gt,
119
+ Wt,
120
+ dt,
121
+ vt
122
+ ], Xe = [
123
+ [zt, { languages: yt, subset: xt }],
124
+ Ft
125
+ ], _t = [
126
+ ...Ye,
127
+ ...Xe
128
+ ], qe = ({ content: t, components: o, locale: s }) => {
129
+ const c = be(s);
129
130
  return /* @__PURE__ */ r("div", { className: "markdown-renderer", children: /* @__PURE__ */ r(
130
- Oe,
131
+ Ue,
131
132
  {
132
- remarkPlugins: Qe,
133
- rehypePlugins: Gt,
133
+ remarkPlugins: Oe,
134
+ rehypePlugins: _t,
134
135
  remarkRehypeOptions: {
135
- footnoteLabel: a.footnoteLabel,
136
- footnoteBackLabel: (i, l) => {
137
- const x = String(i + 1) + (l > 1 ? `-${l}` : "");
138
- return a.footnoteBackLabel.replace("{reference}", x);
136
+ footnoteLabel: c.footnoteLabel,
137
+ footnoteBackLabel: (u, l) => {
138
+ const x = String(u + 1) + (l > 1 ? `-${l}` : "");
139
+ return c.footnoteBackLabel.replace("{reference}", x);
139
140
  }
140
141
  },
141
142
  components: o,
142
143
  children: t
143
144
  }
144
145
  ) });
145
- }, _t = function() {
146
+ }, jt = function() {
146
147
  this.parser = () => ({ type: "root", children: [] });
147
- }, jt = ({ plan: t, renderedSegments: o, components: s, locale: a }) => {
148
- const i = f(() => {
149
- const S = be(a), R = je().use(Qe).use(Pt, {
148
+ }, Ht = ({ plan: t, renderedSegments: o, components: s, locale: c }) => {
149
+ const u = f(() => {
150
+ const S = be(c), R = He().use(Oe).use(Dt, {
150
151
  allowDangerousHtml: !0,
151
152
  footnoteLabel: S.footnoteLabel,
152
- footnoteBackLabel: (u, P) => S.footnoteBackLabel.replace(
153
+ footnoteBackLabel: (i, I) => S.footnoteBackLabel.replace(
153
154
  "{reference}",
154
- String(u + 1) + (P > 1 ? `-${P}` : "")
155
+ String(i + 1) + (I > 1 ? `-${I}` : "")
155
156
  )
156
- }).use(Ke), T = je().use(Ye), p = R.runSync(
157
- Vt(t),
157
+ }).use(Ye), T = He().use(Xe), p = R.runSync(
158
+ $t(t),
158
159
  t.markdownSource
159
160
  );
160
- return $t(
161
+ return Et(
161
162
  t,
162
163
  p,
163
- (u) => T.runSync(u, t.fullSource)
164
+ (i) => T.runSync(i, t.fullSource)
164
165
  );
165
- }, [t, a]), l = f(
166
- () => Et(i, o),
167
- [i, o]
166
+ }, [t, c]), l = f(
167
+ () => Pt(u, o),
168
+ [u, o]
168
169
  ), x = b(s);
169
170
  x.current = s;
170
171
  const g = b(
@@ -173,51 +174,51 @@ const Ft = 2, Te = ({
173
174
  const S = /* @__PURE__ */ new Set(), R = (p) => {
174
175
  p.type === "element" && S.add(p.tagName), "children" in p && p.children.forEach(R);
175
176
  };
176
- R(i.tree);
177
+ R(u.tree);
177
178
  const T = {};
178
179
  for (const p of S) {
179
180
  if (!g.current.has(p)) {
180
- const u = ({
181
- node: P,
181
+ const i = ({
182
+ node: I,
182
183
  children: D,
183
184
  ...W
184
185
  }) => {
185
- const C = It(P);
186
+ const C = It(I);
186
187
  if (C?.svg)
187
188
  return C.svgSource ? /* @__PURE__ */ r(Te, { svg: C.svgSource, inline: !0 }) : null;
188
189
  if (C?.atomic)
189
- return C.active ? /* @__PURE__ */ r(ut, { children: D }) : null;
190
+ return C.active ? /* @__PURE__ */ r(lt, { children: D }) : null;
190
191
  if (C?.active === !1 && p !== "a") return null;
191
192
  const z = x.current[p], K = C?.active === !1 ? { ...W, href: void 0, tabIndex: -1 } : W;
192
193
  return z ? Z.createElement(
193
194
  z,
194
195
  {
195
196
  ...K,
196
- node: P,
197
- ...z === Ue ? { receivedTree: !0 } : {}
197
+ node: I,
198
+ ...z === Ke ? { receivedTree: !0 } : {}
198
199
  },
199
200
  D
200
201
  ) : Z.createElement(p, K, D);
201
202
  };
202
- u.displayName = `StableMarkdown(${p})`, g.current.set(p, u);
203
+ i.displayName = `StableMarkdown(${p})`, g.current.set(p, i);
203
204
  }
204
205
  T[p] = g.current.get(p);
205
206
  }
206
207
  return T;
207
- }, [i]), y = f(
208
+ }, [u]), y = f(
208
209
  () => [() => () => l],
209
210
  [l]
210
211
  );
211
212
  return /* @__PURE__ */ r("div", { className: "markdown-renderer", children: /* @__PURE__ */ r(
212
- Oe,
213
+ Ue,
213
214
  {
214
- remarkPlugins: [_t],
215
+ remarkPlugins: [jt],
215
216
  rehypePlugins: y,
216
217
  components: ee,
217
218
  children: ""
218
219
  }
219
220
  ) });
220
- }, H = (t) => t.type === "markdown" && t.immediate === !0, Ht = (t) => {
221
+ }, H = (t) => t.type === "markdown" && t.immediate === !0, qt = (t) => {
221
222
  if (t.length <= 1) return t;
222
223
  const o = [];
223
224
  return t.forEach((s) => {
@@ -225,45 +226,45 @@ const Ft = 2, Te = ({
225
226
  o.push(s);
226
227
  return;
227
228
  }
228
- const a = o[o.length - 1];
229
- if (a && a.type !== "sandbox" && !H(a)) {
229
+ const c = o[o.length - 1];
230
+ if (c && c.type !== "sandbox" && !H(c)) {
230
231
  o[o.length - 1] = {
231
232
  type: "markdown",
232
- value: `${a.value}${s.value}`
233
+ value: `${c.value}${s.value}`
233
234
  };
234
235
  return;
235
236
  }
236
237
  o.push({ type: "markdown", value: s.value });
237
238
  }), o;
238
- }, qt = (t, o, s) => {
239
+ }, Qt = (t, o, s) => {
239
240
  if (t.length >= o.length) return t;
240
- const a = s.find(
241
+ const c = s.find(
241
242
  ({ start: x, end: g }) => x < t.length && t.length < g
242
243
  );
243
- if (!a) return t;
244
- const i = /^`+/.exec(o.slice(a.start))?.[0];
245
- if (!i || t.length < a.start + i.length)
244
+ if (!c) return t;
245
+ const u = /^`+/.exec(o.slice(c.start))?.[0];
246
+ if (!u || t.length < c.start + u.length)
246
247
  return t;
247
- const l = a.end - i.length;
248
- return t.length > l ? t + i.slice(t.length - l) : t + (t.endsWith("`") ? " " : "") + i;
249
- }, qe = (t, o, s, a, i = 0) => {
250
- const l = qt(t, o, s);
251
- return ke(t, a, i) + l.slice(t.length);
252
- }, Qt = (t, o) => {
253
- const s = Math.max(1, o), a = Array.from(t);
248
+ const l = c.end - u.length;
249
+ return t.length > l ? t + u.slice(t.length - l) : t + (t.endsWith("`") ? " " : "") + u;
250
+ }, Qe = (t, o, s, c, u = 0) => {
251
+ const l = Qt(t, o, s);
252
+ return ke(t, c, u) + l.slice(t.length);
253
+ }, Ot = (t, o) => {
254
+ const s = Math.max(1, o), c = Array.from(t);
254
255
  return {
255
- chunk: a.slice(0, s).join(""),
256
- rest: a.slice(s).join("")
256
+ chunk: c.slice(0, s).join(""),
257
+ rest: c.slice(s).join("")
257
258
  };
258
- }, Ot = (t, o) => t === o ? !0 : !t || !o || t.length !== o.length ? !1 : t.every((s, a) => s === o[a]), Ut = (t) => {
259
+ }, Ut = (t, o) => t === o ? !0 : !t || !o || t.length !== o.length ? !1 : t.every((s, c) => s === o[c]), Kt = (t) => {
259
260
  const o = b(t);
260
- return Ot(o.current, t) || (o.current = t), o.current;
261
- }, Ln = ({
261
+ return Ut(o.current, t) || (o.current = t), o.current;
262
+ }, An = ({
262
263
  content: t,
263
264
  contentType: o,
264
265
  locale: s,
265
- lang: a,
266
- dir: i,
266
+ lang: c,
267
+ dir: u,
267
268
  customRenderBar: l,
268
269
  onSend: x,
269
270
  typingSpeed: g = 30,
@@ -273,8 +274,8 @@ const Ft = 2, Te = ({
273
274
  onTypewriterStateChange: R,
274
275
  userInput: T,
275
276
  interactionDefaultValueOptions: p,
276
- defaultButtonText: u,
277
- defaultInputText: P,
277
+ defaultButtonText: i,
278
+ defaultInputText: I,
278
279
  defaultSelectedValues: D,
279
280
  readonly: W = !1,
280
281
  confirmButtonText: C,
@@ -298,33 +299,33 @@ const Ft = 2, Te = ({
298
299
  error: F.mermaidErrorText
299
300
  }),
300
301
  [F]
301
- ), M = i ?? Lt(s), q = a ?? Mt(s), Se = C || F.confirmButtonText, Re = U || F.copyButtonText, Be = z || F.copiedButtonText, Xe = re || F.sandboxFullscreenButtonText, Ze = oe || F.sandboxExitFullscreenButtonText, m = !!ee && (!o || o === "text"), B = f(
302
- () => Rt(t),
302
+ ), M = u ?? Mt(s), q = c ?? At(s), Se = C || F.confirmButtonText, Re = U || F.copyButtonText, Be = z || F.copiedButtonText, Ze = re || F.sandboxFullscreenButtonText, Je = oe || F.sandboxExitFullscreenButtonText, m = !!ee && (!o || o === "text"), B = f(
303
+ () => Bt(t),
303
304
  [t]
304
305
  ), A = f(
305
- () => wt(B),
306
+ () => Ct(B),
306
307
  [B]
307
308
  ), w = f(() => {
308
- const e = Ht(
309
- Bt(B, !0, !0, A)
309
+ const e = qt(
310
+ Nt(B, !0, !0, A)
310
311
  );
311
312
  return B !== t && e.length && (e[0].type === "sandbox" || H(e[0])) ? [{ type: "text", value: "" }, ...e] : e;
312
313
  }, [t, B, A]), Y = w.some(
313
314
  (e) => e.type === "sandbox" || H(e)
314
315
  ), h = Y ? w.filter(
315
316
  (e) => e.type !== "sandbox" && !H(e)
316
- ).map((e) => e.value).join("") : B, Ne = Math.max(0, g), Je = y === "fixed" ? h : void 0, [E, Le] = Fe(
317
+ ).map((e) => e.value).join("") : B, Ne = Math.max(0, g), et = y === "fixed" ? h : void 0, [E, Le] = Ge(
317
318
  () => m ? "" : h
318
- ), ae = b(E), V = b(""), I = b({
319
+ ), ae = b(E), V = b(""), P = b({
319
320
  tokens: [],
320
321
  head: 0,
321
322
  trailingGrapheme: ""
322
- }), Q = b(0), Me = b(m), Ae = b(y), Ve = b(h), pe = b(t), fe = b(!1), [et, tt] = Fe(0);
323
+ }), Q = b(0), Me = b(m), Ae = b(y), Ve = b(h), pe = b(t), fe = b(!1), [tt, nt] = Ge(0);
323
324
  te(() => {
324
- const e = Me.current, n = Ae.current, c = Ve.current, d = !!V.current, k = pe.current !== t, xe = k && t.startsWith(pe.current);
325
+ const e = Me.current, n = Ae.current, a = Ve.current, d = !!V.current, k = pe.current !== t, xe = k && t.startsWith(pe.current);
325
326
  pe.current = t, Me.current = m, Ae.current = y, Ve.current = h, (k || m !== e) && (fe.current = !1);
326
327
  const X = () => {
327
- V.current = "", I.current = {
328
+ V.current = "", P.current = {
328
329
  tokens: [],
329
330
  head: 0,
330
331
  trailingGrapheme: ""
@@ -340,7 +341,7 @@ const Ft = 2, Te = ({
340
341
  let $ = e ? ae.current : "";
341
342
  if (!h.startsWith($)) {
342
343
  if (X(), !xe) {
343
- J(h), y === "content-aware" && (I.current = {
344
+ J(h), y === "content-aware" && (P.current = {
344
345
  tokens: [],
345
346
  head: 0,
346
347
  trailingGrapheme: we(h)
@@ -354,7 +355,7 @@ const Ft = 2, Te = ({
354
355
  }
355
356
  let O = h.slice($.length);
356
357
  if (!O) {
357
- V.current = "", Q.current = 0, I.current = y === "content-aware" ? {
358
+ V.current = "", Q.current = 0, P.current = y === "content-aware" ? {
358
359
  tokens: [],
359
360
  head: 0,
360
361
  trailingGrapheme: we($)
@@ -362,19 +363,19 @@ const Ft = 2, Te = ({
362
363
  return;
363
364
  }
364
365
  if (y === "content-aware") {
365
- const N = c.slice(
366
+ const N = a.slice(
366
367
  $.length
367
368
  );
368
- if (e && n === "content-aware" && h.startsWith(c) && V.current === N) {
369
- const j = _e(
370
- I.current,
371
- h.slice(c.length)
369
+ if (e && n === "content-aware" && h.startsWith(a) && V.current === N) {
370
+ const j = je(
371
+ P.current,
372
+ h.slice(a.length)
372
373
  );
373
- I.current = j.queue, j.immediateChunk && (O = O.slice(
374
+ P.current = j.queue, j.immediateChunk && (O = O.slice(
374
375
  j.immediateChunk.length
375
376
  ), J(`${$}${j.immediateChunk}`));
376
377
  } else {
377
- const j = _e(
378
+ const j = je(
378
379
  {
379
380
  tokens: [],
380
381
  head: 0,
@@ -382,17 +383,17 @@ const Ft = 2, Te = ({
382
383
  },
383
384
  O
384
385
  );
385
- I.current = j.queue, j.immediateChunk && (O = O.slice(
386
+ P.current = j.queue, j.immediateChunk && (O = O.slice(
386
387
  j.immediateChunk.length
387
388
  ), J(`${$}${j.immediateChunk}`)), Q.current = 0;
388
389
  }
389
390
  } else
390
- I.current = {
391
+ P.current = {
391
392
  tokens: [],
392
393
  head: 0,
393
394
  trailingGrapheme: ""
394
395
  }, Q.current = 0;
395
- V.current = O, !d && O && tt((N) => N + 1);
396
+ V.current = O, !d && O && nt((N) => N + 1);
396
397
  }, [t, h, m, y]), te(() => {
397
398
  m && (fe.current || V.current || E !== h || (fe.current = !0, S?.()));
398
399
  }, [
@@ -409,34 +410,34 @@ const Ft = 2, Te = ({
409
410
  return;
410
411
  let n = "";
411
412
  if (y === "content-aware") {
412
- const d = Tt(
413
- I.current,
414
- Q.current + bt
413
+ const d = bt(
414
+ P.current,
415
+ Q.current + St
415
416
  );
416
- n = d.chunk, I.current = d.queue, St(d.queue) ? Q.current = 0 : Q.current = d.remainingBudget;
417
+ n = d.chunk, P.current = d.queue, Rt(d.queue) ? Q.current = 0 : Q.current = d.remainingBudget;
417
418
  } else
418
- n = Qt(
419
+ n = Ot(
419
420
  V.current,
420
- Ft
421
+ Gt
421
422
  ).chunk;
422
423
  if (!n)
423
424
  return;
424
- V.current = V.current.slice(n.length), V.current || (I.current = y === "content-aware" ? {
425
+ V.current = V.current.slice(n.length), V.current || (P.current = y === "content-aware" ? {
425
426
  tokens: [],
426
427
  head: 0,
427
- trailingGrapheme: I.current.trailingGrapheme
428
+ trailingGrapheme: P.current.trailingGrapheme
428
429
  } : { tokens: [], head: 0, trailingGrapheme: "" }, Q.current = 0);
429
- const c = `${ae.current}${n}`;
430
- ae.current = c, Le(c);
430
+ const a = `${ae.current}${n}`;
431
+ ae.current = a, Le(a);
431
432
  }, Ne);
432
433
  return () => window.clearTimeout(e);
433
434
  }, [
434
435
  E,
435
- Je,
436
+ et,
436
437
  m,
437
438
  y,
438
439
  Ne,
439
- et
440
+ tt
440
441
  ]);
441
442
  const G = f(() => {
442
443
  let e = 0;
@@ -444,11 +445,11 @@ const Ft = 2, Te = ({
444
445
  if (!m) return n;
445
446
  if (n.type === "sandbox" || H(n))
446
447
  return E.length >= e ? n : { ...n, value: "" };
447
- const c = E.slice(
448
+ const a = E.slice(
448
449
  e,
449
450
  e + n.value.length
450
451
  );
451
- return e += n.value.length, { ...n, value: c };
452
+ return e += n.value.length, { ...n, value: a };
452
453
  });
453
454
  }, [w, E, m]), $e = f(
454
455
  () => ({
@@ -456,7 +457,7 @@ const Ft = 2, Te = ({
456
457
  isTyping: m && E !== h,
457
458
  isComplete: E === h,
458
459
  renderedLength: t.length - w.reduce(
459
- (e, n, c) => e + n.value.length - G[c].value.length,
460
+ (e, n, a) => e + n.value.length - G[a].value.length,
460
461
  0
461
462
  ),
462
463
  totalLength: t.length
@@ -476,17 +477,17 @@ const Ft = 2, Te = ({
476
477
  const he = f(() => {
477
478
  let e = 0;
478
479
  return w.map((n) => {
479
- const c = e;
480
- return e += n.value.length, c;
480
+ const a = e;
481
+ return e += n.value.length, a;
481
482
  });
482
483
  }, [w]), ce = f(
483
484
  () => m ? w.map(
484
- (e) => e.type === "sandbox" || H(e) ? [] : e.value === B ? A.inline : Ct(e.value)
485
+ (e) => e.type === "sandbox" || H(e) ? [] : e.value === B ? A.inline : kt(e.value)
485
486
  ) : [],
486
487
  [m, w, B, A]
487
- ), nt = f(
488
+ ), rt = f(
488
489
  () => Y ? G.map(
489
- (e, n) => e.type === "sandbox" || H(e) ? e.value : m ? qe(
490
+ (e, n) => e.type === "sandbox" || H(e) ? e.value : m ? Qe(
490
491
  e.value,
491
492
  w[n].value,
492
493
  ce[n] ?? [],
@@ -507,27 +508,27 @@ const Ft = 2, Te = ({
507
508
  A.metadata,
508
509
  he
509
510
  ]
510
- ), rt = f(() => {
511
+ ), ot = f(() => {
511
512
  const e = [];
512
- w.forEach((n, c) => {
513
+ w.forEach((n, a) => {
513
514
  const d = e.at(-1);
514
- n.type !== "sandbox" && d && !d.sandbox ? d.indices.push(c) : e.push({ indices: [c], sandbox: n.type === "sandbox" });
515
+ n.type !== "sandbox" && d && !d.sandbox ? d.indices.push(a) : e.push({ indices: [a], sandbox: n.type === "sandbox" });
515
516
  });
516
517
  for (const n of e)
517
- if (!n.sandbox && n.indices.some((c) => H(w[c]))) {
518
- const c = n.indices.map((k) => w[k]), d = c.map((k) => k.value).join("");
519
- n.plan = At(
520
- c,
518
+ if (!n.sandbox && n.indices.some((a) => H(w[a]))) {
519
+ const a = n.indices.map((k) => w[k]), d = a.map((k) => k.value).join("");
520
+ n.plan = Vt(
521
+ a,
521
522
  d === B ? A : void 0
522
523
  );
523
524
  }
524
525
  return e;
525
- }, [w, B, A]), _ = Y ? G.map((e) => e.value).join("") : m ? E : B, ot = f(
526
+ }, [w, B, A]), _ = Y ? G.map((e) => e.value).join("") : m ? E : B, st = f(
526
527
  () => l ? ye(_) : "",
527
528
  [l, _]
528
529
  ), Ee = f(
529
530
  () => Y ? "" : ye(
530
- m ? qe(
531
+ m ? Qe(
531
532
  _,
532
533
  B,
533
534
  ce[0] ?? [],
@@ -546,17 +547,17 @@ const Ft = 2, Te = ({
546
547
  A.metadata
547
548
  ]
548
549
  ), ge = f(
549
- () => Nt(
550
+ () => Lt(
550
551
  _,
551
552
  T,
552
553
  p
553
554
  ),
554
555
  [p, _, T]
555
- ), Ie = u?.trim() || ge.buttonText, Pe = P?.trim() || ge.inputText, st = f(
556
- () => T ? T.split(",").map((e) => e.trim()).filter(Boolean) : void 0,
556
+ ), Pe = (i ? Fe.trimVariablePadding(i) : void 0) || ge.buttonText, Ie = I?.trim() || ge.inputText, at = f(
557
+ () => T ? T.split(",").map((e) => Fe.trimVariablePadding(e)).filter(Boolean) : void 0,
557
558
  [T]
558
- ), at = D?.length ? D : ge.selectedValues || st, De = Ut(
559
- at
559
+ ), ct = D?.length ? D : ge.selectedValues || at, De = Kt(
560
+ ct
560
561
  ), v = b({
561
562
  direction: M,
562
563
  language: q,
@@ -570,8 +571,8 @@ const Ft = 2, Te = ({
570
571
  resolvedConfirmButtonText: Se,
571
572
  resolvedCopiedButtonText: Be,
572
573
  resolvedCopyButtonText: Re,
573
- resolvedDefaultButtonText: Ie,
574
- resolvedDefaultInputText: Pe,
574
+ resolvedDefaultButtonText: Pe,
575
+ resolvedDefaultInputText: Ie,
575
576
  resolvedDefaultSelectedValues: De
576
577
  });
577
578
  v.current = {
@@ -587,8 +588,8 @@ const Ft = 2, Te = ({
587
588
  resolvedConfirmButtonText: Se,
588
589
  resolvedCopiedButtonText: Be,
589
590
  resolvedCopyButtonText: Re,
590
- resolvedDefaultButtonText: Ie,
591
- resolvedDefaultInputText: Pe,
591
+ resolvedDefaultButtonText: Pe,
592
+ resolvedDefaultInputText: Ie,
592
593
  resolvedDefaultSelectedValues: De
593
594
  };
594
595
  const ve = f(
@@ -604,7 +605,7 @@ const Ft = 2, Te = ({
604
605
  }
605
606
  ),
606
607
  "custom-variable": (e) => /* @__PURE__ */ r(
607
- ft,
608
+ ht,
608
609
  {
609
610
  ...e,
610
611
  readonly: v.current.readonly,
@@ -619,14 +620,14 @@ const Ft = 2, Te = ({
619
620
  confirmButtonText: v.current.resolvedConfirmButtonText
620
621
  }
621
622
  ),
622
- code: Ue,
623
+ code: Ke,
623
624
  table: ({ ...e }) => /* @__PURE__ */ r("div", { className: "content-render-table-container", children: /* @__PURE__ */ r("table", { className: "content-render-table", ...e }) }),
624
625
  th: ({ ...e }) => /* @__PURE__ */ r("th", { className: "content-render-th", ...e }),
625
626
  td: ({ ...e }) => /* @__PURE__ */ r("td", { className: "content-render-td", ...e }),
626
627
  tr: ({ ...e }) => /* @__PURE__ */ r("tr", { className: "content-render-tr", ...e }),
627
628
  li: ({ node: e, ...n }) => {
628
- const c = e?.properties?.className;
629
- return typeof c == "string" && c.includes("task-list-item") || Array.isArray(c) && c.includes("task-list-item") ? /* @__PURE__ */ r("li", { className: "content-render-task-list-item", ...n }) : /* @__PURE__ */ r("li", { ...n });
629
+ const a = e?.properties?.className;
630
+ return typeof a == "string" && a.includes("task-list-item") || Array.isArray(a) && a.includes("task-list-item") ? /* @__PURE__ */ r("li", { className: "content-render-task-list-item", ...n }) : /* @__PURE__ */ r("li", { ...n });
630
631
  },
631
632
  ol: ({ ...e }) => /* @__PURE__ */ r("ol", { className: "content-render-ol", ...e }),
632
633
  ul: ({ ...e }) => /* @__PURE__ */ r("ul", { className: "content-render-ul", ...e }),
@@ -641,7 +642,7 @@ const Ft = 2, Te = ({
641
642
  ) : /* @__PURE__ */ r("input", { ...e }),
642
643
  a: ({ children: e, ...n }) => /* @__PURE__ */ r("a", { target: "_blank", rel: "noopener noreferrer", ...n, children: e }),
643
644
  pre: (e) => /* @__PURE__ */ r(
644
- mt,
645
+ pt,
645
646
  {
646
647
  ...e,
647
648
  copyButtonText: v.current.resolvedCopyButtonText,
@@ -650,19 +651,19 @@ const Ft = 2, Te = ({
650
651
  )
651
652
  }),
652
653
  []
653
- ), ct = f(
654
- () => Ge(Ee),
654
+ ), it = f(
655
+ () => _e(Ee),
655
656
  [Ee]
656
- ), it = (e, n) => {
657
- const c = ye(e);
658
- return Ge(c).map((k, xe) => {
657
+ ), ut = (e, n) => {
658
+ const a = ye(e);
659
+ return _e(a).map((k, xe) => {
659
660
  const X = `${n}-${k.type}-${xe}`;
660
661
  return k.type === "text" ? /* @__PURE__ */ r(
661
662
  ie.Provider,
662
663
  {
663
664
  value: v,
664
665
  children: /* @__PURE__ */ r(
665
- He,
666
+ qe,
666
667
  {
667
668
  locale: s,
668
669
  components: ve,
@@ -683,7 +684,7 @@ const Ft = 2, Te = ({
683
684
  });
684
685
  }, We = l ? /* @__PURE__ */ r("div", { className: "content-render-custom-bar", children: Z.createElement(l, {
685
686
  content: t,
686
- displayContent: ot,
687
+ displayContent: st,
687
688
  onSend: x
688
689
  }) }) : null;
689
690
  return Y ? /* @__PURE__ */ ze(
@@ -693,14 +694,14 @@ const Ft = 2, Te = ({
693
694
  dir: M,
694
695
  lang: q,
695
696
  children: [
696
- rt.map((e) => {
697
- const n = e.indices[0], c = G[n];
698
- return e.sandbox ? c.value ? /* @__PURE__ */ r(
699
- kt,
697
+ ot.map((e) => {
698
+ const n = e.indices[0], a = G[n];
699
+ return e.sandbox ? a.type === "sandbox" && a.value && !a.pending ? /* @__PURE__ */ r(
700
+ Tt,
700
701
  {
701
702
  hideFullScreen: !0,
702
703
  type: "sandbox",
703
- content: c.value,
704
+ content: a.value,
704
705
  className: "content-render-iframe",
705
706
  locale: s,
706
707
  dir: M,
@@ -709,8 +710,8 @@ const Ft = 2, Te = ({
709
710
  styleLoadingText: ne,
710
711
  scriptLoadingText: ue,
711
712
  disableLoadingOverlay: le,
712
- fullScreenButtonText: Xe,
713
- exitFullScreenButtonText: Ze,
713
+ fullScreenButtonText: Ze,
714
+ exitFullScreenButtonText: Je,
714
715
  mode: de
715
716
  },
716
717
  `sandbox-${n}`
@@ -719,7 +720,7 @@ const Ft = 2, Te = ({
719
720
  {
720
721
  value: v,
721
722
  children: /* @__PURE__ */ r(
722
- jt,
723
+ Ht,
723
724
  {
724
725
  locale: s,
725
726
  components: ve,
@@ -731,8 +732,8 @@ const Ft = 2, Te = ({
731
732
  )
732
733
  },
733
734
  `md-${n}`
734
- ) : e.indices.map((d) => /* @__PURE__ */ r(Z.Fragment, { children: G[d].type === "markdown" && G[d].pending ? null : it(
735
- nt[d],
735
+ ) : e.indices.map((d) => /* @__PURE__ */ r(Z.Fragment, { children: G[d].type === "markdown" && G[d].pending ? null : ut(
736
+ rt[d],
736
737
  `md-${d}`
737
738
  ) }, `md-${d}`));
738
739
  }),
@@ -746,14 +747,14 @@ const Ft = 2, Te = ({
746
747
  dir: M,
747
748
  lang: q,
748
749
  children: [
749
- ct.map((e, n) => {
750
+ it.map((e, n) => {
750
751
  if (e.type === "text")
751
752
  return /* @__PURE__ */ r(
752
753
  ie.Provider,
753
754
  {
754
755
  value: v,
755
756
  children: /* @__PURE__ */ r(
756
- He,
757
+ qe,
757
758
  {
758
759
  locale: s,
759
760
  components: ve,
@@ -782,7 +783,7 @@ const Ft = 2, Te = ({
782
783
  );
783
784
  };
784
785
  export {
785
- He as MarkdownRenderer,
786
- Ln as default
786
+ qe as MarkdownRenderer,
787
+ An as default
787
788
  };
788
789
  //# sourceMappingURL=ContentRender.es.js.map