@airalogy/aimd-recorder 1.24.5 → 1.25.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/README.md +13 -1
  2. package/README.zh-CN.md +13 -1
  3. package/dist/{AimdDnaSequenceField-CxFtD5Au.js → AimdDnaSequenceField-WZF4SAj2.js} +1 -1
  4. package/dist/{AimdEditor.vue_vue_type_style_index_0_lang-B0n0inzY.js → AimdEditor.vue_vue_type_style_index_0_lang-COQDWC8R.js} +643 -605
  5. package/dist/AimdEntityRefField-CWVj0vPF.js +4 -0
  6. package/dist/{AimdEntityRefField-DCE79vca.js → AimdEntityRefField.vue_vue_type_script_setup_true_lang-CaKfY8iu.js} +2 -2
  7. package/dist/{AimdMarkdownField-Du0Fh5sG.js → AimdMarkdownField-BeDCefoQ.js} +3 -3
  8. package/dist/{AimdMarkdownNoteField-YnyNmBvM.js → AimdMarkdownNoteField-BKrlgUYP.js} +2 -2
  9. package/dist/AimdResourceRefField-DUlNcU3q.js +264 -0
  10. package/dist/aimd-recorder.css +1 -1
  11. package/dist/{arc-B0vwJ3nm.js → arc-DYnxKzGE.js} +1 -1
  12. package/dist/{architectureDiagram-3BPJPVTR-B5niz6cr.js → architectureDiagram-3BPJPVTR-CjOI8IqA.js} +2 -2
  13. package/dist/{blockDiagram-GPEHLZMM-Qtk9HFm8.js → blockDiagram-GPEHLZMM-B8xNjZYk.js} +4 -4
  14. package/dist/{c4Diagram-AAUBKEIU-DfTlAW2e.js → c4Diagram-AAUBKEIU-TpIYY3Qn.js} +2 -2
  15. package/dist/{channel-CTIJccfL.js → channel-BYLaVK3q.js} +1 -1
  16. package/dist/{chunk-2J33WTMH-9xMy_Pgx.js → chunk-2J33WTMH-YwB0nZYk.js} +1 -1
  17. package/dist/{chunk-4BX2VUAB-BYosfXC9.js → chunk-4BX2VUAB-6QDBanOQ.js} +1 -1
  18. package/dist/{chunk-55IACEB6-B8fHTImy.js → chunk-55IACEB6-7rwKJBSZ.js} +1 -1
  19. package/dist/{chunk-727SXJPM-C83DIicG.js → chunk-727SXJPM-Ba_FZJwp.js} +5 -5
  20. package/dist/{chunk-AQP2D5EJ-C-IOiRzH.js → chunk-AQP2D5EJ-reuQpvqF.js} +3 -3
  21. package/dist/{chunk-FMBD7UC4-BtkEX_DM.js → chunk-FMBD7UC4-D35dlx01.js} +1 -1
  22. package/dist/{chunk-ND2GUHAM-DIB3ib7j.js → chunk-ND2GUHAM-D7604ZCl.js} +1 -1
  23. package/dist/{chunk-QZHKN3VN-BRsoqg2B.js → chunk-QZHKN3VN-CKYkktao.js} +1 -1
  24. package/dist/{classDiagram-v2-Q7XG4LA2-D39GKFwR.js → classDiagram-4FO5ZUOK-BNKRYoAB.js} +2 -2
  25. package/dist/{classDiagram-4FO5ZUOK-D39GKFwR.js → classDiagram-v2-Q7XG4LA2-BNKRYoAB.js} +2 -2
  26. package/dist/components.js +2222 -2110
  27. package/dist/composables.js +54 -52
  28. package/dist/{cose-bilkent-S5V4N54A-CyRaJD1S.js → cose-bilkent-S5V4N54A-Dq12egzW.js} +1 -1
  29. package/dist/{dagre-BM42HDAG-K85xJEFU.js → dagre-BM42HDAG-CRwAbNsB.js} +3 -3
  30. package/dist/{diagram-2AECGRRQ-DET7fuM5.js → diagram-2AECGRRQ--WYmW1Cd.js} +2 -2
  31. package/dist/{diagram-5GNKFQAL-Dlba-FRw.js → diagram-5GNKFQAL-C7KgsBJW.js} +3 -3
  32. package/dist/{diagram-KO2AKTUF-J4PMcx3F.js → diagram-KO2AKTUF-B_6YtDZt.js} +2 -2
  33. package/dist/{diagram-LMA3HP47-ldR5Az83.js → diagram-LMA3HP47-DARH_IPq.js} +2 -2
  34. package/dist/{diagram-OG6HWLK6-UM1_l5na.js → diagram-OG6HWLK6-CRdh6xnM.js} +3 -3
  35. package/dist/{erDiagram-TEJ5UH35-eGmNSbi1.js → erDiagram-TEJ5UH35-CoC8CHnh.js} +4 -4
  36. package/dist/{flowDiagram-I6XJVG4X-rHTJn3LZ.js → flowDiagram-I6XJVG4X-BvOa5j4A.js} +6 -6
  37. package/dist/{ganttDiagram-6RSMTGT7-DKmi_hWM.js → ganttDiagram-6RSMTGT7-CVXhLTr6.js} +2 -2
  38. package/dist/{gitGraphDiagram-PVQCEYII-DpQ1cu5h.js → gitGraphDiagram-PVQCEYII-DFhjJRYR.js} +3 -3
  39. package/dist/{graph-CSRKgcbg.js → graph-DEn_dxZa.js} +1 -1
  40. package/dist/index.js +125 -121
  41. package/dist/{infoDiagram-5YYISTIA-v8jIxUL5.js → infoDiagram-5YYISTIA-uEUHa5YE.js} +1 -1
  42. package/dist/{ishikawaDiagram-YF4QCWOH-BaV5bCe8.js → ishikawaDiagram-YF4QCWOH-BqGYvdVJ.js} +1 -1
  43. package/dist/{journeyDiagram-JHISSGLW-DeU65SpU.js → journeyDiagram-JHISSGLW-BkKJZduM.js} +4 -4
  44. package/dist/{kanban-definition-UN3LZRKU-TGHAcp6_.js → kanban-definition-UN3LZRKU-CEsZIhW3.js} +2 -2
  45. package/dist/{layout-D_sj0Eed.js → layout-Dk4utAZD.js} +2 -2
  46. package/dist/{linear-TldV7C5w.js → linear-pw3I09nb.js} +1 -1
  47. package/dist/{mermaid.core-CRSTqrrD.js → mermaid.core-iJ2XgYy9.js} +34 -34
  48. package/dist/{mindmap-definition-RKZ34NQL-CejyEBat.js → mindmap-definition-RKZ34NQL-ChQ5---t.js} +3 -3
  49. package/dist/{pieDiagram-4H26LBE5-CWLZWcAW.js → pieDiagram-4H26LBE5-DRIV2FNb.js} +3 -3
  50. package/dist/{quadrantDiagram-W4KKPZXB-CYidUieH.js → quadrantDiagram-W4KKPZXB-C57biOpe.js} +2 -2
  51. package/dist/record.js +23 -23
  52. package/dist/{requirementDiagram-4Y6WPE33-Cw4ko-tB.js → requirementDiagram-4Y6WPE33-KjKJuN09.js} +3 -3
  53. package/dist/{sankeyDiagram-5OEKKPKP-BnX4Evuh.js → sankeyDiagram-5OEKKPKP-BFubJDRS.js} +1 -1
  54. package/dist/{sequenceDiagram-3UESZ5HK-BiGVMmS5.js → sequenceDiagram-3UESZ5HK-B7vg6NfP.js} +3 -3
  55. package/dist/{stateDiagram-AJRCARHV-DIaBI1Uq.js → stateDiagram-AJRCARHV-BRs_mbra.js} +4 -4
  56. package/dist/{stateDiagram-v2-BHNVJYJU-BgfV-ldT.js → stateDiagram-v2-BHNVJYJU-4w8m6dxi.js} +2 -2
  57. package/dist/{timeline-definition-PNZ67QCA-C0_5OwxD.js → timeline-definition-PNZ67QCA-vrEAExRb.js} +2 -2
  58. package/dist/{useFieldRendering-B2iMfsEA.js → useFieldRendering-B3Vm2XT8.js} +23 -23
  59. package/dist/{useVarHelpers-CSogsd1T.js → useVarHelpers-DzhBBFdk.js} +980 -938
  60. package/dist/validation-IAiGnEKX.js +5712 -0
  61. package/dist/{vennDiagram-CIIHVFJN-_ktbUOEm.js → vennDiagram-CIIHVFJN-CFtQv4Ta.js} +1 -1
  62. package/dist/{wardleyDiagram-YWT4CUSO-iwftOr4-.js → wardleyDiagram-YWT4CUSO-BxzaCMou.js} +2 -2
  63. package/dist/{xychartDiagram-2RQKCTM6-C_h9QW07.js → xychartDiagram-2RQKCTM6-DhTuG8MO.js} +2 -2
  64. package/package.json +3 -3
  65. package/src/__tests__/record-validation.test.ts +121 -0
  66. package/src/__tests__/required-marker.test.ts +4 -0
  67. package/src/__tests__/resource-form.test.ts +20 -0
  68. package/src/__tests__/resource-ref-field.test.ts +125 -0
  69. package/src/__tests__/var-field-render.test.ts +39 -1
  70. package/src/components/AimdRecorder.vue +11 -1
  71. package/src/components/AimdRecorderEditor.vue +5 -0
  72. package/src/components/AimdRecorderWysiwygFieldHost.vue +1 -0
  73. package/src/components/AimdRecorderWysiwygSurface.vue +5 -0
  74. package/src/components/AimdResourceForm.vue +129 -0
  75. package/src/components/AimdResourceRefField.vue +393 -0
  76. package/src/components/AimdVarField.vue +39 -2
  77. package/src/components/index.ts +4 -0
  78. package/src/components/recorderMilkdownPlugin.ts +2 -0
  79. package/src/composables/__tests__/useVarHelpers.test.ts +53 -4
  80. package/src/composables/index.ts +3 -0
  81. package/src/composables/useVarHelpers.ts +82 -3
  82. package/src/index.ts +12 -1
  83. package/src/locales.ts +57 -0
  84. package/src/record/validation.ts +145 -11
  85. package/src/styles/recorder.css +7 -0
  86. package/src/types.ts +30 -1
  87. package/dist/validation-BYjlufCM.js +0 -5629
