bg-editor 0.0.7 → 0.0.9

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 (59) hide show
  1. package/dist/style.css +1 -1
  2. package/dist/umo-editor.js +90031 -7
  3. package/package.json +21 -1
  4. package/dist/_baseUniq-CK68Es8H.js +0 -473
  5. package/dist/arc-cD-4ba7d.js +0 -84
  6. package/dist/architecture-U656AL7Q-jxTBuJdN.js +0 -6
  7. package/dist/architectureDiagram-VXUJARFQ-D3XlpFhb.js +0 -4660
  8. package/dist/blockDiagram-VD42YOAC-BslbvMOG.js +0 -2262
  9. package/dist/c4Diagram-YG6GDRKO-DD3uWYPM.js +0 -1581
  10. package/dist/channel-DjTSKqWx.js +0 -6
  11. package/dist/chunk-4BX2VUAB-lfhsh4gk.js +0 -9
  12. package/dist/chunk-55IACEB6-O42zw0MT.js +0 -9
  13. package/dist/chunk-B4BG7PRW-CAose2Ox.js +0 -1376
  14. package/dist/chunk-DI55MBZ5-DkOlwdzs.js +0 -1371
  15. package/dist/chunk-FMBD7UC4-XviEvZms.js +0 -20
  16. package/dist/chunk-QN33PNHL-CNGSzgpw.js +0 -20
  17. package/dist/chunk-QZHKN3VN-CRgLUJXR.js +0 -16
  18. package/dist/chunk-TZMSLE5B-BkHNUxTN.js +0 -65
  19. package/dist/classDiagram-2ON5EDUG-Cakz_SCw.js +0 -17
  20. package/dist/classDiagram-v2-WZHVMYZB-Cakz_SCw.js +0 -17
  21. package/dist/clone-CIrbb4_D.js +0 -9
  22. package/dist/cose-bilkent-S5V4N54A-EoSlB5N_.js +0 -2606
  23. package/dist/cytoscape.esm-DoU_GB5M.js +0 -18732
  24. package/dist/dagre-6UL2VRFP-BPH1NIvl.js +0 -444
  25. package/dist/defaultLocale-DEnRyJdC.js +0 -172
  26. package/dist/diagram-PSM6KHXK-DCRoLhFv.js +0 -396
  27. package/dist/diagram-QEK2KX5R-2gxFpsCA.js +0 -218
  28. package/dist/diagram-S2PKOQOG-BIPpN2G8.js +0 -143
  29. package/dist/erDiagram-Q2GNP2WA-pfb2dpnp.js +0 -842
  30. package/dist/flowDiagram-NV44I4VS-Dv631-Fh.js +0 -1621
  31. package/dist/ganttDiagram-LVOFAZNH-BOKYXijK.js +0 -2500
  32. package/dist/gitGraph-F6HP7TQM-CRerkbyh.js +0 -6
  33. package/dist/gitGraphDiagram-NY62KEGX-CgO9x7O1.js +0 -700
  34. package/dist/graph-CG-rVaun.js +0 -382
  35. package/dist/index-LPeu-5gp.js +0 -164788
  36. package/dist/info-NVLQJR56-CZcMDuD4.js +0 -6
  37. package/dist/infoDiagram-ER5ION4S-CpfjxDXT.js +0 -25
  38. package/dist/init-Dbt-6wo9.js +0 -17
  39. package/dist/journeyDiagram-XKPGCS4Q-D4m1xk_j.js +0 -837
  40. package/dist/kanban-definition-3W4ZIXB7-GUMW-GDO.js +0 -719
  41. package/dist/layout-C7pGfQvF.js +0 -1416
  42. package/dist/linear-CQdBpz9H.js +0 -260
  43. package/dist/mermaid-parser.core-C3Lk4un7.js +0 -14143
  44. package/dist/min-D7xNMq31.js +0 -39
  45. package/dist/mindmap-definition-VGOIOE7T-GfQh2q9s.js +0 -784
  46. package/dist/ordinal-mgyNSFm_.js +0 -62
  47. package/dist/packet-BFZMPI3H-DughJE3g.js +0 -6
  48. package/dist/pie-7BOR55EZ-B1py7mee.js +0 -6
  49. package/dist/pieDiagram-ADFJNKIX-DENmX4xL.js +0 -162
  50. package/dist/quadrantDiagram-AYHSOK5B-BFVycH-W.js +0 -1023
  51. package/dist/radar-NHE76QYJ-DuTW4rXt.js +0 -6
  52. package/dist/requirementDiagram-UZGBJVZJ-f8rb43Mp.js +0 -851
  53. package/dist/sankeyDiagram-TZEHDZUN-CUN0tZ5p.js +0 -811
  54. package/dist/sequenceDiagram-WL72ISMW-7X4nul9T.js +0 -2512
  55. package/dist/stateDiagram-FKZM4ZOC-CypL793K.js +0 -264
  56. package/dist/stateDiagram-v2-4FDKWEC3-D5vS5FM5.js +0 -17
  57. package/dist/timeline-definition-IT6M3QCI-B_WOoOGO.js +0 -798
  58. package/dist/treemap-KMMF4GRG-BzINyJBJ.js +0 -6
  59. package/dist/xychartDiagram-PRI3JC2R-Llw16NDY.js +0 -1341
