markdown-flow-ui 0.2.35 → 0.3.0-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/README.md +12 -0
  2. package/dist/_virtual/index.es10.js +2 -2
  3. package/dist/_virtual/index.es3.js +5 -4
  4. package/dist/_virtual/index.es3.js.map +1 -1
  5. package/dist/_virtual/index.es4.js +4 -5
  6. package/dist/_virtual/index.es4.js.map +1 -1
  7. package/dist/_virtual/index.es5.js +5 -5
  8. package/dist/_virtual/index.es6.js +5 -3
  9. package/dist/_virtual/index.es6.js.map +1 -1
  10. package/dist/_virtual/index.es7.js +3 -5
  11. package/dist/_virtual/index.es7.js.map +1 -1
  12. package/dist/_virtual/index.es8.js +2 -2
  13. package/dist/_virtual/index10.cjs +1 -1
  14. package/dist/_virtual/index3.cjs +1 -1
  15. package/dist/_virtual/index4.cjs +1 -1
  16. package/dist/_virtual/index5.cjs +1 -1
  17. package/dist/_virtual/index6.cjs +1 -1
  18. package/dist/_virtual/index7.cjs +1 -1
  19. package/dist/_virtual/index8.cjs +1 -1
  20. package/dist/_virtual/variable-marker.cjs +2 -0
  21. package/dist/_virtual/variable-marker.cjs.map +1 -0
  22. package/dist/_virtual/variable-marker.es.js +5 -0
  23. package/dist/_virtual/variable-marker.es.js.map +1 -0
  24. package/dist/_virtual/variable-name.cjs +2 -0
  25. package/dist/_virtual/variable-name.cjs.map +1 -0
  26. package/dist/_virtual/variable-name.es.js +5 -0
  27. package/dist/_virtual/variable-name.es.js.map +1 -0
  28. package/dist/components/ContentRender/ContentRender.cjs +2 -2
  29. package/dist/components/ContentRender/ContentRender.cjs.map +1 -1
  30. package/dist/components/ContentRender/ContentRender.es.js +206 -205
  31. package/dist/components/ContentRender/ContentRender.es.js.map +1 -1
  32. package/dist/components/ContentRender/plugins/CustomVariable.cjs +1 -1
  33. package/dist/components/ContentRender/plugins/CustomVariable.cjs.map +1 -1
  34. package/dist/components/ContentRender/plugins/CustomVariable.es.js +52 -51
  35. package/dist/components/ContentRender/plugins/CustomVariable.es.js.map +1 -1
  36. package/dist/components/ContentRender/utils/inline-code-ranges.cjs +9 -9
  37. package/dist/components/ContentRender/utils/inline-code-ranges.cjs.map +1 -1
  38. package/dist/components/ContentRender/utils/inline-code-ranges.d.ts +3 -0
  39. package/dist/components/ContentRender/utils/inline-code-ranges.es.js +185 -161
  40. package/dist/components/ContentRender/utils/inline-code-ranges.es.js.map +1 -1
  41. package/dist/components/ContentRender/utils/mermaid-parse.cjs +4 -4
  42. package/dist/components/ContentRender/utils/mermaid-parse.cjs.map +1 -1
  43. package/dist/components/ContentRender/utils/mermaid-parse.es.js +53 -48
  44. package/dist/components/ContentRender/utils/mermaid-parse.es.js.map +1 -1
  45. package/dist/components/ContentRender/utils/split-content.cjs +6 -6
  46. package/dist/components/ContentRender/utils/split-content.cjs.map +1 -1
  47. package/dist/components/ContentRender/utils/split-content.d.ts +1 -0
  48. package/dist/components/ContentRender/utils/split-content.es.js +361 -313
  49. package/dist/components/ContentRender/utils/split-content.es.js.map +1 -1
  50. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.cjs +1 -1
  51. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.cjs.map +1 -1
  52. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.es.js +286 -290
  53. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.es.js.map +1 -1
  54. package/dist/components/MarkdownFlowEditor/components/VariableSelect.cjs +1 -1
  55. package/dist/components/MarkdownFlowEditor/components/VariableSelect.cjs.map +1 -1
  56. package/dist/components/MarkdownFlowEditor/components/VariableSelect.es.js +62 -63
  57. package/dist/components/MarkdownFlowEditor/components/VariableSelect.es.js.map +1 -1
  58. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.cjs +1 -1
  59. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.d.ts +1 -1
  60. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.es.js +1 -1
  61. package/dist/components/MarkdownFlowEditor/locales/de-DE.json.cjs +1 -1
  62. package/dist/components/MarkdownFlowEditor/locales/de-DE.json.d.ts +1 -1
  63. package/dist/components/MarkdownFlowEditor/locales/de-DE.json.es.js +13 -13
  64. package/dist/components/MarkdownFlowEditor/locales/en-US.json.cjs +1 -1
  65. package/dist/components/MarkdownFlowEditor/locales/en-US.json.d.ts +1 -1
  66. package/dist/components/MarkdownFlowEditor/locales/en-US.json.es.js +19 -19
  67. package/dist/components/MarkdownFlowEditor/locales/es-ES.json.cjs +1 -1
  68. package/dist/components/MarkdownFlowEditor/locales/es-ES.json.d.ts +1 -1
  69. package/dist/components/MarkdownFlowEditor/locales/es-ES.json.es.js +13 -13
  70. package/dist/components/MarkdownFlowEditor/locales/fil-PH.json.cjs +1 -1
  71. package/dist/components/MarkdownFlowEditor/locales/fil-PH.json.d.ts +1 -1
  72. package/dist/components/MarkdownFlowEditor/locales/fil-PH.json.es.js +16 -16
  73. package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.cjs +1 -1
  74. package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.d.ts +1 -1
  75. package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.es.js +13 -13
  76. package/dist/components/MarkdownFlowEditor/locales/ja-JP.json.cjs +1 -1
  77. package/dist/components/MarkdownFlowEditor/locales/ja-JP.json.d.ts +1 -1
  78. package/dist/components/MarkdownFlowEditor/locales/ja-JP.json.es.js +1 -1
  79. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.cjs +1 -1
  80. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.d.ts +1 -1
  81. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.es.js +1 -1
  82. package/dist/components/MarkdownFlowEditor/locales/ur-PK.json.cjs +1 -1
  83. package/dist/components/MarkdownFlowEditor/locales/ur-PK.json.d.ts +1 -1
  84. package/dist/components/MarkdownFlowEditor/locales/ur-PK.json.es.js +1 -1
  85. package/dist/components/MarkdownFlowEditor/locales/vi-VN.json.cjs +1 -1
  86. package/dist/components/MarkdownFlowEditor/locales/vi-VN.json.d.ts +1 -1
  87. package/dist/components/MarkdownFlowEditor/locales/vi-VN.json.es.js +13 -13
  88. package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.cjs +1 -1
  89. package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.d.ts +1 -1
  90. package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.es.js +1 -1
  91. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.cjs +3 -3
  92. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.cjs.map +1 -1
  93. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.es.js +176 -174
  94. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.es.js.map +1 -1
  95. package/dist/components/MarkdownFlowEditor/plugins/VariablePlaceholder.cjs +2 -1
  96. package/dist/components/MarkdownFlowEditor/plugins/VariablePlaceholder.cjs.map +1 -1
  97. package/dist/components/MarkdownFlowEditor/plugins/VariablePlaceholder.d.ts +3 -1
  98. package/dist/components/MarkdownFlowEditor/plugins/VariablePlaceholder.es.js +38 -55
  99. package/dist/components/MarkdownFlowEditor/plugins/VariablePlaceholder.es.js.map +1 -1
  100. package/dist/components/MarkdownFlowEditor/plugins/VariablePlaceholder.test.d.ts +1 -0
  101. package/dist/components/MarkdownFlowEditor/utils.cjs +1 -1
  102. package/dist/components/MarkdownFlowEditor/utils.cjs.map +1 -1
  103. package/dist/components/MarkdownFlowEditor/utils.d.ts +2 -3
  104. package/dist/components/MarkdownFlowEditor/utils.es.js +47 -51
  105. package/dist/components/MarkdownFlowEditor/utils.es.js.map +1 -1
  106. package/dist/components/MarkdownFlowEditor/utils.variables.test.d.ts +1 -0
  107. package/dist/components/ui/inputGroup/textarea.cjs +1 -1
  108. package/dist/components/ui/inputGroup/textarea.es.js +1 -1
  109. package/dist/lib/interaction-defaults.cjs +1 -1
  110. package/dist/lib/interaction-defaults.cjs.map +1 -1
  111. package/dist/lib/interaction-defaults.es.js +123 -132
  112. package/dist/lib/interaction-defaults.es.js.map +1 -1
  113. package/dist/lib/interaction-defaults.failure.test.d.ts +1 -0
  114. package/dist/node_modules/@braintree/sanitize-url/dist/index.cjs +1 -1
  115. package/dist/node_modules/@braintree/sanitize-url/dist/index.es.js +1 -1
  116. package/dist/node_modules/classnames/index.cjs +1 -1
  117. package/dist/node_modules/classnames/index.es.js +1 -1
  118. package/dist/node_modules/cose-base/cose-base.cjs +1 -1
  119. package/dist/node_modules/cose-base/cose-base.cjs.map +1 -1
  120. package/dist/node_modules/cose-base/cose-base.es.js +1 -1
  121. package/dist/node_modules/cytoscape-fcose/node_modules/cose-base/cose-base.cjs +1 -1
  122. package/dist/node_modules/cytoscape-fcose/node_modules/cose-base/cose-base.cjs.map +1 -1
  123. package/dist/node_modules/cytoscape-fcose/node_modules/cose-base/cose-base.es.js +1 -1
  124. package/dist/node_modules/cytoscape-fcose/node_modules/layout-base/layout-base.cjs +1 -1
  125. package/dist/node_modules/cytoscape-fcose/node_modules/layout-base/layout-base.cjs.map +1 -1
  126. package/dist/node_modules/cytoscape-fcose/node_modules/layout-base/layout-base.es.js +1 -1
  127. package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.cjs +1 -1
  128. package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.es.js +1 -1
  129. package/dist/node_modules/layout-base/layout-base.cjs +1 -1
  130. package/dist/node_modules/layout-base/layout-base.cjs.map +1 -1
  131. package/dist/node_modules/layout-base/layout-base.es.js +1 -1
  132. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-AAMF2YG6.cjs +1 -1
  133. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-AAMF2YG6.es.js +1 -1
  134. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-OMD6QJNC.cjs +1 -1
  135. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-OMD6QJNC.es.js +1 -1
  136. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-U37J5Y7L.cjs +1 -1
  137. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-U37J5Y7L.es.js +1 -1
  138. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-WV7ZQ7D5.cjs +1 -1
  139. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-WV7ZQ7D5.es.js +1 -1
  140. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-4MX5Z3NR.cjs +1 -1
  141. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-4MX5Z3NR.es.js +1 -1
  142. package/dist/node_modules/rc-input/es/BaseInput.cjs +1 -1
  143. package/dist/node_modules/rc-input/es/BaseInput.es.js +1 -1
  144. package/dist/node_modules/rc-textarea/es/ResizableTextArea.cjs +1 -1
  145. package/dist/node_modules/rc-textarea/es/ResizableTextArea.es.js +1 -1
  146. package/dist/node_modules/rc-textarea/es/TextArea.cjs +1 -1
  147. package/dist/node_modules/rc-textarea/es/TextArea.es.js +1 -1
  148. package/dist/node_modules/rc-textarea/es/index.cjs +1 -1
  149. package/dist/node_modules/rc-textarea/es/index.es.js +1 -1
  150. package/dist/node_modules/remark-flow/dist/escaping.cjs +2 -2
  151. package/dist/node_modules/remark-flow/dist/escaping.cjs.map +1 -1
  152. package/dist/node_modules/remark-flow/dist/escaping.es.js +128 -63
  153. package/dist/node_modules/remark-flow/dist/escaping.es.js.map +1 -1
  154. package/dist/node_modules/remark-flow/dist/index.cjs +1 -1
  155. package/dist/node_modules/remark-flow/dist/index.cjs.map +1 -1
  156. package/dist/node_modules/remark-flow/dist/index.es.js +62 -33
  157. package/dist/node_modules/remark-flow/dist/index.es.js.map +1 -1
  158. package/dist/node_modules/remark-flow/dist/interaction-parser.cjs +1 -1
  159. package/dist/node_modules/remark-flow/dist/interaction-parser.cjs.map +1 -1
  160. package/dist/node_modules/remark-flow/dist/interaction-parser.es.js +260 -256
  161. package/dist/node_modules/remark-flow/dist/interaction-parser.es.js.map +1 -1
  162. package/dist/node_modules/remark-flow/dist/interaction-plugin-core.cjs +1 -1
  163. package/dist/node_modules/remark-flow/dist/interaction-plugin-core.cjs.map +1 -1
  164. package/dist/node_modules/remark-flow/dist/interaction-plugin-core.es.js +71 -42
  165. package/dist/node_modules/remark-flow/dist/interaction-plugin-core.es.js.map +1 -1
  166. package/dist/node_modules/remark-flow/dist/interaction-syntax.cjs +1 -1
  167. package/dist/node_modules/remark-flow/dist/interaction-syntax.cjs.map +1 -1
  168. package/dist/node_modules/remark-flow/dist/interaction-syntax.es.js +500 -46
  169. package/dist/node_modules/remark-flow/dist/interaction-syntax.es.js.map +1 -1
  170. package/dist/node_modules/remark-flow/dist/variable-marker.cjs +2 -0
  171. package/dist/node_modules/remark-flow/dist/variable-marker.cjs.map +1 -0
  172. package/dist/node_modules/remark-flow/dist/variable-marker.es.js +77 -0
  173. package/dist/node_modules/remark-flow/dist/variable-marker.es.js.map +1 -0
  174. package/dist/node_modules/remark-flow/dist/variable-name.cjs +15 -0
  175. package/dist/node_modules/remark-flow/dist/variable-name.cjs.map +1 -0
  176. package/dist/node_modules/remark-flow/dist/variable-name.es.js +748 -0
  177. package/dist/node_modules/remark-flow/dist/variable-name.es.js.map +1 -0
  178. package/dist/node_modules/style-to-object/cjs/index.cjs +1 -1
  179. package/dist/node_modules/style-to-object/cjs/index.cjs.map +1 -1
  180. package/dist/node_modules/style-to-object/cjs/index.es.js +1 -1
  181. package/dist/node_modules/unified/lib/index.cjs +1 -1
  182. package/dist/node_modules/unified/lib/index.es.js +1 -1
  183. package/package.json +2 -2
