@belonguniverseai/react-sdk 0.6.2 → 0.6.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.
- package/dist/api/agent-grants.d.ts +6 -0
- package/dist/api/client.d.ts +30 -1
- package/dist/app/call-summary.d.ts +30 -0
- package/dist/component/abnfDiagram-N423BO3Z-C1O9dfJJ.js +90 -0
- package/dist/component/arc-Cpnt_LFj.js +86 -0
- package/dist/component/{architectureDiagram-3BPJPVTR-DYcaPx2M.js → architectureDiagram-T3A2C74G-iakL6yUj.js} +1872 -1785
- package/dist/component/{blockDiagram-GPEHLZMM-BdjruLO5.js → blockDiagram-VBNYF7ZC-D7t0jIvW.js} +895 -894
- package/dist/component/{c4Diagram-AAUBKEIU-Bd2ebSgB.js → c4Diagram-5PPSVZJV-CRX1o0CJ.js} +3 -3
- package/dist/component/{channel-CYFijF_t.js → channel-DnM50Ep0.js} +2 -2
- package/dist/component/{chunk-ND2GUHAM-OX1-DIU1.js → chunk-2GRJ4B5K-ChTMjM-v.js} +5 -5
- package/dist/component/{chunk-QZHKN3VN-DLQ8oUCc.js → chunk-2Q5K7J3B-F2Rpvtwm.js} +2 -2
- package/dist/component/{chunk-AQP2D5EJ-D4G4syYu.js → chunk-5RXB4S5H-B1WLx-ex.js} +399 -378
- package/dist/component/{chunk-FMBD7UC4-CbRxWx_A.js → chunk-5VM5RSS4-D35VMAuN.js} +2 -2
- package/dist/component/chunk-6Q2QTUOP-DGVp_gyk.js +673 -0
- package/dist/component/{chunk-727SXJPM-A5r5oL1_.js → chunk-GF5L2VYU-CZOQEv_q.js} +244 -239
- package/dist/component/{chunk-4BX2VUAB-DVpS0I_p.js → chunk-JWPE2WC7-BbwyDj9g.js} +2 -2
- package/dist/component/{chunk-2J33WTMH-B06Y_xVy.js → chunk-KBJHAD2P-B9qL0VLM.js} +2 -2
- package/dist/component/chunk-RYQCIY6F-5eaMbXXL.js +316 -0
- package/dist/component/{chunk-55IACEB6-DmZctFkK.js → chunk-XXDRQBXY-XJadTIK5.js} +2 -2
- package/dist/component/{classDiagram-4FO5ZUOK-4S9mdFC1.js → classDiagram-JCYQIIEL-DVaEk7uT.js} +3 -3
- package/dist/component/{classDiagram-v2-Q7XG4LA2-4S9mdFC1.js → classDiagram-v2-OCEON4UE-DVaEk7uT.js} +3 -3
- package/dist/component/{cose-bilkent-S5V4N54A-BIrVaakt.js → cose-bilkent-JH36ORCC-DZA30AqI.js} +2 -2
- package/dist/component/{wardley-L42UT6IY-HA1eSIS_.js → cynefin-VYW2F7L2-DAyxamLw.js} +9199 -7918
- package/dist/component/cynefinDiagram-MW4NZA55-CutZScTQ.js +302 -0
- package/dist/component/dagre-VZM6K2ZE-CelPLP8N.js +343 -0
- package/dist/component/diagram-7IWD3JNH-Cr5piwKc.js +353 -0
- package/dist/component/{diagram-KO2AKTUF-Da1E68Eo.js → diagram-B4RE2ZJO-DgLNdZkh.js} +24 -24
- package/dist/component/{diagram-LMA3HP47-dRbk5sBa.js → diagram-LBJQPF4R-DxeIMTjN.js} +23 -23
- package/dist/component/{diagram-OG6HWLK6-CcKT8mhn.js → diagram-Q27KOJAE-WACyk_gr.js} +197 -197
- package/dist/component/diagram-UB23O5K3-DbhVYU5T.js +222 -0
- package/dist/component/ebnfDiagram-BXEA7PRR-DoGrYW10.js +112 -0
- package/dist/component/{erDiagram-TEJ5UH35-3ATYT9J-.js → erDiagram-JOGREHBK-BgewA6fH.js} +142 -131
- package/dist/component/{flowDiagram-I6XJVG4X-D9PLm9Od.js → flowDiagram-UKHOOZJN-1YmYJYcE.js} +268 -258
- package/dist/component/ganttDiagram-PKOTCBZU-BFAEPYkH.js +2714 -0
- package/dist/component/{gitGraphDiagram-PVQCEYII-13gVhAGc.js → gitGraphDiagram-DS77QQ5N-CSiPuE-l.js} +33 -33
- package/dist/component/{graph-BZLHvygk.js → graph-CWpEkm4G.js} +35 -35
- package/dist/component/{highlighted-body-OFNGDK62-DCxRI4UV.js → highlighted-body-OFNGDK62-CSJNGt18.js} +2 -2
- package/dist/component/index.js +2 -2
- package/dist/component/{infoDiagram-5YYISTIA-DymxA7AN.js → infoDiagram-6WML65LV-CoMVfONe.js} +4 -4
- package/dist/component/{ishikawaDiagram-YF4QCWOH-C3sTn76C.js → ishikawaDiagram-WSZJBQD7-B2YEkQ4b.js} +27 -27
- package/dist/component/{journeyDiagram-JHISSGLW-Cq0hOAfJ.js → journeyDiagram-NVQOT4AX-B7b5ZwlF.js} +5 -5
- package/dist/component/{kanban-definition-UN3LZRKU-5tBWjkp7.js → kanban-definition-27J2QSJJ-C9GPAsBR.js} +35 -35
- package/dist/component/layout-Br2UjHRU.js +1522 -0
- package/dist/component/{linear-BT4blD8s.js → linear-Bi0C-9d1.js} +13 -13
- package/dist/component/map-CdwokNh2.js +227 -0
- package/dist/component/{mermaid-GHXKKRXX-DXPXjnb7.js → mermaid-GHXKKRXX-BaBCeViM.js} +25220 -24784
- package/dist/component/{mindmap-definition-RKZ34NQL-DO-OuAQQ.js → mindmap-definition-FAOFIHXS-tHIAo7Ms.js} +26 -26
- package/dist/component/pegDiagram-VL7TDLO6-Db_7lLRV.js +98 -0
- package/dist/component/pieDiagram-7S7Q4E2Y-C4fs4XCK.js +210 -0
- package/dist/component/{quadrantDiagram-W4KKPZXB-CaJWg9ep.js → quadrantDiagram-CIZ2JOQS-Bw7vXO0q.js} +14 -15
- package/dist/component/railroadDiagram-AXF67PYL-kY0VoZEg.js +80 -0
- package/dist/component/{requirementDiagram-4Y6WPE33-CmZrtZqe.js → requirementDiagram-LRYGKXZP-BkNtSZm5.js} +15 -15
- package/dist/component/{sankeyDiagram-5OEKKPKP-Cp95M1aj.js → sankeyDiagram-W5VNT64P-BK_C1BYE.js} +2 -2
- package/dist/component/{sequenceDiagram-3UESZ5HK-C0x0WvhR.js → sequenceDiagram-SI44F4Z6-CEmgVZaE.js} +960 -963
- package/dist/component/sizeCapture-X5ZJPWSS-J5ZNXT4c.js +49 -0
- package/dist/component/{stateDiagram-AJRCARHV-H10vaGL3.js → stateDiagram-OKZ733FA-DrwrNuNs.js} +5 -5
- package/dist/component/{stateDiagram-v2-BHNVJYJU-rj7ljkc-.js → stateDiagram-v2-UEYNNEHI-DHD85VTD.js} +3 -3
- package/dist/component/swimlanes-SLNWSIFB-FOK5tys1.js +5335 -0
- package/dist/component/swimlanesDiagram-ULZ7WXOC-edTvZTge.js +16 -0
- package/dist/component/{timeline-definition-PNZ67QCA-Cil1QaqZ.js → timeline-definition-Z64GVDOM-Cc4fTsjY.js} +15 -15
- package/dist/component/vennDiagram-T6HMQDX7-DYZl8srI.js +1581 -0
- package/dist/component/{wardleyDiagram-YWT4CUSO-Xq5Hnmio.js → wardleyDiagram-T6FBY63Y-BEvv3PjS.js} +15 -15
- package/dist/component/{xychartDiagram-2RQKCTM6-dinwR4Zm.js → xychartDiagram-ELKLHX3M-79AgTtk-.js} +464 -418
- package/dist/embed/voice/line-slots.d.ts +37 -2
- package/dist/embed/voice-call.d.ts +12 -0
- package/dist/i18n/messages/en.d.ts +1 -2
- package/dist/lib/web-storage.d.ts +8 -0
- package/dist/stream/stream-state-store.d.ts +13 -0
- package/dist/types/public.d.ts +3 -0
- package/package.json +1 -1
- package/dist/component/arc-TLcl3N8_.js +0 -86
- package/dist/component/dagre-BM42HDAG-BoPUzTvD.js +0 -448
- package/dist/component/diagram-2AECGRRQ-PIXCGxIt.js +0 -220
- package/dist/component/diagram-5GNKFQAL-CbJxbGBh.js +0 -126
- package/dist/component/ganttDiagram-6RSMTGT7-F_XUzD1p.js +0 -2709
- package/dist/component/layout-Bu6nRdWm.js +0 -1731
- package/dist/component/pieDiagram-4H26LBE5-BkEktPwZ.js +0 -166
- package/dist/component/vennDiagram-CIIHVFJN-Dk8PKmfb.js +0 -1560
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { p as I } from "./chunk-JWPE2WC7-BbwyDj9g.js";
|
|
2
|
+
import { s as _, g as E, p as D, o as F, a as z, b as G, _ as c, G as P, q as B, D as b, z as w, E as W, l as C, Z as V, e as H } from "./mermaid-GHXKKRXX-BaBCeViM.js";
|
|
3
|
+
import { p as j } from "./cynefin-VYW2F7L2-DAyxamLw.js";
|
|
4
|
+
globalThis.process = globalThis.process || { env: {} };
|
|
5
|
+
globalThis.global = globalThis.global || globalThis;
|
|
6
|
+
var x = {
|
|
7
|
+
showLegend: !0,
|
|
8
|
+
ticks: 5,
|
|
9
|
+
max: null,
|
|
10
|
+
min: 0,
|
|
11
|
+
graticule: "circle"
|
|
12
|
+
}, y = 32, A = {
|
|
13
|
+
axes: [],
|
|
14
|
+
curves: [],
|
|
15
|
+
options: x
|
|
16
|
+
}, h = structuredClone(A), U = W.radar, X = /* @__PURE__ */ c(() => b({
|
|
17
|
+
...U,
|
|
18
|
+
...w().radar
|
|
19
|
+
}), "getConfig"), M = /* @__PURE__ */ c(() => h.axes, "getAxes"), Z = /* @__PURE__ */ c(() => h.curves, "getCurves"), q = /* @__PURE__ */ c(() => h.options, "getOptions"), K = /* @__PURE__ */ c((a) => {
|
|
20
|
+
h.axes = a.map((t) => ({
|
|
21
|
+
name: t.name,
|
|
22
|
+
label: t.label ?? t.name
|
|
23
|
+
}));
|
|
24
|
+
}, "setAxes"), N = /* @__PURE__ */ c((a) => {
|
|
25
|
+
h.curves = a.map((t) => ({
|
|
26
|
+
name: t.name,
|
|
27
|
+
label: t.label ?? t.name,
|
|
28
|
+
entries: Y(t.entries)
|
|
29
|
+
}));
|
|
30
|
+
}, "setCurves"), Y = /* @__PURE__ */ c((a) => {
|
|
31
|
+
if (a[0].axis == null)
|
|
32
|
+
return a.map((e) => e.value);
|
|
33
|
+
const t = M();
|
|
34
|
+
if (t.length === 0)
|
|
35
|
+
throw new Error("Axes must be populated before curves for reference entries");
|
|
36
|
+
return t.map((e) => {
|
|
37
|
+
const r = a.find((s) => s.axis?.$refText === e.name);
|
|
38
|
+
if (r === void 0)
|
|
39
|
+
throw new Error("Missing entry for axis " + e.label);
|
|
40
|
+
return r.value;
|
|
41
|
+
});
|
|
42
|
+
}, "computeCurveEntries"), J = /* @__PURE__ */ c((a) => {
|
|
43
|
+
const t = a.reduce(
|
|
44
|
+
(e, r) => (e[r.name] = r, e),
|
|
45
|
+
{}
|
|
46
|
+
);
|
|
47
|
+
h.options = {
|
|
48
|
+
showLegend: t.showLegend?.value ?? x.showLegend,
|
|
49
|
+
ticks: t.ticks?.value ?? x.ticks,
|
|
50
|
+
max: t.max?.value ?? x.max,
|
|
51
|
+
min: t.min?.value ?? x.min,
|
|
52
|
+
graticule: t.graticule?.value ?? x.graticule
|
|
53
|
+
}, h.options.ticks > y && (C.warn(
|
|
54
|
+
`Radar diagram ticks (${h.options.ticks}) exceeds maximum allowed (${y}). Using ${y} instead.`
|
|
55
|
+
), h.options.ticks = y);
|
|
56
|
+
}, "setOptions"), Q = /* @__PURE__ */ c(() => {
|
|
57
|
+
B(), h = structuredClone(A);
|
|
58
|
+
}, "clear"), $ = {
|
|
59
|
+
getAxes: M,
|
|
60
|
+
getCurves: Z,
|
|
61
|
+
getOptions: q,
|
|
62
|
+
setAxes: K,
|
|
63
|
+
setCurves: N,
|
|
64
|
+
setOptions: J,
|
|
65
|
+
getConfig: X,
|
|
66
|
+
clear: Q,
|
|
67
|
+
setAccTitle: G,
|
|
68
|
+
getAccTitle: z,
|
|
69
|
+
setDiagramTitle: F,
|
|
70
|
+
getDiagramTitle: D,
|
|
71
|
+
getAccDescription: E,
|
|
72
|
+
setAccDescription: _
|
|
73
|
+
}, tt = /* @__PURE__ */ c((a) => {
|
|
74
|
+
I(a, $);
|
|
75
|
+
const { axes: t, curves: e, options: r } = a;
|
|
76
|
+
$.setAxes(t), $.setCurves(e), $.setOptions(r);
|
|
77
|
+
}, "populate"), et = {
|
|
78
|
+
parse: /* @__PURE__ */ c(async (a) => {
|
|
79
|
+
const t = await j("radar", a);
|
|
80
|
+
C.debug(t), tt(t);
|
|
81
|
+
}, "parse")
|
|
82
|
+
}, at = /* @__PURE__ */ c((a, t, e, r) => {
|
|
83
|
+
const s = r.db, i = s.getAxes(), l = s.getCurves(), n = s.getOptions(), o = s.getConfig(), d = s.getDiagramTitle(), p = P(t), u = rt(p, o), g = n.max ?? Math.max(...l.map((f) => Math.max(...f.entries))), m = n.min, v = Math.min(o.width, o.height) / 2;
|
|
84
|
+
st(u, i, v, n.ticks, n.graticule), nt(u, i, v, o), T(u, i, l, m, g, n.graticule, o), k(u, l, n.showLegend, o), u.append("text").attr("class", "radarTitle").text(d).attr("x", 0).attr("y", -o.height / 2 - o.marginTop);
|
|
85
|
+
}, "draw"), rt = /* @__PURE__ */ c((a, t) => {
|
|
86
|
+
const e = t.width + t.marginLeft + t.marginRight, r = t.height + t.marginTop + t.marginBottom, s = {
|
|
87
|
+
x: t.marginLeft + t.width / 2,
|
|
88
|
+
y: t.marginTop + t.height / 2
|
|
89
|
+
};
|
|
90
|
+
return H(a, r, e, t.useMaxWidth ?? !0), a.attr("viewBox", `0 0 ${e} ${r}`).attr("overflow", "visible"), a.append("g").attr("transform", `translate(${s.x}, ${s.y})`);
|
|
91
|
+
}, "drawFrame"), st = /* @__PURE__ */ c((a, t, e, r, s) => {
|
|
92
|
+
if (s === "circle")
|
|
93
|
+
for (let i = 0; i < r; i++) {
|
|
94
|
+
const l = e * (i + 1) / r;
|
|
95
|
+
a.append("circle").attr("r", l).attr("class", "radarGraticule");
|
|
96
|
+
}
|
|
97
|
+
else if (s === "polygon") {
|
|
98
|
+
const i = t.length;
|
|
99
|
+
for (let l = 0; l < r; l++) {
|
|
100
|
+
const n = e * (l + 1) / r, o = t.map((d, p) => {
|
|
101
|
+
const u = 2 * p * Math.PI / i - Math.PI / 2, g = n * Math.cos(u), m = n * Math.sin(u);
|
|
102
|
+
return `${g},${m}`;
|
|
103
|
+
}).join(" ");
|
|
104
|
+
a.append("polygon").attr("points", o).attr("class", "radarGraticule");
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}, "drawGraticule"), nt = /* @__PURE__ */ c((a, t, e, r) => {
|
|
108
|
+
const s = t.length;
|
|
109
|
+
for (let i = 0; i < s; i++) {
|
|
110
|
+
const l = t[i].label, n = 2 * i * Math.PI / s - Math.PI / 2, o = Math.cos(n), d = Math.sin(n);
|
|
111
|
+
a.append("line").attr("x1", 0).attr("y1", 0).attr("x2", e * r.axisScaleFactor * o).attr("y2", e * r.axisScaleFactor * d).attr("class", "radarAxisLine");
|
|
112
|
+
const p = o > 0.01 ? "start" : o < -0.01 ? "end" : "middle", u = d > 0.01 ? "hanging" : d < -0.01 ? "auto" : "central", g = 4;
|
|
113
|
+
a.append("text").text(l).attr("x", e * r.axisLabelFactor * o + g * o).attr("y", e * r.axisLabelFactor * d + g * d).attr("text-anchor", p).attr("dominant-baseline", u).attr("class", "radarAxisLabel");
|
|
114
|
+
}
|
|
115
|
+
}, "drawAxes");
|
|
116
|
+
function T(a, t, e, r, s, i, l) {
|
|
117
|
+
const n = t.length, o = Math.min(l.width, l.height) / 2;
|
|
118
|
+
e.forEach((d, p) => {
|
|
119
|
+
if (d.entries.length !== n)
|
|
120
|
+
return;
|
|
121
|
+
const u = d.entries.map((g, m) => {
|
|
122
|
+
const v = 2 * Math.PI * m / n - Math.PI / 2, f = L(g, r, s, o), O = f * Math.cos(v), R = f * Math.sin(v);
|
|
123
|
+
return { x: O, y: R };
|
|
124
|
+
});
|
|
125
|
+
i === "circle" ? a.append("path").attr("d", S(u, l.curveTension)).attr("class", `radarCurve-${p}`) : i === "polygon" && a.append("polygon").attr("points", u.map((g) => `${g.x},${g.y}`).join(" ")).attr("class", `radarCurve-${p}`);
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
c(T, "drawCurves");
|
|
129
|
+
function L(a, t, e, r) {
|
|
130
|
+
const s = Math.min(Math.max(a, t), e);
|
|
131
|
+
return r * (s - t) / (e - t);
|
|
132
|
+
}
|
|
133
|
+
c(L, "relativeRadius");
|
|
134
|
+
function S(a, t) {
|
|
135
|
+
const e = a.length;
|
|
136
|
+
let r = `M${a[0].x},${a[0].y}`;
|
|
137
|
+
for (let s = 0; s < e; s++) {
|
|
138
|
+
const i = a[(s - 1 + e) % e], l = a[s], n = a[(s + 1) % e], o = a[(s + 2) % e], d = {
|
|
139
|
+
x: l.x + (n.x - i.x) * t,
|
|
140
|
+
y: l.y + (n.y - i.y) * t
|
|
141
|
+
}, p = {
|
|
142
|
+
x: n.x - (o.x - l.x) * t,
|
|
143
|
+
y: n.y - (o.y - l.y) * t
|
|
144
|
+
};
|
|
145
|
+
r += ` C${d.x},${d.y} ${p.x},${p.y} ${n.x},${n.y}`;
|
|
146
|
+
}
|
|
147
|
+
return `${r} Z`;
|
|
148
|
+
}
|
|
149
|
+
c(S, "closedRoundCurve");
|
|
150
|
+
function k(a, t, e, r) {
|
|
151
|
+
if (!e)
|
|
152
|
+
return;
|
|
153
|
+
const s = (r.width / 2 + r.marginRight) * 3 / 4, i = -(r.height / 2 + r.marginTop) * 3 / 4, l = 20;
|
|
154
|
+
t.forEach((n, o) => {
|
|
155
|
+
const d = a.append("g").attr("transform", `translate(${s}, ${i + o * l})`);
|
|
156
|
+
d.append("rect").attr("width", 12).attr("height", 12).attr("class", `radarLegendBox-${o}`), d.append("text").attr("x", 16).attr("y", 0).attr("class", "radarLegendText").text(n.label);
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
c(k, "drawLegend");
|
|
160
|
+
var ot = { draw: at }, it = /* @__PURE__ */ c((a, t) => {
|
|
161
|
+
let e = "";
|
|
162
|
+
for (let r = 0; r < a.THEME_COLOR_LIMIT; r++) {
|
|
163
|
+
const s = a[`cScale${r}`];
|
|
164
|
+
e += `
|
|
165
|
+
.radarCurve-${r} {
|
|
166
|
+
color: ${s};
|
|
167
|
+
fill: ${s};
|
|
168
|
+
fill-opacity: ${t.curveOpacity};
|
|
169
|
+
stroke: ${s};
|
|
170
|
+
stroke-width: ${t.curveStrokeWidth};
|
|
171
|
+
}
|
|
172
|
+
.radarLegendBox-${r} {
|
|
173
|
+
fill: ${s};
|
|
174
|
+
fill-opacity: ${t.curveOpacity};
|
|
175
|
+
stroke: ${s};
|
|
176
|
+
}
|
|
177
|
+
`;
|
|
178
|
+
}
|
|
179
|
+
return e;
|
|
180
|
+
}, "genIndexStyles"), lt = /* @__PURE__ */ c((a) => {
|
|
181
|
+
const t = V(), e = w(), r = b(t, e.themeVariables), s = b(r.radar, a);
|
|
182
|
+
return { themeVariables: r, radarOptions: s };
|
|
183
|
+
}, "buildRadarStyleOptions"), ct = /* @__PURE__ */ c(({ radar: a } = {}) => {
|
|
184
|
+
const { themeVariables: t, radarOptions: e } = lt(a);
|
|
185
|
+
return `
|
|
186
|
+
.radarTitle {
|
|
187
|
+
font-size: ${t.fontSize};
|
|
188
|
+
color: ${t.titleColor};
|
|
189
|
+
dominant-baseline: hanging;
|
|
190
|
+
text-anchor: middle;
|
|
191
|
+
}
|
|
192
|
+
.radarAxisLine {
|
|
193
|
+
stroke: ${e.axisColor};
|
|
194
|
+
stroke-width: ${e.axisStrokeWidth};
|
|
195
|
+
}
|
|
196
|
+
.radarAxisLabel {
|
|
197
|
+
font-size: ${e.axisLabelFontSize}px;
|
|
198
|
+
color: ${e.axisColor};
|
|
199
|
+
}
|
|
200
|
+
.radarGraticule {
|
|
201
|
+
fill: ${e.graticuleColor};
|
|
202
|
+
fill-opacity: ${e.graticuleOpacity};
|
|
203
|
+
stroke: ${e.graticuleColor};
|
|
204
|
+
stroke-width: ${e.graticuleStrokeWidth};
|
|
205
|
+
}
|
|
206
|
+
.radarLegendText {
|
|
207
|
+
text-anchor: start;
|
|
208
|
+
font-size: ${e.legendFontSize}px;
|
|
209
|
+
dominant-baseline: hanging;
|
|
210
|
+
}
|
|
211
|
+
${it(t, e)}
|
|
212
|
+
`;
|
|
213
|
+
}, "styles"), gt = {
|
|
214
|
+
parser: et,
|
|
215
|
+
db: $,
|
|
216
|
+
renderer: ot,
|
|
217
|
+
styles: ct
|
|
218
|
+
};
|
|
219
|
+
export {
|
|
220
|
+
gt as diagram
|
|
221
|
+
};
|
|
222
|
+
//# sourceMappingURL=diagram-UB23O5K3-DbhVYU5T.js.map
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { g as i, r as m, d as n } from "./chunk-6Q2QTUOP-DGVp_gyk.js";
|
|
2
|
+
import { p } from "./chunk-JWPE2WC7-BbwyDj9g.js";
|
|
3
|
+
import { _ as t, l as o } from "./mermaid-GHXKKRXX-BaBCeViM.js";
|
|
4
|
+
import { M as u, a as f } from "./cynefin-VYW2F7L2-DAyxamLw.js";
|
|
5
|
+
globalThis.process = globalThis.process || { env: {} };
|
|
6
|
+
globalThis.global = globalThis.global || globalThis;
|
|
7
|
+
var c = f().RailroadEbnf.parser.LangiumParser, s = /* @__PURE__ */ t((e) => {
|
|
8
|
+
const r = e.alternatives.map(b);
|
|
9
|
+
return r.length === 1 ? r[0] : {
|
|
10
|
+
type: "choice",
|
|
11
|
+
alternatives: r
|
|
12
|
+
};
|
|
13
|
+
}, "transformChoice"), b = /* @__PURE__ */ t((e) => {
|
|
14
|
+
const r = e.elements.map(E);
|
|
15
|
+
return r.length === 1 ? r[0] : {
|
|
16
|
+
type: "sequence",
|
|
17
|
+
elements: r
|
|
18
|
+
};
|
|
19
|
+
}, "transformSequence"), l = /* @__PURE__ */ t((e) => {
|
|
20
|
+
switch (e.$type) {
|
|
21
|
+
case "EbnfTerminal":
|
|
22
|
+
return {
|
|
23
|
+
type: "terminal",
|
|
24
|
+
value: e.value
|
|
25
|
+
};
|
|
26
|
+
case "EbnfNonTerminal":
|
|
27
|
+
return {
|
|
28
|
+
type: "nonterminal",
|
|
29
|
+
name: e.name
|
|
30
|
+
};
|
|
31
|
+
case "EbnfSpecial":
|
|
32
|
+
return {
|
|
33
|
+
type: "special",
|
|
34
|
+
text: e.text
|
|
35
|
+
};
|
|
36
|
+
case "EbnfGroup":
|
|
37
|
+
return s(e.element);
|
|
38
|
+
case "EbnfOptional":
|
|
39
|
+
return {
|
|
40
|
+
type: "optional",
|
|
41
|
+
element: s(e.element)
|
|
42
|
+
};
|
|
43
|
+
case "EbnfRepetition":
|
|
44
|
+
return {
|
|
45
|
+
type: "repetition",
|
|
46
|
+
element: s(e.element),
|
|
47
|
+
min: 0,
|
|
48
|
+
max: 1 / 0
|
|
49
|
+
};
|
|
50
|
+
default:
|
|
51
|
+
throw new Error(`Unsupported EBNF primary node: ${e.$type}`);
|
|
52
|
+
}
|
|
53
|
+
}, "transformPrimary"), g = /* @__PURE__ */ t((e, r) => {
|
|
54
|
+
switch (r.$type) {
|
|
55
|
+
case "EbnfOptionalPostfix":
|
|
56
|
+
return {
|
|
57
|
+
type: "optional",
|
|
58
|
+
element: e
|
|
59
|
+
};
|
|
60
|
+
case "EbnfZeroOrMorePostfix":
|
|
61
|
+
return {
|
|
62
|
+
type: "repetition",
|
|
63
|
+
element: e,
|
|
64
|
+
min: 0,
|
|
65
|
+
max: 1 / 0
|
|
66
|
+
};
|
|
67
|
+
case "EbnfOneOrMorePostfix":
|
|
68
|
+
return {
|
|
69
|
+
type: "repetition",
|
|
70
|
+
element: e,
|
|
71
|
+
min: 1,
|
|
72
|
+
max: 1 / 0
|
|
73
|
+
};
|
|
74
|
+
case "EbnfExceptionPostfix":
|
|
75
|
+
return {
|
|
76
|
+
type: "sequence",
|
|
77
|
+
elements: [
|
|
78
|
+
e,
|
|
79
|
+
{ type: "terminal", value: "-" },
|
|
80
|
+
l(r.except)
|
|
81
|
+
]
|
|
82
|
+
};
|
|
83
|
+
default:
|
|
84
|
+
throw new Error(`Unsupported EBNF postfix node: ${r.$type}`);
|
|
85
|
+
}
|
|
86
|
+
}, "transformPostfix"), E = /* @__PURE__ */ t((e) => e.postfixes.reduce((r, a) => g(r, a), l(e.base)), "transformTerm"), d = /* @__PURE__ */ t((e) => ({
|
|
87
|
+
name: e.name,
|
|
88
|
+
definition: s(e.definition)
|
|
89
|
+
}), "transformRule"), y = /* @__PURE__ */ t((e) => {
|
|
90
|
+
p(e, n), e.title && n.setTitle(e.title), e.rules.map((r) => n.addRule(d(r)));
|
|
91
|
+
}, "populateDb"), h = {
|
|
92
|
+
parse: /* @__PURE__ */ t((e) => {
|
|
93
|
+
n.clear(), o.debug("[EBNF Parser] Starting Langium parse");
|
|
94
|
+
const r = c.parse(e);
|
|
95
|
+
if (r.lexerErrors.length > 0 || r.parserErrors.length > 0)
|
|
96
|
+
throw new u(r);
|
|
97
|
+
const a = r.value;
|
|
98
|
+
o.debug("[EBNF Parser] Parsed rules:", a.rules.length), y(a), o.debug("[EBNF Parser] Parse complete");
|
|
99
|
+
}, "parse"),
|
|
100
|
+
parser: {
|
|
101
|
+
yy: n
|
|
102
|
+
}
|
|
103
|
+
}, w = {
|
|
104
|
+
parser: h,
|
|
105
|
+
db: n,
|
|
106
|
+
renderer: m,
|
|
107
|
+
styles: i
|
|
108
|
+
};
|
|
109
|
+
export {
|
|
110
|
+
w as diagram
|
|
111
|
+
};
|
|
112
|
+
//# sourceMappingURL=ebnfDiagram-BXEA7PRR-DoGrYW10.js.map
|