@airalogy/aimd-recorder 1.24.2 → 1.24.4
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/dist/{AimdCodeField-CPjcXY4D.js → AimdCodeField-lUbFTqiD.js} +1 -1
- package/dist/{AimdDnaSequenceField-Dz-IONoA.js → AimdDnaSequenceField-Opgy07Gt.js} +2916 -2911
- package/dist/{AimdEditor.vue_vue_type_style_index_0_lang-JAD--qFs.js → AimdEditor.vue_vue_type_style_index_0_lang-DHckC0bq.js} +5 -3
- package/dist/{AimdEntityRefField-BE0s2o5T.js → AimdEntityRefField-GA6-mhGU.js} +1 -1
- package/dist/{AimdMarkdownField-BeD2t9JY.js → AimdMarkdownField-jagZIbKc.js} +99 -94
- package/dist/{AimdMarkdownNoteField-DIgGEYpj.js → AimdMarkdownNoteField-BUq4fRcZ.js} +3 -3
- package/dist/AimdRequiredMarker.vue_vue_type_script_setup_true_lang-B5qDiOZn.js +25 -0
- package/dist/aimd-recorder.css +1 -1
- package/dist/{arc-CLJJdrm0.js → arc-CR1cpc2k.js} +1 -1
- package/dist/{architectureDiagram-3BPJPVTR-BizrFPnS.js → architectureDiagram-3BPJPVTR-B8OoiHF6.js} +2 -2
- package/dist/{blockDiagram-GPEHLZMM-IHDih8JW.js → blockDiagram-GPEHLZMM-Ddq40SrW.js} +4 -4
- package/dist/{c4Diagram-AAUBKEIU-BQtg8m_M.js → c4Diagram-AAUBKEIU-Cf3cjJMq.js} +2 -2
- package/dist/{channel-D8q7AX1Z.js → channel-C8Vd7nOK.js} +1 -1
- package/dist/{chunk-2J33WTMH-C24lbKon.js → chunk-2J33WTMH-Ck31ftjD.js} +1 -1
- package/dist/{chunk-4BX2VUAB-1m_lB_xe.js → chunk-4BX2VUAB-BJOkbq4i.js} +1 -1
- package/dist/{chunk-55IACEB6-BE5Nj-sd.js → chunk-55IACEB6-lNZxrJyO.js} +1 -1
- package/dist/{chunk-727SXJPM-Cg-Xw_d_.js → chunk-727SXJPM-mEDRtdd4.js} +5 -5
- package/dist/{chunk-AQP2D5EJ-BvRpPCiY.js → chunk-AQP2D5EJ-C1MU-m_K.js} +3 -3
- package/dist/{chunk-FMBD7UC4-D_44MTsg.js → chunk-FMBD7UC4-Pmfg_1nq.js} +1 -1
- package/dist/{chunk-ND2GUHAM-tVBIo4LA.js → chunk-ND2GUHAM-CipPchY0.js} +1 -1
- package/dist/{chunk-QZHKN3VN-B91HYLks.js → chunk-QZHKN3VN-BvE9EC7r.js} +1 -1
- package/dist/{classDiagram-v2-Q7XG4LA2-CkejvTAN.js → classDiagram-4FO5ZUOK-BM5OaktU.js} +2 -2
- package/dist/{classDiagram-4FO5ZUOK-CkejvTAN.js → classDiagram-v2-Q7XG4LA2-BM5OaktU.js} +2 -2
- package/dist/components.js +2494 -2459
- package/dist/composables.js +2 -2
- package/dist/{cose-bilkent-S5V4N54A-CNcuriOF.js → cose-bilkent-S5V4N54A-nmO7LFhz.js} +1 -1
- package/dist/{dagre-BM42HDAG-DMqFGafq.js → dagre-BM42HDAG-D3xhjRxX.js} +3 -3
- package/dist/{diagram-2AECGRRQ-Cksd3pP3.js → diagram-2AECGRRQ-kCJcuZOT.js} +2 -2
- package/dist/{diagram-5GNKFQAL-SVjLnDJG.js → diagram-5GNKFQAL-Bdr1oGkv.js} +3 -3
- package/dist/{diagram-KO2AKTUF-DfNIAG6w.js → diagram-KO2AKTUF-CeBpcrbw.js} +2 -2
- package/dist/{diagram-LMA3HP47-DPOyCMGB.js → diagram-LMA3HP47-C5oYYzCp.js} +2 -2
- package/dist/{diagram-OG6HWLK6-BDURmT37.js → diagram-OG6HWLK6-CNzZuxZL.js} +3 -3
- package/dist/{erDiagram-TEJ5UH35-N991qII9.js → erDiagram-TEJ5UH35-MWNh4yWB.js} +4 -4
- package/dist/{flowDiagram-I6XJVG4X-BABRFuk-.js → flowDiagram-I6XJVG4X-DcREbXha.js} +6 -6
- package/dist/{ganttDiagram-6RSMTGT7-BMDnK96S.js → ganttDiagram-6RSMTGT7-DGZUsfa4.js} +2 -2
- package/dist/{gitGraphDiagram-PVQCEYII-cEvL7Dss.js → gitGraphDiagram-PVQCEYII-DhpcTOAS.js} +3 -3
- package/dist/{graph-BA09aCvZ.js → graph-CXU7Rv38.js} +1 -1
- package/dist/index.js +109 -106
- package/dist/{infoDiagram-5YYISTIA-DpC1Zthd.js → infoDiagram-5YYISTIA-CVZBlZ8R.js} +1 -1
- package/dist/{ishikawaDiagram-YF4QCWOH-CMEt_f-x.js → ishikawaDiagram-YF4QCWOH-Bjyc47Lv.js} +1 -1
- package/dist/{journeyDiagram-JHISSGLW-C0Qw169C.js → journeyDiagram-JHISSGLW-e2G_PVGF.js} +4 -4
- package/dist/{kanban-definition-UN3LZRKU-caROmSUy.js → kanban-definition-UN3LZRKU-CKOBjcK9.js} +2 -2
- package/dist/{layout-CH65__O4.js → layout-CBS27QDo.js} +2 -2
- package/dist/{linear-B1VXpcsy.js → linear-UyXZcrYY.js} +1 -1
- package/dist/{mermaid.core-Cbmwvfvk.js → mermaid.core-BeKK51C9.js} +34 -34
- package/dist/{mindmap-definition-RKZ34NQL-DpTR5ilS.js → mindmap-definition-RKZ34NQL-T6_bnhal.js} +3 -3
- package/dist/{pieDiagram-4H26LBE5-Cb_KrmWC.js → pieDiagram-4H26LBE5-GGANuPvf.js} +3 -3
- package/dist/{quadrantDiagram-W4KKPZXB-B5_NswmK.js → quadrantDiagram-W4KKPZXB-BAtVKEgW.js} +2 -2
- package/dist/record.js +19 -18
- package/dist/{requirementDiagram-4Y6WPE33-OFwfat5D.js → requirementDiagram-4Y6WPE33-C2oozBsJ.js} +3 -3
- package/dist/{sankeyDiagram-5OEKKPKP-BaawdZEE.js → sankeyDiagram-5OEKKPKP-Bfc4Y-JM.js} +1 -1
- package/dist/{sequenceDiagram-3UESZ5HK-DLv8X8ef.js → sequenceDiagram-3UESZ5HK-e9yMBU3K.js} +3 -3
- package/dist/{stateDiagram-AJRCARHV-B6F3wrsd.js → stateDiagram-AJRCARHV-D1vciiPs.js} +4 -4
- package/dist/{stateDiagram-v2-BHNVJYJU-BcNEoshv.js → stateDiagram-v2-BHNVJYJU-DMXm3rUm.js} +2 -2
- package/dist/{timeline-definition-PNZ67QCA-CvdHJ4eQ.js → timeline-definition-PNZ67QCA-Cg7TL_0Q.js} +2 -2
- package/dist/{useFieldRendering-Co4DOOvL.js → useFieldRendering-JFnqNEWH.js} +1 -1
- package/dist/{useVarHelpers-Du2obGza.js → useVarHelpers-CQQ-zhL0.js} +31 -27
- package/dist/{validation-BTYW9JCj.js → validation-DSn_Ttx_.js} +1430 -1402
- package/dist/{vennDiagram-CIIHVFJN-U0GlQDjX.js → vennDiagram-CIIHVFJN-BEJdgPK5.js} +1 -1
- package/dist/{wardleyDiagram-YWT4CUSO-CzF_KMcn.js → wardleyDiagram-YWT4CUSO-DLxpx6Lm.js} +2 -2
- package/dist/{xychartDiagram-2RQKCTM6-Cljki2Vk.js → xychartDiagram-2RQKCTM6-CG-K6knD.js} +2 -2
- package/package.json +8 -8
- package/src/__tests__/record-validation.test.ts +92 -1
- package/src/__tests__/required-marker.test.ts +17 -0
- package/src/components/AimdCollectorField.vue +3 -0
- package/src/components/AimdDnaSequenceField.vue +5 -1
- package/src/components/AimdMarkdownField.vue +5 -1
- package/src/components/AimdQuizRecorder.vue +4 -0
- package/src/components/AimdRecorder.vue +14 -0
- package/src/components/AimdRequiredMarker.vue +15 -0
- package/src/components/AimdStepCheckField.vue +11 -1
- package/src/components/AimdVarField.vue +3 -0
- package/src/components/AimdVarTableField.vue +15 -4
- package/src/components/index.ts +2 -0
- package/src/index.ts +10 -1
- package/src/locales.ts +3 -0
- package/src/record/index.ts +2 -0
- package/src/record/validation.ts +61 -0
- package/src/styles/recorder.css +14 -0
- package/src/type-plugins.ts +4 -0
- package/src/types.ts +1 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getAimdRendererQuizTypeLabel as Ab, parseAndExtract as Eb } from "@airalogy/aimd-renderer";
|
|
2
2
|
import { defineComponent as qn, computed as Xe, ref as ye, watch as Pe, openBlock as Z, createBlock as Wc, Teleport as Jp, createElementBlock as ie, withModifiers as ys, createElementVNode as _, normalizeStyle as jr, createTextVNode as fn, toDisplayString as K, Fragment as We, renderList as zn, normalizeClass as ao, withDirectives as Ae, vModelText as qe, createCommentVNode as De, vModelSelect as jl, vModelRadio as Ib, vModelCheckbox as Nb, onMounted as ul, onBeforeUnmount as Gp, inject as jc, createVNode as Lr, provide as Ob, onUnmounted as Yp, h as Se, shallowRef as pi, createApp as Rb, toRef as Db, nextTick as hi, unref as mn, withCtx as _b, vShow as yf } from "vue";
|
|
3
|
-
import { bg as Lb } from "./useVarHelpers-
|
|
3
|
+
import { bg as Lb } from "./useVarHelpers-CQQ-zhL0.js";
|
|
4
4
|
import "./useCodeBlockRendering-D2viVPtA.js";
|
|
5
5
|
import { restoreAimdInlineTemplates as Uc, protectAimdInlineTemplates as Qp } from "@airalogy/aimd-core";
|
|
6
6
|
import { g as Pb } from "./_commonjsHelpers-ByX85dGu.js";
|
|
@@ -250,7 +250,8 @@ const Fb = {
|
|
|
250
250
|
},
|
|
251
251
|
common: {
|
|
252
252
|
emptyValue: "Not set",
|
|
253
|
-
emptyContent: "No renderable protocol content."
|
|
253
|
+
emptyContent: "No renderable protocol content.",
|
|
254
|
+
required: "Required"
|
|
254
255
|
}
|
|
255
256
|
}, $b = {
|
|
256
257
|
scope: {
|
|
@@ -484,7 +485,8 @@ const Fb = {
|
|
|
484
485
|
},
|
|
485
486
|
common: {
|
|
486
487
|
emptyValue: "未填写",
|
|
487
|
-
emptyContent: "没有可渲染的协议内容。"
|
|
488
|
+
emptyContent: "没有可渲染的协议内容。",
|
|
489
|
+
required: "必填"
|
|
488
490
|
}
|
|
489
491
|
}, Hb = {
|
|
490
492
|
"en-US": Fb,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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-
|
|
2
|
+
import { a4 as J } from "./useVarHelpers-CQQ-zhL0.js";
|
|
3
3
|
const O = { class: "aimd-rec-entity-ref" }, W = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "aimd-rec-entity-ref__selected"
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { defineComponent as p, ref as m, watch as V, h as x, computed as l, shallowRef as
|
|
2
|
-
import { g as ne, _ as de } from "./AimdEditor.vue_vue_type_style_index_0_lang-
|
|
3
|
-
import "./useVarHelpers-
|
|
1
|
+
import { defineComponent as p, ref as m, watch as V, h as x, computed as l, shallowRef as ie, onBeforeUnmount as oe, openBlock as r, createElementBlock as n, normalizeStyle as re, normalizeClass as C, createElementVNode as s, toDisplayString as c, unref as v, createBlock as F, createCommentVNode as w, createVNode as E } from "vue";
|
|
2
|
+
import { g as ne, _ as de } from "./AimdEditor.vue_vue_type_style_index_0_lang-DHckC0bq.js";
|
|
3
|
+
import "./useVarHelpers-CQQ-zhL0.js";
|
|
4
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 "./
|
|
9
|
-
const
|
|
8
|
+
import { _ as ve, a as fe } from "./AimdRequiredMarker.vue_vue_type_script_setup_true_lang-B5qDiOZn.js";
|
|
9
|
+
const we = { class: "aimd-field aimd-field--no-style aimd-field__label" }, he = { class: "aimd-field__scope aimd-field__scope--var" }, ke = { class: "aimd-field__id" }, _e = { class: "aimd-markdown-field__header-actions" }, ge = ["aria-label"], pe = ["aria-pressed"], be = ["aria-pressed"], ye = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "aimd-markdown-field__assigner-actions"
|
|
12
|
-
},
|
|
12
|
+
}, Re = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "aimd-markdown-field__assigner-action"
|
|
15
|
-
},
|
|
15
|
+
}, Me = {
|
|
16
16
|
key: 1,
|
|
17
17
|
class: "aimd-markdown-field__assigner-state"
|
|
18
|
-
},
|
|
18
|
+
}, Ve = {
|
|
19
19
|
key: 0,
|
|
20
20
|
class: "aimd-rec-inline__assigner-error aimd-markdown-field__assigner-error"
|
|
21
|
-
},
|
|
21
|
+
}, Ce = { class: "aimd-markdown-field__editor-shell" }, Ee = {
|
|
22
22
|
key: 0,
|
|
23
23
|
class: "aimd-markdown-field__preview-shell"
|
|
24
|
-
},
|
|
24
|
+
}, Se = {
|
|
25
25
|
key: 0,
|
|
26
26
|
class: "aimd-markdown-field__preview-empty"
|
|
27
|
-
},
|
|
27
|
+
}, qe = {
|
|
28
28
|
key: 1,
|
|
29
29
|
class: "aimd-markdown-field__preview-fallback"
|
|
30
|
-
},
|
|
30
|
+
}, Be = {
|
|
31
31
|
key: 2,
|
|
32
32
|
class: "aimd-markdown-field__preview aimd-renderer"
|
|
33
|
-
},
|
|
33
|
+
}, Le = /* @__PURE__ */ p({
|
|
34
34
|
__name: "AimdMarkdownField",
|
|
35
35
|
props: {
|
|
36
36
|
modelValue: { default: void 0 },
|
|
@@ -38,68 +38,69 @@ const fe = { class: "aimd-field aimd-field--no-style aimd-field__label" }, we =
|
|
|
38
38
|
disabled: { type: Boolean, default: !1 },
|
|
39
39
|
locale: { default: void 0 },
|
|
40
40
|
messages: {},
|
|
41
|
+
required: { type: Boolean, default: !1 },
|
|
41
42
|
assignerControl: { default: void 0 },
|
|
42
43
|
assignerStatus: { default: void 0 },
|
|
43
44
|
assignerError: { default: void 0 }
|
|
44
45
|
},
|
|
45
46
|
emits: ["update:modelValue", "blur"],
|
|
46
|
-
setup(a, { emit:
|
|
47
|
-
const d = a, S =
|
|
48
|
-
function
|
|
47
|
+
setup(a, { emit: N }) {
|
|
48
|
+
const d = a, S = N;
|
|
49
|
+
function q(e) {
|
|
49
50
|
return typeof e == "string" ? e : e == null ? "" : String(e);
|
|
50
51
|
}
|
|
51
|
-
function
|
|
52
|
+
function h(e) {
|
|
52
53
|
return e?.toLowerCase().startsWith("zh") ?? !1;
|
|
53
54
|
}
|
|
54
|
-
let
|
|
55
|
-
const
|
|
55
|
+
let z = 0;
|
|
56
|
+
const P = p({
|
|
56
57
|
name: "AimdMarkdownMermaidBlock",
|
|
57
58
|
props: {
|
|
58
59
|
code: { type: String, required: !0 }
|
|
59
60
|
},
|
|
60
61
|
setup(e) {
|
|
61
|
-
const t = m(""),
|
|
62
|
+
const t = m(""), o = m(!1);
|
|
62
63
|
let M = 0;
|
|
63
|
-
async function
|
|
64
|
-
const
|
|
65
|
-
if (!
|
|
66
|
-
t.value = "",
|
|
64
|
+
async function ee() {
|
|
65
|
+
const I = e.code.trim(), A = ++M;
|
|
66
|
+
if (!I) {
|
|
67
|
+
t.value = "", o.value = !1;
|
|
67
68
|
return;
|
|
68
69
|
}
|
|
69
70
|
try {
|
|
70
|
-
const T = (await import("./mermaid.core-
|
|
71
|
+
const T = (await import("./mermaid.core-BeKK51C9.js").then((te) => te.bm)).default;
|
|
71
72
|
T.initialize({
|
|
72
73
|
startOnLoad: !1,
|
|
73
74
|
securityLevel: "strict"
|
|
74
75
|
});
|
|
75
|
-
const
|
|
76
|
-
if (
|
|
76
|
+
const ae = await T.render(`aimd-markdown-mermaid-${++z}`, I);
|
|
77
|
+
if (A !== M)
|
|
77
78
|
return;
|
|
78
|
-
t.value =
|
|
79
|
+
t.value = ae.svg, o.value = !1;
|
|
79
80
|
} catch {
|
|
80
|
-
if (
|
|
81
|
+
if (A !== M)
|
|
81
82
|
return;
|
|
82
|
-
t.value = "",
|
|
83
|
+
t.value = "", o.value = !0;
|
|
83
84
|
}
|
|
84
85
|
}
|
|
85
86
|
return V(() => e.code, () => {
|
|
86
|
-
|
|
87
|
-
}, { immediate: !0 }), () =>
|
|
87
|
+
ee();
|
|
88
|
+
}, { immediate: !0 }), () => o.value ? x("pre", { class: "aimd-markdown-field__mermaid-fallback" }, e.code) : x("div", {
|
|
88
89
|
class: "aimd-markdown-field__mermaid",
|
|
89
90
|
innerHTML: t.value
|
|
90
91
|
});
|
|
91
92
|
}
|
|
92
|
-
}), { preRenderer:
|
|
93
|
+
}), { preRenderer: O } = le(() => {
|
|
93
94
|
R();
|
|
94
|
-
}), b = m(null),
|
|
95
|
-
getInitialValue: () =>
|
|
95
|
+
}), b = m(null), i = m(q(d.modelValue)), k = m(i.value.trim() ? "preview" : "source"), u = me({
|
|
96
|
+
getInitialValue: () => i.value,
|
|
96
97
|
getLayoutElement: () => b.value?.querySelector(".aimd-editor-container"),
|
|
97
98
|
maxHeight: 560
|
|
98
|
-
}), B = u.editorHeight,
|
|
99
|
+
}), B = u.editorHeight, $ = l(() => ({
|
|
99
100
|
"--aimd-markdown-field-editor-height": `${B.value}px`
|
|
100
|
-
})),
|
|
101
|
+
})), _ = ie([]), g = m(!1);
|
|
101
102
|
let y = 0;
|
|
102
|
-
const
|
|
103
|
+
const L = p({
|
|
103
104
|
name: "RenderVNode",
|
|
104
105
|
props: {
|
|
105
106
|
vnode: { type: Object, required: !0 }
|
|
@@ -107,7 +108,7 @@ const fe = { class: "aimd-field aimd-field--no-style aimd-field__label" }, we =
|
|
|
107
108
|
setup(e) {
|
|
108
109
|
return () => e.vnode;
|
|
109
110
|
}
|
|
110
|
-
}),
|
|
111
|
+
}), D = p({
|
|
111
112
|
name: "AimdMarkdownFieldPreviewOutlet",
|
|
112
113
|
props: {
|
|
113
114
|
nodes: {
|
|
@@ -118,64 +119,64 @@ const fe = { class: "aimd-field aimd-field--no-style aimd-field__label" }, we =
|
|
|
118
119
|
setup(e) {
|
|
119
120
|
return () => e.nodes;
|
|
120
121
|
}
|
|
121
|
-
}),
|
|
122
|
+
}), H = l(() => !!i.value.trim()), f = l(() => k.value === "preview"), U = l(() => h(d.locale) ? "预览" : "Preview"), j = l(() => h(d.locale) ? "源码" : "Source"), W = l(() => h(d.locale) ? "暂无内容" : "No content"), Z = l(() => h(d.locale) ? "Markdown 显示模式" : "Markdown view mode"), G = l(() => ({
|
|
122
123
|
minimap: { enabled: !1 },
|
|
123
124
|
lineHeight: u.lineHeight,
|
|
124
125
|
padding: { top: 12, bottom: 12 },
|
|
125
126
|
scrollbar: { vertical: "auto", horizontal: "auto" }
|
|
126
127
|
}));
|
|
127
128
|
async function R() {
|
|
128
|
-
const e =
|
|
129
|
+
const e = i.value.trim(), t = ++y;
|
|
129
130
|
if (!e) {
|
|
130
|
-
|
|
131
|
+
_.value = [], g.value = !1;
|
|
131
132
|
return;
|
|
132
133
|
}
|
|
133
134
|
try {
|
|
134
|
-
const
|
|
135
|
+
const o = await ce(e, {
|
|
135
136
|
locale: d.locale,
|
|
136
137
|
mode: "preview",
|
|
137
138
|
elementRenderers: {
|
|
138
139
|
pre: se(
|
|
139
|
-
ue(
|
|
140
|
-
|
|
140
|
+
ue(P),
|
|
141
|
+
O
|
|
141
142
|
)
|
|
142
143
|
}
|
|
143
144
|
});
|
|
144
145
|
if (t !== y)
|
|
145
146
|
return;
|
|
146
|
-
|
|
147
|
+
_.value = o.nodes, g.value = !1;
|
|
147
148
|
} catch {
|
|
148
149
|
if (t !== y)
|
|
149
150
|
return;
|
|
150
|
-
|
|
151
|
+
_.value = [], g.value = !0;
|
|
151
152
|
}
|
|
152
153
|
}
|
|
153
|
-
function G() {
|
|
154
|
-
h.value = "preview", R();
|
|
155
|
-
}
|
|
156
154
|
function J() {
|
|
157
|
-
|
|
155
|
+
k.value = "preview", R();
|
|
158
156
|
}
|
|
159
|
-
function K(
|
|
160
|
-
|
|
157
|
+
function K() {
|
|
158
|
+
k.value = "source";
|
|
161
159
|
}
|
|
162
160
|
function Q(e) {
|
|
163
|
-
e.
|
|
161
|
+
u.syncEstimatedEditorHeight(e), e !== i.value && (i.value = e, S("update:modelValue", e));
|
|
164
162
|
}
|
|
165
163
|
function X(e) {
|
|
166
|
-
|
|
167
|
-
|
|
164
|
+
e.monaco && u.attachEditor(e.monaco);
|
|
165
|
+
}
|
|
166
|
+
function Y(e) {
|
|
167
|
+
const t = b.value, o = e.relatedTarget;
|
|
168
|
+
!t || o && t.contains(o) || S("blur");
|
|
168
169
|
}
|
|
169
170
|
return V(() => d.modelValue, (e) => {
|
|
170
|
-
const t =
|
|
171
|
-
if (t ===
|
|
171
|
+
const t = q(e);
|
|
172
|
+
if (t === i.value)
|
|
172
173
|
return;
|
|
173
|
-
const
|
|
174
|
-
|
|
174
|
+
const o = H.value;
|
|
175
|
+
i.value = t, u.syncEstimatedEditorHeight(t), !o && t.trim() && (k.value = "preview");
|
|
175
176
|
}), oe(() => {
|
|
176
177
|
u.dispose();
|
|
177
178
|
}), V(
|
|
178
|
-
() => [
|
|
179
|
+
() => [i.value, d.locale],
|
|
179
180
|
() => {
|
|
180
181
|
R();
|
|
181
182
|
},
|
|
@@ -187,50 +188,54 @@ const fe = { class: "aimd-field aimd-field--no-style aimd-field__label" }, we =
|
|
|
187
188
|
"aimd-markdown-field--disabled": a.disabled,
|
|
188
189
|
"aimd-markdown-field--has-assigner-control": a.assignerControl || a.assignerStatus
|
|
189
190
|
}]),
|
|
190
|
-
style:
|
|
191
|
-
onFocusout:
|
|
191
|
+
style: re($.value),
|
|
192
|
+
onFocusout: Y
|
|
192
193
|
}, [
|
|
193
|
-
s("span",
|
|
194
|
-
s("span",
|
|
195
|
-
s("span",
|
|
196
|
-
|
|
194
|
+
s("span", we, [
|
|
195
|
+
s("span", he, c(v(ne)("var", a.messages)), 1),
|
|
196
|
+
s("span", ke, c(a.varId), 1),
|
|
197
|
+
a.required ? (r(), F(ve, {
|
|
198
|
+
key: 0,
|
|
199
|
+
label: a.messages.common?.required || "Required"
|
|
200
|
+
}, null, 8, ["label"])) : w("", !0),
|
|
201
|
+
s("span", _e, [
|
|
197
202
|
s("span", {
|
|
198
203
|
class: "aimd-markdown-field__view-switch",
|
|
199
|
-
"aria-label":
|
|
204
|
+
"aria-label": Z.value
|
|
200
205
|
}, [
|
|
201
206
|
s("button", {
|
|
202
207
|
type: "button",
|
|
203
208
|
class: C(["aimd-markdown-field__view-btn", { "aimd-markdown-field__view-btn--active": f.value }]),
|
|
204
209
|
"aria-pressed": f.value,
|
|
205
|
-
onClick:
|
|
206
|
-
}, c(
|
|
210
|
+
onClick: J
|
|
211
|
+
}, c(U.value), 11, pe),
|
|
207
212
|
s("button", {
|
|
208
213
|
type: "button",
|
|
209
214
|
class: C(["aimd-markdown-field__view-btn", { "aimd-markdown-field__view-btn--active": !f.value }]),
|
|
210
215
|
"aria-pressed": !f.value,
|
|
211
|
-
onClick:
|
|
212
|
-
}, c(
|
|
213
|
-
], 8,
|
|
214
|
-
a.assignerControl || a.assignerStatus ? (r(), n("span",
|
|
215
|
-
a.assignerControl ? (r(), n("span",
|
|
216
|
-
E(v(
|
|
217
|
-
])) :
|
|
218
|
-
a.assignerStatus ? (r(), n("span",
|
|
219
|
-
E(v(
|
|
220
|
-
])) :
|
|
221
|
-
])) :
|
|
216
|
+
onClick: K
|
|
217
|
+
}, c(j.value), 11, be)
|
|
218
|
+
], 8, ge),
|
|
219
|
+
a.assignerControl || a.assignerStatus ? (r(), n("span", ye, [
|
|
220
|
+
a.assignerControl ? (r(), n("span", Re, [
|
|
221
|
+
E(v(L), { vnode: a.assignerControl }, null, 8, ["vnode"])
|
|
222
|
+
])) : w("", !0),
|
|
223
|
+
a.assignerStatus ? (r(), n("span", Me, [
|
|
224
|
+
E(v(L), { vnode: a.assignerStatus }, null, 8, ["vnode"])
|
|
225
|
+
])) : w("", !0)
|
|
226
|
+
])) : w("", !0)
|
|
222
227
|
])
|
|
223
228
|
]),
|
|
224
|
-
a.assignerError ? (r(), n("span",
|
|
225
|
-
s("div",
|
|
226
|
-
f.value ? (r(), n("div",
|
|
227
|
-
|
|
228
|
-
E(v(
|
|
229
|
-
])) : (r(), n("div",
|
|
230
|
-
])) : (r(),
|
|
229
|
+
a.assignerError ? (r(), n("span", Ve, c(a.assignerError), 1)) : w("", !0),
|
|
230
|
+
s("div", Ce, [
|
|
231
|
+
f.value ? (r(), n("div", Ee, [
|
|
232
|
+
H.value ? g.value ? (r(), n("pre", qe, c(i.value), 1)) : (r(), n("div", Be, [
|
|
233
|
+
E(v(D), { nodes: _.value }, null, 8, ["nodes"])
|
|
234
|
+
])) : (r(), n("div", Se, c(W.value), 1))
|
|
235
|
+
])) : (r(), F(v(de), {
|
|
231
236
|
key: 1,
|
|
232
237
|
class: "aimd-markdown-field__editor",
|
|
233
|
-
"model-value":
|
|
238
|
+
"model-value": i.value,
|
|
234
239
|
locale: a.locale,
|
|
235
240
|
mode: "source",
|
|
236
241
|
theme: "aimd-light",
|
|
@@ -242,14 +247,14 @@ const fe = { class: "aimd-field aimd-field--no-style aimd-field__label" }, we =
|
|
|
242
247
|
"keep-inactive-editors-mounted": !1,
|
|
243
248
|
"min-height": v(B),
|
|
244
249
|
readonly: a.disabled,
|
|
245
|
-
"monaco-options":
|
|
246
|
-
"onUpdate:modelValue":
|
|
247
|
-
onReady:
|
|
250
|
+
"monaco-options": G.value,
|
|
251
|
+
"onUpdate:modelValue": Q,
|
|
252
|
+
onReady: X
|
|
248
253
|
}, null, 8, ["model-value", "locale", "show-toolbar", "enable-block-handle", "min-height", "readonly", "monaco-options"]))
|
|
249
254
|
])
|
|
250
255
|
], 38));
|
|
251
256
|
}
|
|
252
|
-
}),
|
|
257
|
+
}), Oe = /* @__PURE__ */ fe(Le, [["__scopeId", "data-v-d423ff72"]]);
|
|
253
258
|
export {
|
|
254
|
-
|
|
259
|
+
Oe as default
|
|
255
260
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
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-
|
|
3
|
-
import "./useVarHelpers-
|
|
2
|
+
import { _ as we } from "./AimdEditor.vue_vue_type_style_index_0_lang-DHckC0bq.js";
|
|
3
|
+
import "./useVarHelpers-CQQ-zhL0.js";
|
|
4
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 {
|
|
8
|
+
import { a as pe } from "./AimdRequiredMarker.vue_vue_type_script_setup_true_lang-B5qDiOZn.js";
|
|
9
9
|
const ke = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "aimd-markdown-note-field__preview-shell"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineComponent as o, openBlock as i, createElementBlock as n } from "vue";
|
|
2
|
+
const _ = (e, a) => {
|
|
3
|
+
const r = e.__vccOpts || e;
|
|
4
|
+
for (const [t, l] of a)
|
|
5
|
+
r[t] = l;
|
|
6
|
+
return r;
|
|
7
|
+
}, c = ["aria-label", "title"], m = /* @__PURE__ */ o({
|
|
8
|
+
__name: "AimdRequiredMarker",
|
|
9
|
+
props: {
|
|
10
|
+
label: {}
|
|
11
|
+
},
|
|
12
|
+
setup(e) {
|
|
13
|
+
return (a, r) => (i(), n("span", {
|
|
14
|
+
class: "aimd-field__required-marker",
|
|
15
|
+
role: "img",
|
|
16
|
+
"data-aimd-required-marker": "true",
|
|
17
|
+
"aria-label": e.label,
|
|
18
|
+
title: e.label
|
|
19
|
+
}, "*", 8, c));
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
export {
|
|
23
|
+
m as _,
|
|
24
|
+
_ as a
|
|
25
|
+
};
|