@airalogy/aimd-recorder 1.14.1 → 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.
Files changed (30) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +9 -1
  3. package/README.zh-CN.md +9 -1
  4. package/dist/{AimdDnaSequenceField-__jdnFS9.js → AimdDnaSequenceField-CPyMqIVh.js} +1 -1
  5. package/dist/{AimdEditor.vue_vue_type_style_index_0_lang-Bq79rKNw.js → AimdEditor.vue_vue_type_style_index_0_lang-lyHIpch9.js} +6344 -6073
  6. package/dist/{AimdMarkdownField-98ImHGbc.js → AimdMarkdownField-CX71bOdX.js} +4 -3
  7. package/dist/{AimdMarkdownNoteField-CuUJZkgT.js → AimdMarkdownNoteField--ssNIQfG.js} +11 -10
  8. package/dist/aimd-recorder.css +1 -1
  9. package/dist/components.js +2128 -1891
  10. package/dist/composables.js +1 -1
  11. package/dist/index.js +2 -2
  12. package/dist/{useFieldRendering-BIqeE3qo.js → useFieldRendering-Dh6Kib_0.js} +1303 -1207
  13. package/package.json +13 -13
  14. package/src/__tests__/client-assigner.test.ts +59 -0
  15. package/src/__tests__/quiz-recorder.test.ts +112 -0
  16. package/src/__tests__/recorder-quiz-followups.test.ts +97 -0
  17. package/src/__tests__/step-field.test.ts +47 -3
  18. package/src/__tests__/var-field-render.test.ts +7 -1
  19. package/src/client-assigner.ts +47 -3
  20. package/src/components/AimdQuizRecorder.vue +404 -45
  21. package/src/components/AimdRecorder.vue +14 -1
  22. package/src/components/AimdRecorderEditor.vue +3 -2
  23. package/src/components/AimdVarField.vue +43 -5
  24. package/src/composables/__tests__/useRecordState.test.ts +41 -0
  25. package/src/composables/__tests__/useVarHelpers.test.ts +44 -0
  26. package/src/composables/useClientAssignerRunner.ts +7 -1
  27. package/src/composables/useRecordState.ts +57 -4
  28. package/src/composables/useVarHelpers.ts +113 -0
  29. package/src/composables/workbenchFieldEditing.ts +8 -5
  30. package/src/locales.ts +3 -0
@@ -1,5 +1,6 @@
1
1
  import { defineComponent as p, ref as m, watch as h, openBlock as v, createElementBlock as g, normalizeClass as k, createElementVNode as d, toDisplayString as c, unref as u, createVNode as w } from "vue";
2
- import { g as V, _ as y } from "./AimdEditor.vue_vue_type_style_index_0_lang-Bq79rKNw.js";
2
+ import { g as V, _ as y } from "./AimdEditor.vue_vue_type_style_index_0_lang-lyHIpch9.js";
3
+ import "./useFieldRendering-Dh6Kib_0.js";
3
4
  import "@airalogy/aimd-core";
4
5
  import "@airalogy/aimd-renderer";
5
6
  import { _ as x } from "./_commonjsHelpers-CZXJ37nu.js";
@@ -60,7 +61,7 @@ const R = { class: "aimd-field aimd-field--no-style aimd-field__label" }, B = {
60
61
  ])
61
62
  ], 34));
62
63
  }
63
- }), D = /* @__PURE__ */ x(M, [["__scopeId", "data-v-7fbda7f4"]]);
64
+ }), E = /* @__PURE__ */ x(M, [["__scopeId", "data-v-7fbda7f4"]]);
64
65
  export {
65
- D as default
66
+ E as default
66
67
  };
@@ -1,5 +1,6 @@
1
1
  import { defineComponent as T, ref as u, shallowRef as Z, computed as i, watch as E, onBeforeUnmount as $, openBlock as d, createElementBlock as r, normalizeClass as B, createElementVNode as k, toDisplayString as h, createCommentVNode as j, createBlock as G, unref as P, createVNode as J, nextTick as Q } from "vue";