@@ -1,62 +0,0 @@
1
- import "./style.css";
2
- import { i as a } from "./init-Dbt-6wo9.js";
3
- class o extends Map {
4
- constructor(n, t = g) {
5
- if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: t } }), n != null) for (const [r, s] of n) this.set(r, s);
6
- }
7
- get(n) {
8
- return super.get(c(this, n));
9
- }
10
- has(n) {
11
- return super.has(c(this, n));
12
- }
13
- set(n, t) {
14
- return super.set(p(this, n), t);
15
- }
16
- delete(n) {
17
- return super.delete(l(this, n));
18
- }
19
- }
20
- function c({ _intern: e, _key: n }, t) {
21
- const r = n(t);
22
- return e.has(r) ? e.get(r) : t;
23
- }
24
- function p({ _intern: e, _key: n }, t) {
25
- const r = n(t);
26
- return e.has(r) ? e.get(r) : (e.set(r, t), t);
27
- }
28
- function l({ _intern: e, _key: n }, t) {
29
- const r = n(t);
30
- return e.has(r) && (t = e.get(r), e.delete(r)), t;
31
- }
32
- function g(e) {
33
- return e !== null && typeof e == "object" ? e.valueOf() : e;
34
- }
35
- const f = Symbol("implicit");
36
- function h() {
37
- var e = new o(), n = [], t = [], r = f;
38
- function s(i) {
39
- let u = e.get(i);
40
- if (u === void 0) {
41
- if (r !== f) return r;
42
- e.set(i, u = n.push(i) - 1);
43
- }
44
- return t[u % t.length];
45
- }
46
- return s.domain = function(i) {
47
- if (!arguments.length) return n.slice();
48
- n = [], e = new o();
49
- for (const u of i)
50
- e.has(u) || e.set(u, n.push(u) - 1);
51
- return s;
52
- }, s.range = function(i) {
53
- return arguments.length ? (t = Array.from(i), s) : t.slice();
54
- }, s.unknown = function(i) {
55
- return arguments.length ? (r = i, s) : r;
56
- }, s.copy = function() {
57
- return h(n, t).unknown(r);
58
- }, a.apply(s, arguments), s;
59
- }
60
- export {
61
- h as o
62
- };
@@ -1,6 +0,0 @@
1
- import "./style.css";
2
- import { P as t, a as c } from "./mermaid-parser.core-C3Lk4un7.js";
3
- export {
4
- t as PacketModule,
5
- c as createPacketServices
6
- };
@@ -1,6 +0,0 @@
1
- import "./style.css";
2
- import { b as o, d as a } from "./mermaid-parser.core-C3Lk4un7.js";
3
- export {
4
- o as PieModule,
5
- a as createPieServices
6
- };
@@ -1,162 +0,0 @@
1
- import "./style.css";
2
- import { a8 as S, a3 as F, aB as j, _ as p, g as q, s as H, a as Z, b as J, q as K, p as Q, l as z, c as X, D as Y, H as ee, N as te, e as ae, y as re, F as ne } from "./index-LPeu-5gp.js";
3
- import { p as ie } from "./chunk-4BX2VUAB-lfhsh4gk.js";
4
- import { p as se } from "./mermaid-parser.core-C3Lk4un7.js";
5
- import { d as I } from "./arc-cD-4ba7d.js";
6
- import { o as le } from "./ordinal-mgyNSFm_.js";
7
- function oe(e, a) {
8
- return a < e ? -1 : a > e ? 1 : a >= e ? 0 : NaN;
9
- }
10
- function ce(e) {
11
- return e;
12
- }
13
- function ue() {
14
- var e = ce, a = oe, f = null, y = S(0), s = S(F), o = S(0);
15
- function l(t) {
16
- var n, c = (t = j(t)).length, d, x, m = 0, u = new Array(c), i = new Array(c), v = +y.apply(this, arguments), w = Math.min(F, Math.max(-F, s.apply(this, arguments) - v)), h, C = Math.min(Math.abs(w) / c, o.apply(this, arguments)), $ = C * (w < 0 ? -1 : 1), g;
17
- for (n = 0; n < c; ++n)
18
- (g = i[u[n] = n] = +e(t[n], n, t)) > 0 && (m += g);
19
- for (a != null ? u.sort(function(A, D) {
20
- return a(i[A], i[D]);
21
- }) : f != null && u.sort(function(A, D) {
22
- return f(t[A], t[D]);
23
- }), n = 0, x = m ? (w - c * $) / m : 0; n < c; ++n, v = h)
24
- d = u[n], g = i[d], h = v + (g > 0 ? g * x : 0) + $, i[d] = {
25
- data: t[d],
26
- index: n,
27
- value: g,
28
- startAngle: v,
29
- endAngle: h,
30
- padAngle: C
31
- };
32
- return i;
33
- }
34
- return l.value = function(t) {
35
- return arguments.length ? (e = typeof t == "function" ? t : S(+t), l) : e;
36
- }, l.sortValues = function(t) {
37
- return arguments.length ? (a = t, f = null, l) : a;
38
- }, l.sort = function(t) {
39
- return arguments.length ? (f = t, a = null, l) : f;
40
- }, l.startAngle = function(t) {
41
- return arguments.length ? (y = typeof t == "function" ? t : S(+t), l) : y;
42
- }, l.endAngle = function(t) {
43
- return arguments.length ? (s = typeof t == "function" ? t : S(+t), l) : s;
44
- }, l.padAngle = function(t) {
45
- return arguments.length ? (o = typeof t == "function" ? t : S(+t), l) : o;
46
- }, l;
47
- }
48
- var pe = ne.pie, N = {
49
- sections: /* @__PURE__ */ new Map(),
50
- showData: !1
51
- }, T = N.sections, G = N.showData, de = structuredClone(pe), ge = /* @__PURE__ */ p(() => structuredClone(de), "getConfig"), fe = /* @__PURE__ */ p(() => {
52
- T = /* @__PURE__ */ new Map(), G = N.showData, re();
53
- }, "clear"), he = /* @__PURE__ */ p(({ label: e, value: a }) => {
54
- if (a < 0)
55
- throw new Error(
56
- `"${e}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`
57
- );
58
- T.has(e) || (T.set(e, a), z.debug(`added new section: ${e}, with value: ${a}`));
59
- }, "addSection"), me = /* @__PURE__ */ p(() => T, "getSections"), ve = /* @__PURE__ */ p((e) => {
60
- G = e;
61
- }, "setShowData"), Se = /* @__PURE__ */ p(() => G, "getShowData"), L = {
62
- getConfig: ge,
63
- clear: fe,
64
- setDiagramTitle: Q,
65
- getDiagramTitle: K,
66
- setAccTitle: J,
67
- getAccTitle: Z,
68
- setAccDescription: H,
69
- getAccDescription: q,
70
- addSection: he,
71
- getSections: me,
72
- setShowData: ve,
73
- getShowData: Se
74
- }, ye = /* @__PURE__ */ p((e, a) => {
75
- ie(e, a), a.setShowData(e.showData), e.sections.map(a.addSection);
76
- }, "populateDb"), xe = {
77
- parse: /* @__PURE__ */ p(async (e) => {
78
- const a = await se("pie", e);
79
- z.debug(a), ye(a, L);
80
- }, "parse")
81
- }, we = /* @__PURE__ */ p((e) => `
82
- .pieCircle{
83
- stroke: ${e.pieStrokeColor};
84
- stroke-width : ${e.pieStrokeWidth};
85
- opacity : ${e.pieOpacity};
86
- }
87
- .pieOuterCircle{
88
- stroke: ${e.pieOuterStrokeColor};
89
- stroke-width: ${e.pieOuterStrokeWidth};
90
- fill: none;
91
- }
92
- .pieTitleText {
93
- text-anchor: middle;
94
- font-size: ${e.pieTitleTextSize};
95
- fill: ${e.pieTitleTextColor};
96
- font-family: ${e.fontFamily};
97
- }
98
- .slice {
99
- font-family: ${e.fontFamily};
100
- fill: ${e.pieSectionTextColor};
101
- font-size:${e.pieSectionTextSize};
102
- // fill: white;
103
- }
104
- .legend text {
105
- fill: ${e.pieLegendTextColor};
106
- font-family: ${e.fontFamily};
107
- font-size: ${e.pieLegendTextSize};
108
- }
109
- `, "getStyles"), Ae = we, De = /* @__PURE__ */ p((e) => {
110
- const a = [...e.values()].reduce((s, o) => s + o, 0), f = [...e.entries()].map(([s, o]) => ({ label: s, value: o })).filter((s) => s.value / a * 100 >= 1).sort((s, o) => o.value - s.value);
111
- return ue().value((s) => s.value)(f);
112
- }, "createPieArcs"), Ce = /* @__PURE__ */ p((e, a, f, y) => {
113
- z.debug(`rendering pie chart
114
- ` + e);
115
- const s = y.db, o = X(), l = Y(s.getConfig(), o.pie), t = 40, n = 18, c = 4, d = 450, x = d, m = ee(a), u = m.append("g");
116
- u.attr("transform", "translate(" + x / 2 + "," + d / 2 + ")");
117
- const { themeVariables: i } = o;
118
- let [v] = te(i.pieOuterStrokeWidth);
119
- v ?? (v = 2);
120
- const w = l.textPosition, h = Math.min(x, d) / 2 - t, C = I().innerRadius(0).outerRadius(h), $ = I().innerRadius(h * w).outerRadius(h * w);
121
- u.append("circle").attr("cx", 0).attr("cy", 0).attr("r", h + v / 2).attr("class", "pieOuterCircle");
122
- const g = s.getSections(), A = De(g), D = [
123
- i.pie1,
124
- i.pie2,
125
- i.pie3,
126
- i.pie4,
127
- i.pie5,
128
- i.pie6,
129
- i.pie7,
130
- i.pie8,
131
- i.pie9,
132
- i.pie10,
133
- i.pie11,
134
- i.pie12
135
- ];
136
- let b = 0;
137
- g.forEach((r) => {
138
- b += r;
139
- });
140
- const W = A.filter((r) => (r.data.value / b * 100).toFixed(0) !== "0"), E = le(D);
141
- u.selectAll("mySlices").data(W).enter().append("path").attr("d", C).attr("fill", (r) => E(r.data.label)).attr("class", "pieCircle"), u.selectAll("mySlices").data(W).enter().append("text").text((r) => (r.data.value / b * 100).toFixed(0) + "%").attr("transform", (r) => "translate(" + $.centroid(r) + ")").style("text-anchor", "middle").attr("class", "slice"), u.append("text").text(s.getDiagramTitle()).attr("x", 0).attr("y", -400 / 2).attr("class", "pieTitleText");
142
- const O = [...g.entries()].map(([r, M]) => ({
143
- label: r,
144
- value: M
145
- })), k = u.selectAll(".legend").data(O).enter().append("g").attr("class", "legend").attr("transform", (r, M) => {
146
- const R = n + c, B = R * O.length / 2, V = 12 * n, U = M * R - B;
147
- return "translate(" + V + "," + U + ")";
148
- });
149
- k.append("rect").attr("width", n).attr("height", n).style("fill", (r) => E(r.label)).style("stroke", (r) => E(r.label)), k.append("text").attr("x", n + c).attr("y", n - c).text((r) => s.getShowData() ? `${r.label} [${r.value}]` : r.label);
150
- const _ = Math.max(
151
- ...k.selectAll("text").nodes().map((r) => r?.getBoundingClientRect().width ?? 0)
152
- ), P = x + t + n + c + _;
153
- m.attr("viewBox", `0 0 ${P} ${d}`), ae(m, d, P, l.useMaxWidth);
154
- }, "draw"), $e = { draw: Ce }, ze = {
155
- parser: xe,
156
- db: L,
157
- renderer: $e,
158
- styles: Ae
159
- };
160
- export {
161
- ze as diagram
162
- };