@airalogy/aimd-recorder 1.17.0 → 1.19.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/README.md +42 -10
- package/README.zh-CN.md +42 -10
- package/dist/AimdCodeField-BQUuM-EF.js +182 -0
- package/dist/{AimdDnaSequenceField-D6ZgCDpp.js → AimdDnaSequenceField-TBKunqU_.js} +2 -2
- package/dist/{AimdEditor.vue_vue_type_style_index_0_lang-B5Tq4zPV.js → AimdEditor.vue_vue_type_style_index_0_lang-tdh0dJNa.js} +3922 -3829
- package/dist/AimdMarkdownField-DmNX2g4j.js +254 -0
- package/dist/AimdMarkdownNoteField-B5ruzmwS.js +259 -0
- package/dist/{_commonjsHelpers-CZXJ37nu.js → _commonjsHelpers-B5RozER-.js} +2 -2
- package/dist/aimd-recorder.css +1 -1
- package/dist/arc-B-vsgEXF.js +83 -0
- package/dist/architectureDiagram-3BPJPVTR-BwPNOtNH.js +4692 -0
- package/dist/blockDiagram-GPEHLZMM-CMUI4kKc.js +2425 -0
- package/dist/c4Diagram-AAUBKEIU-Cpmfsy_s.js +1577 -0
- package/dist/channel-DlMAXHQK.js +5 -0
- package/dist/chunk-2J33WTMH-DP9BS2ux.js +19 -0
- package/dist/chunk-4BX2VUAB-ncsOeLMb.js +8 -0
- package/dist/chunk-55IACEB6-C7wHk4B7.js +8 -0
- package/dist/chunk-727SXJPM-Caa5aVUO.js +1528 -0
- package/dist/chunk-AQP2D5EJ-CL8egKqD.js +1387 -0
- package/dist/chunk-FMBD7UC4-heVR6BSA.js +19 -0
- package/dist/chunk-ND2GUHAM-BYH-wC2J.js +68 -0
- package/dist/chunk-QZHKN3VN-Bx2K7vkq.js +15 -0
- package/dist/classDiagram-4FO5ZUOK-BLLfLYy0.js +16 -0
- package/dist/classDiagram-v2-Q7XG4LA2-BLLfLYy0.js +16 -0
- package/dist/components.js +3776 -2247
- package/dist/composables.js +96 -70
- package/dist/cose-bilkent-S5V4N54A-E1YmM_xr.js +2609 -0
- package/dist/cytoscape.esm-r59gEWFs.js +18710 -0
- package/dist/dagre-BM42HDAG-BsXpQirH.js +445 -0
- package/dist/defaultLocale-BgPVtth8.js +171 -0
- package/dist/diagram-2AECGRRQ-CamqbWlY.js +217 -0
- package/dist/diagram-5GNKFQAL-DZyRFcOC.js +123 -0
- package/dist/diagram-KO2AKTUF-CmkGcy7R.js +461 -0
- package/dist/diagram-LMA3HP47-IdDwQPZ-.js +142 -0
- package/dist/diagram-OG6HWLK6-t0LBcUIU.js +528 -0
- package/dist/erDiagram-TEJ5UH35-DJBY2iZG.js +899 -0
- package/dist/flowDiagram-I6XJVG4X-DE4MzPPk.js +1628 -0
- package/dist/ganttDiagram-6RSMTGT7-CmAc35Yw.js +2707 -0
- package/dist/gitGraphDiagram-PVQCEYII-DDQZ5flw.js +815 -0
- package/dist/graph-BsJ8-1Pq.js +1510 -0
- package/dist/index.js +110 -83
- package/dist/infoDiagram-5YYISTIA-DSZjFR5g.js +24 -0
- package/dist/init-DjUOC4st.js +16 -0
- package/dist/ishikawaDiagram-YF4QCWOH-DCO9dx2L.js +621 -0
- package/dist/journeyDiagram-JHISSGLW-b-PpuBqg.js +834 -0
- package/dist/kanban-definition-UN3LZRKU-BjclDuJZ.js +724 -0
- package/dist/katex-DNob3HGn.js +11690 -0
- package/dist/layout-D4wqKu72.js +1703 -0
- package/dist/linear-Voc3BJib.js +259 -0
- package/dist/mermaid.core-Dt_VbeGP.js +15940 -0
- package/dist/mindmap-definition-RKZ34NQL-B3vrXRVY.js +827 -0
- package/dist/ordinal-B6-f3MAq.js +61 -0
- package/dist/pieDiagram-4H26LBE5-DFpWxSxk.js +163 -0
- package/dist/quadrantDiagram-W4KKPZXB-BYHcrGoB.js +1024 -0
- package/dist/record.js +1199 -0
- package/dist/requirementDiagram-4Y6WPE33-C-FgWrRz.js +882 -0
- package/dist/sankeyDiagram-5OEKKPKP-IwN0Evji.js +847 -0
- package/dist/sequenceDiagram-3UESZ5HK-_OnqhBO2.js +2891 -0
- package/dist/stateDiagram-AJRCARHV-BRLv0Zcw.js +263 -0
- package/dist/stateDiagram-v2-BHNVJYJU-BofX0AdS.js +16 -0
- package/dist/timeline-definition-PNZ67QCA-C-DpPLpw.js +1055 -0
- package/dist/{useFieldRendering-xLajJhyA.js → useCodeBlockRendering-DoTZaJTW.js} +1528 -1725
- package/dist/useMonacoAutoHeight-D4T-El3J.js +66 -0
- package/dist/vennDiagram-CIIHVFJN-zTHQR9Oq.js +1557 -0
- package/dist/wardley-L42UT6IY-D7b2ujEZ.js +22512 -0
- package/dist/wardleyDiagram-YWT4CUSO-au5koizO.js +675 -0
- package/dist/xychartDiagram-2RQKCTM6-BNf12P8z.js +1342 -0
- package/package.json +13 -8
- package/src/__tests__/assigner-graph.test.ts +82 -0
- package/src/__tests__/assigner-runner-dependent-data.test.ts +32 -0
- package/src/__tests__/markdown-field.test.ts +150 -1
- package/src/__tests__/markdown-note-field.test.ts +86 -3
- package/src/__tests__/recorder-assigner-control.test.ts +993 -0
- package/src/__tests__/recorder-editor.test.ts +17 -0
- package/src/__tests__/recorder-markdown-assigner-integration.test.ts +49 -0
- package/src/__tests__/step-field.test.ts +47 -1
- package/src/__tests__/type-plugins.test.ts +1 -0
- package/src/__tests__/var-field-render.test.ts +806 -1
- package/src/components/AimdAssignerGraph.vue +816 -0
- package/src/components/AimdCodeField.vue +24 -5
- package/src/components/AimdMarkdownField.vue +556 -11
- package/src/components/AimdMarkdownNoteField.vue +241 -30
- package/src/components/AimdRecorder.vue +1619 -99
- package/src/components/AimdRecorderEditor.vue +276 -8
- package/src/components/AimdRecorderWysiwygFieldHost.vue +6 -0
- package/src/components/AimdRecorderWysiwygSurface.vue +32 -0
- package/src/components/AimdStepCheckField.vue +82 -18
- package/src/components/AimdVarField.vue +694 -25
- package/src/components/AimdVarTableField.vue +325 -138
- package/src/components/icons/AimdAssignerCalculatorIcon.vue +18 -0
- package/src/components/icons/AimdAssignerCloudStatusIcon.vue +22 -0
- package/src/components/index.ts +9 -1
- package/src/components/recorderMilkdownPlugin.ts +14 -0
- package/src/composables/__tests__/useRecordState.test.ts +86 -0
- package/src/composables/__tests__/useVarHelpers.test.ts +175 -0
- package/src/composables/index.ts +28 -1
- package/src/composables/useAssignerRunner.ts +376 -0
- package/src/composables/useCodeBlockRendering.ts +51 -0
- package/src/composables/useFieldRendering.ts +32 -4
- package/src/composables/useMonacoAutoHeight.ts +127 -0
- package/src/composables/useRecordState.ts +22 -3
- package/src/composables/useVarHelpers.ts +237 -32
- package/src/index.ts +20 -1
- package/src/locales.ts +45 -0
- package/src/record/index.ts +120 -0
- package/src/styles/aimd.css +216 -1
- package/src/type-plugins.ts +7 -0
- package/src/type-utils.ts +1 -3
- package/src/types.ts +130 -2
- package/dist/AimdCodeField-DC3DPvgc.js +0 -172
- package/dist/AimdMarkdownField-BJ20QtO8.js +0 -67
- package/dist/AimdMarkdownNoteField-DwAQhoyk.js +0 -186
|
@@ -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 { Q as S, T as R, b2 as J, g as K, s as Y, a as tt, b as et, t as at, q as nt, _ as d, l as W, c as rt, H as it, L as st, a4 as ot, e as lt, A as ct, I as ut } from "./mermaid.core-Dt_VbeGP.js";
|
|
2
|
+
import { p as dt } from "./chunk-4BX2VUAB-ncsOeLMb.js";
|
|
3
|
+
import { p as pt } from "./wardley-L42UT6IY-D7b2ujEZ.js";
|
|
4
|
+
import { d as P } from "./arc-B-vsgEXF.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 = J(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, z = {
|
|
48
|
+
sections: /* @__PURE__ */ new Map(),
|
|
49
|
+
showData: !1
|
|
50
|
+
}, T = z.sections, F = z.showData, xt = structuredClone(vt), St = /* @__PURE__ */ d(() => structuredClone(xt), "getConfig"), yt = /* @__PURE__ */ d(() => {
|
|
51
|
+
T = /* @__PURE__ */ new Map(), F = z.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), W.debug(`added new section: ${t}, with value: ${a}`));
|
|
58
|
+
}, "addSection"), At = /* @__PURE__ */ d(() => T, "getSections"), Ct = /* @__PURE__ */ d((t) => {
|
|
59
|
+
F = t;
|
|
60
|
+
}, "setShowData"), Dt = /* @__PURE__ */ d(() => F, "getShowData"), _ = {
|
|
61
|
+
getConfig: St,
|
|
62
|
+
clear: yt,
|
|
63
|
+
setDiagramTitle: nt,
|
|
64
|
+
getDiagramTitle: at,
|
|
65
|
+
setAccTitle: et,
|
|
66
|
+
getAccTitle: tt,
|
|
67
|
+
setAccDescription: Y,
|
|
68
|
+
getAccDescription: K,
|
|
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
|
+
W.debug(a), $t(a, _);
|
|
79
|
+
}, "parse")
|
|
80
|
+
}, bt = /* @__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"), kt = bt, Et = /* @__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
|
+
W.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 = Et(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 b = 0;
|
|
136
|
+
u.forEach((n) => {
|
|
137
|
+
b += n;
|
|
138
|
+
});
|
|
139
|
+
const L = A.filter((n) => (n.data.value / b * 100).toFixed(0) !== "0"), k = gt(C).domain([
|
|
140
|
+
...u.keys()
|
|
141
|
+
]);
|
|
142
|
+
c.selectAll("mySlices").data(L).enter().append("path").attr("d", D).attr("fill", (n) => k(n.data.label)).attr("class", "pieCircle"), c.selectAll("mySlices").data(L).enter().append("text").text((n) => (n.data.value / b * 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"), G = [...u.entries()].map(([n, M]) => ({
|
|
144
|
+
label: n,
|
|
145
|
+
value: M
|
|
146
|
+
})), E = c.selectAll(".legend").data(G).enter().append("g").attr("class", "legend").attr("transform", (n, M) => {
|
|
147
|
+
const O = r + l, Q = O * G.length / 2, X = 12 * r, Z = M * O - Q;
|
|
148
|
+
return "translate(" + X + "," + Z + ")";
|
|
149
|
+
});
|
|
150
|
+
E.append("rect").attr("width", r).attr("height", r).style("fill", (n) => k(n.label)).style("stroke", (n) => k(n.label)), E.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
|
+
...E.selectAll("text").nodes().map((n) => n?.getBoundingClientRect().width ?? 0)
|
|
153
|
+
), j = h + e + r + l + U, N = V.node()?.getBoundingClientRect().width ?? 0, q = h / 2 - N / 2, H = h / 2 + N / 2, B = Math.min(0, q), I = Math.max(j, H) - 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: kt
|
|
160
|
+
};
|
|
161
|
+
export {
|
|
162
|
+
Bt as diagram
|
|
163
|
+
};
|