@aiquants/markdown 6.1.0 → 6.3.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 +75 -2
- package/dist/{abnfDiagram-VRR7QNED-DRNsVB-u.cjs → abnfDiagram-VRR7QNED-BGUmgNQ4.cjs} +1 -1
- package/dist/{abnfDiagram-VRR7QNED-0ow9i3L-.js → abnfDiagram-VRR7QNED-D3L_2hCD.js} +3 -3
- package/dist/{arc-BWR9_qMf.cjs → arc-B48_ucR0.cjs} +1 -1
- package/dist/arc-ChEpDr_9.js +83 -0
- package/dist/{architectureDiagram-ZJ3FMSHR-DtrqDlxV.cjs → architectureDiagram-ZJ3FMSHR-Bg0dBVnf.cjs} +1 -1
- package/dist/{architectureDiagram-ZJ3FMSHR-CsFXQcxx.js → architectureDiagram-ZJ3FMSHR-D4ta1ajC.js} +2 -2
- package/dist/{blockDiagram-677ZJIJ3-CqQ43viF.js → blockDiagram-677ZJIJ3-CupyE7nK.js} +3 -3
- package/dist/{blockDiagram-677ZJIJ3-CoZEeE0C.cjs → blockDiagram-677ZJIJ3-DkWMy8pP.cjs} +1 -1
- package/dist/{c4Diagram-LMCZKHZV-QPgNg4El.js → c4Diagram-LMCZKHZV-Cy1lIde9.js} +2 -2
- package/dist/{c4Diagram-LMCZKHZV-DGA2gxp-.cjs → c4Diagram-LMCZKHZV-DxOKAkJI.cjs} +1 -1
- package/dist/{channel-PnA15jK3.js → channel-C9c0_XwC.js} +1 -1
- package/dist/{channel-Jkgg7NV4.cjs → channel-TOZvPft0.cjs} +1 -1
- package/dist/{chunk-2Q5K7J3B-1iQ5h7FK.cjs → chunk-2Q5K7J3B-DaGwwho3.cjs} +1 -1
- package/dist/{chunk-2Q5K7J3B-DOWfHP5s.js → chunk-2Q5K7J3B-DahzXbiI.js} +1 -1
- package/dist/{chunk-32BRIVSS-XUAL4SUU.cjs → chunk-32BRIVSS-BddWRgx3.cjs} +1 -1
- package/dist/{chunk-32BRIVSS-94iTIA-u.js → chunk-32BRIVSS-DFLtYkrI.js} +1 -1
- package/dist/{chunk-5VM5RSS4-CKgpuXOS.cjs → chunk-5VM5RSS4-DSg2-2mp.cjs} +1 -1
- package/dist/{chunk-5VM5RSS4-OANQKmQE.js → chunk-5VM5RSS4-DiwEVqol.js} +1 -1
- package/dist/{chunk-EX3LRPZG-BQDQ1MdS.js → chunk-EX3LRPZG-Ca4uquaA.js} +37 -37
- package/dist/{chunk-EX3LRPZG-BrRRbskW.cjs → chunk-EX3LRPZG-OD-kvRfM.cjs} +1 -1
- package/dist/{chunk-JWPE2WC7-Bz9dXsLZ.cjs → chunk-JWPE2WC7-BGdnK7yg.cjs} +1 -1
- package/dist/{chunk-JWPE2WC7-Djg6Qi23.js → chunk-JWPE2WC7-njgGfGvE.js} +1 -1
- package/dist/{chunk-MOJQB5TN-1pZNp2Wl.js → chunk-MOJQB5TN-B-H_fDpi.js} +11 -11
- package/dist/{chunk-MOJQB5TN-DUk2Jy4_.cjs → chunk-MOJQB5TN-DPs_chEk.cjs} +1 -1
- package/dist/{chunk-PUDLZKDR-G5JYyEiR.js → chunk-PUDLZKDR-9xQzJ025.js} +11 -11
- package/dist/{chunk-PUDLZKDR-CVedetzB.cjs → chunk-PUDLZKDR-DZphdeDg.cjs} +1 -1
- package/dist/{chunk-RYQCIY6F-D0y50t5B.cjs → chunk-RYQCIY6F-8Qpsw4iJ.cjs} +1 -1
- package/dist/{chunk-RYQCIY6F-Crmt36sO.js → chunk-RYQCIY6F-BNzT71C4.js} +10 -10
- package/dist/{chunk-V7JOEXUC-DXSQM1ea.cjs → chunk-V7JOEXUC-BPE4_Rfd.cjs} +1 -1
- package/dist/{chunk-V7JOEXUC-BNo-X7NC.js → chunk-V7JOEXUC-DG6RRlOY.js} +10 -10
- package/dist/{chunk-VR4S4FIN-Bc567umS.cjs → chunk-VR4S4FIN-C-Pbv_Mm.cjs} +1 -1
- package/dist/{chunk-VR4S4FIN-BGGITgpQ.js → chunk-VR4S4FIN-CLtgFgby.js} +1 -1
- package/dist/{chunk-XXDRQBXY-DOuLpiJ4.cjs → chunk-XXDRQBXY-B0bOz96Q.cjs} +1 -1
- package/dist/{chunk-XXDRQBXY-Drnpl-KK.js → chunk-XXDRQBXY-DEXdwwNg.js} +1 -1
- package/dist/{classDiagram-v2-EOCWNBFH-Cneye7qT.js → classDiagram-OUVF2IWQ-B9uAd2dg.js} +2 -2
- package/dist/{classDiagram-OUVF2IWQ-mmjBEYmN.cjs → classDiagram-OUVF2IWQ-DMqQXVMf.cjs} +1 -1
- package/dist/{classDiagram-OUVF2IWQ-Cneye7qT.js → classDiagram-v2-EOCWNBFH-B9uAd2dg.js} +2 -2
- package/dist/{classDiagram-v2-EOCWNBFH-mmjBEYmN.cjs → classDiagram-v2-EOCWNBFH-DMqQXVMf.cjs} +1 -1
- package/dist/components/HostedScrollArea.d.ts +15 -0
- package/dist/components/MarkdownViewer.d.ts +3 -1
- package/dist/components/MermaidDiagram.d.ts +1 -0
- package/dist/components/mdastNodes/CodeNode.d.ts +2 -1
- package/dist/components/mermaidInteraction.d.ts +1 -0
- package/dist/{cose-bilkent-JH36ORCC-BQWfGE1G.js → cose-bilkent-JH36ORCC-DVB8IdFe.js} +5 -5
- package/dist/{cose-bilkent-JH36ORCC-BaEdcRlX.cjs → cose-bilkent-JH36ORCC-DxpO_Qhk.cjs} +1 -1
- package/dist/{cynefinDiagram-TSTJHNR4-CTDDSUz7.js → cynefinDiagram-TSTJHNR4-C-iEKX8r.js} +28 -28
- package/dist/{cynefinDiagram-TSTJHNR4-DPQl09kC.cjs → cynefinDiagram-TSTJHNR4-Dvc8nHOe.cjs} +1 -1
- package/dist/{dagre-VKFMJZFB-BMRdJgZy.js → dagre-VKFMJZFB-CI1hyGqk.js} +9 -9
- package/dist/{dagre-VKFMJZFB-DZ4E-Szs.cjs → dagre-VKFMJZFB-DqU8jG6A.cjs} +1 -1
- package/dist/{diagram-FQU43EPY-mK9YHIy1.cjs → diagram-FQU43EPY-DQHw46B-.cjs} +1 -1
- package/dist/{diagram-FQU43EPY-CmEpNw5i.js → diagram-FQU43EPY-iMIQEr1Q.js} +25 -25
- package/dist/{diagram-G47NLZAW-BX8Lj_uD.cjs → diagram-G47NLZAW-Dxkn-83c.cjs} +1 -1
- package/dist/{diagram-G47NLZAW-eJRQFjAg.js → diagram-G47NLZAW-L7A0K5es.js} +25 -25
- package/dist/{diagram-NH7WQ7WH-BOOj_4-N.js → diagram-NH7WQ7WH-8BnG6h8J.js} +19 -19
- package/dist/{diagram-NH7WQ7WH-3r1_3TrC.cjs → diagram-NH7WQ7WH-CBMFD5SB.cjs} +1 -1
- package/dist/{diagram-OA4YK3LP-DnDIHtcW.js → diagram-OA4YK3LP-C24uGaef.js} +13 -13
- package/dist/{diagram-OA4YK3LP-CkDJzLOy.cjs → diagram-OA4YK3LP-DrD1SsZM.cjs} +1 -1
- package/dist/{diagram-WEI45ONY-BpCCo_Ty.cjs → diagram-WEI45ONY-BYN2qTiw.cjs} +1 -1
- package/dist/{diagram-WEI45ONY-BHpuPTt-.js → diagram-WEI45ONY-kBWsy9sQ.js} +35 -35
- package/dist/{ebnfDiagram-CCIWWBDH-CfdalXdM.cjs → ebnfDiagram-CCIWWBDH-C7whdHrV.cjs} +1 -1
- package/dist/{ebnfDiagram-CCIWWBDH-BDLB-AVF.js → ebnfDiagram-CCIWWBDH-DRfaz75o.js} +3 -3
- package/dist/embeds/testing.cjs +1 -1
- package/dist/embeds/testing.js +1 -1
- package/dist/embeds.cjs +1 -1
- package/dist/embeds.js +1 -1
- package/dist/{erDiagram-Q63AITRT-CviOyQsx.cjs → erDiagram-Q63AITRT-Cbh7ns6U.cjs} +1 -1
- package/dist/{erDiagram-Q63AITRT-DZlcgZfp.js → erDiagram-Q63AITRT-CvcOag5w.js} +4 -4
- package/dist/extractHeadings-By3kC3b_.cjs +311 -0
- package/dist/{extractHeadings-CtiYkq2z.js → extractHeadings-Dz8gnhsx.js} +5108 -5006
- package/dist/flowDiagram-23GEKE2U-C5ygxVuP.js +7 -0
- package/dist/flowDiagram-23GEKE2U-DSpM0zzA.cjs +1 -0
- package/dist/{ganttDiagram-NO4QXBWP-DO0HAbYg.js → ganttDiagram-NO4QXBWP-Ccrw6Vga.js} +2 -2
- package/dist/{ganttDiagram-NO4QXBWP-CJa-hKPU.cjs → ganttDiagram-NO4QXBWP-YWoWQpTa.cjs} +1 -1
- package/dist/gen/markdown/v1/markdown_pb.d.ts +1 -0
- package/dist/{gitGraphDiagram-IHSO6WYX-CXStgPQs.js → gitGraphDiagram-IHSO6WYX-C-mHT-ew.js} +3 -3
- package/dist/{gitGraphDiagram-IHSO6WYX-CXcPHbkt.cjs → gitGraphDiagram-IHSO6WYX-nKm0aLrL.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.client.cjs +1 -1
- package/dist/index.client.d.ts +1 -0
- package/dist/index.client.js +33 -32
- package/dist/index.js +33 -32
- package/dist/index.server.cjs +1 -1
- package/dist/index.server.js +59 -38
- package/dist/{infoDiagram-FWYZ7A6U-BByoHihL.cjs → infoDiagram-FWYZ7A6U-B6uUqDCC.cjs} +1 -1
- package/dist/{infoDiagram-FWYZ7A6U-K0__ySEG.js → infoDiagram-FWYZ7A6U-HBcwdQ6Z.js} +3 -3
- package/dist/{ishikawaDiagram-FXEZZL3T-C8QlwQP1.js → ishikawaDiagram-FXEZZL3T-CcSYEsTJ.js} +18 -18
- package/dist/{ishikawaDiagram-FXEZZL3T-DZOMdeTI.cjs → ishikawaDiagram-FXEZZL3T-D9WZm1OZ.cjs} +1 -1
- package/dist/{journeyDiagram-5HDEW3XC-RvC77rKo.cjs → journeyDiagram-5HDEW3XC-BC3ajweK.cjs} +1 -1
- package/dist/{journeyDiagram-5HDEW3XC-CZ9PFNNN.js → journeyDiagram-5HDEW3XC-PJm-8Gz8.js} +30 -30
- package/dist/{kanban-definition-HUTT4EX6-Q12F4vHx.js → kanban-definition-HUTT4EX6-42_dEzBV.js} +120 -120
- package/dist/{kanban-definition-HUTT4EX6-BL1jihGl.cjs → kanban-definition-HUTT4EX6-BR-C1joQ.cjs} +1 -1
- package/dist/{linear-LWjATjog.js → linear-B7J7VKh9.js} +8 -8
- package/dist/{linear-lDvPoqlB.cjs → linear-CoCezkp4.cjs} +1 -1
- package/dist/markdown.css +1 -1
- package/dist/{mindmap-definition-LN4V7U3C-TVYKONRm.cjs → mindmap-definition-LN4V7U3C-BO555Yeu.cjs} +1 -1
- package/dist/{mindmap-definition-LN4V7U3C-CM1XvwJX.js → mindmap-definition-LN4V7U3C-e4fXdr28.js} +16 -16
- package/dist/{pegDiagram-2B236MQR-a9Up0ERY.cjs → pegDiagram-2B236MQR-CqN17IwE.cjs} +1 -1
- package/dist/{pegDiagram-2B236MQR-Dlrnikqd.js → pegDiagram-2B236MQR-nN-jUv5o.js} +3 -3
- package/dist/{pieDiagram-ENE6RG2P-ClakmSma.cjs → pieDiagram-ENE6RG2P-D_EIGKcE.cjs} +1 -1
- package/dist/{pieDiagram-ENE6RG2P-WYrEJp8U.js → pieDiagram-ENE6RG2P-EvhF_8o2.js} +60 -60
- package/dist/providers-BO7J62-7.cjs +1 -0
- package/dist/{providers-Drq7MT_K.js → providers-L5RM3KgR.js} +23 -23
- package/dist/{quadrantDiagram-ABIIQ3AL-BkgMVDaX.js → quadrantDiagram-ABIIQ3AL-2gTiccyy.js} +18 -18
- package/dist/{quadrantDiagram-ABIIQ3AL-Cb01YcqR.cjs → quadrantDiagram-ABIIQ3AL-HNTFSQzi.cjs} +1 -1
- package/dist/{railroadDiagram-RFXS5EU6-Bob4WSMz.cjs → railroadDiagram-RFXS5EU6-CRuA7qqW.cjs} +1 -1
- package/dist/{railroadDiagram-RFXS5EU6-RfCtZGUR.js → railroadDiagram-RFXS5EU6-CYAI9-bK.js} +3 -3
- package/dist/remarkProcessor.server.d.ts +1 -0
- package/dist/{requirementDiagram-TGXJPOKE-C1yJPMp1.js → requirementDiagram-TGXJPOKE-BZc_cLKC.js} +3 -3
- package/dist/{requirementDiagram-TGXJPOKE-BP5h9mCj.cjs → requirementDiagram-TGXJPOKE-DesNyieJ.cjs} +1 -1
- package/dist/{sankeyDiagram-HTMAVEWB-D5G9Dcmr.js → sankeyDiagram-HTMAVEWB-B1QsmzsN.js} +1 -1
- package/dist/{sankeyDiagram-HTMAVEWB-shq9WK4t.cjs → sankeyDiagram-HTMAVEWB-wLwqusl2.cjs} +1 -1
- package/dist/{sequenceDiagram-DBY2YBRQ-BRxcK5-5.cjs → sequenceDiagram-DBY2YBRQ-D3ciEWOE.cjs} +1 -1
- package/dist/{sequenceDiagram-DBY2YBRQ-8EJMQxiB.js → sequenceDiagram-DBY2YBRQ-OTeHr40Q.js} +3 -3
- package/dist/{sizeCapture-X5ZJPWSS-DJG85IuR.js → sizeCapture-X5ZJPWSS-BhcQlLlw.js} +1 -1
- package/dist/{sizeCapture-X5ZJPWSS-BtBRJO2R.cjs → sizeCapture-X5ZJPWSS-LlzRMz8i.cjs} +1 -1
- package/dist/source-lines.cjs +1 -0
- package/dist/source-lines.d.ts +6 -0
- package/dist/source-lines.js +11 -0
- package/dist/{stateDiagram-2N3HPSRC-Czgkv_ey.cjs → stateDiagram-2N3HPSRC-D0q856z6.cjs} +1 -1
- package/dist/{stateDiagram-2N3HPSRC-CAd-NU-f.js → stateDiagram-2N3HPSRC-DjLE1--n.js} +11 -11
- package/dist/{stateDiagram-v2-6OUMAXLB-BNP5Lx0Y.cjs → stateDiagram-v2-6OUMAXLB-DJHUGWBX.cjs} +1 -1
- package/dist/{stateDiagram-v2-6OUMAXLB-x_Zps-d5.js → stateDiagram-v2-6OUMAXLB-DKU0HsD1.js} +2 -2
- package/dist/styles/markdown.css +1 -1
- package/dist/{swimlanes-5IMT3BWC-CfdkDd3q.cjs → swimlanes-5IMT3BWC-DC6qS8iI.cjs} +1 -1
- package/dist/{swimlanes-5IMT3BWC-D8brzzxb.js → swimlanes-5IMT3BWC-cxcj_GGS.js} +3 -3
- package/dist/{swimlanesDiagram-G3AALYLV-Bc9-lR2e.js → swimlanesDiagram-G3AALYLV-B95OToWo.js} +2 -2
- package/dist/{swimlanesDiagram-G3AALYLV-dvJpSdGV.cjs → swimlanesDiagram-G3AALYLV-Dv76fKaH.cjs} +1 -1
- package/dist/{timeline-definition-FHXFAJF6-CKW3NJOF.js → timeline-definition-FHXFAJF6-P-5kO0xQ.js} +38 -38
- package/dist/{timeline-definition-FHXFAJF6-BSqACati.cjs → timeline-definition-FHXFAJF6-wD6O9DDR.cjs} +1 -1
- package/dist/{vennDiagram-L72KCM5P-ChKxsFyJ.cjs → vennDiagram-L72KCM5P-BXHvaRtm.cjs} +1 -1
- package/dist/{vennDiagram-L72KCM5P-vPmq984y.js → vennDiagram-L72KCM5P-BwinGtNb.js} +102 -102
- package/dist/{wardleyDiagram-EHGQE667-CxzlR7km.cjs → wardleyDiagram-EHGQE667-BDgwIQTf.cjs} +1 -1
- package/dist/{wardleyDiagram-EHGQE667-CwN9zwBX.js → wardleyDiagram-EHGQE667-BeYbREE2.js} +18 -18
- package/dist/{xychartDiagram-FW5EYKEG-DBSKTLuc.js → xychartDiagram-FW5EYKEG-BXjx9Zgc.js} +27 -27
- package/dist/{xychartDiagram-FW5EYKEG-wJqYRInm.cjs → xychartDiagram-FW5EYKEG-DLCCDPGO.cjs} +1 -1
- package/package.json +14 -7
- package/dist/arc-Bh12k776.js +0 -83
- package/dist/extractHeadings-D1A8WzVy.cjs +0 -311
- package/dist/flowDiagram-23GEKE2U-C_FW0q38.js +0 -7
- package/dist/flowDiagram-23GEKE2U-Cb0U58EU.cjs +0 -1
- package/dist/providers-Bxr2Wb-j.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-njgGfGvE.js";
|
|
2
|
+
import { _ as w, am as ye, ag as ae, ai as ee, al as Se, R as ve, Q as te, bS as B, O as J, J as xe, G as be, a6 as we, a7 as Ce, A as Te, z as Le, aj as $e, bT as Ae, ac as Fe } from "./extractHeadings-Dz8gnhsx.js";
|
|
3
|
+
import { s as Ne } from "./chunk-VR4S4FIN-CLtgFgby.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 K } 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;
|
|
@@ -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 Q(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)
|
|
@@ -104,15 +104,15 @@ function ne(t, a) {
|
|
|
104
104
|
return l.eachBefore(Qe);
|
|
105
105
|
}
|
|
106
106
|
function Xe() {
|
|
107
|
-
return ne(this).eachBefore(
|
|
107
|
+
return ne(this).eachBefore(Je);
|
|
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
|
-
function
|
|
115
|
+
function Je(t) {
|
|
116
116
|
t.data.value !== void 0 && (t.value = t.data.value), t.data = t.data.data;
|
|
117
117
|
}
|
|
118
118
|
function Qe(t) {
|
|
@@ -156,7 +156,7 @@ function q(t) {
|
|
|
156
156
|
function Ze(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 Ke(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
|
}
|
|
@@ -178,7 +178,7 @@ function at(t, a, l, n, s, i) {
|
|
|
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 ? Ke(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
|
}
|
|
@@ -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 = K().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 = K().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
|
+
]), $ = K().range([
|
|
373
373
|
c.cScaleLabel0,
|
|
374
374
|
c.cScaleLabel1,
|
|
375
375
|
c.cScaleLabel2,
|
|
@@ -400,7 +400,7 @@ var st = /* @__PURE__ */ w((t, a) => {
|
|
|
400
400
|
}).each(function(e) {
|
|
401
401
|
if (e.depth === 0)
|
|
402
402
|
return;
|
|
403
|
-
const o =
|
|
403
|
+
const o = J(this), f = e.data.name;
|
|
404
404
|
o.text(f);
|
|
405
405
|
const C = e.x1 - e.x0, L = 6;
|
|
406
406
|
let T;
|
|
@@ -423,12 +423,12 @@ 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, U = A ? 2 : 4, re = A ? 8 : 10, Z = 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) {
|
|
431
|
-
const o =
|
|
431
|
+
const o = J(this), f = e.x1 - e.x0, C = e.y1 - e.y0, L = o.node(), T = f - 2 * U, P = C - 2 * U;
|
|
432
432
|
if (T < re || P < re) {
|
|
433
433
|
o.style("display", "none");
|
|
434
434
|
return;
|
|
@@ -439,33 +439,33 @@ 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(
|
|
442
|
+
Math.min(j, Math.round(m * _))
|
|
443
443
|
), k = m + Z + 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
448
|
o.style("font-size", `${m}px`), k = m + Z + 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
|
-
const f =
|
|
456
|
+
const f = J(this), C = this.parentNode;
|
|
457
457
|
if (!C) {
|
|
458
458
|
f.style("display", "none");
|
|
459
459
|
return;
|
|
460
460
|
}
|
|
461
|
-
const L =
|
|
461
|
+
const L = J(C).select(".treemapLabel");
|
|
462
462
|
if (L.empty() || L.style("display") === "none") {
|
|
463
463
|
f.style("display", "none");
|
|
464
464
|
return;
|
|
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
471
|
const F = (o.y1 - o.y0) / 2 + T / 2 + Z;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as B } from "./chunk-JWPE2WC7-
|
|
2
|
-
import { _ as b,
|
|
1
|
+
import { p as B } from "./chunk-JWPE2WC7-njgGfGvE.js";
|
|
2
|
+
import { _ as b, ai as m, al as C, R as S, Q as w, J as D, G as T, a6 as z, a7 as P, A, z as E, ag as F, aj as W, ac as _ } from "./extractHeadings-Dz8gnhsx.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() {
|
|
@@ -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(), h = a + i, g = h * (p.length + 1) - (o ? 0 : a), k = d * c + 2, f = C(t);
|
|
82
|
+
f.attr("viewBox", `0 0 ${k} ${g}`), S(f, g, 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", g - h / 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 h = o.start % i * a + 1, g = (o.end - o.start + 1) * a - n;
|
|
90
|
+
if (c.append("rect").attr("x", h).attr("y", p).attr("width", g).attr("height", s).attr("class", "packetBlock"), c.append("text").attr("x", h + g / 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", h + (k ? g / 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", h + g).attr("y", f).attr("class", "packetByte end").attr("dominant-baseline", "auto").attr("text-anchor", "end").text(o.end);
|
|
94
94
|
}
|
|
95
|
-
}, "drawWord"),
|
|
95
|
+
}, "drawWord"), O = { draw: G }, R = {
|
|
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
|
+
}, H = /* @__PURE__ */ b(({ packet: e } = {}) => {
|
|
107
|
+
const t = m(R, 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"), U = {
|
|
133
133
|
parser: x,
|
|
134
134
|
get db() {
|
|
135
135
|
return new v();
|
|
136
136
|
},
|
|
137
|
-
renderer:
|
|
138
|
-
styles:
|
|
137
|
+
renderer: O,
|
|
138
|
+
styles: H
|
|
139
139
|
};
|
|
140
140
|
export {
|
|
141
|
-
|
|
141
|
+
U as diagram
|
|
142
142
|
};
|
|
@@ -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-BGdnK7yg.cjs"),a=require("./extractHeadings-By3kC3b_.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,8 +1,8 @@
|
|
|
1
|
-
import { I as X } from "./chunk-2Q5K7J3B-
|
|
2
|
-
import { p as
|
|
3
|
-
import {
|
|
1
|
+
import { I as X } from "./chunk-2Q5K7J3B-DahzXbiI.js";
|
|
2
|
+
import { p as G } from "./chunk-JWPE2WC7-njgGfGvE.js";
|
|
3
|
+
import { a6 as O, J as Y, z as P, a7 as j, A as F, G as Z, _ as f, ai as A, Q as N, al as q, R as U, ag as D, ac as J, W as Q, aX as K, aj as ee, aY as te } from "./extractHeadings-Dz8gnhsx.js";
|
|
4
4
|
import { p as ne } from "./cynefin-VYW2F7L2-Bkk-F_Js.js";
|
|
5
|
-
var E = /[─━│┃└┗├┣]/, S = /[└┗├┣]/, re = /[─━]/, V = /^[\s│┃]+$/,
|
|
5
|
+
var E = /[─━│┃└┗├┣]/, S = /[└┗├┣]/, re = /[─━]/, V = /^[\s│┃]+$/, $ = /^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/, k = /^\s*%%/, ie = " ";
|
|
6
6
|
function L(n) {
|
|
7
7
|
return n.some((e) => E.test(e));
|
|
8
8
|
}
|
|
@@ -37,7 +37,7 @@ function R(n) {
|
|
|
37
37
|
const i = [];
|
|
38
38
|
for (let s = r + 1; s < e.length; s++) {
|
|
39
39
|
const o = e[s];
|
|
40
|
-
o.trim() === "" ||
|
|
40
|
+
o.trim() === "" || k.test(o) || $.test(o) || V.test(o) || i.push(o.replace(/\t/g, " "));
|
|
41
41
|
}
|
|
42
42
|
if (!L(i))
|
|
43
43
|
return { text: n, lineMap: t };
|
|
@@ -51,11 +51,11 @@ function R(n) {
|
|
|
51
51
|
c.push(o), l++, t.set(l, p);
|
|
52
52
|
continue;
|
|
53
53
|
}
|
|
54
|
-
if (
|
|
54
|
+
if (k.test(o)) {
|
|
55
55
|
c.push(o), l++, t.set(l, p);
|
|
56
56
|
continue;
|
|
57
57
|
}
|
|
58
|
-
if (
|
|
58
|
+
if ($.test(o)) {
|
|
59
59
|
c.push(o), l++, t.set(l, p);
|
|
60
60
|
continue;
|
|
61
61
|
}
|
|
@@ -106,7 +106,7 @@ var x = new X(() => ({
|
|
|
106
106
|
}
|
|
107
107
|
]
|
|
108
108
|
})), oe = /* @__PURE__ */ f(() => {
|
|
109
|
-
x.reset(),
|
|
109
|
+
x.reset(), J();
|
|
110
110
|
}, "clear"), se = /* @__PURE__ */ f(() => x.records.stack[0], "getRoot"), ae = /* @__PURE__ */ f(() => x.records.cnt, "getCount"), ce = ee.treeView, le = /* @__PURE__ */ f(() => A(ce, D().treeView), "getConfig"), de = /* @__PURE__ */ f((n, e, t, r, i, a) => {
|
|
111
111
|
for (; n <= x.records.stack[x.records.stack.length - 1].level; )
|
|
112
112
|
x.records.stack.pop();
|
|
@@ -128,19 +128,19 @@ var x = new X(() => ({
|
|
|
128
128
|
getCount: ae,
|
|
129
129
|
getConfig: le,
|
|
130
130
|
getAccTitle: Z,
|
|
131
|
-
getAccDescription:
|
|
132
|
-
getDiagramTitle:
|
|
131
|
+
getAccDescription: F,
|
|
132
|
+
getDiagramTitle: j,
|
|
133
133
|
setAccDescription: P,
|
|
134
134
|
setAccTitle: Y,
|
|
135
|
-
setDiagramTitle:
|
|
135
|
+
setDiagramTitle: O
|
|
136
136
|
}, I = he, pe = /* @__PURE__ */ f((n) => {
|
|
137
|
-
|
|
137
|
+
G(n, I);
|
|
138
138
|
for (const e of n.nodes) {
|
|
139
139
|
const t = typeof e.indent == "number" ? e.indent : 0;
|
|
140
140
|
let r = e.name;
|
|
141
141
|
const i = r.endsWith("/");
|
|
142
142
|
i && (r = r.slice(0, -1));
|
|
143
|
-
const a = i ? "directory" : "file", c = e.classAnnotation || void 0, l = e.iconAnnotation, s = l !== void 0 ? l || "none" : void 0, o = e.descAnnotation || void 0, h = o ?
|
|
143
|
+
const a = i ? "directory" : "file", c = e.classAnnotation || void 0, l = e.iconAnnotation, s = l !== void 0 ? l || "none" : void 0, o = e.descAnnotation || void 0, h = o ? Q(o, D()) : void 0;
|
|
144
144
|
I.addNode(t, r, a, c, s, h);
|
|
145
145
|
}
|
|
146
146
|
}, "populate"), fe = {
|
|
@@ -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-DaGwwho3.cjs"),H=require("./chunk-JWPE2WC7-BGdnK7yg.cjs"),r=require("./extractHeadings-By3kC3b_.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`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./chunk-JWPE2WC7-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./chunk-JWPE2WC7-BGdnK7yg.cjs"),n=require("./extractHeadings-By3kC3b_.cjs"),S=require("./cynefin-VYW2F7L2-MpAliYy9.cjs");var x={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},y={axes:[],curves:[],options:x},p=structuredClone(y),O=n.defaultConfig_default.radar,k=n.__name(()=>n.cleanAndMerge({...O,...n.getConfig().radar}),"getConfig"),f=n.__name(()=>p.axes,"getAxes"),D=n.__name(()=>p.curves,"getCurves"),R=n.__name(()=>p.options,"getOptions"),E=n.__name(a=>{p.axes=a.map(e=>({name:e.name,label:e.label??e.name}))},"setAxes"),F=n.__name(a=>{p.curves=a.map(e=>({name:e.name,label:e.label??e.name,entries:I(e.entries)}))},"setCurves"),I=n.__name(a=>{if(a[0].axis==null)return a.map(t=>t.value);const e=f();if(e.length===0)throw new Error("Axes must be populated before curves for reference entries");return e.map(t=>{const r=a.find(s=>s.axis?.$refText===t.name);if(r===void 0)throw new Error("Missing entry for axis "+t.label);return r.value})},"computeCurveEntries"),P=n.__name(a=>{const e=a.reduce((t,r)=>(t[r.name]=r,t),{});p.options={showLegend:e.showLegend?.value??x.showLegend,ticks:e.ticks?.value??x.ticks,max:e.max?.value??x.max,min:e.min?.value??x.min,graticule:e.graticule?.value??x.graticule}},"setOptions"),W=n.__name(()=>{n.clear(),p=structuredClone(y)},"clear"),_={getAxes:f,getCurves:D,getOptions:R,setAxes:E,setCurves:F,setOptions:P,getConfig:k,clear:W,setAccTitle:n.setAccTitle,getAccTitle:n.getAccTitle,setDiagramTitle:n.setDiagramTitle,getDiagramTitle:n.getDiagramTitle,getAccDescription:n.getAccDescription,setAccDescription:n.setAccDescription},z=n.__name(a=>{L.populateCommonDb(a,_);const{axes:e,curves:t,options:r}=a;_.setAxes(e),_.setCurves(t),_.setOptions(r)},"populate"),G={parse:n.__name(async a=>{const e=await S.parse("radar",a);n.log.debug(e),z(e)},"parse")},B=n.__name((a,e,t,r)=>{const s=r.db,l=s.getAxes(),c=s.getCurves(),o=s.getOptions(),i=s.getConfig(),d=s.getDiagramTitle(),g=n.selectSvgElement(e),u=V(g,i),m=o.max??Math.max(...c.map($=>Math.max(...$.entries))),h=o.min,v=Math.min(i.width,i.height)/2;H(u,l,v,o.ticks,o.graticule),j(u,l,v,i),C(u,l,c,h,m,o.graticule,i),A(u,c,o.showLegend,i),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-i.height/2-i.marginTop)},"draw"),V=n.__name((a,e)=>{const t=e.width+e.marginLeft+e.marginRight,r=e.height+e.marginTop+e.marginBottom,s={x:e.marginLeft+e.width/2,y:e.marginTop+e.height/2};return n.configureSvgSize(a,r,t,e.useMaxWidth??!0),a.attr("viewBox",`0 0 ${t} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),H=n.__name((a,e,t,r,s)=>{if(s==="circle")for(let l=0;l<r;l++){const c=t*(l+1)/r;a.append("circle").attr("r",c).attr("class","radarGraticule")}else if(s==="polygon"){const l=e.length;for(let c=0;c<r;c++){const o=t*(c+1)/r,i=e.map((d,g)=>{const u=2*g*Math.PI/l-Math.PI/2,m=o*Math.cos(u),h=o*Math.sin(u);return`${m},${h}`}).join(" ");a.append("polygon").attr("points",i).attr("class","radarGraticule")}}},"drawGraticule"),j=n.__name((a,e,t,r)=>{const s=e.length;for(let l=0;l<s;l++){const c=e[l].label,o=2*l*Math.PI/s-Math.PI/2,i=Math.cos(o),d=Math.sin(o);a.append("line").attr("x1",0).attr("y1",0).attr("x2",t*r.axisScaleFactor*i).attr("y2",t*r.axisScaleFactor*d).attr("class","radarAxisLine");const g=i>.01?"start":i<-.01?"end":"middle",u=d>.01?"hanging":d<-.01?"auto":"central",m=4;a.append("text").text(c).attr("x",t*r.axisLabelFactor*i+m*i).attr("y",t*r.axisLabelFactor*d+m*d).attr("text-anchor",g).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function C(a,e,t,r,s,l,c){const o=e.length,i=Math.min(c.width,c.height)/2;t.forEach((d,g)=>{if(d.entries.length!==o)return;const u=d.entries.map((m,h)=>{const v=2*Math.PI*h/o-Math.PI/2,$=b(m,r,s,i),M=$*Math.cos(v),T=$*Math.sin(v);return{x:M,y:T}});l==="circle"?a.append("path").attr("d",w(u,c.curveTension)).attr("class",`radarCurve-${g}`):l==="polygon"&&a.append("polygon").attr("points",u.map(m=>`${m.x},${m.y}`).join(" ")).attr("class",`radarCurve-${g}`)})}n.__name(C,"drawCurves");function b(a,e,t,r){const s=Math.min(Math.max(a,e),t);return r*(s-e)/(t-e)}n.__name(b,"relativeRadius");function w(a,e){const t=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s<t;s++){const l=a[(s-1+t)%t],c=a[s],o=a[(s+1)%t],i=a[(s+2)%t],d={x:c.x+(o.x-l.x)*e,y:c.y+(o.y-l.y)*e},g={x:o.x-(i.x-c.x)*e,y:o.y-(i.y-c.y)*e};r+=` C${d.x},${d.y} ${g.x},${g.y} ${o.x},${o.y}`}return`${r} Z`}n.__name(w,"closedRoundCurve");function A(a,e,t,r){if(!t)return;const s=(r.width/2+r.marginRight)*3/4,l=-(r.height/2+r.marginTop)*3/4,c=20;e.forEach((o,i)=>{const d=a.append("g").attr("transform",`translate(${s}, ${l+i*c})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${i}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(o.label)})}n.__name(A,"drawLegend");var q={draw:B},Y=n.__name((a,e)=>{let t="";for(let r=0;r<a.THEME_COLOR_LIMIT;r++){const s=a[`cScale${r}`];t+=`
|
|
2
2
|
.radarCurve-${r} {
|
|
3
3
|
color: ${s};
|
|
4
4
|
fill: ${s};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { p as
|
|
2
|
-
import {
|
|
3
|
-
import { p as
|
|
4
|
-
var
|
|
1
|
+
import { p as R } from "./chunk-JWPE2WC7-njgGfGvE.js";
|
|
2
|
+
import { z as k, A as I, a7 as _, a6 as E, G as F, J as D, _ as c, al as z, ac as G, ai as y, ag as C, aj as P, Q as B, am as W, R as V } from "./extractHeadings-Dz8gnhsx.js";
|
|
3
|
+
import { p as j } from "./cynefin-VYW2F7L2-Bkk-F_Js.js";
|
|
4
|
+
var m = {
|
|
5
5
|
showLegend: !0,
|
|
6
6
|
ticks: 5,
|
|
7
7
|
max: null,
|
|
@@ -10,22 +10,22 @@ var h = {
|
|
|
10
10
|
}, w = {
|
|
11
11
|
axes: [],
|
|
12
12
|
curves: [],
|
|
13
|
-
options:
|
|
14
|
-
}, x = structuredClone(w),
|
|
15
|
-
...
|
|
13
|
+
options: m
|
|
14
|
+
}, x = structuredClone(w), H = P.radar, J = /* @__PURE__ */ c(() => y({
|
|
15
|
+
...H,
|
|
16
16
|
...C().radar
|
|
17
|
-
}), "getConfig"), b = /* @__PURE__ */ c(() => x.axes, "getAxes"),
|
|
17
|
+
}), "getConfig"), b = /* @__PURE__ */ c(() => x.axes, "getAxes"), N = /* @__PURE__ */ c(() => x.curves, "getCurves"), Q = /* @__PURE__ */ c(() => x.options, "getOptions"), U = /* @__PURE__ */ c((a) => {
|
|
18
18
|
x.axes = a.map((t) => ({
|
|
19
19
|
name: t.name,
|
|
20
20
|
label: t.label ?? t.name
|
|
21
21
|
}));
|
|
22
|
-
}, "setAxes"),
|
|
22
|
+
}, "setAxes"), X = /* @__PURE__ */ c((a) => {
|
|
23
23
|
x.curves = a.map((t) => ({
|
|
24
24
|
name: t.name,
|
|
25
25
|
label: t.label ?? t.name,
|
|
26
|
-
entries:
|
|
26
|
+
entries: Y(t.entries)
|
|
27
27
|
}));
|
|
28
|
-
}, "setCurves"),
|
|
28
|
+
}, "setCurves"), Y = /* @__PURE__ */ c((a) => {
|
|
29
29
|
if (a[0].axis == null)
|
|
30
30
|
return a.map((e) => e.value);
|
|
31
31
|
const t = b();
|
|
@@ -37,47 +37,47 @@ var h = {
|
|
|
37
37
|
throw new Error("Missing entry for axis " + e.label);
|
|
38
38
|
return r.value;
|
|
39
39
|
});
|
|
40
|
-
}, "computeCurveEntries"),
|
|
40
|
+
}, "computeCurveEntries"), Z = /* @__PURE__ */ c((a) => {
|
|
41
41
|
const t = a.reduce(
|
|
42
42
|
(e, r) => (e[r.name] = r, e),
|
|
43
43
|
{}
|
|
44
44
|
);
|
|
45
45
|
x.options = {
|
|
46
|
-
showLegend: t.showLegend?.value ??
|
|
47
|
-
ticks: t.ticks?.value ??
|
|
48
|
-
max: t.max?.value ??
|
|
49
|
-
min: t.min?.value ??
|
|
50
|
-
graticule: t.graticule?.value ??
|
|
46
|
+
showLegend: t.showLegend?.value ?? m.showLegend,
|
|
47
|
+
ticks: t.ticks?.value ?? m.ticks,
|
|
48
|
+
max: t.max?.value ?? m.max,
|
|
49
|
+
min: t.min?.value ?? m.min,
|
|
50
|
+
graticule: t.graticule?.value ?? m.graticule
|
|
51
51
|
};
|
|
52
|
-
}, "setOptions"),
|
|
52
|
+
}, "setOptions"), q = /* @__PURE__ */ c(() => {
|
|
53
53
|
G(), x = structuredClone(w);
|
|
54
54
|
}, "clear"), $ = {
|
|
55
55
|
getAxes: b,
|
|
56
|
-
getCurves:
|
|
57
|
-
getOptions:
|
|
58
|
-
setAxes:
|
|
59
|
-
setCurves:
|
|
60
|
-
setOptions:
|
|
61
|
-
getConfig:
|
|
62
|
-
clear:
|
|
56
|
+
getCurves: N,
|
|
57
|
+
getOptions: Q,
|
|
58
|
+
setAxes: U,
|
|
59
|
+
setCurves: X,
|
|
60
|
+
setOptions: Z,
|
|
61
|
+
getConfig: J,
|
|
62
|
+
clear: q,
|
|
63
63
|
setAccTitle: D,
|
|
64
64
|
getAccTitle: F,
|
|
65
65
|
setDiagramTitle: E,
|
|
66
66
|
getDiagramTitle: _,
|
|
67
67
|
getAccDescription: I,
|
|
68
|
-
setAccDescription:
|
|
68
|
+
setAccDescription: k
|
|
69
69
|
}, K = /* @__PURE__ */ c((a) => {
|
|
70
|
-
|
|
70
|
+
R(a, $);
|
|
71
71
|
const { axes: t, curves: e, options: r } = a;
|
|
72
72
|
$.setAxes(t), $.setCurves(e), $.setOptions(r);
|
|
73
73
|
}, "populate"), tt = {
|
|
74
74
|
parse: /* @__PURE__ */ c(async (a) => {
|
|
75
|
-
const t = await
|
|
75
|
+
const t = await j("radar", a);
|
|
76
76
|
B.debug(t), K(t);
|
|
77
77
|
}, "parse")
|
|
78
78
|
}, et = /* @__PURE__ */ c((a, t, e, r) => {
|
|
79
|
-
const s = r.db, i = s.getAxes(), l = s.getCurves(), n = s.getOptions(), o = s.getConfig(), d = s.getDiagramTitle(), p = z(t), u = at(p, o), g = n.max ?? Math.max(...l.map((f) => Math.max(...f.entries))),
|
|
80
|
-
rt(u, i, v, n.ticks, n.graticule), st(u, i, v, o), A(u, i, l,
|
|
79
|
+
const s = r.db, i = s.getAxes(), l = s.getCurves(), n = s.getOptions(), o = s.getConfig(), d = s.getDiagramTitle(), p = z(t), u = at(p, o), g = n.max ?? Math.max(...l.map((f) => Math.max(...f.entries))), h = n.min, v = Math.min(o.width, o.height) / 2;
|
|
80
|
+
rt(u, i, v, n.ticks, n.graticule), st(u, i, v, o), A(u, i, l, h, g, n.graticule, o), T(u, l, n.showLegend, o), u.append("text").attr("class", "radarTitle").text(d).attr("x", 0).attr("y", -o.height / 2 - o.marginTop);
|
|
81
81
|
}, "draw"), at = /* @__PURE__ */ c((a, t) => {
|
|
82
82
|
const e = t.width + t.marginLeft + t.marginRight, r = t.height + t.marginTop + t.marginBottom, s = {
|
|
83
83
|
x: t.marginLeft + t.width / 2,
|
|
@@ -94,8 +94,8 @@ var h = {
|
|
|
94
94
|
const i = t.length;
|
|
95
95
|
for (let l = 0; l < r; l++) {
|
|
96
96
|
const n = e * (l + 1) / r, o = t.map((d, p) => {
|
|
97
|
-
const u = 2 * p * Math.PI / i - Math.PI / 2, g = n * Math.cos(u),
|
|
98
|
-
return `${g},${
|
|
97
|
+
const u = 2 * p * Math.PI / i - Math.PI / 2, g = n * Math.cos(u), h = n * Math.sin(u);
|
|
98
|
+
return `${g},${h}`;
|
|
99
99
|
}).join(" ");
|
|
100
100
|
a.append("polygon").attr("points", o).attr("class", "radarGraticule");
|
|
101
101
|
}
|
|
@@ -114,9 +114,9 @@ function A(a, t, e, r, s, i, l) {
|
|
|
114
114
|
e.forEach((d, p) => {
|
|
115
115
|
if (d.entries.length !== n)
|
|
116
116
|
return;
|
|
117
|
-
const u = d.entries.map((g,
|
|
118
|
-
const v = 2 * Math.PI *
|
|
119
|
-
return { x:
|
|
117
|
+
const u = d.entries.map((g, h) => {
|
|
118
|
+
const v = 2 * Math.PI * h / n - Math.PI / 2, f = M(g, r, s, o), S = f * Math.cos(v), O = f * Math.sin(v);
|
|
119
|
+
return { x: S, y: O };
|
|
120
120
|
});
|
|
121
121
|
i === "circle" ? a.append("path").attr("d", L(u, l.curveTension)).attr("class", `radarCurve-${p}`) : i === "polygon" && a.append("polygon").attr("points", u.map((g) => `${g.x},${g.y}`).join(" ")).attr("class", `radarCurve-${p}`);
|
|
122
122
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./chunk-MOJQB5TN-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./chunk-MOJQB5TN-DPs_chEk.cjs"),l=require("./chunk-JWPE2WC7-BGdnK7yg.cjs"),t=require("./extractHeadings-By3kC3b_.cjs"),o=require("./cynefin-VYW2F7L2-MpAliYy9.cjs");var m=o.createRailroadEbnfServices().RailroadEbnf.parser.LangiumParser,s=t.__name(e=>{const r=e.alternatives.map(u);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),u=t.__name(e=>{const r=e.elements.map(c);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t.__name(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),p=t.__name((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),c=t.__name(e=>e.postfixes.reduce((r,a)=>p(r,a),i(e.base)),"transformTerm"),f=t.__name(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),d=t.__name(e=>{l.populateCommonDb(e,n.db),e.title&&n.db.setTitle(e.title),e.rules.map(r=>n.db.addRule(f(r)))},"populateDb"),b={parse:t.__name(e=>{n.db.clear(),t.log.debug("[EBNF Parser] Starting Langium parse");const r=m.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new o.MermaidParseError(r);const a=r.value;t.log.debug("[EBNF Parser] Parsed rules:",a.rules.length),d(a),t.log.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n.db}},E={parser:b,db:n.db,renderer:n.renderer,styles:n.getStyles};exports.diagram=E;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as l, r as m, d as n } from "./chunk-MOJQB5TN-
|
|
2
|
-
import { p } from "./chunk-JWPE2WC7-
|
|
3
|
-
import { _ as t,
|
|
1
|
+
import { g as l, r as m, d as n } from "./chunk-MOJQB5TN-B-H_fDpi.js";
|
|
2
|
+
import { p } from "./chunk-JWPE2WC7-njgGfGvE.js";
|
|
3
|
+
import { _ as t, Q as o } from "./extractHeadings-Dz8gnhsx.js";
|
|
4
4
|
import { M as u, a as f } from "./cynefin-VYW2F7L2-Bkk-F_Js.js";
|
|
5
5
|
var c = f().RailroadEbnf.parser.LangiumParser, s = /* @__PURE__ */ t((e) => {
|
|
6
6
|
const r = e.alternatives.map(E);
|
package/dist/embeds/testing.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../providers-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../providers-BO7J62-7.cjs"),n=e=>{if(e!==null&&typeof e=="object"){for(const t of Object.values(e))n(t);Object.freeze(e)}return e},o=n({x:{src:"https://platform.twitter.com/embed/Tweet.html?id=20&theme=dark&lang=ja&dnt=true",messages:[{"twttr.embed":{jsonrpc:"2.0",method:"twttr.private.initialized",id:"embed-0",params:[{iframe_version:"3f8c13b4620b8:1779816981886",data:{tweet_id:"20"}}]}},{"twttr.embed":{jsonrpc:"2.0",method:"twttr.private.results",id:"embed-0",params:[{data:{tweet_id:"20"}}]}},{"twttr.embed":{jsonrpc:"2.0",method:"twttr.private.resize",id:"embed-0",params:[{width:550,height:225,data:{tweet_id:"20"}}]}},{"twttr.embed":{jsonrpc:"2.0",method:"twttr.private.rendered",id:"embed-0",params:[{data:{tweet_id:"20"}}]}}]},instagram:{src:"https://www.instagram.com/p/BsOGulcndj-/embed/",messages:['{"details":{},"type":"LOADING"}','{"details":{"height":748},"type":"MEASURE"}','{"details":{"styles":[["boxShadow","none"],["border","1px solid #dbdbdb"],["margin","0px 0px 12px"]]},"type":"MOUNTED"}','{"details":{"height":748},"type":"MEASURE"}','{"details":{"height":748},"type":"MEASURE"}']},threads:{src:"https://www.threads.com/@zuck/post/CuP48CiS5sx/embed/",messages:[177]},bluesky:{src:"https://embed.bsky.app/embed/did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3mx5e63uvns2d",messages:[{height:366.75,id:null},{height:1116.359375,id:null}]},reddit:{src:"https://embed.reddit.com/r/announcements/comments/t93ec3/this_subreddit_is_closed_for_new_posts_and/?embed=true",messages:['{"type":"resize.embed","data":240}']},note:{src:"https://note.com/embed/notes/nea1b96233fbf",messages:["height::https://note.com/embed/notes/nea1b96233fbf::208"]}}),m=(e,t,s)=>{if(e==="note"&&typeof t=="string")return`height::${s.href}::${t.slice(t.lastIndexOf("::")+2)}`;if(e==="x"){const r=s.searchParams.get("id");if(r===null)throw new RangeError(`[embeds/testing] an X frame URL needs an id parameter: ${s.href}`);const a=JSON.parse(JSON.stringify(t));for(const d of a["twttr.embed"].params)d.data.tweet_id=r;return a}return t},i=e=>e.replace(/&/gu,"&").replace(/</gu,"<").replace(/>/gu,">").replace(/"/gu,"""),c=e=>{const t=Object.values(p.EMBED_PROVIDERS).find(d=>d.frameOrigin===e.origin);if(t===void 0)throw new RangeError(`[embeds/testing] no embed provider frames ${e.origin}`);const s=o[t.id],r=s===void 0?[]:s.messages.map(d=>m(t.id,d,e)),a=r.length===0?"":`<script>for (const data of ${JSON.stringify(r).replace(/</gu,"\\u003c")}) parent.postMessage(data, "*")<\/script>`;return`<!doctype html><html lang="en"><head><meta charset="utf-8"><title>${i(t.name)} stub</title></head><body><p data-embed-stub="${t.id}">${i(t.name)} stub: ${i(e.href)}</p>${a}</body></html>`};exports.EMBED_PROVIDER_MESSAGE_SAMPLES=o;exports.embedProviderStubPage=c;
|
package/dist/embeds/testing.js
CHANGED
package/dist/embeds.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./linkCards-Bjd_vW39.cjs"),s=require("./providers-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./linkCards-Bjd_vW39.cjs"),s=require("./providers-BO7J62-7.cjs"),l=new Set(["autoplay","clipboard-write","encrypted-media","fullscreen","picture-in-picture","web-share"]),_=new Set(["no-referrer","origin","same-origin","strict-origin","strict-origin-when-cross-origin"]),u=(e,r)=>{if(e===void 0)return null;let t;try{t=new URL(e)}catch{return null}return t.protocol==="https:"&&t.username===""&&t.password===""&&t.port===""&&r.includes(t.hostname)?t:null},d=e=>{const r=new Set;for(const t of e.split(";")){const[i]=t.trim().toLowerCase().split(/\s+/u);i!==void 0&&l.has(i)&&r.add(i)}return r.size===0?null:[...r].join("; ")},c="data-embed-url",o=/^[\t\n\f\r \u00a0\u3000]*$/u,a=e=>{let r;try{r=new URL(e)}catch{return null}return(r.protocol==="http:"||r.protocol==="https:")&&r.username===""&&r.password===""?r:null},R=(e,r)=>{if(e===null)return null;let t;for(const i of r)switch(i.kind){case"link":if(t!==void 0)return null;t=i.href;break;case"element":return null;case"text":if(!o.test(i.text))return null;break}return t===e?a(e):null},E=e=>e.endsWith("/")?e.slice(0,-1):e,I=(e,r)=>{const t=a(e.trim());return t!==null&&E(t.href)===E(r.href)};exports.LINK_CARD_SIZES=n.LINK_CARD_SIZES;exports.LINK_CARD_SKIP_HEADER=n.LINK_CARD_SKIP_HEADER;exports.LINK_CARD_SKIP_REASONS=n.LINK_CARD_SKIP_REASONS;exports.LINK_CARD_URL_LIMIT=n.LINK_CARD_URL_LIMIT;exports.NO_EMBEDS=n.NO_EMBEDS;exports.isLinkCardEndpoint=n.isLinkCardEndpoint;exports.isLinkCardSize=n.isLinkCardSize;exports.linkCardMetadataOf=n.linkCardMetadataOf;exports.linkCardRequestOf=n.linkCardRequestOf;exports.linkCardSkipReasonOf=n.linkCardSkipReasonOf;exports.EMBED_FRAME_HEIGHT_LIMITS=s.EMBED_FRAME_HEIGHT_LIMITS;exports.EMBED_PROVIDERS=s.EMBED_PROVIDERS;exports.EMBED_PROVIDER_IDS=s.EMBED_PROVIDER_IDS;exports.embedConnectOriginsOf=s.embedConnectOriginsOf;exports.embedFrameHostsOf=s.embedFrameHostsOf;exports.isEmbedProviderId=s.isEmbedProviderId;exports.resolveEmbed=s.resolveEmbed;exports.EMBED_FRAME_FEATURES=l;exports.EMBED_FRAME_REFERRER_POLICIES=_;exports.EMBED_LINK_ATTRIBUTE=c;exports.EMBED_LINK_SPACE=o;exports.allowedFrameUrlOf=u;exports.isBareLink=I;exports.placeholderLinkOf=R;exports.reduceFrameFeatures=d;
|