@aidapt/caity-chat 3.0.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.
Files changed (62) hide show
  1. package/README.md +73 -0
  2. package/dist/lib/_baseUniq-BVCT-t6P.js +477 -0
  3. package/dist/lib/arc-Kj6ZmwPS.js +83 -0
  4. package/dist/lib/architectureDiagram-Q4EWVU46-DA4kYaz_.js +4690 -0
  5. package/dist/lib/blockDiagram-DXYQGD6D-BWT5yya1.js +2295 -0
  6. package/dist/lib/c4Diagram-AHTNJAMY-BjY6DW3U.js +1577 -0
  7. package/dist/lib/caity-chat.tgz +0 -0
  8. package/dist/lib/channel-BjraetTo.js +5 -0
  9. package/dist/lib/chunk-4BX2VUAB-iSPZGgxQ.js +8 -0
  10. package/dist/lib/chunk-4TB4RGXK-DvnUcLoe.js +1465 -0
  11. package/dist/lib/chunk-55IACEB6-Mw25YX9j.js +8 -0
  12. package/dist/lib/chunk-EDXVE4YY-Dtbxz7df.js +19 -0
  13. package/dist/lib/chunk-FMBD7UC4-OCIy3top.js +19 -0
  14. package/dist/lib/chunk-OYMX7WX6-DFW9El2C.js +1383 -0
  15. package/dist/lib/chunk-QZHKN3VN-BYFTfk7k.js +15 -0
  16. package/dist/lib/chunk-YZCP3GAM-Cs-HTcyJ.js +68 -0
  17. package/dist/lib/classDiagram-6PBFFD2Q-CrDUlIYr.js +16 -0
  18. package/dist/lib/classDiagram-v2-HSJHXN6E-CrDUlIYr.js +16 -0
  19. package/dist/lib/clone-C0qEGPCz.js +8 -0
  20. package/dist/lib/cose-bilkent-S5V4N54A-H1-YbKvI.js +2609 -0
  21. package/dist/lib/cytoscape.esm-D_3MZVO6.js +18707 -0
  22. package/dist/lib/dagre-KV5264BT-DhEnTJ4D.js +443 -0
  23. package/dist/lib/defaultLocale-BgPVtth8.js +171 -0
  24. package/dist/lib/diagram-5BDNPKRD-CK6wgKxI.js +123 -0
  25. package/dist/lib/diagram-G4DWMVQ6-IhA_MJ0t.js +528 -0
  26. package/dist/lib/diagram-MMDJMWI5-DDuA1rYY.js +217 -0
  27. package/dist/lib/diagram-TYMM5635-_VI1en0S.js +142 -0
  28. package/dist/lib/erDiagram-SMLLAGMA-B1REwW7y.js +899 -0
  29. package/dist/lib/flowDiagram-DWJPFMVM-rWzOGDlg.js +1628 -0
  30. package/dist/lib/ganttDiagram-T4ZO3ILL-UhSvbAmM.js +2701 -0
  31. package/dist/lib/gitGraphDiagram-UUTBAWPF-DrsSMMoJ.js +815 -0
  32. package/dist/lib/graph-DMr8NrNW.js +738 -0
  33. package/dist/lib/index.d.ts +665 -0
  34. package/dist/lib/index.js +52 -0
  35. package/dist/lib/infoDiagram-42DDH7IO-CPF3XCNj.js +24 -0
  36. package/dist/lib/init-DjUOC4st.js +16 -0
  37. package/dist/lib/ishikawaDiagram-UXIWVN3A-B4Nt1TdW.js +621 -0
  38. package/dist/lib/journeyDiagram-VCZTEJTY-DW5yRsOM.js +834 -0
  39. package/dist/lib/kanban-definition-6JOO6SKY-5DmJRubo.js +724 -0
  40. package/dist/lib/layout-B00IQLgh.js +1441 -0
  41. package/dist/lib/linear-LLab47WO.js +259 -0
  42. package/dist/lib/main-C9dvh9CT.js +88771 -0
  43. package/dist/lib/mermaid.core-BrBkhL9h.js +15967 -0
  44. package/dist/lib/min-CJFyJhXg.js +38 -0
  45. package/dist/lib/mindmap-definition-QFDTVHPH-doqZCFNi.js +833 -0
  46. package/dist/lib/ordinal-B6-f3MAq.js +61 -0
  47. package/dist/lib/pieDiagram-DEJITSTG-DKi5GKup.js +163 -0
  48. package/dist/lib/quadrantDiagram-34T5L4WZ-COYWmEhy.js +1022 -0
  49. package/dist/lib/requirementDiagram-MS252O5E-D3odK6YH.js +882 -0
  50. package/dist/lib/sankeyDiagram-XADWPNL6-D36eaMCx.js +810 -0
  51. package/dist/lib/sequenceDiagram-FGHM5R23-NpESTwMk.js +2883 -0
  52. package/dist/lib/standalone.js +4 -0
  53. package/dist/lib/stateDiagram-FHFEXIEX-kXZ_Bn-a.js +263 -0
  54. package/dist/lib/stateDiagram-v2-QKLJ7IA2-B5xMdEuE.js +16 -0
  55. package/dist/lib/timeline-definition-GMOUNBTQ-DZDdcJwy.js +1055 -0
  56. package/dist/lib/vennDiagram-DHZGUBPP-Clhb6EGF.js +1557 -0
  57. package/dist/lib/wardley-RL74JXVD-CwSnyVu7.js +18396 -0
  58. package/dist/lib/wardleyDiagram-NUSXRM2D-DnXL4F04.js +594 -0
  59. package/dist/lib/xychartDiagram-5P7HB3ND-CweIkrg3.js +1342 -0
  60. package/package.json +95 -0
  61. package/src/types/caity-chat.d.ts +213 -0
  62. package/src/types/template-slots.d.ts +167 -0
