@aiquants/markdown 11.0.1 → 11.1.1
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 +74 -1
- package/dist/{abnfDiagram-VRR7QNED-Cgd_ClOa.js → abnfDiagram-VRR7QNED-B9EKZZCe.js} +3 -3
- package/dist/{abnfDiagram-VRR7QNED-CGbpxxTZ.cjs → abnfDiagram-VRR7QNED-BUUUWvsh.cjs} +1 -1
- package/dist/{arc-B6YeA1yq.js → arc-BWBxoAtH.js} +20 -20
- package/dist/{arc-83PgiFkI.cjs → arc-BdyZzyRm.cjs} +1 -1
- package/dist/{architectureDiagram-ZJ3FMSHR-CbKT84Qu.cjs → architectureDiagram-ZJ3FMSHR-C-j7rcTN.cjs} +1 -1
- package/dist/{architectureDiagram-ZJ3FMSHR-DUyxO_OT.js → architectureDiagram-ZJ3FMSHR-C82P-Or8.js} +2 -2
- package/dist/{blockDiagram-677ZJIJ3-KhRxVKIG.cjs → blockDiagram-677ZJIJ3-B28l1266.cjs} +1 -1
- package/dist/{blockDiagram-677ZJIJ3-BGRgY0Jq.js → blockDiagram-677ZJIJ3-DQwdwRWd.js} +3 -3
- package/dist/{c4Diagram-LMCZKHZV-DKwEMXl5.cjs → c4Diagram-LMCZKHZV-BHj3qRWp.cjs} +1 -1
- package/dist/{c4Diagram-LMCZKHZV-DNyEsvRI.js → c4Diagram-LMCZKHZV-BKS-5aGN.js} +2 -2
- package/dist/{channel-CPuos4DK.js → channel-CItIM75V.js} +1 -1
- package/dist/{channel-BwAxLUKJ.cjs → channel-C_cP5iR1.cjs} +1 -1
- package/dist/{chunk-2Q5K7J3B-ueL9YXgS.cjs → chunk-2Q5K7J3B-B0pXO2t7.cjs} +1 -1
- package/dist/{chunk-2Q5K7J3B-CwNIIf2z.js → chunk-2Q5K7J3B-D52R-aDh.js} +1 -1
- package/dist/{chunk-32BRIVSS-4GH9FvG2.js → chunk-32BRIVSS-DUlLCGoQ.js} +1 -1
- package/dist/{chunk-32BRIVSS-CyqPFuo9.cjs → chunk-32BRIVSS-e82Hm1LK.cjs} +1 -1
- package/dist/{chunk-5VM5RSS4-B9y1bN8p.cjs → chunk-5VM5RSS4-DmYNlEib.cjs} +1 -1
- package/dist/{chunk-5VM5RSS4-C5Js9nxl.js → chunk-5VM5RSS4-WjZ3Kfp-.js} +1 -1
- package/dist/{chunk-EX3LRPZG-BZcvojz_.js → chunk-EX3LRPZG-CZeIl-CM.js} +4 -4
- package/dist/{chunk-EX3LRPZG-CmfR2Me0.cjs → chunk-EX3LRPZG-VOMDBd7V.cjs} +1 -1
- package/dist/{chunk-JWPE2WC7-C-ypCY3I.cjs → chunk-JWPE2WC7-DqZGyZxO.cjs} +1 -1
- package/dist/{chunk-JWPE2WC7-CtaWl_b_.js → chunk-JWPE2WC7-XtdP0lPA.js} +1 -1
- package/dist/{chunk-MOJQB5TN-01G2RIVR.js → chunk-MOJQB5TN-BGmMcnEb.js} +10 -10
- package/dist/{chunk-MOJQB5TN-BwSAskm8.cjs → chunk-MOJQB5TN-C-I6Np3F.cjs} +1 -1
- package/dist/{chunk-PUDLZKDR-D2o-M0Rj.cjs → chunk-PUDLZKDR-BU0xXgGZ.cjs} +1 -1
- package/dist/{chunk-PUDLZKDR-CnpC3xcz.js → chunk-PUDLZKDR-CVDCE8CQ.js} +6 -6
- package/dist/{chunk-RYQCIY6F-BJxwuEX_.js → chunk-RYQCIY6F-CazlBHVq.js} +12 -12
- package/dist/{chunk-RYQCIY6F-sv402gFf.cjs → chunk-RYQCIY6F-CzgqsQUG.cjs} +1 -1
- package/dist/{chunk-V7JOEXUC-gP3tRqcD.cjs → chunk-V7JOEXUC-BHcjsh4X.cjs} +1 -1
- package/dist/{chunk-V7JOEXUC-CAVk2pKT.js → chunk-V7JOEXUC-DjZLR1xm.js} +15 -15
- package/dist/{chunk-VR4S4FIN-BVOrMLGd.js → chunk-VR4S4FIN-BdHVIRqw.js} +3 -3
- package/dist/{chunk-VR4S4FIN-N9b38pB9.cjs → chunk-VR4S4FIN-DKCdFxYZ.cjs} +1 -1
- package/dist/{chunk-XXDRQBXY-rk2BF2-a.cjs → chunk-XXDRQBXY-DqQWFq5n.cjs} +1 -1
- package/dist/{chunk-XXDRQBXY-QR32cWjB.js → chunk-XXDRQBXY-Z_rLeBGt.js} +1 -1
- package/dist/{classDiagram-OUVF2IWQ-CiKDmY89.cjs → classDiagram-OUVF2IWQ-HX7id7VH.cjs} +1 -1
- package/dist/{classDiagram-v2-EOCWNBFH-DWLi6mnu.js → classDiagram-OUVF2IWQ-x_3zaG1u.js} +2 -2
- package/dist/{classDiagram-v2-EOCWNBFH-CiKDmY89.cjs → classDiagram-v2-EOCWNBFH-HX7id7VH.cjs} +1 -1
- package/dist/{classDiagram-OUVF2IWQ-DWLi6mnu.js → classDiagram-v2-EOCWNBFH-x_3zaG1u.js} +2 -2
- package/dist/components/BlockBoundary.d.ts +19 -0
- package/dist/components/MarkdownRenderer.d.ts +6 -1
- package/dist/components/MarkdownViewer.d.ts +3 -1
- package/dist/components/SvgImageBlock.d.ts +25 -0
- package/dist/components/blockFailureLabels.d.ts +2 -0
- package/dist/components/mdastNodes/CodeNode.d.ts +1 -0
- package/dist/components/rawHtml.d.ts +1 -0
- package/dist/components/spreadsheetModel.d.ts +2 -0
- package/dist/components/svgImageLabels.d.ts +16 -0
- package/dist/components/viewerLabels.d.ts +7 -1
- package/dist/converter.wasm +0 -0
- package/dist/{cose-bilkent-JH36ORCC-DLL-HoNB.cjs → cose-bilkent-JH36ORCC-CWD_TQFn.cjs} +1 -1
- package/dist/{cose-bilkent-JH36ORCC-Ndnjy2V_.js → cose-bilkent-JH36ORCC-Cyz8e4tp.js} +5 -5
- package/dist/{cynefinDiagram-TSTJHNR4-BLc8lpj_.cjs → cynefinDiagram-TSTJHNR4-DEFr3c5a.cjs} +1 -1
- package/dist/{cynefinDiagram-TSTJHNR4-CzQeK-ei.js → cynefinDiagram-TSTJHNR4-uBcUSDG3.js} +47 -47
- package/dist/{dagre-VKFMJZFB-BDWsqPrH.js → dagre-VKFMJZFB-Bbd2N7Iu.js} +20 -20
- package/dist/{dagre-VKFMJZFB-CpOLJSPF.cjs → dagre-VKFMJZFB-DByE8-C9.cjs} +1 -1
- package/dist/{diagram-FQU43EPY-DomkDZpC.js → diagram-FQU43EPY-CgQwvhUg.js} +2 -2
- package/dist/{diagram-FQU43EPY-BYwso-90.cjs → diagram-FQU43EPY-DPEX0cuZ.cjs} +1 -1
- package/dist/{diagram-G47NLZAW-CJvutqnO.cjs → diagram-G47NLZAW-50nFSHRv.cjs} +1 -1
- package/dist/{diagram-G47NLZAW-B88unx9N.js → diagram-G47NLZAW-BZsnXoS1.js} +38 -38
- package/dist/{diagram-NH7WQ7WH-B7_b2WAg.cjs → diagram-NH7WQ7WH-TShr7BQh.cjs} +1 -1
- package/dist/{diagram-NH7WQ7WH-c9X1ONTP.js → diagram-NH7WQ7WH-eHSJPLfa.js} +20 -20
- package/dist/{diagram-OA4YK3LP-ClopZbjk.js → diagram-OA4YK3LP-Dphe8PdD.js} +58 -58
- package/dist/{diagram-OA4YK3LP-Dgf5KLVb.cjs → diagram-OA4YK3LP-r5leQ0jD.cjs} +1 -1
- package/dist/{diagram-WEI45ONY-CFk-zdkR.cjs → diagram-WEI45ONY-BaT3chSs.cjs} +1 -1
- package/dist/{diagram-WEI45ONY-Ps4TgzF1.js → diagram-WEI45ONY-pgeZBaVl.js} +10 -10
- package/dist/{ebnfDiagram-CCIWWBDH-CQCWsevA.cjs → ebnfDiagram-CCIWWBDH-D3EvTRKP.cjs} +1 -1
- package/dist/{ebnfDiagram-CCIWWBDH-Cj_QjqN9.js → ebnfDiagram-CCIWWBDH-Hf655Cjt.js} +5 -5
- package/dist/{erDiagram-Q63AITRT-B8HuBKwU.js → erDiagram-Q63AITRT-YkVu4ce1.js} +9 -9
- package/dist/{erDiagram-Q63AITRT-BzYknHNb.cjs → erDiagram-Q63AITRT-fnT4vBqH.cjs} +1 -1
- package/dist/{extractHeadings-Crd19E9z.js → extractHeadings-B8u8yqfC.js} +6670 -6480
- package/dist/{extractHeadings-CbjPphbm.cjs → extractHeadings-DLNXUqAG.cjs} +86 -86
- package/dist/flowDiagram-23GEKE2U-B5AFLHup.js +7 -0
- package/dist/flowDiagram-23GEKE2U-BaQLONgC.cjs +1 -0
- package/dist/{ganttDiagram-NO4QXBWP-ssf7C_OK.js → ganttDiagram-NO4QXBWP-D-SkIoPg.js} +2 -2
- package/dist/{ganttDiagram-NO4QXBWP-DmOJTDey.cjs → ganttDiagram-NO4QXBWP-DC3d7PwO.cjs} +1 -1
- package/dist/{gitGraphDiagram-IHSO6WYX-DO-7gHh9.js → gitGraphDiagram-IHSO6WYX-CjYttPlh.js} +10 -10
- package/dist/{gitGraphDiagram-IHSO6WYX-BXw0xce8.cjs → gitGraphDiagram-IHSO6WYX-DFUHvrlM.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.client.cjs +1 -1
- package/dist/index.client.d.ts +3 -1
- package/dist/index.client.js +32 -31
- package/dist/index.js +32 -31
- package/dist/{infoDiagram-FWYZ7A6U-C_qI_jda.cjs → infoDiagram-FWYZ7A6U-CM_qocjy.cjs} +1 -1
- package/dist/{infoDiagram-FWYZ7A6U-D9CHdCHO.js → infoDiagram-FWYZ7A6U-DpELmEdt.js} +1 -1
- package/dist/{ishikawaDiagram-FXEZZL3T-B-P0YpVr.js → ishikawaDiagram-FXEZZL3T-doZ6ry1Q.js} +25 -25
- package/dist/{ishikawaDiagram-FXEZZL3T-BsAmXBFz.cjs → ishikawaDiagram-FXEZZL3T-uPR_QB-P.cjs} +1 -1
- package/dist/{journeyDiagram-5HDEW3XC-BReIo-v3.js → journeyDiagram-5HDEW3XC-B3Gvqmgz.js} +4 -4
- package/dist/{journeyDiagram-5HDEW3XC-3vpGGLSR.cjs → journeyDiagram-5HDEW3XC-DKxRZGZY.cjs} +1 -1
- package/dist/{kanban-definition-HUTT4EX6-CgVNbmAG.cjs → kanban-definition-HUTT4EX6-CmEtZdgP.cjs} +1 -1
- package/dist/{kanban-definition-HUTT4EX6-DKqZmd21.js → kanban-definition-HUTT4EX6-XEl_CQHs.js} +52 -52
- package/dist/{linear-C6Pl8W7F.cjs → linear-BJeuATkk.cjs} +1 -1
- package/dist/{linear-BZclxiW5.js → linear-CJwjH-8_.js} +5 -5
- package/dist/{mindmap-definition-LN4V7U3C-CRGWlSrN.cjs → mindmap-definition-LN4V7U3C-B9zpExvk.cjs} +1 -1
- package/dist/{mindmap-definition-LN4V7U3C-suiDe0CR.js → mindmap-definition-LN4V7U3C-Cd2v2Y8Z.js} +16 -16
- package/dist/{pegDiagram-2B236MQR-CNg0sJ5j.js → pegDiagram-2B236MQR-DFYHpIqe.js} +3 -3
- package/dist/{pegDiagram-2B236MQR-DXTBiaER.cjs → pegDiagram-2B236MQR-DWCHB7kd.cjs} +1 -1
- package/dist/{pieDiagram-ENE6RG2P-BjxQd0El.js → pieDiagram-ENE6RG2P-CD581vqD.js} +51 -51
- package/dist/{pieDiagram-ENE6RG2P-Pm5hFcS9.cjs → pieDiagram-ENE6RG2P-LLQzK8bv.cjs} +1 -1
- package/dist/{quadrantDiagram-ABIIQ3AL-CbhdFi8L.js → quadrantDiagram-ABIIQ3AL-BhzJSnax.js} +43 -43
- package/dist/{quadrantDiagram-ABIIQ3AL-Cn9jg0Nj.cjs → quadrantDiagram-ABIIQ3AL-DjC_l1Fw.cjs} +1 -1
- package/dist/{railroadDiagram-RFXS5EU6-BsgUwAcz.cjs → railroadDiagram-RFXS5EU6-C1tKXwxN.cjs} +1 -1
- package/dist/{railroadDiagram-RFXS5EU6-DQZDzmuH.js → railroadDiagram-RFXS5EU6-DmVOfohB.js} +7 -7
- package/dist/{requirementDiagram-TGXJPOKE-B6qkEWAq.js → requirementDiagram-TGXJPOKE-DDpRa8G1.js} +18 -18
- package/dist/{requirementDiagram-TGXJPOKE-Bb7-fVzh.cjs → requirementDiagram-TGXJPOKE-DkGh_vLW.cjs} +1 -1
- package/dist/{sankeyDiagram-HTMAVEWB-B0lfTQm7.js → sankeyDiagram-HTMAVEWB-3UuuubkA.js} +1 -1
- package/dist/{sankeyDiagram-HTMAVEWB-D_i8qvPc.cjs → sankeyDiagram-HTMAVEWB-CkCLaKDd.cjs} +1 -1
- package/dist/{sequenceDiagram-DBY2YBRQ-hK_KsgkL.js → sequenceDiagram-DBY2YBRQ-CRC__bVC.js} +3 -3
- package/dist/{sequenceDiagram-DBY2YBRQ-Cis-Rynd.cjs → sequenceDiagram-DBY2YBRQ-DcWj7JMz.cjs} +1 -1
- package/dist/{sizeCapture-X5ZJPWSS-CmMBsApW.js → sizeCapture-X5ZJPWSS-DuxhTDeu.js} +1 -1
- package/dist/{sizeCapture-X5ZJPWSS-63py1Km1.cjs → sizeCapture-X5ZJPWSS-Wb9vgGKU.cjs} +1 -1
- package/dist/{stateDiagram-2N3HPSRC-DunX61Hp.cjs → stateDiagram-2N3HPSRC-CMBwcQE6.cjs} +1 -1
- package/dist/{stateDiagram-2N3HPSRC-iHHDXYiT.js → stateDiagram-2N3HPSRC-DGfmIJEN.js} +10 -10
- package/dist/{stateDiagram-v2-6OUMAXLB-Cm5Vjes-.cjs → stateDiagram-v2-6OUMAXLB-7UPtJqUO.cjs} +1 -1
- package/dist/{stateDiagram-v2-6OUMAXLB-BGf7WS-h.js → stateDiagram-v2-6OUMAXLB-ZyMZ4vTG.js} +2 -2
- package/dist/styles/markdown.css +1 -1
- package/dist/styles/markdown.standalone.css +1 -1
- package/dist/{swimlanes-5IMT3BWC-BJ1u6dlg.cjs → swimlanes-5IMT3BWC-CZzTj7hi.cjs} +1 -1
- package/dist/{swimlanes-5IMT3BWC-Dlxdol7t.js → swimlanes-5IMT3BWC-CpPHvYma.js} +313 -313
- package/dist/{swimlanesDiagram-G3AALYLV-BJUZ0yd-.cjs → swimlanesDiagram-G3AALYLV-By4sYWRa.cjs} +1 -1
- package/dist/{swimlanesDiagram-G3AALYLV-DhG6vFeB.js → swimlanesDiagram-G3AALYLV-ISXX19Uv.js} +2 -2
- package/dist/{timeline-definition-FHXFAJF6-CC5nYPoS.cjs → timeline-definition-FHXFAJF6-CLuuXV7h.cjs} +1 -1
- package/dist/{timeline-definition-FHXFAJF6-BpNpgP_f.js → timeline-definition-FHXFAJF6-YNTe1gIW.js} +108 -108
- package/dist/{vennDiagram-L72KCM5P-BUO57UaZ.js → vennDiagram-L72KCM5P-B2jRtjMe.js} +101 -101
- package/dist/{vennDiagram-L72KCM5P-B3PoRUuk.cjs → vennDiagram-L72KCM5P-DFt6CSPi.cjs} +1 -1
- package/dist/{wardleyDiagram-EHGQE667-BF8VCIge.cjs → wardleyDiagram-EHGQE667-B1RAAbXU.cjs} +1 -1
- package/dist/{wardleyDiagram-EHGQE667-Bp6gS0HT.js → wardleyDiagram-EHGQE667-ZOmJLYv5.js} +85 -85
- package/dist/{xychartDiagram-FW5EYKEG-C15kZN0r.cjs → xychartDiagram-FW5EYKEG-D1mJfFkC.cjs} +1 -1
- package/dist/{xychartDiagram-FW5EYKEG-CBQgXLz_.js → xychartDiagram-FW5EYKEG-JwURYtLn.js} +40 -40
- package/package.json +11 -11
- package/dist/flowDiagram-23GEKE2U-BIiIKtPl.cjs +0 -1
- package/dist/flowDiagram-23GEKE2U-CL3q35kI.js +0 -7
|
@@ -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-XtdP0lPA.js";
|
|
2
|
+
import { _ as w, ao as ye, ai as ae, ak as ee, an as Se, V as ve, U as te, bU as B, R as U, O as xe, K as be, a8 as we, a9 as Ce, J as Te, G as Le, al as $e, bV as Ae, ae as Fe } from "./extractHeadings-B8u8yqfC.js";
|
|
3
|
+
import { s as Ne } from "./chunk-VR4S4FIN-BdHVIRqw.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 Q } from "./ordinal-B6-f3MAq.js";
|
|
7
7
|
function _e(t) {
|
|
8
8
|
var a = 0, l = t.children, n = l && l.length;
|
|
9
9
|
if (!n) a = 1;
|
|
@@ -13,13 +13,13 @@ function _e(t) {
|
|
|
13
13
|
function ke() {
|
|
14
14
|
return this.eachAfter(_e);
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function Ve(t, a) {
|
|
17
17
|
let l = -1;
|
|
18
18
|
for (const n of this)
|
|
19
19
|
t.call(a, n, ++l, this);
|
|
20
20
|
return this;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function ze(t, a) {
|
|
23
23
|
for (var l = this, n = [l], s, i, h = -1; l = n.pop(); )
|
|
24
24
|
if (t.call(a, l, ++h, this), s = l.children)
|
|
25
25
|
for (i = s.length - 1; i >= 0; --i)
|
|
@@ -96,7 +96,7 @@ function* qe() {
|
|
|
96
96
|
while (l.length);
|
|
97
97
|
}
|
|
98
98
|
function ne(t, a) {
|
|
99
|
-
t instanceof Map ? (t = [void 0, t], a === void 0 && (a =
|
|
99
|
+
t instanceof Map ? (t = [void 0, t], a === void 0 && (a = je)) : a === void 0 && (a = Ye);
|
|
100
100
|
for (var l = new J(t), n, s = [l], i, h, d, g; n = s.pop(); )
|
|
101
101
|
if ((h = a(n.data)) && (g = (h = Array.from(h)).length))
|
|
102
102
|
for (n.children = h, d = g - 1; d >= 0; --d)
|
|
@@ -106,10 +106,10 @@ function ne(t, a) {
|
|
|
106
106
|
function Xe() {
|
|
107
107
|
return ne(this).eachBefore(Ue);
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function Ye(t) {
|
|
110
110
|
return t.children;
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function je(t) {
|
|
113
113
|
return Array.isArray(t) ? t[1] : null;
|
|
114
114
|
}
|
|
115
115
|
function Ue(t) {
|
|
@@ -127,9 +127,9 @@ function J(t) {
|
|
|
127
127
|
J.prototype = ne.prototype = {
|
|
128
128
|
constructor: J,
|
|
129
129
|
count: ke,
|
|
130
|
-
each:
|
|
130
|
+
each: Ve,
|
|
131
131
|
eachAfter: De,
|
|
132
|
-
eachBefore:
|
|
132
|
+
eachBefore: ze,
|
|
133
133
|
find: Pe,
|
|
134
134
|
sum: Be,
|
|
135
135
|
sort: Re,
|
|
@@ -153,10 +153,10 @@ function q(t) {
|
|
|
153
153
|
return t;
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function 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 Qe(t, a, l, n, s) {
|
|
160
160
|
for (var i = t.children, h, d = -1, g = i.length, c = t.value && (n - a) / t.value; ++d < g; )
|
|
161
161
|
h = i[d], h.y0 = l, h.y1 = s, h.x0 = a, h.x1 = a += h.value * c;
|
|
162
162
|
}
|
|
@@ -166,19 +166,19 @@ function et(t, a, l, n, s) {
|
|
|
166
166
|
}
|
|
167
167
|
var tt = (1 + Math.sqrt(5)) / 2;
|
|
168
168
|
function at(t, a, l, n, s, i) {
|
|
169
|
-
for (var h = [], d = a.children, g, c, u = 0, b = 0, r = d.length, x, S, v = a.value, p, y, N, $,
|
|
169
|
+
for (var h = [], d = a.children, g, c, u = 0, b = 0, r = d.length, x, S, v = a.value, p, y, N, $, z, W, M; u < r; ) {
|
|
170
170
|
x = s - l, S = i - n;
|
|
171
171
|
do
|
|
172
172
|
p = d[b++].value;
|
|
173
173
|
while (!p && b < r);
|
|
174
|
-
for (y = N = p, W = Math.max(S / x, x / S) / (v * t), M = p * p * W,
|
|
175
|
-
if (p += c = d[b].value, c < y && (y = c), c > N && (N = c), M = p * p * W, $ = Math.max(N / M, M / y), $ >
|
|
174
|
+
for (y = N = p, W = Math.max(S / x, x / S) / (v * t), M = p * p * W, z = Math.max(N / M, M / y); b < r; ++b) {
|
|
175
|
+
if (p += c = d[b].value, c < y && (y = c), c > N && (N = c), M = p * p * W, $ = Math.max(N / M, M / y), $ > z) {
|
|
176
176
|
p -= c;
|
|
177
177
|
break;
|
|
178
178
|
}
|
|
179
|
-
|
|
179
|
+
z = $;
|
|
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 ? Qe(g, l, n, s, v ? n += S * p / v : i) : et(g, l, n, v ? l += x * p / v : s, i), v -= p, u = b;
|
|
182
182
|
}
|
|
183
183
|
return h;
|
|
184
184
|
}
|
|
@@ -193,7 +193,7 @@ const nt = (function t(a) {
|
|
|
193
193
|
function lt() {
|
|
194
194
|
var t = nt, a = !1, l = 1, n = 1, s = [0], i = G, h = G, d = G, g = G, c = G;
|
|
195
195
|
function u(r) {
|
|
196
|
-
return r.x0 = r.y0 = 0, r.x1 = l, r.y1 = n, r.eachBefore(b), s = [0], a && r.eachBefore(
|
|
196
|
+
return r.x0 = r.y0 = 0, r.x1 = l, r.y1 = n, r.eachBefore(b), s = [0], a && r.eachBefore(Ze), r;
|
|
197
197
|
}
|
|
198
198
|
function b(r) {
|
|
199
199
|
var x = s[r.depth], S = r.x0 + x, v = r.y0 + x, p = r.x1 - x, y = r.y1 - x;
|
|
@@ -341,7 +341,7 @@ var st = /* @__PURE__ */ w((t, a) => {
|
|
|
341
341
|
} catch (e) {
|
|
342
342
|
te.error("Error creating format function:", e), p = O(",");
|
|
343
343
|
}
|
|
344
|
-
const y =
|
|
344
|
+
const y = Q().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 = Q().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
|
+
]), $ = Q().range([
|
|
373
373
|
c.cScaleLabel0,
|
|
374
374
|
c.cScaleLabel1,
|
|
375
375
|
c.cScaleLabel2,
|
|
@@ -384,9 +384,9 @@ var st = /* @__PURE__ */ w((t, a) => {
|
|
|
384
384
|
c.cScaleLabel11
|
|
385
385
|
]);
|
|
386
386
|
d && b.append("text").attr("x", S / 2).attr("y", u / 2).attr("class", "treemapTitle").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(d);
|
|
387
|
-
const
|
|
387
|
+
const z = b.append("g").attr("transform", `translate(0, ${u})`).attr("class", "treemapContainer"), W = ne(g).sum((e) => e.value ?? 0).sort((e, o) => (o.value ?? 0) - (e.value ?? 0)), le = lt().size([r, x]).paddingTop(
|
|
388
388
|
(e) => e.children && e.children.length > 0 ? X + R : 0
|
|
389
|
-
).paddingInner(h).paddingLeft((e) => e.children && e.children.length > 0 ? R : 0).paddingRight((e) => e.children && e.children.length > 0 ? R : 0).paddingBottom((e) => e.children && e.children.length > 0 ? R : 0).round(!0)(W), de = le.descendants().filter((e) => e.children && e.children.length > 0), H =
|
|
389
|
+
).paddingInner(h).paddingLeft((e) => e.children && e.children.length > 0 ? R : 0).paddingRight((e) => e.children && e.children.length > 0 ? R : 0).paddingBottom((e) => e.children && e.children.length > 0 ? R : 0).round(!0)(W), de = le.descendants().filter((e) => e.children && e.children.length > 0), H = z.selectAll(".treemapSection").data(de).enter().append("g").attr("class", "treemapSection").attr("transform", (e) => `translate(${e.x0},${e.y0})`);
|
|
390
390
|
H.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", X).attr("class", "treemapSectionHeader").attr("fill", "none").attr("fill-opacity", 0.6).attr("stroke-width", 0.6).attr("style", (e) => e.depth === 0 ? "display: none;" : ""), H.append("clipPath").attr("id", (e, o) => `clip-section-${a}-${o}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 12)).attr("height", X), H.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", (e, o) => `treemapSection section${o}`).attr("fill", (e) => y(e.data.name)).attr("fill-opacity", 0.6).attr("stroke", (e) => N(e.data.name)).attr("stroke-width", 2).attr("stroke-opacity", 0.4).attr("style", (e) => {
|
|
391
391
|
if (e.depth === 0)
|
|
392
392
|
return "display: none;";
|
|
@@ -407,13 +407,13 @@ var st = /* @__PURE__ */ w((t, a) => {
|
|
|
407
407
|
i.showValues !== !1 && e.value ? T = C - 10 - 30 - 10 - L : T = C - L - 6;
|
|
408
408
|
const m = Math.max(15, T), _ = o.node();
|
|
409
409
|
if (_.getComputedTextLength() > m) {
|
|
410
|
-
let
|
|
411
|
-
for (;
|
|
412
|
-
if (
|
|
410
|
+
let V = f;
|
|
411
|
+
for (; V.length > 0; ) {
|
|
412
|
+
if (V = f.substring(0, V.length - 1), V.length === 0) {
|
|
413
413
|
o.text("..."), _.getComputedTextLength() > m && o.text("");
|
|
414
414
|
break;
|
|
415
415
|
}
|
|
416
|
-
if (o.text(
|
|
416
|
+
if (o.text(V + "..."), _.getComputedTextLength() <= m)
|
|
417
417
|
break;
|
|
418
418
|
}
|
|
419
419
|
}
|
|
@@ -423,8 +423,8 @@ var st = /* @__PURE__ */ w((t, a) => {
|
|
|
423
423
|
const o = "text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:" + $(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", f = B({ cssCompiledStyles: e.data.cssCompiledStyles });
|
|
424
424
|
return o + f.labelStyles.replace("color:", "fill:");
|
|
425
425
|
});
|
|
426
|
-
const se = le.leaves(), A = se.length > 20, ue = A ? 16 : 38,
|
|
427
|
-
|
|
426
|
+
const se = le.leaves(), A = se.length > 20, ue = A ? 16 : 38, Y = A ? 14 : 28, D = A ? 4 : 8, I = A ? 4 : 6, K = A ? 2 : 4, re = A ? 8 : 10, Z = A ? 1 : 2, j = z.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
|
+
j.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), j.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)), j.append("text").attr("class", "treemapLabel").attr("x", (e) => (e.x1 - e.x0) / 2).attr("y", (e) => (e.y1 - e.y0) / 2).attr("style", (e) => {
|
|
428
428
|
const o = `text-anchor: middle; dominant-baseline: middle; font-size: ${ue}px;fill:` + $(e.data.name) + ";", f = B({ cssCompiledStyles: e.data.cssCompiledStyles });
|
|
429
429
|
return o + f.labelStyles.replace("color:", "fill:");
|
|
430
430
|
}).attr("clip-path", (e, o) => `url(#clip-${a}-${o})`).text((e) => e.data.name).each(function(e) {
|
|
@@ -439,18 +439,18 @@ var st = /* @__PURE__ */ w((t, a) => {
|
|
|
439
439
|
m--, o.style("font-size", `${m}px`);
|
|
440
440
|
let F = Math.max(
|
|
441
441
|
I,
|
|
442
|
-
Math.min(
|
|
443
|
-
), k = m +
|
|
442
|
+
Math.min(Y, Math.round(m * _))
|
|
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(Y, Math.round(m * _))
|
|
447
447
|
), !(F < I && m === D)); )
|
|
448
|
-
o.style("font-size", `${m}px`), k = m +
|
|
448
|
+
o.style("font-size", `${m}px`), k = m + 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 && j.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: ${Y}px;fill:` + $(o.data.name) + ";", C = B({ cssCompiledStyles: o.data.cssCompiledStyles });
|
|
454
454
|
return f + C.labelStyles.replace("color:", "fill:");
|
|
455
455
|
}).attr("clip-path", (o, f) => `url(#clip-${a}-${f})`).text((o) => o.value ? p(o.value) : "").each(function(o) {
|
|
456
456
|
const f = U(this), C = this.parentNode;
|
|
@@ -465,10 +465,10 @@ var st = /* @__PURE__ */ w((t, a) => {
|
|
|
465
465
|
}
|
|
466
466
|
const T = parseFloat(L.style("font-size")), m = Math.max(
|
|
467
467
|
I,
|
|
468
|
-
Math.min(
|
|
468
|
+
Math.min(Y, Math.round(T * 0.6))
|
|
469
469
|
);
|
|
470
470
|
f.style("font-size", `${m}px`);
|
|
471
|
-
const F = (o.y1 - o.y0) / 2 + T / 2 +
|
|
471
|
+
const F = (o.y1 - o.y0) / 2 + T / 2 + Z;
|
|
472
472
|
f.attr("y", F);
|
|
473
473
|
const k = o.x1 - o.x0, ie = o.y1 - o.y0 - 4, me = k - 2 * K;
|
|
474
474
|
f.node().getComputedTextLength() > me || F + m > ie || m < I ? f.style("display", "none") : f.style("display", null);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./chunk-JWPE2WC7-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./chunk-JWPE2WC7-DqZGyZxO.cjs"),a=require("./extractHeadings-DLNXUqAG.cjs"),$=require("./cynefin-VYW2F7L2-MpAliYy9.cjs");var B=a.defaultConfig_default.packet,b,m=(b=class{constructor(){this.packet=[],this.setAccTitle=a.setAccTitle,this.getAccTitle=a.getAccTitle,this.setDiagramTitle=a.setDiagramTitle,this.getDiagramTitle=a.getDiagramTitle,this.getAccDescription=a.getAccDescription,this.setAccDescription=a.setAccDescription}getConfig(){const t=a.cleanAndMerge({...B,...a.getConfig().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){a.clear(),this.packet=[]}},a.__name(b,"PacketDB"),b),C=1e4,S=a.__name((e,t)=>{x.populateCommonDb(e,t);let o=-1,i=[],l=1;const{bitsPerRow:c}=t.getConfig();for(let{start:r,end:s,bits:p,label:d}of e.blocks){if(r!==void 0&&s!==void 0&&s<r)throw new Error(`Packet block ${r} - ${s} is invalid. End must be greater than start.`);if(r??=o+1,r!==o+1)throw new Error(`Packet block ${r} - ${s??r} is not contiguous. It should start from ${o+1}.`);if(p===0)throw new Error(`Packet block ${r} is invalid. Cannot have a zero bit field.`);for(s??=r+(p??1)-1,p??=s-r+1,o=s,a.log.debug(`Packet block ${r} - ${o} with label ${d}`);i.length<=c+1&&t.getPacket().length<C;){const[g,n]=_({start:r,end:s,bits:p,label:d},l,c);if(i.push(g),g.end+1===l*c&&(t.pushWord(i),i=[],l++),!n)break;({start:r,end:s,bits:p,label:d}=n)}}t.pushWord(i)},"populate"),_=a.__name((e,t,o)=>{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*o)return[e,void 0];const i=t*o-1,l=t*o;return[{start:e.start,end:i,label:e.label,bits:i-e.start},{start:l,end:e.end,label:e.label,bits:e.end-l}]},"getNextFittingBlock"),w={parser:{yy:void 0},parse:a.__name(async e=>{const t=await $.parse("packet",e),o=w.parser?.yy;if(!(o instanceof m))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");a.log.debug(t),S(t,o)},"parse")},P=a.__name((e,t,o,i)=>{const l=i.db,c=l.getConfig(),{rowHeight:r,paddingY:s,bitWidth:p,bitsPerRow:d}=c,g=l.getPacket(),n=l.getDiagramTitle(),k=r+s,h=k*(g.length+1)-(n?0:r),f=p*d+2,u=a.selectSvgElement(t);u.attr("viewBox",`0 0 ${f} ${h}`),a.configureSvgSize(u,h,f,c.useMaxWidth);for(const[v,y]of g.entries())T(u,y,v,c);u.append("text").text(n).attr("x",f/2).attr("y",h-k/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),T=a.__name((e,t,o,{rowHeight:i,paddingX:l,paddingY:c,bitWidth:r,bitsPerRow:s,showBits:p})=>{const d=e.append("g"),g=o*(i+c)+c;for(const n of t){const k=n.start%s*r+1,h=(n.end-n.start+1)*r-l;if(d.append("rect").attr("x",k).attr("y",g).attr("width",h).attr("height",i).attr("class","packetBlock"),d.append("text").attr("x",k+h/2).attr("y",g+i/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(n.label),!p)continue;const f=n.end===n.start,u=g-2;d.append("text").attr("x",k+(f?h/2:0)).attr("y",u).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",f?"middle":"start").text(n.start),f||d.append("text").attr("x",k+h).attr("y",u).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(n.end)}},"drawWord"),D={draw:P},E={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},F=a.__name(({packet:e}={})=>{const t=a.cleanAndMerge(E,e);return`
|
|
2
2
|
.packetByte {
|
|
3
3
|
font-size: ${t.byteFontSize};
|
|
4
4
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { p as B } from "./chunk-JWPE2WC7-
|
|
2
|
-
import { _ as b,
|
|
1
|
+
import { p as B } from "./chunk-JWPE2WC7-XtdP0lPA.js";
|
|
2
|
+
import { _ as b, ak as m, an as C, V as S, U as w, O as D, K as T, a8 as P, a9 as z, J as E, G as F, ai as A, al as W, ae as _ } from "./extractHeadings-B8u8yqfC.js";
|
|
3
3
|
import { p as N } from "./cynefin-VYW2F7L2-Bkk-F_Js.js";
|
|
4
4
|
var L = W.packet, u, v = (u = class {
|
|
5
5
|
constructor() {
|
|
6
|
-
this.packet = [], this.setAccTitle = D, this.getAccTitle = T, this.setDiagramTitle = P, this.getDiagramTitle = z, this.getAccDescription =
|
|
6
|
+
this.packet = [], this.setAccTitle = D, this.getAccTitle = T, this.setDiagramTitle = P, this.getDiagramTitle = z, this.getAccDescription = E, this.setAccDescription = F;
|
|
7
7
|
}
|
|
8
8
|
getConfig() {
|
|
9
9
|
const t = m({
|
|
10
10
|
...L,
|
|
11
|
-
...
|
|
11
|
+
...A().packet
|
|
12
12
|
});
|
|
13
13
|
return t.showBits && (t.paddingY += 10), t;
|
|
14
14
|
}
|
|
@@ -21,7 +21,7 @@ var L = W.packet, u, v = (u = class {
|
|
|
21
21
|
clear() {
|
|
22
22
|
_(), this.packet = [];
|
|
23
23
|
}
|
|
24
|
-
}, b(u, "PacketDB"), u), M = 1e4,
|
|
24
|
+
}, b(u, "PacketDB"), u), M = 1e4, O = /* @__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] = Y({ 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"), Y = /* @__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), O(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"), K = { draw: G },
|
|
95
|
+
}, "drawWord"), K = { draw: G }, U = {
|
|
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
|
+
}, j = /* @__PURE__ */ b(({ packet: e } = {}) => {
|
|
107
|
+
const t = m(U, 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"), V = {
|
|
133
133
|
parser: x,
|
|
134
134
|
get db() {
|
|
135
135
|
return new v();
|
|
136
136
|
},
|
|
137
137
|
renderer: K,
|
|
138
|
-
styles:
|
|
138
|
+
styles: j
|
|
139
139
|
};
|
|
140
140
|
export {
|
|
141
|
-
|
|
141
|
+
V as diagram
|
|
142
142
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { I as W } from "./chunk-2Q5K7J3B-
|
|
2
|
-
import { p as
|
|
3
|
-
import {
|
|
1
|
+
import { I as W } from "./chunk-2Q5K7J3B-D52R-aDh.js";
|
|
2
|
+
import { p as X } from "./chunk-JWPE2WC7-XtdP0lPA.js";
|
|
3
|
+
import { a8 as G, O as Y, G as P, a9 as F, J as Z, K as j, _ as f, ak as A, U as N, an as U, V as q, ai as D, ae as J, Y as K, aZ as Q, al as ee, a_ as te } from "./extractHeadings-B8u8yqfC.js";
|
|
4
4
|
import { p as ne } from "./cynefin-VYW2F7L2-Bkk-F_Js.js";
|
|
5
|
-
var E = /[─━│┃└┗├┣]/, S = /[└┗├┣]/, re = /[─━]/,
|
|
5
|
+
var E = /[─━│┃└┗├┣]/, S = /[└┗├┣]/, re = /[─━]/, V = /^[\s│┃]+$/, k = /^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/, $ = /^\s*%%/, ie = " ";
|
|
6
6
|
function L(n) {
|
|
7
7
|
return n.some((e) => E.test(e));
|
|
8
8
|
}
|
|
@@ -37,56 +37,56 @@ 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() === "" || $.test(o) ||
|
|
40
|
+
o.trim() === "" || $.test(o) || k.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 };
|
|
44
44
|
const a = _(i), c = [];
|
|
45
|
-
let
|
|
45
|
+
let l = 0;
|
|
46
46
|
for (let s = 0; s <= r; s++)
|
|
47
|
-
c.push(e[s]),
|
|
47
|
+
c.push(e[s]), l++, t.set(l, s + 1);
|
|
48
48
|
for (let s = r + 1; s < e.length; s++) {
|
|
49
49
|
const o = e[s], h = o.trim(), p = s + 1;
|
|
50
50
|
if (h === "") {
|
|
51
|
-
c.push(o),
|
|
51
|
+
c.push(o), l++, t.set(l, p);
|
|
52
52
|
continue;
|
|
53
53
|
}
|
|
54
54
|
if ($.test(o)) {
|
|
55
|
-
c.push(o),
|
|
55
|
+
c.push(o), l++, t.set(l, p);
|
|
56
56
|
continue;
|
|
57
57
|
}
|
|
58
|
-
if (
|
|
59
|
-
c.push(o),
|
|
58
|
+
if (k.test(o)) {
|
|
59
|
+
c.push(o), l++, t.set(l, p);
|
|
60
60
|
continue;
|
|
61
61
|
}
|
|
62
|
-
if (
|
|
62
|
+
if (V.test(o))
|
|
63
63
|
continue;
|
|
64
|
-
const
|
|
64
|
+
const d = o.replace(/\t/g, " "), w = S.exec(d);
|
|
65
65
|
if (w?.index !== void 0) {
|
|
66
66
|
const g = w.index, m = Math.round(g / a) + 1;
|
|
67
67
|
let u = g + 1;
|
|
68
|
-
for (; u <
|
|
68
|
+
for (; u < d.length && re.test(d[u]); )
|
|
69
69
|
u++;
|
|
70
|
-
for (; u <
|
|
70
|
+
for (; u < d.length && d[u] === " "; )
|
|
71
71
|
u++;
|
|
72
|
-
const v =
|
|
72
|
+
const v = d.slice(u).trimEnd();
|
|
73
73
|
if (!v)
|
|
74
74
|
throw new Error(
|
|
75
75
|
`Line ${p}: Empty node — expected a filename or directory name after the box-drawing prefix`
|
|
76
76
|
);
|
|
77
|
-
const
|
|
78
|
-
c.push(
|
|
77
|
+
const O = ie.repeat(m);
|
|
78
|
+
c.push(O + v), l++, t.set(l, p);
|
|
79
79
|
} else {
|
|
80
|
-
if (/^[\s─━│┃└┗├┣]+$/.test(
|
|
80
|
+
if (/^[\s─━│┃└┗├┣]+$/.test(d))
|
|
81
81
|
continue;
|
|
82
|
-
if (E.test(
|
|
83
|
-
c.push(o),
|
|
82
|
+
if (E.test(d))
|
|
83
|
+
c.push(o), l++, t.set(l, p);
|
|
84
84
|
else {
|
|
85
|
-
if (/^\s+/.test(
|
|
85
|
+
if (/^\s+/.test(d))
|
|
86
86
|
throw new Error(
|
|
87
87
|
`Line ${p}: Unexpected indentation without box-drawing characters. In box-drawing format, use ├── or └── prefixes for indented nodes.`
|
|
88
88
|
);
|
|
89
|
-
c.push(o),
|
|
89
|
+
c.push(o), l++, t.set(l, p);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -107,7 +107,7 @@ var x = new W(() => ({
|
|
|
107
107
|
]
|
|
108
108
|
})), oe = /* @__PURE__ */ f(() => {
|
|
109
109
|
x.reset(), J();
|
|
110
|
-
}, "clear"), se = /* @__PURE__ */ f(() => x.records.stack[0], "getRoot"), ae = /* @__PURE__ */ f(() => x.records.cnt, "getCount"), ce = ee.treeView,
|
|
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();
|
|
113
113
|
const c = {
|
|
@@ -123,24 +123,24 @@ var x = new W(() => ({
|
|
|
123
123
|
x.records.stack[x.records.stack.length - 1].children.push(c), x.records.stack.push(c);
|
|
124
124
|
}, "addNode"), he = {
|
|
125
125
|
clear: oe,
|
|
126
|
-
addNode:
|
|
126
|
+
addNode: de,
|
|
127
127
|
getRoot: se,
|
|
128
128
|
getCount: ae,
|
|
129
|
-
getConfig:
|
|
130
|
-
getAccTitle:
|
|
131
|
-
getAccDescription:
|
|
132
|
-
getDiagramTitle:
|
|
129
|
+
getConfig: le,
|
|
130
|
+
getAccTitle: j,
|
|
131
|
+
getAccDescription: Z,
|
|
132
|
+
getDiagramTitle: F,
|
|
133
133
|
setAccDescription: P,
|
|
134
134
|
setAccTitle: Y,
|
|
135
|
-
setDiagramTitle:
|
|
135
|
+
setDiagramTitle: G
|
|
136
136
|
}, I = he, pe = /* @__PURE__ */ f((n) => {
|
|
137
|
-
|
|
137
|
+
X(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,
|
|
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 ? K(o, D()) : void 0;
|
|
144
144
|
I.addNode(t, r, a, c, s, h);
|
|
145
145
|
}
|
|
146
146
|
}, "populate"), fe = {
|
|
@@ -204,7 +204,7 @@ te([
|
|
|
204
204
|
icons: b
|
|
205
205
|
}
|
|
206
206
|
]);
|
|
207
|
-
var y = 14, ge = 4, ue = 16,
|
|
207
|
+
var y = 14, ge = 4, ue = 16, z = /* @__PURE__ */ f((n, e) => `tv-icon-${n}-${e.replace(/[^\w-]/g, "-")}`, "iconSymbolId"), we = /* @__PURE__ */ f(async (n, e, t, r) => {
|
|
208
208
|
const i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ f((s) => {
|
|
209
209
|
const o = B(s, t);
|
|
210
210
|
o && i.add(o), s.children.forEach(a);
|
|
@@ -219,45 +219,45 @@ var y = 14, ge = 4, ue = 16, X = /* @__PURE__ */ f((n, e) => `tv-icon-${n}-${e.r
|
|
|
219
219
|
width: y
|
|
220
220
|
})
|
|
221
221
|
}))
|
|
222
|
-
),
|
|
222
|
+
), l = n.append("defs");
|
|
223
223
|
for (const { icon: s, svg: o } of c)
|
|
224
|
-
|
|
224
|
+
l.append("g").attr("id", z(r, s)).html(o);
|
|
225
225
|
}, "injectIconDefs"), me = /* @__PURE__ */ f((n, e, t, r, i, a) => {
|
|
226
226
|
const c = r.append("g");
|
|
227
|
-
let
|
|
228
|
-
t.nodeType === "directory" && (
|
|
227
|
+
let l = "treeView-node-label";
|
|
228
|
+
t.nodeType === "directory" && (l += " treeView-node-dir"), t.cssClass && (l += ` ${t.cssClass}`);
|
|
229
229
|
const s = y + ge, o = B(t, i), h = o !== void 0;
|
|
230
|
-
o && c.append("use").attr("xlink:href", `#${
|
|
231
|
-
const p = c.append("text").text(t.name).attr("dominant-baseline", "middle").attr("class",
|
|
230
|
+
o && c.append("use").attr("xlink:href", `#${z(a, o)}`).attr("x", n + i.paddingX).attr("y", e + i.paddingY).attr("class", "treeView-node-icon");
|
|
231
|
+
const p = c.append("text").text(t.name).attr("dominant-baseline", "middle").attr("class", l), { height: d, width: w } = p.node().getBBox(), g = d + i.paddingY * 2, m = n + i.paddingX + (h ? s : 0);
|
|
232
232
|
p.attr("x", m), p.attr("y", e + g / 2);
|
|
233
233
|
const u = m + w, v = w + i.paddingX * 2 + (h ? s : 0);
|
|
234
234
|
return t.BBox = { x: n, y: e, width: v, height: g }, t.cssClass?.split(/\s+/).includes("highlight") && c.insert("rect", ":first-child").attr("x", n).attr("y", e + 1).attr("width", 0).attr("height", g - 2).attr("rx", 3).attr("class", "treeView-highlight-bg"), { node: t, nodeGroup: c, labelRightEdge: u, centerY: e + g / 2 };
|
|
235
235
|
}, "positionLabel"), T = /* @__PURE__ */ f((n, e, t, r, i, a) => n.append("line").attr("x1", e).attr("y1", t).attr("x2", r).attr("y2", i).attr("stroke-width", a).attr("class", "treeView-node-line"), "positionLine"), xe = /* @__PURE__ */ f((n, e, t, r) => {
|
|
236
236
|
let i = 0, a = 0;
|
|
237
|
-
const c = [],
|
|
238
|
-
const g = w * (
|
|
237
|
+
const c = [], l = /* @__PURE__ */ f((h, p, d, w) => {
|
|
238
|
+
const g = w * (d.rowIndent + d.paddingX), m = me(g, i, p, h, d, r);
|
|
239
239
|
c.push(m);
|
|
240
240
|
const { height: u, width: v } = p.BBox;
|
|
241
241
|
T(
|
|
242
242
|
h,
|
|
243
|
-
g -
|
|
243
|
+
g - d.rowIndent,
|
|
244
244
|
i + u / 2,
|
|
245
245
|
g,
|
|
246
246
|
i + u / 2,
|
|
247
|
-
|
|
247
|
+
d.lineThickness
|
|
248
248
|
), a = Math.max(a, g + v), i += u;
|
|
249
249
|
}, "drawNode"), s = /* @__PURE__ */ f((h, p = 0) => {
|
|
250
|
-
|
|
250
|
+
l(n, h, t, p), h.children.forEach((m) => {
|
|
251
251
|
s(m, p + 1);
|
|
252
252
|
});
|
|
253
|
-
const { x:
|
|
253
|
+
const { x: d, y: w, height: g } = h.BBox;
|
|
254
254
|
if (h.children.length) {
|
|
255
255
|
const { y: m, height: u } = h.children[h.children.length - 1].BBox;
|
|
256
256
|
T(
|
|
257
257
|
n,
|
|
258
|
-
|
|
258
|
+
d + t.paddingX,
|
|
259
259
|
w + g,
|
|
260
|
-
|
|
260
|
+
d + t.paddingX,
|
|
261
261
|
m + u / 2 + t.lineThickness / 2,
|
|
262
262
|
t.lineThickness
|
|
263
263
|
);
|
|
@@ -266,9 +266,9 @@ var y = 14, ge = 4, ue = 16, X = /* @__PURE__ */ f((n, e) => `tv-icon-${n}-${e.r
|
|
|
266
266
|
s(e);
|
|
267
267
|
const o = c.filter((h) => h.node.description);
|
|
268
268
|
if (o.length > 0) {
|
|
269
|
-
const p = Math.max(...c.map((
|
|
270
|
-
for (const
|
|
271
|
-
const g =
|
|
269
|
+
const p = Math.max(...c.map((d) => d.labelRightEdge)) + ue;
|
|
270
|
+
for (const d of o) {
|
|
271
|
+
const g = d.nodeGroup.append("text").text(d.node.description).attr("dominant-baseline", "middle").attr("class", "treeView-node-description").attr("x", p).attr("y", d.centerY).node().getBBox();
|
|
272
272
|
a = Math.max(a, p + g.width + t.paddingX);
|
|
273
273
|
}
|
|
274
274
|
}
|
|
@@ -276,20 +276,20 @@ var y = 14, ge = 4, ue = 16, X = /* @__PURE__ */ f((n, e) => `tv-icon-${n}-${e.r
|
|
|
276
276
|
if (h.node.cssClass?.split(/\s+/).includes("highlight")) {
|
|
277
277
|
const p = h.nodeGroup.select(".treeView-highlight-bg");
|
|
278
278
|
if (!p.empty()) {
|
|
279
|
-
const
|
|
280
|
-
p.attr("width",
|
|
279
|
+
const d = a - h.node.BBox.x + 8;
|
|
280
|
+
p.attr("width", d), a = Math.max(a, h.node.BBox.x + d + 2);
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
return { totalHeight: i, totalWidth: a };
|
|
284
284
|
}, "drawTree"), ve = /* @__PURE__ */ f(async (n, e, t, r) => {
|
|
285
285
|
N.debug(`Rendering treeView diagram
|
|
286
286
|
` + n);
|
|
287
|
-
const i = r.db, a = i.getRoot(), c = i.getConfig(),
|
|
288
|
-
await we(
|
|
289
|
-
const s =
|
|
287
|
+
const i = r.db, a = i.getRoot(), c = i.getConfig(), l = U(e);
|
|
288
|
+
await we(l, a, c, e);
|
|
289
|
+
const s = l.append("g");
|
|
290
290
|
s.attr("class", "tree-view");
|
|
291
291
|
const { totalHeight: o, totalWidth: h } = xe(s, a, c, e);
|
|
292
|
-
|
|
292
|
+
l.attr("viewBox", `-${c.lineThickness / 2} 0 ${h} ${o}`), q(l, o, h, c.useMaxWidth);
|
|
293
293
|
}, "draw"), be = {
|
|
294
294
|
draw: ve
|
|
295
295
|
}, Ie = be, Ce = {
|
|
@@ -310,7 +310,7 @@ var y = 14, ge = 4, ue = 16, X = /* @__PURE__ */ f((n, e) => `tv-icon-${n}-${e.r
|
|
|
310
310
|
iconColor: i,
|
|
311
311
|
descriptionColor: a,
|
|
312
312
|
highlightBg: c,
|
|
313
|
-
highlightStroke:
|
|
313
|
+
highlightStroke: l
|
|
314
314
|
} = A(Ce, n);
|
|
315
315
|
return `
|
|
316
316
|
.treeView-node-label {
|
|
@@ -335,7 +335,7 @@ var y = 14, ge = 4, ue = 16, X = /* @__PURE__ */ f((n, e) => `tv-icon-${n}-${e.r
|
|
|
335
335
|
}
|
|
336
336
|
.treeView-highlight-bg {
|
|
337
337
|
fill: ${c};
|
|
338
|
-
stroke: ${
|
|
338
|
+
stroke: ${l};
|
|
339
339
|
stroke-width: 1;
|
|
340
340
|
}
|
|
341
341
|
`;
|