@airalogy/aimd-recorder 1.15.0 → 1.16.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.
@@ -1,4 +1,4 @@
1
- import { A as s, a as t, b as n, c as r, d as i, e as o, f as l, g as c, h as u, i as m, j as p, k as d, l as S, m as D, n as g, o as z, p as T, q as V, r as R, s as h, t as q, u as y, v as F, w as I, x as A, y as E, z as C, B as b, C as k, D as f, E as W, F as M, G as N, H as x, I as Q, J as w, K as L, L as v, M as P, N as _, O as B, P as G, Q as K, R as H, S as O, T as U, U as j, V as J, W as X, X as Y, Y as Z, Z as $, _ as ee, $ as ae, a0 as se, a1 as te, a2 as ne, a3 as re, a4 as ie, a5 as oe, a6 as le, a7 as ce, a8 as ue, a9 as me, aa as pe, ab as de, ac as Se, ad as De, ae as ge } from "./useFieldRendering-RBC8P3jQ.js";
1
+ import { A as s, a as t, b as n, c as r, d as i, e as o, f as l, g as c, h as u, i as m, j as p, k as d, l as S, m as D, n as g, o as z, p as T, q as V, r as R, s as h, t as q, u as y, v as F, w as I, x as A, y as E, z as C, B as b, C as k, D as f, E as W, F as M, G as N, H as x, I as Q, J as w, K as L, L as v, M as P, N as _, O as B, P as G, Q as K, R as H, S as O, T as U, U as j, V as J, W as X, X as Y, Y as Z, Z as $, _ as ee, $ as ae, a0 as se, a1 as te, a2 as ne, a3 as re, a4 as ie, a5 as oe, a6 as le, a7 as ce, a8 as ue, a9 as me, aa as pe, ab as de, ac as Se, ad as De, ae as ge } from "./useFieldRendering-Dh6Kib_0.js";
2
2
  export {
3
3
  s as AIMD_DNA_SEQUENCE_FORMAT,
4
4
  t as applyIncomingRecord,
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { AimdProtocolRecorder as e } from "./components.js";
2
2
  import { AimdDnaSequenceField as o, AimdMarkdownField as n, AimdQuizRecorder as i, AimdRecorder as l, AimdRecorderEditor as c } from "./components.js";
3
- import { D as d, c as u, r as p } from "./AimdEditor.vue_vue_type_style_index_0_lang-BFuOo7df.js";
4
- import { A as D, af as R, a as g, b as A, c as T, d as z, e as V, f as E, g as I, h, i as y, ag as F, j as q, k as f, l as C, m as M, ah as P, n as k, o as L, p as _, q as b, r as x, s as N, t as W, u as Q, v, w, x as U, y as B, z as G, B as O, C as K, D as H, E as Y, F as $, G as j, H as J, I as X, J as Z, K as ee, L as ae, M as re, N as se, O as te, P as oe, Q as ne, R as ie, S as le, T as ce, U as me, V as de, W as ue, X as pe, Y as Se, Z as De, _ as Re, $ as ge, a0 as Ae, a1 as Te, a2 as ze, ai as Ve, a3 as Ee, a4 as Ie, a5 as he, a6 as ye, a7 as Fe, a8 as qe, a9 as fe, aa as Ce, ab as Me, ac as Pe, ad as ke, ae as Le } from "./useFieldRendering-RBC8P3jQ.js";
3
+ import { D as d, c as u, r as p } from "./AimdEditor.vue_vue_type_style_index_0_lang-lyHIpch9.js";
4
+ import { A as D, af as R, a as g, b as A, c as T, d as z, e as V, f as E, g as I, h, i as y, ag as F, j as q, k as f, l as C, m as M, ah as P, n as k, o as L, p as _, q as b, r as x, s as N, t as W, u as Q, v, w, x as U, y as B, z as G, B as O, C as K, D as H, E as Y, F as $, G as j, H as J, I as X, J as Z, K as ee, L as ae, M as re, N as se, O as te, P as oe, Q as ne, R as ie, S as le, T as ce, U as me, V as de, W as ue, X as pe, Y as Se, Z as De, _ as Re, $ as ge, a0 as Ae, a1 as Te, a2 as ze, ai as Ve, a3 as Ee, a4 as Ie, a5 as he, a6 as ye, a7 as Fe, a8 as qe, a9 as fe, aa as Ce, ab as Me, ac as Pe, ad as ke, ae as Le } from "./useFieldRendering-Dh6Kib_0.js";
5
5
  const r = e;
6
6
  export {
7
7
  D as AIMD_DNA_SEQUENCE_FORMAT,
@@ -623,7 +623,7 @@ function Sa(e, t) {
623
623
  `)}
624
624
  `;
625
625
  }
626
- const ss = vi(() => import("./AimdDnaSequenceField-D-EXuZgw.js")), ns = vi(() => import("./AimdMarkdownField-DGDl9M2z.js")), as = jr.map((e) => ({
626
+ const ss = vi(() => import("./AimdDnaSequenceField-CPyMqIVh.js")), ns = vi(() => import("./AimdMarkdownField-CX71bOdX.js")), as = jr.map((e) => ({
627
627
  type: e,
628
628
  inputKind: "code"
629
629
  }));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@airalogy/aimd-recorder",
3
3
  "type": "module",
4
- "version": "1.15.0",
4
+ "version": "1.16.0",
5
5
  "description": "AIMD (Airalogy Markdown) recorder Vue components and UI",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
@@ -59,8 +59,8 @@
59
59
  "react-dom": "^19.2.4",
60
60
  "seqviz": "^3.10.18",
61
61
  "@airalogy/aimd-core": "^2.6.0",
62
- "@airalogy/aimd-editor": "^1.8.0",
63
- "@airalogy/aimd-renderer": "^2.5.0"
62
+ "@airalogy/aimd-renderer": "^2.5.0",
63
+ "@airalogy/aimd-editor": "^1.9.0"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@types/node": "^24.3.0",
@@ -795,7 +795,7 @@ function handleFieldsChange(fields: ExtractedAimdFields) {
795
795
  }
796
796
 
797
797
  function handleAddField(fieldType: AimdWorkbenchFieldType) {
798
- const nextId = generateNextWorkbenchFieldId(editableFields.value, fieldType)
798
+ const nextId = generateNextWorkbenchFieldId(editableFields.value, fieldType, fieldType === 'quiz' ? 'choice' : undefined)
799
799
  emitWorkbenchContentChange(appendWorkbenchField(contentDraft.value, fieldType, {
800
800
  id: nextId,
801
801
  valueType: fieldType === 'var' ? 'str' : undefined,
@@ -868,7 +868,7 @@ function toggleFieldInsertMenu(insertionIndex: number) {
868
868
  }
869
869
 
870
870
  function handleInsertField(fieldType: AimdWorkbenchFieldType, insertionIndex: number) {
871
- const nextId = generateNextWorkbenchFieldId(editableFields.value, fieldType)
871
+ const nextId = generateNextWorkbenchFieldId(editableFields.value, fieldType, fieldType === 'quiz' ? 'choice' : undefined)
872
872
  fieldInsertMenuIndex.value = null
873
873
  emitWorkbenchContentChange(insertWorkbenchField(
874
874
  contentDraft.value,
@@ -304,8 +304,8 @@ function buildWorkbenchSyntax(
304
304
  case 'check':
305
305
  return `{{check|${(fields.name || '').trim() || 'my_check'}}}`
306
306
  case 'quiz': {
307
- const id = (fields.id || '').trim() || 'quiz_choice_1'
308
307
  const quizType = (fields.quizType || '').trim() || 'choice'
308
+ const id = (fields.id || '').trim() || `quiz_${quizType}_1`
309
309
  const stem = fields.stem || 'Fill the question stem'
310
310
  if (quizType === 'open') {
311
311
  return [
@@ -391,11 +391,13 @@ function buildFieldSyntax(
391
391
  return buildWorkbenchSyntax('check', {
392
392
  name: id || 'my_check',
393
393
  })
394
- case 'quiz':
394
+ case 'quiz': {
395
+ const quizType = options?.quizType?.trim() || 'choice'
395
396
  return buildWorkbenchSyntax('quiz', {
396
- id: id || 'quiz_choice_1',
397
- quizType: options?.quizType?.trim() || 'choice',
397
+ id: id || `quiz_${quizType}_1`,
398
+ quizType,
398
399
  })
400
+ }
399
401
  }
400
402
  }
401
403
 
@@ -524,6 +526,7 @@ export function scanWorkbenchFields(content: string): AimdWorkbenchFieldDescript
524
526
  export function generateNextWorkbenchFieldId(
525
527
  fields: AimdWorkbenchFieldDescriptor[],
526
528
  fieldType: AimdWorkbenchFieldType,
529
+ quizType?: string,
527
530
  ): string {
528
531
  const existingIds = new Set(fields.map(field => field.id))
529
532
  const base = fieldType === 'var'
@@ -534,7 +537,7 @@ export function generateNextWorkbenchFieldId(
534
537
  ? 'new_step'
535
538
  : fieldType === 'check'
536
539
  ? 'new_check'
537
- : 'quiz_choice'
540
+ : `quiz_${quizType || 'choice'}`
538
541
 
539
542
  if (!existingIds.has(base)) {
540
543
  return base