@airalogy/aimd-recorder 1.16.0 → 1.18.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 +11 -10
- package/README.zh-CN.md +11 -10
- package/dist/AimdCodeField-BQUuM-EF.js +182 -0
- package/dist/{AimdDnaSequenceField-CPyMqIVh.js → AimdDnaSequenceField-KZU2Zj3E.js} +2 -2
- package/dist/{AimdEditor.vue_vue_type_style_index_0_lang-lyHIpch9.js → AimdEditor.vue_vue_type_style_index_0_lang-CzfYPp5r.js} +3924 -3831
- package/dist/AimdMarkdownField-t2d8uOeU.js +254 -0
- package/dist/AimdMarkdownNoteField-_h1oZSwH.js +259 -0
- package/dist/{_commonjsHelpers-CZXJ37nu.js → _commonjsHelpers-B5RozER-.js} +2 -2
- package/dist/aimd-recorder.css +1 -1
- package/dist/arc-DS_ocYoe.js +83 -0
- package/dist/architectureDiagram-3BPJPVTR-Dq2W8_tb.js +4692 -0
- package/dist/blockDiagram-GPEHLZMM-B4hnSAF_.js +2425 -0
- package/dist/c4Diagram-AAUBKEIU-CbffqNLY.js +1577 -0
- package/dist/channel-CtXnYrAk.js +5 -0
- package/dist/chunk-2J33WTMH-CROScrt5.js +19 -0
- package/dist/chunk-4BX2VUAB-DTmsQu5_.js +8 -0
- package/dist/chunk-55IACEB6-B5wDJzeX.js +8 -0
- package/dist/chunk-727SXJPM-CfyltY6o.js +1528 -0
- package/dist/chunk-AQP2D5EJ-B8274EYy.js +1387 -0
- package/dist/chunk-FMBD7UC4-CT_FK-SH.js +19 -0
- package/dist/chunk-ND2GUHAM-g9GulPi-.js +68 -0
- package/dist/chunk-QZHKN3VN-Di5HEktz.js +15 -0
- package/dist/classDiagram-4FO5ZUOK-BVUr246k.js +16 -0
- package/dist/classDiagram-v2-Q7XG4LA2-BVUr246k.js +16 -0
- package/dist/components.js +3365 -2216
- package/dist/composables.js +92 -68
- package/dist/cose-bilkent-S5V4N54A-GJ4IOO6v.js +2609 -0
- package/dist/cytoscape.esm-r59gEWFs.js +18710 -0
- package/dist/dagre-BM42HDAG-oL7Br44o.js +445 -0
- package/dist/defaultLocale-BgPVtth8.js +171 -0
- package/dist/diagram-2AECGRRQ-DtoCG_N4.js +217 -0
- package/dist/diagram-5GNKFQAL-f8QNdS7L.js +123 -0
- package/dist/diagram-KO2AKTUF-CsJOW_AX.js +461 -0
- package/dist/diagram-LMA3HP47-xmEKNZ7y.js +142 -0
- package/dist/diagram-OG6HWLK6-unpC7vo8.js +528 -0
- package/dist/erDiagram-TEJ5UH35-BGzFnCJD.js +899 -0
- package/dist/flowDiagram-I6XJVG4X-LBFhDnOs.js +1628 -0
- package/dist/ganttDiagram-6RSMTGT7-CFBc-jPD.js +2707 -0
- package/dist/gitGraphDiagram-PVQCEYII-BLduh-Rb.js +815 -0
- package/dist/graph-DdlKE625.js +1510 -0
- package/dist/index.js +104 -80
- package/dist/infoDiagram-5YYISTIA-CLQQI6zM.js +24 -0
- package/dist/init-DjUOC4st.js +16 -0
- package/dist/ishikawaDiagram-YF4QCWOH-CStdYBmW.js +621 -0
- package/dist/journeyDiagram-JHISSGLW-B6mRTzoE.js +834 -0
- package/dist/kanban-definition-UN3LZRKU-C-vnN5v4.js +724 -0
- package/dist/katex-DNob3HGn.js +11690 -0
- package/dist/layout-DDt0fz-M.js +1703 -0
- package/dist/linear-C-IAFdOt.js +259 -0
- package/dist/mermaid.core-CuZ3nINf.js +15940 -0
- package/dist/mindmap-definition-RKZ34NQL-TSZ1Vb3z.js +827 -0
- package/dist/ordinal-B6-f3MAq.js +61 -0
- package/dist/pieDiagram-4H26LBE5-DYok-1-k.js +163 -0
- package/dist/quadrantDiagram-W4KKPZXB-Cg856sbH.js +1024 -0
- package/dist/requirementDiagram-4Y6WPE33-BN9fGdlJ.js +882 -0
- package/dist/sankeyDiagram-5OEKKPKP-CDqTgonY.js +847 -0
- package/dist/sequenceDiagram-3UESZ5HK-Chjrc0-W.js +2891 -0
- package/dist/stateDiagram-AJRCARHV-DRyLHrdr.js +263 -0
- package/dist/stateDiagram-v2-BHNVJYJU-CZTIDHid.js +16 -0
- package/dist/timeline-definition-PNZ67QCA-Bc3D9AAG.js +1055 -0
- package/dist/{useFieldRendering-Dh6Kib_0.js → useCodeBlockRendering-qA6gj4vz.js} +3041 -2255
- package/dist/useMonacoAutoHeight-D4T-El3J.js +66 -0
- package/dist/vennDiagram-CIIHVFJN-CYAul48m.js +1557 -0
- package/dist/wardley-L42UT6IY-D7b2ujEZ.js +22512 -0
- package/dist/wardleyDiagram-YWT4CUSO-B7Tg0MG9.js +675 -0
- package/dist/xychartDiagram-2RQKCTM6-xWYVEqth.js +1342 -0
- package/package.json +8 -7
- 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__/quiz-recorder.test.ts +47 -0
- package/src/__tests__/recorder-assigner-control.test.ts +844 -0
- package/src/__tests__/recorder-check-field.test.ts +103 -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 +87 -4
- package/src/__tests__/type-plugins.test.ts +1 -0
- package/src/__tests__/var-field-render.test.ts +741 -1
- package/src/components/AimdCodeField.vue +24 -5
- package/src/components/AimdMarkdownField.vue +548 -11
- package/src/components/AimdMarkdownNoteField.vue +241 -30
- package/src/components/AimdQuizOptionFollowups.vue +121 -0
- package/src/components/AimdQuizRecorder.vue +79 -148
- package/src/components/AimdRecorder.vue +1620 -98
- 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 +205 -51
- package/src/components/AimdVarField.vue +694 -25
- package/src/components/AimdVarTableField.vue +283 -110
- package/src/components/icons/AimdAssignerCalculatorIcon.vue +18 -0
- package/src/components/icons/AimdAssignerCloudStatusIcon.vue +22 -0
- package/src/components/recorderMilkdownPlugin.ts +14 -0
- package/src/composables/__tests__/useRecordState.test.ts +114 -0
- package/src/composables/__tests__/useVarHelpers.test.ts +133 -0
- package/src/composables/index.ts +27 -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 +40 -14
- package/src/composables/useVarHelpers.ts +377 -9
- package/src/index.ts +13 -0
- package/src/locales.ts +47 -2
- package/src/styles/aimd.css +171 -6
- package/src/type-plugins.ts +7 -0
- package/src/types.ts +93 -2
- package/dist/AimdCodeField-DC3DPvgc.js +0 -172
- package/dist/AimdMarkdownField-CX71bOdX.js +0 -67
- package/dist/AimdMarkdownNoteField--ssNIQfG.js +0 -186
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { defineComponent as p, ref as m, watch as h, openBlock as v, createElementBlock as g, normalizeClass as k, createElementVNode as d, toDisplayString as c, unref as u, createVNode as w } from "vue";
|
|
2
|
-
import { g as V, _ as y } from "./AimdEditor.vue_vue_type_style_index_0_lang-lyHIpch9.js";
|
|
3
|
-
import "./useFieldRendering-Dh6Kib_0.js";
|
|
4
|
-
import "@airalogy/aimd-core";
|
|
5
|
-
import "@airalogy/aimd-renderer";
|
|
6
|
-
import { _ as x } from "./_commonjsHelpers-CZXJ37nu.js";
|
|
7
|
-
const R = { class: "aimd-field aimd-field--no-style aimd-field__label" }, B = { class: "aimd-field__scope aimd-field__scope--var" }, F = { class: "aimd-field__id" }, I = { class: "aimd-markdown-field__editor-shell" }, M = /* @__PURE__ */ p({
|
|
8
|
-
__name: "AimdMarkdownField",
|
|
9
|
-
props: {
|
|
10
|
-
modelValue: { default: void 0 },
|
|
11
|
-
varId: {},
|
|
12
|
-
disabled: { type: Boolean, default: !1 },
|
|
13
|
-
locale: { default: void 0 },
|
|
14
|
-
messages: {}
|
|
15
|
-
},
|
|
16
|
-
emits: ["update:modelValue", "blur"],
|
|
17
|
-
setup(a, { emit: f }) {
|
|
18
|
-
const i = a, t = f;
|
|
19
|
-
function n(e) {
|
|
20
|
-
return typeof e == "string" ? e : e == null ? "" : String(e);
|
|
21
|
-
}
|
|
22
|
-
const r = m(null), o = m(n(i.modelValue));
|
|
23
|
-
function b(e) {
|
|
24
|
-
e !== o.value && (o.value = e, t("update:modelValue", e));
|
|
25
|
-
}
|
|
26
|
-
function _(e) {
|
|
27
|
-
const l = r.value, s = e.relatedTarget;
|
|
28
|
-
!l || s && l.contains(s) || t("blur");
|
|
29
|
-
}
|
|
30
|
-
return h(() => i.modelValue, (e) => {
|
|
31
|
-
const l = n(e);
|
|
32
|
-
l !== o.value && (o.value = l);
|
|
33
|
-
}), (e, l) => (v(), g("div", {
|
|
34
|
-
ref_key: "fieldRootRef",
|
|
35
|
-
ref: r,
|
|
36
|
-
class: k(["aimd-rec-inline aimd-rec-inline--var-stacked aimd-rec-inline--var-markdown aimd-field-wrapper aimd-markdown-field", { "aimd-markdown-field--disabled": a.disabled }]),
|
|
37
|
-
onFocusout: _
|
|
38
|
-
}, [
|
|
39
|
-
d("span", R, [
|
|
40
|
-
d("span", B, c(u(V)("var", a.messages)), 1),
|
|
41
|
-
d("span", F, c(a.varId), 1)
|
|
42
|
-
]),
|
|
43
|
-
d("div", I, [
|
|
44
|
-
w(u(y), {
|
|
45
|
-
class: "aimd-markdown-field__editor",
|
|
46
|
-
"model-value": o.value,
|
|
47
|
-
locale: a.locale,
|
|
48
|
-
mode: "source",
|
|
49
|
-
theme: "aimd-light",
|
|
50
|
-
"show-top-bar": !0,
|
|
51
|
-
"show-toolbar": !a.disabled,
|
|
52
|
-
"show-md-toolbar": !0,
|
|
53
|
-
"show-aimd-toolbar": !0,
|
|
54
|
-
"enable-block-handle": !a.disabled,
|
|
55
|
-
"keep-inactive-editors-mounted": !1,
|
|
56
|
-
"min-height": 360,
|
|
57
|
-
readonly: a.disabled,
|
|
58
|
-
"monaco-options": { minimap: { enabled: !1 } },
|
|
59
|
-
"onUpdate:modelValue": b
|
|
60
|
-
}, null, 8, ["model-value", "locale", "show-toolbar", "enable-block-handle", "readonly"])
|
|
61
|
-
])
|
|
62
|
-
], 34));
|
|
63
|
-
}
|
|
64
|
-
}), E = /* @__PURE__ */ x(M, [["__scopeId", "data-v-7fbda7f4"]]);
|
|
65
|
-
export {
|
|
66
|
-
E as default
|
|
67
|
-
};
|
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
import { defineComponent as T, ref as u, shallowRef as Z, computed as i, watch as E, onBeforeUnmount as $, openBlock as d, createElementBlock as r, normalizeClass as B, createElementVNode as k, toDisplayString as h, createCommentVNode as j, createBlock as G, unref as P, createVNode as J, nextTick as Q } from "vue";
|
|
2
|
-
import { _ as X } from "./AimdEditor.vue_vue_type_style_index_0_lang-lyHIpch9.js";
|
|
3
|
-
import "./useFieldRendering-Dh6Kib_0.js";
|
|
4
|
-
import "@airalogy/aimd-core";
|
|
5
|
-
import { renderToVue as Y } from "@airalogy/aimd-renderer";
|
|
6
|
-
import { _ as ee } from "./_commonjsHelpers-CZXJ37nu.js";
|
|
7
|
-
const te = {
|
|
8
|
-
key: 0,
|
|
9
|
-
class: "aimd-markdown-note-field__preview-shell"
|
|
10
|
-
}, oe = {
|
|
11
|
-
key: 0,
|
|
12
|
-
class: "aimd-markdown-note-field__preview-actions"
|
|
13
|
-
}, ae = ["tabindex", "role"], le = {
|
|
14
|
-
key: 0,
|
|
15
|
-
class: "aimd-markdown-note-field__preview-fallback"
|
|
16
|
-
}, ne = {
|
|
17
|
-
key: 1,
|
|
18
|
-
class: "aimd-markdown-note-field__editor-shell"
|
|
19
|
-
}, ie = { class: "aimd-markdown-note-field__editor-actions" }, de = {
|
|
20
|
-
key: 2,
|
|
21
|
-
class: "aimd-markdown-note-field__empty"
|
|
22
|
-
}, re = /* @__PURE__ */ T({
|
|
23
|
-
__name: "AimdMarkdownNoteField",
|
|
24
|
-
props: {
|
|
25
|
-
modelValue: { default: void 0 },
|
|
26
|
-
disabled: { type: Boolean, default: !1 },
|
|
27
|
-
locale: { default: void 0 },
|
|
28
|
-
minHeight: { default: 220 }
|
|
29
|
-
},
|
|
30
|
-
emits: ["update:modelValue", "blur", "close"],
|
|
31
|
-
setup(o, { emit: L }) {
|
|
32
|
-
const t = o, c = L;
|
|
33
|
-
function C(e) {
|
|
34
|
-
return typeof e == "string" ? e : e == null ? "" : String(e);
|
|
35
|
-
}
|
|
36
|
-
function _(e) {
|
|
37
|
-
return e?.toLowerCase().startsWith("zh") ?? !1;
|
|
38
|
-
}
|
|
39
|
-
const R = u(null), x = u(null), l = u(C(t.modelValue)), n = u(!1), m = Z([]), f = u(!1);
|
|
40
|
-
let p = 0, s = null;
|
|
41
|
-
const v = i(() => !!l.value.trim()), y = i(() => v.value && !n.value), g = i(() => !t.disabled && (!v.value || n.value)), M = i(() => !y.value && !g.value), I = i(() => _(t.locale) ? "编辑备注" : "Edit note"), A = i(() => _(t.locale) ? "关闭备注" : "Close note"), O = i(() => _(t.locale) ? "暂无备注" : "No notes"), S = T({
|
|
42
|
-
name: "AimdMarkdownNotePreviewOutlet",
|
|
43
|
-
props: {
|
|
44
|
-
nodes: {
|
|
45
|
-
type: Array,
|
|
46
|
-
required: !0
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
setup(e) {
|
|
50
|
-
return () => e.nodes;
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
function N() {
|
|
54
|
-
if (t.disabled) {
|
|
55
|
-
n.value = !1;
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
v.value || (n.value = !0);
|
|
59
|
-
}
|
|
60
|
-
function q(e) {
|
|
61
|
-
e !== l.value && (l.value = e, c("update:modelValue", e));
|
|
62
|
-
}
|
|
63
|
-
async function z() {
|
|
64
|
-
const e = l.value.trim(), a = ++p;
|
|
65
|
-
if (!e) {
|
|
66
|
-
m.value = [], f.value = !1;
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
try {
|
|
70
|
-
const b = await Y(e, {
|
|
71
|
-
locale: t.locale
|
|
72
|
-
});
|
|
73
|
-
if (a !== p)
|
|
74
|
-
return;
|
|
75
|
-
m.value = b.nodes, f.value = !1;
|
|
76
|
-
} catch {
|
|
77
|
-
if (a !== p)
|
|
78
|
-
return;
|
|
79
|
-
m.value = [], f.value = !0;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
async function V() {
|
|
83
|
-
t.disabled || (n.value = !0, await Q(), x.value?.getMonacoEditor?.()?.focus?.());
|
|
84
|
-
}
|
|
85
|
-
function D() {
|
|
86
|
-
w(), n.value = !1, c("close"), c("blur");
|
|
87
|
-
}
|
|
88
|
-
function H(e) {
|
|
89
|
-
t.disabled || e.target instanceof Element && e.target.closest("a, button, input, textarea, select, summary, details") || V();
|
|
90
|
-
}
|
|
91
|
-
function K(e) {
|
|
92
|
-
t.disabled || e.key !== "Enter" && e.key !== " " || (e.preventDefault(), V());
|
|
93
|
-
}
|
|
94
|
-
function w() {
|
|
95
|
-
s && (clearTimeout(s), s = null);
|
|
96
|
-
}
|
|
97
|
-
function U() {
|
|
98
|
-
w();
|
|
99
|
-
}
|
|
100
|
-
function W(e) {
|
|
101
|
-
const a = R.value, b = e.relatedTarget;
|
|
102
|
-
!a || b && a.contains(b) || (w(), s = setTimeout(() => {
|
|
103
|
-
s = null;
|
|
104
|
-
const F = typeof document < "u" ? document.activeElement : null;
|
|
105
|
-
F instanceof Node && a.contains(F) || (v.value && (n.value = !1), c("blur"));
|
|
106
|
-
}, 0));
|
|
107
|
-
}
|
|
108
|
-
return E(() => t.modelValue, (e) => {
|
|
109
|
-
const a = C(e);
|
|
110
|
-
a !== l.value && (l.value = a);
|
|
111
|
-
}), E(
|
|
112
|
-
() => [l.value, t.locale],
|
|
113
|
-
() => {
|
|
114
|
-
N(), z();
|
|
115
|
-
},
|
|
116
|
-
{ immediate: !0 }
|
|
117
|
-
), E(() => t.disabled, () => {
|
|
118
|
-
N();
|
|
119
|
-
}), $(() => {
|
|
120
|
-
w();
|
|
121
|
-
}), (e, a) => (d(), r("div", {
|
|
122
|
-
ref_key: "fieldRootRef",
|
|
123
|
-
ref: R,
|
|
124
|
-
class: B(["aimd-markdown-note-field", {
|
|
125
|
-
"aimd-markdown-note-field--disabled": o.disabled,
|
|
126
|
-
"aimd-markdown-note-field--preview": y.value,
|
|
127
|
-
"aimd-markdown-note-field--editor": g.value,
|
|
128
|
-
"aimd-markdown-note-field--empty": M.value
|
|
129
|
-
}]),
|
|
130
|
-
onFocusin: U,
|
|
131
|
-
onFocusout: W
|
|
132
|
-
}, [
|
|
133
|
-
y.value ? (d(), r("div", te, [
|
|
134
|
-
o.disabled ? j("", !0) : (d(), r("div", oe, [
|
|
135
|
-
k("button", {
|
|
136
|
-
type: "button",
|
|
137
|
-
class: "aimd-markdown-note-field__preview-edit",
|
|
138
|
-
onClick: V
|
|
139
|
-
}, h(I.value), 1)
|
|
140
|
-
])),
|
|
141
|
-
k("div", {
|
|
142
|
-
class: B(["aimd-markdown-note-field__preview", { "aimd-markdown-note-field__preview--interactive": !o.disabled }]),
|
|
143
|
-
tabindex: o.disabled ? void 0 : 0,
|
|
144
|
-
role: o.disabled ? void 0 : "button",
|
|
145
|
-
onClick: H,
|
|
146
|
-
onKeydown: K
|
|
147
|
-
}, [
|
|
148
|
-
f.value ? (d(), r("pre", le, h(l.value), 1)) : (d(), G(P(S), {
|
|
149
|
-
key: 1,
|
|
150
|
-
nodes: m.value
|
|
151
|
-
}, null, 8, ["nodes"]))
|
|
152
|
-
], 42, ae)
|
|
153
|
-
])) : g.value ? (d(), r("div", ne, [
|
|
154
|
-
k("div", ie, [
|
|
155
|
-
k("button", {
|
|
156
|
-
type: "button",
|
|
157
|
-
class: "aimd-markdown-note-field__editor-close",
|
|
158
|
-
onClick: D
|
|
159
|
-
}, h(A.value), 1)
|
|
160
|
-
]),
|
|
161
|
-
J(P(X), {
|
|
162
|
-
ref_key: "editorRef",
|
|
163
|
-
ref: x,
|
|
164
|
-
class: "aimd-markdown-note-field__editor",
|
|
165
|
-
"model-value": l.value,
|
|
166
|
-
locale: o.locale,
|
|
167
|
-
mode: "source",
|
|
168
|
-
theme: "aimd-light",
|
|
169
|
-
"show-top-bar": !0,
|
|
170
|
-
"show-toolbar": !o.disabled,
|
|
171
|
-
"show-md-toolbar": !0,
|
|
172
|
-
"show-aimd-toolbar": !0,
|
|
173
|
-
"enable-block-handle": !o.disabled,
|
|
174
|
-
"keep-inactive-editors-mounted": !1,
|
|
175
|
-
"min-height": o.minHeight,
|
|
176
|
-
readonly: o.disabled,
|
|
177
|
-
"monaco-options": { minimap: { enabled: !1 } },
|
|
178
|
-
"onUpdate:modelValue": q
|
|
179
|
-
}, null, 8, ["model-value", "locale", "show-toolbar", "enable-block-handle", "min-height", "readonly"])
|
|
180
|
-
])) : (d(), r("div", de, h(O.value), 1))
|
|
181
|
-
], 34));
|
|
182
|
-
}
|
|
183
|
-
}), we = /* @__PURE__ */ ee(re, [["__scopeId", "data-v-0c80b790"]]);
|
|
184
|
-
export {
|
|
185
|
-
we as default
|
|
186
|
-
};
|