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