@airalogy/aimd-recorder 1.22.0 → 1.24.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 (95) hide show
  1. package/README.md +80 -0
  2. package/README.zh-CN.md +80 -0
  3. package/dist/{AimdCodeField-BN_0UQMx.js → AimdCodeField-CPjcXY4D.js} +1 -1
  4. package/dist/{AimdDnaSequenceField-Bhj28fP8.js → AimdDnaSequenceField-Dz-IONoA.js} +5 -4
  5. package/dist/{AimdEditor.vue_vue_type_style_index_0_lang-D7c01UqN.js → AimdEditor.vue_vue_type_style_index_0_lang-JAD--qFs.js} +1999 -1900
  6. package/dist/AimdEntityRefField-BE0s2o5T.js +229 -0
  7. package/dist/{AimdMarkdownField-GS15pv4z.js → AimdMarkdownField-BeD2t9JY.js} +5 -5
  8. package/dist/{AimdMarkdownNoteField-H9WP8tR6.js → AimdMarkdownNoteField-DIgGEYpj.js} +16 -16
  9. package/dist/{_commonjsHelpers-B5RozER-.js → _commonjsHelpers-ByX85dGu.js} +12 -19
  10. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  11. package/dist/aimd-recorder.css +1 -1
  12. package/dist/{arc-B50G9-kH.js → arc-CLJJdrm0.js} +1 -1
  13. package/dist/{architectureDiagram-3BPJPVTR-D9mBEbpY.js → architectureDiagram-3BPJPVTR-BizrFPnS.js} +3 -3
  14. package/dist/{blockDiagram-GPEHLZMM-Cs4swgto.js → blockDiagram-GPEHLZMM-IHDih8JW.js} +4 -4
  15. package/dist/{c4Diagram-AAUBKEIU-C12HKS3r.js → c4Diagram-AAUBKEIU-BQtg8m_M.js} +2 -2
  16. package/dist/{channel-D69VnjVz.js → channel-D8q7AX1Z.js} +1 -1
  17. package/dist/{chunk-2J33WTMH-oc-89G5c.js → chunk-2J33WTMH-C24lbKon.js} +1 -1
  18. package/dist/{chunk-4BX2VUAB-BDJS9G3r.js → chunk-4BX2VUAB-1m_lB_xe.js} +1 -1
  19. package/dist/{chunk-55IACEB6-BPl3uHcA.js → chunk-55IACEB6-BE5Nj-sd.js} +1 -1
  20. package/dist/{chunk-727SXJPM-pWe-vDGf.js → chunk-727SXJPM-Cg-Xw_d_.js} +5 -5
  21. package/dist/{chunk-AQP2D5EJ-D-R5sIr1.js → chunk-AQP2D5EJ-BvRpPCiY.js} +3 -3
  22. package/dist/{chunk-FMBD7UC4-bo6Qyom1.js → chunk-FMBD7UC4-D_44MTsg.js} +1 -1
  23. package/dist/{chunk-ND2GUHAM-DQMvtYV7.js → chunk-ND2GUHAM-tVBIo4LA.js} +1 -1
  24. package/dist/{chunk-QZHKN3VN-DlCn3HON.js → chunk-QZHKN3VN-B91HYLks.js} +1 -1
  25. package/dist/{classDiagram-v2-Q7XG4LA2-DzUwWFwr.js → classDiagram-4FO5ZUOK-CkejvTAN.js} +2 -2
  26. package/dist/{classDiagram-4FO5ZUOK-DzUwWFwr.js → classDiagram-v2-Q7XG4LA2-CkejvTAN.js} +2 -2
  27. package/dist/components.js +3869 -3359
  28. package/dist/composables.js +98 -93
  29. package/dist/{cose-bilkent-S5V4N54A-BXLMzfpO.js → cose-bilkent-S5V4N54A-CNcuriOF.js} +2 -2
  30. package/dist/{dagre-BM42HDAG-DHnofIh9.js → dagre-BM42HDAG-DMqFGafq.js} +3 -3
  31. package/dist/{diagram-2AECGRRQ-BqTTVPsm.js → diagram-2AECGRRQ-Cksd3pP3.js} +2 -2
  32. package/dist/{diagram-5GNKFQAL-D5p1UVbw.js → diagram-5GNKFQAL-SVjLnDJG.js} +3 -3
  33. package/dist/{diagram-KO2AKTUF-Uuoz9cFn.js → diagram-KO2AKTUF-DfNIAG6w.js} +2 -2
  34. package/dist/{diagram-LMA3HP47-W001U31X.js → diagram-LMA3HP47-DPOyCMGB.js} +2 -2
  35. package/dist/{diagram-OG6HWLK6-DL516LDr.js → diagram-OG6HWLK6-BDURmT37.js} +3 -3
  36. package/dist/{erDiagram-TEJ5UH35-CCxgMb67.js → erDiagram-TEJ5UH35-N991qII9.js} +4 -4
  37. package/dist/{flowDiagram-I6XJVG4X-nXGdmC0O.js → flowDiagram-I6XJVG4X-BABRFuk-.js} +6 -6
  38. package/dist/{ganttDiagram-6RSMTGT7-Bi9Ro7_Z.js → ganttDiagram-6RSMTGT7-BMDnK96S.js} +3 -3
  39. package/dist/{gitGraphDiagram-PVQCEYII-w1kNAy4E.js → gitGraphDiagram-PVQCEYII-cEvL7Dss.js} +3 -3
  40. package/dist/{graph-CpOkL_eZ.js → graph-BA09aCvZ.js} +1 -1
  41. package/dist/index.js +125 -113
  42. package/dist/{infoDiagram-5YYISTIA-Bde_w9T1.js → infoDiagram-5YYISTIA-DpC1Zthd.js} +1 -1
  43. package/dist/{ishikawaDiagram-YF4QCWOH-x5M1KR0l.js → ishikawaDiagram-YF4QCWOH-CMEt_f-x.js} +1 -1
  44. package/dist/{journeyDiagram-JHISSGLW-CIDQP8Zm.js → journeyDiagram-JHISSGLW-C0Qw169C.js} +4 -4
  45. package/dist/{kanban-definition-UN3LZRKU-CKgO7sG8.js → kanban-definition-UN3LZRKU-caROmSUy.js} +2 -2
  46. package/dist/{layout-BZYprqYR.js → layout-CH65__O4.js} +2 -2
  47. package/dist/{linear-ClSH2F_v.js → linear-B1VXpcsy.js} +1 -1
  48. package/dist/{mermaid.core-CcRV6K2R.js → mermaid.core-Cbmwvfvk.js} +35 -35
  49. package/dist/{mindmap-definition-RKZ34NQL-s3h6uszV.js → mindmap-definition-RKZ34NQL-DpTR5ilS.js} +3 -3
  50. package/dist/{pieDiagram-4H26LBE5-CgiazyWv.js → pieDiagram-4H26LBE5-Cb_KrmWC.js} +3 -3
  51. package/dist/{quadrantDiagram-W4KKPZXB-DCPVgHoW.js → quadrantDiagram-W4KKPZXB-B5_NswmK.js} +2 -2
  52. package/dist/record.js +77 -72
  53. package/dist/{requirementDiagram-4Y6WPE33-DE6F9oSB.js → requirementDiagram-4Y6WPE33-OFwfat5D.js} +3 -3
  54. package/dist/{sankeyDiagram-5OEKKPKP-DZZoFFr-.js → sankeyDiagram-5OEKKPKP-BaawdZEE.js} +1 -1
  55. package/dist/{sequenceDiagram-3UESZ5HK-DaYEOl60.js → sequenceDiagram-3UESZ5HK-DLv8X8ef.js} +3 -3
  56. package/dist/{stateDiagram-AJRCARHV-BmgpHJlH.js → stateDiagram-AJRCARHV-B6F3wrsd.js} +4 -4
  57. package/dist/{stateDiagram-v2-BHNVJYJU-D49CHQD6.js → stateDiagram-v2-BHNVJYJU-BcNEoshv.js} +2 -2
  58. package/dist/{timeline-definition-PNZ67QCA-DdVLoCkC.js → timeline-definition-PNZ67QCA-CvdHJ4eQ.js} +2 -2
  59. package/dist/useCodeBlockRendering-D2viVPtA.js +3158 -0
  60. package/dist/useFieldRendering-Co4DOOvL.js +1120 -0
  61. package/dist/useVarHelpers-Du2obGza.js +3474 -0
  62. package/dist/validation-oyqyD7Jp.js +5601 -0
  63. package/dist/{vennDiagram-CIIHVFJN-CCcMKcd7.js → vennDiagram-CIIHVFJN-U0GlQDjX.js} +1 -1
  64. package/dist/{wardleyDiagram-YWT4CUSO-R4UGgGWY.js → wardleyDiagram-YWT4CUSO-CzF_KMcn.js} +2 -2
  65. package/dist/{xychartDiagram-2RQKCTM6-DyFhCubk.js → xychartDiagram-2RQKCTM6-Cljki2Vk.js} +2 -2
  66. package/package.json +6 -4
  67. package/src/__tests__/collector-field.test.ts +269 -0
  68. package/src/__tests__/record-search-render.test.ts +1 -0
  69. package/src/__tests__/record-validation.test.ts +378 -0
  70. package/src/__tests__/recorder-wysiwyg-field-host.test.ts +26 -0
  71. package/src/__tests__/var-field-render.test.ts +64 -2
  72. package/src/components/AimdCollectorField.vue +233 -0
  73. package/src/components/AimdEntityRefField.vue +314 -0
  74. package/src/components/AimdRecorder.vue +285 -7
  75. package/src/components/AimdRecorderEditor.vue +51 -1
  76. package/src/components/AimdRecorderWysiwygFieldHost.vue +10 -0
  77. package/src/components/AimdRecorderWysiwygSurface.vue +166 -4
  78. package/src/components/AimdVarField.vue +39 -2
  79. package/src/components/AimdVarTableField.vue +38 -21
  80. package/src/components/index.ts +4 -0
  81. package/src/components/recorderMilkdownPlugin.ts +16 -0
  82. package/src/composables/__tests__/useVarHelpers.test.ts +32 -0
  83. package/src/composables/index.ts +12 -0
  84. package/src/composables/useCollectors.ts +399 -0
  85. package/src/composables/useVarHelpers.ts +130 -2
  86. package/src/index.ts +32 -2
  87. package/src/locales.ts +140 -2
  88. package/src/record/index.ts +14 -0
  89. package/src/record/validation.ts +772 -0
  90. package/src/styles/collector-field.css +281 -0
  91. package/src/styles/recorder-surface.css +163 -0
  92. package/src/styles/recorder.css +33 -0
  93. package/src/types.ts +168 -1
  94. package/dist/index-Dkrf2LJl.js +0 -1308
  95. package/dist/useCodeBlockRendering-CCuoP52e.js +0 -6103
