@aiquants/markdown 9.0.1 → 11.0.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/README.md +161 -52
- package/dist/{abnfDiagram-VRR7QNED-CqzHEoGP.js → abnfDiagram-VRR7QNED-CxQnFjoJ.js} +3 -3
- package/dist/{abnfDiagram-VRR7QNED-CfcidEeF.cjs → abnfDiagram-VRR7QNED-npWEsqYc.cjs} +1 -1
- package/dist/{arc-CIHnI5Tn.js → arc-8h1FB6uq.js} +20 -20
- package/dist/{arc-BD-XC8JG.cjs → arc-CUfL06Yf.cjs} +1 -1
- package/dist/{architectureDiagram-ZJ3FMSHR-CLgC4ySs.cjs → architectureDiagram-ZJ3FMSHR-B20pDRbn.cjs} +1 -1
- package/dist/{architectureDiagram-ZJ3FMSHR-CX5DaRgk.js → architectureDiagram-ZJ3FMSHR-B3AN9LVb.js} +2 -2
- package/dist/{blockDiagram-677ZJIJ3-B45jR5Ef.cjs → blockDiagram-677ZJIJ3-BpyvdB6a.cjs} +1 -1
- package/dist/{blockDiagram-677ZJIJ3-BVvPQ2BZ.js → blockDiagram-677ZJIJ3-Cyl2Lsxi.js} +3 -3
- package/dist/{c4Diagram-LMCZKHZV-CmpNmuYQ.js → c4Diagram-LMCZKHZV-B1v06ANz.js} +2 -2
- package/dist/{c4Diagram-LMCZKHZV-CUgZ93IA.cjs → c4Diagram-LMCZKHZV-C9aMoZww.cjs} +1 -1
- package/dist/{channel-CCNoIO-n.cjs → channel-BFKA8ne6.cjs} +1 -1
- package/dist/{channel-CJnvKaiK.js → channel-DHWInoX5.js} +1 -1
- package/dist/{chunk-2Q5K7J3B-CGvZIrla.cjs → chunk-2Q5K7J3B-CKQJDnvh.cjs} +1 -1
- package/dist/{chunk-2Q5K7J3B-DI5NSXs3.js → chunk-2Q5K7J3B-Hkei_N8G.js} +1 -1
- package/dist/{chunk-32BRIVSS-DBxZTCPU.js → chunk-32BRIVSS-BVjoQVFd.js} +1 -1
- package/dist/{chunk-32BRIVSS-Buxmelj1.cjs → chunk-32BRIVSS-BegSeeKc.cjs} +1 -1
- package/dist/{chunk-5VM5RSS4-DJudqxeH.cjs → chunk-5VM5RSS4-BQ9OvvVm.cjs} +1 -1
- package/dist/{chunk-5VM5RSS4-B3vhx_6_.js → chunk-5VM5RSS4-Bwvu3ZQn.js} +1 -1
- package/dist/{chunk-EX3LRPZG-BYk-yeom.cjs → chunk-EX3LRPZG-Bj_q1v7R.cjs} +1 -1
- package/dist/{chunk-EX3LRPZG-3mU4tF-T.js → chunk-EX3LRPZG-Bz5BV4Fn.js} +4 -4
- package/dist/{chunk-JWPE2WC7-05_7DU1b.js → chunk-JWPE2WC7-C01naS5D.js} +1 -1
- package/dist/{chunk-JWPE2WC7-CF8PY84Z.cjs → chunk-JWPE2WC7-CZGO5NQs.cjs} +1 -1
- package/dist/{chunk-MOJQB5TN-MX6h9dRz.js → chunk-MOJQB5TN-C3Hq75Zv.js} +10 -10
- package/dist/{chunk-MOJQB5TN-C1PxO_ZB.cjs → chunk-MOJQB5TN-DFFX8TKc.cjs} +1 -1
- package/dist/{chunk-PUDLZKDR-nwjWRhQa.cjs → chunk-PUDLZKDR-2MWL0ZoW.cjs} +1 -1
- package/dist/{chunk-PUDLZKDR-CEaKE3Nm.js → chunk-PUDLZKDR-Sz0OB5IT.js} +6 -6
- package/dist/{chunk-RYQCIY6F-DCzkxbV-.js → chunk-RYQCIY6F-CBI5EYhC.js} +12 -12
- package/dist/{chunk-RYQCIY6F-0Xvnmozd.cjs → chunk-RYQCIY6F-CSDblZx6.cjs} +1 -1
- package/dist/{chunk-V7JOEXUC-9kUlPSlw.js → chunk-V7JOEXUC-Br5K_lDL.js} +15 -15
- package/dist/{chunk-V7JOEXUC-DJ6NOMBh.cjs → chunk-V7JOEXUC-D3Y19ZhK.cjs} +1 -1
- package/dist/{chunk-VR4S4FIN-DTcdZAIy.js → chunk-VR4S4FIN-CQXol07w.js} +3 -3
- package/dist/{chunk-VR4S4FIN-DjgjZOol.cjs → chunk-VR4S4FIN-DjxDq6sN.cjs} +1 -1
- package/dist/{chunk-XXDRQBXY-BSD7H18E.js → chunk-XXDRQBXY--FT3CTeH.js} +1 -1
- package/dist/{chunk-XXDRQBXY-BAN-bNyU.cjs → chunk-XXDRQBXY-DwP8HH5V.cjs} +1 -1
- package/dist/{classDiagram-v2-EOCWNBFH-CAVtDASr.js → classDiagram-OUVF2IWQ-HKTI1J11.js} +2 -2
- package/dist/{classDiagram-OUVF2IWQ-D9dkL55K.cjs → classDiagram-OUVF2IWQ-WUNGB5FC.cjs} +1 -1
- package/dist/{classDiagram-OUVF2IWQ-CAVtDASr.js → classDiagram-v2-EOCWNBFH-HKTI1J11.js} +2 -2
- package/dist/{classDiagram-v2-EOCWNBFH-D9dkL55K.cjs → classDiagram-v2-EOCWNBFH-WUNGB5FC.cjs} +1 -1
- package/dist/code-blocks-Bax5Xik7.cjs +4 -0
- package/dist/code-blocks-bgwDIVp1.js +267 -0
- package/dist/code-blocks.cjs +1 -1
- package/dist/code-blocks.d.ts +15 -1
- package/dist/code-blocks.js +19 -34
- package/dist/components/SpreadsheetBlock.d.ts +8 -2
- package/dist/components/SpreadsheetToolbar.d.ts +20 -2
- package/dist/components/blockKeys.d.ts +14 -0
- package/dist/components/controlStyles.d.ts +2 -1
- package/dist/components/spreadsheetClipboard.d.ts +1 -1
- package/dist/components/spreadsheetLabels.d.ts +13 -0
- package/dist/components/spreadsheetModel.d.ts +13 -8
- package/dist/components/toolbar.d.ts +25 -0
- package/dist/components/viewerLabels.d.ts +5 -2
- package/dist/converter.wasm +0 -0
- package/dist/{cose-bilkent-JH36ORCC-aJGIpkTB.js → cose-bilkent-JH36ORCC-BYqXiffa.js} +5 -5
- package/dist/{cose-bilkent-JH36ORCC-KQT29htQ.cjs → cose-bilkent-JH36ORCC-X2Leg8js.cjs} +1 -1
- package/dist/{cynefinDiagram-TSTJHNR4-C_rGUs0a.cjs → cynefinDiagram-TSTJHNR4-DYAvR3E8.cjs} +1 -1
- package/dist/{cynefinDiagram-TSTJHNR4-C3F_WdyT.js → cynefinDiagram-TSTJHNR4-YATbGDfo.js} +47 -47
- package/dist/{dagre-VKFMJZFB-CrmCHDPv.js → dagre-VKFMJZFB-Co2RmhO1.js} +20 -20
- package/dist/{dagre-VKFMJZFB-Bn_WdZ6A.cjs → dagre-VKFMJZFB-yjrP1oXL.cjs} +1 -1
- package/dist/{diagram-FQU43EPY-B8Bka9S6.cjs → diagram-FQU43EPY-DVts5oXk.cjs} +1 -1
- package/dist/{diagram-FQU43EPY-DuJ6IxJz.js → diagram-FQU43EPY-DfigqQP9.js} +2 -2
- package/dist/{diagram-G47NLZAW-D--MA_nT.cjs → diagram-G47NLZAW-Cave3JO_.cjs} +1 -1
- package/dist/{diagram-G47NLZAW-3UXM5joI.js → diagram-G47NLZAW-k5OpX3J4.js} +38 -38
- package/dist/{diagram-NH7WQ7WH-Cqc8orqE.cjs → diagram-NH7WQ7WH-ByEOvB5o.cjs} +1 -1
- package/dist/{diagram-NH7WQ7WH-CtH8Gdkl.js → diagram-NH7WQ7WH-DDA_wiMC.js} +20 -20
- package/dist/{diagram-OA4YK3LP-DfKPIPFJ.cjs → diagram-OA4YK3LP-C85REJhK.cjs} +1 -1
- package/dist/{diagram-OA4YK3LP-CWRyqD4L.js → diagram-OA4YK3LP-DR63MTHd.js} +58 -58
- package/dist/{diagram-WEI45ONY-BYMVLI0Q.cjs → diagram-WEI45ONY-9_82j2nL.cjs} +1 -1
- package/dist/{diagram-WEI45ONY-C0OrOx2a.js → diagram-WEI45ONY-DKy9LVdb.js} +10 -10
- package/dist/{ebnfDiagram-CCIWWBDH-DZKq52yC.cjs → ebnfDiagram-CCIWWBDH-CYd0AUSE.cjs} +1 -1
- package/dist/{ebnfDiagram-CCIWWBDH-CQ7558AK.js → ebnfDiagram-CCIWWBDH-Cn6FnIur.js} +5 -5
- package/dist/{erDiagram-Q63AITRT-CsCp6RSB.js → erDiagram-Q63AITRT-BF_5IEpU.js} +9 -9
- package/dist/{erDiagram-Q63AITRT-CzkYgQ0q.cjs → erDiagram-Q63AITRT-CMIoja24.cjs} +1 -1
- package/dist/{extractHeadings-BUjTmniO.js → extractHeadings-DZi9v6vp.js} +8478 -8138
- package/dist/extractHeadings-sSLGzcdt.cjs +315 -0
- package/dist/fencedBlockLines.d.ts +36 -0
- package/dist/flowDiagram-23GEKE2U-BCDxgNfH.js +7 -0
- package/dist/flowDiagram-23GEKE2U-DDbv1eCW.cjs +1 -0
- package/dist/{ganttDiagram-NO4QXBWP-BVnjew_C.js → ganttDiagram-NO4QXBWP-DEnf80Mq.js} +2 -2
- package/dist/{ganttDiagram-NO4QXBWP-7oIdk62h.cjs → ganttDiagram-NO4QXBWP-Drcm5yEd.cjs} +1 -1
- package/dist/{gitGraphDiagram-IHSO6WYX-BufmbyyT.cjs → gitGraphDiagram-IHSO6WYX-GII6PPu9.cjs} +1 -1
- package/dist/{gitGraphDiagram-IHSO6WYX-fP0zuss4.js → gitGraphDiagram-IHSO6WYX-eyfAn5cz.js} +10 -10
- package/dist/index.cjs +1 -1
- package/dist/index.client.cjs +1 -1
- package/dist/index.client.d.ts +2 -2
- package/dist/index.client.js +37 -35
- package/dist/index.js +37 -35
- package/dist/{infoDiagram-FWYZ7A6U-DerCFmks.cjs → infoDiagram-FWYZ7A6U-C2FBPXIG.cjs} +1 -1
- package/dist/{infoDiagram-FWYZ7A6U-DzsSutoh.js → infoDiagram-FWYZ7A6U-DPC7xHqx.js} +1 -1
- package/dist/{ishikawaDiagram-FXEZZL3T-BN-byOYP.cjs → ishikawaDiagram-FXEZZL3T-CJVI_dU0.cjs} +1 -1
- package/dist/{ishikawaDiagram-FXEZZL3T-BZ_ric9v.js → ishikawaDiagram-FXEZZL3T-DqNbTlei.js} +25 -25
- package/dist/{journeyDiagram-5HDEW3XC-C7iTlBhN.cjs → journeyDiagram-5HDEW3XC-DiVOEWa6.cjs} +1 -1
- package/dist/{journeyDiagram-5HDEW3XC-CfZ11aJu.js → journeyDiagram-5HDEW3XC-DuKx5oFy.js} +4 -4
- package/dist/{kanban-definition-HUTT4EX6-BNNQtqj9.cjs → kanban-definition-HUTT4EX6-BklyDLxL.cjs} +1 -1
- package/dist/{kanban-definition-HUTT4EX6-De7q9Kj3.js → kanban-definition-HUTT4EX6-DezliCFs.js} +52 -52
- package/dist/{linear-Bh2aX99D.js → linear-CdYfVjua.js} +5 -5
- package/dist/{linear-D8TLf9nV.cjs → linear-w1JR48Qh.cjs} +1 -1
- package/dist/{mindmap-definition-LN4V7U3C-3bksVDiB.js → mindmap-definition-LN4V7U3C-7q4b7Jdd.js} +16 -16
- package/dist/{mindmap-definition-LN4V7U3C-CmbdSctZ.cjs → mindmap-definition-LN4V7U3C-BlvTH7wL.cjs} +1 -1
- package/dist/{pegDiagram-2B236MQR-ffi6qFEn.js → pegDiagram-2B236MQR-BPY_9I4m.js} +3 -3
- package/dist/{pegDiagram-2B236MQR-BWozQII1.cjs → pegDiagram-2B236MQR-DirAhjr9.cjs} +1 -1
- package/dist/{pieDiagram-ENE6RG2P-DfTgyWpG.cjs → pieDiagram-ENE6RG2P-CLMNCcZD.cjs} +1 -1
- package/dist/{pieDiagram-ENE6RG2P-De3q_Av5.js → pieDiagram-ENE6RG2P-L4j2AB7Y.js} +51 -51
- package/dist/{quadrantDiagram-ABIIQ3AL-CP7NgI8w.js → quadrantDiagram-ABIIQ3AL-B9uzT4Zl.js} +43 -43
- package/dist/{quadrantDiagram-ABIIQ3AL-BZF5Z12H.cjs → quadrantDiagram-ABIIQ3AL-lyExQfuw.cjs} +1 -1
- package/dist/{railroadDiagram-RFXS5EU6-BuWP-rUP.js → railroadDiagram-RFXS5EU6-BgW-4T7B.js} +7 -7
- package/dist/{railroadDiagram-RFXS5EU6-Cui5Nx7p.cjs → railroadDiagram-RFXS5EU6-u2Ztkufm.cjs} +1 -1
- package/dist/{requirementDiagram-TGXJPOKE-DOEubcGx.js → requirementDiagram-TGXJPOKE-BnyCTa79.js} +18 -18
- package/dist/{requirementDiagram-TGXJPOKE-C-WJSUrB.cjs → requirementDiagram-TGXJPOKE-Cm9r8e07.cjs} +1 -1
- package/dist/{sankeyDiagram-HTMAVEWB-BrD3GLG6.js → sankeyDiagram-HTMAVEWB-Cv3KCrBX.js} +1 -1
- package/dist/{sankeyDiagram-HTMAVEWB-CyT8wRcS.cjs → sankeyDiagram-HTMAVEWB-KJ5WdXGw.cjs} +1 -1
- package/dist/{sequenceDiagram-DBY2YBRQ-CT6w_sxa.js → sequenceDiagram-DBY2YBRQ-CUa9htwo.js} +3 -3
- package/dist/{sequenceDiagram-DBY2YBRQ-DmNBUeEN.cjs → sequenceDiagram-DBY2YBRQ-DYXMeMoq.cjs} +1 -1
- package/dist/{sizeCapture-X5ZJPWSS-h_Xsq3-D.cjs → sizeCapture-X5ZJPWSS-C4RUlRk2.cjs} +1 -1
- package/dist/{sizeCapture-X5ZJPWSS-Dt-2lcQO.js → sizeCapture-X5ZJPWSS-D0cfhTVe.js} +1 -1
- package/dist/{stateDiagram-2N3HPSRC-C9dyCEcu.cjs → stateDiagram-2N3HPSRC-C4DOBTHC.cjs} +1 -1
- package/dist/{stateDiagram-2N3HPSRC-CjJrf8oq.js → stateDiagram-2N3HPSRC-CUQCdjYa.js} +10 -10
- package/dist/{stateDiagram-v2-6OUMAXLB-BhwjG0NA.cjs → stateDiagram-v2-6OUMAXLB-BK27mYqW.cjs} +1 -1
- package/dist/{stateDiagram-v2-6OUMAXLB-APLiC-KL.js → stateDiagram-v2-6OUMAXLB-C1Fb_pKt.js} +2 -2
- package/dist/styles/markdown.css +1 -1
- package/dist/styles/markdown.standalone.css +1 -1
- package/dist/{swimlanes-5IMT3BWC-Dlu3b_xG.js → swimlanes-5IMT3BWC-DUPAete1.js} +313 -313
- package/dist/{swimlanes-5IMT3BWC-DRPswRoa.cjs → swimlanes-5IMT3BWC-DZLnPVID.cjs} +1 -1
- package/dist/{swimlanesDiagram-G3AALYLV-CX2jbFCF.js → swimlanesDiagram-G3AALYLV-BrpRN3Vb.js} +2 -2
- package/dist/{swimlanesDiagram-G3AALYLV-VAEv3KP_.cjs → swimlanesDiagram-G3AALYLV-CMa-ZboO.cjs} +1 -1
- package/dist/{timeline-definition-FHXFAJF6-Ct68OfPR.js → timeline-definition-FHXFAJF6-DC2SJZSb.js} +108 -108
- package/dist/{timeline-definition-FHXFAJF6-C6xF4zqV.cjs → timeline-definition-FHXFAJF6-wvuHQLus.cjs} +1 -1
- package/dist/{vennDiagram-L72KCM5P-CUaYoUAd.cjs → vennDiagram-L72KCM5P-DbIG-wm1.cjs} +1 -1
- package/dist/{vennDiagram-L72KCM5P-BfTAjs8X.js → vennDiagram-L72KCM5P-HK22xYss.js} +101 -101
- package/dist/{wardleyDiagram-EHGQE667-Cp3kY_DT.cjs → wardleyDiagram-EHGQE667-BN2PkxRg.cjs} +1 -1
- package/dist/{wardleyDiagram-EHGQE667-2foz0EAt.js → wardleyDiagram-EHGQE667-JHC6pqAp.js} +85 -85
- package/dist/{xychartDiagram-FW5EYKEG-CDkSOK02.cjs → xychartDiagram-FW5EYKEG-CMRlyJDS.cjs} +1 -1
- package/dist/{xychartDiagram-FW5EYKEG-B3dGYiSE.js → xychartDiagram-FW5EYKEG-DNLQTD-2.js} +40 -40
- package/package.json +11 -11
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +0 -115
- package/dist/extractHeadings-Dkf-aqDu.cjs +0 -314
- package/dist/flowDiagram-23GEKE2U-DwEDOisR.cjs +0 -1
- package/dist/flowDiagram-23GEKE2U-aboipivB.js +0 -7
package/dist/code-blocks.js
CHANGED
|
@@ -1,36 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
header: { field: "headerRows", min: 0, max: 128 },
|
|
3
|
-
footer: { field: "footerRows", min: 0, max: 128 },
|
|
4
|
-
freeze: { field: "frozenColumns", min: 0, max: 128 },
|
|
5
|
-
height: { field: "visibleRows", min: 1, max: 100 }
|
|
6
|
-
}), S = /^([a-z]+)=([0-9]+)$/u, w = /[\t\n\f\r ]+/u, A = (d) => {
|
|
7
|
-
const t = { headerRows: 0, footerRows: 0, frozenColumns: 0, visibleRows: null }, a = d?.replace(/^[\t\n\f\r ]+|[\t\n\f\r ]+$/gu, "") ?? "";
|
|
8
|
-
if (a === "")
|
|
9
|
-
return Object.freeze(t);
|
|
10
|
-
const i = /* @__PURE__ */ new Set();
|
|
11
|
-
for (const r of a.split(w)) {
|
|
12
|
-
const E = S.exec(r);
|
|
13
|
-
if (E === null)
|
|
14
|
-
throw new RangeError(`[@aiquants/markdown] spreadsheet option "${r}" is not key=value with a decimal value`);
|
|
15
|
-
const [, e, o] = E, n = Object.hasOwn(R, e) ? R[e] : void 0;
|
|
16
|
-
if (n === void 0)
|
|
17
|
-
throw new RangeError(`[@aiquants/markdown] unknown spreadsheet option "${e}" (header, footer, freeze and height are read)`);
|
|
18
|
-
if (i.has(e))
|
|
19
|
-
throw new RangeError(`[@aiquants/markdown] spreadsheet option "${e}" is given twice`);
|
|
20
|
-
if (i.add(e), o.length > 1 && o.startsWith("0"))
|
|
21
|
-
throw new RangeError(`[@aiquants/markdown] spreadsheet option "${r}" has leading zeros`);
|
|
22
|
-
const s = Number(o);
|
|
23
|
-
if (s < n.min || s > n.max)
|
|
24
|
-
throw new RangeError(`[@aiquants/markdown] spreadsheet option "${e}" must be between ${n.min} and ${n.max} (got ${o})`);
|
|
25
|
-
t[n.field] = s;
|
|
26
|
-
}
|
|
27
|
-
return Object.freeze(t);
|
|
28
|
-
};
|
|
1
|
+
import { C as a, D as S, M as s, e as A, d as _, S as L, a as d, b as n, c as R, g as O, h as T, i, l as p, o as t, p as D, j as o, r, w as B } from "./code-blocks-bgwDIVp1.js";
|
|
29
2
|
export {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
3
|
+
a as CODE_META_ATTRIBUTE,
|
|
4
|
+
S as DEFAULT_SPREADSHEET_VISIBLE_ROWS,
|
|
5
|
+
s as MAX_SPREADSHEET_FROZEN_TRACKS,
|
|
6
|
+
A as MAX_SPREADSHEET_VISIBLE_ROWS,
|
|
7
|
+
_ as SPREADSHEETS_LANGUAGE,
|
|
8
|
+
L as SPREADSHEET_BLOCK_LABEL_CATALOGS,
|
|
9
|
+
d as SPREADSHEET_BLOCK_LABEL_PLACEHOLDERS,
|
|
10
|
+
n as SPREADSHEET_OPTION_RULES,
|
|
11
|
+
R as SpreadsheetOptionsError,
|
|
12
|
+
O as fencedBodyAsRead,
|
|
13
|
+
T as fencedCodeLanguageOf,
|
|
14
|
+
i as fencedLineHead,
|
|
15
|
+
p as listItemWidthOn,
|
|
16
|
+
t as openingFenceOn,
|
|
17
|
+
D as parseSpreadsheetOptions,
|
|
18
|
+
o as planFencedBodyEdit,
|
|
19
|
+
r as readFencedLine,
|
|
20
|
+
B as whiteSpaceLinesReadEmpty
|
|
36
21
|
};
|
|
@@ -5,11 +5,15 @@ export type SpreadsheetWriteRequest = {
|
|
|
5
5
|
readonly expected: string;
|
|
6
6
|
readonly text: string;
|
|
7
7
|
};
|
|
8
|
+
export type SpreadsheetWriteResult = "written" | "changed" | "closesFence" | "unwritable";
|
|
8
9
|
export type SpreadsheetEditor = {
|
|
9
|
-
readonly write: (request: SpreadsheetWriteRequest) =>
|
|
10
|
+
readonly write: (request: SpreadsheetWriteRequest) => SpreadsheetWriteResult;
|
|
11
|
+
readonly read: (fenceLine: number) => string | null;
|
|
10
12
|
readonly undo: () => void;
|
|
11
13
|
readonly redo: () => void;
|
|
14
|
+
readonly subscribe: (listener: () => void) => () => void;
|
|
12
15
|
};
|
|
16
|
+
export declare const useStableSpreadsheetEditor: (editor: SpreadsheetEditor | undefined) => SpreadsheetEditor | undefined;
|
|
13
17
|
export type SpreadsheetBlockProps = {
|
|
14
18
|
readonly tsv: string;
|
|
15
19
|
readonly meta?: string;
|
|
@@ -17,8 +21,10 @@ export type SpreadsheetBlockProps = {
|
|
|
17
21
|
readonly editor?: SpreadsheetEditor;
|
|
18
22
|
readonly locale?: SpreadsheetBlockLocale;
|
|
19
23
|
readonly labels?: SpreadsheetBlockLabels;
|
|
24
|
+
readonly layout?: SpreadsheetBlockLayout;
|
|
20
25
|
};
|
|
26
|
+
export type SpreadsheetBlockLayout = "inline" | "fill";
|
|
21
27
|
export declare const SpreadsheetBlock: import("react").MemoExoticComponent<{
|
|
22
|
-
({ tsv, meta, sourceLines, editor, locale, labels }: SpreadsheetBlockProps): ReactElement;
|
|
28
|
+
({ tsv, meta, sourceLines, editor, locale, labels, layout }: SpreadsheetBlockProps): ReactElement;
|
|
23
29
|
displayName: string;
|
|
24
30
|
}>;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
import { CellCoord } from "@aiquants/spreadsheet";
|
|
1
2
|
import { ReactElement } from "react";
|
|
2
3
|
import { ResolvedLabel } from "./labels.ts";
|
|
3
4
|
import { SpreadsheetBlockLabelKey } from "./spreadsheetLabels.ts";
|
|
4
5
|
export type SpreadsheetToolbarProps = {
|
|
5
6
|
readonly labels: Readonly<Record<SpreadsheetBlockLabelKey, ResolvedLabel>>;
|
|
7
|
+
readonly labelledBy: string;
|
|
6
8
|
readonly rows: number;
|
|
7
9
|
readonly cols: number;
|
|
8
10
|
readonly canZoomIn: boolean;
|
|
9
11
|
readonly canZoomOut: boolean;
|
|
10
|
-
readonly
|
|
12
|
+
readonly zoom: number;
|
|
11
13
|
readonly onZoom: (direction: 1 | -1) => void;
|
|
12
14
|
readonly onResetZoom: () => void;
|
|
13
15
|
readonly highlighted: boolean;
|
|
@@ -17,5 +19,21 @@ export type SpreadsheetToolbarProps = {
|
|
|
17
19
|
readonly fullscreen: boolean;
|
|
18
20
|
readonly onToggleFullscreen: () => void;
|
|
19
21
|
readonly gridReady: boolean;
|
|
22
|
+
readonly activeCell: ActiveCellStore;
|
|
23
|
+
readonly onTrackSize: (command: TrackSizeCommand) => void;
|
|
20
24
|
};
|
|
21
|
-
export declare const
|
|
25
|
+
export declare const TRACK_SIZE_COMMANDS: readonly [
|
|
26
|
+
"decreaseColumnWidth",
|
|
27
|
+
"increaseColumnWidth",
|
|
28
|
+
"autoFitColumnWidth",
|
|
29
|
+
"decreaseRowHeight",
|
|
30
|
+
"increaseRowHeight"
|
|
31
|
+
];
|
|
32
|
+
export type TrackSizeCommand = (typeof TRACK_SIZE_COMMANDS)[number];
|
|
33
|
+
export type ActiveCellStore = {
|
|
34
|
+
readonly get: () => CellCoord;
|
|
35
|
+
readonly set: (cell: CellCoord) => void;
|
|
36
|
+
readonly subscribe: (listener: () => void) => () => void;
|
|
37
|
+
};
|
|
38
|
+
export declare const createActiveCellStore: () => ActiveCellStore;
|
|
39
|
+
export declare const SpreadsheetToolbar: ({ labels, labelledBy, rows, cols, canZoomIn, canZoomOut, zoom, onZoom, onResetZoom, highlighted, onToggleHighlight, onCopy, onSave, fullscreen, onToggleFullscreen, gridReady, activeCell, onTrackSize }: SpreadsheetToolbarProps) => ReactElement;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type BlockHashes = {
|
|
2
|
+
readonly fingerprint: string;
|
|
3
|
+
readonly content: string;
|
|
4
|
+
};
|
|
5
|
+
export type BlockKey = BlockHashes & {
|
|
6
|
+
readonly key: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const MAX_BLOCK_ALIGNMENT_EDITS = 1024;
|
|
9
|
+
export type BlockPair = readonly [
|
|
10
|
+
previous: number,
|
|
11
|
+
next: number
|
|
12
|
+
];
|
|
13
|
+
export declare const alignBlocks: (previous: readonly BlockHashes[], next: readonly BlockHashes[]) => BlockPair[];
|
|
14
|
+
export declare const assignBlockKeys: (blocks: readonly BlockHashes[], previous: readonly BlockKey[]) => BlockKey[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const CONTROL_CLASS_NAME = "flex size-11 items-center justify-center rounded border p-1 shadow";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const TEXT_CONTROL_CLASS_NAME = "flex h-11 min-w-11 items-center justify-center rounded border px-2 text-sm shadow";
|
|
3
|
+
export declare const MENU_CLASS_NAME = "absolute top-full z-20 mt-1 w-60 overflow-hidden rounded border py-1 text-sm shadow-lg";
|
|
3
4
|
export declare const MENU_ITEM_CLASS_NAME = "flex min-h-11 w-full items-center gap-2 px-3 py-1.5 text-start";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ClipPayload } from "@aiquants/spreadsheet";
|
|
2
2
|
import { TableMatrix } from "./spreadsheetModel.ts";
|
|
3
3
|
export type ClipboardSerializers = {
|
|
4
|
-
readonly
|
|
4
|
+
readonly serializeClipboardTsv: (matrix: TableMatrix) => string;
|
|
5
5
|
readonly serializeClipPayload: (payload: ClipPayload) => string;
|
|
6
6
|
readonly serializeHtmlTable: (payload: ClipPayload, clipJson: string) => string;
|
|
7
7
|
};
|
|
@@ -4,6 +4,7 @@ export interface SpreadsheetBlockLabels {
|
|
|
4
4
|
zoomIn?: string;
|
|
5
5
|
zoomOut?: string;
|
|
6
6
|
resetZoom?: string;
|
|
7
|
+
zoomed?: string;
|
|
7
8
|
highlight?: string;
|
|
8
9
|
copyAll?: string;
|
|
9
10
|
saveTsv?: string;
|
|
@@ -13,21 +14,33 @@ export interface SpreadsheetBlockLabels {
|
|
|
13
14
|
exitFullscreen?: string;
|
|
14
15
|
fullscreenDialog?: string;
|
|
15
16
|
size?: string;
|
|
17
|
+
trackSize?: string;
|
|
18
|
+
decreaseColumnWidth?: string;
|
|
19
|
+
increaseColumnWidth?: string;
|
|
20
|
+
autoFitColumnWidth?: string;
|
|
21
|
+
decreaseRowHeight?: string;
|
|
22
|
+
increaseRowHeight?: string;
|
|
23
|
+
columnResized?: string;
|
|
24
|
+
rowResized?: string;
|
|
16
25
|
fileName?: string;
|
|
17
26
|
copied?: string;
|
|
18
27
|
copyFailed?: string;
|
|
19
28
|
cellAnnouncement?: string;
|
|
29
|
+
readOnlyCellAnnouncement?: string;
|
|
20
30
|
emptyCell?: string;
|
|
21
31
|
selectionAnnouncement?: string;
|
|
22
32
|
readOnly?: string;
|
|
23
33
|
formatRefused?: string;
|
|
24
34
|
fenceRefused?: string;
|
|
25
35
|
editConflict?: string;
|
|
36
|
+
unwritable?: string;
|
|
26
37
|
optionsError?: string;
|
|
38
|
+
tooLarge?: string;
|
|
27
39
|
loadFailed?: string;
|
|
28
40
|
retry?: string;
|
|
29
41
|
}
|
|
30
42
|
export type SpreadsheetBlockLabelKey = keyof SpreadsheetBlockLabels;
|
|
31
43
|
export type SpreadsheetBlockLocale = "en" | "ja";
|
|
32
44
|
export declare const SPREADSHEET_BLOCK_LABEL_CATALOGS: Readonly<Record<SpreadsheetBlockLocale, LabelDefaults<SpreadsheetBlockLabelKey>>>;
|
|
45
|
+
export declare const SPREADSHEET_BLOCK_LABEL_PLACEHOLDERS: Readonly<Record<SpreadsheetBlockLabelKey, readonly string[]>>;
|
|
33
46
|
export declare const fillLabel: (template: string, values: Readonly<Record<string, string | number>>) => string;
|
|
@@ -3,17 +3,23 @@ import { SpreadsheetOptions } from "../code-blocks.ts";
|
|
|
3
3
|
export declare const SPREADSHEET_BLOCK_ROW_HEIGHT_PX = 24;
|
|
4
4
|
export declare const SPREADSHEET_SPARE_ROWS = 1;
|
|
5
5
|
export declare const SPREADSHEET_SPARE_COLUMNS = 1;
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
6
|
+
export declare const PLAIN_CELL_FORMAT: CellFormat;
|
|
7
|
+
export declare const tableCellsOf: (body: string) => number;
|
|
8
|
+
export declare const SPREADSHEET_STATIC_MAX_COLUMNS = 26;
|
|
9
|
+
export declare const staticRowsOf: (table: TableMatrix, visibleRows: number, footerRows: number) => ReadonlyArray<{
|
|
10
|
+
readonly index: number;
|
|
11
|
+
readonly cells: readonly string[];
|
|
12
|
+
}>;
|
|
9
13
|
export type TableMatrix = readonly (readonly string[])[];
|
|
10
14
|
export declare const visibleRowsOf: (options: SpreadsheetOptions, rowCount: number) => number;
|
|
11
|
-
export declare const boxHeightOf: (visibleRows: number) => number;
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const
|
|
15
|
+
export declare const boxHeightOf: (visibleRows: number, zoom: number) => number;
|
|
16
|
+
export declare const zoomPercentOf: (zoom: number) => number;
|
|
17
|
+
export declare const withSpareTracks: (matrix: TableMatrix, spareRows: number, spareColumns: number) => TableMatrix;
|
|
18
|
+
export declare const trimTrailingEmpty: (matrix: TableMatrix) => TableMatrix;
|
|
19
|
+
export declare const tableOf: (body: string) => TableMatrix;
|
|
14
20
|
export type TextEditOutcome = {
|
|
15
21
|
readonly kind: "applied";
|
|
16
|
-
readonly matrix:
|
|
22
|
+
readonly matrix: TableMatrix;
|
|
17
23
|
} | {
|
|
18
24
|
readonly kind: "format-only";
|
|
19
25
|
} | {
|
|
@@ -21,7 +27,6 @@ export type TextEditOutcome = {
|
|
|
21
27
|
};
|
|
22
28
|
export declare const applyTextEdits: (matrix: TableMatrix, edits: readonly CellEdit[]) => TextEditOutcome;
|
|
23
29
|
export declare const bodyTextOf: (matrix: TableMatrix) => string;
|
|
24
|
-
export declare const closesFence: (body: string) => boolean;
|
|
25
30
|
export declare const settleArrivedBody: (pending: readonly string[], arrived: string) => {
|
|
26
31
|
readonly echo: boolean;
|
|
27
32
|
readonly pending: readonly string[];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FocusEvent, KeyboardEvent, ReactElement, ReactNode } from "react";
|
|
2
|
+
import { ResolvedLabel } from "./labels.ts";
|
|
3
|
+
export type DataHook = Readonly<Record<`data-${string}`, string>>;
|
|
4
|
+
export type RovingToolbar = {
|
|
5
|
+
readonly onKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
|
|
6
|
+
readonly onFocus: (event: FocusEvent<HTMLElement>) => void;
|
|
7
|
+
readonly tabIndexOf: (control: string) => 0 | -1;
|
|
8
|
+
};
|
|
9
|
+
export declare const useRovingToolbar: (controls: readonly string[], hook: `data-${string}`) => RovingToolbar;
|
|
10
|
+
export type ToolbarMenuItem = {
|
|
11
|
+
readonly key: string;
|
|
12
|
+
readonly label: ResolvedLabel;
|
|
13
|
+
readonly onSelect: () => void;
|
|
14
|
+
readonly checked?: boolean;
|
|
15
|
+
readonly hook?: DataHook;
|
|
16
|
+
};
|
|
17
|
+
export type ToolbarMenuProps = {
|
|
18
|
+
readonly buttonHook: DataHook;
|
|
19
|
+
readonly menuHook: DataHook;
|
|
20
|
+
readonly label: ResolvedLabel;
|
|
21
|
+
readonly icon: ReactNode;
|
|
22
|
+
readonly tabIndex: 0 | -1;
|
|
23
|
+
readonly items: readonly ToolbarMenuItem[];
|
|
24
|
+
};
|
|
25
|
+
export declare const ToolbarMenu: ({ buttonHook, menuHook, label, icon, tabIndex, items }: ToolbarMenuProps) => ReactElement;
|
|
@@ -8,6 +8,7 @@ export type MermaidViewerLabels = {
|
|
|
8
8
|
export type SpreadsheetViewerLabels = {
|
|
9
9
|
[K in SpreadsheetBlockLabelKey as `spreadsheet${Capitalize<K>}`]?: string;
|
|
10
10
|
};
|
|
11
|
+
type SpreadsheetViewerLabelKey = keyof SpreadsheetViewerLabels;
|
|
11
12
|
export interface MarkdownViewerLabels extends MermaidViewerLabels, SpreadsheetViewerLabels, MarkdownEmbedLabels {
|
|
12
13
|
loading?: string;
|
|
13
14
|
errorPrefix?: string;
|
|
@@ -30,9 +31,11 @@ export interface MarkdownViewerLabels extends MermaidViewerLabels, SpreadsheetVi
|
|
|
30
31
|
alignRight?: string;
|
|
31
32
|
}
|
|
32
33
|
export type MarkdownViewerLabelKey = keyof MarkdownViewerLabels;
|
|
33
|
-
|
|
34
|
-
export
|
|
34
|
+
type ViewerBuiltInLabelKey = Exclude<MarkdownViewerLabelKey, SpreadsheetViewerLabelKey>;
|
|
35
|
+
export declare const DEFAULT_MARKDOWN_VIEWER_LABELS: Readonly<Required<Omit<MarkdownViewerLabels, SpreadsheetViewerLabelKey>>>;
|
|
36
|
+
export type ResolvedViewerLabels = Readonly<Record<ViewerBuiltInLabelKey, ResolvedLabel>>;
|
|
35
37
|
export declare const resolveViewerLabels: (labels: MarkdownViewerLabels | undefined) => ResolvedViewerLabels;
|
|
36
38
|
export declare const toMermaidDiagramLabels: (labels: MarkdownViewerLabels | undefined) => MermaidDiagramLabels;
|
|
37
39
|
export declare const toSpreadsheetBlockLabels: (labels: MarkdownViewerLabels | undefined) => SpreadsheetBlockLabels;
|
|
38
40
|
export declare const toMarkdownEmbedLabels: (labels: MarkdownEmbedLabels | undefined) => MarkdownEmbedLabels;
|
|
41
|
+
export {};
|
package/dist/converter.wasm
CHANGED
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bM as lt, _ as V, R as k, Q as gt } from "./extractHeadings-DZi9v6vp.js";
|
|
2
2
|
import { c as tt } from "./cytoscape.esm-kVAWcYoG.js";
|
|
3
|
-
var Z = { exports: {} },
|
|
3
|
+
var Z = { exports: {} }, Q = { exports: {} }, $ = { exports: {} }, ut = $.exports, j;
|
|
4
4
|
function ft() {
|
|
5
5
|
return j || (j = 1, (function(G, b) {
|
|
6
6
|
(function(I, L) {
|
|
@@ -1602,9 +1602,9 @@ function ft() {
|
|
|
1602
1602
|
])
|
|
1603
1603
|
);
|
|
1604
1604
|
});
|
|
1605
|
-
})(
|
|
1605
|
+
})($)), $.exports;
|
|
1606
1606
|
}
|
|
1607
|
-
var ct =
|
|
1607
|
+
var ct = Q.exports, z;
|
|
1608
1608
|
function pt() {
|
|
1609
1609
|
return z || (z = 1, (function(G, b) {
|
|
1610
1610
|
(function(I, L) {
|
|
@@ -2156,7 +2156,7 @@ function pt() {
|
|
|
2156
2156
|
])
|
|
2157
2157
|
);
|
|
2158
2158
|
});
|
|
2159
|
-
})(
|
|
2159
|
+
})(Q)), Q.exports;
|
|
2160
2160
|
}
|
|
2161
2161
|
var dt = Z.exports, J;
|
|
2162
2162
|
function vt() {
|