@airalogy/aimd-recorder 1.20.0 → 1.22.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 +5 -0
- package/README.zh-CN.md +5 -0
- package/dist/{AimdCodeField-BQUuM-EF.js → AimdCodeField-BN_0UQMx.js} +34 -32
- package/dist/{AimdDnaSequenceField-Cp0cgBYl.js → AimdDnaSequenceField-Bhj28fP8.js} +1 -1
- package/dist/{AimdEditor.vue_vue_type_style_index_0_lang-DTdcoNs1.js → AimdEditor.vue_vue_type_style_index_0_lang-D7c01UqN.js} +1040 -976
- package/dist/{AimdMarkdownField-D4AEz_mB.js → AimdMarkdownField-GS15pv4z.js} +4 -4
- package/dist/{AimdMarkdownNoteField-CSGaShKi.js → AimdMarkdownNoteField-H9WP8tR6.js} +15 -15
- package/dist/aimd-recorder.css +1 -1
- package/dist/{arc-jL17V0L2.js → arc-B50G9-kH.js} +1 -1
- package/dist/{architectureDiagram-3BPJPVTR-CijadmFI.js → architectureDiagram-3BPJPVTR-D9mBEbpY.js} +2 -2
- package/dist/{blockDiagram-GPEHLZMM-BPqvb85_.js → blockDiagram-GPEHLZMM-Cs4swgto.js} +4 -4
- package/dist/{c4Diagram-AAUBKEIU-i4fqlMXu.js → c4Diagram-AAUBKEIU-C12HKS3r.js} +2 -2
- package/dist/{channel-DnnUQTdl.js → channel-D69VnjVz.js} +1 -1
- package/dist/{chunk-2J33WTMH-DKKEpdr1.js → chunk-2J33WTMH-oc-89G5c.js} +1 -1
- package/dist/{chunk-4BX2VUAB-WvuuiYYH.js → chunk-4BX2VUAB-BDJS9G3r.js} +1 -1
- package/dist/{chunk-55IACEB6-B_UkHTnd.js → chunk-55IACEB6-BPl3uHcA.js} +1 -1
- package/dist/{chunk-727SXJPM-CR6Pb04P.js → chunk-727SXJPM-pWe-vDGf.js} +5 -5
- package/dist/{chunk-AQP2D5EJ-B68Ie417.js → chunk-AQP2D5EJ-D-R5sIr1.js} +3 -3
- package/dist/{chunk-FMBD7UC4-CeCGT6rb.js → chunk-FMBD7UC4-bo6Qyom1.js} +1 -1
- package/dist/{chunk-ND2GUHAM-BYN-eC_q.js → chunk-ND2GUHAM-DQMvtYV7.js} +1 -1
- package/dist/{chunk-QZHKN3VN-BNSp120j.js → chunk-QZHKN3VN-DlCn3HON.js} +1 -1
- package/dist/{classDiagram-v2-Q7XG4LA2-Cgbn4w3f.js → classDiagram-4FO5ZUOK-DzUwWFwr.js} +2 -2
- package/dist/{classDiagram-4FO5ZUOK-Cgbn4w3f.js → classDiagram-v2-Q7XG4LA2-DzUwWFwr.js} +2 -2
- package/dist/components.js +3757 -2910
- package/dist/composables.js +84 -80
- package/dist/{cose-bilkent-S5V4N54A-TfrsQ2c3.js → cose-bilkent-S5V4N54A-BXLMzfpO.js} +1 -1
- package/dist/{dagre-BM42HDAG-BAyvB_JI.js → dagre-BM42HDAG-DHnofIh9.js} +3 -3
- package/dist/{diagram-2AECGRRQ-Bijq8bHO.js → diagram-2AECGRRQ-BqTTVPsm.js} +2 -2
- package/dist/{diagram-5GNKFQAL-B3ZuTuxm.js → diagram-5GNKFQAL-D5p1UVbw.js} +3 -3
- package/dist/{diagram-KO2AKTUF-DrqLeGCI.js → diagram-KO2AKTUF-Uuoz9cFn.js} +2 -2
- package/dist/{diagram-LMA3HP47-CCSQH8O0.js → diagram-LMA3HP47-W001U31X.js} +2 -2
- package/dist/{diagram-OG6HWLK6-DM5cUEjW.js → diagram-OG6HWLK6-DL516LDr.js} +3 -3
- package/dist/{erDiagram-TEJ5UH35-DQhmDdAF.js → erDiagram-TEJ5UH35-CCxgMb67.js} +4 -4
- package/dist/{flowDiagram-I6XJVG4X-DrqiPSHI.js → flowDiagram-I6XJVG4X-nXGdmC0O.js} +6 -6
- package/dist/{ganttDiagram-6RSMTGT7-DpX_Y2vA.js → ganttDiagram-6RSMTGT7-Bi9Ro7_Z.js} +2 -2
- package/dist/{gitGraphDiagram-PVQCEYII-3isOhIyZ.js → gitGraphDiagram-PVQCEYII-w1kNAy4E.js} +3 -3
- package/dist/{graph-C30SJlSk.js → graph-CpOkL_eZ.js} +1 -1
- package/dist/{index-Dtvv88SS.js → index-Dkrf2LJl.js} +51 -51
- package/dist/index.js +62 -58
- package/dist/{infoDiagram-5YYISTIA-Cr_MlPvz.js → infoDiagram-5YYISTIA-Bde_w9T1.js} +1 -1
- package/dist/{ishikawaDiagram-YF4QCWOH-DydyFn3h.js → ishikawaDiagram-YF4QCWOH-x5M1KR0l.js} +1 -1
- package/dist/{journeyDiagram-JHISSGLW-V_5MmeOu.js → journeyDiagram-JHISSGLW-CIDQP8Zm.js} +4 -4
- package/dist/{kanban-definition-UN3LZRKU-C_XXCuvp.js → kanban-definition-UN3LZRKU-CKgO7sG8.js} +2 -2
- package/dist/{layout-85j-z7Lr.js → layout-BZYprqYR.js} +2 -2
- package/dist/{linear-DMtodz-6.js → linear-ClSH2F_v.js} +1 -1
- package/dist/{mermaid.core-CkanUCyS.js → mermaid.core-CcRV6K2R.js} +34 -34
- package/dist/{mindmap-definition-RKZ34NQL-CyikmuF2.js → mindmap-definition-RKZ34NQL-s3h6uszV.js} +3 -3
- package/dist/{pieDiagram-4H26LBE5-CesqzEGg.js → pieDiagram-4H26LBE5-CgiazyWv.js} +3 -3
- package/dist/{quadrantDiagram-W4KKPZXB-BsPKPfNd.js → quadrantDiagram-W4KKPZXB-DCPVgHoW.js} +2 -2
- package/dist/record.js +19 -19
- package/dist/{requirementDiagram-4Y6WPE33-BwB1tQvi.js → requirementDiagram-4Y6WPE33-DE6F9oSB.js} +3 -3
- package/dist/{sankeyDiagram-5OEKKPKP-CfSNbWMY.js → sankeyDiagram-5OEKKPKP-DZZoFFr-.js} +1 -1
- package/dist/{sequenceDiagram-3UESZ5HK-DZZlUNys.js → sequenceDiagram-3UESZ5HK-DaYEOl60.js} +3 -3
- package/dist/{stateDiagram-AJRCARHV-DNJmz_op.js → stateDiagram-AJRCARHV-BmgpHJlH.js} +4 -4
- package/dist/{stateDiagram-v2-BHNVJYJU-DVfDNM6l.js → stateDiagram-v2-BHNVJYJU-D49CHQD6.js} +2 -2
- package/dist/{timeline-definition-PNZ67QCA-DEUCAg_N.js → timeline-definition-PNZ67QCA-DdVLoCkC.js} +2 -2
- package/dist/{useCodeBlockRendering-DF6zm7nf.js → useCodeBlockRendering-CCuoP52e.js} +1241 -1074
- package/dist/{vennDiagram-CIIHVFJN-DVDP__od.js → vennDiagram-CIIHVFJN-CCcMKcd7.js} +1 -1
- package/dist/{wardleyDiagram-YWT4CUSO-sEtxBd33.js → wardleyDiagram-YWT4CUSO-R4UGgGWY.js} +2 -2
- package/dist/{xychartDiagram-2RQKCTM6-DM8QeR5M.js → xychartDiagram-2RQKCTM6-DyFhCubk.js} +2 -2
- package/package.json +3 -3
- package/src/__tests__/record-search-render.test.ts +108 -0
- package/src/__tests__/recorder-assigner-control.test.ts +4 -1
- package/src/__tests__/var-field-render.test.ts +556 -43
- package/src/components/AimdCodeField.vue +11 -3
- package/src/components/AimdQuizRecorder.vue +3 -1
- package/src/components/AimdRecorder.vue +52 -1882
- package/src/components/AimdRecorderSearchToolbar.vue +258 -0
- package/src/components/AimdVarField.vue +589 -17
- package/src/components/AimdVarTableField.vue +12 -6
- package/src/components/index.ts +1 -0
- package/src/composables/__tests__/useVarHelpers.test.ts +214 -7
- package/src/composables/index.ts +6 -0
- package/src/composables/useFieldRendering.ts +28 -0
- package/src/composables/useRecordSearch.ts +299 -0
- package/src/composables/useVarHelpers.ts +285 -14
- package/src/locales.ts +96 -0
- package/src/styles/recorder-surface.css +2374 -0
- package/src/styles/recorder.css +1 -0
- package/src/types.ts +1 -1
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { nextTick, ref, watch } from "vue"
|
|
3
|
+
import type { AimdRecordFieldRef } from "@airalogy/aimd-core/utils"
|
|
4
|
+
import type { AimdRecorderMessages } from "../locales"
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{
|
|
7
|
+
fieldKey: string
|
|
8
|
+
fieldRefs: AimdRecordFieldRef[]
|
|
9
|
+
matchCount: number
|
|
10
|
+
messages: AimdRecorderMessages
|
|
11
|
+
panelVisible: boolean
|
|
12
|
+
query: string
|
|
13
|
+
resultLabel: string
|
|
14
|
+
}>()
|
|
15
|
+
|
|
16
|
+
const emit = defineEmits<{
|
|
17
|
+
(event: "clear"): void
|
|
18
|
+
(event: "collapse"): void
|
|
19
|
+
(event: "expand"): void
|
|
20
|
+
(event: "next"): void
|
|
21
|
+
(event: "previous"): void
|
|
22
|
+
(event: "update:fieldKey", value: string): void
|
|
23
|
+
(event: "update:query", value: string): void
|
|
24
|
+
}>()
|
|
25
|
+
|
|
26
|
+
const searchInputRef = ref<HTMLInputElement | null>(null)
|
|
27
|
+
|
|
28
|
+
watch(
|
|
29
|
+
() => props.panelVisible,
|
|
30
|
+
async (panelVisible) => {
|
|
31
|
+
if (!panelVisible) {
|
|
32
|
+
return
|
|
33
|
+
}
|
|
34
|
+
await nextTick()
|
|
35
|
+
searchInputRef.value?.focus()
|
|
36
|
+
},
|
|
37
|
+
)
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<template>
|
|
41
|
+
<div
|
|
42
|
+
class="aimd-protocol-recorder__search-shell"
|
|
43
|
+
:class="{ 'aimd-protocol-recorder__search-shell--expanded': panelVisible }"
|
|
44
|
+
>
|
|
45
|
+
<button
|
|
46
|
+
v-if="!panelVisible"
|
|
47
|
+
type="button"
|
|
48
|
+
class="aimd-protocol-recorder__search-toggle"
|
|
49
|
+
data-rec-search-toggle
|
|
50
|
+
:aria-label="messages.search.label"
|
|
51
|
+
@click="emit('expand')"
|
|
52
|
+
>
|
|
53
|
+
{{ messages.search.label }}
|
|
54
|
+
</button>
|
|
55
|
+
<div v-else class="aimd-protocol-recorder__search">
|
|
56
|
+
<select
|
|
57
|
+
class="aimd-protocol-recorder__search-field"
|
|
58
|
+
:aria-label="messages.search.fieldLabel"
|
|
59
|
+
:value="fieldKey"
|
|
60
|
+
@change="emit('update:fieldKey', ($event.target as HTMLSelectElement).value)"
|
|
61
|
+
>
|
|
62
|
+
<option value="">{{ messages.search.allFields }}</option>
|
|
63
|
+
<option
|
|
64
|
+
v-for="field in fieldRefs"
|
|
65
|
+
:key="field.key"
|
|
66
|
+
:value="field.key"
|
|
67
|
+
>
|
|
68
|
+
{{ field.label }}
|
|
69
|
+
</option>
|
|
70
|
+
</select>
|
|
71
|
+
<input
|
|
72
|
+
ref="searchInputRef"
|
|
73
|
+
class="aimd-protocol-recorder__search-input"
|
|
74
|
+
type="search"
|
|
75
|
+
:value="query"
|
|
76
|
+
:placeholder="messages.search.placeholder"
|
|
77
|
+
:aria-label="messages.search.label"
|
|
78
|
+
@input="emit('update:query', ($event.target as HTMLInputElement).value)"
|
|
79
|
+
@keydown.enter.prevent="emit('next')"
|
|
80
|
+
>
|
|
81
|
+
<span v-if="resultLabel" class="aimd-protocol-recorder__search-count">
|
|
82
|
+
{{ resultLabel }}
|
|
83
|
+
</span>
|
|
84
|
+
<button
|
|
85
|
+
type="button"
|
|
86
|
+
class="aimd-protocol-recorder__search-button"
|
|
87
|
+
:disabled="matchCount === 0"
|
|
88
|
+
:aria-label="messages.search.previous"
|
|
89
|
+
:title="messages.search.previous"
|
|
90
|
+
@click="emit('previous')"
|
|
91
|
+
>
|
|
92
|
+
<
|
|
93
|
+
</button>
|
|
94
|
+
<button
|
|
95
|
+
type="button"
|
|
96
|
+
class="aimd-protocol-recorder__search-button"
|
|
97
|
+
:disabled="matchCount === 0"
|
|
98
|
+
:aria-label="messages.search.next"
|
|
99
|
+
:title="messages.search.next"
|
|
100
|
+
@click="emit('next')"
|
|
101
|
+
>
|
|
102
|
+
>
|
|
103
|
+
</button>
|
|
104
|
+
<button
|
|
105
|
+
v-if="query || fieldKey"
|
|
106
|
+
type="button"
|
|
107
|
+
class="aimd-protocol-recorder__search-button aimd-protocol-recorder__search-button--clear"
|
|
108
|
+
:aria-label="messages.search.clear"
|
|
109
|
+
:title="messages.search.clear"
|
|
110
|
+
@click="emit('clear')"
|
|
111
|
+
>
|
|
112
|
+
x
|
|
113
|
+
</button>
|
|
114
|
+
<button
|
|
115
|
+
v-else
|
|
116
|
+
type="button"
|
|
117
|
+
class="aimd-protocol-recorder__search-button aimd-protocol-recorder__search-button--collapse"
|
|
118
|
+
data-rec-search-collapse
|
|
119
|
+
:aria-label="messages.search.collapse"
|
|
120
|
+
:title="messages.search.collapse"
|
|
121
|
+
@click="emit('collapse')"
|
|
122
|
+
>
|
|
123
|
+
{{ messages.search.collapse }}
|
|
124
|
+
</button>
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
</template>
|
|
128
|
+
|
|
129
|
+
<style scoped>
|
|
130
|
+
.aimd-protocol-recorder__search-shell {
|
|
131
|
+
position: sticky;
|
|
132
|
+
top: var(--aimd-recorder-search-sticky-top, 0px);
|
|
133
|
+
z-index: 30;
|
|
134
|
+
display: flex;
|
|
135
|
+
justify-content: flex-end;
|
|
136
|
+
box-sizing: border-box;
|
|
137
|
+
margin-inline: calc(-1 * var(--aimd-recorder-gutter-x));
|
|
138
|
+
margin-bottom: 0;
|
|
139
|
+
padding: 0 var(--aimd-recorder-gutter-x);
|
|
140
|
+
background: transparent;
|
|
141
|
+
pointer-events: none;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.aimd-protocol-recorder__search-shell--expanded {
|
|
145
|
+
justify-content: stretch;
|
|
146
|
+
margin-bottom: 8px;
|
|
147
|
+
padding-block: 0;
|
|
148
|
+
padding-inline: var(--aimd-recorder-gutter-x);
|
|
149
|
+
border: 1px solid #d8e4f2;
|
|
150
|
+
border-radius: 0 0 10px 10px;
|
|
151
|
+
background: #f8fbff;
|
|
152
|
+
backdrop-filter: blur(4px);
|
|
153
|
+
box-shadow: 0 1px 0 rgba(23, 45, 77, 0.06);
|
|
154
|
+
pointer-events: auto;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.aimd-protocol-recorder__search {
|
|
158
|
+
display: flex;
|
|
159
|
+
flex: 1 1 auto;
|
|
160
|
+
flex-wrap: wrap;
|
|
161
|
+
align-items: center;
|
|
162
|
+
gap: 8px;
|
|
163
|
+
padding: 8px;
|
|
164
|
+
border: 0;
|
|
165
|
+
border-radius: 0;
|
|
166
|
+
background: transparent;
|
|
167
|
+
box-shadow: none;
|
|
168
|
+
pointer-events: auto;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.aimd-protocol-recorder__search-toggle {
|
|
172
|
+
display: inline-flex;
|
|
173
|
+
align-items: center;
|
|
174
|
+
justify-content: center;
|
|
175
|
+
min-height: 32px;
|
|
176
|
+
padding: 0 12px;
|
|
177
|
+
border: 1px solid #c8d4e3;
|
|
178
|
+
border-radius: 8px;
|
|
179
|
+
background: #fff;
|
|
180
|
+
color: #0b63c7;
|
|
181
|
+
font: inherit;
|
|
182
|
+
font-weight: 700;
|
|
183
|
+
cursor: pointer;
|
|
184
|
+
box-shadow: 0 2px 8px rgba(23, 45, 77, 0.06);
|
|
185
|
+
pointer-events: auto;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.aimd-protocol-recorder__search-field,
|
|
189
|
+
.aimd-protocol-recorder__search-input {
|
|
190
|
+
min-height: 32px;
|
|
191
|
+
border: 1px solid #c8d4e3;
|
|
192
|
+
border-radius: 8px;
|
|
193
|
+
background: #fff;
|
|
194
|
+
color: var(--rec-text);
|
|
195
|
+
font: inherit;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.aimd-protocol-recorder__search-field {
|
|
199
|
+
max-width: min(240px, 100%);
|
|
200
|
+
padding: 0 28px 0 10px;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.aimd-protocol-recorder__search-input {
|
|
204
|
+
flex: 1 1 240px;
|
|
205
|
+
min-width: min(220px, 100%);
|
|
206
|
+
padding: 0 10px;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.aimd-protocol-recorder__search-field:focus,
|
|
210
|
+
.aimd-protocol-recorder__search-input:focus,
|
|
211
|
+
.aimd-protocol-recorder__search-toggle:focus,
|
|
212
|
+
.aimd-protocol-recorder__search-button:focus {
|
|
213
|
+
outline: 2px solid color-mix(in srgb, var(--rec-focus) 26%, transparent);
|
|
214
|
+
outline-offset: 1px;
|
|
215
|
+
border-color: #75b7ff;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.aimd-protocol-recorder__search-count {
|
|
219
|
+
min-width: 72px;
|
|
220
|
+
color: var(--rec-muted);
|
|
221
|
+
font-size: 12px;
|
|
222
|
+
font-weight: 600;
|
|
223
|
+
text-align: center;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.aimd-protocol-recorder__search-button {
|
|
227
|
+
display: inline-flex;
|
|
228
|
+
align-items: center;
|
|
229
|
+
justify-content: center;
|
|
230
|
+
width: 32px;
|
|
231
|
+
height: 32px;
|
|
232
|
+
border: 1px solid #c8d4e3;
|
|
233
|
+
border-radius: 8px;
|
|
234
|
+
background: #fff;
|
|
235
|
+
color: #0b63c7;
|
|
236
|
+
font: inherit;
|
|
237
|
+
font-weight: 700;
|
|
238
|
+
cursor: pointer;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.aimd-protocol-recorder__search-button:disabled {
|
|
242
|
+
color: #98a2b3;
|
|
243
|
+
cursor: default;
|
|
244
|
+
opacity: 0.65;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.aimd-protocol-recorder__search-button--clear {
|
|
248
|
+
color: #475467;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.aimd-protocol-recorder__search-button--collapse {
|
|
252
|
+
width: auto;
|
|
253
|
+
min-width: 48px;
|
|
254
|
+
padding: 0 10px;
|
|
255
|
+
color: #475467;
|
|
256
|
+
font-size: 12px;
|
|
257
|
+
}
|
|
258
|
+
</style>
|