@nivaro/react 0.3.35 → 0.3.37

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 (106) hide show
  1. package/dist/components/slots/CommentsSlot.js +44 -36
  2. package/dist/full.css +1 -1
  3. package/dist/hooks/useSessionRecorder.js +1 -1
  4. package/dist/index.d.ts +13 -4
  5. package/dist/shared/components/AgentBadge.js +26 -0
  6. package/dist/shared/components/AgentQuestionsCard.js +198 -0
  7. package/dist/shared/components/ItemEditForm.js +3329 -3263
  8. package/dist/shared/components/McpConnectionScope.js +480 -0
  9. package/dist/shared/components/MyWorkView.js +223 -208
  10. package/dist/shared/components/RecordReadView.js +620 -572
  11. package/dist/shared/components/chat/ChatPanel.js +683 -671
  12. package/dist/shared/components/imports/DownloadSampleButton.js +69 -0
  13. package/dist/shared/components/imports/ImportConsole.js +106 -104
  14. package/dist/shared/components/imports/RunDetailSheet.js +11 -10
  15. package/dist/shared/components/item-edit/FieldAffordances.js +32 -32
  16. package/dist/shared/components/item-edit/FormTour.js +279 -0
  17. package/dist/shared/components/item-edit/GroupSection.js +377 -360
  18. package/dist/shared/components/item-edit/PersonalDefaultControl.js +80 -63
  19. package/dist/shared/components/item-edit/entry/EntryStrip.js +30 -26
  20. package/dist/shared/components/item-edit/form-density.js +36 -0
  21. package/dist/shared/components/item-edit/useFormUsageBeacon.js +59 -46
  22. package/dist/shared/components/item-edit/usePersonalDefaults.js +312 -296
  23. package/dist/shared/components/layout-editor/AddPanel.js +349 -192
  24. package/dist/shared/components/layout-editor/DesignNode.js +146 -131
  25. package/dist/shared/components/layout-editor/EditorCanvas.js +25 -17
  26. package/dist/shared/components/layout-editor/EditorTopBar.js +268 -206
  27. package/dist/shared/components/layout-editor/LayoutEditor.js +810 -731
  28. package/dist/shared/components/layout-editor/PlaceTools.js +334 -0
  29. package/dist/shared/components/layout-editor/SlashInsert.js +252 -0
  30. package/dist/shared/components/layout-editor/StructureMenu.js +285 -242
  31. package/dist/shared/components/layout-editor/add-target.js +54 -43
  32. package/dist/shared/components/layout-editor/ai-forms/AiComposer.js +238 -155
  33. package/dist/shared/components/layout-editor/ai-forms/AiFormsButton.js +1 -1
  34. package/dist/shared/components/layout-editor/ai-forms/ai-forms-api.js +15 -12
  35. package/dist/shared/components/layout-editor/dnd/LayoutDndProvider.js +379 -185
  36. package/dist/shared/components/layout-editor/dnd/TrashZone.js +96 -0
  37. package/dist/shared/components/layout-editor/dnd/UndoChip.js +76 -0
  38. package/dist/shared/components/layout-editor/dnd/merge-drop.js +33 -0
  39. package/dist/shared/components/layout-editor/dnd/multi-drop.js +87 -0
  40. package/dist/shared/components/layout-editor/dnd/node.js +115 -105
  41. package/dist/shared/components/layout-editor/dnd/rail-drop.js +4 -4
  42. package/dist/shared/components/layout-editor/dnd/sensors.js +23 -0
  43. package/dist/shared/components/layout-editor/dnd/trash-drop.js +58 -0
  44. package/dist/shared/components/layout-editor/dnd/trash-links.js +97 -0
  45. package/dist/shared/components/layout-editor/even-row.js +86 -0
  46. package/dist/shared/components/layout-editor/field-list.js +99 -0
  47. package/dist/shared/components/layout-editor/format-painter.js +102 -0
  48. package/dist/shared/components/layout-editor/grid-guides.js +15 -13
  49. package/dist/shared/components/layout-editor/inspector/BehaviourSettings.js +150 -132
  50. package/dist/shared/components/layout-editor/inspector/BulkInspector.js +57 -53
  51. package/dist/shared/components/layout-editor/inspector/EvenRowAction.js +31 -0
  52. package/dist/shared/components/layout-editor/inspector/GroupInspector.js +154 -141
  53. package/dist/shared/components/layout-editor/inspector/Inspector.js +209 -178
  54. package/dist/shared/components/layout-editor/inspector/LookTab.js +106 -98
  55. package/dist/shared/components/layout-editor/inspector/RulesTab.js +38 -37
  56. package/dist/shared/components/layout-editor/inspector/kit.js +280 -223
  57. package/dist/shared/components/layout-editor/keyboard-move.js +15 -15
  58. package/dist/shared/components/layout-editor/lint/LabelStyle.js +201 -0
  59. package/dist/shared/components/layout-editor/lint/LintPanel.js +132 -84
  60. package/dist/shared/components/layout-editor/lint/lint-api.js +65 -28
  61. package/dist/shared/components/layout-editor/nav/NavTools.js +14 -12
  62. package/dist/shared/components/layout-editor/nav/ZoomControls.js +145 -0
  63. package/dist/shared/components/layout-editor/nav/useEditorNav.js +34 -32
  64. package/dist/shared/components/layout-editor/nav/view-prefs.js +100 -15
  65. package/dist/shared/components/layout-editor/outputs/LayoutFile.js +89 -0
  66. package/dist/shared/components/layout-editor/outputs/OutputsButton.js +272 -195
  67. package/dist/shared/components/layout-editor/outputs/layout-file-plan.js +176 -0
  68. package/dist/shared/components/layout-editor/outputs/output-api.js +71 -37
  69. package/dist/shared/components/layout-editor/overview/describe-conditions.js +16 -11
  70. package/dist/shared/components/layout-editor/overview/purpose.js +5 -5
  71. package/dist/shared/components/layout-editor/panel-frame.js +1 -1
  72. package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
  73. package/dist/shared/components/layout-editor/personal-default-marks.js +40 -0
  74. package/dist/shared/components/layout-editor/pin.js +37 -19
  75. package/dist/shared/components/layout-editor/place-clip.js +257 -0
  76. package/dist/shared/components/layout-editor/preview/PreviewModes.js +27 -26
  77. package/dist/shared/components/layout-editor/preview/PreviewPanes.js +149 -118
  78. package/dist/shared/components/layout-editor/preview/SampleRecord.js +113 -0
  79. package/dist/shared/components/layout-editor/preview/preview-model.js +79 -60
  80. package/dist/shared/components/layout-editor/preview/sample-record.js +105 -0
  81. package/dist/shared/components/layout-editor/removed-log.js +151 -0
  82. package/dist/shared/components/layout-editor/reuse/LibraryRows.js +109 -78
  83. package/dist/shared/components/layout-editor/reuse/linked-sections.js +373 -0
  84. package/dist/shared/components/layout-editor/revert-element.js +140 -0
  85. package/dist/shared/components/layout-editor/section-structure.js +193 -170
  86. package/dist/shared/components/layout-editor/settings/EntrySection.js +63 -45
  87. package/dist/shared/components/layout-editor/settings/LayoutSection.js +63 -32
  88. package/dist/shared/components/layout-editor/settings/ResolveSettings.js +179 -137
  89. package/dist/shared/components/layout-editor/settings/WhoSection.js +18 -17
  90. package/dist/shared/components/layout-editor/settings/settings-registry.js +24 -0
  91. package/dist/shared/components/layout-editor/shortcuts.js +21 -16
  92. package/dist/shared/components/layout-editor/structure-ops.js +221 -195
  93. package/dist/shared/components/layout-editor/usage/UsagePanel.js +133 -85
  94. package/dist/shared/components/layout-editor/usage/refusal-lens.js +130 -0
  95. package/dist/shared/components/layout-editor/usage/usage-api.js +12 -11
  96. package/dist/shared/components/panels/CommentPanel.js +47 -45
  97. package/dist/shared/components/panels/RevisionsPanel.js +66 -64
  98. package/dist/shared/components/panels/TaskPanel.js +395 -332
  99. package/dist/shared/components/profile/AgentsPanel.js +196 -147
  100. package/dist/shared/components/profile/ConnectionRollback.js +329 -0
  101. package/dist/shared/components/profile/MyDefaultsCard.js +526 -520
  102. package/dist/shared/lib/entry-config.js +22 -22
  103. package/dist/shared/lib/form-usage-beacon.js +91 -55
  104. package/dist/shared/lib/layout-lint.js +530 -284
  105. package/dist/shared/lib/layout-resolve.js +58 -44
  106. package/package.json +1 -1
