@belonguniverseai/react-sdk 0.6.2 → 0.6.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.
Files changed (81) hide show
  1. package/dist/api/agent-grants.d.ts +23 -8
  2. package/dist/api/client.d.ts +53 -4
  3. package/dist/api/queries.d.ts +2 -0
  4. package/dist/app/call-summary.d.ts +30 -0
  5. package/dist/component/abnfDiagram-N423BO3Z-DR3fMT7g.js +90 -0
  6. package/dist/component/arc-DJkYOSuJ.js +86 -0
  7. package/dist/component/{architectureDiagram-3BPJPVTR-DYcaPx2M.js → architectureDiagram-T3A2C74G-BIp4IBPk.js} +1872 -1785
  8. package/dist/component/{blockDiagram-GPEHLZMM-BdjruLO5.js → blockDiagram-VBNYF7ZC-BqryGqC6.js} +895 -894
  9. package/dist/component/{c4Diagram-AAUBKEIU-Bd2ebSgB.js → c4Diagram-5PPSVZJV-GktlF-Di.js} +3 -3
  10. package/dist/component/{channel-CYFijF_t.js → channel-3CusDaXb.js} +2 -2
  11. package/dist/component/{chunk-ND2GUHAM-OX1-DIU1.js → chunk-2GRJ4B5K-DMTs6j_c.js} +5 -5
  12. package/dist/component/{chunk-QZHKN3VN-DLQ8oUCc.js → chunk-2Q5K7J3B-CIU34hPH.js} +2 -2
  13. package/dist/component/{chunk-AQP2D5EJ-D4G4syYu.js → chunk-5RXB4S5H-Ds3vF1Mv.js} +399 -378
  14. package/dist/component/{chunk-FMBD7UC4-CbRxWx_A.js → chunk-5VM5RSS4-DGxDkIm6.js} +2 -2
  15. package/dist/component/chunk-6Q2QTUOP-BI8oZt98.js +673 -0
  16. package/dist/component/{chunk-727SXJPM-A5r5oL1_.js → chunk-GF5L2VYU-D-36xUd5.js} +244 -239
  17. package/dist/component/{chunk-4BX2VUAB-DVpS0I_p.js → chunk-JWPE2WC7-8N_wQ762.js} +2 -2
  18. package/dist/component/{chunk-2J33WTMH-B06Y_xVy.js → chunk-KBJHAD2P-ChxxpkWc.js} +2 -2
  19. package/dist/component/chunk-RYQCIY6F-CSY-95OP.js +316 -0
  20. package/dist/component/{chunk-55IACEB6-DmZctFkK.js → chunk-XXDRQBXY-BQd9yyE1.js} +2 -2
  21. package/dist/component/{classDiagram-4FO5ZUOK-4S9mdFC1.js → classDiagram-JCYQIIEL-BOq63iUL.js} +3 -3
  22. package/dist/component/{classDiagram-v2-Q7XG4LA2-4S9mdFC1.js → classDiagram-v2-OCEON4UE-BOq63iUL.js} +3 -3
  23. package/dist/component/{cose-bilkent-S5V4N54A-BIrVaakt.js → cose-bilkent-JH36ORCC-B9x8cp5w.js} +2 -2
  24. package/dist/component/{wardley-L42UT6IY-HA1eSIS_.js → cynefin-VYW2F7L2-DAyxamLw.js} +9199 -7918
  25. package/dist/component/cynefinDiagram-MW4NZA55-OF6l99SS.js +302 -0
  26. package/dist/component/dagre-VZM6K2ZE-CELO1hFb.js +343 -0
  27. package/dist/component/diagram-7IWD3JNH-COzvm6E2.js +353 -0
  28. package/dist/component/{diagram-KO2AKTUF-Da1E68Eo.js → diagram-B4RE2ZJO-DR9KMRGw.js} +24 -24
  29. package/dist/component/{diagram-LMA3HP47-dRbk5sBa.js → diagram-LBJQPF4R-D47Zqm-k.js} +23 -23
  30. package/dist/component/{diagram-OG6HWLK6-CcKT8mhn.js → diagram-Q27KOJAE-Key1bw_Y.js} +197 -197
  31. package/dist/component/diagram-UB23O5K3-Cxf-sZnK.js +222 -0
  32. package/dist/component/ebnfDiagram-BXEA7PRR-C8uURt_x.js +112 -0
  33. package/dist/component/{erDiagram-TEJ5UH35-3ATYT9J-.js → erDiagram-JOGREHBK-CpCxe8Ib.js} +142 -131
  34. package/dist/component/{flowDiagram-I6XJVG4X-D9PLm9Od.js → flowDiagram-UKHOOZJN-urFG2I71.js} +268 -258
  35. package/dist/component/ganttDiagram-PKOTCBZU-8nA9faYf.js +2714 -0
  36. package/dist/component/{gitGraphDiagram-PVQCEYII-13gVhAGc.js → gitGraphDiagram-DS77QQ5N-u4cbNW8o.js} +33 -33
  37. package/dist/component/{graph-BZLHvygk.js → graph-CWpEkm4G.js} +35 -35
  38. package/dist/component/{highlighted-body-OFNGDK62-DCxRI4UV.js → highlighted-body-OFNGDK62-Bo-15uvJ.js} +2 -2
  39. package/dist/component/index.js +2 -2
  40. package/dist/component/{infoDiagram-5YYISTIA-DymxA7AN.js → infoDiagram-6WML65LV-ZAv4gZpA.js} +4 -4
  41. package/dist/component/{ishikawaDiagram-YF4QCWOH-C3sTn76C.js → ishikawaDiagram-WSZJBQD7-CvB6evSz.js} +27 -27
  42. package/dist/component/{journeyDiagram-JHISSGLW-Cq0hOAfJ.js → journeyDiagram-NVQOT4AX-M5BRYuPr.js} +5 -5
  43. package/dist/component/{kanban-definition-UN3LZRKU-5tBWjkp7.js → kanban-definition-27J2QSJJ-LL6GkmVe.js} +35 -35
  44. package/dist/component/layout-Br2UjHRU.js +1522 -0
  45. package/dist/component/{linear-BT4blD8s.js → linear-DVg61V66.js} +13 -13
  46. package/dist/component/map-CdwokNh2.js +227 -0
  47. package/dist/component/{mermaid-GHXKKRXX-DXPXjnb7.js → mermaid-GHXKKRXX-C2L7fCIM.js} +29577 -29128
  48. package/dist/component/{mindmap-definition-RKZ34NQL-DO-OuAQQ.js → mindmap-definition-FAOFIHXS-BBZzsLh7.js} +26 -26
  49. package/dist/component/pegDiagram-VL7TDLO6-BEG86cY8.js +98 -0
  50. package/dist/component/pieDiagram-7S7Q4E2Y-BTkrNjAi.js +210 -0
  51. package/dist/component/{quadrantDiagram-W4KKPZXB-CaJWg9ep.js → quadrantDiagram-CIZ2JOQS-BsjBAd4w.js} +14 -15
  52. package/dist/component/railroadDiagram-AXF67PYL-DuE0ZFxj.js +80 -0
  53. package/dist/component/{requirementDiagram-4Y6WPE33-CmZrtZqe.js → requirementDiagram-LRYGKXZP-CcshEEMy.js} +15 -15
  54. package/dist/component/{sankeyDiagram-5OEKKPKP-Cp95M1aj.js → sankeyDiagram-W5VNT64P-CFn011ig.js} +2 -2
  55. package/dist/component/{sequenceDiagram-3UESZ5HK-C0x0WvhR.js → sequenceDiagram-SI44F4Z6-DmMZNJDw.js} +960 -963
  56. package/dist/component/sizeCapture-X5ZJPWSS-Ce4PhIAO.js +49 -0
  57. package/dist/component/{stateDiagram-AJRCARHV-H10vaGL3.js → stateDiagram-OKZ733FA-DDVzQKaO.js} +5 -5
  58. package/dist/component/{stateDiagram-v2-BHNVJYJU-rj7ljkc-.js → stateDiagram-v2-UEYNNEHI-DeeW8PDA.js} +3 -3
  59. package/dist/component/swimlanes-SLNWSIFB-CZh2_vzg.js +5335 -0
  60. package/dist/component/swimlanesDiagram-ULZ7WXOC-Wb0Ri7qR.js +16 -0
  61. package/dist/component/{timeline-definition-PNZ67QCA-Cil1QaqZ.js → timeline-definition-Z64GVDOM-rfiLwdTR.js} +15 -15
  62. package/dist/component/vennDiagram-T6HMQDX7-D8l7hqNb.js +1581 -0
  63. package/dist/component/{wardleyDiagram-YWT4CUSO-Xq5Hnmio.js → wardleyDiagram-T6FBY63Y-7YqmpmtC.js} +15 -15
  64. package/dist/component/{xychartDiagram-2RQKCTM6-dinwR4Zm.js → xychartDiagram-ELKLHX3M-Dx2ECqt8.js} +464 -418
  65. package/dist/embed/voice/line-slots.d.ts +37 -2
  66. package/dist/embed/voice-call.d.ts +12 -0
  67. package/dist/i18n/messages/en.d.ts +1 -2
  68. package/dist/lib/web-storage.d.ts +8 -0
  69. package/dist/stream/belong-chat-transport.d.ts +1 -0
  70. package/dist/stream/belong-data-parts.d.ts +2 -0
  71. package/dist/stream/stream-state-store.d.ts +13 -0
  72. package/dist/types/public.d.ts +3 -0
  73. package/package.json +1 -1
  74. package/dist/component/arc-TLcl3N8_.js +0 -86
  75. package/dist/component/dagre-BM42HDAG-BoPUzTvD.js +0 -448
  76. package/dist/component/diagram-2AECGRRQ-PIXCGxIt.js +0 -220
  77. package/dist/component/diagram-5GNKFQAL-CbJxbGBh.js +0 -126
  78. package/dist/component/ganttDiagram-6RSMTGT7-F_XUzD1p.js +0 -2709
  79. package/dist/component/layout-Bu6nRdWm.js +0 -1731
  80. package/dist/component/pieDiagram-4H26LBE5-BkEktPwZ.js +0 -166
  81. package/dist/component/vennDiagram-CIIHVFJN-Dk8PKmfb.js +0 -1560
@@ -0,0 +1,222 @@
1
+ import { p as I } from "./chunk-JWPE2WC7-8N_wQ762.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-C2L7fCIM.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-Cxf-sZnK.js.map
@@ -0,0 +1,112 @@
1
+ import { g as i, r as m, d as n } from "./chunk-6Q2QTUOP-BI8oZt98.js";
2
+ import { p } from "./chunk-JWPE2WC7-8N_wQ762.js";
3
+ import { _ as t, l as o } from "./mermaid-GHXKKRXX-C2L7fCIM.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-C8uURt_x.js.map