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.
- package/README.md +11 -11
- package/dist/_virtual/index.es10.js +2 -2
- package/dist/_virtual/index.es3.js +5 -4
- package/dist/_virtual/index.es3.js.map +1 -1
- package/dist/_virtual/index.es4.js +4 -5
- package/dist/_virtual/index.es4.js.map +1 -1
- package/dist/_virtual/index.es5.js +5 -5
- package/dist/_virtual/index.es6.js +5 -3
- package/dist/_virtual/index.es6.js.map +1 -1
- package/dist/_virtual/index.es7.js +3 -5
- package/dist/_virtual/index.es7.js.map +1 -1
- package/dist/_virtual/index.es9.js +2 -2
- package/dist/_virtual/index10.cjs +1 -1
- package/dist/_virtual/index3.cjs +1 -1
- package/dist/_virtual/index4.cjs +1 -1
- package/dist/_virtual/index5.cjs +1 -1
- package/dist/_virtual/index6.cjs +1 -1
- package/dist/_virtual/index7.cjs +1 -1
- package/dist/_virtual/index9.cjs +1 -1
- package/dist/_virtual/variable-marker.cjs +2 -0
- package/dist/_virtual/variable-marker.cjs.map +1 -0
- package/dist/_virtual/variable-marker.es.js +5 -0
- package/dist/_virtual/variable-marker.es.js.map +1 -0
- package/dist/components/ContentRender/ContentRender.cjs +2 -2
- package/dist/components/ContentRender/ContentRender.cjs.map +1 -1
- package/dist/components/ContentRender/ContentRender.es.js +206 -205
- package/dist/components/ContentRender/ContentRender.es.js.map +1 -1
- package/dist/components/ContentRender/utils/inline-code-ranges.cjs +9 -9
- package/dist/components/ContentRender/utils/inline-code-ranges.cjs.map +1 -1
- package/dist/components/ContentRender/utils/inline-code-ranges.d.ts +3 -0
- package/dist/components/ContentRender/utils/inline-code-ranges.es.js +185 -161
- package/dist/components/ContentRender/utils/inline-code-ranges.es.js.map +1 -1
- package/dist/components/ContentRender/utils/mermaid-parse.cjs +4 -4
- package/dist/components/ContentRender/utils/mermaid-parse.cjs.map +1 -1
- package/dist/components/ContentRender/utils/mermaid-parse.es.js +53 -48
- package/dist/components/ContentRender/utils/mermaid-parse.es.js.map +1 -1
- package/dist/components/ContentRender/utils/split-content.cjs +6 -6
- package/dist/components/ContentRender/utils/split-content.cjs.map +1 -1
- package/dist/components/ContentRender/utils/split-content.d.ts +1 -0
- package/dist/components/ContentRender/utils/split-content.es.js +361 -313
- package/dist/components/ContentRender/utils/split-content.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.cjs.map +1 -1
- package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.es.js +278 -283
- package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/components/VariableSelect.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/components/VariableSelect.cjs.map +1 -1
- package/dist/components/MarkdownFlowEditor/components/VariableSelect.es.js +57 -58
- package/dist/components/MarkdownFlowEditor/components/VariableSelect.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.d.ts +1 -1
- package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.es.js +1 -1
- package/dist/components/MarkdownFlowEditor/locales/de-DE.json.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/locales/de-DE.json.d.ts +1 -1
- package/dist/components/MarkdownFlowEditor/locales/de-DE.json.es.js +19 -19
- package/dist/components/MarkdownFlowEditor/locales/en-US.json.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/locales/en-US.json.d.ts +1 -1
- package/dist/components/MarkdownFlowEditor/locales/en-US.json.es.js +5 -5
- package/dist/components/MarkdownFlowEditor/locales/es-ES.json.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/locales/es-ES.json.d.ts +1 -1
- package/dist/components/MarkdownFlowEditor/locales/es-ES.json.es.js +1 -1
- package/dist/components/MarkdownFlowEditor/locales/fil-PH.json.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/locales/fil-PH.json.d.ts +1 -1
- package/dist/components/MarkdownFlowEditor/locales/fil-PH.json.es.js +15 -15
- package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.d.ts +1 -1
- package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.es.js +13 -13
- package/dist/components/MarkdownFlowEditor/locales/ja-JP.json.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/locales/ja-JP.json.d.ts +1 -1
- package/dist/components/MarkdownFlowEditor/locales/ja-JP.json.es.js +1 -1
- package/dist/components/MarkdownFlowEditor/locales/th-TH.json.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/locales/th-TH.json.d.ts +1 -1
- package/dist/components/MarkdownFlowEditor/locales/th-TH.json.es.js +1 -1
- package/dist/components/MarkdownFlowEditor/locales/ur-PK.json.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/locales/ur-PK.json.d.ts +1 -1
- package/dist/components/MarkdownFlowEditor/locales/ur-PK.json.es.js +1 -1
- package/dist/components/MarkdownFlowEditor/locales/vi-VN.json.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/locales/vi-VN.json.d.ts +1 -1
- package/dist/components/MarkdownFlowEditor/locales/vi-VN.json.es.js +15 -15
- package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.d.ts +1 -1
- package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.es.js +1 -1
- package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.cjs +3 -3
- package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.cjs.map +1 -1
- package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.es.js +177 -176
- package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/plugins/VariablePlaceholder.cjs +2 -1
- package/dist/components/MarkdownFlowEditor/plugins/VariablePlaceholder.cjs.map +1 -1
- package/dist/components/MarkdownFlowEditor/plugins/VariablePlaceholder.d.ts +3 -1
- package/dist/components/MarkdownFlowEditor/plugins/VariablePlaceholder.es.js +38 -55
- package/dist/components/MarkdownFlowEditor/plugins/VariablePlaceholder.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/utils.cjs +1 -1
- package/dist/components/MarkdownFlowEditor/utils.cjs.map +1 -1
- package/dist/components/MarkdownFlowEditor/utils.d.ts +2 -2
- package/dist/components/MarkdownFlowEditor/utils.es.js +34 -31
- package/dist/components/MarkdownFlowEditor/utils.es.js.map +1 -1
- package/dist/components/ui/inputGroup/textarea.cjs +1 -1
- package/dist/components/ui/inputGroup/textarea.es.js +1 -1
- package/dist/lib/interaction-defaults.cjs +1 -1
- package/dist/lib/interaction-defaults.cjs.map +1 -1
- package/dist/lib/interaction-defaults.es.js +124 -133
- package/dist/lib/interaction-defaults.es.js.map +1 -1
- package/dist/lib/interaction-defaults.failure.test.d.ts +1 -0
- package/dist/node_modules/classnames/index.cjs +1 -1
- package/dist/node_modules/classnames/index.es.js +1 -1
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.cjs +1 -1
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.es.js +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-AAMF2YG6.cjs +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-AAMF2YG6.es.js +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-OMD6QJNC.cjs +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-OMD6QJNC.es.js +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-U37J5Y7L.cjs +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-U37J5Y7L.es.js +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-WV7ZQ7D5.cjs +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-WV7ZQ7D5.es.js +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-4MX5Z3NR.cjs +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-4MX5Z3NR.es.js +1 -1
- package/dist/node_modules/rc-input/es/BaseInput.cjs +1 -1
- package/dist/node_modules/rc-input/es/BaseInput.es.js +1 -1
- package/dist/node_modules/rc-textarea/es/ResizableTextArea.cjs +1 -1
- package/dist/node_modules/rc-textarea/es/ResizableTextArea.es.js +1 -1
- package/dist/node_modules/rc-textarea/es/TextArea.cjs +1 -1
- package/dist/node_modules/rc-textarea/es/TextArea.es.js +1 -1
- package/dist/node_modules/rc-textarea/es/index.cjs +1 -1
- package/dist/node_modules/rc-textarea/es/index.es.js +1 -1
- package/dist/node_modules/remark-flow/dist/escaping.cjs +2 -2
- package/dist/node_modules/remark-flow/dist/escaping.cjs.map +1 -1
- package/dist/node_modules/remark-flow/dist/escaping.es.js +128 -63
- package/dist/node_modules/remark-flow/dist/escaping.es.js.map +1 -1
- package/dist/node_modules/remark-flow/dist/index.cjs +1 -1
- package/dist/node_modules/remark-flow/dist/index.cjs.map +1 -1
- package/dist/node_modules/remark-flow/dist/index.es.js +49 -37
- package/dist/node_modules/remark-flow/dist/index.es.js.map +1 -1
- package/dist/node_modules/remark-flow/dist/interaction-parser.cjs +1 -1
- package/dist/node_modules/remark-flow/dist/interaction-parser.cjs.map +1 -1
- package/dist/node_modules/remark-flow/dist/interaction-parser.es.js +260 -255
- package/dist/node_modules/remark-flow/dist/interaction-parser.es.js.map +1 -1
- package/dist/node_modules/remark-flow/dist/interaction-plugin-core.cjs +1 -1
- package/dist/node_modules/remark-flow/dist/interaction-plugin-core.cjs.map +1 -1
- package/dist/node_modules/remark-flow/dist/interaction-plugin-core.es.js +71 -42
- package/dist/node_modules/remark-flow/dist/interaction-plugin-core.es.js.map +1 -1
- package/dist/node_modules/remark-flow/dist/interaction-syntax.cjs +1 -1
- package/dist/node_modules/remark-flow/dist/interaction-syntax.cjs.map +1 -1
- package/dist/node_modules/remark-flow/dist/interaction-syntax.es.js +500 -46
- package/dist/node_modules/remark-flow/dist/interaction-syntax.es.js.map +1 -1
- package/dist/node_modules/remark-flow/dist/variable-marker.cjs +2 -0
- package/dist/node_modules/remark-flow/dist/variable-marker.cjs.map +1 -0
- package/dist/node_modules/remark-flow/dist/variable-marker.es.js +77 -0
- package/dist/node_modules/remark-flow/dist/variable-marker.es.js.map +1 -0
- package/dist/node_modules/remark-flow/dist/variable-name.cjs +14 -1
- package/dist/node_modules/remark-flow/dist/variable-name.cjs.map +1 -1
- package/dist/node_modules/remark-flow/dist/variable-name.es.js +742 -25
- package/dist/node_modules/remark-flow/dist/variable-name.es.js.map +1 -1
- package/dist/node_modules/style-to-object/cjs/index.cjs +1 -1
- package/dist/node_modules/style-to-object/cjs/index.cjs.map +1 -1
- package/dist/node_modules/style-to-object/cjs/index.es.js +1 -1
- package/dist/node_modules/unified/lib/index.cjs +1 -1
- package/dist/node_modules/unified/lib/index.es.js +1 -1
- package/package.json +2 -2
|
@@ -1,60 +1,61 @@
|
|
|
1
|
-
import { jsx as r, jsxs as ze, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
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
|
|
10
|
-
import
|
|
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
|
|
13
|
-
import { subsetLanguages as
|
|
14
|
-
import { parseMarkdownSegments as
|
|
15
|
-
import { getMarkdownSourceAnalysis as
|
|
16
|
-
import { remarkPlugins as
|
|
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
|
|
20
|
-
import { getTrailingTypewriterGrapheme as we, appendContentAwareTypewriterQueue as
|
|
21
|
-
import { normalizeWrappedSandboxContent as
|
|
22
|
-
import { getInteractionDefaultValues as
|
|
23
|
-
import { getMarkdownFlowDirection as
|
|
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
|
|
26
|
-
import { unified as
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import { Markdown as
|
|
32
|
-
const
|
|
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),
|
|
37
|
+
const s = b(null), c = o ? "span" : "div";
|
|
37
38
|
return te(() => {
|
|
38
|
-
const
|
|
39
|
-
if (!
|
|
40
|
-
const l =
|
|
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
|
-
(
|
|
48
|
-
).forEach((
|
|
49
|
-
const y = document.createElement("template"), S =
|
|
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((
|
|
53
|
-
const
|
|
54
|
-
if (!
|
|
55
|
-
const D =
|
|
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 =
|
|
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,
|
|
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,
|
|
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
|
-
|
|
77
|
-
}, [t]), /* @__PURE__ */ r(
|
|
78
|
-
|
|
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: (
|
|
82
|
-
s.current =
|
|
82
|
+
ref: (u) => {
|
|
83
|
+
s.current = u;
|
|
83
84
|
}
|
|
84
85
|
}
|
|
85
86
|
) });
|
|
86
87
|
}, ie = Z.createContext(
|
|
87
88
|
null
|
|
88
|
-
),
|
|
89
|
-
const { receivedTree: o, ...s } = t,
|
|
90
|
-
if (!
|
|
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 =
|
|
95
|
-
|
|
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:
|
|
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 ?? (
|
|
113
|
+
dir: g.dir ?? (u ? void 0 : "ltr"),
|
|
113
114
|
children: x
|
|
114
115
|
}
|
|
115
116
|
);
|
|
116
|
-
},
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
],
|
|
122
|
-
[
|
|
123
|
-
|
|
124
|
-
],
|
|
125
|
-
...
|
|
126
|
-
...
|
|
127
|
-
],
|
|
128
|
-
const
|
|
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
|
-
|
|
131
|
+
Ue,
|
|
131
132
|
{
|
|
132
|
-
remarkPlugins:
|
|
133
|
-
rehypePlugins:
|
|
133
|
+
remarkPlugins: Oe,
|
|
134
|
+
rehypePlugins: _t,
|
|
134
135
|
remarkRehypeOptions: {
|
|
135
|
-
footnoteLabel:
|
|
136
|
-
footnoteBackLabel: (
|
|
137
|
-
const x = String(
|
|
138
|
-
return
|
|
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
|
-
},
|
|
146
|
+
}, jt = function() {
|
|
146
147
|
this.parser = () => ({ type: "root", children: [] });
|
|
147
|
-
},
|
|
148
|
-
const
|
|
149
|
-
const S = be(
|
|
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: (
|
|
153
|
+
footnoteBackLabel: (i, I) => S.footnoteBackLabel.replace(
|
|
153
154
|
"{reference}",
|
|
154
|
-
String(
|
|
155
|
+
String(i + 1) + (I > 1 ? `-${I}` : "")
|
|
155
156
|
)
|
|
156
|
-
}).use(
|
|
157
|
-
|
|
157
|
+
}).use(Ye), T = He().use(Xe), p = R.runSync(
|
|
158
|
+
$t(t),
|
|
158
159
|
t.markdownSource
|
|
159
160
|
);
|
|
160
|
-
return
|
|
161
|
+
return Et(
|
|
161
162
|
t,
|
|
162
163
|
p,
|
|
163
|
-
(
|
|
164
|
+
(i) => T.runSync(i, t.fullSource)
|
|
164
165
|
);
|
|
165
|
-
}, [t,
|
|
166
|
-
() =>
|
|
167
|
-
[
|
|
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(
|
|
177
|
+
R(u.tree);
|
|
177
178
|
const T = {};
|
|
178
179
|
for (const p of S) {
|
|
179
180
|
if (!g.current.has(p)) {
|
|
180
|
-
const
|
|
181
|
-
node:
|
|
181
|
+
const i = ({
|
|
182
|
+
node: I,
|
|
182
183
|
children: D,
|
|
183
184
|
...W
|
|
184
185
|
}) => {
|
|
185
|
-
const C = It(
|
|
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(
|
|
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:
|
|
197
|
-
...z ===
|
|
197
|
+
node: I,
|
|
198
|
+
...z === Ke ? { receivedTree: !0 } : {}
|
|
198
199
|
},
|
|
199
200
|
D
|
|
200
201
|
) : Z.createElement(p, K, D);
|
|
201
202
|
};
|
|
202
|
-
|
|
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
|
-
}, [
|
|
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
|
-
|
|
213
|
+
Ue,
|
|
213
214
|
{
|
|
214
|
-
remarkPlugins: [
|
|
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,
|
|
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
|
|
229
|
-
if (
|
|
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: `${
|
|
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
|
-
},
|
|
239
|
+
}, Qt = (t, o, s) => {
|
|
239
240
|
if (t.length >= o.length) return t;
|
|
240
|
-
const
|
|
241
|
+
const c = s.find(
|
|
241
242
|
({ start: x, end: g }) => x < t.length && t.length < g
|
|
242
243
|
);
|
|
243
|
-
if (!
|
|
244
|
-
const
|
|
245
|
-
if (!
|
|
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 =
|
|
248
|
-
return t.length > l ? t +
|
|
249
|
-
},
|
|
250
|
-
const l =
|
|
251
|
-
return ke(t,
|
|
252
|
-
},
|
|
253
|
-
const s = Math.max(1, o),
|
|
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:
|
|
256
|
-
rest:
|
|
256
|
+
chunk: c.slice(0, s).join(""),
|
|
257
|
+
rest: c.slice(s).join("")
|
|
257
258
|
};
|
|
258
|
-
},
|
|
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
|
|
261
|
-
},
|
|
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:
|
|
266
|
-
dir:
|
|
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:
|
|
277
|
-
defaultInputText:
|
|
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 =
|
|
302
|
-
() =>
|
|
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
|
-
() =>
|
|
306
|
+
() => Ct(B),
|
|
306
307
|
[B]
|
|
307
308
|
), w = f(() => {
|
|
308
|
-
const e =
|
|
309
|
-
|
|
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),
|
|
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(""),
|
|
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), [
|
|
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,
|
|
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 = "",
|
|
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" && (
|
|
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,
|
|
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 =
|
|
366
|
+
const N = a.slice(
|
|
366
367
|
$.length
|
|
367
368
|
);
|
|
368
|
-
if (e && n === "content-aware" && h.startsWith(
|
|
369
|
-
const j =
|
|
370
|
-
|
|
371
|
-
h.slice(
|
|
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
|
-
|
|
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 =
|
|
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
|
-
|
|
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
|
-
|
|
391
|
+
P.current = {
|
|
391
392
|
tokens: [],
|
|
392
393
|
head: 0,
|
|
393
394
|
trailingGrapheme: ""
|
|
394
395
|
}, Q.current = 0;
|
|
395
|
-
V.current = O, !d && O &&
|
|
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 =
|
|
413
|
-
|
|
414
|
-
Q.current +
|
|
413
|
+
const d = bt(
|
|
414
|
+
P.current,
|
|
415
|
+
Q.current + St
|
|
415
416
|
);
|
|
416
|
-
n = d.chunk,
|
|
417
|
+
n = d.chunk, P.current = d.queue, Rt(d.queue) ? Q.current = 0 : Q.current = d.remainingBudget;
|
|
417
418
|
} else
|
|
418
|
-
n =
|
|
419
|
+
n = Ot(
|
|
419
420
|
V.current,
|
|
420
|
-
|
|
421
|
+
Gt
|
|
421
422
|
).chunk;
|
|
422
423
|
if (!n)
|
|
423
424
|
return;
|
|
424
|
-
V.current = V.current.slice(n.length), V.current || (
|
|
425
|
+
V.current = V.current.slice(n.length), V.current || (P.current = y === "content-aware" ? {
|
|
425
426
|
tokens: [],
|
|
426
427
|
head: 0,
|
|
427
|
-
trailingGrapheme:
|
|
428
|
+
trailingGrapheme: P.current.trailingGrapheme
|
|
428
429
|
} : { tokens: [], head: 0, trailingGrapheme: "" }, Q.current = 0);
|
|
429
|
-
const
|
|
430
|
-
ae.current =
|
|
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
|
-
|
|
436
|
+
et,
|
|
436
437
|
m,
|
|
437
438
|
y,
|
|
438
439
|
Ne,
|
|
439
|
-
|
|
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
|
|
448
|
+
const a = E.slice(
|
|
448
449
|
e,
|
|
449
450
|
e + n.value.length
|
|
450
451
|
);
|
|
451
|
-
return e += n.value.length, { ...n, value:
|
|
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,
|
|
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
|
|
480
|
-
return e += n.value.length,
|
|
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 :
|
|
485
|
+
(e) => e.type === "sandbox" || H(e) ? [] : e.value === B ? A.inline : kt(e.value)
|
|
485
486
|
) : [],
|
|
486
487
|
[m, w, B, A]
|
|
487
|
-
),
|
|
488
|
+
), rt = f(
|
|
488
489
|
() => Y ? G.map(
|
|
489
|
-
(e, n) => e.type === "sandbox" || H(e) ? e.value : m ?
|
|
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
|
-
),
|
|
511
|
+
), ot = f(() => {
|
|
511
512
|
const e = [];
|
|
512
|
-
w.forEach((n,
|
|
513
|
+
w.forEach((n, a) => {
|
|
513
514
|
const d = e.at(-1);
|
|
514
|
-
n.type !== "sandbox" && d && !d.sandbox ? d.indices.push(
|
|
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((
|
|
518
|
-
const
|
|
519
|
-
n.plan =
|
|
520
|
-
|
|
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,
|
|
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 ?
|
|
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
|
-
() =>
|
|
550
|
+
() => Lt(
|
|
550
551
|
_,
|
|
551
552
|
T,
|
|
552
553
|
p
|
|
553
554
|
),
|
|
554
555
|
[p, _, T]
|
|
555
|
-
),
|
|
556
|
-
() => T ? T.split(",").map((e) =>
|
|
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
|
-
),
|
|
559
|
-
|
|
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:
|
|
574
|
-
resolvedDefaultInputText:
|
|
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:
|
|
591
|
-
resolvedDefaultInputText:
|
|
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
|
-
|
|
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:
|
|
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
|
|
629
|
-
return typeof
|
|
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
|
-
|
|
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
|
-
),
|
|
654
|
-
() =>
|
|
654
|
+
), it = f(
|
|
655
|
+
() => _e(Ee),
|
|
655
656
|
[Ee]
|
|
656
|
-
),
|
|
657
|
-
const
|
|
658
|
-
return
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
697
|
-
const n = e.indices[0],
|
|
698
|
-
return e.sandbox ?
|
|
699
|
-
|
|
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:
|
|
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:
|
|
713
|
-
exitFullScreenButtonText:
|
|
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
|
-
|
|
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 :
|
|
735
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
786
|
-
|
|
786
|
+
qe as MarkdownRenderer,
|
|
787
|
+
An as default
|
|
787
788
|
};
|
|
788
789
|
//# sourceMappingURL=ContentRender.es.js.map
|