quoin-editor 1.0.2 → 1.1.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.
- package/CHANGELOG.md +18 -0
- package/dist/ai.cjs +168 -249
- package/dist/ai.cjs.map +1 -1
- package/dist/ai.js +37 -121
- package/dist/ai.js.map +1 -1
- package/dist/catalogue.cjs +28 -43
- package/dist/catalogue.cjs.map +1 -1
- package/dist/catalogue.js +20 -37
- package/dist/catalogue.js.map +1 -1
- package/dist/{chunk-DUE3HCZD.js → chunk-2EQ6FKSK.js} +19 -28
- package/dist/chunk-2EQ6FKSK.js.map +1 -0
- package/dist/{chunk-RJRX34BZ.js → chunk-3BXUGX5F.js} +4 -18
- package/dist/chunk-3BXUGX5F.js.map +1 -0
- package/dist/chunk-3QRVAI53.cjs +27 -0
- package/dist/chunk-3QRVAI53.cjs.map +1 -0
- package/dist/{chunk-U3LOLYAU.js → chunk-7FAVFJAS.js} +4 -10
- package/dist/chunk-7FAVFJAS.js.map +1 -0
- package/dist/{chunk-6V6GGBDK.cjs → chunk-7SVKLWDT.cjs} +24 -31
- package/dist/chunk-7SVKLWDT.cjs.map +1 -0
- package/dist/{chunk-EH5KXQXY.cjs → chunk-A6PGQVTR.cjs} +36 -20
- package/dist/chunk-A6PGQVTR.cjs.map +1 -0
- package/dist/{chunk-P6KYXFZC.cjs → chunk-ACSEYJJF.cjs} +426 -534
- package/dist/chunk-ACSEYJJF.cjs.map +1 -0
- package/dist/{chunk-4SLJNZSM.cjs → chunk-AIS37SL2.cjs} +201 -198
- package/dist/chunk-AIS37SL2.cjs.map +1 -0
- package/dist/{chunk-X4HDKFW5.cjs → chunk-DTQFYHDJ.cjs} +56 -105
- package/dist/chunk-DTQFYHDJ.cjs.map +1 -0
- package/dist/{chunk-O4Z2WMFF.js → chunk-HDJ653LM.js} +25 -18
- package/dist/chunk-HDJ653LM.js.map +1 -0
- package/dist/chunk-HQ43EIYO.cjs +94 -0
- package/dist/chunk-HQ43EIYO.cjs.map +1 -0
- package/dist/{chunk-6NULZPVC.js → chunk-HTLWPSMU.js} +8 -61
- package/dist/chunk-HTLWPSMU.js.map +1 -0
- package/dist/{chunk-ADSJ42DO.js → chunk-HWEK7EX5.js} +17 -69
- package/dist/chunk-HWEK7EX5.js.map +1 -0
- package/dist/{chunk-623AOJM2.js → chunk-ITXCE6KL.js} +7 -25
- package/dist/chunk-ITXCE6KL.js.map +1 -0
- package/dist/{chunk-AUOEM3SF.cjs → chunk-IXVGHH7F.cjs} +102 -155
- package/dist/chunk-IXVGHH7F.cjs.map +1 -0
- package/dist/{chunk-NEZJ7ZP5.js → chunk-JZJIWRF3.js} +4 -8
- package/dist/chunk-JZJIWRF3.js.map +1 -0
- package/dist/{chunk-C23RQVRK.js → chunk-KSF2HILJ.js} +66 -216
- package/dist/chunk-KSF2HILJ.js.map +1 -0
- package/dist/{chunk-OBMBSU2S.js → chunk-L4D23LM2.js} +5 -184
- package/dist/chunk-L4D23LM2.js.map +1 -0
- package/dist/{chunk-4XFXB37X.js → chunk-L6OW2FL3.js} +7 -90
- package/dist/chunk-L6OW2FL3.js.map +1 -0
- package/dist/chunk-LE5XMIFJ.cjs +4 -3
- package/dist/chunk-LE5XMIFJ.cjs.map +1 -1
- package/dist/{chunk-5MAYUGTE.cjs → chunk-LY2D45F2.cjs} +233 -363
- package/dist/chunk-LY2D45F2.cjs.map +1 -0
- package/dist/{chunk-VCLL5C7J.js → chunk-MGMA5PEL.js} +14 -57
- package/dist/chunk-MGMA5PEL.js.map +1 -0
- package/dist/chunk-MQUCCSWG.js +2 -3
- package/dist/chunk-MQUCCSWG.js.map +1 -1
- package/dist/chunk-NO3KTZDY.cjs +33 -0
- package/dist/chunk-NO3KTZDY.cjs.map +1 -0
- package/dist/{chunk-TLGX43P6.cjs → chunk-OM7E43ZN.cjs} +89 -86
- package/dist/chunk-OM7E43ZN.cjs.map +1 -0
- package/dist/{chunk-JHQUHFLX.js → chunk-PJCHSHM3.js} +38 -120
- package/dist/chunk-PJCHSHM3.js.map +1 -0
- package/dist/{chunk-EPARJI4V.js → chunk-QC35D2AU.js} +107 -262
- package/dist/chunk-QC35D2AU.js.map +1 -0
- package/dist/{chunk-CW3AFJBR.cjs → chunk-QEMGOL5L.cjs} +1302 -1773
- package/dist/chunk-QEMGOL5L.cjs.map +1 -0
- package/dist/chunk-QWS7KH3K.cjs +483 -0
- package/dist/chunk-QWS7KH3K.cjs.map +1 -0
- package/dist/{chunk-IQBMAE3F.js → chunk-RHQPAW4W.js} +34 -92
- package/dist/chunk-RHQPAW4W.js.map +1 -0
- package/dist/chunk-RIIXJWBR.cjs +24 -0
- package/dist/chunk-RIIXJWBR.cjs.map +1 -0
- package/dist/{chunk-VRS6WCEK.js → chunk-SAEQMDAU.js} +60 -167
- package/dist/chunk-SAEQMDAU.js.map +1 -0
- package/dist/chunk-SKZC4K5S.cjs +612 -0
- package/dist/chunk-SKZC4K5S.cjs.map +1 -0
- package/dist/{chunk-N4FGA3H4.js → chunk-TBCHYHNU.js} +38 -105
- package/dist/chunk-TBCHYHNU.js.map +1 -0
- package/dist/{chunk-OSHZQR3W.js → chunk-TNN6Z52D.js} +13 -45
- package/dist/chunk-TNN6Z52D.js.map +1 -0
- package/dist/{chunk-YBMUEEM5.js → chunk-TYZSB7JT.js} +4 -8
- package/dist/chunk-TYZSB7JT.js.map +1 -0
- package/dist/{chunk-ZKVOS57Q.cjs → chunk-VFSVN5IQ.cjs} +495 -551
- package/dist/chunk-VFSVN5IQ.cjs.map +1 -0
- package/dist/{chunk-FDRUAL3Z.cjs → chunk-WDO6DBYU.cjs} +90 -153
- package/dist/chunk-WDO6DBYU.cjs.map +1 -0
- package/dist/{chunk-WEYDDIBQ.cjs → chunk-WHV5ZSIO.cjs} +36 -64
- package/dist/chunk-WHV5ZSIO.cjs.map +1 -0
- package/dist/{chunk-T43RZTUT.js → chunk-XJDPQFPU.js} +693 -1247
- package/dist/chunk-XJDPQFPU.js.map +1 -0
- package/dist/{chunk-BQANU5BH.cjs → chunk-ZTLYHRZT.cjs} +34 -44
- package/dist/chunk-ZTLYHRZT.cjs.map +1 -0
- package/dist/chunk-ZWB7SZVI.cjs +200 -0
- package/dist/chunk-ZWB7SZVI.cjs.map +1 -0
- package/dist/comments.cjs +209 -290
- package/dist/comments.cjs.map +1 -1
- package/dist/comments.js +81 -186
- package/dist/comments.js.map +1 -1
- package/dist/diff.cjs +48 -65
- package/dist/diff.cjs.map +1 -1
- package/dist/diff.d.cts +2 -2
- package/dist/diff.d.ts +2 -2
- package/dist/diff.js +8 -32
- package/dist/diff.js.map +1 -1
- package/dist/docx.cjs +50 -63
- package/dist/docx.cjs.map +1 -1
- package/dist/docx.js +7 -22
- package/dist/docx.js.map +1 -1
- package/dist/embed.cjs +18 -12
- package/dist/embed.cjs.map +1 -1
- package/dist/embed.js +9 -16
- package/dist/embed.js.map +1 -1
- package/dist/emoji-data.cjs +7 -5
- package/dist/emoji-data.cjs.map +1 -1
- package/dist/emoji-data.js +3 -5
- package/dist/emoji-data.js.map +1 -1
- package/dist/emoji.cjs +25 -17
- package/dist/emoji.cjs.map +1 -1
- package/dist/emoji.js +8 -17
- package/dist/emoji.js.map +1 -1
- package/dist/engine.cjs +229 -118
- package/dist/engine.cjs.map +1 -1
- package/dist/engine.js +4 -118
- package/dist/engine.js.map +1 -1
- package/dist/find.cjs +29 -19
- package/dist/find.cjs.map +1 -1
- package/dist/find.js +8 -19
- package/dist/find.js.map +1 -1
- package/dist/headless.cjs +290 -151
- package/dist/headless.cjs.map +1 -1
- package/dist/headless.d.cts +5 -1
- package/dist/headless.d.ts +5 -1
- package/dist/headless.js +5 -151
- package/dist/headless.js.map +1 -1
- package/dist/index.cjs +348 -183
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -4
- package/dist/index.d.ts +14 -4
- package/dist/index.js +7 -183
- package/dist/index.js.map +1 -1
- package/dist/math.cjs +19 -13
- package/dist/math.cjs.map +1 -1
- package/dist/math.js +10 -17
- package/dist/math.js.map +1 -1
- package/dist/mention.cjs +19 -13
- package/dist/mention.cjs.map +1 -1
- package/dist/mention.js +10 -17
- package/dist/mention.js.map +1 -1
- package/dist/presence.cjs +98 -132
- package/dist/presence.cjs.map +1 -1
- package/dist/presence.js +21 -78
- package/dist/presence.js.map +1 -1
- package/dist/{registry-CWBOSAHm.d.ts → registry-CXegaw5k.d.cts} +25 -2
- package/dist/{registry-CWBOSAHm.d.cts → registry-CXegaw5k.d.ts} +25 -2
- package/dist/stats.cjs +26 -18
- package/dist/stats.cjs.map +1 -1
- package/dist/stats.js +9 -18
- package/dist/stats.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/table.cjs +89 -49
- package/dist/table.cjs.map +1 -1
- package/dist/table.js +8 -49
- package/dist/table.js.map +1 -1
- package/dist/toc.cjs +25 -17
- package/dist/toc.cjs.map +1 -1
- package/dist/toc.js +8 -17
- package/dist/toc.js.map +1 -1
- package/dist/view.cjs +13 -16
- package/dist/view.cjs.map +1 -1
- package/dist/view.d.cts +2 -2
- package/dist/view.d.ts +2 -2
- package/dist/view.js +7 -16
- package/dist/view.js.map +1 -1
- package/dist/yjs.cjs +186 -228
- package/dist/yjs.cjs.map +1 -1
- package/dist/yjs.js +12 -80
- package/dist/yjs.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-4SLJNZSM.cjs.map +0 -1
- package/dist/chunk-4XFXB37X.js.map +0 -1
- package/dist/chunk-5MAYUGTE.cjs.map +0 -1
- package/dist/chunk-623AOJM2.js.map +0 -1
- package/dist/chunk-6NULZPVC.js.map +0 -1
- package/dist/chunk-6V6GGBDK.cjs.map +0 -1
- package/dist/chunk-73653CJ4.cjs +0 -34
- package/dist/chunk-73653CJ4.cjs.map +0 -1
- package/dist/chunk-ADSJ42DO.js.map +0 -1
- package/dist/chunk-AUOEM3SF.cjs.map +0 -1
- package/dist/chunk-BQANU5BH.cjs.map +0 -1
- package/dist/chunk-C23RQVRK.js.map +0 -1
- package/dist/chunk-CW3AFJBR.cjs.map +0 -1
- package/dist/chunk-DUE3HCZD.js.map +0 -1
- package/dist/chunk-EH5KXQXY.cjs.map +0 -1
- package/dist/chunk-EPARJI4V.js.map +0 -1
- package/dist/chunk-FDRUAL3Z.cjs.map +0 -1
- package/dist/chunk-IQBMAE3F.js.map +0 -1
- package/dist/chunk-JHQUHFLX.js.map +0 -1
- package/dist/chunk-KUYZMSMF.cjs +0 -100
- package/dist/chunk-KUYZMSMF.cjs.map +0 -1
- package/dist/chunk-LLTEGXWZ.cjs +0 -562
- package/dist/chunk-LLTEGXWZ.cjs.map +0 -1
- package/dist/chunk-N4FGA3H4.js.map +0 -1
- package/dist/chunk-NEZJ7ZP5.js.map +0 -1
- package/dist/chunk-O4Z2WMFF.js.map +0 -1
- package/dist/chunk-OBMBSU2S.js.map +0 -1
- package/dist/chunk-OSHZQR3W.js.map +0 -1
- package/dist/chunk-P6KYXFZC.cjs.map +0 -1
- package/dist/chunk-R2BLBV43.cjs +0 -239
- package/dist/chunk-R2BLBV43.cjs.map +0 -1
- package/dist/chunk-RJRX34BZ.js.map +0 -1
- package/dist/chunk-T43RZTUT.js.map +0 -1
- package/dist/chunk-TLGX43P6.cjs.map +0 -1
- package/dist/chunk-U3LOLYAU.js.map +0 -1
- package/dist/chunk-UEKXVCKC.cjs +0 -716
- package/dist/chunk-UEKXVCKC.cjs.map +0 -1
- package/dist/chunk-VCLL5C7J.js.map +0 -1
- package/dist/chunk-VRS6WCEK.js.map +0 -1
- package/dist/chunk-WEYDDIBQ.cjs.map +0 -1
- package/dist/chunk-X4HDKFW5.cjs.map +0 -1
- package/dist/chunk-X4P4TQXH.cjs +0 -30
- package/dist/chunk-X4P4TQXH.cjs.map +0 -1
- package/dist/chunk-XA3UEJIW.cjs +0 -25
- package/dist/chunk-XA3UEJIW.cjs.map +0 -1
- package/dist/chunk-YBMUEEM5.js.map +0 -1
- package/dist/chunk-ZKVOS57Q.cjs.map +0 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/engine/model/attrs.ts
|
|
2
4
|
function sameAttrs(a, b) {
|
|
3
|
-
const left =
|
|
4
|
-
const right =
|
|
5
|
+
const left = a ?? {};
|
|
6
|
+
const right = b ?? {};
|
|
5
7
|
const keys = Object.keys(left);
|
|
6
8
|
return keys.length === Object.keys(right).length && keys.every((k) => left[k] === right[k]);
|
|
7
9
|
}
|
|
@@ -62,7 +64,7 @@ function markRank(type) {
|
|
|
62
64
|
return isCoreMark(type) ? RANK[type] : CUSTOM_RANK;
|
|
63
65
|
}
|
|
64
66
|
function markKey(mark) {
|
|
65
|
-
return STACKABLE.has(mark.type) ? `${mark.type}:${
|
|
67
|
+
return STACKABLE.has(mark.type) ? `${mark.type}:${mark.attrs?.id ?? ""}` : mark.type;
|
|
66
68
|
}
|
|
67
69
|
function sameMark(a, b) {
|
|
68
70
|
return a.type === b.type && sameAttrs(a.attrs, b.attrs);
|
|
@@ -114,7 +116,7 @@ function normalizeInline(nodes) {
|
|
|
114
116
|
if (node.kind === "text" && node.text === "") continue;
|
|
115
117
|
const sorted = withMarks(node, node.marks);
|
|
116
118
|
const last = result[result.length - 1];
|
|
117
|
-
if (
|
|
119
|
+
if (last?.kind === "text" && sorted.kind === "text" && sameMarkSet(last.marks, sorted.marks)) {
|
|
118
120
|
result[result.length - 1] = text(last.text + sorted.text, last.marks);
|
|
119
121
|
} else {
|
|
120
122
|
result.push(sorted);
|
|
@@ -194,8 +196,8 @@ function isInclusiveMark(mark) {
|
|
|
194
196
|
return mark.type !== "link" && mark.type !== "comment";
|
|
195
197
|
}
|
|
196
198
|
function marksAt(inline, offset, isInclusive = isInclusiveMark) {
|
|
197
|
-
const before =
|
|
198
|
-
const after =
|
|
199
|
+
const before = nodeAt(inline, Math.max(0, offset - 1))?.marks ?? [];
|
|
200
|
+
const after = nodeAt(inline, offset)?.marks ?? [];
|
|
199
201
|
return before.filter((mark) => isInclusive(mark) || hasMark(after, mark));
|
|
200
202
|
}
|
|
201
203
|
function equalNode(a, b) {
|
|
@@ -256,7 +258,7 @@ function withExtra(fields, attrs) {
|
|
|
256
258
|
return { ...withDefined(fields), ...isRecord(extra) ? extra : void 0 };
|
|
257
259
|
}
|
|
258
260
|
function regionOf(block, name) {
|
|
259
|
-
return
|
|
261
|
+
return block.regions[name] ?? [];
|
|
260
262
|
}
|
|
261
263
|
|
|
262
264
|
// src/engine/blocks/bookmark-spec.ts
|
|
@@ -376,7 +378,7 @@ var fileSpec = {
|
|
|
376
378
|
};
|
|
377
379
|
|
|
378
380
|
// src/engine/blocks/image-spec.ts
|
|
379
|
-
var KNOWN6 = ["storageKey", "alt", "caption", "width", "height", "url", "align", "widthPercent"];
|
|
381
|
+
var KNOWN6 = ["storageKey", "alt", "caption", "width", "height", "url", "align", "widthPercent", "decorative"];
|
|
380
382
|
var imageSpec = {
|
|
381
383
|
type: "IMAGE",
|
|
382
384
|
flow: "structured",
|
|
@@ -389,6 +391,7 @@ var imageSpec = {
|
|
|
389
391
|
url: optionalString(data.url),
|
|
390
392
|
align: alignOrUndefined(data.align),
|
|
391
393
|
widthPercent: optionalNumber(data.widthPercent),
|
|
394
|
+
decorative: data.decorative === true || void 0,
|
|
392
395
|
extra: extraFields(data, KNOWN6)
|
|
393
396
|
}),
|
|
394
397
|
regions: { caption: ctx.inline.parse(str(data.caption)) }
|
|
@@ -402,7 +405,8 @@ var imageSpec = {
|
|
|
402
405
|
height: optionalNumber(block.attrs.height),
|
|
403
406
|
url: optionalString(block.attrs.url),
|
|
404
407
|
align: alignOrUndefined(block.attrs.align),
|
|
405
|
-
widthPercent: optionalNumber(block.attrs.widthPercent)
|
|
408
|
+
widthPercent: optionalNumber(block.attrs.widthPercent),
|
|
409
|
+
decorative: block.attrs.decorative === true || void 0
|
|
406
410
|
},
|
|
407
411
|
block.attrs
|
|
408
412
|
),
|
|
@@ -443,7 +447,7 @@ function parseLine(markdown) {
|
|
|
443
447
|
function linePrefix({ kind, level, checked, start }) {
|
|
444
448
|
switch (kind) {
|
|
445
449
|
case "heading":
|
|
446
|
-
return `${"#".repeat(Math.min(6, Math.max(1,
|
|
450
|
+
return `${"#".repeat(Math.min(6, Math.max(1, level ?? 1)))} `;
|
|
447
451
|
case "bullet":
|
|
448
452
|
return "- ";
|
|
449
453
|
case "ordered":
|
|
@@ -648,10 +652,10 @@ var coreMarkSpecs = CORE_MARKS.map((type) => ({ type, inclusive: !ANCHORED.has(t
|
|
|
648
652
|
var byType = (specs) => new Map(specs.map((spec) => [spec.type, spec]));
|
|
649
653
|
function createSchema(input = {}) {
|
|
650
654
|
return {
|
|
651
|
-
blocks: byType([...coreBlockSpecs, ...
|
|
652
|
-
marks: byType([...coreMarkSpecs, ...
|
|
653
|
-
atoms: byType([...coreAtomSpecs, ...
|
|
654
|
-
defaultTextBlock:
|
|
655
|
+
blocks: byType([...coreBlockSpecs, ...input.blocks ?? []]),
|
|
656
|
+
marks: byType([...coreMarkSpecs, ...input.marks ?? []]),
|
|
657
|
+
atoms: byType([...coreAtomSpecs, ...input.atoms ?? []]),
|
|
658
|
+
defaultTextBlock: input.defaultTextBlock ?? "MARKDOWN"
|
|
655
659
|
};
|
|
656
660
|
}
|
|
657
661
|
|
|
@@ -725,7 +729,7 @@ function processEmphasis(stack, bottom) {
|
|
|
725
729
|
continue;
|
|
726
730
|
}
|
|
727
731
|
const key = `${closer.char}${closer.canOpen}${closer.length % 3}`;
|
|
728
|
-
const floor =
|
|
732
|
+
const floor = floors.get(key) ?? -1;
|
|
729
733
|
let at = openers.length - 1;
|
|
730
734
|
while (at > floor && !canPair(openers[at], closer)) at--;
|
|
731
735
|
if (at > floor) {
|
|
@@ -787,7 +791,7 @@ function fromCodePoint(code) {
|
|
|
787
791
|
function decodeEntity(name) {
|
|
788
792
|
const numeric = NUMERIC.exec(name);
|
|
789
793
|
if (numeric) return fromCodePoint(numeric[1] ? parseInt(numeric[1], 10) : parseInt(numeric[2], 16));
|
|
790
|
-
return
|
|
794
|
+
return NAMED.get(name) ?? null;
|
|
791
795
|
}
|
|
792
796
|
function matchEntity(src, pos) {
|
|
793
797
|
const match = matchAt(ENTITY_AT, src, pos);
|
|
@@ -795,7 +799,7 @@ function matchEntity(src, pos) {
|
|
|
795
799
|
return match && value !== null ? { value, end: pos + match[0].length } : null;
|
|
796
800
|
}
|
|
797
801
|
function decodeEntities(value) {
|
|
798
|
-
return value.replace(ENTITIES, (source, name) =>
|
|
802
|
+
return value.replace(ENTITIES, (source, name) => decodeEntity(name) ?? source);
|
|
799
803
|
}
|
|
800
804
|
|
|
801
805
|
// src/engine/markdown/inline/escapes.ts
|
|
@@ -883,7 +887,7 @@ function parseInlineLinkTail(src, pos) {
|
|
|
883
887
|
const title = p > destination.end ? parseLinkTitle(src, p) : null;
|
|
884
888
|
if (title) p = skipLinkSpace(src, title.end);
|
|
885
889
|
if (src[p] !== ")") return null;
|
|
886
|
-
const value =
|
|
890
|
+
const value = title?.value ? { href: destination.value, title: title.value } : { href: destination.value };
|
|
887
891
|
return { value, end: p + 1 };
|
|
888
892
|
}
|
|
889
893
|
function normalizeLabel(label) {
|
|
@@ -893,7 +897,7 @@ function normalizeLabel(label) {
|
|
|
893
897
|
// src/engine/markdown/inline/scanner.ts
|
|
894
898
|
function normalizeRefs(refs) {
|
|
895
899
|
const result = /* @__PURE__ */ new Map();
|
|
896
|
-
for (const [label, target] of
|
|
900
|
+
for (const [label, target] of refs ?? []) {
|
|
897
901
|
const key = normalizeLabel(label);
|
|
898
902
|
if (key && !result.has(key)) result.set(key, target);
|
|
899
903
|
}
|
|
@@ -916,7 +920,7 @@ function pushText(scanner, value, advance) {
|
|
|
916
920
|
scanner.pos += advance;
|
|
917
921
|
}
|
|
918
922
|
function findClose(scanner, key, from, find) {
|
|
919
|
-
if (from >= (
|
|
923
|
+
if (from >= (scanner.closeMisses.get(key) ?? Infinity)) return -1;
|
|
920
924
|
const close = find(from);
|
|
921
925
|
if (close < 0) scanner.closeMisses.set(key, from);
|
|
922
926
|
return close;
|
|
@@ -927,19 +931,19 @@ var MENTION = "mention:";
|
|
|
927
931
|
function matchReference(scanner, opener, after) {
|
|
928
932
|
if (scanner.refs.size === 0) return null;
|
|
929
933
|
const label = parseLinkLabel(scanner.src, after);
|
|
930
|
-
if (
|
|
934
|
+
if (label?.value) {
|
|
931
935
|
const target2 = scanner.refs.get(normalizeLabel(label.value));
|
|
932
936
|
return target2 ? { value: target2, end: label.end } : null;
|
|
933
937
|
}
|
|
934
938
|
const ownLabel = parseLinkLabel(scanner.src, opener.start - 1);
|
|
935
|
-
if (
|
|
939
|
+
if (ownLabel?.end !== after) return null;
|
|
936
940
|
const target = scanner.refs.get(normalizeLabel(ownLabel.value));
|
|
937
941
|
return target ? { value: target, end: label ? label.end : after } : null;
|
|
938
942
|
}
|
|
939
943
|
function matchLink(scanner, opener) {
|
|
940
944
|
const after = scanner.pos + 1;
|
|
941
945
|
const inline = scanner.src[after] === "(" ? parseInlineLinkTail(scanner.src, after + 1) : null;
|
|
942
|
-
return
|
|
946
|
+
return inline ?? matchReference(scanner, opener, after);
|
|
943
947
|
}
|
|
944
948
|
function plainText(items) {
|
|
945
949
|
let result = "";
|
|
@@ -952,7 +956,7 @@ function plainText(items) {
|
|
|
952
956
|
return result;
|
|
953
957
|
}
|
|
954
958
|
function mentionAtom(href, label) {
|
|
955
|
-
if (!href.startsWith(MENTION) || !
|
|
959
|
+
if (!href.startsWith(MENTION) || !label?.startsWith("@")) return null;
|
|
956
960
|
const reference = href.slice(MENTION.length);
|
|
957
961
|
const colon = reference.indexOf(":");
|
|
958
962
|
const id = reference.slice(colon + 1);
|
|
@@ -983,7 +987,7 @@ function deactivateOpeners(brackets) {
|
|
|
983
987
|
}
|
|
984
988
|
function closeBracket(scanner) {
|
|
985
989
|
const opener = scanner.brackets.pop();
|
|
986
|
-
const target =
|
|
990
|
+
const target = opener?.active && !opener.image ? matchLink(scanner, opener) : null;
|
|
987
991
|
if (!opener || !target) {
|
|
988
992
|
pushText(scanner, "]", 1);
|
|
989
993
|
return;
|
|
@@ -1050,14 +1054,14 @@ function createActiveMarks() {
|
|
|
1050
1054
|
const close = (range) => {
|
|
1051
1055
|
const key = markKey(range.mark);
|
|
1052
1056
|
const stack = stacks.get(key);
|
|
1053
|
-
if (
|
|
1057
|
+
if (stack?.at(-1) !== range) {
|
|
1054
1058
|
closedBelowTop.add(range);
|
|
1055
1059
|
return;
|
|
1056
1060
|
}
|
|
1057
1061
|
stack.pop();
|
|
1058
1062
|
while (stack.length > 0 && closedBelowTop.delete(stack[stack.length - 1])) stack.pop();
|
|
1059
1063
|
const index = indexOfKey(shown, range.mark);
|
|
1060
|
-
const top =
|
|
1064
|
+
const top = stack.at(-1)?.mark;
|
|
1061
1065
|
if (top) {
|
|
1062
1066
|
shown[index] = top;
|
|
1063
1067
|
} else {
|
|
@@ -1137,7 +1141,7 @@ function dollarRunEnd(src, pos) {
|
|
|
1137
1141
|
function findMathClose(src, from) {
|
|
1138
1142
|
for (let p = src.indexOf("$", from); p >= 0; p = src.indexOf("$", p + 1)) {
|
|
1139
1143
|
const before = src[p - 1];
|
|
1140
|
-
if (before !== "\\" && !SPACE.test(before) && !DIGIT.test(
|
|
1144
|
+
if (before !== "\\" && !SPACE.test(before) && !DIGIT.test(src[p + 1] ?? "")) return p;
|
|
1141
1145
|
}
|
|
1142
1146
|
return -1;
|
|
1143
1147
|
}
|
|
@@ -1197,7 +1201,7 @@ function spanTag(attributes) {
|
|
|
1197
1201
|
}
|
|
1198
1202
|
function highlightTag(attributes) {
|
|
1199
1203
|
if ([...attributes.keys()].some((name) => name !== "data-color")) return null;
|
|
1200
|
-
const color =
|
|
1204
|
+
const color = attributes.get("data-color") ?? "";
|
|
1201
1205
|
return { mark: isPaletteColor(color) ? { type: "highlight", attrs: { color } } : { type: "highlight" } };
|
|
1202
1206
|
}
|
|
1203
1207
|
function describeOpenTag(name, attributes, selfClosing) {
|
|
@@ -1227,7 +1231,7 @@ function parseInlineTag(src, pos) {
|
|
|
1227
1231
|
function findSpanClose(src, from) {
|
|
1228
1232
|
for (let at = src.indexOf("<", from); at >= 0; at = src.indexOf("<", at + 1)) {
|
|
1229
1233
|
const parsed = parseInlineTag(src, at);
|
|
1230
|
-
if (
|
|
1234
|
+
if (parsed?.tag.close && parsed.tag.name === "span") return parsed.end;
|
|
1231
1235
|
}
|
|
1232
1236
|
return -1;
|
|
1233
1237
|
}
|
|
@@ -1278,7 +1282,7 @@ function pairTags(items) {
|
|
|
1278
1282
|
if (mark) stackOf(openByName, name).push({ item, mark });
|
|
1279
1283
|
continue;
|
|
1280
1284
|
}
|
|
1281
|
-
const opener =
|
|
1285
|
+
const opener = openByName.get(name)?.pop();
|
|
1282
1286
|
if (!opener) continue;
|
|
1283
1287
|
const range = { mark: opener.mark };
|
|
1284
1288
|
opener.item.range = range;
|
|
@@ -1331,7 +1335,7 @@ function codeSpan(scanner) {
|
|
|
1331
1335
|
scanner.pos = close + fence;
|
|
1332
1336
|
}
|
|
1333
1337
|
function codePointBefore(src, pos) {
|
|
1334
|
-
return
|
|
1338
|
+
return Array.from(src.slice(Math.max(0, pos - 2), pos)).pop() ?? "";
|
|
1335
1339
|
}
|
|
1336
1340
|
function codePointAt(src, pos) {
|
|
1337
1341
|
const code = src.codePointAt(pos);
|
|
@@ -1420,8 +1424,8 @@ var LINE_START_SYNTAX = /* @__PURE__ */ new Set(["#", ">", "=", "+", "-"]);
|
|
|
1420
1424
|
var WHITESPACE_ENTITY = { " ": " ", " ": "	" };
|
|
1421
1425
|
function needsEscape(text2, index) {
|
|
1422
1426
|
const char = text2[index];
|
|
1423
|
-
if (char === "_") return !(WORD_CHAR.test(
|
|
1424
|
-
if (char === "\\") return !LITERAL_AFTER_BACKSLASH.test(
|
|
1427
|
+
if (char === "_") return !(WORD_CHAR.test(text2[index - 1] ?? "") && WORD_CHAR.test(text2[index + 1] ?? ""));
|
|
1428
|
+
if (char === "\\") return !LITERAL_AFTER_BACKSLASH.test(text2[index + 1] ?? "");
|
|
1425
1429
|
return true;
|
|
1426
1430
|
}
|
|
1427
1431
|
function escapeEntityAmpersands(value) {
|
|
@@ -1474,7 +1478,7 @@ function escapeText(text2, ctx) {
|
|
|
1474
1478
|
|
|
1475
1479
|
// src/engine/markdown/inline/data-attributes.ts
|
|
1476
1480
|
function dataAttributes(attrs, prefix = "data-attr-") {
|
|
1477
|
-
return Object.keys(
|
|
1481
|
+
return Object.keys(attrs ?? {}).sort(compareCodeUnits).map((key) => [`${prefix}${key}`, attrs[key]]);
|
|
1478
1482
|
}
|
|
1479
1483
|
|
|
1480
1484
|
// src/engine/render/html-node.ts
|
|
@@ -1504,20 +1508,20 @@ var PLAIN_MARK_TAGS = /* @__PURE__ */ new Map([
|
|
|
1504
1508
|
function markElement(mark) {
|
|
1505
1509
|
const plain = PLAIN_MARK_TAGS.get(mark.type);
|
|
1506
1510
|
if (plain) return element(plain);
|
|
1507
|
-
const attrs =
|
|
1511
|
+
const attrs = mark.attrs ?? {};
|
|
1508
1512
|
switch (mark.type) {
|
|
1509
1513
|
case "link": {
|
|
1510
|
-
const href = sanitizeHref(
|
|
1514
|
+
const href = sanitizeHref(attrs.href ?? "");
|
|
1511
1515
|
return href === null ? null : element("a", [["href", href], ["title", attrs.title], ["rel", "noopener noreferrer"]]);
|
|
1512
1516
|
}
|
|
1513
1517
|
case "comment":
|
|
1514
|
-
return element("span", [["data-comment",
|
|
1518
|
+
return element("span", [["data-comment", attrs.id ?? ""]]);
|
|
1515
1519
|
case "highlight":
|
|
1516
1520
|
return element("mark", [["data-color", attrs.color || void 0]]);
|
|
1517
1521
|
case "color":
|
|
1518
|
-
return element("span", [["data-color",
|
|
1522
|
+
return element("span", [["data-color", attrs.color ?? ""]]);
|
|
1519
1523
|
case "background":
|
|
1520
|
-
return element("span", [["data-bg",
|
|
1524
|
+
return element("span", [["data-bg", attrs.color ?? ""]]);
|
|
1521
1525
|
default:
|
|
1522
1526
|
return element("span", [["data-mark", mark.type], ...dataAttributes(attrs)]);
|
|
1523
1527
|
}
|
|
@@ -1546,25 +1550,25 @@ function escapeFor(value, characters, escapePipes) {
|
|
|
1546
1550
|
}
|
|
1547
1551
|
function readsBackAs(destination, href) {
|
|
1548
1552
|
const parsed = parseLinkDestination(`${destination})`, 0);
|
|
1549
|
-
return
|
|
1553
|
+
return parsed?.value === href && parsed.end === destination.length;
|
|
1550
1554
|
}
|
|
1551
1555
|
function linkDestination(href, escapePipes) {
|
|
1552
1556
|
const raw = escapeFor(href, /\\/g, escapePipes);
|
|
1553
1557
|
return readsBackAs(raw, href) ? raw : `<${escapeFor(href, /[\\<>]/g, escapePipes)}>`;
|
|
1554
1558
|
}
|
|
1555
1559
|
function linkClose(mark, escapePipes) {
|
|
1556
|
-
const href =
|
|
1557
|
-
const title =
|
|
1560
|
+
const href = mark.attrs?.href ?? "";
|
|
1561
|
+
const title = mark.attrs?.title;
|
|
1558
1562
|
if (!title) return `](${linkDestination(href, escapePipes)})`;
|
|
1559
1563
|
const destination = href === "" ? "<>" : linkDestination(href, escapePipes);
|
|
1560
1564
|
return `](${destination} "${escapeFor(title, /[\\"]/g, escapePipes)}")`;
|
|
1561
1565
|
}
|
|
1562
1566
|
function autolinkMarkdown(text2, mark) {
|
|
1563
|
-
if (
|
|
1567
|
+
if (mark.attrs?.title) return null;
|
|
1564
1568
|
const candidate = `<${text2}>`;
|
|
1565
1569
|
const parsed = parseAutolink(candidate, 0);
|
|
1566
|
-
if (
|
|
1567
|
-
return parsed.value.text === text2 && parsed.value.href ===
|
|
1570
|
+
if (parsed?.end !== candidate.length) return null;
|
|
1571
|
+
return parsed.value.text === text2 && parsed.value.href === mark.attrs?.href ? candidate : null;
|
|
1568
1572
|
}
|
|
1569
1573
|
|
|
1570
1574
|
// src/engine/markdown/inline/atom-markdown.ts
|
|
@@ -1599,7 +1603,7 @@ function isPrettyMath(attrs, before, after, options) {
|
|
|
1599
1603
|
if (Object.keys(attrs).length !== 1 || !latex || /[$\n]/.test(latex)) return false;
|
|
1600
1604
|
if (options.escapePipes && latex.includes("|")) return false;
|
|
1601
1605
|
const pricelike = DIGIT2.test(latex[0]) && (before === "" || TRAILING_SPACE.test(before));
|
|
1602
|
-
return !MATH_EDGE_HAZARD.test(latex) && !DIGIT2.test(
|
|
1606
|
+
return !MATH_EDGE_HAZARD.test(latex) && !DIGIT2.test(after[0] ?? "") && !pricelike;
|
|
1603
1607
|
}
|
|
1604
1608
|
function writesMention(node, options) {
|
|
1605
1609
|
if (options.strict || node.type !== "mention" || !hasMentionShape(node.attrs)) return false;
|
|
@@ -1620,7 +1624,7 @@ function atomMarkdown(node, before, after, options) {
|
|
|
1620
1624
|
var BACKTICK_RUN = /`+/g;
|
|
1621
1625
|
var NEEDS_PADDING = /^[ `]|[ `]$/;
|
|
1622
1626
|
function codeSpan2(content) {
|
|
1623
|
-
const lengths = new Set((
|
|
1627
|
+
const lengths = new Set((content.match(BACKTICK_RUN) ?? []).map((run) => run.length));
|
|
1624
1628
|
let fence = 1;
|
|
1625
1629
|
while (lengths.has(fence)) fence++;
|
|
1626
1630
|
const padding = NEEDS_PADDING.test(content) && /[^ ]/.test(content) ? " " : "";
|
|
@@ -1648,7 +1652,7 @@ function codeSpanOf(range, options) {
|
|
|
1648
1652
|
return codeSpan2(content);
|
|
1649
1653
|
}
|
|
1650
1654
|
function renderLiteral(range, options) {
|
|
1651
|
-
return
|
|
1655
|
+
return autolinkOf(range, options) ?? codeSpanOf(range, options);
|
|
1652
1656
|
}
|
|
1653
1657
|
|
|
1654
1658
|
// src/engine/markdown/inline/edge-chars.ts
|
|
@@ -1679,10 +1683,10 @@ function buildTree(nodes) {
|
|
|
1679
1683
|
open.length = shared;
|
|
1680
1684
|
for (const mark of node.marks.slice(shared)) {
|
|
1681
1685
|
const range = { kind: "range", mark, children: [] };
|
|
1682
|
-
(
|
|
1686
|
+
(open.at(-1)?.children ?? root).push(range);
|
|
1683
1687
|
open.push(range);
|
|
1684
1688
|
}
|
|
1685
|
-
(
|
|
1689
|
+
(open.at(-1)?.children ?? root).push({ kind: "leaf", node, index });
|
|
1686
1690
|
});
|
|
1687
1691
|
return root;
|
|
1688
1692
|
}
|
|
@@ -1698,7 +1702,7 @@ function firstCodePoint(value) {
|
|
|
1698
1702
|
return code === void 0 ? "" : String.fromCodePoint(code);
|
|
1699
1703
|
}
|
|
1700
1704
|
function lastCodePoint(value) {
|
|
1701
|
-
return
|
|
1705
|
+
return Array.from(value.slice(-2)).pop() ?? "";
|
|
1702
1706
|
}
|
|
1703
1707
|
function endsWithDelimiter(value, char) {
|
|
1704
1708
|
if (!value.endsWith(char)) return false;
|
|
@@ -1719,7 +1723,7 @@ function chooseDelimiter(type, before, inner, after) {
|
|
|
1719
1723
|
if (fuses(char, before, inner)) return false;
|
|
1720
1724
|
return classifyDelimiterRun(previous, first, char).canOpen && classifyDelimiterRun(last, following, char).canClose;
|
|
1721
1725
|
});
|
|
1722
|
-
return
|
|
1726
|
+
return chosen ?? null;
|
|
1723
1727
|
}
|
|
1724
1728
|
|
|
1725
1729
|
// src/engine/markdown/inline/range-wrapper.ts
|
|
@@ -1727,7 +1731,7 @@ function isEmphasis(type) {
|
|
|
1727
1731
|
return type === "bold" || type === "italic" || type === "strike";
|
|
1728
1732
|
}
|
|
1729
1733
|
function linkOpen(mark, inner) {
|
|
1730
|
-
return
|
|
1734
|
+
return mark.attrs?.href?.startsWith("mention:") && inner.startsWith("@") ? "[<u></u>" : "[";
|
|
1731
1735
|
}
|
|
1732
1736
|
function wrapRange(mark, before, inner, after, options) {
|
|
1733
1737
|
if (mark.type === "link") return { open: linkOpen(mark, inner), close: linkClose(mark, options.escapePipes) };
|
|
@@ -1795,9 +1799,9 @@ function renderInline(nodes, options) {
|
|
|
1795
1799
|
function serializeInline(inline, options = {}) {
|
|
1796
1800
|
const nodes = normalizeInline(inline);
|
|
1797
1801
|
const base = {
|
|
1798
|
-
escapeLineStart:
|
|
1799
|
-
escapePipes:
|
|
1800
|
-
hardBreak:
|
|
1802
|
+
escapeLineStart: options.escapeLineStart ?? false,
|
|
1803
|
+
escapePipes: options.escapePipes ?? false,
|
|
1804
|
+
hardBreak: options.hardBreak ?? "backslash"
|
|
1801
1805
|
};
|
|
1802
1806
|
const pretty = renderInline(nodes, { ...base, strict: false });
|
|
1803
1807
|
return equalInline(parseInline(pretty), nodes) ? pretty : renderInline(nodes, { ...base, strict: true });
|
|
@@ -1833,10 +1837,10 @@ function trimBlankStart(text2) {
|
|
|
1833
1837
|
return text2.slice(start);
|
|
1834
1838
|
}
|
|
1835
1839
|
var trimBlank = (text2) => trimBlankStart(trimBlankEnd(text2));
|
|
1836
|
-
var Cursor =
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
+
var Cursor = class {
|
|
1841
|
+
line = "";
|
|
1842
|
+
offset = 0;
|
|
1843
|
+
column = 0;
|
|
1840
1844
|
#partialTab = false;
|
|
1841
1845
|
reset(line) {
|
|
1842
1846
|
this.line = line;
|
|
@@ -1913,7 +1917,7 @@ var Cursor = (_class = class {constructor() { _class.prototype.__init.call(this)
|
|
|
1913
1917
|
this.column = snapshot.column;
|
|
1914
1918
|
this.#partialTab = snapshot.partialTab;
|
|
1915
1919
|
}
|
|
1916
|
-
}
|
|
1920
|
+
};
|
|
1917
1921
|
|
|
1918
1922
|
// src/engine/markdown/block/block-tree.ts
|
|
1919
1923
|
function canContain(parent, child) {
|
|
@@ -1931,8 +1935,8 @@ function canContain(parent, child) {
|
|
|
1931
1935
|
}
|
|
1932
1936
|
var joinLines = (lines) => trimBlankEnd(lines.join("\n"));
|
|
1933
1937
|
function textLinesOf(node) {
|
|
1934
|
-
if (
|
|
1935
|
-
return
|
|
1938
|
+
if (node?.kind === "paragraph") return node.lines;
|
|
1939
|
+
return node?.kind === "html" ? node.lines.map((line) => trimBlankStart(line)) : null;
|
|
1936
1940
|
}
|
|
1937
1941
|
|
|
1938
1942
|
// src/engine/markdown/block/references.ts
|
|
@@ -1966,7 +1970,7 @@ function parseDefinition(src) {
|
|
|
1966
1970
|
return end < 0 ? null : { label: label.value, target: { href: destination.value }, end };
|
|
1967
1971
|
}
|
|
1968
1972
|
function takeReferenceDefinitions(lines, refs) {
|
|
1969
|
-
if (!
|
|
1973
|
+
if (!lines[0]?.startsWith("[")) return lines;
|
|
1970
1974
|
let text2 = lines.join("\n");
|
|
1971
1975
|
while (text2.startsWith("[")) {
|
|
1972
1976
|
const definition = parseDefinition(text2);
|
|
@@ -1998,13 +2002,13 @@ var canNest = (parser) => parser.stack.length < MAX_NESTING;
|
|
|
1998
2002
|
var childrenOf = (node) => node.children;
|
|
1999
2003
|
function closeTip(parser) {
|
|
2000
2004
|
const node = parser.stack.pop();
|
|
2001
|
-
if (
|
|
2005
|
+
if (node?.kind === "paragraph") {
|
|
2002
2006
|
node.lines = takeReferenceDefinitions(node.lines, parser.refs);
|
|
2003
2007
|
if (node.lines.length === 0) childrenOf(tipOf(parser)).pop();
|
|
2004
|
-
} else if (
|
|
2008
|
+
} else if (node?.kind === "html" && node.summaryOf) {
|
|
2005
2009
|
childrenOf(tipOf(parser)).pop();
|
|
2006
2010
|
node.summaryOf.summary = summaryText(node.lines);
|
|
2007
|
-
} else if (
|
|
2011
|
+
} else if (node?.kind === "code" && node.fence === null) {
|
|
2008
2012
|
while (node.lines.length > 0 && /^ *$/.test(node.lines[node.lines.length - 1])) node.lines.pop();
|
|
2009
2013
|
}
|
|
2010
2014
|
}
|
|
@@ -2116,7 +2120,7 @@ var detailsStart = (parser) => {
|
|
|
2116
2120
|
if (!match) return "none";
|
|
2117
2121
|
cursor.advanceToNonspace();
|
|
2118
2122
|
cursor.advance(match[0].length);
|
|
2119
|
-
addChild(parser, { kind: "details", open: OPEN_ATTRIBUTE.test(
|
|
2123
|
+
addChild(parser, { kind: "details", open: OPEN_ATTRIBUTE.test(match[1] ?? ""), summary: null, children: [] });
|
|
2120
2124
|
return "container";
|
|
2121
2125
|
};
|
|
2122
2126
|
var summaryStart = (parser, container) => {
|
|
@@ -2147,7 +2151,7 @@ function parseQuoinComment(line) {
|
|
|
2147
2151
|
let payload;
|
|
2148
2152
|
try {
|
|
2149
2153
|
payload = JSON.parse(match[2]);
|
|
2150
|
-
} catch
|
|
2154
|
+
} catch {
|
|
2151
2155
|
return null;
|
|
2152
2156
|
}
|
|
2153
2157
|
const { data = {}, indent = 0 } = payload;
|
|
@@ -2336,7 +2340,7 @@ var tableStart = (parser, container) => {
|
|
|
2336
2340
|
};
|
|
2337
2341
|
function addTableRow(table, line) {
|
|
2338
2342
|
const cells = splitRow(line);
|
|
2339
|
-
table.rows.push(table.header.map((_, column) =>
|
|
2343
|
+
table.rows.push(table.header.map((_, column) => cells[column] ?? ""));
|
|
2340
2344
|
}
|
|
2341
2345
|
|
|
2342
2346
|
// src/engine/markdown/block/parse-blocks.ts
|
|
@@ -2414,7 +2418,7 @@ function addLine(parser, node) {
|
|
|
2414
2418
|
else if (node.kind === "html") {
|
|
2415
2419
|
const line = cursor.rest();
|
|
2416
2420
|
node.lines.push(line);
|
|
2417
|
-
if (
|
|
2421
|
+
if (node.ends?.test(line)) closeTip(parser);
|
|
2418
2422
|
} else if (!cursor.blank) {
|
|
2419
2423
|
addChild(parser, { kind: "paragraph", lines: [] });
|
|
2420
2424
|
cursor.advanceToNonspace();
|
|
@@ -2450,8 +2454,8 @@ var ALERT_TONES = {
|
|
|
2450
2454
|
};
|
|
2451
2455
|
function alertOf(quote) {
|
|
2452
2456
|
const [first, ...children] = quote.children;
|
|
2453
|
-
const match =
|
|
2454
|
-
if (
|
|
2457
|
+
const match = first?.kind === "paragraph" ? ALERT_LINE.exec(first.lines[0]) : null;
|
|
2458
|
+
if (first?.kind !== "paragraph" || !match) return null;
|
|
2455
2459
|
const paragraphs = first.lines.length > 1 ? [joinLines(first.lines.slice(1))] : [];
|
|
2456
2460
|
let used = 0;
|
|
2457
2461
|
for (const node of children) {
|
|
@@ -2556,13 +2560,13 @@ function itemLine(item, lines, ctx) {
|
|
|
2556
2560
|
if (ctx.quote) return { line: { kind: "quote" }, lines };
|
|
2557
2561
|
if (item.marker.ordered) return { line: { kind: "ordered", start: item.marker.number }, lines };
|
|
2558
2562
|
const task = lines.length > 0 ? parseLine(`- ${lines[0]}`) : null;
|
|
2559
|
-
if (
|
|
2563
|
+
if (task?.kind !== "task") return { line: { kind: "bullet" }, lines };
|
|
2560
2564
|
return { line: { kind: "task", checked: task.checked }, lines: [trimBlankStart(task.rest), ...lines.slice(1)] };
|
|
2561
2565
|
}
|
|
2562
2566
|
function itemDrafts(item, ctx) {
|
|
2563
2567
|
const [first, ...others] = item.children;
|
|
2564
2568
|
const lead = textLinesOf(first);
|
|
2565
|
-
const { line, lines } = itemLine(item,
|
|
2569
|
+
const { line, lines } = itemLine(item, lead ?? [], ctx);
|
|
2566
2570
|
const body = lead ? canonicalInline(joinLines(lines), ctx.text) : "";
|
|
2567
2571
|
const head = lead || !ctx.quote ? [lineDraft(line, body, ctx.indent)] : [];
|
|
2568
2572
|
return [...head, ...convertAll(lead ? others : item.children, deeper(ctx))];
|
|
@@ -2618,8 +2622,8 @@ function treeToBlocks(document, text2) {
|
|
|
2618
2622
|
// src/engine/markdown/block/from-markdown.ts
|
|
2619
2623
|
function fromMarkdown(markdown, options = {}) {
|
|
2620
2624
|
const { document, refs } = parseBlocks(markdown);
|
|
2621
|
-
const drafts = treeToBlocks(document, { softBreak:
|
|
2622
|
-
const makeId =
|
|
2625
|
+
const drafts = treeToBlocks(document, { softBreak: options.softBreak ?? "space", refs });
|
|
2626
|
+
const makeId = options.newId ?? newId;
|
|
2623
2627
|
return drafts.map((block) => ({ id: makeId(), ...block }));
|
|
2624
2628
|
}
|
|
2625
2629
|
|
|
@@ -2633,7 +2637,7 @@ function createDoc(blocks) {
|
|
|
2633
2637
|
return { blocks, index };
|
|
2634
2638
|
}
|
|
2635
2639
|
function indexOfBlock(doc, id) {
|
|
2636
|
-
return
|
|
2640
|
+
return doc.index.get(id) ?? -1;
|
|
2637
2641
|
}
|
|
2638
2642
|
function requireBlockIndex(doc, id) {
|
|
2639
2643
|
const index = indexOfBlock(doc, id);
|
|
@@ -2680,7 +2684,7 @@ function splitLegacyBlock(block, baseIndent, taken = /* @__PURE__ */ new Set())
|
|
|
2680
2684
|
const ids = pieceIds(block.id, pieces.length, taken);
|
|
2681
2685
|
return pieces.map((piece, index) => {
|
|
2682
2686
|
const data = index === 0 ? { ...extras, ...piece.data } : piece.data;
|
|
2683
|
-
const indent = baseIndent + (
|
|
2687
|
+
const indent = baseIndent + (piece.indent ?? 0);
|
|
2684
2688
|
const id = ids[index];
|
|
2685
2689
|
return indent > 0 ? { ...piece, id, data, indent } : { ...piece, id, data };
|
|
2686
2690
|
});
|
|
@@ -2713,18 +2717,18 @@ function unknownBlockSpec(type) {
|
|
|
2713
2717
|
type,
|
|
2714
2718
|
flow: "void",
|
|
2715
2719
|
fromData: (data) => ({ attrs: { data }, regions: {} }),
|
|
2716
|
-
toData: ({ attrs }) =>
|
|
2720
|
+
toData: ({ attrs }) => attrs.data ?? {},
|
|
2717
2721
|
initial: () => ({ attrs: { data: {} }, regions: {} })
|
|
2718
2722
|
};
|
|
2719
2723
|
}
|
|
2720
2724
|
function specFor(schema, type) {
|
|
2721
|
-
return
|
|
2725
|
+
return schema.blocks.get(type) ?? unknownBlockSpec(type);
|
|
2722
2726
|
}
|
|
2723
2727
|
|
|
2724
2728
|
// src/engine/blocks/codec.ts
|
|
2725
2729
|
var NO_IDS = /* @__PURE__ */ new Set();
|
|
2726
2730
|
function createBlockCodec(schema, options = {}) {
|
|
2727
|
-
const context = { inline: inlineCodec, newId:
|
|
2731
|
+
const context = { inline: inlineCodec, newId: options.newId ?? newId };
|
|
2728
2732
|
const engineBlocks = /* @__PURE__ */ new WeakMap();
|
|
2729
2733
|
const quoinBlocks = /* @__PURE__ */ new WeakMap();
|
|
2730
2734
|
const splitGroups = /* @__PURE__ */ new WeakMap();
|
|
@@ -2734,7 +2738,7 @@ function createBlockCodec(schema, options = {}) {
|
|
|
2734
2738
|
}
|
|
2735
2739
|
function engineBlocksAmong(block, taken) {
|
|
2736
2740
|
const cached = engineBlocks.get(block);
|
|
2737
|
-
if (
|
|
2741
|
+
if (cached?.every((piece, index) => index === 0 || !taken.has(piece.id))) return [...cached];
|
|
2738
2742
|
const pieces = splitLegacyBlock(block, countOf(block.indent), taken);
|
|
2739
2743
|
if (pieces) {
|
|
2740
2744
|
const blocks = pieces.map(convert2);
|
|
@@ -2766,7 +2770,7 @@ function createBlockCodec(schema, options = {}) {
|
|
|
2766
2770
|
const result = [];
|
|
2767
2771
|
for (let at = 0; at < doc.blocks.length; ) {
|
|
2768
2772
|
const group = splitGroups.get(doc.blocks[at]);
|
|
2769
|
-
const intact =
|
|
2773
|
+
const intact = group?.blocks.every((piece, offset) => doc.blocks[at + offset] === piece);
|
|
2770
2774
|
if (group && intact) {
|
|
2771
2775
|
result.push(group.original);
|
|
2772
2776
|
at += group.blocks.length;
|
|
@@ -2792,10 +2796,10 @@ function append2(groups, entry) {
|
|
|
2792
2796
|
const last = groups[groups.length - 1];
|
|
2793
2797
|
const list = listKind(entry.block);
|
|
2794
2798
|
if (list) {
|
|
2795
|
-
if (
|
|
2799
|
+
if (last?.kind === "list" && last.list === list) last.items.push(entry);
|
|
2796
2800
|
else groups.push({ kind: "list", list, items: [entry] });
|
|
2797
2801
|
} else if (isQuote(entry.block)) {
|
|
2798
|
-
if (
|
|
2802
|
+
if (last?.kind === "quote" && last.items[0].block.indent === entry.block.indent) last.items.push(entry);
|
|
2799
2803
|
else groups.push({ kind: "quote", items: [entry] });
|
|
2800
2804
|
} else {
|
|
2801
2805
|
groups.push({ kind: "single", entry });
|
|
@@ -2807,8 +2811,8 @@ function groupBlocks(blocks) {
|
|
|
2807
2811
|
for (const block of blocks) {
|
|
2808
2812
|
while (frames.length > 0 && frames[frames.length - 1].owner.block.indent >= block.indent) frames.pop();
|
|
2809
2813
|
const frame = frames[frames.length - 1];
|
|
2810
|
-
const entry = { block, excess: block.indent - (
|
|
2811
|
-
append2(
|
|
2814
|
+
const entry = { block, excess: block.indent - (frame?.depth ?? 0), children: [] };
|
|
2815
|
+
append2(frame?.owner.children ?? root, entry);
|
|
2812
2816
|
if ((listKind(block) || block.type === "TOGGLE") && frames.length < MAX_NESTING2) {
|
|
2813
2817
|
frames.push({ owner: entry, depth: block.indent + 1 });
|
|
2814
2818
|
}
|
|
@@ -2832,20 +2836,20 @@ function tableCells(block) {
|
|
|
2832
2836
|
const cols = countOf(block.attrs.cols);
|
|
2833
2837
|
return Array.from(
|
|
2834
2838
|
{ length: countOf(block.attrs.rows) },
|
|
2835
|
-
(_, row) => Array.from({ length: cols }, (_2, col) =>
|
|
2839
|
+
(_, row) => Array.from({ length: cols }, (_2, col) => block.regions[cellKey(row, col)] ?? [])
|
|
2836
2840
|
);
|
|
2837
2841
|
}
|
|
2838
2842
|
|
|
2839
2843
|
// src/engine/render/block-plain-text.ts
|
|
2840
2844
|
function inlinePlainText(inline, schema) {
|
|
2841
|
-
return inlineText(inline, (node) =>
|
|
2845
|
+
return inlineText(inline, (node) => schema.atoms.get(node.type)?.plainText(node.attrs) ?? "");
|
|
2842
2846
|
}
|
|
2843
2847
|
function tablePlainText(block, schema) {
|
|
2844
2848
|
return tableCells(block).map((row) => row.map((cell) => inlinePlainText(cell, schema)).join(" ")).join("\n");
|
|
2845
2849
|
}
|
|
2846
2850
|
function blockPlainText(block, schema) {
|
|
2847
2851
|
const spec = schema.blocks.get(block.type);
|
|
2848
|
-
if (
|
|
2852
|
+
if (spec?.toPlainText) return spec.toPlainText(block);
|
|
2849
2853
|
const { attrs } = block;
|
|
2850
2854
|
switch (block.type) {
|
|
2851
2855
|
case "CODE":
|
|
@@ -2863,7 +2867,7 @@ function blockPlainText(block, schema) {
|
|
|
2863
2867
|
case "TABLE":
|
|
2864
2868
|
return tablePlainText(block, schema);
|
|
2865
2869
|
default:
|
|
2866
|
-
return
|
|
2870
|
+
return spec?.primaryRegion ? inlinePlainText(block.regions[spec.primaryRegion] ?? [], schema) : "";
|
|
2867
2871
|
}
|
|
2868
2872
|
}
|
|
2869
2873
|
|
|
@@ -2874,7 +2878,7 @@ function nestHeadings(headings) {
|
|
|
2874
2878
|
for (const heading of headings) {
|
|
2875
2879
|
while (open.length > 0 && open[open.length - 1].heading.level >= heading.level) open.pop();
|
|
2876
2880
|
const node = { heading, children: [] };
|
|
2877
|
-
(
|
|
2881
|
+
(open[open.length - 1]?.children ?? roots).push(node);
|
|
2878
2882
|
open.push(node);
|
|
2879
2883
|
}
|
|
2880
2884
|
return roots;
|
|
@@ -2928,16 +2932,16 @@ function engineBlocksOf(blocks, schema) {
|
|
|
2928
2932
|
}
|
|
2929
2933
|
|
|
2930
2934
|
// src/engine/render/first-named.ts
|
|
2931
|
-
var firstNamed = (...names) =>
|
|
2935
|
+
var firstNamed = (...names) => names.find((name) => name?.trim()) ?? "";
|
|
2932
2936
|
|
|
2933
2937
|
// src/engine/render/inline-nodes.ts
|
|
2934
2938
|
function atomNode(node, options) {
|
|
2935
2939
|
const { attrs } = node;
|
|
2936
2940
|
if (node.type === "mention") {
|
|
2937
|
-
return element("span", [["data-mention",
|
|
2941
|
+
return element("span", [["data-mention", attrs.id ?? ""], ["data-kind", attrs.kind || void 0]], [`@${attrs.label ?? ""}`]);
|
|
2938
2942
|
}
|
|
2939
2943
|
if (node.type === "math") {
|
|
2940
|
-
const latex =
|
|
2944
|
+
const latex = attrs.latex ?? "";
|
|
2941
2945
|
const math3 = ["data-math", ""];
|
|
2942
2946
|
return options.renderMath ? element("span", [math3], [latex], options.renderMath(latex, { displayMode: false })) : element("span", [math3], [latex]);
|
|
2943
2947
|
}
|
|
@@ -2947,7 +2951,7 @@ var textNodes = (value) => value.split("\n").flatMap((line, at) => at === 0 ? [l
|
|
|
2947
2951
|
function inlineNodes(inline, options = {}) {
|
|
2948
2952
|
const root = [];
|
|
2949
2953
|
const open = [];
|
|
2950
|
-
const current = () =>
|
|
2954
|
+
const current = () => open[open.length - 1]?.children ?? root;
|
|
2951
2955
|
for (const node of inline) {
|
|
2952
2956
|
let shared = 0;
|
|
2953
2957
|
while (shared < open.length && shared < node.marks.length && sameMark(open[shared].mark, node.marks[shared])) {
|
|
@@ -2957,7 +2961,7 @@ function inlineNodes(inline, options = {}) {
|
|
|
2957
2961
|
for (const mark of node.marks.slice(shared)) {
|
|
2958
2962
|
const wrapper = markElement(mark);
|
|
2959
2963
|
if (wrapper) current().push(wrapper);
|
|
2960
|
-
open.push({ mark, children:
|
|
2964
|
+
open.push({ mark, children: wrapper?.children ?? current() });
|
|
2961
2965
|
}
|
|
2962
2966
|
current().push(...node.kind === "text" ? textNodes(node.text) : [atomNode(node, options)]);
|
|
2963
2967
|
}
|
|
@@ -2965,7 +2969,7 @@ function inlineNodes(inline, options = {}) {
|
|
|
2965
2969
|
}
|
|
2966
2970
|
|
|
2967
2971
|
// src/engine/render/html-env.ts
|
|
2968
|
-
var inlineOf = (inline, env) => inlineNodes(
|
|
2972
|
+
var inlineOf = (inline, env) => inlineNodes(inline ?? [], { renderMath: env.renderMath });
|
|
2969
2973
|
|
|
2970
2974
|
// src/engine/render/embed-provider.ts
|
|
2971
2975
|
var EMBED_FRAME = {
|
|
@@ -2978,7 +2982,7 @@ var SECURE = /* @__PURE__ */ new Set(["https:"]);
|
|
|
2978
2982
|
function parse(address) {
|
|
2979
2983
|
try {
|
|
2980
2984
|
return new URL(address);
|
|
2981
|
-
} catch
|
|
2985
|
+
} catch {
|
|
2982
2986
|
return null;
|
|
2983
2987
|
}
|
|
2984
2988
|
}
|
|
@@ -2998,7 +3002,7 @@ function embedFrame(href, providers) {
|
|
|
2998
3002
|
}
|
|
2999
3003
|
|
|
3000
3004
|
// src/engine/render/media-nodes.ts
|
|
3001
|
-
var numberAttr = (value) =>
|
|
3005
|
+
var numberAttr = (value) => optionalNumber(value)?.toString();
|
|
3002
3006
|
var paragraph = (view, inner) => element("p", [indentAttr(view.excess)], [inner]);
|
|
3003
3007
|
var link = (href, label) => element("a", [["href", href], ["rel", "noopener noreferrer"]], [label]);
|
|
3004
3008
|
function assetSource(block, env) {
|
|
@@ -3022,7 +3026,7 @@ function imageNode(block, view, env) {
|
|
|
3022
3026
|
["loading", "lazy"],
|
|
3023
3027
|
["decoding", "async"]
|
|
3024
3028
|
]);
|
|
3025
|
-
const caption =
|
|
3029
|
+
const caption = block.regions.caption ?? [];
|
|
3026
3030
|
const figcaption = caption.length > 0 ? [element("figcaption", [], inlineOf(caption, env))] : [];
|
|
3027
3031
|
return element("figure", [alignAttr(attrs.align), indentAttr(view.excess)], [image, ...figcaption]);
|
|
3028
3032
|
}
|
|
@@ -3064,7 +3068,7 @@ function lineNode(block, view, env) {
|
|
|
3064
3068
|
const style = [alignAttr(block.attrs.align), ...colorAttrs(block.attrs), indentAttr(view.excess)];
|
|
3065
3069
|
switch (block.attrs.kind) {
|
|
3066
3070
|
case "heading":
|
|
3067
|
-
return element(`h${
|
|
3071
|
+
return element(`h${headingLevel2(block) ?? 1}`, [["id", headingId(block.id)], ...style], body);
|
|
3068
3072
|
case "bullet":
|
|
3069
3073
|
case "ordered":
|
|
3070
3074
|
return element("li", style, [...body, ...view.children]);
|
|
@@ -3235,105 +3239,104 @@ function groupNodes(groups, env, render) {
|
|
|
3235
3239
|
|
|
3236
3240
|
// src/engine/render/document-nodes.ts
|
|
3237
3241
|
function documentNodes(blocks, options = {}, render = blockNode) {
|
|
3238
|
-
const schema =
|
|
3242
|
+
const schema = options.schema ?? createSchema();
|
|
3239
3243
|
const engine = engineBlocksOf(blocks, schema);
|
|
3240
3244
|
const env = {
|
|
3241
|
-
resolveAssetUrl:
|
|
3245
|
+
resolveAssetUrl: options.resolveAssetUrl ?? sanitizeHref,
|
|
3242
3246
|
renderMath: options.renderMath,
|
|
3243
|
-
embeds:
|
|
3244
|
-
embedProviders: [...
|
|
3247
|
+
embeds: options.embeds ?? "link",
|
|
3248
|
+
embedProviders: [...options.embedProviders ?? [], ...coreEmbedProviders],
|
|
3245
3249
|
headings: collectHeadings(engine, schema),
|
|
3246
3250
|
taskLabel: firstNamed(options.taskLabel, "Task"),
|
|
3247
|
-
frameTitle:
|
|
3251
|
+
frameTitle: options.frameTitle ?? String
|
|
3248
3252
|
};
|
|
3249
3253
|
return groupNodes(groupBlocks(engine), env, render);
|
|
3250
3254
|
}
|
|
3251
3255
|
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
//# sourceMappingURL=chunk-4SLJNZSM.cjs.map
|
|
3256
|
+
exports.ALERT_TONES = ALERT_TONES;
|
|
3257
|
+
exports.EMBED_FRAME = EMBED_FRAME;
|
|
3258
|
+
exports.MAX_MARKER_NUMBER = MAX_MARKER_NUMBER;
|
|
3259
|
+
exports.PALETTE = PALETTE;
|
|
3260
|
+
exports.SCHEME = SCHEME;
|
|
3261
|
+
exports.addMark = addMark;
|
|
3262
|
+
exports.addMarkRange = addMarkRange;
|
|
3263
|
+
exports.alignOrUndefined = alignOrUndefined;
|
|
3264
|
+
exports.atom = atom;
|
|
3265
|
+
exports.blockById = blockById;
|
|
3266
|
+
exports.blockNode = blockNode;
|
|
3267
|
+
exports.blockPlainText = blockPlainText;
|
|
3268
|
+
exports.cellKey = cellKey;
|
|
3269
|
+
exports.collectHeadings = collectHeadings;
|
|
3270
|
+
exports.compareRegionNames = compareRegionNames;
|
|
3271
|
+
exports.coreAtomSpecs = coreAtomSpecs;
|
|
3272
|
+
exports.coreBlockSpecs = coreBlockSpecs;
|
|
3273
|
+
exports.coreEmbedProviders = coreEmbedProviders;
|
|
3274
|
+
exports.coreMarkSpecs = coreMarkSpecs;
|
|
3275
|
+
exports.countOf = countOf;
|
|
3276
|
+
exports.createBlockCodec = createBlockCodec;
|
|
3277
|
+
exports.createDoc = createDoc;
|
|
3278
|
+
exports.createSchema = createSchema;
|
|
3279
|
+
exports.dataAttributes = dataAttributes;
|
|
3280
|
+
exports.documentNodes = documentNodes;
|
|
3281
|
+
exports.dollarRunEnd = dollarRunEnd;
|
|
3282
|
+
exports.element = element;
|
|
3283
|
+
exports.embedFrame = embedFrame;
|
|
3284
|
+
exports.engineBlocksOf = engineBlocksOf;
|
|
3285
|
+
exports.equalInline = equalInline;
|
|
3286
|
+
exports.equalNode = equalNode;
|
|
3287
|
+
exports.findMathClose = findMathClose;
|
|
3288
|
+
exports.firstNamed = firstNamed;
|
|
3289
|
+
exports.fromMarkdown = fromMarkdown;
|
|
3290
|
+
exports.groupBlocks = groupBlocks;
|
|
3291
|
+
exports.hasMark = hasMark;
|
|
3292
|
+
exports.headingId = headingId;
|
|
3293
|
+
exports.headingLevel = headingLevel;
|
|
3294
|
+
exports.headingLevel2 = headingLevel2;
|
|
3295
|
+
exports.indexOfBlock = indexOfBlock;
|
|
3296
|
+
exports.inlineLength = inlineLength;
|
|
3297
|
+
exports.inlineOf = inlineOf;
|
|
3298
|
+
exports.inlinePlainText = inlinePlainText;
|
|
3299
|
+
exports.inlineText = inlineText;
|
|
3300
|
+
exports.isPaletteColor = isPaletteColor;
|
|
3301
|
+
exports.isQuoinType = isQuoinType;
|
|
3302
|
+
exports.isRecord = isRecord;
|
|
3303
|
+
exports.linkClose = linkClose;
|
|
3304
|
+
exports.listKind = listKind;
|
|
3305
|
+
exports.markElement = markElement;
|
|
3306
|
+
exports.markKey = markKey;
|
|
3307
|
+
exports.marksAt = marksAt;
|
|
3308
|
+
exports.mathLatex = mathLatex;
|
|
3309
|
+
exports.nestHeadings = nestHeadings;
|
|
3310
|
+
exports.newId = newId;
|
|
3311
|
+
exports.nodeLength = nodeLength;
|
|
3312
|
+
exports.nodeText = nodeText;
|
|
3313
|
+
exports.normalizeInline = normalizeInline;
|
|
3314
|
+
exports.opensMath = opensMath;
|
|
3315
|
+
exports.optionalNumber = optionalNumber;
|
|
3316
|
+
exports.optionalString = optionalString;
|
|
3317
|
+
exports.orderedStart = orderedStart;
|
|
3318
|
+
exports.paletteOrUndefined = paletteOrUndefined;
|
|
3319
|
+
exports.parseInline = parseInline;
|
|
3320
|
+
exports.parseLine = parseLine;
|
|
3321
|
+
exports.removeMark = removeMark;
|
|
3322
|
+
exports.removeMarkRange = removeMarkRange;
|
|
3323
|
+
exports.replaceBlocks = replaceBlocks;
|
|
3324
|
+
exports.replaceInline = replaceInline;
|
|
3325
|
+
exports.requireBlockIndex = requireBlockIndex;
|
|
3326
|
+
exports.sameAttrs = sameAttrs;
|
|
3327
|
+
exports.sameItems = sameItems;
|
|
3328
|
+
exports.sameMark = sameMark;
|
|
3329
|
+
exports.sameMarkSet = sameMarkSet;
|
|
3330
|
+
exports.sanitizeAssetUrl = sanitizeAssetUrl;
|
|
3331
|
+
exports.sanitizeHref = sanitizeHref;
|
|
3332
|
+
exports.serializeInline = serializeInline;
|
|
3333
|
+
exports.sliceInline = sliceInline;
|
|
3334
|
+
exports.specFor = specFor;
|
|
3335
|
+
exports.startsHtmlBlock = startsHtmlBlock;
|
|
3336
|
+
exports.str = str;
|
|
3337
|
+
exports.tableCells = tableCells;
|
|
3338
|
+
exports.text = text;
|
|
3339
|
+
exports.updateBlock = updateBlock;
|
|
3340
|
+
exports.writtenAttrs = writtenAttrs;
|
|
3341
|
+
//# sourceMappingURL=chunk-AIS37SL2.cjs.map
|
|
3342
|
+
//# sourceMappingURL=chunk-AIS37SL2.cjs.map
|