@@ -0,0 +1,61 @@
1
+ import { i as a } from "./init-DjUOC4st.js";
2
+ class o extends Map {
3
+ constructor(n, t = g) {
4
+ 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);
5
+ }
6
+ get(n) {
7
+ return super.get(c(this, n));
8
+ }
9
+ has(n) {
10
+ return super.has(c(this, n));
11
+ }
12
+ set(n, t) {
13
+ return super.set(l(this, n), t);
14
+ }
15
+ delete(n) {
16
+ return super.delete(p(this, n));
17
+ }
18
+ }
19
+ function c({ _intern: e, _key: n }, t) {
20
+ const r = n(t);
21
+ return e.has(r) ? e.get(r) : t;
22
+ }
23
+ function l({ _intern: e, _key: n }, t) {
24
+ const r = n(t);
25
+ return e.has(r) ? e.get(r) : (e.set(r, t), t);
26
+ }
27
+ function p({ _intern: e, _key: n }, t) {
28
+ const r = n(t);
29
+ return e.has(r) && (t = e.get(r), e.delete(r)), t;
30
+ }
31
+ function g(e) {
32
+ return e !== null && typeof e == "object" ? e.valueOf() : e;
33
+ }
34
+ const f = /* @__PURE__ */ Symbol("implicit");
35
+ function h() {
36
+ var e = new o(), n = [], t = [], r = f;
37
+ function s(u) {
38
+ let i = e.get(u);
39
+ if (i === void 0) {
40
+ if (r !== f) return r;
41
+ e.set(u, i = n.push(u) - 1);
42
+ }
43
+ return t[i % t.length];
44
+ }
45
+ return s.domain = function(u) {
46
+ if (!arguments.length) return n.slice();
47
+ n = [], e = new o();
48
+ for (const i of u)
49
+ e.has(i) || e.set(i, n.push(i) - 1);
50
+ return s;
51
+ }, s.range = function(u) {
52
+ return arguments.length ? (t = Array.from(u), s) : t.slice();
53
+ }, s.unknown = function(u) {
54
+ return arguments.length ? (r = u, s) : r;
55
+ }, s.copy = function() {
56
+ return h(n, t).unknown(r);
57
+ }, a.apply(s, arguments), s;
58
+ }
59
+ export {
60
+ h as o
61
+ };
@@ -0,0 +1,163 @@
1
+ import { a4 as S, a7 as R, aE as K, g as Q, s as Y, a as tt, b as et, q as at, p as nt, _ as d, l as z, c as rt, F as it, I as st, N as ot, e as lt, z as ct, G as ut } from "./mermaid.core-BrBkhL9h.js";
2
+ import { p as dt } from "./chunk-4BX2VUAB-iSPZGgxQ.js";
3
+ import { p as pt } from "./wardley-RL74JXVD-CwSnyVu7.js";
4
+ import { d as P } from "./arc-Kj6ZmwPS.js";
5
+ import { o as gt } from "./ordinal-B6-f3MAq.js";
6
+ function ft(t, a) {
7
+ return a < t ? -1 : a > t ? 1 : a >= t ? 0 : NaN;
8
+ }
9
+ function ht(t) {
10
+ return t;
11
+ }
12
+ function mt() {
13
+ var t = ht, a = ft, f = null, y = S(0), s = S(R), p = S(0);
14
+ function o(e) {
15
+ var r, l = (e = K(e)).length, g, h, v = 0, c = new Array(l), i = new Array(l), x = +y.apply(this, arguments), w = Math.min(R, Math.max(-R, s.apply(this, arguments) - x)), m, D = Math.min(Math.abs(w) / l, p.apply(this, arguments)), $ = D * (w < 0 ? -1 : 1), u;
16
+ for (r = 0; r < l; ++r)
17
+ (u = i[c[r] = r] = +t(e[r], r, e)) > 0 && (v += u);
18
+ for (a != null ? c.sort(function(A, C) {
19
+ return a(i[A], i[C]);
20
+ }) : f != null && c.sort(function(A, C) {
21
+ return f(e[A], e[C]);
22
+ }), r = 0, h = v ? (w - l * $) / v : 0; r < l; ++r, x = m)
23
+ g = c[r], u = i[g], m = x + (u > 0 ? u * h : 0) + $, i[g] = {
24
+ data: e[g],
25
+ index: r,
26
+ value: u,
27
+ startAngle: x,
28
+ endAngle: m,
29
+ padAngle: D
30
+ };
31
+ return i;
32
+ }
33
+ return o.value = function(e) {
34
+ return arguments.length ? (t = typeof e == "function" ? e : S(+e), o) : t;
35
+ }, o.sortValues = function(e) {
36
+ return arguments.length ? (a = e, f = null, o) : a;
37
+ }, o.sort = function(e) {
38
+ return arguments.length ? (f = e, a = null, o) : f;
39
+ }, o.startAngle = function(e) {
40
+ return arguments.length ? (y = typeof e == "function" ? e : S(+e), o) : y;
41
+ }, o.endAngle = function(e) {
42
+ return arguments.length ? (s = typeof e == "function" ? e : S(+e), o) : s;
43
+ }, o.padAngle = function(e) {
44
+ return arguments.length ? (p = typeof e == "function" ? e : S(+e), o) : p;
45
+ }, o;
46
+ }
47
+ var vt = ut.pie, F = {
48
+ sections: /* @__PURE__ */ new Map(),
49
+ showData: !1
50
+ }, T = F.sections, W = F.showData, xt = structuredClone(vt), St = /* @__PURE__ */ d(() => structuredClone(xt), "getConfig"), yt = /* @__PURE__ */ d(() => {
51
+ T = /* @__PURE__ */ new Map(), W = F.showData, ct();
52
+ }, "clear"), wt = /* @__PURE__ */ d(({ label: t, value: a }) => {
53
+ if (a < 0)
54
+ throw new Error(
55
+ `"${t}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`
56
+ );
57
+ T.has(t) || (T.set(t, a), z.debug(`added new section: ${t}, with value: ${a}`));
58
+ }, "addSection"), At = /* @__PURE__ */ d(() => T, "getSections"), Ct = /* @__PURE__ */ d((t) => {
59
+ W = t;
60
+ }, "setShowData"), Dt = /* @__PURE__ */ d(() => W, "getShowData"), _ = {
61
+ getConfig: St,
62
+ clear: yt,
63
+ setDiagramTitle: nt,
64
+ getDiagramTitle: at,
65
+ setAccTitle: et,
66
+ getAccTitle: tt,
67
+ setAccDescription: Y,
68
+ getAccDescription: Q,
69
+ addSection: wt,
70
+ getSections: At,
71
+ setShowData: Ct,
72
+ getShowData: Dt
73
+ }, $t = /* @__PURE__ */ d((t, a) => {
74
+ dt(t, a), a.setShowData(t.showData), t.sections.map(a.addSection);
75
+ }, "populateDb"), Tt = {
76
+ parse: /* @__PURE__ */ d(async (t) => {
77
+ const a = await pt("pie", t);
78
+ z.debug(a), $t(a, _);
79
+ }, "parse")
80
+ }, Et = /* @__PURE__ */ d((t) => `
81
+ .pieCircle{
82
+ stroke: ${t.pieStrokeColor};
83
+ stroke-width : ${t.pieStrokeWidth};
84
+ opacity : ${t.pieOpacity};
85
+ }
86
+ .pieOuterCircle{
87
+ stroke: ${t.pieOuterStrokeColor};
88
+ stroke-width: ${t.pieOuterStrokeWidth};
89
+ fill: none;
90
+ }
91
+ .pieTitleText {
92
+ text-anchor: middle;
93
+ font-size: ${t.pieTitleTextSize};
94
+ fill: ${t.pieTitleTextColor};
95
+ font-family: ${t.fontFamily};
96
+ }
97
+ .slice {
98
+ font-family: ${t.fontFamily};
99
+ fill: ${t.pieSectionTextColor};
100
+ font-size:${t.pieSectionTextSize};
101
+ // fill: white;
102
+ }
103
+ .legend text {
104
+ fill: ${t.pieLegendTextColor};
105
+ font-family: ${t.fontFamily};
106
+ font-size: ${t.pieLegendTextSize};
107
+ }
108
+ `, "getStyles"), bt = Et, kt = /* @__PURE__ */ d((t) => {
109
+ const a = [...t.values()].reduce((s, p) => s + p, 0), f = [...t.entries()].map(([s, p]) => ({ label: s, value: p })).filter((s) => s.value / a * 100 >= 1);
110
+ return mt().value((s) => s.value).sort(null)(f);
111
+ }, "createPieArcs"), Mt = /* @__PURE__ */ d((t, a, f, y) => {
112
+ z.debug(`rendering pie chart
113
+ ` + t);
114
+ const s = y.db, p = rt(), o = it(s.getConfig(), p.pie), e = 40, r = 18, l = 4, g = 450, h = g, v = st(a), c = v.append("g");
115
+ c.attr("transform", "translate(" + h / 2 + "," + g / 2 + ")");
116
+ const { themeVariables: i } = p;
117
+ let [x] = ot(i.pieOuterStrokeWidth);
118
+ x ??= 2;
119
+ const w = o.textPosition, m = Math.min(h, g) / 2 - e, D = P().innerRadius(0).outerRadius(m), $ = P().innerRadius(m * w).outerRadius(m * w);
120
+ c.append("circle").attr("cx", 0).attr("cy", 0).attr("r", m + x / 2).attr("class", "pieOuterCircle");
121
+ const u = s.getSections(), A = kt(u), C = [
122
+ i.pie1,
123
+ i.pie2,
124
+ i.pie3,
125
+ i.pie4,
126
+ i.pie5,
127
+ i.pie6,
128
+ i.pie7,
129
+ i.pie8,
130
+ i.pie9,
131
+ i.pie10,
132
+ i.pie11,
133
+ i.pie12
134
+ ];
135
+ let E = 0;
136
+ u.forEach((n) => {
137
+ E += n;
138
+ });
139
+ const G = A.filter((n) => (n.data.value / E * 100).toFixed(0) !== "0"), b = gt(C).domain([
140
+ ...u.keys()
141
+ ]);
142
+ c.selectAll("mySlices").data(G).enter().append("path").attr("d", D).attr("fill", (n) => b(n.data.label)).attr("class", "pieCircle"), c.selectAll("mySlices").data(G).enter().append("text").text((n) => (n.data.value / E * 100).toFixed(0) + "%").attr("transform", (n) => "translate(" + $.centroid(n) + ")").style("text-anchor", "middle").attr("class", "slice");
143
+ const V = c.append("text").text(s.getDiagramTitle()).attr("x", 0).attr("y", -400 / 2).attr("class", "pieTitleText"), N = [...u.entries()].map(([n, M]) => ({
144
+ label: n,
145
+ value: M
146
+ })), k = c.selectAll(".legend").data(N).enter().append("g").attr("class", "legend").attr("transform", (n, M) => {
147
+ const O = r + l, Z = O * N.length / 2, H = 12 * r, J = M * O - Z;
148
+ return "translate(" + H + "," + J + ")";
149
+ });
150
+ k.append("rect").attr("width", r).attr("height", r).style("fill", (n) => b(n.label)).style("stroke", (n) => b(n.label)), k.append("text").attr("x", r + l).attr("y", r - l).text((n) => s.getShowData() ? `${n.label} [${n.value}]` : n.label);
151
+ const U = Math.max(
152
+ ...k.selectAll("text").nodes().map((n) => n?.getBoundingClientRect().width ?? 0)
153
+ ), j = h + e + r + l + U, L = V.node()?.getBoundingClientRect().width ?? 0, q = h / 2 - L / 2, X = h / 2 + L / 2, B = Math.min(0, q), I = Math.max(j, X) - B;
154
+ v.attr("viewBox", `${B} 0 ${I} ${g}`), lt(v, g, I, o.useMaxWidth);
155
+ }, "draw"), Rt = { draw: Mt }, Bt = {
156
+ parser: Tt,
157
+ db: _,
158
+ renderer: Rt,
159
+ styles: bt
160
+ };
161
+ export {
162
+ Bt as diagram
163
+ };