@airalogy/aimd-recorder 1.17.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.
Files changed (106) hide show
  1. package/README.md +11 -10
  2. package/README.zh-CN.md +11 -10
  3. package/dist/AimdCodeField-BQUuM-EF.js +182 -0
  4. package/dist/{AimdDnaSequenceField-D6ZgCDpp.js → AimdDnaSequenceField-KZU2Zj3E.js} +2 -2
  5. package/dist/{AimdEditor.vue_vue_type_style_index_0_lang-B5Tq4zPV.js → AimdEditor.vue_vue_type_style_index_0_lang-CzfYPp5r.js} +3922 -3829
  6. package/dist/AimdMarkdownField-t2d8uOeU.js +254 -0
  7. package/dist/AimdMarkdownNoteField-_h1oZSwH.js +259 -0
  8. package/dist/{_commonjsHelpers-CZXJ37nu.js → _commonjsHelpers-B5RozER-.js} +2 -2
  9. package/dist/aimd-recorder.css +1 -1
  10. package/dist/arc-DS_ocYoe.js +83 -0
  11. package/dist/architectureDiagram-3BPJPVTR-Dq2W8_tb.js +4692 -0
  12. package/dist/blockDiagram-GPEHLZMM-B4hnSAF_.js +2425 -0
  13. package/dist/c4Diagram-AAUBKEIU-CbffqNLY.js +1577 -0
  14. package/dist/channel-CtXnYrAk.js +5 -0
  15. package/dist/chunk-2J33WTMH-CROScrt5.js +19 -0
  16. package/dist/chunk-4BX2VUAB-DTmsQu5_.js +8 -0
  17. package/dist/chunk-55IACEB6-B5wDJzeX.js +8 -0
  18. package/dist/chunk-727SXJPM-CfyltY6o.js +1528 -0
  19. package/dist/chunk-AQP2D5EJ-B8274EYy.js +1387 -0
  20. package/dist/chunk-FMBD7UC4-CT_FK-SH.js +19 -0
  21. package/dist/chunk-ND2GUHAM-g9GulPi-.js +68 -0
  22. package/dist/chunk-QZHKN3VN-Di5HEktz.js +15 -0
  23. package/dist/classDiagram-4FO5ZUOK-BVUr246k.js +16 -0
  24. package/dist/classDiagram-v2-Q7XG4LA2-BVUr246k.js +16 -0
  25. package/dist/components.js +3279 -2216
  26. package/dist/composables.js +92 -68
  27. package/dist/cose-bilkent-S5V4N54A-GJ4IOO6v.js +2609 -0
  28. package/dist/cytoscape.esm-r59gEWFs.js +18710 -0
  29. package/dist/dagre-BM42HDAG-oL7Br44o.js +445 -0
  30. package/dist/defaultLocale-BgPVtth8.js +171 -0
  31. package/dist/diagram-2AECGRRQ-DtoCG_N4.js +217 -0
  32. package/dist/diagram-5GNKFQAL-f8QNdS7L.js +123 -0
  33. package/dist/diagram-KO2AKTUF-CsJOW_AX.js +461 -0
  34. package/dist/diagram-LMA3HP47-xmEKNZ7y.js +142 -0
  35. package/dist/diagram-OG6HWLK6-unpC7vo8.js +528 -0
  36. package/dist/erDiagram-TEJ5UH35-BGzFnCJD.js +899 -0
  37. package/dist/flowDiagram-I6XJVG4X-LBFhDnOs.js +1628 -0
  38. package/dist/ganttDiagram-6RSMTGT7-CFBc-jPD.js +2707 -0
  39. package/dist/gitGraphDiagram-PVQCEYII-BLduh-Rb.js +815 -0
  40. package/dist/graph-DdlKE625.js +1510 -0
  41. package/dist/index.js +104 -80
  42. package/dist/infoDiagram-5YYISTIA-CLQQI6zM.js +24 -0
  43. package/dist/init-DjUOC4st.js +16 -0
  44. package/dist/ishikawaDiagram-YF4QCWOH-CStdYBmW.js +621 -0
  45. package/dist/journeyDiagram-JHISSGLW-B6mRTzoE.js +834 -0
  46. package/dist/kanban-definition-UN3LZRKU-C-vnN5v4.js +724 -0
  47. package/dist/katex-DNob3HGn.js +11690 -0
  48. package/dist/layout-DDt0fz-M.js +1703 -0
  49. package/dist/linear-C-IAFdOt.js +259 -0
  50. package/dist/mermaid.core-CuZ3nINf.js +15940 -0
  51. package/dist/mindmap-definition-RKZ34NQL-TSZ1Vb3z.js +827 -0
  52. package/dist/ordinal-B6-f3MAq.js +61 -0
  53. package/dist/pieDiagram-4H26LBE5-DYok-1-k.js +163 -0
  54. package/dist/quadrantDiagram-W4KKPZXB-Cg856sbH.js +1024 -0
  55. package/dist/requirementDiagram-4Y6WPE33-BN9fGdlJ.js +882 -0
  56. package/dist/sankeyDiagram-5OEKKPKP-CDqTgonY.js +847 -0
  57. package/dist/sequenceDiagram-3UESZ5HK-Chjrc0-W.js +2891 -0
  58. package/dist/stateDiagram-AJRCARHV-DRyLHrdr.js +263 -0
  59. package/dist/stateDiagram-v2-BHNVJYJU-CZTIDHid.js +16 -0
  60. package/dist/timeline-definition-PNZ67QCA-Bc3D9AAG.js +1055 -0
  61. package/dist/{useFieldRendering-xLajJhyA.js → useCodeBlockRendering-qA6gj4vz.js} +3035 -2254
  62. package/dist/useMonacoAutoHeight-D4T-El3J.js +66 -0
  63. package/dist/vennDiagram-CIIHVFJN-CYAul48m.js +1557 -0
  64. package/dist/wardley-L42UT6IY-D7b2ujEZ.js +22512 -0
  65. package/dist/wardleyDiagram-YWT4CUSO-B7Tg0MG9.js +675 -0
  66. package/dist/xychartDiagram-2RQKCTM6-xWYVEqth.js +1342 -0
  67. package/package.json +9 -8
  68. package/src/__tests__/assigner-runner-dependent-data.test.ts +32 -0
  69. package/src/__tests__/markdown-field.test.ts +150 -1
  70. package/src/__tests__/markdown-note-field.test.ts +86 -3
  71. package/src/__tests__/recorder-assigner-control.test.ts +844 -0
  72. package/src/__tests__/recorder-editor.test.ts +17 -0
  73. package/src/__tests__/recorder-markdown-assigner-integration.test.ts +49 -0
  74. package/src/__tests__/step-field.test.ts +47 -1
  75. package/src/__tests__/type-plugins.test.ts +1 -0
  76. package/src/__tests__/var-field-render.test.ts +741 -1
  77. package/src/components/AimdCodeField.vue +24 -5
  78. package/src/components/AimdMarkdownField.vue +548 -11
  79. package/src/components/AimdMarkdownNoteField.vue +241 -30
  80. package/src/components/AimdRecorder.vue +1521 -95
  81. package/src/components/AimdRecorderEditor.vue +276 -8
  82. package/src/components/AimdRecorderWysiwygFieldHost.vue +6 -0
  83. package/src/components/AimdRecorderWysiwygSurface.vue +32 -0
  84. package/src/components/AimdStepCheckField.vue +82 -18
  85. package/src/components/AimdVarField.vue +694 -25
  86. package/src/components/AimdVarTableField.vue +283 -110
  87. package/src/components/icons/AimdAssignerCalculatorIcon.vue +18 -0
  88. package/src/components/icons/AimdAssignerCloudStatusIcon.vue +22 -0
  89. package/src/components/recorderMilkdownPlugin.ts +14 -0
  90. package/src/composables/__tests__/useRecordState.test.ts +86 -0
  91. package/src/composables/__tests__/useVarHelpers.test.ts +133 -0
  92. package/src/composables/index.ts +27 -1
  93. package/src/composables/useAssignerRunner.ts +376 -0
  94. package/src/composables/useCodeBlockRendering.ts +51 -0
  95. package/src/composables/useFieldRendering.ts +32 -4
  96. package/src/composables/useMonacoAutoHeight.ts +127 -0
  97. package/src/composables/useRecordState.ts +22 -3
  98. package/src/composables/useVarHelpers.ts +377 -9
  99. package/src/index.ts +13 -0
  100. package/src/locales.ts +45 -0
  101. package/src/styles/aimd.css +151 -1
  102. package/src/type-plugins.ts +7 -0
  103. package/src/types.ts +93 -2
  104. package/dist/AimdCodeField-DC3DPvgc.js +0 -172
  105. package/dist/AimdMarkdownField-BJ20QtO8.js +0 -67
  106. package/dist/AimdMarkdownNoteField-DwAQhoyk.js +0 -186
@@ -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-B5Tq4zPV.js";
3
- import "./useFieldRendering-xLajJhyA.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
- };