@layers-app/editor 0.7.17 → 0.7.18
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/index.cjs +2 -2
- package/dist/index.js +3 -3
- package/dist/layers.94hwidA2.js +198 -0
- package/dist/layers.B4l6ta1Q.js +1 -0
- package/dist/{layers.DfazY_Pm.js → layers.BMrOAD_P.js} +1 -1
- package/dist/{layers.C35KTUy2.js → layers.D99OBX9u.js} +8 -8
- package/dist/{layers.B3S_Iz7U.js → layers.DOzLBYZr.js} +31 -31
- package/dist/layers.YRyXopy_.js +151 -0
- package/dist/{layers.BlQ-fVEN.js → layers.usKC_Id5.js} +1 -1
- package/dist/{layers.CNTFg_PV.js → layers.zu-IYGYU.js} +12483 -13053
- package/package.json +24 -23
- package/dist/layers.04n4wbqY.js +0 -40
- package/dist/layers.0AjqeHO0.js +0 -52
- package/dist/layers.0YKivPbS.js +0 -40
- package/dist/layers.0ay1od4k.js +0 -41
- package/dist/layers.0cCD7Trw.js +0 -10
- package/dist/layers.192DYlty.js +0 -8
- package/dist/layers.1ws9_bfy.js +0 -1
- package/dist/layers.3NAUDSdp.js +0 -1
- package/dist/layers.41VWy-aG.js +0 -33
- package/dist/layers.52famHy6.js +0 -1
- package/dist/layers.5QVC7kU0.js +0 -1
- package/dist/layers.6IpHt_7d.js +0 -32
- package/dist/layers.7JqFgE4-.js +0 -15
- package/dist/layers.8CQh8R7p.js +0 -1
- package/dist/layers.9iKrwzo8.js +0 -32
- package/dist/layers.9p0T4nVw.js +0 -1
- package/dist/layers.9pNaFvaX.js +0 -1
- package/dist/layers.B19hGmey.js +0 -1
- package/dist/layers.B1auaUb-.js +0 -40
- package/dist/layers.B37cfkOz.js +0 -32
- package/dist/layers.B3D4g2HH.js +0 -1
- package/dist/layers.B5XF9q_I.js +0 -40
- package/dist/layers.B6hh7kZl.js +0 -6
- package/dist/layers.B7K7JjK6.js +0 -1510
- package/dist/layers.B7rTjLeq.js +0 -208
- package/dist/layers.B8_yUZ0B.js +0 -207
- package/dist/layers.B9JA0HLK.js +0 -2966
- package/dist/layers.BABmXbhN.js +0 -1088
- package/dist/layers.BAtv1CM7.js +0 -1
- package/dist/layers.BCWekfj1.js +0 -38
- package/dist/layers.BDhkw0hD.js +0 -2479
- package/dist/layers.BEm0EevB.js +0 -295
- package/dist/layers.BFOGMUuA.js +0 -8
- package/dist/layers.BFc__DH6.js +0 -6
- package/dist/layers.BGTnvNP0.js +0 -10
- package/dist/layers.BGdwpbmj.js +0 -32
- package/dist/layers.BGrn4rLd.js +0 -1
- package/dist/layers.BHgpnpIV.js +0 -320
- package/dist/layers.BIeVwYKL.js +0 -1
- package/dist/layers.BIwMjJXk.js +0 -1
- package/dist/layers.BJ0kBYXi.js +0 -41
- package/dist/layers.BJDrjORS.js +0 -244
- package/dist/layers.BK0gUtws.js +0 -9
- package/dist/layers.BLd2spTm.js +0 -1
- package/dist/layers.BMyOFpSB.js +0 -9
- package/dist/layers.BO1-27wB.js +0 -1
- package/dist/layers.BO54hyIV.js +0 -10
- package/dist/layers.BOUezSTL.js +0 -41
- package/dist/layers.BP0j0dgn.js +0 -7
- package/dist/layers.BPc2aeAC.js +0 -6
- package/dist/layers.BRrrKVX0.js +0 -51
- package/dist/layers.BRw0W8BA.js +0 -14
- package/dist/layers.BSTBZrFn.js +0 -1
- package/dist/layers.BSUQkbOc.js +0 -42
- package/dist/layers.BUA_HqY5.js +0 -13
- package/dist/layers.BVcL_n_M.js +0 -268
- package/dist/layers.BWePEr40.js +0 -1126
- package/dist/layers.BXcsZWke.js +0 -1
- package/dist/layers.BZfVYPU5.js +0 -1
- package/dist/layers.BbCfEXyj.js +0 -55
- package/dist/layers.BbJS6RnG.js +0 -35
- package/dist/layers.BbVq4Peg.js +0 -39
- package/dist/layers.BbXyLjxZ.js +0 -42
- package/dist/layers.Be1uXPSh.js +0 -9
- package/dist/layers.BeACRp58.js +0 -4
- package/dist/layers.Ben_68X-.js +0 -33
- package/dist/layers.BfaQveOZ.js +0 -198
- package/dist/layers.BgJtKoXK.js +0 -160
- package/dist/layers.BifTQ-Px.js +0 -32
- package/dist/layers.BjN6TTXp.js +0 -11
- package/dist/layers.BjkK2efb.js +0 -7
- package/dist/layers.BlHp_VrY.js +0 -3
- package/dist/layers.Blc7rw4s.js +0 -6
- package/dist/layers.Bnsmp92P.js +0 -11
- package/dist/layers.BpilXLfW.js +0 -6
- package/dist/layers.BqqCs8jG.js +0 -96
- package/dist/layers.BsmgPu7t.js +0 -42
- package/dist/layers.Bt7tcN4s.js +0 -6
- package/dist/layers.Btzp1z-r.js +0 -36
- package/dist/layers.BwTFFS1L.js +0 -8
- package/dist/layers.Bx3h2n9l.js +0 -39
- package/dist/layers.BxM1KZfC.js +0 -61
- package/dist/layers.BxM9-XMl.js +0 -9
- package/dist/layers.C0J8aakp.js +0 -5
- package/dist/layers.C0rSyLVd.js +0 -9
- package/dist/layers.C2Ghtbvc.js +0 -8
- package/dist/layers.C2jhvzOq.js +0 -21620
- package/dist/layers.C39A_3mH.js +0 -8
- package/dist/layers.C5BRzalR.js +0 -38
- package/dist/layers.C5Fx7NyW.js +0 -39
- package/dist/layers.C5hEmFnZ.js +0 -40
- package/dist/layers.C6s-F8xr.js +0 -7
- package/dist/layers.C7FVdo84.js +0 -37
- package/dist/layers.C7dJDI3p.js +0 -10
- package/dist/layers.C89PpG1h.js +0 -769
- package/dist/layers.C8_lu5UH.js +0 -23
- package/dist/layers.CAn91HUr.js +0 -7
- package/dist/layers.CDyM6rfz.js +0 -1619
- package/dist/layers.CG5E1s6L.js +0 -5
- package/dist/layers.CH6vY6nz.js +0 -793
- package/dist/layers.CHZsXQcr.js +0 -1
- package/dist/layers.CI8n-mXC.js +0 -8
- package/dist/layers.CIIPaPYQ.js +0 -37
- package/dist/layers.CJjfGFRn.js +0 -7
- package/dist/layers.CLyrFyTt.js +0 -7
- package/dist/layers.COxTigDs.js +0 -1359
- package/dist/layers.CPPTxpTa.js +0 -198
- package/dist/layers.CQw2c-FF.js +0 -1
- package/dist/layers.CS_v9If4.js +0 -118
- package/dist/layers.CTEInOdX.js +0 -41
- package/dist/layers.CTzj-R3i.js +0 -41
- package/dist/layers.CULMlCQg.js +0 -1580
- package/dist/layers.CWVWuX-h.js +0 -802
- package/dist/layers.CWetNlAM.js +0 -186
- package/dist/layers.CZLAcdMj.js +0 -960
- package/dist/layers.CZcNOn_g.js +0 -5
- package/dist/layers.C_IvrzZ3.js +0 -7
- package/dist/layers.C_gG9xio.js +0 -36
- package/dist/layers.CagLZWJV.js +0 -36
- package/dist/layers.CcQRJhOy.js +0 -10
- package/dist/layers.CdI08cP2.js +0 -37
- package/dist/layers.CfGn3EEn.js +0 -11
- package/dist/layers.CfTomFD-.js +0 -74
- package/dist/layers.Ci-h8bbt.js +0 -36
- package/dist/layers.CiOE4x64.js +0 -42
- package/dist/layers.CjDmXlbI.js +0 -32
- package/dist/layers.CkvEBALf.js +0 -1
- package/dist/layers.ClbtOgXD.js +0 -1
- package/dist/layers.CmMJ2vrz.js +0 -40
- package/dist/layers.CoHrmJZb.js +0 -1
- package/dist/layers.CqOjrhqg.js +0 -34
- package/dist/layers.CqVTtuYm.js +0 -6
- package/dist/layers.Cq_SVM9v.js +0 -2
- package/dist/layers.CtBDhkfE.js +0 -2
- package/dist/layers.Cvcaleoh.js +0 -425
- package/dist/layers.Cx1Gq9Dp.js +0 -10
- package/dist/layers.CxhBPjuM.js +0 -257
- package/dist/layers.CxzexeO2.js +0 -41
- package/dist/layers.Cyiby-Np.js +0 -4
- package/dist/layers.Cyzu9PKQ.js +0 -1
- package/dist/layers.CzPTBQLq.js +0 -7
- package/dist/layers.D-Jn2ZYp.js +0 -202
- package/dist/layers.D0zn4_Mx.js +0 -1
- package/dist/layers.D3f2mUJi.js +0 -904
- package/dist/layers.D3lMBPw_.js +0 -44
- package/dist/layers.D4HzIdc6.js +0 -116
- package/dist/layers.D4T8fTcj.js +0 -1223
- package/dist/layers.D66jwaU4.js +0 -39
- package/dist/layers.D7ZMXlyX.js +0 -423
- package/dist/layers.D7jGxypv.js +0 -8
- package/dist/layers.D8q3-pj1.js +0 -40
- package/dist/layers.D9YR6XE8.js +0 -437
- package/dist/layers.D9jdGpJr.js +0 -8
- package/dist/layers.DAl7I5u0.js +0 -39
- package/dist/layers.DGi30IzW.js +0 -6
- package/dist/layers.DJF9fzWp.js +0 -9
- package/dist/layers.DLwuMfdd.js +0 -84
- package/dist/layers.DMkBISW1.js +0 -1
- package/dist/layers.DN7zqtdR.js +0 -803
- package/dist/layers.DN9HoVxI.js +0 -18
- package/dist/layers.DODiJHd5.js +0 -8
- package/dist/layers.DOrgOHBr.js +0 -1
- package/dist/layers.DPgcx12Q.js +0 -1
- package/dist/layers.DPiZNyNm.js +0 -9166
- package/dist/layers.DQhlH0a7.js +0 -501
- package/dist/layers.DTik-pik.js +0 -11
- package/dist/layers.DVrOalPV.js +0 -7
- package/dist/layers.DWaBBiuP.js +0 -19
- package/dist/layers.DZkaq_lv.js +0 -1265
- package/dist/layers.DacVDKlC.js +0 -9
- package/dist/layers.DbaKVP5e.js +0 -1
- package/dist/layers.DgCULOvY.js +0 -40
- package/dist/layers.DgjixQuR.js +0 -84
- package/dist/layers.DhtGL7-o.js +0 -39
- package/dist/layers.DjUOC4st.js +0 -16
- package/dist/layers.DjYl24mJ.js +0 -40
- package/dist/layers.DkUY5uNV.js +0 -1
- package/dist/layers.DouGTsMz.js +0 -9
- package/dist/layers.Dq2XAyOc.js +0 -139
- package/dist/layers.DqL7bG3g.js +0 -41
- package/dist/layers.DrYzFfW_.js +0 -139
- package/dist/layers.DrdslLaU.js +0 -10
- package/dist/layers.Ds9-wuCp.js +0 -10
- package/dist/layers.DsLySzfR.js +0 -8
- package/dist/layers.DsXVRfSf.js +0 -41
- package/dist/layers.DtYnjrXZ.js +0 -8
- package/dist/layers.Dtg6Vr-6.js +0 -39
- package/dist/layers.DuwOgI-l.js +0 -40
- package/dist/layers.DwXNFr-I.js +0 -35
- package/dist/layers.DxA6ocdw.js +0 -70
- package/dist/layers.Dy1naDTQ.js +0 -14
- package/dist/layers.Ev3O6tfW.js +0 -1
- package/dist/layers.GRwBofUp.js +0 -37
- package/dist/layers.HAyebP5S.js +0 -791
- package/dist/layers.J8v8A5JD.js +0 -35
- package/dist/layers.JWCLFILJ.js +0 -1
- package/dist/layers.MerAdE1w.js +0 -39
- package/dist/layers.OE83Ve6T.js +0 -5
- package/dist/layers.P6mLQhtB.js +0 -42
- package/dist/layers.PV80K4Xy.js +0 -11
- package/dist/layers.QNYkTpWx.js +0 -39
- package/dist/layers.R8mPlCA0.js +0 -261
- package/dist/layers.RTKoEILv.js +0 -9
- package/dist/layers.SLjiLvui.js +0 -4
- package/dist/layers.VJ5q1w0_.js +0 -21938
- package/dist/layers.XOfuSupS.js +0 -373
- package/dist/layers.YNcfYAuY.js +0 -9
- package/dist/layers.YO08nJMd.js +0 -10
- package/dist/layers.YqzV3yPW.js +0 -220
- package/dist/layers.Z4R1XaSC.js +0 -1
- package/dist/layers.ZZQfmNLr.js +0 -10
- package/dist/layers.b0h5ZBmD.js +0 -61
- package/dist/layers.b9B2NY7n.js +0 -11690
- package/dist/layers.bHmhGLR5.js +0 -931
- package/dist/layers.cgUeweX2.js +0 -84
- package/dist/layers.dYPOB_yR.js +0 -5
- package/dist/layers.easeN7iP.js +0 -1
- package/dist/layers.f7Ihj79-.js +0 -1034
- package/dist/layers.hLd2Pb2X.js +0 -1
- package/dist/layers.i0Y9asvx.js +0 -2235
- package/dist/layers.ib9vHAA4.js +0 -2
- package/dist/layers.k6E3SRkR.js +0 -70
- package/dist/layers.lCpg7dOn.js +0 -21
- package/dist/layers.lDwCLT0I.js +0 -1
- package/dist/layers.lP9uODKD.js +0 -1283
- package/dist/layers.pc1SXYEj.js +0 -1089
- package/dist/layers.snXT5mu6.js +0 -1
- package/dist/layers.vIfEp2lU.js +0 -48146
- package/dist/layers.wJNNYF6u.js +0 -122
- package/dist/layers.wKL0lWNs.js +0 -4
- package/dist/layers.wU0hxeTl.js +0 -65
- package/dist/layers.wj-nS-86.js +0 -38
- package/dist/layers.xiOwns_l.js +0 -1
package/dist/layers.B7rTjLeq.js
DELETED
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
import { jsx as a, jsxs as I, Fragment as y } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as _, useState as j, useRef as A, useCallback as w, useEffect as P } from "react";
|
|
3
|
-
import { R as Q, p as F, A as X, e as Y, w as Z, x as p, f as $, h as K, o as ee, i as te, j as ae, k as se, l as ie, z as D, O as ne, s as le } from "./layers.CNTFg_PV.js";
|
|
4
|
-
import { p as oe, C as re, E as ce } from "./layers.BEm0EevB.js";
|
|
5
|
-
import { useTranslation as de } from "react-i18next";
|
|
6
|
-
import { Box as G, Tooltip as H, ActionIcon as V } from "@mantine/core";
|
|
7
|
-
import { IconEdit as fe } from "@tabler/icons-react";
|
|
8
|
-
function ue({
|
|
9
|
-
imageContainerRef: s,
|
|
10
|
-
editor: o,
|
|
11
|
-
rootClassName: E = null,
|
|
12
|
-
width: S = "inherit",
|
|
13
|
-
height: h = "inherit",
|
|
14
|
-
nodeKey: e,
|
|
15
|
-
alignment: g,
|
|
16
|
-
setModalOpen: r,
|
|
17
|
-
previewSVG: C
|
|
18
|
-
}) {
|
|
19
|
-
const x = _(() => C ?? "", [C]), [c, b] = j(!1), { t: d } = de(), v = (l, f) => {
|
|
20
|
-
o.update(() => {
|
|
21
|
-
Z(null);
|
|
22
|
-
const m = p(e);
|
|
23
|
-
return $(m) && m.setWidthAndHeight(l, f), !0;
|
|
24
|
-
});
|
|
25
|
-
}, O = () => {
|
|
26
|
-
K(o, e);
|
|
27
|
-
};
|
|
28
|
-
return /* @__PURE__ */ a(
|
|
29
|
-
Q,
|
|
30
|
-
{
|
|
31
|
-
editor: o,
|
|
32
|
-
isIcon: !1,
|
|
33
|
-
isEmbed: !0,
|
|
34
|
-
width: F(S),
|
|
35
|
-
height: F(h),
|
|
36
|
-
onResizeEnd: v,
|
|
37
|
-
alignment: g,
|
|
38
|
-
children: /* @__PURE__ */ I(G, { className: "media-wrapper excaildraw", children: [
|
|
39
|
-
/* @__PURE__ */ I("div", { className: "media-actions", children: [
|
|
40
|
-
/* @__PURE__ */ a(H, { label: d("editor.link.edit"), children: /* @__PURE__ */ a(
|
|
41
|
-
V,
|
|
42
|
-
{
|
|
43
|
-
color: "gray",
|
|
44
|
-
"aria-label": "Settings",
|
|
45
|
-
className: "media-action",
|
|
46
|
-
variant: "default",
|
|
47
|
-
size: 24,
|
|
48
|
-
onClick: () => {
|
|
49
|
-
r(!0);
|
|
50
|
-
},
|
|
51
|
-
children: /* @__PURE__ */ a(fe, { size: 14 })
|
|
52
|
-
}
|
|
53
|
-
) }),
|
|
54
|
-
/* @__PURE__ */ a(
|
|
55
|
-
X,
|
|
56
|
-
{
|
|
57
|
-
opened: c,
|
|
58
|
-
setOpened: b,
|
|
59
|
-
t: d,
|
|
60
|
-
editor: o,
|
|
61
|
-
nodeKey: e
|
|
62
|
-
}
|
|
63
|
-
),
|
|
64
|
-
/* @__PURE__ */ a(H, { label: d("editor.actions.delete"), children: /* @__PURE__ */ a(
|
|
65
|
-
V,
|
|
66
|
-
{
|
|
67
|
-
color: "gray",
|
|
68
|
-
"aria-label": "Settings",
|
|
69
|
-
className: "media-action",
|
|
70
|
-
variant: "default",
|
|
71
|
-
size: 24,
|
|
72
|
-
onClick: O,
|
|
73
|
-
children: /* @__PURE__ */ a(Y, { name: "trash", size: "14" })
|
|
74
|
-
}
|
|
75
|
-
) })
|
|
76
|
-
] }),
|
|
77
|
-
/* @__PURE__ */ a(
|
|
78
|
-
G,
|
|
79
|
-
{
|
|
80
|
-
w: "100%",
|
|
81
|
-
ref: (l) => {
|
|
82
|
-
l && s && (s.current = l);
|
|
83
|
-
},
|
|
84
|
-
className: E ?? "",
|
|
85
|
-
dangerouslySetInnerHTML: { __html: x }
|
|
86
|
-
}
|
|
87
|
-
)
|
|
88
|
-
] })
|
|
89
|
-
}
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
function Se({
|
|
93
|
-
nodeKey: s,
|
|
94
|
-
data: o,
|
|
95
|
-
width: E,
|
|
96
|
-
height: S,
|
|
97
|
-
alignment: h
|
|
98
|
-
}) {
|
|
99
|
-
var T;
|
|
100
|
-
const [e] = ee(), g = te(), r = _(() => oe(o), [o]), C = ((T = r == null ? void 0 : r.elements) == null ? void 0 : T.length) === 0 && !r.previewSVG, [x, c] = j(
|
|
101
|
-
C && e.isEditable()
|
|
102
|
-
), [b, d] = j(!1), v = A(null), O = A(null), l = A(null), [f, m, M] = ae(s), N = w(
|
|
103
|
-
(t) => (f && (t.preventDefault(), e.update(() => {
|
|
104
|
-
const n = p(s);
|
|
105
|
-
n && n.remove();
|
|
106
|
-
})), !1),
|
|
107
|
-
[e, f, s]
|
|
108
|
-
);
|
|
109
|
-
P(() => {
|
|
110
|
-
if (!g) {
|
|
111
|
-
f && M();
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
return se(
|
|
115
|
-
e.registerCommand(
|
|
116
|
-
le,
|
|
117
|
-
(t) => {
|
|
118
|
-
const n = O.current, u = t.target;
|
|
119
|
-
return n !== null && n.contains(u) ? (t.shiftKey || M(), m(!f), t.detail > 1 && c(!0), !0) : !1;
|
|
120
|
-
},
|
|
121
|
-
D
|
|
122
|
-
),
|
|
123
|
-
e.registerCommand(
|
|
124
|
-
ne,
|
|
125
|
-
N,
|
|
126
|
-
D
|
|
127
|
-
),
|
|
128
|
-
e.registerCommand(
|
|
129
|
-
ie,
|
|
130
|
-
N,
|
|
131
|
-
D
|
|
132
|
-
)
|
|
133
|
-
);
|
|
134
|
-
}, [M, e, f, N, m, g]);
|
|
135
|
-
const B = w(() => (c(!1), e.update(() => {
|
|
136
|
-
const t = p(s);
|
|
137
|
-
t && t.remove();
|
|
138
|
-
})), [e, s]), J = (t, n, u, z) => e.update(() => {
|
|
139
|
-
const k = p(s);
|
|
140
|
-
$(k) && (t && t.length > 0 || Object.keys(u).length > 0 ? k.setData(
|
|
141
|
-
JSON.stringify({
|
|
142
|
-
appState: n,
|
|
143
|
-
elements: t,
|
|
144
|
-
files: u,
|
|
145
|
-
previewSVG: z
|
|
146
|
-
})
|
|
147
|
-
) : k.remove());
|
|
148
|
-
}), { elements: i = [], files: L = {}, appState: U = {}, previewSVG: W } = r, R = w(() => {
|
|
149
|
-
c(!1), d(!1), l.current = !1, (i == null ? void 0 : i.length) === 0 && e.update(() => {
|
|
150
|
-
const t = p(s);
|
|
151
|
-
t && t.remove();
|
|
152
|
-
});
|
|
153
|
-
}, [e, s, i == null ? void 0 : i.length]), q = w(() => {
|
|
154
|
-
l.current ? d(!0) : R();
|
|
155
|
-
}, []);
|
|
156
|
-
return /* @__PURE__ */ I(y, { children: [
|
|
157
|
-
/* @__PURE__ */ a(
|
|
158
|
-
re,
|
|
159
|
-
{
|
|
160
|
-
isCloseModal: b,
|
|
161
|
-
confirmClose: R,
|
|
162
|
-
setCloseModalOpen: d
|
|
163
|
-
}
|
|
164
|
-
),
|
|
165
|
-
/* @__PURE__ */ a(
|
|
166
|
-
ce,
|
|
167
|
-
{
|
|
168
|
-
initialElements: i,
|
|
169
|
-
isEdited: l,
|
|
170
|
-
initialFiles: L,
|
|
171
|
-
initialAppState: U,
|
|
172
|
-
isShown: x,
|
|
173
|
-
onDelete: B,
|
|
174
|
-
onClose: q,
|
|
175
|
-
onSave: (t, n, u, z) => {
|
|
176
|
-
J(t, n, u, z), c(!1);
|
|
177
|
-
},
|
|
178
|
-
closeOnClickOutside: !1
|
|
179
|
-
}
|
|
180
|
-
),
|
|
181
|
-
(i == null ? void 0 : i.length) && /* @__PURE__ */ a(
|
|
182
|
-
"div",
|
|
183
|
-
{
|
|
184
|
-
style: {
|
|
185
|
-
display: "flex",
|
|
186
|
-
justifyContent: h
|
|
187
|
-
},
|
|
188
|
-
children: /* @__PURE__ */ a(
|
|
189
|
-
ue,
|
|
190
|
-
{
|
|
191
|
-
imageContainerRef: v,
|
|
192
|
-
className: "image",
|
|
193
|
-
width: E,
|
|
194
|
-
height: S,
|
|
195
|
-
editor: e,
|
|
196
|
-
nodeKey: s,
|
|
197
|
-
alignment: h,
|
|
198
|
-
setModalOpen: c,
|
|
199
|
-
previewSVG: W
|
|
200
|
-
}
|
|
201
|
-
)
|
|
202
|
-
}
|
|
203
|
-
)
|
|
204
|
-
] });
|
|
205
|
-
}
|
|
206
|
-
export {
|
|
207
|
-
Se as default
|
|
208
|
-
};
|
package/dist/layers.B8_yUZ0B.js
DELETED
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
"use strict";const u=require("./layers.BqqCs8jG.js");var gt=(function(){var t=function(A,r,n,i){for(n=n||{},i=A.length;i--;n[A[i]]=r);return n},s=[1,2],a=[1,3],h=[1,4],d=[2,4],y=[1,9],p=[1,11],k=[1,15],f=[1,16],b=[1,17],E=[1,18],R=[1,30],Y=[1,19],G=[1,20],U=[1,21],j=[1,22],M=[1,23],z=[1,25],H=[1,26],X=[1,27],K=[1,28],W=[1,29],J=[1,32],q=[1,33],Q=[1,34],Z=[1,35],$=[1,31],c=[1,4,5,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],tt=[1,4,5,13,14,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],xt=[4,5,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],ht={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,cssClassStatement:11,idStatement:12,DESCR:13,"-->":14,HIDE_EMPTY:15,scale:16,WIDTH:17,COMPOSIT_STATE:18,STRUCT_START:19,STRUCT_STOP:20,STATE_DESCR:21,AS:22,ID:23,FORK:24,JOIN:25,CHOICE:26,CONCURRENT:27,note:28,notePosition:29,NOTE_TEXT:30,direction:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,classDef:37,CLASSDEF_ID:38,CLASSDEF_STYLEOPTS:39,DEFAULT:40,class:41,CLASSENTITY_IDS:42,STYLECLASS:43,direction_tb:44,direction_bt:45,direction_rl:46,direction_lr:47,eol:48,";":49,EDGE_STATE:50,STYLE_SEPARATOR:51,left_of:52,right_of:53,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",13:"DESCR",14:"-->",15:"HIDE_EMPTY",16:"scale",17:"WIDTH",18:"COMPOSIT_STATE",19:"STRUCT_START",20:"STRUCT_STOP",21:"STATE_DESCR",22:"AS",23:"ID",24:"FORK",25:"JOIN",26:"CHOICE",27:"CONCURRENT",28:"note",30:"NOTE_TEXT",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"classDef",38:"CLASSDEF_ID",39:"CLASSDEF_STYLEOPTS",40:"DEFAULT",41:"class",42:"CLASSENTITY_IDS",43:"STYLECLASS",44:"direction_tb",45:"direction_bt",46:"direction_rl",47:"direction_lr",49:";",50:"EDGE_STATE",51:"STYLE_SEPARATOR",52:"left_of",53:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[10,3],[10,3],[11,3],[31,1],[31,1],[31,1],[31,1],[48,1],[48,1],[12,1],[12,1],[12,3],[12,3],[29,1],[29,1]],performAction:function(r,n,i,o,S,e,w){var l=e.length-1;switch(S){case 3:return o.setRootDoc(e[l]),e[l];case 4:this.$=[];break;case 5:e[l]!="nl"&&(e[l-1].push(e[l]),this.$=e[l-1]);break;case 6:case 7:this.$=e[l];break;case 8:this.$="nl";break;case 11:this.$=e[l];break;case 12:const B=e[l-1];B.description=o.trimColon(e[l]),this.$=B;break;case 13:this.$={stmt:"relation",state1:e[l-2],state2:e[l]};break;case 14:const ft=o.trimColon(e[l]);this.$={stmt:"relation",state1:e[l-3],state2:e[l-1],description:ft};break;case 18:this.$={stmt:"state",id:e[l-3],type:"default",description:"",doc:e[l-1]};break;case 19:var C=e[l],O=e[l-2].trim();if(e[l].match(":")){var et=e[l].split(":");C=et[0],O=[O,et[1]]}this.$={stmt:"state",id:C,type:"default",description:O};break;case 20:this.$={stmt:"state",id:e[l-3],type:"default",description:e[l-5],doc:e[l-1]};break;case 21:this.$={stmt:"state",id:e[l],type:"fork"};break;case 22:this.$={stmt:"state",id:e[l],type:"join"};break;case 23:this.$={stmt:"state",id:e[l],type:"choice"};break;case 24:this.$={stmt:"state",id:o.getDividerId(),type:"divider"};break;case 25:this.$={stmt:"state",id:e[l-1].trim(),note:{position:e[l-2].trim(),text:e[l].trim()}};break;case 28:this.$=e[l].trim(),o.setAccTitle(this.$);break;case 29:case 30:this.$=e[l].trim(),o.setAccDescription(this.$);break;case 31:case 32:this.$={stmt:"classDef",id:e[l-1].trim(),classes:e[l].trim()};break;case 33:this.$={stmt:"applyClass",id:e[l-1].trim(),styleClass:e[l].trim()};break;case 34:o.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 35:o.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 36:o.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 37:o.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 40:case 41:this.$={stmt:"state",id:e[l].trim(),type:"default",description:""};break;case 42:this.$={stmt:"state",id:e[l-2].trim(),classes:[e[l].trim()],type:"default",description:""};break;case 43:this.$={stmt:"state",id:e[l-2].trim(),classes:[e[l].trim()],type:"default",description:""};break}},table:[{3:1,4:s,5:a,6:h},{1:[3]},{3:5,4:s,5:a,6:h},{3:6,4:s,5:a,6:h},t([1,4,5,15,16,18,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],d,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:y,5:p,8:8,9:10,10:12,11:13,12:14,15:k,16:f,18:b,21:E,23:R,24:Y,25:G,26:U,27:j,28:M,31:24,32:z,34:H,36:X,37:K,41:W,44:J,45:q,46:Q,47:Z,50:$},t(c,[2,5]),{9:36,10:12,11:13,12:14,15:k,16:f,18:b,21:E,23:R,24:Y,25:G,26:U,27:j,28:M,31:24,32:z,34:H,36:X,37:K,41:W,44:J,45:q,46:Q,47:Z,50:$},t(c,[2,7]),t(c,[2,8]),t(c,[2,9]),t(c,[2,10]),t(c,[2,11],{13:[1,37],14:[1,38]}),t(c,[2,15]),{17:[1,39]},t(c,[2,17],{19:[1,40]}),{22:[1,41]},t(c,[2,21]),t(c,[2,22]),t(c,[2,23]),t(c,[2,24]),{29:42,30:[1,43],52:[1,44],53:[1,45]},t(c,[2,27]),{33:[1,46]},{35:[1,47]},t(c,[2,30]),{38:[1,48],40:[1,49]},{42:[1,50]},t(tt,[2,40],{51:[1,51]}),t(tt,[2,41],{51:[1,52]}),t(c,[2,34]),t(c,[2,35]),t(c,[2,36]),t(c,[2,37]),t(c,[2,6]),t(c,[2,12]),{12:53,23:R,50:$},t(c,[2,16]),t(xt,d,{7:54}),{23:[1,55]},{23:[1,56]},{22:[1,57]},{23:[2,44]},{23:[2,45]},t(c,[2,28]),t(c,[2,29]),{39:[1,58]},{39:[1,59]},{43:[1,60]},{23:[1,61]},{23:[1,62]},t(c,[2,13],{13:[1,63]}),{4:y,5:p,8:8,9:10,10:12,11:13,12:14,15:k,16:f,18:b,20:[1,64],21:E,23:R,24:Y,25:G,26:U,27:j,28:M,31:24,32:z,34:H,36:X,37:K,41:W,44:J,45:q,46:Q,47:Z,50:$},t(c,[2,19],{19:[1,65]}),{30:[1,66]},{23:[1,67]},t(c,[2,31]),t(c,[2,32]),t(c,[2,33]),t(tt,[2,42]),t(tt,[2,43]),t(c,[2,14]),t(c,[2,18]),t(xt,d,{7:68}),t(c,[2,25]),t(c,[2,26]),{4:y,5:p,8:8,9:10,10:12,11:13,12:14,15:k,16:f,18:b,20:[1,69],21:E,23:R,24:Y,25:G,26:U,27:j,28:M,31:24,32:z,34:H,36:X,37:K,41:W,44:J,45:q,46:Q,47:Z,50:$},t(c,[2,20])],defaultActions:{5:[2,1],6:[2,2],44:[2,44],45:[2,45]},parseError:function(r,n){if(n.recoverable)this.trace(r);else{var i=new Error(r);throw i.hash=n,i}},parse:function(r){var n=this,i=[0],o=[],S=[null],e=[],w=this.table,l="",C=0,O=0,et=2,B=1,ft=e.slice.call(arguments,1),g=Object.create(this.lexer),L={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(L.yy[dt]=this.yy[dt]);g.setInput(r,L.yy),L.yy.lexer=g,L.yy.parser=this,typeof g.yylloc>"u"&&(g.yylloc={});var yt=g.yylloc;e.push(yt);var Yt=g.options&&g.options.ranges;typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Gt(){var D;return D=o.pop()||g.lex()||B,typeof D!="number"&&(D instanceof Array&&(o=D,D=o.pop()),D=n.symbols_[D]||D),D}for(var _,v,m,pt,N={},st,x,Dt,it;;){if(v=i[i.length-1],this.defaultActions[v]?m=this.defaultActions[v]:((_===null||typeof _>"u")&&(_=Gt()),m=w[v]&&w[v][_]),typeof m>"u"||!m.length||!m[0]){var St="";it=[];for(st in w[v])this.terminals_[st]&&st>et&&it.push("'"+this.terminals_[st]+"'");g.showPosition?St="Parse error on line "+(C+1)+`:
|
|
2
|
-
`+g.showPosition()+`
|
|
3
|
-
Expecting `+it.join(", ")+", got '"+(this.terminals_[_]||_)+"'":St="Parse error on line "+(C+1)+": Unexpected "+(_==B?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(St,{text:g.match,token:this.terminals_[_]||_,line:g.yylineno,loc:yt,expected:it})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+_);switch(m[0]){case 1:i.push(_),S.push(g.yytext),e.push(g.yylloc),i.push(m[1]),_=null,O=g.yyleng,l=g.yytext,C=g.yylineno,yt=g.yylloc;break;case 2:if(x=this.productions_[m[1]][1],N.$=S[S.length-x],N._$={first_line:e[e.length-(x||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(x||1)].first_column,last_column:e[e.length-1].last_column},Yt&&(N._$.range=[e[e.length-(x||1)].range[0],e[e.length-1].range[1]]),pt=this.performAction.apply(N,[l,O,C,L.yy,m[1],S,e].concat(ft)),typeof pt<"u")return pt;x&&(i=i.slice(0,-1*x*2),S=S.slice(0,-1*x),e=e.slice(0,-1*x)),i.push(this.productions_[m[1]][0]),S.push(N.$),e.push(N._$),Dt=w[i[i.length-2]][i[i.length-1]],i.push(Dt);break;case 3:return!0}}return!0}},Vt=(function(){var A={EOF:1,parseError:function(n,i){if(this.yy.parser)this.yy.parser.parseError(n,i);else throw new Error(n)},setInput:function(r,n){return this.yy=n||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var n=r.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},unput:function(r){var n=r.length,i=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var o=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var S=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===o.length?this.yylloc.first_column:0)+o[o.length-i.length].length-i[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(r){this.unput(this.match.slice(r))},pastInput:function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var r=this.pastInput(),n=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
|
5
|
-
`+n+"^"},test_match:function(r,n){var i,o,S;if(this.options.backtrack_lexer&&(S={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(S.yylloc.range=this.yylloc.range.slice(0))),o=r[0].match(/(?:\r\n?|\n).*/g),o&&(this.yylineno+=o.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:o?o[o.length-1].length-o[o.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(r[0].length),this.matched+=r[0],i=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var e in S)this[e]=S[e];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,n,i,o;this._more||(this.yytext="",this.match="");for(var S=this._currentRules(),e=0;e<S.length;e++)if(i=this._input.match(this.rules[S[e]]),i&&(!n||i[0].length>n[0].length)){if(n=i,o=e,this.options.backtrack_lexer){if(r=this.test_match(i,S[e]),r!==!1)return r;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(r=this.test_match(n,S[o]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var n=this.next();return n||this.lex()},begin:function(n){this.conditionStack.push(n)},popState:function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},pushState:function(n){this.begin(n)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(n,i,o,S){switch(o){case 0:return 40;case 1:return 44;case 2:return 45;case 3:return 46;case 4:return 47;case 5:break;case 6:break;case 7:return 5;case 8:break;case 9:break;case 10:break;case 11:break;case 12:return this.pushState("SCALE"),16;case 13:return 17;case 14:this.popState();break;case 15:return this.begin("acc_title"),32;case 16:return this.popState(),"acc_title_value";case 17:return this.begin("acc_descr"),34;case 18:return this.popState(),"acc_descr_value";case 19:this.begin("acc_descr_multiline");break;case 20:this.popState();break;case 21:return"acc_descr_multiline_value";case 22:return this.pushState("CLASSDEF"),37;case 23:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 24:return this.popState(),this.pushState("CLASSDEFID"),38;case 25:return this.popState(),39;case 26:return this.pushState("CLASS"),41;case 27:return this.popState(),this.pushState("CLASS_STYLE"),42;case 28:return this.popState(),43;case 29:return this.pushState("SCALE"),16;case 30:return 17;case 31:this.popState();break;case 32:this.pushState("STATE");break;case 33:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),24;case 34:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),25;case 35:return this.popState(),i.yytext=i.yytext.slice(0,-10).trim(),26;case 36:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),24;case 37:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),25;case 38:return this.popState(),i.yytext=i.yytext.slice(0,-10).trim(),26;case 39:return 44;case 40:return 45;case 41:return 46;case 42:return 47;case 43:this.pushState("STATE_STRING");break;case 44:return this.pushState("STATE_ID"),"AS";case 45:return this.popState(),"ID";case 46:this.popState();break;case 47:return"STATE_DESCR";case 48:return 18;case 49:this.popState();break;case 50:return this.popState(),this.pushState("struct"),19;case 51:break;case 52:return this.popState(),20;case 53:break;case 54:return this.begin("NOTE"),28;case 55:return this.popState(),this.pushState("NOTE_ID"),52;case 56:return this.popState(),this.pushState("NOTE_ID"),53;case 57:this.popState(),this.pushState("FLOATING_NOTE");break;case 58:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 59:break;case 60:return"NOTE_TEXT";case 61:return this.popState(),"ID";case 62:return this.popState(),this.pushState("NOTE_TEXT"),23;case 63:return this.popState(),i.yytext=i.yytext.substr(2).trim(),30;case 64:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),30;case 65:return 6;case 66:return 6;case 67:return 15;case 68:return 50;case 69:return 23;case 70:return i.yytext=i.yytext.trim(),13;case 71:return 14;case 72:return 27;case 73:return 51;case 74:return 5;case 75:return"INVALID"}},rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[9,10],inclusive:!1},struct:{rules:[9,10,22,26,32,39,40,41,42,51,52,53,54,68,69,70,71,72],inclusive:!1},FLOATING_NOTE_ID:{rules:[61],inclusive:!1},FLOATING_NOTE:{rules:[58,59,60],inclusive:!1},NOTE_TEXT:{rules:[63,64],inclusive:!1},NOTE_ID:{rules:[62],inclusive:!1},NOTE:{rules:[55,56,57],inclusive:!1},CLASS_STYLE:{rules:[28],inclusive:!1},CLASS:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[25],inclusive:!1},CLASSDEF:{rules:[23,24],inclusive:!1},acc_descr_multiline:{rules:[20,21],inclusive:!1},acc_descr:{rules:[18],inclusive:!1},acc_title:{rules:[16],inclusive:!1},SCALE:{rules:[13,14,30,31],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[45],inclusive:!1},STATE_STRING:{rules:[46,47],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,33,34,35,36,37,38,43,44,48,49,50],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,50,54,65,66,67,68,69,70,71,73,74,75],inclusive:!0}}};return A})();ht.lexer=Vt;function ut(){this.yy={}}return ut.prototype=ht,ht.Parser=ut,new ut})();gt.parser=gt;const Ut=gt,jt="LR",Mt="TB",at="state",Et="relation",zt="classDef",Ht="applyClass",ot="default",vt="divider",kt="[*]",It="start",Ot=kt,Nt="end",At="color",Ct="fill",Xt="bgFill",Kt=",";function Rt(){return{}}let $t=jt,lt=[],P=Rt();const wt=()=>({relations:[],states:{},documents:{}});let ct={root:wt()},T=ct.root,F=0,Lt=0;const Wt={LINE:0,DOTTED_LINE:1},Jt={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},rt=t=>JSON.parse(JSON.stringify(t)),qt=t=>{u.log$1.info("Setting root doc",t),lt=t},Qt=()=>lt,nt=(t,s,a)=>{if(s.stmt===Et)nt(t,s.state1,!0),nt(t,s.state2,!1);else if(s.stmt===at&&(s.id==="[*]"?(s.id=a?t.id+"_start":t.id+"_end",s.start=a):s.id=s.id.trim()),s.doc){const h=[];let d=[],y;for(y=0;y<s.doc.length;y++)if(s.doc[y].type===vt){const p=rt(s.doc[y]);p.doc=rt(d),h.push(p),d=[]}else d.push(s.doc[y]);if(h.length>0&&d.length>0){const p={stmt:at,id:u.generateId(),type:"divider",doc:rt(d)};h.push(rt(p)),s.doc=h}s.doc.forEach(p=>nt(s,p,!0))}},Zt=()=>(nt({id:"root"},{id:"root",doc:lt},!0),{id:"root",doc:lt}),te=t=>{let s;t.doc?s=t.doc:s=t,u.log$1.info(s),Bt(!0),u.log$1.info("Extract",s),s.forEach(a=>{switch(a.stmt){case at:I(a.id.trim(),a.type,a.doc,a.description,a.note,a.classes,a.styles,a.textStyles);break;case Et:Pt(a.state1,a.state2,a.description);break;case zt:Ft(a.id.trim(),a.classes);break;case Ht:bt(a.id.trim(),a.styleClass);break}})},I=function(t,s=ot,a=null,h=null,d=null,y=null,p=null,k=null){const f=t==null?void 0:t.trim();T.states[f]===void 0?(u.log$1.info("Adding state ",f,h),T.states[f]={id:f,descriptions:[],type:s,doc:a,note:d,classes:[],styles:[],textStyles:[]}):(T.states[f].doc||(T.states[f].doc=a),T.states[f].type||(T.states[f].type=s)),h&&(u.log$1.info("Setting state description",f,h),typeof h=="string"&&mt(f,h.trim()),typeof h=="object"&&h.forEach(b=>mt(f,b.trim()))),d&&(T.states[f].note=d,T.states[f].note.text=u.common$1.sanitizeText(T.states[f].note.text,u.getConfig())),y&&(u.log$1.info("Setting state classes",f,y),(typeof y=="string"?[y]:y).forEach(E=>bt(f,E.trim()))),p&&(u.log$1.info("Setting state styles",f,p),(typeof p=="string"?[p]:p).forEach(E=>he(f,E.trim()))),k&&(u.log$1.info("Setting state styles",f,p),(typeof k=="string"?[k]:k).forEach(E=>ue(f,E.trim())))},Bt=function(t){ct={root:wt()},T=ct.root,F=0,P=Rt(),t||u.clear()},V=function(t){return T.states[t]},ee=function(){return T.states},se=function(){u.log$1.info("Documents = ",ct)},ie=function(){return T.relations};function Tt(t=""){let s=t;return t===kt&&(F++,s=`${It}${F}`),s}function _t(t="",s=ot){return t===kt?It:s}function re(t=""){let s=t;return t===Ot&&(F++,s=`${Nt}${F}`),s}function ne(t="",s=ot){return t===Ot?Nt:s}function ae(t,s,a){let h=Tt(t.id.trim()),d=_t(t.id.trim(),t.type),y=Tt(s.id.trim()),p=_t(s.id.trim(),s.type);I(h,d,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),I(y,p,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles),T.relations.push({id1:h,id2:y,relationTitle:u.common$1.sanitizeText(a,u.getConfig())})}const Pt=function(t,s,a){if(typeof t=="object")ae(t,s,a);else{const h=Tt(t.trim()),d=_t(t),y=re(s.trim()),p=ne(s);I(h,d),I(y,p),T.relations.push({id1:h,id2:y,title:u.common$1.sanitizeText(a,u.getConfig())})}},mt=function(t,s){const a=T.states[t],h=s.startsWith(":")?s.replace(":","").trim():s;a.descriptions.push(u.common$1.sanitizeText(h,u.getConfig()))},le=function(t){return t.substring(0,1)===":"?t.substr(2).trim():t.trim()},ce=()=>(Lt++,"divider-id-"+Lt),Ft=function(t,s=""){P[t]===void 0&&(P[t]={id:t,styles:[],textStyles:[]});const a=P[t];s!=null&&s.split(Kt).forEach(h=>{const d=h.replace(/([^;]*);/,"$1").trim();if(h.match(At)){const p=d.replace(Ct,Xt).replace(At,Ct);a.textStyles.push(p)}a.styles.push(d)})},oe=function(){return P},bt=function(t,s){t.split(",").forEach(function(a){let h=V(a);if(h===void 0){const d=a.trim();I(d),h=V(d)}h.classes.push(s)})},he=function(t,s){const a=V(t);a!==void 0&&a.textStyles.push(s)},ue=function(t,s){const a=V(t);a!==void 0&&a.textStyles.push(s)},fe=()=>$t,de=t=>{$t=t},ye=t=>t&&t[0]===":"?t.substr(1).trim():t.trim(),pe={getConfig:()=>u.getConfig().state,addState:I,clear:Bt,getState:V,getStates:ee,getRelations:ie,getClasses:oe,getDirection:fe,addRelation:Pt,getDividerId:ce,setDirection:de,cleanupLabel:le,lineType:Wt,relationType:Jt,logDocuments:se,getRootDoc:Qt,setRootDoc:qt,getRootDocV2:Zt,extract:te,trimColon:ye,getAccTitle:u.getAccTitle,setAccTitle:u.setAccTitle,getAccDescription:u.getAccDescription,setAccDescription:u.setAccDescription,addStyleClass:Ft,setCssClass:bt,addDescription:mt,setDiagramTitle:u.setDiagramTitle,getDiagramTitle:u.getDiagramTitle},Se=t=>`
|
|
7
|
-
defs #statediagram-barbEnd {
|
|
8
|
-
fill: ${t.transitionColor};
|
|
9
|
-
stroke: ${t.transitionColor};
|
|
10
|
-
}
|
|
11
|
-
g.stateGroup text {
|
|
12
|
-
fill: ${t.nodeBorder};
|
|
13
|
-
stroke: none;
|
|
14
|
-
font-size: 10px;
|
|
15
|
-
}
|
|
16
|
-
g.stateGroup text {
|
|
17
|
-
fill: ${t.textColor};
|
|
18
|
-
stroke: none;
|
|
19
|
-
font-size: 10px;
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
g.stateGroup .state-title {
|
|
23
|
-
font-weight: bolder;
|
|
24
|
-
fill: ${t.stateLabelColor};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
g.stateGroup rect {
|
|
28
|
-
fill: ${t.mainBkg};
|
|
29
|
-
stroke: ${t.nodeBorder};
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
g.stateGroup line {
|
|
33
|
-
stroke: ${t.lineColor};
|
|
34
|
-
stroke-width: 1;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.transition {
|
|
38
|
-
stroke: ${t.transitionColor};
|
|
39
|
-
stroke-width: 1;
|
|
40
|
-
fill: none;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.stateGroup .composit {
|
|
44
|
-
fill: ${t.background};
|
|
45
|
-
border-bottom: 1px
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.stateGroup .alt-composit {
|
|
49
|
-
fill: #e0e0e0;
|
|
50
|
-
border-bottom: 1px
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.state-note {
|
|
54
|
-
stroke: ${t.noteBorderColor};
|
|
55
|
-
fill: ${t.noteBkgColor};
|
|
56
|
-
|
|
57
|
-
text {
|
|
58
|
-
fill: ${t.noteTextColor};
|
|
59
|
-
stroke: none;
|
|
60
|
-
font-size: 10px;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.stateLabel .box {
|
|
65
|
-
stroke: none;
|
|
66
|
-
stroke-width: 0;
|
|
67
|
-
fill: ${t.mainBkg};
|
|
68
|
-
opacity: 0.5;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.edgeLabel .label rect {
|
|
72
|
-
fill: ${t.labelBackgroundColor};
|
|
73
|
-
opacity: 0.5;
|
|
74
|
-
}
|
|
75
|
-
.edgeLabel .label text {
|
|
76
|
-
fill: ${t.transitionLabelColor||t.tertiaryTextColor};
|
|
77
|
-
}
|
|
78
|
-
.label div .edgeLabel {
|
|
79
|
-
color: ${t.transitionLabelColor||t.tertiaryTextColor};
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.stateLabel text {
|
|
83
|
-
fill: ${t.stateLabelColor};
|
|
84
|
-
font-size: 10px;
|
|
85
|
-
font-weight: bold;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.node circle.state-start {
|
|
89
|
-
fill: ${t.specialStateColor};
|
|
90
|
-
stroke: ${t.specialStateColor};
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.node .fork-join {
|
|
94
|
-
fill: ${t.specialStateColor};
|
|
95
|
-
stroke: ${t.specialStateColor};
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.node circle.state-end {
|
|
99
|
-
fill: ${t.innerEndBackground};
|
|
100
|
-
stroke: ${t.background};
|
|
101
|
-
stroke-width: 1.5
|
|
102
|
-
}
|
|
103
|
-
.end-state-inner {
|
|
104
|
-
fill: ${t.compositeBackground||t.background};
|
|
105
|
-
// stroke: ${t.background};
|
|
106
|
-
stroke-width: 1.5
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.node rect {
|
|
110
|
-
fill: ${t.stateBkg||t.mainBkg};
|
|
111
|
-
stroke: ${t.stateBorder||t.nodeBorder};
|
|
112
|
-
stroke-width: 1px;
|
|
113
|
-
}
|
|
114
|
-
.node polygon {
|
|
115
|
-
fill: ${t.mainBkg};
|
|
116
|
-
stroke: ${t.stateBorder||t.nodeBorder};;
|
|
117
|
-
stroke-width: 1px;
|
|
118
|
-
}
|
|
119
|
-
#statediagram-barbEnd {
|
|
120
|
-
fill: ${t.lineColor};
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.statediagram-cluster rect {
|
|
124
|
-
fill: ${t.compositeTitleBackground};
|
|
125
|
-
stroke: ${t.stateBorder||t.nodeBorder};
|
|
126
|
-
stroke-width: 1px;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.cluster-label, .nodeLabel {
|
|
130
|
-
color: ${t.stateLabelColor};
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.statediagram-cluster rect.outer {
|
|
134
|
-
rx: 5px;
|
|
135
|
-
ry: 5px;
|
|
136
|
-
}
|
|
137
|
-
.statediagram-state .divider {
|
|
138
|
-
stroke: ${t.stateBorder||t.nodeBorder};
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.statediagram-state .title-state {
|
|
142
|
-
rx: 5px;
|
|
143
|
-
ry: 5px;
|
|
144
|
-
}
|
|
145
|
-
.statediagram-cluster.statediagram-cluster .inner {
|
|
146
|
-
fill: ${t.compositeBackground||t.background};
|
|
147
|
-
}
|
|
148
|
-
.statediagram-cluster.statediagram-cluster-alt .inner {
|
|
149
|
-
fill: ${t.altBackground?t.altBackground:"#efefef"};
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.statediagram-cluster .inner {
|
|
153
|
-
rx:0;
|
|
154
|
-
ry:0;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.statediagram-state rect.basic {
|
|
158
|
-
rx: 5px;
|
|
159
|
-
ry: 5px;
|
|
160
|
-
}
|
|
161
|
-
.statediagram-state rect.divider {
|
|
162
|
-
stroke-dasharray: 10,10;
|
|
163
|
-
fill: ${t.altBackground?t.altBackground:"#efefef"};
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.note-edge {
|
|
167
|
-
stroke-dasharray: 5;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.statediagram-note rect {
|
|
171
|
-
fill: ${t.noteBkgColor};
|
|
172
|
-
stroke: ${t.noteBorderColor};
|
|
173
|
-
stroke-width: 1px;
|
|
174
|
-
rx: 0;
|
|
175
|
-
ry: 0;
|
|
176
|
-
}
|
|
177
|
-
.statediagram-note rect {
|
|
178
|
-
fill: ${t.noteBkgColor};
|
|
179
|
-
stroke: ${t.noteBorderColor};
|
|
180
|
-
stroke-width: 1px;
|
|
181
|
-
rx: 0;
|
|
182
|
-
ry: 0;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.statediagram-note text {
|
|
186
|
-
fill: ${t.noteTextColor};
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.statediagram-note .nodeLabel {
|
|
190
|
-
color: ${t.noteTextColor};
|
|
191
|
-
}
|
|
192
|
-
.statediagram .edgeLabel {
|
|
193
|
-
color: red; // ${t.noteTextColor};
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
#dependencyStart, #dependencyEnd {
|
|
197
|
-
fill: ${t.lineColor};
|
|
198
|
-
stroke: ${t.lineColor};
|
|
199
|
-
stroke-width: 1;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.statediagramTitleText {
|
|
203
|
-
text-anchor: middle;
|
|
204
|
-
font-size: 18px;
|
|
205
|
-
fill: ${t.textColor};
|
|
206
|
-
}
|
|
207
|
-
`,ge=Se;exports.DEFAULT_NESTED_DOC_DIR=Mt;exports.DEFAULT_STATE_TYPE=ot;exports.DIVIDER_TYPE=vt;exports.STMT_RELATION=Et;exports.STMT_STATE=at;exports.db=pe;exports.parser$1=Ut;exports.styles=ge;
|