markdown-flow-ui 0.1.83-beta.20 → 0.1.83-beta.21

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.
Files changed (30) hide show
  1. 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
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.js +1 -1
  16. package/dist/_virtual/index3.js +5 -4
  17. package/dist/_virtual/index3.js.map +1 -1
  18. package/dist/_virtual/index4.js +4 -5
  19. package/dist/_virtual/index4.js.map +1 -1
  20. package/dist/_virtual/index5.js +5 -3
  21. package/dist/_virtual/index5.js.map +1 -1
  22. package/dist/_virtual/index6.js +4 -4
  23. package/dist/_virtual/index7.js +2 -5
  24. package/dist/_virtual/index7.js.map +1 -1
  25. package/dist/_virtual/index8.js +3 -2
  26. package/dist/_virtual/index8.js.map +1 -1
  27. package/dist/components/ContentRender/utils/split-content.js +17 -17
  28. package/dist/components/ContentRender/utils/split-content.js.map +1 -1
  29. package/dist/components/ui/inputGroup/textarea.js +1 -1
  30. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { __exports as c } from "../../../../../../../../../../_virtual/index8.js";
1
+ import { __exports as c } from "../../../../../../../../../../_virtual/index10.js";
2
2
  import { __require as v } from "./constants.js";
3
3
  var m;
4
4
  function g() {
@@ -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/index6.js";
5
+ import S from "../../../../../../../../../_virtual/index5.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/index5.js";
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/index5.js";
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/index5.js";
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/index5.js";
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/index5.js";
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/index4.js";
5
+ import d from "../../../../../../../../../_virtual/index3.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/index4.js";
7
+ import Q from "../../../../../../../../../_virtual/index3.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/index4.js";
7
+ import h from "../../../../../../../../../_virtual/index3.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/index4.js";
2
+ import "../../../../../../../../../_virtual/index3.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/index3.js";
2
+ import g from "../../../../../../../../../_virtual/index4.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/index3.js";
2
+ import I from "../../../../../../../../../_virtual/index4.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/index10.js";
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() {
@@ -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/index7.js";
2
+ import y from "../../../../../../../../../_virtual/index6.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";
@@ -1,7 +1,8 @@
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);
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
- m as default
6
+ t as default
6
7
  };
7
8
  //# 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":";;;;"}
@@ -1,8 +1,7 @@
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);
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
- t as default
5
+ m as default
7
6
  };
8
7
  //# 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":";;;"}
@@ -1,6 +1,8 @@
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();
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);
3
5
  export {
4
- i as d
6
+ a as default
5
7
  };
6
8
  //# 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":";;;;"}
@@ -1,7 +1,7 @@
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);
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);
5
5
  export {
6
6
  a as default
7
7
  };
@@ -1,8 +1,5 @@
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);
1
+ var r = {};
5
2
  export {
6
- a as default
3
+ r as __exports
7
4
  };
