@ucap-llm/ai-ui 1.1.6 → 1.1.7

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 (55) hide show
  1. package/_basePickBy-7d00d05e.mjs +153 -0
  2. package/_baseUniq-1876be04.mjs +440 -0
  3. package/ai-ui.es.js +11 -78207
  4. package/ai-ui.umd.js +2701 -143
  5. package/arc-bb1e7b28.mjs +85 -0
  6. package/architecture-4AB2E3PP-26f07d27.mjs +10 -0
  7. package/architectureDiagram-IEHRJDOE-535e4958.mjs +4640 -0
  8. package/blockDiagram-JOT3LUYC-e5536854.mjs +2251 -0
  9. package/c4Diagram-VJAJSXHY-311741c3.mjs +1583 -0
  10. package/channel-5d097975.mjs +5 -0
  11. package/chunk-4BMEZGHF-55420838.mjs +9 -0
  12. package/chunk-A2AXSNBT-5f9de039.mjs +1373 -0
  13. package/chunk-AEK57VVT-bd6e836f.mjs +1416 -0
  14. package/chunk-D6G4REZN-69cf348a.mjs +64 -0
  15. package/chunk-RZ5BOZE2-ebe3985e.mjs +24 -0
  16. package/chunk-XZIHB7SX-ed9a9d65.mjs +15 -0
  17. package/classDiagram-GIVACNV2-4d61f06d.mjs +18 -0
  18. package/classDiagram-v2-COTLJTTW-4d61f06d.mjs +18 -0
  19. package/clone-44064c55.mjs +8 -0
  20. package/cytoscape.esm-bb479f88.mjs +18232 -0
  21. package/dagre-OKDRZEBW-0574359b.mjs +448 -0
  22. package/diagram-SSKATNLV-f4dd04b2.mjs +225 -0
  23. package/diagram-VNBRO52H-f77f925a.mjs +130 -0
  24. package/erDiagram-Q7BY3M3F-8213684f.mjs +843 -0
  25. package/flowDiagram-4HSFHLVR-1decdff6.mjs +1624 -0
  26. package/ganttDiagram-APWFNJXF-461381a5.mjs +2521 -0
  27. package/gitGraph-O2Q2CXLX-d961db16.mjs +10 -0
  28. package/gitGraphDiagram-7IBYFJ6S-be6c39c3.mjs +716 -0
  29. package/graph-7ba79f74.mjs +249 -0
  30. package/index-f5aac161.mjs +93487 -0
  31. package/info-4N47QTOZ-615527c9.mjs +10 -0
  32. package/infoDiagram-PH2N3AL5-064df479.mjs +26 -0
  33. package/init-f9637058.mjs +16 -0
  34. package/journeyDiagram-U35MCT3I-94c54b39.mjs +811 -0
  35. package/kanban-definition-NDS4AKOZ-58a05db1.mjs +720 -0
  36. package/katex-2e45926a.mjs +11700 -0
  37. package/layout-c953b0e7.mjs +1344 -0
  38. package/linear-3c81794f.mjs +447 -0
  39. package/mermaid-parser.core-7afd2b2f.mjs +12845 -0
  40. package/mindmap-definition-ALO5MXBD-60e68e28.mjs +3222 -0
  41. package/ordinal-980380c7.mjs +65 -0
  42. package/package.json +1 -1
  43. package/packet-KVYON367-4b5a305e.mjs +10 -0
  44. package/pie-R6RNRRYF-0f27d16d.mjs +10 -0
  45. package/pieDiagram-IB7DONF6-66cebf11.mjs +167 -0
  46. package/quadrantDiagram-7GDLP6J5-f2cbfc79.mjs +1027 -0
  47. package/radar-MK3ICKWK-9e1913d7.mjs +10 -0
  48. package/requirementDiagram-KVF5MWMF-36d316c2.mjs +853 -0
  49. package/sankeyDiagram-QLVOVGJD-76245efb.mjs +826 -0
  50. package/sequenceDiagram-X6HHIX6F-a0ec0021.mjs +2283 -0
  51. package/stateDiagram-DGXRK772-e6387816.mjs +274 -0
  52. package/stateDiagram-v2-YXO3MK2T-f011ada4.mjs +18 -0
  53. package/style.css +1 -1
  54. package/timeline-definition-BDJGKUSR-a62514a7.mjs +806 -0
  55. package/xychartDiagram-VJFVF3MP-1b807048.mjs +1306 -0