@@ -0,0 +1,229 @@
1
+ import { defineComponent as P, ref as w, computed as p, watch as Q, openBlock as a, createElementBlock as r, Fragment as N, renderList as x, createElementVNode as y, toDisplayString as l, createCommentVNode as f, withDirectives as j, withKeys as U, withModifiers as G, vModelText as H } from "vue";
2
+ import { a4 as J } from "./useVarHelpers-Du2obGza.js";
3
+ const O = { class: "aimd-rec-entity-ref" }, W = {
4
+ key: 0,
5
+ class: "aimd-rec-entity-ref__selected"
6
+ }, X = { class: "aimd-rec-entity-ref__entity" }, Y = ["title"], Z = ["title"], ee = ["aria-label", "title", "onClick"], te = { class: "aimd-rec-entity-ref__search-row" }, ne = ["data-rec-focus-key", "disabled", "placeholder", "onKeydown"], ie = {
7
+ key: 1,
8
+ class: "aimd-rec-entity-ref__hint"
9
+ }, se = {
10
+ key: 2,
11
+ class: "aimd-rec-entity-ref__error"
12
+ }, ae = {
13
+ key: 3,
14
+ class: "aimd-rec-entity-ref__hint"
15
+ }, re = {
16
+ key: 4,
17
+ class: "aimd-rec-entity-ref__options"
18
+ }, le = ["disabled", "onClick"], oe = { class: "aimd-rec-entity-ref__option-label" }, ce = { class: "aimd-rec-entity-ref__option-id" }, ue = {
19
+ key: 0,
20
+ class: "aimd-rec-entity-ref__option-description"
21
+ }, fe = /* @__PURE__ */ P({
22
+ __name: "AimdEntityRefField",
23
+ props: {
24
+ node: {},
25
+ value: {},
26
+ disabled: { type: Boolean },
27
+ messages: {},
28
+ fieldMeta: {},
29
+ type: {},
30
+ entityConfig: {},
31
+ entityResolvers: {},
32
+ record: {}
33
+ },
34
+ emits: ["change", "blur"],
35
+ setup(s, { emit: F }) {
36
+ const i = s, M = F, o = w(""), m = w([]), C = w(!1), k = w("");
37
+ let R = 0;
38
+ const E = p(() => `var:${i.node.id}`), S = p(() => i.entityConfig.entity || "entity"), z = p(() => {
39
+ const e = i.entityResolvers;
40
+ if (e)
41
+ return (i.entityConfig.source ? e[i.entityConfig.source] : void 0) ?? (i.entityConfig.entity ? e[i.entityConfig.entity] : void 0);
42
+ });
43
+ function u(e) {
44
+ return typeof e != "string" ? void 0 : e.trim() || void 0;
45
+ }
46
+ function h(e) {
47
+ if (typeof e == "string") {
48
+ const b = e.trim();
49
+ return b ? {
50
+ entity: S.value,
51
+ source: i.entityConfig.source,
52
+ id: b,
53
+ label: b
54
+ } : null;
55
+ }
56
+ if (!e || typeof e != "object" || Array.isArray(e))
57
+ return null;
58
+ const n = e, t = u(n.id) ?? u(n.value) ?? u(n.key);
59
+ if (!t) return null;
60
+ const d = u(n.label) ?? u(n.name) ?? u(n.title) ?? t, g = u(n.entity) ?? S.value, c = u(n.source) ?? i.entityConfig.source, _ = { ...n };
61
+ return delete _.disabled, {
62
+ ..._,
63
+ entity: g,
64
+ id: t,
65
+ source: c,
66
+ label: d
67
+ };
68
+ }
69
+ const v = p(() => {
70
+ if (i.entityConfig.multiple)
71
+ return (Array.isArray(i.value) ? i.value : i.value ? [i.value] : []).map((t) => h(t)).filter((t) => t !== null);
72
+ const e = h(i.value);
73
+ return e ? [e] : [];
74
+ }), A = p(() => new Set(
75
+ v.value.map((e) => `${e.source ?? ""}:${e.entity}:${e.id}`)
76
+ ));
77
+ function I() {
78
+ return {
79
+ type: i.type,
80
+ normalizedType: J(i.type),
81
+ fieldKey: E.value,
82
+ node: i.node,
83
+ fieldMeta: i.fieldMeta,
84
+ entity: i.entityConfig.entity,
85
+ source: i.entityConfig.source,
86
+ query: o.value,
87
+ multiple: i.entityConfig.multiple,
88
+ record: i.record
89
+ };
90
+ }
91
+ async function T() {
92
+ const e = o.value.trim(), n = z.value, t = ++R;
93
+ if (m.value = [], k.value = "", !n || !e) {
94
+ C.value = !1;
95
+ return;
96
+ }
97
+ C.value = !0;
98
+ try {
99
+ const g = await (typeof n == "function" ? n : n.search)(e, I());
100
+ t === R && (m.value = g.map((c) => h(c)).filter((c) => c !== null).map((c) => {
101
+ const _ = g.find((b) => h(b)?.id === c.id);
102
+ return {
103
+ ..._ ?? c,
104
+ ...c,
105
+ disabled: !!_?.disabled,
106
+ description: _?.description
107
+ };
108
+ }));
109
+ } catch {
110
+ t === R && (k.value = i.messages.entityRef.searchFailed);
111
+ } finally {
112
+ t === R && (C.value = !1);
113
+ }
114
+ }
115
+ Q(
116
+ () => [
117
+ o.value,
118
+ i.entityResolvers,
119
+ i.entityConfig.entity,
120
+ i.entityConfig.source
121
+ ],
122
+ () => {
123
+ T();
124
+ },
125
+ { immediate: !0 }
126
+ );
127
+ function $(e) {
128
+ M("change", {
129
+ value: i.entityConfig.multiple ? e : e[0] ?? null
130
+ });
131
+ }
132
+ function B(e) {
133
+ const n = h(e);
134
+ if (n) {
135
+ if (i.entityConfig.multiple) {
136
+ const t = `${n.source ?? ""}:${n.entity}:${n.id}`;
137
+ A.value.has(t) || $([...v.value, n]);
138
+ } else
139
+ $([n]);
140
+ o.value = "", m.value = [];
141
+ }
142
+ }
143
+ function V() {
144
+ const e = o.value.trim();
145
+ e && B(e);
146
+ }
147
+ function D(e) {
148
+ const n = v.value.filter((t, d) => d !== e);
149
+ $(n);
150
+ }
151
+ function L() {
152
+ $([]);
153
+ }
154
+ function q(e) {
155
+ return `${e.source ?? ""}:${e.entity}:${e.id}`;
156
+ }
157
+ function K(e) {
158
+ return e.label || e.id;
159
+ }
160
+ return (e, n) => (a(), r("span", O, [
161
+ v.value.length ? (a(), r("span", W, [
162
+ (a(!0), r(N, null, x(v.value, (t, d) => (a(), r("span", {
163
+ key: `${t.source ?? ""}:${t.entity}:${t.id}:${d}`,
164
+ class: "aimd-rec-entity-ref__chip"
165
+ }, [
166
+ y("span", X, l(t.entity), 1),
167
+ y("span", {
168
+ class: "aimd-rec-entity-ref__label",
169
+ title: K(t)
170
+ }, l(K(t)), 9, Y),
171
+ y("span", {
172
+ class: "aimd-rec-entity-ref__id",
173
+ title: t.id
174
+ }, l(t.id), 9, Z),
175
+ s.disabled ? f("", !0) : (a(), r("button", {
176
+ key: 0,
177
+ type: "button",
178
+ class: "aimd-rec-entity-ref__chip-remove",
179
+ "aria-label": s.messages.entityRef.remove,
180
+ title: s.messages.entityRef.remove,
181
+ onClick: (g) => D(d)
182
+ }, " × ", 8, ee))
183
+ ]))), 128))
184
+ ])) : f("", !0),
185
+ y("span", te, [
186
+ j(y("input", {
187
+ "onUpdate:modelValue": n[0] || (n[0] = (t) => o.value = t),
188
+ "data-rec-focus-key": E.value,
189
+ class: "aimd-rec-inline__value-control aimd-rec-inline__input aimd-rec-inline__input--stacked aimd-rec-entity-ref__input",
190
+ disabled: s.disabled,
191
+ placeholder: z.value ? s.messages.entityRef.searchPlaceholder(S.value) : s.messages.entityRef.manualIdPlaceholder,
192
+ onKeydown: U(G(V, ["prevent"]), ["enter"]),
193
+ onBlur: n[1] || (n[1] = (t) => M("blur"))
194
+ }, null, 40, ne), [
195
+ [H, o.value]
196
+ ]),
197
+ o.value.trim() && !s.disabled ? (a(), r("button", {
198
+ key: 0,
199
+ type: "button",
200
+ class: "aimd-rec-entity-ref__action",
201
+ onClick: V
202
+ }, l(s.entityConfig.multiple ? s.messages.entityRef.add : s.messages.entityRef.select), 1)) : f("", !0),
203
+ !s.entityConfig.multiple && v.value.length && !s.disabled ? (a(), r("button", {
204
+ key: 1,
205
+ type: "button",
206
+ class: "aimd-rec-entity-ref__action aimd-rec-entity-ref__action--secondary",
207
+ onClick: L
208
+ }, l(s.messages.entityRef.clear), 1)) : f("", !0)
209
+ ]),
210
+ z.value ? k.value ? (a(), r("span", se, l(k.value), 1)) : o.value.trim() && !C.value && m.value.length === 0 ? (a(), r("span", ae, l(s.messages.entityRef.noMatches), 1)) : f("", !0) : (a(), r("span", ie, l(s.messages.entityRef.noResolver), 1)),
211
+ m.value.length ? (a(), r("span", re, [
212
+ (a(!0), r(N, null, x(m.value, (t) => (a(), r("button", {
213
+ key: q(t),
214
+ type: "button",
215
+ class: "aimd-rec-entity-ref__option",
216
+ disabled: s.disabled || t.disabled || A.value.has(q(t)),
217
+ onClick: (d) => B(t)
218
+ }, [
219
+ y("span", oe, l(K(t)), 1),
220
+ y("span", ce, l(t.id), 1),
221
+ t.description ? (a(), r("span", ue, l(t.description), 1)) : f("", !0)
222
+ ], 8, le))), 128))
223
+ ])) : f("", !0)
224
+ ]));
225
+ }
226
+ });
227
+ export {
228
+ fe as default
229
+ };
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as p, ref as m, watch as V, h as x, computed as l, shallowRef as te, onBeforeUnmount as oe, openBlock as r, createElementBlock as n, normalizeStyle as ie, normalizeClass as C, createElementVNode as s, toDisplayString as c, unref as v, createVNode as E, createCommentVNode as g, createBlock as re } from "vue";
2
- import { g as ne, _ as de } from "./AimdEditor.vue_vue_type_style_index_0_lang-D7c01UqN.js";
3
- import "./index-Dkrf2LJl.js";
4
- import { V as le, g as se } from "./useCodeBlockRendering-CCuoP52e.js";
2
+ import { g as ne, _ as de } from "./AimdEditor.vue_vue_type_style_index_0_lang-JAD--qFs.js";
3
+ import "./useVarHelpers-Du2obGza.js";
4
+ import { u as le, c as se } from "./useCodeBlockRendering-D2viVPtA.js";
5
5
  import "@airalogy/aimd-core";
