@foris/ai-agent 0.3.0 → 0.4.0
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/ai-agent.es.js +3 -3
- package/dist/ai-agent.umd.js +619 -609
- package/dist/ai-prompt-code-editor/PromptCodeEditor.d.ts +15 -0
- package/dist/ai-prompt-code-editor/index.d.ts +1 -0
- package/dist/ai-prompt-code-editor/promptCodeEditor.mock.d.ts +5 -0
- package/dist/arc-CYayZuAl.js +85 -0
- package/dist/{architectureDiagram-VXUJARFQ-CuFlEJrK.js → architectureDiagram-VXUJARFQ-CqFKxLlH.js} +3 -3
- package/dist/{blockDiagram-VD42YOAC-Ceho4Zhj.js → blockDiagram-VD42YOAC-DEi-xIcu.js} +46 -46
- package/dist/{c4Diagram-YG6GDRKO-zPB3iQJ7.js → c4Diagram-YG6GDRKO-mFZhX_-U.js} +3 -3
- package/dist/channel-CbDO3juL.js +5 -0
- package/dist/{chunk-4BX2VUAB-BZlHuf6l.js → chunk-4BX2VUAB-D5qkn5BA.js} +1 -1
- package/dist/{chunk-55IACEB6-Dr8rgvy_.js → chunk-55IACEB6-CR8xZK7z.js} +1 -1
- package/dist/{chunk-B4BG7PRW-Ccllo2e-.js → chunk-B4BG7PRW-Cm3F2ypm.js} +11 -11
- package/dist/{chunk-DI55MBZ5-DvAROTIr.js → chunk-DI55MBZ5-CxISwEU9.js} +44 -44
- package/dist/{chunk-FMBD7UC4-CVr83prI.js → chunk-FMBD7UC4-DZxSUJCY.js} +1 -1
- package/dist/{chunk-QN33PNHL-nSyFq8_s.js → chunk-QN33PNHL-5NUdQ31M.js} +1 -1
- package/dist/{chunk-QZHKN3VN-Dg8JYP6e.js → chunk-QZHKN3VN-CSeHgX9s.js} +1 -1
- package/dist/{chunk-TZMSLE5B-Bmj6LGNW.js → chunk-TZMSLE5B-DfqMo2XK.js} +1 -1
- package/dist/{classDiagram-2ON5EDUG-DAkxtl6o.js → classDiagram-2ON5EDUG-6wC7c07U.js} +6 -6
- package/dist/{classDiagram-v2-WZHVMYZB-DAkxtl6o.js → classDiagram-v2-WZHVMYZB-6wC7c07U.js} +6 -6
- package/dist/code-block-QI2IAROF-zqFu2qJj.js +2812 -0
- package/dist/{cose-bilkent-S5V4N54A-DwRYWoaW.js → cose-bilkent-S5V4N54A-BzL4MMWZ.js} +2 -2
- package/dist/{dagre-6UL2VRFP-imN1Fyg8.js → dagre-6UL2VRFP-CwTDE2RX.js} +3 -3
- package/dist/{diagram-PSM6KHXK-DAIDeBLn.js → diagram-PSM6KHXK-UeQhynP7.js} +47 -47
- package/dist/{diagram-QEK2KX5R-DQFy-qK9.js → diagram-QEK2KX5R-DZy1cp9G.js} +13 -13
- package/dist/{diagram-S2PKOQOG-Hlk0Nx_Y.js → diagram-S2PKOQOG-DyT7Ss8-.js} +16 -16
- package/dist/{erDiagram-Q2GNP2WA-C8PZPSaf.js → erDiagram-Q2GNP2WA-CpzaErVm.js} +5 -5
- package/dist/{flowDiagram-NV44I4VS-CgTiIFnt.js → flowDiagram-NV44I4VS-BHP6h-eN.js} +6 -6
- package/dist/{ganttDiagram-JELNMOA3-DzYZEAE_.js → ganttDiagram-JELNMOA3-0qqei9Bz.js} +3 -3
- package/dist/{gitGraphDiagram-NY62KEGX-CPwI-Uag.js → gitGraphDiagram-NY62KEGX-DGukWnfa.js} +16 -16
- package/dist/hooks/useCodeTransform.d.ts +13 -0
- package/dist/{index-C2DJ8qoy.js → index-Zd10d_CE.js} +18512 -11461
- package/dist/index.d.ts +2 -2
- package/dist/{infoDiagram-WHAUD3N6-CcN7ZNYI.js → infoDiagram-WHAUD3N6-CRWuQBon.js} +2 -2
- package/dist/{journeyDiagram-XKPGCS4Q-BACao6jz.js → journeyDiagram-XKPGCS4Q-Bl-asDPd.js} +5 -5
- package/dist/{kanban-definition-3W4ZIXB7-Jb7Xwf92.js → kanban-definition-3W4ZIXB7-IdguZzXg.js} +39 -39
- package/dist/{linear-CxGB80S5.js → linear-CRqCHTKs.js} +1 -1
- package/dist/{mermaid-NA5CF7SZ-DekDSZe_.js → mermaid-NA5CF7SZ-CkTMfgBy.js} +1 -1
- package/dist/{mermaid.core-xMGW442o.js → mermaid.core-DyFxH-Px.js} +87 -87
- package/dist/{mindmap-definition-VGOIOE7T-UHZgRHb7.js → mindmap-definition-VGOIOE7T-C8jP5oWr.js} +69 -69
- package/dist/{pieDiagram-ADFJNKIX-CHrTFTbw.js → pieDiagram-ADFJNKIX-DuP0zFKX.js} +23 -23
- package/dist/{quadrantDiagram-AYHSOK5B-CDfhMB18.js → quadrantDiagram-AYHSOK5B-ACKBMWQA.js} +3 -3
- package/dist/{requirementDiagram-UZGBJVZJ-C0aeVQh6.js → requirementDiagram-UZGBJVZJ-DAH6cyPg.js} +4 -4
- package/dist/{sankeyDiagram-TZEHDZUN-kjxRgXd2.js → sankeyDiagram-TZEHDZUN-DpLK8yNI.js} +2 -2
- package/dist/{sequenceDiagram-WL72ISMW-Bs0jyVuH.js → sequenceDiagram-WL72ISMW-CslcsjON.js} +4 -4
- package/dist/{stateDiagram-FKZM4ZOC-CAWwlh9R.js → stateDiagram-FKZM4ZOC-oVuJ6JZY.js} +12 -12
- package/dist/{stateDiagram-v2-4FDKWEC3-9TYlTzc3.js → stateDiagram-v2-4FDKWEC3-Dw3L9jZX.js} +5 -5
- package/dist/style.css +1 -1
- package/dist/tailwind.css +52 -0
- package/dist/{timeline-definition-IT6M3QCI-DrPozOxH.js → timeline-definition-IT6M3QCI-D_aGDXh0.js} +47 -47
- package/dist/{xychartDiagram-PRI3JC2R-BkO8dJff.js → xychartDiagram-PRI3JC2R-u3osfT09.js} +35 -35
- package/package.json +2 -1
- package/dist/ai-input-action/InputAction.d.ts +0 -8
- package/dist/ai-input-action/index.d.ts +0 -1
- package/dist/arc-DN1xn8kz.js +0 -85
- package/dist/channel-BC4mWQQF.js +0 -5
- package/dist/code-block-QI2IAROF-DN-BnDmt.js +0 -9263
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { g as te } from "./chunk-55IACEB6-
|
|
2
|
-
import { s as ee } from "./chunk-QN33PNHL-
|
|
3
|
-
import { _ as f, g as se, s as ie, b as re, c as ae,
|
|
1
|
+
import { g as te } from "./chunk-55IACEB6-CR8xZK7z.js";
|
|
2
|
+
import { s as ee } from "./chunk-QN33PNHL-5NUdQ31M.js";
|
|
3
|
+
import { _ as f, g as se, s as ie, b as re, c as ae, o as ne, p as oe, d as F, l as b, ab as le, e as W, v as ce, A as he, u as ue } from "./mermaid.core-DyFxH-Px.js";
|
|
4
4
|
var vt = function() {
|
|
5
5
|
var e = /* @__PURE__ */ f(function(V, o, h, n) {
|
|
6
6
|
for (h = h || {}, n = V.length; n--; h[V[n]] = o)
|
|
7
7
|
;
|
|
8
8
|
return h;
|
|
9
|
-
}, "o"), t = [1, 2], s = [1, 3], a = [1, 4], i = [2, 4], l = [1, 9], d = [1, 11], S = [1, 16], p = [1, 17], T = [1, 18], _ = [1, 19], m = [1, 33], k = [1, 20], A = [1, 21], $ = [1, 22], x = [1, 23], R = [1, 24], u = [1, 26], L = [1, 27], I = [1, 28], N = [1, 29], G = [1, 30], P = [1, 31], B = [1, 32], at = [1, 35], nt = [1, 36], ot = [1, 37], lt = [1, 38],
|
|
9
|
+
}, "o"), t = [1, 2], s = [1, 3], a = [1, 4], i = [2, 4], l = [1, 9], d = [1, 11], S = [1, 16], p = [1, 17], T = [1, 18], _ = [1, 19], m = [1, 33], k = [1, 20], A = [1, 21], $ = [1, 22], x = [1, 23], R = [1, 24], u = [1, 26], L = [1, 27], I = [1, 28], N = [1, 29], G = [1, 30], P = [1, 31], B = [1, 32], at = [1, 35], nt = [1, 36], ot = [1, 37], lt = [1, 38], z = [1, 34], y = [1, 4, 5, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], ct = [1, 4, 5, 14, 15, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 39, 40, 41, 45, 48, 51, 52, 53, 54, 57], xt = [4, 5, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], gt = {
|
|
10
10
|
trace: /* @__PURE__ */ f(function() {
|
|
11
11
|
}, "trace"),
|
|
12
12
|
yy: {},
|
|
@@ -131,7 +131,7 @@ var vt = function() {
|
|
|
131
131
|
break;
|
|
132
132
|
}
|
|
133
133
|
}, "anonymous"),
|
|
134
|
-
table: [{ 3: 1, 4: t, 5: s, 6: a }, { 1: [3] }, { 3: 5, 4: t, 5: s, 6: a }, { 3: 6, 4: t, 5: s, 6: a }, e([1, 4, 5, 16, 17, 19, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], i, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: l, 5: d, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: S, 17: p, 19: T, 22: _, 24: m, 25: k, 26: A, 27: $, 28: x, 29: R, 32: 25, 33: u, 35: L, 37: I, 38: N, 41: G, 45: P, 48: B, 51: at, 52: nt, 53: ot, 54: lt, 57:
|
|
134
|
+
table: [{ 3: 1, 4: t, 5: s, 6: a }, { 1: [3] }, { 3: 5, 4: t, 5: s, 6: a }, { 3: 6, 4: t, 5: s, 6: a }, e([1, 4, 5, 16, 17, 19, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], i, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: l, 5: d, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: S, 17: p, 19: T, 22: _, 24: m, 25: k, 26: A, 27: $, 28: x, 29: R, 32: 25, 33: u, 35: L, 37: I, 38: N, 41: G, 45: P, 48: B, 51: at, 52: nt, 53: ot, 54: lt, 57: z }, e(y, [2, 5]), { 9: 39, 10: 12, 11: 13, 12: 14, 13: 15, 16: S, 17: p, 19: T, 22: _, 24: m, 25: k, 26: A, 27: $, 28: x, 29: R, 32: 25, 33: u, 35: L, 37: I, 38: N, 41: G, 45: P, 48: B, 51: at, 52: nt, 53: ot, 54: lt, 57: z }, e(y, [2, 7]), e(y, [2, 8]), e(y, [2, 9]), e(y, [2, 10]), e(y, [2, 11]), e(y, [2, 12], { 14: [1, 40], 15: [1, 41] }), e(y, [2, 16]), { 18: [1, 42] }, e(y, [2, 18], { 20: [1, 43] }), { 23: [1, 44] }, e(y, [2, 22]), e(y, [2, 23]), e(y, [2, 24]), e(y, [2, 25]), { 30: 45, 31: [1, 46], 59: [1, 47], 60: [1, 48] }, e(y, [2, 28]), { 34: [1, 49] }, { 36: [1, 50] }, e(y, [2, 31]), { 13: 51, 24: m, 57: z }, { 42: [1, 52], 44: [1, 53] }, { 46: [1, 54] }, { 49: [1, 55] }, e(ct, [2, 44], { 58: [1, 56] }), e(ct, [2, 45], { 58: [1, 57] }), e(y, [2, 38]), e(y, [2, 39]), e(y, [2, 40]), e(y, [2, 41]), e(y, [2, 6]), e(y, [2, 13]), { 13: 58, 24: m, 57: z }, e(y, [2, 17]), e(xt, i, { 7: 59 }), { 24: [1, 60] }, { 24: [1, 61] }, { 23: [1, 62] }, { 24: [2, 48] }, { 24: [2, 49] }, e(y, [2, 29]), e(y, [2, 30]), { 39: [1, 63], 40: [1, 64] }, { 43: [1, 65] }, { 43: [1, 66] }, { 47: [1, 67] }, { 50: [1, 68] }, { 24: [1, 69] }, { 24: [1, 70] }, e(y, [2, 14], { 14: [1, 71] }), { 4: l, 5: d, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: S, 17: p, 19: T, 21: [1, 72], 22: _, 24: m, 25: k, 26: A, 27: $, 28: x, 29: R, 32: 25, 33: u, 35: L, 37: I, 38: N, 41: G, 45: P, 48: B, 51: at, 52: nt, 53: ot, 54: lt, 57: z }, e(y, [2, 20], { 20: [1, 73] }), { 31: [1, 74] }, { 24: [1, 75] }, { 39: [1, 76] }, { 39: [1, 77] }, e(y, [2, 34]), e(y, [2, 35]), e(y, [2, 36]), e(y, [2, 37]), e(ct, [2, 46]), e(ct, [2, 47]), e(y, [2, 15]), e(y, [2, 19]), e(xt, i, { 7: 78 }), e(y, [2, 26]), e(y, [2, 27]), { 5: [1, 79] }, { 5: [1, 80] }, { 4: l, 5: d, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: S, 17: p, 19: T, 21: [1, 81], 22: _, 24: m, 25: k, 26: A, 27: $, 28: x, 29: R, 32: 25, 33: u, 35: L, 37: I, 38: N, 41: G, 45: P, 48: B, 51: at, 52: nt, 53: ot, 54: lt, 57: z }, e(y, [2, 32]), e(y, [2, 33]), e(y, [2, 21])],
|
|
135
135
|
defaultActions: { 5: [2, 1], 6: [2, 2], 47: [2, 48], 48: [2, 49] },
|
|
136
136
|
parseError: /* @__PURE__ */ f(function(o, h) {
|
|
137
137
|
if (h.recoverable)
|
|
@@ -142,13 +142,13 @@ var vt = function() {
|
|
|
142
142
|
}
|
|
143
143
|
}, "parseError"),
|
|
144
144
|
parse: /* @__PURE__ */ f(function(o) {
|
|
145
|
-
var h = this, n = [0], g = [], E = [null], r = [], Z = this.table, c = "", U = 0, K = 0, ut = 2, tt = 1, Tt = r.slice.call(arguments, 1),
|
|
145
|
+
var h = this, n = [0], g = [], E = [null], r = [], Z = this.table, c = "", U = 0, K = 0, ut = 2, tt = 1, Tt = r.slice.call(arguments, 1), D = Object.create(this.lexer), j = { yy: {} };
|
|
146
146
|
for (var Et in this.yy)
|
|
147
147
|
Object.prototype.hasOwnProperty.call(this.yy, Et) && (j.yy[Et] = this.yy[Et]);
|
|
148
|
-
|
|
149
|
-
var _t =
|
|
148
|
+
D.setInput(o, j.yy), j.yy.lexer = D, j.yy.parser = this, typeof D.yylloc > "u" && (D.yylloc = {});
|
|
149
|
+
var _t = D.yylloc;
|
|
150
150
|
r.push(_t);
|
|
151
|
-
var Qt =
|
|
151
|
+
var Qt = D.options && D.options.ranges;
|
|
152
152
|
typeof j.yy.parseError == "function" ? this.parseError = j.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
153
153
|
function Zt(O) {
|
|
154
154
|
n.length = n.length - 2 * O, E.length = E.length - O, r.length = r.length - O;
|
|
@@ -156,21 +156,21 @@ var vt = function() {
|
|
|
156
156
|
f(Zt, "popStack");
|
|
157
157
|
function Lt() {
|
|
158
158
|
var O;
|
|
159
|
-
return O = g.pop() ||
|
|
159
|
+
return O = g.pop() || D.lex() || tt, typeof O != "number" && (O instanceof Array && (g = O, O = g.pop()), O = h.symbols_[O] || O), O;
|
|
160
160
|
}
|
|
161
161
|
f(Lt, "lex");
|
|
162
162
|
for (var C, H, w, mt, X = {}, dt, Y, Ot, ft; ; ) {
|
|
163
163
|
if (H = n[n.length - 1], this.defaultActions[H] ? w = this.defaultActions[H] : ((C === null || typeof C > "u") && (C = Lt()), w = Z[H] && Z[H][C]), typeof w > "u" || !w.length || !w[0]) {
|
|
164
|
-
var
|
|
164
|
+
var bt = "";
|
|
165
165
|
ft = [];
|
|
166
166
|
for (dt in Z[H])
|
|
167
167
|
this.terminals_[dt] && dt > ut && ft.push("'" + this.terminals_[dt] + "'");
|
|
168
|
-
|
|
169
|
-
` +
|
|
170
|
-
Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[C] || C) + "'" :
|
|
171
|
-
text:
|
|
168
|
+
D.showPosition ? bt = "Parse error on line " + (U + 1) + `:
|
|
169
|
+
` + D.showPosition() + `
|
|
170
|
+
Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[C] || C) + "'" : bt = "Parse error on line " + (U + 1) + ": Unexpected " + (C == tt ? "end of input" : "'" + (this.terminals_[C] || C) + "'"), this.parseError(bt, {
|
|
171
|
+
text: D.match,
|
|
172
172
|
token: this.terminals_[C] || C,
|
|
173
|
-
line:
|
|
173
|
+
line: D.yylineno,
|
|
174
174
|
loc: _t,
|
|
175
175
|
expected: ft
|
|
176
176
|
});
|
|
@@ -179,7 +179,7 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[C] || C) + "'" : Dt =
|
|
|
179
179
|
throw new Error("Parse Error: multiple actions possible at state: " + H + ", token: " + C);
|
|
180
180
|
switch (w[0]) {
|
|
181
181
|
case 1:
|
|
182
|
-
n.push(C), E.push(
|
|
182
|
+
n.push(C), E.push(D.yytext), r.push(D.yylloc), n.push(w[1]), C = null, K = D.yyleng, c = D.yytext, U = D.yylineno, _t = D.yylloc;
|
|
183
183
|
break;
|
|
184
184
|
case 2:
|
|
185
185
|
if (Y = this.productions_[w[1]][1], X.$ = E[E.length - Y], X._$ = {
|
|
@@ -567,7 +567,7 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[C] || C) + "'" : Dt =
|
|
|
567
567
|
return f(ht, "Parser"), ht.prototype = gt, gt.Parser = ht, new ht();
|
|
568
568
|
}();
|
|
569
569
|
vt.parser = vt;
|
|
570
|
-
var Be = vt, de = "TB", Yt = "TB", Rt = "dir", q = "state", J = "root", Ct = "relation", fe = "classDef", pe = "style", Se = "applyClass", it = "default", Gt = "divider", Bt = "fill:none", Vt = "fill: #333", Mt = "c", Ut = "text", jt = "normal",
|
|
570
|
+
var Be = vt, de = "TB", Yt = "TB", Rt = "dir", q = "state", J = "root", Ct = "relation", fe = "classDef", pe = "style", Se = "applyClass", it = "default", Gt = "divider", Bt = "fill:none", Vt = "fill: #333", Mt = "c", Ut = "text", jt = "normal", Dt = "rect", kt = "rectWithTitle", ye = "stateStart", ge = "stateEnd", It = "divider", Nt = "roundedWithTitle", Te = "note", Ee = "noteGroup", rt = "statediagram", _e = "state", me = `${rt}-${_e}`, Ht = "transition", be = "note", De = "note-edge", ke = `${Ht} ${De}`, ve = `${rt}-${be}`, Ce = "cluster", Ae = `${rt}-${Ce}`, xe = "cluster-alt", Le = `${rt}-${xe}`, Wt = "parent", zt = "note", Oe = "state", At = "----", Re = `${At}${zt}`, wt = `${At}${Wt}`, Kt = /* @__PURE__ */ f((e, t = Yt) => {
|
|
571
571
|
if (!e.doc)
|
|
572
572
|
return t;
|
|
573
573
|
let s = t;
|
|
@@ -577,7 +577,7 @@ var Be = vt, de = "TB", Yt = "TB", Rt = "dir", q = "state", J = "root", Ct = "re
|
|
|
577
577
|
}, "getDir"), Ie = /* @__PURE__ */ f(function(e, t) {
|
|
578
578
|
return t.db.getClasses();
|
|
579
579
|
}, "getClasses"), Ne = /* @__PURE__ */ f(async function(e, t, s, a) {
|
|
580
|
-
|
|
580
|
+
b.info("REF0:"), b.info("Drawing state diagram (v2)", t);
|
|
581
581
|
const { securityLevel: i, state: l, layout: d } = F();
|
|
582
582
|
a.db.extract(a.db.getRootDocV2());
|
|
583
583
|
const S = a.db.getData(), p = te(t, i);
|
|
@@ -588,7 +588,7 @@ var Be = vt, de = "TB", Yt = "TB", Rt = "dir", q = "state", J = "root", Ct = "re
|
|
|
588
588
|
var I;
|
|
589
589
|
const A = typeof k == "string" ? k : typeof (k == null ? void 0 : k.id) == "string" ? k.id : "";
|
|
590
590
|
if (!A) {
|
|
591
|
-
|
|
591
|
+
b.warn("⚠️ Invalid or missing stateId from key:", JSON.stringify(k));
|
|
592
592
|
return;
|
|
593
593
|
}
|
|
594
594
|
const $ = (I = p.node()) == null ? void 0 : I.querySelectorAll("g");
|
|
@@ -597,12 +597,12 @@ var Be = vt, de = "TB", Yt = "TB", Rt = "dir", q = "state", J = "root", Ct = "re
|
|
|
597
597
|
var P;
|
|
598
598
|
((P = N.textContent) == null ? void 0 : P.trim()) === A && (x = N);
|
|
599
599
|
}), !x) {
|
|
600
|
-
|
|
600
|
+
b.warn("⚠️ Could not find node matching text:", A);
|
|
601
601
|
return;
|
|
602
602
|
}
|
|
603
603
|
const R = x.parentNode;
|
|
604
604
|
if (!R) {
|
|
605
|
-
|
|
605
|
+
b.warn("⚠️ Node has no parent, cannot wrap:", A);
|
|
606
606
|
return;
|
|
607
607
|
}
|
|
608
608
|
const u = document.createElementNS("http://www.w3.org/2000/svg", "a"), L = m.url.replace(/^"+|"+$/g, "");
|
|
@@ -610,10 +610,10 @@ var Be = vt, de = "TB", Yt = "TB", Rt = "dir", q = "state", J = "root", Ct = "re
|
|
|
610
610
|
const N = m.tooltip.replace(/^"+|"+$/g, "");
|
|
611
611
|
u.setAttribute("title", N);
|
|
612
612
|
}
|
|
613
|
-
R.replaceChild(u, x), u.appendChild(x),
|
|
613
|
+
R.replaceChild(u, x), u.appendChild(x), b.info("🔗 Wrapped node in <a> tag for:", A, m.url);
|
|
614
614
|
});
|
|
615
615
|
} catch (_) {
|
|
616
|
-
|
|
616
|
+
b.error("❌ Error injecting clickable links:", _);
|
|
617
617
|
}
|
|
618
618
|
ue.insertTitle(
|
|
619
619
|
p,
|
|
@@ -632,7 +632,7 @@ function yt(e = "", t = 0, s = "", a = At) {
|
|
|
632
632
|
}
|
|
633
633
|
f(yt, "stateDomId");
|
|
634
634
|
var we = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
|
|
635
|
-
|
|
635
|
+
b.trace("items", t), t.forEach((p) => {
|
|
636
636
|
switch (p.stmt) {
|
|
637
637
|
case q:
|
|
638
638
|
st(e, p, s, a, i, l, d, S);
|
|
@@ -669,7 +669,7 @@ var we = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
|
|
|
669
669
|
arrowTypeEnd: "arrow_barb",
|
|
670
670
|
style: Bt,
|
|
671
671
|
labelStyle: "",
|
|
672
|
-
label:
|
|
672
|
+
label: W.sanitizeText(p.description ?? "", F()),
|
|
673
673
|
arrowheadStyle: Vt,
|
|
674
674
|
labelpos: Mt,
|
|
675
675
|
labelType: Ut,
|
|
@@ -712,17 +712,17 @@ f(Jt, "getStylesFromDbInfo");
|
|
|
712
712
|
var st = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
|
|
713
713
|
var A, $, x;
|
|
714
714
|
const p = t.id, T = s.get(p), _ = Xt(T), m = Jt(T), k = F();
|
|
715
|
-
if (
|
|
716
|
-
let R =
|
|
715
|
+
if (b.info("dataFetcher parsedItem", t, T, m), p !== "root") {
|
|
716
|
+
let R = Dt;
|
|
717
717
|
t.start === !0 ? R = ye : t.start === !1 && (R = ge), t.type !== it && (R = t.type), St.get(p) || St.set(p, {
|
|
718
718
|
id: p,
|
|
719
719
|
shape: R,
|
|
720
|
-
description:
|
|
720
|
+
description: W.sanitizeText(p, k),
|
|
721
721
|
cssClasses: `${_} ${me}`,
|
|
722
722
|
cssStyles: m
|
|
723
723
|
});
|
|
724
724
|
const u = St.get(p);
|
|
725
|
-
t.description && (Array.isArray(u.description) ? (u.shape = kt, u.description.push(t.description)) : (A = u.description) != null && A.length && u.description.length > 0 ? (u.shape = kt, u.description === p ? u.description = [t.description] : u.description = [u.description, t.description]) : (u.shape =
|
|
725
|
+
t.description && (Array.isArray(u.description) ? (u.shape = kt, u.description.push(t.description)) : (A = u.description) != null && A.length && u.description.length > 0 ? (u.shape = kt, u.description === p ? u.description = [t.description] : u.description = [u.description, t.description]) : (u.shape = Dt, u.description = t.description), u.description = W.sanitizeTextOrArray(u.description, k)), (($ = u.description) == null ? void 0 : $.length) === 1 && u.shape === kt && (u.type === "group" ? u.shape = Nt : u.shape = Dt), !u.type && t.doc && (b.info("Setting cluster for XCX", p, $t(t)), u.type = "group", u.isGroup = !0, u.dir = $t(t), u.shape = t.type === Gt ? It : Nt, u.cssClasses = `${u.cssClasses} ${Ae} ${l ? Le : ""}`);
|
|
726
726
|
const L = {
|
|
727
727
|
labelStyle: "",
|
|
728
728
|
shape: u.shape,
|
|
@@ -740,7 +740,7 @@ var st = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
|
|
|
740
740
|
ry: 10,
|
|
741
741
|
look: d
|
|
742
742
|
};
|
|
743
|
-
if (L.shape === It && (L.label = ""), e && e.id !== "root" && (
|
|
743
|
+
if (L.shape === It && (L.label = ""), e && e.id !== "root" && (b.trace("Setting node ", p, " to be child of its parent ", e.id), L.parentId = e.id), L.centerLabel = !0, t.note) {
|
|
744
744
|
const I = {
|
|
745
745
|
labelStyle: "",
|
|
746
746
|
shape: Te,
|
|
@@ -750,7 +750,7 @@ var st = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
|
|
|
750
750
|
cssStyles: [],
|
|
751
751
|
cssCompiledStyles: [],
|
|
752
752
|
id: p + Re + "-" + M,
|
|
753
|
-
domId: yt(p, M,
|
|
753
|
+
domId: yt(p, M, zt),
|
|
754
754
|
type: u.type,
|
|
755
755
|
isGroup: u.type === "group",
|
|
756
756
|
padding: (x = k.flowchart) == null ? void 0 : x.padding,
|
|
@@ -763,7 +763,7 @@ var st = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
|
|
|
763
763
|
cssClasses: u.cssClasses,
|
|
764
764
|
cssStyles: [],
|
|
765
765
|
id: p + wt,
|
|
766
|
-
domId: yt(p, M,
|
|
766
|
+
domId: yt(p, M, Wt),
|
|
767
767
|
type: "group",
|
|
768
768
|
isGroup: !0,
|
|
769
769
|
padding: 16,
|
|
@@ -791,7 +791,7 @@ var st = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
|
|
|
791
791
|
} else
|
|
792
792
|
et(a, L, S);
|
|
793
793
|
}
|
|
794
|
-
t.doc && (
|
|
794
|
+
t.doc && (b.trace("Adding nodes children "), we(t, t.doc, s, a, i, !l, d, S));
|
|
795
795
|
}, "dataFetcher"), $e = /* @__PURE__ */ f(() => {
|
|
796
796
|
St.clear(), M = 0;
|
|
797
797
|
}, "reset"), v = {
|
|
@@ -878,7 +878,7 @@ var st = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
|
|
|
878
878
|
}
|
|
879
879
|
}
|
|
880
880
|
setRootDoc(t) {
|
|
881
|
-
|
|
881
|
+
b.info("Setting root doc", t), this.rootDoc = t, this.version === 1 ? this.extract(t) : this.extract(this.getRootDocV2());
|
|
882
882
|
}
|
|
883
883
|
docTranslator(t, s, a) {
|
|
884
884
|
if (s.stmt === Ct) {
|
|
@@ -924,7 +924,7 @@ var st = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
|
|
|
924
924
|
addState(t, s = it, a = void 0, i = void 0, l = void 0, d = void 0, S = void 0, p = void 0) {
|
|
925
925
|
const T = t == null ? void 0 : t.trim();
|
|
926
926
|
if (!this.currentDocument.states.has(T))
|
|
927
|
-
|
|
927
|
+
b.info("Adding state ", T, i), this.currentDocument.states.set(T, {
|
|
928
928
|
stmt: q,
|
|
929
929
|
id: T,
|
|
930
930
|
descriptions: [],
|
|
@@ -941,13 +941,13 @@ var st = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
|
|
|
941
941
|
throw new Error(`State not found: ${T}`);
|
|
942
942
|
_.doc || (_.doc = a), _.type || (_.type = s);
|
|
943
943
|
}
|
|
944
|
-
if (i && (
|
|
944
|
+
if (i && (b.info("Setting state description", T, i), (Array.isArray(i) ? i : [i]).forEach((m) => this.addDescription(T, m.trim()))), l) {
|
|
945
945
|
const _ = this.currentDocument.states.get(T);
|
|
946
946
|
if (!_)
|
|
947
947
|
throw new Error(`State not found: ${T}`);
|
|
948
|
-
_.note = l, _.note.text =
|
|
948
|
+
_.note = l, _.note.text = W.sanitizeText(_.note.text, F());
|
|
949
949
|
}
|
|
950
|
-
d && (
|
|
950
|
+
d && (b.info("Setting state classes", T, d), (Array.isArray(d) ? d : [d]).forEach((m) => this.setCssClass(T, m.trim()))), S && (b.info("Setting state styles", T, S), (Array.isArray(S) ? S : [S]).forEach((m) => this.setStyle(T, m.trim()))), p && (b.info("Setting state styles", T, S), (Array.isArray(p) ? p : [p]).forEach((m) => this.setTextStyle(T, m.trim())));
|
|
951
951
|
}
|
|
952
952
|
clear(t) {
|
|
953
953
|
this.nodes = [], this.edges = [], this.documents = { root: Ft() }, this.currentDocument = this.documents.root, this.startEndCount = 0, this.classes = Pt(), t || (this.links = /* @__PURE__ */ new Map(), ce());
|
|
@@ -959,7 +959,7 @@ var st = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
|
|
|
959
959
|
return this.currentDocument.states;
|
|
960
960
|
}
|
|
961
961
|
logDocuments() {
|
|
962
|
-
|
|
962
|
+
b.info("Documents = ", this.documents);
|
|
963
963
|
}
|
|
964
964
|
getRelations() {
|
|
965
965
|
return this.currentDocument.relations;
|
|
@@ -968,7 +968,7 @@ var st = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
|
|
|
968
968
|
* Adds a clickable link to a state.
|
|
969
969
|
*/
|
|
970
970
|
addLink(t, s, a) {
|
|
971
|
-
this.links.set(t, { url: s, tooltip: a }),
|
|
971
|
+
this.links.set(t, { url: s, tooltip: a }), b.warn("Adding link", t, s, a);
|
|
972
972
|
}
|
|
973
973
|
/**
|
|
974
974
|
* Get all registered links.
|
|
@@ -1030,7 +1030,7 @@ var st = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
|
|
|
1030
1030
|
), this.currentDocument.relations.push({
|
|
1031
1031
|
id1: i,
|
|
1032
1032
|
id2: d,
|
|
1033
|
-
relationTitle:
|
|
1033
|
+
relationTitle: W.sanitizeText(a, F())
|
|
1034
1034
|
});
|
|
1035
1035
|
}
|
|
1036
1036
|
/**
|
|
@@ -1044,14 +1044,14 @@ var st = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
|
|
|
1044
1044
|
this.addState(i, l), this.addState(d, S), this.currentDocument.relations.push({
|
|
1045
1045
|
id1: i,
|
|
1046
1046
|
id2: d,
|
|
1047
|
-
relationTitle: a ?
|
|
1047
|
+
relationTitle: a ? W.sanitizeText(a, F()) : void 0
|
|
1048
1048
|
});
|
|
1049
1049
|
}
|
|
1050
1050
|
}
|
|
1051
1051
|
addDescription(t, s) {
|
|
1052
1052
|
var l;
|
|
1053
1053
|
const a = this.currentDocument.states.get(t), i = s.startsWith(":") ? s.replace(":", "").trim() : s;
|
|
1054
|
-
(l = a == null ? void 0 : a.descriptions) == null || l.push(
|
|
1054
|
+
(l = a == null ? void 0 : a.descriptions) == null || l.push(W.sanitizeText(i, F()));
|
|
1055
1055
|
}
|
|
1056
1056
|
cleanupLabel(t) {
|
|
1057
1057
|
return t.startsWith(":") ? t.slice(2).trim() : t.trim();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as n,
|
|
1
|
+
import { _ as n, n as c, m as l } from "./mermaid.core-DyFxH-Px.js";
|
|
2
2
|
var o = /* @__PURE__ */ n((a, t) => {
|
|
3
3
|
const e = a.append("rect");
|
|
4
4
|
if (e.attr("x", t.x), e.attr("y", t.y), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("width", t.width), e.attr("height", t.height), t.name && e.attr("name", t.name), t.rx && e.attr("rx", t.rx), t.ry && e.attr("ry", t.ry), t.attrs !== void 0)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c as a, C as s, a as e, s as t } from "./chunk-B4BG7PRW-
|
|
2
|
-
import { _ as i } from "./mermaid.core-
|
|
3
|
-
import "./chunk-FMBD7UC4-
|
|
4
|
-
import "./chunk-55IACEB6-
|
|
5
|
-
import "./chunk-QN33PNHL-
|
|
6
|
-
import "./index-
|
|
1
|
+
import { c as a, C as s, a as e, s as t } from "./chunk-B4BG7PRW-Cm3F2ypm.js";
|
|
2
|
+
import { _ as i } from "./mermaid.core-DyFxH-Px.js";
|
|
3
|
+
import "./chunk-FMBD7UC4-DZxSUJCY.js";
|
|
4
|
+
import "./chunk-55IACEB6-CR8xZK7z.js";
|
|
5
|
+
import "./chunk-QN33PNHL-5NUdQ31M.js";
|
|
6
|
+
import "./index-Zd10d_CE.js";
|
|
7
7
|
import "react";
|
|
8
8
|
import "react-dom";
|
|
9
9
|
var f = {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c as a, C as s, a as e, s as t } from "./chunk-B4BG7PRW-
|
|
2
|
-
import { _ as i } from "./mermaid.core-
|
|
3
|
-
import "./chunk-FMBD7UC4-
|
|
4
|
-
import "./chunk-55IACEB6-
|
|
5
|
-
import "./chunk-QN33PNHL-
|
|
6
|
-
import "./index-
|
|
1
|
+
import { c as a, C as s, a as e, s as t } from "./chunk-B4BG7PRW-Cm3F2ypm.js";
|
|
2
|
+
import { _ as i } from "./mermaid.core-DyFxH-Px.js";
|
|
3
|
+
import "./chunk-FMBD7UC4-DZxSUJCY.js";
|
|
4
|
+
import "./chunk-55IACEB6-CR8xZK7z.js";
|
|
5
|
+
import "./chunk-QN33PNHL-5NUdQ31M.js";
|
|
6
|
+
import "./index-Zd10d_CE.js";
|
|
7
7
|
import "react";
|
|
8
8
|
import "react-dom";
|
|
9
9
|
var f = {
|