markdown-flow-ui 0.2.28 → 0.2.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/interaction-syntax.cjs +2 -0
- package/dist/_virtual/interaction-syntax.cjs.map +1 -0
- package/dist/_virtual/interaction-syntax.es.js +5 -0
- package/dist/_virtual/interaction-syntax.es.js.map +1 -0
- package/dist/node_modules/remark-flow/dist/interaction-plugin-core.cjs +1 -1
- package/dist/node_modules/remark-flow/dist/interaction-plugin-core.cjs.map +1 -1
- package/dist/node_modules/remark-flow/dist/interaction-plugin-core.es.js +55 -29
- package/dist/node_modules/remark-flow/dist/interaction-plugin-core.es.js.map +1 -1
- package/dist/node_modules/remark-flow/dist/interaction-syntax.cjs +2 -0
- package/dist/node_modules/remark-flow/dist/interaction-syntax.cjs.map +1 -0
- package/dist/node_modules/remark-flow/dist/interaction-syntax.es.js +80 -0
- package/dist/node_modules/remark-flow/dist/interaction-syntax.es.js.map +1 -0
- package/dist/node_modules/remark-flow/dist/remark-custom-variable.cjs +1 -1
- package/dist/node_modules/remark-flow/dist/remark-custom-variable.cjs.map +1 -1
- package/dist/node_modules/remark-flow/dist/remark-custom-variable.es.js +8 -7
- package/dist/node_modules/remark-flow/dist/remark-custom-variable.es.js.map +1 -1
- package/dist/node_modules/remark-flow/dist/remark-flow.cjs +1 -1
- package/dist/node_modules/remark-flow/dist/remark-flow.cjs.map +1 -1
- package/dist/node_modules/remark-flow/dist/remark-flow.es.js +13 -16
- package/dist/node_modules/remark-flow/dist/remark-flow.es.js.map +1 -1
- package/dist/node_modules/remark-flow/dist/remark-interaction.cjs +1 -1
- package/dist/node_modules/remark-flow/dist/remark-interaction.cjs.map +1 -1
- package/dist/node_modules/remark-flow/dist/remark-interaction.es.js +9 -8
- package/dist/node_modules/remark-flow/dist/remark-interaction.es.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interaction-syntax.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interaction-syntax.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../../../_virtual/interaction-plugin-core.cjs"),v=require("../../../_virtual/index3.cjs"),C=require("./interaction-parser.cjs"),q=require("./escaping.cjs"),O=require("./interaction-syntax.cjs");var g;function P(){if(g)return l.__exports;g=1,Object.defineProperty(l.__exports,"__esModule",{value:!0}),l.__exports.transformInteractionsInTree=E;const p=v.default,I=C.__require(),d=q.__require(),f=O.__require();function m(e,i,s,n,t){return[{type:"text",value:e.substring(0,i)},{type:"element",data:{hName:t,hProperties:n}},{type:"text",value:e.substring(s)}]}function y(e,i,s){const n=new RegExp(`^\\?\\[(${d.INTERACTION_CONTENT_SOURCE})\\]$`).exec(e);if(!n)return null;const t=n[1];if(t.includes("%{")&&(!t.includes("%{{")||t.includes("%{{}}")))return null;try{return i.parseToRemarkFormat(e)}catch(r){return console.warn(`Failed to parse ${s} syntax:`,r),null}}function E(e,i){const s=e.data,n=new I.InteractionParser;if(s?.[f.TOKENIZED_TREE]===!0){(0,p.visit)(e,f.INTERACTION_NODE,(t,r,o)=>{if(r===null||o===null)return;const c=t.value,_=y(c,n,i);o.children.splice(r,1,_?{type:"element",data:{hName:"custom-variable",hProperties:_}}:{type:"text",value:c})});return}(0,p.visit)(e,"text",(t,r,o)=>{if(r===null||o===null)return;const c=t.value,u=new RegExp(`\\?\\[(${d.INTERACTION_CONTENT_SOURCE})\\](?!\\()`).exec(c);if(u){const x=u[0],T=u.index,R=T+x.length;try{const a=u[1];if(a.includes("%{")&&(!a.includes("%{{")||a.includes("%{{}}")))return;const h=n.parseToRemarkFormat(x),N=m(c,T,R,h,"custom-variable");o.children.splice(r,1,...N)}catch(a){console.warn(`Failed to parse ${i} syntax:`,a)}}})}return l.__exports}exports.__require=P;
|
|
2
2
|
//# sourceMappingURL=interaction-plugin-core.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interaction-plugin-core.cjs","sources":["../../../../node_modules/remark-flow/dist/interaction-plugin-core.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.transformInteractionsInTree = transformInteractionsInTree;\nconst unist_util_visit_1 = require(\"unist-util-visit\");\nconst interaction_parser_1 = require(\"./interaction-parser\");\nconst escaping_1 = require(\"./escaping\");\n/**\n * Create AST node segments\n */\nfunction createSegments(value, startIndex, endIndex, parsedResult, hName) {\n return [\n {\n type: 'text',\n value: value.substring(0, startIndex),\n },\n {\n type: 'element',\n data: {\n hName,\n hProperties: parsedResult,\n },\n },\n {\n type: 'text',\n value: value.substring(endIndex),\n },\n ];\n}\n/**\n * Shared visitor body for the remark plugins: find `?[...]` interaction\n * syntax
|
|
1
|
+
{"version":3,"file":"interaction-plugin-core.cjs","sources":["../../../../node_modules/remark-flow/dist/interaction-plugin-core.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.transformInteractionsInTree = transformInteractionsInTree;\nconst unist_util_visit_1 = require(\"unist-util-visit\");\nconst interaction_parser_1 = require(\"./interaction-parser\");\nconst escaping_1 = require(\"./escaping\");\nconst interaction_syntax_1 = require(\"./interaction-syntax\");\n/**\n * Create AST node segments\n */\nfunction createSegments(value, startIndex, endIndex, parsedResult, hName) {\n return [\n {\n type: 'text',\n value: value.substring(0, startIndex),\n },\n {\n type: 'element',\n data: {\n hName,\n hProperties: parsedResult,\n },\n },\n {\n type: 'text',\n value: value.substring(endIndex),\n },\n ];\n}\n/**\n * Parse `value` as one whole interaction, or return null if it should stay text.\n *\n * Invalid variable syntax is kept as text rather than misparsed: `%{variable}` with one brace,\n * or `%{{}}` with no name, would otherwise become display buttons.\n */\nfunction parseWhole(value, parser, warnLabel) {\n const whole = new RegExp(`^\\\\?\\\\[(${escaping_1.INTERACTION_CONTENT_SOURCE})\\\\]$`).exec(value);\n if (!whole)\n return null;\n const innerContent = whole[1];\n if (innerContent.includes('%{') &&\n (!innerContent.includes('%{{') || innerContent.includes('%{{}}'))) {\n return null;\n }\n try {\n return parser.parseToRemarkFormat(value);\n }\n catch (error) {\n console.warn(`Failed to parse ${warnLabel} syntax:`, error);\n return null;\n }\n}\n/**\n * Shared visitor body for the remark plugins: find `?[...]` interaction\n * syntax and replace it with a `custom-variable` element.\n * remark-interaction and remark-custom-variable are thin wrappers around\n * this (they only differ in the warning label used on parse failures).\n *\n * @param tree - The AST to transform in place\n * @param warnLabel - Label used in the console warning on parse failures\n *\n * A tree parsed with the interaction tokenizer is marked so at its root, and its interactions\n * are the tokenizer's own nodes, which nothing else rewrites: each becomes an element, or text\n * if it does not parse. Text nodes are not read in such a tree -- any `?[` in one is something\n * Markdown has already rewritten, `\\?[` with its escape consumed, and reading it as a question\n * would turn text the author escaped into buttons. A tree without the mark (parsed by another\n * processor, or built by hand) is read from its text nodes, as it always was.\n */\nfunction transformInteractionsInTree(tree, warnLabel) {\n const rootData = tree.data;\n const parser = new interaction_parser_1.InteractionParser();\n if (rootData?.[interaction_syntax_1.TOKENIZED_TREE] === true) {\n (0, unist_util_visit_1.visit)(tree, interaction_syntax_1.INTERACTION_NODE, (node, index, parent) => {\n if (index === null || parent === null)\n return;\n const value = node.value;\n const parsed = parseWhole(value, parser, warnLabel);\n parent.children.splice(index, 1, parsed\n ? {\n type: 'element',\n data: { hName: 'custom-variable', hProperties: parsed },\n }\n : { type: 'text', value });\n });\n return;\n }\n (0, unist_util_visit_1.visit)(tree, 'text', (node, index, parent) => {\n // Input validation\n if (index === null || parent === null)\n return;\n const value = node.value;\n // Check if contains interaction syntax\n const interactionRegex = new RegExp(`\\\\?\\\\[(${escaping_1.INTERACTION_CONTENT_SOURCE})\\\\](?!\\\\()`);\n const match = interactionRegex.exec(value);\n if (match) {\n const fullMatch = match[0];\n const startIndex = match.index;\n const endIndex = startIndex + fullMatch.length;\n try {\n // Check for invalid variable syntax: keep the original text\n // instead of misparsing %{variable} / %{{}} as display buttons.\n const innerContent = match[1];\n if (innerContent.includes('%{')) {\n if (!innerContent.includes('%{{')) {\n // Contains invalid variable syntax %{variable} instead of %{{variable}}\n return;\n }\n // Check for empty variable name %{{}}\n if (innerContent.includes('%{{}}')) {\n return;\n }\n }\n const parsedResult = parser.parseToRemarkFormat(fullMatch);\n // Create AST segments\n const segments = createSegments(value, startIndex, endIndex, parsedResult, 'custom-variable');\n parent.children.splice(index, 1, ...segments);\n }\n catch (error) {\n console.warn(`Failed to parse ${warnLabel} syntax:`, error);\n // Keep original if parsing fails\n }\n }\n });\n}\n//# sourceMappingURL=interaction-plugin-core.js.map"],"names":["interactionPluginCore","transformInteractionsInTree","unist_util_visit_1","require$$0","interaction_parser_1","require$$1","escaping_1","require$$2","interaction_syntax_1","require$$3","createSegments","value","startIndex","endIndex","parsedResult","hName","parseWhole","parser","warnLabel","whole","innerContent","error","tree","rootData","node","index","parent","parsed","match","fullMatch","segments"],"mappings":"kVACA,OAAO,eAAeA,EAAAA,UAAS,aAAc,CAAE,MAAO,GAAM,EAC5DA,EAAAA,UAAA,4BAAsCC,EACtC,MAAMC,EAAqBC,EAAAA,QACrBC,EAAuBC,EAAAA,UAAA,EACvBC,EAAaC,EAAAA,UAAA,EACbC,EAAuBC,EAAAA,UAAA,EAI7B,SAASC,EAAeC,EAAOC,EAAYC,EAAUC,EAAcC,EAAO,CACtE,MAAO,CACH,CACI,KAAM,OACN,MAAOJ,EAAM,UAAU,EAAGC,CAAU,GAExC,CACI,KAAM,UACN,KAAM,CACF,MAAAG,EACA,YAAaD,IAGrB,CACI,KAAM,OACN,MAAOH,EAAM,UAAUE,CAAQ,GAG3C,CAOA,SAASG,EAAWL,EAAOM,EAAQC,EAAW,CAC1C,M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,IACtB,CAACA,EAAa,SAAS,KAAK,GAK5BA,EAAa,SAAS,OAAO,GAC7B,OAGR,MAAMN,EAAeG,EAAO,oBAAoBY,CAAS,EAEnDC,EAAWpB,EAAeC,EAAOC,EAAYC,EAAUC,EAAc,iBAAiB,EAC5FY,EAAO,SAAS,OAAOD,EAAO,EAAG,GAAGK,CAAQ,CAC5D,OACmBT,EAAO,CACV,QAAQ,KAAK,mBAAmBH,CAAS,WAAYG,CAAK,CAE1E,CACA,CACA,CAAK,CACL","x_google_ignoreList":[0]}
|
|
@@ -1,54 +1,80 @@
|
|
|
1
|
-
import { __exports as
|
|
2
|
-
import
|
|
3
|
-
import { __require as
|
|
4
|
-
import { __require as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { __exports as l } from "../../../_virtual/interaction-plugin-core.es.js";
|
|
2
|
+
import C from "../../../_virtual/index.es3.js";
|
|
3
|
+
import { __require as v } from "./interaction-parser.es.js";
|
|
4
|
+
import { __require as q } from "./escaping.es.js";
|
|
5
|
+
import { __require as O } from "./interaction-syntax.es.js";
|
|
6
|
+
var x;
|
|
7
|
+
function S() {
|
|
8
|
+
if (x) return l;
|
|
9
|
+
x = 1, Object.defineProperty(l, "__esModule", { value: !0 }), l.transformInteractionsInTree = R;
|
|
10
|
+
const _ = C, T = v(), m = q(), f = O();
|
|
11
|
+
function E(e, i, o, r, t) {
|
|
11
12
|
return [
|
|
12
13
|
{
|
|
13
14
|
type: "text",
|
|
14
|
-
value:
|
|
15
|
+
value: e.substring(0, i)
|
|
15
16
|
},
|
|
16
17
|
{
|
|
17
18
|
type: "element",
|
|
18
19
|
data: {
|
|
19
|
-
hName:
|
|
20
|
-
hProperties:
|
|
20
|
+
hName: t,
|
|
21
|
+
hProperties: r
|
|
21
22
|
}
|
|
22
23
|
},
|
|
23
24
|
{
|
|
24
25
|
type: "text",
|
|
25
|
-
value:
|
|
26
|
+
value: e.substring(o)
|
|
26
27
|
}
|
|
27
28
|
];
|
|
28
29
|
}
|
|
29
|
-
function
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
function g(e, i, o) {
|
|
31
|
+
const r = new RegExp(`^\\?\\[(${m.INTERACTION_CONTENT_SOURCE})\\]$`).exec(e);
|
|
32
|
+
if (!r)
|
|
33
|
+
return null;
|
|
34
|
+
const t = r[1];
|
|
35
|
+
if (t.includes("%{") && (!t.includes("%{{") || t.includes("%{{}}")))
|
|
36
|
+
return null;
|
|
37
|
+
try {
|
|
38
|
+
return i.parseToRemarkFormat(e);
|
|
39
|
+
} catch (n) {
|
|
40
|
+
return console.warn(`Failed to parse ${o} syntax:`, n), null;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function R(e, i) {
|
|
44
|
+
const o = e.data, r = new T.InteractionParser();
|
|
45
|
+
if (o?.[f.TOKENIZED_TREE] === !0) {
|
|
46
|
+
(0, _.visit)(e, f.INTERACTION_NODE, (t, n, s) => {
|
|
47
|
+
if (n === null || s === null)
|
|
48
|
+
return;
|
|
49
|
+
const a = t.value, p = g(a, r, i);
|
|
50
|
+
s.children.splice(n, 1, p ? {
|
|
51
|
+
type: "element",
|
|
52
|
+
data: { hName: "custom-variable", hProperties: p }
|
|
53
|
+
} : { type: "text", value: a });
|
|
54
|
+
});
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
(0, _.visit)(e, "text", (t, n, s) => {
|
|
58
|
+
if (n === null || s === null)
|
|
33
59
|
return;
|
|
34
|
-
const
|
|
35
|
-
if (
|
|
36
|
-
const
|
|
60
|
+
const a = t.value, u = new RegExp(`\\?\\[(${m.INTERACTION_CONTENT_SOURCE})\\](?!\\()`).exec(a);
|
|
61
|
+
if (u) {
|
|
62
|
+
const d = u[0], I = u.index, h = I + d.length;
|
|
37
63
|
try {
|
|
38
|
-
const
|
|
39
|
-
if (
|
|
64
|
+
const c = u[1];
|
|
65
|
+
if (c.includes("%{") && (!c.includes("%{{") || c.includes("%{{}}")))
|
|
40
66
|
return;
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
} catch (
|
|
44
|
-
console.warn(`Failed to parse ${
|
|
67
|
+
const N = r.parseToRemarkFormat(d), y = E(a, I, h, N, "custom-variable");
|
|
68
|
+
s.children.splice(n, 1, ...y);
|
|
69
|
+
} catch (c) {
|
|
70
|
+
console.warn(`Failed to parse ${i} syntax:`, c);
|
|
45
71
|
}
|
|
46
72
|
}
|
|
47
73
|
});
|
|
48
74
|
}
|
|
49
|
-
return
|
|
75
|
+
return l;
|
|
50
76
|
}
|
|
51
77
|
export {
|
|
52
|
-
|
|
78
|
+
S as __require
|
|
53
79
|
};
|
|
54
80
|
//# sourceMappingURL=interaction-plugin-core.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interaction-plugin-core.es.js","sources":["../../../../node_modules/remark-flow/dist/interaction-plugin-core.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.transformInteractionsInTree = transformInteractionsInTree;\nconst unist_util_visit_1 = require(\"unist-util-visit\");\nconst interaction_parser_1 = require(\"./interaction-parser\");\nconst escaping_1 = require(\"./escaping\");\n/**\n * Create AST node segments\n */\nfunction createSegments(value, startIndex, endIndex, parsedResult, hName) {\n return [\n {\n type: 'text',\n value: value.substring(0, startIndex),\n },\n {\n type: 'element',\n data: {\n hName,\n hProperties: parsedResult,\n },\n },\n {\n type: 'text',\n value: value.substring(endIndex),\n },\n ];\n}\n/**\n * Shared visitor body for the remark plugins: find `?[...]` interaction\n * syntax
|
|
1
|
+
{"version":3,"file":"interaction-plugin-core.es.js","sources":["../../../../node_modules/remark-flow/dist/interaction-plugin-core.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.transformInteractionsInTree = transformInteractionsInTree;\nconst unist_util_visit_1 = require(\"unist-util-visit\");\nconst interaction_parser_1 = require(\"./interaction-parser\");\nconst escaping_1 = require(\"./escaping\");\nconst interaction_syntax_1 = require(\"./interaction-syntax\");\n/**\n * Create AST node segments\n */\nfunction createSegments(value, startIndex, endIndex, parsedResult, hName) {\n return [\n {\n type: 'text',\n value: value.substring(0, startIndex),\n },\n {\n type: 'element',\n data: {\n hName,\n hProperties: parsedResult,\n },\n },\n {\n type: 'text',\n value: value.substring(endIndex),\n },\n ];\n}\n/**\n * Parse `value` as one whole interaction, or return null if it should stay text.\n *\n * Invalid variable syntax is kept as text rather than misparsed: `%{variable}` with one brace,\n * or `%{{}}` with no name, would otherwise become display buttons.\n */\nfunction parseWhole(value, parser, warnLabel) {\n const whole = new RegExp(`^\\\\?\\\\[(${escaping_1.INTERACTION_CONTENT_SOURCE})\\\\]$`).exec(value);\n if (!whole)\n return null;\n const innerContent = whole[1];\n if (innerContent.includes('%{') &&\n (!innerContent.includes('%{{') || innerContent.includes('%{{}}'))) {\n return null;\n }\n try {\n return parser.parseToRemarkFormat(value);\n }\n catch (error) {\n console.warn(`Failed to parse ${warnLabel} syntax:`, error);\n return null;\n }\n}\n/**\n * Shared visitor body for the remark plugins: find `?[...]` interaction\n * syntax and replace it with a `custom-variable` element.\n * remark-interaction and remark-custom-variable are thin wrappers around\n * this (they only differ in the warning label used on parse failures).\n *\n * @param tree - The AST to transform in place\n * @param warnLabel - Label used in the console warning on parse failures\n *\n * A tree parsed with the interaction tokenizer is marked so at its root, and its interactions\n * are the tokenizer's own nodes, which nothing else rewrites: each becomes an element, or text\n * if it does not parse. Text nodes are not read in such a tree -- any `?[` in one is something\n * Markdown has already rewritten, `\\?[` with its escape consumed, and reading it as a question\n * would turn text the author escaped into buttons. A tree without the mark (parsed by another\n * processor, or built by hand) is read from its text nodes, as it always was.\n */\nfunction transformInteractionsInTree(tree, warnLabel) {\n const rootData = tree.data;\n const parser = new interaction_parser_1.InteractionParser();\n if (rootData?.[interaction_syntax_1.TOKENIZED_TREE] === true) {\n (0, unist_util_visit_1.visit)(tree, interaction_syntax_1.INTERACTION_NODE, (node, index, parent) => {\n if (index === null || parent === null)\n return;\n const value = node.value;\n const parsed = parseWhole(value, parser, warnLabel);\n parent.children.splice(index, 1, parsed\n ? {\n type: 'element',\n data: { hName: 'custom-variable', hProperties: parsed },\n }\n : { type: 'text', value });\n });\n return;\n }\n (0, unist_util_visit_1.visit)(tree, 'text', (node, index, parent) => {\n // Input validation\n if (index === null || parent === null)\n return;\n const value = node.value;\n // Check if contains interaction syntax\n const interactionRegex = new RegExp(`\\\\?\\\\[(${escaping_1.INTERACTION_CONTENT_SOURCE})\\\\](?!\\\\()`);\n const match = interactionRegex.exec(value);\n if (match) {\n const fullMatch = match[0];\n const startIndex = match.index;\n const endIndex = startIndex + fullMatch.length;\n try {\n // Check for invalid variable syntax: keep the original text\n // instead of misparsing %{variable} / %{{}} as display buttons.\n const innerContent = match[1];\n if (innerContent.includes('%{')) {\n if (!innerContent.includes('%{{')) {\n // Contains invalid variable syntax %{variable} instead of %{{variable}}\n return;\n }\n // Check for empty variable name %{{}}\n if (innerContent.includes('%{{}}')) {\n return;\n }\n }\n const parsedResult = parser.parseToRemarkFormat(fullMatch);\n // Create AST segments\n const segments = createSegments(value, startIndex, endIndex, parsedResult, 'custom-variable');\n parent.children.splice(index, 1, ...segments);\n }\n catch (error) {\n console.warn(`Failed to parse ${warnLabel} syntax:`, error);\n // Keep original if parsing fails\n }\n }\n });\n}\n//# sourceMappingURL=interaction-plugin-core.js.map"],"names":["interactionPluginCore","transformInteractionsInTree","unist_util_visit_1","require$$0","interaction_parser_1","require$$1","escaping_1","require$$2","interaction_syntax_1","require$$3","createSegments","value","startIndex","endIndex","parsedResult","hName","parseWhole","parser","warnLabel","whole","innerContent","error","tree","rootData","node","index","parent","parsed","match","fullMatch","segments"],"mappings":";;;;;;;;SACA,OAAO,eAAeA,GAAS,cAAc,EAAE,OAAO,IAAM,GAC5DA,EAAA,8BAAsCC;AACtC,QAAMC,IAAqBC,GACrBC,IAAuBC,EAAA,GACvBC,IAAaC,EAAA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AE,MAAM,QAAQ,OAAAhB,GAAO;AAAA,MACzC,CAAS;AACD;AAAA,IACR;AACI,QAAIT,EAAmB,OAAOoB,GAAM,QAAQ,CAACE,GAAMC,GAAOC,MAAW;AAEjE,UAAID,MAAU,QAAQC,MAAW;AAC7B;AACJ,YAAMf,IAAQa,EAAK,OAGbI,IADmB,IAAI,OAAO,UAAUtB,EAAW,0BAA0B,aAAa,EACjE,KAAKK,CAAK;AACzC,UAAIiB,GAAO;AACP,cAAMC,IAAYD,EAAM,CAAC,GACnBhB,IAAagB,EAAM,OACnBf,IAAWD,IAAaiB,EAAU;AACxC,YAAI;AAGA,gBAAMT,IAAeQ,EAAM,CAAC;AAC5B,cAAIR,EAAa,SAAS,IAAI,MACtB,CAACA,EAAa,SAAS,KAAK,KAK5BA,EAAa,SAAS,OAAO;AAC7B;AAGR,gBAAMN,IAAeG,EAAO,oBAAoBY,CAAS,GAEnDC,IAAWpB,EAAeC,GAAOC,GAAYC,GAAUC,GAAc,iBAAiB;AAC5F,UAAAY,EAAO,SAAS,OAAOD,GAAO,GAAG,GAAGK,CAAQ;AAAA,QAC5D,SACmBT,GAAO;AACV,kBAAQ,KAAK,mBAAmBH,CAAS,YAAYG,CAAK;AAAA,QAE1E;AAAA,MACA;AAAA,IACA,CAAK;AAAA,EACL;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("../../../_virtual/interaction-syntax.cjs");var m;function b(){return m||(m=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.TOKENIZED_TREE=r.INTERACTION_NODE=void 0,r.interactionSyntax=A,r.interactionFromMarkdown=R,r.registerInteractionSyntax=M,r.INTERACTION_NODE="flowInteraction",r.TOKENIZED_TREE="flowInteractionTokenized";const y=63,x=91,T=93,D=40,f=92,h=new Set([124,47,46,93]),u="flowInteraction",a="flowInteractionMarker",l="flowInteractionData",_="lineEnding",N=n=>n!==null&&n<-2;function w(n,e,i){return E;function E(t){return n.enter(u),n.enter(a),n.consume(t),s}function s(t){return t!==x?i(t):(n.consume(t),n.exit(a),o)}function o(t){return t===null?i(t):t===T?O(t):N(t)?S(t):(n.enter(l),c(t))}function S(t){return n.enter(_),n.consume(t),n.exit(_),o}function c(t){return t===null?i(t):t===T?(n.exit(l),O(t)):N(t)?(n.exit(l),S(t)):(n.consume(t),t===f?k:c)}function k(t){return t!==null&&h.has(t)?(n.consume(t),c):c(t)}function O(t){return n.enter(a),n.consume(t),n.exit(a),L}function L(t){return t===D?i(t):(n.exit(u),e(t))}}function A(){return{text:{[y]:{name:"flowInteraction",tokenize:w}}}}function R(){return{transforms:[n=>{n.data={...n.data,[r.TOKENIZED_TREE]:!0}}],enter:{[u](n){this.enter({type:r.INTERACTION_NODE,value:""},n)}},exit:{[u](n){const e=this.stack[this.stack.length-1];e.value=this.sliceSerialize(n),this.exit(n)}}}}const C=n=>(typeof n=="object"||typeof n=="function")&&n!==null&&typeof n.data=="function";function M(n){if(!C(n))return;const e=n.data(),i=(E,s)=>{const o=e[E]??[];o.includes(s)||o.push(s),e[E]=o};i("micromarkExtensions",K),i("fromMarkdownExtensions",g)}const K=A(),g=R()})(I.__exports)),I.__exports}exports.__require=b;
|
|
2
|
+
//# sourceMappingURL=interaction-syntax.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interaction-syntax.cjs","sources":["../../../../node_modules/remark-flow/dist/interaction-syntax.js"],"sourcesContent":["\"use strict\";\n/**\n * Read `?[...]` as one piece of text while the Markdown is being tokenized.\n *\n * The plugins find interactions by walking the tree's text nodes, which only exist once the\n * Markdown has been parsed -- and by then the parse has already rewritten what is inside the\n * brackets. A backslash escape is Markdown's own syntax too, so `https:\\/\\/example.com` reaches the\n * text node as `https://example.com`: the escape the option relied on is gone and the `//` splits\n * it into a display and a value. Worse, GFM turns that URL into a link node of its own, so the\n * interaction is no longer inside one text node at all and is shown to the learner as raw text.\n * The same happens to anything else Markdown reads inline: `$...$` with remark-math, `*...*`,\n * an entity.\n *\n * So the brackets are claimed before any of that runs. This construct starts at `?[` and ends at\n * the first `]` the escape rule leaves unescaped, exactly where `INTERACTION_CONTENT_SOURCE` ends\n * it, and the whole span becomes one node carrying the source unchanged (see `INTERACTION_NODE`),\n * which the plugins then parse from what the author wrote.\n *\n * `?[text](url)` is a link, not an interaction, as the visitor's lookahead has always said, so a\n * `]` followed by `(` gives the span back to Markdown.\n *\n * The types are declared here rather than imported, so the published declarations do not reach\n * into micromark's packages, which this one does not depend on at runtime.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TOKENIZED_TREE = exports.INTERACTION_NODE = void 0;\nexports.interactionSyntax = interactionSyntax;\nexports.interactionFromMarkdown = interactionFromMarkdown;\nexports.registerInteractionSyntax = registerInteractionSyntax;\n/**\n * The node type this construct produces.\n *\n * Its own type, not `text`: GFM finds `www.` links and emails by rewriting text nodes after the\n * parse, and it cut an interaction whose option carried `https://www.postgresql.org` into\n * text and a link, so the question was never recognised. Nothing that rewrites text touches a\n * node of another type; the plugins turn each one into an element, or back into text.\n */\nexports.INTERACTION_NODE = 'flowInteraction';\n/**\n * Set on the root of a tree parsed with this construct registered.\n *\n * Whether a plugin is attached to a processor says nothing about the tree it is given:\n * `runSync(tree)` can hand it one parsed by another processor, or built by hand, in which nothing\n * was tokenized. The visitor reads this mark, not the registration, to know which it has.\n */\nexports.TOKENIZED_TREE = 'flowInteractionTokenized';\nconst QUESTION_MARK = 63;\nconst LEFT_BRACKET = 91;\nconst RIGHT_BRACKET = 93;\nconst LEFT_PAREN = 40;\nconst BACKSLASH = 92;\n// The characters a backslash escapes inside an interaction: `|`, `/`, `.`, `]`. Mirrors ESCAPABLE.\nconst ESCAPABLE_CODES = new Set([124, 47, 46, 93]);\nconst INTERACTION = 'flowInteraction';\nconst MARKER = 'flowInteractionMarker';\nconst DATA = 'flowInteractionData';\nconst LINE_ENDING = 'lineEnding';\n/** Whether `code` is one of micromark's virtual line endings (CR, LF, CRLF). */\nconst isLineEnding = (code) => code !== null && code < -2;\nfunction tokenizeInteraction(effects, ok, nok) {\n return start;\n // Every character is consumed inside a token of its own kind -- the `?[` and `]` markers, the\n // data between them, line endings -- because micromark only lets a construct consume while a\n // token is open.\n function start(code) {\n effects.enter(INTERACTION);\n effects.enter(MARKER);\n effects.consume(code);\n return open;\n }\n function open(code) {\n if (code !== LEFT_BRACKET) {\n return nok(code);\n }\n effects.consume(code);\n effects.exit(MARKER);\n return beforeContent;\n }\n // Data is only opened on a character it will hold: micromark rejects an empty token.\n function beforeContent(code) {\n if (code === null) {\n return nok(code);\n }\n if (code === RIGHT_BRACKET) {\n return close(code);\n }\n if (isLineEnding(code)) {\n return lineEnding(code);\n }\n effects.enter(DATA);\n return content(code);\n }\n function lineEnding(code) {\n // An interaction may run across lines, as the regex it mirrors allows. A line ending is its\n // own token in micromark, so it sits between runs of data rather than inside one.\n effects.enter(LINE_ENDING);\n effects.consume(code);\n effects.exit(LINE_ENDING);\n return beforeContent;\n }\n function content(code) {\n if (code === null) {\n return nok(code);\n }\n if (code === RIGHT_BRACKET) {\n effects.exit(DATA);\n return close(code);\n }\n if (isLineEnding(code)) {\n effects.exit(DATA);\n return lineEnding(code);\n }\n effects.consume(code);\n return code === BACKSLASH ? afterBackslash : content;\n }\n function afterBackslash(code) {\n // `\\]` is an escaped bracket and does not close; any other backslash is literal text and\n // the character after it is read as usual. Only the escapable characters pair up.\n if (code !== null && ESCAPABLE_CODES.has(code)) {\n effects.consume(code);\n return content;\n }\n return content(code);\n }\n function close(code) {\n effects.enter(MARKER);\n effects.consume(code);\n effects.exit(MARKER);\n return after;\n }\n function after(code) {\n if (code === LEFT_PAREN) {\n return nok(code);\n }\n effects.exit(INTERACTION);\n return ok(code);\n }\n}\n/** The micromark syntax extension: `?` may open an interaction wherever inline text is read. */\nfunction interactionSyntax() {\n return {\n text: {\n [QUESTION_MARK]: {\n name: 'flowInteraction',\n tokenize: tokenizeInteraction,\n },\n },\n };\n}\n/** The mdast extension: the whole span becomes one node holding the source as written. */\nfunction interactionFromMarkdown() {\n return {\n transforms: [\n (tree) => {\n tree.data = { ...tree.data, [exports.TOKENIZED_TREE]: true };\n },\n ],\n enter: {\n [INTERACTION](token) {\n this.enter({ type: exports.INTERACTION_NODE, value: '' }, token);\n },\n },\n exit: {\n [INTERACTION](token) {\n const node = this.stack[this.stack.length - 1];\n node.value = this.sliceSerialize(token);\n this.exit(token);\n },\n },\n };\n}\n// A unified processor is a callable instance, so `typeof` says function, not object.\nconst isProcessor = (value) => (typeof value === 'object' || typeof value === 'function') &&\n value !== null &&\n typeof value.data === 'function';\n/**\n * Teach the processor a plugin is attached to to tokenize interactions.\n *\n * A plugin called through `unified().use()` runs with the processor as `this`; one called by hand\n * -- `remarkFlow()(tree)`, as older code and the tests do -- has none, and keeps working on the\n * tree it is given as before.\n */\nfunction registerInteractionSyntax(self) {\n if (!isProcessor(self)) {\n return;\n }\n const data = self.data();\n const add = (field, value) => {\n const list = data[field] ?? [];\n if (!list.includes(value)) {\n list.push(value);\n }\n data[field] = list;\n };\n add('micromarkExtensions', SYNTAX);\n add('fromMarkdownExtensions', FROM_MARKDOWN);\n}\n// One instance each, so a processor that attaches several of these plugins registers once.\nconst SYNTAX = interactionSyntax();\nconst FROM_MARKDOWN = interactionFromMarkdown();\n//# sourceMappingURL=interaction-syntax.js.map"],"names":["exports","interactionSyntax","interactionFromMarkdown","registerInteractionSyntax","QUESTION_MARK","LEFT_BRACKET","RIGHT_BRACKET","LEFT_PAREN","BACKSLASH","ESCAPABLE_CODES","INTERACTION","MARKER","DATA","LINE_ENDING","isLineEnding","code","tokenizeInteraction","effects","ok","nok","start","open","beforeContent","close","lineEnding","content","afterBackslash","after","tree","token","node","isProcessor","value","self","data","add","field","list","SYNTAX","FROM_MARKDOWN"],"mappings":"2LAwBA,OAAO,eAAcA,EAAU,aAAc,CAAE,MAAO,GAAM,EAC5DA,EAAA,eAAyBA,EAAA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K,SAASL,CAAK,GACpBK,EAAK,KAAKL,CAAK,EAEnBE,EAAKE,CAAK,EAAIC,CACtB,EACIF,EAAI,sBAAuBG,CAAM,EACjCH,EAAI,yBAA0BI,CAAa,CAC/C,CAEA,MAAMD,EAASrC,EAAiB,EAC1BsC,EAAgBrC,EAAuB","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,80 @@
|
|
|
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;
|
|
11
|
+
}
|
|
12
|
+
function s(t) {
|
|
13
|
+
return t !== x ? i(t) : (n.consume(t), n.exit(e), u);
|
|
14
|
+
}
|
|
15
|
+
function u(t) {
|
|
16
|
+
return t === null ? i(t) : t === T ? O(t) : _(t) ? m(t) : (n.enter(I), c(t));
|
|
17
|
+
}
|
|
18
|
+
function m(t) {
|
|
19
|
+
return n.enter(N), n.consume(t), n.exit(N), u;
|
|
20
|
+
}
|
|
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);
|
|
23
|
+
}
|
|
24
|
+
function g(t) {
|
|
25
|
+
return t !== null && h.has(t) ? (n.consume(t), c) : c(t);
|
|
26
|
+
}
|
|
27
|
+
function O(t) {
|
|
28
|
+
return n.enter(e), n.consume(t), n.exit(e), L;
|
|
29
|
+
}
|
|
30
|
+
function L(t) {
|
|
31
|
+
return t === D ? i(t) : (n.exit(a), o(t));
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function A() {
|
|
35
|
+
return {
|
|
36
|
+
text: {
|
|
37
|
+
[y]: {
|
|
38
|
+
name: "flowInteraction",
|
|
39
|
+
tokenize: w
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function R() {
|
|
45
|
+
return {
|
|
46
|
+
transforms: [
|
|
47
|
+
(n) => {
|
|
48
|
+
n.data = { ...n.data, [r.TOKENIZED_TREE]: !0 };
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
enter: {
|
|
52
|
+
[a](n) {
|
|
53
|
+
this.enter({ type: r.INTERACTION_NODE, value: "" }, n);
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
exit: {
|
|
57
|
+
[a](n) {
|
|
58
|
+
const o = this.stack[this.stack.length - 1];
|
|
59
|
+
o.value = this.sliceSerialize(n), this.exit(n);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
const C = (n) => (typeof n == "object" || typeof n == "function") && n !== null && typeof n.data == "function";
|
|
65
|
+
function K(n) {
|
|
66
|
+
if (!C(n))
|
|
67
|
+
return;
|
|
68
|
+
const o = n.data(), i = (E, s) => {
|
|
69
|
+
const u = o[E] ?? [];
|
|
70
|
+
u.includes(s) || u.push(s), o[E] = u;
|
|
71
|
+
};
|
|
72
|
+
i("micromarkExtensions", M), i("fromMarkdownExtensions", k);
|
|
73
|
+
}
|
|
74
|
+
const M = A(), k = R();
|
|
75
|
+
})(l), l);
|
|
76
|
+
}
|
|
77
|
+
export {
|
|
78
|
+
F as __require
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=interaction-syntax.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interaction-syntax.es.js","sources":["../../../../node_modules/remark-flow/dist/interaction-syntax.js"],"sourcesContent":["\"use strict\";\n/**\n * Read `?[...]` as one piece of text while the Markdown is being tokenized.\n *\n * The plugins find interactions by walking the tree's text nodes, which only exist once the\n * Markdown has been parsed -- and by then the parse has already rewritten what is inside the\n * brackets. A backslash escape is Markdown's own syntax too, so `https:\\/\\/example.com` reaches the\n * text node as `https://example.com`: the escape the option relied on is gone and the `//` splits\n * it into a display and a value. Worse, GFM turns that URL into a link node of its own, so the\n * interaction is no longer inside one text node at all and is shown to the learner as raw text.\n * The same happens to anything else Markdown reads inline: `$...$` with remark-math, `*...*`,\n * an entity.\n *\n * So the brackets are claimed before any of that runs. This construct starts at `?[` and ends at\n * the first `]` the escape rule leaves unescaped, exactly where `INTERACTION_CONTENT_SOURCE` ends\n * it, and the whole span becomes one node carrying the source unchanged (see `INTERACTION_NODE`),\n * which the plugins then parse from what the author wrote.\n *\n * `?[text](url)` is a link, not an interaction, as the visitor's lookahead has always said, so a\n * `]` followed by `(` gives the span back to Markdown.\n *\n * The types are declared here rather than imported, so the published declarations do not reach\n * into micromark's packages, which this one does not depend on at runtime.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TOKENIZED_TREE = exports.INTERACTION_NODE = void 0;\nexports.interactionSyntax = interactionSyntax;\nexports.interactionFromMarkdown = interactionFromMarkdown;\nexports.registerInteractionSyntax = registerInteractionSyntax;\n/**\n * The node type this construct produces.\n *\n * Its own type, not `text`: GFM finds `www.` links and emails by rewriting text nodes after the\n * parse, and it cut an interaction whose option carried `https://www.postgresql.org` into\n * text and a link, so the question was never recognised. Nothing that rewrites text touches a\n * node of another type; the plugins turn each one into an element, or back into text.\n */\nexports.INTERACTION_NODE = 'flowInteraction';\n/**\n * Set on the root of a tree parsed with this construct registered.\n *\n * Whether a plugin is attached to a processor says nothing about the tree it is given:\n * `runSync(tree)` can hand it one parsed by another processor, or built by hand, in which nothing\n * was tokenized. The visitor reads this mark, not the registration, to know which it has.\n */\nexports.TOKENIZED_TREE = 'flowInteractionTokenized';\nconst QUESTION_MARK = 63;\nconst LEFT_BRACKET = 91;\nconst RIGHT_BRACKET = 93;\nconst LEFT_PAREN = 40;\nconst BACKSLASH = 92;\n// The characters a backslash escapes inside an interaction: `|`, `/`, `.`, `]`. Mirrors ESCAPABLE.\nconst ESCAPABLE_CODES = new Set([124, 47, 46, 93]);\nconst INTERACTION = 'flowInteraction';\nconst MARKER = 'flowInteractionMarker';\nconst DATA = 'flowInteractionData';\nconst LINE_ENDING = 'lineEnding';\n/** Whether `code` is one of micromark's virtual line endings (CR, LF, CRLF). */\nconst isLineEnding = (code) => code !== null && code < -2;\nfunction tokenizeInteraction(effects, ok, nok) {\n return start;\n // Every character is consumed inside a token of its own kind -- the `?[` and `]` markers, the\n // data between them, line endings -- because micromark only lets a construct consume while a\n // token is open.\n function start(code) {\n effects.enter(INTERACTION);\n effects.enter(MARKER);\n effects.consume(code);\n return open;\n }\n function open(code) {\n if (code !== LEFT_BRACKET) {\n return nok(code);\n }\n effects.consume(code);\n effects.exit(MARKER);\n return beforeContent;\n }\n // Data is only opened on a character it will hold: micromark rejects an empty token.\n function beforeContent(code) {\n if (code === null) {\n return nok(code);\n }\n if (code === RIGHT_BRACKET) {\n return close(code);\n }\n if (isLineEnding(code)) {\n return lineEnding(code);\n }\n effects.enter(DATA);\n return content(code);\n }\n function lineEnding(code) {\n // An interaction may run across lines, as the regex it mirrors allows. A line ending is its\n // own token in micromark, so it sits between runs of data rather than inside one.\n effects.enter(LINE_ENDING);\n effects.consume(code);\n effects.exit(LINE_ENDING);\n return beforeContent;\n }\n function content(code) {\n if (code === null) {\n return nok(code);\n }\n if (code === RIGHT_BRACKET) {\n effects.exit(DATA);\n return close(code);\n }\n if (isLineEnding(code)) {\n effects.exit(DATA);\n return lineEnding(code);\n }\n effects.consume(code);\n return code === BACKSLASH ? afterBackslash : content;\n }\n function afterBackslash(code) {\n // `\\]` is an escaped bracket and does not close; any other backslash is literal text and\n // the character after it is read as usual. Only the escapable characters pair up.\n if (code !== null && ESCAPABLE_CODES.has(code)) {\n effects.consume(code);\n return content;\n }\n return content(code);\n }\n function close(code) {\n effects.enter(MARKER);\n effects.consume(code);\n effects.exit(MARKER);\n return after;\n }\n function after(code) {\n if (code === LEFT_PAREN) {\n return nok(code);\n }\n effects.exit(INTERACTION);\n return ok(code);\n }\n}\n/** The micromark syntax extension: `?` may open an interaction wherever inline text is read. */\nfunction interactionSyntax() {\n return {\n text: {\n [QUESTION_MARK]: {\n name: 'flowInteraction',\n tokenize: tokenizeInteraction,\n },\n },\n };\n}\n/** The mdast extension: the whole span becomes one node holding the source as written. */\nfunction interactionFromMarkdown() {\n return {\n transforms: [\n (tree) => {\n tree.data = { ...tree.data, [exports.TOKENIZED_TREE]: true };\n },\n ],\n enter: {\n [INTERACTION](token) {\n this.enter({ type: exports.INTERACTION_NODE, value: '' }, token);\n },\n },\n exit: {\n [INTERACTION](token) {\n const node = this.stack[this.stack.length - 1];\n node.value = this.sliceSerialize(token);\n this.exit(token);\n },\n },\n };\n}\n// A unified processor is a callable instance, so `typeof` says function, not object.\nconst isProcessor = (value) => (typeof value === 'object' || typeof value === 'function') &&\n value !== null &&\n typeof value.data === 'function';\n/**\n * Teach the processor a plugin is attached to to tokenize interactions.\n *\n * A plugin called through `unified().use()` runs with the processor as `this`; one called by hand\n * -- `remarkFlow()(tree)`, as older code and the tests do -- has none, and keeps working on the\n * tree it is given as before.\n */\nfunction registerInteractionSyntax(self) {\n if (!isProcessor(self)) {\n return;\n }\n const data = self.data();\n const add = (field, value) => {\n const list = data[field] ?? [];\n if (!list.includes(value)) {\n list.push(value);\n }\n data[field] = list;\n };\n add('micromarkExtensions', SYNTAX);\n add('fromMarkdownExtensions', FROM_MARKDOWN);\n}\n// One instance each, so a processor that attaches several of these plugins registers once.\nconst SYNTAX = interactionSyntax();\nconst FROM_MARKDOWN = interactionFromMarkdown();\n//# sourceMappingURL=interaction-syntax.js.map"],"names":["exports","interactionSyntax","interactionFromMarkdown","registerInteractionSyntax","QUESTION_MARK","LEFT_BRACKET","RIGHT_BRACKET","LEFT_PAREN","BACKSLASH","ESCAPABLE_CODES","INTERACTION","MARKER","DATA","LINE_ENDING","isLineEnding","code","tokenizeInteraction","effects","ok","nok","start","open","beforeContent","close","lineEnding","content","afterBackslash","after","tree","token","node","isProcessor","value","self","data","add","field","list","SYNTAX","FROM_MARKDOWN"],"mappings":";;;;AAwBA,WAAO,eAAcA,GAAU,cAAc,EAAE,OAAO,IAAM,GAC5DA,EAAA,iBAAyBA,EAAA,mBAA2B,QACpDA,EAAA,oBAA4BC,GAC5BD,EAAA,0BAAkCE,GAClCF,EAAA,4BAAoCG,GASpCH,EAAA,mBAA2B,mBAQ3BA,EAAA,iBAAyB;AACzB,UAAMI,IAAgB,IAChBC,IAAe,IACfC,IAAgB,IAChBC,IAAa,IACbC,IAAY,IAEZC,IAAkB,oBAAI,IAAI,CAAC,KAAK,IAAI,IAAI,EAAE,CAAC,GAC3CC,IAAc,mBACdC,IAAS,yBACTC,IAAO,uBACPC,IAAc,cAEdC,IAAe,CAACC,MAASA,MAAS,QAAQA,IAAO;AACvD,aAASC,EAAoBC,GAASC,GAAIC,GAAK;AAC3C,aAAOC;AAIP,eAASA,EAAML,GAAM;AACjB,eAAAE,EAAQ,MAAMP,CAAW,GACzBO,EAAQ,MAAMN,CAAM,GACpBM,EAAQ,QAAQF,CAAI,GACbM;AAAA,MACf;AACI,eAASA,EAAKN,GAAM;AAChB,eAAIA,MAASV,IACFc,EAAIJ,CAAI,KAEnBE,EAAQ,QAAQF,CAAI,GACpBE,EAAQ,KAAKN,CAAM,GACZW;AAAA,MACf;AAEI,eAASA,EAAcP,GAAM;AACzB,eAAIA,MAAS,OACFI,EAAIJ,CAAI,IAEfA,MAAST,IACFiB,EAAM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;AAAA,UACH,CAACU,CAAW,EAAEmB,GAAO;AACjB,iBAAK,MAAM,EAAE,MAAM7B,EAAQ,kBAAkB,OAAO,GAAE,GAAI6B,CAAK;AAAA,UAC/E;AAAA;QAEQ,MAAM;AAAA,UACF,CAACnB,CAAW,EAAEmB,GAAO;AACjB,kBAAMC,IAAO,KAAK,MAAM,KAAK,MAAM,SAAS,CAAC;AAC7C,YAAAA,EAAK,QAAQ,KAAK,eAAeD,CAAK,GACtC,KAAK,KAAKA,CAAK;AAAA,UAC/B;AAAA;;IAGA;AAEA,UAAME,IAAc,CAACC,OAAW,OAAOA,KAAU,YAAY,OAAOA,KAAU,eAC1EA,MAAU,QACV,OAAOA,EAAM,QAAS;AAQ1B,aAAS7B,EAA0B8B,GAAM;AACrC,UAAI,CAACF,EAAYE,CAAI;AACjB;AAEJ,YAAMC,IAAOD,EAAK,KAAI,GAChBE,IAAM,CAACC,GAAOJ,MAAU;AAC1B,cAAMK,IAAOH,EAAKE,CAAK,KAAK,CAAA;AAC5B,QAAKC,EAAK,SAASL,CAAK,KACpBK,EAAK,KAAKL,CAAK,GAEnBE,EAAKE,CAAK,IAAIC;AAAA,MACtB;AACI,MAAAF,EAAI,uBAAuBG,CAAM,GACjCH,EAAI,0BAA0BI,CAAa;AAAA,IAC/C;AAEA,UAAMD,IAASrC,EAAiB,GAC1BsC,IAAgBrC,EAAuB;AAAA;;","x_google_ignoreList":[0]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../_virtual/remark-custom-variable.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../_virtual/remark-custom-variable.cjs"),o=require("./interaction-plugin-core.cjs"),u=require("./interaction-syntax.cjs");var r;function s(){if(r)return e.__exports;r=1,Object.defineProperty(e.__exports,"__esModule",{value:!0}),e.__exports.default=n;const t=o.__require(),i=u.__require();function n(){return(0,i.registerInteractionSyntax)(this),a=>{(0,t.transformInteractionsInTree)(a,"variable interaction")}}return e.__exports}exports.__require=s;
|
|
2
2
|
//# sourceMappingURL=remark-custom-variable.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remark-custom-variable.cjs","sources":["../../../../node_modules/remark-flow/dist/remark-custom-variable.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = remarkCustomVariable;\nconst interaction_plugin_core_1 = require(\"./interaction-plugin-core\");\nfunction remarkCustomVariable() {\n return (tree) => {\n (0, interaction_plugin_core_1.transformInteractionsInTree)(tree, 'variable interaction');\n };\n}\n//# sourceMappingURL=remark-custom-variable.js.map"],"names":["remarkCustomVariable_1","remarkCustomVariable","interaction_plugin_core_1","require$$0","tree"],"mappings":"
|
|
1
|
+
{"version":3,"file":"remark-custom-variable.cjs","sources":["../../../../node_modules/remark-flow/dist/remark-custom-variable.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = remarkCustomVariable;\nconst interaction_plugin_core_1 = require(\"./interaction-plugin-core\");\nconst interaction_syntax_1 = require(\"./interaction-syntax\");\nfunction remarkCustomVariable() {\n (0, interaction_syntax_1.registerInteractionSyntax)(this);\n return (tree) => {\n (0, interaction_plugin_core_1.transformInteractionsInTree)(tree, 'variable interaction');\n };\n}\n//# sourceMappingURL=remark-custom-variable.js.map"],"names":["remarkCustomVariable_1","remarkCustomVariable","interaction_plugin_core_1","require$$0","interaction_syntax_1","require$$1","tree"],"mappings":"gRACA,OAAO,eAAeA,EAAAA,UAAS,aAAc,CAAE,MAAO,GAAM,EAC5DA,EAAAA,UAAA,QAAkBC,EAClB,MAAMC,EAA4BC,EAAAA,UAAA,EAC5BC,EAAuBC,EAAAA,UAAA,EAC7B,SAASJ,GAAuB,CAC5B,SAAIG,EAAqB,2BAA2B,IAAI,EAChDE,GAAS,IACTJ,EAA0B,6BAA6BI,EAAM,sBAAsB,CAC/F,CACA","x_google_ignoreList":[0]}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { __exports as r } from "../../../_virtual/remark-custom-variable.es.js";
|
|
2
2
|
import { __require as o } from "./interaction-plugin-core.es.js";
|
|
3
|
+
import { __require as u } from "./interaction-syntax.es.js";
|
|
3
4
|
var e;
|
|
4
|
-
function
|
|
5
|
+
function c() {
|
|
5
6
|
if (e) return r;
|
|
6
|
-
e = 1, Object.defineProperty(r, "__esModule", { value: !0 }), r.default =
|
|
7
|
-
const t = o();
|
|
8
|
-
function
|
|
9
|
-
return (
|
|
10
|
-
(0, t.transformInteractionsInTree)(
|
|
7
|
+
e = 1, Object.defineProperty(r, "__esModule", { value: !0 }), r.default = i;
|
|
8
|
+
const t = o(), a = u();
|
|
9
|
+
function i() {
|
|
10
|
+
return (0, a.registerInteractionSyntax)(this), (n) => {
|
|
11
|
+
(0, t.transformInteractionsInTree)(n, "variable interaction");
|
|
11
12
|
};
|
|
12
13
|
}
|
|
13
14
|
return r;
|
|
14
15
|
}
|
|
15
16
|
export {
|
|
16
|
-
|
|
17
|
+
c as __require
|
|
17
18
|
};
|
|
18
19
|
//# sourceMappingURL=remark-custom-variable.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remark-custom-variable.es.js","sources":["../../../../node_modules/remark-flow/dist/remark-custom-variable.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = remarkCustomVariable;\nconst interaction_plugin_core_1 = require(\"./interaction-plugin-core\");\nfunction remarkCustomVariable() {\n return (tree) => {\n (0, interaction_plugin_core_1.transformInteractionsInTree)(tree, 'variable interaction');\n };\n}\n//# sourceMappingURL=remark-custom-variable.js.map"],"names":["remarkCustomVariable_1","remarkCustomVariable","interaction_plugin_core_1","require$$0","tree"],"mappings":"
|
|
1
|
+
{"version":3,"file":"remark-custom-variable.es.js","sources":["../../../../node_modules/remark-flow/dist/remark-custom-variable.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = remarkCustomVariable;\nconst interaction_plugin_core_1 = require(\"./interaction-plugin-core\");\nconst interaction_syntax_1 = require(\"./interaction-syntax\");\nfunction remarkCustomVariable() {\n (0, interaction_syntax_1.registerInteractionSyntax)(this);\n return (tree) => {\n (0, interaction_plugin_core_1.transformInteractionsInTree)(tree, 'variable interaction');\n };\n}\n//# sourceMappingURL=remark-custom-variable.js.map"],"names":["remarkCustomVariable_1","remarkCustomVariable","interaction_plugin_core_1","require$$0","interaction_syntax_1","require$$1","tree"],"mappings":";;;;;;SACA,OAAO,eAAeA,GAAS,cAAc,EAAE,OAAO,IAAM,GAC5DA,EAAA,UAAkBC;AAClB,QAAMC,IAA4BC,EAAA,GAC5BC,IAAuBC,EAAA;AAC7B,WAASJ,IAAuB;AAC5B,eAAIG,EAAqB,2BAA2B,IAAI,GACjD,CAACE,MAAS;AACb,UAAIJ,EAA0B,6BAA6BI,GAAM,sBAAsB;AAAA,IAC/F;AAAA,EACA;;;","x_google_ignoreList":[0]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../_virtual/remark-flow.cjs"),u=require("./interaction-plugin-core.cjs"),a=require("./interaction-syntax.cjs");var r;function _(){if(r)return e.__exports;r=1,Object.defineProperty(e.__exports,"__esModule",{value:!0}),e.__exports.default=i;const t=u.__require(),n=a.__require();function i(){return(0,n.registerInteractionSyntax)(this),o=>{(0,t.transformInteractionsInTree)(o,"interaction")}}return e.__exports}exports.__require=_;
|
|
2
2
|
//# sourceMappingURL=remark-flow.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remark-flow.cjs","sources":["../../../../node_modules/remark-flow/dist/remark-flow.js"],"sourcesContent":["\"use strict\";\
|
|
1
|
+
{"version":3,"file":"remark-flow.cjs","sources":["../../../../node_modules/remark-flow/dist/remark-flow.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = remarkFlow;\nconst interaction_plugin_core_1 = require(\"./interaction-plugin-core\");\nconst interaction_syntax_1 = require(\"./interaction-syntax\");\n/**\n * remarkFlow plugin - uses unified interaction parser\n */\nfunction remarkFlow() {\n // The tokenizer has to be in place before the Markdown is parsed, not after, so it is\n // registered here, where the processor is.\n (0, interaction_syntax_1.registerInteractionSyntax)(this);\n return (tree) => {\n (0, interaction_plugin_core_1.transformInteractionsInTree)(tree, 'interaction');\n };\n}\n//# sourceMappingURL=remark-flow.js.map"],"names":["remarkFlow_1","remarkFlow","interaction_plugin_core_1","require$$0","interaction_syntax_1","require$$1","tree"],"mappings":"qQACA,OAAO,eAAeA,EAAAA,UAAS,aAAc,CAAE,MAAO,GAAM,EAC5DA,EAAAA,UAAA,QAAkBC,EAClB,MAAMC,EAA4BC,EAAAA,UAAA,EAC5BC,EAAuBC,EAAAA,UAAA,EAI7B,SAASJ,GAAa,CAGlB,SAAIG,EAAqB,2BAA2B,IAAI,EAChDE,GAAS,IACTJ,EAA0B,6BAA6BI,EAAM,aAAa,CACtF,CACA","x_google_ignoreList":[0]}
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
import { __exports as
|
|
2
|
-
import { __require as a } from "./
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
function u() {
|
|
13
|
-
return (r) => {
|
|
14
|
-
(0, n.default)()(r);
|
|
1
|
+
import { __exports as r } from "../../../_virtual/remark-flow.es.js";
|
|
2
|
+
import { __require as a } from "./interaction-plugin-core.es.js";
|
|
3
|
+
import { __require as u } from "./interaction-syntax.es.js";
|
|
4
|
+
var e;
|
|
5
|
+
function m() {
|
|
6
|
+
if (e) return r;
|
|
7
|
+
e = 1, Object.defineProperty(r, "__esModule", { value: !0 }), r.default = i;
|
|
8
|
+
const t = a(), n = u();
|
|
9
|
+
function i() {
|
|
10
|
+
return (0, n.registerInteractionSyntax)(this), (o) => {
|
|
11
|
+
(0, t.transformInteractionsInTree)(o, "interaction");
|
|
15
12
|
};
|
|
16
13
|
}
|
|
17
|
-
return
|
|
14
|
+
return r;
|
|
18
15
|
}
|
|
19
16
|
export {
|
|
20
|
-
|
|
17
|
+
m as __require
|
|
21
18
|
};
|
|
22
19
|
//# sourceMappingURL=remark-flow.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remark-flow.es.js","sources":["../../../../node_modules/remark-flow/dist/remark-flow.js"],"sourcesContent":["\"use strict\";\
|
|
1
|
+
{"version":3,"file":"remark-flow.es.js","sources":["../../../../node_modules/remark-flow/dist/remark-flow.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = remarkFlow;\nconst interaction_plugin_core_1 = require(\"./interaction-plugin-core\");\nconst interaction_syntax_1 = require(\"./interaction-syntax\");\n/**\n * remarkFlow plugin - uses unified interaction parser\n */\nfunction remarkFlow() {\n // The tokenizer has to be in place before the Markdown is parsed, not after, so it is\n // registered here, where the processor is.\n (0, interaction_syntax_1.registerInteractionSyntax)(this);\n return (tree) => {\n (0, interaction_plugin_core_1.transformInteractionsInTree)(tree, 'interaction');\n };\n}\n//# sourceMappingURL=remark-flow.js.map"],"names":["remarkFlow_1","remarkFlow","interaction_plugin_core_1","require$$0","interaction_syntax_1","require$$1","tree"],"mappings":";;;;;;SACA,OAAO,eAAeA,GAAS,cAAc,EAAE,OAAO,IAAM,GAC5DA,EAAA,UAAkBC;AAClB,QAAMC,IAA4BC,EAAA,GAC5BC,IAAuBC,EAAA;AAI7B,WAASJ,IAAa;AAGlB,eAAIG,EAAqB,2BAA2B,IAAI,GACjD,CAACE,MAAS;AACb,UAAIJ,EAA0B,6BAA6BI,GAAM,aAAa;AAAA,IACtF;AAAA,EACA;;;","x_google_ignoreList":[0]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../_virtual/remark-interaction.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../_virtual/remark-interaction.cjs"),a=require("./interaction-plugin-core.cjs"),c=require("./interaction-syntax.cjs");var r;function u(){if(r)return e.__exports;r=1,Object.defineProperty(e.__exports,"__esModule",{value:!0}),e.__exports.default=i;const t=a.__require(),n=c.__require();function i(){return(0,n.registerInteractionSyntax)(this),o=>{(0,t.transformInteractionsInTree)(o,"interaction")}}return e.__exports}exports.__require=u;
|
|
2
2
|
//# sourceMappingURL=remark-interaction.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remark-interaction.cjs","sources":["../../../../node_modules/remark-flow/dist/remark-interaction.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = remarkInteraction;\nconst interaction_plugin_core_1 = require(\"./interaction-plugin-core\");\nfunction remarkInteraction() {\n return (tree) => {\n (0, interaction_plugin_core_1.transformInteractionsInTree)(tree, 'interaction');\n };\n}\n//# sourceMappingURL=remark-interaction.js.map"],"names":["remarkInteraction_1","remarkInteraction","interaction_plugin_core_1","require$$0","tree"],"mappings":"
|
|
1
|
+
{"version":3,"file":"remark-interaction.cjs","sources":["../../../../node_modules/remark-flow/dist/remark-interaction.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = remarkInteraction;\nconst interaction_plugin_core_1 = require(\"./interaction-plugin-core\");\nconst interaction_syntax_1 = require(\"./interaction-syntax\");\nfunction remarkInteraction() {\n (0, interaction_syntax_1.registerInteractionSyntax)(this);\n return (tree) => {\n (0, interaction_plugin_core_1.transformInteractionsInTree)(tree, 'interaction');\n };\n}\n//# sourceMappingURL=remark-interaction.js.map"],"names":["remarkInteraction_1","remarkInteraction","interaction_plugin_core_1","require$$0","interaction_syntax_1","require$$1","tree"],"mappings":"4QACA,OAAO,eAAeA,EAAAA,UAAS,aAAc,CAAE,MAAO,GAAM,EAC5DA,EAAAA,UAAA,QAAkBC,EAClB,MAAMC,EAA4BC,EAAAA,UAAA,EAC5BC,EAAuBC,EAAAA,UAAA,EAC7B,SAASJ,GAAoB,CACzB,SAAIG,EAAqB,2BAA2B,IAAI,EAChDE,GAAS,IACTJ,EAA0B,6BAA6BI,EAAM,aAAa,CACtF,CACA","x_google_ignoreList":[0]}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { __exports as r } from "../../../_virtual/remark-interaction.es.js";
|
|
2
|
-
import { __require as
|
|
2
|
+
import { __require as a } from "./interaction-plugin-core.es.js";
|
|
3
|
+
import { __require as u } from "./interaction-syntax.es.js";
|
|
3
4
|
var e;
|
|
4
|
-
function
|
|
5
|
+
function m() {
|
|
5
6
|
if (e) return r;
|
|
6
|
-
e = 1, Object.defineProperty(r, "__esModule", { value: !0 }), r.default =
|
|
7
|
-
const t =
|
|
8
|
-
function
|
|
9
|
-
return (
|
|
10
|
-
(0, t.transformInteractionsInTree)(
|
|
7
|
+
e = 1, Object.defineProperty(r, "__esModule", { value: !0 }), r.default = i;
|
|
8
|
+
const t = a(), n = u();
|
|
9
|
+
function i() {
|
|
10
|
+
return (0, n.registerInteractionSyntax)(this), (o) => {
|
|
11
|
+
(0, t.transformInteractionsInTree)(o, "interaction");
|
|
11
12
|
};
|
|
12
13
|
}
|
|
13
14
|
return r;
|
|
14
15
|
}
|
|
15
16
|
export {
|
|
16
|
-
|
|
17
|
+
m as __require
|
|
17
18
|
};
|
|
18
19
|
//# sourceMappingURL=remark-interaction.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remark-interaction.es.js","sources":["../../../../node_modules/remark-flow/dist/remark-interaction.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = remarkInteraction;\nconst interaction_plugin_core_1 = require(\"./interaction-plugin-core\");\nfunction remarkInteraction() {\n return (tree) => {\n (0, interaction_plugin_core_1.transformInteractionsInTree)(tree, 'interaction');\n };\n}\n//# sourceMappingURL=remark-interaction.js.map"],"names":["remarkInteraction_1","remarkInteraction","interaction_plugin_core_1","require$$0","tree"],"mappings":"
|
|
1
|
+
{"version":3,"file":"remark-interaction.es.js","sources":["../../../../node_modules/remark-flow/dist/remark-interaction.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = remarkInteraction;\nconst interaction_plugin_core_1 = require(\"./interaction-plugin-core\");\nconst interaction_syntax_1 = require(\"./interaction-syntax\");\nfunction remarkInteraction() {\n (0, interaction_syntax_1.registerInteractionSyntax)(this);\n return (tree) => {\n (0, interaction_plugin_core_1.transformInteractionsInTree)(tree, 'interaction');\n };\n}\n//# sourceMappingURL=remark-interaction.js.map"],"names":["remarkInteraction_1","remarkInteraction","interaction_plugin_core_1","require$$0","interaction_syntax_1","require$$1","tree"],"mappings":";;;;;;SACA,OAAO,eAAeA,GAAS,cAAc,EAAE,OAAO,IAAM,GAC5DA,EAAA,UAAkBC;AAClB,QAAMC,IAA4BC,EAAA,GAC5BC,IAAuBC,EAAA;AAC7B,WAASJ,IAAoB;AACzB,eAAIG,EAAqB,2BAA2B,IAAI,GACjD,CAACE,MAAS;AACb,UAAIJ,EAA0B,6BAA6BI,GAAM,aAAa;AAAA,IACtF;AAAA,EACA;;;","x_google_ignoreList":[0]}
|
package/package.json
CHANGED
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"rehype-katex": "^7.0.1",
|
|
39
39
|
"rehype-raw": "^7.0.0",
|
|
40
40
|
"remark-breaks": "^4.0.0",
|
|
41
|
-
"remark-flow": "^1.3.
|
|
41
|
+
"remark-flow": "^1.3.4",
|
|
42
42
|
"remark-gfm": "^4.0.1",
|
|
43
43
|
"remark-math": "^6.0.0",
|
|
44
44
|
"tailwind-merge": "^3.3.1",
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
]
|
|
183
183
|
}
|
|
184
184
|
},
|
|
185
|
-
"version": "0.2.
|
|
185
|
+
"version": "0.2.29",
|
|
186
186
|
"type": "module",
|
|
187
187
|
"exports": {
|
|
188
188
|
".": {
|