@leanspec/ui-components 0.2.21 → 0.2.22
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/dist/{_baseUniq-KSDS6tgF.js → _baseUniq-D7Jo4wA-.js} +2 -2
- package/dist/{_baseUniq-ifpVq4u5.cjs → _baseUniq-DuU2z5Ko.cjs} +1 -1
- package/dist/{arc-CutFaiCL.cjs → arc-DVobalXV.cjs} +1 -1
- package/dist/{arc-C-X5Xt_b.js → arc-bSbgZKu2.js} +1 -1
- package/dist/{architecture-U656AL7Q-DOVRDeZr.cjs → architecture-U656AL7Q-BnnsKr-v.cjs} +1 -1
- package/dist/{architecture-U656AL7Q-BB1A66AM.js → architecture-U656AL7Q-pOUzdaWZ.js} +1 -1
- package/dist/{architectureDiagram-VXUJARFQ-Bal8NTn4.js → architectureDiagram-VXUJARFQ-B9csKaKv.js} +1272 -1279
- package/dist/architectureDiagram-VXUJARFQ-Dwe8uzg_.cjs +36 -0
- package/dist/blockDiagram-VD42YOAC-B4iBhDdw.cjs +122 -0
- package/dist/{blockDiagram-VD42YOAC-B2gTo5wW.js → blockDiagram-VD42YOAC-DrRsdznF.js} +911 -920
- package/dist/c4Diagram-YG6GDRKO-BRDnNTAH.cjs +10 -0
- package/dist/{c4Diagram-YG6GDRKO-dIf_vNCY.js → c4Diagram-YG6GDRKO-Di2rkJ8i.js} +162 -163
- package/dist/{channel-klR7o7JB.js → channel-CTeTHv-y.js} +1 -1
- package/dist/channel-Dzz86sIh.cjs +1 -0
- package/dist/chunk-4BX2VUAB-Ckv-xIp1.cjs +1 -0
- package/dist/chunk-4BX2VUAB-Dkr-Egsj.js +8 -0
- package/dist/{chunk-55IACEB6-C88Xx0rU.cjs → chunk-55IACEB6-CVnZTCiR.cjs} +1 -1
- package/dist/{chunk-55IACEB6-Dd3NjClm.js → chunk-55IACEB6-D_uwi6CC.js} +1 -1
- package/dist/{chunk-B4BG7PRW-DLUrgkJI.js → chunk-B4BG7PRW-BipBIVhj.js} +247 -248
- package/dist/{chunk-B4BG7PRW-BTU_nPVE.cjs → chunk-B4BG7PRW-Bne1UwNu.cjs} +6 -6
- package/dist/{chunk-DI55MBZ5-BwHLqSW9.js → chunk-DI55MBZ5-8tWOlvAD.js} +440 -452
- package/dist/chunk-DI55MBZ5-UAAzyEQX.cjs +220 -0
- package/dist/{chunk-FMBD7UC4-6dsbMKM7.js → chunk-FMBD7UC4-CLc8_72-.js} +1 -1
- package/dist/{chunk-FMBD7UC4-CedTj9g2.cjs → chunk-FMBD7UC4-DsaPsLgZ.cjs} +1 -1
- package/dist/chunk-QN33PNHL-BBlw4H4R.cjs +1 -0
- package/dist/chunk-QN33PNHL-QKH9jByz.js +19 -0
- package/dist/{chunk-QZHKN3VN-CVAEdzef.js → chunk-QZHKN3VN-BPpgPA2g.js} +1 -1
- package/dist/{chunk-QZHKN3VN-CU1cLvn7.cjs → chunk-QZHKN3VN-CB9ZTvXU.cjs} +1 -1
- package/dist/{chunk-TZMSLE5B-Cc8_PJIq.js → chunk-TZMSLE5B-Coq49FaX.js} +1 -1
- package/dist/{chunk-TZMSLE5B-Dy6zxWyY.cjs → chunk-TZMSLE5B-Dl7DiX7D.cjs} +1 -1
- package/dist/{classDiagram-v2-WZHVMYZB-D7bjndmT.js → classDiagram-2ON5EDUG-DYaKkEXb.js} +2 -2
- package/dist/{classDiagram-2ON5EDUG-CJQWUYqu.cjs → classDiagram-2ON5EDUG-Fsj2z4ej.cjs} +1 -1
- package/dist/{classDiagram-2ON5EDUG-D7bjndmT.js → classDiagram-v2-WZHVMYZB-DYaKkEXb.js} +2 -2
- package/dist/{classDiagram-v2-WZHVMYZB-CJQWUYqu.cjs → classDiagram-v2-WZHVMYZB-Fsj2z4ej.cjs} +1 -1
- package/dist/{clone-7srXemyd.js → clone-Ctm6tjrV.js} +1 -1
- package/dist/clone-JAtNXNmq.cjs +1 -0
- package/dist/{code-block-37QAKDTI-MRm4xHKr.js → code-block-37QAKDTI-3zaK1Sok.js} +1 -1
- package/dist/{code-block-37QAKDTI-BAYBliUK.cjs → code-block-37QAKDTI-UmxtJ5VR.cjs} +1 -1
- package/dist/components/graph/dependency-graph.d.ts.map +1 -1
- package/dist/components/hierarchy/hierarchy-tree.d.ts +17 -0
- package/dist/components/hierarchy/hierarchy-tree.d.ts.map +1 -0
- package/dist/components/hierarchy/index.d.ts +2 -0
- package/dist/components/hierarchy/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/spec/spec-card.d.ts +1 -1
- package/dist/components/spec/spec-card.d.ts.map +1 -1
- package/dist/components/ui/index.d.ts +3 -3
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/cose-bilkent-S5V4N54A-BMt11jHq.cjs +1 -0
- package/dist/{cose-bilkent-S5V4N54A-0O3dLIoy.js → cose-bilkent-S5V4N54A-iUMgKFJZ.js} +281 -281
- package/dist/cytoscape.esm-CNUX3VTg.cjs +321 -0
- package/dist/{cytoscape.esm-CjI2IsL8.js → cytoscape.esm-Cvf3sx9F.js} +18 -49
- package/dist/dagre-6UL2VRFP-CKc2IEbO.js +443 -0
- package/dist/dagre-6UL2VRFP-sN44kpPp.cjs +4 -0
- package/dist/{diagram-PSM6KHXK-s2xYLlND.js → diagram-PSM6KHXK-DERIvROx.js} +17 -19
- package/dist/diagram-PSM6KHXK-Ltn89usT.cjs +24 -0
- package/dist/{diagram-QEK2KX5R-D700jvoY.js → diagram-QEK2KX5R-B6CdcylU.js} +10 -14
- package/dist/diagram-QEK2KX5R-CDZWBlgA.cjs +43 -0
- package/dist/{diagram-S2PKOQOG-BkgBSa1Q.js → diagram-S2PKOQOG-5f_4uCtF.js} +22 -23
- package/dist/diagram-S2PKOQOG-D4WcZEo0.cjs +24 -0
- package/dist/{erDiagram-Q2GNP2WA-CXv6THpi.js → erDiagram-Q2GNP2WA-CnN7DF_N.js} +73 -74
- package/dist/{erDiagram-Q2GNP2WA-DKKIPwgH.cjs → erDiagram-Q2GNP2WA-mIz8VRgG.cjs} +3 -3
- package/dist/flowDiagram-NV44I4VS-BwUl8_y0.cjs +162 -0
- package/dist/{flowDiagram-NV44I4VS-Dsrv00Gy.js → flowDiagram-NV44I4VS-Dl3ZZj2W.js} +438 -445
- package/dist/{ganttDiagram-JELNMOA3-BuwyOUxF.cjs → ganttDiagram-JELNMOA3-Dl_PUPHn.cjs} +1 -1
- package/dist/{ganttDiagram-JELNMOA3-CqVYbgbk.js → ganttDiagram-JELNMOA3-q87tSGGF.js} +2 -2
- package/dist/{gitGraph-F6HP7TQM-q5owfB75.js → gitGraph-F6HP7TQM-C4DmI2Gg.js} +1 -1
- package/dist/{gitGraph-F6HP7TQM-BtoBLEOj.cjs → gitGraph-F6HP7TQM-Cq9d8Pu6.cjs} +1 -1
- package/dist/gitGraphDiagram-NY62KEGX-DMhKqh_S.cjs +65 -0
- package/dist/gitGraphDiagram-NY62KEGX-NeHUXng4.js +699 -0
- package/dist/{graph-CxpBbnBw.cjs → graph-AuIe-DO_.cjs} +1 -1
- package/dist/{graph-rt_wscbL.js → graph-Da1z0n_J.js} +2 -2
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/use-spec-sync.d.ts +13 -0
- package/dist/hooks/use-spec-sync.d.ts.map +1 -0
- package/dist/{index-BsdeQX2F.js → index-B5zgF_S5.js} +30337 -30055
- package/dist/index-KEDsBA0n.cjs +2103 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +512 -500
- package/dist/info-NVLQJR56-A56PvZ_B.js +5 -0
- package/dist/{info-NVLQJR56-Ctx23Jwq.cjs → info-NVLQJR56-FWiEuR29.cjs} +1 -1
- package/dist/{infoDiagram-WHAUD3N6-Fq8ToFQ6.js → infoDiagram-WHAUD3N6-Cj-s-gtw.js} +2 -2
- package/dist/{infoDiagram-WHAUD3N6-ICmXrgfx.cjs → infoDiagram-WHAUD3N6-Dvc-cZjb.cjs} +1 -1
- package/dist/{journeyDiagram-XKPGCS4Q-BkYLuV5M.cjs → journeyDiagram-XKPGCS4Q-B54o9W3g.cjs} +1 -1
- package/dist/{journeyDiagram-XKPGCS4Q-BzZgPZwu.js → journeyDiagram-XKPGCS4Q-BbXXFBC-.js} +4 -4
- package/dist/kanban-definition-3W4ZIXB7-BQfiIWMB.cjs +89 -0
- package/dist/kanban-definition-3W4ZIXB7-ClCUbNCO.js +719 -0
- package/dist/{layout-CeChnsru.cjs → layout-9b_FTQ6g.cjs} +1 -1
- package/dist/{layout-CX9neEHw.js → layout-BoJlbrAK.js} +4 -4
- package/dist/lib/hierarchy.d.ts +12 -0
- package/dist/lib/hierarchy.d.ts.map +1 -0
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/{linear-CkUVga7d.js → linear-4rmylyIU.js} +1 -1
- package/dist/{linear-DLfe3Is-.cjs → linear-FU7lEwDb.cjs} +1 -1
- package/dist/{mermaid-4DMBBIKO-DK6bOe0l.cjs → mermaid-4DMBBIKO-CGMd2ylH.cjs} +1 -1
- package/dist/mermaid-4DMBBIKO-CNvUKRvV.js +4 -0
- package/dist/{mermaid-parser.core-B7VTdQ1C.js → mermaid-parser.core-BbeEQ08m.js} +2740 -2756
- package/dist/mermaid-parser.core-CQwGaxt2.cjs +128 -0
- package/dist/{min-Ar5ebLd-.js → min-C8aXS73f.js} +2 -2
- package/dist/{min-C_bmS8M7.cjs → min-Ddv5U3O-.cjs} +1 -1
- package/dist/{mindmap-definition-VGOIOE7T-DeGZNL21.js → mindmap-definition-VGOIOE7T-BRNm-2aJ.js} +166 -169
- package/dist/mindmap-definition-VGOIOE7T-Gp-Ji6eO.cjs +68 -0
- package/dist/{ordinal-DfAQgscy.js → ordinal-B6-f3MAq.js} +1 -1
- package/dist/{packet-BFZMPI3H-DFZzoAsC.js → packet-BFZMPI3H-CJ8lOlJN.js} +1 -1
- package/dist/{packet-BFZMPI3H-BVRarKKV.cjs → packet-BFZMPI3H-CpWVF6Ne.cjs} +1 -1
- package/dist/pie-7BOR55EZ-BCyVC33Q.js +5 -0
- package/dist/{pie-7BOR55EZ-0edBRKAY.cjs → pie-7BOR55EZ-Ceke0LDu.cjs} +1 -1
- package/dist/{pieDiagram-ADFJNKIX-C_V2NX6O.js → pieDiagram-ADFJNKIX-BVRqurYx.js} +21 -21
- package/dist/{pieDiagram-ADFJNKIX-Ceq-kf3C.cjs → pieDiagram-ADFJNKIX-CwhRxtMH.cjs} +2 -2
- package/dist/{quadrantDiagram-AYHSOK5B-B8fSnYQi.js → quadrantDiagram-AYHSOK5B-CcsZBY3e.js} +227 -229
- package/dist/quadrantDiagram-AYHSOK5B-DBTVya8p.cjs +7 -0
- package/dist/radar-NHE76QYJ-C6zEuLeW.js +5 -0
- package/dist/{radar-NHE76QYJ-gAJ22qc7.cjs → radar-NHE76QYJ-CX8DsGdu.cjs} +1 -1
- package/dist/{requirementDiagram-UZGBJVZJ-D6BE-Q1l.cjs → requirementDiagram-UZGBJVZJ-5bxQUo0r.cjs} +7 -7
- package/dist/{requirementDiagram-UZGBJVZJ-MnXD59Yw.js → requirementDiagram-UZGBJVZJ-CV5SUGj-.js} +186 -188
- package/dist/{sankeyDiagram-TZEHDZUN-Dfyu7oJ6.js → sankeyDiagram-TZEHDZUN-BFPvVGcz.js} +186 -186
- package/dist/{sankeyDiagram-TZEHDZUN-Dx8_KSIc.cjs → sankeyDiagram-TZEHDZUN-D33DzO8E.cjs} +5 -5
- package/dist/{sequenceDiagram-WL72ISMW-D2pgAoWi.js → sequenceDiagram-WL72ISMW-CQ5u3b_o.js} +213 -220
- package/dist/{sequenceDiagram-WL72ISMW-CUYHrDfm.cjs → sequenceDiagram-WL72ISMW-DFEVNSSA.cjs} +16 -16
- package/dist/{stateDiagram-FKZM4ZOC-CtYt1Ixa.cjs → stateDiagram-FKZM4ZOC-sKqH3kHZ.cjs} +1 -1
- package/dist/{stateDiagram-FKZM4ZOC-DYV-na53.js → stateDiagram-FKZM4ZOC-zOb-V3pD.js} +4 -4
- package/dist/{stateDiagram-v2-4FDKWEC3-CeSnHO3T.cjs → stateDiagram-v2-4FDKWEC3-DwWb55sM.cjs} +1 -1
- package/dist/{stateDiagram-v2-4FDKWEC3-Kp4sxr9o.js → stateDiagram-v2-4FDKWEC3-_Mzc1jVl.js} +2 -2
- package/dist/{timeline-definition-IT6M3QCI-621ePKJ0.js → timeline-definition-IT6M3QCI-B2T2QrC5.js} +211 -215
- package/dist/timeline-definition-IT6M3QCI-D19MQs5w.cjs +61 -0
- package/dist/{treemap-KMMF4GRG-DSNryTu7.cjs → treemap-KMMF4GRG-C7E3CtG7.cjs} +1 -1
- package/dist/{treemap-KMMF4GRG-l6HrdCLC.js → treemap-KMMF4GRG-wB3pBnFc.js} +1 -1
- package/dist/types/specs.d.ts +2 -0
- package/dist/types/specs.d.ts.map +1 -1
- package/dist/ui-components.css +1 -1
- package/dist/{xychartDiagram-PRI3JC2R-CkfCv2o_.js → xychartDiagram-PRI3JC2R-BSPghzKh.js} +3 -3
- package/dist/{xychartDiagram-PRI3JC2R-C2_xziD5.cjs → xychartDiagram-PRI3JC2R-hKFxVf6x.cjs} +1 -1
- package/package.json +5 -2
- package/dist/architectureDiagram-VXUJARFQ-WCtQIdet.cjs +0 -36
- package/dist/blockDiagram-VD42YOAC-CGdaLv7H.cjs +0 -122
- package/dist/c4Diagram-YG6GDRKO-DfRXyZHM.cjs +0 -10
- package/dist/channel-CMrUjUoZ.cjs +0 -1
- package/dist/chunk-4BX2VUAB-BQgzc1Sm.js +0 -9
- package/dist/chunk-4BX2VUAB-CO5acanJ.cjs +0 -1
- package/dist/chunk-DI55MBZ5-lVvJu2kr.cjs +0 -220
- package/dist/chunk-QN33PNHL-DHNejhbC.js +0 -20
- package/dist/chunk-QN33PNHL-Dr9ghdFD.cjs +0 -1
- package/dist/clone-Chgndk5P.cjs +0 -1
- package/dist/cose-bilkent-S5V4N54A-CPai-c_a.cjs +0 -1
- package/dist/cytoscape.esm-o9WRfNPd.cjs +0 -331
- package/dist/dagre-6UL2VRFP-BqaZre9N.js +0 -446
- package/dist/dagre-6UL2VRFP-CeIiJJG5.cjs +0 -4
- package/dist/diagram-PSM6KHXK-oD045yZG.cjs +0 -24
- package/dist/diagram-QEK2KX5R-VH7_rcp0.cjs +0 -43
- package/dist/diagram-S2PKOQOG-CjDpLVdl.cjs +0 -24
- package/dist/flowDiagram-NV44I4VS-U52jVnrS.cjs +0 -162
- package/dist/gitGraphDiagram-NY62KEGX-DH1I05Ix.cjs +0 -65
- package/dist/gitGraphDiagram-NY62KEGX-DOanbk62.js +0 -712
- package/dist/index-Cg8ByiK0.cjs +0 -2153
- package/dist/info-NVLQJR56-hH82KARZ.js +0 -5
- package/dist/kanban-definition-3W4ZIXB7-BV7UYL3n.cjs +0 -89
- package/dist/kanban-definition-3W4ZIXB7-CrmrjRAg.js +0 -721
- package/dist/mermaid-4DMBBIKO-wnX9ATcq.js +0 -4
- package/dist/mermaid-parser.core-DvlzR6J2.cjs +0 -128
- package/dist/mindmap-definition-VGOIOE7T-BBqv9TKM.cjs +0 -68
- package/dist/pie-7BOR55EZ-zLMdfI8h.js +0 -5
- package/dist/quadrantDiagram-AYHSOK5B-BButfYaS.cjs +0 -7
- package/dist/radar-NHE76QYJ-DeqJwy76.js +0 -5
- package/dist/timeline-definition-IT6M3QCI-4fRZfQpb.cjs +0 -61
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { _ as w, K as te, L as ae, P as he, i as ue, l as J, bb as P, h as Y, e as pe, d as fe, y as ge, z as me, g as ye, s as Se, M as ve, bc as xe, D as be } from "./index-
|
|
2
|
-
import { s as we } from "./chunk-QN33PNHL-
|
|
3
|
-
import { p as Ce } from "./chunk-4BX2VUAB-
|
|
4
|
-
import { p as Te } from "./mermaid-parser.core-
|
|
1
|
+
import { _ as w, K as te, L as ae, P as he, i as ue, l as J, bb as P, h as Y, e as pe, d as fe, y as ge, z as me, g as ye, s as Se, M as ve, bc as xe, D as be } from "./index-B5zgF_S5.js";
|
|
2
|
+
import { s as we } from "./chunk-QN33PNHL-QKH9jByz.js";
|
|
3
|
+
import { p as Ce } from "./chunk-4BX2VUAB-Dkr-Egsj.js";
|
|
4
|
+
import { p as Te } from "./mermaid-parser.core-BbeEQ08m.js";
|
|
5
5
|
import { b as O } from "./defaultLocale-D7EN2tov.js";
|
|
6
|
-
import { o as Z } from "./ordinal-
|
|
6
|
+
import { o as Z } from "./ordinal-B6-f3MAq.js";
|
|
7
7
|
function Le(t) {
|
|
8
8
|
var a = 0, l = t.children, n = l && l.length;
|
|
9
9
|
if (!n) a = 1;
|
|
@@ -236,7 +236,7 @@ var R, ne = (R = class {
|
|
|
236
236
|
});
|
|
237
237
|
}
|
|
238
238
|
addNode(a, l) {
|
|
239
|
-
this.nodes.push(a), this.levels.set(a, l), l === 0 && (this.outerNodes.push(a), this.root
|
|
239
|
+
this.nodes.push(a), this.levels.set(a, l), l === 0 && (this.outerNodes.push(a), this.root ??= a);
|
|
240
240
|
}
|
|
241
241
|
getRoot() {
|
|
242
242
|
return { name: "", children: this.outerNodes };
|
|
@@ -244,15 +244,14 @@ var R, ne = (R = class {
|
|
|
244
244
|
addClass(a, l) {
|
|
245
245
|
const n = this.classes.get(a) ?? { id: a, styles: [], textStyles: [] }, o = l.replace(/\\,/g, "§§§").replace(/,/g, ";").replace(/§§§/g, ",").split(";");
|
|
246
246
|
o && o.forEach((s) => {
|
|
247
|
-
xe(s) && (n
|
|
247
|
+
xe(s) && (n?.textStyles ? n.textStyles.push(s) : n.textStyles = [s]), n?.styles ? n.styles.push(s) : n.styles = [s];
|
|
248
248
|
}), this.classes.set(a, n);
|
|
249
249
|
}
|
|
250
250
|
getClasses() {
|
|
251
251
|
return this.classes;
|
|
252
252
|
}
|
|
253
253
|
getStylesForClass(a) {
|
|
254
|
-
|
|
255
|
-
return ((l = this.classes.get(a)) == null ? void 0 : l.styles) ?? [];
|
|
254
|
+
return this.classes.get(a)?.styles ?? [];
|
|
256
255
|
}
|
|
257
256
|
clear() {
|
|
258
257
|
be(), this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.root = void 0;
|
|
@@ -267,7 +266,7 @@ function le(t) {
|
|
|
267
266
|
name: n.name,
|
|
268
267
|
children: n.type === "Leaf" ? void 0 : []
|
|
269
268
|
};
|
|
270
|
-
for (o.classSelector = n
|
|
269
|
+
for (o.classSelector = n?.classSelector, n?.cssCompiledStyles && (o.cssCompiledStyles = [n.cssCompiledStyles]), n.type === "Leaf" && n.value !== void 0 && (o.value = n.value); l.length > 0 && l[l.length - 1].level >= n.level; )
|
|
271
270
|
l.pop();
|
|
272
271
|
if (l.length === 0)
|
|
273
272
|
a.push(o);
|
|
@@ -307,18 +306,17 @@ var Qe = /* @__PURE__ */ w((t, a) => {
|
|
|
307
306
|
// @ts-expect-error - TreeMapDB is not assignable to DiagramDB
|
|
308
307
|
parser: { yy: void 0 },
|
|
309
308
|
parse: /* @__PURE__ */ w(async (t) => {
|
|
310
|
-
var a;
|
|
311
309
|
try {
|
|
312
|
-
const
|
|
313
|
-
J.debug("Treemap AST:",
|
|
314
|
-
const
|
|
315
|
-
if (!(
|
|
310
|
+
const l = await Te("treemap", t);
|
|
311
|
+
J.debug("Treemap AST:", l);
|
|
312
|
+
const n = re.parser?.yy;
|
|
313
|
+
if (!(n instanceof ne))
|
|
316
314
|
throw new Error(
|
|
317
315
|
"parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues."
|
|
318
316
|
);
|
|
319
|
-
Qe(
|
|
320
|
-
} catch (
|
|
321
|
-
throw J.error("Error parsing treemap:",
|
|
317
|
+
Qe(l, n);
|
|
318
|
+
} catch (a) {
|
|
319
|
+
throw J.error("Error parsing treemap:", a), a;
|
|
322
320
|
}
|
|
323
321
|
}, "parse")
|
|
324
322
|
}, tt = 10, B = 10, X = 25, at = /* @__PURE__ */ w((t, a, l, n) => {
|
|
@@ -476,7 +474,7 @@ var Qe = /* @__PURE__ */ w((t, a) => {
|
|
|
476
474
|
f.node().getComputedTextLength() > de || z + F > ce || F < y ? f.style("display", "none") : f.style("display", null);
|
|
477
475
|
});
|
|
478
476
|
const oe = s.diagramPadding ?? 8;
|
|
479
|
-
we(b, oe, "flowchart",
|
|
477
|
+
we(b, oe, "flowchart", s?.useMaxWidth || !1);
|
|
480
478
|
}, "draw"), nt = /* @__PURE__ */ w(function(t, a) {
|
|
481
479
|
return a.db.getClasses();
|
|
482
480
|
}, "getClasses"), lt = { draw: at, getClasses: nt }, rt = {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index-KEDsBA0n.cjs"),se=require("./chunk-QN33PNHL-BBlw4H4R.cjs"),ie=require("./chunk-4BX2VUAB-Ckv-xIp1.cjs"),oe=require("./mermaid-parser.core-CQwGaxt2.cjs"),I=require("./defaultLocale-DIVzfLaQ.cjs"),U=require("./ordinal-CagbB1m8.cjs");function ce(a){var t=0,l=a.children,n=l&&l.length;if(!n)t=1;else for(;--n>=0;)t+=l[n].value;a.value=t}function de(){return this.eachAfter(ce)}function ue(a,t){let l=-1;for(const n of this)a.call(t,n,++l,this);return this}function he(a,t){for(var l=this,n=[l],o,s,d=-1;l=n.pop();)if(a.call(t,l,++d,this),o=l.children)for(s=o.length-1;s>=0;--s)n.push(o[s]);return this}function pe(a,t){for(var l=this,n=[l],o=[],s,d,h,m=-1;l=n.pop();)if(o.push(l),s=l.children)for(d=0,h=s.length;d<h;++d)n.push(s[d]);for(;l=o.pop();)a.call(t,l,++m,this);return this}function fe(a,t){let l=-1;for(const n of this)if(a.call(t,n,++l,this))return n}function ge(a){return this.eachAfter(function(t){for(var l=+a(t.data)||0,n=t.children,o=n&&n.length;--o>=0;)l+=n[o].value;t.value=l})}function me(a){return this.eachBefore(function(t){t.children&&t.children.sort(a)})}function ye(a){for(var t=this,l=Se(t,a),n=[t];t!==l;)t=t.parent,n.push(t);for(var o=n.length;a!==l;)n.splice(o,0,a),a=a.parent;return n}function Se(a,t){if(a===t)return a;var l=a.ancestors(),n=t.ancestors(),o=null;for(a=l.pop(),t=n.pop();a===t;)o=a,a=l.pop(),t=n.pop();return o}function ve(){for(var a=this,t=[a];a=a.parent;)t.push(a);return t}function xe(){return Array.from(this)}function be(){var a=[];return this.eachBefore(function(t){t.children||a.push(t)}),a}function we(){var a=this,t=[];return a.each(function(l){l!==a&&t.push({source:l.parent,target:l})}),t}function*Ce(){var a=this,t,l=[a],n,o,s;do for(t=l.reverse(),l=[];a=t.pop();)if(yield a,n=a.children)for(o=0,s=n.length;o<s;++o)l.push(n[o]);while(l.length)}function Q(a,t){a instanceof Map?(a=[void 0,a],t===void 0&&(t=Le)):t===void 0&&(t=Te);for(var l=new j(a),n,o=[l],s,d,h,m;n=o.pop();)if((d=t(n.data))&&(m=(d=Array.from(d)).length))for(n.children=d,h=m-1;h>=0;--h)o.push(s=d[h]=new j(d[h])),s.parent=n,s.depth=n.depth+1;return l.eachBefore(Ae)}function _e(){return Q(this).eachBefore($e)}function Te(a){return a.children}function Le(a){return Array.isArray(a)?a[1]:null}function $e(a){a.data.value!==void 0&&(a.value=a.data.value),a.data=a.data.data}function Ae(a){var t=0;do a.height=t;while((a=a.parent)&&a.height<++t)}function j(a){this.data=a,this.depth=this.height=0,this.parent=null}j.prototype=Q.prototype={constructor:j,count:de,each:ue,eachAfter:pe,eachBefore:he,find:fe,sum:ge,sort:me,path:ye,ancestors:ve,descendants:xe,leaves:be,links:we,copy:_e,[Symbol.iterator]:Ce};function ke(a){if(typeof a!="function")throw new Error;return a}function q(){return 0}function O(a){return function(){return a}}function Ne(a){a.x0=Math.round(a.x0),a.y0=Math.round(a.y0),a.x1=Math.round(a.x1),a.y1=Math.round(a.y1)}function Me(a,t,l,n,o){for(var s=a.children,d,h=-1,m=s.length,c=a.value&&(n-t)/a.value;++h<m;)d=s[h],d.y0=l,d.y1=o,d.x0=t,d.x1=t+=d.value*c}function Fe(a,t,l,n,o){for(var s=a.children,d,h=-1,m=s.length,c=a.value&&(o-l)/a.value;++h<m;)d=s[h],d.x0=t,d.x1=n,d.y0=l,d.y1=l+=d.value*c}var ze=(1+Math.sqrt(5))/2;function Ve(a,t,l,n,o,s){for(var d=[],h=t.children,m,c,p=0,w=0,r=h.length,b,v,x=t.value,f,y,N,k,V,R,M;p<r;){b=o-l,v=s-n;do f=h[w++].value;while(!f&&w<r);for(y=N=f,R=Math.max(v/b,b/v)/(x*a),M=f*f*R,V=Math.max(N/M,M/y);w<r;++w){if(f+=c=h[w].value,c<y&&(y=c),c>N&&(N=c),M=f*f*R,k=Math.max(N/M,M/y),k>V){f-=c;break}V=k}d.push(m={value:f,dice:b<v,children:h.slice(p,w)}),m.dice?Me(m,l,n,o,x?n+=v*f/x:s):Fe(m,l,n,x?l+=b*f/x:o,s),x-=f,p=w}return d}const Pe=(function a(t){function l(n,o,s,d,h){Ve(t,n,o,s,d,h)}return l.ratio=function(n){return a((n=+n)>1?n:1)},l})(ze);function Be(){var a=Pe,t=!1,l=1,n=1,o=[0],s=q,d=q,h=q,m=q,c=q;function p(r){return r.x0=r.y0=0,r.x1=l,r.y1=n,r.eachBefore(w),o=[0],t&&r.eachBefore(Ne),r}function w(r){var b=o[r.depth],v=r.x0+b,x=r.y0+b,f=r.x1-b,y=r.y1-b;f<v&&(v=f=(v+f)/2),y<x&&(x=y=(x+y)/2),r.x0=v,r.y0=x,r.x1=f,r.y1=y,r.children&&(b=o[r.depth+1]=s(r)/2,v+=c(r)-b,x+=d(r)-b,f-=h(r)-b,y-=m(r)-b,f<v&&(v=f=(v+f)/2),y<x&&(x=y=(x+y)/2),a(r,v,x,f,y))}return p.round=function(r){return arguments.length?(t=!!r,p):t},p.size=function(r){return arguments.length?(l=+r[0],n=+r[1],p):[l,n]},p.tile=function(r){return arguments.length?(a=ke(r),p):a},p.padding=function(r){return arguments.length?p.paddingInner(r).paddingOuter(r):p.paddingInner()},p.paddingInner=function(r){return arguments.length?(s=typeof r=="function"?r:O(+r),p):s},p.paddingOuter=function(r){return arguments.length?p.paddingTop(r).paddingRight(r).paddingBottom(r).paddingLeft(r):p.paddingTop()},p.paddingTop=function(r){return arguments.length?(d=typeof r=="function"?r:O(+r),p):d},p.paddingRight=function(r){return arguments.length?(h=typeof r=="function"?r:O(+r),p):h},p.paddingBottom=function(r){return arguments.length?(m=typeof r=="function"?r:O(+r),p):m},p.paddingLeft=function(r){return arguments.length?(c=typeof r=="function"?r:O(+r),p):c},p}var D,J=(D=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=u.setAccTitle,this.getAccTitle=u.getAccTitle,this.setDiagramTitle=u.setDiagramTitle,this.getDiagramTitle=u.getDiagramTitle,this.getAccDescription=u.getAccDescription,this.setAccDescription=u.setAccDescription}getNodes(){return this.nodes}getConfig(){const t=u.defaultConfig_default,l=u.getConfig();return u.cleanAndMerge({...t.treemap,...l.treemap??{}})}addNode(t,l){this.nodes.push(t),this.levels.set(t,l),l===0&&(this.outerNodes.push(t),this.root??=t)}getRoot(){return{name:"",children:this.outerNodes}}addClass(t,l){const n=this.classes.get(t)??{id:t,styles:[],textStyles:[]},o=l.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");o&&o.forEach(s=>{u.isLabelStyle(s)&&(n?.textStyles?n.textStyles.push(s):n.textStyles=[s]),n?.styles?n.styles.push(s):n.styles=[s]}),this.classes.set(t,n)}getClasses(){return this.classes}getStylesForClass(t){return this.classes.get(t)?.styles??[]}clear(){u.clear(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},u.__name(D,"TreeMapDB"),D);function K(a){if(!a.length)return[];const t=[],l=[];return a.forEach(n=>{const o={name:n.name,children:n.type==="Leaf"?void 0:[]};for(o.classSelector=n?.classSelector,n?.cssCompiledStyles&&(o.cssCompiledStyles=[n.cssCompiledStyles]),n.type==="Leaf"&&n.value!==void 0&&(o.value=n.value);l.length>0&&l[l.length-1].level>=n.level;)l.pop();if(l.length===0)t.push(o);else{const s=l[l.length-1].node;s.children?s.children.push(o):s.children=[o]}n.type!=="Leaf"&&l.push({node:o,level:n.level})}),t}u.__name(K,"buildHierarchy");var De=u.__name((a,t)=>{ie.populateCommonDb(a,t);const l=[];for(const s of a.TreemapRows??[])s.$type==="ClassDefStatement"&&t.addClass(s.className??"",s.styleText??"");for(const s of a.TreemapRows??[]){const d=s.item;if(!d)continue;const h=s.indent?parseInt(s.indent):0,m=Re(d),c=d.classSelector?t.getStylesForClass(d.classSelector):[],p=c.length>0?c.join(";"):void 0,w={level:h,name:m,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:p};l.push(w)}const n=K(l),o=u.__name((s,d)=>{for(const h of s)t.addNode(h,d),h.children&&h.children.length>0&&o(h.children,d+1)},"addNodesRecursively");o(n,0)},"populate"),Re=u.__name(a=>a.name?String(a.name):"","getItemName"),ee={parser:{yy:void 0},parse:u.__name(async a=>{try{const t=oe.parse,l=await t("treemap",a);u.log.debug("Treemap AST:",l);const n=ee.parser?.yy;if(!(n instanceof J))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");De(l,n)}catch(t){throw u.log.error("Error parsing treemap:",t),t}},"parse")},Ee=10,B=10,G=25,We=u.__name((a,t,l,n)=>{const o=n.db,s=o.getConfig(),d=s.padding??Ee,h=o.getDiagramTitle(),m=o.getRoot(),{themeVariables:c}=u.getConfig();if(!m)return;const p=h?30:0,w=u.selectSvgElement(t),r=s.nodeWidth?s.nodeWidth*B:960,b=s.nodeHeight?s.nodeHeight*B:500,v=r,x=b+p;w.attr("viewBox",`0 0 ${v} ${x}`),u.configureSvgSize(w,x,v,s.useMaxWidth);let f;try{const e=s.valueFormat||",";if(e==="$0,0")f=u.__name(i=>"$"+I.format(",")(i),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const i=/\.\d+/.exec(e),g=i?i[0]:"";f=u.__name(C=>"$"+I.format(","+g)(C),"valueFormat")}else if(e.startsWith("$")){const i=e.substring(1);f=u.__name(g=>"$"+I.format(i||"")(g),"valueFormat")}else f=I.format(e)}catch(e){u.log.error("Error creating format function:",e),f=I.format(",")}const y=U.ordinal().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),N=U.ordinal().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),k=U.ordinal().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);h&&w.append("text").attr("x",v/2).attr("y",p/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const V=w.append("g").attr("transform",`translate(0, ${p})`).attr("class","treemapContainer"),R=Q(m).sum(e=>e.value??0).sort((e,i)=>(i.value??0)-(e.value??0)),Z=Be().size([r,b]).paddingTop(e=>e.children&&e.children.length>0?G+B:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?B:0).paddingRight(e=>e.children&&e.children.length>0?B:0).paddingBottom(e=>e.children&&e.children.length>0?B:0).round(!0)(R),te=Z.descendants().filter(e=>e.children&&e.children.length>0),E=V.selectAll(".treemapSection").data(te).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);E.append("rect").attr("width",e=>e.x1-e.x0).attr("height",G).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),E.append("clipPath").attr("id",(e,i)=>`clip-section-${t}-${i}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",G),E.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,i)=>`treemapSection section${i}`).attr("fill",e=>y(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>N(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const i=u.styles2String({cssCompiledStyles:e.data.cssCompiledStyles});return i.nodeStyles+";"+i.borderStyles.join(";")}),E.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",G/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("style",e=>{if(e.depth===0)return"display: none;";const i="dominant-baseline: middle; font-size: 12px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",g=u.styles2String({cssCompiledStyles:e.data.cssCompiledStyles});return i+g.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const i=u.select(this),g=e.data.name;i.text(g);const C=e.x1-e.x0,T=6;let L;s.showValues!==!1&&e.value?L=C-10-30-10-T:L=C-T-6;const $=Math.max(15,L),S=i.node();if(S.getComputedTextLength()>$){let _=g;for(;_.length>0;){if(_=g.substring(0,_.length-1),_.length===0){i.text("..."),S.getComputedTextLength()>$&&i.text("");break}if(i.text(_+"..."),S.getComputedTextLength()<=$)break}}}),s.showValues!==!1&&E.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",G/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?f(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const i="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",g=u.styles2String({cssCompiledStyles:e.data.cssCompiledStyles});return i+g.labelStyles.replace("color:","fill:")});const ae=Z.leaves(),X=V.selectAll(".treemapLeafGroup").data(ae).enter().append("g").attr("class",(e,i)=>`treemapNode treemapLeafGroup leaf${i}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);X.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=>u.styles2String({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?y(e.parent.data.name):y(e.data.name)).attr("stroke-width",3),X.append("clipPath").attr("id",(e,i)=>`clip-${t}-${i}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),X.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const i="text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+k(e.data.name)+";",g=u.styles2String({cssCompiledStyles:e.data.cssCompiledStyles});return i+g.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,i)=>`url(#clip-${t}-${i})`).text(e=>e.data.name).each(function(e){const i=u.select(this),g=e.x1-e.x0,C=e.y1-e.y0,T=i.node(),L=4,P=g-2*L,$=C-2*L;if(P<10||$<10){i.style("display","none");return}let S=parseInt(i.style("font-size"),10);const F=8,A=28,_=.6,z=6,W=2;for(;T.getComputedTextLength()>P&&S>F;)S--,i.style("font-size",`${S}px`);let H=Math.max(z,Math.min(A,Math.round(S*_))),Y=S+W+H;for(;Y>$&&S>F&&(S--,H=Math.max(z,Math.min(A,Math.round(S*_))),!(H<z&&S===F));)i.style("font-size",`${S}px`),Y=S+W+H;i.style("font-size",`${S}px`),(T.getComputedTextLength()>P||S<F||$<S)&&i.style("display","none")}),s.showValues!==!1&&X.append("text").attr("class","treemapValue").attr("x",i=>(i.x1-i.x0)/2).attr("y",function(i){return(i.y1-i.y0)/2}).attr("style",i=>{const g="text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+k(i.data.name)+";",C=u.styles2String({cssCompiledStyles:i.data.cssCompiledStyles});return g+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(i,g)=>`url(#clip-${t}-${g})`).text(i=>i.value?f(i.value):"").each(function(i){const g=u.select(this),C=this.parentNode;if(!C){g.style("display","none");return}const T=u.select(C).select(".treemapLabel");if(T.empty()||T.style("display")==="none"){g.style("display","none");return}const L=parseFloat(T.style("font-size")),P=28,$=.6,S=6,F=2,A=Math.max(S,Math.min(P,Math.round(L*$)));g.style("font-size",`${A}px`);const z=(i.y1-i.y0)/2+L/2+F;g.attr("y",z);const W=i.x1-i.x0,le=i.y1-i.y0-4,re=W-8;g.node().getComputedTextLength()>re||z+A>le||A<S?g.style("display","none"):g.style("display",null)});const ne=s.diagramPadding??8;se.setupViewPortForSVG(w,ne,"flowchart",s?.useMaxWidth||!1)},"draw"),He=u.__name(function(a,t){return t.db.getClasses()},"getClasses"),Ie={draw:We,getClasses:He},qe={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelColor:"black",labelFontSize:"12px",valueFontSize:"10px",valueColor:"black",titleColor:"black",titleFontSize:"14px"},Oe=u.__name(({treemap:a}={})=>{const t=u.cleanAndMerge(qe,a);return`
|
|
2
|
+
.treemapNode.section {
|
|
3
|
+
stroke: ${t.sectionStrokeColor};
|
|
4
|
+
stroke-width: ${t.sectionStrokeWidth};
|
|
5
|
+
fill: ${t.sectionFillColor};
|
|
6
|
+
}
|
|
7
|
+
.treemapNode.leaf {
|
|
8
|
+
stroke: ${t.leafStrokeColor};
|
|
9
|
+
stroke-width: ${t.leafStrokeWidth};
|
|
10
|
+
fill: ${t.leafFillColor};
|
|
11
|
+
}
|
|
12
|
+
.treemapLabel {
|
|
13
|
+
fill: ${t.labelColor};
|
|
14
|
+
font-size: ${t.labelFontSize};
|
|
15
|
+
}
|
|
16
|
+
.treemapValue {
|
|
17
|
+
fill: ${t.valueColor};
|
|
18
|
+
font-size: ${t.valueFontSize};
|
|
19
|
+
}
|
|
20
|
+
.treemapTitle {
|
|
21
|
+
fill: ${t.titleColor};
|
|
22
|
+
font-size: ${t.titleFontSize};
|
|
23
|
+
}
|
|
24
|
+
`},"getStyles"),Ge=Oe,Xe={parser:ee,get db(){return new J},renderer:Ie,styles:Ge};exports.diagram=Xe;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as l, s as k, g as R, z as I, y as _, d as D, e as E, P as F, D as P, K as f, L as C, M as z, l as G, a6 as V } from "./index-
|
|
2
|
-
import { p as W } from "./chunk-4BX2VUAB-
|
|
3
|
-
import { p as B } from "./mermaid-parser.core-
|
|
1
|
+
import { _ as l, s as k, g as R, z as I, y as _, d as D, e as E, P as F, D as P, K as f, L as C, M as z, l as G, a6 as V } from "./index-B5zgF_S5.js";
|
|
2
|
+
import { p as W } from "./chunk-4BX2VUAB-Dkr-Egsj.js";
|
|
3
|
+
import { p as B } from "./mermaid-parser.core-BbeEQ08m.js";
|
|
4
4
|
var x = {
|
|
5
5
|
showLegend: !0,
|
|
6
6
|
ticks: 5,
|
|
@@ -32,26 +32,22 @@ var x = {
|
|
|
32
32
|
if (t.length === 0)
|
|
33
33
|
throw new Error("Axes must be populated before curves for reference entries");
|
|
34
34
|
return t.map((e) => {
|
|
35
|
-
const r = a.find((s) =>
|
|
36
|
-
var o;
|
|
37
|
-
return ((o = s.axis) == null ? void 0 : o.$refText) === e.name;
|
|
38
|
-
});
|
|
35
|
+
const r = a.find((s) => s.axis?.$refText === e.name);
|
|
39
36
|
if (r === void 0)
|
|
40
37
|
throw new Error("Missing entry for axis " + e.label);
|
|
41
38
|
return r.value;
|
|
42
39
|
});
|
|
43
40
|
}, "computeCurveEntries"), Z = /* @__PURE__ */ l((a) => {
|
|
44
|
-
var e, r, s, o, i;
|
|
45
41
|
const t = a.reduce(
|
|
46
|
-
(
|
|
42
|
+
(e, r) => (e[r.name] = r, e),
|
|
47
43
|
{}
|
|
48
44
|
);
|
|
49
45
|
h.options = {
|
|
50
|
-
showLegend:
|
|
51
|
-
ticks:
|
|
52
|
-
max:
|
|
53
|
-
min:
|
|
54
|
-
graticule:
|
|
46
|
+
showLegend: t.showLegend?.value ?? x.showLegend,
|
|
47
|
+
ticks: t.ticks?.value ?? x.ticks,
|
|
48
|
+
max: t.max?.value ?? x.max,
|
|
49
|
+
min: t.min?.value ?? x.min,
|
|
50
|
+
graticule: t.graticule?.value ?? x.graticule
|
|
55
51
|
};
|
|
56
52
|
}, "setOptions"), q = /* @__PURE__ */ l(() => {
|
|
57
53
|
P(), h = structuredClone(w);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-KEDsBA0n.cjs"),L=require("./chunk-4BX2VUAB-Ckv-xIp1.cjs"),O=require("./mermaid-parser.core-CQwGaxt2.cjs");var h={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},y={axes:[],curves:[],options:h},p=structuredClone(y),S=n.defaultConfig_default.radar,k=n.__name(()=>n.cleanAndMerge({...S,...n.getConfig().radar}),"getConfig"),f=n.__name(()=>p.axes,"getAxes"),D=n.__name(()=>p.curves,"getCurves"),R=n.__name(()=>p.options,"getOptions"),I=n.__name(a=>{p.axes=a.map(e=>({name:e.name,label:e.label??e.name}))},"setAxes"),E=n.__name(a=>{p.curves=a.map(e=>({name:e.name,label:e.label??e.name,entries:F(e.entries)}))},"setCurves"),F=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??h.showLegend,ticks:e.ticks?.value??h.ticks,max:e.max?.value??h.max,min:e.min?.value??h.min,graticule:e.graticule?.value??h.graticule}},"setOptions"),G=n.__name(()=>{n.clear(),p=structuredClone(y)},"clear"),_={getAxes:f,getCurves:D,getOptions:R,setAxes:I,setCurves:E,setOptions:P,getConfig:k,clear:G,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"),B={parse:n.__name(async a=>{const e=await O.parse("radar",a);n.log.debug(e),z(e)},"parse")},V=n.__name((a,e,t,r)=>{const s=r.db,o=s.getAxes(),l=s.getCurves(),i=s.getOptions(),c=s.getConfig(),d=s.getDiagramTitle(),m=n.selectSvgElement(e),u=W(m,c),g=i.max??Math.max(...l.map($=>Math.max(...$.entries))),x=i.min,v=Math.min(c.width,c.height)/2;j(u,o,v,i.ticks,i.graticule),q(u,o,v,c),C(u,o,l,x,g,i.graticule,c),A(u,l,i.showLegend,c),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-c.height/2-c.marginTop)},"draw"),W=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 a.attr("viewbox",`0 0 ${t} ${r}`).attr("width",t).attr("height",r),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),j=n.__name((a,e,t,r,s)=>{if(s==="circle")for(let o=0;o<r;o++){const l=t*(o+1)/r;a.append("circle").attr("r",l).attr("class","radarGraticule")}else if(s==="polygon"){const o=e.length;for(let l=0;l<r;l++){const i=t*(l+1)/r,c=e.map((d,m)=>{const u=2*m*Math.PI/o-Math.PI/2,g=i*Math.cos(u),x=i*Math.sin(u);return`${g},${x}`}).join(" ");a.append("polygon").attr("points",c).attr("class","radarGraticule")}}},"drawGraticule"),q=n.__name((a,e,t,r)=>{const s=e.length;for(let o=0;o<s;o++){const l=e[o].label,i=2*o*Math.PI/s-Math.PI/2;a.append("line").attr("x1",0).attr("y1",0).attr("x2",t*r.axisScaleFactor*Math.cos(i)).attr("y2",t*r.axisScaleFactor*Math.sin(i)).attr("class","radarAxisLine"),a.append("text").text(l).attr("x",t*r.axisLabelFactor*Math.cos(i)).attr("y",t*r.axisLabelFactor*Math.sin(i)).attr("class","radarAxisLabel")}},"drawAxes");function C(a,e,t,r,s,o,l){const i=e.length,c=Math.min(l.width,l.height)/2;t.forEach((d,m)=>{if(d.entries.length!==i)return;const u=d.entries.map((g,x)=>{const v=2*Math.PI*x/i-Math.PI/2,$=w(g,r,s,c),M=$*Math.cos(v),T=$*Math.sin(v);return{x:M,y:T}});o==="circle"?a.append("path").attr("d",b(u,l.curveTension)).attr("class",`radarCurve-${m}`):o==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${m}`)})}n.__name(C,"drawCurves");function w(a,e,t,r){const s=Math.min(Math.max(a,e),t);return r*(s-e)/(t-e)}n.__name(w,"relativeRadius");function b(a,e){const t=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s<t;s++){const o=a[(s-1+t)%t],l=a[s],i=a[(s+1)%t],c=a[(s+2)%t],d={x:l.x+(i.x-o.x)*e,y:l.y+(i.y-o.y)*e},m={x:i.x-(c.x-l.x)*e,y:i.y-(c.y-l.y)*e};r+=` C${d.x},${d.y} ${m.x},${m.y} ${i.x},${i.y}`}return`${r} Z`}n.__name(b,"closedRoundCurve");function A(a,e,t,r){if(!t)return;const s=(r.width/2+r.marginRight)*3/4,o=-(r.height/2+r.marginTop)*3/4,l=20;e.forEach((i,c)=>{const d=a.append("g").attr("transform",`translate(${s}, ${o+c*l})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${c}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(i.label)})}n.__name(A,"drawLegend");var H={draw:V},U=n.__name((a,e)=>{let t="";for(let r=0;r<a.THEME_COLOR_LIMIT;r++){const s=a[`cScale${r}`];t+=`
|
|
2
|
+
.radarCurve-${r} {
|
|
3
|
+
color: ${s};
|
|
4
|
+
fill: ${s};
|
|
5
|
+
fill-opacity: ${e.curveOpacity};
|
|
6
|
+
stroke: ${s};
|
|
7
|
+
stroke-width: ${e.curveStrokeWidth};
|
|
8
|
+
}
|
|
9
|
+
.radarLegendBox-${r} {
|
|
10
|
+
fill: ${s};
|
|
11
|
+
fill-opacity: ${e.curveOpacity};
|
|
12
|
+
stroke: ${s};
|
|
13
|
+
}
|
|
14
|
+
`}return t},"genIndexStyles"),X=n.__name(a=>{const e=n.getThemeVariables3(),t=n.getConfig(),r=n.cleanAndMerge(e,t.themeVariables),s=n.cleanAndMerge(r.radar,a);return{themeVariables:r,radarOptions:s}},"buildRadarStyleOptions"),N=n.__name(({radar:a}={})=>{const{themeVariables:e,radarOptions:t}=X(a);return`
|
|
15
|
+
.radarTitle {
|
|
16
|
+
font-size: ${e.fontSize};
|
|
17
|
+
color: ${e.titleColor};
|
|
18
|
+
dominant-baseline: hanging;
|
|
19
|
+
text-anchor: middle;
|
|
20
|
+
}
|
|
21
|
+
.radarAxisLine {
|
|
22
|
+
stroke: ${t.axisColor};
|
|
23
|
+
stroke-width: ${t.axisStrokeWidth};
|
|
24
|
+
}
|
|
25
|
+
.radarAxisLabel {
|
|
26
|
+
dominant-baseline: middle;
|
|
27
|
+
text-anchor: middle;
|
|
28
|
+
font-size: ${t.axisLabelFontSize}px;
|
|
29
|
+
color: ${t.axisColor};
|
|
30
|
+
}
|
|
31
|
+
.radarGraticule {
|
|
32
|
+
fill: ${t.graticuleColor};
|
|
33
|
+
fill-opacity: ${t.graticuleOpacity};
|
|
34
|
+
stroke: ${t.graticuleColor};
|
|
35
|
+
stroke-width: ${t.graticuleStrokeWidth};
|
|
36
|
+
}
|
|
37
|
+
.radarLegendText {
|
|
38
|
+
text-anchor: start;
|
|
39
|
+
font-size: ${t.legendFontSize}px;
|
|
40
|
+
dominant-baseline: hanging;
|
|
41
|
+
}
|
|
42
|
+
${U(e,t)}
|
|
43
|
+
`},"styles"),Y={parser:B,db:_,renderer:H,styles:N};exports.diagram=Y;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as b, K as m, P as B, i as C, l as w, e as S, d as D, y as P, z as T, g as z, s as E, L as F, M as A, D as W } from "./index-
|
|
2
|
-
import { p as _ } from "./chunk-4BX2VUAB-
|
|
3
|
-
import { p as L } from "./mermaid-parser.core-
|
|
1
|
+
import { _ as b, K as m, P as B, i as C, l as w, e as S, d as D, y as P, z as T, g as z, s as E, L as F, M as A, D as W } from "./index-B5zgF_S5.js";
|
|
2
|
+
import { p as _ } from "./chunk-4BX2VUAB-Dkr-Egsj.js";
|
|
3
|
+
import { p as L } from "./mermaid-parser.core-BbeEQ08m.js";
|
|
4
4
|
var M = A.packet, u, v = (u = class {
|
|
5
5
|
constructor() {
|
|
6
6
|
this.packet = [], this.setAccTitle = S, this.getAccTitle = D, this.setDiagramTitle = P, this.getDiagramTitle = T, this.getAccDescription = z, this.setAccDescription = E;
|
|
@@ -23,41 +23,41 @@ var M = A.packet, u, v = (u = class {
|
|
|
23
23
|
}
|
|
24
24
|
}, b(u, "PacketDB"), u), N = 1e4, Y = /* @__PURE__ */ b((e, t) => {
|
|
25
25
|
_(e, t);
|
|
26
|
-
let
|
|
26
|
+
let r = -1, s = [], n = 1;
|
|
27
27
|
const { bitsPerRow: l } = t.getConfig();
|
|
28
28
|
for (let { start: a, end: i, bits: d, label: c } of e.blocks) {
|
|
29
29
|
if (a !== void 0 && i !== void 0 && i < a)
|
|
30
30
|
throw new Error(`Packet block ${a} - ${i} is invalid. End must be greater than start.`);
|
|
31
|
-
if (a
|
|
31
|
+
if (a ??= r + 1, a !== r + 1)
|
|
32
32
|
throw new Error(
|
|
33
|
-
`Packet block ${a} - ${i ?? a} is not contiguous. It should start from ${
|
|
33
|
+
`Packet block ${a} - ${i ?? a} is not contiguous. It should start from ${r + 1}.`
|
|
34
34
|
);
|
|
35
35
|
if (d === 0)
|
|
36
36
|
throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);
|
|
37
|
-
for (i
|
|
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 < N; ) {
|
|
38
38
|
const [p, o] = I({ start: a, end: i, bits: d, label: c }, n, l);
|
|
39
|
-
if (
|
|
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
|
-
t.pushWord(
|
|
45
|
-
}, "populate"), I = /* @__PURE__ */ b((e, t,
|
|
44
|
+
t.pushWord(s);
|
|
45
|
+
}, "populate"), I = /* @__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)
|
|
49
49
|
throw new Error("end should have been set during first phase");
|
|
50
50
|
if (e.start > e.end)
|
|
51
51
|
throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);
|
|
52
|
-
if (e.end + 1 <= t *
|
|
52
|
+
if (e.end + 1 <= t * r)
|
|
53
53
|
return [e, void 0];
|
|
54
|
-
const
|
|
54
|
+
const s = t * r - 1, n = t * r;
|
|
55
55
|
return [
|
|
56
56
|
{
|
|
57
57
|
start: e.start,
|
|
58
|
-
end:
|
|
58
|
+
end: s,
|
|
59
59
|
label: e.label,
|
|
60
|
-
bits:
|
|
60
|
+
bits: s - e.start
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
start: n,
|
|
@@ -70,25 +70,24 @@ var M = A.packet, u, v = (u = class {
|
|
|
70
70
|
// @ts-expect-error - PacketDB is not assignable to DiagramDB
|
|
71
71
|
parser: { yy: void 0 },
|
|
72
72
|
parse: /* @__PURE__ */ b(async (e) => {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
if (!(s instanceof v))
|
|
73
|
+
const t = await L("packet", e), r = x.parser?.yy;
|
|
74
|
+
if (!(r instanceof v))
|
|
76
75
|
throw new Error(
|
|
77
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."
|
|
78
77
|
);
|
|
79
|
-
w.debug(t), Y(t,
|
|
78
|
+
w.debug(t), Y(t, r);
|
|
80
79
|
}, "parse")
|
|
81
|
-
}, K = /* @__PURE__ */ b((e, t,
|
|
82
|
-
const n =
|
|
80
|
+
}, K = /* @__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(), h = a + i, g = h * (p.length + 1) - (o ? 0 : a), k = d * c + 2, f = B(t);
|
|
83
82
|
f.attr("viewbox", `0 0 ${k} ${g}`), C(f, g, k, l.useMaxWidth);
|
|
84
83
|
for (const [y, $] of p.entries())
|
|
85
84
|
O(f, $, y, l);
|
|
86
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");
|
|
87
|
-
}, "draw"), O = /* @__PURE__ */ b((e, t,
|
|
88
|
-
const c = e.append("g"), p =
|
|
86
|
+
}, "draw"), O = /* @__PURE__ */ b((e, t, r, { rowHeight: s, paddingX: n, paddingY: l, bitWidth: a, bitsPerRow: i, showBits: d }) => {
|
|
87
|
+
const c = e.append("g"), p = r * (s + l) + l;
|
|
89
88
|
for (const o of t) {
|
|
90
89
|
const h = o.start % i * a + 1, g = (o.end - o.start + 1) * a - n;
|
|
91
|
-
if (c.append("rect").attr("x", h).attr("y", p).attr("width", g).attr("height",
|
|
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)
|
|
92
91
|
continue;
|
|
93
92
|
const k = o.end === o.start, f = p - 2;
|
|
94
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);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-KEDsBA0n.cjs"),y=require("./chunk-4BX2VUAB-Ckv-xIp1.cjs"),B=require("./mermaid-parser.core-CQwGaxt2.cjs");var $=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({...$,...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,_=a.__name((e,t)=>{y.populateCommonDb(e,t);let o=-1,i=[],l=1;const{bitsPerRow:c}=t.getConfig();for(let{start:r,end:n,bits:p,label:d}of e.blocks){if(r!==void 0&&n!==void 0&&n<r)throw new Error(`Packet block ${r} - ${n} is invalid. End must be greater than start.`);if(r??=o+1,r!==o+1)throw new Error(`Packet block ${r} - ${n??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(n??=r+(p??1)-1,p??=n-r+1,o=n,a.log.debug(`Packet block ${r} - ${o} with label ${d}`);i.length<=c+1&&t.getPacket().length<C;){const[g,s]=S({start:r,end:n,bits:p,label:d},l,c);if(i.push(g),g.end+1===l*c&&(t.pushWord(i),i=[],l++),!s)break;({start:r,end:n,bits:p,label:d}=s)}}t.pushWord(i)},"populate"),S=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 B.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),_(t,o)},"parse")},P=a.__name((e,t,o,i)=>{const l=i.db,c=l.getConfig(),{rowHeight:r,paddingY:n,bitWidth:p,bitsPerRow:d}=c,g=l.getPacket(),s=l.getDiagramTitle(),k=r+n,h=k*(g.length+1)-(s?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,x]of g.entries())T(u,x,v,c);u.append("text").text(s).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:n,showBits:p})=>{const d=e.append("g"),g=o*(i+c)+c;for(const s of t){const k=s.start%n*r+1,h=(s.end-s.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(s.label),!p)continue;const f=s.end===s.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(s.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(s.end)}},"drawWord"),D={draw:P},A={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},z=a.__name(({packet:e}={})=>{const t=a.cleanAndMerge(A,e);return`
|
|
2
|
+
.packetByte {
|
|
3
|
+
font-size: ${t.byteFontSize};
|
|
4
|
+
}
|
|
5
|
+
.packetByte.start {
|
|
6
|
+
fill: ${t.startByteColor};
|
|
7
|
+
}
|
|
8
|
+
.packetByte.end {
|
|
9
|
+
fill: ${t.endByteColor};
|
|
10
|
+
}
|
|
11
|
+
.packetLabel {
|
|
12
|
+
fill: ${t.labelColor};
|
|
13
|
+
font-size: ${t.labelFontSize};
|
|
14
|
+
}
|
|
15
|
+
.packetTitle {
|
|
16
|
+
fill: ${t.titleColor};
|
|
17
|
+
font-size: ${t.titleFontSize};
|
|
18
|
+
}
|
|
19
|
+
.packetBlock {
|
|
20
|
+
stroke: ${t.blockStrokeColor};
|
|
21
|
+
stroke-width: ${t.blockStrokeWidth};
|
|
22
|
+
fill: ${t.blockFillColor};
|
|
23
|
+
}
|
|
24
|
+
`},"styles"),E={parser:w,get db(){return new m},renderer:D,styles:z};exports.diagram=E;
|