markdown-flow-ui 0.1.81-beta.0 → 0.1.81
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/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/@braintree_sanitize-url@7.1.1/node_modules/@braintree/sanitize-url/dist/index.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/hast-util-to-jsx-runtime@2.3.6/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-YG6GDRKO.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-S3R3BYOJ.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-TZMSLE5B.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-LVOFAZNH.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-WL72ISMW.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-util@5.44.4_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-util/es/ref.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/react-is@18.3.1/node_modules/react-is/index.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/style-to-object@1.0.11/node_modules/style-to-object/cjs/index.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.js +1 -1
- package/dist/_virtual/index10.js +2 -2
- package/dist/_virtual/index11.js +3 -2
- package/dist/_virtual/index11.js.map +1 -1
- package/dist/_virtual/index12.js +2 -3
- package/dist/_virtual/index12.js.map +1 -1
- package/dist/_virtual/index5.js +3 -5
- package/dist/_virtual/index5.js.map +1 -1
- package/dist/_virtual/index6.js +4 -4
- package/dist/_virtual/index7.js +5 -3
- package/dist/_virtual/index7.js.map +1 -1
- package/dist/_virtual/index8.js +2 -2
- package/dist/components/ContentRender/ContentRender.js +116 -173
- package/dist/components/ContentRender/ContentRender.js.map +1 -1
- package/dist/components/ContentRender/ContentRender.stories.d.ts +0 -1
- package/dist/markdown-flow-ui-lib.css +1 -1
- package/package.json +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/react-dom@19.0.1_react@19.0.1/node_modules/react-dom/cjs/react-dom-client.development.js +0 -15111
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/react-dom@19.0.1_react@19.0.1/node_modules/react-dom/cjs/react-dom-client.development.js.map +0 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/react-dom@19.0.1_react@19.0.1/node_modules/react-dom/cjs/react-dom-client.production.js +0 -9262
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/react-dom@19.0.1_react@19.0.1/node_modules/react-dom/cjs/react-dom-client.production.js.map +0 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/react-dom@19.0.1_react@19.0.1/node_modules/react-dom/client.js +0 -24
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/react-dom@19.0.1_react@19.0.1/node_modules/react-dom/client.js.map +0 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/scheduler@0.25.0/node_modules/scheduler/cjs/scheduler.development.js +0 -244
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/scheduler@0.25.0/node_modules/scheduler/cjs/scheduler.development.js.map +0 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/scheduler@0.25.0/node_modules/scheduler/cjs/scheduler.production.js +0 -241
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/scheduler@0.25.0/node_modules/scheduler/cjs/scheduler.production.js.map +0 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/scheduler@0.25.0/node_modules/scheduler/index.js +0 -11
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/scheduler@0.25.0/node_modules/scheduler/index.js.map +0 -1
- package/dist/_virtual/client.js +0 -6
- package/dist/_virtual/client.js.map +0 -1
- package/dist/_virtual/client2.js +0 -5
- package/dist/_virtual/client2.js.map +0 -1
- package/dist/_virtual/index13.js +0 -5
- package/dist/_virtual/index13.js.map +0 -1
- package/dist/_virtual/react-dom-client.development.js +0 -5
- package/dist/_virtual/react-dom-client.development.js.map +0 -1
- package/dist/_virtual/react-dom-client.production.js +0 -5
- package/dist/_virtual/react-dom-client.production.js.map +0 -1
- package/dist/_virtual/scheduler.development.js +0 -5
- package/dist/_virtual/scheduler.development.js.map +0 -1
- package/dist/_virtual/scheduler.production.js +0 -5
- package/dist/_virtual/scheduler.production.js.map +0 -1
- package/dist/components/ContentRender/IframeSandbox.d.ts +0 -7
- package/dist/components/ContentRender/IframeSandbox.js +0 -60
- package/dist/components/ContentRender/IframeSandbox.js.map +0 -1
- package/dist/components/ContentRender/SandboxApp.d.ts +0 -6
- package/dist/components/ContentRender/SandboxApp.js +0 -21
- package/dist/components/ContentRender/SandboxApp.js.map +0 -1
|
@@ -2,7 +2,7 @@ import { stringify as w } from "../../../../comma-separated-tokens@2.0.3/node_mo
|
|
|
2
2
|
import { ok as u } from "../../../../devlop@1.1.0/node_modules/devlop/lib/default.js";
|
|
3
3
|
import { svg as m, html as C } from "../../../../property-information@7.1.0/node_modules/property-information/index.js";
|
|
4
4
|
import { stringify as N } from "../../../../space-separated-tokens@2.0.2/node_modules/space-separated-tokens/index.js";
|
|
5
|
-
import S from "../../../../../../../../../_virtual/
|
|
5
|
+
import S from "../../../../../../../../../_virtual/index6.js";
|
|
6
6
|
import { whitespace as j } from "../../../../hast-util-whitespace@3.0.0/node_modules/hast-util-whitespace/lib/index.js";
|
|
7
7
|
import { name as x } from "../../../../estree-util-is-identifier-name@3.0.0/node_modules/estree-util-is-identifier-name/lib/index.js";
|
|
8
8
|
import { VFileMessage as h } from "../../../../vfile-message@4.0.3/node_modules/vfile-message/lib/index.js";
|
|
@@ -4,7 +4,7 @@ import { setAccDescription as Be, getAccDescription as Ie, getAccTitle as Me, se
|
|
|
4
4
|
import { __name as g, log as fe } from "./chunk-AGHRB4JF.js";
|
|
5
5
|
import "../../../../../../d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.js";
|
|
6
6
|
import "../../../../../../d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.js";
|
|
7
|
-
import { d as je } from "../../../../../../../../../../../_virtual/
|
|
7
|
+
import { d as je } from "../../../../../../../../../../../_virtual/index5.js";
|
|
8
8
|
import jt from "../../../../../../d3-selection@3.0.0/node_modules/d3-selection/src/select.js";
|
|
9
9
|
var Ft = (function() {
|
|
10
10
|
var e = /* @__PURE__ */ g(function(_t, x, m, v) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { common_default as b, assignWithDepth_default as E, directiveRegex as $, sanitizeDirective as X, detectType as Y } from "./chunk-ABZYJK2D.js";
|
|
2
2
|
import { __name as s, log as g } from "./chunk-AGHRB4JF.js";
|
|
3
|
-
import { d as G } from "../../../../../../../../../../../_virtual/
|
|
3
|
+
import { d as G } from "../../../../../../../../../../../_virtual/index5.js";
|
|
4
4
|
import "../../../../../../d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.js";
|
|
5
5
|
import "../../../../../../d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.js";
|
|
6
6
|
import w from "../../../../../../lodash-es@4.17.21/node_modules/lodash-es/memoize.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { lineBreakRegex as o } from "./chunk-ABZYJK2D.js";
|
|
2
2
|
import { __name as n } from "./chunk-AGHRB4JF.js";
|
|
3
|
-
import { d as l } from "../../../../../../../../../../../_virtual/
|
|
3
|
+
import { d as l } from "../../../../../../../../../../../_virtual/index5.js";
|
|
4
4
|
var x = /* @__PURE__ */ n((s, t) => {
|
|
5
5
|
const r = s.append("rect");
|
|
6
6
|
if (r.attr("x", t.x), r.attr("y", t.y), r.attr("fill", t.fill), r.attr("stroke", t.stroke), r.attr("width", t.width), r.attr("height", t.height), t.name && r.attr("name", t.name), t.rx && r.attr("rx", t.rx), t.ry && r.attr("ry", t.ry), t.attrs !== void 0)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { utils_default as ie } from "./chunk-S3R3BYOJ.js";
|
|
2
2
|
import { getAccDescription as se, setAccDescription as ne, getDiagramTitle as ae, setDiagramTitle as oe, getAccTitle as ce, setAccTitle as le, getConfig2 as K, configureSvgSize as ue, common_default as de, clear as fe } from "./chunk-ABZYJK2D.js";
|
|
3
3
|
import { __name as c, log as mt } from "./chunk-AGHRB4JF.js";
|
|
4
|
-
import { d as he } from "../../../../../../../../../../../_virtual/
|
|
4
|
+
import { d as he } from "../../../../../../../../../../../_virtual/index5.js";
|
|
5
5
|
import L from "../../../../../../../../../../../_virtual/dayjs.min.js";
|
|
6
6
|
import me from "../../../../../../../../../../../_virtual/isoWeek.js";
|
|
7
7
|
import ke from "../../../../../../../../../../../_virtual/customParseFormat.js";
|
|
@@ -6,7 +6,7 @@ import { setConfig2 as ke, getConfig2 as st, configureSvgSize as Pe, assignWithD
|
|
|
6
6
|
import { __name as f, log as Q } from "./chunk-AGHRB4JF.js";
|
|
7
7
|
import "../../../../../../d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.js";
|
|
8
8
|
import "../../../../../../d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.js";
|
|
9
|
-
import { d as ne } from "../../../../../../../../../../../_virtual/
|
|
9
|
+
import { d as ne } from "../../../../../../../../../../../_virtual/index5.js";
|
|
10
10
|
import Mt from "../../../../../../d3-selection@3.0.0/node_modules/d3-selection/src/select.js";
|
|
11
11
|
var Ut = (function() {
|
|
12
12
|
var e = /* @__PURE__ */ f(function(pt, v, A, L) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import s from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/typeof.js";
|
|
2
2
|
import { version as c, isValidElement as l } from "react";
|
|
3
|
-
import { r as n } from "../../../../../../../../../_virtual/
|
|
3
|
+
import { r as n } from "../../../../../../../../../_virtual/index11.js";
|
|
4
4
|
import m from "./hooks/useMemo.js";
|
|
5
5
|
import v from "./React/isFragment.js";
|
|
6
6
|
var R = Number(c.split(".")[0]), y = function(r, t) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as e } from "../../../../../../../../_virtual/
|
|
1
|
+
import { __module as e } from "../../../../../../../../_virtual/index12.js";
|
|
2
2
|
import { __require as o } from "./cjs/react-is.production.min.js";
|
|
3
3
|
import { __require as t } from "./cjs/react-is.development.js";
|
|
4
4
|
var r;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as r } from "../../../../../../../../../_virtual/
|
|
1
|
+
import { __exports as r } from "../../../../../../../../../_virtual/index9.js";
|
|
2
2
|
import { __require as p } from "../../../../inline-style-parser@0.2.4/node_modules/inline-style-parser/index.js";
|
|
3
3
|
var f;
|
|
4
4
|
function q() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { bail as P } from "../../../../bail@2.0.2/node_modules/bail/index.js";
|
|
2
|
-
import y from "../../../../../../../../../_virtual/
|
|
2
|
+
import y from "../../../../../../../../../_virtual/index7.js";
|
|
3
3
|
import z from "../../../../is-plain-obj@4.1.0/node_modules/is-plain-obj/index.js";
|
|
4
4
|
import { CallableInstance as C } from "./callable-instance.js";
|
|
5
5
|
import { trough as A } from "../../../../trough@2.2.0/node_modules/trough/lib/index.js";
|
package/dist/_virtual/index10.js
CHANGED
package/dist/_virtual/index11.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index11.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index11.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/dist/_virtual/index12.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index12.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index12.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/_virtual/index5.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
var t = o();
|
|
4
|
-
const a = /* @__PURE__ */ r(t);
|
|
1
|
+
import { __require as r } from "../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/@braintree_sanitize-url@7.1.1/node_modules/@braintree/sanitize-url/dist/index.js";
|
|
2
|
+
var i = r();
|
|
5
3
|
export {
|
|
6
|
-
|
|
4
|
+
i as d
|
|
7
5
|
};
|
|
8
6
|
//# sourceMappingURL=index5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index5.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index5.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/dist/_virtual/index6.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getDefaultExportFromCjs as
|
|
2
|
-
import { __require as
|
|
3
|
-
var t =
|
|
4
|
-
const a = /* @__PURE__ */
|
|
1
|
+
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
2
|
+
import { __require as o } from "../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/style-to-js@1.1.18/node_modules/style-to-js/cjs/index.js";
|
|
3
|
+
var t = o();
|
|
4
|
+
const a = /* @__PURE__ */ r(t);
|
|
5
5
|
export {
|
|
6
6
|
a as default
|
|
7
7
|
};
|
package/dist/_virtual/index7.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { getDefaultExportFromCjs as e } from "./_commonjsHelpers.js";
|
|
2
|
+
import { __require as r } from "../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/extend@3.0.2/node_modules/extend/index.js";
|
|
3
|
+
var t = r();
|
|
4
|
+
const a = /* @__PURE__ */ e(t);
|
|
3
5
|
export {
|
|
4
|
-
|
|
6
|
+
a as default
|
|
5
7
|
};
|
|
6
8
|
//# sourceMappingURL=index7.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index7.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index7.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/dist/_virtual/index8.js
CHANGED
|
@@ -1,126 +1,118 @@
|
|
|
1
1
|
import { j as t } from "../../_virtual/jsx-runtime.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import M, { useMemo as z, useRef as B, useEffect as w } from "react";
|
|
5
|
+
import H from "../../_virtual/index.js";
|
|
6
6
|
/* empty css */
|
|
7
7
|
/* empty css */
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { preserveCustomVariableProperties as
|
|
13
|
-
import {
|
|
14
|
-
import { parseMarkdownSegments as
|
|
15
|
-
import { normalizeInlineHtml as
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
if (!(o.index <= a)) {
|
|
32
|
-
c = o.index + o[0].length - 1;
|
|
33
|
-
break;
|
|
34
|
-
}
|
|
35
|
-
const d = [], u = r.slice(0, a), n = r.slice(a, c), l = r.slice(c);
|
|
36
|
-
return u.trim() && d.push({ type: "markdown", value: u }), d.push({ type: "sandbox", value: n }), l.trim() && d.push(...q(l)), d;
|
|
37
|
-
}, te = ({ svg: r }) => {
|
|
38
|
-
const m = W(null);
|
|
39
|
-
return R(() => {
|
|
40
|
-
const a = m.current;
|
|
41
|
-
if (!a) return;
|
|
42
|
-
const i = a.shadowRoot ?? a.attachShadow({ mode: "open" }), c = "content-render-svg-style";
|
|
43
|
-
let o = i.getElementById(c);
|
|
44
|
-
o || (o = document.createElement("style"), o.id = c, o.textContent = `
|
|
8
|
+
import L from "./CodeBlock.js";
|
|
9
|
+
import T from "./plugins/CustomVariable.js";
|
|
10
|
+
import A from "./plugins/MermaidChart.js";
|
|
11
|
+
import $ from "./useTypewriterStateMachine.js";
|
|
12
|
+
import { preserveCustomVariableProperties as P, restoreCustomVariableProperties as V } from "./utils/custom-variable-props.js";
|
|
13
|
+
import { subsetLanguages as _, highlightLanguages as U } from "./utils/highlight-languages.js";
|
|
14
|
+
import { parseMarkdownSegments as W, mermaidBlockIsComplete as q } from "./utils/mermaid-parse.js";
|
|
15
|
+
import { normalizeInlineHtml as E } from "./utils/normalize-inline-html.js";
|
|
16
|
+
import { Markdown as G } from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/react-markdown@10.1.0_@types_react@19.2.2_react@19.0.1/node_modules/react-markdown/lib/index.js";
|
|
17
|
+
import K from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rehype-raw@7.0.0/node_modules/rehype-raw/lib/index.js";
|
|
18
|
+
import D from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rehype-highlight@7.0.2/node_modules/rehype-highlight/lib/index.js";
|
|
19
|
+
import F from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rehype-katex@7.0.1/node_modules/rehype-katex/lib/index.js";
|
|
20
|
+
import J from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-gfm@4.0.1/node_modules/remark-gfm/lib/index.js";
|
|
21
|
+
import O from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-math@6.0.0/node_modules/remark-math/lib/index.js";
|
|
22
|
+
import Q from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-breaks@4.0.0/node_modules/remark-breaks/lib/index.js";
|
|
23
|
+
const X = ({ svg: n }) => {
|
|
24
|
+
const l = B(null);
|
|
25
|
+
return w(() => {
|
|
26
|
+
const c = l.current;
|
|
27
|
+
if (!c) return;
|
|
28
|
+
const s = c.shadowRoot ?? c.attachShadow({ mode: "open" }), f = "content-render-svg-style";
|
|
29
|
+
let a = s.getElementById(f);
|
|
30
|
+
a || (a = document.createElement("style"), a.id = f, a.textContent = `
|
|
45
31
|
:host { display: block; width: 100%; max-width: 100%; text-align: center; }
|
|
46
32
|
svg { max-width: 100%; height: auto; display: inline-block; }
|
|
47
|
-
`,
|
|
48
|
-
(
|
|
49
|
-
).forEach((
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
const
|
|
53
|
-
if (!
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
56
|
-
const [, ,
|
|
57
|
-
if (!
|
|
58
|
-
|
|
33
|
+
`, s.appendChild(a)), Array.from(s.childNodes).filter(
|
|
34
|
+
(r) => r !== a
|
|
35
|
+
).forEach((r) => s.removeChild(r));
|
|
36
|
+
const x = document.createElement("template");
|
|
37
|
+
x.innerHTML = n, s.append(x.content.cloneNode(!0)), s.querySelectorAll("svg").forEach((r) => {
|
|
38
|
+
const d = r.getAttribute("viewBox");
|
|
39
|
+
if (!d) return;
|
|
40
|
+
const u = d.trim().split(/[\s,]+/).map((k) => Number(k));
|
|
41
|
+
if (u.length !== 4 || u.some(Number.isNaN)) return;
|
|
42
|
+
const [, , h, m] = u, b = r.getAttribute("width"), g = r.getAttribute("height"), j = !!b && b !== "0", p = !!g && g !== "0";
|
|
43
|
+
if (!j && !p) {
|
|
44
|
+
r.style.width = "100%", r.style.height = "auto", !r.style.aspectRatio && m > 0 && (r.style.aspectRatio = `${h} / ${m}`);
|
|
59
45
|
return;
|
|
60
46
|
}
|
|
61
|
-
!
|
|
47
|
+
!j && h > 0 && r.setAttribute("width", `${h}`), !p && m > 0 && r.setAttribute("height", `${m}`);
|
|
62
48
|
});
|
|
63
|
-
}, [
|
|
64
|
-
},
|
|
65
|
-
content:
|
|
66
|
-
customRenderBar:
|
|
67
|
-
onSend:
|
|
68
|
-
typingSpeed:
|
|
69
|
-
enableTypewriter:
|
|
70
|
-
defaultButtonText:
|
|
71
|
-
defaultInputText:
|
|
72
|
-
defaultSelectedValues:
|
|
73
|
-
readonly:
|
|
74
|
-
onTypeFinished:
|
|
75
|
-
confirmButtonText:
|
|
76
|
-
copyButtonText:
|
|
77
|
-
copiedButtonText:
|
|
78
|
-
onClickCustomButtonAfterContent:
|
|
79
|
-
beforeSend:
|
|
49
|
+
}, [n]), /* @__PURE__ */ t.jsx("div", { className: "content-render-svg-scroll", children: /* @__PURE__ */ t.jsx("div", { className: "content-render-svg", ref: l }) });
|
|
50
|
+
}, Ne = ({
|
|
51
|
+
content: n,
|
|
52
|
+
customRenderBar: l,
|
|
53
|
+
onSend: c,
|
|
54
|
+
typingSpeed: s = 30,
|
|
55
|
+
enableTypewriter: f = !1,
|
|
56
|
+
defaultButtonText: a,
|
|
57
|
+
defaultInputText: v,
|
|
58
|
+
defaultSelectedValues: x,
|
|
59
|
+
readonly: r = !1,
|
|
60
|
+
onTypeFinished: d,
|
|
61
|
+
confirmButtonText: u,
|
|
62
|
+
copyButtonText: h,
|
|
63
|
+
copiedButtonText: m,
|
|
64
|
+
onClickCustomButtonAfterContent: b,
|
|
65
|
+
beforeSend: g
|
|
80
66
|
// tooltipMinLength,
|
|
81
67
|
}) => {
|
|
82
|
-
const
|
|
83
|
-
() =>
|
|
84
|
-
[
|
|
85
|
-
),
|
|
68
|
+
const j = z(
|
|
69
|
+
() => E(n),
|
|
70
|
+
[n]
|
|
71
|
+
), { displayContent: p, isComplete: y } = $({
|
|
72
|
+
// processMarkdownText will let code block printf("You win!\n") become printf("You win!<br/>");
|
|
73
|
+
// content: processMarkdownText(content),
|
|
74
|
+
content: j,
|
|
75
|
+
typingSpeed: s,
|
|
76
|
+
disabled: !f
|
|
77
|
+
}), k = {
|
|
86
78
|
"custom-button-after-content": ({
|
|
87
79
|
children: e
|
|
88
80
|
}) => /* @__PURE__ */ t.jsx(
|
|
89
81
|
"button",
|
|
90
82
|
{
|
|
91
83
|
className: "content-render-custom-button-after-content",
|
|
92
|
-
onClick:
|
|
84
|
+
onClick: b,
|
|
93
85
|
children: /* @__PURE__ */ t.jsx("span", { className: "content-render-custom-button-after-content-inner", children: e })
|
|
94
86
|
}
|
|
95
87
|
),
|
|
96
88
|
"custom-variable": (e) => /* @__PURE__ */ t.jsx(
|
|
97
|
-
|
|
89
|
+
T,
|
|
98
90
|
{
|
|
99
91
|
...e,
|
|
100
|
-
readonly:
|
|
101
|
-
defaultButtonText:
|
|
102
|
-
defaultInputText:
|
|
103
|
-
defaultSelectedValues:
|
|
104
|
-
onSend:
|
|
105
|
-
beforeSend:
|
|
106
|
-
confirmButtonText:
|
|
92
|
+
readonly: r,
|
|
93
|
+
defaultButtonText: a,
|
|
94
|
+
defaultInputText: v,
|
|
95
|
+
defaultSelectedValues: x,
|
|
96
|
+
onSend: c,
|
|
97
|
+
beforeSend: g,
|
|
98
|
+
confirmButtonText: u
|
|
107
99
|
}
|
|
108
100
|
),
|
|
109
101
|
code: (e) => {
|
|
110
|
-
const { className:
|
|
111
|
-
if (/language-(\w+)/.exec(
|
|
112
|
-
const
|
|
113
|
-
return /* @__PURE__ */ t.jsx(
|
|
102
|
+
const { className: o, children: i, ...C } = e;
|
|
103
|
+
if (/language-(\w+)/.exec(o || "")?.[1] === "mermaid") {
|
|
104
|
+
const R = i?.toString().replace(/\n$/, "") || "", S = q(n, R);
|
|
105
|
+
return /* @__PURE__ */ t.jsx(A, { chart: R, frozen: S });
|
|
114
106
|
}
|
|
115
|
-
return /* @__PURE__ */ t.jsx("code", { className:
|
|
107
|
+
return /* @__PURE__ */ t.jsx("code", { className: o, ...C, children: i });
|
|
116
108
|
},
|
|
117
109
|
table: ({ ...e }) => /* @__PURE__ */ t.jsx("div", { className: "content-render-table-container", children: /* @__PURE__ */ t.jsx("table", { className: "content-render-table", ...e }) }),
|
|
118
110
|
th: ({ ...e }) => /* @__PURE__ */ t.jsx("th", { className: "content-render-th", ...e }),
|
|
119
111
|
td: ({ ...e }) => /* @__PURE__ */ t.jsx("td", { className: "content-render-td", ...e }),
|
|
120
112
|
tr: ({ ...e }) => /* @__PURE__ */ t.jsx("tr", { className: "content-render-tr", ...e }),
|
|
121
|
-
li: ({ node: e, ...
|
|
122
|
-
const
|
|
123
|
-
return typeof
|
|
113
|
+
li: ({ node: e, ...o }) => {
|
|
114
|
+
const i = e?.properties?.className;
|
|
115
|
+
return typeof i == "string" && i.includes("task-list-item") || Array.isArray(i) && i.includes("task-list-item") ? /* @__PURE__ */ t.jsx("li", { className: "content-render-task-list-item", ...o }) : /* @__PURE__ */ t.jsx("li", { ...o });
|
|
124
116
|
},
|
|
125
117
|
ol: ({ ...e }) => /* @__PURE__ */ t.jsx("ol", { className: "content-render-ol", ...e }),
|
|
126
118
|
ul: ({ ...e }) => /* @__PURE__ */ t.jsx("ul", { className: "content-render-ul", ...e }),
|
|
@@ -133,113 +125,64 @@ const q = (r) => {
|
|
|
133
125
|
...e
|
|
134
126
|
}
|
|
135
127
|
) : /* @__PURE__ */ t.jsx("input", { ...e }),
|
|
136
|
-
a: ({ children: e, ...
|
|
128
|
+
a: ({ children: e, ...o }) => /* @__PURE__ */ t.jsx("a", { target: "_blank", rel: "noopener noreferrer", ...o, children: e }),
|
|
137
129
|
pre: (e) => /* @__PURE__ */ t.jsx(
|
|
138
|
-
|
|
130
|
+
L,
|
|
139
131
|
{
|
|
140
132
|
...e,
|
|
141
|
-
copyButtonText:
|
|
142
|
-
copiedButtonText:
|
|
133
|
+
copyButtonText: h,
|
|
134
|
+
copiedButtonText: m
|
|
143
135
|
}
|
|
144
136
|
)
|
|
145
|
-
},
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
), g = S.some(
|
|
155
|
-
(e) => e.type === "sandbox"
|
|
156
|
-
), G = C(
|
|
157
|
-
() => Y(N),
|
|
158
|
-
[N]
|
|
159
|
-
), w = W(!1);
|
|
160
|
-
return R(() => {
|
|
161
|
-
g || v && !w.current && (w.current = !0, l?.());
|
|
162
|
-
}, [g, v, l]), R(() => {
|
|
163
|
-
g || (w.current = !1);
|
|
164
|
-
}, [g, r]), g ? /* @__PURE__ */ t.jsx("div", { className: "content-render", children: S.map(
|
|
165
|
-
(e, s) => e.type === "sandbox" ? /* @__PURE__ */ t.jsx(
|
|
166
|
-
ee,
|
|
167
|
-
{
|
|
168
|
-
content: e.value,
|
|
169
|
-
className: "content-render-iframe"
|
|
170
|
-
},
|
|
171
|
-
`sandbox-${s}`
|
|
172
|
-
) : /* @__PURE__ */ t.jsx("div", { className: "markdown-body", children: /* @__PURE__ */ t.jsx(
|
|
173
|
-
H,
|
|
174
|
-
{
|
|
175
|
-
remarkPlugins: [
|
|
176
|
-
_,
|
|
177
|
-
E,
|
|
178
|
-
I,
|
|
179
|
-
[U, { omit: ["table", "code", "listItem"] }]
|
|
180
|
-
],
|
|
181
|
-
rehypePlugins: [
|
|
182
|
-
L,
|
|
183
|
-
T,
|
|
184
|
-
[
|
|
185
|
-
V,
|
|
186
|
-
{
|
|
187
|
-
detect: !0,
|
|
188
|
-
subset: P,
|
|
189
|
-
languages: M
|
|
190
|
-
}
|
|
191
|
-
]
|
|
192
|
-
],
|
|
193
|
-
components: b,
|
|
194
|
-
children: $(e.value)
|
|
195
|
-
}
|
|
196
|
-
) }, `md-${s}`)
|
|
197
|
-
) }) : /* @__PURE__ */ t.jsxs("div", { className: "content-render", children: [
|
|
198
|
-
G.map((e, s) => {
|
|
137
|
+
}, N = B(!1);
|
|
138
|
+
w(() => {
|
|
139
|
+
y && !N.current && (N.current = !0, d?.());
|
|
140
|
+
}, [y, d]), w(() => {
|
|
141
|
+
N.current = !1;
|
|
142
|
+
}, [n]);
|
|
143
|
+
const I = W(p);
|
|
144
|
+
return /* @__PURE__ */ t.jsxs("div", { className: "content-render markdown-body", children: [
|
|
145
|
+
I.map((e, o) => {
|
|
199
146
|
if (e.type === "text")
|
|
200
|
-
return /* @__PURE__ */ t.jsx(
|
|
201
|
-
|
|
147
|
+
return /* @__PURE__ */ t.jsx(
|
|
148
|
+
G,
|
|
202
149
|
{
|
|
203
|
-
remarkPlugins: [
|
|
204
|
-
_,
|
|
205
|
-
E,
|
|
206
|
-
I,
|
|
207
|
-
U
|
|
208
|
-
],
|
|
150
|
+
remarkPlugins: [J, O, H, Q],
|
|
209
151
|
rehypePlugins: [
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
152
|
+
P,
|
|
153
|
+
K,
|
|
154
|
+
V,
|
|
213
155
|
[
|
|
214
|
-
|
|
215
|
-
{ languages:
|
|
156
|
+
D,
|
|
157
|
+
{ languages: U, subset: _ }
|
|
216
158
|
],
|
|
217
|
-
|
|
159
|
+
F
|
|
218
160
|
],
|
|
219
|
-
components:
|
|
161
|
+
components: k,
|
|
220
162
|
children: e.value
|
|
221
|
-
}
|
|
222
|
-
|
|
163
|
+
},
|
|
164
|
+
o
|
|
165
|
+
);
|
|
223
166
|
if (e.type === "mermaid")
|
|
224
167
|
return /* @__PURE__ */ t.jsx(
|
|
225
|
-
|
|
168
|
+
A,
|
|
226
169
|
{
|
|
227
170
|
chart: e.value,
|
|
228
171
|
frozen: !e.complete
|
|
229
172
|
},
|
|
230
|
-
|
|
173
|
+
o
|
|
231
174
|
);
|
|
232
175
|
if (e.type === "svg")
|
|
233
|
-
return /* @__PURE__ */ t.jsx(
|
|
176
|
+
return /* @__PURE__ */ t.jsx(X, { svg: e.value }, o);
|
|
234
177
|
}),
|
|
235
|
-
|
|
236
|
-
content:
|
|
237
|
-
displayContent:
|
|
238
|
-
onSend:
|
|
178
|
+
l && /* @__PURE__ */ t.jsx("div", { className: "content-render-custom-bar", children: M.createElement(l, {
|
|
179
|
+
content: n,
|
|
180
|
+
displayContent: p,
|
|
181
|
+
onSend: c
|
|
239
182
|
}) })
|
|
240
183
|
] });
|
|
241
184
|
};
|
|
242
185
|
export {
|
|
243
|
-
|
|
186
|
+
Ne as default
|
|
244
187
|
};
|
|
245
188
|
//# sourceMappingURL=ContentRender.js.map
|