@layers-app/editor 0.5.5-optimization → 0.5.6-comment.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/dist/index.cjs +2 -2
- package/dist/index.d.ts +38 -157
- package/dist/index.js +10 -12
- package/dist/layers.0K7nH1On.js +904 -0
- package/dist/layers.1gm16E7h.js +37 -0
- package/dist/layers.1hvUGbY-.js +1283 -0
- package/dist/layers.4IbajZJw.js +8 -0
- package/dist/layers.52famHy6.js +1 -0
- package/dist/layers.55ZV6uDK.js +9 -0
- package/dist/layers.5tOkPx7s.js +36 -0
- package/dist/layers.7JqFgE4-.js +15 -0
- package/dist/layers.82WQNqep.js +10 -0
- package/dist/layers.8bT9YhoW.js +40 -0
- package/dist/layers.9pNaFvaX.js +1 -0
- package/dist/layers.A9tLMZ8-.js +40 -0
- package/dist/layers.B0ZshcMy.js +1 -0
- package/dist/layers.B0nQD_wz.js +7 -0
- package/dist/layers.B19hGmey.js +1 -0
- package/dist/layers.B1FmrtMP.js +39 -0
- package/dist/layers.B1HzFISh.js +1088 -0
- package/dist/layers.B1PoF4L1.js +70 -0
- package/dist/layers.B3D4g2HH.js +1 -0
- package/dist/layers.B5liBCLx.js +39 -0
- package/dist/layers.B6IBrXtu.js +5 -0
- package/dist/layers.B7K7JjK6.js +1510 -0
- package/dist/layers.B7Yn0OVk.js +96 -0
- package/dist/layers.B7lNLCab.js +39 -0
- package/dist/layers.B8PRHxCR.js +320 -0
- package/dist/layers.B91u9JPQ.js +40 -0
- package/dist/layers.BABSzoq-.js +42 -0
- package/dist/layers.BAo6PQrP.js +1 -0
- package/dist/layers.BAtv1CM7.js +1 -0
- package/dist/layers.BBD_K_ab.js +1 -0
- package/dist/layers.BC2IC9re.js +14 -0
- package/dist/layers.BChuXthZ.js +39 -0
- package/dist/layers.BG3lYrA2.js +803 -0
- package/dist/layers.BGu96O_x.js +116 -0
- package/dist/layers.BHqeqsf3.js +1265 -0
- package/dist/layers.BIeVwYKL.js +1 -0
- package/dist/layers.BJDrjORS.js +244 -0
- package/dist/layers.BL4sjw8S.js +38 -0
- package/dist/layers.BLEaVcCS.js +9 -0
- package/dist/layers.BLICHEgt.js +38 -0
- package/dist/layers.BLd2spTm.js +1 -0
- package/dist/layers.BLz21b5-.js +10 -0
- package/dist/layers.BODsfVZd.js +11 -0
- package/dist/layers.BPSqP4Y-.js +791 -0
- package/dist/layers.BSFjYVJ-.js +425 -0
- package/dist/layers.BSTBZrFn.js +1 -0
- package/dist/layers.BUwedZAG.js +40 -0
- package/dist/layers.BWxww11_.js +11 -0
- package/dist/layers.BXbWKt4k.js +6 -0
- package/dist/layers.BYx79WgM.js +7 -0
- package/dist/layers.BYxiLVKM.js +8 -0
- package/dist/layers.BaFLCLv5.js +1126 -0
- package/dist/layers.BbCfEXyj.js +55 -0
- package/dist/layers.BckXM8uh.js +41 -0
- package/dist/layers.Bdk5wm_r.js +5 -0
- package/dist/layers.Bf-y1I96.js +41 -0
- package/dist/layers.BhPd38Q_.js +7 -0
- package/dist/layers.Bihyr17C.js +769 -0
- package/dist/layers.Bj2_tuLO.js +65 -0
- package/dist/layers.BjgjTO8U.js +257 -0
- package/dist/layers.Bl7UAGKH.js +196 -0
- package/dist/layers.BlRrLmIh.js +1 -0
- package/dist/layers.BlmZbkh-.js +11 -0
- package/dist/layers.BpilXLfW.js +6 -0
- package/dist/layers.Bs1T_aIc.js +1 -0
- package/dist/layers.BsG1LFwT.js +40 -0
- package/dist/layers.Bv3xQjwp.js +84 -0
- package/dist/layers.Bvv7vdux.js +9 -0
- package/dist/layers.BzYjlGyp.js +8 -0
- package/dist/layers.C01ZNdhS.js +41 -0
- package/dist/layers.C0Lgw_Sx.js +11688 -0
- package/dist/layers.C3CZhlGl.js +8 -0
- package/dist/layers.C3tRluQ4.js +5 -0
- package/dist/layers.C4n5AHBC.js +11 -0
- package/dist/layers.C6I-Rtda.js +1580 -0
- package/dist/layers.C7hR0KBX.js +39 -0
- package/dist/layers.C8TCYhyA.js +6 -0
- package/dist/layers.C8_lu5UH.js +23 -0
- package/dist/layers.CANR02Nl.js +160 -0
- package/dist/layers.CApJqtTy.js +6 -0
- package/dist/layers.CDo0xU9O.js +2235 -0
- package/dist/layers.CE5aKrYe.js +40 -0
- package/dist/layers.CEbqhrCP.js +32 -0
- package/dist/layers.CGyLNMmf.js +39 -0
- package/dist/layers.CHZsXQcr.js +1 -0
- package/dist/layers.CHpeyQBr.js +7 -0
- package/dist/layers.CJp4lFvS.js +1 -0
- package/dist/layers.CKbii_Fm.js +52 -0
- package/dist/layers.CL2c0de9.js +4 -0
- package/dist/layers.CMumGCgO.js +1089 -0
- package/dist/layers.CQBi5l87.js +2 -0
- package/dist/layers.CRwctr1A.js +39 -0
- package/dist/layers.CSsKJLBG.js +9 -0
- package/dist/layers.CTBkLJZK.js +44 -0
- package/dist/layers.CVZE9_ua.js +41 -0
- package/dist/layers.CZ4DsPko.js +2 -0
- package/dist/layers.CZL9fnL3.js +2 -0
- package/dist/layers.C_Hdlxhz.js +423 -0
- package/dist/layers.C_IvrzZ3.js +7 -0
- package/dist/layers.C_TXB-Fm.js +6 -0
- package/dist/layers.C_n5zuE8.js +19 -0
- package/dist/layers.C_yEZmO3.js +1 -0
- package/dist/layers.Ca26eURR.js +8 -0
- package/dist/layers.CaBWPEUi.js +8 -0
- package/dist/layers.Cbip3kA9.js +61 -0
- package/dist/layers.CeUJQ0zl.js +6 -0
- package/dist/layers.CedEPfAP.js +1 -0
- package/dist/layers.CfLOzJzF.js +42 -0
- package/dist/layers.ChhuzqF0.js +230 -0
- package/dist/layers.CiXhWjbj.js +7 -0
- package/dist/layers.Cin_kImi.js +10 -0
- package/dist/layers.ClntPIOA.js +1 -0
- package/dist/layers.CmsJlpTQ.js +32 -0
- package/dist/layers.CnE-E-JL.js +1 -0
- package/dist/layers.CovEFG6q.js +7 -0
- package/dist/layers.CpP3DoN0.js +1359 -0
- package/dist/layers.Cq-aeNdr.js +268 -0
- package/dist/layers.CqVTtuYm.js +6 -0
- package/dist/layers.Ctfcx5MV.js +9 -0
- package/dist/layers.Cvu1R8i3.js +7 -0
- package/dist/layers.CvzgfrSj.js +1 -0
- package/dist/layers.Cy1JjAkL.js +10 -0
- package/dist/layers.Cym0ST1w.js +40 -0
- package/dist/layers.Cyzu9PKQ.js +1 -0
- package/dist/layers.CzFNEdQU.js +40 -0
- package/dist/layers.D05Sekr8.js +202 -0
- package/dist/layers.D0zn4_Mx.js +1 -0
- package/dist/layers.D13onkyK.js +1 -0
- package/dist/layers.D1NayJCn.js +931 -0
- package/dist/layers.D3DljblW.js +10 -0
- package/dist/layers.D4T8fTcj.js +1223 -0
- package/dist/layers.D6B4leTb.js +39 -0
- package/dist/layers.D6c0MkVX.js +35 -0
- package/dist/layers.D7jGxypv.js +8 -0
- package/dist/layers.D7vdNfrC.js +13 -0
- package/dist/layers.D8vmJCHk.js +11 -0
- package/dist/layers.DBXEiJMV.js +118 -0
- package/dist/layers.DCQPx7AD.js +42 -0
- package/dist/layers.DCdKAtNZ.js +40 -0
- package/dist/layers.DCsYvkeP.js +1 -0
- package/dist/layers.DE_Isi6B.js +8 -0
- package/dist/layers.DEcb22xR.js +304 -0
- package/dist/layers.DEjUqhpX.js +295 -0
- package/dist/layers.DFzPxfun.js +2966 -0
- package/dist/layers.DG2P8Gj3.js +10 -0
- package/dist/layers.DGYwM8PH.js +960 -0
- package/dist/layers.DGhfVanc.js +5 -0
- package/dist/layers.DHOiG985.js +42 -0
- package/dist/layers.DIlegck4.js +42 -0
- package/dist/layers.DIszQQxV.js +35 -0
- package/dist/layers.DKWQfzy-.js +8 -0
- package/dist/layers.DKZfnO7U.js +40 -0
- package/dist/layers.DL4oFlMV.js +802 -0
- package/dist/layers.DLWsJzru.js +84 -0
- package/dist/layers.DLs01ULg.js +39 -0
- package/dist/layers.DLwuMfdd.js +84 -0
- package/dist/layers.DMkBISW1.js +1 -0
- package/dist/layers.DN9HoVxI.js +18 -0
- package/dist/layers.DOrgOHBr.js +1 -0
- package/dist/layers.DU65xSYF.js +1619 -0
- package/dist/layers.DWnxgRuk.js +36 -0
- package/dist/layers.DXgo1Drt.js +35 -0
- package/dist/layers.DY1I07VU.js +4 -0
- package/dist/layers.DZHl6axY.js +10 -0
- package/dist/layers.Da-ciHQm.js +793 -0
- package/dist/layers.DbaKVP5e.js +1 -0
- package/dist/layers.DcTMCznr.js +10 -0
- package/dist/layers.De1n0W8r.js +1034 -0
- package/dist/layers.DgMWKPPz.js +33 -0
- package/dist/layers.DhAFGerI.js +6 -0
- package/dist/layers.Dj7Sb4gM.js +33 -0
- package/dist/layers.DjTeOgMd.js +207 -0
- package/dist/layers.DjUOC4st.js +16 -0
- package/dist/layers.DmkPWSQY.js +1 -0
- package/dist/layers.Dt8URlt7.js +46051 -0
- package/dist/layers.DthXXXVJ.js +7 -0
- package/dist/layers.DuM1ysX6.js +36 -0
- package/dist/layers.DwG2v97l.js +139 -0
- package/dist/layers.Dwk2gG9L.js +9166 -0
- package/dist/layers.DxA6ocdw.js +70 -0
- package/dist/layers.Dxon_SpH.js +437 -0
- package/dist/layers.Dxv8e90o.js +34 -0
- package/dist/layers.Dy1naDTQ.js +14 -0
- package/dist/layers.Dy9Ae6ye.js +32 -0
- package/dist/layers.DyBo3wCO.js +9 -0
- package/dist/layers.Er0Yxkpp.js +10 -0
- package/dist/layers.Fv-Yf9nu.js +139 -0
- package/dist/layers.H8_UdVel.js +186 -0
- package/dist/layers.IeyYHv3-.js +1 -0
- package/dist/layers.JWCLFILJ.js +1 -0
- package/dist/layers.Kk33fmYB.js +1 -0
- package/dist/layers.NMvDHXOi.js +3 -0
- package/dist/layers.NisZX3oz.js +9 -0
- package/dist/layers.OJRwPbTb.js +51 -0
- package/dist/layers.PxLIa0D9.js +9 -0
- package/dist/layers.SDGJaT4i.js +8 -0
- package/dist/layers.TB0kcmT1.js +9 -0
- package/dist/layers.TRk5qM88.js +4 -0
- package/dist/layers.VHr4X3Bl.js +36 -0
- package/dist/layers.W2b5CJ53.js +41 -0
- package/dist/layers.YmJMGuL6.js +501 -0
- package/dist/layers.YuQYdfgw.js +1 -0
- package/dist/layers._aTgLW5P.js +1 -0
- package/dist/layers._w72bWjP.js +1 -0
- package/dist/layers._z96be1r.js +373 -0
- package/dist/layers.aNq3Aoz_.js +1 -0
- package/dist/layers.b0h5ZBmD.js +61 -0
- package/dist/layers.bxln61RT.js +1 -0
- package/dist/layers.cFjqiC8n.js +4 -0
- package/dist/layers.cfvpgx5k.js +220 -0
- package/dist/layers.csejPfBA.js +1 -0
- package/dist/layers.dQr3-Z-a.js +32 -0
- package/dist/layers.fCvSPAGO.js +282 -0
- package/dist/layers.fresRNdv.js +37 -0
- package/dist/layers.hweLqW3I.js +261 -0
- package/dist/layers.il5QgiwT.js +41 -0
- package/dist/layers.jAiLqRNH.js +38 -0
- package/dist/layers.jOg9HQjO.js +32 -0
- package/dist/layers.kldsO2Gk.js +41 -0
- package/dist/layers.lCpg7dOn.js +21 -0
- package/dist/layers.ng4ZQgam.js +10 -0
- package/dist/layers.oUgqEjka.js +21938 -0
- package/dist/layers.od048jSt.js +21763 -0
- package/dist/layers.qfBgI37V.js +48146 -0
- package/dist/layers.qpJTJjGB.js +5 -0
- package/dist/layers.r5_AAPug.js +1 -0
- package/dist/layers.rbM030Pg.js +37 -0
- package/dist/layers.rqs7i__i.js +59 -0
- package/dist/layers.sVUulQAX.js +41 -0
- package/dist/layers.tvXlPGuZ.js +32 -0
- package/dist/layers.ujoBmjI9.js +9 -0
- package/dist/layers.vNkQnMGw.js +1 -0
- package/dist/layers.vai0zC-y.js +2479 -0
- package/dist/layers.xAfqQ9El.js +122 -0
- package/dist/layers.xpxtBlob.js +37 -0
- package/dist/layers.zWXxVCvZ.js +8 -0
- package/package.json +18 -76
- package/dist/layers.B10sB-Vy.js +0 -1
- package/dist/layers.BDsvvINb.js +0 -6774
- package/dist/layers.BFJ7oQiY.js +0 -7723
- package/dist/layers.BwyONivc.js +0 -864
- package/dist/layers.C2lacXcg.js +0 -2511
- package/dist/layers.C69TrYD7.js +0 -7
- package/dist/layers.CEMW9z_P.js +0 -4
- package/dist/layers.Cwao1pOZ.js +0 -6
- package/dist/layers.CzNz0Zya.js +0 -1
- package/dist/layers.D0Z-zLAV.js +0 -530
- package/dist/layers.DNCgFYS7.js +0 -27
- package/dist/layers.EKDSoJm1.js +0 -2227
- package/dist/layers.QjAkD17S.js +0 -3677
- package/dist/layers.ahDFHQXD.js +0 -341
- package/dist/layers.eLiGm-eZ.js +0 -3
- package/dist/layers.hgliNTDV.js +0 -2
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { s as A, d as S, p as G } from "./layers.CMumGCgO.js";
|
|
2
|
+
import { g as v, l as y, d as B, e as W, r as $, u as M, X as I } from "./layers.Dwk2gG9L.js";
|
|
3
|
+
import "lodash-es";
|
|
4
|
+
import { l as X } from "./layers.D4T8fTcj.js";
|
|
5
|
+
import { G as O } from "./layers.BJDrjORS.js";
|
|
6
|
+
import "./layers.od048jSt.js";
|
|
7
|
+
import { l as P } from "./layers.DgMWKPPz.js";
|
|
8
|
+
let H = 0;
|
|
9
|
+
const Y = function(i, a, t, o, p) {
|
|
10
|
+
const g = function(e) {
|
|
11
|
+
switch (e) {
|
|
12
|
+
case p.db.relationType.AGGREGATION:
|
|
13
|
+
return "aggregation";
|
|
14
|
+
case p.db.relationType.EXTENSION:
|
|
15
|
+
return "extension";
|
|
16
|
+
case p.db.relationType.COMPOSITION:
|
|
17
|
+
return "composition";
|
|
18
|
+
case p.db.relationType.DEPENDENCY:
|
|
19
|
+
return "dependency";
|
|
20
|
+
case p.db.relationType.LOLLIPOP:
|
|
21
|
+
return "lollipop";
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
a.points = a.points.filter((e) => !Number.isNaN(e.y));
|
|
25
|
+
const s = a.points, c = P().x(function(e) {
|
|
26
|
+
return e.x;
|
|
27
|
+
}).y(function(e) {
|
|
28
|
+
return e.y;
|
|
29
|
+
}).curve($), n = i.append("path").attr("d", c(s)).attr("id", "edge" + H).attr("class", "relation");
|
|
30
|
+
let r = "";
|
|
31
|
+
o.arrowMarkerAbsolute && (r = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, r = r.replace(/\(/g, "\\("), r = r.replace(/\)/g, "\\)")), t.relation.lineType == 1 && n.attr("class", "relation dashed-line"), t.relation.lineType == 10 && n.attr("class", "relation dotted-line"), t.relation.type1 !== "none" && n.attr(
|
|
32
|
+
"marker-start",
|
|
33
|
+
"url(" + r + "#" + g(t.relation.type1) + "Start)"
|
|
34
|
+
), t.relation.type2 !== "none" && n.attr(
|
|
35
|
+
"marker-end",
|
|
36
|
+
"url(" + r + "#" + g(t.relation.type2) + "End)"
|
|
37
|
+
);
|
|
38
|
+
let f, h;
|
|
39
|
+
const x = a.points.length;
|
|
40
|
+
let b = M.calcLabelPosition(a.points);
|
|
41
|
+
f = b.x, h = b.y;
|
|
42
|
+
let u, m, w, k;
|
|
43
|
+
if (x % 2 !== 0 && x > 1) {
|
|
44
|
+
let e = M.calcCardinalityPosition(
|
|
45
|
+
t.relation.type1 !== "none",
|
|
46
|
+
a.points,
|
|
47
|
+
a.points[0]
|
|
48
|
+
), d = M.calcCardinalityPosition(
|
|
49
|
+
t.relation.type2 !== "none",
|
|
50
|
+
a.points,
|
|
51
|
+
a.points[x - 1]
|
|
52
|
+
);
|
|
53
|
+
y.debug("cardinality_1_point " + JSON.stringify(e)), y.debug("cardinality_2_point " + JSON.stringify(d)), u = e.x, m = e.y, w = d.x, k = d.y;
|
|
54
|
+
}
|
|
55
|
+
if (t.title !== void 0) {
|
|
56
|
+
const e = i.append("g").attr("class", "classLabel"), d = e.append("text").attr("class", "label").attr("x", f).attr("y", h).attr("fill", "red").attr("text-anchor", "middle").text(t.title);
|
|
57
|
+
window.label = d;
|
|
58
|
+
const l = d.node().getBBox();
|
|
59
|
+
e.insert("rect", ":first-child").attr("class", "box").attr("x", l.x - o.padding / 2).attr("y", l.y - o.padding / 2).attr("width", l.width + o.padding).attr("height", l.height + o.padding);
|
|
60
|
+
}
|
|
61
|
+
y.info("Rendering relation " + JSON.stringify(t)), t.relationTitle1 !== void 0 && t.relationTitle1 !== "none" && i.append("g").attr("class", "cardinality").append("text").attr("class", "type1").attr("x", u).attr("y", m).attr("fill", "black").attr("font-size", "6").text(t.relationTitle1), t.relationTitle2 !== void 0 && t.relationTitle2 !== "none" && i.append("g").attr("class", "cardinality").append("text").attr("class", "type2").attr("x", w).attr("y", k).attr("fill", "black").attr("font-size", "6").text(t.relationTitle2), H++;
|
|
62
|
+
}, J = function(i, a, t, o) {
|
|
63
|
+
y.debug("Rendering class ", a, t);
|
|
64
|
+
const p = a.id, g = {
|
|
65
|
+
id: p,
|
|
66
|
+
label: a.id,
|
|
67
|
+
width: 0,
|
|
68
|
+
height: 0
|
|
69
|
+
}, s = i.append("g").attr("id", o.db.lookUpDomId(p)).attr("class", "classGroup");
|
|
70
|
+
let c;
|
|
71
|
+
a.link ? c = s.append("svg:a").attr("xlink:href", a.link).attr("target", a.linkTarget).append("text").attr("y", t.textHeight + t.padding).attr("x", 0) : c = s.append("text").attr("y", t.textHeight + t.padding).attr("x", 0);
|
|
72
|
+
let n = !0;
|
|
73
|
+
a.annotations.forEach(function(d) {
|
|
74
|
+
const l = c.append("tspan").text("«" + d + "»");
|
|
75
|
+
n || l.attr("dy", t.textHeight), n = !1;
|
|
76
|
+
});
|
|
77
|
+
let r = C(a);
|
|
78
|
+
const f = c.append("tspan").text(r).attr("class", "title");
|
|
79
|
+
n || f.attr("dy", t.textHeight);
|
|
80
|
+
const h = c.node().getBBox().height;
|
|
81
|
+
let x, b, u;
|
|
82
|
+
if (a.members.length > 0) {
|
|
83
|
+
x = s.append("line").attr("x1", 0).attr("y1", t.padding + h + t.dividerMargin / 2).attr("y2", t.padding + h + t.dividerMargin / 2);
|
|
84
|
+
const d = s.append("text").attr("x", t.padding).attr("y", h + t.dividerMargin + t.textHeight).attr("fill", "white").attr("class", "classText");
|
|
85
|
+
n = !0, a.members.forEach(function(l) {
|
|
86
|
+
_(d, l, n, t), n = !1;
|
|
87
|
+
}), b = d.node().getBBox();
|
|
88
|
+
}
|
|
89
|
+
if (a.methods.length > 0) {
|
|
90
|
+
u = s.append("line").attr("x1", 0).attr("y1", t.padding + h + t.dividerMargin + b.height).attr("y2", t.padding + h + t.dividerMargin + b.height);
|
|
91
|
+
const d = s.append("text").attr("x", t.padding).attr("y", h + 2 * t.dividerMargin + b.height + t.textHeight).attr("fill", "white").attr("class", "classText");
|
|
92
|
+
n = !0, a.methods.forEach(function(l) {
|
|
93
|
+
_(d, l, n, t), n = !1;
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
const m = s.node().getBBox();
|
|
97
|
+
var w = " ";
|
|
98
|
+
a.cssClasses.length > 0 && (w = w + a.cssClasses.join(" "));
|
|
99
|
+
const e = s.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", m.width + 2 * t.padding).attr("height", m.height + t.padding + 0.5 * t.dividerMargin).attr("class", w).node().getBBox().width;
|
|
100
|
+
return c.node().childNodes.forEach(function(d) {
|
|
101
|
+
d.setAttribute("x", (e - d.getBBox().width) / 2);
|
|
102
|
+
}), a.tooltip && c.insert("title").text(a.tooltip), x && x.attr("x2", e), u && u.attr("x2", e), g.width = e, g.height = m.height + t.padding + 0.5 * t.dividerMargin, g;
|
|
103
|
+
}, C = function(i) {
|
|
104
|
+
let a = i.id;
|
|
105
|
+
return i.type && (a += "<" + I(i.type) + ">"), a;
|
|
106
|
+
}, Z = function(i, a, t, o) {
|
|
107
|
+
y.debug("Rendering note ", a, t);
|
|
108
|
+
const p = a.id, g = {
|
|
109
|
+
id: p,
|
|
110
|
+
text: a.text,
|
|
111
|
+
width: 0,
|
|
112
|
+
height: 0
|
|
113
|
+
}, s = i.append("g").attr("id", p).attr("class", "classGroup");
|
|
114
|
+
let c = s.append("text").attr("y", t.textHeight + t.padding).attr("x", 0);
|
|
115
|
+
const n = JSON.parse(`"${a.text}"`).split(`
|
|
116
|
+
`);
|
|
117
|
+
n.forEach(function(x) {
|
|
118
|
+
y.debug(`Adding line: ${x}`), c.append("tspan").text(x).attr("class", "title").attr("dy", t.textHeight);
|
|
119
|
+
});
|
|
120
|
+
const r = s.node().getBBox(), h = s.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", r.width + 2 * t.padding).attr(
|
|
121
|
+
"height",
|
|
122
|
+
r.height + n.length * t.textHeight + t.padding + 0.5 * t.dividerMargin
|
|
123
|
+
).node().getBBox().width;
|
|
124
|
+
return c.node().childNodes.forEach(function(x) {
|
|
125
|
+
x.setAttribute("x", (h - x.getBBox().width) / 2);
|
|
126
|
+
}), g.width = h, g.height = r.height + n.length * t.textHeight + t.padding + 0.5 * t.dividerMargin, g;
|
|
127
|
+
}, _ = function(i, a, t, o) {
|
|
128
|
+
const { displayText: p, cssStyle: g } = a.getDisplayDetails(), s = i.append("tspan").attr("x", o.padding).text(p);
|
|
129
|
+
g !== "" && s.attr("style", a.cssStyle), t || s.attr("dy", o.textHeight);
|
|
130
|
+
}, N = {
|
|
131
|
+
getClassTitleString: C,
|
|
132
|
+
drawClass: J,
|
|
133
|
+
drawEdge: Y,
|
|
134
|
+
drawNote: Z
|
|
135
|
+
};
|
|
136
|
+
let T = {};
|
|
137
|
+
const E = 20, L = function(i) {
|
|
138
|
+
const a = Object.entries(T).find((t) => t[1].label === i);
|
|
139
|
+
if (a)
|
|
140
|
+
return a[0];
|
|
141
|
+
}, R = function(i) {
|
|
142
|
+
i.append("defs").append("marker").attr("id", "extensionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), i.append("defs").append("marker").attr("id", "extensionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z"), i.append("defs").append("marker").attr("id", "compositionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), i.append("defs").append("marker").attr("id", "compositionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), i.append("defs").append("marker").attr("id", "aggregationStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), i.append("defs").append("marker").attr("id", "aggregationEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), i.append("defs").append("marker").attr("id", "dependencyStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), i.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
|
|
143
|
+
}, F = function(i, a, t, o) {
|
|
144
|
+
const p = v().class;
|
|
145
|
+
T = {}, y.info("Rendering diagram " + i);
|
|
146
|
+
const g = v().securityLevel;
|
|
147
|
+
let s;
|
|
148
|
+
g === "sandbox" && (s = B("#i" + a));
|
|
149
|
+
const c = g === "sandbox" ? B(s.nodes()[0].contentDocument.body) : B("body"), n = c.select(`[id='${a}']`);
|
|
150
|
+
R(n);
|
|
151
|
+
const r = new O({
|
|
152
|
+
multigraph: !0
|
|
153
|
+
});
|
|
154
|
+
r.setGraph({
|
|
155
|
+
isMultiGraph: !0
|
|
156
|
+
}), r.setDefaultEdgeLabel(function() {
|
|
157
|
+
return {};
|
|
158
|
+
});
|
|
159
|
+
const f = o.db.getClasses(), h = Object.keys(f);
|
|
160
|
+
for (const e of h) {
|
|
161
|
+
const d = f[e], l = N.drawClass(n, d, p, o);
|
|
162
|
+
T[l.id] = l, r.setNode(l.id, l), y.info("Org height: " + l.height);
|
|
163
|
+
}
|
|
164
|
+
o.db.getRelations().forEach(function(e) {
|
|
165
|
+
y.info(
|
|
166
|
+
// cspell:ignore tjoho
|
|
167
|
+
"tjoho" + L(e.id1) + L(e.id2) + JSON.stringify(e)
|
|
168
|
+
), r.setEdge(
|
|
169
|
+
L(e.id1),
|
|
170
|
+
L(e.id2),
|
|
171
|
+
{
|
|
172
|
+
relation: e
|
|
173
|
+
},
|
|
174
|
+
e.title || "DEFAULT"
|
|
175
|
+
);
|
|
176
|
+
}), o.db.getNotes().forEach(function(e) {
|
|
177
|
+
y.debug(`Adding note: ${JSON.stringify(e)}`);
|
|
178
|
+
const d = N.drawNote(n, e, p, o);
|
|
179
|
+
T[d.id] = d, r.setNode(d.id, d), e.class && e.class in f && r.setEdge(
|
|
180
|
+
e.id,
|
|
181
|
+
L(e.class),
|
|
182
|
+
{
|
|
183
|
+
relation: {
|
|
184
|
+
id1: e.id,
|
|
185
|
+
id2: e.class,
|
|
186
|
+
relation: {
|
|
187
|
+
type1: "none",
|
|
188
|
+
type2: "none",
|
|
189
|
+
lineType: 10
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"DEFAULT"
|
|
194
|
+
);
|
|
195
|
+
}), X(r), r.nodes().forEach(function(e) {
|
|
196
|
+
e !== void 0 && r.node(e) !== void 0 && (y.debug("Node " + e + ": " + JSON.stringify(r.node(e))), c.select("#" + (o.db.lookUpDomId(e) || e)).attr(
|
|
197
|
+
"transform",
|
|
198
|
+
"translate(" + (r.node(e).x - r.node(e).width / 2) + "," + (r.node(e).y - r.node(e).height / 2) + " )"
|
|
199
|
+
));
|
|
200
|
+
}), r.edges().forEach(function(e) {
|
|
201
|
+
e !== void 0 && r.edge(e) !== void 0 && (y.debug("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(r.edge(e))), N.drawEdge(n, r.edge(e), r.edge(e).relation, p, o));
|
|
202
|
+
});
|
|
203
|
+
const u = n.node().getBBox(), m = u.width + E * 2, w = u.height + E * 2;
|
|
204
|
+
W(n, w, m, p.useMaxWidth);
|
|
205
|
+
const k = `${u.x - E} ${u.y - E} ${m} ${w}`;
|
|
206
|
+
y.debug(`viewBox ${k}`), n.attr("viewBox", k);
|
|
207
|
+
}, U = {
|
|
208
|
+
draw: F
|
|
209
|
+
}, tt = {
|
|
210
|
+
parser: G,
|
|
211
|
+
db: S,
|
|
212
|
+
renderer: U,
|
|
213
|
+
styles: A,
|
|
214
|
+
init: (i) => {
|
|
215
|
+
i.class || (i.class = {}), i.class.arrowMarkerAbsolute = i.arrowMarkerAbsolute, S.clear();
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
export {
|
|
219
|
+
tt as diagram
|
|
220
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./layers.ChhuzqF0.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:"加入「使用 Excalidraw 製圖」水印",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:"使用 Excalidraw 製圖",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:""},u={noItems:"",hint_emptyLibrary:"",hint_emptyPrivateLibrary:""},o={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:""},r={clearReset:"【‼️ 警告 ‼️ 無法復原的動作】你確定要清空呢塊畫布嗎?",couldNotCreateShareableLink:"",couldNotCreateShareableLinkTooBig:"",couldNotLoadInvalidFile:"",importBackendFailed:"",cannotExportEmptyCanvas:"無嘢可以匯出喎~畫吓嘢先?",couldNotCopyToClipboard:"",decryptFailed:"",uploadedSecurly:"",loadSceneOverridePrompt:"",collabStopOverridePrompt:"",errorAddingToLibrary:"",errorRemovingFromLibrary:"",confirmAddLibrary:"",imageDoesNotContainScene:"",cannotRestoreFromImage:"",invalidSceneUrl:"",resetLibrary:"",removeItemsFromsLibrary:"",invalidEncryptionKey:"",collabOfflineWarning:""},t={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:""},a={selection:"",image:"",rectangle:"",diamond:"",ellipse:"",arrow:"",line:"",freedraw:"",text:"",library:"",lock:"",penMode:"",link:"",eraser:"",frame:"",magicframe:"",embeddable:"",laser:"",hand:"",extraTools:"",mermaidToExcalidraw:"",magicSettings:""},i={canvasActions:"畫布動作",selectedShapeActions:"",shapes:""},l={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:""},n={cannotShowPreview:"無法顯示預覽",canvasTooBig:"塊畫布太大啦,縮細啲先啦?",canvasTooBigTip:""},s={headingMain:"",clearCanvasMessage:"如果重新整理頁面都係睇唔到,你可以<button>清空畫布</button>",clearCanvasCaveat:"(注意:呢個動作會直接丟棄你嘅作品,並且無法復原)",trackedToSentry:"",openIssueMessage:"",sceneContent:""},d={desc_intro:"",desc_privacy:"",button_startSession:"",button_stopSession:"",desc_inProgressIntro:"",desc_shareLink:"",desc_exitSession:"",shareTitle:""},c={title:""},F={disk_title:"",disk_details:"",disk_button:"",link_title:"",link_details:"",link_button:"",excalidrawplus_description:"",excalidrawplus_button:"",excalidrawplus_exportError:""},m={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:""},p={title:""},g={title:"",itemName:"",authorName:"",githubUsername:"",twitterUsername:"",libraryName:"",libraryDesc:"",website:"",placeholder:{authorName:"",libraryName:"",libraryDesc:"",githubHandle:"",twitterHandle:"",website:""},errors:{required:"",website:""},noteDescription:"",noteGuidelines:"",noteLicense:"",noteItems:"",atleastOneLibItem:"",republishWarning:""},E={title:"",content:""},b={resetLibrary:"",removeItemsFromLib:""},D={header:"",label:{withBackground:"",onlySelected:"",darkMode:"",embedScene:"",scale:"",padding:""},tooltip:{embedScene:""},title:{exportToPng:"",exportToSvg:"",copyPngToClipboard:""},button:{exportToPng:"",exportToSvg:"",copyPngToClipboard:""}},C={tooltip:"",link:""},A={angle:"",element:"",elements:"",height:"",scene:"",selected:"",storage:"",title:"",total:"",version:"",versionCopy:"",versionNotAvailable:"",width:""},B={addedToLibrary:"",copyStyles:"",copyToClipboard:"",copyToClipboardAsPng:"",fileSaved:"",fileSavedToFilename:"",canvas:"畫布",selection:"",pasteAsSingleElement:"",unableToEmbed:"",unrecognizedLinkFormat:""},h={transparent:"",black:"",white:"",red:"",pink:"",grape:"",violet:"",gray:"",blue:"",cyan:"",teal:"",green:"",yellow:"",orange:"",bronze:""},y={app:{center_heading:"",center_heading_plus:"",menuHint:""},defaults:{menuHint:"",center_heading:"",toolbarHint:"",helpHint:""}},v={mostUsedCustomColors:"",colors:"",shades:"",hexCode:"",noShades:""},S={action:{exportToImage:{title:"",button:"",description:""},saveToDisk:{title:"",button:"",description:""},excalidrawPlus:{title:"",button:"",description:""}},modal:{loadFromFile:{title:"",button:"",description:""},shareableLink:{title:"",button:"",description:""}}},w={title:"",button:"",description:"",syntax:"",preview:""},k={labels:e,library:u,buttons:o,alerts:r,errors:t,toolBar:a,headings:i,hints:l,canvasError:n,errorSplash:s,roomDialog:d,errorDialog:c,exportDialog:F,helpDialog:m,clearCanvasDialog:p,publishDialog:g,publishSuccessDialog:E,confirmDialog:b,imageExportDialog:D,encrypted:C,stats:A,toast:B,colors:h,welcomeScreen:y,colorPicker:v,overwriteConfirm:S,mermaid:w};exports.alerts=r;exports.buttons=o;exports.canvasError=n;exports.clearCanvasDialog=p;exports.colorPicker=v;exports.colors=h;exports.confirmDialog=b;exports.default=k;exports.encrypted=C;exports.errorDialog=c;exports.errorSplash=s;exports.errors=t;exports.exportDialog=F;exports.headings=i;exports.helpDialog=m;exports.hints=l;exports.imageExportDialog=D;exports.labels=e;exports.library=u;exports.mermaid=w;exports.overwriteConfirm=S;exports.publishDialog=g;exports.publishSuccessDialog=E;exports.roomDialog=d;exports.stats=A;exports.toast=B;exports.toolBar=a;exports.welcomeScreen=y;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import "./layers.od048jSt.js";
|
|
2
|
+
var e = { paste: "Qoyıw", pasteAsPlaintext: "Ápiwayı tekst retinde qoyıw", pasteCharts: "Diagrammalardı qoyıw", selectAll: "Barlıǵın tańlaw", multiSelect: "", moveCanvas: "", cut: "Qıyıw", copy: "Kóshirip alıw", copyAsPng: "Almasıw buferine PNG retinde kóshirip alıw", copyAsSvg: "Almasıw buferine SVG retinde kóshirip alıw", copyText: "Almasıw buferine tekst retinde kóshirip alıw", copySource: "", convertToCode: "", bringForward: "", sendToBack: "", bringToFront: "", sendBackward: "", delete: "Óshiriw", copyStyles: "", pasteStyles: "", stroke: "Jiyek", background: "Fon", fill: "", strokeWidth: "", strokeStyle: "", strokeStyle_solid: "", strokeStyle_dashed: "", strokeStyle_dotted: "", sloppiness: "", opacity: "", textAlign: "", edges: "Qırlar", sharp: "", round: "", arrowheads: "", arrowhead_none: "Joq", arrowhead_arrow: "Jebe", arrowhead_bar: "", arrowhead_circle: "", arrowhead_circle_outline: "", arrowhead_triangle: "", arrowhead_triangle_outline: "", arrowhead_diamond: "", arrowhead_diamond_outline: "", fontSize: "Shrift ólshemi", fontFamily: "Shrift toplamı", addWatermark: "", handDrawn: "", normal: "", code: "Kod", small: "", medium: "Ortasha", large: "Úlken", veryLarge: "Júdá úlken", solid: "", hachure: "", zigzag: "Zigzag", crossHatch: "", thin: "Jińishke", bold: "Qalıń", left: "", center: "", right: "", extraBold: "", architect: "", artist: "Súwretshi", cartoonist: "", fileTitle: "Fayl ataması", colorPicker: "Reńdi tańlaw", canvasColors: "", canvasBackground: "", drawingCanvas: "", layers: "Qatlamlar", actions: "Háreketler", language: "Til", liveCollaboration: "", duplicateSelection: "Nusqa", untitled: "Atamasız", name: "Ataması", yourName: "Atıńız", madeWithExcalidraw: "Excalidraw járdeminde islengen", group: "", ungroup: "", collaborators: "Qatnasıwshılar", showGrid: "", addToLibrary: "Kitapxanaǵa qosıw", removeFromLibrary: "Kitapxanadan alıp taslaw", libraryLoadingMessage: "Kitapxana júklenbekte…", libraries: "Kitapxanalardı kóriw", loadingScene: "Saxna júklenbekte…", align: "", alignTop: "", alignBottom: "", alignLeft: "", alignRight: "", centerVertically: "", centerHorizontally: "", distributeHorizontally: "", distributeVertically: "", flipHorizontal: "", flipVertical: "", viewMode: "Kóriw rejimi", share: "Bólisiw", showStroke: "", showBackground: "", toggleTheme: "Temanı ózgertiw", personalLib: "Jeke kitapxana", excalidrawLib: "Excalidraw kitapxanası", decreaseFontSize: "Shrift ólshemin kishireytiw", increaseFontSize: "Shrift ólshemin úlkeytiw", unbindText: "", bindText: "", createContainerFromText: "", link: { edit: "Siltemeni ózgertiw", editEmbed: "", create: "Siltemeni jaratıw", createEmbed: "", label: "Silteme", labelEmbed: "", empty: "" }, lineEditor: { edit: "Qatardı ózgertiw", exit: "Qatardı ózgertiw redaktorınan shıǵıw" }, elementLock: { lock: "Qulıplaw", unlock: "Qulıptan shıǵarıw", lockAll: "Barlıǵın qulıplaw", unlockAll: "Barlıǵın qulıptan shıǵarıw" }, statusPublished: "", sidebarLock: "", selectAllElementsInFrame: "", removeAllElementsFromFrame: "", eyeDropper: "", textToDiagram: "", prompt: "" }, a = { noItems: "", hint_emptyLibrary: "", hint_emptyPrivateLibrary: "" }, r = { clearReset: "", exportJSON: "", exportImage: "Súwretti eksportlaw...", export: "Retinde saqlaw...", copyToClipboard: "Almasıw buferine kóshirip alındı", save: "Ámeldegi faylǵa saqlaw", saveAs: "Retinde saqlaw", load: "Ashıw", getShareableLink: "", close: "Jabıw", selectLanguage: "Tildi tańlaw", scrollBackToContent: "", zoomIn: "", zoomOut: "", resetZoom: "", menu: "Menyu", done: "Tayın", edit: "Ózgertiw", undo: "", redo: "", resetLibrary: "", createNewRoom: "", fullScreen: "Tolıq ekran", darkMode: "Qarańǵı tema", lightMode: "Jaqtı tema", zenMode: "", objectsSnapMode: "", exitZenMode: "", cancel: "Biykarlaw", clear: "Tazalaw", remove: "Óshiriw", embed: "", publishLibrary: "Jariyalaw", submit: "Jiberiw", confirm: "Tastıyıqlaw", embeddableInteractionButton: "" }, t = { clearReset: "", couldNotCreateShareableLink: "", couldNotCreateShareableLinkTooBig: "", couldNotLoadInvalidFile: "", importBackendFailed: "", cannotExportEmptyCanvas: "", couldNotCopyToClipboard: "Almasıw buferine kóshirip alıw ámelge aspadı.", decryptFailed: "", uploadedSecurly: "", loadSceneOverridePrompt: "", collabStopOverridePrompt: "", errorAddingToLibrary: "", errorRemovingFromLibrary: "", confirmAddLibrary: "", imageDoesNotContainScene: "", cannotRestoreFromImage: "", invalidSceneUrl: "", resetLibrary: "", removeItemsFromsLibrary: "", invalidEncryptionKey: "", collabOfflineWarning: "" }, i = { unsupportedFileType: "", imageInsertError: "", fileTooBig: "", svgImageInsertError: "", failedToFetchImage: "", invalidSVGString: "Jaramsız SVG.", cannotResolveCollabServer: "", importLibraryError: "Kitapxananı júklew ámelge aspadı", collabSaveFailed: "", collabSaveFailed_sizeExceeded: "", imageToolNotSupported: "", brave_measure_text_error: { line1: "", line2: "", line3: "", line4: "" }, libraryElementTypeError: { embeddable: "", iframe: "", image: "" }, asyncPasteFailedOnRead: "", asyncPasteFailedOnParse: "", copyToSystemClipboardFailed: "" }, l = { selection: "", image: "Súwret qoyıw", rectangle: "Tórt múyeshlik", diamond: "", ellipse: "", arrow: "", line: "Sızıq", freedraw: "Sızıw", text: "Tekst", library: "Kitapxana", lock: "", penMode: "", link: "", eraser: "Óshirgish", frame: "", magicframe: "", embeddable: "", laser: "", hand: "", extraTools: "", mermaidToExcalidraw: "", magicSettings: "" }, o = { canvasActions: "", selectedShapeActions: "", shapes: "Figuralar" }, n = { canvasPanning: "", linearElement: "", freeDraw: "", text: "", embeddable: "", text_selected: "", text_editing: "", linearElementMulti: "", lockAngle: "", resize: "", resizeImage: "", rotate: "", lineEditor_info: "", lineEditor_pointSelected: "", lineEditor_nothingSelected: "", placeImage: "", publishLibrary: "", bindTextToElement: "Tekst qosıw ushın Enter túymesin basıń", deepBoxSelect: "", eraserRevert: "", firefox_clipboard_write: "", disableSnapping: "" }, s = { cannotShowPreview: "Aldınnan kóriwdi kórsetiw múmkin emes", canvasTooBig: "", canvasTooBigTip: "" }, u = { headingMain: "", clearCanvasMessage: "", clearCanvasCaveat: "", trackedToSentry: "", openIssueMessage: "", sceneContent: "" }, d = { desc_intro: "", desc_privacy: "", button_startSession: "", button_stopSession: "", desc_inProgressIntro: "", desc_shareLink: "", desc_exitSession: "", shareTitle: "" }, c = { title: "Qátelik" }, m = { disk_title: "Diskke saqlaw", disk_details: "", disk_button: "Faylǵa saqlaw", link_title: "", link_details: "", link_button: "Siltemege eksportlaw", excalidrawplus_description: "", excalidrawplus_button: "Eksportlaw", excalidrawplus_exportError: "" }, p = { blog: "Biziń blogtı oqıń", click: "basıw", deepSelect: "", deepBoxSelect: "", curvedArrow: "", curvedLine: "", documentation: "Hújjetshilik", doubleClick: "", drag: "", editor: "Redaktor", editLineArrowPoints: "", editText: "", github: "", howto: "", or: "yamasa", preventBinding: "", tools: "Ásbaplar", shortcuts: "", textFinish: "", textNewLine: "", title: "Járdem", view: "Kóriw", zoomToFit: "", zoomToSelection: "", toggleElementLock: "", movePageUpDown: "", movePageLeftRight: "" }, w = { title: "" }, b = { title: "", itemName: "", authorName: "Avtor atı", githubUsername: "GitHub paydalanıwshı atı", twitterUsername: "Twitter paydalanıwshı atı", libraryName: "Kitapxana ataması", libraryDesc: "", website: "Veb-sayt", placeholder: { authorName: "Atıńız yamasa paydalanıwshı atı", libraryName: "Kitapxanańız ataması", libraryDesc: "", githubHandle: "", twitterHandle: "", website: "Jeke veb-saytıńız yamasa basqa saytqa silteme (májbúriy emes)" }, errors: { required: "Májbúriy", website: "Jaramlı URL mánzil kirgiziń" }, noteDescription: "", noteGuidelines: "", noteLicense: "", noteItems: "", atleastOneLibItem: "", republishWarning: "" }, g = { title: "Kitapxana jiberildi", content: "" }, x = { resetLibrary: "Kitapxananı qayta ornatıw", removeItemsFromLib: "" }, h = { header: "Súwretti eksportlaw", label: { withBackground: "Fon", onlySelected: "", darkMode: "Qarańǵı tema", embedScene: "", scale: "Kólem", padding: "" }, tooltip: { embedScene: "" }, title: { exportToPng: "", exportToSvg: "", copyPngToClipboard: "" }, button: { exportToPng: "PNG", exportToSvg: "SVG", copyPngToClipboard: "Almasıw buferine kóshirip alıw" } }, y = { tooltip: "", link: "" }, k = { angle: "", element: "Element", elements: "Elementler", height: "", scene: "Saxna", selected: "Tańlandı", storage: "", title: "", total: "", version: "Versiya", versionCopy: "Kóshirip alıw ushın basıń", versionNotAvailable: "", width: "Eni" }, F = { addedToLibrary: "Kitapxanaǵa qosıldı", copyStyles: "", copyToClipboard: "Almasıw buferine kóshirip alındı.", copyToClipboardAsPng: "", fileSaved: "Fayl saqlandı.", fileSavedToFilename: "{filename} saqlandı", canvas: "", selection: "", pasteAsSingleElement: "", unableToEmbed: "", unrecognizedLinkFormat: "" }, S = { transparent: "", black: "Qara", white: "Aq", red: "Qızıl", pink: "Qızǵılt", grape: "", violet: "Qızǵılt kók", gray: "", blue: "Kók", cyan: "Kók aspan", teal: "Piruza", green: "Jasıl", yellow: "Sarı", orange: "Qızǵılt sarı", bronze: "" }, v = { app: { center_heading: "", center_heading_plus: "Excalidraw+ ge ótiwdi qáleysiz be?", menuHint: "Eksportlaw, sazlawlar, tiller, ..." }, defaults: { menuHint: "Eksportlaw, sazlawlar hám basqa...", center_heading: "Diagrammalar. Ápiwayı.", toolbarHint: "", helpHint: "" } }, T = { mostUsedCustomColors: "Kóp qollanılatuǵın arnawlı reńler", colors: "Reńler", shades: "", hexCode: "", noShades: "" }, A = { action: { exportToImage: { title: "Súwret retinde eksportlaw", button: "Súwret retinde eksportlaw", description: "" }, saveToDisk: { title: "Diskke saqlaw", button: "Diskke saqlaw", description: "" }, excalidrawPlus: { title: "Excalidraw+", button: "", description: "" } }, modal: { loadFromFile: { title: "Fayldan júklew", button: "Fayldan júklew", description: "" }, shareableLink: { title: "Siltemeden júklew", button: "", description: "" } } }, E = { title: "", button: "", description: "", syntax: "", preview: "" }, f = { labels: e, library: a, buttons: r, alerts: t, errors: i, toolBar: l, headings: o, hints: n, canvasError: s, errorSplash: u, roomDialog: d, errorDialog: c, exportDialog: m, helpDialog: p, clearCanvasDialog: w, publishDialog: b, publishSuccessDialog: g, confirmDialog: x, imageExportDialog: h, encrypted: y, stats: k, toast: F, colors: S, welcomeScreen: v, colorPicker: T, overwriteConfirm: A, mermaid: E };
|
|
3
|
+
export {
|
|
4
|
+
t as alerts,
|
|
5
|
+
r as buttons,
|
|
6
|
+
s as canvasError,
|
|
7
|
+
w as clearCanvasDialog,
|
|
8
|
+
T as colorPicker,
|
|
9
|
+
S as colors,
|
|
10
|
+
x as confirmDialog,
|
|
11
|
+
f as default,
|
|
12
|
+
y as encrypted,
|
|
13
|
+
c as errorDialog,
|
|
14
|
+
u as errorSplash,
|
|
15
|
+
i as errors,
|
|
16
|
+
m as exportDialog,
|
|
17
|
+
o as headings,
|
|
18
|
+
p as helpDialog,
|
|
19
|
+
n as hints,
|
|
20
|
+
h as imageExportDialog,
|
|
21
|
+
e as labels,
|
|
22
|
+
a as library,
|
|
23
|
+
E as mermaid,
|
|
24
|
+
A as overwriteConfirm,
|
|
25
|
+
b as publishDialog,
|
|
26
|
+
g as publishSuccessDialog,
|
|
27
|
+
d as roomDialog,
|
|
28
|
+
k as stats,
|
|
29
|
+
F as toast,
|
|
30
|
+
l as toolBar,
|
|
31
|
+
v as welcomeScreen
|
|
32
|
+
};
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import { jsx as i, jsxs as E, Fragment as G } from "react/jsx-runtime";
|
|
2
|
+
import { useState as v, useEffect as _, useRef as T, useCallback as z, useMemo as P } from "react";
|
|
3
|
+
import { R as Q, p as B, A as V, e as X, w as Y, x as w, f as J, h as Z, o as K, i as ee, j as te, k as ie, l as se, z as D, O as ne, s as ae } from "./layers.Dt8URlt7.js";
|
|
4
|
+
import { useTranslation as $ } from "react-i18next";
|
|
5
|
+
import { Modal as le, Text as re, Flex as oe, Button as H, useMantineTheme as ce, Box as F, Tooltip as W, ActionIcon as L } from "@mantine/core";
|
|
6
|
+
import { M as de, H as ue } from "./layers.od048jSt.js";
|
|
7
|
+
import { IconEdit as fe } from "@tabler/icons-react";
|
|
8
|
+
const me = ({
|
|
9
|
+
isCloseModal: e,
|
|
10
|
+
setCloseModalOpen: n,
|
|
11
|
+
confirmClose: o
|
|
12
|
+
}) => {
|
|
13
|
+
const { t: a } = $();
|
|
14
|
+
return /* @__PURE__ */ i(
|
|
15
|
+
le,
|
|
16
|
+
{
|
|
17
|
+
opened: e,
|
|
18
|
+
onClose: () => {
|
|
19
|
+
n(!1);
|
|
20
|
+
},
|
|
21
|
+
centered: !0,
|
|
22
|
+
title: a("editor.unsavedChanges.title"),
|
|
23
|
+
closeOnClickOutside: !0,
|
|
24
|
+
closeOnEscape: !0,
|
|
25
|
+
size: "500",
|
|
26
|
+
zIndex: 999,
|
|
27
|
+
children: /* @__PURE__ */ E("div", { children: [
|
|
28
|
+
/* @__PURE__ */ i(re, { mb: "md", children: a("editor.unsavedChanges.message") }),
|
|
29
|
+
/* @__PURE__ */ E(oe, { justify: "flex-end", gap: "sm", children: [
|
|
30
|
+
/* @__PURE__ */ i(
|
|
31
|
+
H,
|
|
32
|
+
{
|
|
33
|
+
variant: "default",
|
|
34
|
+
onClick: () => {
|
|
35
|
+
n(!1);
|
|
36
|
+
},
|
|
37
|
+
fullWidth: !0,
|
|
38
|
+
children: a("editor.unsavedChanges.cancel")
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ i(H, { color: "red", onClick: o, fullWidth: !0, children: a("editor.unsavedChanges.closeWithoutSaving") })
|
|
42
|
+
] })
|
|
43
|
+
] })
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}, he = (e) => {
|
|
47
|
+
var a;
|
|
48
|
+
const n = (a = e == null ? void 0 : e.firstElementChild) == null ? void 0 : a.firstElementChild, o = e.getAttribute("viewBox");
|
|
49
|
+
if (o != null) {
|
|
50
|
+
const r = o.split(" ");
|
|
51
|
+
e.setAttribute("width", r[2]), e.setAttribute("height", r[3]);
|
|
52
|
+
}
|
|
53
|
+
n && n.tagName === "style" && n.remove();
|
|
54
|
+
};
|
|
55
|
+
function pe({
|
|
56
|
+
elements: e,
|
|
57
|
+
files: n,
|
|
58
|
+
imageContainerRef: o,
|
|
59
|
+
appState: a,
|
|
60
|
+
editor: r,
|
|
61
|
+
rootClassName: s = null,
|
|
62
|
+
width: S = "inherit",
|
|
63
|
+
height: M = "inherit",
|
|
64
|
+
nodeKey: c,
|
|
65
|
+
alignment: N,
|
|
66
|
+
setModalOpen: p
|
|
67
|
+
}) {
|
|
68
|
+
const [g, k] = v(null), [C, u] = v(!1);
|
|
69
|
+
ce();
|
|
70
|
+
const { t: m } = $();
|
|
71
|
+
_(() => {
|
|
72
|
+
(async () => {
|
|
73
|
+
const l = await de({
|
|
74
|
+
appState: a,
|
|
75
|
+
elements: e,
|
|
76
|
+
files: n
|
|
77
|
+
});
|
|
78
|
+
he(l), l.setAttribute("width", "100%"), l.setAttribute("height", "100%"), l.setAttribute("display", "block"), l.classList.add("excalidraw-svg"), k(l);
|
|
79
|
+
})();
|
|
80
|
+
}, [e, n, a]);
|
|
81
|
+
const x = (f, l) => {
|
|
82
|
+
r.update(() => {
|
|
83
|
+
Y(null);
|
|
84
|
+
const A = w(c);
|
|
85
|
+
return J(A) && A.setWidthAndHeight(f, l), !0;
|
|
86
|
+
});
|
|
87
|
+
}, O = (f) => {
|
|
88
|
+
Z(r, c);
|
|
89
|
+
};
|
|
90
|
+
return /* @__PURE__ */ i(
|
|
91
|
+
Q,
|
|
92
|
+
{
|
|
93
|
+
editor: r,
|
|
94
|
+
isIcon: !1,
|
|
95
|
+
isEmbed: !0,
|
|
96
|
+
width: B(S),
|
|
97
|
+
height: B(M),
|
|
98
|
+
onResizeEnd: x,
|
|
99
|
+
alignment: N,
|
|
100
|
+
children: /* @__PURE__ */ E(F, { className: "media-wrapper excaildraw", children: [
|
|
101
|
+
/* @__PURE__ */ E("div", { className: "media-actions", children: [
|
|
102
|
+
/* @__PURE__ */ i(W, { label: m("editor.link.edit"), children: /* @__PURE__ */ i(
|
|
103
|
+
L,
|
|
104
|
+
{
|
|
105
|
+
color: "gray",
|
|
106
|
+
"aria-label": "Settings",
|
|
107
|
+
className: "media-action",
|
|
108
|
+
variant: "default",
|
|
109
|
+
size: 24,
|
|
110
|
+
onClick: () => {
|
|
111
|
+
p(!0);
|
|
112
|
+
},
|
|
113
|
+
children: /* @__PURE__ */ i(fe, { size: 14 })
|
|
114
|
+
}
|
|
115
|
+
) }),
|
|
116
|
+
/* @__PURE__ */ i(
|
|
117
|
+
V,
|
|
118
|
+
{
|
|
119
|
+
opened: C,
|
|
120
|
+
setOpened: u,
|
|
121
|
+
t: m,
|
|
122
|
+
editor: r,
|
|
123
|
+
nodeKey: c
|
|
124
|
+
}
|
|
125
|
+
),
|
|
126
|
+
/* @__PURE__ */ i(W, { label: m("editor.actions.delete"), children: /* @__PURE__ */ i(
|
|
127
|
+
L,
|
|
128
|
+
{
|
|
129
|
+
color: "gray",
|
|
130
|
+
"aria-label": "Settings",
|
|
131
|
+
className: "media-action",
|
|
132
|
+
variant: "default",
|
|
133
|
+
size: 24,
|
|
134
|
+
onClick: O,
|
|
135
|
+
children: /* @__PURE__ */ i(X, { name: "trash", size: "14" })
|
|
136
|
+
}
|
|
137
|
+
) })
|
|
138
|
+
] }),
|
|
139
|
+
/* @__PURE__ */ i(
|
|
140
|
+
F,
|
|
141
|
+
{
|
|
142
|
+
w: "100%",
|
|
143
|
+
ref: (f) => {
|
|
144
|
+
f && o && (o.current = f);
|
|
145
|
+
},
|
|
146
|
+
className: s ?? "",
|
|
147
|
+
dangerouslySetInnerHTML: { __html: (g == null ? void 0 : g.outerHTML) ?? "" }
|
|
148
|
+
}
|
|
149
|
+
)
|
|
150
|
+
] })
|
|
151
|
+
}
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
function Se({
|
|
155
|
+
nodeKey: e,
|
|
156
|
+
data: n,
|
|
157
|
+
width: o,
|
|
158
|
+
height: a,
|
|
159
|
+
alignment: r
|
|
160
|
+
}) {
|
|
161
|
+
const [s] = K(), S = ee(), [M, c] = v(
|
|
162
|
+
n === "[]" && s.isEditable()
|
|
163
|
+
), [N, p] = v(!1), g = T(null), k = T(null), C = T(null), [u, m, x] = te(e), [O, f] = v(!1), l = z(
|
|
164
|
+
(t) => (u && (t.preventDefault(), s.update(() => {
|
|
165
|
+
const d = w(e);
|
|
166
|
+
d && d.remove();
|
|
167
|
+
})), !1),
|
|
168
|
+
[s, u, e]
|
|
169
|
+
);
|
|
170
|
+
_(() => {
|
|
171
|
+
if (!S) {
|
|
172
|
+
u && x();
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
return ie(
|
|
176
|
+
s.registerCommand(
|
|
177
|
+
ae,
|
|
178
|
+
(t) => {
|
|
179
|
+
const d = k.current, h = t.target;
|
|
180
|
+
return O ? !0 : d !== null && d.contains(h) ? (t.shiftKey || x(), m(!u), t.detail > 1 && c(!0), !0) : !1;
|
|
181
|
+
},
|
|
182
|
+
D
|
|
183
|
+
),
|
|
184
|
+
s.registerCommand(
|
|
185
|
+
ne,
|
|
186
|
+
l,
|
|
187
|
+
D
|
|
188
|
+
),
|
|
189
|
+
s.registerCommand(
|
|
190
|
+
se,
|
|
191
|
+
l,
|
|
192
|
+
D
|
|
193
|
+
)
|
|
194
|
+
);
|
|
195
|
+
}, [
|
|
196
|
+
x,
|
|
197
|
+
s,
|
|
198
|
+
u,
|
|
199
|
+
O,
|
|
200
|
+
l,
|
|
201
|
+
m,
|
|
202
|
+
S
|
|
203
|
+
]);
|
|
204
|
+
const A = z(() => (c(!1), s.update(() => {
|
|
205
|
+
const t = w(e);
|
|
206
|
+
t && t.remove();
|
|
207
|
+
})), [s, e]), U = (t, d, h) => s.update(() => {
|
|
208
|
+
const I = w(e);
|
|
209
|
+
J(I) && (t && t.length > 0 || Object.keys(h).length > 0 ? I.setData(
|
|
210
|
+
JSON.stringify({
|
|
211
|
+
appState: d,
|
|
212
|
+
elements: t,
|
|
213
|
+
files: h
|
|
214
|
+
})
|
|
215
|
+
) : I.remove());
|
|
216
|
+
}), {
|
|
217
|
+
elements: b = [],
|
|
218
|
+
files: R = {},
|
|
219
|
+
appState: j = {}
|
|
220
|
+
} = P(() => JSON.parse(n), [n]), y = z(() => {
|
|
221
|
+
c(!1), p(!1), C.current = !1, b.length === 0 && s.update(() => {
|
|
222
|
+
const t = w(e);
|
|
223
|
+
t && t.remove();
|
|
224
|
+
});
|
|
225
|
+
}, [s, e, b.length]), q = z(() => {
|
|
226
|
+
C.current ? p(!0) : y();
|
|
227
|
+
}, []);
|
|
228
|
+
return /* @__PURE__ */ E(G, { children: [
|
|
229
|
+
/* @__PURE__ */ i(
|
|
230
|
+
me,
|
|
231
|
+
{
|
|
232
|
+
isCloseModal: N,
|
|
233
|
+
confirmClose: y,
|
|
234
|
+
setCloseModalOpen: p
|
|
235
|
+
}
|
|
236
|
+
),
|
|
237
|
+
/* @__PURE__ */ i(
|
|
238
|
+
ue,
|
|
239
|
+
{
|
|
240
|
+
initialElements: b,
|
|
241
|
+
isEdited: C,
|
|
242
|
+
initialFiles: R,
|
|
243
|
+
initialAppState: j,
|
|
244
|
+
isShown: M,
|
|
245
|
+
onDelete: A,
|
|
246
|
+
onClose: q,
|
|
247
|
+
onSave: (t, d, h) => {
|
|
248
|
+
U(t, d, h), c(!1);
|
|
249
|
+
},
|
|
250
|
+
closeOnClickOutside: !1
|
|
251
|
+
}
|
|
252
|
+
),
|
|
253
|
+
b.length > 0 && /* @__PURE__ */ i(
|
|
254
|
+
"div",
|
|
255
|
+
{
|
|
256
|
+
style: {
|
|
257
|
+
display: "flex",
|
|
258
|
+
justifyContent: r
|
|
259
|
+
},
|
|
260
|
+
children: /* @__PURE__ */ i(
|
|
261
|
+
pe,
|
|
262
|
+
{
|
|
263
|
+
imageContainerRef: g,
|
|
264
|
+
className: "image",
|
|
265
|
+
elements: b,
|
|
266
|
+
files: R,
|
|
267
|
+
appState: j,
|
|
268
|
+
width: o,
|
|
269
|
+
height: a,
|
|
270
|
+
editor: s,
|
|
271
|
+
nodeKey: e,
|
|
272
|
+
alignment: r,
|
|
273
|
+
setModalOpen: c
|
|
274
|
+
}
|
|
275
|
+
)
|
|
276
|
+
}
|
|
277
|
+
)
|
|
278
|
+
] });
|
|
279
|
+
}
|
|
280
|
+
export {
|
|
281
|
+
Se as default
|
|
282
|
+
};
|