@@ -1,80 +1,534 @@
1
- import { __exports as l } from "../../../_virtual/interaction-syntax.es.js";
2
- var S;
3
- function F() {
4
- return S ? l : (S = 1, (function(r) {
5
- Object.defineProperty(r, "__esModule", { value: !0 }), r.TOKENIZED_TREE = r.INTERACTION_NODE = void 0, r.interactionSyntax = A, r.interactionFromMarkdown = R, r.registerInteractionSyntax = K, r.INTERACTION_NODE = "flowInteraction", r.TOKENIZED_TREE = "flowInteractionTokenized";
6
- const y = 63, x = 91, T = 93, D = 40, f = 92, h = /* @__PURE__ */ new Set([124, 47, 46, 93]), a = "flowInteraction", e = "flowInteractionMarker", I = "flowInteractionData", N = "lineEnding", _ = (n) => n !== null && n < -2;
7
- function w(n, o, i) {
8
- return E;
9
- function E(t) {
10
- return n.enter(a), n.enter(e), n.consume(t), s;
1
+ import { __exports as Nn } from "../../../_virtual/interaction-syntax.es.js";
2
+ import { __require as Ft } from "./variable-name.es.js";
3
+ var tt;
4
+ function Ut() {
5
+ return tt ? Nn : (tt = 1, (function(A) {
6
+ Object.defineProperty(A, "__esModule", { value: !0 }), A.TOKENIZED_TREE = A.OPAQUE_PARAGRAPH = A.VARIABLE_NODE = A.INTERACTION_NODE = void 0, A.interactionSyntax = Mn, A.interactionFromMarkdown = Hn, A.registerInteractionSyntax = Ot;
7
+ const bn = Ft();
8
+ A.INTERACTION_NODE = "flowInteraction", A.VARIABLE_NODE = "flowVariableMarker", A.OPAQUE_PARAGRAPH = "flowOpaqueParagraph";
9
+ const Y = "flowOpaqueHeading";
10
+ A.TOKENIZED_TREE = "flowInteractionTokenized";
11
+ const Ln = 63, U = 91, W = 93, rt = 40, sn = 60, vn = 92, B = 96, on = 35, M = 36, et = 33, it = 32, ut = 6, H = 123, j = 125, yn = /* @__PURE__ */ new Set([124, 47, 46, 93]), J = "flowInteraction", Q = "flowVariableMarker", L = "flowInteractionMarker", S = "flowInteractionData", q = "lineEnding", at = 65533, lt = -3, fn = -2, cn = -1, pn = /* @__PURE__ */ new WeakMap(), zn = /* @__PURE__ */ new WeakMap(), $ = [], st = new Uint32Array();
12
+ function hn(t, r) {
13
+ let i = zn.get(t);
14
+ i === void 0 && (i = $[$.length - 1] ?? st, zn.set(t, i));
15
+ let a = 0, l = i.length;
16
+ for (; a < l; ) {
17
+ const u = a + l >>> 1;
18
+ i[u] < r ? a = u + 1 : l = u;
11
19
  }
12
- function s(t) {
13
- return t !== x ? i(t) : (n.consume(t), n.exit(e), u);
20
+ return i[a] === r;
21
+ }
22
+ function ot(t) {
23
+ return this.parser.constructs.text[B]?.find((i) => i.name === "codeText")?.previous?.call(this, t) ?? !0;
24
+ }
25
+ function ft(t) {
26
+ return this.parser.constructs.text[M]?.find((i) => i.name === "mathText")?.previous?.call(this, t) ?? !0;
27
+ }
28
+ function Pn(t, r, i) {
29
+ if (!hn(this.parser, this.now().offset) && !pn.get(this.parser)?.has(this.now().offset))
30
+ return i;
31
+ let a;
32
+ return l;
33
+ function l(f) {
34
+ return a = f, t.enter("data"), u(f);
35
+ }
36
+ function u(f) {
37
+ return f === a ? (t.consume(f), u) : (t.exit("data"), r(f));
38
+ }
39
+ }
40
+ function Dn(t, r) {
41
+ const i = [];
42
+ let a = 0, l = !1;
43
+ for (const u of t.sliceStream(r))
44
+ u === cn && l || (u === at && i.push(a), a += typeof u == "string" ? u.length : u === lt ? 2 : 1, l = u === fn);
45
+ i.length && (r.flowNullOffsets = i);
46
+ }
47
+ function Bn(t, r) {
48
+ const i = t.sliceSerialize(r);
49
+ if (!r.flowNullOffsets)
50
+ return i;
51
+ const a = [];
52
+ let l = 0;
53
+ for (const u of r.flowNullOffsets)
54
+ a.push(i.slice(l, u), "\0"), l = u + 1;
55
+ return a.push(i.slice(l)), a.join("");
56
+ }
57
+ const T = (t) => t !== null && t < -2;
58
+ function ct(t, r, i) {
59
+ const a = () => Dn(this, t.exit(J));
60
+ return l;
61
+ function l(e) {
62
+ return t.enter(J), t.enter(L), t.consume(e), u;
63
+ }
64
+ function u(e) {
65
+ return e !== U ? i(e) : (t.consume(e), t.exit(L), f);
66
+ }
67
+ function f(e) {
68
+ return e === null ? i(e) : e === W ? P(e) : T(e) ? k(e) : (t.enter(S), N(e));
69
+ }
70
+ function O(e) {
71
+ return e !== H ? N(e) : (t.consume(e), R);
72
+ }
73
+ function R(e) {
74
+ return e === null ? (t.exit(S), a(), r(e)) : T(e) ? (t.exit(S), v(e)) : (t.consume(e), e === j ? s : R);
14
75
  }
15
- function u(t) {
16
- return t === null ? i(t) : t === T ? O(t) : _(t) ? m(t) : (n.enter(I), c(t));
76
+ function s(e) {
77
+ return e !== j ? R(e) : (t.consume(e), N);
17
78
  }
18
- function m(t) {
19
- return n.enter(N), n.consume(t), n.exit(N), u;
79
+ function v(e) {
80
+ return t.enter(q), t.consume(e), t.exit(q), d;
20
81
  }
21
- function c(t) {
22
- return t === null ? i(t) : t === T ? (n.exit(I), O(t)) : _(t) ? (n.exit(I), m(t)) : (n.consume(t), t === f ? g : c);
82
+ function d(e) {
83
+ return e === null ? (a(), r(e)) : T(e) ? v(e) : (t.enter(S), R(e));
23
84
  }
24
- function g(t) {
25
- return t !== null && h.has(t) ? (n.consume(t), c) : c(t);
85
+ function k(e) {
86
+ return t.enter(q), t.consume(e), t.exit(q), f;
26
87
  }
27
- function O(t) {
28
- return n.enter(e), n.consume(t), n.exit(e), L;
88
+ function N(e) {
89
+ return e === null ? i(e) : e === W ? (t.exit(S), P(e)) : T(e) ? (t.exit(S), k(e)) : (t.consume(e), e === H ? O : e === vn ? nn : N);
29
90
  }
30
- function L(t) {
31
- return t === D ? i(t) : (n.exit(a), o(t));
91
+ function nn(e) {
92
+ return e !== null && yn.has(e) ? (t.consume(e), N) : N(e);
32
93
  }
94
+ function P(e) {
95
+ return t.enter(L), t.consume(e), t.exit(L), F;
96
+ }
97
+ function F(e) {
98
+ return e === rt ? i(e) : (a(), r(e));
99
+ }
100
+ }
101
+ function pt(t, r, i) {
102
+ const a = () => Dn(this, t.exit(Q));
103
+ return l;
104
+ function l(s) {
105
+ return t.enter(Q), t.consume(s), u;
106
+ }
107
+ function u(s) {
108
+ return s !== H ? i(s) : (t.consume(s), f);
109
+ }
110
+ function f(s) {
111
+ return s === null ? (a(), r(s)) : T(s) ? (t.enter(q), t.consume(s), t.exit(q), f) : (t.enter(S), O(s));
112
+ }
113
+ function O(s) {
114
+ return s === null || T(s) ? (t.exit(S), f(s)) : (t.consume(s), s === j ? R : O);
115
+ }
116
+ function R(s) {
117
+ return s !== j ? O(s) : (t.consume(s), t.exit(S), a(), r);
118
+ }
119
+ }
120
+ function ht(t, r, i) {
121
+ const a = mn(this, t, r, i, !1), l = this.parser.constructs.contentInitial?.[U]?.find((u) => u.name === "definition");
122
+ return !l || this.interrupt ? a : (u) => u === U ? t.check({
123
+ partial: !0,
124
+ tokenize(f, O, R) {
125
+ const s = Object.create(this, {
126
+ parser: {
127
+ value: Object.create(this.parser, {
128
+ defined: { value: [] }
129
+ })
130
+ }
131
+ });
132
+ return l.tokenize.call(s, f, O, R);
133
+ }
134
+ }, i, a)(u) : a(u);
135
+ }
136
+ function mt(t, r, i) {
137
+ return mn(this, t, r, i, !0);
33
138
  }
34
- function A() {
139
+ function mn(t, r, i, a, l, u = !1) {
140
+ let f = !1, O = !1, R = !1, s = !1, v = !1, d = 0, k = 0, N = 0, nn = 0, P = !1, F = 0, e = 0, En = !1, G = null, gn = null;
141
+ const On = [], tn = /* @__PURE__ */ new Set(), rn = /* @__PURE__ */ new Set();
142
+ let X, Gn;
143
+ const kn = l ? Y : "content", An = t.parser.constructs.text[sn]?.find((n) => n.name === "htmlText"), Tn = t.parser.constructs.text[sn]?.find((n) => n.name === "autolink"), In = t.parser.constructs.text[M]?.find((n) => n.name === "mathText"), wn = t.parser.constructs.text[W]?.find((n) => n.name === "labelEnd");
144
+ let D;
145
+ const Vn = { partial: !0, tokenize: nt }, At = {
146
+ partial: !0,
147
+ tokenize: Ht
148
+ }, Tt = { partial: !0, tokenize: jt }, It = { ...t.currentConstruct, concrete: !0 }, Un = { ...t.currentConstruct, concrete: !1 }, wt = Object.fromEntries(Object.entries(t.parser.constructs.flow).map(([n, p]) => [
149
+ n,
150
+ p.map((o) => ({ ...o, partial: !0 }))
151
+ ]));
152
+ return xt;
153
+ function xt(n) {
154
+ return t.interrupt ? a(n) : (u || (t.currentConstruct = Un), Gn = r.enter(kn), l ? (r.enter(L), Wn(n)) : (r.enter("paragraph"), Zn(n)));
155
+ }
156
+ function Wn(n) {
157
+ return n === on ? ++d > ut ? a(n) : (r.consume(n), Wn) : n !== null && !T(n) && !K(n) ? a(n) : (Gn.flowHeadingDepth = d, Qn(n));
158
+ }
159
+ function Qn(n) {
160
+ return K(n) ? (r.consume(n), Qn) : (r.exit(L), Zn(n));
161
+ }
162
+ function Zn(n) {
163
+ return n === null || T(n) ? a(n) : (X = r.enter("chunkText", { contentType: "text" }), y(n));
164
+ }
165
+ function y(n) {
166
+ if (n === null || T(n))
167
+ return u ? !f || n === null ? a(n) : (r.exit("chunkText"), Sn(), i(n)) : f && n !== null ? (R = !0, O = !1, r.consume(n), r.exit("chunkText"), Yn) : n !== null && !l ? r.check(Vn, Mt, dn)(n) : dn(n);
168
+ if (!f) {
169
+ if (!s && n === B)
170
+ return hn(t.parser, t.now().offset) ? (gn = n, xn(n)) : (k = 0, N = 0, nn = t.now().offset, P = !1, r.check({ partial: !0, tokenize: St }, b, yt)(n));
171
+ if (!s && n === sn && (Tn || An))
172
+ return k = 0, r.check({ partial: !0, tokenize: Ct }, b, Nt)(n);
173
+ if (!s && n === M && In)
174
+ return hn(t.parser, t.now().offset) ? (gn = n, xn(n)) : (k = 0, F = 0, e = t.now().offset, En = !1, r.check({ partial: !0, tokenize: bt }, b, zt)(n));
175
+ if (n === W && On.length && wn && (D = On.pop(), D && tn.delete(D), !D?.inactive))
176
+ return k = 0, r.check({ partial: !0, tokenize: Lt }, Pt, Rn)(n);
177
+ if (l && K(n))
178
+ return k = 0, r.check({ partial: !0, tokenize: Dt }, Bt, b)(n);
179
+ if (n === vn)
180
+ return r.consume(n), O = !1, v = !1, Rt;
181
+ }
182
+ return Rn(n);
183
+ }
184
+ function xn(n) {
185
+ return n !== gn ? y(n) : (r.consume(n), G = n, O = !1, v = !1, xn);
186
+ }
187
+ function Rn(n) {
188
+ const p = G;
189
+ if (r.consume(n), G = n, !f && n === U) {
190
+ const g = {
191
+ type: p === et ? "labelImage" : "labelLink",
192
+ end: t.now()
193
+ };
194
+ On.push(g), g.type === "labelLink" && tn.add(g);
195
+ }
196
+ const o = f;
197
+ return f ? O && n === j ? (f = !1, O = !1) : O = n === j : O && n === H ? (f = !0, O = !1) : O = n === H, !u && o !== f && (t.currentConstruct = f ? It : Un), f || (v && n === U && (s = !0), n === W && (s = !1), v = n === Ln), y;
198
+ }
199
+ function Rt(n) {
200
+ return s && (n === null || !yn.has(n)) || n === null || T(n) ? y(n) : (r.consume(n), G = null, y);
201
+ }
202
+ function St(n, p, o) {
203
+ let g = 0, m = 0;
204
+ return _;
205
+ function E(c) {
206
+ n.consume(c), k++;
207
+ }
208
+ function _(c) {
209
+ return c === B ? (g++, N++, E(c), _) : C(c);
210
+ }
211
+ function C(c) {
212
+ return c === null ? o(c) : T(c) ? u || l ? (P = l, o(c)) : n.check(Vn, h, _n)(c) : c === B ? (m = 0, an(c)) : (E(c), C);
213
+ }
214
+ function h(c) {
215
+ return E(c), C;
216
+ }
217
+ function _n(c) {
218
+ return n.check({ partial: !0, tokenize: Cn }, un, o)(c);
219
+ }
220
+ function un(c) {
221
+ return P = !0, o(c);
222
+ }
223
+ function Cn(c, ln, w) {
224
+ let x = "";
225
+ return z;
226
+ function z(I) {
227
+ return c.consume(I), V;
228
+ }
229
+ function V(I) {
230
+ return I === null || T(I) ? (0, bn.isInlineCodeBoundaryLine)(x) ? ln(I) : w(I) : (x += I === fn ? " " : I === cn ? " " : String.fromCodePoint(I), c.consume(I), V);
231
+ }
232
+ }
233
+ function an(c) {
234
+ return c === B ? (m++, E(c), an) : m === g ? p(c) : C(c);
235
+ }
236
+ }
237
+ function _t(n, p, o) {
238
+ return An ? en.call(this, An, "htmlText", n, p, o) : o;
239
+ }
240
+ function Ct(n, p, o) {
241
+ return Tn ? en.call(this, Tn, "autolink", n, p, o) : o;
242
+ }
243
+ function Nt(n) {
244
+ return k = 0, r.check({ partial: !0, tokenize: _t }, b, Rn)(n);
245
+ }
246
+ function bt(n, p, o) {
247
+ if (!In)
248
+ return o;
249
+ let g = !0, m = 0;
250
+ const E = Object.create(this, { previous: { value: null } });
251
+ return en.call(E, In, "mathText", {
252
+ ...n,
253
+ consume(_) {
254
+ g && _ === M ? F++ : g = !1, m = _ === M ? m + 1 : 0, n.consume(_);
255
+ }
256
+ }, p, o, () => m === F, () => {
257
+ En = !0;
258
+ });
259
+ }
260
+ function Lt(n, p, o) {
261
+ if (!wn || !D)
262
+ return o;
263
+ const g = Object.create(this, {
264
+ events: { value: [["enter", D]] }
265
+ });
266
+ return en.call(g, wn, "resource", n, p, o);
267
+ }
268
+ function en(n, p, o, g, m, E = () => !1, _ = () => {
269
+ }) {
270
+ let C = !1, h = !1;
271
+ const _n = n.tokenize.call(this, un(o), Cn, an);
272
+ return c(_n);
273
+ function un(w) {
274
+ return {
275
+ ...w,
276
+ consume(x) {
277
+ k++, w.consume(x);
278
+ },
279
+ exit(x) {
280
+ const z = w.exit(x);
281
+ return x === p && (C = !0), z;
282
+ },
283
+ attempt(x, z, V) {
284
+ return w.attempt({
285
+ ...x,
286
+ tokenize(I, qt, Kt) {
287
+ return x.tokenize.call(this, un(I), qt, Kt);
288
+ }
289
+ }, z, V);
290
+ }
291
+ };
292
+ }
293
+ function Cn(w) {
294
+ return h = !0, C ? g(w) : m(w);
295
+ }
296
+ function an(w) {
297
+ return h = !0, m(w);
298
+ }
299
+ function c(w) {
300
+ return (x) => {
301
+ if (!C && T(x) && !E())
302
+ return u || l ? ln(x) : o.check(At, z, ln)(x);
303
+ return z(x);
304
+ function z(V) {
305
+ const I = w(V);
306
+ return I && !h ? c(I) : I;
307
+ }
308
+ };
309
+ }
310
+ function ln(w) {
311
+ return _(), m(w);
312
+ }
313
+ }
314
+ function b(n) {
315
+ return k ? (r.consume(n), G = n, k--, O = !1, v = !1, T(n) ? (r.exit("chunkText"), vt) : b) : y(n);
316
+ }
317
+ function vt(n) {
318
+ return Jn(), b(n);
319
+ }
320
+ function yt(n) {
321
+ return !u && P && rn.add(nn), k = N, b(n);
322
+ }
323
+ function zt(n) {
324
+ return !u && En && rn.add(e), k = F, b(n);
325
+ }
326
+ function Pt(n) {
327
+ if (D?.type === "labelLink") {
328
+ for (const p of tn)
329
+ p.inactive = !0;
330
+ tn.clear();
331
+ }
332
+ return s = !1, b(n);
333
+ }
334
+ function Dt(n, p, o) {
335
+ let g = !1;
336
+ return E;
337
+ function m(h) {
338
+ n.consume(h), k++;
339
+ }
340
+ function E(h) {
341
+ return K(h) ? (m(h), E) : _(h);
342
+ }
343
+ function _(h) {
344
+ return h === on ? (g = !0, m(h), _) : g ? C(h) : o(h);
345
+ }
346
+ function C(h) {
347
+ return K(h) ? (m(h), C) : h === null || T(h) ? p(h) : o(h);
348
+ }
349
+ }
350
+ function Bt(n) {
351
+ return R ? (r.exit("chunkText"), r.enter(L), Xn(n)) : a(n);
352
+ }
353
+ function Xn(n) {
354
+ return k ? (r.consume(n), k--, Xn) : (r.exit(L), $n(), r.exit(kn), i(n));
355
+ }
356
+ function Yn(n) {
357
+ return n === null ? (Sn(), i(n)) : (Jn(), y(n));
358
+ }
359
+ function Jn() {
360
+ X.next = r.enter("chunkText", {
361
+ contentType: "text",
362
+ previous: X
363
+ }), X = X.next;
364
+ }
365
+ function Sn() {
366
+ $n(), l || r.exit("paragraph"), r.exit(kn);
367
+ }
368
+ function $n() {
369
+ if (u || !rn.size)
370
+ return;
371
+ let n = pn.get(t.parser);
372
+ n || (n = /* @__PURE__ */ new Set(), pn.set(t.parser, n));
373
+ for (const p of rn)
374
+ n.add(p);
375
+ }
376
+ function dn(n) {
377
+ return R ? (r.exit("chunkText"), Sn(), i(n)) : a(n);
378
+ }
379
+ function Mt(n) {
380
+ return r.consume(n), G = null, r.exit("chunkText"), Yn;
381
+ }
382
+ function nt(n, p, o) {
383
+ return g;
384
+ function g(E) {
385
+ return n.consume(E), m;
386
+ }
387
+ function m(E) {
388
+ return K(E) ? (n.consume(E), m) : E === null || T(E) ? o(E) : n.check(Tt, p, n.interrupt(wt, o, p))(E);
389
+ }
390
+ }
391
+ function Ht(n, p, o) {
392
+ return (m) => (n.enter(S), nt(n, g(p), g(o))(m));
393
+ function g(m) {
394
+ return (E) => (n.exit(S), m(E));
395
+ }
396
+ }
397
+ function jt(n, p, o) {
398
+ return mn(this, n, p, o, !1, !0);
399
+ }
400
+ }
401
+ const K = (t) => t === it || t === fn || t === cn;
402
+ function Mn() {
35
403
  return {
404
+ flow: {
405
+ [on]: {
406
+ name: Y,
407
+ concrete: !0,
408
+ tokenize: mt
409
+ },
410
+ null: {
411
+ name: A.OPAQUE_PARAGRAPH,
412
+ concrete: !0,
413
+ tokenize: ht
414
+ }
415
+ },
36
416
  text: {
37
- [y]: {
417
+ [B]: {
418
+ name: "flowLiteralCodeOpening",
419
+ previous: ot,
420
+ tokenize: Pn
421
+ },
422
+ [M]: {
423
+ name: "flowLiteralMathOpening",
424
+ previous: ft,
425
+ tokenize: Pn
426
+ },
427
+ [Ln]: {
38
428
  name: "flowInteraction",
39
- tokenize: w
40
- }
429
+ tokenize: ct
430
+ },
431
+ [H]: { name: Q, tokenize: pt }
41
432
  }
42
433
  };
43
434
  }
44
- function R() {
435
+ function Hn() {
45
436
  return {
46
437
  transforms: [
47
- (n) => {
48
- n.data = { ...n.data, [r.TOKENIZED_TREE]: !0 };
438
+ (t) => {
439
+ t.data = { ...t.data, [A.TOKENIZED_TREE]: !0 };
49
440
  }
50
441
  ],
51
442
  enter: {
52
- [a](n) {
53
- this.enter({ type: r.INTERACTION_NODE, value: "" }, n);
443
+ [Y](t) {
444
+ this.enter({ type: "heading", depth: t.flowHeadingDepth, children: [] }, t);
445
+ },
446
+ [Q](t) {
447
+ this.enter({ type: A.VARIABLE_NODE, value: "" }, t);
448
+ },
449
+ [J](t) {
450
+ this.enter({ type: A.INTERACTION_NODE, value: "" }, t);
54
451
  }
55
452
  },
56
453
  exit: {
57
- [a](n) {
58
- const o = this.stack[this.stack.length - 1];
59
- o.value = this.sliceSerialize(n), this.exit(n);
454
+ [Y](t) {
455
+ this.exit(t);
456
+ },
457
+ [Q](t) {
458
+ const r = this.stack[this.stack.length - 1];
459
+ r.value = Bn(this, t), this.exit(t);
460
+ },
461
+ [J](t) {
462
+ const r = this.stack[this.stack.length - 1];
463
+ r.value = Bn(this, t), this.exit(t);
60
464
  }
61
465
  }
62
466
  };
63
467
  }
64
- const C = (n) => (typeof n == "object" || typeof n == "function") && n !== null && typeof n.data == "function";
65
- function K(n) {
66
- if (!C(n))
468
+ const jn = /* @__PURE__ */ new WeakSet(), qn = /* @__PURE__ */ new WeakMap(), Kn = /* @__PURE__ */ new WeakSet();
469
+ function Fn(t) {
470
+ if (typeof t != "function")
471
+ return t;
472
+ const r = t;
473
+ if (Kn.has(r))
474
+ return r;
475
+ let i = qn.get(r);
476
+ return i || (i = function(a, l) {
477
+ const u = a.startsWith("\uFEFF") ? a.slice(1) : a;
478
+ $.push((0, bn.findRejectedDocumentInlineOpenings)(u));
479
+ try {
480
+ return r.call(this, a, l);
481
+ } finally {
482
+ $.pop();
483
+ }
484
+ }, qn.set(r, i), Kn.add(i)), i;
485
+ }
486
+ function Et(t) {
487
+ if (!jn.has(t)) {
488
+ jn.add(t);
489
+ for (const r of ["parser", "Parser"]) {
490
+ const i = Object.getOwnPropertyDescriptor(t, r);
491
+ if (i && !i.configurable) {
492
+ "value" in i && i.writable && (t[r] = Fn(t[r]));
493
+ continue;
494
+ }
495
+ let a = t[r];
496
+ const l = !i || !!i.set || "value" in i && i.writable;
497
+ Object.defineProperty(t, r, {
498
+ configurable: i?.configurable ?? !0,
499
+ enumerable: i?.enumerable ?? !0,
500
+ get() {
501
+ const u = t.data(), f = u.micromarkExtensions;
502
+ return f?.includes(Z) && f[f.length - 1] !== Z && (u.micromarkExtensions = [
503
+ ...f.filter((O) => O !== Z),
504
+ Z
505
+ ]), Fn(i?.get ? i.get.call(this) : a);
506
+ },
507
+ ...l ? {
508
+ set(u) {
509
+ i?.set ? i.set.call(this, u) : a = u;
510
+ }
511
+ } : {}
512
+ });
513
+ }
514
+ }
515
+ }
516
+ const gt = (t) => (typeof t == "object" || typeof t == "function") && t !== null && typeof t.data == "function";
517
+ function Ot(t) {
518
+ if (!gt(t))
67
519
  return;
68
- const o = n.data(), i = (E, s) => {
69
- const u = o[E] ?? [];
70
- u.includes(s) || u.push(s), o[E] = u;
520
+ const r = t.data();
521
+ Et(t);
522
+ const i = (a, l) => {
523
+ const u = r[a] ?? [];
524
+ u.includes(l) || u.push(l), r[a] = u;
71
525
  };
72
- i("micromarkExtensions", M), i("fromMarkdownExtensions", k);
526
+ i("micromarkExtensions", Z), i("fromMarkdownExtensions", kt);
73
527
  }
74
- const M = A(), k = R();
75
- })(l), l);
528
+ const Z = Mn(), kt = Hn();
529
+ })(Nn), Nn);
76
530
  }
77
531
  export {
78
- F as __require
532
+ Ut as __require
79
533
  };
80
534
  //# sourceMappingURL=interaction-syntax.es.js.map