@@ -1,5 +1,5 @@
1
- import { reactive as z } from "vue";
2
- import { f as q, a0 as re, R as ne, b1 as oe, b2 as ie, b3 as se, b4 as ae, m as ce, a3 as le, b5 as ue, b6 as fe, a4 as D, X as L, _ as de, B as me, z as pe, ae as ge, b7 as B, H, q as ye, ag as we, G as be, b0 as he } from "./useVarHelpers-CSogsd1T.js";
1
+ import { reactive as $ } from "vue";
2
+ import { f as q, a2 as re, T as ne, b3 as oe, b4 as ie, b5 as se, b6 as ae, m as ce, a5 as le, b7 as ue, b8 as fe, a6 as D, Z as L, a0 as de, C as me, B as pe, ag as ge, b9 as B, I as H, q as ye, ai as we, H as be, b2 as he } from "./useVarHelpers-DzhBBFdk.js";
3
3
  import { p as Ae } from "./useCodeBlockRendering-D2viVPtA.js";
4
4
  function x(e) {
5
5
  return typeof e == "string" && e.trim() ? e.trim() : void 0;
@@ -121,7 +121,7 @@ function mt(e, t) {
121
121
  }
122
122
  }
123
123
  function pt(e) {
124
- const t = z({}), r = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
124
+ const t = $({}), r = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
125
125
  let s = 0;
126
126
  function c(o) {
127
127
  return Ee(e.fields(), o);
@@ -129,7 +129,7 @@ function pt(e) {
129
129
  function f(o) {
130
130
  const a = t[o];
131
131
  if (a) return a;
132
- const u = z({
132
+ const u = $({
133
133
  status: "idle",
134
134
  sampleCount: W(e.record.var[o])
135
135
  });
@@ -261,7 +261,7 @@ function A(e) {
261
261
  function Ve(e) {
262
262
  return A(e) && Object.keys(e).length === 0;
263
263
  }
264
- function Q(e, t) {
264
+ function Z(e, t) {
265
265
  for (const r of t) {
266
266
  const n = e[r];
267
267
  if (typeof n == "string" && n.trim())
@@ -272,7 +272,7 @@ function Y(e) {
272
272
  if (typeof e == "string" && e.trim())
273
273
  return e.trim();
274
274
  if (A(e))
275
- return Q(e, [
275
+ return Z(e, [
276
276
  "error_message",
277
277
  "errorMessage",
278
278
  "message",
@@ -280,7 +280,7 @@ function Y(e) {
280
280
  "reason"
281
281
  ]);
282
282
  }
283
- function Z(e) {
283
+ function Q(e) {
284
284
  const t = [e], r = (n) => {
285
285
  A(n) && (t.push(n.data), t.push(n.result), A(n.data) && t.push(n.data.result), A(n.result) && t.push(n.result.data));
286
286
  };
@@ -385,7 +385,7 @@ function bt(e, t) {
385
385
  );
386
386
  }
387
387
  function ht(e) {
388
- const t = Z(e);
388
+ const t = Q(e);
389
389
  for (const r of t) {
390
390
  if (!A(r)) continue;
391
391
  const n = r.assigned_fields;
@@ -396,12 +396,12 @@ function ht(e) {
396
396
  return {};
397
397
  }
398
398
  function At(e) {
399
- const t = Z(e);
399
+ const t = Q(e);
400
400
  for (const r of t) {
401
401
  if (!A(r)) continue;
402
402
  const n = r.success, i = r.status;
403
403
  if (n === !1 || n === "false" || i === "error" || i === "failed")
404
- return Q(r, [
404
+ return Z(r, [
405
405
  "error_message",
406
406
  "errorMessage",
407
407
  "message",
@@ -444,17 +444,17 @@ function Tt(e, t) {
444
444
  const r = `${e}:`;
445
445
  return t.startsWith(r) ? t.slice(r.length) : t;
446
446
  }
447
- function ze(e) {
447
+ function $e(e) {
448
448
  if (typeof window > "u")
449
449
  return !1;
450
450
  const t = window.getComputedStyle(e), r = t.overflowY || t.overflow, n = t.overflowX || t.overflow, i = /(auto|scroll|overlay)/.test(r) && e.scrollHeight > e.clientHeight, s = /(auto|scroll|overlay)/.test(n) && e.scrollWidth > e.clientWidth;
451
451
  return i || s;
452
452
  }
453
- function $e(e, t) {
453
+ function ze(e, t) {
454
454
  const r = [], n = /* @__PURE__ */ new Set(), i = (s) => {
455
455
  let c = s;
456
456
  for (; c && c !== document.body; )
457
- !n.has(c) && ze(c) && (n.add(c), r.push({
457
+ !n.has(c) && $e(c) && (n.add(c), r.push({
458
458
  element: c,
459
459
  top: c.scrollTop,
460
460
  left: c.scrollLeft
@@ -472,7 +472,7 @@ function Et(e) {
472
472
  if (!r)
473
473
  return null;
474
474
  const n = { key: r };
475
- return (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement) && (n.selectionStart = t.selectionStart, n.selectionEnd = t.selectionEnd, n.selectionDirection = t.selectionDirection), n.scrollTargets = $e(e, t), n.windowScrollX = window.scrollX, n.windowScrollY = window.scrollY, n;
475
+ return (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement) && (n.selectionStart = t.selectionStart, n.selectionEnd = t.selectionEnd, n.selectionDirection = t.selectionDirection), n.scrollTargets = ze(e, t), n.windowScrollX = window.scrollX, n.windowScrollY = window.scrollY, n;
476
476
  }
477
477
  function St(e, t) {
478
478
  if (!t || !e)
@@ -566,7 +566,7 @@ const Pe = [
566
566
  "prototype",
567
567
  "constructor"
568
568
  ]);
569
- function $(e, t) {
569
+ function z(e, t) {
570
570
  if (!(!e || typeof e != "object")) {
571
571
  t(e);
572
572
  for (const r of Object.keys(e)) {
@@ -574,8 +574,8 @@ function $(e, t) {
574
574
  const n = e[r];
575
575
  if (Array.isArray(n))
576
576
  for (const i of n)
577
- i && typeof i.type == "string" && $(i, t);
578
- else n && typeof n == "object" && typeof n.type == "string" && $(n, t);
577
+ i && typeof i.type == "string" && z(i, t);
578
+ else n && typeof n == "object" && typeof n.type == "string" && z(n, t);
579
579
  }
580
580
  }
581
581
  }
@@ -598,7 +598,7 @@ function He(e, t) {
598
598
  throw new Error(`client assigner "${t}" contains invalid JavaScript syntax`);
599
599
  }
600
600
  let n = 0, i = !1;
601
- if ($(r, (s) => {
601
+ if (z(r, (s) => {
602
602
  const c = Ie[s.type];
603
603
  if (c)
604
604
  throw new Error(`client assigner "${t}" ${c}`);
@@ -680,10 +680,10 @@ function Ue(e) {
680
680
  function Ke(e, t) {
681
681
  return t ? se(t.type) && Ue(e) === void 0 ? !1 : ae(e, t.type, t.kwargs) === null : !0;
682
682
  }
683
- function Qe(e, t, r) {
683
+ function Ze(e, t, r) {
684
684
  return te(t) && Ke(t, r?.[e]);
685
685
  }
686
- function Ze(e, t) {
686
+ function Qe(e, t) {
687
687
  const r = /* @__PURE__ */ new Set();
688
688
  for (const n of e.dependent_fields) {
689
689
  const i = t.get(n);
@@ -700,7 +700,7 @@ function et(e) {
700
700
  function s(c) {
701
701
  if (!n.has(c.id)) {
702
702
  n.add(c.id);
703
- for (const f of Ze(c, r)) {
703
+ for (const f of Qe(c, r)) {
704
704
  const d = t.get(f);
705
705
  d && s(d);
706
706
  }
@@ -715,7 +715,7 @@ function tt(e, t) {
715
715
  return e.assigned_fields.every((r) => !te(t[r]));
716
716
  }
717
717
  function rt(e, t, r) {
718
- return e.dependent_fields.every((n) => Qe(n, t[n], r?.fieldDefinitions));
718
+ return e.dependent_fields.every((n) => Ze(n, t[n], r?.fieldDefinitions));
719
719
  }
720
720
  function nt(e) {
721
721
  const t = G.get(e.function_source);
@@ -951,7 +951,7 @@ function lt(e) {
951
951
  return e === "auto_force" || e === "auto_readonly" || e === "manual_readonly";
952
952
  }
953
953
  function jt(e) {
954
- const t = z({});
954
+ const t = $({});
955
955
  function r(l, o, a) {
956
956
  const u = e.wrapField();
957
957
  return u ? u(l, o, a) : a;