@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
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ref as A, nextTick as M } from "vue";
|
|
2
|
+
const C = 21, D = 24, E = 96;
|
|
3
|
+
function I(e, i = E) {
|
|
4
|
+
return e.replace(/\r\n?/g, `
|
|
5
|
+
`).split(`
|
|
6
|
+
`).reduce((a, o) => {
|
|
7
|
+
const h = Array.from(o).length;
|
|
8
|
+
return a + Math.max(1, Math.ceil(h / i));
|
|
9
|
+
}, 0);
|
|
10
|
+
}
|
|
11
|
+
function _(e) {
|
|
12
|
+
const i = e.lineHeight ?? C, s = e.verticalPadding ?? D, a = e.minHeight ?? i + s, o = e.maxHeight ?? 560, h = e.estimatedCharsPerLine ?? E, r = A(g(e.getInitialValue()));
|
|
13
|
+
let n = null, c = null;
|
|
14
|
+
function d(t) {
|
|
15
|
+
return Math.max(a, Math.min(o, Math.ceil(t)));
|
|
16
|
+
}
|
|
17
|
+
function g(t) {
|
|
18
|
+
return d(I(t, h) * i + s);
|
|
19
|
+
}
|
|
20
|
+
function H() {
|
|
21
|
+
if (!n?.layout)
|
|
22
|
+
return;
|
|
23
|
+
const t = e.getLayoutElement()?.clientWidth ?? 0;
|
|
24
|
+
if (t > 0) {
|
|
25
|
+
n.layout({ width: t, height: r.value });
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
n.layout();
|
|
29
|
+
}
|
|
30
|
+
function l(t) {
|
|
31
|
+
const u = d(t);
|
|
32
|
+
u !== r.value && (r.value = u, M(H));
|
|
33
|
+
}
|
|
34
|
+
function f(t = e.getInitialValue()) {
|
|
35
|
+
l(g(t));
|
|
36
|
+
}
|
|
37
|
+
function m() {
|
|
38
|
+
const t = n?.getContentHeight?.();
|
|
39
|
+
typeof t == "number" && Number.isFinite(t) && l(t);
|
|
40
|
+
}
|
|
41
|
+
function L(t) {
|
|
42
|
+
c?.dispose(), n = t, c = n.onDidContentSizeChange?.((u) => {
|
|
43
|
+
l(u.contentHeight);
|
|
44
|
+
}) ?? null, m();
|
|
45
|
+
}
|
|
46
|
+
function y() {
|
|
47
|
+
c?.dispose(), c = null, n = null;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
editorHeight: r,
|
|
51
|
+
lineHeight: i,
|
|
52
|
+
minHeight: a,
|
|
53
|
+
maxHeight: o,
|
|
54
|
+
attachEditor: L,
|
|
55
|
+
dispose: y,
|
|
56
|
+
estimateEditorHeight: g,
|
|
57
|
+
layoutEditor: H,
|
|
58
|
+
setEditorHeight: l,
|
|
59
|
+
syncEstimatedEditorHeight: f,
|
|
60
|
+
syncMeasuredEditorHeight: m
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
export {
|
|
64
|
+
_ as c,
|
|
65
|
+
I as e
|
|
66
|
+
};
|