markdown-flow-ui 0.2.6 → 0.2.7-dev.2

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