6
6
  import { renderToVue as ce, createMermaidRenderer as ue } from "@airalogy/aimd-renderer";
7
7
  import { c as me } from "./useMonacoAutoHeight-D4T-El3J.js";
8
- import { _ as ve } from "./_commonjsHelpers-B5RozER-.js";
8
+ import { _ as ve } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
9
  const fe = { class: "aimd-field aimd-field--no-style aimd-field__label" }, we = { class: "aimd-field__scope aimd-field__scope--var" }, he = { class: "aimd-field__id" }, ke = { class: "aimd-markdown-field__header-actions" }, _e = ["aria-label"], pe = ["aria-pressed"], ge = ["aria-pressed"], be = {
10
10
  key: 0,
11
11
  class: "aimd-markdown-field__assigner-actions"
@@ -67,7 +67,7 @@ const fe = { class: "aimd-field aimd-field--no-style aimd-field__label" }, we =
67
67
  return;
68
68
  }
69
69
  try {
70
- const T = (await import("./mermaid.core-CcRV6K2R.js").then((ae) => ae.bm)).default;
70
+ const T = (await import("./mermaid.core-Cbmwvfvk.js").then((ae) => ae.bm)).default;
71
71
  T.initialize({
72
72
  startOnLoad: !1,
73
73
  securityLevel: "strict"
@@ -1,11 +1,11 @@
1
- import { defineComponent as K, ref as h, computed as a, shallowRef as re, watch as V, onBeforeUnmount as se, openBlock as r, createElementBlock as m, normalizeStyle as ue, normalizeClass as U, createElementVNode as l, toDisplayString as s, createCommentVNode as ce, createBlock as me, unref as M, createVNode as fe, nextTick as ve } from "vue";
2
- import { _ as we } from "./AimdEditor.vue_vue_type_style_index_0_lang-D7c01UqN.js";
3
- import "./index-Dkrf2LJl.js";
4
- import { V as he } from "./useCodeBlockRendering-CCuoP52e.js";
1
+ import { defineComponent as K, ref as h, computed as a, shallowRef as re, watch as R, onBeforeUnmount as se, openBlock as r, createElementBlock as m, normalizeStyle as ue, normalizeClass as U, createElementVNode as l, toDisplayString as s, createCommentVNode as ce, createBlock as me, unref as M, createVNode as fe, nextTick as ve } from "vue";
2
+ import { _ as we } from "./AimdEditor.vue_vue_type_style_index_0_lang-JAD--qFs.js";
3
+ import "./useVarHelpers-Du2obGza.js";
4
+ import { u as he } from "./useCodeBlockRendering-D2viVPtA.js";
5
5
  import "@airalogy/aimd-core";
6
6
  import { renderToVue as be } from "@airalogy/aimd-renderer";
7
7
  import { c as _e } from "./useMonacoAutoHeight-D4T-El3J.js";
8
- import { _ as pe } from "./_commonjsHelpers-B5RozER-.js";
8
+ import { _ as pe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
9
  const ke = {
10
10
  key: 0,
11
11
  class: "aimd-markdown-note-field__preview-shell"
@@ -16,7 +16,7 @@ const ke = {
16
16
  type: "button",
17
17
  class: "aimd-markdown-note-field__view-btn aimd-markdown-note-field__view-btn--active",
18
18
  "aria-pressed": "true"
19
- }, Ve = ["tabindex", "role"], Re = {
19
+ }, Re = ["tabindex", "role"], Ve = {
20
20
  key: 0,
21
21
  class: "aimd-markdown-note-field__preview-fallback"
22
22
  }, Ce = {
@@ -46,9 +46,9 @@ const ke = {
46
46
  function f(e) {
47
47
  return e?.toLowerCase().startsWith("zh") ?? !1;
48
48
  }
49
- const R = h(null), P = h(null), n = h(N(t.modelValue)), u = _e({
49
+ const V = h(null), P = h(null), n = h(N(t.modelValue)), u = _e({
50
50
  getInitialValue: () => n.value,
51
- getLayoutElement: () => R.value?.querySelector(".aimd-editor-container"),
51
+ getLayoutElement: () => V.value?.querySelector(".aimd-editor-container"),
52
52
  minHeight: t.minHeight,
53
53
  maxHeight: 420
54
54
  }), B = u.editorHeight, W = a(() => ({
@@ -146,31 +146,31 @@ const ke = {
146
146
  g();
147
147
  }
148
148
  function de(e) {
149
- const o = R.value, E = e.relatedTarget;
149
+ const o = V.value, E = e.relatedTarget;
150
150
  !o || E && o.contains(E) || k || (g(), v = setTimeout(() => {
151
151
  v = null;
152
152
  const G = typeof document < "u" ? document.activeElement : null;
153
153
  G instanceof Node && o.contains(G) || (c.value && (d.value = !1), b("blur"));
154
154
  }, 0));
155
155
  }
156
- return V(() => t.modelValue, (e) => {
156
+ return R(() => t.modelValue, (e) => {
157
157
  const o = N(e);
158
158
  o !== n.value && (n.value = o, u.syncEstimatedEditorHeight(o));
159
- }), V(
159
+ }), R(
160
160
  () => [n.value, t.locale],
161
161
  () => {
162
162
  z(), H();
163
163
  },
164
164
  { immediate: !0 }
165
- ), V(() => t.disabled, () => {
165
+ ), R(() => t.disabled, () => {
166
166
  z();
167
- }), V(y, (e) => {
167
+ }), R(y, (e) => {
168
168
  e && !t.disabled && D();
169
169
  }, { immediate: !0 }), se(() => {
170
170
  g(), x(), u.dispose();
171
171
  }), (e, o) => (r(), m("div", {
172
172
  ref_key: "fieldRootRef",
173
- ref: R,
173
+ ref: V,
174
174
  class: U(["aimd-markdown-note-field", {
175
175
  "aimd-markdown-note-field--disabled": i.disabled,
176
176
  "aimd-markdown-note-field--preview": S.value,
@@ -204,11 +204,11 @@ const ke = {
204
204
  onClick: ae,
205
205
  onKeydown: ie
206
206
  }, [
207
- p.value ? (r(), m("pre", Re, s(n.value), 1)) : (r(), me(M(Y), {
207
+ p.value ? (r(), m("pre", Ve, s(n.value), 1)) : (r(), me(M(Y), {
208
208
  key: 1,
209
209
  nodes: _.value
210
210
  }, null, 8, ["nodes"]))
211
- ], 42, Ve)
211
+ ], 42, Re)
212
212
  ])) : y.value ? (r(), m("div", Ce, [
213
213
  l("div", Fe, [
214
214
  l("span", {
@@ -1,40 +1,33 @@
1
- const a = (e, n) => {
2
- const t = e.__vccOpts || e;
3
- for (const [o, r] of n)
4
- t[o] = r;
5
- return t;
6
- };
7
- var s = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
8
- function c(e) {
1
+ var u = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2
+ function a(e) {
9
3
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
10
4
  }
11
5
  function f(e) {
12
6
  if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e;
13
7
  var n = e.default;
14
8
  if (typeof n == "function") {
15
- var t = function o() {
16
- var r = !1;
9
+ var t = function r() {
10
+ var o = !1;
17
11
  try {
18
- r = this instanceof o;
12
+ o = this instanceof r;
19
13
  } catch {
20
14
  }
21
- return r ? Reflect.construct(n, arguments, this.constructor) : n.apply(this, arguments);
15
+ return o ? Reflect.construct(n, arguments, this.constructor) : n.apply(this, arguments);
22
16
  };
23
17
  t.prototype = n.prototype;
24
18
  } else t = {};
25
- return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(e).forEach(function(o) {
26
- var r = Object.getOwnPropertyDescriptor(e, o);
27
- Object.defineProperty(t, o, r.get ? r : {
19
+ return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(e).forEach(function(r) {
20
+ var o = Object.getOwnPropertyDescriptor(e, r);
21
+ Object.defineProperty(t, r, o.get ? o : {
28
22
  enumerable: !0,
29
23
  get: function() {
30
- return e[o];
24
+ return e[r];
31
25
  }
32
26
  });
33
27
  }), t;
34
28
  }
35
29
  export {
36
- a as _,
37
30
  f as a,
38
- s as c,
39
- c as g
31
+ u as c,
32
+ a as g
40
33
  };
@@ -0,0 +1,9 @@
1
+ const s = (t, r) => {
2
+ const o = t.__vccOpts || t;
3
+ for (const [c, e] of r)
4
+ o[c] = e;
5
+ return o;
6
+ };
7
+ export {
8
+ s as _
9
+ };