bg-editor 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_baseUniq-DlmMKNm6.js +473 -0
- package/dist/{arc-CNm23MW7.js → arc-sEnPjXGq.js} +1 -1
- package/dist/{architecture-U656AL7Q-Ww8rTIvv.js → architecture-U656AL7Q-CPkFywIH.js} +1 -1
- package/dist/{architectureDiagram-VXUJARFQ-DH2EEb-C.js → architectureDiagram-VXUJARFQ-OSzH5GM4.js} +3 -3
- package/dist/{blockDiagram-VD42YOAC-CPmwRP5b.js → blockDiagram-VD42YOAC-CEfQMAZF.js} +5 -5
- package/dist/{c4Diagram-YG6GDRKO-Jsc4hIGa.js → c4Diagram-YG6GDRKO-DrD1o0bF.js} +2 -2
- package/dist/{channel-BfuwZbo4.js → channel-DNawwE5r.js} +1 -1
- package/dist/{chunk-4BX2VUAB-4Zvho0Ds.js → chunk-4BX2VUAB-ApZvZj_H.js} +1 -1
- package/dist/{chunk-55IACEB6-BmOb908D.js → chunk-55IACEB6-DYxYeHe7.js} +1 -1
- package/dist/{chunk-B4BG7PRW-Dx9fTyv9.js → chunk-B4BG7PRW-D_Pl6xS7.js} +4 -4
- package/dist/{chunk-DI55MBZ5-Dwa8xe-f.js → chunk-DI55MBZ5-D8kT33qO.js} +3 -3
- package/dist/{chunk-FMBD7UC4-DBAEvnpB.js → chunk-FMBD7UC4-DpTCe04g.js} +1 -1
- package/dist/{chunk-QN33PNHL-BFK0rIbg.js → chunk-QN33PNHL-Z4BQIuxq.js} +1 -1
- package/dist/{chunk-QZHKN3VN-B5HHmgvT.js → chunk-QZHKN3VN-Cmhrs4io.js} +1 -1
- package/dist/{chunk-TZMSLE5B-CYLAjMP8.js → chunk-TZMSLE5B-BUPp2n-T.js} +1 -1
- package/dist/{classDiagram-v2-WZHVMYZB-CQOOlc6C.js → classDiagram-2ON5EDUG-DJl6LMGs.js} +2 -2
- package/dist/{classDiagram-2ON5EDUG-CQOOlc6C.js → classDiagram-v2-WZHVMYZB-DJl6LMGs.js} +2 -2
- package/dist/{clone-CF1B7msQ.js → clone-iCXWBcXq.js} +1 -1
- package/dist/{cose-bilkent-S5V4N54A-DZx3YOg1.js → cose-bilkent-S5V4N54A-CnIbqqnS.js} +8 -8
- package/dist/{dagre-6UL2VRFP-sT9qv2gP.js → dagre-6UL2VRFP-3a93Ccgj.js} +116 -117
- package/dist/{defaultLocale-C44w2ZBZ.js → defaultLocale-DEnRyJdC.js} +3 -3
- package/dist/diagram-PSM6KHXK-hPQJhwjP.js +396 -0
- package/dist/{diagram-QEK2KX5R-g5F_w0er.js → diagram-QEK2KX5R-vTFC9KE_.js} +3 -3
- package/dist/{diagram-S2PKOQOG-CRelpUZk.js → diagram-S2PKOQOG-BdLipS0J.js} +3 -3
- package/dist/{erDiagram-Q2GNP2WA-CfWWAKsy.js → erDiagram-Q2GNP2WA-CCKMWiuO.js} +4 -4
- package/dist/{flowDiagram-NV44I4VS-DuCCJQ8z.js → flowDiagram-NV44I4VS-Dci2ZYE1.js} +5 -5
- package/dist/{ganttDiagram-LVOFAZNH-DKb9FhvV.js → ganttDiagram-LVOFAZNH-C1o-J89x.js} +2 -2
- package/dist/{gitGraph-F6HP7TQM-Cg_TcdDS.js → gitGraph-F6HP7TQM-CECU0RWB.js} +1 -1
- package/dist/{gitGraphDiagram-NY62KEGX-CjO_i2YA.js → gitGraphDiagram-NY62KEGX-D5fV34WX.js} +4 -4
- package/dist/graph-Bve-nWS5.js +382 -0
- package/dist/index-0M7iCg0y.js +164750 -0
- package/dist/{info-NVLQJR56-D-AxJYeF.js → info-NVLQJR56-Bqk59KfO.js} +1 -1
- package/dist/{infoDiagram-ER5ION4S-9EH9zF_4.js → infoDiagram-ER5ION4S-DJ6J2mgS.js} +2 -2
- package/dist/{journeyDiagram-XKPGCS4Q-BaCrHQBZ.js → journeyDiagram-XKPGCS4Q-TRwtnzXO.js} +4 -4
- package/dist/{kanban-definition-3W4ZIXB7-BK9PMHrf.js → kanban-definition-3W4ZIXB7-BC83cBPr.js} +2 -2
- package/dist/layout-CpvWZ0xd.js +1416 -0
- package/dist/{linear-edUYtIiO.js → linear-C88svcwx.js} +6 -6
- package/dist/{mermaid-parser.core-BMy5yPs4.js → mermaid-parser.core-DGRDGxqQ.js} +6707 -5486
- package/dist/min-Bgv4PVuI.js +39 -0
- package/dist/{mindmap-definition-VGOIOE7T-bSEDOEZl.js → mindmap-definition-VGOIOE7T-BYiyXN9v.js} +11 -11
- package/dist/{packet-BFZMPI3H-DHEklZAi.js → packet-BFZMPI3H-87WloAg0.js} +1 -1
- package/dist/{pie-7BOR55EZ-DDu5Qx9i.js → pie-7BOR55EZ-CWT2R5xc.js} +1 -1
- package/dist/{pieDiagram-ADFJNKIX-QEkPDMva.js → pieDiagram-ADFJNKIX-BCVT3x3r.js} +9 -9
- package/dist/{quadrantDiagram-AYHSOK5B-zvs9JNV-.js → quadrantDiagram-AYHSOK5B-BgYJ_lms.js} +2 -2
- package/dist/{radar-NHE76QYJ-DEeIs6w7.js → radar-NHE76QYJ-DI34pls7.js} +1 -1
- package/dist/{requirementDiagram-UZGBJVZJ-PLEQdkam.js → requirementDiagram-UZGBJVZJ-Bh4vxSq4.js} +3 -3
- package/dist/{sankeyDiagram-TZEHDZUN-B9FpEfLk.js → sankeyDiagram-TZEHDZUN-3rmpF6iD.js} +1 -1
- package/dist/{sequenceDiagram-WL72ISMW-ClWHIEm8.js → sequenceDiagram-WL72ISMW-DRPHhT6P.js} +3 -3
- package/dist/{stateDiagram-FKZM4ZOC-CSNc1r0e.js → stateDiagram-FKZM4ZOC-Bg5i_DMD.js} +4 -4
- package/dist/{stateDiagram-v2-4FDKWEC3-BbDtuFwM.js → stateDiagram-v2-4FDKWEC3-D1fxP-ej.js} +2 -2
- package/dist/style.css +1 -1
- package/dist/{timeline-definition-IT6M3QCI-Ddq-6bZx.js → timeline-definition-IT6M3QCI-CWHNY2JH.js} +2 -2
- package/dist/{treemap-KMMF4GRG-D3-cXS0o.js → treemap-KMMF4GRG-DL-NPl5s.js} +1 -1
- package/dist/umo-editor.js +1 -1
- package/dist/{xychartDiagram-PRI3JC2R-BpMDi10C.js → xychartDiagram-PRI3JC2R-C7tSOfMZ.js} +2 -2
- package/package.json +6 -1
- package/dist/_basePickBy-xii7lYdk.js +0 -152
- package/dist/_baseUniq-ltuhkD8D.js +0 -615
- package/dist/diagram-PSM6KHXK-CgyZu1Ty.js +0 -533
- package/dist/graph-IPeEmdRy.js +0 -248
- package/dist/index-DfWUTVm_.js +0 -122164
- package/dist/layout-C1dI-ZSJ.js +0 -1336
package/dist/graph-IPeEmdRy.js
DELETED
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
import "./style.css";
|
|
2
|
-
import { aA as N, aB as j, aC as f, aD as b, aE as E } from "./index-DfWUTVm_.js";
|
|
3
|
-
import { a as v, c as P, k as _, f as g, d, i as l, v as p, r as D } from "./_baseUniq-ltuhkD8D.js";
|
|
4
|
-
var w = N(function(o) {
|
|
5
|
-
return v(P(o, 1, j, !0));
|
|
6
|
-
}), F = "\0", a = "\0", O = "";
|
|
7
|
-
class L {
|
|
8
|
-
constructor(e = {}) {
|
|
9
|
-
this._isDirected = Object.prototype.hasOwnProperty.call(e, "directed") ? e.directed : !0, this._isMultigraph = Object.prototype.hasOwnProperty.call(e, "multigraph") ? e.multigraph : !1, this._isCompound = Object.prototype.hasOwnProperty.call(e, "compound") ? e.compound : !1, this._label = void 0, this._defaultNodeLabelFn = f(void 0), this._defaultEdgeLabelFn = f(void 0), this._nodes = {}, this._isCompound && (this._parent = {}, this._children = {}, this._children[a] = {}), this._in = {}, this._preds = {}, this._out = {}, this._sucs = {}, this._edgeObjs = {}, this._edgeLabels = {};
|
|
10
|
-
}
|
|
11
|
-
/* === Graph functions ========= */
|
|
12
|
-
isDirected() {
|
|
13
|
-
return this._isDirected;
|
|
14
|
-
}
|
|
15
|
-
isMultigraph() {
|
|
16
|
-
return this._isMultigraph;
|
|
17
|
-
}
|
|
18
|
-
isCompound() {
|
|
19
|
-
return this._isCompound;
|
|
20
|
-
}
|
|
21
|
-
setGraph(e) {
|
|
22
|
-
return this._label = e, this;
|
|
23
|
-
}
|
|
24
|
-
graph() {
|
|
25
|
-
return this._label;
|
|
26
|
-
}
|
|
27
|
-
/* === Node functions ========== */
|
|
28
|
-
setDefaultNodeLabel(e) {
|
|
29
|
-
return b(e) || (e = f(e)), this._defaultNodeLabelFn = e, this;
|
|
30
|
-
}
|
|
31
|
-
nodeCount() {
|
|
32
|
-
return this._nodeCount;
|
|
33
|
-
}
|
|
34
|
-
nodes() {
|
|
35
|
-
return _(this._nodes);
|
|
36
|
-
}
|
|
37
|
-
sources() {
|
|
38
|
-
var e = this;
|
|
39
|
-
return g(this.nodes(), function(t) {
|
|
40
|
-
return E(e._in[t]);
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
sinks() {
|
|
44
|
-
var e = this;
|
|
45
|
-
return g(this.nodes(), function(t) {
|
|
46
|
-
return E(e._out[t]);
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
setNodes(e, t) {
|
|
50
|
-
var s = arguments, i = this;
|
|
51
|
-
return d(e, function(r) {
|
|
52
|
-
s.length > 1 ? i.setNode(r, t) : i.setNode(r);
|
|
53
|
-
}), this;
|
|
54
|
-
}
|
|
55
|
-
setNode(e, t) {
|
|
56
|
-
return Object.prototype.hasOwnProperty.call(this._nodes, e) ? (arguments.length > 1 && (this._nodes[e] = t), this) : (this._nodes[e] = arguments.length > 1 ? t : this._defaultNodeLabelFn(e), this._isCompound && (this._parent[e] = a, this._children[e] = {}, this._children[a][e] = !0), this._in[e] = {}, this._preds[e] = {}, this._out[e] = {}, this._sucs[e] = {}, ++this._nodeCount, this);
|
|
57
|
-
}
|
|
58
|
-
node(e) {
|
|
59
|
-
return this._nodes[e];
|
|
60
|
-
}
|
|
61
|
-
hasNode(e) {
|
|
62
|
-
return Object.prototype.hasOwnProperty.call(this._nodes, e);
|
|
63
|
-
}
|
|
64
|
-
removeNode(e) {
|
|
65
|
-
if (Object.prototype.hasOwnProperty.call(this._nodes, e)) {
|
|
66
|
-
var t = (s) => this.removeEdge(this._edgeObjs[s]);
|
|
67
|
-
delete this._nodes[e], this._isCompound && (this._removeFromParentsChildList(e), delete this._parent[e], d(this.children(e), (s) => {
|
|
68
|
-
this.setParent(s);
|
|
69
|
-
}), delete this._children[e]), d(_(this._in[e]), t), delete this._in[e], delete this._preds[e], d(_(this._out[e]), t), delete this._out[e], delete this._sucs[e], --this._nodeCount;
|
|
70
|
-
}
|
|
71
|
-
return this;
|
|
72
|
-
}
|
|
73
|
-
setParent(e, t) {
|
|
74
|
-
if (!this._isCompound)
|
|
75
|
-
throw new Error("Cannot set parent in a non-compound graph");
|
|
76
|
-
if (l(t))
|
|
77
|
-
t = a;
|
|
78
|
-
else {
|
|
79
|
-
t += "";
|
|
80
|
-
for (var s = t; !l(s); s = this.parent(s))
|
|
81
|
-
if (s === e)
|
|
82
|
-
throw new Error("Setting " + t + " as parent of " + e + " would create a cycle");
|
|
83
|
-
this.setNode(t);
|
|
84
|
-
}
|
|
85
|
-
return this.setNode(e), this._removeFromParentsChildList(e), this._parent[e] = t, this._children[t][e] = !0, this;
|
|
86
|
-
}
|
|
87
|
-
_removeFromParentsChildList(e) {
|
|
88
|
-
delete this._children[this._parent[e]][e];
|
|
89
|
-
}
|
|
90
|
-
parent(e) {
|
|
91
|
-
if (this._isCompound) {
|
|
92
|
-
var t = this._parent[e];
|
|
93
|
-
if (t !== a)
|
|
94
|
-
return t;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
children(e) {
|
|
98
|
-
if (l(e) && (e = a), this._isCompound) {
|
|
99
|
-
var t = this._children[e];
|
|
100
|
-
if (t)
|
|
101
|
-
return _(t);
|
|
102
|
-
} else {
|
|
103
|
-
if (e === a)
|
|
104
|
-
return this.nodes();
|
|
105
|
-
if (this.hasNode(e))
|
|
106
|
-
return [];
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
predecessors(e) {
|
|
110
|
-
var t = this._preds[e];
|
|
111
|
-
if (t)
|
|
112
|
-
return _(t);
|
|
113
|
-
}
|
|
114
|
-
successors(e) {
|
|
115
|
-
var t = this._sucs[e];
|
|
116
|
-
if (t)
|
|
117
|
-
return _(t);
|
|
118
|
-
}
|
|
119
|
-
neighbors(e) {
|
|
120
|
-
var t = this.predecessors(e);
|
|
121
|
-
if (t)
|
|
122
|
-
return w(t, this.successors(e));
|
|
123
|
-
}
|
|
124
|
-
isLeaf(e) {
|
|
125
|
-
var t;
|
|
126
|
-
return this.isDirected() ? t = this.successors(e) : t = this.neighbors(e), t.length === 0;
|
|
127
|
-
}
|
|
128
|
-
filterNodes(e) {
|
|
129
|
-
var t = new this.constructor({
|
|
130
|
-
directed: this._isDirected,
|
|
131
|
-
multigraph: this._isMultigraph,
|
|
132
|
-
compound: this._isCompound
|
|
133
|
-
});
|
|
134
|
-
t.setGraph(this.graph());
|
|
135
|
-
var s = this;
|
|
136
|
-
d(this._nodes, function(n, h) {
|
|
137
|
-
e(h) && t.setNode(h, n);
|
|
138
|
-
}), d(this._edgeObjs, function(n) {
|
|
139
|
-
t.hasNode(n.v) && t.hasNode(n.w) && t.setEdge(n, s.edge(n));
|
|
140
|
-
});
|
|
141
|
-
var i = {};
|
|
142
|
-
function r(n) {
|
|
143
|
-
var h = s.parent(n);
|
|
144
|
-
return h === void 0 || t.hasNode(h) ? (i[n] = h, h) : h in i ? i[h] : r(h);
|
|
145
|
-
}
|
|
146
|
-
return this._isCompound && d(t.nodes(), function(n) {
|
|
147
|
-
t.setParent(n, r(n));
|
|
148
|
-
}), t;
|
|
149
|
-
}
|
|
150
|
-
/* === Edge functions ========== */
|
|
151
|
-
setDefaultEdgeLabel(e) {
|
|
152
|
-
return b(e) || (e = f(e)), this._defaultEdgeLabelFn = e, this;
|
|
153
|
-
}
|
|
154
|
-
edgeCount() {
|
|
155
|
-
return this._edgeCount;
|
|
156
|
-
}
|
|
157
|
-
edges() {
|
|
158
|
-
return p(this._edgeObjs);
|
|
159
|
-
}
|
|
160
|
-
setPath(e, t) {
|
|
161
|
-
var s = this, i = arguments;
|
|
162
|
-
return D(e, function(r, n) {
|
|
163
|
-
return i.length > 1 ? s.setEdge(r, n, t) : s.setEdge(r, n), n;
|
|
164
|
-
}), this;
|
|
165
|
-
}
|
|
166
|
-
/*
|
|
167
|
-
* setEdge(v, w, [value, [name]])
|
|
168
|
-
* setEdge({ v, w, [name] }, [value])
|
|
169
|
-
*/
|
|
170
|
-
setEdge() {
|
|
171
|
-
var e, t, s, i, r = !1, n = arguments[0];
|
|
172
|
-
typeof n == "object" && n !== null && "v" in n ? (e = n.v, t = n.w, s = n.name, arguments.length === 2 && (i = arguments[1], r = !0)) : (e = n, t = arguments[1], s = arguments[3], arguments.length > 2 && (i = arguments[2], r = !0)), e = "" + e, t = "" + t, l(s) || (s = "" + s);
|
|
173
|
-
var h = c(this._isDirected, e, t, s);
|
|
174
|
-
if (Object.prototype.hasOwnProperty.call(this._edgeLabels, h))
|
|
175
|
-
return r && (this._edgeLabels[h] = i), this;
|
|
176
|
-
if (!l(s) && !this._isMultigraph)
|
|
177
|
-
throw new Error("Cannot set a named edge when isMultigraph = false");
|
|
178
|
-
this.setNode(e), this.setNode(t), this._edgeLabels[h] = r ? i : this._defaultEdgeLabelFn(e, t, s);
|
|
179
|
-
var u = M(this._isDirected, e, t, s);
|
|
180
|
-
return e = u.v, t = u.w, Object.freeze(u), this._edgeObjs[h] = u, C(this._preds[t], e), C(this._sucs[e], t), this._in[t][h] = u, this._out[e][h] = u, this._edgeCount++, this;
|
|
181
|
-
}
|
|
182
|
-
edge(e, t, s) {
|
|
183
|
-
var i = arguments.length === 1 ? m(this._isDirected, arguments[0]) : c(this._isDirected, e, t, s);
|
|
184
|
-
return this._edgeLabels[i];
|
|
185
|
-
}
|
|
186
|
-
hasEdge(e, t, s) {
|
|
187
|
-
var i = arguments.length === 1 ? m(this._isDirected, arguments[0]) : c(this._isDirected, e, t, s);
|
|
188
|
-
return Object.prototype.hasOwnProperty.call(this._edgeLabels, i);
|
|
189
|
-
}
|
|
190
|
-
removeEdge(e, t, s) {
|
|
191
|
-
var i = arguments.length === 1 ? m(this._isDirected, arguments[0]) : c(this._isDirected, e, t, s), r = this._edgeObjs[i];
|
|
192
|
-
return r && (e = r.v, t = r.w, delete this._edgeLabels[i], delete this._edgeObjs[i], y(this._preds[t], e), y(this._sucs[e], t), delete this._in[t][i], delete this._out[e][i], this._edgeCount--), this;
|
|
193
|
-
}
|
|
194
|
-
inEdges(e, t) {
|
|
195
|
-
var s = this._in[e];
|
|
196
|
-
if (s) {
|
|
197
|
-
var i = p(s);
|
|
198
|
-
return t ? g(i, function(r) {
|
|
199
|
-
return r.v === t;
|
|
200
|
-
}) : i;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
outEdges(e, t) {
|
|
204
|
-
var s = this._out[e];
|
|
205
|
-
if (s) {
|
|
206
|
-
var i = p(s);
|
|
207
|
-
return t ? g(i, function(r) {
|
|
208
|
-
return r.w === t;
|
|
209
|
-
}) : i;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
nodeEdges(e, t) {
|
|
213
|
-
var s = this.inEdges(e, t);
|
|
214
|
-
if (s)
|
|
215
|
-
return s.concat(this.outEdges(e, t));
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
L.prototype._nodeCount = 0;
|
|
219
|
-
L.prototype._edgeCount = 0;
|
|
220
|
-
function C(o, e) {
|
|
221
|
-
o[e] ? o[e]++ : o[e] = 1;
|
|
222
|
-
}
|
|
223
|
-
function y(o, e) {
|
|
224
|
-
--o[e] || delete o[e];
|
|
225
|
-
}
|
|
226
|
-
function c(o, e, t, s) {
|
|
227
|
-
var i = "" + e, r = "" + t;
|
|
228
|
-
if (!o && i > r) {
|
|
229
|
-
var n = i;
|
|
230
|
-
i = r, r = n;
|
|
231
|
-
}
|
|
232
|
-
return i + O + r + O + (l(s) ? F : s);
|
|
233
|
-
}
|
|
234
|
-
function M(o, e, t, s) {
|
|
235
|
-
var i = "" + e, r = "" + t;
|
|
236
|
-
if (!o && i > r) {
|
|
237
|
-
var n = i;
|
|
238
|
-
i = r, r = n;
|
|
239
|
-
}
|
|
240
|
-
var h = { v: i, w: r };
|
|
241
|
-
return s && (h.name = s), h;
|
|
242
|
-
}
|
|
243
|
-
function m(o, e) {
|
|
244
|
-
return c(o, e.v, e.w, e.name);
|
|
245
|
-
}
|
|
246
|
-
export {
|
|
247
|
-
L as G
|
|
248
|
-
};
|