@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,18 +1,19 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { X as
|
|
1
|
+
import { jsxs as a, jsx as o, Fragment as R } from "react/jsx-runtime";
|
|
2
|
+
import { X as L } from "lucide-react";
|
|
3
3
|
import { useMemo as S } from "react";
|
|
4
4
|
import { UNGROUPED_KEY as D } from "../../../lib/layout-ops.js";
|
|
5
|
-
import { TipLayer as
|
|
6
|
-
import { ArrangeButton as
|
|
5
|
+
import { TipLayer as E } from "../../TipLayer.js";
|
|
6
|
+
import { ArrangeButton as H } from "../ArrangeButton.js";
|
|
7
7
|
import { targetKey as N } from "../design-context.js";
|
|
8
|
-
import { PlacementPresets as
|
|
9
|
-
import { inPageOrder as
|
|
8
|
+
import { PlacementPresets as I } from "../entry/PlacementPresets.js";
|
|
9
|
+
import { inPageOrder as j, selectedPlacements as z, fieldZones as A, isFieldRow as B, plural as g, widthOf as F, targetOfKey as O, keyOf as G, widthOps as K, GRID_WIDTHS as U, WIDTH_LABELS as $, flagOn as W, flagOps as q, moveToZoneOps as Z } from "../field-zones.js";
|
|
10
10
|
import { PanelHeader as V, PanelBody as X } from "../panel-frame.js";
|
|
11
11
|
import { effectText as Y } from "../panel-style.js";
|
|
12
12
|
import { slotName as J } from "../slot-names.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
13
|
+
import { EvenRowAction as Q } from "./EvenRowAction.js";
|
|
14
|
+
import { useCollectionMeta as ee } from "./field-context.js";
|
|
15
|
+
import { Setting as M, Segmented as te, Toggle as oe, Choice as ne } from "./kit.js";
|
|
16
|
+
import { describeField as re } from "./model.js";
|
|
16
17
|
const le = [
|
|
17
18
|
{
|
|
18
19
|
k: "required",
|
|
@@ -36,32 +37,32 @@ const le = [
|
|
|
36
37
|
effect: "Leaves them off this form; their values are kept."
|
|
37
38
|
}
|
|
38
39
|
];
|
|
39
|
-
function
|
|
40
|
+
function ye({
|
|
40
41
|
bundle: r,
|
|
41
|
-
selection:
|
|
42
|
-
apply:
|
|
42
|
+
selection: i,
|
|
43
|
+
apply: m,
|
|
43
44
|
collection: _,
|
|
44
45
|
onSelection: h
|
|
45
46
|
}) {
|
|
46
|
-
const { data:
|
|
47
|
-
() =>
|
|
48
|
-
[r,
|
|
49
|
-
), k = S(() =>
|
|
47
|
+
const { data: s } = ee(_), n = S(
|
|
48
|
+
() => j(r, z(r, i)),
|
|
49
|
+
[r, i]
|
|
50
|
+
), k = S(() => A(r), [r]), b = (e) => e.startsWith("__") ? J(e) : re(
|
|
50
51
|
e,
|
|
51
|
-
(
|
|
52
|
-
(
|
|
52
|
+
(s == null ? void 0 : s.fields) ?? [],
|
|
53
|
+
(s == null ? void 0 : s.relations) ?? [],
|
|
53
54
|
n.find((t) => t.field === e) ?? null
|
|
54
|
-
).label, u = n.filter(
|
|
55
|
-
e.length &&
|
|
55
|
+
).label, u = n.filter(B), d = i.length - n.length, p = g(n.length, "item"), x = new Set(n.map(F)), C = x.size === 1 ? String([...x][0]) : "", v = new Set(n.map((e) => e.group_key)), w = v.size === 1 ? P([...v][0] ?? null) : "", y = (e, t) => {
|
|
56
|
+
e.length && m(e, { label: t });
|
|
56
57
|
};
|
|
57
|
-
return /* @__PURE__ */
|
|
58
|
+
return /* @__PURE__ */ a(
|
|
58
59
|
"div",
|
|
59
60
|
{
|
|
60
61
|
"data-inspector": "",
|
|
61
62
|
"data-bulk-inspector": "",
|
|
62
63
|
className: "flex h-full min-h-0 min-w-0 flex-col text-[12px]",
|
|
63
64
|
children: [
|
|
64
|
-
/* @__PURE__ */ o(
|
|
65
|
+
/* @__PURE__ */ o(E, {}),
|
|
65
66
|
/* @__PURE__ */ o(
|
|
66
67
|
V,
|
|
67
68
|
{
|
|
@@ -70,8 +71,8 @@ function ve({
|
|
|
70
71
|
sub: "Shift- or ⌘-click to add or take out"
|
|
71
72
|
}
|
|
72
73
|
),
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
/* @__PURE__ */ o("ul", { className: "flex flex-wrap gap-1.5", "aria-label": "Selected", children: n.map((e) => /* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ a(X, { children: [
|
|
75
|
+
/* @__PURE__ */ o("ul", { className: "flex flex-wrap gap-1.5", "aria-label": "Selected", children: n.map((e) => /* @__PURE__ */ a(
|
|
75
76
|
"li",
|
|
76
77
|
{
|
|
77
78
|
className: "inline-flex max-w-full items-center gap-1 rounded-full bg-nvr-cyan/10 py-0.5 pl-2.5 pr-1 text-[12px] font-medium text-slate-800 dark:text-foreground",
|
|
@@ -83,53 +84,56 @@ function ve({
|
|
|
83
84
|
type: "button",
|
|
84
85
|
"aria-label": `Take ${b(e.field)} out of the selection`,
|
|
85
86
|
onClick: () => {
|
|
86
|
-
const t = N(O(
|
|
87
|
-
h(
|
|
87
|
+
const t = N(O(G(e)));
|
|
88
|
+
h(i.filter((l) => N(l) !== t));
|
|
88
89
|
},
|
|
89
90
|
className: "inline-flex h-4 w-4 items-center justify-center rounded-full text-slate-500 hover:bg-nvr-cyan/20 hover:text-slate-800 dark:text-muted-foreground dark:hover:text-foreground",
|
|
90
|
-
children: /* @__PURE__ */ o(
|
|
91
|
+
children: /* @__PURE__ */ o(L, { className: "h-3 w-3" })
|
|
91
92
|
}
|
|
92
93
|
)
|
|
93
94
|
]
|
|
94
95
|
},
|
|
95
96
|
`${e.field}:${e.group_key ?? ""}`
|
|
96
97
|
)) }),
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
/* @__PURE__ */ o(
|
|
99
|
-
u.length > 0 && /* @__PURE__ */ o(
|
|
98
|
+
/* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
99
|
+
/* @__PURE__ */ o(H, { targets: i }),
|
|
100
|
+
u.length > 0 && /* @__PURE__ */ o(I, { bundle: r, rows: u, apply: m })
|
|
100
101
|
] }),
|
|
101
|
-
|
|
102
|
-
g(
|
|
102
|
+
d > 0 && /* @__PURE__ */ a("p", { className: Y, children: [
|
|
103
|
+
g(d, "item"),
|
|
103
104
|
" from the parent form ",
|
|
104
|
-
|
|
105
|
+
d === 1 ? "is" : "are",
|
|
105
106
|
" left out: override ",
|
|
106
|
-
|
|
107
|
+
d === 1 ? "it" : "them",
|
|
107
108
|
" on this form first."
|
|
108
109
|
] }),
|
|
109
|
-
n.length > 0 && /* @__PURE__ */
|
|
110
|
-
/* @__PURE__ */
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
110
|
+
n.length > 0 && /* @__PURE__ */ a(R, { children: [
|
|
111
|
+
/* @__PURE__ */ a(M, { k: "bulk.col_span", label: "Width", effect: "Share of the row each one takes.", children: [
|
|
112
|
+
/* @__PURE__ */ o(
|
|
113
|
+
te,
|
|
114
|
+
{
|
|
115
|
+
value: C,
|
|
116
|
+
options: U.map((e) => ({ value: String(e), label: $[e] })),
|
|
117
|
+
onChange: (e) => y(
|
|
118
|
+
K(n, Number(e)),
|
|
119
|
+
`Set the width of ${p} to ${$[Number(e)]}`
|
|
120
|
+
)
|
|
121
|
+
}
|
|
122
|
+
),
|
|
123
|
+
/* @__PURE__ */ o(Q, { bundle: r, targets: i, apply: m })
|
|
124
|
+
] }),
|
|
121
125
|
le.map((e) => {
|
|
122
126
|
const t = e.k === "hidden" ? n : u;
|
|
123
127
|
if (t.length === 0) return null;
|
|
124
|
-
const l = t.filter((
|
|
128
|
+
const l = t.filter((f) => W(f, e.k)).length, c = g(t.length, e.k === "hidden" ? "item" : "field");
|
|
125
129
|
return /* @__PURE__ */ o(
|
|
126
|
-
|
|
130
|
+
oe,
|
|
127
131
|
{
|
|
128
132
|
k: `bulk.${e.k}`,
|
|
129
133
|
label: e.label,
|
|
130
134
|
effect: l > 0 && l < t.length ? `${l} of ${t.length} now. ${e.effect}` : e.effect,
|
|
131
135
|
checked: l === t.length,
|
|
132
|
-
onChange: (
|
|
136
|
+
onChange: (f) => y(q(t, e.k, f), (f ? e.on : e.off).replace("{n}", c))
|
|
133
137
|
},
|
|
134
138
|
e.k
|
|
135
139
|
);
|
|
@@ -141,7 +145,7 @@ function ve({
|
|
|
141
145
|
label: "Section",
|
|
142
146
|
effect: "Moves them to the end of that section, in the order they are on the form.",
|
|
143
147
|
children: /* @__PURE__ */ o(
|
|
144
|
-
|
|
148
|
+
ne,
|
|
145
149
|
{
|
|
146
150
|
ariaLabel: "Move to section",
|
|
147
151
|
value: w,
|
|
@@ -151,8 +155,8 @@ function ve({
|
|
|
151
155
|
],
|
|
152
156
|
onChange: (e) => {
|
|
153
157
|
if (!e) return;
|
|
154
|
-
const t = e === T ? null : e, l = k.find((
|
|
155
|
-
c.ops.length && (
|
|
158
|
+
const t = e === T ? null : e, l = k.find((f) => f.key === t), c = Z(r, n, t);
|
|
159
|
+
c.ops.length && (m(c.ops, { label: `Move ${p} to ${(l == null ? void 0 : l.label) ?? "another section"}` }), h(c.moved.map(O)));
|
|
156
160
|
}
|
|
157
161
|
}
|
|
158
162
|
)
|
|
@@ -175,5 +179,5 @@ function ve({
|
|
|
175
179
|
}
|
|
176
180
|
const T = D, P = (r) => r ?? T;
|
|
177
181
|
export {
|
|
178
|
-
|
|
182
|
+
ye as BulkInspector
|
|
179
183
|
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsxs as h, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { AlignHorizontalSpaceAround as p } from "lucide-react";
|
|
3
|
+
import { useMemo as i } from "react";
|
|
4
|
+
import { evenRowPlan as w, rowsToEven as f } from "../even-row.js";
|
|
5
|
+
import { WIDTH_LABELS as u } from "../field-zones.js";
|
|
6
|
+
function k({
|
|
7
|
+
bundle: t,
|
|
8
|
+
targets: o,
|
|
9
|
+
apply: l
|
|
10
|
+
}) {
|
|
11
|
+
const e = i(() => w(t, o), [t, o]), s = i(() => e.ok ? f(t, o) : [], [e, t, o]);
|
|
12
|
+
if (!e.ok) return null;
|
|
13
|
+
const r = s.filter((a) => a.members.length > 1), n = r.length === 1 ? r[0] : null, m = n ? `Even out this row (${n.members.length} at ${u[n.width] ?? n.width})` : `Even out their ${r.length} rows`;
|
|
14
|
+
return /* @__PURE__ */ h(
|
|
15
|
+
"button",
|
|
16
|
+
{
|
|
17
|
+
type: "button",
|
|
18
|
+
"data-even-row": "",
|
|
19
|
+
"data-tip": "Every field in the row gets the same width, filling the row",
|
|
20
|
+
onClick: () => l(e.ops, { label: e.label }),
|
|
21
|
+
className: "inline-flex items-center gap-1.5 text-[12px] font-medium text-sky-700 hover:underline dark:text-nvr-cyan",
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ c(p, { className: "h-3.5 w-3.5" }),
|
|
24
|
+
m
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
k as EvenRowAction
|
|
31
|
+
};
|