@airalogy/aimd-recorder 1.16.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.
- package/README.md +11 -10
- package/README.zh-CN.md +11 -10
- package/dist/AimdCodeField-BQUuM-EF.js +182 -0
- package/dist/{AimdDnaSequenceField-CPyMqIVh.js → AimdDnaSequenceField-KZU2Zj3E.js} +2 -2
- package/dist/{AimdEditor.vue_vue_type_style_index_0_lang-lyHIpch9.js → AimdEditor.vue_vue_type_style_index_0_lang-CzfYPp5r.js} +3924 -3831
- package/dist/AimdMarkdownField-t2d8uOeU.js +254 -0
- package/dist/AimdMarkdownNoteField-_h1oZSwH.js +259 -0
- package/dist/{_commonjsHelpers-CZXJ37nu.js → _commonjsHelpers-B5RozER-.js} +2 -2
- package/dist/aimd-recorder.css +1 -1
- package/dist/arc-DS_ocYoe.js +83 -0
- package/dist/architectureDiagram-3BPJPVTR-Dq2W8_tb.js +4692 -0
- package/dist/blockDiagram-GPEHLZMM-B4hnSAF_.js +2425 -0
- package/dist/c4Diagram-AAUBKEIU-CbffqNLY.js +1577 -0
- package/dist/channel-CtXnYrAk.js +5 -0
- package/dist/chunk-2J33WTMH-CROScrt5.js +19 -0
- package/dist/chunk-4BX2VUAB-DTmsQu5_.js +8 -0
- package/dist/chunk-55IACEB6-B5wDJzeX.js +8 -0
- package/dist/chunk-727SXJPM-CfyltY6o.js +1528 -0
- package/dist/chunk-AQP2D5EJ-B8274EYy.js +1387 -0
- package/dist/chunk-FMBD7UC4-CT_FK-SH.js +19 -0
- package/dist/chunk-ND2GUHAM-g9GulPi-.js +68 -0
- package/dist/chunk-QZHKN3VN-Di5HEktz.js +15 -0
- package/dist/classDiagram-4FO5ZUOK-BVUr246k.js +16 -0
- package/dist/classDiagram-v2-Q7XG4LA2-BVUr246k.js +16 -0
- package/dist/components.js +3365 -2216
- package/dist/composables.js +92 -68
- package/dist/cose-bilkent-S5V4N54A-GJ4IOO6v.js +2609 -0
- package/dist/cytoscape.esm-r59gEWFs.js +18710 -0
- package/dist/dagre-BM42HDAG-oL7Br44o.js +445 -0
- package/dist/defaultLocale-BgPVtth8.js +171 -0
- package/dist/diagram-2AECGRRQ-DtoCG_N4.js +217 -0
- package/dist/diagram-5GNKFQAL-f8QNdS7L.js +123 -0
- package/dist/diagram-KO2AKTUF-CsJOW_AX.js +461 -0
- package/dist/diagram-LMA3HP47-xmEKNZ7y.js +142 -0
- package/dist/diagram-OG6HWLK6-unpC7vo8.js +528 -0
- package/dist/erDiagram-TEJ5UH35-BGzFnCJD.js +899 -0
- package/dist/flowDiagram-I6XJVG4X-LBFhDnOs.js +1628 -0
- package/dist/ganttDiagram-6RSMTGT7-CFBc-jPD.js +2707 -0
- package/dist/gitGraphDiagram-PVQCEYII-BLduh-Rb.js +815 -0
- package/dist/graph-DdlKE625.js +1510 -0
- package/dist/index.js +104 -80
- package/dist/infoDiagram-5YYISTIA-CLQQI6zM.js +24 -0
- package/dist/init-DjUOC4st.js +16 -0
- package/dist/ishikawaDiagram-YF4QCWOH-CStdYBmW.js +621 -0
- package/dist/journeyDiagram-JHISSGLW-B6mRTzoE.js +834 -0
- package/dist/kanban-definition-UN3LZRKU-C-vnN5v4.js +724 -0
- package/dist/katex-DNob3HGn.js +11690 -0
- package/dist/layout-DDt0fz-M.js +1703 -0
- package/dist/linear-C-IAFdOt.js +259 -0
- package/dist/mermaid.core-CuZ3nINf.js +15940 -0
- package/dist/mindmap-definition-RKZ34NQL-TSZ1Vb3z.js +827 -0
- package/dist/ordinal-B6-f3MAq.js +61 -0
- package/dist/pieDiagram-4H26LBE5-DYok-1-k.js +163 -0
- package/dist/quadrantDiagram-W4KKPZXB-Cg856sbH.js +1024 -0
- package/dist/requirementDiagram-4Y6WPE33-BN9fGdlJ.js +882 -0
- package/dist/sankeyDiagram-5OEKKPKP-CDqTgonY.js +847 -0
- package/dist/sequenceDiagram-3UESZ5HK-Chjrc0-W.js +2891 -0
- package/dist/stateDiagram-AJRCARHV-DRyLHrdr.js +263 -0
- package/dist/stateDiagram-v2-BHNVJYJU-CZTIDHid.js +16 -0
- package/dist/timeline-definition-PNZ67QCA-Bc3D9AAG.js +1055 -0
- package/dist/{useFieldRendering-Dh6Kib_0.js → useCodeBlockRendering-qA6gj4vz.js} +3041 -2255
- package/dist/useMonacoAutoHeight-D4T-El3J.js +66 -0
- package/dist/vennDiagram-CIIHVFJN-CYAul48m.js +1557 -0
- package/dist/wardley-L42UT6IY-D7b2ujEZ.js +22512 -0
- package/dist/wardleyDiagram-YWT4CUSO-B7Tg0MG9.js +675 -0
- package/dist/xychartDiagram-2RQKCTM6-xWYVEqth.js +1342 -0
- package/package.json +8 -7
- package/src/__tests__/assigner-runner-dependent-data.test.ts +32 -0
- package/src/__tests__/markdown-field.test.ts +150 -1
- package/src/__tests__/markdown-note-field.test.ts +86 -3
- package/src/__tests__/quiz-recorder.test.ts +47 -0
- package/src/__tests__/recorder-assigner-control.test.ts +844 -0
- package/src/__tests__/recorder-check-field.test.ts +103 -0
- package/src/__tests__/recorder-editor.test.ts +17 -0
- package/src/__tests__/recorder-markdown-assigner-integration.test.ts +49 -0
- package/src/__tests__/step-field.test.ts +87 -4
- package/src/__tests__/type-plugins.test.ts +1 -0
- package/src/__tests__/var-field-render.test.ts +741 -1
- package/src/components/AimdCodeField.vue +24 -5
- package/src/components/AimdMarkdownField.vue +548 -11
- package/src/components/AimdMarkdownNoteField.vue +241 -30
- package/src/components/AimdQuizOptionFollowups.vue +121 -0
- package/src/components/AimdQuizRecorder.vue +79 -148
- package/src/components/AimdRecorder.vue +1620 -98
- package/src/components/AimdRecorderEditor.vue +276 -8
- package/src/components/AimdRecorderWysiwygFieldHost.vue +6 -0
- package/src/components/AimdRecorderWysiwygSurface.vue +32 -0
- package/src/components/AimdStepCheckField.vue +205 -51
- package/src/components/AimdVarField.vue +694 -25
- package/src/components/AimdVarTableField.vue +283 -110
- package/src/components/icons/AimdAssignerCalculatorIcon.vue +18 -0
- package/src/components/icons/AimdAssignerCloudStatusIcon.vue +22 -0
- package/src/components/recorderMilkdownPlugin.ts +14 -0
- package/src/composables/__tests__/useRecordState.test.ts +114 -0
- package/src/composables/__tests__/useVarHelpers.test.ts +133 -0
- package/src/composables/index.ts +27 -1
- package/src/composables/useAssignerRunner.ts +376 -0
- package/src/composables/useCodeBlockRendering.ts +51 -0
- package/src/composables/useFieldRendering.ts +32 -4
- package/src/composables/useMonacoAutoHeight.ts +127 -0
- package/src/composables/useRecordState.ts +40 -14
- package/src/composables/useVarHelpers.ts +377 -9
- package/src/index.ts +13 -0
- package/src/locales.ts +47 -2
- package/src/styles/aimd.css +171 -6
- package/src/type-plugins.ts +7 -0
- package/src/types.ts +93 -2
- package/dist/AimdCodeField-DC3DPvgc.js +0 -172
- package/dist/AimdMarkdownField-CX71bOdX.js +0 -67
- package/dist/AimdMarkdownNoteField--ssNIQfG.js +0 -186
|
@@ -11,6 +11,7 @@ import type {
|
|
|
11
11
|
AimdVarTableNode,
|
|
12
12
|
ExtractedAimdFields,
|
|
13
13
|
} from "@airalogy/aimd-core/types"
|
|
14
|
+
import { getAimdFieldEnumValues } from "@airalogy/aimd-core/utils"
|
|
14
15
|
import { parseAndExtract, renderToVue } from "@airalogy/aimd-renderer"
|
|
15
16
|
import type { AimdComponentRenderer } from "@airalogy/aimd-renderer"
|
|
16
17
|
import type { AimdRecorderMessagesInput } from "../locales"
|
|
@@ -20,9 +21,16 @@ import {
|
|
|
20
21
|
} from "../locales"
|
|
21
22
|
import type {
|
|
22
23
|
AimdChoiceOptionExplanationMode,
|
|
24
|
+
AimdAssignerMap,
|
|
25
|
+
AimdAssignerRunner,
|
|
26
|
+
AimdServerAssignerMap,
|
|
27
|
+
AimdServerAssignerRunner,
|
|
28
|
+
AimdFileInfoResolver,
|
|
29
|
+
AimdFileUploadHandler,
|
|
23
30
|
AimdFieldMeta,
|
|
24
31
|
AimdFieldState,
|
|
25
32
|
AimdRecorderFieldAdapters,
|
|
33
|
+
AimdRecorderFieldType,
|
|
26
34
|
AimdScaleGradeDisplayMode,
|
|
27
35
|
AimdTypePlugin,
|
|
28
36
|
AimdProtocolRecordData,
|
|
@@ -46,6 +54,17 @@ import {
|
|
|
46
54
|
normalizeVarTypeName,
|
|
47
55
|
normalizeDateTimeValueWithTimezone,
|
|
48
56
|
} from "../composables/useVarHelpers"
|
|
57
|
+
import {
|
|
58
|
+
applyAimdAssignedFieldsToRecord,
|
|
59
|
+
buildAimdAssignerDependentData,
|
|
60
|
+
extractAimdAssignerErrorMessage,
|
|
61
|
+
extractAimdAssignedFields,
|
|
62
|
+
getAimdAssignerPayloadFieldKey,
|
|
63
|
+
isReadonlyAimdAssignerMode,
|
|
64
|
+
normalizeAimdAssignerMode,
|
|
65
|
+
resolveAimdAssigners,
|
|
66
|
+
type AimdResolvedAssigner,
|
|
67
|
+
} from "../composables/useAssignerRunner"
|
|
49
68
|
import {
|
|
50
69
|
captureFocusSnapshot,
|
|
51
70
|
restoreFocusSnapshot,
|
|
@@ -56,6 +75,7 @@ import type { ClientAssignerFieldDefinitions } from "../client-assigner"
|
|
|
56
75
|
import { resolveAimdRecorderFieldVNode } from "../composables/useFieldAdapters"
|
|
57
76
|
import { useVarTableDragDrop, getVarTableColumns } from "../composables/useVarTableDragDrop"
|
|
58
77
|
import { useFieldRendering } from "../composables/useFieldRendering"
|
|
78
|
+
import { useCodeBlockRendering } from "../composables/useCodeBlockRendering"
|
|
59
79
|
import {
|
|
60
80
|
createEmptyCheckRecordItem,
|
|
61
81
|
createEmptyStepRecordItem,
|
|
@@ -73,6 +93,8 @@ import AimdVarField from "./AimdVarField.vue"
|
|
|
73
93
|
import AimdVarTableField from "./AimdVarTableField.vue"
|
|
74
94
|
import { AimdStepField, AimdCheckField } from "./AimdStepCheckField.vue"
|
|
75
95
|
import AimdQuizRecorder from "./AimdQuizRecorder.vue"
|
|
96
|
+
import AimdAssignerCalculatorIcon from "./icons/AimdAssignerCalculatorIcon.vue"
|
|
97
|
+
import AimdAssignerCloudStatusIcon from "./icons/AimdAssignerCloudStatusIcon.vue"
|
|
76
98
|
|
|
77
99
|
// ---------------------------------------------------------------------------
|
|
78
100
|
// Props & emits
|
|
@@ -105,6 +127,15 @@ const props = withDefaults(defineProps<{
|
|
|
105
127
|
*/
|
|
106
128
|
fieldMeta?: Record<string, AimdFieldMeta>
|
|
107
129
|
|
|
130
|
+
/**
|
|
131
|
+
* Parsed protocol assigners keyed by assigned field name.
|
|
132
|
+
* The recorder turns these into buttons, dependency payloads, runtime states,
|
|
133
|
+
* and record writes while the host supplies the execution hook.
|
|
134
|
+
*/
|
|
135
|
+
serverAssigners?: AimdServerAssignerMap
|
|
136
|
+
/** @deprecated Use `serverAssigners` instead. */
|
|
137
|
+
assigners?: AimdAssignerMap
|
|
138
|
+
|
|
108
139
|
/**
|
|
109
140
|
* Per-field runtime state keyed by "section:fieldName".
|
|
110
141
|
* Drives loading / error / validationError styling.
|
|
@@ -132,9 +163,23 @@ const props = withDefaults(defineProps<{
|
|
|
132
163
|
|
|
133
164
|
/**
|
|
134
165
|
* Resolves relative paths / Airalogy file IDs to displayable URLs.
|
|
135
|
-
* Reserved for future file-type field support.
|
|
136
166
|
*/
|
|
137
167
|
resolveFile?: (src: string) => string | null
|
|
168
|
+
resolveFileInfo?: AimdFileInfoResolver
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Uploads file-like var selections. Return the record value to store,
|
|
172
|
+
* typically an Airalogy file ID or a structured file descriptor.
|
|
173
|
+
*/
|
|
174
|
+
uploadFile?: AimdFileUploadHandler
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Runs host-specific assigner execution. The recorder prepares dependencies
|
|
178
|
+
* and applies returned `assigned_fields`; this hook only performs the call.
|
|
179
|
+
*/
|
|
180
|
+
runServerAssigner?: AimdServerAssignerRunner
|
|
181
|
+
/** @deprecated Use `runServerAssigner` instead. */
|
|
182
|
+
assignerRunner?: AimdAssignerRunner
|
|
138
183
|
|
|
139
184
|
/**
|
|
140
185
|
* Type-level plugins for custom var types.
|
|
@@ -154,11 +199,17 @@ const props = withDefaults(defineProps<{
|
|
|
154
199
|
scaleGradeDisplayMode: "hidden",
|
|
155
200
|
stepDetailDisplay: "auto",
|
|
156
201
|
fieldMeta: undefined,
|
|
202
|
+
serverAssigners: undefined,
|
|
203
|
+
assigners: undefined,
|
|
157
204
|
fieldState: undefined,
|
|
158
205
|
wrapField: undefined,
|
|
159
206
|
customRenderers: undefined,
|
|
160
207
|
fieldAdapters: undefined,
|
|
161
208
|
resolveFile: undefined,
|
|
209
|
+
resolveFileInfo: undefined,
|
|
210
|
+
uploadFile: undefined,
|
|
211
|
+
runServerAssigner: undefined,
|
|
212
|
+
assignerRunner: undefined,
|
|
162
213
|
typePlugins: undefined,
|
|
163
214
|
})
|
|
164
215
|
|
|
@@ -206,10 +257,15 @@ let pendingFocusSnapshot: FocusSnapshot | null = null
|
|
|
206
257
|
let pendingInlineBuildRequestId: number | null = null
|
|
207
258
|
const timerNowMs = ref(Date.now())
|
|
208
259
|
let protocolTimerTicker: ReturnType<typeof setInterval> | null = null
|
|
260
|
+
const serverAssignerAbortControllers = new Map<string, AbortController>()
|
|
261
|
+
const autoServerAssignerSignatures = new Map<string, string>()
|
|
262
|
+
let autoServerAssignerScheduled = false
|
|
209
263
|
|
|
210
264
|
const resolvedLocale = computed(() => resolveAimdRecorderLocale(props.locale))
|
|
211
265
|
const resolvedMessages = computed(() => createAimdRecorderMessages(resolvedLocale.value, props.messages))
|
|
212
266
|
const resolvedTypePlugins = computed(() => createAimdTypePlugins(props.typePlugins))
|
|
267
|
+
const resolvedServerAssigners = computed(() => props.serverAssigners ?? props.assigners)
|
|
268
|
+
const resolvedRunServerAssigner = computed(() => props.runServerAssigner ?? props.assignerRunner)
|
|
213
269
|
|
|
214
270
|
const InlineNodesOutlet = defineComponent({
|
|
215
271
|
name: "AimdRecorderInlineNodesOutlet",
|
|
@@ -224,6 +280,8 @@ const InlineNodesOutlet = defineComponent({
|
|
|
224
280
|
},
|
|
225
281
|
})
|
|
226
282
|
|
|
283
|
+
type AssignableRecorderFieldType = Exclude<AimdRecorderFieldType, "quiz">
|
|
284
|
+
|
|
227
285
|
function applyFieldAdapter<TFieldType extends "var" | "var_table" | "step" | "check" | "quiz">(
|
|
228
286
|
fieldType: TFieldType,
|
|
229
287
|
fieldKey: string,
|
|
@@ -238,11 +296,185 @@ function applyFieldAdapter<TFieldType extends "var" | "var_table" | "step" | "ch
|
|
|
238
296
|
locale: resolvedLocale.value,
|
|
239
297
|
messages: resolvedMessages.value,
|
|
240
298
|
record: localRecord,
|
|
241
|
-
fieldMeta:
|
|
242
|
-
fieldState:
|
|
299
|
+
fieldMeta: effectiveFieldMeta.value,
|
|
300
|
+
fieldState: effectiveFieldState.value,
|
|
243
301
|
})
|
|
244
302
|
}
|
|
245
303
|
|
|
304
|
+
function getAssignerPayloadFieldKey(fieldType: AssignableRecorderFieldType, fieldKey: string): string {
|
|
305
|
+
return getAimdAssignerPayloadFieldKey(fieldType, fieldKey)
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
function getManualClientAssignerForField(
|
|
309
|
+
fieldType: AssignableRecorderFieldType,
|
|
310
|
+
payloadFieldKey: string,
|
|
311
|
+
): AimdClientAssignerField | undefined {
|
|
312
|
+
if (fieldType !== "var") {
|
|
313
|
+
return undefined
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
return clientAssigners.value.find(assigner => (
|
|
317
|
+
assigner.mode === "manual" && assigner.assigned_fields.includes(payloadFieldKey)
|
|
318
|
+
))
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
interface ResolvedAssignerControl {
|
|
322
|
+
fieldType: AssignableRecorderFieldType
|
|
323
|
+
fieldKey: string
|
|
324
|
+
payloadFieldKey: string
|
|
325
|
+
clientAssigner?: AimdClientAssignerField
|
|
326
|
+
serverAssigner?: AimdResolvedAssigner
|
|
327
|
+
state?: AimdFieldState
|
|
328
|
+
loading: boolean
|
|
329
|
+
disabled: boolean
|
|
330
|
+
label: string
|
|
331
|
+
titleTarget: string
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
function resolveAssignerControl(
|
|
335
|
+
fieldType: AssignableRecorderFieldType,
|
|
336
|
+
fieldKey: string,
|
|
337
|
+
): ResolvedAssignerControl | null {
|
|
338
|
+
const meta = effectiveFieldMeta.value[fieldKey]
|
|
339
|
+
const payloadFieldKey = getAssignerPayloadFieldKey(fieldType, fieldKey)
|
|
340
|
+
const serverAssigner = serverAssignerByFieldKey.value[fieldKey]
|
|
341
|
+
?? serverAssignerByAssignedField.value[payloadFieldKey]
|
|
342
|
+
const clientAssigner = meta?.assigner || serverAssigner
|
|
343
|
+
? undefined
|
|
344
|
+
: getManualClientAssignerForField(fieldType, payloadFieldKey)
|
|
345
|
+
if ((!meta?.assigner && !clientAssigner && !serverAssigner) || props.readonly) {
|
|
346
|
+
return null
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
const state = effectiveFieldState.value[fieldKey]
|
|
350
|
+
const loading = state?.loading === true
|
|
351
|
+
const canCancelServerRun = Boolean(serverAssigner && resolvedRunServerAssigner.value && loading)
|
|
352
|
+
const disabled = (loading && !canCancelServerRun) || state?.disabled === true
|
|
353
|
+
const label = canCancelServerRun
|
|
354
|
+
? resolvedMessages.value.assigner.cancel
|
|
355
|
+
: loading
|
|
356
|
+
? resolvedMessages.value.assigner.running
|
|
357
|
+
: resolvedMessages.value.assigner.run
|
|
358
|
+
const titleTarget = clientAssigner?.id ?? serverAssigner?.assignedField ?? payloadFieldKey
|
|
359
|
+
|
|
360
|
+
return {
|
|
361
|
+
fieldType,
|
|
362
|
+
fieldKey,
|
|
363
|
+
payloadFieldKey,
|
|
364
|
+
clientAssigner,
|
|
365
|
+
serverAssigner,
|
|
366
|
+
state,
|
|
367
|
+
loading,
|
|
368
|
+
disabled,
|
|
369
|
+
label,
|
|
370
|
+
titleTarget,
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
function renderAssignerButton(control: ResolvedAssignerControl, value: unknown): VNode {
|
|
375
|
+
return h("button", {
|
|
376
|
+
type: "button",
|
|
377
|
+
class: "aimd-rec-assigner-field__button",
|
|
378
|
+
disabled: control.disabled,
|
|
379
|
+
"aria-label": `${control.label}: ${control.titleTarget}`,
|
|
380
|
+
onClick: (event: MouseEvent) => {
|
|
381
|
+
event.preventDefault()
|
|
382
|
+
event.stopPropagation()
|
|
383
|
+
if (control.loading) {
|
|
384
|
+
if (control.serverAssigner && resolvedRunServerAssigner.value) {
|
|
385
|
+
cancelServerAssigner(control.fieldKey)
|
|
386
|
+
} else {
|
|
387
|
+
emit("assigner-cancel", {
|
|
388
|
+
section: control.fieldType,
|
|
389
|
+
fieldKey: control.payloadFieldKey,
|
|
390
|
+
value,
|
|
391
|
+
})
|
|
392
|
+
}
|
|
393
|
+
return
|
|
394
|
+
}
|
|
395
|
+
if (control.clientAssigner) {
|
|
396
|
+
clientAssignerRunner.triggerClientAssigner(control.clientAssigner.id)
|
|
397
|
+
return
|
|
398
|
+
}
|
|
399
|
+
if (control.serverAssigner && resolvedRunServerAssigner.value) {
|
|
400
|
+
void runServerAssigner(control.serverAssigner, control.fieldType, control.fieldKey)
|
|
401
|
+
return
|
|
402
|
+
}
|
|
403
|
+
emit("assigner-request", {
|
|
404
|
+
section: control.fieldType,
|
|
405
|
+
fieldKey: control.payloadFieldKey,
|
|
406
|
+
value,
|
|
407
|
+
})
|
|
408
|
+
},
|
|
409
|
+
title: `${resolvedMessages.value.assigner.run}: ${control.titleTarget}`,
|
|
410
|
+
}, [
|
|
411
|
+
control.loading
|
|
412
|
+
? h("span", { class: "aimd-rec-assigner-field__spinner", "aria-hidden": "true" })
|
|
413
|
+
: h(AimdAssignerCalculatorIcon),
|
|
414
|
+
h("span", { class: "aimd-rec-assigner-field__label" }, control.label),
|
|
415
|
+
])
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
function renderAssignerCloudStatusIcon(control: ResolvedAssignerControl): VNode {
|
|
419
|
+
const statusClass = control.loading
|
|
420
|
+
? "loading"
|
|
421
|
+
: control.state?.error
|
|
422
|
+
? "error"
|
|
423
|
+
: control.state && control.state.loading === false
|
|
424
|
+
? "done"
|
|
425
|
+
: "idle"
|
|
426
|
+
|
|
427
|
+
if (statusClass === "loading") {
|
|
428
|
+
return h("span", {
|
|
429
|
+
class: ["aimd-rec-assigner-field__status", "aimd-rec-assigner-field__status--loading"],
|
|
430
|
+
title: control.label,
|
|
431
|
+
}, [
|
|
432
|
+
h("span", { class: "aimd-rec-assigner-field__status-spinner", "aria-hidden": "true" }),
|
|
433
|
+
])
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
return h("span", {
|
|
437
|
+
class: ["aimd-rec-assigner-field__status", `aimd-rec-assigner-field__status--${statusClass}`],
|
|
438
|
+
title: statusClass === "done"
|
|
439
|
+
? control.titleTarget
|
|
440
|
+
: (control.state?.error || control.titleTarget),
|
|
441
|
+
}, [
|
|
442
|
+
h(AimdAssignerCloudStatusIcon, {
|
|
443
|
+
variant: statusClass === "done" ? "done" : "idle",
|
|
444
|
+
}),
|
|
445
|
+
])
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
function withAssignerControl(
|
|
449
|
+
fieldType: AssignableRecorderFieldType,
|
|
450
|
+
fieldKey: string,
|
|
451
|
+
value: unknown,
|
|
452
|
+
defaultVNode: VNode,
|
|
453
|
+
): VNode {
|
|
454
|
+
const control = resolveAssignerControl(fieldType, fieldKey)
|
|
455
|
+
if (!control) {
|
|
456
|
+
return defaultVNode
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
const tag = fieldType === "var" ? "span" : "div"
|
|
460
|
+
|
|
461
|
+
return h(tag, {
|
|
462
|
+
class: [
|
|
463
|
+
"aimd-rec-assigner-field",
|
|
464
|
+
`aimd-rec-assigner-field--${fieldType}`,
|
|
465
|
+
control.loading ? "aimd-rec-assigner-field--loading" : undefined,
|
|
466
|
+
control.state?.error ? "aimd-rec-assigner-field--error" : undefined,
|
|
467
|
+
],
|
|
468
|
+
"data-rec-assigner-key": fieldKey,
|
|
469
|
+
}, [
|
|
470
|
+
renderAssignerButton(control, value),
|
|
471
|
+
h("span", { class: "aimd-rec-assigner-field__control" }, [defaultVNode]),
|
|
472
|
+
control.state?.error
|
|
473
|
+
? h("span", { class: "aimd-rec-assigner-field__error" }, control.state.error)
|
|
474
|
+
: null,
|
|
475
|
+
])
|
|
476
|
+
}
|
|
477
|
+
|
|
246
478
|
const EMPTY_FIELDS: ExtractedAimdFields = {
|
|
247
479
|
var: [],
|
|
248
480
|
var_definitions: [],
|
|
@@ -260,6 +492,7 @@ const EMPTY_FIELDS: ExtractedAimdFields = {
|
|
|
260
492
|
|
|
261
493
|
const extractedFields = ref<ExtractedAimdFields>(EMPTY_FIELDS)
|
|
262
494
|
const clientAssigners = ref<AimdClientAssignerField[]>([])
|
|
495
|
+
const internalAssignerFieldState = ref<Record<string, AimdFieldState>>({})
|
|
263
496
|
const clientAssignerFieldDefinitions = computed<ClientAssignerFieldDefinitions>(() => {
|
|
264
497
|
const definitions: ClientAssignerFieldDefinitions = {}
|
|
265
498
|
for (const field of extractedFields.value.var_definitions ?? []) {
|
|
@@ -270,6 +503,103 @@ const clientAssignerFieldDefinitions = computed<ClientAssignerFieldDefinitions>(
|
|
|
270
503
|
}
|
|
271
504
|
return definitions
|
|
272
505
|
})
|
|
506
|
+
const protocolAssignerEntries = computed(() => resolveAimdAssigners(resolvedServerAssigners.value, extractedFields.value))
|
|
507
|
+
const serverAssignerByFieldKey = computed(() => (
|
|
508
|
+
Object.fromEntries(protocolAssignerEntries.value.map(entry => [entry.fieldKey, entry]))
|
|
509
|
+
))
|
|
510
|
+
const serverAssignerByAssignedField = computed(() => (
|
|
511
|
+
Object.fromEntries(protocolAssignerEntries.value.map(entry => [entry.assignedField, entry]))
|
|
512
|
+
))
|
|
513
|
+
|
|
514
|
+
function createEnumOptions(values: unknown[]): NonNullable<AimdFieldMeta["enumOptions"]> {
|
|
515
|
+
return values.map(value => ({
|
|
516
|
+
label: String(value),
|
|
517
|
+
value,
|
|
518
|
+
}))
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
function mergeFieldMeta(
|
|
522
|
+
target: Record<string, AimdFieldMeta>,
|
|
523
|
+
fieldKey: string,
|
|
524
|
+
meta: AimdFieldMeta,
|
|
525
|
+
) {
|
|
526
|
+
target[fieldKey] = {
|
|
527
|
+
...target[fieldKey],
|
|
528
|
+
...meta,
|
|
529
|
+
assigner: meta.assigner ?? target[fieldKey]?.assigner,
|
|
530
|
+
disabled: meta.disabled ?? target[fieldKey]?.disabled,
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
const generatedEnumFieldMeta = computed<Record<string, AimdFieldMeta>>(() => {
|
|
535
|
+
const meta: Record<string, AimdFieldMeta> = {}
|
|
536
|
+
|
|
537
|
+
for (const field of extractedFields.value.var_definitions ?? []) {
|
|
538
|
+
const enumValues = getAimdFieldEnumValues(field)
|
|
539
|
+
if (enumValues.length > 0) {
|
|
540
|
+
mergeFieldMeta(meta, `var:${field.id}`, {
|
|
541
|
+
enumOptions: createEnumOptions(enumValues),
|
|
542
|
+
})
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
for (const table of extractedFields.value.var_table ?? []) {
|
|
547
|
+
for (const subvar of table.subvars ?? []) {
|
|
548
|
+
const enumValues = getAimdFieldEnumValues(subvar)
|
|
549
|
+
if (enumValues.length > 0) {
|
|
550
|
+
mergeFieldMeta(meta, `var_table:${table.id}:${subvar.id}`, {
|
|
551
|
+
enumOptions: createEnumOptions(enumValues),
|
|
552
|
+
})
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
return meta
|
|
558
|
+
})
|
|
559
|
+
|
|
560
|
+
const generatedAssignerFieldMeta = computed<Record<string, AimdFieldMeta>>(() => {
|
|
561
|
+
const meta: Record<string, AimdFieldMeta> = {}
|
|
562
|
+
for (const entry of protocolAssignerEntries.value) {
|
|
563
|
+
meta[entry.fieldKey] = {
|
|
564
|
+
assigner: { mode: normalizeAimdAssignerMode(entry.mode) },
|
|
565
|
+
disabled: isReadonlyAimdAssignerMode(entry.mode) || undefined,
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
return meta
|
|
569
|
+
})
|
|
570
|
+
const effectiveFieldMeta = computed<Record<string, AimdFieldMeta>>(() => {
|
|
571
|
+
const next: Record<string, AimdFieldMeta> = {}
|
|
572
|
+
for (const [fieldKey, meta] of Object.entries(generatedEnumFieldMeta.value)) {
|
|
573
|
+
mergeFieldMeta(next, fieldKey, meta)
|
|
574
|
+
}
|
|
575
|
+
for (const [fieldKey, meta] of Object.entries(generatedAssignerFieldMeta.value)) {
|
|
576
|
+
mergeFieldMeta(next, fieldKey, meta)
|
|
577
|
+
}
|
|
578
|
+
for (const [fieldKey, meta] of Object.entries(props.fieldMeta ?? {})) {
|
|
579
|
+
mergeFieldMeta(next, fieldKey, meta)
|
|
580
|
+
}
|
|
581
|
+
return next
|
|
582
|
+
})
|
|
583
|
+
const effectiveFieldState = computed<Record<string, AimdFieldState>>(() => {
|
|
584
|
+
const keys = new Set([
|
|
585
|
+
...Object.keys(internalAssignerFieldState.value),
|
|
586
|
+
...Object.keys(props.fieldState ?? {}),
|
|
587
|
+
])
|
|
588
|
+
const next: Record<string, AimdFieldState> = {}
|
|
589
|
+
|
|
590
|
+
for (const key of keys) {
|
|
591
|
+
const internalState = internalAssignerFieldState.value[key]
|
|
592
|
+
const externalState = props.fieldState?.[key]
|
|
593
|
+
next[key] = {
|
|
594
|
+
...internalState,
|
|
595
|
+
...externalState,
|
|
596
|
+
loading: externalState?.loading ?? internalState?.loading,
|
|
597
|
+
error: externalState?.error ?? internalState?.error,
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
return next
|
|
602
|
+
})
|
|
273
603
|
const protocolEstimatedDurationMs = computed(() => getProtocolEstimatedDurationMs(extractedFields.value.step_hierarchy ?? []))
|
|
274
604
|
const protocolRecordedDurationMs = computed(() => getProtocolRecordedDurationMs(localRecord.step, timerNowMs.value))
|
|
275
605
|
const showProtocolTimingSummary = computed(() => protocolEstimatedDurationMs.value > 0 || protocolRecordedDurationMs.value > 0)
|
|
@@ -323,19 +653,266 @@ function scheduleInlineRebuild() {
|
|
|
323
653
|
})
|
|
324
654
|
}
|
|
325
655
|
|
|
656
|
+
const { preRenderer: codeBlockPreRenderer } = useCodeBlockRendering(scheduleInlineRebuild)
|
|
657
|
+
|
|
326
658
|
function markRecordChanged(options?: { rebuild?: boolean, runClientAssigners?: boolean }) {
|
|
327
|
-
const assignerChanged = options?.runClientAssigners ?
|
|
659
|
+
const assignerChanged = options?.runClientAssigners ? clientAssignerRunner.applyCurrentClientAssigners() : false
|
|
328
660
|
emitRecordUpdate()
|
|
329
661
|
if (options?.rebuild || assignerChanged) {
|
|
330
662
|
scheduleInlineRebuild()
|
|
331
663
|
}
|
|
664
|
+
scheduleAutoServerAssigners()
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
function setInternalAssignerStates(fieldKeys: Iterable<string>, patch: AimdFieldState) {
|
|
668
|
+
const nextState = { ...internalAssignerFieldState.value }
|
|
669
|
+
let changed = false
|
|
670
|
+
|
|
671
|
+
for (const fieldKey of fieldKeys) {
|
|
672
|
+
if (!fieldKey) continue
|
|
673
|
+
nextState[fieldKey] = {
|
|
674
|
+
...nextState[fieldKey],
|
|
675
|
+
...patch,
|
|
676
|
+
}
|
|
677
|
+
changed = true
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
if (!changed) {
|
|
681
|
+
return
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
internalAssignerFieldState.value = nextState
|
|
685
|
+
scheduleInlineRebuild()
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
function setInternalAssignerState(fieldKey: string, patch: AimdFieldState) {
|
|
689
|
+
setInternalAssignerStates([fieldKey], patch)
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
function cancelServerAssigner(fieldKey: string) {
|
|
693
|
+
serverAssignerAbortControllers.get(fieldKey)?.abort()
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
function getAssignableFieldTypeFromKey(fieldKey: string): AssignableRecorderFieldType {
|
|
697
|
+
if (fieldKey.startsWith("var_table:")) return "var_table"
|
|
698
|
+
if (fieldKey.startsWith("step:")) return "step"
|
|
699
|
+
if (fieldKey.startsWith("check:")) return "check"
|
|
700
|
+
return "var"
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
function isAutoServerAssignerMode(mode: string): boolean {
|
|
704
|
+
const normalized = normalizeAimdAssignerMode(mode)
|
|
705
|
+
return normalized === "auto"
|
|
706
|
+
|| normalized === "auto_first"
|
|
707
|
+
|| normalized === "auto_force"
|
|
708
|
+
|| normalized === "auto_readonly"
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
function getRecordValueForFieldKey(fieldKey: string): unknown {
|
|
712
|
+
if (fieldKey.startsWith("var_table:")) {
|
|
713
|
+
const [, tableName, ...columnParts] = fieldKey.split(":")
|
|
714
|
+
const rows = localRecord.var[tableName]
|
|
715
|
+
if (!Array.isArray(rows)) return rows
|
|
716
|
+
const columnName = columnParts.join(":")
|
|
717
|
+
return columnName
|
|
718
|
+
? rows.map(row => (row && typeof row === "object" && !Array.isArray(row) ? (row as Record<string, unknown>)[columnName] : undefined))
|
|
719
|
+
: rows
|
|
720
|
+
}
|
|
721
|
+
if (fieldKey.startsWith("step:")) return localRecord.step[fieldKey.slice("step:".length)]
|
|
722
|
+
if (fieldKey.startsWith("check:")) return localRecord.check[fieldKey.slice("check:".length)]
|
|
723
|
+
return localRecord.var[fieldKey.startsWith("var:") ? fieldKey.slice("var:".length) : fieldKey]
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
function isAutoServerValueReady(value: unknown): boolean {
|
|
727
|
+
return value !== undefined
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
function areAutoServerDependenciesReady(assigner: AimdResolvedAssigner, dependentData: Record<string, unknown>): boolean {
|
|
731
|
+
if (assigner.dependentFields.length === 0) {
|
|
732
|
+
return false
|
|
733
|
+
}
|
|
734
|
+
return assigner.dependentFields.every(field => (
|
|
735
|
+
Object.prototype.hasOwnProperty.call(dependentData, field)
|
|
736
|
+
&& isAutoServerValueReady(dependentData[field])
|
|
737
|
+
))
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
function shouldRunAutoFirstServerAssigner(assigner: AimdResolvedAssigner): boolean {
|
|
741
|
+
if (normalizeAimdAssignerMode(assigner.mode) !== "auto_first") {
|
|
742
|
+
return true
|
|
743
|
+
}
|
|
744
|
+
const currentValue = getRecordValueForFieldKey(assigner.fieldKey)
|
|
745
|
+
return currentValue === undefined || currentValue === ""
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
function getAutoServerAssignerGroupKey(assigner: AimdResolvedAssigner): string {
|
|
749
|
+
return JSON.stringify({
|
|
750
|
+
mode: normalizeAimdAssignerMode(assigner.mode),
|
|
751
|
+
dependentFields: assigner.dependentFields,
|
|
752
|
+
assigner: assigner.assigner,
|
|
753
|
+
})
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
function scheduleAutoServerAssigners() {
|
|
757
|
+
if (autoServerAssignerScheduled) {
|
|
758
|
+
return
|
|
759
|
+
}
|
|
760
|
+
autoServerAssignerScheduled = true
|
|
761
|
+
Promise.resolve().then(() => {
|
|
762
|
+
autoServerAssignerScheduled = false
|
|
763
|
+
void runAutoServerAssigners()
|
|
764
|
+
})
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
async function runAutoServerAssigners() {
|
|
768
|
+
if (props.readonly || !resolvedRunServerAssigner.value) {
|
|
769
|
+
return
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
const visitedGroups = new Set<string>()
|
|
773
|
+
for (const assigner of protocolAssignerEntries.value) {
|
|
774
|
+
if (!isAutoServerAssignerMode(assigner.mode)) {
|
|
775
|
+
continue
|
|
776
|
+
}
|
|
777
|
+
if (serverAssignerAbortControllers.has(assigner.fieldKey)) {
|
|
778
|
+
continue
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
const groupKey = getAutoServerAssignerGroupKey(assigner)
|
|
782
|
+
if (visitedGroups.has(groupKey)) {
|
|
783
|
+
continue
|
|
784
|
+
}
|
|
785
|
+
visitedGroups.add(groupKey)
|
|
786
|
+
|
|
787
|
+
if (!shouldRunAutoFirstServerAssigner(assigner)) {
|
|
788
|
+
continue
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
const dependentData = buildAimdAssignerDependentData(localRecord, assigner)
|
|
792
|
+
if (!areAutoServerDependenciesReady(assigner, dependentData)) {
|
|
793
|
+
continue
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
const signature = JSON.stringify(dependentData)
|
|
797
|
+
if (autoServerAssignerSignatures.get(groupKey) === signature) {
|
|
798
|
+
continue
|
|
799
|
+
}
|
|
800
|
+
autoServerAssignerSignatures.set(groupKey, signature)
|
|
801
|
+
|
|
802
|
+
await runServerAssigner(
|
|
803
|
+
assigner,
|
|
804
|
+
getAssignableFieldTypeFromKey(assigner.fieldKey),
|
|
805
|
+
assigner.fieldKey,
|
|
806
|
+
)
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
function getAssignedFieldStateKey(assignedField: string): string {
|
|
811
|
+
const normalizedField = assignedField.trim()
|
|
812
|
+
if (!normalizedField) {
|
|
813
|
+
return ""
|
|
814
|
+
}
|
|
815
|
+
const mappedAssigner = serverAssignerByAssignedField.value[normalizedField]
|
|
816
|
+
if (mappedAssigner) {
|
|
817
|
+
return mappedAssigner.fieldKey
|
|
818
|
+
}
|
|
819
|
+
if (normalizedField.includes(".")) {
|
|
820
|
+
const [tableName, ...columnParts] = normalizedField.split(".")
|
|
821
|
+
return `var_table:${tableName}:${columnParts.join(".")}`
|
|
822
|
+
}
|
|
823
|
+
return `var:${normalizedField}`
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
function getDeclaredServerAssignerStateKeys(assigner: AimdResolvedAssigner, fallbackFieldKey: string): string[] {
|
|
827
|
+
const declaredFields = Array.isArray(assigner.assigner.assigned_fields)
|
|
828
|
+
? assigner.assigner.assigned_fields
|
|
829
|
+
: Array.isArray((assigner.assigner as { assignedFields?: unknown }).assignedFields)
|
|
830
|
+
? (assigner.assigner as { assignedFields: unknown[] }).assignedFields
|
|
831
|
+
: []
|
|
832
|
+
const stateKeys = new Set<string>([fallbackFieldKey])
|
|
833
|
+
for (const field of declaredFields) {
|
|
834
|
+
if (typeof field !== "string") continue
|
|
835
|
+
const stateKey = getAssignedFieldStateKey(field)
|
|
836
|
+
if (stateKey) {
|
|
837
|
+
stateKeys.add(stateKey)
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
return [...stateKeys]
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
function getReturnedServerAssignerStateKeys(
|
|
844
|
+
assignedFields: Record<string, unknown>,
|
|
845
|
+
fallbackFieldKey: string,
|
|
846
|
+
): string[] {
|
|
847
|
+
const stateKeys = new Set<string>([fallbackFieldKey])
|
|
848
|
+
for (const field of Object.keys(assignedFields)) {
|
|
849
|
+
const stateKey = getAssignedFieldStateKey(field)
|
|
850
|
+
if (stateKey) {
|
|
851
|
+
stateKeys.add(stateKey)
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
return [...stateKeys]
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
async function runServerAssigner(
|
|
858
|
+
assigner: AimdResolvedAssigner,
|
|
859
|
+
fieldType: AssignableRecorderFieldType,
|
|
860
|
+
fieldKey: string,
|
|
861
|
+
) {
|
|
862
|
+
const runner = resolvedRunServerAssigner.value
|
|
863
|
+
if (!runner) return
|
|
864
|
+
|
|
865
|
+
serverAssignerAbortControllers.get(fieldKey)?.abort()
|
|
866
|
+
const abortController = new AbortController()
|
|
867
|
+
serverAssignerAbortControllers.set(fieldKey, abortController)
|
|
868
|
+
setInternalAssignerStates(getDeclaredServerAssignerStateKeys(assigner, fieldKey), { loading: true, error: undefined })
|
|
869
|
+
|
|
870
|
+
try {
|
|
871
|
+
const result = await runner({
|
|
872
|
+
section: fieldType,
|
|
873
|
+
fieldKey,
|
|
874
|
+
assignedField: assigner.assignedField,
|
|
875
|
+
dependentData: buildAimdAssignerDependentData(localRecord, assigner),
|
|
876
|
+
record: cloneRecordData(localRecord),
|
|
877
|
+
assigner: assigner.assigner,
|
|
878
|
+
signal: abortController.signal,
|
|
879
|
+
})
|
|
880
|
+
const errorMessage = extractAimdAssignerErrorMessage(result)
|
|
881
|
+
if (errorMessage) {
|
|
882
|
+
throw new Error(errorMessage)
|
|
883
|
+
}
|
|
884
|
+
const assignedFields = extractAimdAssignedFields(result)
|
|
885
|
+
const returnedStateKeys = getReturnedServerAssignerStateKeys(assignedFields, fieldKey)
|
|
886
|
+
if (Object.keys(assignedFields).length > 0) {
|
|
887
|
+
applyAimdAssignedFieldsToRecord(localRecord, assignedFields)
|
|
888
|
+
markRecordChanged({ rebuild: true, runClientAssigners: true })
|
|
889
|
+
} else {
|
|
890
|
+
emitRecordUpdate()
|
|
891
|
+
}
|
|
892
|
+
if (serverAssignerAbortControllers.get(fieldKey) === abortController) {
|
|
893
|
+
setInternalAssignerStates(returnedStateKeys, { loading: false, error: undefined })
|
|
894
|
+
}
|
|
895
|
+
} catch (error) {
|
|
896
|
+
if (abortController.signal.aborted) {
|
|
897
|
+
if (serverAssignerAbortControllers.get(fieldKey) === abortController) {
|
|
898
|
+
setInternalAssignerStates(getDeclaredServerAssignerStateKeys(assigner, fieldKey), { loading: false, error: undefined })
|
|
899
|
+
}
|
|
900
|
+
return
|
|
901
|
+
}
|
|
902
|
+
const message = error instanceof Error ? error.message : String(error)
|
|
903
|
+
setInternalAssignerStates(getDeclaredServerAssignerStateKeys(assigner, fieldKey), { loading: false, error: message })
|
|
904
|
+
} finally {
|
|
905
|
+
if (serverAssignerAbortControllers.get(fieldKey) === abortController) {
|
|
906
|
+
serverAssignerAbortControllers.delete(fieldKey)
|
|
907
|
+
}
|
|
908
|
+
}
|
|
332
909
|
}
|
|
333
910
|
|
|
334
911
|
// ---------------------------------------------------------------------------
|
|
335
912
|
// Composables
|
|
336
913
|
// ---------------------------------------------------------------------------
|
|
337
914
|
|
|
338
|
-
const
|
|
915
|
+
const clientAssignerRunner = useClientAssignerRunner({
|
|
339
916
|
readonly: () => props.readonly,
|
|
340
917
|
clientAssigners,
|
|
341
918
|
fieldDefinitions: () => clientAssignerFieldDefinitions.value,
|
|
@@ -358,8 +935,8 @@ const fieldRendering = useFieldRendering({
|
|
|
358
935
|
readonly: () => props.readonly,
|
|
359
936
|
currentUserName: () => props.currentUserName,
|
|
360
937
|
now: () => props.now,
|
|
361
|
-
fieldMeta: () =>
|
|
362
|
-
fieldState: () =>
|
|
938
|
+
fieldMeta: () => effectiveFieldMeta.value,
|
|
939
|
+
fieldState: () => effectiveFieldState.value,
|
|
363
940
|
typePlugins: () => resolvedTypePlugins.value,
|
|
364
941
|
wrapField: () => props.wrapField,
|
|
365
942
|
})
|
|
@@ -371,12 +948,22 @@ const fieldRendering = useFieldRendering({
|
|
|
371
948
|
function renderInlineVar(node: AimdVarNode): VNode {
|
|
372
949
|
const id = node.id
|
|
373
950
|
const fieldKey = `var:${id}`
|
|
374
|
-
const
|
|
951
|
+
const baseMeta = effectiveFieldMeta.value[fieldKey]
|
|
952
|
+
const nodeEnumValues = getAimdFieldEnumValues(node.definition)
|
|
953
|
+
const meta = nodeEnumValues.length > 0 && !baseMeta?.enumOptions
|
|
954
|
+
? {
|
|
955
|
+
...(baseMeta ?? {}),
|
|
956
|
+
enumOptions: createEnumOptions(nodeEnumValues),
|
|
957
|
+
}
|
|
958
|
+
: baseMeta
|
|
375
959
|
|
|
376
960
|
// 1. Custom renderer override
|
|
377
961
|
if (props.customRenderers?.var) {
|
|
378
962
|
const custom = props.customRenderers.var(node, {} as any, [])
|
|
379
|
-
if (custom)
|
|
963
|
+
if (custom) {
|
|
964
|
+
const assignerVNode = withAssignerControl("var", fieldKey, localRecord.var[id], custom as VNode)
|
|
965
|
+
return applyFieldAdapter("var", fieldKey, node, localRecord.var[id], assignerVNode)
|
|
966
|
+
}
|
|
380
967
|
}
|
|
381
968
|
|
|
382
969
|
const type = node.definition?.type || "str"
|
|
@@ -384,14 +971,16 @@ function renderInlineVar(node: AimdVarNode): VNode {
|
|
|
384
971
|
const inputKind = getVarInputKind(type, {
|
|
385
972
|
inputType: meta?.inputType,
|
|
386
973
|
codeLanguage: meta?.codeLanguage,
|
|
974
|
+
kwargs: node.definition?.kwargs,
|
|
975
|
+
fieldMeta: meta,
|
|
387
976
|
typePlugin,
|
|
388
977
|
})
|
|
389
|
-
const placeholder = meta?.placeholder ?? fieldRendering.getVarPlaceholder(node)
|
|
978
|
+
const placeholder = meta?.placeholder ?? fieldRendering.getVarPlaceholder(node, meta)
|
|
390
979
|
|
|
391
980
|
function emitVarChange(value: unknown) {
|
|
392
981
|
fieldRendering.clearVarInputDisplayOverride(id)
|
|
393
982
|
localRecord.var[id] = value
|
|
394
|
-
markRecordChanged({ runClientAssigners: true })
|
|
983
|
+
markRecordChanged({ rebuild: inputKind === "file", runClientAssigners: true })
|
|
395
984
|
emit("field-change", { section: "var", fieldKey: id, value })
|
|
396
985
|
}
|
|
397
986
|
|
|
@@ -437,8 +1026,14 @@ function renderInlineVar(node: AimdVarNode): VNode {
|
|
|
437
1026
|
)
|
|
438
1027
|
const disabled = fieldRendering.isFieldDisabled(fieldKey)
|
|
439
1028
|
const extraClasses = fieldRendering.fieldStateClasses(fieldKey)
|
|
1029
|
+
const canUseInternalAssignerControl = Boolean(meta?.enumOptions?.length)
|
|
1030
|
+
|| ["number", "date", "datetime", "time", "text", "textarea", "checkbox", "file", "code"].includes(inputKind)
|
|
1031
|
+
const fieldAssignerControl = resolveAssignerControl("var", fieldKey)
|
|
1032
|
+
const internalAssignerControl = canUseInternalAssignerControl ? fieldAssignerControl : null
|
|
440
1033
|
|
|
441
1034
|
if (typePlugin?.renderField) {
|
|
1035
|
+
const pluginSupportsInternalAssignerControl = typePlugin.supportsInlineAssignerControl === true
|
|
1036
|
+
const pluginAssignerControl = pluginSupportsInternalAssignerControl ? fieldAssignerControl : null
|
|
442
1037
|
const pluginVNode = typePlugin.renderField({
|
|
443
1038
|
type,
|
|
444
1039
|
normalizedType: normalizeVarTypeName(type),
|
|
@@ -457,13 +1052,26 @@ function renderInlineVar(node: AimdVarNode): VNode {
|
|
|
457
1052
|
displayValue,
|
|
458
1053
|
extraClasses,
|
|
459
1054
|
placeholder,
|
|
460
|
-
fieldState:
|
|
1055
|
+
fieldState: effectiveFieldState.value[fieldKey],
|
|
1056
|
+
assignerControl: pluginAssignerControl
|
|
1057
|
+
? renderAssignerButton(pluginAssignerControl, localRecord.var[id])
|
|
1058
|
+
: undefined,
|
|
1059
|
+
assignerStatus: pluginAssignerControl
|
|
1060
|
+
? renderAssignerCloudStatusIcon(pluginAssignerControl)
|
|
1061
|
+
: undefined,
|
|
1062
|
+
assignerError: pluginAssignerControl?.state?.error,
|
|
1063
|
+
uploadFile: props.uploadFile,
|
|
1064
|
+
resolveFile: props.resolveFile,
|
|
1065
|
+
resolveFileInfo: props.resolveFileInfo,
|
|
461
1066
|
emitChange: emitVarChange,
|
|
462
1067
|
emitBlur: emitVarBlur,
|
|
463
1068
|
})
|
|
464
1069
|
|
|
465
1070
|
if (pluginVNode) {
|
|
466
|
-
|
|
1071
|
+
const assignerVNode = pluginAssignerControl
|
|
1072
|
+
? pluginVNode
|
|
1073
|
+
: withAssignerControl("var", fieldKey, localRecord.var[id], pluginVNode)
|
|
1074
|
+
return applyFieldAdapter("var", fieldKey, node, localRecord.var[id], assignerVNode)
|
|
467
1075
|
}
|
|
468
1076
|
}
|
|
469
1077
|
|
|
@@ -478,13 +1086,26 @@ function renderInlineVar(node: AimdVarNode): VNode {
|
|
|
478
1086
|
inputKind,
|
|
479
1087
|
typePlugin,
|
|
480
1088
|
initialized: id in localRecord.var,
|
|
1089
|
+
assignerControl: internalAssignerControl
|
|
1090
|
+
? renderAssignerButton(internalAssignerControl, localRecord.var[id])
|
|
1091
|
+
: undefined,
|
|
1092
|
+
assignerStatus: internalAssignerControl
|
|
1093
|
+
? renderAssignerCloudStatusIcon(internalAssignerControl)
|
|
1094
|
+
: undefined,
|
|
1095
|
+
assignerError: internalAssignerControl?.state?.error,
|
|
1096
|
+
uploadFile: props.uploadFile,
|
|
1097
|
+
resolveFile: props.resolveFile,
|
|
1098
|
+
resolveFileInfo: props.resolveFileInfo,
|
|
481
1099
|
onChange: (payload: { id: string, value: unknown, type: string, inputKind: string }) => {
|
|
482
1100
|
emitVarChange(payload.value)
|
|
483
1101
|
},
|
|
484
1102
|
onBlur: () => emitVarBlur(),
|
|
485
1103
|
})
|
|
486
1104
|
|
|
487
|
-
|
|
1105
|
+
const assignerVNode = internalAssignerControl
|
|
1106
|
+
? vnode
|
|
1107
|
+
: withAssignerControl("var", fieldKey, localRecord.var[id], vnode)
|
|
1108
|
+
return applyFieldAdapter("var", fieldKey, node, localRecord.var[id], assignerVNode)
|
|
488
1109
|
}
|
|
489
1110
|
|
|
490
1111
|
function renderInlineVarTable(node: AimdVarTableNode): VNode {
|
|
@@ -493,7 +1114,8 @@ function renderInlineVarTable(node: AimdVarTableNode): VNode {
|
|
|
493
1114
|
const columns = getVarTableColumns(node)
|
|
494
1115
|
const rows = tableDragDrop.ensureVarTableRows(tableName, columns)
|
|
495
1116
|
const disabled = fieldRendering.isFieldDisabled(fieldKey)
|
|
496
|
-
const disabledColumns = columns.filter(column => !!
|
|
1117
|
+
const disabledColumns = columns.filter(column => !!effectiveFieldMeta.value[`var_table:${tableName}:${column}`]?.disabled)
|
|
1118
|
+
const tableAssignerControl = resolveAssignerControl("var_table", fieldKey)
|
|
497
1119
|
|
|
498
1120
|
const vnode = h(AimdVarTableField, {
|
|
499
1121
|
node,
|
|
@@ -503,8 +1125,15 @@ function renderInlineVarTable(node: AimdVarTableNode): VNode {
|
|
|
503
1125
|
readonly: props.readonly,
|
|
504
1126
|
settlingRowKey: tableDragDrop.getSettlingVarTableRowKey(),
|
|
505
1127
|
messages: resolvedMessages.value,
|
|
506
|
-
fieldMeta:
|
|
507
|
-
fieldState:
|
|
1128
|
+
fieldMeta: effectiveFieldMeta.value,
|
|
1129
|
+
fieldState: effectiveFieldState.value,
|
|
1130
|
+
assignerControl: tableAssignerControl
|
|
1131
|
+
? renderAssignerButton(tableAssignerControl, rows)
|
|
1132
|
+
: undefined,
|
|
1133
|
+
assignerStatus: tableAssignerControl
|
|
1134
|
+
? renderAssignerCloudStatusIcon(tableAssignerControl)
|
|
1135
|
+
: undefined,
|
|
1136
|
+
assignerError: tableAssignerControl?.state?.error,
|
|
508
1137
|
onCellInput: (payload: { tableName: string, column: string, rowIndex: number, value: string, row: Record<string, string> }) => {
|
|
509
1138
|
payload.row[payload.column] = payload.value
|
|
510
1139
|
markRecordChanged({ runClientAssigners: true })
|
|
@@ -571,7 +1200,10 @@ function renderInlineVarTable(node: AimdVarTableNode): VNode {
|
|
|
571
1200
|
},
|
|
572
1201
|
})
|
|
573
1202
|
|
|
574
|
-
|
|
1203
|
+
const assignerVNode = tableAssignerControl
|
|
1204
|
+
? vnode
|
|
1205
|
+
: withAssignerControl("var_table", fieldKey, rows, vnode)
|
|
1206
|
+
return applyFieldAdapter("var_table", fieldKey, node, rows, assignerVNode)
|
|
575
1207
|
}
|
|
576
1208
|
|
|
577
1209
|
function isGroupedStepBodyNode(node: unknown): node is VNode {
|
|
@@ -584,12 +1216,7 @@ function isGroupedStepBodyNode(node: unknown): node is VNode {
|
|
|
584
1216
|
return false
|
|
585
1217
|
}
|
|
586
1218
|
|
|
587
|
-
const
|
|
588
|
-
const classNames = Array.isArray(classValue)
|
|
589
|
-
? classValue
|
|
590
|
-
: typeof classValue === "string"
|
|
591
|
-
? [classValue]
|
|
592
|
-
: []
|
|
1219
|
+
const classNames = getVNodeClassNames(props.class)
|
|
593
1220
|
|
|
594
1221
|
return props["data-aimd-step-body"] === "true"
|
|
595
1222
|
|| props["data-aimd-step-body"] === true
|
|
@@ -644,26 +1271,72 @@ function isGroupedCheckBodyNode(node: unknown): node is VNode {
|
|
|
644
1271
|
|| classNames.some((className) => typeof className === "string" && className.includes("aimd-check-body"))
|
|
645
1272
|
}
|
|
646
1273
|
|
|
1274
|
+
function getVNodeClassNames(classValue: unknown): string[] {
|
|
1275
|
+
if (Array.isArray(classValue)) {
|
|
1276
|
+
return classValue.flatMap(item => getVNodeClassNames(item))
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
if (typeof classValue === "string") {
|
|
1280
|
+
return classValue.split(/\s+/).filter(Boolean)
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
if (classValue && typeof classValue === "object") {
|
|
1284
|
+
return Object.entries(classValue as Record<string, unknown>)
|
|
1285
|
+
.filter(([, enabled]) => Boolean(enabled))
|
|
1286
|
+
.map(([className]) => className)
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
return []
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
function isDefaultCheckControlNode(node: unknown): boolean {
|
|
1293
|
+
if (!node || typeof node !== "object" || !("type" in node) || !("props" in node)) {
|
|
1294
|
+
return false
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
const vnode = node as VNode
|
|
1298
|
+
const props = vnode.props as Record<string, unknown> | null | undefined
|
|
1299
|
+
if (!props) {
|
|
1300
|
+
return false
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
const classNames = getVNodeClassNames(props.class)
|
|
1304
|
+
|
|
1305
|
+
return (
|
|
1306
|
+
vnode.type === "input"
|
|
1307
|
+
&& props.type === "checkbox"
|
|
1308
|
+
&& classNames.includes("aimd-checkbox")
|
|
1309
|
+
) || (
|
|
1310
|
+
vnode.type === "span"
|
|
1311
|
+
&& classNames.includes("aimd-field__label")
|
|
1312
|
+
)
|
|
1313
|
+
}
|
|
1314
|
+
|
|
647
1315
|
function normalizeCheckBodyNodes(bodyNodes: VNodeChild[] = []): VNodeChild[] {
|
|
648
1316
|
if (bodyNodes.length === 0) {
|
|
649
1317
|
return []
|
|
650
1318
|
}
|
|
651
1319
|
|
|
652
1320
|
const groupedBody = bodyNodes.find((child) => isGroupedCheckBodyNode(child))
|
|
653
|
-
if (
|
|
654
|
-
|
|
655
|
-
|
|
1321
|
+
if (groupedBody && typeof groupedBody === "object" && groupedBody !== null) {
|
|
1322
|
+
const groupedChildren = (groupedBody as VNode).children
|
|
1323
|
+
if (Array.isArray(groupedChildren)) {
|
|
1324
|
+
return groupedChildren as VNodeChild[]
|
|
1325
|
+
}
|
|
656
1326
|
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
1327
|
+
if (groupedChildren == null) {
|
|
1328
|
+
return []
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
return [groupedChildren as VNodeChild]
|
|
660
1332
|
}
|
|
661
1333
|
|
|
662
|
-
|
|
663
|
-
|
|
1334
|
+
const withoutDefaultControl = bodyNodes.filter(child => !isDefaultCheckControlNode(child))
|
|
1335
|
+
if (withoutDefaultControl.length !== bodyNodes.length) {
|
|
1336
|
+
return withoutDefaultControl
|
|
664
1337
|
}
|
|
665
1338
|
|
|
666
|
-
return
|
|
1339
|
+
return bodyNodes
|
|
667
1340
|
}
|
|
668
1341
|
|
|
669
1342
|
function renderInlineStep(node: AimdStepNode, bodyNodes: VNodeChild[] = []): VNode {
|
|
@@ -732,7 +1405,8 @@ function renderInlineStep(node: AimdStepNode, bodyNodes: VNodeChild[] = []): VNo
|
|
|
732
1405
|
},
|
|
733
1406
|
})
|
|
734
1407
|
|
|
735
|
-
|
|
1408
|
+
const assignerVNode = withAssignerControl("step", fieldKey, state, vnode)
|
|
1409
|
+
return applyFieldAdapter("step", fieldKey, node, state, assignerVNode)
|
|
736
1410
|
}
|
|
737
1411
|
|
|
738
1412
|
function renderInlineCheck(node: AimdCheckNode, bodyNodes: VNodeChild[] = []): VNode {
|
|
@@ -754,6 +1428,7 @@ function renderInlineCheck(node: AimdCheckNode, bodyNodes: VNodeChild[] = []): V
|
|
|
754
1428
|
bodyNodes: normalizedBodyNodes,
|
|
755
1429
|
disabled,
|
|
756
1430
|
extraClasses,
|
|
1431
|
+
locale: resolvedLocale.value,
|
|
757
1432
|
messages: resolvedMessages.value,
|
|
758
1433
|
onCheckChange: (payload: { id: string, value: boolean }) => {
|
|
759
1434
|
state.checked = payload.value
|
|
@@ -770,7 +1445,8 @@ function renderInlineCheck(node: AimdCheckNode, bodyNodes: VNodeChild[] = []): V
|
|
|
770
1445
|
},
|
|
771
1446
|
})
|
|
772
1447
|
|
|
773
|
-
|
|
1448
|
+
const assignerVNode = withAssignerControl("check", fieldKey, state, vnode)
|
|
1449
|
+
return applyFieldAdapter("check", fieldKey, node, state, assignerVNode)
|
|
774
1450
|
}
|
|
775
1451
|
|
|
776
1452
|
function renderInlineQuiz(node: AimdQuizNode): VNode {
|
|
@@ -840,6 +1516,9 @@ async function rebuildInlineNodes(
|
|
|
840
1516
|
value: localRecord as Record<string, Record<string, unknown>>,
|
|
841
1517
|
},
|
|
842
1518
|
blockVarTypes: ["AiralogyMarkdown"],
|
|
1519
|
+
elementRenderers: {
|
|
1520
|
+
pre: codeBlockPreRenderer,
|
|
1521
|
+
},
|
|
843
1522
|
aimdRenderers: {
|
|
844
1523
|
var: node => renderInlineVar(node as AimdVarNode),
|
|
845
1524
|
var_table: node => renderInlineVarTable(node as AimdVarTableNode),
|
|
@@ -866,6 +1545,7 @@ async function rebuildInlineNodes(
|
|
|
866
1545
|
async function parseAndBuild() {
|
|
867
1546
|
const currentRequestId = ++buildRequestId
|
|
868
1547
|
const currentInlineRequestId = ++inlineBuildRequestId
|
|
1548
|
+
autoServerAssignerSignatures.clear()
|
|
869
1549
|
try {
|
|
870
1550
|
renderError.value = ""
|
|
871
1551
|
const extracted = parseAndExtract(props.content || "")
|
|
@@ -876,12 +1556,13 @@ async function parseAndBuild() {
|
|
|
876
1556
|
emit("fields-change", extracted)
|
|
877
1557
|
|
|
878
1558
|
const defaultsChanged = ensureDefaultsFromFields(localRecord, extracted)
|
|
879
|
-
const assignerChanged =
|
|
1559
|
+
const assignerChanged = clientAssignerRunner.applyCurrentClientAssigners()
|
|
880
1560
|
if (defaultsChanged || assignerChanged) {
|
|
881
1561
|
emitRecordUpdate()
|
|
882
1562
|
}
|
|
883
1563
|
|
|
884
1564
|
await rebuildInlineNodes(currentRequestId, undefined, currentInlineRequestId)
|
|
1565
|
+
scheduleAutoServerAssigners()
|
|
885
1566
|
} catch (error) {
|
|
886
1567
|
if (currentRequestId !== buildRequestId) {
|
|
887
1568
|
return
|
|
@@ -910,13 +1591,14 @@ watch(
|
|
|
910
1591
|
syncingFromExternal = true
|
|
911
1592
|
applyIncomingRecord(localRecord, value)
|
|
912
1593
|
syncingFromExternal = false
|
|
913
|
-
const assignerChanged =
|
|
1594
|
+
const assignerChanged = clientAssignerRunner.applyCurrentClientAssigners()
|
|
914
1595
|
if (assignerChanged) {
|
|
915
1596
|
emitRecordUpdate()
|
|
916
1597
|
}
|
|
917
1598
|
if (shouldRebuild || assignerChanged) {
|
|
918
1599
|
scheduleInlineRebuild()
|
|
919
1600
|
}
|
|
1601
|
+
scheduleAutoServerAssigners()
|
|
920
1602
|
},
|
|
921
1603
|
{ deep: true, immediate: true },
|
|
922
1604
|
)
|
|
@@ -938,6 +1620,29 @@ watch(
|
|
|
938
1620
|
{ immediate: true, deep: true },
|
|
939
1621
|
)
|
|
940
1622
|
|
|
1623
|
+
watch(
|
|
1624
|
+
() => ({
|
|
1625
|
+
readonly: props.readonly,
|
|
1626
|
+
currentUserName: props.currentUserName,
|
|
1627
|
+
now: props.now,
|
|
1628
|
+
fieldMeta: props.fieldMeta,
|
|
1629
|
+
fieldState: props.fieldState,
|
|
1630
|
+
serverAssigners: props.serverAssigners,
|
|
1631
|
+
assigners: props.assigners,
|
|
1632
|
+
runServerAssigner: props.runServerAssigner,
|
|
1633
|
+
assignerRunner: props.assignerRunner,
|
|
1634
|
+
stepDetailDisplay: props.stepDetailDisplay,
|
|
1635
|
+
customRenderers: props.customRenderers,
|
|
1636
|
+
fieldAdapters: props.fieldAdapters,
|
|
1637
|
+
typePlugins: props.typePlugins,
|
|
1638
|
+
}),
|
|
1639
|
+
() => {
|
|
1640
|
+
scheduleInlineRebuild()
|
|
1641
|
+
scheduleAutoServerAssigners()
|
|
1642
|
+
},
|
|
1643
|
+
{ deep: true },
|
|
1644
|
+
)
|
|
1645
|
+
|
|
941
1646
|
watch(
|
|
942
1647
|
() => props.quizGrades,
|
|
943
1648
|
() => {
|
|
@@ -968,14 +1673,18 @@ watch(
|
|
|
968
1673
|
)
|
|
969
1674
|
|
|
970
1675
|
onBeforeUnmount(() => {
|
|
1676
|
+
for (const controller of serverAssignerAbortControllers.values()) {
|
|
1677
|
+
controller.abort()
|
|
1678
|
+
}
|
|
1679
|
+
serverAssignerAbortControllers.clear()
|
|
971
1680
|
if (protocolTimerTicker) {
|
|
972
1681
|
clearInterval(protocolTimerTicker)
|
|
973
1682
|
}
|
|
974
1683
|
})
|
|
975
1684
|
|
|
976
1685
|
defineExpose({
|
|
977
|
-
runClientAssigner:
|
|
978
|
-
runManualClientAssigners:
|
|
1686
|
+
runClientAssigner: clientAssignerRunner.triggerClientAssigner,
|
|
1687
|
+
runManualClientAssigners: clientAssignerRunner.triggerManualClientAssigners,
|
|
979
1688
|
})
|
|
980
1689
|
</script>
|
|
981
1690
|
|
|
@@ -1015,9 +1724,11 @@ defineExpose({
|
|
|
1015
1724
|
--rec-border: #e3e8ef;
|
|
1016
1725
|
--rec-focus: #2f6fed;
|
|
1017
1726
|
--rec-error: #e03050;
|
|
1727
|
+
--rec-body-font-size: 14px;
|
|
1018
1728
|
--rec-var-control-height: 30px;
|
|
1019
|
-
--rec-var-
|
|
1020
|
-
--rec-var-
|
|
1729
|
+
--rec-var-value-font-size: var(--rec-body-font-size);
|
|
1730
|
+
--rec-var-single-line-height: 1.4;
|
|
1731
|
+
--rec-var-text-wrap-line-height: 1.4;
|
|
1021
1732
|
}
|
|
1022
1733
|
|
|
1023
1734
|
.aimd-protocol-recorder__error {
|
|
@@ -1063,6 +1774,7 @@ defineExpose({
|
|
|
1063
1774
|
background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
|
|
1064
1775
|
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
|
|
1065
1776
|
color: var(--rec-text);
|
|
1777
|
+
font-size: var(--rec-body-font-size);
|
|
1066
1778
|
line-height: 1.7;
|
|
1067
1779
|
}
|
|
1068
1780
|
|
|
@@ -1086,7 +1798,49 @@ defineExpose({
|
|
|
1086
1798
|
.aimd-protocol-recorder__content :deep(td) { border: 1px solid #e2e8f0; padding: 6px 10px; text-align: left; }
|
|
1087
1799
|
.aimd-protocol-recorder__content :deep(th) { background: #f8fafc; }
|
|
1088
1800
|
.aimd-protocol-recorder__content :deep(blockquote) { margin: 8px 0; padding: 8px 12px; border-left: 3px solid #d8dee8; color: #666; background: #fafbfc; }
|
|
1089
|
-
.aimd-protocol-recorder__content :deep(code) { background: #f0f2f5; border-radius: 4px; padding: 2px 5px; }
|
|
1801
|
+
.aimd-protocol-recorder__content :deep(:not(pre) > code) { background: #f0f2f5; border-radius: 4px; padding: 2px 5px; }
|
|
1802
|
+
.aimd-protocol-recorder__content :deep(.aimd-code-block) {
|
|
1803
|
+
max-width: 100%;
|
|
1804
|
+
overflow: hidden;
|
|
1805
|
+
margin: 12px 0;
|
|
1806
|
+
padding: 0;
|
|
1807
|
+
border: 1px solid #d8e1ee;
|
|
1808
|
+
border-radius: 8px;
|
|
1809
|
+
background: #f8fafc;
|
|
1810
|
+
color: #0f172a;
|
|
1811
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
|
|
1812
|
+
font-size: 13px;
|
|
1813
|
+
line-height: 1.58;
|
|
1814
|
+
white-space: normal;
|
|
1815
|
+
}
|
|
1816
|
+
.aimd-protocol-recorder__content :deep(.aimd-code-block__code) {
|
|
1817
|
+
display: block;
|
|
1818
|
+
padding: 10px 0;
|
|
1819
|
+
border-radius: 0;
|
|
1820
|
+
background: transparent;
|
|
1821
|
+
}
|
|
1822
|
+
.aimd-protocol-recorder__content :deep(.aimd-code-block__line) {
|
|
1823
|
+
display: grid;
|
|
1824
|
+
grid-template-columns: max-content minmax(0, 1fr);
|
|
1825
|
+
column-gap: 12px;
|
|
1826
|
+
padding-right: 12px;
|
|
1827
|
+
}
|
|
1828
|
+
.aimd-protocol-recorder__content :deep(.aimd-code-block__line-number) {
|
|
1829
|
+
min-width: 3ch;
|
|
1830
|
+
padding-left: 12px;
|
|
1831
|
+
color: #94a3b8;
|
|
1832
|
+
text-align: right;
|
|
1833
|
+
user-select: none;
|
|
1834
|
+
}
|
|
1835
|
+
.aimd-protocol-recorder__content :deep(.aimd-code-block__line-code) {
|
|
1836
|
+
min-width: 0;
|
|
1837
|
+
white-space: pre-wrap;
|
|
1838
|
+
overflow-wrap: anywhere;
|
|
1839
|
+
}
|
|
1840
|
+
.aimd-protocol-recorder__content :deep(.aimd-code-block--wrap .aimd-code-block__line-code) {
|
|
1841
|
+
padding-left: var(--aimd-code-wrap-indent, 0ch);
|
|
1842
|
+
text-indent: calc(-1 * var(--aimd-code-wrap-indent, 0ch));
|
|
1843
|
+
}
|
|
1090
1844
|
|
|
1091
1845
|
/* ── Field base ─────────────────────────────────────────────────────────── */
|
|
1092
1846
|
.aimd-protocol-recorder__content :deep(.aimd-field) {
|
|
@@ -1103,16 +1857,124 @@ defineExpose({
|
|
|
1103
1857
|
text-transform: lowercase;
|
|
1104
1858
|
}
|
|
1105
1859
|
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1860
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-assigner-field) {
|
|
1861
|
+
display: inline-flex;
|
|
1862
|
+
max-width: 100%;
|
|
1863
|
+
align-items: center;
|
|
1864
|
+
gap: 0;
|
|
1865
|
+
vertical-align: middle;
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1868
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-assigner-field--var) {
|
|
1869
|
+
align-items: flex-end;
|
|
1870
|
+
}
|
|
1871
|
+
|
|
1872
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-assigner-field--var_table),
|
|
1873
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-assigner-field--step),
|
|
1874
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-assigner-field--check) {
|
|
1875
|
+
display: flex;
|
|
1876
|
+
align-items: flex-start;
|
|
1877
|
+
}
|
|
1878
|
+
|
|
1879
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-assigner-field__control) {
|
|
1880
|
+
min-width: 0;
|
|
1881
|
+
flex: 1 1 auto;
|
|
1882
|
+
}
|
|
1883
|
+
|
|
1884
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-assigner-field--var .aimd-rec-assigner-field__control) {
|
|
1885
|
+
flex: 0 1 auto;
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-assigner-field__button) {
|
|
1889
|
+
display: inline-flex;
|
|
1890
|
+
flex: 0 0 auto;
|
|
1891
|
+
width: 30px;
|
|
1892
|
+
min-width: 30px;
|
|
1893
|
+
height: 34px;
|
|
1894
|
+
min-height: 34px;
|
|
1895
|
+
align-items: center;
|
|
1896
|
+
justify-content: center;
|
|
1897
|
+
padding: 0;
|
|
1898
|
+
border: 1px solid #2563eb;
|
|
1899
|
+
border-radius: 7px 0 0 7px;
|
|
1900
|
+
margin-right: -1px;
|
|
1901
|
+
background: #2563eb;
|
|
1902
|
+
color: #ffffff;
|
|
1903
|
+
cursor: pointer;
|
|
1904
|
+
font-size: 17px;
|
|
1905
|
+
line-height: 1;
|
|
1906
|
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
|
|
1907
|
+
transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
|
|
1908
|
+
}
|
|
1909
|
+
|
|
1910
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-assigner-field__button:hover:not(:disabled)) {
|
|
1911
|
+
border-color: #1d4ed8;
|
|
1912
|
+
background: #1d4ed8;
|
|
1913
|
+
}
|
|
1914
|
+
|
|
1915
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-assigner-field__button:focus-visible) {
|
|
1916
|
+
outline: 2px solid rgba(37, 99, 235, 0.35);
|
|
1917
|
+
outline-offset: 2px;
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1920
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-assigner-field__button:disabled) {
|
|
1921
|
+
cursor: not-allowed;
|
|
1922
|
+
opacity: 0.7;
|
|
1923
|
+
}
|
|
1924
|
+
|
|
1925
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-assigner-field__icon) {
|
|
1926
|
+
display: block;
|
|
1927
|
+
width: 1em;
|
|
1928
|
+
height: 1em;
|
|
1929
|
+
}
|
|
1930
|
+
|
|
1931
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-assigner-field__label) {
|
|
1932
|
+
position: absolute;
|
|
1933
|
+
width: 1px;
|
|
1934
|
+
height: 1px;
|
|
1935
|
+
margin: -1px;
|
|
1936
|
+
padding: 0;
|
|
1937
|
+
overflow: hidden;
|
|
1938
|
+
clip: rect(0, 0, 0, 0);
|
|
1939
|
+
white-space: nowrap;
|
|
1940
|
+
border: 0;
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-assigner-field__spinner) {
|
|
1944
|
+
width: 15px;
|
|
1945
|
+
height: 15px;
|
|
1946
|
+
border: 2px solid rgba(255, 255, 255, 0.38);
|
|
1947
|
+
border-top-color: #ffffff;
|
|
1948
|
+
border-radius: 999px;
|
|
1949
|
+
animation: aimd-rec-assigner-spin 0.75s linear infinite;
|
|
1950
|
+
}
|
|
1951
|
+
|
|
1952
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-assigner-field__error) {
|
|
1953
|
+
min-width: 0;
|
|
1954
|
+
margin-left: 8px;
|
|
1955
|
+
color: #b42318;
|
|
1956
|
+
font-size: 12px;
|
|
1957
|
+
line-height: 1.35;
|
|
1958
|
+
}
|
|
1959
|
+
|
|
1960
|
+
@keyframes aimd-rec-assigner-spin {
|
|
1961
|
+
to {
|
|
1962
|
+
transform: rotate(360deg);
|
|
1963
|
+
}
|
|
1964
|
+
}
|
|
1965
|
+
|
|
1966
|
+
/* ── Field colours ──────────────────────────────────────────────────────── */
|
|
1967
|
+
.aimd-protocol-recorder__content :deep(.aimd-field--var) { background: #f3f8ff; border-color: #c9dcff; color: #1c4e90; }
|
|
1968
|
+
.aimd-protocol-recorder__content :deep(.aimd-field--var .aimd-field__scope) { background: #dceaff; color: #255eab; }
|
|
1969
|
+
.aimd-protocol-recorder__content :deep(.aimd-field--step) { background: #fff9ef; border-color: #f4d9a8; color: #9a5800; }
|
|
1970
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--step > .aimd-step-field__main .aimd-rec-inline__check-wrap > .aimd-field__scope) { background: #ffe8bf; color: #9a5800; }
|
|
1971
|
+
.aimd-protocol-recorder__content :deep(.aimd-field--check) { background: #fffafa; border-color: rgba(185, 28, 28, 0.2); color: #2b3443; padding: 3px 8px; }
|
|
1972
|
+
.aimd-protocol-recorder__content :deep(.aimd-field--check .aimd-field__scope) { background: #fee2e2; color: #991b1b; }
|
|
1973
|
+
.aimd-protocol-recorder__content :deep(.aimd-field--check.aimd-rec-inline--check-passed) { background: #f6fdf9; border-color: rgba(22, 101, 52, 0.22); color: #1f3d2a; }
|
|
1974
|
+
.aimd-protocol-recorder__content :deep(.aimd-field--check.aimd-rec-inline--check-passed .aimd-field__scope) { background: #dcfce7; color: #166534; }
|
|
1975
|
+
.aimd-protocol-recorder__content :deep(.aimd-field--var-table) {
|
|
1976
|
+
display: block;
|
|
1977
|
+
width: 100%;
|
|
1116
1978
|
max-width: 100%;
|
|
1117
1979
|
box-sizing: border-box;
|
|
1118
1980
|
background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(251, 252, 251, 0.98) 100%);
|
|
@@ -1132,8 +1994,11 @@ defineExpose({
|
|
|
1132
1994
|
color: #1f2937;
|
|
1133
1995
|
}
|
|
1134
1996
|
.aimd-protocol-recorder__content :deep(.aimd-field--var-table .aimd-field__header) {
|
|
1135
|
-
display:
|
|
1997
|
+
display: flex;
|
|
1998
|
+
align-items: center;
|
|
1999
|
+
gap: 8px;
|
|
1136
2000
|
flex-wrap: wrap;
|
|
2001
|
+
width: 100%;
|
|
1137
2002
|
max-width: 100%;
|
|
1138
2003
|
}
|
|
1139
2004
|
.aimd-protocol-recorder__content :deep(.aimd-field--var-table .aimd-field__table-preview),
|
|
@@ -1141,6 +2006,46 @@ defineExpose({
|
|
|
1141
2006
|
width: 100%;
|
|
1142
2007
|
max-width: 100%;
|
|
1143
2008
|
}
|
|
2009
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline-table__header-actions) {
|
|
2010
|
+
display: inline-flex;
|
|
2011
|
+
flex: 0 0 auto;
|
|
2012
|
+
align-items: center;
|
|
2013
|
+
gap: 4px;
|
|
2014
|
+
margin-left: auto;
|
|
2015
|
+
}
|
|
2016
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline-table__header-action),
|
|
2017
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline-table__header-state) {
|
|
2018
|
+
display: inline-flex;
|
|
2019
|
+
align-items: center;
|
|
2020
|
+
justify-content: center;
|
|
2021
|
+
}
|
|
2022
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline-table__header-action .aimd-rec-assigner-field__button) {
|
|
2023
|
+
width: 30px;
|
|
2024
|
+
min-width: 30px;
|
|
2025
|
+
height: 26px;
|
|
2026
|
+
min-height: 26px;
|
|
2027
|
+
border: 0 none;
|
|
2028
|
+
border-radius: 6px;
|
|
2029
|
+
margin: 0;
|
|
2030
|
+
background: #edf6ff;
|
|
2031
|
+
color: #1976d2;
|
|
2032
|
+
box-shadow: none;
|
|
2033
|
+
font-size: 16px;
|
|
2034
|
+
}
|
|
2035
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline-table__header-action .aimd-rec-assigner-field__button:hover:not(:disabled)) {
|
|
2036
|
+
background: #dbeafe;
|
|
2037
|
+
color: #1565c0;
|
|
2038
|
+
}
|
|
2039
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline-table__header-action .aimd-rec-assigner-field__spinner) {
|
|
2040
|
+
border-color: rgba(25, 118, 210, 0.25);
|
|
2041
|
+
border-top-color: #1976d2;
|
|
2042
|
+
}
|
|
2043
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline-table__header-state .aimd-rec-assigner-field__status) {
|
|
2044
|
+
font-size: 16px;
|
|
2045
|
+
}
|
|
2046
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline-table__assigner-error) {
|
|
2047
|
+
margin: 6px 0 8px;
|
|
2048
|
+
}
|
|
1144
2049
|
/* ── Error & loading ────────────────────────────────────────────────────── */
|
|
1145
2050
|
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--error) { border-color: var(--rec-error) !important; }
|
|
1146
2051
|
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--error:focus-within) { box-shadow: 0 0 0 2px rgba(224, 48, 80, 0.12); }
|
|
@@ -1170,32 +2075,106 @@ defineExpose({
|
|
|
1170
2075
|
box-shadow: none;
|
|
1171
2076
|
background: #f7fbff;
|
|
1172
2077
|
}
|
|
2078
|
+
/* Metadata popovers need to escape the compact field; plain fields clip child backgrounds so corners stay clean. */
|
|
2079
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--var-stacked:has(.aimd-field__metadata-host)) {
|
|
2080
|
+
overflow: visible;
|
|
2081
|
+
}
|
|
1173
2082
|
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--var-stacked--textarea) { min-width: 0; }
|
|
1174
2083
|
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--var-stacked--checkbox) { width: fit-content; min-width: 0; }
|
|
1175
2084
|
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--var-stacked:focus-within) {
|
|
1176
2085
|
border-color: var(--aimd-border-color-focus, #4181fd);
|
|
1177
2086
|
box-shadow: 0 0 0 2px rgba(65, 129, 253, 0.14);
|
|
1178
2087
|
}
|
|
1179
|
-
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--var-stacked .aimd-field) { margin: 0; box-shadow: none; }
|
|
1180
|
-
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--var-stacked .aimd-field--no-style.aimd-field__label) { min-height: 30px; border-radius: 6px 6px 0 0; }
|
|
1181
|
-
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--var-stacked .aimd-field__scope) { align-self: center; height: 22px; margin-left: 3px; padding: 0 7px; border-radius: 6px; }
|
|
1182
|
-
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--var-stacked .aimd-
|
|
2088
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--var-stacked .aimd-field) { margin: 0; box-shadow: none; }
|
|
2089
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--var-stacked .aimd-field--no-style.aimd-field__label) { min-height: 30px; border-radius: 6px 6px 0 0; }
|
|
2090
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--var-stacked .aimd-field__scope) { align-self: center; height: 22px; margin-left: 3px; padding: 0 7px; border-radius: 6px; }
|
|
2091
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--var-stacked .aimd-field__name) {
|
|
2092
|
+
display: flex;
|
|
2093
|
+
flex: 1;
|
|
2094
|
+
align-items: center;
|
|
2095
|
+
min-width: 0;
|
|
2096
|
+
padding: 4px 10px 4px 6px;
|
|
2097
|
+
font-size: 13px;
|
|
2098
|
+
font-weight: 600;
|
|
2099
|
+
color: #1565c0;
|
|
2100
|
+
white-space: nowrap;
|
|
2101
|
+
}
|
|
2102
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--var-stacked .aimd-field__name--with-metadata) {
|
|
2103
|
+
align-items: flex-start;
|
|
2104
|
+
justify-content: center;
|
|
2105
|
+
gap: 2px;
|
|
2106
|
+
min-height: 34px;
|
|
2107
|
+
white-space: normal;
|
|
2108
|
+
}
|
|
2109
|
+
.aimd-protocol-recorder__content :deep(.aimd-field__key) {
|
|
2110
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
|
|
2111
|
+
font-size: 11px;
|
|
2112
|
+
font-weight: 500;
|
|
2113
|
+
line-height: 1.2;
|
|
2114
|
+
color: #64748b;
|
|
2115
|
+
}
|
|
2116
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--var-stacked .aimd-field__id) { display: flex; flex: 1; align-items: center; padding: 0 10px 0 6px; font-size: 13px; font-weight: 500; color: #1565c0; white-space: nowrap; }
|
|
2117
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__header-assigner-actions) {
|
|
2118
|
+
display: inline-flex;
|
|
2119
|
+
flex: 0 0 auto;
|
|
2120
|
+
align-items: center;
|
|
2121
|
+
gap: 4px;
|
|
2122
|
+
margin-left: auto;
|
|
2123
|
+
padding-right: 6px;
|
|
2124
|
+
}
|
|
2125
|
+
|
|
2126
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__header-assigner-action),
|
|
2127
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__header-assigner-state) {
|
|
2128
|
+
display: inline-flex;
|
|
2129
|
+
align-items: center;
|
|
2130
|
+
justify-content: center;
|
|
2131
|
+
}
|
|
2132
|
+
|
|
2133
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__header-assigner-action .aimd-rec-assigner-field__button) {
|
|
2134
|
+
width: 30px;
|
|
2135
|
+
min-width: 30px;
|
|
2136
|
+
height: 26px;
|
|
2137
|
+
min-height: 26px;
|
|
2138
|
+
border: 0 none;
|
|
2139
|
+
border-radius: 6px;
|
|
2140
|
+
margin: 0;
|
|
2141
|
+
background: #eaf4ff;
|
|
2142
|
+
color: #1976d2;
|
|
2143
|
+
box-shadow: none;
|
|
2144
|
+
font-size: 16px;
|
|
2145
|
+
}
|
|
2146
|
+
|
|
2147
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__header-assigner-action .aimd-rec-assigner-field__button:hover:not(:disabled)) {
|
|
2148
|
+
background: #dbeafe;
|
|
2149
|
+
color: #1565c0;
|
|
2150
|
+
}
|
|
2151
|
+
|
|
2152
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__header-assigner-action .aimd-rec-assigner-field__spinner) {
|
|
2153
|
+
border-color: rgba(25, 118, 210, 0.25);
|
|
2154
|
+
border-top-color: #1976d2;
|
|
2155
|
+
}
|
|
2156
|
+
|
|
2157
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__header-assigner-state .aimd-rec-assigner-field__status) {
|
|
2158
|
+
font-size: 16px;
|
|
2159
|
+
}
|
|
1183
2160
|
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--var-markdown) {
|
|
1184
2161
|
display: flex;
|
|
1185
2162
|
flex-direction: column;
|
|
1186
2163
|
align-items: stretch;
|
|
1187
2164
|
gap: 0;
|
|
1188
|
-
width:
|
|
2165
|
+
width: 100%;
|
|
1189
2166
|
max-width: 100%;
|
|
1190
2167
|
margin: 12px 0;
|
|
1191
2168
|
vertical-align: top;
|
|
2169
|
+
box-sizing: border-box;
|
|
1192
2170
|
}
|
|
1193
2171
|
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--var-stacked--code) {
|
|
1194
|
-
width:
|
|
2172
|
+
width: 100%;
|
|
1195
2173
|
min-width: min(420px, 100%);
|
|
1196
2174
|
max-width: 100%;
|
|
1197
2175
|
margin: 12px 0;
|
|
1198
2176
|
vertical-align: top;
|
|
2177
|
+
box-sizing: border-box;
|
|
1199
2178
|
}
|
|
1200
2179
|
|
|
1201
2180
|
/* ── Stacked input controls ─────────────────────────────────────────────── */
|
|
@@ -1203,9 +2182,11 @@ defineExpose({
|
|
|
1203
2182
|
width: 100%;
|
|
1204
2183
|
min-width: 0;
|
|
1205
2184
|
height: var(--rec-var-control-height);
|
|
1206
|
-
font
|
|
1207
|
-
font-size:
|
|
2185
|
+
font: inherit;
|
|
2186
|
+
font-size: var(--rec-var-value-font-size);
|
|
2187
|
+
font-weight: 400;
|
|
1208
2188
|
line-height: var(--rec-var-single-line-height);
|
|
2189
|
+
color: var(--rec-text);
|
|
1209
2190
|
border: 0 none;
|
|
1210
2191
|
border-top: 1px solid var(--aimd-border-color, #90caf9);
|
|
1211
2192
|
border-radius: 0 0 6px 6px;
|
|
@@ -1219,9 +2200,11 @@ defineExpose({
|
|
|
1219
2200
|
width: 100%;
|
|
1220
2201
|
min-width: 0;
|
|
1221
2202
|
min-height: 82px;
|
|
1222
|
-
font
|
|
1223
|
-
font-size:
|
|
1224
|
-
|
|
2203
|
+
font: inherit;
|
|
2204
|
+
font-size: var(--rec-var-value-font-size);
|
|
2205
|
+
font-weight: 400;
|
|
2206
|
+
line-height: var(--rec-var-text-wrap-line-height);
|
|
2207
|
+
color: var(--rec-text);
|
|
1225
2208
|
border: 0 none;
|
|
1226
2209
|
border-top: 1px solid var(--aimd-border-color, #90caf9);
|
|
1227
2210
|
border-radius: 0 0 6px 6px;
|
|
@@ -1235,9 +2218,11 @@ defineExpose({
|
|
|
1235
2218
|
width: 100%;
|
|
1236
2219
|
min-width: 0;
|
|
1237
2220
|
min-height: var(--rec-var-control-height);
|
|
1238
|
-
font
|
|
1239
|
-
font-size:
|
|
2221
|
+
font: inherit;
|
|
2222
|
+
font-size: var(--rec-var-value-font-size);
|
|
2223
|
+
font-weight: 400;
|
|
1240
2224
|
line-height: var(--rec-var-text-wrap-line-height);
|
|
2225
|
+
color: var(--rec-text);
|
|
1241
2226
|
border: 0 none;
|
|
1242
2227
|
border-top: 1px solid var(--aimd-border-color, #90caf9);
|
|
1243
2228
|
border-radius: 0 0 6px 6px;
|
|
@@ -1259,8 +2244,415 @@ defineExpose({
|
|
|
1259
2244
|
background: #fff;
|
|
1260
2245
|
}
|
|
1261
2246
|
|
|
2247
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__file-control) {
|
|
2248
|
+
display: flex;
|
|
2249
|
+
flex-direction: column;
|
|
2250
|
+
align-items: stretch;
|
|
2251
|
+
gap: 8px;
|
|
2252
|
+
width: 100%;
|
|
2253
|
+
min-width: 0;
|
|
2254
|
+
min-height: var(--rec-var-control-height);
|
|
2255
|
+
padding: 8px;
|
|
2256
|
+
border-top: 1px solid var(--aimd-border-color, #90caf9);
|
|
2257
|
+
border-radius: 0 0 6px 6px;
|
|
2258
|
+
box-sizing: border-box;
|
|
2259
|
+
background: #fff;
|
|
2260
|
+
}
|
|
2261
|
+
|
|
2262
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-field__trigger) {
|
|
2263
|
+
position: relative;
|
|
2264
|
+
display: flex;
|
|
2265
|
+
flex: 1 1 auto;
|
|
2266
|
+
min-width: 0;
|
|
2267
|
+
min-height: var(--rec-var-control-height);
|
|
2268
|
+
align-items: center;
|
|
2269
|
+
gap: 8px;
|
|
2270
|
+
padding: 0 8px;
|
|
2271
|
+
border: 1px dashed #cbd5e1;
|
|
2272
|
+
border-radius: 6px;
|
|
2273
|
+
background: #f8fafc;
|
|
2274
|
+
cursor: pointer;
|
|
2275
|
+
}
|
|
2276
|
+
|
|
2277
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-field__trigger--disabled) {
|
|
2278
|
+
cursor: not-allowed;
|
|
2279
|
+
opacity: 0.72;
|
|
2280
|
+
}
|
|
2281
|
+
|
|
2282
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-field__input) {
|
|
2283
|
+
position: absolute;
|
|
2284
|
+
width: 1px;
|
|
2285
|
+
height: 1px;
|
|
2286
|
+
opacity: 0;
|
|
2287
|
+
pointer-events: none;
|
|
2288
|
+
}
|
|
2289
|
+
|
|
2290
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-field__badge) {
|
|
2291
|
+
display: inline-flex;
|
|
2292
|
+
flex: 0 0 auto;
|
|
2293
|
+
min-width: 38px;
|
|
2294
|
+
height: 22px;
|
|
2295
|
+
align-items: center;
|
|
2296
|
+
justify-content: center;
|
|
2297
|
+
padding: 0 7px;
|
|
2298
|
+
border-radius: 6px;
|
|
2299
|
+
background: #e3f2fd;
|
|
2300
|
+
color: #1565c0;
|
|
2301
|
+
font-size: 10px;
|
|
2302
|
+
font-weight: 700;
|
|
2303
|
+
line-height: 1;
|
|
2304
|
+
}
|
|
2305
|
+
|
|
2306
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-field__badge--csv),
|
|
2307
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-field__badge--text) {
|
|
2308
|
+
background: #e0f2fe;
|
|
2309
|
+
color: #0369a1;
|
|
2310
|
+
}
|
|
2311
|
+
|
|
2312
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-field__badge--image) {
|
|
2313
|
+
background: #dcfce7;
|
|
2314
|
+
color: #15803d;
|
|
2315
|
+
}
|
|
2316
|
+
|
|
2317
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-field__badge--audio),
|
|
2318
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-field__badge--video) {
|
|
2319
|
+
background: #fef3c7;
|
|
2320
|
+
color: #a16207;
|
|
2321
|
+
}
|
|
2322
|
+
|
|
2323
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-field__badge--document) {
|
|
2324
|
+
background: #ede9fe;
|
|
2325
|
+
color: #6d28d9;
|
|
2326
|
+
}
|
|
2327
|
+
|
|
2328
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-field__name) {
|
|
2329
|
+
min-width: 0;
|
|
2330
|
+
overflow: hidden;
|
|
2331
|
+
color: var(--rec-text);
|
|
2332
|
+
font-size: 14px;
|
|
2333
|
+
font-weight: 600;
|
|
2334
|
+
line-height: 1.35;
|
|
2335
|
+
text-overflow: ellipsis;
|
|
2336
|
+
white-space: nowrap;
|
|
2337
|
+
}
|
|
2338
|
+
|
|
2339
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-field__name--placeholder) {
|
|
2340
|
+
color: #94a3b8;
|
|
2341
|
+
font-weight: 500;
|
|
2342
|
+
}
|
|
2343
|
+
|
|
2344
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-card) {
|
|
2345
|
+
display: flex;
|
|
2346
|
+
flex-direction: column;
|
|
2347
|
+
gap: 8px;
|
|
2348
|
+
width: 100%;
|
|
2349
|
+
min-width: 0;
|
|
2350
|
+
padding: 10px;
|
|
2351
|
+
border: 1px solid #e2e8f0;
|
|
2352
|
+
border-radius: 6px;
|
|
2353
|
+
background: #f8fafc;
|
|
2354
|
+
box-sizing: border-box;
|
|
2355
|
+
transition: border-color 0.16s ease, background-color 0.16s ease;
|
|
2356
|
+
}
|
|
2357
|
+
|
|
2358
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-card:hover) {
|
|
2359
|
+
border-color: #cbd5e1;
|
|
2360
|
+
background: #f1f5f9;
|
|
2361
|
+
}
|
|
2362
|
+
|
|
2363
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-card__header) {
|
|
2364
|
+
display: flex;
|
|
2365
|
+
min-width: 0;
|
|
2366
|
+
align-items: center;
|
|
2367
|
+
gap: 10px;
|
|
2368
|
+
}
|
|
2369
|
+
|
|
2370
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-card__identity) {
|
|
2371
|
+
display: flex;
|
|
2372
|
+
min-width: 0;
|
|
2373
|
+
flex: 1 1 auto;
|
|
2374
|
+
align-items: center;
|
|
2375
|
+
gap: 8px;
|
|
2376
|
+
}
|
|
2377
|
+
|
|
2378
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-card__text) {
|
|
2379
|
+
display: flex;
|
|
2380
|
+
min-width: 0;
|
|
2381
|
+
flex: 1 1 auto;
|
|
2382
|
+
flex-direction: column;
|
|
2383
|
+
gap: 2px;
|
|
2384
|
+
}
|
|
2385
|
+
|
|
2386
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-card__meta) {
|
|
2387
|
+
overflow: hidden;
|
|
2388
|
+
color: #64748b;
|
|
2389
|
+
font-size: 11px;
|
|
2390
|
+
line-height: 1.25;
|
|
2391
|
+
text-overflow: ellipsis;
|
|
2392
|
+
white-space: nowrap;
|
|
2393
|
+
}
|
|
2394
|
+
|
|
2395
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-card__actions) {
|
|
2396
|
+
display: flex;
|
|
2397
|
+
flex: 0 0 auto;
|
|
2398
|
+
align-items: center;
|
|
2399
|
+
gap: 4px;
|
|
2400
|
+
}
|
|
2401
|
+
|
|
2402
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-card__action) {
|
|
2403
|
+
position: relative;
|
|
2404
|
+
display: inline-flex;
|
|
2405
|
+
width: 26px;
|
|
2406
|
+
height: 26px;
|
|
2407
|
+
align-items: center;
|
|
2408
|
+
justify-content: center;
|
|
2409
|
+
padding: 0;
|
|
2410
|
+
border: 0;
|
|
2411
|
+
border-radius: 6px;
|
|
2412
|
+
background: transparent;
|
|
2413
|
+
color: #64748b;
|
|
2414
|
+
cursor: pointer;
|
|
2415
|
+
font-size: 15px;
|
|
2416
|
+
line-height: 1;
|
|
2417
|
+
text-decoration: none;
|
|
2418
|
+
}
|
|
2419
|
+
|
|
2420
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-card__replace input) {
|
|
2421
|
+
position: absolute;
|
|
2422
|
+
width: 1px;
|
|
2423
|
+
height: 1px;
|
|
2424
|
+
opacity: 0;
|
|
2425
|
+
pointer-events: none;
|
|
2426
|
+
}
|
|
2427
|
+
|
|
2428
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-card__action:hover) {
|
|
2429
|
+
background: #e2e8f0;
|
|
2430
|
+
color: #1f2937;
|
|
2431
|
+
}
|
|
2432
|
+
|
|
2433
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-card__action--danger:hover) {
|
|
2434
|
+
background: #fee2e2;
|
|
2435
|
+
color: #b91c1c;
|
|
2436
|
+
}
|
|
2437
|
+
|
|
2438
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-card__action-label) {
|
|
2439
|
+
position: absolute;
|
|
2440
|
+
width: 1px;
|
|
2441
|
+
height: 1px;
|
|
2442
|
+
overflow: hidden;
|
|
2443
|
+
clip: rect(0 0 0 0);
|
|
2444
|
+
white-space: nowrap;
|
|
2445
|
+
}
|
|
2446
|
+
|
|
2447
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-field__preview) {
|
|
2448
|
+
display: flex;
|
|
2449
|
+
width: 100%;
|
|
2450
|
+
min-height: 120px;
|
|
2451
|
+
max-height: 280px;
|
|
2452
|
+
align-items: center;
|
|
2453
|
+
justify-content: center;
|
|
2454
|
+
overflow: hidden;
|
|
2455
|
+
border: 1px solid #e2e8f0;
|
|
2456
|
+
border-radius: 6px;
|
|
2457
|
+
background: #fff;
|
|
2458
|
+
}
|
|
2459
|
+
|
|
2460
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__file-control[data-file-kind="image"] .aimd-rec-file-field__preview) {
|
|
2461
|
+
min-height: 190px;
|
|
2462
|
+
max-height: 420px;
|
|
2463
|
+
}
|
|
2464
|
+
|
|
2465
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-field__preview img) {
|
|
2466
|
+
display: block;
|
|
2467
|
+
width: auto;
|
|
2468
|
+
height: auto;
|
|
2469
|
+
max-width: 100%;
|
|
2470
|
+
max-height: 260px;
|
|
2471
|
+
object-fit: contain;
|
|
2472
|
+
}
|
|
2473
|
+
|
|
2474
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__file-control[data-file-kind="image"] .aimd-rec-file-field__preview img) {
|
|
2475
|
+
max-height: 390px;
|
|
2476
|
+
}
|
|
2477
|
+
|
|
2478
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-field__csv-preview) {
|
|
2479
|
+
display: block;
|
|
2480
|
+
min-width: 0;
|
|
2481
|
+
overflow: hidden;
|
|
2482
|
+
border: 1px solid #e2e8f0;
|
|
2483
|
+
border-radius: 6px;
|
|
2484
|
+
background: #fff;
|
|
2485
|
+
}
|
|
2486
|
+
|
|
2487
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-field__csv-grid) {
|
|
2488
|
+
display: table;
|
|
2489
|
+
width: 100%;
|
|
2490
|
+
border-collapse: collapse;
|
|
2491
|
+
table-layout: fixed;
|
|
2492
|
+
}
|
|
2493
|
+
|
|
2494
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-field__csv-row) {
|
|
2495
|
+
display: table-row;
|
|
2496
|
+
}
|
|
2497
|
+
|
|
2498
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-field__csv-row--head) {
|
|
2499
|
+
color: #0369a1;
|
|
2500
|
+
font-weight: 700;
|
|
2501
|
+
}
|
|
2502
|
+
|
|
2503
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-field__csv-cell) {
|
|
2504
|
+
display: table-cell;
|
|
2505
|
+
max-width: 12ch;
|
|
2506
|
+
overflow: hidden;
|
|
2507
|
+
padding: 2px 6px;
|
|
2508
|
+
border-top: 1px solid #e0f2fe;
|
|
2509
|
+
color: #334155;
|
|
2510
|
+
font-size: 11px;
|
|
2511
|
+
line-height: 1.4;
|
|
2512
|
+
text-overflow: ellipsis;
|
|
2513
|
+
white-space: nowrap;
|
|
2514
|
+
}
|
|
2515
|
+
|
|
2516
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-field__csv-row:first-child .aimd-rec-file-field__csv-cell) {
|
|
2517
|
+
border-top: 0;
|
|
2518
|
+
}
|
|
2519
|
+
|
|
2520
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-file-field__error) {
|
|
2521
|
+
flex: 0 0 auto;
|
|
2522
|
+
color: #dc2626;
|
|
2523
|
+
font-size: 12px;
|
|
2524
|
+
}
|
|
2525
|
+
|
|
2526
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--has-assigner-control) {
|
|
2527
|
+
overflow: hidden;
|
|
2528
|
+
}
|
|
2529
|
+
|
|
2530
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--var-stacked--file.aimd-rec-inline--has-assigner-control:has(.aimd-field__metadata-host)) {
|
|
2531
|
+
overflow: visible;
|
|
2532
|
+
}
|
|
2533
|
+
|
|
2534
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__control-row) {
|
|
2535
|
+
display: flex;
|
|
2536
|
+
width: 100%;
|
|
2537
|
+
min-width: 0;
|
|
2538
|
+
min-height: var(--rec-var-control-height);
|
|
2539
|
+
align-items: stretch;
|
|
2540
|
+
border-top: 1px solid var(--aimd-border-color, #90caf9);
|
|
2541
|
+
border-radius: 0 0 6px 6px;
|
|
2542
|
+
overflow: hidden;
|
|
2543
|
+
background: #fff;
|
|
2544
|
+
}
|
|
2545
|
+
|
|
2546
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__assigner-prefix) {
|
|
2547
|
+
display: flex;
|
|
2548
|
+
flex: 0 0 36px;
|
|
2549
|
+
align-items: stretch;
|
|
2550
|
+
justify-content: stretch;
|
|
2551
|
+
border-right: 1px solid #e2e8f0;
|
|
2552
|
+
background: #f8fafc;
|
|
2553
|
+
}
|
|
2554
|
+
|
|
2555
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__control-main) {
|
|
2556
|
+
display: flex;
|
|
2557
|
+
min-width: 0;
|
|
2558
|
+
flex: 1 1 auto;
|
|
2559
|
+
align-items: stretch;
|
|
2560
|
+
}
|
|
2561
|
+
|
|
2562
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__assigner-status) {
|
|
2563
|
+
display: flex;
|
|
2564
|
+
flex: 0 0 30px;
|
|
2565
|
+
align-items: center;
|
|
2566
|
+
justify-content: center;
|
|
2567
|
+
border-left: 1px solid #e2e8f0;
|
|
2568
|
+
background: #fff;
|
|
2569
|
+
}
|
|
2570
|
+
|
|
2571
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__control-row .aimd-rec-inline__input--stacked),
|
|
2572
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__control-row .aimd-rec-inline__textarea--stacked),
|
|
2573
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__control-row .aimd-rec-inline__checkbox-row),
|
|
2574
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__control-row .aimd-rec-inline__file-control) {
|
|
2575
|
+
width: 100%;
|
|
2576
|
+
height: auto;
|
|
2577
|
+
min-height: var(--rec-var-control-height);
|
|
2578
|
+
flex: 1 1 auto;
|
|
2579
|
+
border-top: 0;
|
|
2580
|
+
border-radius: 0;
|
|
2581
|
+
background: transparent;
|
|
2582
|
+
}
|
|
2583
|
+
|
|
2584
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__control-row .aimd-rec-inline__checkbox-row) {
|
|
2585
|
+
padding: 0 10px;
|
|
2586
|
+
}
|
|
2587
|
+
|
|
2588
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__assigner-prefix .aimd-rec-assigner-field__button) {
|
|
2589
|
+
width: 100%;
|
|
2590
|
+
min-width: 0;
|
|
2591
|
+
height: auto;
|
|
2592
|
+
min-height: var(--rec-var-control-height);
|
|
2593
|
+
border: 0;
|
|
2594
|
+
border-radius: 0;
|
|
2595
|
+
margin: 0;
|
|
2596
|
+
background: transparent;
|
|
2597
|
+
color: #1976d2;
|
|
2598
|
+
font-size: 17px;
|
|
2599
|
+
box-shadow: none;
|
|
2600
|
+
}
|
|
2601
|
+
|
|
2602
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__assigner-prefix .aimd-rec-assigner-field__button:hover:not(:disabled)) {
|
|
2603
|
+
background: #eff6ff;
|
|
2604
|
+
color: #1565c0;
|
|
2605
|
+
}
|
|
2606
|
+
|
|
2607
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__assigner-prefix .aimd-rec-assigner-field__button:disabled) {
|
|
2608
|
+
opacity: 0.68;
|
|
2609
|
+
}
|
|
2610
|
+
|
|
2611
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__assigner-prefix .aimd-rec-assigner-field__spinner) {
|
|
2612
|
+
border-color: rgba(25, 118, 210, 0.25);
|
|
2613
|
+
border-top-color: #1976d2;
|
|
2614
|
+
}
|
|
2615
|
+
|
|
2616
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-assigner-field__status) {
|
|
2617
|
+
display: inline-flex;
|
|
2618
|
+
align-items: center;
|
|
2619
|
+
justify-content: center;
|
|
2620
|
+
color: #94a3b8;
|
|
2621
|
+
font-size: 17px;
|
|
2622
|
+
}
|
|
2623
|
+
|
|
2624
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-assigner-field__status--done) {
|
|
2625
|
+
color: #16a34a;
|
|
2626
|
+
}
|
|
2627
|
+
|
|
2628
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-assigner-field__status--error) {
|
|
2629
|
+
color: #dc2626;
|
|
2630
|
+
}
|
|
2631
|
+
|
|
2632
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-assigner-field__status-spinner) {
|
|
2633
|
+
width: 15px;
|
|
2634
|
+
height: 15px;
|
|
2635
|
+
border: 2px solid rgba(25, 118, 210, 0.2);
|
|
2636
|
+
border-top-color: #1976d2;
|
|
2637
|
+
border-radius: 999px;
|
|
2638
|
+
animation: aimd-rec-assigner-spin 0.75s linear infinite;
|
|
2639
|
+
}
|
|
2640
|
+
|
|
2641
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__assigner-error) {
|
|
2642
|
+
display: block;
|
|
2643
|
+
width: 100%;
|
|
2644
|
+
box-sizing: border-box;
|
|
2645
|
+
padding: 4px 8px;
|
|
2646
|
+
border-top: 1px solid #fecaca;
|
|
2647
|
+
background: #fff7f7;
|
|
2648
|
+
color: #b42318;
|
|
2649
|
+
font-size: 12px;
|
|
2650
|
+
line-height: 1.35;
|
|
2651
|
+
}
|
|
2652
|
+
|
|
1262
2653
|
/* ── Select ─────────────────────────────────────────────────────────────── */
|
|
1263
2654
|
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__select) { appearance: auto; cursor: pointer; height: var(--rec-var-control-height); padding: 0 8px; background: #fff; }
|
|
2655
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-enum-select) { appearance: auto; cursor: pointer; }
|
|
1264
2656
|
|
|
1265
2657
|
/* ── Step / check ───────────────────────────────────────────────────────── */
|
|
1266
2658
|
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--step),
|
|
@@ -1270,14 +2662,26 @@ defineExpose({
|
|
|
1270
2662
|
flex-direction: column;
|
|
1271
2663
|
align-items: stretch;
|
|
1272
2664
|
gap: 10px;
|
|
1273
|
-
width:
|
|
2665
|
+
width: 100%;
|
|
1274
2666
|
max-width: 100%;
|
|
1275
2667
|
margin: 10px 0;
|
|
1276
2668
|
padding: 10px 12px;
|
|
1277
|
-
border: 1px solid
|
|
2669
|
+
border: 1px solid rgba(185, 28, 28, 0.2);
|
|
2670
|
+
border-left-width: 3px;
|
|
1278
2671
|
border-radius: 14px;
|
|
1279
|
-
background: #
|
|
2672
|
+
background: #fffafa;
|
|
2673
|
+
box-shadow:
|
|
2674
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.9),
|
|
2675
|
+
0 8px 24px rgba(185, 28, 28, 0.025);
|
|
1280
2676
|
box-sizing: border-box;
|
|
2677
|
+
transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
|
|
2678
|
+
}
|
|
2679
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--check-passed) {
|
|
2680
|
+
border-color: rgba(22, 101, 52, 0.22);
|
|
2681
|
+
background: #f6fdf9;
|
|
2682
|
+
box-shadow:
|
|
2683
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.9),
|
|
2684
|
+
0 8px 24px rgba(22, 101, 52, 0.035);
|
|
1281
2685
|
}
|
|
1282
2686
|
.aimd-protocol-recorder__content :deep(.aimd-check-field__main) {
|
|
1283
2687
|
display: flex;
|
|
@@ -1285,19 +2689,42 @@ defineExpose({
|
|
|
1285
2689
|
gap: 8px;
|
|
1286
2690
|
min-width: 0;
|
|
1287
2691
|
}
|
|
1288
|
-
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--check > .aimd-rec-inline__input--annotation) {
|
|
1289
|
-
min-width: 0;
|
|
1290
|
-
width: 100%;
|
|
1291
|
-
}
|
|
1292
2692
|
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--check > .aimd-rec-inline__check-wrap) {
|
|
1293
2693
|
display: inline-flex;
|
|
1294
2694
|
align-items: center;
|
|
1295
2695
|
flex-wrap: wrap;
|
|
1296
2696
|
min-width: 0;
|
|
1297
2697
|
}
|
|
2698
|
+
.aimd-protocol-recorder__content :deep(.aimd-check-field__header) {
|
|
2699
|
+
display: flex;
|
|
2700
|
+
align-items: flex-start;
|
|
2701
|
+
justify-content: space-between;
|
|
2702
|
+
gap: 8px 12px;
|
|
2703
|
+
min-width: 0;
|
|
2704
|
+
}
|
|
2705
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--check-bodyless .aimd-check-field__header) {
|
|
2706
|
+
align-items: center;
|
|
2707
|
+
}
|
|
2708
|
+
.aimd-protocol-recorder__content :deep(.aimd-check-field__actions) {
|
|
2709
|
+
display: flex;
|
|
2710
|
+
flex: 0 0 auto;
|
|
2711
|
+
flex-wrap: wrap;
|
|
2712
|
+
justify-content: flex-end;
|
|
2713
|
+
gap: 8px;
|
|
2714
|
+
}
|
|
1298
2715
|
.aimd-protocol-recorder__content :deep(.aimd-check-field__toggle) {
|
|
1299
2716
|
gap: 8px;
|
|
1300
2717
|
}
|
|
2718
|
+
.aimd-protocol-recorder__content :deep(.aimd-check-field__toggle-btn) {
|
|
2719
|
+
color: #475569;
|
|
2720
|
+
border-color: rgba(100, 116, 139, 0.2);
|
|
2721
|
+
background: rgba(255, 255, 255, 0.82);
|
|
2722
|
+
}
|
|
2723
|
+
.aimd-protocol-recorder__content :deep(.aimd-check-field__toggle-btn:hover:not(:disabled)) {
|
|
2724
|
+
border-color: rgba(100, 116, 139, 0.34);
|
|
2725
|
+
background: rgba(255, 255, 255, 0.96);
|
|
2726
|
+
color: #334155;
|
|
2727
|
+
}
|
|
1301
2728
|
.aimd-protocol-recorder__content :deep(.aimd-check-field__key) {
|
|
1302
2729
|
font-size: 12px;
|
|
1303
2730
|
font-weight: 600;
|
|
@@ -1314,11 +2741,7 @@ defineExpose({
|
|
|
1314
2741
|
margin: 0;
|
|
1315
2742
|
}
|
|
1316
2743
|
.aimd-protocol-recorder__content :deep(.aimd-check-field__body--checked) {
|
|
1317
|
-
color: #
|
|
1318
|
-
opacity: 0.92;
|
|
1319
|
-
text-decoration: line-through;
|
|
1320
|
-
text-decoration-thickness: 1.5px;
|
|
1321
|
-
text-decoration-color: rgba(102, 112, 133, 0.55);
|
|
2744
|
+
color: #24563e;
|
|
1322
2745
|
}
|
|
1323
2746
|
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--check > .aimd-rec-inline__check-wrap > .aimd-field__name),
|
|
1324
2747
|
.aimd-protocol-recorder__content :deep(.aimd-check-field__body) {
|
|
@@ -1335,12 +2758,31 @@ defineExpose({
|
|
|
1335
2758
|
font-weight: 600;
|
|
1336
2759
|
line-height: 1.5;
|
|
1337
2760
|
}
|
|
2761
|
+
.aimd-protocol-recorder__content :deep(.aimd-check-field__details) {
|
|
2762
|
+
display: flex;
|
|
2763
|
+
flex-direction: column;
|
|
2764
|
+
gap: 10px;
|
|
2765
|
+
min-width: 0;
|
|
2766
|
+
padding-top: 10px;
|
|
2767
|
+
border-top: 1px solid rgba(185, 28, 28, 0.1);
|
|
2768
|
+
}
|
|
2769
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--check-passed .aimd-check-field__details) {
|
|
2770
|
+
border-top-color: rgba(22, 101, 52, 0.12);
|
|
2771
|
+
}
|
|
2772
|
+
.aimd-protocol-recorder__content :deep(.aimd-check-field__detail--annotation) {
|
|
2773
|
+
display: flex;
|
|
2774
|
+
width: 100%;
|
|
2775
|
+
min-width: 0;
|
|
2776
|
+
}
|
|
2777
|
+
.aimd-protocol-recorder__content :deep(.aimd-check-field__annotation-editor) {
|
|
2778
|
+
width: 100%;
|
|
2779
|
+
}
|
|
1338
2780
|
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--step) {
|
|
1339
2781
|
display: flex;
|
|
1340
2782
|
flex-direction: column;
|
|
1341
2783
|
align-items: stretch;
|
|
1342
2784
|
gap: 12px;
|
|
1343
|
-
width:
|
|
2785
|
+
width: 100%;
|
|
1344
2786
|
max-width: 100%;
|
|
1345
2787
|
margin: 16px 0;
|
|
1346
2788
|
padding: 14px 16px 16px;
|
|
@@ -1349,6 +2791,7 @@ defineExpose({
|
|
|
1349
2791
|
background: #fff;
|
|
1350
2792
|
box-shadow: none;
|
|
1351
2793
|
color: var(--rec-text);
|
|
2794
|
+
box-sizing: border-box;
|
|
1352
2795
|
}
|
|
1353
2796
|
.aimd-protocol-recorder__content :deep(.aimd-step-field__main) {
|
|
1354
2797
|
display: flex;
|
|
@@ -1370,7 +2813,7 @@ defineExpose({
|
|
|
1370
2813
|
flex: 0 0 auto;
|
|
1371
2814
|
flex-wrap: wrap;
|
|
1372
2815
|
justify-content: flex-end;
|
|
1373
|
-
gap:
|
|
2816
|
+
gap: 6px;
|
|
1374
2817
|
}
|
|
1375
2818
|
.aimd-protocol-recorder__content :deep(.aimd-step-field__body) {
|
|
1376
2819
|
min-width: 0;
|
|
@@ -1386,6 +2829,19 @@ defineExpose({
|
|
|
1386
2829
|
.aimd-protocol-recorder__content :deep(.aimd-step-field__body p) {
|
|
1387
2830
|
margin: 0;
|
|
1388
2831
|
}
|
|
2832
|
+
.aimd-protocol-recorder__content :deep(.aimd-step-field__body-actions) {
|
|
2833
|
+
display: flex;
|
|
2834
|
+
justify-content: flex-end;
|
|
2835
|
+
min-width: 0;
|
|
2836
|
+
margin-top: -8px;
|
|
2837
|
+
}
|
|
2838
|
+
.aimd-protocol-recorder__content :deep(.aimd-step-field__body-action) {
|
|
2839
|
+
opacity: 0.86;
|
|
2840
|
+
}
|
|
2841
|
+
.aimd-protocol-recorder__content :deep(.aimd-step-field__body-action:hover:not(:disabled)),
|
|
2842
|
+
.aimd-protocol-recorder__content :deep(.aimd-step-field__body-action:focus-visible) {
|
|
2843
|
+
opacity: 1;
|
|
2844
|
+
}
|
|
1389
2845
|
.aimd-protocol-recorder__content :deep(.aimd-step-field__details) {
|
|
1390
2846
|
display: flex;
|
|
1391
2847
|
flex-direction: column;
|
|
@@ -1507,9 +2963,13 @@ defineExpose({
|
|
|
1507
2963
|
background: transparent;
|
|
1508
2964
|
}
|
|
1509
2965
|
.aimd-protocol-recorder__content :deep(.aimd-step-field__toggle) {
|
|
2966
|
+
min-height: 22px;
|
|
2967
|
+
padding: 0 8px;
|
|
1510
2968
|
color: #8a5a12;
|
|
1511
2969
|
border-color: rgba(154, 88, 0, 0.18);
|
|
1512
2970
|
background: rgba(255, 255, 255, 0.82);
|
|
2971
|
+
font-size: 11px;
|
|
2972
|
+
line-height: 1;
|
|
1513
2973
|
}
|
|
1514
2974
|
.aimd-protocol-recorder__content :deep(.aimd-step-field__toggle:hover:not(:disabled)) {
|
|
1515
2975
|
border-color: rgba(154, 88, 0, 0.34);
|
|
@@ -1518,6 +2978,8 @@ defineExpose({
|
|
|
1518
2978
|
}
|
|
1519
2979
|
.aimd-protocol-recorder__content :deep(.aimd-rec-inline input[type="checkbox"]),
|
|
1520
2980
|
.aimd-protocol-recorder__content :deep(.aimd-checkbox) { width: 16px; height: 16px; accent-color: var(--rec-focus); }
|
|
2981
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--check-open .aimd-checkbox) { accent-color: #dc2626; }
|
|
2982
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--check-passed .aimd-checkbox) { accent-color: #16a34a; }
|
|
1521
2983
|
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__input) {
|
|
1522
2984
|
height: 30px;
|
|
1523
2985
|
min-width: 94px;
|
|
@@ -1553,7 +3015,46 @@ defineExpose({
|
|
|
1553
3015
|
}
|
|
1554
3016
|
}
|
|
1555
3017
|
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__input.aimd-rec-inline__input--stacked),
|
|
1556
|
-
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__textarea.aimd-rec-inline__textarea--stacked) {
|
|
3018
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__textarea.aimd-rec-inline__textarea--stacked) {
|
|
3019
|
+
border: 0 none;
|
|
3020
|
+
border-top: 1px solid var(--aimd-border-color, #90caf9);
|
|
3021
|
+
border-radius: 0 0 6px 6px;
|
|
3022
|
+
box-shadow: none;
|
|
3023
|
+
font-family: inherit;
|
|
3024
|
+
outline: none;
|
|
3025
|
+
}
|
|
3026
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline--var-stacked .aimd-rec-inline__value-control) {
|
|
3027
|
+
font: inherit;
|
|
3028
|
+
font-size: var(--rec-var-value-font-size);
|
|
3029
|
+
font-weight: 400;
|
|
3030
|
+
color: var(--rec-text);
|
|
3031
|
+
letter-spacing: 0;
|
|
3032
|
+
}
|
|
3033
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__value-control::-webkit-datetime-edit),
|
|
3034
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__value-control::-webkit-datetime-edit-fields-wrapper),
|
|
3035
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__value-control::-webkit-datetime-edit-text),
|
|
3036
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__value-control::-webkit-datetime-edit-year-field),
|
|
3037
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__value-control::-webkit-datetime-edit-month-field),
|
|
3038
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__value-control::-webkit-datetime-edit-day-field),
|
|
3039
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__value-control::-webkit-datetime-edit-hour-field),
|
|
3040
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__value-control::-webkit-datetime-edit-minute-field),
|
|
3041
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__value-control::-webkit-datetime-edit-second-field),
|
|
3042
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__value-control::-webkit-datetime-edit-ampm-field) {
|
|
3043
|
+
font: inherit;
|
|
3044
|
+
line-height: inherit;
|
|
3045
|
+
}
|
|
3046
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__control-row .aimd-rec-inline__input.aimd-rec-inline__input--stacked),
|
|
3047
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__control-row .aimd-rec-inline__textarea.aimd-rec-inline__textarea--stacked) {
|
|
3048
|
+
border: 0 none;
|
|
3049
|
+
border-radius: 0;
|
|
3050
|
+
box-shadow: none;
|
|
3051
|
+
}
|
|
3052
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__control-row .aimd-rec-inline__input.aimd-rec-inline__input--stacked:focus),
|
|
3053
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline__control-row .aimd-rec-inline__textarea.aimd-rec-inline__textarea--stacked:focus) {
|
|
3054
|
+
border: 0 none;
|
|
3055
|
+
box-shadow: none;
|
|
3056
|
+
outline: none;
|
|
3057
|
+
}
|
|
1557
3058
|
.aimd-protocol-recorder__content :deep(.aimd-rec-inline-table__table td) {
|
|
1558
3059
|
vertical-align: middle;
|
|
1559
3060
|
transition:
|
|
@@ -1579,16 +3080,31 @@ defineExpose({
|
|
|
1579
3080
|
transition: width 0.18s ease;
|
|
1580
3081
|
}
|
|
1581
3082
|
|
|
1582
|
-
.aimd-protocol-recorder__content :deep(.aimd-rec-inline-table__column-head) {
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
}
|
|
3083
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline-table__column-head) {
|
|
3084
|
+
color: #64748b;
|
|
3085
|
+
font-size: 11px;
|
|
3086
|
+
font-weight: 700;
|
|
3087
|
+
letter-spacing: 0;
|
|
3088
|
+
text-transform: none;
|
|
3089
|
+
white-space: nowrap;
|
|
3090
|
+
padding-left: 6px;
|
|
3091
|
+
padding-right: 6px;
|
|
3092
|
+
}
|
|
3093
|
+
|
|
3094
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline-table__column-label) {
|
|
3095
|
+
display: inline-flex;
|
|
3096
|
+
flex-direction: column;
|
|
3097
|
+
align-items: flex-start;
|
|
3098
|
+
gap: 2px;
|
|
3099
|
+
max-width: 100%;
|
|
3100
|
+
line-height: 1.25;
|
|
3101
|
+
white-space: normal;
|
|
3102
|
+
}
|
|
3103
|
+
|
|
3104
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-inline-table__column-label .aimd-field__title) {
|
|
3105
|
+
font-weight: 700;
|
|
3106
|
+
color: #475569;
|
|
3107
|
+
}
|
|
1592
3108
|
|
|
1593
3109
|
.aimd-protocol-recorder__content :deep(.aimd-rec-inline-table__column-head--compact) {
|
|
1594
3110
|
text-align: center;
|
|
@@ -1817,6 +3333,7 @@ defineExpose({
|
|
|
1817
3333
|
border: 0;
|
|
1818
3334
|
border-radius: 0;
|
|
1819
3335
|
font-size: 13px;
|
|
3336
|
+
font-style: normal;
|
|
1820
3337
|
line-height: 1.35;
|
|
1821
3338
|
outline: none;
|
|
1822
3339
|
box-sizing: border-box;
|
|
@@ -1906,13 +3423,18 @@ defineExpose({
|
|
|
1906
3423
|
gap: 0;
|
|
1907
3424
|
}
|
|
1908
3425
|
|
|
1909
|
-
.aimd-protocol-recorder__content :deep(.aimd-rec-card__label) {
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
3426
|
+
.aimd-protocol-recorder__content :deep(.aimd-rec-card__label) {
|
|
3427
|
+
display: inline-flex;
|
|
3428
|
+
flex-direction: column;
|
|
3429
|
+
align-items: flex-start;
|
|
3430
|
+
gap: 2px;
|
|
3431
|
+
color: #64748b;
|
|
3432
|
+
font-size: 11px;
|
|
3433
|
+
font-weight: 700;
|
|
3434
|
+
letter-spacing: 0;
|
|
3435
|
+
line-height: 1.25;
|
|
3436
|
+
text-transform: none;
|
|
3437
|
+
}
|
|
1916
3438
|
|
|
1917
3439
|
.aimd-protocol-recorder__content :deep(.aimd-rec-card__input) {
|
|
1918
3440
|
width: 100%;
|