@@ -0,0 +1,65 @@
1
+ import { i as a } from "./init-f9637058.mjs";
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)
5
+ for (const [r, s] of n)
6
+ this.set(r, s);
7
+ }
8
+ get(n) {
9
+ return super.get(c(this, n));
10
+ }
11
+ has(n) {
12
+ return super.has(c(this, n));
13
+ }
14
+ set(n, t) {
15
+ return super.set(l(this, n), t);
16
+ }
17
+ delete(n) {
18
+ return super.delete(p(this, n));
19
+ }
20
+ }
21
+ function c({ _intern: e, _key: n }, t) {
22
+ const r = n(t);
23
+ return e.has(r) ? e.get(r) : t;
24
+ }
25
+ function l({ _intern: e, _key: n }, t) {
26
+ const r = n(t);
27
+ return e.has(r) ? e.get(r) : (e.set(r, t), t);
28
+ }
29
+ function p({ _intern: e, _key: n }, t) {
30
+ const r = n(t);
31
+ return e.has(r) && (t = e.get(r), e.delete(r)), t;
32
+ }
33
+ function g(e) {
34
+ return e !== null && typeof e == "object" ? e.valueOf() : e;
35
+ }
36
+ const f = Symbol("implicit");
37
+ function h() {
38
+ var e = new o(), n = [], t = [], r = f;
39
+ function s(u) {
40
+ let i = e.get(u);
41
+ if (i === void 0) {
42
+ if (r !== f)
43
+ return r;
44
+ e.set(u, i = n.push(u) - 1);
45
+ }
46
+ return t[i % t.length];
47
+ }
48
+ return s.domain = function(u) {
49
+ if (!arguments.length)
50
+ return n.slice();
51
+ n = [], e = new o();
52
+ for (const i of u)
53
+ e.has(i) || e.set(i, n.push(i) - 1);
54
+ return s;
55
+ }, s.range = function(u) {
56
+ return arguments.length ? (t = Array.from(u), s) : t.slice();
57
+ }, s.unknown = function(u) {
58
+ return arguments.length ? (r = u, s) : r;
59
+ }, s.copy = function() {
60
+ return h(n, t).unknown(r);
61
+ }, a.apply(s, arguments), s;
62
+ }
63
+ export {
64
+ h as o
65
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ucap-llm/ai-ui",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "description": "common component library for vue3",
5
5
  "main": "ai-ui.es.js",
6
6
  "publishConfig": {
@@ -0,0 +1,10 @@
1
+ import { P as p, a as c } from "./mermaid-parser.core-7afd2b2f.mjs";
2
+ import "./index-f5aac161.mjs";
3
+ import "vue";
4
+ import "./_baseUniq-1876be04.mjs";
5
+ import "./_basePickBy-7d00d05e.mjs";
6
+ import "./clone-44064c55.mjs";
7
+ export {
8
+ p as PacketModule,
9
+ c as createPacketServices
10
+ };
@@ -0,0 +1,10 @@
1
+ import { b as a, d as s } from "./mermaid-parser.core-7afd2b2f.mjs";
2
+ import "./index-f5aac161.mjs";
3
+ import "vue";
4
+ import "./_baseUniq-1876be04.mjs";
5
+ import "./_basePickBy-7d00d05e.mjs";
6
+ import "./clone-44064c55.mjs";
7
+ export {
8
+ a as PieModule,
9
+ s as createPieServices
10
+ };
@@ -0,0 +1,167 @@
1
+ import { p as U } from "./chunk-4BMEZGHF-55420838.mjs";
2
+ import { aa as y, a2 as z, aG as j, C as H, n as Z, o as q, s as J, g as K, c as Q, b as X, _ as p, l as G, t as Y, d as tt, D as et, H as at, O as rt, k as nt } from "./index-f5aac161.mjs";
3
+ import { p as it } from "./mermaid-parser.core-7afd2b2f.mjs";
4
+ import { d as P } from "./arc-bb1e7b28.mjs";
5
+ import { o as st } from "./ordinal-980380c7.mjs";
6
+ import "vue";
7
+ import "./_baseUniq-1876be04.mjs";
8
+ import "./_basePickBy-7d00d05e.mjs";
9
+ import "./clone-44064c55.mjs";
10
+ import "./init-f9637058.mjs";
11
+ function ot(t, a) {
12
+ return a < t ? -1 : a > t ? 1 : a >= t ? 0 : NaN;
13
+ }
14
+ function lt(t) {
15
+ return t;
16
+ }
17
+ function ct() {
18
+ var t = lt, a = ot, m = null, o = y(0), g = y(z), x = y(0);
19
+ function i(e) {
20
+ var r, l = (e = j(e)).length, c, A, h = 0, u = new Array(l), n = new Array(l), v = +o.apply(this, arguments), w = Math.min(z, Math.max(-z, g.apply(this, arguments) - v)), f, T = Math.min(Math.abs(w) / l, x.apply(this, arguments)), $ = T * (w < 0 ? -1 : 1), d;
21
+ for (r = 0; r < l; ++r)
22
+ (d = n[u[r] = r] = +t(e[r], r, e)) > 0 && (h += d);
23
+ for (a != null ? u.sort(function(S, C) {
24
+ return a(n[S], n[C]);
25
+ }) : m != null && u.sort(function(S, C) {
26
+ return m(e[S], e[C]);
27
+ }), r = 0, A = h ? (w - l * $) / h : 0; r < l; ++r, v = f)
28
+ c = u[r], d = n[c], f = v + (d > 0 ? d * A : 0) + $, n[c] = {
29
+ data: e[c],
30
+ index: r,
31
+ value: d,
32
+ startAngle: v,
33
+ endAngle: f,
34
+ padAngle: T
35
+ };
36
+ return n;
37
+ }
38
+ return i.value = function(e) {
39
+ return arguments.length ? (t = typeof e == "function" ? e : y(+e), i) : t;
40
+ }, i.sortValues = function(e) {
41
+ return arguments.length ? (a = e, m = null, i) : a;
42
+ }, i.sort = function(e) {
43
+ return arguments.length ? (m = e, a = null, i) : m;
44
+ }, i.startAngle = function(e) {
45
+ return arguments.length ? (o = typeof e == "function" ? e : y(+e), i) : o;
46
+ }, i.endAngle = function(e) {
47
+ return arguments.length ? (g = typeof e == "function" ? e : y(+e), i) : g;
48
+ }, i.padAngle = function(e) {
49
+ return arguments.length ? (x = typeof e == "function" ? e : y(+e), i) : x;
50
+ }, i;
51
+ }
52
+ var R = H.pie, F = {
53
+ sections: /* @__PURE__ */ new Map(),
54
+ showData: !1,
55
+ config: R
56
+ }, b = F.sections, O = F.showData, ut = structuredClone(R), pt = /* @__PURE__ */ p(() => structuredClone(ut), "getConfig"), gt = /* @__PURE__ */ p(() => {
57
+ b = /* @__PURE__ */ new Map(), O = F.showData, Y();
58
+ }, "clear"), dt = /* @__PURE__ */ p(({ label: t, value: a }) => {
59
+ b.has(t) || (b.set(t, a), G.debug(`added new section: ${t}, with value: ${a}`));
60
+ }, "addSection"), ft = /* @__PURE__ */ p(() => b, "getSections"), mt = /* @__PURE__ */ p((t) => {
61
+ O = t;
62
+ }, "setShowData"), ht = /* @__PURE__ */ p(() => O, "getShowData"), I = {
63
+ getConfig: pt,
64
+ clear: gt,
65
+ setDiagramTitle: Z,
66
+ getDiagramTitle: q,
67
+ setAccTitle: J,
68
+ getAccTitle: K,
69
+ setAccDescription: Q,
70
+ getAccDescription: X,
71
+ addSection: dt,
72
+ getSections: ft,
73
+ setShowData: mt,
74
+ getShowData: ht
75
+ }, vt = /* @__PURE__ */ p((t, a) => {
76
+ U(t, a), a.setShowData(t.showData), t.sections.map(a.addSection);
77
+ }, "populateDb"), St = {
78
+ parse: /* @__PURE__ */ p(async (t) => {
79
+ const a = await it("pie", t);
80
+ G.debug(a), vt(a, I);
81
+ }, "parse")
82
+ }, yt = /* @__PURE__ */ p((t) => `
83
+ .pieCircle{
84
+ stroke: ${t.pieStrokeColor};
85
+ stroke-width : ${t.pieStrokeWidth};
86
+ opacity : ${t.pieOpacity};
87
+ }
88
+ .pieOuterCircle{
89
+ stroke: ${t.pieOuterStrokeColor};
90
+ stroke-width: ${t.pieOuterStrokeWidth};
91
+ fill: none;
92
+ }
93
+ .pieTitleText {
94
+ text-anchor: middle;
95
+ font-size: ${t.pieTitleTextSize};
96
+ fill: ${t.pieTitleTextColor};
97
+ font-family: ${t.fontFamily};
98
+ }
99
+ .slice {
100
+ font-family: ${t.fontFamily};
101
+ fill: ${t.pieSectionTextColor};
102
+ font-size:${t.pieSectionTextSize};
103
+ // fill: white;
104
+ }
105
+ .legend text {
106
+ fill: ${t.pieLegendTextColor};
107
+ font-family: ${t.fontFamily};
108
+ font-size: ${t.pieLegendTextSize};
109
+ }
110
+ `, "getStyles"), xt = yt, At = /* @__PURE__ */ p((t) => {
111
+ const a = [...t.entries()].map((o) => ({
112
+ label: o[0],
113
+ value: o[1]
114
+ })).sort((o, g) => g.value - o.value);
115
+ return ct().value(
116
+ (o) => o.value
117
+ )(a);
118
+ }, "createPieArcs"), wt = /* @__PURE__ */ p((t, a, m, o) => {
119
+ G.debug(`rendering pie chart
120
+ ` + t);
121
+ const g = o.db, x = tt(), i = et(g.getConfig(), x.pie), e = 40, r = 18, l = 4, c = 450, A = c, h = at(a), u = h.append("g");
122
+ u.attr("transform", "translate(" + A / 2 + "," + c / 2 + ")");
123
+ const { themeVariables: n } = x;
124
+ let [v] = rt(n.pieOuterStrokeWidth);
125
+ v ?? (v = 2);
126
+ const w = i.textPosition, f = Math.min(A, c) / 2 - e, T = P().innerRadius(0).outerRadius(f), $ = P().innerRadius(f * w).outerRadius(f * w);
127
+ u.append("circle").attr("cx", 0).attr("cy", 0).attr("r", f + v / 2).attr("class", "pieOuterCircle");
128
+ const d = g.getSections(), S = At(d), C = [
129
+ n.pie1,
130
+ n.pie2,
131
+ n.pie3,
132
+ n.pie4,
133
+ n.pie5,
134
+ n.pie6,
135
+ n.pie7,
136
+ n.pie8,
137
+ n.pie9,
138
+ n.pie10,
139
+ n.pie11,
140
+ n.pie12
141
+ ], D = st(C);
142
+ u.selectAll("mySlices").data(S).enter().append("path").attr("d", T).attr("fill", (s) => D(s.data.label)).attr("class", "pieCircle");
143
+ let W = 0;
144
+ d.forEach((s) => {
145
+ W += s;
146
+ }), u.selectAll("mySlices").data(S).enter().append("text").text((s) => (s.data.value / W * 100).toFixed(0) + "%").attr("transform", (s) => "translate(" + $.centroid(s) + ")").style("text-anchor", "middle").attr("class", "slice"), u.append("text").text(g.getDiagramTitle()).attr("x", 0).attr("y", -(c - 50) / 2).attr("class", "pieTitleText");
147
+ const M = u.selectAll(".legend").data(D.domain()).enter().append("g").attr("class", "legend").attr("transform", (s, k) => {
148
+ const E = r + l, _ = E * D.domain().length / 2, B = 12 * r, V = k * E - _;
149
+ return "translate(" + B + "," + V + ")";
150
+ });
151
+ M.append("rect").attr("width", r).attr("height", r).style("fill", D).style("stroke", D), M.data(S).append("text").attr("x", r + l).attr("y", r - l).text((s) => {
152
+ const { label: k, value: E } = s.data;
153
+ return g.getShowData() ? `${k} [${E}]` : k;
154
+ });
155
+ const L = Math.max(
156
+ ...M.selectAll("text").nodes().map((s) => (s == null ? void 0 : s.getBoundingClientRect().width) ?? 0)
157
+ ), N = A + e + r + l + L;
158
+ h.attr("viewBox", `0 0 ${N} ${c}`), nt(h, c, N, i.useMaxWidth);
159
+ }, "draw"), Ct = { draw: wt }, Ot = {
160
+ parser: St,
161
+ db: I,
162
+ renderer: Ct,
163
+ styles: xt
164
+ };
165
+ export {
166
+ Ot as diagram
167
+ };