2
- import { _ as X } from "./AimdEditor.vue_vue_type_style_index_0_lang-Bq79rKNw.js";
2
+ import { _ as X } from "./AimdEditor.vue_vue_type_style_index_0_lang-lyHIpch9.js";
3
+ import "./useFieldRendering-Dh6Kib_0.js";
3
4
  import "@airalogy/aimd-core";
4
5
  import { renderToVue as Y } from "@airalogy/aimd-renderer";
5
6
  import { _ as ee } from "./_commonjsHelpers-CZXJ37nu.js";
@@ -36,8 +37,8 @@ const te = {
36
37
  return e?.toLowerCase().startsWith("zh") ?? !1;
37
38
  }
38
39
  const R = u(null), x = u(null), l = u(C(t.modelValue)), n = u(!1), m = Z([]), f = u(!1);
39
- let y = 0, s = null;
40
- const v = i(() => !!l.value.trim()), p = i(() => v.value && !n.value), g = i(() => !t.disabled && (!v.value || n.value)), M = i(() => !p.value && !g.value), I = i(() => _(t.locale) ? "编辑备注" : "Edit note"), A = i(() => _(t.locale) ? "关闭备注" : "Close note"), O = i(() => _(t.locale) ? "暂无备注" : "No notes"), S = T({
40
+ let p = 0, s = null;
41
+ const v = i(() => !!l.value.trim()), y = i(() => v.value && !n.value), g = i(() => !t.disabled && (!v.value || n.value)), M = i(() => !y.value && !g.value), I = i(() => _(t.locale) ? "编辑备注" : "Edit note"), A = i(() => _(t.locale) ? "关闭备注" : "Close note"), O = i(() => _(t.locale) ? "暂无备注" : "No notes"), S = T({
41
42
  name: "AimdMarkdownNotePreviewOutlet",
42
43
  props: {
43
44
  nodes: {
@@ -60,7 +61,7 @@ const te = {
60
61
  e !== l.value && (l.value = e, c("update:modelValue", e));
61
62
  }
62
63
  async function z() {
63
- const e = l.value.trim(), a = ++y;
64
+ const e = l.value.trim(), a = ++p;
64
65
  if (!e) {
65
66
  m.value = [], f.value = !1;
66
67
  return;
@@ -69,11 +70,11 @@ const te = {
69
70
  const b = await Y(e, {
70
71
  locale: t.locale
71
72
  });
72
- if (a !== y)
73
+ if (a !== p)
73
74
  return;
74
75
  m.value = b.nodes, f.value = !1;
75
76
  } catch {
76
- if (a !== y)
77
+ if (a !== p)
77
78
  return;
78
79
  m.value = [], f.value = !0;
79
80
  }
@@ -122,14 +123,14 @@ const te = {
122
123
  ref: R,
123
124
  class: B(["aimd-markdown-note-field", {
124
125
  "aimd-markdown-note-field--disabled": o.disabled,
125
- "aimd-markdown-note-field--preview": p.value,
126
+ "aimd-markdown-note-field--preview": y.value,
126
127
  "aimd-markdown-note-field--editor": g.value,
127
128
  "aimd-markdown-note-field--empty": M.value
128
129
  }]),
129
130
  onFocusin: U,
130
131
  onFocusout: W
131
132
  }, [
132
- p.value ? (d(), r("div", te, [
133
+ y.value ? (d(), r("div", te, [
133
134
  o.disabled ? j("", !0) : (d(), r("div", oe, [
134
135
  k("button", {
135
136
  type: "button",
@@ -179,7 +180,7 @@ const te = {
179
180
  ])) : (d(), r("div", de, h(O.value), 1))
180
181
  ], 34));
181
182
  }
182
- }), ve = /* @__PURE__ */ ee(re, [["__scopeId", "data-v-0c80b790"]]);
183
+ }), we = /* @__PURE__ */ ee(re, [["__scopeId", "data-v-0c80b790"]]);
183
184
  export {
184
- ve as default
185
+ we as default
185
186
  };