@aiquants/markdown 6.0.0 → 6.2.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 +142 -7
- package/dist/{abnfDiagram-VRR7QNED-D7Rp9EaV.js → abnfDiagram-VRR7QNED-Csrzuwyl.js} +3 -3
- package/dist/{abnfDiagram-VRR7QNED-KTGT9TWM.cjs → abnfDiagram-VRR7QNED-DX6eyf4O.cjs} +1 -1
- package/dist/arc-Gw7Urszo.js +83 -0
- package/dist/{arc-D5T_urCC.cjs → arc-ZAQ3z7kr.cjs} +1 -1
- package/dist/{architectureDiagram-ZJ3FMSHR-DLrGYTYy.js → architectureDiagram-ZJ3FMSHR-Coy6_Fcg.js} +2 -2
- package/dist/{architectureDiagram-ZJ3FMSHR-BOo3y9aD.cjs → architectureDiagram-ZJ3FMSHR-DxzMbkp1.cjs} +1 -1
- package/dist/{blockDiagram-677ZJIJ3-B60l5Fpl.js → blockDiagram-677ZJIJ3-CbR-wn2x.js} +3 -3
- package/dist/{blockDiagram-677ZJIJ3-DnjCjo0a.cjs → blockDiagram-677ZJIJ3-THmR4OyE.cjs} +1 -1
- package/dist/{c4Diagram-LMCZKHZV-bd8fWQ1F.cjs → c4Diagram-LMCZKHZV-BcJpuXK1.cjs} +1 -1
- package/dist/{c4Diagram-LMCZKHZV-BmbplKCu.js → c4Diagram-LMCZKHZV-DHMqNO9p.js} +2 -2
- package/dist/{channel-B3oXm84X.js → channel-CfC4eqki.js} +1 -1
- package/dist/{channel-DJ_PyD9w.cjs → channel-Cryph4zI.cjs} +1 -1
- package/dist/{chunk-2Q5K7J3B-C0hbxO3D.js → chunk-2Q5K7J3B-C3BIc3MH.js} +1 -1
- package/dist/{chunk-2Q5K7J3B-CWLCO342.cjs → chunk-2Q5K7J3B-CxWyY331.cjs} +1 -1
- package/dist/{chunk-32BRIVSS-DUWtkDEY.js → chunk-32BRIVSS-C37ccuiX.js} +1 -1
- package/dist/{chunk-32BRIVSS-Cb9nTxqN.cjs → chunk-32BRIVSS-C3w_aYfI.cjs} +1 -1
- package/dist/{chunk-5VM5RSS4-DHA5n_Ls.cjs → chunk-5VM5RSS4-Cbt79-V5.cjs} +1 -1
- package/dist/{chunk-5VM5RSS4-C3mSh-gE.js → chunk-5VM5RSS4-DVLmkcyq.js} +1 -1
- package/dist/{chunk-EX3LRPZG-ByY6_kep.cjs → chunk-EX3LRPZG-BZOxrSRn.cjs} +1 -1
- package/dist/{chunk-EX3LRPZG-DCF1zjtT.js → chunk-EX3LRPZG-Co0Bql0-.js} +37 -37
- package/dist/{chunk-JWPE2WC7-CUBzYD4G.cjs → chunk-JWPE2WC7-Cvt_ToFU.cjs} +1 -1
- package/dist/{chunk-JWPE2WC7-CPLOunIL.js → chunk-JWPE2WC7-DUndc3Wb.js} +1 -1
- package/dist/{chunk-MOJQB5TN-P8-yb3-j.cjs → chunk-MOJQB5TN-AAMW2q8N.cjs} +1 -1
- package/dist/{chunk-MOJQB5TN-CmOhW6SK.js → chunk-MOJQB5TN-aTSDPliR.js} +11 -11
- package/dist/{chunk-PUDLZKDR-pKdIELvz.cjs → chunk-PUDLZKDR-CzCdcyAN.cjs} +1 -1
- package/dist/{chunk-PUDLZKDR-DH7B7ZTK.js → chunk-PUDLZKDR-Q5QzbDtY.js} +11 -11
- package/dist/{chunk-RYQCIY6F-DcvQCEoc.cjs → chunk-RYQCIY6F-DbjhsOnH.cjs} +1 -1
- package/dist/{chunk-RYQCIY6F-C7ytn_QX.js → chunk-RYQCIY6F-O6wbIIFF.js} +10 -10
- package/dist/{chunk-V7JOEXUC-CtXgqODy.cjs → chunk-V7JOEXUC-B6Qc5ABc.cjs} +1 -1
- package/dist/{chunk-V7JOEXUC-BgLcssUF.js → chunk-V7JOEXUC-OTS1fN7j.js} +10 -10
- package/dist/{chunk-VR4S4FIN-BK6xeIQk.js → chunk-VR4S4FIN-D4tY80kq.js} +1 -1
- package/dist/{chunk-VR4S4FIN-Cc4GDi2Z.cjs → chunk-VR4S4FIN-DlneMFEg.cjs} +1 -1
- package/dist/{chunk-XXDRQBXY-COtZ25Ez.js → chunk-XXDRQBXY-58rTAwvh.js} +1 -1
- package/dist/{chunk-XXDRQBXY-D1OixGzR.cjs → chunk-XXDRQBXY-CvhBfnFQ.cjs} +1 -1
- package/dist/{classDiagram-OUVF2IWQ-DDLmqaG6.cjs → classDiagram-OUVF2IWQ-C0S2HAJU.cjs} +1 -1
- package/dist/{classDiagram-v2-EOCWNBFH-Jc-IwOm0.js → classDiagram-OUVF2IWQ-hcuKRiyp.js} +2 -2
- package/dist/{classDiagram-v2-EOCWNBFH-DDLmqaG6.cjs → classDiagram-v2-EOCWNBFH-C0S2HAJU.cjs} +1 -1
- package/dist/{classDiagram-OUVF2IWQ-Jc-IwOm0.js → classDiagram-v2-EOCWNBFH-hcuKRiyp.js} +2 -2
- package/dist/components/HostedScrollArea.d.ts +15 -0
- package/dist/components/MarkdownViewer.d.ts +3 -1
- package/dist/components/embeds/LinkCard.d.ts +14 -3
- package/dist/components/mermaidInteraction.d.ts +1 -0
- package/dist/{cose-bilkent-JH36ORCC-DaucPocG.js → cose-bilkent-JH36ORCC-BwltbHKG.js} +5 -5
- package/dist/{cose-bilkent-JH36ORCC-OwiXHdQY.cjs → cose-bilkent-JH36ORCC-DVZVn03H.cjs} +1 -1
- package/dist/{cynefinDiagram-TSTJHNR4-Ag-HcuUm.cjs → cynefinDiagram-TSTJHNR4-DYCBxaEi.cjs} +1 -1
- package/dist/{cynefinDiagram-TSTJHNR4-Dkmz7gDw.js → cynefinDiagram-TSTJHNR4-ogTeIoNY.js} +28 -28
- package/dist/{dagre-VKFMJZFB-BHGdcjt3.js → dagre-VKFMJZFB-BfNdgMHQ.js} +9 -9
- package/dist/{dagre-VKFMJZFB-Q4CcAQ09.cjs → dagre-VKFMJZFB-DJW9o9XX.cjs} +1 -1
- package/dist/{diagram-FQU43EPY-jWCrN_AW.cjs → diagram-FQU43EPY-BRpNVpgn.cjs} +1 -1
- package/dist/{diagram-FQU43EPY-DBASKnKu.js → diagram-FQU43EPY-CJf3yD8h.js} +25 -25
- package/dist/{diagram-G47NLZAW-B4XMStX7.cjs → diagram-G47NLZAW-5rZfUeWV.cjs} +1 -1
- package/dist/{diagram-G47NLZAW-BY1mmnYA.js → diagram-G47NLZAW-D0-6oupP.js} +25 -25
- package/dist/{diagram-NH7WQ7WH-BXFvYRtm.js → diagram-NH7WQ7WH-BwrWWWZJ.js} +19 -19
- package/dist/{diagram-NH7WQ7WH-BS1eEa9R.cjs → diagram-NH7WQ7WH-g7m8p5fK.cjs} +1 -1
- package/dist/{diagram-OA4YK3LP-DgGrzezu.js → diagram-OA4YK3LP-BBqA1m8s.js} +13 -13
- package/dist/{diagram-OA4YK3LP-CTaL_2Nc.cjs → diagram-OA4YK3LP-BxP8KUna.cjs} +1 -1
- package/dist/{diagram-WEI45ONY-BHxWKH3v.js → diagram-WEI45ONY-CMexm2GN.js} +35 -35
- package/dist/{diagram-WEI45ONY-DX7BGSMI.cjs → diagram-WEI45ONY-DgJyq1w0.cjs} +1 -1
- package/dist/{ebnfDiagram-CCIWWBDH-BUK_anpV.js → ebnfDiagram-CCIWWBDH-DvLr_8nV.js} +3 -3
- package/dist/{ebnfDiagram-CCIWWBDH-BpDmVVJY.cjs → ebnfDiagram-CCIWWBDH-sfiWOXCW.cjs} +1 -1
- package/dist/embeds/linkCards.d.ts +32 -0
- package/dist/embeds/testing.cjs +1 -1
- package/dist/embeds/testing.js +1 -1
- package/dist/embeds.cjs +1 -1
- package/dist/embeds.d.ts +1 -1
- package/dist/embeds.js +53 -74
- package/dist/{erDiagram-Q63AITRT-Cd9H9BtP.cjs → erDiagram-Q63AITRT-B11THykZ.cjs} +1 -1
- package/dist/{erDiagram-Q63AITRT-Qb2bmkNp.js → erDiagram-Q63AITRT-D6U6Ng3Y.js} +4 -4
- package/dist/{extractHeadings-B2pUyEPa.js → extractHeadings-CdLPwHlC.js} +4882 -4827
- package/dist/extractHeadings-DRUBnhbi.cjs +311 -0
- package/dist/flowDiagram-23GEKE2U-CDscoQ9F.cjs +1 -0
- package/dist/flowDiagram-23GEKE2U-CLibi_u4.js +7 -0
- package/dist/{ganttDiagram-NO4QXBWP-C6-ExcDz.cjs → ganttDiagram-NO4QXBWP-BLlXK3zo.cjs} +1 -1
- package/dist/{ganttDiagram-NO4QXBWP-BVISsrzr.js → ganttDiagram-NO4QXBWP-CGCdgj0K.js} +2 -2
- package/dist/{gitGraphDiagram-IHSO6WYX-DLzPc702.cjs → gitGraphDiagram-IHSO6WYX-BHOyibqH.cjs} +1 -1
- package/dist/{gitGraphDiagram-IHSO6WYX-BDVA2TFP.js → gitGraphDiagram-IHSO6WYX-Bib3c0C6.js} +3 -3
- 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.d.ts +1 -0
- package/dist/index.server.js +598 -151
- package/dist/{infoDiagram-FWYZ7A6U-D31UwqjR.js → infoDiagram-FWYZ7A6U-BUqDBIaP.js} +3 -3
- package/dist/{infoDiagram-FWYZ7A6U-DMF_wb2h.cjs → infoDiagram-FWYZ7A6U-BcDp6g1Y.cjs} +1 -1
- package/dist/{ishikawaDiagram-FXEZZL3T-DUlnwraq.cjs → ishikawaDiagram-FXEZZL3T-C3QHQ1ia.cjs} +1 -1
- package/dist/{ishikawaDiagram-FXEZZL3T-XA6-gyHY.js → ishikawaDiagram-FXEZZL3T-CcPh4nuP.js} +18 -18
- package/dist/{journeyDiagram-5HDEW3XC-CwQyFcYa.cjs → journeyDiagram-5HDEW3XC-B17v98Wb.cjs} +1 -1
- package/dist/{journeyDiagram-5HDEW3XC-B8sfsWpu.js → journeyDiagram-5HDEW3XC-MdxndgF1.js} +30 -30
- package/dist/{kanban-definition-HUTT4EX6-BjPlt2-E.cjs → kanban-definition-HUTT4EX6-BApVXeVQ.cjs} +1 -1
- package/dist/{kanban-definition-HUTT4EX6-FTrTBare.js → kanban-definition-HUTT4EX6-JhfZ6Qik.js} +120 -120
- package/dist/{linear-D3AJM3sY.cjs → linear-CIVwb13z.cjs} +1 -1
- package/dist/{linear-DI9P_z72.js → linear-dbOUbGpD.js} +8 -8
- package/dist/linkCardServer/addressGuard.server.d.ts +25 -0
- package/dist/linkCardServer/htmlEncoding.server.d.ts +6 -0
- package/dist/linkCardServer/linkCardHandler.server.d.ts +7 -0
- package/dist/linkCardServer/metadataCache.server.d.ts +5 -0
- package/dist/linkCardServer/pageFetch.server.d.ts +37 -0
- package/dist/linkCardServer/pageMetadata.server.d.ts +11 -0
- package/dist/linkCards-1JxY8wdm.js +48 -0
- package/dist/linkCards-Bjd_vW39.cjs +1 -0
- package/dist/markdown.css +1 -1
- package/dist/{mindmap-definition-LN4V7U3C-CxgWZidl.cjs → mindmap-definition-LN4V7U3C-BUbo0u-Y.cjs} +1 -1
- package/dist/{mindmap-definition-LN4V7U3C-YW4YcL9x.js → mindmap-definition-LN4V7U3C-gNTBga2z.js} +16 -16
- package/dist/{pegDiagram-2B236MQR-sJjLKeF3.js → pegDiagram-2B236MQR-BqjpbNkG.js} +3 -3
- package/dist/{pegDiagram-2B236MQR-CUo7q5bl.cjs → pegDiagram-2B236MQR-DZiQVxu1.cjs} +1 -1
- package/dist/{pieDiagram-ENE6RG2P-D4VanIOv.js → pieDiagram-ENE6RG2P-C1Gr48CK.js} +60 -60
- package/dist/{pieDiagram-ENE6RG2P-Cy_sUuLQ.cjs → pieDiagram-ENE6RG2P-D2nxDVFV.cjs} +1 -1
- package/dist/providers-BO7J62-7.cjs +1 -0
- package/dist/{providers-Drq7MT_K.js → providers-L5RM3KgR.js} +23 -23
- package/dist/{quadrantDiagram-ABIIQ3AL-D3c8xLpt.cjs → quadrantDiagram-ABIIQ3AL-C855tL3K.cjs} +1 -1
- package/dist/{quadrantDiagram-ABIIQ3AL-ubxphjb_.js → quadrantDiagram-ABIIQ3AL-DuD9ZdUQ.js} +18 -18
- package/dist/{railroadDiagram-RFXS5EU6-_Q4W5hB-.cjs → railroadDiagram-RFXS5EU6-BZsnhaQd.cjs} +1 -1
- package/dist/{railroadDiagram-RFXS5EU6-DvpD4C_A.js → railroadDiagram-RFXS5EU6-xx1d3Md8.js} +3 -3
- package/dist/{requirementDiagram-TGXJPOKE-Dk_6BuX9.js → requirementDiagram-TGXJPOKE-CCu1UYFH.js} +3 -3
- package/dist/{requirementDiagram-TGXJPOKE-DdYIO-wU.cjs → requirementDiagram-TGXJPOKE-D_NbFRkb.cjs} +1 -1
- package/dist/{sankeyDiagram-HTMAVEWB-zuYg6LTg.cjs → sankeyDiagram-HTMAVEWB-Dn2Ta-XX.cjs} +1 -1
- package/dist/{sankeyDiagram-HTMAVEWB-s3Kd7T8n.js → sankeyDiagram-HTMAVEWB-QGzXzczJ.js} +1 -1
- package/dist/{sequenceDiagram-DBY2YBRQ-BvNPCevg.cjs → sequenceDiagram-DBY2YBRQ-BA3Oc4pz.cjs} +1 -1
- package/dist/{sequenceDiagram-DBY2YBRQ-YQic4wxL.js → sequenceDiagram-DBY2YBRQ-CjnUnaw9.js} +3 -3
- package/dist/simple-logger-9yf7ypyB.cjs +1 -0
- package/dist/simple-logger-DwH1YQvq.js +103 -0
- package/dist/{sizeCapture-X5ZJPWSS-BqrdzzsI.cjs → sizeCapture-X5ZJPWSS-BPQhVBe0.cjs} +1 -1
- package/dist/{sizeCapture-X5ZJPWSS-qMsWGfjy.js → sizeCapture-X5ZJPWSS-nb9uU-BE.js} +1 -1
- package/dist/{stateDiagram-2N3HPSRC-D1Ub8LYq.js → stateDiagram-2N3HPSRC-Byg3E1AA.js} +11 -11
- package/dist/{stateDiagram-2N3HPSRC-Ds8f-scd.cjs → stateDiagram-2N3HPSRC-DSqLqSY5.cjs} +1 -1
- package/dist/{stateDiagram-v2-6OUMAXLB-PmrsPXuZ.cjs → stateDiagram-v2-6OUMAXLB-VRhXyf-C.cjs} +1 -1
- package/dist/{stateDiagram-v2-6OUMAXLB-DW8wjtk3.js → stateDiagram-v2-6OUMAXLB-hKcuYy9t.js} +2 -2
- package/dist/styles/markdown.css +1 -1
- package/dist/{swimlanes-5IMT3BWC-jZhcesRT.cjs → swimlanes-5IMT3BWC-CVnOKNcb.cjs} +1 -1
- package/dist/{swimlanes-5IMT3BWC-C8P8vU0w.js → swimlanes-5IMT3BWC-DyIDdThc.js} +3 -3
- package/dist/{swimlanesDiagram-G3AALYLV-B9FKeJRf.js → swimlanesDiagram-G3AALYLV-BF1ofRjP.js} +2 -2
- package/dist/{swimlanesDiagram-G3AALYLV-M5Cg2MHU.cjs → swimlanesDiagram-G3AALYLV-C3U5wLlX.cjs} +1 -1
- package/dist/{timeline-definition-FHXFAJF6-Ch-He--D.js → timeline-definition-FHXFAJF6-DBmE_qU3.js} +38 -38
- package/dist/{timeline-definition-FHXFAJF6-DZm1-KlQ.cjs → timeline-definition-FHXFAJF6-KUETCXLT.cjs} +1 -1
- package/dist/utils/simple-logger.d.ts +1 -0
- package/dist/{vennDiagram-L72KCM5P-CaoPscCM.js → vennDiagram-L72KCM5P-C6j4k5X-.js} +102 -102
- package/dist/{vennDiagram-L72KCM5P-mUSI238J.cjs → vennDiagram-L72KCM5P-DkSV3dIE.cjs} +1 -1
- package/dist/{wardleyDiagram-EHGQE667-CSAqF366.js → wardleyDiagram-EHGQE667-BaG6Cf_u.js} +18 -18
- package/dist/{wardleyDiagram-EHGQE667-CkKP97H-.cjs → wardleyDiagram-EHGQE667-uWMTMxL-.cjs} +1 -1
- package/dist/{xychartDiagram-FW5EYKEG-OEsTD_k4.js → xychartDiagram-FW5EYKEG-BPl5BnMB.js} +27 -27
- package/dist/{xychartDiagram-FW5EYKEG-BivGpkVk.cjs → xychartDiagram-FW5EYKEG-QAFE-xqg.cjs} +1 -1
- package/package.json +12 -8
- package/dist/arc-DzZml7Bc.js +0 -83
- package/dist/extractHeadings-DgefF9l1.cjs +0 -311
- package/dist/flowDiagram-23GEKE2U-BOmNlv7X.cjs +0 -1
- package/dist/flowDiagram-23GEKE2U-DMZnRz-6.js +0 -7
- 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-DUndc3Wb.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-CdLPwHlC.js";
|
|
3
|
+
import { s as Ne } from "./chunk-VR4S4FIN-D4tY80kq.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-DUndc3Wb.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-CdLPwHlC.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-Cvt_ToFU.cjs"),a=require("./extractHeadings-DRUBnhbi.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-C3BIc3MH.js";
|
|
2
|
+
import { p as G } from "./chunk-JWPE2WC7-DUndc3Wb.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-CdLPwHlC.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-CxWyY331.cjs"),H=require("./chunk-JWPE2WC7-Cvt_ToFU.cjs"),r=require("./extractHeadings-DRUBnhbi.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,7 +1,7 @@
|
|
|
1
|
-
import { p as
|
|
2
|
-
import {
|
|
3
|
-
import { p as
|
|
4
|
-
var
|
|
1
|
+
import { p as R } from "./chunk-JWPE2WC7-DUndc3Wb.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-CdLPwHlC.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,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-Cvt_ToFU.cjs"),n=require("./extractHeadings-DRUBnhbi.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,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-aTSDPliR.js";
|
|
2
|
+
import { p } from "./chunk-JWPE2WC7-DUndc3Wb.js";
|
|
3
|
+
import { _ as t, Q as o } from "./extractHeadings-CdLPwHlC.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);
|
|
@@ -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-AAMW2q8N.cjs"),l=require("./chunk-JWPE2WC7-Cvt_ToFU.cjs"),t=require("./extractHeadings-DRUBnhbi.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,8 +1,17 @@
|
|
|
1
1
|
import { EmbedProviderId } from "./providers.ts";
|
|
2
|
+
export declare const LINK_CARD_SIZES: readonly [
|
|
3
|
+
"compact",
|
|
4
|
+
"banner",
|
|
5
|
+
"full"
|
|
6
|
+
];
|
|
7
|
+
export type LinkCardSize = (typeof LINK_CARD_SIZES)[number];
|
|
8
|
+
export declare const isLinkCardSize: (value: unknown) => value is LinkCardSize;
|
|
2
9
|
export interface MarkdownEmbeds {
|
|
3
10
|
readonly providers: readonly EmbedProviderId[];
|
|
4
11
|
readonly linkCardEndpoint: string | null;
|
|
12
|
+
readonly linkCardSize?: LinkCardSize;
|
|
5
13
|
}
|
|
14
|
+
export declare const linkCardSizeOf: (embeds: MarkdownEmbeds) => LinkCardSize;
|
|
6
15
|
export declare const NO_EMBEDS: MarkdownEmbeds;
|
|
7
16
|
export declare const isLinkCardEndpoint: (value: unknown) => value is string;
|
|
8
17
|
export declare const linkCardRequestOf: (endpoint: string, link: URL, pageOrigin: string) => URL;
|
|
@@ -13,4 +22,27 @@ export interface LinkCardMetadata {
|
|
|
13
22
|
readonly image: string | null;
|
|
14
23
|
readonly icon: string | null;
|
|
15
24
|
}
|
|
25
|
+
export interface LinkCardResponseBody {
|
|
26
|
+
readonly title?: string;
|
|
27
|
+
readonly description?: string;
|
|
28
|
+
readonly site_name?: string;
|
|
29
|
+
readonly image?: string;
|
|
30
|
+
readonly icon?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare const LINK_CARD_TEXT_LIMITS: Readonly<{
|
|
33
|
+
title: 300;
|
|
34
|
+
description: 1000;
|
|
35
|
+
siteName: 200;
|
|
36
|
+
}>;
|
|
37
|
+
export declare const linkCardTextOf: (value: unknown, limit: number) => string | null;
|
|
38
|
+
export declare const LINK_CARD_URL_LIMIT = 2048;
|
|
16
39
|
export declare const linkCardMetadataOf: (json: unknown) => LinkCardMetadata | null;
|
|
40
|
+
export declare const LINK_CARD_SKIP_HEADER = "X-Link-Card-Skip";
|
|
41
|
+
export declare const LINK_CARD_SKIP_REASONS: readonly [
|
|
42
|
+
"private-network",
|
|
43
|
+
"forbidden-url",
|
|
44
|
+
"unreachable",
|
|
45
|
+
"not-html"
|
|
46
|
+
];
|
|
47
|
+
export type LinkCardSkipReason = (typeof LINK_CARD_SKIP_REASONS)[number];
|
|
48
|
+
export declare const linkCardSkipReasonOf: (value: string | null) => LinkCardSkipReason | null;
|