markdown-flow-ui 0.1.115-beta.0 → 0.1.115

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.
@@ -1,89 +1,89 @@
1
1
  import { j as t } from "../../_virtual/jsx-runtime.es.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
- import Q, { useMemo as h, useRef as te, useEffect as G } from "react";
5
- import ae from "../../_virtual/index.es.js";
6
- import { sanitizeInvalidTagName as ie } from "./utils/sanitize-invalid-tag-name.es.js";
7
- import { stripSvgTextLineBreaks as le } from "./utils/strip-svg-text-line-breaks.es.js";
4
+ import X, { useMemo as h, useRef as E, useEffect as F } from "react";
5
+ import se from "../../_virtual/index.es.js";
6
+ import { sanitizeInvalidTagName as oe } from "./utils/sanitize-invalid-tag-name.es.js";
7
+ import { stripSvgTextLineBreaks as ae } from "./utils/strip-svg-text-line-breaks.es.js";
8
8
  /* empty css */
9
9
  /* empty css */
10
- import ce from "./CodeBlock.es.js";
11
- import me from "./plugins/CustomVariable.es.js";
12
- import F from "./plugins/MermaidChart.es.js";
13
- import de from "./useTypewriterStateMachine.es.js";
14
- import { preserveCustomVariableProperties as ue, restoreCustomVariableProperties as he } from "./utils/custom-variable-props.es.js";
15
- import { subsetLanguages as pe, highlightLanguages as fe } from "./utils/highlight-languages.es.js";
16
- import { mermaidBlockIsComplete as xe, parseMarkdownSegments as Y } from "./utils/mermaid-parse.es.js";
17
- import { normalizeInlineHtml as Z } from "./utils/normalize-inline-html.es.js";
18
- import ve from "./IframeSandbox.es.js";
19
- import { splitContentSegments as ge } from "./utils/split-content.es.js";
20
- import { getInteractionDefaultValues as be } from "../../lib/interaction-defaults.es.js";
21
- import { Markdown as ye } from "../../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.es.js";
22
- import Ne from "../../markdown-flow-ui/node_modules/.pnpm/rehype-raw@7.0.0/node_modules/rehype-raw/lib/index.es.js";
23
- import je from "../../markdown-flow-ui/node_modules/.pnpm/rehype-highlight@7.0.2/node_modules/rehype-highlight/lib/index.es.js";
24
- import ke from "../../markdown-flow-ui/node_modules/.pnpm/rehype-katex@7.0.1/node_modules/rehype-katex/lib/index.es.js";
25
- import we from "../../markdown-flow-ui/node_modules/.pnpm/remark-gfm@4.0.1/node_modules/remark-gfm/lib/index.es.js";
26
- import Se from "../../markdown-flow-ui/node_modules/.pnpm/remark-math@6.0.0/node_modules/remark-math/lib/index.es.js";
27
- import Re from "../../markdown-flow-ui/node_modules/.pnpm/remark-breaks@4.0.0/node_modules/remark-breaks/lib/index.es.js";
28
- const Le = /<(script|style|link|iframe|html|head|body|meta|title|base|template|div|section|article|main)\b/i, E = ({ svg: r }) => {
29
- const o = te(null);
30
- return G(() => {
10
+ import ie from "./CodeBlock.es.js";
11
+ import le from "./plugins/CustomVariable.es.js";
12
+ import W from "./plugins/MermaidChart.es.js";
13
+ import ce from "./useTypewriterStateMachine.es.js";
14
+ import { preserveCustomVariableProperties as me, restoreCustomVariableProperties as de } from "./utils/custom-variable-props.es.js";
15
+ import { subsetLanguages as ue, highlightLanguages as pe } from "./utils/highlight-languages.es.js";
16
+ import { parseMarkdownSegments as J, mermaidBlockIsComplete as he } from "./utils/mermaid-parse.es.js";
17
+ import { normalizeInlineHtml as Q } from "./utils/normalize-inline-html.es.js";
18
+ import fe from "./IframeSandbox.es.js";
19
+ import { splitContentSegments as xe } from "./utils/split-content.es.js";
20
+ import { getInteractionDefaultValues as ve } from "../../lib/interaction-defaults.es.js";
21
+ import { Markdown as ge } from "../../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.es.js";
22
+ import be from "../../markdown-flow-ui/node_modules/.pnpm/rehype-raw@7.0.0/node_modules/rehype-raw/lib/index.es.js";
23
+ import ye from "../../markdown-flow-ui/node_modules/.pnpm/rehype-highlight@7.0.2/node_modules/rehype-highlight/lib/index.es.js";
24
+ import Ne from "../../markdown-flow-ui/node_modules/.pnpm/rehype-katex@7.0.1/node_modules/rehype-katex/lib/index.es.js";
25
+ import je from "../../markdown-flow-ui/node_modules/.pnpm/remark-gfm@4.0.1/node_modules/remark-gfm/lib/index.es.js";
26
+ import ke from "../../markdown-flow-ui/node_modules/.pnpm/remark-math@6.0.0/node_modules/remark-math/lib/index.es.js";
27
+ import we from "../../markdown-flow-ui/node_modules/.pnpm/remark-breaks@4.0.0/node_modules/remark-breaks/lib/index.es.js";
28
+ const Se = /<(script|style|link|iframe|html|head|body|meta|title|base|template|div|section|article|main)\b/i, Y = ({ svg: r }) => {
29
+ const o = E(null);
30
+ return F(() => {
31
31
  const a = o.current;
32
32
  if (!a) return;
33
- const i = a.shadowRoot ?? a.attachShadow({ mode: "open" }), N = "content-render-svg-style";
34
- let l = i.getElementById(N);
35
- l || (l = document.createElement("style"), l.id = N, l.textContent = `
33
+ const i = a.shadowRoot ?? a.attachShadow({ mode: "open" }), y = "content-render-svg-style";
34
+ let l = i.getElementById(y);
35
+ l || (l = document.createElement("style"), l.id = y, l.textContent = `
36
36
  svg { height: auto; display: inline-block; }
37
37
  svg.content-render-svg-el--responsive { width: 100%; max-width: 100%; }
38
38
  svg.content-render-svg-el--fixed { max-width: none; }
39
39
  `, i.appendChild(l)), Array.from(i.childNodes).filter(
40
40
  (n) => n !== l
41
41
  ).forEach((n) => i.removeChild(n));
42
- const C = document.createElement("template"), D = le(r);
43
- C.innerHTML = D, i.append(C.content.cloneNode(!0));
44
- let j = !1, k = !1;
42
+ const T = document.createElement("template"), z = ae(r);
43
+ T.innerHTML = z, i.append(T.content.cloneNode(!0));
44
+ let N = !1, C = !1;
45
45
  i.querySelectorAll("svg").forEach((n) => {
46
- const S = n.getAttribute("viewBox");
47
- if (!S) return;
48
- const f = S.trim().split(/[\s,]+/).map((c) => Number(c));
49
- if (f.length !== 4 || f.some(Number.isNaN)) return;
50
- const [, , x, p] = f, v = n.getAttribute("width"), g = n.getAttribute("height"), A = (c) => {
46
+ const L = n.getAttribute("viewBox");
47
+ if (!L) return;
48
+ const k = L.trim().split(/[\s,]+/).map((c) => Number(c));
49
+ if (k.length !== 4 || k.some(Number.isNaN)) return;
50
+ const [, , f, p] = k, x = n.getAttribute("width"), v = n.getAttribute("height"), B = (c) => {
51
51
  if (!c) return !1;
52
52
  const m = c.trim().toLowerCase();
53
53
  return m === "auto" || m.endsWith("%");
54
- }, B = (c) => {
54
+ }, A = (c) => {
55
55
  if (!c) return null;
56
56
  const m = c.trim().toLowerCase();
57
57
  if (m === "auto" || m.endsWith("%"))
58
58
  return null;
59
- const L = Number.parseFloat(m);
60
- return Number.isNaN(L) ? null : L;
61
- }, $ = A(v), z = A(g), R = !v || v === "0", b = !g || g === "0", M = B(v), I = B(g);
62
- if ($ || z || R && b || M === x && I === p) {
63
- j = !0, n.classList.add("content-render-svg-el--responsive"), n.classList.remove("content-render-svg-el--fixed"), n.style.width = "100%", n.style.height = "auto", !n.style.aspectRatio && p > 0 && (n.style.aspectRatio = `${x} / ${p}`);
59
+ const S = Number.parseFloat(m);
60
+ return Number.isNaN(S) ? null : S;
61
+ }, M = B(x), I = B(v), w = !x || x === "0", g = !v || v === "0", V = A(x), H = A(v);
62
+ if (M || I || w && g || V === f && H === p) {
63
+ N = !0, n.classList.add("content-render-svg-el--responsive"), n.classList.remove("content-render-svg-el--fixed"), n.style.width = "100%", n.style.height = "auto", !n.style.aspectRatio && p > 0 && (n.style.aspectRatio = `${f} / ${p}`);
64
64
  return;
65
65
  }
66
- k = !0, n.classList.add("content-render-svg-el--fixed"), n.classList.remove("content-render-svg-el--responsive"), R && x > 0 && n.setAttribute("width", `${x}`), b && p > 0 && n.setAttribute("height", `${p}`);
66
+ C = !0, n.classList.add("content-render-svg-el--fixed"), n.classList.remove("content-render-svg-el--responsive"), w && f > 0 && n.setAttribute("width", `${f}`), g && p > 0 && n.setAttribute("height", `${p}`);
67
67
  });
68
- const w = j && !k;
69
- a.classList.toggle("content-render-svg--responsive", w), a.classList.toggle("content-render-svg--fixed", !w);
68
+ const j = N && !C;
69
+ a.classList.toggle("content-render-svg--responsive", j), a.classList.toggle("content-render-svg--fixed", !j);
70
70
  }, [r]), /* @__PURE__ */ t.jsx("div", { className: "content-render-svg-scroll", children: /* @__PURE__ */ t.jsx("div", { className: "content-render-svg", ref: o }) });
71
- }, Te = [we, Se, ae, Re], Ce = [
72
- ue,
73
- Ne,
74
- ie,
75
- he,
76
- [je, { languages: fe, subset: pe }],
77
- ke
78
- ], ee = ({ content: r, components: o }) => /* @__PURE__ */ t.jsx("div", { className: "markdown-renderer", children: /* @__PURE__ */ t.jsx(
79
- ye,
71
+ }, Re = [je, ke, se, we], Te = [
72
+ me,
73
+ be,
74
+ oe,
75
+ de,
76
+ [ye, { languages: pe, subset: ue }],
77
+ Ne
78
+ ], Z = ({ content: r, components: o }) => /* @__PURE__ */ t.jsx("div", { className: "markdown-renderer", children: /* @__PURE__ */ t.jsx(
79
+ ge,
80
80
  {
81
- remarkPlugins: Te,
82
- rehypePlugins: Ce,
81
+ remarkPlugins: Re,
82
+ rehypePlugins: Te,
83
83
  components: o,
84
84
  children: r
85
85
  }
86
- ) }), Ae = (r) => {
86
+ ) }), Ce = (r) => {
87
87
  if (r.length <= 1) return r;
88
88
  const o = [];
89
89
  return r.forEach((a) => {
@@ -101,195 +101,176 @@ const Le = /<(script|style|link|iframe|html|head|body|meta|title|base|template|d
101
101
  }
102
102
  o.push({ type: "markdown", value: a.value });
103
103
  }), o;
104
- }, st = ({
104
+ }, rt = ({
105
105
  content: r,
106
106
  customRenderBar: o,
107
107
  onSend: a,
108
108
  typingSpeed: i = 30,
109
- enableTypewriter: N = !1,
109
+ enableTypewriter: y = !1,
110
110
  userInput: l,
111
- interactionDefaultValueOptions: V,
112
- defaultButtonText: C,
113
- defaultInputText: D,
114
- defaultSelectedValues: j,
115
- readonly: k = !1,
116
- onTypeFinished: w,
111
+ interactionDefaultValueOptions: $,
112
+ defaultButtonText: T,
113
+ defaultInputText: z,
114
+ defaultSelectedValues: N,
115
+ readonly: C = !1,
116
+ onTypeFinished: j,
117
117
  confirmButtonText: n,
118
- copyButtonText: S,
119
- copiedButtonText: f,
120
- sandboxLoadingText: x,
118
+ copyButtonText: L,
119
+ copiedButtonText: k,
120
+ sandboxLoadingText: f,
121
121
  sandboxStyleLoadingText: p,
122
- sandboxScriptLoadingText: v,
123
- disableSandboxLoadingOverlay: g = !1,
124
- sandboxFullscreenButtonText: A,
125
- sandboxMode: B = "content",
126
- onClickCustomButtonAfterContent: $,
127
- beforeSend: z
122
+ sandboxScriptLoadingText: x,
123
+ disableSandboxLoadingOverlay: v = !1,
124
+ sandboxFullscreenButtonText: B,
125
+ sandboxMode: A = "content",
126
+ onClickCustomButtonAfterContent: M,
127
+ beforeSend: I
128
128
  // tooltipMinLength,
129
129
  }) => {
130
- const R = h(
131
- () => Z(r),
130
+ const w = h(
131
+ () => Q(r),
132
132
  [r]
133
- ), b = h(
134
- () => be(
133
+ ), g = h(
134
+ () => ve(
135
135
  r,
136
136
  l,
137
- V
137
+ $
138
138
  ),
139
- [r, V, l]
140
- ), M = C?.trim() || b.buttonText, I = D?.trim() || b.inputText, K = h(
139
+ [r, $, l]
140
+ ), V = T?.trim() || g.buttonText, H = z?.trim() || g.inputText, G = h(
141
141
  () => l ? l.split(",").map((e) => e.trim()).filter(Boolean) : void 0,
142
142
  [l]
143
- ), H = j?.length ? j : b.selectedValues || K, c = H?.join("") ?? "", m = h(
144
- () => H,
145
- // Preserve the same array reference when markdown is reparsed with equal values.
146
- [c]
147
- ), L = h(
148
- () => ({
149
- "custom-button-after-content": ({
150
- children: e
151
- }) => /* @__PURE__ */ t.jsx(
152
- "button",
153
- {
154
- className: "content-render-custom-button-after-content",
155
- onClick: $,
156
- children: /* @__PURE__ */ t.jsx("span", { className: "content-render-custom-button-after-content-inner", children: e })
157
- }
158
- ),
159
- "custom-variable": (e) => /* @__PURE__ */ t.jsx(
160
- me,
161
- {
162
- ...e,
163
- readonly: k,
164
- defaultButtonText: M,
165
- defaultInputText: I,
166
- defaultSelectedValues: m,
167
- onSend: a,
168
- beforeSend: z,
169
- confirmButtonText: n
170
- }
171
- ),
172
- code: (e) => {
173
- const { className: s, children: d, ...W } = e;
174
- if (/language-(\w+)/.exec(s || "")?.[1] === "mermaid") {
175
- const y = d?.toString().replace(/\n$/, "") || "", oe = xe(r, y);
176
- return /* @__PURE__ */ t.jsx(F, { chart: y, frozen: oe });
177
- }
178
- return /* @__PURE__ */ t.jsx("code", { className: s, ...W, children: d });
179
- },
180
- table: ({ ...e }) => /* @__PURE__ */ t.jsx("div", { className: "content-render-table-container", children: /* @__PURE__ */ t.jsx("table", { className: "content-render-table", ...e }) }),
181
- th: ({ ...e }) => /* @__PURE__ */ t.jsx("th", { className: "content-render-th", ...e }),
182
- td: ({ ...e }) => /* @__PURE__ */ t.jsx("td", { className: "content-render-td", ...e }),
183
- tr: ({ ...e }) => /* @__PURE__ */ t.jsx("tr", { className: "content-render-tr", ...e }),
184
- li: ({ node: e, ...s }) => {
185
- const d = e?.properties?.className;
186
- return typeof d == "string" && d.includes("task-list-item") || Array.isArray(d) && d.includes("task-list-item") ? /* @__PURE__ */ t.jsx("li", { className: "content-render-task-list-item", ...s }) : /* @__PURE__ */ t.jsx("li", { ...s });
187
- },
188
- ol: ({ ...e }) => /* @__PURE__ */ t.jsx("ol", { className: "content-render-ol", ...e }),
189
- ul: ({ ...e }) => /* @__PURE__ */ t.jsx("ul", { className: "content-render-ul", ...e }),
190
- input: ({ ...e }) => e.type === "checkbox" ? /* @__PURE__ */ t.jsx(
191
- "input",
192
- {
193
- type: "checkbox",
194
- className: "content-render-checkbox",
195
- disabled: !0,
196
- ...e
197
- }
198
- ) : /* @__PURE__ */ t.jsx("input", { ...e }),
199
- a: ({ children: e, ...s }) => /* @__PURE__ */ t.jsx("a", { target: "_blank", rel: "noopener noreferrer", ...s, children: e }),
200
- pre: (e) => /* @__PURE__ */ t.jsx(
201
- ce,
202
- {
203
- ...e,
204
- copyButtonText: S,
205
- copiedButtonText: f
206
- }
207
- )
208
- }),
209
- [
210
- z,
211
- n,
212
- r,
213
- f,
214
- S,
215
- $,
216
- a,
217
- k,
218
- M,
219
- I,
220
- m
221
- ]
222
- ), { displayContent: U, isComplete: q } = de({
143
+ ), U = N?.length ? N : g.selectedValues || G, c = {
144
+ "custom-button-after-content": ({
145
+ children: e
146
+ }) => /* @__PURE__ */ t.jsx(
147
+ "button",
148
+ {
149
+ className: "content-render-custom-button-after-content",
150
+ onClick: M,
151
+ children: /* @__PURE__ */ t.jsx("span", { className: "content-render-custom-button-after-content-inner", children: e })
152
+ }
153
+ ),
154
+ "custom-variable": (e) => /* @__PURE__ */ t.jsx(
155
+ le,
156
+ {
157
+ ...e,
158
+ readonly: C,
159
+ defaultButtonText: V,
160
+ defaultInputText: H,
161
+ defaultSelectedValues: U,
162
+ onSend: a,
163
+ beforeSend: I,
164
+ confirmButtonText: n
165
+ }
166
+ ),
167
+ code: (e) => {
168
+ const { className: s, children: d, ..._ } = e;
169
+ if (/language-(\w+)/.exec(s || "")?.[1] === "mermaid") {
170
+ const b = d?.toString().replace(/\n$/, "") || "", ne = he(r, b);
171
+ return /* @__PURE__ */ t.jsx(W, { chart: b, frozen: ne });
172
+ }
173
+ return /* @__PURE__ */ t.jsx("code", { className: s, ..._, children: d });
174
+ },
175
+ table: ({ ...e }) => /* @__PURE__ */ t.jsx("div", { className: "content-render-table-container", children: /* @__PURE__ */ t.jsx("table", { className: "content-render-table", ...e }) }),
176
+ th: ({ ...e }) => /* @__PURE__ */ t.jsx("th", { className: "content-render-th", ...e }),
177
+ td: ({ ...e }) => /* @__PURE__ */ t.jsx("td", { className: "content-render-td", ...e }),
178
+ tr: ({ ...e }) => /* @__PURE__ */ t.jsx("tr", { className: "content-render-tr", ...e }),
179
+ li: ({ node: e, ...s }) => {
180
+ const d = e?.properties?.className;
181
+ return typeof d == "string" && d.includes("task-list-item") || Array.isArray(d) && d.includes("task-list-item") ? /* @__PURE__ */ t.jsx("li", { className: "content-render-task-list-item", ...s }) : /* @__PURE__ */ t.jsx("li", { ...s });
182
+ },
183
+ ol: ({ ...e }) => /* @__PURE__ */ t.jsx("ol", { className: "content-render-ol", ...e }),
184
+ ul: ({ ...e }) => /* @__PURE__ */ t.jsx("ul", { className: "content-render-ul", ...e }),
185
+ input: ({ ...e }) => e.type === "checkbox" ? /* @__PURE__ */ t.jsx(
186
+ "input",
187
+ {
188
+ type: "checkbox",
189
+ className: "content-render-checkbox",
190
+ disabled: !0,
191
+ ...e
192
+ }
193
+ ) : /* @__PURE__ */ t.jsx("input", { ...e }),
194
+ a: ({ children: e, ...s }) => /* @__PURE__ */ t.jsx("a", { target: "_blank", rel: "noopener noreferrer", ...s, children: e }),
195
+ pre: (e) => /* @__PURE__ */ t.jsx(
196
+ ie,
197
+ {
198
+ ...e,
199
+ copyButtonText: L,
200
+ copiedButtonText: k
201
+ }
202
+ )
203
+ }, { displayContent: m, isComplete: S } = ce({
223
204
  // processMarkdownText will let code block printf("You win!\n") become printf("You win!<br/>");
224
205
  // content: processMarkdownText(content),
225
- content: R,
206
+ content: w,
226
207
  typingSpeed: i,
227
- disabled: !N
228
- }), O = N ? U : R, X = h(
229
- () => Le.test(r),
208
+ disabled: !y
209
+ }), q = y ? m : w, K = h(
210
+ () => Se.test(r),
230
211
  [r]
231
- ), P = h(
232
- () => X ? ge(r, !0) : [],
233
- [r, X]
234
- ), T = P.some(
212
+ ), D = h(
213
+ () => K ? xe(r, !0) : [],
214
+ [r, K]
215
+ ), R = D.some(
235
216
  (e) => e.type === "sandbox"
236
- ), re = h(
237
- () => Ae(P),
238
- [P]
239
- ), ne = h(
240
- () => Y(O),
241
- [O]
242
- ), _ = te(!1);
243
- G(() => {
244
- T || q && !_.current && (_.current = !0, w?.());
245
- }, [T, q, w]), G(() => {
246
- T || (_.current = !1);
247
- }, [T, r]);
248
- const se = (e, s) => {
249
- const d = Z(e);
250
- return Y(d).map((u, J) => {
251
- const y = `${s}-${u.type}-${J}`;
217
+ ), ee = h(
218
+ () => Ce(D),
219
+ [D]
220
+ ), te = h(
221
+ () => J(q),
222
+ [q]
223
+ ), P = E(!1);
224
+ F(() => {
225
+ R || S && !P.current && (P.current = !0, j?.());
226
+ }, [R, S, j]), F(() => {
227
+ R || (P.current = !1);
228
+ }, [R, r]);
229
+ const re = (e, s) => {
230
+ const d = Q(e);
231
+ return J(d).map((u, O) => {
232
+ const b = `${s}-${u.type}-${O}`;
252
233
  return u.type === "text" ? /* @__PURE__ */ t.jsx(
253
- ee,
234
+ Z,
254
235
  {
255
- components: L,
236
+ components: c,
256
237
  content: u.value
257
238
  },
258
- y
259
- ) : u.type === "mermaid" ? /* @__PURE__ */ t.jsx(F, { chart: u.value, frozen: !u.complete }, y) : u.type === "svg" ? /* @__PURE__ */ t.jsx(E, { svg: u.value }, y) : null;
239
+ b
240
+ ) : u.type === "mermaid" ? /* @__PURE__ */ t.jsx(W, { chart: u.value, frozen: !u.complete }, b) : u.type === "svg" ? /* @__PURE__ */ t.jsx(Y, { svg: u.value }, b) : null;
260
241
  });
261
242
  };
262
- return T ? /* @__PURE__ */ t.jsx("div", { className: "content-render markdown-body", children: re.map(
243
+ return R ? /* @__PURE__ */ t.jsx("div", { className: "content-render markdown-body", children: ee.map(
263
244
  (e, s) => e.type === "sandbox" ? /* @__PURE__ */ t.jsx(
264
- ve,
245
+ fe,
265
246
  {
266
247
  hideFullScreen: !0,
267
248
  type: "sandbox",
268
249
  content: e.value,
269
250
  className: "content-render-iframe",
270
- loadingText: x,
251
+ loadingText: f,
271
252
  styleLoadingText: p,
272
- scriptLoadingText: v,
273
- disableLoadingOverlay: g,
274
- fullScreenButtonText: A,
275
- mode: B
253
+ scriptLoadingText: x,
254
+ disableLoadingOverlay: v,
255
+ fullScreenButtonText: B,
256
+ mode: A
276
257
  },
277
258
  `sandbox-${s}`
278
- ) : /* @__PURE__ */ t.jsx(Q.Fragment, { children: se(e.value, `md-${s}`) }, `md-${s}`)
259
+ ) : /* @__PURE__ */ t.jsx(X.Fragment, { children: re(e.value, `md-${s}`) }, `md-${s}`)
279
260
  ) }) : /* @__PURE__ */ t.jsxs("div", { className: "content-render markdown-body", children: [
280
- ne.map((e, s) => {
261
+ te.map((e, s) => {
281
262
  if (e.type === "text")
282
263
  return /* @__PURE__ */ t.jsx(
283
- ee,
264
+ Z,
284
265
  {
285
- components: L,
266
+ components: c,
286
267
  content: e.value
287
268
  },
288
269
  s
289
270
  );
290
271
  if (e.type === "mermaid")
291
272
  return /* @__PURE__ */ t.jsx(
292
- F,
273
+ W,
293
274
  {
294
275
  chart: e.value,
295
276
  frozen: !e.complete
@@ -297,17 +278,17 @@ const Le = /<(script|style|link|iframe|html|head|body|meta|title|base|template|d
297
278
  s
298
279
  );
299
280
  if (e.type === "svg")
300
- return /* @__PURE__ */ t.jsx(E, { svg: e.value }, s);
281
+ return /* @__PURE__ */ t.jsx(Y, { svg: e.value }, s);
301
282
  }),
302
- o && /* @__PURE__ */ t.jsx("div", { className: "content-render-custom-bar", children: Q.createElement(o, {
283
+ o && /* @__PURE__ */ t.jsx("div", { className: "content-render-custom-bar", children: X.createElement(o, {
303
284
  content: r,
304
- displayContent: U,
285
+ displayContent: m,
305
286
  onSend: a
306
287
  }) })
307
288
  ] });
308
289
  };
309
290
  export {
310
- ee as MarkdownRenderer,
311
- st as default
291
+ Z as MarkdownRenderer,
292
+ rt as default
312
293
  };
313
294
  //# sourceMappingURL=ContentRender.es.js.map