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

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