@marimo-team/islands 0.14.11-dev39 → 0.14.11-dev4
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/{ConnectedDataExplorerComponent-Sd9Nxepm.js → ConnectedDataExplorerComponent-B3jU38aR.js} +4 -4
- package/dist/{ImageComparisonComponent-5Y_UPK-4.js → ImageComparisonComponent-CUfFulP7.js} +1 -1
- package/dist/{VegaLite-xEnU6x-s.js → VegaLite-CT_m2Gns.js} +7180 -6961
- package/dist/{_baseUniq-hectrKF-.js → _baseUniq-DVXzAxqW.js} +36 -36
- package/dist/{any-language-editor-CFSQwvzE.js → any-language-editor-Bm5ppbnQ.js} +1 -1
- package/dist/{architectureDiagram-NQ2NVSRB-CCXJjFvh.js → architectureDiagram-IEHRJDOE-Buq1PEDd.js} +894 -897
- package/dist/assets/{worker-Bfk1FrzG.js → save-worker-BIDtxCd1.js} +1724 -1604
- package/dist/assets/{save-worker-fI5ofStJ.js → worker-BcyuOSTi.js} +1649 -1076
- package/dist/assets/worker-Dz6PPEGc.js +4115 -0
- package/dist/{blockDiagram-PHRCVELO-BjyOlQ-1.js → blockDiagram-JOT3LUYC-Baj8O4gb.js} +522 -534
- package/dist/{c4Diagram-6F6E4RAY-Dekfu0nv.js → c4Diagram-VJAJSXHY-CBDfWUzS.js} +4 -4
- package/dist/{channel-3ZP1Ahsx.js → channel-Cy0SmgpI.js} +1 -1
- package/dist/{chunk-353BL4L5-DAFgStCL.js → chunk-4BMEZGHF-BnpEqs6S.js} +1 -1
- package/dist/{chunk-QEP2MXWD-B3Qy_0QF.js → chunk-A2AXSNBT-i8l7moUJ.js} +27 -30
- package/dist/chunk-AEK57VVT-BxuW_6WB.js +1416 -0
- package/dist/{chunk-67H74DCK-DZpdsEFc.js → chunk-D6G4REZN-DwIklRV0.js} +1 -1
- package/dist/chunk-RZ5BOZE2-CNoeotZt.js +24 -0
- package/dist/{chunk-AACKK3MU-B95hL8py.js → chunk-XZIHB7SX-Cr4T9caJ.js} +1 -1
- package/dist/{classDiagram-v2-O24JOBDK-CRnOnb_r.js → classDiagram-GIVACNV2-CbFkMOFI.js} +2 -2
- package/dist/{classDiagram-BGRH5UQR-CRnOnb_r.js → classDiagram-v2-COTLJTTW-CbFkMOFI.js} +2 -2
- package/dist/{clone-CFt3Dbsx.js → clone-BeXSGgDB.js} +1 -1
- package/dist/{dagre-FFZHY6LT-BCZYCsTf.js → dagre-OKDRZEBW-Bo2roBvL.js} +8 -8
- package/dist/{data-editor-DJm7TwNK.js → data-editor-Dnm_K2_c.js} +201 -213
- package/dist/{diagram-ZTM2IBQH-CZn2HwdK.js → diagram-SSKATNLV-6e7ZOneB.js} +3 -3
- package/dist/diagram-VNBRO52H-VcG5htt_.js +126 -0
- package/dist/{erDiagram-R3QVA2FD-CgONUTHE.js → erDiagram-Q7BY3M3F-DObb1KYA.js} +5 -6
- package/dist/{flowDiagram-PKI6S5ZS-Dk7_9UWG.js → flowDiagram-4HSFHLVR-BAvIkIMr.js} +278 -283
- package/dist/{ganttDiagram-EK5VF46D-CRpVp1Tv.js → ganttDiagram-APWFNJXF-BUabt1F7.js} +439 -453
- package/dist/{gitGraphDiagram-GW3U2K7C-C62qVSS0.js → gitGraphDiagram-7IBYFJ6S-Bs-H6FAX.js} +35 -35
- package/dist/{graph-Bmg6ThvY.js → graph-B7tbSSJp.js} +3 -3
- package/dist/{index-DjyV3XsQ.js → index-CiG5v3ld.js} +3 -3
- package/dist/{index-CpMCQprO.js → index-DI-1MlWW.js} +1 -1
- package/dist/{index-DOW7j8QD.js → index-DpepA-b-.js} +3 -6
- package/dist/{index-BmXq13zt.js → index-phTQQwAJ.js} +4 -4
- package/dist/{infoDiagram-RLU2ROGC-BxV_L_v4.js → infoDiagram-PH2N3AL5-7fwphtgP.js} +3 -5
- package/dist/journeyDiagram-U35MCT3I-C4s4ilvs.js +809 -0
- package/dist/{kanban-definition-ILFWEQ3N-Czy4NHmp.js → kanban-definition-NDS4AKOZ-DcxIaLdv.js} +39 -41
- package/dist/{layout-oDYqqouw.js → layout-v4OeDCTb.js} +49 -49
- package/dist/{linear-B2w8crqt.js → linear-xHimOevt.js} +22 -22
- package/dist/{main-WBPEOYUW.js → main-C7CuKeJY.js} +47637 -47530
- package/dist/main.js +1 -1
- package/dist/{mermaid-BrDUrAOA.js → mermaid-C9S7GU2b.js} +4855 -4927
- package/dist/min-BT9mkTQN.js +80 -0
- package/dist/{mindmap-definition-CZNETY7S-DwnN0Xtd.js → mindmap-definition-ALO5MXBD-CVFEcHZK.js} +3 -3
- package/dist/{pieDiagram-NIOCPIFQ-C6DftsTF.js → pieDiagram-IB7DONF6-Co1Ma8jK.js} +3 -3
- package/dist/{quadrantDiagram-2OG54O6I-D_F4-y3O.js → quadrantDiagram-7GDLP6J5-DQlP2K2y.js} +2 -2
- package/dist/{treemap-FKARHQ26-BdRtb6Jl.js → radar-MK3ICKWK-BhkTFShi.js} +2330 -2469
- package/dist/{react-plotly-DyGjmGkP.js → react-plotly-Bh6GaXqm.js} +1 -1
- package/dist/{requirementDiagram-SO3GGRV7-B0B6nUaZ.js → requirementDiagram-KVF5MWMF-BygiWyL4.js} +4 -5
- package/dist/{sankeyDiagram-4UZDY2LN-Dc9a_ZCf.js → sankeyDiagram-QLVOVGJD-Ch4TJi_X.js} +11 -11
- package/dist/{sequenceDiagram-ZIKVLSP4-CK0IGm4R.js → sequenceDiagram-X6HHIX6F-DuQdesWk.js} +149 -151
- package/dist/{slides-component-Dnp9jsH4.js → slides-component-BA1GLkbQ.js} +962 -969
- package/dist/stateDiagram-DGXRK772-CG6dTG8s.js +271 -0
- package/dist/{stateDiagram-v2-GD6S3NHB-z7eMLBFB.js → stateDiagram-v2-YXO3MK2T-ChBhvPue.js} +2 -2
- package/dist/style.css +1 -1
- package/dist/{time-CsAbaoLW.js → time-BImtLwbp.js} +2 -2
- package/dist/{timeline-definition-RI47OAVP-BClUsJ6N.js → timeline-definition-BDJGKUSR-DDxqWt73.js} +102 -99
- package/dist/{vega-component-B4kFG0mV.js → vega-component-ClHul7Ph.js} +21 -21
- package/dist/{xychartDiagram-H2YORKM3-DKa9A91j.js → xychartDiagram-VJFVF3MP-DsuROm2x.js} +375 -409
- package/package.json +42 -42
- package/dist/assets/worker-BldghCZh.js +0 -3752
- package/dist/chunk-6OLS64BW-Brmt-SZS.js +0 -1383
- package/dist/chunk-BFAMUDN2-BT75CqeT.js +0 -8
- package/dist/chunk-E2GYISFI-C0R6djsG.js +0 -19
- package/dist/chunk-SKB7J2MH-CW_LVmrE.js +0 -20
- package/dist/diagram-3EMPZRKU-K1apRbx_.js +0 -313
- package/dist/diagram-5UYTHUR4-CDt_HKgG.js +0 -137
- package/dist/index-pBmAzQJl.js +0 -235
- package/dist/journeyDiagram-EWQZEKCU-BmLTz9kg.js +0 -836
- package/dist/min-DrafC17d.js +0 -80
- package/dist/stateDiagram-XX37X6EN-BvfpfSgz.js +0 -264
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { _ as a, d as o } from "./mermaid-BrDUrAOA.js";
|
|
2
|
-
var d = /* @__PURE__ */ a((t, e) => {
|
|
3
|
-
let n;
|
|
4
|
-
return e === "sandbox" && (n = o("#i" + t)), (e === "sandbox" ? o(n.nodes()[0].contentDocument.body) : o("body")).select(`[id="${t}"]`);
|
|
5
|
-
}, "getDiagramElement");
|
|
6
|
-
export {
|
|
7
|
-
d as g
|
|
8
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { _ as e } from "./mermaid-BrDUrAOA.js";
|
|
2
|
-
var l = /* @__PURE__ */ e(() => `
|
|
3
|
-
/* Font Awesome icon styling - consolidated */
|
|
4
|
-
.label-icon {
|
|
5
|
-
display: inline-block;
|
|
6
|
-
height: 1em;
|
|
7
|
-
overflow: visible;
|
|
8
|
-
vertical-align: -0.125em;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.node .label-icon path {
|
|
12
|
-
fill: currentColor;
|
|
13
|
-
stroke: revert;
|
|
14
|
-
stroke-width: revert;
|
|
15
|
-
}
|
|
16
|
-
`, "getIconStyles");
|
|
17
|
-
export {
|
|
18
|
-
l as g
|
|
19
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { _ as a, e as w, l as x } from "./mermaid-BrDUrAOA.js";
|
|
2
|
-
var d = /* @__PURE__ */ a((e, t, i, r) => {
|
|
3
|
-
e.attr("class", i);
|
|
4
|
-
const { width: o, height: h, x: n, y: c } = u(e, t);
|
|
5
|
-
w(e, h, o, r);
|
|
6
|
-
const s = l(n, c, o, h, t);
|
|
7
|
-
e.attr("viewBox", s), x.debug(`viewBox configured: ${s} with padding: ${t}`);
|
|
8
|
-
}, "setupViewPortForSVG"), u = /* @__PURE__ */ a((e, t) => {
|
|
9
|
-
var _a;
|
|
10
|
-
const i = ((_a = e.node()) == null ? void 0 : _a.getBBox()) || { width: 0, height: 0, x: 0, y: 0 };
|
|
11
|
-
return {
|
|
12
|
-
width: i.width + t * 2,
|
|
13
|
-
height: i.height + t * 2,
|
|
14
|
-
x: i.x,
|
|
15
|
-
y: i.y
|
|
16
|
-
};
|
|
17
|
-
}, "calculateDimensionsWithPadding"), l = /* @__PURE__ */ a((e, t, i, r, o) => `${e - o} ${t - o} ${i} ${r}`, "createViewBox");
|
|
18
|
-
export {
|
|
19
|
-
d as s
|
|
20
|
-
};
|
|
@@ -1,313 +0,0 @@
|
|
|
1
|
-
import { s as re } from "./chunk-SKB7J2MH-CW_LVmrE.js";
|
|
2
|
-
import { _ as p, s as ne, g as oe, t as ce, q as ie, a as de, b as pe, F as K, G as U, K as he, e as me, l as G, aa as L, d as H, ab as fe, z as ue, H as ge } from "./mermaid-BrDUrAOA.js";
|
|
3
|
-
import { p as ye } from "./chunk-353BL4L5-DAFgStCL.js";
|
|
4
|
-
import { I as Se } from "./chunk-AACKK3MU-B95hL8py.js";
|
|
5
|
-
import { p as xe } from "./treemap-FKARHQ26-BdRtb6Jl.js";
|
|
6
|
-
import { f as W } from "./main-WBPEOYUW.js";
|
|
7
|
-
import { o as B } from "./ordinal-CYN5qNoq.js";
|
|
8
|
-
import { h as be, t as ve } from "./index-pBmAzQJl.js";
|
|
9
|
-
var Ce = {
|
|
10
|
-
nodes: [],
|
|
11
|
-
levels: /* @__PURE__ */ new Map(),
|
|
12
|
-
outerNodes: [],
|
|
13
|
-
classes: /* @__PURE__ */ new Map()
|
|
14
|
-
}, C = new Se(() => structuredClone(Ce)), we = /* @__PURE__ */ p(() => {
|
|
15
|
-
const r = ge, a = U();
|
|
16
|
-
return K({
|
|
17
|
-
...r.treemap,
|
|
18
|
-
...a.treemap ?? {}
|
|
19
|
-
});
|
|
20
|
-
}, "getConfig"), Le = /* @__PURE__ */ p(() => C.records.nodes, "getNodes"), $e = /* @__PURE__ */ p((r, a) => {
|
|
21
|
-
const c = C.records;
|
|
22
|
-
c.nodes.push(r), c.levels.set(r, a), a === 0 && c.outerNodes.push(r), a === 0 && !c.root && (c.root = r);
|
|
23
|
-
}, "addNode"), Te = /* @__PURE__ */ p(() => ({ name: "", children: C.records.outerNodes }), "getRoot"), Fe = /* @__PURE__ */ p((r, a) => {
|
|
24
|
-
const c = C.records.classes, o = c.get(r) ?? { id: r, styles: [], textStyles: [] };
|
|
25
|
-
c.set(r, o);
|
|
26
|
-
const i = a.replace(/\\,/g, "\xA7\xA7\xA7").replace(/,/g, ";").replace(/§§§/g, ",").split(";");
|
|
27
|
-
i && i.forEach((s) => {
|
|
28
|
-
fe(s) && ((o == null ? void 0 : o.textStyles) ? o.textStyles.push(s) : o.textStyles = [s]), (o == null ? void 0 : o.styles) ? o.styles.push(s) : o.styles = [s];
|
|
29
|
-
}), c.set(r, o);
|
|
30
|
-
}, "addClass"), ze = /* @__PURE__ */ p(() => C.records.classes, "getClasses"), Ne = /* @__PURE__ */ p((r) => {
|
|
31
|
-
var _a;
|
|
32
|
-
return ((_a = C.records.classes.get(r)) == null ? void 0 : _a.styles) ?? [];
|
|
33
|
-
}, "getStylesForClass"), ke = /* @__PURE__ */ p(() => {
|
|
34
|
-
ue(), C.reset();
|
|
35
|
-
}, "clear"), D = {
|
|
36
|
-
getNodes: Le,
|
|
37
|
-
addNode: $e,
|
|
38
|
-
getRoot: Te,
|
|
39
|
-
getConfig: we,
|
|
40
|
-
clear: ke,
|
|
41
|
-
setAccTitle: pe,
|
|
42
|
-
getAccTitle: de,
|
|
43
|
-
setDiagramTitle: ie,
|
|
44
|
-
getDiagramTitle: ce,
|
|
45
|
-
getAccDescription: oe,
|
|
46
|
-
setAccDescription: ne,
|
|
47
|
-
addClass: Fe,
|
|
48
|
-
getClasses: ze,
|
|
49
|
-
getStylesForClass: Ne
|
|
50
|
-
};
|
|
51
|
-
function J(r) {
|
|
52
|
-
if (!r.length)
|
|
53
|
-
return [];
|
|
54
|
-
const a = [], c = [];
|
|
55
|
-
return r.forEach((o) => {
|
|
56
|
-
const i = {
|
|
57
|
-
name: o.name,
|
|
58
|
-
children: o.type === "Leaf" ? void 0 : []
|
|
59
|
-
};
|
|
60
|
-
for (i.classSelector = o == null ? void 0 : o.classSelector, (o == null ? void 0 : o.cssCompiledStyles) && (i.cssCompiledStyles = [o.cssCompiledStyles]), o.type === "Leaf" && o.value !== void 0 && (i.value = o.value); c.length > 0 && c[c.length - 1].level >= o.level; )
|
|
61
|
-
c.pop();
|
|
62
|
-
if (c.length === 0)
|
|
63
|
-
a.push(i);
|
|
64
|
-
else {
|
|
65
|
-
const s = c[c.length - 1].node;
|
|
66
|
-
s.children ? s.children.push(i) : s.children = [i];
|
|
67
|
-
}
|
|
68
|
-
o.type !== "Leaf" && c.push({ node: i, level: o.level });
|
|
69
|
-
}), a;
|
|
70
|
-
}
|
|
71
|
-
p(J, "buildHierarchy");
|
|
72
|
-
var Pe = /* @__PURE__ */ p((r) => {
|
|
73
|
-
ye(r, D);
|
|
74
|
-
const a = [];
|
|
75
|
-
for (const i of r.TreemapRows ?? [])
|
|
76
|
-
i.$type === "ClassDefStatement" && D.addClass(i.className ?? "", i.styleText ?? "");
|
|
77
|
-
for (const i of r.TreemapRows ?? []) {
|
|
78
|
-
const s = i.item;
|
|
79
|
-
if (!s)
|
|
80
|
-
continue;
|
|
81
|
-
const S = i.indent ? parseInt(i.indent) : 0, T = Ae(s), F = s.classSelector ? D.getStylesForClass(s.classSelector) : [], l = F.length > 0 ? F.join(";") : void 0, z = {
|
|
82
|
-
level: S,
|
|
83
|
-
name: T,
|
|
84
|
-
type: s.$type,
|
|
85
|
-
value: s.value,
|
|
86
|
-
classSelector: s.classSelector,
|
|
87
|
-
cssCompiledStyles: l
|
|
88
|
-
};
|
|
89
|
-
a.push(z);
|
|
90
|
-
}
|
|
91
|
-
const c = J(a), o = /* @__PURE__ */ p((i, s) => {
|
|
92
|
-
for (const S of i)
|
|
93
|
-
D.addNode(S, s), S.children && S.children.length > 0 && o(S.children, s + 1);
|
|
94
|
-
}, "addNodesRecursively");
|
|
95
|
-
o(c, 0);
|
|
96
|
-
}, "populate"), Ae = /* @__PURE__ */ p((r) => r.name ? String(r.name) : "", "getItemName"), Ve = {
|
|
97
|
-
parse: /* @__PURE__ */ p(async (r) => {
|
|
98
|
-
try {
|
|
99
|
-
const c = await xe("treemap", r);
|
|
100
|
-
G.debug("Treemap AST:", c), Pe(c);
|
|
101
|
-
} catch (a) {
|
|
102
|
-
throw G.error("Error parsing treemap:", a), a;
|
|
103
|
-
}
|
|
104
|
-
}, "parse")
|
|
105
|
-
}, We = 10, $ = 10, M = 25, Me = /* @__PURE__ */ p((r, a, c, o) => {
|
|
106
|
-
const i = o.db, s = i.getConfig(), S = s.padding ?? We, T = i.getDiagramTitle(), F = i.getRoot(), { themeVariables: l } = U();
|
|
107
|
-
if (!F)
|
|
108
|
-
return;
|
|
109
|
-
const z = T ? 30 : 0, N = he(a), O = s.nodeWidth ? s.nodeWidth * $ : 960, X = s.nodeHeight ? s.nodeHeight * $ : 500, R = O, Y = X + z;
|
|
110
|
-
N.attr("viewBox", `0 0 ${R} ${Y}`), me(N, Y, R, s.useMaxWidth);
|
|
111
|
-
let x;
|
|
112
|
-
try {
|
|
113
|
-
const e = s.valueFormat || ",";
|
|
114
|
-
if (e === "$0,0")
|
|
115
|
-
x = /* @__PURE__ */ p((t) => "$" + W(",")(t), "valueFormat");
|
|
116
|
-
else if (e.startsWith("$") && e.includes(",")) {
|
|
117
|
-
const t = /\.\d+/.exec(e), n = t ? t[0] : "";
|
|
118
|
-
x = /* @__PURE__ */ p((h) => "$" + W("," + n)(h), "valueFormat");
|
|
119
|
-
} else if (e.startsWith("$")) {
|
|
120
|
-
const t = e.substring(1);
|
|
121
|
-
x = /* @__PURE__ */ p((n) => "$" + W(t || "")(n), "valueFormat");
|
|
122
|
-
} else
|
|
123
|
-
x = W(e);
|
|
124
|
-
} catch (e) {
|
|
125
|
-
G.error("Error creating format function:", e), x = W(",");
|
|
126
|
-
}
|
|
127
|
-
const k = B().range([
|
|
128
|
-
"transparent",
|
|
129
|
-
l.cScale0,
|
|
130
|
-
l.cScale1,
|
|
131
|
-
l.cScale2,
|
|
132
|
-
l.cScale3,
|
|
133
|
-
l.cScale4,
|
|
134
|
-
l.cScale5,
|
|
135
|
-
l.cScale6,
|
|
136
|
-
l.cScale7,
|
|
137
|
-
l.cScale8,
|
|
138
|
-
l.cScale9,
|
|
139
|
-
l.cScale10,
|
|
140
|
-
l.cScale11
|
|
141
|
-
]), Q = B().range([
|
|
142
|
-
"transparent",
|
|
143
|
-
l.cScalePeer0,
|
|
144
|
-
l.cScalePeer1,
|
|
145
|
-
l.cScalePeer2,
|
|
146
|
-
l.cScalePeer3,
|
|
147
|
-
l.cScalePeer4,
|
|
148
|
-
l.cScalePeer5,
|
|
149
|
-
l.cScalePeer6,
|
|
150
|
-
l.cScalePeer7,
|
|
151
|
-
l.cScalePeer8,
|
|
152
|
-
l.cScalePeer9,
|
|
153
|
-
l.cScalePeer10,
|
|
154
|
-
l.cScalePeer11
|
|
155
|
-
]), E = B().range([
|
|
156
|
-
l.cScaleLabel0,
|
|
157
|
-
l.cScaleLabel1,
|
|
158
|
-
l.cScaleLabel2,
|
|
159
|
-
l.cScaleLabel3,
|
|
160
|
-
l.cScaleLabel4,
|
|
161
|
-
l.cScaleLabel5,
|
|
162
|
-
l.cScaleLabel6,
|
|
163
|
-
l.cScaleLabel7,
|
|
164
|
-
l.cScaleLabel8,
|
|
165
|
-
l.cScaleLabel9,
|
|
166
|
-
l.cScaleLabel10,
|
|
167
|
-
l.cScaleLabel11
|
|
168
|
-
]);
|
|
169
|
-
T && N.append("text").attr("x", R / 2).attr("y", z / 2).attr("class", "treemapTitle").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(T);
|
|
170
|
-
const j = N.append("g").attr("transform", `translate(0, ${z})`).attr("class", "treemapContainer"), Z = be(F).sum((e) => e.value ?? 0).sort((e, t) => (t.value ?? 0) - (e.value ?? 0)), q = ve().size([O, X]).paddingTop(
|
|
171
|
-
(e) => e.children && e.children.length > 0 ? M + $ : 0
|
|
172
|
-
).paddingInner(S).paddingLeft((e) => e.children && e.children.length > 0 ? $ : 0).paddingRight((e) => e.children && e.children.length > 0 ? $ : 0).paddingBottom((e) => e.children && e.children.length > 0 ? $ : 0).round(true)(Z), ee = q.descendants().filter((e) => e.children && e.children.length > 0), P = j.selectAll(".treemapSection").data(ee).enter().append("g").attr("class", "treemapSection").attr("transform", (e) => `translate(${e.x0},${e.y0})`);
|
|
173
|
-
P.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", M).attr("class", "treemapSectionHeader").attr("fill", "none").attr("fill-opacity", 0.6).attr("stroke-width", 0.6).attr("style", (e) => e.depth === 0 ? "display: none;" : ""), P.append("clipPath").attr("id", (e, t) => `clip-section-${a}-${t}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 12)).attr("height", M), P.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", (e, t) => `treemapSection section${t}`).attr("fill", (e) => k(e.data.name)).attr("fill-opacity", 0.6).attr("stroke", (e) => Q(e.data.name)).attr("stroke-width", 2).attr("stroke-opacity", 0.4).attr("style", (e) => {
|
|
174
|
-
if (e.depth === 0)
|
|
175
|
-
return "display: none;";
|
|
176
|
-
const t = L({ cssCompiledStyles: e.data.cssCompiledStyles });
|
|
177
|
-
return t.nodeStyles + ";" + t.borderStyles.join(";");
|
|
178
|
-
}), P.append("text").attr("class", "treemapSectionLabel").attr("x", 6).attr("y", M / 2).attr("dominant-baseline", "middle").text((e) => e.depth === 0 ? "" : e.data.name).attr("font-weight", "bold").attr("style", (e) => {
|
|
179
|
-
if (e.depth === 0)
|
|
180
|
-
return "display: none;";
|
|
181
|
-
const t = "dominant-baseline: middle; font-size: 12px; fill:" + E(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", n = L({ cssCompiledStyles: e.data.cssCompiledStyles });
|
|
182
|
-
return t + n.labelStyles.replace("color:", "fill:");
|
|
183
|
-
}).each(function(e) {
|
|
184
|
-
if (e.depth === 0)
|
|
185
|
-
return;
|
|
186
|
-
const t = H(this), n = e.data.name;
|
|
187
|
-
t.text(n);
|
|
188
|
-
const h = e.x1 - e.x0, u = 6;
|
|
189
|
-
let g;
|
|
190
|
-
s.showValues !== false && e.value ? g = h - 10 - 30 - 10 - u : g = h - u - 6;
|
|
191
|
-
const y = Math.max(15, g), d = t.node();
|
|
192
|
-
if (d.getComputedTextLength() > y) {
|
|
193
|
-
const m = "...";
|
|
194
|
-
let f = n;
|
|
195
|
-
for (; f.length > 0; ) {
|
|
196
|
-
if (f = n.substring(0, f.length - 1), f.length === 0) {
|
|
197
|
-
t.text(m), d.getComputedTextLength() > y && t.text("");
|
|
198
|
-
break;
|
|
199
|
-
}
|
|
200
|
-
if (t.text(f + m), d.getComputedTextLength() <= y)
|
|
201
|
-
break;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}), s.showValues !== false && P.append("text").attr("class", "treemapSectionValue").attr("x", (e) => e.x1 - e.x0 - 10).attr("y", M / 2).attr("text-anchor", "end").attr("dominant-baseline", "middle").text((e) => e.value ? x(e.value) : "").attr("font-style", "italic").attr("style", (e) => {
|
|
205
|
-
if (e.depth === 0)
|
|
206
|
-
return "display: none;";
|
|
207
|
-
const t = "text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:" + E(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", n = L({ cssCompiledStyles: e.data.cssCompiledStyles });
|
|
208
|
-
return t + n.labelStyles.replace("color:", "fill:");
|
|
209
|
-
});
|
|
210
|
-
const te = q.leaves(), _ = j.selectAll(".treemapLeafGroup").data(te).enter().append("g").attr("class", (e, t) => `treemapNode treemapLeafGroup leaf${t}${e.data.classSelector ? ` ${e.data.classSelector}` : ""}x`).attr("transform", (e) => `translate(${e.x0},${e.y0})`);
|
|
211
|
-
_.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", "treemapLeaf").attr("fill", (e) => e.parent ? k(e.parent.data.name) : k(e.data.name)).attr("style", (e) => L({ cssCompiledStyles: e.data.cssCompiledStyles }).nodeStyles).attr("fill-opacity", 0.3).attr("stroke", (e) => e.parent ? k(e.parent.data.name) : k(e.data.name)).attr("stroke-width", 3), _.append("clipPath").attr("id", (e, t) => `clip-${a}-${t}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 4)).attr("height", (e) => Math.max(0, e.y1 - e.y0 - 4)), _.append("text").attr("class", "treemapLabel").attr("x", (e) => (e.x1 - e.x0) / 2).attr("y", (e) => (e.y1 - e.y0) / 2).attr("style", (e) => {
|
|
212
|
-
const t = "text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:" + E(e.data.name) + ";", n = L({ cssCompiledStyles: e.data.cssCompiledStyles });
|
|
213
|
-
return t + n.labelStyles.replace("color:", "fill:");
|
|
214
|
-
}).attr("clip-path", (e, t) => `url(#clip-${a}-${t})`).text((e) => e.data.name).each(function(e) {
|
|
215
|
-
const t = H(this), n = e.x1 - e.x0, h = e.y1 - e.y0, u = t.node(), g = 4, w = n - 2 * g, y = h - 2 * g;
|
|
216
|
-
if (w < 10 || y < 10) {
|
|
217
|
-
t.style("display", "none");
|
|
218
|
-
return;
|
|
219
|
-
}
|
|
220
|
-
let d = parseInt(t.style("font-size"), 10);
|
|
221
|
-
const b = 8, m = 28, f = 0.6, v = 6, A = 2;
|
|
222
|
-
for (; u.getComputedTextLength() > w && d > b; )
|
|
223
|
-
d--, t.style("font-size", `${d}px`);
|
|
224
|
-
let V = Math.max(
|
|
225
|
-
v,
|
|
226
|
-
Math.min(m, Math.round(d * f))
|
|
227
|
-
), I = d + A + V;
|
|
228
|
-
for (; I > y && d > b && (d--, V = Math.max(
|
|
229
|
-
v,
|
|
230
|
-
Math.min(m, Math.round(d * f))
|
|
231
|
-
), !(V < v && d === b)); )
|
|
232
|
-
t.style("font-size", `${d}px`), I = d + A + V;
|
|
233
|
-
t.style("font-size", `${d}px`), (u.getComputedTextLength() > w || d < b || y < d) && t.style("display", "none");
|
|
234
|
-
}), s.showValues !== false && _.append("text").attr("class", "treemapValue").attr("x", (t) => (t.x1 - t.x0) / 2).attr("y", function(t) {
|
|
235
|
-
return (t.y1 - t.y0) / 2;
|
|
236
|
-
}).attr("style", (t) => {
|
|
237
|
-
const n = "text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:" + E(t.data.name) + ";", h = L({ cssCompiledStyles: t.data.cssCompiledStyles });
|
|
238
|
-
return n + h.labelStyles.replace("color:", "fill:");
|
|
239
|
-
}).attr("clip-path", (t, n) => `url(#clip-${a}-${n})`).text((t) => t.value ? x(t.value) : "").each(function(t) {
|
|
240
|
-
const n = H(this), h = this.parentNode;
|
|
241
|
-
if (!h) {
|
|
242
|
-
n.style("display", "none");
|
|
243
|
-
return;
|
|
244
|
-
}
|
|
245
|
-
const u = H(h).select(".treemapLabel");
|
|
246
|
-
if (u.empty() || u.style("display") === "none") {
|
|
247
|
-
n.style("display", "none");
|
|
248
|
-
return;
|
|
249
|
-
}
|
|
250
|
-
const g = parseFloat(u.style("font-size")), w = 28, y = 0.6, d = 6, b = 2, m = Math.max(
|
|
251
|
-
d,
|
|
252
|
-
Math.min(w, Math.round(g * y))
|
|
253
|
-
);
|
|
254
|
-
n.style("font-size", `${m}px`);
|
|
255
|
-
const v = (t.y1 - t.y0) / 2 + g / 2 + b;
|
|
256
|
-
n.attr("y", v);
|
|
257
|
-
const A = t.x1 - t.x0, le = t.y1 - t.y0 - 4, se = A - 2 * 4;
|
|
258
|
-
n.node().getComputedTextLength() > se || v + m > le || m < d ? n.style("display", "none") : n.style("display", null);
|
|
259
|
-
});
|
|
260
|
-
const ae = s.diagramPadding ?? 8;
|
|
261
|
-
re(N, ae, "flowchart", (s == null ? void 0 : s.useMaxWidth) || false);
|
|
262
|
-
}, "draw"), De = /* @__PURE__ */ p(function(r, a) {
|
|
263
|
-
return a.db.getClasses();
|
|
264
|
-
}, "getClasses"), Ee = { draw: Me, getClasses: De }, _e = {
|
|
265
|
-
sectionStrokeColor: "black",
|
|
266
|
-
sectionStrokeWidth: "1",
|
|
267
|
-
sectionFillColor: "#efefef",
|
|
268
|
-
leafStrokeColor: "black",
|
|
269
|
-
leafStrokeWidth: "1",
|
|
270
|
-
leafFillColor: "#efefef",
|
|
271
|
-
labelColor: "black",
|
|
272
|
-
labelFontSize: "12px",
|
|
273
|
-
valueFontSize: "10px",
|
|
274
|
-
valueColor: "black",
|
|
275
|
-
titleColor: "black",
|
|
276
|
-
titleFontSize: "14px"
|
|
277
|
-
}, He = /* @__PURE__ */ p(({
|
|
278
|
-
treemap: r
|
|
279
|
-
} = {}) => {
|
|
280
|
-
const a = K(_e, r);
|
|
281
|
-
return `
|
|
282
|
-
.treemapNode.section {
|
|
283
|
-
stroke: ${a.sectionStrokeColor};
|
|
284
|
-
stroke-width: ${a.sectionStrokeWidth};
|
|
285
|
-
fill: ${a.sectionFillColor};
|
|
286
|
-
}
|
|
287
|
-
.treemapNode.leaf {
|
|
288
|
-
stroke: ${a.leafStrokeColor};
|
|
289
|
-
stroke-width: ${a.leafStrokeWidth};
|
|
290
|
-
fill: ${a.leafFillColor};
|
|
291
|
-
}
|
|
292
|
-
.treemapLabel {
|
|
293
|
-
fill: ${a.labelColor};
|
|
294
|
-
font-size: ${a.labelFontSize};
|
|
295
|
-
}
|
|
296
|
-
.treemapValue {
|
|
297
|
-
fill: ${a.valueColor};
|
|
298
|
-
font-size: ${a.valueFontSize};
|
|
299
|
-
}
|
|
300
|
-
.treemapTitle {
|
|
301
|
-
fill: ${a.titleColor};
|
|
302
|
-
font-size: ${a.titleFontSize};
|
|
303
|
-
}
|
|
304
|
-
`;
|
|
305
|
-
}, "getStyles"), Re = He, Je = {
|
|
306
|
-
parser: Ve,
|
|
307
|
-
db: D,
|
|
308
|
-
renderer: Ee,
|
|
309
|
-
styles: Re
|
|
310
|
-
};
|
|
311
|
-
export {
|
|
312
|
-
Je as diagram
|
|
313
|
-
};
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import { p as y } from "./chunk-353BL4L5-DAFgStCL.js";
|
|
2
|
-
import { _ as i, s as B, g as S, t as z, q as F, a as P, b as E, F as w, K as W, e as T, z as D, G as _, H as A, l as x } from "./mermaid-BrDUrAOA.js";
|
|
3
|
-
import { p as N } from "./treemap-FKARHQ26-BdRtb6Jl.js";
|
|
4
|
-
var m = {
|
|
5
|
-
packet: []
|
|
6
|
-
}, v = structuredClone(m), L = A.packet, Y = /* @__PURE__ */ i(() => {
|
|
7
|
-
const t = w({
|
|
8
|
-
...L,
|
|
9
|
-
..._().packet
|
|
10
|
-
});
|
|
11
|
-
return t.showBits && (t.paddingY += 10), t;
|
|
12
|
-
}, "getConfig"), G = /* @__PURE__ */ i(() => v.packet, "getPacket"), H = /* @__PURE__ */ i((t) => {
|
|
13
|
-
t.length > 0 && v.packet.push(t);
|
|
14
|
-
}, "pushWord"), I = /* @__PURE__ */ i(() => {
|
|
15
|
-
D(), v = structuredClone(m);
|
|
16
|
-
}, "clear"), u = {
|
|
17
|
-
pushWord: H,
|
|
18
|
-
getPacket: G,
|
|
19
|
-
getConfig: Y,
|
|
20
|
-
clear: I,
|
|
21
|
-
setAccTitle: E,
|
|
22
|
-
getAccTitle: P,
|
|
23
|
-
setDiagramTitle: F,
|
|
24
|
-
getDiagramTitle: z,
|
|
25
|
-
getAccDescription: S,
|
|
26
|
-
setAccDescription: B
|
|
27
|
-
}, K = 1e4, M = /* @__PURE__ */ i((t) => {
|
|
28
|
-
y(t, u);
|
|
29
|
-
let e = -1, o = [], s = 1;
|
|
30
|
-
const { bitsPerRow: n } = u.getConfig();
|
|
31
|
-
for (let { start: a, end: r, bits: c, label: f } of t.blocks) {
|
|
32
|
-
if (a !== void 0 && r !== void 0 && r < a)
|
|
33
|
-
throw new Error(`Packet block ${a} - ${r} is invalid. End must be greater than start.`);
|
|
34
|
-
if (a ?? (a = e + 1), a !== e + 1)
|
|
35
|
-
throw new Error(
|
|
36
|
-
`Packet block ${a} - ${r ?? a} is not contiguous. It should start from ${e + 1}.`
|
|
37
|
-
);
|
|
38
|
-
if (c === 0)
|
|
39
|
-
throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);
|
|
40
|
-
for (r ?? (r = a + (c ?? 1) - 1), c ?? (c = r - a + 1), e = r, x.debug(`Packet block ${a} - ${e} with label ${f}`); o.length <= n + 1 && u.getPacket().length < K; ) {
|
|
41
|
-
const [d, p] = O({ start: a, end: r, bits: c, label: f }, s, n);
|
|
42
|
-
if (o.push(d), d.end + 1 === s * n && (u.pushWord(o), o = [], s++), !p)
|
|
43
|
-
break;
|
|
44
|
-
({ start: a, end: r, bits: c, label: f } = p);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
u.pushWord(o);
|
|
48
|
-
}, "populate"), O = /* @__PURE__ */ i((t, e, o) => {
|
|
49
|
-
if (t.start === void 0)
|
|
50
|
-
throw new Error("start should have been set during first phase");
|
|
51
|
-
if (t.end === void 0)
|
|
52
|
-
throw new Error("end should have been set during first phase");
|
|
53
|
-
if (t.start > t.end)
|
|
54
|
-
throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);
|
|
55
|
-
if (t.end + 1 <= e * o)
|
|
56
|
-
return [t, void 0];
|
|
57
|
-
const s = e * o - 1, n = e * o;
|
|
58
|
-
return [
|
|
59
|
-
{
|
|
60
|
-
start: t.start,
|
|
61
|
-
end: s,
|
|
62
|
-
label: t.label,
|
|
63
|
-
bits: s - t.start
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
start: n,
|
|
67
|
-
end: t.end,
|
|
68
|
-
label: t.label,
|
|
69
|
-
bits: t.end - n
|
|
70
|
-
}
|
|
71
|
-
];
|
|
72
|
-
}, "getNextFittingBlock"), q = {
|
|
73
|
-
parse: /* @__PURE__ */ i(async (t) => {
|
|
74
|
-
const e = await N("packet", t);
|
|
75
|
-
x.debug(e), M(e);
|
|
76
|
-
}, "parse")
|
|
77
|
-
}, R = /* @__PURE__ */ i((t, e, o, s) => {
|
|
78
|
-
const n = s.db, a = n.getConfig(), { rowHeight: r, paddingY: c, bitWidth: f, bitsPerRow: d } = a, p = n.getPacket(), l = n.getDiagramTitle(), k = r + c, g = k * (p.length + 1) - (l ? 0 : r), b = f * d + 2, h = W(e);
|
|
79
|
-
h.attr("viewbox", `0 0 ${b} ${g}`), T(h, g, b, a.useMaxWidth);
|
|
80
|
-
for (const [C, $] of p.entries())
|
|
81
|
-
U(h, $, C, a);
|
|
82
|
-
h.append("text").text(l).attr("x", b / 2).attr("y", g - k / 2).attr("dominant-baseline", "middle").attr("text-anchor", "middle").attr("class", "packetTitle");
|
|
83
|
-
}, "draw"), U = /* @__PURE__ */ i((t, e, o, { rowHeight: s, paddingX: n, paddingY: a, bitWidth: r, bitsPerRow: c, showBits: f }) => {
|
|
84
|
-
const d = t.append("g"), p = o * (s + a) + a;
|
|
85
|
-
for (const l of e) {
|
|
86
|
-
const k = l.start % c * r + 1, g = (l.end - l.start + 1) * r - n;
|
|
87
|
-
if (d.append("rect").attr("x", k).attr("y", p).attr("width", g).attr("height", s).attr("class", "packetBlock"), d.append("text").attr("x", k + g / 2).attr("y", p + s / 2).attr("class", "packetLabel").attr("dominant-baseline", "middle").attr("text-anchor", "middle").text(l.label), !f)
|
|
88
|
-
continue;
|
|
89
|
-
const b = l.end === l.start, h = p - 2;
|
|
90
|
-
d.append("text").attr("x", k + (b ? g / 2 : 0)).attr("y", h).attr("class", "packetByte start").attr("dominant-baseline", "auto").attr("text-anchor", b ? "middle" : "start").text(l.start), b || d.append("text").attr("x", k + g).attr("y", h).attr("class", "packetByte end").attr("dominant-baseline", "auto").attr("text-anchor", "end").text(l.end);
|
|
91
|
-
}
|
|
92
|
-
}, "drawWord"), X = { draw: R }, j = {
|
|
93
|
-
byteFontSize: "10px",
|
|
94
|
-
startByteColor: "black",
|
|
95
|
-
endByteColor: "black",
|
|
96
|
-
labelColor: "black",
|
|
97
|
-
labelFontSize: "12px",
|
|
98
|
-
titleColor: "black",
|
|
99
|
-
titleFontSize: "14px",
|
|
100
|
-
blockStrokeColor: "black",
|
|
101
|
-
blockStrokeWidth: "1",
|
|
102
|
-
blockFillColor: "#efefef"
|
|
103
|
-
}, J = /* @__PURE__ */ i(({ packet: t } = {}) => {
|
|
104
|
-
const e = w(j, t);
|
|
105
|
-
return `
|
|
106
|
-
.packetByte {
|
|
107
|
-
font-size: ${e.byteFontSize};
|
|
108
|
-
}
|
|
109
|
-
.packetByte.start {
|
|
110
|
-
fill: ${e.startByteColor};
|
|
111
|
-
}
|
|
112
|
-
.packetByte.end {
|
|
113
|
-
fill: ${e.endByteColor};
|
|
114
|
-
}
|
|
115
|
-
.packetLabel {
|
|
116
|
-
fill: ${e.labelColor};
|
|
117
|
-
font-size: ${e.labelFontSize};
|
|
118
|
-
}
|
|
119
|
-
.packetTitle {
|
|
120
|
-
fill: ${e.titleColor};
|
|
121
|
-
font-size: ${e.titleFontSize};
|
|
122
|
-
}
|
|
123
|
-
.packetBlock {
|
|
124
|
-
stroke: ${e.blockStrokeColor};
|
|
125
|
-
stroke-width: ${e.blockStrokeWidth};
|
|
126
|
-
fill: ${e.blockFillColor};
|
|
127
|
-
}
|
|
128
|
-
`;
|
|
129
|
-
}, "styles"), tt = {
|
|
130
|
-
parser: q,
|
|
131
|
-
db: u,
|
|
132
|
-
renderer: X,
|
|
133
|
-
styles: J
|
|
134
|
-
};
|
|
135
|
-
export {
|
|
136
|
-
tt as diagram
|
|
137
|
-
};
|