@layers-app/editor 0.4.1 → 0.5.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 +37 -1
- package/package.json +10 -10
- package/dist/index.cjs +0 -2
- package/dist/index.d.ts +0 -315
- package/dist/index.js +0 -13
- package/dist/layers.-23sKdPr.js +0 -10
- package/dist/layers.2Zh_Eqge.js +0 -118
- package/dist/layers.52famHy6.js +0 -1
- package/dist/layers.6xiY7Dmk.js +0 -10
- package/dist/layers.7JqFgE4-.js +0 -15
- package/dist/layers.7aWFCBDk.js +0 -36
- package/dist/layers.9--aZzKT.js +0 -41
- package/dist/layers.99J97lec.js +0 -40
- package/dist/layers.9QK1wiQj.js +0 -1
- package/dist/layers.9pNaFvaX.js +0 -1
- package/dist/layers.B16HCOzz.js +0 -11
- package/dist/layers.B19hGmey.js +0 -1
- package/dist/layers.B1GsQlw2.js +0 -202
- package/dist/layers.B1VWPJr7.js +0 -61
- package/dist/layers.B2AGu32C.js +0 -11692
- package/dist/layers.B3D4g2HH.js +0 -1
- package/dist/layers.B4Jcovwh.js +0 -160
- package/dist/layers.B4o4Yght.js +0 -39
- package/dist/layers.B51TBzz6.js +0 -1
- package/dist/layers.B5HV5CkN.js +0 -6
- package/dist/layers.B5VQ5ysd.js +0 -230
- package/dist/layers.B7uv8aVq.js +0 -39
- package/dist/layers.B9ypkXfB.js +0 -1
- package/dist/layers.BATSJhNp.js +0 -10
- package/dist/layers.BAe6u370.js +0 -793
- package/dist/layers.BAtv1CM7.js +0 -1
- package/dist/layers.BCMyc6dl.js +0 -1
- package/dist/layers.BChBzZgi.js +0 -139
- package/dist/layers.BCtnSgBi.js +0 -139
- package/dist/layers.BGXN8iGN.js +0 -36
- package/dist/layers.BH9NvW2c.js +0 -1
- package/dist/layers.BHEN4Zl8.js +0 -9
- package/dist/layers.BI-S-U1z.js +0 -34
- package/dist/layers.BIATzXuT.js +0 -5
- package/dist/layers.BId9R-tt.js +0 -9
- package/dist/layers.BIeVwYKL.js +0 -1
- package/dist/layers.BIj1zRV6.js +0 -8
- package/dist/layers.BK7Umu5k.js +0 -40
- package/dist/layers.BL7PsAnh.js +0 -40
- package/dist/layers.BLha5Ags.js +0 -1
- package/dist/layers.BNcxqXDY.js +0 -2
- package/dist/layers.BOY6DvLj.js +0 -41
- package/dist/layers.BQ5pHr1t.js +0 -9
- package/dist/layers.BR9erYvc.js +0 -425
- package/dist/layers.BSTBZrFn.js +0 -1
- package/dist/layers.BTjqsj2D.js +0 -32
- package/dist/layers.BU0ouPbJ.js +0 -40
- package/dist/layers.BVLHr0fv.js +0 -21938
- package/dist/layers.BVhV_yLo.js +0 -59
- package/dist/layers.BWppdp8z.js +0 -37
- package/dist/layers.BXGZ-IPG.js +0 -37
- package/dist/layers.BXIQjroR.js +0 -8
- package/dist/layers.BXe2f2v0.js +0 -10
- package/dist/layers.BaREUEpY.js +0 -1
- package/dist/layers.BbCfEXyj.js +0 -55
- package/dist/layers.BdxgA5Mh.js +0 -40
- package/dist/layers.BeXV53PI.js +0 -38
- package/dist/layers.Bf4maS9l.js +0 -41
- package/dist/layers.BgOa2ZQq.js +0 -7
- package/dist/layers.BgXRgBMD.js +0 -9
- package/dist/layers.Bgx4q6Yl.js +0 -1
- package/dist/layers.BiJ8hfRt.js +0 -1510
- package/dist/layers.BiK_NhRx.js +0 -13
- package/dist/layers.BjIrZvhA.js +0 -41
- package/dist/layers.BkDwnhF3.js +0 -39
- package/dist/layers.BkZl0e9Y.js +0 -10
- package/dist/layers.BkkBEMI4.js +0 -122
- package/dist/layers.Bl2uWPK5.js +0 -35
- package/dist/layers.BldgpPoA.js +0 -21763
- package/dist/layers.BmdNYA8O.js +0 -39
- package/dist/layers.BoUDsd20.js +0 -84
- package/dist/layers.BpilXLfW.js +0 -6
- package/dist/layers.Bqy_BDRk.js +0 -960
- package/dist/layers.BvQfT02S.js +0 -9
- package/dist/layers.BxCLnc_z.js +0 -52
- package/dist/layers.Bxuc5Ku1.js +0 -6
- package/dist/layers.Bxx3QiqH.js +0 -5
- package/dist/layers.BzufRV9o.js +0 -4
- package/dist/layers.C-S1uftF.js +0 -1
- package/dist/layers.C00McVdb.js +0 -116
- package/dist/layers.C3-Awt80.js +0 -186
- package/dist/layers.C46xOyCn.js +0 -1
- package/dist/layers.C4Z2eV4H.js +0 -437
- package/dist/layers.C5fqgGR6.js +0 -33
- package/dist/layers.C5pjkDUm.js +0 -8
- package/dist/layers.C5th-3Bk.js +0 -4
- package/dist/layers.C5vdiuk-.js +0 -1
- package/dist/layers.C6FZDcP0.js +0 -5
- package/dist/layers.C6ueRaWn.js +0 -1
- package/dist/layers.C6vMG-T6.js +0 -39
- package/dist/layers.C7lIplJU.js +0 -247
- package/dist/layers.C7md-mpb.js +0 -373
- package/dist/layers.C8Lyyff8.js +0 -39
- package/dist/layers.C8WU47YC.js +0 -7
- package/dist/layers.C8_lu5UH.js +0 -23
- package/dist/layers.CAZF51iw.js +0 -769
- package/dist/layers.CDmsB9ui.js +0 -9
- package/dist/layers.CENOzW4d.js +0 -32
- package/dist/layers.CESONz7C.js +0 -35
- package/dist/layers.CEW7Z5oj.js +0 -40
- package/dist/layers.CHE9Vv0w.js +0 -2966
- package/dist/layers.CHMDrzTP.js +0 -1
- package/dist/layers.CHZsXQcr.js +0 -1
- package/dist/layers.CIkcRflS.js +0 -32
- package/dist/layers.CJdGap0M.js +0 -40
- package/dist/layers.CJgtfrlM.js +0 -9
- package/dist/layers.CK15u90j.js +0 -32
- package/dist/layers.CKyZ6fil.js +0 -220
- package/dist/layers.COAF7f8g.js +0 -1
- package/dist/layers.CP7ZgLdQ.js +0 -802
- package/dist/layers.CQ_KfkMs.js +0 -1
- package/dist/layers.CSKgny-q.js +0 -1359
- package/dist/layers.CX4-2iW9.js +0 -8
- package/dist/layers.CX4mdDUE.js +0 -40
- package/dist/layers.CXFcyuib.js +0 -51
- package/dist/layers.CXnC6LGK.js +0 -1
- package/dist/layers.CXoz8wje.js +0 -11
- package/dist/layers.CZianMah.js +0 -33
- package/dist/layers.CbrkK8Nl.js +0 -6
- package/dist/layers.CdPjGs2x.js +0 -32
- package/dist/layers.CdZEenM8.js +0 -8
- package/dist/layers.CeESKes4.js +0 -37
- package/dist/layers.CebNnxUV.js +0 -185
- package/dist/layers.Cg0Puk92.js +0 -40
- package/dist/layers.ChG4YWfr.js +0 -1034
- package/dist/layers.ChLLCYeV.js +0 -7
- package/dist/layers.Cj5o49qm.js +0 -7
- package/dist/layers.Ck_m9yBu.js +0 -41
- package/dist/layers.Cl9YbTGP.js +0 -1
- package/dist/layers.Clo5oIEO.js +0 -70
- package/dist/layers.Cmeg2JEe.js +0 -10
- package/dist/layers.CqVTtuYm.js +0 -6
- package/dist/layers.Cs24L6er.js +0 -261
- package/dist/layers.Ctcl9I58.js +0 -10
- package/dist/layers.Cuf8LL65.js +0 -4
- package/dist/layers.CusXQPSP.js +0 -41
- package/dist/layers.CyaiBxcg.js +0 -1
- package/dist/layers.D-4MyOv6.js +0 -1126
- package/dist/layers.D0fuzbA_.js +0 -1580
- package/dist/layers.D0t24lyP.js +0 -1619
- package/dist/layers.D0zn4_Mx.js +0 -1
- package/dist/layers.D37kPodI.js +0 -7
- package/dist/layers.D3PBqBbY.js +0 -4
- package/dist/layers.D3eSioXs.js +0 -1
- package/dist/layers.D4fGb2cV.js +0 -1272
- package/dist/layers.D56jgM5P.js +0 -803
- package/dist/layers.D7jGxypv.js +0 -8
- package/dist/layers.DBgQS_TD.js +0 -39
- package/dist/layers.DE8kdoob.js +0 -8
- package/dist/layers.DEMbeDH5.js +0 -96
- package/dist/layers.DGfERl47.js +0 -39
- package/dist/layers.DGhEo4ps.js +0 -6
- package/dist/layers.DHbgl38J.js +0 -1
- package/dist/layers.DIW19mY0.js +0 -2235
- package/dist/layers.DIsd_eLu.js +0 -931
- package/dist/layers.DKhnUElF.js +0 -3
- package/dist/layers.DLwuMfdd.js +0 -84
- package/dist/layers.DMXwnUhk.js +0 -10
- package/dist/layers.DMkBISW1.js +0 -1
- package/dist/layers.DN9HoVxI.js +0 -18
- package/dist/layers.DOjcR2u6.js +0 -44
- package/dist/layers.DOrgOHBr.js +0 -1
- package/dist/layers.DRd1i4Pe.js +0 -2
- package/dist/layers.DSiVxrm-.js +0 -9
- package/dist/layers.DV0u_-wO.js +0 -1
- package/dist/layers.DYJhYqR2.js +0 -1089
- package/dist/layers.DYR-z4Xd.js +0 -65
- package/dist/layers.D_KjhW7m.js +0 -9
- package/dist/layers.DaA4pT9g.js +0 -42
- package/dist/layers.DbaKVP5e.js +0 -1
- package/dist/layers.DcGuLvyP.js +0 -1
- package/dist/layers.DczwzPio.js +0 -1
- package/dist/layers.DdULzc5-.js +0 -42
- package/dist/layers.De4i5Pzr.js +0 -423
- package/dist/layers.Dg_ubB5o.js +0 -38
- package/dist/layers.DhtUpSvn.js +0 -7
- package/dist/layers.DiAtOpGJ.js +0 -38
- package/dist/layers.DjUOC4st.js +0 -16
- package/dist/layers.DlH0lUyY.js +0 -7
- package/dist/layers.Dms1jgA7.js +0 -7
- package/dist/layers.DnvdN9TC.js +0 -9
- package/dist/layers.Doo3HAhr.js +0 -42
- package/dist/layers.Dpl-_pRd.js +0 -282
- package/dist/layers.Dq7WsWG1.js +0 -8
- package/dist/layers.Dr-_us97.js +0 -5
- package/dist/layers.Dr9AgtBT.js +0 -1265
- package/dist/layers.DsIrXvQc.js +0 -36
- package/dist/layers.DuC5Q-Uc.js +0 -1
- package/dist/layers.Dwrpihyi.js +0 -9148
- package/dist/layers.Dx7QSKbZ.js +0 -257
- package/dist/layers.DxA6ocdw.js +0 -70
- package/dist/layers.Dy1naDTQ.js +0 -14
- package/dist/layers.DyIa2FAJ.js +0 -501
- package/dist/layers.DyrpParn.js +0 -42
- package/dist/layers.G0qyEFRn.js +0 -7
- package/dist/layers.HnnZ9X3g.js +0 -41
- package/dist/layers.Ih_DycCa.js +0 -904
- package/dist/layers.JWCLFILJ.js +0 -1
- package/dist/layers.MXTL7J0X.js +0 -45828
- package/dist/layers.N0KTyT8H.js +0 -10
- package/dist/layers.NLvydYLt.js +0 -19
- package/dist/layers.NQOujqxE.js +0 -207
- package/dist/layers.O7rgjuxq.js +0 -35
- package/dist/layers.OF4XgnEn.js +0 -320
- package/dist/layers.OqM7Ogm0.js +0 -6
- package/dist/layers.P0RFt4vw.js +0 -10
- package/dist/layers.PWkD3FXd.js +0 -32
- package/dist/layers.Q933nYVT.js +0 -14
- package/dist/layers.ShoHTpWp.js +0 -11
- package/dist/layers.TP-LPR2e.js +0 -1283
- package/dist/layers.U8d2vvil.js +0 -11
- package/dist/layers.UHdtuNW7.js +0 -6
- package/dist/layers.UPBrkQqm.js +0 -1088
- package/dist/layers.Y1n_hIuc.js +0 -1
- package/dist/layers._uHasBFO.js +0 -40
- package/dist/layers._uJVChzG.js +0 -48146
- package/dist/layers.b0h5ZBmD.js +0 -61
- package/dist/layers.b_l02tem.js +0 -319
- package/dist/layers.d0donhTp.js +0 -36
- package/dist/layers.fjvgvmUK.js +0 -37
- package/dist/layers.gSOgK4cv.js +0 -41
- package/dist/layers.h2SsCt7w.js +0 -8
- package/dist/layers.hzJoyUwS.js +0 -268
- package/dist/layers.j4D7aRnj.js +0 -42
- package/dist/layers.l7Uj4NoM.js +0 -8
- package/dist/layers.lCpg7dOn.js +0 -21
- package/dist/layers.mS0YwpDF.js +0 -2479
- package/dist/layers.oLym9I6R.js +0 -8
- package/dist/layers.pGJnLNqj.js +0 -285
- package/dist/layers.pRFngToG.js +0 -1
- package/dist/layers.rK-vslvx.js +0 -2
- package/dist/layers.rSvdeOjc.js +0 -84
- package/dist/layers.rwvkqrdF.js +0 -11
- package/dist/layers.wRnSjyfZ.js +0 -5
- package/dist/layers.xbymChc4.js +0 -790
- package/dist/layers.xlbtHZsv.js +0 -39
package/dist/layers.C3-Awt80.js
DELETED
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
import { s as J, d as B, p as Q, D as X, a as H, b as Z, S as F, c as I } from "./layers.Bqy_BDRk.js";
|
|
2
|
-
import { G as tt } from "./layers.C7lIplJU.js";
|
|
3
|
-
import { l as E, g, d as x, u as et, e as ot, j as w } from "./layers.Dwrpihyi.js";
|
|
4
|
-
import { r as st } from "./layers.C7md-mpb.js";
|
|
5
|
-
import "./layers.BldgpPoA.js";
|
|
6
|
-
import "lodash-es";
|
|
7
|
-
import "./layers.D4fGb2cV.js";
|
|
8
|
-
const h = "rect", C = "rectWithTitle", nt = "start", ct = "end", it = "divider", rt = "roundedWithTitle", lt = "note", at = "noteGroup", _ = "statediagram", dt = "state", Et = `${_}-${dt}`, U = "transition", St = "note", Tt = "note-edge", pt = `${U} ${Tt}`, _t = `${_}-${St}`, ut = "cluster", Dt = `${_}-${ut}`, bt = "cluster-alt", ft = `${_}-${bt}`, V = "parent", Y = "note", At = "state", N = "----", ht = `${N}${Y}`, M = `${N}${V}`, W = "fill:none", z = "fill: #333", j = "c", q = "text", K = "normal";
|
|
9
|
-
let y = {}, d = 0;
|
|
10
|
-
const yt = function(t) {
|
|
11
|
-
const n = Object.keys(t);
|
|
12
|
-
for (const e of n)
|
|
13
|
-
t[e];
|
|
14
|
-
}, gt = function(t, n) {
|
|
15
|
-
return n.db.extract(n.db.getRootDocV2()), n.db.getClasses();
|
|
16
|
-
};
|
|
17
|
-
function $t(t) {
|
|
18
|
-
return t == null ? "" : t.classes ? t.classes.join(" ") : "";
|
|
19
|
-
}
|
|
20
|
-
function R(t = "", n = 0, e = "", c = N) {
|
|
21
|
-
const i = e !== null && e.length > 0 ? `${c}${e}` : "";
|
|
22
|
-
return `${At}-${t}${i}-${n}`;
|
|
23
|
-
}
|
|
24
|
-
const A = (t, n, e, c, i, r) => {
|
|
25
|
-
const o = e.id, u = $t(c[o]);
|
|
26
|
-
if (o !== "root") {
|
|
27
|
-
let T = h;
|
|
28
|
-
e.start === !0 && (T = nt), e.start === !1 && (T = ct), e.type !== H && (T = e.type), y[o] || (y[o] = {
|
|
29
|
-
id: o,
|
|
30
|
-
shape: T,
|
|
31
|
-
description: w.sanitizeText(o, g()),
|
|
32
|
-
classes: `${u} ${Et}`
|
|
33
|
-
});
|
|
34
|
-
const s = y[o];
|
|
35
|
-
e.description && (Array.isArray(s.description) ? (s.shape = C, s.description.push(e.description)) : s.description.length > 0 ? (s.shape = C, s.description === o ? s.description = [e.description] : s.description = [s.description, e.description]) : (s.shape = h, s.description = e.description), s.description = w.sanitizeTextOrArray(s.description, g())), s.description.length === 1 && s.shape === C && (s.shape = h), !s.type && e.doc && (E.info("Setting cluster for ", o, G(e)), s.type = "group", s.dir = G(e), s.shape = e.type === Z ? it : rt, s.classes = s.classes + " " + Dt + " " + (r ? ft : ""));
|
|
36
|
-
const p = {
|
|
37
|
-
labelStyle: "",
|
|
38
|
-
shape: s.shape,
|
|
39
|
-
labelText: s.description,
|
|
40
|
-
// typeof newNode.description === 'object'
|
|
41
|
-
// ? newNode.description[0]
|
|
42
|
-
// : newNode.description,
|
|
43
|
-
classes: s.classes,
|
|
44
|
-
style: "",
|
|
45
|
-
//styles.style,
|
|
46
|
-
id: o,
|
|
47
|
-
dir: s.dir,
|
|
48
|
-
domId: R(o, d),
|
|
49
|
-
type: s.type,
|
|
50
|
-
padding: 15
|
|
51
|
-
//getConfig().flowchart.padding
|
|
52
|
-
};
|
|
53
|
-
if (p.centerLabel = !0, e.note) {
|
|
54
|
-
const l = {
|
|
55
|
-
labelStyle: "",
|
|
56
|
-
shape: lt,
|
|
57
|
-
labelText: e.note.text,
|
|
58
|
-
classes: _t,
|
|
59
|
-
// useHtmlLabels: false,
|
|
60
|
-
style: "",
|
|
61
|
-
// styles.style,
|
|
62
|
-
id: o + ht + "-" + d,
|
|
63
|
-
domId: R(o, d, Y),
|
|
64
|
-
type: s.type,
|
|
65
|
-
padding: 15
|
|
66
|
-
//getConfig().flowchart.padding
|
|
67
|
-
}, a = {
|
|
68
|
-
labelStyle: "",
|
|
69
|
-
shape: at,
|
|
70
|
-
labelText: e.note.text,
|
|
71
|
-
classes: s.classes,
|
|
72
|
-
style: "",
|
|
73
|
-
// styles.style,
|
|
74
|
-
id: o + M,
|
|
75
|
-
domId: R(o, d, V),
|
|
76
|
-
type: "group",
|
|
77
|
-
padding: 0
|
|
78
|
-
//getConfig().flowchart.padding
|
|
79
|
-
};
|
|
80
|
-
d++;
|
|
81
|
-
const D = o + M;
|
|
82
|
-
t.setNode(D, a), t.setNode(l.id, l), t.setNode(o, p), t.setParent(o, D), t.setParent(l.id, D);
|
|
83
|
-
let S = o, b = l.id;
|
|
84
|
-
e.note.position === "left of" && (S = l.id, b = o), t.setEdge(S, b, {
|
|
85
|
-
arrowhead: "none",
|
|
86
|
-
arrowType: "",
|
|
87
|
-
style: W,
|
|
88
|
-
labelStyle: "",
|
|
89
|
-
classes: pt,
|
|
90
|
-
arrowheadStyle: z,
|
|
91
|
-
labelpos: j,
|
|
92
|
-
labelType: q,
|
|
93
|
-
thickness: K
|
|
94
|
-
});
|
|
95
|
-
} else
|
|
96
|
-
t.setNode(o, p);
|
|
97
|
-
}
|
|
98
|
-
n && n.id !== "root" && (E.trace("Setting node ", o, " to be child of its parent ", n.id), t.setParent(o, n.id)), e.doc && (E.trace("Adding nodes children "), xt(t, e, e.doc, c, i, !r));
|
|
99
|
-
}, xt = (t, n, e, c, i, r) => {
|
|
100
|
-
E.trace("items", e), e.forEach((o) => {
|
|
101
|
-
switch (o.stmt) {
|
|
102
|
-
case I:
|
|
103
|
-
A(t, n, o, c, i, r);
|
|
104
|
-
break;
|
|
105
|
-
case H:
|
|
106
|
-
A(t, n, o, c, i, r);
|
|
107
|
-
break;
|
|
108
|
-
case F:
|
|
109
|
-
{
|
|
110
|
-
A(t, n, o.state1, c, i, r), A(t, n, o.state2, c, i, r);
|
|
111
|
-
const u = {
|
|
112
|
-
id: "edge" + d,
|
|
113
|
-
arrowhead: "normal",
|
|
114
|
-
arrowTypeEnd: "arrow_barb",
|
|
115
|
-
style: W,
|
|
116
|
-
labelStyle: "",
|
|
117
|
-
label: w.sanitizeText(o.description, g()),
|
|
118
|
-
arrowheadStyle: z,
|
|
119
|
-
labelpos: j,
|
|
120
|
-
labelType: q,
|
|
121
|
-
thickness: K,
|
|
122
|
-
classes: U
|
|
123
|
-
};
|
|
124
|
-
t.setEdge(o.state1.id, o.state2.id, u, d), d++;
|
|
125
|
-
}
|
|
126
|
-
break;
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
}, G = (t, n = X) => {
|
|
130
|
-
let e = n;
|
|
131
|
-
if (t.doc)
|
|
132
|
-
for (let c = 0; c < t.doc.length; c++) {
|
|
133
|
-
const i = t.doc[c];
|
|
134
|
-
i.stmt === "dir" && (e = i.value);
|
|
135
|
-
}
|
|
136
|
-
return e;
|
|
137
|
-
}, Ct = async function(t, n, e, c) {
|
|
138
|
-
E.info("Drawing state diagram (v2)", n), y = {}, c.db.getDirection();
|
|
139
|
-
const { securityLevel: i, state: r } = g(), o = r.nodeSpacing || 50, u = r.rankSpacing || 50;
|
|
140
|
-
E.info(c.db.getRootDocV2()), c.db.extract(c.db.getRootDocV2()), E.info(c.db.getRootDocV2());
|
|
141
|
-
const T = c.db.getStates(), s = new tt({
|
|
142
|
-
multigraph: !0,
|
|
143
|
-
compound: !0
|
|
144
|
-
}).setGraph({
|
|
145
|
-
rankdir: G(c.db.getRootDocV2()),
|
|
146
|
-
nodesep: o,
|
|
147
|
-
ranksep: u,
|
|
148
|
-
marginx: 8,
|
|
149
|
-
marginy: 8
|
|
150
|
-
}).setDefaultEdgeLabel(function() {
|
|
151
|
-
return {};
|
|
152
|
-
});
|
|
153
|
-
A(s, void 0, c.db.getRootDocV2(), T, c.db, !0);
|
|
154
|
-
let p;
|
|
155
|
-
i === "sandbox" && (p = x("#i" + n));
|
|
156
|
-
const l = i === "sandbox" ? x(p.nodes()[0].contentDocument.body) : x("body"), a = l.select(`[id="${n}"]`), D = l.select("#" + n + " g");
|
|
157
|
-
await st(D, s, ["barb"], _, n);
|
|
158
|
-
const S = 8;
|
|
159
|
-
et.insertTitle(a, "statediagramTitleText", r.titleTopMargin, c.db.getDiagramTitle());
|
|
160
|
-
const b = a.node().getBBox(), L = b.width + S * 2, P = b.height + S * 2;
|
|
161
|
-
a.attr("class", _);
|
|
162
|
-
const O = a.node().getBBox();
|
|
163
|
-
ot(a, P, L, r.useMaxWidth);
|
|
164
|
-
const k = `${O.x - S} ${O.y - S} ${L} ${P}`;
|
|
165
|
-
E.debug(`viewBox ${k}`), a.attr("viewBox", k);
|
|
166
|
-
const m = document.querySelectorAll('[id="' + n + '"] .edgeLabel .label');
|
|
167
|
-
for (const $ of m) {
|
|
168
|
-
const v = $.getBBox(), f = document.createElementNS("http://www.w3.org/2000/svg", h);
|
|
169
|
-
f.setAttribute("rx", 0), f.setAttribute("ry", 0), f.setAttribute("width", v.width), f.setAttribute("height", v.height), $.insertBefore(f, $.firstChild);
|
|
170
|
-
}
|
|
171
|
-
}, Rt = {
|
|
172
|
-
setConf: yt,
|
|
173
|
-
getClasses: gt,
|
|
174
|
-
draw: Ct
|
|
175
|
-
}, vt = {
|
|
176
|
-
parser: Q,
|
|
177
|
-
db: B,
|
|
178
|
-
renderer: Rt,
|
|
179
|
-
styles: J,
|
|
180
|
-
init: (t) => {
|
|
181
|
-
t.state || (t.state = {}), t.state.arrowMarkerAbsolute = t.arrowMarkerAbsolute, B.clear();
|
|
182
|
-
}
|
|
183
|
-
};
|
|
184
|
-
export {
|
|
185
|
-
vt as diagram
|
|
186
|
-
};
|
package/dist/layers.C46xOyCn.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./layers.B5VQ5ysd.js");var e={paste:"අලවන්න",pasteAsPlaintext:"",pasteCharts:"ප්රස්ථාරය",selectAll:"සියල්ලම",multiSelect:"තෝරා ගැනීමට අංගය එකතු කරන්න",moveCanvas:"කැන්වසය චලනය කරන්න",cut:"කපන්න",copy:"පිටපත් කරන්න",copyAsPng:"PNG ලෙස පිටපත් කරන්න",copyAsSvg:"SVG ලෙස පිටපත් කරන්න",copyText:"",copySource:"",convertToCode:"",bringForward:"ඉදිරියට ගෙන්න",sendToBack:"පසුපසටම ගෙනියන්න",bringToFront:"ඉදිරියටම ගෙන්න",sendBackward:"පසුපසට ගෙනියන්න",delete:"මකන්න",copyStyles:"",pasteStyles:"",stroke:"",background:"",fill:"",strokeWidth:"",strokeStyle:"",strokeStyle_solid:"",strokeStyle_dashed:"",strokeStyle_dotted:"",sloppiness:"",opacity:"",textAlign:"",edges:"",sharp:"",round:"",arrowheads:"",arrowhead_none:"",arrowhead_arrow:"",arrowhead_bar:"",arrowhead_circle:"",arrowhead_circle_outline:"",arrowhead_triangle:"",arrowhead_triangle_outline:"",arrowhead_diamond:"",arrowhead_diamond_outline:"",fontSize:"",fontFamily:"",addWatermark:"",handDrawn:"",normal:"",code:"",small:"",medium:"",large:"",veryLarge:"ඉතා විශාල",solid:"විශාල",hachure:"මධ්යම",zigzag:"",crossHatch:"",thin:"කෙට්ටු",bold:"තද",left:"වම",center:"මැද",right:"දකුණ",extraBold:"ඉතා තද",architect:"වාස්තුවේදීයා",artist:"කලාකරු",cartoonist:"සැකිලිරූකරු",fileTitle:"ගොනු නාමය",colorPicker:"පාට තෝරකය",canvasColors:"",canvasBackground:"කැන්වස පසුබිම",drawingCanvas:"චිත්රක කැන්වසය",layers:"ලේයර",actions:"ක්රියාකාරකම",language:"භාෂාව ",liveCollaboration:"",duplicateSelection:"",untitled:"",name:"නම",yourName:"",madeWithExcalidraw:"",group:"",ungroup:"",collaborators:"",showGrid:"",addToLibrary:"",removeFromLibrary:"",libraryLoadingMessage:"",libraries:"",loadingScene:"",align:"",alignTop:"",alignBottom:"",alignLeft:"",alignRight:"",centerVertically:"",centerHorizontally:"",distributeHorizontally:"",distributeVertically:"",flipHorizontal:"",flipVertical:"",viewMode:"",share:"",showStroke:"",showBackground:"",toggleTheme:"",personalLib:"",excalidrawLib:"",decreaseFontSize:"",increaseFontSize:"",unbindText:"",bindText:"",createContainerFromText:"",link:{edit:"",editEmbed:"",create:"",createEmbed:"",label:"",labelEmbed:"",empty:""},lineEditor:{edit:"",exit:""},elementLock:{lock:"",unlock:"",lockAll:"",unlockAll:""},statusPublished:"",sidebarLock:"",selectAllElementsInFrame:"",removeAllElementsFromFrame:"",eyeDropper:"",textToDiagram:"",prompt:""},o={noItems:"",hint_emptyLibrary:"",hint_emptyPrivateLibrary:""},r={clearReset:"",exportJSON:"",exportImage:"",export:"",copyToClipboard:"",save:"",saveAs:"",load:"",getShareableLink:"",close:"",selectLanguage:"",scrollBackToContent:"",zoomIn:"",zoomOut:"",resetZoom:"",menu:"",done:"",edit:"",undo:"",redo:"",resetLibrary:"",createNewRoom:"",fullScreen:"",darkMode:"",lightMode:"",zenMode:"",objectsSnapMode:"",exitZenMode:"",cancel:"",clear:"",remove:"",embed:"",publishLibrary:"",submit:"",confirm:"",embeddableInteractionButton:""},t={clearReset:"",couldNotCreateShareableLink:"",couldNotCreateShareableLinkTooBig:"",couldNotLoadInvalidFile:"",importBackendFailed:"",cannotExportEmptyCanvas:"",couldNotCopyToClipboard:"",decryptFailed:"",uploadedSecurly:"",loadSceneOverridePrompt:"",collabStopOverridePrompt:"",errorAddingToLibrary:"",errorRemovingFromLibrary:"",confirmAddLibrary:"",imageDoesNotContainScene:"",cannotRestoreFromImage:"",invalidSceneUrl:"",resetLibrary:"",removeItemsFromsLibrary:"",invalidEncryptionKey:"",collabOfflineWarning:""},a={unsupportedFileType:"",imageInsertError:"",fileTooBig:"",svgImageInsertError:"",failedToFetchImage:"",invalidSVGString:"",cannotResolveCollabServer:"",importLibraryError:"",collabSaveFailed:"",collabSaveFailed_sizeExceeded:"",imageToolNotSupported:"",brave_measure_text_error:{line1:"",line2:"",line3:"",line4:""},libraryElementTypeError:{embeddable:"",iframe:"",image:""},asyncPasteFailedOnRead:"",asyncPasteFailedOnParse:"",copyToSystemClipboardFailed:""},D={selection:"",image:"",rectangle:"",diamond:"",ellipse:"",arrow:"",line:"",freedraw:"",text:"",library:"",lock:"",penMode:"",link:"",eraser:"",frame:"",magicframe:"",embeddable:"",laser:"",hand:"",extraTools:"",mermaidToExcalidraw:"",magicSettings:""},u={canvasActions:"",selectedShapeActions:"",shapes:""},i={canvasPanning:"",linearElement:"",freeDraw:"",text:"",embeddable:"",text_selected:"",text_editing:"",linearElementMulti:"",lockAngle:"",resize:"",resizeImage:"",rotate:"",lineEditor_info:"",lineEditor_pointSelected:"",lineEditor_nothingSelected:"",placeImage:"",publishLibrary:"",bindTextToElement:"",deepBoxSelect:"",eraserRevert:"",firefox_clipboard_write:"",disableSnapping:""},l={cannotShowPreview:"",canvasTooBig:"",canvasTooBigTip:""},n={headingMain:"",clearCanvasMessage:"",clearCanvasCaveat:"",trackedToSentry:"",openIssueMessage:"",sceneContent:""},s={desc_intro:"",desc_privacy:"",button_startSession:"",button_stopSession:"",desc_inProgressIntro:"",desc_shareLink:"",desc_exitSession:"",shareTitle:""},d={title:""},c={disk_title:"",disk_details:"",disk_button:"",link_title:"",link_details:"",link_button:"",excalidrawplus_description:"",excalidrawplus_button:"",excalidrawplus_exportError:""},B={blog:"",click:"",deepSelect:"",deepBoxSelect:"",curvedArrow:"",curvedLine:"",documentation:"",doubleClick:"",drag:"",editor:"",editLineArrowPoints:"",editText:"",github:"",howto:"",or:"",preventBinding:"",tools:"",shortcuts:"",textFinish:"",textNewLine:"",title:"",view:"",zoomToFit:"",zoomToSelection:"",toggleElementLock:"",movePageUpDown:"",movePageLeftRight:""},m={title:""},p={title:"",itemName:"",authorName:"",githubUsername:"",twitterUsername:"",libraryName:"",libraryDesc:"",website:"",placeholder:{authorName:"",libraryName:"",libraryDesc:"",githubHandle:"",twitterHandle:"",website:""},errors:{required:"",website:""},noteDescription:"",noteGuidelines:"",noteLicense:"",noteItems:"",atleastOneLibItem:"",republishWarning:""},g={title:"",content:""},b={resetLibrary:"",removeItemsFromLib:""},A={header:"",label:{withBackground:"",onlySelected:"",darkMode:"",embedScene:"",scale:"",padding:""},tooltip:{embedScene:""},title:{exportToPng:"",exportToSvg:"",copyPngToClipboard:""},button:{exportToPng:"",exportToSvg:"",copyPngToClipboard:""}},C={tooltip:"",link:""},h={angle:"",element:"",elements:"",height:"",scene:"",selected:"",storage:"",title:"",total:"",version:"",versionCopy:"",versionNotAvailable:"",width:""},y={addedToLibrary:"",copyStyles:"",copyToClipboard:"",copyToClipboardAsPng:"",fileSaved:"",fileSavedToFilename:"",canvas:"",selection:"",pasteAsSingleElement:"",unableToEmbed:"",unrecognizedLinkFormat:""},v={transparent:"",black:"",white:"",red:"",pink:"",grape:"",violet:"",gray:"",blue:"",cyan:"",teal:"",green:"",yellow:"",orange:"",bronze:""},S={app:{center_heading:"",center_heading_plus:"",menuHint:""},defaults:{menuHint:"",center_heading:"",toolbarHint:"",helpHint:""}},w={mostUsedCustomColors:"",colors:"",shades:"",hexCode:"",noShades:""},F={action:{exportToImage:{title:"",button:"",description:""},saveToDisk:{title:"",button:"",description:""},excalidrawPlus:{title:"",button:"",description:""}},modal:{loadFromFile:{title:"",button:"",description:""},shareableLink:{title:"",button:"",description:""}}},k={title:"",button:"",description:"",syntax:"",preview:""},T={labels:e,library:o,buttons:r,alerts:t,errors:a,toolBar:D,headings:u,hints:i,canvasError:l,errorSplash:n,roomDialog:s,errorDialog:d,exportDialog:c,helpDialog:B,clearCanvasDialog:m,publishDialog:p,publishSuccessDialog:g,confirmDialog:b,imageExportDialog:A,encrypted:C,stats:h,toast:y,colors:v,welcomeScreen:S,colorPicker:w,overwriteConfirm:F,mermaid:k};exports.alerts=t;exports.buttons=r;exports.canvasError=l;exports.clearCanvasDialog=m;exports.colorPicker=w;exports.colors=v;exports.confirmDialog=b;exports.default=T;exports.encrypted=C;exports.errorDialog=d;exports.errorSplash=n;exports.errors=a;exports.exportDialog=c;exports.headings=u;exports.helpDialog=B;exports.hints=i;exports.imageExportDialog=A;exports.labels=e;exports.library=o;exports.mermaid=k;exports.overwriteConfirm=F;exports.publishDialog=p;exports.publishSuccessDialog=g;exports.roomDialog=s;exports.stats=h;exports.toast=y;exports.toolBar=D;exports.welcomeScreen=S;
|
package/dist/layers.C4Z2eV4H.js
DELETED
|
@@ -1,437 +0,0 @@
|
|
|
1
|
-
import { a7 as z, a8 as F, a9 as j, aa as U, l as g, g as S, d as $, u as H, Y as K, _ as A, $ as E, a0 as L, V, j as P, t as W } from "./layers.Dwrpihyi.js";
|
|
2
|
-
import * as G from "lodash-es";
|
|
3
|
-
import { G as X } from "./layers.C7lIplJU.js";
|
|
4
|
-
import { r as Y } from "./layers.C7md-mpb.js";
|
|
5
|
-
import { c as J } from "./layers.Bxx3QiqH.js";
|
|
6
|
-
function Q(e) {
|
|
7
|
-
return typeof e == "string" ? new z([document.querySelectorAll(e)], [document.documentElement]) : new z([j(e)], F);
|
|
8
|
-
}
|
|
9
|
-
function de(e, l) {
|
|
10
|
-
return !!e.children(l).length;
|
|
11
|
-
}
|
|
12
|
-
function pe(e) {
|
|
13
|
-
return N(e.v) + ":" + N(e.w) + ":" + N(e.name);
|
|
14
|
-
}
|
|
15
|
-
var Z = /:/g;
|
|
16
|
-
function N(e) {
|
|
17
|
-
return e ? String(e).replace(Z, "\\:") : "";
|
|
18
|
-
}
|
|
19
|
-
function O(e, l) {
|
|
20
|
-
l && e.attr("style", l);
|
|
21
|
-
}
|
|
22
|
-
function be(e, l, c) {
|
|
23
|
-
l && e.attr("class", l).attr("class", c + " " + e.attr("class"));
|
|
24
|
-
}
|
|
25
|
-
function fe(e, l) {
|
|
26
|
-
var c = l.graph();
|
|
27
|
-
if (G.isPlainObject(c)) {
|
|
28
|
-
var a = c.transition;
|
|
29
|
-
if (G.isFunction(a))
|
|
30
|
-
return a(e);
|
|
31
|
-
}
|
|
32
|
-
return e;
|
|
33
|
-
}
|
|
34
|
-
function ee(e, l) {
|
|
35
|
-
var c = e.append("foreignObject").attr("width", "100000"), a = c.append("xhtml:div");
|
|
36
|
-
a.attr("xmlns", "http://www.w3.org/1999/xhtml");
|
|
37
|
-
var i = l.label;
|
|
38
|
-
switch (typeof i) {
|
|
39
|
-
case "function":
|
|
40
|
-
a.insert(i);
|
|
41
|
-
break;
|
|
42
|
-
case "object":
|
|
43
|
-
a.insert(function() {
|
|
44
|
-
return i;
|
|
45
|
-
});
|
|
46
|
-
break;
|
|
47
|
-
default:
|
|
48
|
-
a.html(i);
|
|
49
|
-
}
|
|
50
|
-
O(a, l.labelStyle), a.style("display", "inline-block"), a.style("white-space", "nowrap");
|
|
51
|
-
var d = a.node().getBoundingClientRect();
|
|
52
|
-
return c.attr("width", d.width).attr("height", d.height), c;
|
|
53
|
-
}
|
|
54
|
-
const q = {}, te = function(e) {
|
|
55
|
-
const l = Object.keys(e);
|
|
56
|
-
for (const c of l)
|
|
57
|
-
q[c] = e[c];
|
|
58
|
-
}, M = async function(e, l, c, a, i, d) {
|
|
59
|
-
const u = a.select(`[id="${c}"]`), n = Object.keys(e);
|
|
60
|
-
for (const p of n) {
|
|
61
|
-
const r = e[p];
|
|
62
|
-
let y = "default";
|
|
63
|
-
r.classes.length > 0 && (y = r.classes.join(" ")), y = y + " flowchart-label";
|
|
64
|
-
const w = A(r.styles);
|
|
65
|
-
let t = r.text !== void 0 ? r.text : r.id, s;
|
|
66
|
-
if (g.info("vertex", r, r.labelType), r.labelType === "markdown")
|
|
67
|
-
g.info("vertex", r, r.labelType);
|
|
68
|
-
else if (W(S().flowchart.htmlLabels))
|
|
69
|
-
s = ee(u, {
|
|
70
|
-
label: t
|
|
71
|
-
}).node(), s.parentNode.removeChild(s);
|
|
72
|
-
else {
|
|
73
|
-
const k = i.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
74
|
-
k.setAttribute("style", w.labelStyle.replace("color:", "fill:"));
|
|
75
|
-
const _ = t.split(P.lineBreakRegex);
|
|
76
|
-
for (const C of _) {
|
|
77
|
-
const v = i.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
|
78
|
-
v.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), v.setAttribute("dy", "1em"), v.setAttribute("x", "1"), v.textContent = C, k.appendChild(v);
|
|
79
|
-
}
|
|
80
|
-
s = k;
|
|
81
|
-
}
|
|
82
|
-
let b = 0, o = "";
|
|
83
|
-
switch (r.type) {
|
|
84
|
-
case "round":
|
|
85
|
-
b = 5, o = "rect";
|
|
86
|
-
break;
|
|
87
|
-
case "square":
|
|
88
|
-
o = "rect";
|
|
89
|
-
break;
|
|
90
|
-
case "diamond":
|
|
91
|
-
o = "question";
|
|
92
|
-
break;
|
|
93
|
-
case "hexagon":
|
|
94
|
-
o = "hexagon";
|
|
95
|
-
break;
|
|
96
|
-
case "odd":
|
|
97
|
-
o = "rect_left_inv_arrow";
|
|
98
|
-
break;
|
|
99
|
-
case "lean_right":
|
|
100
|
-
o = "lean_right";
|
|
101
|
-
break;
|
|
102
|
-
case "lean_left":
|
|
103
|
-
o = "lean_left";
|
|
104
|
-
break;
|
|
105
|
-
case "trapezoid":
|
|
106
|
-
o = "trapezoid";
|
|
107
|
-
break;
|
|
108
|
-
case "inv_trapezoid":
|
|
109
|
-
o = "inv_trapezoid";
|
|
110
|
-
break;
|
|
111
|
-
case "odd_right":
|
|
112
|
-
o = "rect_left_inv_arrow";
|
|
113
|
-
break;
|
|
114
|
-
case "circle":
|
|
115
|
-
o = "circle";
|
|
116
|
-
break;
|
|
117
|
-
case "ellipse":
|
|
118
|
-
o = "ellipse";
|
|
119
|
-
break;
|
|
120
|
-
case "stadium":
|
|
121
|
-
o = "stadium";
|
|
122
|
-
break;
|
|
123
|
-
case "subroutine":
|
|
124
|
-
o = "subroutine";
|
|
125
|
-
break;
|
|
126
|
-
case "cylinder":
|
|
127
|
-
o = "cylinder";
|
|
128
|
-
break;
|
|
129
|
-
case "group":
|
|
130
|
-
o = "rect";
|
|
131
|
-
break;
|
|
132
|
-
case "doublecircle":
|
|
133
|
-
o = "doublecircle";
|
|
134
|
-
break;
|
|
135
|
-
default:
|
|
136
|
-
o = "rect";
|
|
137
|
-
}
|
|
138
|
-
const T = await V(t, S());
|
|
139
|
-
l.setNode(r.id, {
|
|
140
|
-
labelStyle: w.labelStyle,
|
|
141
|
-
shape: o,
|
|
142
|
-
labelText: T,
|
|
143
|
-
labelType: r.labelType,
|
|
144
|
-
rx: b,
|
|
145
|
-
ry: b,
|
|
146
|
-
class: y,
|
|
147
|
-
style: w.style,
|
|
148
|
-
id: r.id,
|
|
149
|
-
link: r.link,
|
|
150
|
-
linkTarget: r.linkTarget,
|
|
151
|
-
tooltip: d.db.getTooltip(r.id) || "",
|
|
152
|
-
domId: d.db.lookUpDomId(r.id),
|
|
153
|
-
haveCallback: r.haveCallback,
|
|
154
|
-
width: r.type === "group" ? 500 : void 0,
|
|
155
|
-
dir: r.dir,
|
|
156
|
-
type: r.type,
|
|
157
|
-
props: r.props,
|
|
158
|
-
padding: S().flowchart.padding
|
|
159
|
-
}), g.info("setNode", {
|
|
160
|
-
labelStyle: w.labelStyle,
|
|
161
|
-
labelType: r.labelType,
|
|
162
|
-
shape: o,
|
|
163
|
-
labelText: T,
|
|
164
|
-
rx: b,
|
|
165
|
-
ry: b,
|
|
166
|
-
class: y,
|
|
167
|
-
style: w.style,
|
|
168
|
-
id: r.id,
|
|
169
|
-
domId: d.db.lookUpDomId(r.id),
|
|
170
|
-
width: r.type === "group" ? 500 : void 0,
|
|
171
|
-
type: r.type,
|
|
172
|
-
dir: r.dir,
|
|
173
|
-
props: r.props,
|
|
174
|
-
padding: S().flowchart.padding
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
}, R = async function(e, l, c) {
|
|
178
|
-
g.info("abc78 edges = ", e);
|
|
179
|
-
let a = 0, i = {}, d, u;
|
|
180
|
-
if (e.defaultStyle !== void 0) {
|
|
181
|
-
const n = A(e.defaultStyle);
|
|
182
|
-
d = n.style, u = n.labelStyle;
|
|
183
|
-
}
|
|
184
|
-
for (const n of e) {
|
|
185
|
-
a++;
|
|
186
|
-
const p = "L-" + n.start + "-" + n.end;
|
|
187
|
-
i[p] === void 0 ? (i[p] = 0, g.info("abc78 new entry", p, i[p])) : (i[p]++, g.info("abc78 new entry", p, i[p]));
|
|
188
|
-
let r = p + "-" + i[p];
|
|
189
|
-
g.info("abc78 new link id to be used is", p, r, i[p]);
|
|
190
|
-
const y = "LS-" + n.start, w = "LE-" + n.end, t = { style: "", labelStyle: "" };
|
|
191
|
-
switch (t.minlen = n.length || 1, n.type === "arrow_open" ? t.arrowhead = "none" : t.arrowhead = "normal", t.arrowTypeStart = "arrow_open", t.arrowTypeEnd = "arrow_open", n.type) {
|
|
192
|
-
case "double_arrow_cross":
|
|
193
|
-
t.arrowTypeStart = "arrow_cross";
|
|
194
|
-
case "arrow_cross":
|
|
195
|
-
t.arrowTypeEnd = "arrow_cross";
|
|
196
|
-
break;
|
|
197
|
-
case "double_arrow_point":
|
|
198
|
-
t.arrowTypeStart = "arrow_point";
|
|
199
|
-
case "arrow_point":
|
|
200
|
-
t.arrowTypeEnd = "arrow_point";
|
|
201
|
-
break;
|
|
202
|
-
case "double_arrow_circle":
|
|
203
|
-
t.arrowTypeStart = "arrow_circle";
|
|
204
|
-
case "arrow_circle":
|
|
205
|
-
t.arrowTypeEnd = "arrow_circle";
|
|
206
|
-
break;
|
|
207
|
-
}
|
|
208
|
-
let s = "", b = "";
|
|
209
|
-
switch (n.stroke) {
|
|
210
|
-
case "normal":
|
|
211
|
-
s = "fill:none;", d !== void 0 && (s = d), u !== void 0 && (b = u), t.thickness = "normal", t.pattern = "solid";
|
|
212
|
-
break;
|
|
213
|
-
case "dotted":
|
|
214
|
-
t.thickness = "normal", t.pattern = "dotted", t.style = "fill:none;stroke-width:2px;stroke-dasharray:3;";
|
|
215
|
-
break;
|
|
216
|
-
case "thick":
|
|
217
|
-
t.thickness = "thick", t.pattern = "solid", t.style = "stroke-width: 3.5px;fill:none;";
|
|
218
|
-
break;
|
|
219
|
-
case "invisible":
|
|
220
|
-
t.thickness = "invisible", t.pattern = "solid", t.style = "stroke-width: 0;fill:none;";
|
|
221
|
-
break;
|
|
222
|
-
}
|
|
223
|
-
if (n.style !== void 0) {
|
|
224
|
-
const o = A(n.style);
|
|
225
|
-
s = o.style, b = o.labelStyle;
|
|
226
|
-
}
|
|
227
|
-
t.style = t.style += s, t.labelStyle = t.labelStyle += b, n.interpolate !== void 0 ? t.curve = E(n.interpolate, L) : e.defaultInterpolate !== void 0 ? t.curve = E(e.defaultInterpolate, L) : t.curve = E(q.curve, L), n.text === void 0 ? n.style !== void 0 && (t.arrowheadStyle = "fill: #333") : (t.arrowheadStyle = "fill: #333", t.labelpos = "c"), t.labelType = n.labelType, t.label = await V(
|
|
228
|
-
n.text.replace(P.lineBreakRegex, `
|
|
229
|
-
`),
|
|
230
|
-
S()
|
|
231
|
-
), n.style === void 0 && (t.style = t.style || "stroke: #333; stroke-width: 1.5px;fill:none;"), t.labelStyle = t.labelStyle.replace("color:", "fill:"), t.id = r, t.classes = "flowchart-link " + y + " " + w, l.setEdge(n.start, n.end, t, a);
|
|
232
|
-
}
|
|
233
|
-
}, re = function(e, l) {
|
|
234
|
-
return l.db.getClasses();
|
|
235
|
-
}, le = async function(e, l, c, a) {
|
|
236
|
-
g.info("Drawing flowchart");
|
|
237
|
-
let i = a.db.getDirection();
|
|
238
|
-
i === void 0 && (i = "TD");
|
|
239
|
-
const { securityLevel: d, flowchart: u } = S(), n = u.nodeSpacing || 50, p = u.rankSpacing || 50;
|
|
240
|
-
let r;
|
|
241
|
-
d === "sandbox" && (r = $("#i" + l));
|
|
242
|
-
const y = d === "sandbox" ? $(r.nodes()[0].contentDocument.body) : $("body"), w = d === "sandbox" ? r.nodes()[0].contentDocument : document, t = new X({
|
|
243
|
-
multigraph: !0,
|
|
244
|
-
compound: !0
|
|
245
|
-
}).setGraph({
|
|
246
|
-
rankdir: i,
|
|
247
|
-
nodesep: n,
|
|
248
|
-
ranksep: p,
|
|
249
|
-
marginx: 0,
|
|
250
|
-
marginy: 0
|
|
251
|
-
}).setDefaultEdgeLabel(function() {
|
|
252
|
-
return {};
|
|
253
|
-
});
|
|
254
|
-
let s;
|
|
255
|
-
const b = a.db.getSubGraphs();
|
|
256
|
-
g.info("Subgraphs - ", b);
|
|
257
|
-
for (let f = b.length - 1; f >= 0; f--)
|
|
258
|
-
s = b[f], g.info("Subgraph - ", s), a.db.addVertex(
|
|
259
|
-
s.id,
|
|
260
|
-
{ text: s.title, type: s.labelType },
|
|
261
|
-
"group",
|
|
262
|
-
void 0,
|
|
263
|
-
s.classes,
|
|
264
|
-
s.dir
|
|
265
|
-
);
|
|
266
|
-
const o = a.db.getVertices(), T = a.db.getEdges();
|
|
267
|
-
g.info("Edges", T);
|
|
268
|
-
let k = 0;
|
|
269
|
-
for (k = b.length - 1; k >= 0; k--) {
|
|
270
|
-
s = b[k], Q("cluster").append("text");
|
|
271
|
-
for (let f = 0; f < s.nodes.length; f++)
|
|
272
|
-
g.info("Setting up subgraphs", s.nodes[f], s.id), t.setParent(s.nodes[f], s.id);
|
|
273
|
-
}
|
|
274
|
-
await M(o, t, l, y, w, a), await R(T, t);
|
|
275
|
-
const _ = y.select(`[id="${l}"]`), C = y.select("#" + l + " g");
|
|
276
|
-
if (await Y(C, t, ["point", "circle", "cross"], "flowchart", l), H.insertTitle(_, "flowchartTitleText", u.titleTopMargin, a.db.getDiagramTitle()), K(t, _, u.diagramPadding, u.useMaxWidth), a.db.indexNodes("subGraph" + k), !u.htmlLabels) {
|
|
277
|
-
const f = w.querySelectorAll('[id="' + l + '"] .edgeLabel .label');
|
|
278
|
-
for (const x of f) {
|
|
279
|
-
const m = x.getBBox(), h = w.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
280
|
-
h.setAttribute("rx", 0), h.setAttribute("ry", 0), h.setAttribute("width", m.width), h.setAttribute("height", m.height), x.insertBefore(h, x.firstChild);
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
Object.keys(o).forEach(function(f) {
|
|
284
|
-
const x = o[f];
|
|
285
|
-
if (x.link) {
|
|
286
|
-
const m = $("#" + l + ' [id="' + f + '"]');
|
|
287
|
-
if (m) {
|
|
288
|
-
const h = w.createElementNS("http://www.w3.org/2000/svg", "a");
|
|
289
|
-
h.setAttributeNS("http://www.w3.org/2000/svg", "class", x.classes.join(" ")), h.setAttributeNS("http://www.w3.org/2000/svg", "href", x.link), h.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"), d === "sandbox" ? h.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top") : x.linkTarget && h.setAttributeNS("http://www.w3.org/2000/svg", "target", x.linkTarget);
|
|
290
|
-
const B = m.insert(function() {
|
|
291
|
-
return h;
|
|
292
|
-
}, ":first-child"), I = m.select(".label-container");
|
|
293
|
-
I && B.append(function() {
|
|
294
|
-
return I.node();
|
|
295
|
-
});
|
|
296
|
-
const D = m.select(".label");
|
|
297
|
-
D && B.append(function() {
|
|
298
|
-
return D.node();
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
});
|
|
303
|
-
}, ue = {
|
|
304
|
-
setConf: te,
|
|
305
|
-
addVertices: M,
|
|
306
|
-
addEdges: R,
|
|
307
|
-
getClasses: re,
|
|
308
|
-
draw: le
|
|
309
|
-
}, ae = (e, l) => {
|
|
310
|
-
const c = J, a = c(e, "r"), i = c(e, "g"), d = c(e, "b");
|
|
311
|
-
return U(a, i, d, l);
|
|
312
|
-
}, oe = (e) => `.label {
|
|
313
|
-
font-family: ${e.fontFamily};
|
|
314
|
-
color: ${e.nodeTextColor || e.textColor};
|
|
315
|
-
}
|
|
316
|
-
.cluster-label text {
|
|
317
|
-
fill: ${e.titleColor};
|
|
318
|
-
}
|
|
319
|
-
.cluster-label span,p {
|
|
320
|
-
color: ${e.titleColor};
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
.label text,span,p {
|
|
324
|
-
fill: ${e.nodeTextColor || e.textColor};
|
|
325
|
-
color: ${e.nodeTextColor || e.textColor};
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
.node rect,
|
|
329
|
-
.node circle,
|
|
330
|
-
.node ellipse,
|
|
331
|
-
.node polygon,
|
|
332
|
-
.node path {
|
|
333
|
-
fill: ${e.mainBkg};
|
|
334
|
-
stroke: ${e.nodeBorder};
|
|
335
|
-
stroke-width: 1px;
|
|
336
|
-
}
|
|
337
|
-
.flowchart-label text {
|
|
338
|
-
text-anchor: middle;
|
|
339
|
-
}
|
|
340
|
-
// .flowchart-label .text-outer-tspan {
|
|
341
|
-
// text-anchor: middle;
|
|
342
|
-
// }
|
|
343
|
-
// .flowchart-label .text-inner-tspan {
|
|
344
|
-
// text-anchor: start;
|
|
345
|
-
// }
|
|
346
|
-
|
|
347
|
-
.node .katex path {
|
|
348
|
-
fill: #000;
|
|
349
|
-
stroke: #000;
|
|
350
|
-
stroke-width: 1px;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
.node .label {
|
|
354
|
-
text-align: center;
|
|
355
|
-
}
|
|
356
|
-
.node.clickable {
|
|
357
|
-
cursor: pointer;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
.arrowheadPath {
|
|
361
|
-
fill: ${e.arrowheadColor};
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
.edgePath .path {
|
|
365
|
-
stroke: ${e.lineColor};
|
|
366
|
-
stroke-width: 2.0px;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
.flowchart-link {
|
|
370
|
-
stroke: ${e.lineColor};
|
|
371
|
-
fill: none;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
.edgeLabel {
|
|
375
|
-
background-color: ${e.edgeLabelBackground};
|
|
376
|
-
rect {
|
|
377
|
-
opacity: 0.5;
|
|
378
|
-
background-color: ${e.edgeLabelBackground};
|
|
379
|
-
fill: ${e.edgeLabelBackground};
|
|
380
|
-
}
|
|
381
|
-
text-align: center;
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
/* For html labels only */
|
|
385
|
-
.labelBkg {
|
|
386
|
-
background-color: ${ae(e.edgeLabelBackground, 0.5)};
|
|
387
|
-
// background-color:
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
.cluster rect {
|
|
391
|
-
fill: ${e.clusterBkg};
|
|
392
|
-
stroke: ${e.clusterBorder};
|
|
393
|
-
stroke-width: 1px;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
.cluster text {
|
|
397
|
-
fill: ${e.titleColor};
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
.cluster span,p {
|
|
401
|
-
color: ${e.titleColor};
|
|
402
|
-
}
|
|
403
|
-
/* .cluster div {
|
|
404
|
-
color: ${e.titleColor};
|
|
405
|
-
} */
|
|
406
|
-
|
|
407
|
-
div.mermaidTooltip {
|
|
408
|
-
position: absolute;
|
|
409
|
-
text-align: center;
|
|
410
|
-
max-width: 200px;
|
|
411
|
-
padding: 2px;
|
|
412
|
-
font-family: ${e.fontFamily};
|
|
413
|
-
font-size: 12px;
|
|
414
|
-
background: ${e.tertiaryColor};
|
|
415
|
-
border: 1px solid ${e.border2};
|
|
416
|
-
border-radius: 2px;
|
|
417
|
-
pointer-events: none;
|
|
418
|
-
z-index: 100;
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
.flowchartTitleText {
|
|
422
|
-
text-anchor: middle;
|
|
423
|
-
font-size: 18px;
|
|
424
|
-
fill: ${e.textColor};
|
|
425
|
-
}
|
|
426
|
-
`, we = oe;
|
|
427
|
-
export {
|
|
428
|
-
ue as a,
|
|
429
|
-
O as b,
|
|
430
|
-
ee as c,
|
|
431
|
-
fe as d,
|
|
432
|
-
pe as e,
|
|
433
|
-
we as f,
|
|
434
|
-
be as g,
|
|
435
|
-
de as i,
|
|
436
|
-
Q as s
|
|
437
|
-
};
|