@aiquants/markdown 10.0.0 → 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 +157 -51
- package/dist/{abnfDiagram-VRR7QNED-CYA0Qdic.js → abnfDiagram-VRR7QNED-CxQnFjoJ.js} +3 -3
- package/dist/{abnfDiagram-VRR7QNED-eurBMDzU.cjs → abnfDiagram-VRR7QNED-npWEsqYc.cjs} +1 -1
- package/dist/{arc-BEWKpekE.js → arc-8h1FB6uq.js} +20 -20
- package/dist/{arc-DE0KP7Dq.cjs → arc-CUfL06Yf.cjs} +1 -1
- package/dist/{architectureDiagram-ZJ3FMSHR-CGhHOaMo.cjs → architectureDiagram-ZJ3FMSHR-B20pDRbn.cjs} +1 -1
- package/dist/{architectureDiagram-ZJ3FMSHR-CHGNHywO.js → architectureDiagram-ZJ3FMSHR-B3AN9LVb.js} +2 -2
- package/dist/{blockDiagram-677ZJIJ3-BaGVzolE.cjs → blockDiagram-677ZJIJ3-BpyvdB6a.cjs} +1 -1
- package/dist/{blockDiagram-677ZJIJ3-DzwYMqTi.js → blockDiagram-677ZJIJ3-Cyl2Lsxi.js} +3 -3
- package/dist/{c4Diagram-LMCZKHZV-DN0oBwXJ.js → c4Diagram-LMCZKHZV-B1v06ANz.js} +2 -2
- package/dist/{c4Diagram-LMCZKHZV-u10-6vWB.cjs → c4Diagram-LMCZKHZV-C9aMoZww.cjs} +1 -1
- package/dist/{channel-DNeAktxT.cjs → channel-BFKA8ne6.cjs} +1 -1
- package/dist/{channel-jBqxYlqx.js → channel-DHWInoX5.js} +1 -1
- package/dist/{chunk-2Q5K7J3B-D1zCIQMT.cjs → chunk-2Q5K7J3B-CKQJDnvh.cjs} +1 -1
- package/dist/{chunk-2Q5K7J3B-CtqZCJKT.js → chunk-2Q5K7J3B-Hkei_N8G.js} +1 -1
- package/dist/{chunk-32BRIVSS-Cana8p5k.js → chunk-32BRIVSS-BVjoQVFd.js} +1 -1
- package/dist/{chunk-32BRIVSS-DOd1kGZA.cjs → chunk-32BRIVSS-BegSeeKc.cjs} +1 -1
- package/dist/{chunk-5VM5RSS4-DVLwboqR.cjs → chunk-5VM5RSS4-BQ9OvvVm.cjs} +1 -1
- package/dist/{chunk-5VM5RSS4-CQ1lkhhT.js → chunk-5VM5RSS4-Bwvu3ZQn.js} +1 -1
- package/dist/{chunk-EX3LRPZG-yCnsFHxB.cjs → chunk-EX3LRPZG-Bj_q1v7R.cjs} +1 -1
- package/dist/{chunk-EX3LRPZG-Cb1jrGLX.js → chunk-EX3LRPZG-Bz5BV4Fn.js} +4 -4
- package/dist/{chunk-JWPE2WC7-Bkx-q_31.js → chunk-JWPE2WC7-C01naS5D.js} +1 -1
- package/dist/{chunk-JWPE2WC7-BZ9nUeyl.cjs → chunk-JWPE2WC7-CZGO5NQs.cjs} +1 -1
- package/dist/{chunk-MOJQB5TN-DDpWrhot.js → chunk-MOJQB5TN-C3Hq75Zv.js} +10 -10
- package/dist/{chunk-MOJQB5TN-DF1lwGu5.cjs → chunk-MOJQB5TN-DFFX8TKc.cjs} +1 -1
- package/dist/{chunk-PUDLZKDR-BNRDFRXe.cjs → chunk-PUDLZKDR-2MWL0ZoW.cjs} +1 -1
- package/dist/{chunk-PUDLZKDR-BTWY1yiQ.js → chunk-PUDLZKDR-Sz0OB5IT.js} +6 -6
- package/dist/{chunk-RYQCIY6F-B7L5EllI.js → chunk-RYQCIY6F-CBI5EYhC.js} +12 -12
- package/dist/{chunk-RYQCIY6F-B1obSV-6.cjs → chunk-RYQCIY6F-CSDblZx6.cjs} +1 -1
- package/dist/{chunk-V7JOEXUC-Bm_JiVZ3.js → chunk-V7JOEXUC-Br5K_lDL.js} +15 -15
- package/dist/{chunk-V7JOEXUC-CvWipsVi.cjs → chunk-V7JOEXUC-D3Y19ZhK.cjs} +1 -1
- package/dist/{chunk-VR4S4FIN-4KrGYB-C.js → chunk-VR4S4FIN-CQXol07w.js} +3 -3
- package/dist/{chunk-VR4S4FIN-hwPR--n9.cjs → chunk-VR4S4FIN-DjxDq6sN.cjs} +1 -1
- package/dist/{chunk-XXDRQBXY-BWyzGhER.js → chunk-XXDRQBXY--FT3CTeH.js} +1 -1
- package/dist/{chunk-XXDRQBXY-8mWP2-nt.cjs → chunk-XXDRQBXY-DwP8HH5V.cjs} +1 -1
- package/dist/{classDiagram-v2-EOCWNBFH-CJsS9hMZ.js → classDiagram-OUVF2IWQ-HKTI1J11.js} +2 -2
- package/dist/{classDiagram-OUVF2IWQ-FSF9UhMj.cjs → classDiagram-OUVF2IWQ-WUNGB5FC.cjs} +1 -1
- package/dist/{classDiagram-OUVF2IWQ-CJsS9hMZ.js → classDiagram-v2-EOCWNBFH-HKTI1J11.js} +2 -2
- package/dist/{classDiagram-v2-EOCWNBFH-FSF9UhMj.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 +7 -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-BcC-Wwam.js → cose-bilkent-JH36ORCC-BYqXiffa.js} +5 -5
- package/dist/{cose-bilkent-JH36ORCC-DWibrsnW.cjs → cose-bilkent-JH36ORCC-X2Leg8js.cjs} +1 -1
- package/dist/{cynefinDiagram-TSTJHNR4-Cp1h2-e6.cjs → cynefinDiagram-TSTJHNR4-DYAvR3E8.cjs} +1 -1
- package/dist/{cynefinDiagram-TSTJHNR4-Cg1ddgeH.js → cynefinDiagram-TSTJHNR4-YATbGDfo.js} +47 -47
- package/dist/{dagre-VKFMJZFB-BUh2zhjI.js → dagre-VKFMJZFB-Co2RmhO1.js} +20 -20
- package/dist/{dagre-VKFMJZFB-Czh6c6hy.cjs → dagre-VKFMJZFB-yjrP1oXL.cjs} +1 -1
- package/dist/{diagram-FQU43EPY-D3B1dqU1.cjs → diagram-FQU43EPY-DVts5oXk.cjs} +1 -1
- package/dist/{diagram-FQU43EPY-BtWgv1di.js → diagram-FQU43EPY-DfigqQP9.js} +2 -2
- package/dist/{diagram-G47NLZAW-1CaqVF7V.cjs → diagram-G47NLZAW-Cave3JO_.cjs} +1 -1
- package/dist/{diagram-G47NLZAW-BzoAXzcD.js → diagram-G47NLZAW-k5OpX3J4.js} +38 -38
- package/dist/{diagram-NH7WQ7WH-SP-bC7ec.cjs → diagram-NH7WQ7WH-ByEOvB5o.cjs} +1 -1
- package/dist/{diagram-NH7WQ7WH-DHYXjMeR.js → diagram-NH7WQ7WH-DDA_wiMC.js} +20 -20
- package/dist/{diagram-OA4YK3LP-GQmeRf1O.cjs → diagram-OA4YK3LP-C85REJhK.cjs} +1 -1
- package/dist/{diagram-OA4YK3LP-Dpb_X5Hh.js → diagram-OA4YK3LP-DR63MTHd.js} +58 -58
- package/dist/{diagram-WEI45ONY-Dtt-2TEo.cjs → diagram-WEI45ONY-9_82j2nL.cjs} +1 -1
- package/dist/{diagram-WEI45ONY-21kWbraV.js → diagram-WEI45ONY-DKy9LVdb.js} +10 -10
- package/dist/{ebnfDiagram-CCIWWBDH-yz62J_nS.cjs → ebnfDiagram-CCIWWBDH-CYd0AUSE.cjs} +1 -1
- package/dist/{ebnfDiagram-CCIWWBDH-DAA7ae1D.js → ebnfDiagram-CCIWWBDH-Cn6FnIur.js} +5 -5
- package/dist/{erDiagram-Q63AITRT-BMkAjnh7.js → erDiagram-Q63AITRT-BF_5IEpU.js} +9 -9
- package/dist/{erDiagram-Q63AITRT-D8yJBZGU.cjs → erDiagram-Q63AITRT-CMIoja24.cjs} +1 -1
- package/dist/{extractHeadings-BB6ZLvWu.js → extractHeadings-DZi9v6vp.js} +8430 -8099
- 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-BGIvTWCj.js → ganttDiagram-NO4QXBWP-DEnf80Mq.js} +2 -2
- package/dist/{ganttDiagram-NO4QXBWP-NrdWH7Dz.cjs → ganttDiagram-NO4QXBWP-Drcm5yEd.cjs} +1 -1
- package/dist/{gitGraphDiagram-IHSO6WYX-zLZeezJ0.cjs → gitGraphDiagram-IHSO6WYX-GII6PPu9.cjs} +1 -1
- package/dist/{gitGraphDiagram-IHSO6WYX-FeuQFvfT.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-_dgzOtXg.cjs → infoDiagram-FWYZ7A6U-C2FBPXIG.cjs} +1 -1
- package/dist/{infoDiagram-FWYZ7A6U-OSG1m3oM.js → infoDiagram-FWYZ7A6U-DPC7xHqx.js} +1 -1
- package/dist/{ishikawaDiagram-FXEZZL3T-DIGB3OT_.cjs → ishikawaDiagram-FXEZZL3T-CJVI_dU0.cjs} +1 -1
- package/dist/{ishikawaDiagram-FXEZZL3T-CzWd0QMP.js → ishikawaDiagram-FXEZZL3T-DqNbTlei.js} +25 -25
- package/dist/{journeyDiagram-5HDEW3XC-DkxVricX.cjs → journeyDiagram-5HDEW3XC-DiVOEWa6.cjs} +1 -1
- package/dist/{journeyDiagram-5HDEW3XC-BE0OaqTn.js → journeyDiagram-5HDEW3XC-DuKx5oFy.js} +4 -4
- package/dist/{kanban-definition-HUTT4EX6-XxRDkcBx.cjs → kanban-definition-HUTT4EX6-BklyDLxL.cjs} +1 -1
- package/dist/{kanban-definition-HUTT4EX6-BDfhy8eh.js → kanban-definition-HUTT4EX6-DezliCFs.js} +52 -52
- package/dist/{linear-O4EBzkc8.js → linear-CdYfVjua.js} +5 -5
- package/dist/{linear-cHCVVFP4.cjs → linear-w1JR48Qh.cjs} +1 -1
- package/dist/{mindmap-definition-LN4V7U3C-D0hxpmbu.js → mindmap-definition-LN4V7U3C-7q4b7Jdd.js} +16 -16
- package/dist/{mindmap-definition-LN4V7U3C-b3-6eyyt.cjs → mindmap-definition-LN4V7U3C-BlvTH7wL.cjs} +1 -1
- package/dist/{pegDiagram-2B236MQR-RJV3Czqa.js → pegDiagram-2B236MQR-BPY_9I4m.js} +3 -3
- package/dist/{pegDiagram-2B236MQR-BK7uPEAB.cjs → pegDiagram-2B236MQR-DirAhjr9.cjs} +1 -1
- package/dist/{pieDiagram-ENE6RG2P-C_36fpnW.cjs → pieDiagram-ENE6RG2P-CLMNCcZD.cjs} +1 -1
- package/dist/{pieDiagram-ENE6RG2P-DZfsigd-.js → pieDiagram-ENE6RG2P-L4j2AB7Y.js} +51 -51
- package/dist/{quadrantDiagram-ABIIQ3AL-CSp5iqoU.js → quadrantDiagram-ABIIQ3AL-B9uzT4Zl.js} +43 -43
- package/dist/{quadrantDiagram-ABIIQ3AL-vgf1WShL.cjs → quadrantDiagram-ABIIQ3AL-lyExQfuw.cjs} +1 -1
- package/dist/{railroadDiagram-RFXS5EU6-DAsVQQFP.js → railroadDiagram-RFXS5EU6-BgW-4T7B.js} +7 -7
- package/dist/{railroadDiagram-RFXS5EU6-BXR0a-Cu.cjs → railroadDiagram-RFXS5EU6-u2Ztkufm.cjs} +1 -1
- package/dist/{requirementDiagram-TGXJPOKE-DwIrkBKf.js → requirementDiagram-TGXJPOKE-BnyCTa79.js} +18 -18
- package/dist/{requirementDiagram-TGXJPOKE-CRhfuc9R.cjs → requirementDiagram-TGXJPOKE-Cm9r8e07.cjs} +1 -1
- package/dist/{sankeyDiagram-HTMAVEWB-C78HhAJS.js → sankeyDiagram-HTMAVEWB-Cv3KCrBX.js} +1 -1
- package/dist/{sankeyDiagram-HTMAVEWB-BMWqqmDK.cjs → sankeyDiagram-HTMAVEWB-KJ5WdXGw.cjs} +1 -1
- package/dist/{sequenceDiagram-DBY2YBRQ-CnzaQ_rF.js → sequenceDiagram-DBY2YBRQ-CUa9htwo.js} +3 -3
- package/dist/{sequenceDiagram-DBY2YBRQ-Dx5x59tf.cjs → sequenceDiagram-DBY2YBRQ-DYXMeMoq.cjs} +1 -1
- package/dist/{sizeCapture-X5ZJPWSS-C_iDBgb-.cjs → sizeCapture-X5ZJPWSS-C4RUlRk2.cjs} +1 -1
- package/dist/{sizeCapture-X5ZJPWSS-cE-TP8Rj.js → sizeCapture-X5ZJPWSS-D0cfhTVe.js} +1 -1
- package/dist/{stateDiagram-2N3HPSRC-CGTBi2mx.cjs → stateDiagram-2N3HPSRC-C4DOBTHC.cjs} +1 -1
- package/dist/{stateDiagram-2N3HPSRC-BCeQQ1y6.js → stateDiagram-2N3HPSRC-CUQCdjYa.js} +10 -10
- package/dist/{stateDiagram-v2-6OUMAXLB-CxTcyveK.cjs → stateDiagram-v2-6OUMAXLB-BK27mYqW.cjs} +1 -1
- package/dist/{stateDiagram-v2-6OUMAXLB-B_7vWqQA.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-BGZ4AqRG.js → swimlanes-5IMT3BWC-DUPAete1.js} +313 -313
- package/dist/{swimlanes-5IMT3BWC-DoVEQSsm.cjs → swimlanes-5IMT3BWC-DZLnPVID.cjs} +1 -1
- package/dist/{swimlanesDiagram-G3AALYLV-D1qctaY1.js → swimlanesDiagram-G3AALYLV-BrpRN3Vb.js} +2 -2
- package/dist/{swimlanesDiagram-G3AALYLV-CQG6O6Ws.cjs → swimlanesDiagram-G3AALYLV-CMa-ZboO.cjs} +1 -1
- package/dist/{timeline-definition-FHXFAJF6-D7mCctKM.js → timeline-definition-FHXFAJF6-DC2SJZSb.js} +108 -108
- package/dist/{timeline-definition-FHXFAJF6-DfJV7kEg.cjs → timeline-definition-FHXFAJF6-wvuHQLus.cjs} +1 -1
- package/dist/{vennDiagram-L72KCM5P-JBAs3wKP.cjs → vennDiagram-L72KCM5P-DbIG-wm1.cjs} +1 -1
- package/dist/{vennDiagram-L72KCM5P-DpoGG-0p.js → vennDiagram-L72KCM5P-HK22xYss.js} +101 -101
- package/dist/{wardleyDiagram-EHGQE667-QdkaDYYo.cjs → wardleyDiagram-EHGQE667-BN2PkxRg.cjs} +1 -1
- package/dist/{wardleyDiagram-EHGQE667-Dy-eaRgv.js → wardleyDiagram-EHGQE667-JHC6pqAp.js} +85 -85
- package/dist/{xychartDiagram-FW5EYKEG-BRirBzDB.cjs → xychartDiagram-FW5EYKEG-CMRlyJDS.cjs} +1 -1
- package/dist/{xychartDiagram-FW5EYKEG-DosIK9IK.js → xychartDiagram-FW5EYKEG-DNLQTD-2.js} +40 -40
- package/package.json +10 -10
- package/dist/extractHeadings-GvfJwNxO.cjs +0 -314
- package/dist/flowDiagram-23GEKE2U-BZcpYPK4.js +0 -7
- package/dist/flowDiagram-23GEKE2U-CeCAObAc.cjs +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { p as ge } from "./chunk-JWPE2WC7-
|
|
2
|
-
import { _ as w,
|
|
3
|
-
import { s as Ne } from "./chunk-VR4S4FIN-
|
|
1
|
+
import { p as ge } from "./chunk-JWPE2WC7-C01naS5D.js";
|
|
2
|
+
import { _ as w, an as ye, ah as ae, aj as ee, am as Se, U as ve, R as te, bT as B, Q as U, K as xe, J as be, a7 as we, a8 as Ce, G as Te, A as Le, ak as $e, bU as Ae, ad as Fe } from "./extractHeadings-DZi9v6vp.js";
|
|
3
|
+
import { s as Ne } from "./chunk-VR4S4FIN-CQXol07w.js";
|
|
4
4
|
import { p as Me } from "./cynefin-VYW2F7L2-Bkk-F_Js.js";
|
|
5
5
|
import { b as O } from "./defaultLocale-BgPVtth8.js";
|
|
6
|
-
import { o as
|
|
6
|
+
import { o as Z } from "./ordinal-B6-f3MAq.js";
|
|
7
7
|
function _e(t) {
|
|
8
8
|
var a = 0, l = t.children, n = l && l.length;
|
|
9
9
|
if (!n) a = 1;
|
|
@@ -13,13 +13,13 @@ function _e(t) {
|
|
|
13
13
|
function ke() {
|
|
14
14
|
return this.eachAfter(_e);
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function ze(t, a) {
|
|
17
17
|
let l = -1;
|
|
18
18
|
for (const n of this)
|
|
19
19
|
t.call(a, n, ++l, this);
|
|
20
20
|
return this;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function Ve(t, a) {
|
|
23
23
|
for (var l = this, n = [l], s, i, h = -1; l = n.pop(); )
|
|
24
24
|
if (t.call(a, l, ++h, this), s = l.children)
|
|
25
25
|
for (i = s.length - 1; i >= 0; --i)
|
|
@@ -96,7 +96,7 @@ function* qe() {
|
|
|
96
96
|
while (l.length);
|
|
97
97
|
}
|
|
98
98
|
function ne(t, a) {
|
|
99
|
-
t instanceof Map ? (t = [void 0, t], a === void 0 && (a =
|
|
99
|
+
t instanceof Map ? (t = [void 0, t], a === void 0 && (a = Ye)) : a === void 0 && (a = je);
|
|
100
100
|
for (var l = new J(t), n, s = [l], i, h, d, g; n = s.pop(); )
|
|
101
101
|
if ((h = a(n.data)) && (g = (h = Array.from(h)).length))
|
|
102
102
|
for (n.children = h, d = g - 1; d >= 0; --d)
|
|
@@ -106,10 +106,10 @@ function ne(t, a) {
|
|
|
106
106
|
function Xe() {
|
|
107
107
|
return ne(this).eachBefore(Ue);
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function je(t) {
|
|
110
110
|
return t.children;
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function Ye(t) {
|
|
113
113
|
return Array.isArray(t) ? t[1] : null;
|
|
114
114
|
}
|
|
115
115
|
function Ue(t) {
|
|
@@ -127,9 +127,9 @@ function J(t) {
|
|
|
127
127
|
J.prototype = ne.prototype = {
|
|
128
128
|
constructor: J,
|
|
129
129
|
count: ke,
|
|
130
|
-
each:
|
|
130
|
+
each: ze,
|
|
131
131
|
eachAfter: De,
|
|
132
|
-
eachBefore:
|
|
132
|
+
eachBefore: Ve,
|
|
133
133
|
find: Pe,
|
|
134
134
|
sum: Be,
|
|
135
135
|
sort: Re,
|
|
@@ -153,10 +153,10 @@ function q(t) {
|
|
|
153
153
|
return t;
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function Qe(t) {
|
|
157
157
|
t.x0 = Math.round(t.x0), t.y0 = Math.round(t.y0), t.x1 = Math.round(t.x1), t.y1 = Math.round(t.y1);
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function Ze(t, a, l, n, s) {
|
|
160
160
|
for (var i = t.children, h, d = -1, g = i.length, c = t.value && (n - a) / t.value; ++d < g; )
|
|
161
161
|
h = i[d], h.y0 = l, h.y1 = s, h.x0 = a, h.x1 = a += h.value * c;
|
|
162
162
|
}
|
|
@@ -166,19 +166,19 @@ function et(t, a, l, n, s) {
|
|
|
166
166
|
}
|
|
167
167
|
var tt = (1 + Math.sqrt(5)) / 2;
|
|
168
168
|
function at(t, a, l, n, s, i) {
|
|
169
|
-
for (var h = [], d = a.children, g, c, u = 0, b = 0, r = d.length, x, S, v = a.value, p, y, N, $,
|
|
169
|
+
for (var h = [], d = a.children, g, c, u = 0, b = 0, r = d.length, x, S, v = a.value, p, y, N, $, V, W, M; u < r; ) {
|
|
170
170
|
x = s - l, S = i - n;
|
|
171
171
|
do
|
|
172
172
|
p = d[b++].value;
|
|
173
173
|
while (!p && b < r);
|
|
174
|
-
for (y = N = p, W = Math.max(S / x, x / S) / (v * t), M = p * p * W,
|
|
175
|
-
if (p += c = d[b].value, c < y && (y = c), c > N && (N = c), M = p * p * W, $ = Math.max(N / M, M / y), $ >
|
|
174
|
+
for (y = N = p, W = Math.max(S / x, x / S) / (v * t), M = p * p * W, V = Math.max(N / M, M / y); b < r; ++b) {
|
|
175
|
+
if (p += c = d[b].value, c < y && (y = c), c > N && (N = c), M = p * p * W, $ = Math.max(N / M, M / y), $ > V) {
|
|
176
176
|
p -= c;
|
|
177
177
|
break;
|
|
178
178
|
}
|
|
179
|
-
|
|
179
|
+
V = $;
|
|
180
180
|
}
|
|
181
|
-
h.push(g = { value: p, dice: x < S, children: d.slice(u, b) }), g.dice ?
|
|
181
|
+
h.push(g = { value: p, dice: x < S, children: d.slice(u, b) }), g.dice ? Ze(g, l, n, s, v ? n += S * p / v : i) : et(g, l, n, v ? l += x * p / v : s, i), v -= p, u = b;
|
|
182
182
|
}
|
|
183
183
|
return h;
|
|
184
184
|
}
|
|
@@ -193,7 +193,7 @@ const nt = (function t(a) {
|
|
|
193
193
|
function lt() {
|
|
194
194
|
var t = nt, a = !1, l = 1, n = 1, s = [0], i = G, h = G, d = G, g = G, c = G;
|
|
195
195
|
function u(r) {
|
|
196
|
-
return r.x0 = r.y0 = 0, r.x1 = l, r.y1 = n, r.eachBefore(b), s = [0], a && r.eachBefore(
|
|
196
|
+
return r.x0 = r.y0 = 0, r.x1 = l, r.y1 = n, r.eachBefore(b), s = [0], a && r.eachBefore(Qe), r;
|
|
197
197
|
}
|
|
198
198
|
function b(r) {
|
|
199
199
|
var x = s[r.depth], S = r.x0 + x, v = r.y0 + x, p = r.x1 - x, y = r.y1 - x;
|
|
@@ -341,7 +341,7 @@ var st = /* @__PURE__ */ w((t, a) => {
|
|
|
341
341
|
} catch (e) {
|
|
342
342
|
te.error("Error creating format function:", e), p = O(",");
|
|
343
343
|
}
|
|
344
|
-
const y =
|
|
344
|
+
const y = Z().range([
|
|
345
345
|
"transparent",
|
|
346
346
|
c.cScale0,
|
|
347
347
|
c.cScale1,
|
|
@@ -355,7 +355,7 @@ var st = /* @__PURE__ */ w((t, a) => {
|
|
|
355
355
|
c.cScale9,
|
|
356
356
|
c.cScale10,
|
|
357
357
|
c.cScale11
|
|
358
|
-
]), N =
|
|
358
|
+
]), N = Z().range([
|
|
359
359
|
"transparent",
|
|
360
360
|
c.cScalePeer0,
|
|
361
361
|
c.cScalePeer1,
|
|
@@ -369,7 +369,7 @@ var st = /* @__PURE__ */ w((t, a) => {
|
|
|
369
369
|
c.cScalePeer9,
|
|
370
370
|
c.cScalePeer10,
|
|
371
371
|
c.cScalePeer11
|
|
372
|
-
]), $ =
|
|
372
|
+
]), $ = Z().range([
|
|
373
373
|
c.cScaleLabel0,
|
|
374
374
|
c.cScaleLabel1,
|
|
375
375
|
c.cScaleLabel2,
|
|
@@ -384,9 +384,9 @@ var st = /* @__PURE__ */ w((t, a) => {
|
|
|
384
384
|
c.cScaleLabel11
|
|
385
385
|
]);
|
|
386
386
|
d && b.append("text").attr("x", S / 2).attr("y", u / 2).attr("class", "treemapTitle").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(d);
|
|
387
|
-
const
|
|
387
|
+
const V = b.append("g").attr("transform", `translate(0, ${u})`).attr("class", "treemapContainer"), W = ne(g).sum((e) => e.value ?? 0).sort((e, o) => (o.value ?? 0) - (e.value ?? 0)), le = lt().size([r, x]).paddingTop(
|
|
388
388
|
(e) => e.children && e.children.length > 0 ? X + R : 0
|
|
389
|
-
).paddingInner(h).paddingLeft((e) => e.children && e.children.length > 0 ? R : 0).paddingRight((e) => e.children && e.children.length > 0 ? R : 0).paddingBottom((e) => e.children && e.children.length > 0 ? R : 0).round(!0)(W), de = le.descendants().filter((e) => e.children && e.children.length > 0), H =
|
|
389
|
+
).paddingInner(h).paddingLeft((e) => e.children && e.children.length > 0 ? R : 0).paddingRight((e) => e.children && e.children.length > 0 ? R : 0).paddingBottom((e) => e.children && e.children.length > 0 ? R : 0).round(!0)(W), de = le.descendants().filter((e) => e.children && e.children.length > 0), H = V.selectAll(".treemapSection").data(de).enter().append("g").attr("class", "treemapSection").attr("transform", (e) => `translate(${e.x0},${e.y0})`);
|
|
390
390
|
H.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", X).attr("class", "treemapSectionHeader").attr("fill", "none").attr("fill-opacity", 0.6).attr("stroke-width", 0.6).attr("style", (e) => e.depth === 0 ? "display: none;" : ""), H.append("clipPath").attr("id", (e, o) => `clip-section-${a}-${o}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 12)).attr("height", X), H.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", (e, o) => `treemapSection section${o}`).attr("fill", (e) => y(e.data.name)).attr("fill-opacity", 0.6).attr("stroke", (e) => N(e.data.name)).attr("stroke-width", 2).attr("stroke-opacity", 0.4).attr("style", (e) => {
|
|
391
391
|
if (e.depth === 0)
|
|
392
392
|
return "display: none;";
|
|
@@ -407,13 +407,13 @@ var st = /* @__PURE__ */ w((t, a) => {
|
|
|
407
407
|
i.showValues !== !1 && e.value ? T = C - 10 - 30 - 10 - L : T = C - L - 6;
|
|
408
408
|
const m = Math.max(15, T), _ = o.node();
|
|
409
409
|
if (_.getComputedTextLength() > m) {
|
|
410
|
-
let
|
|
411
|
-
for (;
|
|
412
|
-
if (
|
|
410
|
+
let z = f;
|
|
411
|
+
for (; z.length > 0; ) {
|
|
412
|
+
if (z = f.substring(0, z.length - 1), z.length === 0) {
|
|
413
413
|
o.text("..."), _.getComputedTextLength() > m && o.text("");
|
|
414
414
|
break;
|
|
415
415
|
}
|
|
416
|
-
if (o.text(
|
|
416
|
+
if (o.text(z + "..."), _.getComputedTextLength() <= m)
|
|
417
417
|
break;
|
|
418
418
|
}
|
|
419
419
|
}
|
|
@@ -423,8 +423,8 @@ var st = /* @__PURE__ */ w((t, a) => {
|
|
|
423
423
|
const o = "text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:" + $(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", f = B({ cssCompiledStyles: e.data.cssCompiledStyles });
|
|
424
424
|
return o + f.labelStyles.replace("color:", "fill:");
|
|
425
425
|
});
|
|
426
|
-
const se = le.leaves(), A = se.length > 20, ue = A ? 16 : 38,
|
|
427
|
-
|
|
426
|
+
const se = le.leaves(), A = se.length > 20, ue = A ? 16 : 38, j = A ? 14 : 28, D = A ? 4 : 8, I = A ? 4 : 6, K = A ? 2 : 4, re = A ? 8 : 10, Q = A ? 1 : 2, Y = V.selectAll(".treemapLeafGroup").data(se).enter().append("g").attr("class", (e, o) => `treemapNode treemapLeafGroup leaf${o}${e.data.classSelector ? ` ${e.data.classSelector}` : ""}x`).attr("transform", (e) => `translate(${e.x0},${e.y0})`);
|
|
427
|
+
Y.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", "treemapLeaf").attr("fill", (e) => e.parent ? y(e.parent.data.name) : y(e.data.name)).attr("style", (e) => B({ cssCompiledStyles: e.data.cssCompiledStyles }).nodeStyles).attr("fill-opacity", 0.3).attr("stroke", (e) => e.parent ? y(e.parent.data.name) : y(e.data.name)).attr("stroke-width", 3), Y.append("clipPath").attr("id", (e, o) => `clip-${a}-${o}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 4)).attr("height", (e) => Math.max(0, e.y1 - e.y0 - 4)), Y.append("text").attr("class", "treemapLabel").attr("x", (e) => (e.x1 - e.x0) / 2).attr("y", (e) => (e.y1 - e.y0) / 2).attr("style", (e) => {
|
|
428
428
|
const o = `text-anchor: middle; dominant-baseline: middle; font-size: ${ue}px;fill:` + $(e.data.name) + ";", f = B({ cssCompiledStyles: e.data.cssCompiledStyles });
|
|
429
429
|
return o + f.labelStyles.replace("color:", "fill:");
|
|
430
430
|
}).attr("clip-path", (e, o) => `url(#clip-${a}-${o})`).text((e) => e.data.name).each(function(e) {
|
|
@@ -439,18 +439,18 @@ var st = /* @__PURE__ */ w((t, a) => {
|
|
|
439
439
|
m--, o.style("font-size", `${m}px`);
|
|
440
440
|
let F = Math.max(
|
|
441
441
|
I,
|
|
442
|
-
Math.min(
|
|
443
|
-
), k = m +
|
|
442
|
+
Math.min(j, Math.round(m * _))
|
|
443
|
+
), k = m + Q + F;
|
|
444
444
|
for (; k > P && m > D && (m--, F = Math.max(
|
|
445
445
|
I,
|
|
446
|
-
Math.min(
|
|
446
|
+
Math.min(j, Math.round(m * _))
|
|
447
447
|
), !(F < I && m === D)); )
|
|
448
|
-
o.style("font-size", `${m}px`), k = m +
|
|
448
|
+
o.style("font-size", `${m}px`), k = m + Q + F;
|
|
449
449
|
o.style("font-size", `${m}px`), A ? (m < D || P < D) && o.style("display", "none") : (L.getComputedTextLength() > T || m < D || P < m) && o.style("display", "none");
|
|
450
|
-
}), i.showValues !== !1 &&
|
|
450
|
+
}), i.showValues !== !1 && Y.append("text").attr("class", "treemapValue").attr("x", (o) => (o.x1 - o.x0) / 2).attr("y", function(o) {
|
|
451
451
|
return (o.y1 - o.y0) / 2;
|
|
452
452
|
}).attr("style", (o) => {
|
|
453
|
-
const f = `text-anchor: middle; dominant-baseline: hanging; font-size: ${
|
|
453
|
+
const f = `text-anchor: middle; dominant-baseline: hanging; font-size: ${j}px;fill:` + $(o.data.name) + ";", C = B({ cssCompiledStyles: o.data.cssCompiledStyles });
|
|
454
454
|
return f + C.labelStyles.replace("color:", "fill:");
|
|
455
455
|
}).attr("clip-path", (o, f) => `url(#clip-${a}-${f})`).text((o) => o.value ? p(o.value) : "").each(function(o) {
|
|
456
456
|
const f = U(this), C = this.parentNode;
|
|
@@ -465,10 +465,10 @@ var st = /* @__PURE__ */ w((t, a) => {
|
|
|
465
465
|
}
|
|
466
466
|
const T = parseFloat(L.style("font-size")), m = Math.max(
|
|
467
467
|
I,
|
|
468
|
-
Math.min(
|
|
468
|
+
Math.min(j, Math.round(T * 0.6))
|
|
469
469
|
);
|
|
470
470
|
f.style("font-size", `${m}px`);
|
|
471
|
-
const F = (o.y1 - o.y0) / 2 + T / 2 +
|
|
471
|
+
const F = (o.y1 - o.y0) / 2 + T / 2 + Q;
|
|
472
472
|
f.attr("y", F);
|
|
473
473
|
const k = o.x1 - o.x0, ie = o.y1 - o.y0 - 4, me = k - 2 * K;
|
|
474
474
|
f.node().getComputedTextLength() > me || F + m > ie || m < I ? f.style("display", "none") : f.style("display", null);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./chunk-JWPE2WC7-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./chunk-JWPE2WC7-CZGO5NQs.cjs"),a=require("./extractHeadings-sSLGzcdt.cjs"),$=require("./cynefin-VYW2F7L2-MpAliYy9.cjs");var B=a.defaultConfig_default.packet,b,m=(b=class{constructor(){this.packet=[],this.setAccTitle=a.setAccTitle,this.getAccTitle=a.getAccTitle,this.setDiagramTitle=a.setDiagramTitle,this.getDiagramTitle=a.getDiagramTitle,this.getAccDescription=a.getAccDescription,this.setAccDescription=a.setAccDescription}getConfig(){const t=a.cleanAndMerge({...B,...a.getConfig().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){a.clear(),this.packet=[]}},a.__name(b,"PacketDB"),b),C=1e4,S=a.__name((e,t)=>{x.populateCommonDb(e,t);let o=-1,i=[],l=1;const{bitsPerRow:c}=t.getConfig();for(let{start:r,end:s,bits:p,label:d}of e.blocks){if(r!==void 0&&s!==void 0&&s<r)throw new Error(`Packet block ${r} - ${s} is invalid. End must be greater than start.`);if(r??=o+1,r!==o+1)throw new Error(`Packet block ${r} - ${s??r} is not contiguous. It should start from ${o+1}.`);if(p===0)throw new Error(`Packet block ${r} is invalid. Cannot have a zero bit field.`);for(s??=r+(p??1)-1,p??=s-r+1,o=s,a.log.debug(`Packet block ${r} - ${o} with label ${d}`);i.length<=c+1&&t.getPacket().length<C;){const[g,n]=_({start:r,end:s,bits:p,label:d},l,c);if(i.push(g),g.end+1===l*c&&(t.pushWord(i),i=[],l++),!n)break;({start:r,end:s,bits:p,label:d}=n)}}t.pushWord(i)},"populate"),_=a.__name((e,t,o)=>{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*o)return[e,void 0];const i=t*o-1,l=t*o;return[{start:e.start,end:i,label:e.label,bits:i-e.start},{start:l,end:e.end,label:e.label,bits:e.end-l}]},"getNextFittingBlock"),w={parser:{yy:void 0},parse:a.__name(async e=>{const t=await $.parse("packet",e),o=w.parser?.yy;if(!(o instanceof m))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");a.log.debug(t),S(t,o)},"parse")},P=a.__name((e,t,o,i)=>{const l=i.db,c=l.getConfig(),{rowHeight:r,paddingY:s,bitWidth:p,bitsPerRow:d}=c,g=l.getPacket(),n=l.getDiagramTitle(),k=r+s,h=k*(g.length+1)-(n?0:r),f=p*d+2,u=a.selectSvgElement(t);u.attr("viewBox",`0 0 ${f} ${h}`),a.configureSvgSize(u,h,f,c.useMaxWidth);for(const[v,y]of g.entries())T(u,y,v,c);u.append("text").text(n).attr("x",f/2).attr("y",h-k/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),T=a.__name((e,t,o,{rowHeight:i,paddingX:l,paddingY:c,bitWidth:r,bitsPerRow:s,showBits:p})=>{const d=e.append("g"),g=o*(i+c)+c;for(const n of t){const k=n.start%s*r+1,h=(n.end-n.start+1)*r-l;if(d.append("rect").attr("x",k).attr("y",g).attr("width",h).attr("height",i).attr("class","packetBlock"),d.append("text").attr("x",k+h/2).attr("y",g+i/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(n.label),!p)continue;const f=n.end===n.start,u=g-2;d.append("text").attr("x",k+(f?h/2:0)).attr("y",u).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",f?"middle":"start").text(n.start),f||d.append("text").attr("x",k+h).attr("y",u).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(n.end)}},"drawWord"),D={draw:P},E={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},F=a.__name(({packet:e}={})=>{const t=a.cleanAndMerge(E,e);return`
|
|
2
2
|
.packetByte {
|
|
3
3
|
font-size: ${t.byteFontSize};
|
|
4
4
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { p as B } from "./chunk-JWPE2WC7-
|
|
2
|
-
import { _ as b,
|
|
1
|
+
import { p as B } from "./chunk-JWPE2WC7-C01naS5D.js";
|
|
2
|
+
import { _ as b, aj as m, am as C, U as S, R as w, K as D, J as T, a7 as P, a8 as z, G as A, A as E, ah as F, ak as W, ad as _ } from "./extractHeadings-DZi9v6vp.js";
|
|
3
3
|
import { p as N } from "./cynefin-VYW2F7L2-Bkk-F_Js.js";
|
|
4
4
|
var L = W.packet, u, v = (u = class {
|
|
5
5
|
constructor() {
|
|
6
|
-
this.packet = [], this.setAccTitle = D, this.getAccTitle = T, this.setDiagramTitle = P, this.getDiagramTitle = z, this.getAccDescription =
|
|
6
|
+
this.packet = [], this.setAccTitle = D, this.getAccTitle = T, this.setDiagramTitle = P, this.getDiagramTitle = z, this.getAccDescription = A, this.setAccDescription = E;
|
|
7
7
|
}
|
|
8
8
|
getConfig() {
|
|
9
9
|
const t = m({
|
|
10
10
|
...L,
|
|
11
|
-
...
|
|
11
|
+
...F().packet
|
|
12
12
|
});
|
|
13
13
|
return t.showBits && (t.paddingY += 10), t;
|
|
14
14
|
}
|
|
@@ -21,7 +21,7 @@ var L = W.packet, u, v = (u = class {
|
|
|
21
21
|
clear() {
|
|
22
22
|
_(), this.packet = [];
|
|
23
23
|
}
|
|
24
|
-
}, b(u, "PacketDB"), u), M = 1e4,
|
|
24
|
+
}, b(u, "PacketDB"), u), M = 1e4, Y = /* @__PURE__ */ b((e, t) => {
|
|
25
25
|
B(e, t);
|
|
26
26
|
let r = -1, s = [], n = 1;
|
|
27
27
|
const { bitsPerRow: l } = t.getConfig();
|
|
@@ -35,14 +35,14 @@ var L = W.packet, u, v = (u = class {
|
|
|
35
35
|
if (d === 0)
|
|
36
36
|
throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);
|
|
37
37
|
for (i ??= a + (d ?? 1) - 1, d ??= i - a + 1, r = i, w.debug(`Packet block ${a} - ${r} with label ${c}`); s.length <= l + 1 && t.getPacket().length < M; ) {
|
|
38
|
-
const [p, o] =
|
|
38
|
+
const [p, o] = j({ start: a, end: i, bits: d, label: c }, n, l);
|
|
39
39
|
if (s.push(p), p.end + 1 === n * l && (t.pushWord(s), s = [], n++), !o)
|
|
40
40
|
break;
|
|
41
41
|
({ start: a, end: i, bits: d, label: c } = o);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
t.pushWord(s);
|
|
45
|
-
}, "populate"),
|
|
45
|
+
}, "populate"), j = /* @__PURE__ */ b((e, t, r) => {
|
|
46
46
|
if (e.start === void 0)
|
|
47
47
|
throw new Error("start should have been set during first phase");
|
|
48
48
|
if (e.end === void 0)
|
|
@@ -75,24 +75,24 @@ var L = W.packet, u, v = (u = class {
|
|
|
75
75
|
throw new Error(
|
|
76
76
|
"parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues."
|
|
77
77
|
);
|
|
78
|
-
w.debug(t),
|
|
78
|
+
w.debug(t), Y(t, r);
|
|
79
79
|
}, "parse")
|
|
80
80
|
}, G = /* @__PURE__ */ b((e, t, r, s) => {
|
|
81
|
-
const n = s.db, l = n.getConfig(), { rowHeight: a, paddingY: i, bitWidth: d, bitsPerRow: c } = l, p = n.getPacket(), o = n.getDiagramTitle(),
|
|
82
|
-
f.attr("viewBox", `0 0 ${k} ${
|
|
81
|
+
const n = s.db, l = n.getConfig(), { rowHeight: a, paddingY: i, bitWidth: d, bitsPerRow: c } = l, p = n.getPacket(), o = n.getDiagramTitle(), g = a + i, h = g * (p.length + 1) - (o ? 0 : a), k = d * c + 2, f = C(t);
|
|
82
|
+
f.attr("viewBox", `0 0 ${k} ${h}`), S(f, h, k, l.useMaxWidth);
|
|
83
83
|
for (const [y, $] of p.entries())
|
|
84
84
|
I(f, $, y, l);
|
|
85
|
-
f.append("text").text(o).attr("x", k / 2).attr("y",
|
|
85
|
+
f.append("text").text(o).attr("x", k / 2).attr("y", h - g / 2).attr("dominant-baseline", "middle").attr("text-anchor", "middle").attr("class", "packetTitle");
|
|
86
86
|
}, "draw"), I = /* @__PURE__ */ b((e, t, r, { rowHeight: s, paddingX: n, paddingY: l, bitWidth: a, bitsPerRow: i, showBits: d }) => {
|
|
87
87
|
const c = e.append("g"), p = r * (s + l) + l;
|
|
88
88
|
for (const o of t) {
|
|
89
|
-
const
|
|
90
|
-
if (c.append("rect").attr("x",
|
|
89
|
+
const g = o.start % i * a + 1, h = (o.end - o.start + 1) * a - n;
|
|
90
|
+
if (c.append("rect").attr("x", g).attr("y", p).attr("width", h).attr("height", s).attr("class", "packetBlock"), c.append("text").attr("x", g + h / 2).attr("y", p + s / 2).attr("class", "packetLabel").attr("dominant-baseline", "middle").attr("text-anchor", "middle").text(o.label), !d)
|
|
91
91
|
continue;
|
|
92
92
|
const k = o.end === o.start, f = p - 2;
|
|
93
|
-
c.append("text").attr("x",
|
|
93
|
+
c.append("text").attr("x", g + (k ? h / 2 : 0)).attr("y", f).attr("class", "packetByte start").attr("dominant-baseline", "auto").attr("text-anchor", k ? "middle" : "start").text(o.start), k || c.append("text").attr("x", g + h).attr("y", f).attr("class", "packetByte end").attr("dominant-baseline", "auto").attr("text-anchor", "end").text(o.end);
|
|
94
94
|
}
|
|
95
|
-
}, "drawWord"), K = { draw: G },
|
|
95
|
+
}, "drawWord"), K = { draw: G }, O = {
|
|
96
96
|
byteFontSize: "10px",
|
|
97
97
|
startByteColor: "black",
|
|
98
98
|
endByteColor: "black",
|
|
@@ -103,8 +103,8 @@ var L = W.packet, u, v = (u = class {
|
|
|
103
103
|
blockStrokeColor: "black",
|
|
104
104
|
blockStrokeWidth: "1",
|
|
105
105
|
blockFillColor: "#efefef"
|
|
106
|
-
},
|
|
107
|
-
const t = m(
|
|
106
|
+
}, R = /* @__PURE__ */ b(({ packet: e } = {}) => {
|
|
107
|
+
const t = m(O, e);
|
|
108
108
|
return `
|
|
109
109
|
.packetByte {
|
|
110
110
|
font-size: ${t.byteFontSize};
|
|
@@ -129,14 +129,14 @@ var L = W.packet, u, v = (u = class {
|
|
|
129
129
|
fill: ${t.blockFillColor};
|
|
130
130
|
}
|
|
131
131
|
`;
|
|
132
|
-
}, "styles"),
|
|
132
|
+
}, "styles"), X = {
|
|
133
133
|
parser: x,
|
|
134
134
|
get db() {
|
|
135
135
|
return new v();
|
|
136
136
|
},
|
|
137
137
|
renderer: K,
|
|
138
|
-
styles:
|
|
138
|
+
styles: R
|
|
139
139
|
};
|
|
140
140
|
export {
|
|
141
|
-
|
|
141
|
+
X as diagram
|
|
142
142
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("./chunk-2Q5K7J3B-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("./chunk-2Q5K7J3B-CKQJDnvh.cjs"),H=require("./chunk-JWPE2WC7-CZGO5NQs.cjs"),r=require("./extractHeadings-sSLGzcdt.cjs"),z=require("./cynefin-VYW2F7L2-MpAliYy9.cjs");var V=/[─━│┃└┗├┣]/,$=/[└┗├┣]/,O=/[─━]/,T=/^[\s│┃]+$/,B=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,k=/^\s*%%/,X=" ";function D(n){return n.some(e=>V.test(e))}r.__name(D,"isBoxDrawingFormat");function S(n){for(const e of n){const t=$.exec(e);if(t?.index&&t.index>0)return t.index}return 4}r.__name(S,"inferSegmentWidth");function E(n,e){return n.replace(/\bline\s+(\d+)\b/gi,(t,i)=>{const o=parseInt(i,10),c=e.get(o);return c?`line ${c}`:t})}r.__name(E,"remapErrorLines");function N(n){const e=n.split(`
|
|
2
2
|
`),t=new Map;let i=-1;for(const[a,s]of e.entries())if(s.trim()==="treeView-beta"){i=a;break}if(i===-1)return{text:n,lineMap:t};const o=[];for(let a=i+1;a<e.length;a++){const s=e[a];s.trim()===""||k.test(s)||B.test(s)||T.test(s)||o.push(s.replace(/\t/g," "))}if(!D(o))return{text:n,lineMap:t};const c=S(o),l=[];let d=0;for(let a=0;a<=i;a++)l.push(e[a]),d++,t.set(d,a+1);for(let a=i+1;a<e.length;a++){const s=e[a],g=s.trim(),p=a+1;if(g===""){l.push(s),d++,t.set(d,p);continue}if(k.test(s)){l.push(s),d++,t.set(d,p);continue}if(B.test(s)){l.push(s),d++,t.set(d,p);continue}if(T.test(s))continue;const h=s.replace(/\t/g," "),m=$.exec(h);if(m?.index!==void 0){const f=m.index,w=Math.round(f/c)+1;let u=f+1;for(;u<h.length&&O.test(h[u]);)u++;for(;u<h.length&&h[u]===" ";)u++;const _=h.slice(u).trimEnd();if(!_)throw new Error(`Line ${p}: Empty node — expected a filename or directory name after the box-drawing prefix`);const R=X.repeat(w);l.push(R+_),d++,t.set(d,p)}else{if(/^[\s─━│┃└┗├┣]+$/.test(h))continue;if(V.test(h))l.push(s),d++,t.set(d,p);else{if(/^\s+/.test(h))throw new Error(`Line ${p}: Unexpected indentation without box-drawing characters. In box-drawing format, use ├── or └── prefixes for indented nodes.`);l.push(s),d++,t.set(d,p)}}}return{text:l.join(`
|
|
3
3
|
`),lineMap:t}}r.__name(N,"preprocessBoxDrawing");var x=new W.ImperativeState(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),G=r.__name(()=>{x.reset(),r.clear()},"clear"),P=r.__name(()=>x.records.stack[0],"getRoot"),Y=r.__name(()=>x.records.cnt,"getCount"),q=r.defaultConfig_default.treeView,F=r.__name(()=>r.cleanAndMerge(q,r.getConfig().treeView),"getConfig"),j=r.__name((n,e,t,i,o,c)=>{for(;n<=x.records.stack[x.records.stack.length-1].level;)x.records.stack.pop();const l={id:x.records.cnt++,level:n,name:e,nodeType:t,icon:o,cssClass:i,description:c,children:[]};x.records.stack[x.records.stack.length-1].children.push(l),x.records.stack.push(l)},"addNode"),Z={clear:G,addNode:j,getRoot:P,getCount:Y,getConfig:F,getAccTitle:r.getAccTitle,getAccDescription:r.getAccDescription,getDiagramTitle:r.getDiagramTitle,setAccDescription:r.setAccDescription,setAccTitle:r.setAccTitle,setDiagramTitle:r.setDiagramTitle},b=Z,J=r.__name(n=>{H.populateCommonDb(n,b);for(const e of n.nodes){const t=typeof e.indent=="number"?e.indent:0;let i=e.name;const o=i.endsWith("/");o&&(i=i.slice(0,-1));const c=o?"directory":"file",l=e.classAnnotation||void 0,d=e.iconAnnotation,a=d!==void 0?d||"none":void 0,s=e.descAnnotation||void 0,g=s?r.sanitizeText(s,r.getConfig()):void 0;b.addNode(t,i,c,l,a,g)}},"populate"),U={parse:r.__name(async n=>{const{text:e,lineMap:t}=N(n);try{const i=await z.parse("treeView",e);r.log.debug(i),J(i)}catch(i){throw t.size>0&&i instanceof Error&&(i.message=E(i.message,t)),i}},"parse")},v={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:'<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>'},file:{body:'<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>'}}};function L(n,e){const t=e?.filenameIcons?.[n];if(t)return t;const i=n.lastIndexOf(".");if(i>0){const o=n.substring(i).toLowerCase(),c=e?.extensionIcons;return c?.[o]??c?.[o.slice(1)]}}r.__name(L,"detectIcon");function C(n,e){return n.includes(":")?n:n in v.icons||!e?`${v.prefix}:${n}`:`${e}:${n}`}r.__name(C,"qualifyIcon");function I(n,e){if(n.icon!=="none"){if(n.icon)return C(n.icon,e.defaultIconPack);if(e.showIcons){if(n.nodeType==="file"){const t=L(n.name,e);if(t==="none")return;if(t)return C(t,e.defaultIconPack)}return`${v.prefix}:${n.nodeType==="directory"?"folder":"file"}`}}}r.__name(I,"getNodeIcon");r.registerIconPacks([{name:v.prefix,icons:v}]);var y=14,K=4,Q=16,M=r.__name((n,e)=>`tv-icon-${n}-${e.replace(/[^\w-]/g,"-")}`,"iconSymbolId"),ee=r.__name(async(n,e,t,i)=>{const o=new Set,c=r.__name(a=>{const s=I(a,t);s&&o.add(s),a.children.forEach(c)},"collect");if(c(e),o.size===0)return;const l=await Promise.all([...o].map(async a=>({icon:a,svg:await r.getIconSVG(a,{height:y,width:y})}))),d=n.append("defs");for(const{icon:a,svg:s}of l)d.append("g").attr("id",M(i,a)).html(s)},"injectIconDefs"),te=r.__name((n,e,t,i,o,c)=>{const l=i.append("g");let d="treeView-node-label";t.nodeType==="directory"&&(d+=" treeView-node-dir"),t.cssClass&&(d+=` ${t.cssClass}`);const a=y+K,s=I(t,o),g=s!==void 0;s&&l.append("use").attr("xlink:href",`#${M(c,s)}`).attr("x",n+o.paddingX).attr("y",e+o.paddingY).attr("class","treeView-node-icon");const p=l.append("text").text(t.name).attr("dominant-baseline","middle").attr("class",d),{height:h,width:m}=p.node().getBBox(),f=h+o.paddingY*2,w=n+o.paddingX+(g?a:0);p.attr("x",w),p.attr("y",e+f/2);const u=w+m,_=m+o.paddingX*2+(g?a:0);return t.BBox={x:n,y:e,width:_,height:f},t.cssClass?.split(/\s+/).includes("highlight")&&l.insert("rect",":first-child").attr("x",n).attr("y",e+1).attr("width",0).attr("height",f-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:t,nodeGroup:l,labelRightEdge:u,centerY:e+f/2}},"positionLabel"),A=r.__name((n,e,t,i,o,c)=>n.append("line").attr("x1",e).attr("y1",t).attr("x2",i).attr("y2",o).attr("stroke-width",c).attr("class","treeView-node-line"),"positionLine"),ne=r.__name((n,e,t,i)=>{let o=0,c=0;const l=[],d=r.__name((g,p,h,m)=>{const f=m*(h.rowIndent+h.paddingX),w=te(f,o,p,g,h,i);l.push(w);const{height:u,width:_}=p.BBox;A(g,f-h.rowIndent,o+u/2,f,o+u/2,h.lineThickness),c=Math.max(c,f+_),o+=u},"drawNode"),a=r.__name((g,p=0)=>{d(n,g,t,p),g.children.forEach(w=>{a(w,p+1)});const{x:h,y:m,height:f}=g.BBox;if(g.children.length){const{y:w,height:u}=g.children[g.children.length-1].BBox;A(n,h+t.paddingX,m+f,h+t.paddingX,w+u/2+t.lineThickness/2,t.lineThickness)}},"processNode");a(e);const s=l.filter(g=>g.node.description);if(s.length>0){const p=Math.max(...l.map(h=>h.labelRightEdge))+Q;for(const h of s){const f=h.nodeGroup.append("text").text(h.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",p).attr("y",h.centerY).node().getBBox();c=Math.max(c,p+f.width+t.paddingX)}}for(const g of l)if(g.node.cssClass?.split(/\s+/).includes("highlight")){const p=g.nodeGroup.select(".treeView-highlight-bg");if(!p.empty()){const h=c-g.node.BBox.x+8;p.attr("width",h),c=Math.max(c,g.node.BBox.x+h+2)}}return{totalHeight:o,totalWidth:c}},"drawTree"),re=r.__name(async(n,e,t,i)=>{r.log.debug(`Rendering treeView diagram
|
|
4
4
|
`+n);const o=i.db,c=o.getRoot(),l=o.getConfig(),d=r.selectSvgElement(e);await ee(d,c,l,e);const a=d.append("g");a.attr("class","tree-view");const{totalHeight:s,totalWidth:g}=ne(a,c,l,e);d.attr("viewBox",`-${l.lineThickness/2} 0 ${g} ${s}`),r.configureSvgSize(d,s,g,l.useMaxWidth)},"draw"),ie={draw:re},oe=ie,se={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},ae=r.__name(({treeView:n})=>{const{labelFontSize:e,labelColor:t,lineColor:i,iconColor:o,descriptionColor:c,highlightBg:l,highlightStroke:d}=r.cleanAndMerge(se,n);return`
|