@@ -1,91 +1,101 @@
1
- import { applyLayoutOps as E, HEADER_GROUP_KEY as y, isCanvasSlot as s, UNGROUPED_KEY as d } from "../../lib/layout-ops.js";
2
- const a = (r) => E(r, [{ op: "layout_update", patch: {} }]), x = /* @__PURE__ */ new Set(["section", "tab", "metadata"]), k = (r, n) => r.placements.filter((o) => o.group_key === n && !s(o)).length, m = (r) => r.groups.filter((n) => n.parent_key === null);
3
- function O(r) {
1
+ import { HEADER_GROUP_KEY as y, isCanvasSlot as l, UNGROUPED_KEY as _, applyLayoutOps as S } from "../../lib/layout-ops.js";
2
+ const s = (r) => S(r, [{ op: "layout_update", patch: {} }]), g = /* @__PURE__ */ new Set(["section", "tab", "metadata"]), k = (r, n) => r.placements.filter((o) => o.group_key === n && !l(o)).length, m = (r) => r.groups.filter((n) => n.parent_key === null);
3
+ function E(r) {
4
4
  const n = [...m(r)].sort((o, e) => o.sort - e.sort);
5
5
  for (const o of n) {
6
- if (x.has(o.type)) return o;
6
+ if (g.has(o.type)) return o;
7
7
  if (o.type === "container") {
8
- const e = r.groups.filter((u) => u.parent_key === o.key).sort((u, i) => u.sort - i.sort)[0];
8
+ const e = r.groups.filter((i) => i.parent_key === o.key).sort((i, u) => i.sort - u.sort)[0];
9
9
  if (e) return e;
10
10
  }
11
11
  }
12
12
  return null;
13
13
  }
14
- function _(r) {
14
+ function d(r) {
15
15
  return r ? r.kind === "header" ? { field: r.field, group_key: y } : r.kind === "field" || r.kind === "slot" ? { field: r.field, group_key: r.group_key } : null : null;
16
16
  }
17
- function L(r, n, o = "form") {
18
- const e = a(r), u = _(n);
17
+ function O(r, n, o = "form") {
18
+ const e = s(r), i = d(n);
19
19
  if (o === "header") {
20
- if ((u == null ? void 0 : u.group_key) === y) {
21
- const t = e.placements.find((p) => p.field === u.field && p.group_key === y);
20
+ if ((i == null ? void 0 : i.group_key) === y) {
21
+ const t = e.placements.find((p) => p.field === i.field && p.group_key === y);
22
22
  if (t) return { group_key: y, index: t.sort + 1 };
23
23
  }
24
24
  return { group_key: y, index: k(e, y) };
25
25
  }
26
- if (u && u.group_key !== y) {
27
- const t = e.placements.find((p) => p.field === u.field && p.group_key === u.group_key);
28
- if (t && !s(t)) return { group_key: t.group_key, index: t.sort + 1 };
26
+ if (i && i.group_key !== y) {
27
+ const t = e.placements.find((p) => p.field === i.field && p.group_key === i.group_key);
28
+ if (t && !l(t)) return { group_key: t.group_key, index: t.sort + 1 };
29
29
  }
30
30
  if ((n == null ? void 0 : n.kind) === "group") {
31
- if (n.key === d) return { group_key: null, index: k(e, null) };
31
+ if (n.key === _) return { group_key: null, index: k(e, null) };
32
32
  const t = e.groups.find((p) => p.key === n.key);
33
- if (t && x.has(t.type)) return { group_key: t.key, index: k(e, t.key) };
33
+ if (t && g.has(t.type)) return { group_key: t.key, index: k(e, t.key) };
34
34
  if ((t == null ? void 0 : t.type) === "container") {
35
- const p = e.groups.filter((f) => f.parent_key === t.key).sort((f, l) => f.sort - l.sort)[0];
35
+ const p = e.groups.filter((f) => f.parent_key === t.key).sort((f, a) => f.sort - a.sort)[0];
36
36
  if (p) return { group_key: p.key, index: k(e, p.key) };
37
37
  }
38
38
  }
39
- const i = O(e);
40
- return i ? { group_key: i.key, index: k(e, i.key) } : { group_key: null, index: k(e, null) };
39
+ const u = E(e);
40
+ return u ? { group_key: u.key, index: k(e, u.key) } : { group_key: null, index: k(e, null) };
41
41
  }
42
42
  function h(r, n) {
43
- const o = m(r).length + r.placements.filter(s).length;
43
+ const o = m(r).length + r.placements.filter(l).length;
44
44
  if (!n) return o;
45
- const e = _(n);
45
+ const e = d(n);
46
46
  if (e) {
47
- const u = r.placements.find((t) => t.field === e.field && t.group_key === e.group_key);
48
- if (u && s(u)) return u.sort + 1;
49
- const i = e.group_key === null ? d : e.group_key;
50
- return g(r, i, o);
47
+ const i = r.placements.find((t) => t.field === e.field && t.group_key === e.group_key);
48
+ if (i && l(i)) return i.sort + 1;
49
+ const u = e.group_key === null ? _ : e.group_key;
50
+ return c(r, u, o);
51
51
  }
52
- return n.kind === "group" ? g(r, n.key, o) : o;
52
+ return n.kind === "group" ? c(r, n.key, o) : o;
53
53
  }
54
- function g(r, n, o) {
55
- let e = r.groups.find((u) => u.key === n);
56
- return e != null && e.parent_key && (e = r.groups.find((u) => u.key === (e == null ? void 0 : e.parent_key))), e ? e.sort + 1 : o;
54
+ function c(r, n, o) {
55
+ let e = r.groups.find((i) => i.key === n);
56
+ return e != null && e.parent_key && (e = r.groups.find((i) => i.key === (e == null ? void 0 : e.parent_key))), e ? e.sort + 1 : o;
57
57
  }
58
- function b(r, n) {
59
- return { group_key: null, index: h(a(r), n) };
58
+ function v(r, n) {
59
+ return { group_key: null, index: h(s(r), n) };
60
60
  }
61
- function c(r, n) {
61
+ function x(r, n) {
62
62
  const o = new Set(r.groups.map((e) => e.key));
63
63
  if (!o.has(n)) return n;
64
64
  for (let e = 2; ; e++) if (!o.has(`${n}_${e}`)) return `${n}_${e}`;
65
65
  }
66
- function v(r, n) {
67
- const o = a(r), e = _(n), u = (n == null ? void 0 : n.kind) === "group" ? n.key : (e == null ? void 0 : e.group_key) ?? null, i = u ? o.groups.find((p) => p.key === u) : void 0, t = (i == null ? void 0 : i.type) === "container" ? i : i != null && i.parent_key ? o.groups.find((p) => p.key === i.parent_key) : null;
66
+ function D(r, n) {
67
+ const o = s(r), e = d(n), i = (n == null ? void 0 : n.kind) === "group" ? n.key : (e == null ? void 0 : e.group_key) ?? null, u = i ? o.groups.find((p) => p.key === i) : void 0, t = (u == null ? void 0 : u.type) === "container" ? u : u != null && u.parent_key ? o.groups.find((p) => p.key === u.parent_key) : null;
68
68
  if (t) {
69
- const p = (t.tab_mode ?? o.layout.tab_mode) === "steps", f = o.groups.filter((w) => w.parent_key === t.key), l = i && i.parent_key === t.key ? i.sort + 1 : f.length;
69
+ const p = (t.tab_mode ?? o.layout.tab_mode) === "steps", f = o.groups.filter((w) => w.parent_key === t.key), a = u && u.parent_key === t.key ? u.sort + 1 : f.length;
70
70
  return {
71
71
  op: "group_create",
72
- key: c(o, p ? "step" : "tab"),
72
+ key: x(o, p ? "step" : "tab"),
73
73
  label: p ? "New step" : "New tab",
74
74
  group_type: "tab",
75
75
  parent_key: t.key,
76
- index: l
76
+ index: a
77
77
  };
78
78
  }
79
79
  return {
80
80
  op: "group_create",
81
- key: c(o, "section"),
81
+ key: x(o, "section"),
82
82
  label: "New section",
83
83
  group_type: "section",
84
84
  parent_key: null,
85
85
  index: h(o, n)
86
86
  };
87
87
  }
88
- function D(r, n, o) {
88
+ function N(r, n, o) {
89
+ const e = s(r);
90
+ if (n.kind === "group") {
91
+ if (n.key === _) return { top: !1, group_key: null, index: k(e, null) };
92
+ const t = e.groups.find((p) => p.key === n.key);
93
+ return t ? g.has(t.type) || t.type === "container" ? { top: !1, ...O(e, { kind: "group", key: t.key }) } : t.parent_key !== null ? null : { top: !0, index: o ? t.sort : t.sort + 1 } : null;
94
+ }
95
+ const i = n.kind === "header" ? y : n.group_key, u = e.placements.find((t) => t.field === n.field && t.group_key === i);
96
+ return u ? l(u) ? { top: !0, index: o ? u.sort : u.sort + 1 } : { top: !1, group_key: u.group_key, index: o ? u.sort : u.sort + 1 } : null;
97
+ }
98
+ function R(r, n, o) {
89
99
  return {
90
100
  op: "place",
91
101
  field: r,
@@ -95,9 +105,10 @@ function D(r, n, o) {
95
105
  };
96
106
  }
97
107
  export {
98
- L as fieldSpot,
99
- c as newGroupKey,
100
- D as placeOp,
101
- v as sectionOp,
102
- b as slotSpot
108
+ O as fieldSpot,
109
+ N as gapSpot,
110
+ x as newGroupKey,
111
+ R as placeOp,
112
+ D as sectionOp,
113
+ v as slotSpot
103
114
  };