@airalogy/aimd-recorder 1.18.0 → 1.19.1
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 +44 -0
- package/README.zh-CN.md +44 -0
- package/dist/{AimdDnaSequenceField-KZU2Zj3E.js → AimdDnaSequenceField-TBKunqU_.js} +1 -1
- package/dist/{AimdEditor.vue_vue_type_style_index_0_lang-CzfYPp5r.js → AimdEditor.vue_vue_type_style_index_0_lang-tdh0dJNa.js} +1 -1
- package/dist/{AimdMarkdownField-t2d8uOeU.js → AimdMarkdownField-DmNX2g4j.js} +19 -19
- package/dist/{AimdMarkdownNoteField-_h1oZSwH.js → AimdMarkdownNoteField-B5ruzmwS.js} +19 -19
- package/dist/aimd-recorder.css +1 -1
- package/dist/{arc-DS_ocYoe.js → arc-B-vsgEXF.js} +1 -1
- package/dist/{architectureDiagram-3BPJPVTR-Dq2W8_tb.js → architectureDiagram-3BPJPVTR-BwPNOtNH.js} +2 -2
- package/dist/{blockDiagram-GPEHLZMM-B4hnSAF_.js → blockDiagram-GPEHLZMM-CMUI4kKc.js} +4 -4
- package/dist/{c4Diagram-AAUBKEIU-CbffqNLY.js → c4Diagram-AAUBKEIU-Cpmfsy_s.js} +2 -2
- package/dist/{channel-CtXnYrAk.js → channel-DlMAXHQK.js} +1 -1
- package/dist/{chunk-2J33WTMH-CROScrt5.js → chunk-2J33WTMH-DP9BS2ux.js} +1 -1
- package/dist/{chunk-4BX2VUAB-DTmsQu5_.js → chunk-4BX2VUAB-ncsOeLMb.js} +1 -1
- package/dist/{chunk-55IACEB6-B5wDJzeX.js → chunk-55IACEB6-C7wHk4B7.js} +1 -1
- package/dist/{chunk-727SXJPM-CfyltY6o.js → chunk-727SXJPM-Caa5aVUO.js} +5 -5
- package/dist/{chunk-AQP2D5EJ-B8274EYy.js → chunk-AQP2D5EJ-CL8egKqD.js} +3 -3
- package/dist/{chunk-FMBD7UC4-CT_FK-SH.js → chunk-FMBD7UC4-heVR6BSA.js} +1 -1
- package/dist/{chunk-ND2GUHAM-g9GulPi-.js → chunk-ND2GUHAM-BYH-wC2J.js} +1 -1
- package/dist/{chunk-QZHKN3VN-Di5HEktz.js → chunk-QZHKN3VN-Bx2K7vkq.js} +1 -1
- package/dist/{classDiagram-v2-Q7XG4LA2-BVUr246k.js → classDiagram-4FO5ZUOK-BLLfLYy0.js} +2 -2
- package/dist/{classDiagram-4FO5ZUOK-BVUr246k.js → classDiagram-v2-Q7XG4LA2-BLLfLYy0.js} +2 -2
- package/dist/components.js +2821 -2320
- package/dist/composables.js +95 -93
- package/dist/{cose-bilkent-S5V4N54A-GJ4IOO6v.js → cose-bilkent-S5V4N54A-E1YmM_xr.js} +1 -1
- package/dist/{dagre-BM42HDAG-oL7Br44o.js → dagre-BM42HDAG-BsXpQirH.js} +3 -3
- package/dist/{diagram-2AECGRRQ-DtoCG_N4.js → diagram-2AECGRRQ-CamqbWlY.js} +2 -2
- package/dist/{diagram-5GNKFQAL-f8QNdS7L.js → diagram-5GNKFQAL-DZyRFcOC.js} +3 -3
- package/dist/{diagram-KO2AKTUF-CsJOW_AX.js → diagram-KO2AKTUF-CmkGcy7R.js} +2 -2
- package/dist/{diagram-LMA3HP47-xmEKNZ7y.js → diagram-LMA3HP47-IdDwQPZ-.js} +2 -2
- package/dist/{diagram-OG6HWLK6-unpC7vo8.js → diagram-OG6HWLK6-t0LBcUIU.js} +3 -3
- package/dist/{erDiagram-TEJ5UH35-BGzFnCJD.js → erDiagram-TEJ5UH35-DJBY2iZG.js} +4 -4
- package/dist/{flowDiagram-I6XJVG4X-LBFhDnOs.js → flowDiagram-I6XJVG4X-DE4MzPPk.js} +6 -6
- package/dist/{ganttDiagram-6RSMTGT7-CFBc-jPD.js → ganttDiagram-6RSMTGT7-CmAc35Yw.js} +2 -2
- package/dist/{gitGraphDiagram-PVQCEYII-BLduh-Rb.js → gitGraphDiagram-PVQCEYII-DDQZ5flw.js} +3 -3
- package/dist/{graph-DdlKE625.js → graph-BsJ8-1Pq.js} +1 -1
- package/dist/index.js +112 -109
- package/dist/{infoDiagram-5YYISTIA-CLQQI6zM.js → infoDiagram-5YYISTIA-DSZjFR5g.js} +1 -1
- package/dist/{ishikawaDiagram-YF4QCWOH-CStdYBmW.js → ishikawaDiagram-YF4QCWOH-DCO9dx2L.js} +1 -1
- package/dist/{journeyDiagram-JHISSGLW-B6mRTzoE.js → journeyDiagram-JHISSGLW-b-PpuBqg.js} +4 -4
- package/dist/{kanban-definition-UN3LZRKU-C-vnN5v4.js → kanban-definition-UN3LZRKU-BjclDuJZ.js} +2 -2
- package/dist/{layout-DDt0fz-M.js → layout-D4wqKu72.js} +2 -2
- package/dist/{linear-C-IAFdOt.js → linear-Voc3BJib.js} +1 -1
- package/dist/{mermaid.core-CuZ3nINf.js → mermaid.core-Dt_VbeGP.js} +34 -34
- package/dist/{mindmap-definition-RKZ34NQL-TSZ1Vb3z.js → mindmap-definition-RKZ34NQL-B3vrXRVY.js} +3 -3
- package/dist/{pieDiagram-4H26LBE5-DYok-1-k.js → pieDiagram-4H26LBE5-DFpWxSxk.js} +3 -3
- package/dist/{quadrantDiagram-W4KKPZXB-Cg856sbH.js → quadrantDiagram-W4KKPZXB-BYHcrGoB.js} +2 -2
- package/dist/record.js +1199 -0
- package/dist/{requirementDiagram-4Y6WPE33-BN9fGdlJ.js → requirementDiagram-4Y6WPE33-C-FgWrRz.js} +3 -3
- package/dist/{sankeyDiagram-5OEKKPKP-CDqTgonY.js → sankeyDiagram-5OEKKPKP-IwN0Evji.js} +1 -1
- package/dist/{sequenceDiagram-3UESZ5HK-Chjrc0-W.js → sequenceDiagram-3UESZ5HK-_OnqhBO2.js} +3 -3
- package/dist/{stateDiagram-AJRCARHV-DRyLHrdr.js → stateDiagram-AJRCARHV-BRLv0Zcw.js} +4 -4
- package/dist/{stateDiagram-v2-BHNVJYJU-CZTIDHid.js → stateDiagram-v2-BHNVJYJU-BofX0AdS.js} +2 -2
- package/dist/{timeline-definition-PNZ67QCA-Bc3D9AAG.js → timeline-definition-PNZ67QCA-C-DpPLpw.js} +2 -2
- package/dist/{useCodeBlockRendering-qA6gj4vz.js → useCodeBlockRendering-DoTZaJTW.js} +2170 -3148
- package/dist/{vennDiagram-CIIHVFJN-CYAul48m.js → vennDiagram-CIIHVFJN-zTHQR9Oq.js} +1 -1
- package/dist/{wardleyDiagram-YWT4CUSO-B7Tg0MG9.js → wardleyDiagram-YWT4CUSO-au5koizO.js} +2 -2
- package/dist/{xychartDiagram-2RQKCTM6-xWYVEqth.js → xychartDiagram-2RQKCTM6-BNf12P8z.js} +2 -2
- package/package.json +7 -3
- package/src/__tests__/assigner-graph.test.ts +82 -0
- package/src/__tests__/recorder-assigner-control.test.ts +150 -1
- package/src/__tests__/recorder-editor.test.ts +34 -1
- package/src/__tests__/recorder-wysiwyg-field-host.test.ts +3 -0
- package/src/__tests__/var-field-render.test.ts +87 -0
- package/src/components/AimdAssignerGraph.vue +816 -0
- package/src/components/AimdMarkdownField.vue +8 -0
- package/src/components/AimdRecorder.vue +137 -42
- package/src/components/AimdRecorderEditor.vue +116 -10
- package/src/components/AimdRecorderWysiwygFieldHost.vue +4 -0
- package/src/components/AimdRecorderWysiwygSurface.vue +19 -1
- package/src/components/AimdVarTableField.vue +42 -28
- package/src/components/index.ts +9 -1
- package/src/components/recorderMilkdownPlugin.ts +7 -1
- package/src/composables/__tests__/useVarHelpers.test.ts +42 -0
- package/src/composables/index.ts +1 -0
- package/src/composables/useVarHelpers.ts +87 -250
- package/src/index.ts +7 -1
- package/src/record/index.ts +120 -0
- package/src/styles/aimd.css +230 -3
- package/src/type-utils.ts +1 -3
- package/src/types.ts +37 -0
package/README.md
CHANGED
|
@@ -74,6 +74,37 @@ Client assigners also use these constraints for dependency readiness, so an assi
|
|
|
74
74
|
Use `locale` to switch built-in recorder labels (`en-US` / `zh-CN`).
|
|
75
75
|
`AimdProtocolRecorder` is still available as a deprecated compatibility alias, but new code should use `AimdRecorder`.
|
|
76
76
|
|
|
77
|
+
## Assigner Graph
|
|
78
|
+
|
|
79
|
+
Use `AimdAssignerGraph` to render protocol `assigner_graph` data without depending on an app-specific store or UI framework.
|
|
80
|
+
|
|
81
|
+
```vue
|
|
82
|
+
<script setup lang="ts">
|
|
83
|
+
import { AimdAssignerGraph } from "@airalogy/aimd-recorder"
|
|
84
|
+
import "@airalogy/aimd-recorder/styles"
|
|
85
|
+
|
|
86
|
+
const assignerGraph = {
|
|
87
|
+
nodes: [
|
|
88
|
+
{ name: "seconds", type: "dependent_field" },
|
|
89
|
+
{ name: "calculate_duration", type: "assigner" },
|
|
90
|
+
{ name: "duration", type: "assigned_field" },
|
|
91
|
+
],
|
|
92
|
+
edges: [
|
|
93
|
+
["seconds", "calculate_duration"],
|
|
94
|
+
["calculate_duration", "duration"],
|
|
95
|
+
],
|
|
96
|
+
}
|
|
97
|
+
</script>
|
|
98
|
+
|
|
99
|
+
<template>
|
|
100
|
+
<AimdAssignerGraph
|
|
101
|
+
:assigner-graph="assignerGraph"
|
|
102
|
+
:node-schema-map="{ duration: { title: 'Duration' } }"
|
|
103
|
+
height="520px"
|
|
104
|
+
/>
|
|
105
|
+
</template>
|
|
106
|
+
```
|
|
107
|
+
|
|
77
108
|
## Recorder Editor
|
|
78
109
|
|
|
79
110
|
Use `AimdRecorderEditor` when users need to edit the AIMD protocol structure and fill recorder values in the same screen.
|
|
@@ -129,6 +160,19 @@ If the host prefers the previous fixed-height behavior, disable viewport fitting
|
|
|
129
160
|
/>
|
|
130
161
|
```
|
|
131
162
|
|
|
163
|
+
If the host already owns the available height, such as a route-level flex workspace or split-pane app, put the component in a bounded parent and set `:fill-parent="true"` with `:fit-viewport="false"`. In that mode `AimdRecorderEditor` fills the parent instead of measuring the browser viewport, and the source editor plus recorder side scroll inside their own panels.
|
|
164
|
+
|
|
165
|
+
```vue
|
|
166
|
+
<section class="workspace-pane">
|
|
167
|
+
<AimdRecorderEditor
|
|
168
|
+
v-model="record"
|
|
169
|
+
v-model:content="content"
|
|
170
|
+
:fill-parent="true"
|
|
171
|
+
:fit-viewport="false"
|
|
172
|
+
/>
|
|
173
|
+
</section>
|
|
174
|
+
```
|
|
175
|
+
|
|
132
176
|
`record` shape:
|
|
133
177
|
|
|
134
178
|
```json
|
package/README.zh-CN.md
CHANGED
|
@@ -74,6 +74,37 @@ client assigner 也会用这些约束判断依赖是否就绪,因此依赖的
|
|
|
74
74
|
通过 `locale` 可以切换 recorder 内建标签(`en-US` / `zh-CN`)。
|
|
75
75
|
`AimdProtocolRecorder` 仍保留为已废弃的兼容别名,但新的代码建议直接使用 `AimdRecorder`。
|
|
76
76
|
|
|
77
|
+
## Assigner 拓扑图
|
|
78
|
+
|
|
79
|
+
使用 `AimdAssignerGraph` 可以直接渲染协议中的 `assigner_graph` 数据,不需要绑定宿主应用自己的 store 或 UI 框架。
|
|
80
|
+
|
|
81
|
+
```vue
|
|
82
|
+
<script setup lang="ts">
|
|
83
|
+
import { AimdAssignerGraph } from "@airalogy/aimd-recorder"
|
|
84
|
+
import "@airalogy/aimd-recorder/styles"
|
|
85
|
+
|
|
86
|
+
const assignerGraph = {
|
|
87
|
+
nodes: [
|
|
88
|
+
{ name: "seconds", type: "dependent_field" },
|
|
89
|
+
{ name: "calculate_duration", type: "assigner" },
|
|
90
|
+
{ name: "duration", type: "assigned_field" },
|
|
91
|
+
],
|
|
92
|
+
edges: [
|
|
93
|
+
["seconds", "calculate_duration"],
|
|
94
|
+
["calculate_duration", "duration"],
|
|
95
|
+
],
|
|
96
|
+
}
|
|
97
|
+
</script>
|
|
98
|
+
|
|
99
|
+
<template>
|
|
100
|
+
<AimdAssignerGraph
|
|
101
|
+
:assigner-graph="assignerGraph"
|
|
102
|
+
:node-schema-map="{ duration: { title: '时长' } }"
|
|
103
|
+
height="520px"
|
|
104
|
+
/>
|
|
105
|
+
</template>
|
|
106
|
+
```
|
|
107
|
+
|
|
77
108
|
## Recorder Editor
|
|
78
109
|
|
|
79
110
|
当用户需要在同一个界面里同时修改 AIMD Protocol 结构并继续填写 recorder 数据时,使用 `AimdRecorderEditor`。
|
|
@@ -129,6 +160,19 @@ const record = ref<AimdProtocolRecordData>(createEmptyProtocolRecordData())
|
|
|
129
160
|
/>
|
|
130
161
|
```
|
|
131
162
|
|
|
163
|
+
如果宿主应用本身已经控制了可用高度,比如路由级 flex 工作区或左右分栏页面,可以把组件放进一个有界父容器,并同时设置 `:fill-parent="true"` 和 `:fit-viewport="false"`。这种模式下 `AimdRecorderEditor` 会填满父容器,而不是重新测量浏览器视口;源码编辑器和 recorder 侧都会在自己的面板内部滚动。
|
|
164
|
+
|
|
165
|
+
```vue
|
|
166
|
+
<section class="workspace-pane">
|
|
167
|
+
<AimdRecorderEditor
|
|
168
|
+
v-model="record"
|
|
169
|
+
v-model:content="content"
|
|
170
|
+
:fill-parent="true"
|
|
171
|
+
:fit-viewport="false"
|
|
172
|
+
/>
|
|
173
|
+
</section>
|
|
174
|
+
```
|
|
175
|
+
|
|
132
176
|
`record` 数据结构:
|
|
133
177
|
|
|
134
178
|
```json
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as Om, openBlock as wi, createElementBlock as Ji, Fragment as qg, createElementVNode as wt, toDisplayString as ln, normalizeClass as q0, createCommentVNode as _y, ref as lg, computed as uh, watch as $T, onMounted as NA, onBeforeUnmount as zA, createVNode as eS, unref as dE, renderList as HT, normalizeStyle as DA, createBlock as hE, nextTick as BA } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { serializeDnaSequenceToGenBank as HA, normalizeDnaSequenceName as kT, getDnaSequenceSegmentIssue as kA, normalizeDnaSequenceValue as gE, calculateDnaSequenceGcPercent as UA, collectInvalidDnaSequenceCharacters as vE, getNextDnaSequenceAnnotationId as yE, createEmptyDnaSequenceSegment as mE, createEmptyDnaSequenceQualifier as LA, createEmptyDnaSequenceAnnotation as pE } from "./record.js";
|
|
3
3
|
import { a as GA, c as bE, g as IA, _ as FA } from "./_commonjsHelpers-B5RozER-.js";
|
|
4
4
|
const tC = "dna_annotation";
|
|
5
5
|
function nC(Me, Ze) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getAimdRendererQuizTypeLabel as Tb, parseAndExtract as Mb } from "@airalogy/aimd-renderer";
|
|
2
2
|
import { defineComponent as qn, computed as Xe, ref as ye, watch as Pe, openBlock as Q, createBlock as Wc, Teleport as Kp, createElementBlock as re, withModifiers as ys, createElementVNode as D, normalizeStyle as jr, createTextVNode as hn, toDisplayString as K, Fragment as We, renderList as zn, normalizeClass as ao, withDirectives as Ae, vModelText as qe, createCommentVNode as _e, vModelSelect as jl, vModelRadio as Ab, vModelCheckbox as Eb, onMounted as ul, onBeforeUnmount as Gp, inject as jc, createVNode as Lr, provide as Ib, onUnmounted as Jp, h as Ce, shallowRef as pi, createApp as Nb, toRef as Ob, nextTick as hi, unref as nn, withCtx as Rb, vShow as yf } from "vue";
|
|
3
|
-
import "./useCodeBlockRendering-
|
|
3
|
+
import "./useCodeBlockRendering-DoTZaJTW.js";
|
|
4
4
|
import { restoreAimdInlineTemplates as Uc, protectAimdInlineTemplates as Yp } from "@airalogy/aimd-core";
|
|
5
5
|
import { g as Db } from "./_commonjsHelpers-B5RozER-.js";
|
|
6
6
|
const _b = "en-US";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { g as ne, _ as de } from "./AimdEditor.vue_vue_type_style_index_0_lang-
|
|
3
|
-
import {
|
|
1
|
+
import { defineComponent as g, 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 p, createBlock as re } from "vue";
|
|
2
|
+
import { g as ne, _ as de } from "./AimdEditor.vue_vue_type_style_index_0_lang-tdh0dJNa.js";
|
|
3
|
+
import { R as le, g as se } from "./useCodeBlockRendering-DoTZaJTW.js";
|
|
4
4
|
import "@airalogy/aimd-core";
|
|
5
5
|
import { renderToVue as ce, createMermaidRenderer as ue } from "@airalogy/aimd-renderer";
|
|
6
6
|
import { c as me } from "./useMonacoAutoHeight-D4T-El3J.js";
|
|
7
7
|
import { _ as ve } from "./_commonjsHelpers-B5RozER-.js";
|
|
8
|
-
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"],
|
|
8
|
+
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"], ge = ["aria-pressed"], pe = ["aria-pressed"], be = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "aimd-markdown-field__assigner-actions"
|
|
11
11
|
}, ye = {
|
|
@@ -29,7 +29,7 @@ const fe = { class: "aimd-field aimd-field--no-style aimd-field__label" }, we =
|
|
|
29
29
|
}, Le = {
|
|
30
30
|
key: 2,
|
|
31
31
|
class: "aimd-markdown-field__preview"
|
|
32
|
-
}, Be = /* @__PURE__ */
|
|
32
|
+
}, Be = /* @__PURE__ */ g({
|
|
33
33
|
__name: "AimdMarkdownField",
|
|
34
34
|
props: {
|
|
35
35
|
modelValue: { default: void 0 },
|
|
@@ -51,7 +51,7 @@ const fe = { class: "aimd-field aimd-field--no-style aimd-field__label" }, we =
|
|
|
51
51
|
return e?.toLowerCase().startsWith("zh") ?? !1;
|
|
52
52
|
}
|
|
53
53
|
let N = 0;
|
|
54
|
-
const z =
|
|
54
|
+
const z = g({
|
|
55
55
|
name: "AimdMarkdownMermaidBlock",
|
|
56
56
|
props: {
|
|
57
57
|
code: { type: String, required: !0 }
|
|
@@ -66,12 +66,12 @@ const fe = { class: "aimd-field aimd-field--no-style aimd-field__label" }, we =
|
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
68
|
try {
|
|
69
|
-
const
|
|
70
|
-
|
|
69
|
+
const T = (await import("./mermaid.core-Dt_VbeGP.js").then((ae) => ae.bm)).default;
|
|
70
|
+
T.initialize({
|
|
71
71
|
startOnLoad: !1,
|
|
72
72
|
securityLevel: "strict"
|
|
73
73
|
});
|
|
74
|
-
const ee = await
|
|
74
|
+
const ee = await T.render(`aimd-markdown-mermaid-${++N}`, A);
|
|
75
75
|
if (q !== M)
|
|
76
76
|
return;
|
|
77
77
|
t.value = ee.svg, i.value = !1;
|
|
@@ -83,7 +83,7 @@ const fe = { class: "aimd-field aimd-field--no-style aimd-field__label" }, we =
|
|
|
83
83
|
}
|
|
84
84
|
return V(() => e.code, () => {
|
|
85
85
|
Y();
|
|
86
|
-
}, { immediate: !0 }), () => i.value ?
|
|
86
|
+
}, { immediate: !0 }), () => i.value ? x("pre", { class: "aimd-markdown-field__mermaid-fallback" }, e.code) : x("div", {
|
|
87
87
|
class: "aimd-markdown-field__mermaid",
|
|
88
88
|
innerHTML: t.value
|
|
89
89
|
});
|
|
@@ -98,7 +98,7 @@ const fe = { class: "aimd-field aimd-field--no-style aimd-field__label" }, we =
|
|
|
98
98
|
"--aimd-markdown-field-editor-height": `${B.value}px`
|
|
99
99
|
})), k = te([]), _ = m(!1);
|
|
100
100
|
let y = 0;
|
|
101
|
-
const H =
|
|
101
|
+
const H = g({
|
|
102
102
|
name: "RenderVNode",
|
|
103
103
|
props: {
|
|
104
104
|
vnode: { type: Object, required: !0 }
|
|
@@ -106,7 +106,7 @@ const fe = { class: "aimd-field aimd-field--no-style aimd-field__label" }, we =
|
|
|
106
106
|
setup(e) {
|
|
107
107
|
return () => e.vnode;
|
|
108
108
|
}
|
|
109
|
-
}), $ =
|
|
109
|
+
}), $ = g({
|
|
110
110
|
name: "AimdMarkdownFieldPreviewOutlet",
|
|
111
111
|
props: {
|
|
112
112
|
nodes: {
|
|
@@ -202,25 +202,25 @@ const fe = { class: "aimd-field aimd-field--no-style aimd-field__label" }, we =
|
|
|
202
202
|
class: C(["aimd-markdown-field__view-btn", { "aimd-markdown-field__view-btn--active": f.value }]),
|
|
203
203
|
"aria-pressed": f.value,
|
|
204
204
|
onClick: G
|
|
205
|
-
}, c(D.value), 11,
|
|
205
|
+
}, c(D.value), 11, ge),
|
|
206
206
|
s("button", {
|
|
207
207
|
type: "button",
|
|
208
208
|
class: C(["aimd-markdown-field__view-btn", { "aimd-markdown-field__view-btn--active": !f.value }]),
|
|
209
209
|
"aria-pressed": !f.value,
|
|
210
210
|
onClick: J
|
|
211
|
-
}, c(U.value), 11,
|
|
211
|
+
}, c(U.value), 11, pe)
|
|
212
212
|
], 8, _e),
|
|
213
213
|
a.assignerControl || a.assignerStatus ? (r(), n("span", be, [
|
|
214
214
|
a.assignerControl ? (r(), n("span", ye, [
|
|
215
215
|
E(v(H), { vnode: a.assignerControl }, null, 8, ["vnode"])
|
|
216
|
-
])) :
|
|
216
|
+
])) : p("", !0),
|
|
217
217
|
a.assignerStatus ? (r(), n("span", Re, [
|
|
218
218
|
E(v(H), { vnode: a.assignerStatus }, null, 8, ["vnode"])
|
|
219
|
-
])) :
|
|
220
|
-
])) :
|
|
219
|
+
])) : p("", !0)
|
|
220
|
+
])) : p("", !0)
|
|
221
221
|
])
|
|
222
222
|
]),
|
|
223
|
-
a.assignerError ? (r(), n("span", Me, c(a.assignerError), 1)) :
|
|
223
|
+
a.assignerError ? (r(), n("span", Me, c(a.assignerError), 1)) : p("", !0),
|
|
224
224
|
s("div", Ve, [
|
|
225
225
|
f.value ? (r(), n("div", Ce, [
|
|
226
226
|
I.value ? _.value ? (r(), n("pre", Se, c(o.value), 1)) : (r(), n("div", Le, [
|
|
@@ -248,7 +248,7 @@ const fe = { class: "aimd-field aimd-field--no-style aimd-field__label" }, we =
|
|
|
248
248
|
])
|
|
249
249
|
], 38));
|
|
250
250
|
}
|
|
251
|
-
}), ze = /* @__PURE__ */ ve(Be, [["__scopeId", "data-v-
|
|
251
|
+
}), ze = /* @__PURE__ */ ve(Be, [["__scopeId", "data-v-530714b0"]]);
|
|
252
252
|
export {
|
|
253
253
|
ze as default
|
|
254
254
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
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 {
|
|
2
|
+
import { _ as we } from "./AimdEditor.vue_vue_type_style_index_0_lang-tdh0dJNa.js";
|
|
3
|
+
import { R as he } from "./useCodeBlockRendering-DoTZaJTW.js";
|
|
4
4
|
import "@airalogy/aimd-core";
|
|
5
5
|
import { renderToVue as be } from "@airalogy/aimd-renderer";
|
|
6
6
|
import { c as _e } from "./useMonacoAutoHeight-D4T-El3J.js";
|
|
@@ -21,11 +21,11 @@ const ke = {
|
|
|
21
21
|
}, Ce = {
|
|
22
22
|
key: 1,
|
|
23
23
|
class: "aimd-markdown-note-field__editor-shell"
|
|
24
|
-
}, Fe = { class: "aimd-markdown-note-field__editor-actions" }, Se = ["aria-label"],
|
|
24
|
+
}, Fe = { class: "aimd-markdown-note-field__editor-actions" }, Se = ["aria-label"], He = ["disabled"], Te = {
|
|
25
25
|
type: "button",
|
|
26
26
|
class: "aimd-markdown-note-field__view-btn aimd-markdown-note-field__view-btn--active",
|
|
27
27
|
"aria-pressed": "true"
|
|
28
|
-
},
|
|
28
|
+
}, xe = {
|
|
29
29
|
key: 2,
|
|
30
30
|
class: "aimd-markdown-note-field__empty"
|
|
31
31
|
}, Me = /* @__PURE__ */ K({
|
|
@@ -55,7 +55,7 @@ const ke = {
|
|
|
55
55
|
})), d = h(!1), _ = re([]), p = h(!1);
|
|
56
56
|
let C = 0, v = null, w = null, k = !1, F = !1;
|
|
57
57
|
const { preRenderer: Z } = he(() => {
|
|
58
|
-
|
|
58
|
+
H();
|
|
59
59
|
}), c = a(() => !!n.value.trim()), S = a(() => c.value && !d.value), y = a(() => !t.disabled && (!c.value || d.value)), j = a(() => !S.value && !y.value), J = a(() => f(t.locale) ? "关闭备注" : "Close note"), Q = a(() => f(t.locale) ? "暂无备注" : "No notes"), L = a(() => f(t.locale) ? "预览" : "Preview"), A = a(() => f(t.locale) ? "源码" : "Source"), I = a(() => f(t.locale) ? "备注显示模式" : "Note view mode"), X = a(() => ({
|
|
60
60
|
minimap: { enabled: !1 },
|
|
61
61
|
lineHeight: u.lineHeight,
|
|
@@ -83,7 +83,7 @@ const ke = {
|
|
|
83
83
|
function ee(e) {
|
|
84
84
|
u.syncEstimatedEditorHeight(e), e !== n.value && (n.value = e, b("update:modelValue", e));
|
|
85
85
|
}
|
|
86
|
-
async function
|
|
86
|
+
async function H() {
|
|
87
87
|
const e = n.value.trim(), o = ++C;
|
|
88
88
|
if (!e) {
|
|
89
89
|
_.value = [], p.value = !1;
|
|
@@ -105,29 +105,29 @@ const ke = {
|
|
|
105
105
|
_.value = [], p.value = !0;
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
async function
|
|
108
|
+
async function T() {
|
|
109
109
|
t.disabled || (O(), d.value = !0, await D());
|
|
110
110
|
}
|
|
111
111
|
function te() {
|
|
112
|
-
c.value && (O(), d.value = !1,
|
|
112
|
+
c.value && (O(), d.value = !1, H());
|
|
113
113
|
}
|
|
114
114
|
function oe() {
|
|
115
|
-
|
|
115
|
+
x(), g(), d.value = !1, b("close"), b("blur");
|
|
116
116
|
}
|
|
117
117
|
function ae(e) {
|
|
118
|
-
t.disabled || e.target instanceof Element && e.target.closest("a, button, input, textarea, select, summary, details") ||
|
|
118
|
+
t.disabled || e.target instanceof Element && e.target.closest("a, button, input, textarea, select, summary, details") || T();
|
|
119
119
|
}
|
|
120
120
|
function ie(e) {
|
|
121
|
-
t.disabled || e.key !== "Enter" && e.key !== " " || (e.preventDefault(),
|
|
121
|
+
t.disabled || e.key !== "Enter" && e.key !== " " || (e.preventDefault(), T());
|
|
122
122
|
}
|
|
123
123
|
function g() {
|
|
124
124
|
v && (clearTimeout(v), v = null);
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function x() {
|
|
127
127
|
w && (clearTimeout(w), w = null), k = !1;
|
|
128
128
|
}
|
|
129
129
|
function O() {
|
|
130
|
-
|
|
130
|
+
x(), k = !0, w = setTimeout(() => {
|
|
131
131
|
w = null, k = !1;
|
|
132
132
|
}, 80);
|
|
133
133
|
}
|
|
@@ -158,7 +158,7 @@ const ke = {
|
|
|
158
158
|
}), R(
|
|
159
159
|
() => [n.value, t.locale],
|
|
160
160
|
() => {
|
|
161
|
-
z(),
|
|
161
|
+
z(), H();
|
|
162
162
|
},
|
|
163
163
|
{ immediate: !0 }
|
|
164
164
|
), R(() => t.disabled, () => {
|
|
@@ -166,7 +166,7 @@ const ke = {
|
|
|
166
166
|
}), R(y, (e) => {
|
|
167
167
|
e && !t.disabled && D();
|
|
168
168
|
}, { immediate: !0 }), se(() => {
|
|
169
|
-
g(),
|
|
169
|
+
g(), x(), u.dispose();
|
|
170
170
|
}), (e, o) => (r(), m("div", {
|
|
171
171
|
ref_key: "fieldRootRef",
|
|
172
172
|
ref: V,
|
|
@@ -192,7 +192,7 @@ const ke = {
|
|
|
192
192
|
type: "button",
|
|
193
193
|
class: "aimd-markdown-note-field__view-btn aimd-markdown-note-field__view-btn--source",
|
|
194
194
|
"aria-pressed": "false",
|
|
195
|
-
onClick:
|
|
195
|
+
onClick: T
|
|
196
196
|
}, s(A.value), 1)
|
|
197
197
|
], 8, ge)
|
|
198
198
|
])),
|
|
@@ -221,8 +221,8 @@ const ke = {
|
|
|
221
221
|
disabled: !c.value,
|
|
222
222
|
"aria-pressed": "false",
|
|
223
223
|
onClick: te
|
|
224
|
-
}, s(L.value), 9,
|
|
225
|
-
l("button",
|
|
224
|
+
}, s(L.value), 9, He),
|
|
225
|
+
l("button", Te, s(A.value), 1)
|
|
226
226
|
], 8, Se),
|
|
227
227
|
l("button", {
|
|
228
228
|
type: "button",
|
|
@@ -250,7 +250,7 @@ const ke = {
|
|
|
250
250
|
"onUpdate:modelValue": ee,
|
|
251
251
|
onReady: ne
|
|
252
252
|
}, null, 8, ["model-value", "locale", "show-toolbar", "enable-block-handle", "min-height", "readonly", "monaco-options"])
|
|
253
|
-
])) : (r(), m("div",
|
|
253
|
+
])) : (r(), m("div", xe, s(Q.value), 1))
|
|
254
254
|
], 38));
|
|
255
255
|
}
|
|
256
256
|
}), Oe = /* @__PURE__ */ pe(Me, [["__scopeId", "data-v-25a9e4e8"]]);
|