8
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":";"}
@@ -1,5 +1,6 @@
1
- var r = {};
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
- r as __exports
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,9 +1,9 @@
1
- const B = /<(script|style|link|iframe|html|head|body|meta|title|base|template|div|section|article|main)[\s>]/i, E = [
1
+ const O = /<(script|style|link|iframe|html|head|body|meta|title|base|template|div|section|article|main)[\s>]/i, B = [
2
2
  /<svg[\s\S]*?<\/svg>/i,
3
3
  /<img\b[^>]*?>/i,
4
4
  /```mermaid[\s\S]*?```/i,
5
5
  /```[a-zA-Z0-9]+[\s\S]*?```/i
6
- ], k = /<\/[a-z][^>]*>/gi, O = (t, e, c) => {
6
+ ], k = /<\/[a-z][^>]*>/gi, E = (t, e, c) => {
7
7
  if (c) {
8
8
  const r = t.toLowerCase(), i = `</${c.toLowerCase()}>`, u = r.indexOf(i, e);
9
9
  if (u !== -1) {
@@ -22,7 +22,7 @@ const B = /<(script|style|link|iframe|html|head|body|meta|title|base|template|di
22
22
  return n;
23
23
  }, A = (t) => {
24
24
  let e = null;
25
- return E.forEach((c) => {
25
+ return B.forEach((c) => {
26
26
  const n = c.exec(t);
27
27
  if (!n || typeof n.index != "number") return;
28
28
  const s = n.index, r = n.index + n[0].length;
@@ -41,50 +41,50 @@ const B = /<(script|style|link|iframe|html|head|body|meta|title|base|template|di
41
41
  `);
42
42
  return { start: n, block: i, end: n + i.length };
43
43
  }, b = (t, e = !1) => {
44
- const c = t.search(B), n = t.indexOf("```");
44
+ const c = t.search(O), n = t.indexOf("```");
45
45
  if (n !== -1 && t.indexOf("```", n + 3) === -1) {
46
46
  if (e) {
47
- const d = t.slice(0, n).trimEnd(), h = t.slice(n), m = [];
48
- return d && m.push({ type: "text", value: d }), m.push({ type: "markdown", value: h }), m;
47
+ const d = t.slice(0, n).trimEnd(), f = t.slice(n), m = [];
48
+ return d && m.push({ type: "text", value: d }), m.push({ type: "markdown", value: f }), m;
49
49
  }
50
- return [{ type: "markdown", value: t }];
50
+ return [{ type: "markdown", value: t.slice(n) }];
51
51
  }
52
52
  const s = t.search(/<svg\b/i), r = s !== -1 && (c === -1 || s <= c);
53
53
  if (e && r) {
54
- const l = t.slice(0, s), a = t.indexOf("</svg>", s), d = a === -1 ? `${t.slice(s)}</svg>` : t.slice(s, a + 6), h = a === -1 ? "" : t.slice(a + 6), m = [];
55
- return l.trim() && m.push({ type: "text", value: l }), m.push({ type: "markdown", value: d }), h.trim() && m.push(...b(h, !0)), m;
54
+ const l = t.slice(0, s), a = t.indexOf("</svg>", s), d = a === -1 ? `${t.slice(s)}</svg>` : t.slice(s, a + 6), f = a === -1 ? "" : t.slice(a + 6), m = [];
55
+ return l.trim() && m.push({ type: "text", value: l }), m.push({ type: "markdown", value: d }), f.trim() && m.push(...b(f, !0)), m;
56
56
  }
57
57
  if (r && t.indexOf("</svg>", s) === -1)
58
- return [{ type: "markdown", value: `${t}</svg>` }];
58
+ return [{ type: "markdown", value: `${t.slice(s)}</svg>` }];
59
59
  const i = N(t);
60
60
  if (i) {
61
61
  if (!e)
62
62
  return [{ type: "markdown", value: i.block }];
63
63
  const l = [], a = t.slice(0, i.start);
64
64
  a.trim() && l.push({ type: "text", value: a }), l.push({ type: "markdown", value: i.block });
65
- const d = t.slice(i.end), h = d.length < t.length;
66
- return d.trim() && h && l.push(...b(d, !0)), l;
65
+ const d = t.slice(i.end), f = d.length < t.length;
66
+ return d.trim() && f && l.push(...b(d, !0)), l;
67
67
  }
68
68
  if (t.match(/<svg[\s\S]*?<\/svg>/i) && e && c === -1)
69
69
  return t.trim().toLowerCase().endsWith("</svg>") ? [{ type: "markdown", value: t }] : [{ type: "markdown", value: `${t}</svg>` }];
70
70
  const o = A(t);
71
71
  if (c === -1 && !o)
72
72
  return e && t.trim() ? [{ type: "text", value: t }] : [];
73
- const f = !!o && (c === -1 || o.start < c), g = f ? o.start : c, S = f ? void 0 : t.slice(g).match(
73
+ const h = !!o && (c === -1 || o.start < c), g = h ? o.start : c, S = h ? void 0 : t.slice(g).match(
74
74
  /^<(script|style|link|iframe|html|head|body|meta|title|base|template|div|section|article|main)[\s>]/i
75
- )?.[1], p = f ? o.end : O(t, g, S);
75
+ )?.[1], p = h ? o.end : E(t, g, S);
76
76
  if (!e) {
77
- const l = f ? t : t.slice(g, p);
77
+ const l = t.slice(g, p);
78
78
  return [
79
79
  {
80
- type: f ? "markdown" : "sandbox",
80
+ type: h ? "markdown" : "sandbox",
81
81
  value: l
82
82
  }
83
83
  ];
84
84
  }
85
85
  const v = [], x = t.slice(0, g), I = t.slice(g, p), y = t.slice(p);
86
86
  return e && x.trim() && v.push({ type: "text", value: x }), v.push({
87
- type: f ? "markdown" : "sandbox",
87
+ type: h ? "markdown" : "sandbox",
88
88
  value: I
89
89
  }), y.trim() && v.push(...b(y, e)), v;
90
90
  };
@@ -1 +1 @@
1
- {"version":3,"file":"split-content.js","sources":["../../../../src/components/ContentRender/utils/split-content.ts"],"sourcesContent":["export type RenderSegment =\n | { type: \"markdown\"; value: string }\n | { type: \"sandbox\"; value: string }\n | { type: \"text\"; value: string };\n\nconst SANDBOX_START_PATTERN =\n /<(script|style|link|iframe|html|head|body|meta|title|base|template|div|section|article|main)[\\s>]/i;\n\nconst INLINE_SANDBOX_PATTERNS: RegExp[] = [\n /<svg[\\s\\S]*?<\\/svg>/i,\n /<img\\b[^>]*?>/i,\n /```mermaid[\\s\\S]*?```/i,\n /```[a-zA-Z0-9]+[\\s\\S]*?```/i,\n];\n\nconst closingBoundary = /<\\/[a-z][^>]*>/gi;\n\ntype MatchResult = { start: number; end: number };\n\nconst findHtmlBlockEnd = (\n raw: string,\n startIndex: number,\n tagName?: string\n) => {\n if (tagName) {\n const lower = raw.toLowerCase();\n const endTag = `</${tagName.toLowerCase()}>`;\n const closeIdx = lower.indexOf(endTag, startIndex);\n if (closeIdx !== -1) {\n let blockEnd = closeIdx + endTag.length;\n while (blockEnd < raw.length && /\\s/.test(raw[blockEnd])) {\n blockEnd += 1;\n }\n return blockEnd;\n }\n }\n\n let blockEnd = raw.length;\n let match: RegExpExecArray | null;\n closingBoundary.lastIndex = 0;\n\n while ((match = closingBoundary.exec(raw))) {\n if (match.index <= startIndex) continue;\n blockEnd = match.index + match[0].length;\n break;\n }\n\n return blockEnd;\n};\n\nconst findInlineSandboxMatch = (raw: string): MatchResult | null => {\n let earliest: MatchResult | null = null;\n\n INLINE_SANDBOX_PATTERNS.forEach((pattern) => {\n const match = pattern.exec(raw);\n if (!match || typeof match.index !== \"number\") return;\n const start = match.index;\n const end = match.index + match[0].length;\n\n if (!earliest || start < earliest.start) {\n earliest = { start, end };\n }\n });\n\n return earliest;\n};\n\nconst extractTableBlock = (\n raw: string\n): { start: number; block: string; end: number } | null => {\n const tableMatch = raw.match(/^\\s*\\|.+\\|\\s*$/m);\n if (!tableMatch || typeof tableMatch.index !== \"number\") return null;\n\n const leadingSpaces = tableMatch[0].match(/^\\s*/)?.[0].length ?? 0;\n const tableStart = tableMatch.index + leadingSpaces;\n\n const lines = raw.slice(tableStart).split(\"\\n\");\n const tableLines: string[] = [];\n\n for (const line of lines) {\n const trimmed = line.trim();\n if (!trimmed.startsWith(\"|\")) break;\n tableLines.push(line);\n }\n\n const block = tableLines.join(\"\\n\");\n return { start: tableStart, block, end: tableStart + block.length };\n};\n\n// Split incoming markdown content into markdown and sandbox HTML segments\nexport const splitContentSegments = (\n raw: string,\n keepText = false\n): RenderSegment[] => {\n const sandboxStartIndex = raw.search(SANDBOX_START_PATTERN);\n const fenceStart = raw.indexOf(\"```\");\n if (fenceStart !== -1) {\n const closingFence = raw.indexOf(\"```\", fenceStart + 3);\n if (closingFence === -1) {\n if (keepText) {\n const before = raw.slice(0, fenceStart);\n const beforeText = before.trimEnd();\n const fenceBlock = raw.slice(fenceStart);\n const segments: RenderSegment[] = [];\n if (beforeText) {\n segments.push({ type: \"text\", value: beforeText });\n }\n segments.push({ type: \"markdown\", value: fenceBlock });\n return segments;\n }\n return [{ type: \"markdown\", value: raw }];\n }\n }\n\n const svgOpenIndex = raw.search(/<svg\\b/i);\n const canHandleInlineSvg =\n svgOpenIndex !== -1 &&\n (sandboxStartIndex === -1 || svgOpenIndex <= sandboxStartIndex);\n\n if (keepText && canHandleInlineSvg) {\n const before = raw.slice(0, svgOpenIndex);\n const closeIdx = raw.indexOf(\"</svg>\", svgOpenIndex);\n const svgBlock =\n closeIdx === -1\n ? `${raw.slice(svgOpenIndex)}</svg>`\n : raw.slice(svgOpenIndex, closeIdx + \"</svg>\".length);\n const after = closeIdx === -1 ? \"\" : raw.slice(closeIdx + \"</svg>\".length);\n\n const segments: RenderSegment[] = [];\n if (before.trim()) {\n segments.push({ type: \"text\", value: before });\n }\n segments.push({ type: \"markdown\", value: svgBlock });\n if (after.trim()) {\n segments.push(...splitContentSegments(after, true));\n }\n return segments;\n }\n if (canHandleInlineSvg && raw.indexOf(\"</svg>\", svgOpenIndex) === -1) {\n return [{ type: \"markdown\", value: `${raw}</svg>` }];\n }\n\n const tableBlock = extractTableBlock(raw);\n if (tableBlock) {\n if (!keepText) {\n return [{ type: \"markdown\", value: tableBlock.block }];\n }\n\n const segments: RenderSegment[] = [];\n const before = raw.slice(0, tableBlock.start);\n if (before.trim()) {\n segments.push({ type: \"text\", value: before });\n }\n segments.push({ type: \"markdown\", value: tableBlock.block });\n const after = raw.slice(tableBlock.end);\n const hasProgress = after.length < raw.length;\n if (after.trim() && hasProgress) {\n segments.push(...splitContentSegments(after, true));\n }\n return segments;\n }\n\n const completeSvgMatch = raw.match(/<svg[\\s\\S]*?<\\/svg>/i);\n if (completeSvgMatch && keepText && sandboxStartIndex === -1) {\n if (!raw.trim().toLowerCase().endsWith(\"</svg>\")) {\n return [{ type: \"markdown\", value: `${raw}</svg>` }];\n }\n return [{ type: \"markdown\", value: raw }];\n }\n\n const inlineMatch = findInlineSandboxMatch(raw);\n\n if (sandboxStartIndex === -1 && !inlineMatch) {\n if (keepText && raw.trim()) {\n return [{ type: \"text\", value: raw }];\n }\n return [];\n }\n\n const shouldUseInline =\n !!inlineMatch &&\n (sandboxStartIndex === -1 || inlineMatch.start < sandboxStartIndex);\n\n const startIndex = shouldUseInline ? inlineMatch!.start : sandboxStartIndex;\n const tagName = shouldUseInline\n ? undefined\n : raw\n .slice(startIndex)\n .match(\n /^<(script|style|link|iframe|html|head|body|meta|title|base|template|div|section|article|main)[\\s>]/i\n )?.[1];\n const blockEnd = shouldUseInline\n ? inlineMatch!.end\n : findHtmlBlockEnd(raw, startIndex, tagName);\n\n if (!keepText) {\n const segmentValue = shouldUseInline\n ? raw\n : raw.slice(startIndex, blockEnd);\n return [\n {\n type: shouldUseInline ? \"markdown\" : \"sandbox\",\n value: segmentValue,\n },\n ];\n }\n\n const segments: RenderSegment[] = [];\n const before = raw.slice(0, startIndex);\n const matchedBlock = raw.slice(startIndex, blockEnd);\n const after = raw.slice(blockEnd);\n\n if (keepText && before.trim()) {\n segments.push({ type: \"text\", value: before });\n }\n\n segments.push({\n type: shouldUseInline ? \"markdown\" : \"sandbox\",\n value: matchedBlock,\n });\n\n if (after.trim()) {\n segments.push(...splitContentSegments(after, keepText));\n }\n\n return segments;\n};\n"],"names":["SANDBOX_START_PATTERN","INLINE_SANDBOX_PATTERNS","closingBoundary","findHtmlBlockEnd","raw","startIndex","tagName","lower","endTag","closeIdx","blockEnd","match","findInlineSandboxMatch","earliest","pattern","start","end","extractTableBlock","tableMatch","leadingSpaces","tableStart","lines","tableLines","line","block","splitContentSegments","keepText","sandboxStartIndex","fenceStart","beforeText","fenceBlock","segments","svgOpenIndex","canHandleInlineSvg","before","svgBlock","after","tableBlock","hasProgress","inlineMatch","shouldUseInline","segmentValue","matchedBlock"],"mappings":"AAKA,MAAMA,IACJ,sGAEIC,IAAoC;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAEMC,IAAkB,oBAIlBC,IAAmB,CACvBC,GACAC,GACAC,MACG;AACH,MAAIA,GAAS;AACX,UAAMC,IAAQH,EAAI,YAAA,GACZI,IAAS,KAAKF,EAAQ,YAAA,CAAa,KACnCG,IAAWF,EAAM,QAAQC,GAAQH,CAAU;AACjD,QAAII,MAAa,IAAI;AACnB,UAAIC,IAAWD,IAAWD,EAAO;AACjC,aAAOE,IAAWN,EAAI,UAAU,KAAK,KAAKA,EAAIM,CAAQ,CAAC;AACrDA,QAAAA,KAAY;AAEd,aAAOA;AAAAA,IACT;AAAA,EACF;AAEA,MAAIA,IAAWN,EAAI,QACfO;AAGJ,OAFAT,EAAgB,YAAY,GAEpBS,IAAQT,EAAgB,KAAKE,CAAG;AACtC,QAAI,EAAAO,EAAM,SAASN,IACnB;AAAA,MAAAK,IAAWC,EAAM,QAAQA,EAAM,CAAC,EAAE;AAClC;AAAA;AAGF,SAAOD;AACT,GAEME,IAAyB,CAACR,MAAoC;AAClE,MAAIS,IAA+B;AAEnC,SAAAZ,EAAwB,QAAQ,CAACa,MAAY;AAC3C,UAAMH,IAAQG,EAAQ,KAAKV,CAAG;AAC9B,QAAI,CAACO,KAAS,OAAOA,EAAM,SAAU,SAAU;AAC/C,UAAMI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AAK,GAAGN,EAAqBW,GAAOV,CAAQ,CAAC,GAGjDK;AACT;"}
1
+ {"version":3,"file":"split-content.js","sources":["../../../../src/components/ContentRender/utils/split-content.ts"],"sourcesContent":["export type RenderSegment =\n | { type: \"markdown\"; value: string }\n | { type: \"sandbox\"; value: string }\n | { type: \"text\"; value: string };\n\nconst SANDBOX_START_PATTERN =\n /<(script|style|link|iframe|html|head|body|meta|title|base|template|div|section|article|main)[\\s>]/i;\n\nconst INLINE_SANDBOX_PATTERNS: RegExp[] = [\n /<svg[\\s\\S]*?<\\/svg>/i,\n /<img\\b[^>]*?>/i,\n /```mermaid[\\s\\S]*?```/i,\n /```[a-zA-Z0-9]+[\\s\\S]*?```/i,\n];\n\nconst closingBoundary = /<\\/[a-z][^>]*>/gi;\n\ntype MatchResult = { start: number; end: number };\n\nconst findHtmlBlockEnd = (\n raw: string,\n startIndex: number,\n tagName?: string\n) => {\n if (tagName) {\n const lower = raw.toLowerCase();\n const endTag = `</${tagName.toLowerCase()}>`;\n const closeIdx = lower.indexOf(endTag, startIndex);\n if (closeIdx !== -1) {\n let blockEnd = closeIdx + endTag.length;\n while (blockEnd < raw.length && /\\s/.test(raw[blockEnd])) {\n blockEnd += 1;\n }\n return blockEnd;\n }\n }\n\n let blockEnd = raw.length;\n let match: RegExpExecArray | null;\n closingBoundary.lastIndex = 0;\n\n while ((match = closingBoundary.exec(raw))) {\n if (match.index <= startIndex) continue;\n blockEnd = match.index + match[0].length;\n break;\n }\n\n return blockEnd;\n};\n\nconst findInlineSandboxMatch = (raw: string): MatchResult | null => {\n let earliest: MatchResult | null = null;\n\n INLINE_SANDBOX_PATTERNS.forEach((pattern) => {\n const match = pattern.exec(raw);\n if (!match || typeof match.index !== \"number\") return;\n const start = match.index;\n const end = match.index + match[0].length;\n\n if (!earliest || start < earliest.start) {\n earliest = { start, end };\n }\n });\n\n return earliest;\n};\n\nconst extractTableBlock = (\n raw: string\n): { start: number; block: string; end: number } | null => {\n const tableMatch = raw.match(/^\\s*\\|.+\\|\\s*$/m);\n if (!tableMatch || typeof tableMatch.index !== \"number\") return null;\n\n const leadingSpaces = tableMatch[0].match(/^\\s*/)?.[0].length ?? 0;\n const tableStart = tableMatch.index + leadingSpaces;\n\n const lines = raw.slice(tableStart).split(\"\\n\");\n const tableLines: string[] = [];\n\n for (const line of lines) {\n const trimmed = line.trim();\n if (!trimmed.startsWith(\"|\")) break;\n tableLines.push(line);\n }\n\n const block = tableLines.join(\"\\n\");\n return { start: tableStart, block, end: tableStart + block.length };\n};\n\n// Split incoming markdown content into markdown and sandbox HTML segments\nexport const splitContentSegments = (\n raw: string,\n keepText = false\n): RenderSegment[] => {\n const sandboxStartIndex = raw.search(SANDBOX_START_PATTERN);\n const fenceStart = raw.indexOf(\"```\");\n if (fenceStart !== -1) {\n const closingFence = raw.indexOf(\"```\", fenceStart + 3);\n if (closingFence === -1) {\n if (keepText) {\n const before = raw.slice(0, fenceStart);\n const beforeText = before.trimEnd();\n const fenceBlock = raw.slice(fenceStart);\n const segments: RenderSegment[] = [];\n if (beforeText) {\n segments.push({ type: \"text\", value: beforeText });\n }\n segments.push({ type: \"markdown\", value: fenceBlock });\n return segments;\n }\n return [{ type: \"markdown\", value: raw.slice(fenceStart) }];\n }\n }\n\n const svgOpenIndex = raw.search(/<svg\\b/i);\n const canHandleInlineSvg =\n svgOpenIndex !== -1 &&\n (sandboxStartIndex === -1 || svgOpenIndex <= sandboxStartIndex);\n\n if (keepText && canHandleInlineSvg) {\n const before = raw.slice(0, svgOpenIndex);\n const closeIdx = raw.indexOf(\"</svg>\", svgOpenIndex);\n const svgBlock =\n closeIdx === -1\n ? `${raw.slice(svgOpenIndex)}</svg>`\n : raw.slice(svgOpenIndex, closeIdx + \"</svg>\".length);\n const after = closeIdx === -1 ? \"\" : raw.slice(closeIdx + \"</svg>\".length);\n\n const segments: RenderSegment[] = [];\n if (before.trim()) {\n segments.push({ type: \"text\", value: before });\n }\n segments.push({ type: \"markdown\", value: svgBlock });\n if (after.trim()) {\n segments.push(...splitContentSegments(after, true));\n }\n return segments;\n }\n if (canHandleInlineSvg && raw.indexOf(\"</svg>\", svgOpenIndex) === -1) {\n const svgOnly = raw.slice(svgOpenIndex);\n return [{ type: \"markdown\", value: `${svgOnly}</svg>` }];\n }\n\n const tableBlock = extractTableBlock(raw);\n if (tableBlock) {\n if (!keepText) {\n return [{ type: \"markdown\", value: tableBlock.block }];\n }\n\n const segments: RenderSegment[] = [];\n const before = raw.slice(0, tableBlock.start);\n if (before.trim()) {\n segments.push({ type: \"text\", value: before });\n }\n segments.push({ type: \"markdown\", value: tableBlock.block });\n const after = raw.slice(tableBlock.end);\n const hasProgress = after.length < raw.length;\n if (after.trim() && hasProgress) {\n segments.push(...splitContentSegments(after, true));\n }\n return segments;\n }\n\n const completeSvgMatch = raw.match(/<svg[\\s\\S]*?<\\/svg>/i);\n if (completeSvgMatch && keepText && sandboxStartIndex === -1) {\n if (!raw.trim().toLowerCase().endsWith(\"</svg>\")) {\n return [{ type: \"markdown\", value: `${raw}</svg>` }];\n }\n return [{ type: \"markdown\", value: raw }];\n }\n\n const inlineMatch = findInlineSandboxMatch(raw);\n\n if (sandboxStartIndex === -1 && !inlineMatch) {\n if (keepText && raw.trim()) {\n return [{ type: \"text\", value: raw }];\n }\n return [];\n }\n\n const shouldUseInline =\n !!inlineMatch &&\n (sandboxStartIndex === -1 || inlineMatch.start < sandboxStartIndex);\n\n const startIndex = shouldUseInline ? inlineMatch!.start : sandboxStartIndex;\n const tagName = shouldUseInline\n ? undefined\n : raw\n .slice(startIndex)\n .match(\n /^<(script|style|link|iframe|html|head|body|meta|title|base|template|div|section|article|main)[\\s>]/i\n )?.[1];\n const blockEnd = shouldUseInline\n ? inlineMatch!.end\n : findHtmlBlockEnd(raw, startIndex, tagName);\n\n if (!keepText) {\n const segmentValue = raw.slice(startIndex, blockEnd);\n return [\n {\n type: shouldUseInline ? \"markdown\" : \"sandbox\",\n value: segmentValue,\n },\n ];\n }\n\n const segments: RenderSegment[] = [];\n const before = raw.slice(0, startIndex);\n const matchedBlock = raw.slice(startIndex, blockEnd);\n const after = raw.slice(blockEnd);\n\n if (keepText && before.trim()) {\n segments.push({ type: \"text\", value: before });\n }\n\n segments.push({\n type: shouldUseInline ? \"markdown\" : \"sandbox\",\n value: matchedBlock,\n });\n\n if (after.trim()) {\n segments.push(...splitContentSegments(after, keepText));\n }\n\n return segments;\n};\n"],"names":["SANDBOX_START_PATTERN","INLINE_SANDBOX_PATTERNS","closingBoundary","findHtmlBlockEnd","raw","startIndex","tagName","lower","endTag","closeIdx","blockEnd","match","findInlineSandboxMatch","earliest","pattern","start","end","extractTableBlock","tableMatch","leadingSpaces","tableStart","lines","tableLines","line","block","splitContentSegments","keepText","sandboxStartIndex","fenceStart","beforeText","fenceBlock","segments","svgOpenIndex","canHandleInlineSvg","before","svgBlock","after","tableBlock","hasProgress","inlineMatch","shouldUseInline","segmentValue","matchedBlock"],"mappings":"AAKA,MAAMA,IACJ,sGAEIC,IAAoC;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAEMC,IAAkB,oBAIlBC,IAAmB,CACvBC,GACAC,GACAC,MACG;AACH,MAAIA,GAAS;AACX,UAAMC,IAAQH,EAAI,YAAA,GACZI,IAAS,KAAKF,EAAQ,YAAA,CAAa,KACnCG,IAAWF,EAAM,QAAQC,GAAQH,CAAU;AACjD,QAAII,MAAa,IAAI;AACnB,UAAIC,IAAWD,IAAWD,EAAO;AACjC,aAAOE,IAAWN,EAAI,UAAU,KAAK,KAAKA,EAAIM,CAAQ,CAAC;AACrDA,QAAAA,KAAY;AAEd,aAAOA;AAAAA,IACT;AAAA,EACF;AAEA,MAAIA,IAAWN,EAAI,QACfO;AAGJ,OAFAT,EAAgB,YAAY,GAEpBS,IAAQT,EAAgB,KAAKE,CAAG;AACtC,QAAI,EAAAO,EAAM,SAASN,IACnB;AAAA,MAAAK,IAAWC,EAAM,QAAQA,EAAM,CAAC,EAAE;AAClC;AAAA;A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AC7C0B,IAAQhC,EAAI,MAAMM,CAAQ;AAEhC,SAAIgB,KAAYQ,EAAO,UACrBH,EAAS,KAAK,EAAE,MAAM,QAAQ,OAAOG,GAAQ,GAG/CH,EAAS,KAAK;AAAA,IACZ,MAAMS,IAAkB,aAAa;AAAA,IACrC,OAAOE;AAAA,EAAA,CACR,GAEGN,EAAM,UACRL,EAAS,KAAK,GAAGN,EAAqBW,GAAOV,CAAQ,CAAC,GAGjDK;AACT;"}
@@ -1,7 +1,7 @@
1
1
  import { j as i } from "../../../_virtual/jsx-runtime.js";
2
2
  import * as d from "react";
3
3
  import n from "../../../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";
4
- import "../../../_virtual/index4.js";
4
+ import "../../../_virtual/index3.js";
5
5
  import "../../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/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";
6
6
  import "../../../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/hooks/useLayoutEffect.js";
7
7
  import "../../../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/raf.js";
package/package.json CHANGED
@@ -149,7 +149,7 @@
149
149
  "storybook": "storybook dev -p 6006",
150
150
  "test": "echo \"No tests specified\" && exit 0"
151
151
  },
152
- "version": "0.1.83-beta.20",
152
+ "version": "0.1.83-beta.21",
153
153
  "type": "module",
154
154
  "exports": {
155
155
  ".": {