markdown-flow-ui 0.1.83-beta.0 → 0.1.83-beta.10
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/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-input@1.8.0_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-input/es/BaseInput.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/ResizableTextArea.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/TextArea.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/index.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-flow@0.1.6/node_modules/remark-flow/dist/remark-custom-variable.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-flow@0.1.6/node_modules/remark-flow/dist/remark-interaction.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/_virtual/index10.js +2 -2
- package/dist/_virtual/index3.js +4 -5
- package/dist/_virtual/index3.js.map +1 -1
- package/dist/_virtual/index4.js +5 -4
- package/dist/_virtual/index4.js.map +1 -1
- package/dist/_virtual/index7.js +2 -3
- package/dist/_virtual/index7.js.map +1 -1
- package/dist/_virtual/index8.js +3 -2
- package/dist/_virtual/index8.js.map +1 -1
- package/dist/components/ContentRender/ContentRender.js +91 -90
- package/dist/components/ContentRender/ContentRender.js.map +1 -1
- package/dist/components/ContentRender/IframeSandbox.d.ts +1 -0
- package/dist/components/ContentRender/IframeSandbox.js +107 -68
- package/dist/components/ContentRender/IframeSandbox.js.map +1 -1
- package/dist/components/ContentRender/SandboxApp.d.ts +0 -1
- package/dist/components/ContentRender/SandboxApp.js +72 -89
- package/dist/components/ContentRender/SandboxApp.js.map +1 -1
- package/dist/components/ContentRender/utils/split-content.d.ts +4 -1
- package/dist/components/ContentRender/utils/split-content.js +55 -24
- package/dist/components/ContentRender/utils/split-content.js.map +1 -1
- package/dist/components/ContentRender/utils/split-content.test.d.ts +1 -0
- package/dist/components/ui/inputGroup/textarea.js +1 -1
- package/dist/markdown-flow-ui-lib.css +1 -1
- package/package.json +1 -1
|
@@ -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/index8.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/index8.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/index8.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/index8.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/index8.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) {
|
|
@@ -2,7 +2,7 @@ import $ from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/hel
|
|
|
2
2
|
import oe from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/extends.js";
|
|
3
3
|
import r from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/defineProperty.js";
|
|
4
4
|
import te from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/typeof.js";
|
|
5
|
-
import d from "../../../../../../../../../_virtual/
|
|
5
|
+
import d from "../../../../../../../../../_virtual/index4.js";
|
|
6
6
|
import l, { useRef as q, cloneElement as ie } from "react";
|
|
7
7
|
import { hasPrefixSuffix as re, hasAddon as de } from "./utils/commonUtils.js";
|
|
8
8
|
var xe = /* @__PURE__ */ l.forwardRef(function(e, z) {
|
|
@@ -4,7 +4,7 @@ import w from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/hel
|
|
|
4
4
|
import J from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/typeof.js";
|
|
5
5
|
import s from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/slicedToArray.js";
|
|
6
6
|
import K from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js";
|
|
7
|
-
import Q from "../../../../../../../../../_virtual/
|
|
7
|
+
import Q from "../../../../../../../../../_virtual/index4.js";
|
|
8
8
|
import ee from "../../../../rc-resize-observer@1.4.3_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-resize-observer/es/index.js";
|
|
9
9
|
import M from "../../../../rc-util@5.44.4_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-util/es/hooks/useLayoutEffect.js";
|
|
10
10
|
import te from "../../../../rc-util@5.44.4_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-util/es/hooks/useMergedState.js";
|
|
@@ -4,7 +4,7 @@ import d from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/hel
|
|
|
4
4
|
import Ae from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js";
|
|
5
5
|
import x from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/slicedToArray.js";
|
|
6
6
|
import Fe from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js";
|
|
7
|
-
import h from "../../../../../../../../../_virtual/
|
|
7
|
+
import h from "../../../../../../../../../_virtual/index4.js";
|
|
8
8
|
import Ne from "../../../../rc-input@1.8.0_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-input/es/BaseInput.js";
|
|
9
9
|
import Te from "../../../../rc-util@5.44.4_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-util/es/hooks/useMergedState.js";
|
|
10
10
|
import o, { useRef as Y, useImperativeHandle as $e, useEffect as Ie } from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import t from "./TextArea.js";
|
|
2
|
-
import "../../../../../../../../../_virtual/
|
|
2
|
+
import "../../../../../../../../../_virtual/index4.js";
|
|
3
3
|
import "../../../../rc-resize-observer@1.4.3_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-resize-observer/es/index.js";
|
|
4
4
|
import "../../../../rc-util@5.44.4_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-util/es/hooks/useLayoutEffect.js";
|
|
5
5
|
import "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __exports as a } from "../../../../../../../../../_virtual/remark-custom-variable.js";
|
|
2
|
-
import g from "../../../../../../../../../_virtual/
|
|
2
|
+
import g from "../../../../../../../../../_virtual/index3.js";
|
|
3
3
|
import { __require as h } from "./interaction-parser.js";
|
|
4
4
|
var m;
|
|
5
5
|
function C() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __exports as n } from "../../../../../../../../../_virtual/remark-interaction.js";
|
|
2
|
-
import I from "../../../../../../../../../_virtual/
|
|
2
|
+
import I from "../../../../../../../../../_virtual/index3.js";
|
|
3
3
|
import { __require as g } from "./interaction-parser.js";
|
|
4
4
|
var m;
|
|
5
5
|
function k() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as r } from "../../../../../../../../../_virtual/
|
|
1
|
+
import { __exports as r } from "../../../../../../../../../_virtual/index7.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() {
|
package/dist/_virtual/index10.js
CHANGED
package/dist/_virtual/index3.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
const t = /* @__PURE__ */ r(e);
|
|
1
|
+
import { getAugmentedNamespace as e } from "./_commonjsHelpers.js";
|
|
2
|
+
import * as r from "../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/unist-util-visit@5.0.0/node_modules/unist-util-visit/index.js";
|
|
3
|
+
const m = /* @__PURE__ */ e(r);
|
|
5
4
|
export {
|
|
6
|
-
|
|
5
|
+
m as default
|
|
7
6
|
};
|
|
8
7
|
//# sourceMappingURL=index3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index3.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
package/dist/_virtual/index4.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
2
|
+
import { __require as s } from "../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js";
|
|
3
|
+
var e = s();
|
|
4
|
+
const t = /* @__PURE__ */ r(e);
|
|
4
5
|
export {
|
|
5
|
-
|
|
6
|
+
t as default
|
|
6
7
|
};
|
|
7
8
|
//# sourceMappingURL=index4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index4.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index4.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/dist/_virtual/index7.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
var i = r();
|
|
1
|
+
var r = {};
|
|
3
2
|
export {
|
|
4
|
-
|
|
3
|
+
r as __exports
|
|
5
4
|
};
|
|
6
5
|
//# 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,5 +1,6 @@
|
|
|
1
|
-
|
|
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();
|
|
2
3
|
export {
|
|
3
|
-
|
|
4
|
+
i as d
|
|
4
5
|
};
|
|
5
6
|
//# sourceMappingURL=index8.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index8.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index8.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -1,100 +1,100 @@
|
|
|
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 W, { useMemo as S, useRef as V, useEffect as L } from "react";
|
|
5
|
+
import q 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 { subsetLanguages as
|
|
14
|
-
import { parseMarkdownSegments as
|
|
15
|
-
import { normalizeInlineHtml as
|
|
16
|
-
import
|
|
17
|
-
import { splitContentSegments as
|
|
18
|
-
import { Markdown as
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
const
|
|
26
|
-
const c =
|
|
8
|
+
import F from "./CodeBlock.js";
|
|
9
|
+
import G from "./plugins/CustomVariable.js";
|
|
10
|
+
import z from "./plugins/MermaidChart.js";
|
|
11
|
+
import K from "./useTypewriterStateMachine.js";
|
|
12
|
+
import { preserveCustomVariableProperties as D, restoreCustomVariableProperties as J } from "./utils/custom-variable-props.js";
|
|
13
|
+
import { subsetLanguages as O, highlightLanguages as Q } from "./utils/highlight-languages.js";
|
|
14
|
+
import { parseMarkdownSegments as X, mermaidBlockIsComplete as Y } from "./utils/mermaid-parse.js";
|
|
15
|
+
import { normalizeInlineHtml as H } from "./utils/normalize-inline-html.js";
|
|
16
|
+
import Z from "./IframeSandbox.js";
|
|
17
|
+
import { splitContentSegments as E } from "./utils/split-content.js";
|
|
18
|
+
import { Markdown as ee } 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";
|
|
19
|
+
import te from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rehype-raw@7.0.0/node_modules/rehype-raw/lib/index.js";
|
|
20
|
+
import re from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rehype-highlight@7.0.2/node_modules/rehype-highlight/lib/index.js";
|
|
21
|
+
import ne from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rehype-katex@7.0.1/node_modules/rehype-katex/lib/index.js";
|
|
22
|
+
import se from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-gfm@4.0.1/node_modules/remark-gfm/lib/index.js";
|
|
23
|
+
import oe from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-math@6.0.0/node_modules/remark-math/lib/index.js";
|
|
24
|
+
import ae from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-breaks@4.0.0/node_modules/remark-breaks/lib/index.js";
|
|
25
|
+
const ie = ({ svg: s }) => {
|
|
26
|
+
const c = V(null);
|
|
27
27
|
return L(() => {
|
|
28
28
|
const o = c.current;
|
|
29
29
|
if (!o) return;
|
|
30
|
-
const a = o.shadowRoot ?? o.attachShadow({ mode: "open" }),
|
|
31
|
-
let i = a.getElementById(
|
|
32
|
-
i || (i = document.createElement("style"), i.id =
|
|
30
|
+
const a = o.shadowRoot ?? o.attachShadow({ mode: "open" }), f = "content-render-svg-style";
|
|
31
|
+
let i = a.getElementById(f);
|
|
32
|
+
i || (i = document.createElement("style"), i.id = f, i.textContent = `
|
|
33
33
|
svg { height: auto; display: inline-block; }
|
|
34
34
|
svg.content-render-svg-el--responsive { width: 100%; max-width: 100%; }
|
|
35
35
|
svg.content-render-svg-el--fixed { max-width: none; }
|
|
36
36
|
`, a.appendChild(i)), Array.from(a.childNodes).filter(
|
|
37
37
|
(r) => r !== i
|
|
38
38
|
).forEach((r) => a.removeChild(r));
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
let
|
|
39
|
+
const x = document.createElement("template");
|
|
40
|
+
x.innerHTML = s, a.append(x.content.cloneNode(!0));
|
|
41
|
+
let g = !1, d = !1;
|
|
42
42
|
a.querySelectorAll("svg").forEach((r) => {
|
|
43
|
-
const
|
|
44
|
-
if (!
|
|
45
|
-
const u =
|
|
43
|
+
const b = r.getAttribute("viewBox");
|
|
44
|
+
if (!b) return;
|
|
45
|
+
const u = b.trim().split(/[\s,]+/).map((w) => Number(w));
|
|
46
46
|
if (u.length !== 4 || u.some(Number.isNaN)) return;
|
|
47
|
-
const [, , h, l] = u,
|
|
48
|
-
if (!
|
|
49
|
-
|
|
47
|
+
const [, , h, l] = u, j = r.getAttribute("width"), y = r.getAttribute("height"), N = !!j && j !== "0", k = !!y && y !== "0";
|
|
48
|
+
if (!N && !k) {
|
|
49
|
+
g = !0, r.classList.add("content-render-svg-el--responsive"), r.classList.remove("content-render-svg-el--fixed"), r.style.width = "100%", r.style.height = "auto", !r.style.aspectRatio && l > 0 && (r.style.aspectRatio = `${h} / ${l}`);
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
|
-
d = !0, r.classList.add("content-render-svg-el--fixed"), r.classList.remove("content-render-svg-el--responsive"), !
|
|
52
|
+
d = !0, r.classList.add("content-render-svg-el--fixed"), r.classList.remove("content-render-svg-el--responsive"), !N && h > 0 && r.setAttribute("width", `${h}`), !k && l > 0 && r.setAttribute("height", `${l}`);
|
|
53
53
|
});
|
|
54
|
-
const
|
|
55
|
-
o.classList.toggle("content-render-svg--responsive",
|
|
54
|
+
const v = g && !d;
|
|
55
|
+
o.classList.toggle("content-render-svg--responsive", v), o.classList.toggle("content-render-svg--fixed", !v);
|
|
56
56
|
}, [s]), /* @__PURE__ */ t.jsx("div", { className: "content-render-svg-scroll", children: /* @__PURE__ */ t.jsx("div", { className: "content-render-svg", ref: c }) });
|
|
57
|
-
},
|
|
58
|
-
K,
|
|
59
|
-
ee,
|
|
57
|
+
}, ce = [se, oe, q, ae], me = [
|
|
60
58
|
D,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
59
|
+
te,
|
|
60
|
+
J,
|
|
61
|
+
[re, { languages: Q, subset: O }],
|
|
62
|
+
ne
|
|
63
|
+
], P = ({ content: s, components: c }) => /* @__PURE__ */ t.jsx("div", { className: "markdown-renderer", children: /* @__PURE__ */ t.jsx(
|
|
64
|
+
ee,
|
|
65
65
|
{
|
|
66
|
-
remarkPlugins:
|
|
67
|
-
rehypePlugins:
|
|
66
|
+
remarkPlugins: ce,
|
|
67
|
+
rehypePlugins: me,
|
|
68
68
|
components: c,
|
|
69
69
|
children: s
|
|
70
70
|
}
|
|
71
|
-
) }),
|
|
71
|
+
) }), He = ({
|
|
72
72
|
content: s,
|
|
73
73
|
customRenderBar: c,
|
|
74
74
|
onSend: o,
|
|
75
75
|
typingSpeed: a = 30,
|
|
76
|
-
enableTypewriter:
|
|
76
|
+
enableTypewriter: f = !1,
|
|
77
77
|
defaultButtonText: i,
|
|
78
78
|
defaultInputText: A,
|
|
79
|
-
defaultSelectedValues:
|
|
80
|
-
readonly:
|
|
79
|
+
defaultSelectedValues: x,
|
|
80
|
+
readonly: g = !1,
|
|
81
81
|
onTypeFinished: d,
|
|
82
|
-
confirmButtonText:
|
|
82
|
+
confirmButtonText: v,
|
|
83
83
|
copyButtonText: r,
|
|
84
|
-
copiedButtonText:
|
|
84
|
+
copiedButtonText: b,
|
|
85
85
|
sandboxLoadingText: u,
|
|
86
86
|
sandboxStyleLoadingText: h,
|
|
87
87
|
sandboxScriptLoadingText: l,
|
|
88
|
-
|
|
88
|
+
sandboxFullscreenButtonText: j,
|
|
89
89
|
sandboxMode: y = "content",
|
|
90
90
|
onClickCustomButtonAfterContent: N,
|
|
91
91
|
beforeSend: k
|
|
92
92
|
// tooltipMinLength,
|
|
93
93
|
}) => {
|
|
94
|
-
const
|
|
95
|
-
() =>
|
|
94
|
+
const B = S(
|
|
95
|
+
() => H(s),
|
|
96
96
|
[s]
|
|
97
|
-
),
|
|
97
|
+
), w = {
|
|
98
98
|
"custom-button-after-content": ({
|
|
99
99
|
children: e
|
|
100
100
|
}) => /* @__PURE__ */ t.jsx(
|
|
@@ -106,23 +106,23 @@ const ae = ({ svg: s }) => {
|
|
|
106
106
|
}
|
|
107
107
|
),
|
|
108
108
|
"custom-variable": (e) => /* @__PURE__ */ t.jsx(
|
|
109
|
-
|
|
109
|
+
G,
|
|
110
110
|
{
|
|
111
111
|
...e,
|
|
112
|
-
readonly:
|
|
112
|
+
readonly: g,
|
|
113
113
|
defaultButtonText: i,
|
|
114
114
|
defaultInputText: A,
|
|
115
|
-
defaultSelectedValues:
|
|
115
|
+
defaultSelectedValues: x,
|
|
116
116
|
onSend: o,
|
|
117
117
|
beforeSend: k,
|
|
118
|
-
confirmButtonText:
|
|
118
|
+
confirmButtonText: v
|
|
119
119
|
}
|
|
120
120
|
),
|
|
121
121
|
code: (e) => {
|
|
122
122
|
const { className: n, children: m, ...M } = e;
|
|
123
123
|
if (/language-(\w+)/.exec(n || "")?.[1] === "mermaid") {
|
|
124
|
-
const
|
|
125
|
-
return /* @__PURE__ */ t.jsx(
|
|
124
|
+
const $ = m?.toString().replace(/\n$/, "") || "", U = Y(s, $);
|
|
125
|
+
return /* @__PURE__ */ t.jsx(z, { chart: $, frozen: U });
|
|
126
126
|
}
|
|
127
127
|
return /* @__PURE__ */ t.jsx("code", { className: n, ...M, children: m });
|
|
128
128
|
},
|
|
@@ -147,66 +147,67 @@ const ae = ({ svg: s }) => {
|
|
|
147
147
|
) : /* @__PURE__ */ t.jsx("input", { ...e }),
|
|
148
148
|
a: ({ children: e, ...n }) => /* @__PURE__ */ t.jsx("a", { target: "_blank", rel: "noopener noreferrer", ...n, children: e }),
|
|
149
149
|
pre: (e) => /* @__PURE__ */ t.jsx(
|
|
150
|
-
|
|
150
|
+
F,
|
|
151
151
|
{
|
|
152
152
|
...e,
|
|
153
153
|
copyButtonText: r,
|
|
154
|
-
copiedButtonText:
|
|
154
|
+
copiedButtonText: b
|
|
155
155
|
}
|
|
156
156
|
)
|
|
157
|
-
}, { displayContent:
|
|
157
|
+
}, { displayContent: C, isComplete: I } = K({
|
|
158
158
|
// processMarkdownText will let code block printf("You win!\n") become printf("You win!<br/>");
|
|
159
159
|
// content: processMarkdownText(content),
|
|
160
|
-
content:
|
|
160
|
+
content: B,
|
|
161
161
|
typingSpeed: a,
|
|
162
|
-
disabled: !
|
|
163
|
-
}),
|
|
164
|
-
() =>
|
|
162
|
+
disabled: !f
|
|
163
|
+
}), T = S(
|
|
164
|
+
() => E(s),
|
|
165
165
|
[s]
|
|
166
|
-
),
|
|
166
|
+
), p = T.some(
|
|
167
167
|
(e) => e.type === "sandbox"
|
|
168
|
-
),
|
|
169
|
-
() =>
|
|
170
|
-
[
|
|
171
|
-
), R =
|
|
168
|
+
), _ = S(
|
|
169
|
+
() => X(C),
|
|
170
|
+
[C]
|
|
171
|
+
), R = V(!1);
|
|
172
172
|
return L(() => {
|
|
173
|
-
|
|
174
|
-
}, [
|
|
175
|
-
|
|
176
|
-
}, [
|
|
173
|
+
p || I && !R.current && (R.current = !0, d?.());
|
|
174
|
+
}, [p, I, d]), L(() => {
|
|
175
|
+
p || (R.current = !1);
|
|
176
|
+
}, [p, s]), p ? /* @__PURE__ */ t.jsx("div", { className: "content-render markdown-body", children: T.map(
|
|
177
177
|
(e, n) => e.type === "sandbox" ? /* @__PURE__ */ t.jsx(
|
|
178
|
-
|
|
178
|
+
Z,
|
|
179
179
|
{
|
|
180
180
|
content: e.value,
|
|
181
181
|
className: "content-render-iframe",
|
|
182
182
|
loadingText: u,
|
|
183
183
|
styleLoadingText: h,
|
|
184
184
|
scriptLoadingText: l,
|
|
185
|
+
fullScreenButtonText: j,
|
|
185
186
|
mode: y
|
|
186
187
|
},
|
|
187
188
|
`sandbox-${n}`
|
|
188
189
|
) : /* @__PURE__ */ t.jsx(
|
|
189
|
-
|
|
190
|
+
P,
|
|
190
191
|
{
|
|
191
|
-
components:
|
|
192
|
-
content:
|
|
192
|
+
components: w,
|
|
193
|
+
content: H(e.value)
|
|
193
194
|
},
|
|
194
195
|
`md-${n}`
|
|
195
196
|
)
|
|
196
197
|
) }) : /* @__PURE__ */ t.jsxs("div", { className: "content-render markdown-body", children: [
|
|
197
|
-
|
|
198
|
+
_.map((e, n) => {
|
|
198
199
|
if (e.type === "text")
|
|
199
200
|
return /* @__PURE__ */ t.jsx(
|
|
200
|
-
|
|
201
|
+
P,
|
|
201
202
|
{
|
|
202
|
-
components:
|
|
203
|
+
components: w,
|
|
203
204
|
content: e.value
|
|
204
205
|
},
|
|
205
206
|
n
|
|
206
207
|
);
|
|
207
208
|
if (e.type === "mermaid")
|
|
208
209
|
return /* @__PURE__ */ t.jsx(
|
|
209
|
-
|
|
210
|
+
z,
|
|
210
211
|
{
|
|
211
212
|
chart: e.value,
|
|
212
213
|
frozen: !e.complete
|
|
@@ -214,17 +215,17 @@ const ae = ({ svg: s }) => {
|
|
|
214
215
|
n
|
|
215
216
|
);
|
|
216
217
|
if (e.type === "svg")
|
|
217
|
-
return /* @__PURE__ */ t.jsx(
|
|
218
|
+
return /* @__PURE__ */ t.jsx(ie, { svg: e.value }, n);
|
|
218
219
|
}),
|
|
219
|
-
c && /* @__PURE__ */ t.jsx("div", { className: "content-render-custom-bar", children:
|
|
220
|
+
c && /* @__PURE__ */ t.jsx("div", { className: "content-render-custom-bar", children: W.createElement(c, {
|
|
220
221
|
content: s,
|
|
221
|
-
displayContent:
|
|
222
|
+
displayContent: C,
|
|
222
223
|
onSend: o
|
|
223
224
|
}) })
|
|
224
225
|
] });
|
|
225
226
|
};
|
|
226
227
|
export {
|
|
227
|
-
|
|
228
|
-
|
|
228
|
+
P as MarkdownRenderer,
|
|
229
|
+
He as default
|
|
229
230
|
};
|
|
230
231
|
//# sourceMappingURL=ContentRender.js.map
|