markdown-flow-ui 0.1.81-beta.6 → 0.1.82
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/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/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/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/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 +3 -2
- package/dist/_virtual/index7.js.map +1 -1
- package/dist/_virtual/index8.js +2 -3
- package/dist/_virtual/index8.js.map +1 -1
- package/dist/_virtual/index9.js +2 -2
- package/dist/assets/markdown-flow-ui.css +1 -1
- package/dist/components/ContentRender/ContentRender.js +119 -171
- package/dist/components/ContentRender/ContentRender.js.map +1 -1
- package/dist/components/ContentRender/ContentRender.stories.d.ts +0 -1
- package/dist/components/ui/inputGroup/textarea.js +1 -1
- package/dist/markdown-flow-ui-lib.css +1 -1
- package/package.json +5 -10
- 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
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react-dom-client.production.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scheduler.development.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scheduler.production.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { j as m } from "../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { useRef as a, useState as R, useEffect as v } from "react";
|
|
3
|
-
import { c as E } from "../../_virtual/client.js";
|
|
4
|
-
import H from "./SandboxApp.js";
|
|
5
|
-
const B = ({
|
|
6
|
-
content: s,
|
|
7
|
-
className: l
|
|
8
|
-
}) => {
|
|
9
|
-
const n = a(null), e = a(null), [u, h] = R(480);
|
|
10
|
-
return v(() => {
|
|
11
|
-
const c = n.current;
|
|
12
|
-
if (!c) return;
|
|
13
|
-
const t = c.contentDocument;
|
|
14
|
-
if (!t) return;
|
|
15
|
-
t.open(), t.write(`<!DOCTYPE html>
|
|
16
|
-
<html>
|
|
17
|
-
<head>
|
|
18
|
-
<meta charset="utf-8" />
|
|
19
|
-
<style>
|
|
20
|
-
html, body { margin: 0; padding: 0; }
|
|
21
|
-
</style>
|
|
22
|
-
</head>
|
|
23
|
-
<body>
|
|
24
|
-
<div id="root"></div>
|
|
25
|
-
</body>
|
|
26
|
-
</html>`), t.close();
|
|
27
|
-
const o = t.getElementById("root");
|
|
28
|
-
if (!o) return;
|
|
29
|
-
e.current && e.current.unmount();
|
|
30
|
-
const r = E.createRoot(o);
|
|
31
|
-
e.current = r, r.render(/* @__PURE__ */ m.jsx(H, { html: s }));
|
|
32
|
-
const d = () => {
|
|
33
|
-
if (!n.current || !t.body) return;
|
|
34
|
-
const f = t.body.getBoundingClientRect(), g = t.documentElement?.getBoundingClientRect(), b = f.height, p = g?.height || 0, x = Math.max(b, p), y = Math.max(200, Math.ceil(x));
|
|
35
|
-
h(y);
|
|
36
|
-
};
|
|
37
|
-
d();
|
|
38
|
-
const i = new ResizeObserver(() => d());
|
|
39
|
-
return i.observe(t.body), o && i.observe(o), () => {
|
|
40
|
-
i.disconnect(), r.unmount(), e.current = null;
|
|
41
|
-
};
|
|
42
|
-
}, [s]), /* @__PURE__ */ m.jsx(
|
|
43
|
-
"iframe",
|
|
44
|
-
{
|
|
45
|
-
ref: n,
|
|
46
|
-
sandbox: "allow-scripts allow-same-origin",
|
|
47
|
-
className: l,
|
|
48
|
-
style: {
|
|
49
|
-
width: "100%",
|
|
50
|
-
height: `${u}px`,
|
|
51
|
-
margin: "16px 0"
|
|
52
|
-
},
|
|
53
|
-
title: "HTML Sandbox"
|
|
54
|
-
}
|
|
55
|
-
);
|
|
56
|
-
};
|
|
57
|
-
export {
|
|
58
|
-
B as default
|
|
59
|
-
};
|
|
60
|
-
//# sourceMappingURL=IframeSandbox.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IframeSandbox.js","sources":["../../../src/components/ContentRender/IframeSandbox.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\nimport { createRoot, Root } from \"react-dom/client\";\nimport SandboxApp from \"./SandboxApp\";\n\nexport interface IframeSandboxProps {\n content: string;\n className?: string;\n}\n\nconst IframeSandbox: React.FC<IframeSandboxProps> = ({\n content,\n className,\n}) => {\n const iframeRef = useRef<HTMLIFrameElement>(null);\n const rootRef = useRef<Root | null>(null);\n const [height, setHeight] = useState(480);\n\n useEffect(() => {\n const iframe = iframeRef.current;\n if (!iframe) return undefined;\n\n const doc = iframe.contentDocument;\n if (!doc) return undefined;\n\n doc.open();\n doc.write(`<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"utf-8\" />\n <style>\n html, body { margin: 0; padding: 0; }\n </style>\n </head>\n <body>\n <div id=\"root\"></div>\n </body>\n</html>`);\n doc.close();\n\n const rootEl = doc.getElementById(\"root\");\n if (!rootEl) return undefined;\n\n if (rootRef.current) {\n rootRef.current.unmount();\n }\n\n const root = createRoot(rootEl);\n rootRef.current = root;\n root.render(<SandboxApp html={content} />);\n\n const updateHeight = () => {\n if (!iframeRef.current || !doc.body) return;\n const bodyRect = doc.body.getBoundingClientRect();\n const htmlRect = doc.documentElement?.getBoundingClientRect();\n const bodyHeight = bodyRect.height;\n const htmlHeight = htmlRect?.height || 0;\n const contentHeight = Math.max(bodyHeight, htmlHeight);\n const nextHeight = Math.max(200, Math.ceil(contentHeight));\n setHeight(nextHeight);\n };\n\n updateHeight();\n\n const resizeObserver = new ResizeObserver(() => updateHeight());\n resizeObserver.observe(doc.body);\n if (rootEl) {\n resizeObserver.observe(rootEl);\n }\n\n return () => {\n resizeObserver.disconnect();\n root.unmount();\n rootRef.current = null;\n };\n }, [content]);\n\n return (\n <iframe\n ref={iframeRef}\n sandbox=\"allow-scripts allow-same-origin\"\n className={className}\n style={{\n width: \"100%\",\n height: `${height}px`,\n margin: \"16px 0\",\n }}\n title=\"HTML Sandbox\"\n />\n );\n};\n\nexport default IframeSandbox;\n"],"names":["IframeSandbox","content","className","iframeRef","useRef","rootRef","height","setHeight","useState","useEffect","iframe","doc","rootEl","root","createRoot","jsx","SandboxApp","updateHeight","bodyRect","htmlRect","bodyHeight","htmlHeight","contentHeight","nextHeight","resizeObserver"],"mappings":";;;;AASA,MAAMA,IAA8C,CAAC;AAAA,EACnD,SAAAC;AAAA,EACA,WAAAC;AACF,MAAM;AACJ,QAAMC,IAAYC,EAA0B,IAAI,GAC1CC,IAAUD,EAAoB,IAAI,GAClC,CAACE,GAAQC,CAAS,IAAIC,EAAS,GAAG;AAExC,SAAAC,EAAU,MAAM;AACd,UAAMC,IAASP,EAAU;AACzB,QAAI,CAACO,EAAQ;AAEb,UAAMC,IAAMD,EAAO;AACnB,QAAI,CAACC,EAAK;AAEV,IAAAA,EAAI,KAAA,GACJA,EAAI,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAWN,GACJA,EAAI,MAAA;AAEJ,UAAMC,IAASD,EAAI,eAAe,MAAM;AACxC,QAAI,CAACC,EAAQ;AAEb,IAAIP,EAAQ,WACVA,EAAQ,QAAQ,QAAA;AAGlB,UAAMQ,IAAOC,EAAAA,WAAWF,CAAM;AAC9B,IAAAP,EAAQ,UAAUQ,GAClBA,EAAK,OAAOE,gBAAAA,MAACC,GAAA,EAAW,MAAMf,GAAS,CAAE;AAEzC,UAAMgB,IAAe,MAAM;AACzB,UAAI,CAACd,EAAU,WAAW,CAACQ,EAAI,KAAM;AACrC,YAAMO,IAAWP,EAAI,KAAK,sBAAA,GACpBQ,IAAWR,EAAI,iBAAiB,sBAAA,GAChCS,IAAaF,EAAS,QACtBG,IAAaF,GAAU,UAAU,GACjCG,IAAgB,KAAK,IAAIF,GAAYC,CAAU,GAC/CE,IAAa,KAAK,IAAI,KAAK,KAAK,KAAKD,CAAa,CAAC;AACzD,MAAAf,EAAUgB,CAAU;AAAA,IACtB;AAEA,IAAAN,EAAA;AAEA,UAAMO,IAAiB,IAAI,eAAe,MAAMP,GAAc;AAC9D,WAAAO,EAAe,QAAQb,EAAI,IAAI,GAC3BC,KACFY,EAAe,QAAQZ,CAAM,GAGxB,MAAM;AACX,MAAAY,EAAe,WAAA,GACfX,EAAK,QAAA,GACLR,EAAQ,UAAU;AAAA,IACpB;AAAA,EACF,GAAG,CAACJ,CAAO,CAAC,GAGVc,gBAAAA,EAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAKZ;AAAA,MACL,SAAQ;AAAA,MACR,WAAAD;AAAA,MACA,OAAO;AAAA,QACL,OAAO;AAAA,QACP,QAAQ,GAAGI,CAAM;AAAA,QACjB,QAAQ;AAAA,MAAA;AAAA,MAEV,OAAM;AAAA,IAAA;AAAA,EAAA;AAGZ;"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { j as s } from "../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { useRef as i, useEffect as u } from "react";
|
|
3
|
-
const p = ({ html: o }) => {
|
|
4
|
-
const c = i(null);
|
|
5
|
-
return u(() => {
|
|
6
|
-
const e = c.current;
|
|
7
|
-
if (!e) return;
|
|
8
|
-
e.innerHTML = "";
|
|
9
|
-
const t = document.createElement("div");
|
|
10
|
-
t.innerHTML = o, t.querySelectorAll("script").forEach((r) => {
|
|
11
|
-
const n = document.createElement("script");
|
|
12
|
-
Array.from(r.attributes).forEach((a) => {
|
|
13
|
-
n.setAttribute(a.name, a.value);
|
|
14
|
-
}), n.textContent = r.textContent, r.replaceWith(n);
|
|
15
|
-
}), e.append(...Array.from(t.childNodes));
|
|
16
|
-
}, [o]), /* @__PURE__ */ s.jsx("div", { ref: c });
|
|
17
|
-
};
|
|
18
|
-
export {
|
|
19
|
-
p as default
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=SandboxApp.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SandboxApp.js","sources":["../../../src/components/ContentRender/SandboxApp.tsx"],"sourcesContent":["import React, { useEffect, useRef } from \"react\";\n\nexport interface SandboxAppProps {\n html: string;\n}\n\nconst SandboxApp: React.FC<SandboxAppProps> = ({ html }) => {\n const containerRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const container = containerRef.current;\n if (!container) return;\n\n container.innerHTML = \"\";\n const wrapper = document.createElement(\"div\");\n wrapper.innerHTML = html;\n\n // Ensure inline scripts execute by recreating them after injection\n wrapper.querySelectorAll(\"script\").forEach((script) => {\n const replacement = document.createElement(\"script\");\n Array.from(script.attributes).forEach((attr) => {\n replacement.setAttribute(attr.name, attr.value);\n });\n replacement.textContent = script.textContent;\n script.replaceWith(replacement);\n });\n\n container.append(...Array.from(wrapper.childNodes));\n }, [html]);\n\n return <div ref={containerRef} />;\n};\n\nexport default SandboxApp;\n"],"names":["SandboxApp","html","containerRef","useRef","useEffect","container","wrapper","script","replacement","attr","jsx"],"mappings":";;AAMA,MAAMA,IAAwC,CAAC,EAAE,MAAAC,QAAW;AAC1D,QAAMC,IAAeC,EAAuB,IAAI;AAEhD,SAAAC,EAAU,MAAM;AACd,UAAMC,IAAYH,EAAa;AAC/B,QAAI,CAACG,EAAW;AAEhB,IAAAA,EAAU,YAAY;AACtB,UAAMC,IAAU,SAAS,cAAc,KAAK;AAC5C,IAAAA,EAAQ,YAAYL,GAGpBK,EAAQ,iBAAiB,QAAQ,EAAE,QAAQ,CAACC,MAAW;AACrD,YAAMC,IAAc,SAAS,cAAc,QAAQ;AACnD,YAAM,KAAKD,EAAO,UAAU,EAAE,QAAQ,CAACE,MAAS;AAC9C,QAAAD,EAAY,aAAaC,EAAK,MAAMA,EAAK,KAAK;AAAA,MAChD,CAAC,GACDD,EAAY,cAAcD,EAAO,aACjCA,EAAO,YAAYC,CAAW;AAAA,IAChC,CAAC,GAEDH,EAAU,OAAO,GAAG,MAAM,KAAKC,EAAQ,UAAU,CAAC;AAAA,EACpD,GAAG,CAACL,CAAI,CAAC,GAEFS,gBAAAA,EAAAA,IAAC,OAAA,EAAI,KAAKR,EAAA,CAAc;AACjC;"}
|