@wirecat/notion-cli 0.5.0 → 0.7.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 +47 -0
- package/README.md +5 -0
- package/contracts/wirecat.json +55 -2
- package/dist/bin/notion.js +2 -2
- package/dist/bundle/agent-AILW4JPO.js +42 -0
- package/dist/bundle/{all-profiles-V37KCXH3.js → all-profiles-CKOACXTW.js} +64 -21
- package/dist/bundle/{anthropic-Q4S3BYXD.js → anthropic-DWBBVTU3.js} +6 -6
- package/dist/bundle/{app-server-43SR3ACI.js → app-server-BHFYNCDE.js} +86 -65
- package/dist/bundle/{bun-M3J2QTR3.js → bun-ICK2XT7J.js} +2 -2
- package/dist/bundle/{bun-sqlite-EJ3W2PSV.js → bun-sqlite-LU5V5Y4A.js} +7 -7
- package/dist/bundle/{chunk-KHWOLBHQ.js → chunk-2OZVCNU5.js} +2 -2
- package/dist/bundle/{chunk-O5YB7FQD.js → chunk-2RNJ2JP3.js} +4 -4
- package/dist/bundle/{chunk-TP7GDWVF.js → chunk-364ET7LV.js} +1 -1
- package/dist/bundle/{chunk-TDNURSU6.js → chunk-3AKMIKND.js} +19 -19
- package/dist/bundle/{chunk-O3DYRCIT.js → chunk-3DGHBXH2.js} +1 -1
- package/dist/bundle/chunk-3KOJNZH3.js +80 -0
- package/dist/bundle/{chunk-DSP36YHQ.js → chunk-3T3OAYL4.js} +2 -2
- package/dist/bundle/{chunk-W7HM2VGO.js → chunk-3YXYA6HB.js} +1 -1
- package/dist/bundle/chunk-3ZSUVFR7.js +398 -0
- package/dist/bundle/{chunk-GCZ6MAEN.js → chunk-46JBCXLI.js} +43 -64
- package/dist/bundle/{chunk-DB2XKHI4.js → chunk-4FHKSSXQ.js} +2 -2
- package/dist/bundle/chunk-4HP6KGBI.js +32 -0
- package/dist/bundle/chunk-4ZAQMDLD.js +1308 -0
- package/dist/bundle/chunk-4ZTB7LS3.js +87 -0
- package/dist/bundle/{chunk-BNEE35WD.js → chunk-5NFIUY2P.js} +4 -4
- package/dist/bundle/{chunk-E5WLE7BM.js → chunk-63SW4UXG.js} +3 -4
- package/dist/bundle/{chunk-NHHJHXMQ.js → chunk-64IK7JFO.js} +2 -2
- package/dist/bundle/{chunk-HZRQLAHO.js → chunk-6MQSBWWF.js} +1 -1
- package/dist/bundle/{chunk-2FJNMADN.js → chunk-6UZ5D2WP.js} +10 -10
- package/dist/bundle/chunk-6VPC5Z56.js +2145 -0
- package/dist/bundle/chunk-7COTHS6G.js +388 -0
- package/dist/bundle/{chunk-TOSCB4SO.js → chunk-A3RJ6FD5.js} +29 -10
- package/dist/bundle/chunk-ADCAWRRX.js +2366 -0
- package/dist/bundle/{chunk-PPHBRESD.js → chunk-ALAPDLCP.js} +2 -2
- package/dist/bundle/{chunk-ONZVPE24.js → chunk-B6DJQBZI.js} +6 -6
- package/dist/bundle/{chunk-N2XADGL4.js → chunk-BFCRGLOF.js} +4 -4
- package/dist/bundle/{chunk-5P5TXU2K.js → chunk-BFHPT67P.js} +9581 -10764
- package/dist/bundle/{chunk-NA6QLHBZ.js → chunk-BQ6CXCLP.js} +10 -8
- package/dist/bundle/{chunk-JCKWQGCD.js → chunk-BXXHUO7Y.js} +110 -862
- package/dist/bundle/chunk-DCSPCOPB.js +221 -0
- package/dist/bundle/chunk-DQSOYH6N.js +20 -0
- package/dist/bundle/chunk-ECYOTDJM.js +14 -0
- package/dist/bundle/chunk-EMIJVLOA.js +30 -0
- package/dist/bundle/{chunk-DFCHHR5M.js → chunk-EUF5JNPG.js} +1 -1
- package/dist/bundle/{chunk-RIGE67FR.js → chunk-EWXMIKZN.js} +43 -33
- package/dist/bundle/chunk-F4BX7TH2.js +15 -0
- package/dist/bundle/{chunk-QYXWRKNA.js → chunk-FHYV4VWY.js} +16 -9
- package/dist/bundle/{chunk-WE4UFASG.js → chunk-FNESLLZS.js} +29 -1
- package/dist/bundle/chunk-FO3XY2Y2.js +108 -0
- package/dist/bundle/chunk-HJDQTM3T.js +353 -0
- package/dist/bundle/chunk-HOO53OYK.js +561 -0
- package/dist/bundle/{chunk-KHZ2RGXI.js → chunk-HSVKU4OJ.js} +153 -572
- package/dist/bundle/{chunk-CDK5E45T.js → chunk-IEY7KS6Q.js} +2 -100
- package/dist/bundle/{chunk-RJMQGG3P.js → chunk-ITW26OBI.js} +65 -49
- package/dist/bundle/{chunk-FBZI4Z3Z.js → chunk-ITWINZ6R.js} +13 -26
- package/dist/bundle/{chunk-J3NKZ6MO.js → chunk-IYZWHCZJ.js} +155 -435
- package/dist/bundle/{chunk-W53EJOFQ.js → chunk-J3DZVB67.js} +1 -1
- package/dist/bundle/{chunk-FKA7DOCK.js → chunk-JEZJFQQW.js} +1 -1
- package/dist/bundle/chunk-JPGN473W.js +50 -0
- package/dist/bundle/{chunk-NTG657MI.js → chunk-JVRBW5LH.js} +7 -64
- package/dist/bundle/chunk-KBY42GKW.js +785 -0
- package/dist/bundle/{chunk-DO7BLXO3.js → chunk-KWBLDSRV.js} +16 -3
- package/dist/bundle/chunk-L7P3LUDQ.js +286 -0
- package/dist/bundle/{chunk-PWRRDDMZ.js → chunk-LBRTLZHI.js} +249 -555
- package/dist/bundle/{chunk-B3FSLAIU.js → chunk-LEPPRULN.js} +20 -6
- package/dist/bundle/{chunk-WPP76PSX.js → chunk-LVAFTQ45.js} +32 -24
- package/dist/bundle/{chunk-PAW6RRCW.js → chunk-MB4HXDBT.js} +8 -210
- package/dist/bundle/chunk-MEYYH47C.js +25 -0
- package/dist/bundle/{chunk-UZSBGECU.js → chunk-N3NJPHZB.js} +1 -65
- package/dist/bundle/{chunk-BWLBSQSU.js → chunk-NCCRLAAI.js} +4 -4
- package/dist/bundle/chunk-NMQRSEZM.js +37 -0
- package/dist/bundle/{chunk-H3E2PZ5Y.js → chunk-NV7NNL5T.js} +7 -7
- package/dist/bundle/chunk-OALFRUMI.js +67 -0
- package/dist/bundle/{chunk-CWXOXIWS.js → chunk-OCGNOJYD.js} +1 -1
- package/dist/bundle/chunk-OFMCU3BH.js +72 -0
- package/dist/bundle/{chunk-MGUEZYFA.js → chunk-OLAGFJDM.js} +13 -2143
- package/dist/bundle/{chunk-E2AFUJDR.js → chunk-OP2BH55P.js} +3 -3
- package/dist/bundle/{chunk-P5BHKKBI.js → chunk-OS4WPXPZ.js} +4 -4
- package/dist/bundle/{chunk-XUPN2EHR.js → chunk-OW5HW3TD.js} +23 -7
- package/dist/bundle/{chunk-ECC2UX7X.js → chunk-PDVXG3T3.js} +6 -6
- package/dist/bundle/{chunk-5D4AEUVA.js → chunk-PL5P7UKW.js} +434 -1
- package/dist/bundle/{chunk-G2MJYXZG.js → chunk-PSMRUOII.js} +4 -4
- package/dist/bundle/{chunk-DBEQI5YM.js → chunk-QK52ARAU.js} +3 -3
- package/dist/bundle/{chunk-QWYMXFKM.js → chunk-QMNEDK7Z.js} +3 -3
- package/dist/bundle/chunk-R4JV3VLU.js +714 -0
- package/dist/bundle/{chunk-C32AKHTY.js → chunk-REOBWSGV.js} +35 -12
- package/dist/bundle/{chunk-X2M6NIQG.js → chunk-RNVYNPXT.js} +1 -1
- package/dist/bundle/{chunk-HHVFIXDO.js → chunk-RXGX2CZX.js} +399 -399
- package/dist/bundle/{chunk-W5JZMXGW.js → chunk-S35UJBFZ.js} +75 -75
- package/dist/bundle/{chunk-MVA5HVKL.js → chunk-S4UUN6LD.js} +18 -0
- package/dist/bundle/chunk-S5P7THM5.js +72 -0
- package/dist/bundle/{chunk-NE43YXKL.js → chunk-SRVTGI3M.js} +3 -3
- package/dist/bundle/chunk-TRYYWV7J.js +291 -0
- package/dist/bundle/chunk-TWY543BS.js +39 -0
- package/dist/bundle/{chunk-KFVDL2QS.js → chunk-UC7JLE6J.js} +1 -89
- package/dist/bundle/{chunk-3RL2MIUF.js → chunk-UO4O6WQ4.js} +8 -8
- package/dist/bundle/chunk-UPL474OW.js +94 -0
- package/dist/bundle/chunk-UQVUXG7H.js +594 -0
- package/dist/bundle/chunk-UYEDQGMI.js +340 -0
- package/dist/bundle/chunk-VNWF4I7E.js +34 -0
- package/dist/bundle/{chunk-FPUGMDJV.js → chunk-VRBEYOJL.js} +1 -1
- package/dist/bundle/{chunk-BBSFQ3PU.js → chunk-VXKD533R.js} +1646 -1337
- package/dist/bundle/{chunk-ECEZOLOD.js → chunk-VYZ2J7DT.js} +4 -4
- package/dist/bundle/{chunk-TD2JZ25O.js → chunk-WJFQMOVM.js} +113 -80
- package/dist/bundle/{chunk-MNRMKWCN.js → chunk-WUNEJRLJ.js} +6 -6
- package/dist/bundle/chunk-WVN2KTNS.js +52 -0
- package/dist/bundle/{chunk-GTY6N5KZ.js → chunk-X5LUHN62.js} +2 -2
- package/dist/bundle/{chunk-LBYGJKXW.js → chunk-X737FHZP.js} +4 -4
- package/dist/bundle/chunk-YHWFF6DN.js +39 -0
- package/dist/bundle/chunk-YSF5JBRA.js +36 -0
- package/dist/bundle/{chunk-QIG55MZH.js → chunk-ZGUUP2T3.js} +12 -12
- package/dist/bundle/{chunk-AT5I34AN.js → chunk-ZMKAI3F3.js} +3 -3
- package/dist/bundle/command-contract-C2CF4QAH.js +41 -0
- package/dist/bundle/{command-server-entry-LJ627ZUA.js → command-server-entry-F3B2KSPO.js} +30 -27
- package/dist/bundle/{decode-PX2LZ5Y2.js → decode-FDHFF7GC.js} +6 -6
- package/dist/bundle/{definitions-M3U4UYHN.js → definitions-MB65223J.js} +72 -18
- package/dist/bundle/{dispatch-KOISQ5QJ.js → dispatch-IXKG5Z5Y.js} +8 -8
- package/dist/bundle/dist-PAKDDIBT.js +191 -0
- package/dist/bundle/{echarts-FVTUDXDU.js → echarts-PGJPVPA4.js} +2 -2
- package/dist/bundle/{embed-CCSDK43I.js → embed-U6X7CNNK.js} +7 -7
- package/dist/bundle/{embedder-VHI4DHB7.js → embedder-3ROL6ROQ.js} +10 -10
- package/dist/bundle/{failure-FZ6VYKEQ.js → failure-IYMRXM2X.js} +3 -3
- package/dist/bundle/first-run-PNVNHGR7.js +29 -0
- package/dist/bundle/first-screen-DEDD64YH.js +41 -0
- package/dist/bundle/hast-util-from-html-X2DCPS3T.js +10531 -0
- package/dist/bundle/hast-util-to-html-IIFHILP5.js +998 -0
- package/dist/bundle/hast-util-to-mdast-3CSMIWK2.js +2272 -0
- package/dist/bundle/{instructions-HET7BCYK.js → instructions-MJQWRI2D.js} +1 -1
- package/dist/bundle/{mcp-RGNRW77S.js → mcp-JNHOSK4L.js} +2 -2
- package/dist/bundle/{mdast-util-from-markdown-R66F4HZA.js → mdast-util-from-markdown-XCR5KW5S.js} +138 -195
- package/dist/bundle/{mdast-util-gfm-LN2ELINH.js → mdast-util-gfm-JO7PHUIB.js} +28 -357
- package/dist/bundle/mdast-util-to-hast-AYJV7KAE.js +879 -0
- package/dist/bundle/mdast-util-to-markdown-DOXGHRI7.js +1854 -0
- package/dist/bundle/meeting-combined-HEC25QPY.js +25 -0
- package/dist/bundle/meeting-model-R7QPDNZZ.js +27 -0
- package/dist/bundle/{meeting-semantic-UD26T37N.js → meeting-semantic-7WPLMBNT.js} +7 -7
- package/dist/bundle/{micromark-extension-gfm-5X7YT43T.js → micromark-extension-gfm-PQ7DWZM7.js} +12 -78
- package/dist/bundle/{node-CXZIFHZC.js → node-3UXNV3CD.js} +2 -2
- package/dist/bundle/{node-sqlite-ME7KMORI.js → node-sqlite-ULWDWM3I.js} +8 -8
- package/dist/bundle/notes-search-7PE3E3C7.js +64 -0
- package/dist/bundle/notion.js +14 -14
- package/dist/bundle/oauth-LNUZMA72.js +20 -0
- package/dist/bundle/{open-HA6D3SXR.js → open-HGHC35M4.js} +6 -6
- package/dist/bundle/{openai-H5AJPZBX.js → openai-ISSP57MV.js} +21 -18
- package/dist/bundle/{process-5RUXWGYS.js → process-PB2WCOR2.js} +1 -1
- package/dist/bundle/{program-F3NBTZ7J.js → program-GASBJRMG.js} +7574 -7047
- package/dist/bundle/{prompt-6XSUOLHK.js → prompt-3VGQVX2B.js} +6 -6
- package/dist/bundle/{recognize-2Y7AUVGG.js → recognize-7Q2P3NME.js} +5 -5
- package/dist/bundle/{remote-KCABPXQ3.js → remote-BBAWKVIT.js} +12 -11
- package/dist/bundle/{rerank-BTN7LUVA.js → rerank-H4PUS4HV.js} +8 -8
- package/dist/bundle/{schemas-VVLTLMXS.js → schemas-TTVUADHT.js} +39 -60
- package/dist/bundle/{serve-CYEMVRFC.js → serve-FZNSKY7R.js} +11 -11
- package/dist/bundle/{server-WFIICGMI.js → server-BRRNDW6L.js} +78 -56
- package/dist/bundle/server-CQJ4LKAZ.js +90 -0
- package/dist/bundle/{services-L4W6ZWDG.js → services-PEU557KZ.js} +103 -88
- package/dist/bundle/{sqlite-runtime-IKMYLRQC.js → sqlite-runtime-4IZJ4YUM.js} +7 -7
- package/dist/bundle/{state-LMUP636P.js → state-MX3JVT5Q.js} +7 -7
- package/dist/bundle/{store-W2JC2JP4.js → store-JUT34REM.js} +24 -20
- package/dist/bundle/{store-A2QZFBOX.js → store-PP4BPADZ.js} +30 -18
- package/dist/bundle/store-maintenance-command-GRFTJBSB.js +77 -0
- package/dist/bundle/surface-FPWES3NY.js +76 -0
- package/dist/commands/account.d.ts +3 -0
- package/dist/commands/account.d.ts.map +1 -0
- package/dist/commands/account.js +22 -0
- package/dist/commands/account.js.map +1 -0
- package/dist/commands/api.d.ts +7 -2
- package/dist/commands/api.d.ts.map +1 -1
- package/dist/commands/api.js +19 -141
- package/dist/commands/api.js.map +1 -1
- package/dist/commands/library.d.ts.map +1 -1
- package/dist/commands/library.js +14 -6
- package/dist/commands/library.js.map +1 -1
- package/dist/config.d.ts +11 -13
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +63 -54
- package/dist/config.js.map +1 -1
- package/dist/context.d.ts +11 -3
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +20 -7
- package/dist/context.js.map +1 -1
- package/dist/generated/definitions.d.ts.map +1 -1
- package/dist/generated/definitions.js +72 -18
- package/dist/generated/definitions.js.map +1 -1
- package/dist/generated/manifest.d.ts.map +1 -1
- package/dist/generated/manifest.js +49 -0
- package/dist/generated/manifest.js.map +1 -1
- package/dist/generated/schemas.d.ts.map +1 -1
- package/dist/generated/schemas.js +32 -32
- package/dist/generated/schemas.js.map +1 -1
- package/dist/generated/types.d.ts +125 -25
- package/dist/generated/types.d.ts.map +1 -1
- package/dist/generated/wirecat-config.d.ts +13 -0
- package/dist/generated/wirecat-config.d.ts.map +1 -0
- package/dist/generated/wirecat-config.js +82 -0
- package/dist/generated/wirecat-config.js.map +1 -0
- package/dist/library.d.ts +3 -0
- package/dist/library.d.ts.map +1 -1
- package/dist/library.js +11 -1
- package/dist/library.js.map +1 -1
- package/dist/notion/client.d.ts +2 -6
- package/dist/notion/client.d.ts.map +1 -1
- package/dist/notion/client.js +7 -8
- package/dist/notion/client.js.map +1 -1
- package/dist/notion/errors.d.ts +5 -0
- package/dist/notion/errors.d.ts.map +1 -1
- package/dist/notion/errors.js +21 -1
- package/dist/notion/errors.js.map +1 -1
- package/dist/notion/port.d.ts +10 -0
- package/dist/notion/port.d.ts.map +1 -1
- package/dist/notion/port.js +19 -0
- package/dist/notion/port.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +2 -0
- package/dist/program.js.map +1 -1
- package/dist/sync/files.d.ts +12 -0
- package/dist/sync/files.d.ts.map +1 -1
- package/dist/sync/files.js.map +1 -1
- package/dist/sync/from-config.d.ts +13 -0
- package/dist/sync/from-config.d.ts.map +1 -0
- package/dist/sync/from-config.js +32 -0
- package/dist/sync/from-config.js.map +1 -0
- package/dist/sync/source.d.ts +2 -1
- package/dist/sync/source.d.ts.map +1 -1
- package/dist/sync/source.js +48 -48
- package/dist/sync/source.js.map +1 -1
- package/dist/sync/users.d.ts +4 -1
- package/dist/sync/users.d.ts.map +1 -1
- package/dist/sync/users.js +3 -1
- package/dist/sync/users.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +8 -8
- package/dist/bundle/chunk-6EOZTUHT.js +0 -726
- package/dist/bundle/command-contract-TVRFW2IX.js +0 -38
- package/dist/bundle/first-run-7JKE5AHN.js +0 -29
- package/dist/bundle/first-screen-ZROHOEYJ.js +0 -38
- package/dist/bundle/meeting-combined-SSTOJUIJ.js +0 -24
- package/dist/bundle/meeting-model-K7TPS4S5.js +0 -26
- package/dist/bundle/oauth-XBTROXHB.js +0 -20
- package/dist/bundle/server-UC2FNNXX.js +0 -72
- package/dist/bundle/store-maintenance-command-LRGQJPSZ.js +0 -63
|
@@ -3,7 +3,7 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
executableEnvironment,
|
|
5
5
|
executableOnPath
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OCGNOJYD.js";
|
|
7
7
|
import {
|
|
8
8
|
require_cross_spawn
|
|
9
9
|
} from "./chunk-D72URWJE.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
__toESM
|
|
13
13
|
} from "./chunk-ZVVMGPBJ.js";
|
|
14
14
|
|
|
15
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
15
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/mcp/index.js
|
|
16
16
|
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
17
17
|
var realRun = /* @__PURE__ */ __name((file, args) => {
|
|
18
18
|
const result = import_cross_spawn.default.sync(executableOnPath(file, process.env), args, {
|
package/dist/bundle/{mdast-util-from-markdown-R66F4HZA.js → mdast-util-from-markdown-XCR5KW5S.js}
RENAMED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
toString
|
|
5
|
-
} from "./chunk-XFLCVHSQ.js";
|
|
6
3
|
import {
|
|
7
4
|
EditMap,
|
|
8
5
|
attention,
|
|
@@ -16,7 +13,6 @@ import {
|
|
|
16
13
|
codeText,
|
|
17
14
|
combineExtensions,
|
|
18
15
|
content,
|
|
19
|
-
decodeNamedCharacterReference,
|
|
20
16
|
definition,
|
|
21
17
|
factorySpace,
|
|
22
18
|
hardBreakEscape,
|
|
@@ -34,35 +30,32 @@ import {
|
|
|
34
30
|
splice,
|
|
35
31
|
subtokenize,
|
|
36
32
|
thematicBreak
|
|
37
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-OLAGFJDM.js";
|
|
38
34
|
import {
|
|
39
|
-
markdownLineEnding,
|
|
40
35
|
normalizeIdentifier
|
|
41
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-F4BX7TH2.js";
|
|
37
|
+
import {
|
|
38
|
+
stringifyPosition
|
|
39
|
+
} from "./chunk-YHWFF6DN.js";
|
|
40
|
+
import {
|
|
41
|
+
decodeNumericCharacterReference,
|
|
42
|
+
decodeString
|
|
43
|
+
} from "./chunk-WVN2KTNS.js";
|
|
44
|
+
import {
|
|
45
|
+
decodeNamedCharacterReference
|
|
46
|
+
} from "./chunk-6VPC5Z56.js";
|
|
47
|
+
import "./chunk-UPL474OW.js";
|
|
48
|
+
import {
|
|
49
|
+
toString
|
|
50
|
+
} from "./chunk-XFLCVHSQ.js";
|
|
51
|
+
import {
|
|
52
|
+
markdownLineEnding
|
|
53
|
+
} from "./chunk-UC7JLE6J.js";
|
|
42
54
|
import {
|
|
43
55
|
__export,
|
|
44
56
|
__name
|
|
45
57
|
} from "./chunk-ZVVMGPBJ.js";
|
|
46
58
|
|
|
47
|
-
// node_modules/.pnpm/micromark-util-decode-numeric-character-reference@2.0.2/node_modules/micromark-util-decode-numeric-character-reference/index.js
|
|
48
|
-
function decodeNumericCharacterReference(value, base) {
|
|
49
|
-
const code = Number.parseInt(value, base);
|
|
50
|
-
if (
|
|
51
|
-
// C0 except for HT, LF, FF, CR, space.
|
|
52
|
-
code < 9 || code === 11 || code > 13 && code < 32 || // Control character (DEL) of C0, and C1 controls.
|
|
53
|
-
code > 126 && code < 160 || // Lone high surrogates and low surrogates.
|
|
54
|
-
code > 55295 && code < 57344 || // Noncharacters.
|
|
55
|
-
code > 64975 && code < 65008 || /* eslint-disable no-bitwise */
|
|
56
|
-
(code & 65535) === 65535 || (code & 65535) === 65534 || /* eslint-enable no-bitwise */
|
|
57
|
-
// Out of range
|
|
58
|
-
code > 1114111
|
|
59
|
-
) {
|
|
60
|
-
return "\uFFFD";
|
|
61
|
-
}
|
|
62
|
-
return String.fromCodePoint(code);
|
|
63
|
-
}
|
|
64
|
-
__name(decodeNumericCharacterReference, "decodeNumericCharacterReference");
|
|
65
|
-
|
|
66
59
|
// node_modules/.pnpm/micromark@4.0.3/node_modules/micromark/lib/initialize/content.js
|
|
67
60
|
var content2 = {
|
|
68
61
|
tokenize: initializeContent
|
|
@@ -151,24 +144,24 @@ function initializeDocument(effects) {
|
|
|
151
144
|
}
|
|
152
145
|
const indexBeforeExits = self.events.length;
|
|
153
146
|
let indexBeforeFlow = indexBeforeExits;
|
|
154
|
-
let
|
|
147
|
+
let point2;
|
|
155
148
|
while (indexBeforeFlow--) {
|
|
156
149
|
if (self.events[indexBeforeFlow][0] === "exit" && self.events[indexBeforeFlow][1].type === "chunkFlow") {
|
|
157
|
-
|
|
150
|
+
point2 = self.events[indexBeforeFlow][1].end;
|
|
158
151
|
break;
|
|
159
152
|
}
|
|
160
153
|
}
|
|
161
154
|
exitContainers(continued);
|
|
162
|
-
let
|
|
163
|
-
while (
|
|
164
|
-
self.events[
|
|
165
|
-
...
|
|
155
|
+
let index = indexBeforeExits;
|
|
156
|
+
while (index < self.events.length) {
|
|
157
|
+
self.events[index][1].end = {
|
|
158
|
+
...point2
|
|
166
159
|
};
|
|
167
|
-
|
|
160
|
+
index++;
|
|
168
161
|
}
|
|
169
162
|
const editMap = new EditMap();
|
|
170
163
|
editMap.add(indexBeforeFlow + 1, 0, self.events.slice(indexBeforeExits));
|
|
171
|
-
editMap.add(indexBeforeExits,
|
|
164
|
+
editMap.add(indexBeforeExits, index - indexBeforeExits, []);
|
|
172
165
|
editMap.consume(self.events);
|
|
173
166
|
return checkNewContainers(code);
|
|
174
167
|
}
|
|
@@ -263,13 +256,13 @@ function initializeDocument(effects) {
|
|
|
263
256
|
childFlow.defineSkip(token.start);
|
|
264
257
|
childFlow.write(stream);
|
|
265
258
|
if (self.parser.lazy[token.start.line]) {
|
|
266
|
-
let
|
|
267
|
-
while (
|
|
259
|
+
let index = childFlow.events.length;
|
|
260
|
+
while (index--) {
|
|
268
261
|
if (
|
|
269
262
|
// The token starts before the line ending…
|
|
270
|
-
childFlow.events[
|
|
271
|
-
(!childFlow.events[
|
|
272
|
-
childFlow.events[
|
|
263
|
+
childFlow.events[index][1].start.offset < lineStartOffset && // …and either is not ended yet…
|
|
264
|
+
(!childFlow.events[index][1].end || // …or ends after it.
|
|
265
|
+
childFlow.events[index][1].end.offset > lineStartOffset)
|
|
273
266
|
) {
|
|
274
267
|
return;
|
|
275
268
|
}
|
|
@@ -277,35 +270,35 @@ function initializeDocument(effects) {
|
|
|
277
270
|
const indexBeforeExits = self.events.length;
|
|
278
271
|
let indexBeforeFlow = indexBeforeExits;
|
|
279
272
|
let seen;
|
|
280
|
-
let
|
|
273
|
+
let point2;
|
|
281
274
|
while (indexBeforeFlow--) {
|
|
282
275
|
if (self.events[indexBeforeFlow][0] === "exit" && self.events[indexBeforeFlow][1].type === "chunkFlow") {
|
|
283
276
|
if (seen) {
|
|
284
|
-
|
|
277
|
+
point2 = self.events[indexBeforeFlow][1].end;
|
|
285
278
|
break;
|
|
286
279
|
}
|
|
287
280
|
seen = true;
|
|
288
281
|
}
|
|
289
282
|
}
|
|
290
283
|
exitContainers(continued);
|
|
291
|
-
|
|
292
|
-
while (
|
|
293
|
-
self.events[
|
|
294
|
-
...
|
|
284
|
+
index = indexBeforeExits;
|
|
285
|
+
while (index < self.events.length) {
|
|
286
|
+
self.events[index][1].end = {
|
|
287
|
+
...point2
|
|
295
288
|
};
|
|
296
|
-
|
|
289
|
+
index++;
|
|
297
290
|
}
|
|
298
291
|
const editMap = new EditMap();
|
|
299
292
|
editMap.add(indexBeforeFlow + 1, 0, self.events.slice(indexBeforeExits));
|
|
300
|
-
editMap.add(indexBeforeExits,
|
|
293
|
+
editMap.add(indexBeforeExits, index - indexBeforeExits, []);
|
|
301
294
|
editMap.consume(self.events);
|
|
302
295
|
}
|
|
303
296
|
}
|
|
304
297
|
__name(writeToChild, "writeToChild");
|
|
305
298
|
function exitContainers(size) {
|
|
306
|
-
let
|
|
307
|
-
while (
|
|
308
|
-
const entry = stack[
|
|
299
|
+
let index = stack.length;
|
|
300
|
+
while (index-- > size) {
|
|
301
|
+
const entry = stack[index];
|
|
309
302
|
self.containerState = entry[1];
|
|
310
303
|
entry[0].exit.call(self, effects);
|
|
311
304
|
}
|
|
@@ -411,10 +404,10 @@ function initializeFactory(field) {
|
|
|
411
404
|
return true;
|
|
412
405
|
}
|
|
413
406
|
const list2 = constructs[code];
|
|
414
|
-
let
|
|
407
|
+
let index = -1;
|
|
415
408
|
if (list2) {
|
|
416
|
-
while (++
|
|
417
|
-
const item = list2[
|
|
409
|
+
while (++index < list2.length) {
|
|
410
|
+
const item = list2[index];
|
|
418
411
|
if (!item.previous || item.previous.call(self, self.previous)) {
|
|
419
412
|
return true;
|
|
420
413
|
}
|
|
@@ -430,19 +423,19 @@ __name(initializeFactory, "initializeFactory");
|
|
|
430
423
|
function createResolver(extraResolver) {
|
|
431
424
|
return resolveAllText;
|
|
432
425
|
function resolveAllText(events, context) {
|
|
433
|
-
let
|
|
426
|
+
let index = -1;
|
|
434
427
|
let enter;
|
|
435
|
-
while (++
|
|
428
|
+
while (++index <= events.length) {
|
|
436
429
|
if (enter === void 0) {
|
|
437
|
-
if (events[
|
|
438
|
-
enter =
|
|
439
|
-
|
|
430
|
+
if (events[index] && events[index][1].type === "data") {
|
|
431
|
+
enter = index;
|
|
432
|
+
index++;
|
|
440
433
|
}
|
|
441
|
-
} else if (!events[
|
|
442
|
-
if (
|
|
443
|
-
events[enter][1].end = events[
|
|
444
|
-
events.splice(enter + 2,
|
|
445
|
-
|
|
434
|
+
} else if (!events[index] || events[index][1].type !== "data") {
|
|
435
|
+
if (index !== enter + 2) {
|
|
436
|
+
events[enter][1].end = events[index - 1][1].end;
|
|
437
|
+
events.splice(enter + 2, index - enter - 2);
|
|
438
|
+
index = enter + 2;
|
|
446
439
|
}
|
|
447
440
|
enter = void 0;
|
|
448
441
|
}
|
|
@@ -459,12 +452,12 @@ function resolveAllLineSuffixes(events, context) {
|
|
|
459
452
|
if ((eventIndex === events.length || events[eventIndex][1].type === "lineEnding") && events[eventIndex - 1][1].type === "data") {
|
|
460
453
|
const data = events[eventIndex - 1][1];
|
|
461
454
|
const chunks = context.sliceStream(data);
|
|
462
|
-
let
|
|
455
|
+
let index = chunks.length;
|
|
463
456
|
let bufferIndex = -1;
|
|
464
457
|
let size = 0;
|
|
465
458
|
let tabs;
|
|
466
|
-
while (
|
|
467
|
-
const chunk = chunks[
|
|
459
|
+
while (index--) {
|
|
460
|
+
const chunk = chunks[index];
|
|
468
461
|
if (typeof chunk === "string") {
|
|
469
462
|
bufferIndex = chunk.length;
|
|
470
463
|
while (chunk.charCodeAt(bufferIndex - 1) === 32) {
|
|
@@ -480,7 +473,7 @@ function resolveAllLineSuffixes(events, context) {
|
|
|
480
473
|
size++;
|
|
481
474
|
} else if (chunk === -1) {
|
|
482
475
|
} else {
|
|
483
|
-
|
|
476
|
+
index++;
|
|
484
477
|
break;
|
|
485
478
|
}
|
|
486
479
|
}
|
|
@@ -491,8 +484,8 @@ function resolveAllLineSuffixes(events, context) {
|
|
|
491
484
|
const token = {
|
|
492
485
|
type: eventIndex === events.length || tabs || size < 2 ? "lineSuffix" : "hardBreakTrailing",
|
|
493
486
|
start: {
|
|
494
|
-
_bufferIndex:
|
|
495
|
-
_index: data.start._index +
|
|
487
|
+
_bufferIndex: index ? bufferIndex : data.start._bufferIndex + bufferIndex,
|
|
488
|
+
_index: data.start._index + index,
|
|
496
489
|
line: data.end.line,
|
|
497
490
|
column: data.end.column - size,
|
|
498
491
|
offset: data.end.offset - size
|
|
@@ -595,7 +588,7 @@ var disable = {
|
|
|
595
588
|
|
|
596
589
|
// node_modules/.pnpm/micromark@4.0.3/node_modules/micromark/lib/create-tokenizer.js
|
|
597
590
|
function createTokenizer(parser, initialize, from) {
|
|
598
|
-
let
|
|
591
|
+
let point2 = {
|
|
599
592
|
_bufferIndex: -1,
|
|
600
593
|
_index: 0,
|
|
601
594
|
line: from && from.line || 1,
|
|
@@ -661,7 +654,7 @@ function createTokenizer(parser, initialize, from) {
|
|
|
661
654
|
line,
|
|
662
655
|
column,
|
|
663
656
|
offset
|
|
664
|
-
} =
|
|
657
|
+
} = point2;
|
|
665
658
|
return {
|
|
666
659
|
_bufferIndex,
|
|
667
660
|
_index,
|
|
@@ -677,15 +670,15 @@ function createTokenizer(parser, initialize, from) {
|
|
|
677
670
|
}
|
|
678
671
|
__name(defineSkip, "defineSkip");
|
|
679
672
|
function main() {
|
|
680
|
-
while (
|
|
681
|
-
const chunk = chunks[
|
|
673
|
+
while (point2._index < chunks.length) {
|
|
674
|
+
const chunk = chunks[point2._index];
|
|
682
675
|
if (typeof chunk === "string") {
|
|
683
|
-
const chunkIndex =
|
|
684
|
-
if (
|
|
685
|
-
|
|
676
|
+
const chunkIndex = point2._index;
|
|
677
|
+
if (point2._bufferIndex < 0) {
|
|
678
|
+
point2._bufferIndex = 0;
|
|
686
679
|
}
|
|
687
|
-
while (
|
|
688
|
-
go(chunk.charCodeAt(
|
|
680
|
+
while (point2._index === chunkIndex && point2._bufferIndex < chunk.length) {
|
|
681
|
+
go(chunk.charCodeAt(point2._bufferIndex));
|
|
689
682
|
}
|
|
690
683
|
} else {
|
|
691
684
|
go(chunk);
|
|
@@ -701,24 +694,24 @@ function createTokenizer(parser, initialize, from) {
|
|
|
701
694
|
__name(go, "go");
|
|
702
695
|
function consume(code) {
|
|
703
696
|
if (markdownLineEnding(code)) {
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
697
|
+
point2.line++;
|
|
698
|
+
point2.column = 1;
|
|
699
|
+
point2.offset += code === -3 ? 2 : 1;
|
|
707
700
|
accountForPotentialSkip();
|
|
708
701
|
} else if (code !== -1) {
|
|
709
|
-
|
|
710
|
-
|
|
702
|
+
point2.column++;
|
|
703
|
+
point2.offset++;
|
|
711
704
|
}
|
|
712
|
-
if (
|
|
713
|
-
|
|
705
|
+
if (point2._bufferIndex < 0) {
|
|
706
|
+
point2._index++;
|
|
714
707
|
} else {
|
|
715
|
-
|
|
716
|
-
if (
|
|
708
|
+
point2._bufferIndex++;
|
|
709
|
+
if (point2._bufferIndex === // Points w/ non-negative `_bufferIndex` reference
|
|
717
710
|
// strings.
|
|
718
711
|
/** @type {string} */
|
|
719
|
-
chunks[
|
|
720
|
-
|
|
721
|
-
|
|
712
|
+
chunks[point2._index].length) {
|
|
713
|
+
point2._bufferIndex = -1;
|
|
714
|
+
point2._index++;
|
|
722
715
|
}
|
|
723
716
|
}
|
|
724
717
|
context.previous = code;
|
|
@@ -857,7 +850,7 @@ function createTokenizer(parser, initialize, from) {
|
|
|
857
850
|
restore
|
|
858
851
|
};
|
|
859
852
|
function restore() {
|
|
860
|
-
|
|
853
|
+
point2 = startPoint;
|
|
861
854
|
context.previous = startPrevious;
|
|
862
855
|
context.currentConstruct = startCurrentConstruct;
|
|
863
856
|
context.events.length = startEventsIndex;
|
|
@@ -868,9 +861,9 @@ function createTokenizer(parser, initialize, from) {
|
|
|
868
861
|
}
|
|
869
862
|
__name(store, "store");
|
|
870
863
|
function accountForPotentialSkip() {
|
|
871
|
-
if (
|
|
872
|
-
|
|
873
|
-
|
|
864
|
+
if (point2.line in columnStart && point2.column < 2) {
|
|
865
|
+
point2.column = columnStart[point2.line];
|
|
866
|
+
point2.offset += columnStart[point2.line] - 1;
|
|
874
867
|
}
|
|
875
868
|
}
|
|
876
869
|
__name(accountForPotentialSkip, "accountForPotentialSkip");
|
|
@@ -902,11 +895,11 @@ function sliceChunks(chunks, token) {
|
|
|
902
895
|
}
|
|
903
896
|
__name(sliceChunks, "sliceChunks");
|
|
904
897
|
function serializeChunks(chunks, expandTabs) {
|
|
905
|
-
let
|
|
898
|
+
let index = -1;
|
|
906
899
|
const result = [];
|
|
907
900
|
let atTab;
|
|
908
|
-
while (++
|
|
909
|
-
const chunk = chunks[
|
|
901
|
+
while (++index < chunks.length) {
|
|
902
|
+
const chunk = chunks[index];
|
|
910
903
|
let value;
|
|
911
904
|
if (typeof chunk === "string") {
|
|
912
905
|
value = chunk;
|
|
@@ -1066,56 +1059,6 @@ function preprocess() {
|
|
|
1066
1059
|
}
|
|
1067
1060
|
__name(preprocess, "preprocess");
|
|
1068
1061
|
|
|
1069
|
-
// node_modules/.pnpm/micromark-util-decode-string@2.0.1/node_modules/micromark-util-decode-string/index.js
|
|
1070
|
-
var characterEscapeOrReference = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
|
|
1071
|
-
function decodeString(value) {
|
|
1072
|
-
return value.replace(characterEscapeOrReference, decode);
|
|
1073
|
-
}
|
|
1074
|
-
__name(decodeString, "decodeString");
|
|
1075
|
-
function decode($0, $1, $2) {
|
|
1076
|
-
if ($1) {
|
|
1077
|
-
return $1;
|
|
1078
|
-
}
|
|
1079
|
-
const head = $2.charCodeAt(0);
|
|
1080
|
-
if (head === 35) {
|
|
1081
|
-
const head2 = $2.charCodeAt(1);
|
|
1082
|
-
const hex = head2 === 120 || head2 === 88;
|
|
1083
|
-
return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10);
|
|
1084
|
-
}
|
|
1085
|
-
return decodeNamedCharacterReference($2) || $0;
|
|
1086
|
-
}
|
|
1087
|
-
__name(decode, "decode");
|
|
1088
|
-
|
|
1089
|
-
// node_modules/.pnpm/unist-util-stringify-position@4.0.0/node_modules/unist-util-stringify-position/lib/index.js
|
|
1090
|
-
function stringifyPosition(value) {
|
|
1091
|
-
if (!value || typeof value !== "object") {
|
|
1092
|
-
return "";
|
|
1093
|
-
}
|
|
1094
|
-
if ("position" in value || "type" in value) {
|
|
1095
|
-
return position(value.position);
|
|
1096
|
-
}
|
|
1097
|
-
if ("start" in value || "end" in value) {
|
|
1098
|
-
return position(value);
|
|
1099
|
-
}
|
|
1100
|
-
if ("line" in value || "column" in value) {
|
|
1101
|
-
return point(value);
|
|
1102
|
-
}
|
|
1103
|
-
return "";
|
|
1104
|
-
}
|
|
1105
|
-
__name(stringifyPosition, "stringifyPosition");
|
|
1106
|
-
function point(point3) {
|
|
1107
|
-
return index(point3 && point3.line) + ":" + index(point3 && point3.column);
|
|
1108
|
-
}
|
|
1109
|
-
__name(point, "point");
|
|
1110
|
-
function position(pos) {
|
|
1111
|
-
return point(pos && pos.start) + "-" + point(pos && pos.end);
|
|
1112
|
-
}
|
|
1113
|
-
__name(position, "position");
|
|
1114
|
-
function index(value) {
|
|
1115
|
-
return value && typeof value === "number" ? value : 1;
|
|
1116
|
-
}
|
|
1117
|
-
__name(index, "index");
|
|
1118
|
-
|
|
1119
1062
|
// node_modules/.pnpm/mdast-util-from-markdown@2.1.0/node_modules/mdast-util-from-markdown/lib/index.js
|
|
1120
1063
|
var own = {}.hasOwnProperty;
|
|
1121
1064
|
function fromMarkdown(value, encoding, options) {
|
|
@@ -1248,11 +1191,11 @@ function compiler(options) {
|
|
|
1248
1191
|
};
|
|
1249
1192
|
const listStack = [];
|
|
1250
1193
|
const prepared = [];
|
|
1251
|
-
let
|
|
1252
|
-
while (++
|
|
1253
|
-
prepared.push(events[
|
|
1254
|
-
if (events[
|
|
1255
|
-
if (events[
|
|
1194
|
+
let index = -1;
|
|
1195
|
+
while (++index < events.length) {
|
|
1196
|
+
prepared.push(events[index]);
|
|
1197
|
+
if (events[index][1].type === "listOrdered" || events[index][1].type === "listUnordered") {
|
|
1198
|
+
if (events[index][0] === "enter") {
|
|
1256
1199
|
listStack.push(prepared.length - 1);
|
|
1257
1200
|
} else {
|
|
1258
1201
|
const tail = listStack.pop();
|
|
@@ -1261,26 +1204,26 @@ function compiler(options) {
|
|
|
1261
1204
|
}
|
|
1262
1205
|
}
|
|
1263
1206
|
events = prepared;
|
|
1264
|
-
|
|
1265
|
-
while (++
|
|
1266
|
-
const handler = config[events[
|
|
1267
|
-
if (events[
|
|
1207
|
+
index = -1;
|
|
1208
|
+
while (++index < events.length) {
|
|
1209
|
+
const handler = config[events[index][0]];
|
|
1210
|
+
if (events[index][0] === "enter" && config.beforeEnter.length > 0) {
|
|
1268
1211
|
callListeners(config.beforeEnter, {
|
|
1269
1212
|
...context,
|
|
1270
|
-
sliceSerialize: events[
|
|
1271
|
-
}, events[
|
|
1213
|
+
sliceSerialize: events[index][2].sliceSerialize
|
|
1214
|
+
}, events[index][1]);
|
|
1272
1215
|
}
|
|
1273
|
-
if (own.call(handler, events[
|
|
1274
|
-
handler[events[
|
|
1216
|
+
if (own.call(handler, events[index][1].type)) {
|
|
1217
|
+
handler[events[index][1].type].call({
|
|
1275
1218
|
...context,
|
|
1276
|
-
sliceSerialize: events[
|
|
1277
|
-
}, events[
|
|
1219
|
+
sliceSerialize: events[index][2].sliceSerialize
|
|
1220
|
+
}, events[index][1]);
|
|
1278
1221
|
}
|
|
1279
|
-
if (events[
|
|
1222
|
+
if (events[index][0] === "exit" && config.afterExit.length > 0) {
|
|
1280
1223
|
callListeners(config.afterExit, {
|
|
1281
1224
|
...context,
|
|
1282
|
-
sliceSerialize: events[
|
|
1283
|
-
}, events[
|
|
1225
|
+
sliceSerialize: events[index][2].sliceSerialize
|
|
1226
|
+
}, events[index][1]);
|
|
1284
1227
|
}
|
|
1285
1228
|
}
|
|
1286
1229
|
if (context.tokenStack.length > 0) {
|
|
@@ -1289,34 +1232,34 @@ function compiler(options) {
|
|
|
1289
1232
|
handler.call(context, void 0, tail[0]);
|
|
1290
1233
|
}
|
|
1291
1234
|
tree.position = {
|
|
1292
|
-
start:
|
|
1235
|
+
start: point(events.length > 0 ? events[0][1].start : {
|
|
1293
1236
|
line: 1,
|
|
1294
1237
|
column: 1,
|
|
1295
1238
|
offset: 0
|
|
1296
1239
|
}),
|
|
1297
|
-
end:
|
|
1240
|
+
end: point(events.length > 0 ? events[events.length - 2][1].end : {
|
|
1298
1241
|
line: 1,
|
|
1299
1242
|
column: 1,
|
|
1300
1243
|
offset: 0
|
|
1301
1244
|
})
|
|
1302
1245
|
};
|
|
1303
|
-
|
|
1304
|
-
while (++
|
|
1305
|
-
tree = config.transforms[
|
|
1246
|
+
index = -1;
|
|
1247
|
+
while (++index < config.transforms.length) {
|
|
1248
|
+
tree = config.transforms[index](tree) || tree;
|
|
1306
1249
|
}
|
|
1307
1250
|
return tree;
|
|
1308
1251
|
}
|
|
1309
1252
|
__name(compile, "compile");
|
|
1310
1253
|
function callListeners(listeners, context, token) {
|
|
1311
|
-
let
|
|
1312
|
-
while (++
|
|
1313
|
-
listeners[
|
|
1254
|
+
let index = -1;
|
|
1255
|
+
while (++index < listeners.length) {
|
|
1256
|
+
listeners[index].call(context, token);
|
|
1314
1257
|
}
|
|
1315
1258
|
}
|
|
1316
1259
|
__name(callListeners, "callListeners");
|
|
1317
1260
|
function prepareList(events, start) {
|
|
1318
1261
|
const end = events.length - 1;
|
|
1319
|
-
let
|
|
1262
|
+
let index = start - 1;
|
|
1320
1263
|
let containerBalance = -1;
|
|
1321
1264
|
let listSpread = false;
|
|
1322
1265
|
let listItem2;
|
|
@@ -1324,8 +1267,8 @@ function compiler(options) {
|
|
|
1324
1267
|
let firstBlankLineIndex;
|
|
1325
1268
|
let atMarker;
|
|
1326
1269
|
const insertions = [];
|
|
1327
|
-
while (++
|
|
1328
|
-
const event = events[
|
|
1270
|
+
while (++index <= end) {
|
|
1271
|
+
const event = events[index];
|
|
1329
1272
|
switch (event[1].type) {
|
|
1330
1273
|
case "listUnordered":
|
|
1331
1274
|
case "listOrdered":
|
|
@@ -1341,7 +1284,7 @@ function compiler(options) {
|
|
|
1341
1284
|
case "lineEndingBlank": {
|
|
1342
1285
|
if (event[0] === "enter") {
|
|
1343
1286
|
if (listItem2 && !atMarker && !containerBalance && !firstBlankLineIndex) {
|
|
1344
|
-
firstBlankLineIndex =
|
|
1287
|
+
firstBlankLineIndex = index;
|
|
1345
1288
|
}
|
|
1346
1289
|
atMarker = void 0;
|
|
1347
1290
|
}
|
|
@@ -1360,7 +1303,7 @@ function compiler(options) {
|
|
|
1360
1303
|
}
|
|
1361
1304
|
if (!containerBalance && event[0] === "enter" && event[1].type === "listItemPrefix" || containerBalance === -1 && event[0] === "exit" && (event[1].type === "listUnordered" || event[1].type === "listOrdered")) {
|
|
1362
1305
|
if (listItem2) {
|
|
1363
|
-
let tailIndex =
|
|
1306
|
+
let tailIndex = index;
|
|
1364
1307
|
lineIndex = void 0;
|
|
1365
1308
|
while (tailIndex--) {
|
|
1366
1309
|
const tailEvent = events[tailIndex];
|
|
@@ -1382,7 +1325,7 @@ function compiler(options) {
|
|
|
1382
1325
|
}
|
|
1383
1326
|
listItem2.end = Object.assign({}, lineIndex ? events[lineIndex][1].start : event[1].end);
|
|
1384
1327
|
insertions.push({
|
|
1385
|
-
at: lineIndex ||
|
|
1328
|
+
at: lineIndex || index,
|
|
1386
1329
|
event: ["exit", listItem2, event[2]]
|
|
1387
1330
|
});
|
|
1388
1331
|
}
|
|
@@ -1396,7 +1339,7 @@ function compiler(options) {
|
|
|
1396
1339
|
};
|
|
1397
1340
|
listItem2 = item;
|
|
1398
1341
|
insertions.push({
|
|
1399
|
-
at:
|
|
1342
|
+
at: index,
|
|
1400
1343
|
event: ["enter", item, event[2]]
|
|
1401
1344
|
});
|
|
1402
1345
|
firstBlankLineIndex = void 0;
|
|
@@ -1406,12 +1349,12 @@ function compiler(options) {
|
|
|
1406
1349
|
}
|
|
1407
1350
|
const listEvents = events.splice(start);
|
|
1408
1351
|
let insertion = 0;
|
|
1409
|
-
|
|
1410
|
-
while (++
|
|
1411
|
-
while (insertion < insertions.length && insertions[insertion].at === start +
|
|
1352
|
+
index = -1;
|
|
1353
|
+
while (++index < listEvents.length) {
|
|
1354
|
+
while (insertion < insertions.length && insertions[insertion].at === start + index) {
|
|
1412
1355
|
events.push(insertions[insertion++].event);
|
|
1413
1356
|
}
|
|
1414
|
-
events.push(listEvents[
|
|
1357
|
+
events.push(listEvents[index]);
|
|
1415
1358
|
}
|
|
1416
1359
|
events[start][1]._spread = listSpread;
|
|
1417
1360
|
}
|
|
@@ -1439,7 +1382,7 @@ function compiler(options) {
|
|
|
1439
1382
|
this.stack.push(node);
|
|
1440
1383
|
this.tokenStack.push([token, errorHandler || void 0]);
|
|
1441
1384
|
node.position = {
|
|
1442
|
-
start:
|
|
1385
|
+
start: point(token.start),
|
|
1443
1386
|
// @ts-expect-error: `end` will be patched later.
|
|
1444
1387
|
end: void 0
|
|
1445
1388
|
};
|
|
@@ -1471,7 +1414,7 @@ function compiler(options) {
|
|
|
1471
1414
|
handler.call(this, token, open[0]);
|
|
1472
1415
|
}
|
|
1473
1416
|
}
|
|
1474
|
-
node.position.end =
|
|
1417
|
+
node.position.end = point(token.end);
|
|
1475
1418
|
}
|
|
1476
1419
|
__name(exit, "exit");
|
|
1477
1420
|
function resume() {
|
|
@@ -1568,7 +1511,7 @@ function compiler(options) {
|
|
|
1568
1511
|
if (!tail || tail.type !== "text") {
|
|
1569
1512
|
tail = text3();
|
|
1570
1513
|
tail.position = {
|
|
1571
|
-
start:
|
|
1514
|
+
start: point(token.start),
|
|
1572
1515
|
// @ts-expect-error: we’ll add `end` later.
|
|
1573
1516
|
end: void 0
|
|
1574
1517
|
};
|
|
@@ -1580,14 +1523,14 @@ function compiler(options) {
|
|
|
1580
1523
|
function onexitdata(token) {
|
|
1581
1524
|
const tail = this.stack.pop();
|
|
1582
1525
|
tail.value += this.sliceSerialize(token);
|
|
1583
|
-
tail.position.end =
|
|
1526
|
+
tail.position.end = point(token.end);
|
|
1584
1527
|
}
|
|
1585
1528
|
__name(onexitdata, "onexitdata");
|
|
1586
1529
|
function onexitlineending(token) {
|
|
1587
1530
|
const context = this.stack[this.stack.length - 1];
|
|
1588
1531
|
if (this.data.atHardBreak) {
|
|
1589
1532
|
const tail = context.children[context.children.length - 1];
|
|
1590
|
-
tail.position.end =
|
|
1533
|
+
tail.position.end = point(token.end);
|
|
1591
1534
|
this.data.atHardBreak = void 0;
|
|
1592
1535
|
return;
|
|
1593
1536
|
}
|
|
@@ -1718,7 +1661,7 @@ function compiler(options) {
|
|
|
1718
1661
|
__name(onexitcharacterreferencevalue, "onexitcharacterreferencevalue");
|
|
1719
1662
|
function onexitcharacterreference(token) {
|
|
1720
1663
|
const tail = this.stack.pop();
|
|
1721
|
-
tail.position.end =
|
|
1664
|
+
tail.position.end = point(token.end);
|
|
1722
1665
|
}
|
|
1723
1666
|
__name(onexitcharacterreference, "onexitcharacterreference");
|
|
1724
1667
|
function onexitautolinkprotocol(token) {
|
|
@@ -1877,18 +1820,18 @@ function compiler(options) {
|
|
|
1877
1820
|
__name(thematicBreak2, "thematicBreak");
|
|
1878
1821
|
}
|
|
1879
1822
|
__name(compiler, "compiler");
|
|
1880
|
-
function
|
|
1823
|
+
function point(d) {
|
|
1881
1824
|
return {
|
|
1882
1825
|
line: d.line,
|
|
1883
1826
|
column: d.column,
|
|
1884
1827
|
offset: d.offset
|
|
1885
1828
|
};
|
|
1886
1829
|
}
|
|
1887
|
-
__name(
|
|
1830
|
+
__name(point, "point");
|
|
1888
1831
|
function configure(combined, extensions) {
|
|
1889
|
-
let
|
|
1890
|
-
while (++
|
|
1891
|
-
const value = extensions[
|
|
1832
|
+
let index = -1;
|
|
1833
|
+
while (++index < extensions.length) {
|
|
1834
|
+
const value = extensions[index];
|
|
1892
1835
|
if (Array.isArray(value)) {
|
|
1893
1836
|
configure(combined, value);
|
|
1894
1837
|
} else {
|