bg-editor 0.0.2 → 0.0.3

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.
Files changed (61) hide show
  1. package/dist/_baseUniq-DtZISqda.js +473 -0
  2. package/dist/{arc-CNm23MW7.js → arc-BpOtYBpP.js} +1 -1
  3. package/dist/{architecture-U656AL7Q-Ww8rTIvv.js → architecture-U656AL7Q-BN22wDFh.js} +1 -1
  4. package/dist/{architectureDiagram-VXUJARFQ-DH2EEb-C.js → architectureDiagram-VXUJARFQ-D90AF2uK.js} +3 -3
  5. package/dist/{blockDiagram-VD42YOAC-CPmwRP5b.js → blockDiagram-VD42YOAC-DXQNldkG.js} +5 -5
  6. package/dist/{c4Diagram-YG6GDRKO-Jsc4hIGa.js → c4Diagram-YG6GDRKO-Bl1xCfsC.js} +2 -2
  7. package/dist/{channel-BfuwZbo4.js → channel-BiQYlsVc.js} +1 -1
  8. package/dist/{chunk-4BX2VUAB-4Zvho0Ds.js → chunk-4BX2VUAB-JnvgOgeI.js} +1 -1
  9. package/dist/{chunk-55IACEB6-BmOb908D.js → chunk-55IACEB6-DvzYdqd0.js} +1 -1
  10. package/dist/{chunk-B4BG7PRW-Dx9fTyv9.js → chunk-B4BG7PRW-D2zs0pMT.js} +4 -4
  11. package/dist/{chunk-DI55MBZ5-Dwa8xe-f.js → chunk-DI55MBZ5-IhCs2q12.js} +3 -3
  12. package/dist/{chunk-FMBD7UC4-DBAEvnpB.js → chunk-FMBD7UC4-CI7_2stl.js} +1 -1
  13. package/dist/{chunk-QN33PNHL-BFK0rIbg.js → chunk-QN33PNHL-D3gdmDbi.js} +1 -1
  14. package/dist/{chunk-QZHKN3VN-B5HHmgvT.js → chunk-QZHKN3VN-BaqG_46X.js} +1 -1
  15. package/dist/{chunk-TZMSLE5B-CYLAjMP8.js → chunk-TZMSLE5B-fUTKpgTY.js} +1 -1
  16. package/dist/{classDiagram-v2-WZHVMYZB-CQOOlc6C.js → classDiagram-2ON5EDUG-BbUC7jyd.js} +2 -2
  17. package/dist/{classDiagram-2ON5EDUG-CQOOlc6C.js → classDiagram-v2-WZHVMYZB-BbUC7jyd.js} +2 -2
  18. package/dist/{clone-CF1B7msQ.js → clone-CDwfUPH_.js} +1 -1
  19. package/dist/{cose-bilkent-S5V4N54A-DZx3YOg1.js → cose-bilkent-S5V4N54A-BfRx9IMy.js} +8 -8
  20. package/dist/{dagre-6UL2VRFP-sT9qv2gP.js → dagre-6UL2VRFP-pX_n00Op.js} +116 -117
  21. package/dist/{defaultLocale-C44w2ZBZ.js → defaultLocale-DEnRyJdC.js} +3 -3
  22. package/dist/diagram-PSM6KHXK-CwWsOtmB.js +396 -0
  23. package/dist/{diagram-QEK2KX5R-g5F_w0er.js → diagram-QEK2KX5R-Dxmoi6nm.js} +3 -3
  24. package/dist/{diagram-S2PKOQOG-CRelpUZk.js → diagram-S2PKOQOG-HSYMJfV1.js} +3 -3
  25. package/dist/{erDiagram-Q2GNP2WA-CfWWAKsy.js → erDiagram-Q2GNP2WA-DQP8lHpe.js} +4 -4
  26. package/dist/{flowDiagram-NV44I4VS-DuCCJQ8z.js → flowDiagram-NV44I4VS-Cl_9jtIL.js} +5 -5
  27. package/dist/{ganttDiagram-LVOFAZNH-DKb9FhvV.js → ganttDiagram-LVOFAZNH-CPmFv-yQ.js} +2 -2
  28. package/dist/{gitGraph-F6HP7TQM-Cg_TcdDS.js → gitGraph-F6HP7TQM-80sPVnm_.js} +1 -1
  29. package/dist/{gitGraphDiagram-NY62KEGX-CjO_i2YA.js → gitGraphDiagram-NY62KEGX-B-81Admd.js} +4 -4
  30. package/dist/graph-rMBrFJ2v.js +382 -0
  31. package/dist/index-D5tpgmxE.js +164793 -0
  32. package/dist/{info-NVLQJR56-D-AxJYeF.js → info-NVLQJR56-DBCgZtPg.js} +1 -1
  33. package/dist/{infoDiagram-ER5ION4S-9EH9zF_4.js → infoDiagram-ER5ION4S-CqZmP7Ed.js} +2 -2
  34. package/dist/{journeyDiagram-XKPGCS4Q-BaCrHQBZ.js → journeyDiagram-XKPGCS4Q-Stv9y4h1.js} +4 -4
  35. package/dist/{kanban-definition-3W4ZIXB7-BK9PMHrf.js → kanban-definition-3W4ZIXB7-C5R0pumf.js} +2 -2
  36. package/dist/layout-DHK3CzAK.js +1416 -0
  37. package/dist/{linear-edUYtIiO.js → linear-CD94DoB6.js} +6 -6
  38. package/dist/{mermaid-parser.core-BMy5yPs4.js → mermaid-parser.core-D1WCqkLE.js} +6707 -5486
  39. package/dist/min-CDOTJW1A.js +39 -0
  40. package/dist/{mindmap-definition-VGOIOE7T-bSEDOEZl.js → mindmap-definition-VGOIOE7T-BONuOB6H.js} +11 -11
  41. package/dist/{packet-BFZMPI3H-DHEklZAi.js → packet-BFZMPI3H-ByqiBqYS.js} +1 -1
  42. package/dist/{pie-7BOR55EZ-DDu5Qx9i.js → pie-7BOR55EZ-Bzv7npkH.js} +1 -1
  43. package/dist/{pieDiagram-ADFJNKIX-QEkPDMva.js → pieDiagram-ADFJNKIX-CQ6y-x9k.js} +9 -9
  44. package/dist/{quadrantDiagram-AYHSOK5B-zvs9JNV-.js → quadrantDiagram-AYHSOK5B-C4hTUyLY.js} +2 -2
  45. package/dist/{radar-NHE76QYJ-DEeIs6w7.js → radar-NHE76QYJ-OVSgPUhl.js} +1 -1
  46. package/dist/{requirementDiagram-UZGBJVZJ-PLEQdkam.js → requirementDiagram-UZGBJVZJ-CM3F7AET.js} +3 -3
  47. package/dist/{sankeyDiagram-TZEHDZUN-B9FpEfLk.js → sankeyDiagram-TZEHDZUN-F2yxFEnc.js} +1 -1
  48. package/dist/{sequenceDiagram-WL72ISMW-ClWHIEm8.js → sequenceDiagram-WL72ISMW-CZgiwPgi.js} +3 -3
  49. package/dist/{stateDiagram-FKZM4ZOC-CSNc1r0e.js → stateDiagram-FKZM4ZOC-Bxzbhi-m.js} +4 -4
  50. package/dist/{stateDiagram-v2-4FDKWEC3-BbDtuFwM.js → stateDiagram-v2-4FDKWEC3-DfVPJhMD.js} +2 -2
  51. package/dist/{timeline-definition-IT6M3QCI-Ddq-6bZx.js → timeline-definition-IT6M3QCI-_z700I-W.js} +2 -2
  52. package/dist/{treemap-KMMF4GRG-D3-cXS0o.js → treemap-KMMF4GRG-D5Tr-XRi.js} +1 -1
  53. package/dist/umo-editor.js +1 -1
  54. package/dist/{xychartDiagram-PRI3JC2R-BpMDi10C.js → xychartDiagram-PRI3JC2R-yKhqmxR_.js} +2 -2
  55. package/package.json +6 -1
  56. package/dist/_basePickBy-xii7lYdk.js +0 -152
  57. package/dist/_baseUniq-ltuhkD8D.js +0 -615
  58. package/dist/diagram-PSM6KHXK-CgyZu1Ty.js +0 -533
  59. package/dist/graph-IPeEmdRy.js +0 -248
  60. package/dist/index-DfWUTVm_.js +0 -122164
  61. package/dist/layout-C1dI-ZSJ.js +0 -1336
@@ -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
- };