@nivaro/react 0.3.58 → 0.3.60

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 (43) hide show
  1. package/dist/components/fields/RelationField.js +110 -80
  2. package/dist/full.css +1 -1
  3. package/dist/hooks/useRelationOptions.js +1 -0
  4. package/dist/hooks/useSessionRecorder.js +1 -1
  5. package/dist/index.d.ts +32 -1
  6. package/dist/index.js +523 -520
  7. package/dist/shared/components/CollectionBrowserView.js +2083 -2052
  8. package/dist/shared/components/DataTable.js +497 -465
  9. package/dist/shared/components/ItemEditForm.js +4430 -4282
  10. package/dist/shared/components/PageRenderer.js +537 -508
  11. package/dist/shared/components/QueryTable.js +74 -74
  12. package/dist/shared/components/WidgetSlot.js +543 -520
  13. package/dist/shared/components/alerts/AlertManagerView.js +269 -275
  14. package/dist/shared/components/alerts/types.js +37 -14
  15. package/dist/shared/components/item-edit/FieldRenderer.js +22 -20
  16. package/dist/shared/components/item-edit/GridBulkEditDialog.js +55 -54
  17. package/dist/shared/components/item-edit/InlineTableField.js +2461 -2421
  18. package/dist/shared/components/item-edit/M2MCombobox.js +141 -137
  19. package/dist/shared/components/item-edit/PlanGrid.js +876 -820
  20. package/dist/shared/components/item-edit/QuickCreateButton.js +323 -130
  21. package/dist/shared/components/item-edit/RelationCombobox.js +408 -375
  22. package/dist/shared/components/item-edit/RelationGroupedCombobox.js +255 -156
  23. package/dist/shared/components/item-edit/SummaryPanel.js +356 -343
  24. package/dist/shared/components/item-edit/duplicate-rehearsal.js +47 -0
  25. package/dist/shared/components/item-edit/line-midair.js +82 -75
  26. package/dist/shared/components/item-edit/save-outcome.js +6 -4
  27. package/dist/shared/components/panels/ItemLockBanner.js +212 -209
  28. package/dist/shared/components/panels/PipelinePanel.js +775 -737
  29. package/dist/shared/components/panels/RecordIntegrityBanner.js +114 -86
  30. package/dist/shared/components/panels/RevisionsPanel.js +313 -299
  31. package/dist/shared/components/pipeline/PipelineEditorView.js +26 -16
  32. package/dist/shared/components/queue/QueueQuickFilters.js +13 -13
  33. package/dist/shared/components/queue/QueueWorklist.js +978 -953
  34. package/dist/shared/components/queue/live-state-aspect.js +9 -5
  35. package/dist/shared/components/widgets/ReviewListWidget.js +152 -149
  36. package/dist/shared/lib/display-prefs.js +60 -52
  37. package/dist/shared/lib/draft-store.js +71 -48
  38. package/dist/shared/lib/expression.js +53 -53
  39. package/dist/shared/lib/list-page-memory.js +42 -20
  40. package/dist/shared/lib/money-input.js +45 -0
  41. package/dist/shared/lib/sanitize-html.js +10 -6
  42. package/dist/shared/lib/staged-row-labels.js +18 -0
  43. package/package.json +1 -1
@@ -1,33 +1,33 @@
1
1
  import { jsxs as d, jsx as r } from "react/jsx-runtime";
2
- import { useQuery as S, useQueryClient as X, useMutation as Q } from "@tanstack/react-query";
3
- import { useState as b, useMemo as Y, useEffect as Z } from "react";
4
- import { useNivaroClient as U } from "../../context.js";
5
- import { get as z, post as q } from "../../lib/commands.js";
6
- import { useAfterIdle as J } from "../../lib/defer.js";
7
- import { formatRelative as ee, cn as F, titleCase as te } from "../../lib/utils.js";
8
- function ne(n, t, a = !0) {
9
- const u = U(), { data: i } = S({
2
+ import { useQuery as K, useQueryClient as Z, useMutation as I } from "@tanstack/react-query";
3
+ import { useState as f, useMemo as J, useEffect as ee } from "react";
4
+ import { useNivaroClient as W } from "../../context.js";
5
+ import { get as G, post as q } from "../../lib/commands.js";
6
+ import { useAfterIdle as te } from "../../lib/defer.js";
7
+ import { formatRelative as ne, cn as S, titleCase as re } from "../../lib/utils.js";
8
+ function ae(n, t, a = !0) {
9
+ const u = W(), { data: i } = K({
10
10
  queryKey: ["record-integrity", n, t],
11
11
  enabled: a,
12
12
  queryFn: () => u.request(
13
- z(`/config-conformance/record/${n}/${encodeURIComponent(t)}`)
14
- ).then((f) => f.data).catch(() => ({ enabled: !1, findings: [] })),
13
+ G(`/config-conformance/record/${n}/${encodeURIComponent(t)}`)
14
+ ).then((p) => p.data).catch(() => ({ enabled: !1, findings: [] })),
15
15
  staleTime: 5 * 6e4
16
- }), p = J(2e3), { data: g, isFetching: m } = S({
16
+ }), g = te(2e3), { data: b, isFetching: m } = K({
17
17
  queryKey: ["record-integrity", n, t, "live"],
18
- enabled: a && p,
18
+ enabled: a && g,
19
19
  queryFn: () => u.request(
20
20
  q(`/config-conformance/record/${n}/${encodeURIComponent(t)}/check`, {})
21
- ).then((f) => f.data).catch(() => null),
21
+ ).then((p) => p.data).catch(() => null),
22
22
  staleTime: 6e4,
23
23
  // Never spin the banner on a background refetch storm — one live check per
24
24
  // mount / invalidation is the contract.
25
25
  refetchOnWindowFocus: !1
26
26
  });
27
- return { data: g ?? i, checking: m };
27
+ return { data: b ?? i, checking: m };
28
28
  }
29
- const re = "nvr:own-record-writes";
30
- function T(n) {
29
+ const ie = "nvr:own-record-writes";
30
+ function H(n) {
31
31
  var a;
32
32
  const t = [];
33
33
  for (const u of n.writes ?? []) {
@@ -36,17 +36,17 @@ function T(n) {
36
36
  }
37
37
  return (a = n.pick) != null && a.collection && n.pick.item_id && t.push({ collection: n.pick.collection, id: String(n.pick.item_id) }), t;
38
38
  }
39
- function V(n) {
39
+ function Y(n) {
40
40
  n.length === 0 || typeof window > "u" || window.dispatchEvent(
41
- new CustomEvent(re, { detail: { writes: n } })
41
+ new CustomEvent(ie, { detail: { writes: n } })
42
42
  );
43
43
  }
44
- function ae(n, t) {
44
+ function de(n, t) {
45
45
  var u;
46
46
  const a = t == null ? void 0 : t.find((i) => i.field === n);
47
- return ((u = a == null ? void 0 : a.label) == null ? void 0 : u.trim()) || te(n);
47
+ return ((u = a == null ? void 0 : a.label) == null ? void 0 : u.trim()) || re(n);
48
48
  }
49
- function xe(n) {
49
+ function ge(n) {
50
50
  const t = /* @__PURE__ */ new Map();
51
51
  for (const a of n ?? []) {
52
52
  const u = t.get(a.field) ?? [];
@@ -54,7 +54,7 @@ function xe(n) {
54
54
  }
55
55
  return t;
56
56
  }
57
- const H = {
57
+ const z = {
58
58
  high: { dot: "bg-emerald-500", text: "Confident" },
59
59
  medium: { dot: "bg-amber-500", text: "Likely" },
60
60
  low: { dot: "bg-slate-400", text: "Manual" }
@@ -64,13 +64,13 @@ function pe({
64
64
  itemId: t,
65
65
  onJumpToField: a
66
66
  }) {
67
- var _;
68
- const u = U(), i = X(), [p, g] = b(!1), [m, f] = b(null), { data: s, checking: E } = ne(n, t), { data: y } = S({
67
+ var R;
68
+ const u = W(), i = Z(), [g, b] = f(!1), [m, p] = f(null), { data: s, checking: E } = ae(n, t), { data: y } = K({
69
69
  queryKey: ["field-config", n, null],
70
- queryFn: () => u.request(z(`/field-config/${n}`)).then((l) => l.data ?? []),
71
- enabled: !!((_ = s == null ? void 0 : s.findings) != null && _.length),
70
+ queryFn: () => u.request(G(`/field-config/${n}`)).then((l) => l.data ?? []),
71
+ enabled: !!((R = s == null ? void 0 : s.findings) != null && R.length),
72
72
  staleTime: 6e4
73
- }), K = () => {
73
+ }), L = () => {
74
74
  i.invalidateQueries({ queryKey: ["record-integrity", n, t] }), i.invalidateQueries({ queryKey: ["item", n, t] }), i.invalidateQueries({ queryKey: [n, t] }), i.invalidateQueries({ queryKey: ["o2m-rows"] }), i.invalidateQueries({ queryKey: ["revisions"] });
75
75
  };
76
76
  if (!(s != null && s.enabled) || s.findings.length === 0) return null;
@@ -110,7 +110,7 @@ function pe({
110
110
  title: new Date(s.checked_at).toLocaleString(),
111
111
  children: [
112
112
  "checked ",
113
- ee(s.checked_at)
113
+ ne(s.checked_at)
114
114
  ]
115
115
  }
116
116
  ) : null,
@@ -118,13 +118,13 @@ function pe({
118
118
  "button",
119
119
  {
120
120
  type: "button",
121
- onClick: () => g((l) => !l),
121
+ onClick: () => b((l) => !l),
122
122
  className: "ml-auto text-[11.5px] font-medium text-amber-700 underline decoration-dotted underline-offset-2 dark:text-amber-300",
123
- children: p ? "Hide" : "View"
123
+ children: g ? "Hide" : "View"
124
124
  }
125
125
  )
126
126
  ] }),
127
- p && /* @__PURE__ */ r("div", { className: "mt-1.5 space-y-1", children: s.findings.map((l, k) => /* @__PURE__ */ d("div", { children: [
127
+ g && /* @__PURE__ */ r("div", { className: "mt-1.5 space-y-1", children: s.findings.map((l, k) => /* @__PURE__ */ d("div", { children: [
128
128
  /* @__PURE__ */ d("div", { className: "flex items-baseline gap-2 text-[12px]", children: [
129
129
  /* @__PURE__ */ r(
130
130
  "button",
@@ -133,7 +133,7 @@ function pe({
133
133
  onClick: () => a == null ? void 0 : a(l.field),
134
134
  "data-integrity-field": l.field,
135
135
  className: "shrink-0 text-[11.5px] font-medium text-amber-700 underline decoration-dotted underline-offset-2 dark:text-amber-300",
136
- children: ae(l.field, y)
136
+ children: de(l.field, y)
137
137
  }
138
138
  ),
139
139
  /* @__PURE__ */ r("span", { className: "min-w-0 flex-1 text-amber-800 dark:text-amber-200/90", children: l.message }),
@@ -141,8 +141,8 @@ function pe({
141
141
  "button",
142
142
  {
143
143
  type: "button",
144
- onClick: () => f((h) => h === k ? null : k),
145
- className: F(
144
+ onClick: () => p((h) => h === k ? null : k),
145
+ className: S(
146
146
  "shrink-0 rounded px-2 py-0.5 text-[10.5px] font-semibold transition-colors",
147
147
  m === k ? "bg-amber-200 text-amber-900 dark:bg-amber-400/30 dark:text-amber-100" : "bg-amber-600 text-white hover:bg-amber-700"
148
148
  ),
@@ -151,13 +151,13 @@ function pe({
151
151
  )
152
152
  ] }),
153
153
  m === k && /* @__PURE__ */ r(
154
- ie,
154
+ oe,
155
155
  {
156
156
  collection: n,
157
157
  itemId: t,
158
158
  finding: l,
159
- onApplied: K,
160
- onClose: () => f(null)
159
+ onApplied: L,
160
+ onClose: () => p(null)
161
161
  }
162
162
  )
163
163
  ] }, `${l.field}|${l.rule}|${k}`)) })
@@ -165,27 +165,27 @@ function pe({
165
165
  }
166
166
  );
167
167
  }
168
- function ie({
168
+ function oe({
169
169
  collection: n,
170
170
  itemId: t,
171
171
  finding: a,
172
172
  onApplied: u,
173
173
  onClose: i
174
174
  }) {
175
- const p = U(), g = `/config-conformance/record/${n}/${encodeURIComponent(t)}`, m = { field: a.field, rule: a.rule, message: a.message }, { data: f, isLoading: s, error: E } = S({
175
+ const g = W(), b = `/config-conformance/record/${n}/${encodeURIComponent(t)}`, m = { field: a.field, rule: a.rule, message: a.message }, { data: p, isLoading: s, error: E } = K({
176
176
  queryKey: ["integrity-proposals", n, t, a.field, a.rule],
177
- queryFn: () => p.request(q(`${g}/proposals`, m)).then((e) => e.data.proposals),
177
+ queryFn: () => g.request(q(`${b}/proposals`, m)).then((e) => e.data.proposals),
178
178
  staleTime: 6e4
179
- }), [y, K] = b([]), [v, _] = b({}), [l, k] = b(""), [h, I] = b(null), [W, M] = b(0), [j, N] = b(null), [D, G] = b(null), B = Y(() => [...f ?? [], ...y], [f, y]);
180
- Z(() => {
179
+ }), [y, L] = f([]), [v, R] = f({}), [l, k] = f(""), [h, M] = f(null), [j, D] = f(0), [B, N] = f(null), [T, X] = f(null), [_, O] = f(null), V = J(() => [...p ?? [], ...y], [p, y]);
180
+ ee(() => {
181
181
  if (!h || h.undo.length === 0) return;
182
- M(30);
183
- const e = setInterval(() => M((c) => c <= 1 ? 0 : c - 1), 1e3);
182
+ D(30);
183
+ const e = setInterval(() => D((c) => c <= 1 ? 0 : c - 1), 1e3);
184
184
  return () => clearInterval(e);
185
185
  }, [h]);
186
- const R = Q({
187
- mutationFn: (e) => p.request(
188
- q(`${g}/fix`, {
186
+ const A = I({
187
+ mutationFn: (e) => g.request(
188
+ q(`${b}/fix`, {
189
189
  ...m,
190
190
  proposal_id: e.id,
191
191
  choice: e.kind === "pick" ? v[e.id] : void 0
@@ -193,26 +193,26 @@ function ie({
193
193
  ),
194
194
  onSuccess: (e, c) => {
195
195
  var C, $, o;
196
- N(null), V(T(c)), G(c);
196
+ N(null), Y(H(c)), X(c);
197
197
  const x = e.data, w = ((C = x.failed) == null ? void 0 : C.length) ?? 0;
198
- I({
198
+ M({
199
199
  text: c.kind === "notify" ? `Sent to ${(($ = c.notify) == null ? void 0 : $.name) ?? "the owner"} as a task.` : `${x.applied} write${x.applied === 1 ? "" : "s"} applied${w ? ` — ${w} failed: ${((o = x.failed[0]) == null ? void 0 : o.error) ?? ""}` : ""}.`,
200
200
  undo: x.undo ?? []
201
201
  }), u();
202
202
  },
203
- onError: (e) => N(A(e))
204
- }), L = Q({
205
- mutationFn: (e) => p.request(q(`${g}/fix`, { ...m, undo: e })),
203
+ onError: (e) => N(F(e))
204
+ }), P = I({
205
+ mutationFn: (e) => g.request(q(`${b}/fix`, { ...m, undo: e })),
206
206
  onSuccess: () => {
207
- D && V(T(D)), I({ text: "Undone.", undo: [] }), u();
207
+ T && Y(H(T)), M({ text: "Undone.", undo: [] }), u();
208
208
  },
209
- onError: (e) => N(A(e))
210
- }), O = Q({
211
- mutationFn: () => p.request(q(`${g}/proposals/ai`, m)).then((e) => e.data.proposal),
209
+ onError: (e) => N(F(e))
210
+ }), Q = I({
211
+ mutationFn: () => g.request(q(`${b}/proposals/ai`, m)).then((e) => e.data.proposal),
212
212
  onSuccess: (e) => {
213
- N(null), K((c) => c.some((x) => x.id === e.id) ? c : [...c, e]);
213
+ N(null), L((c) => c.some((x) => x.id === e.id) ? c : [...c, e]);
214
214
  },
215
- onError: (e) => N(A(e))
215
+ onError: (e) => N(F(e))
216
216
  });
217
217
  return /* @__PURE__ */ d(
218
218
  "div",
@@ -221,17 +221,17 @@ function ie({
221
221
  className: "mt-1.5 rounded-md border border-amber-200/80 bg-white/70 px-3 py-2 dark:border-amber-500/20 dark:bg-black/20",
222
222
  children: [
223
223
  s && /* @__PURE__ */ r("p", { className: "text-[11.5px] text-slate-500 dark:text-muted-foreground", children: "Working out what would fix this…" }),
224
- E && /* @__PURE__ */ r("p", { className: "text-[11.5px] text-red-600 dark:text-red-400", children: A(E) }),
224
+ E && /* @__PURE__ */ r("p", { className: "text-[11.5px] text-red-600 dark:text-red-400", children: F(E) }),
225
225
  h ? /* @__PURE__ */ d("div", { className: "flex flex-wrap items-center gap-2 text-[11.5px]", children: [
226
226
  /* @__PURE__ */ r("span", { className: "font-medium text-emerald-700 dark:text-emerald-400", children: h.text }),
227
- h.undo.length > 0 && W > 0 && /* @__PURE__ */ r(
227
+ h.undo.length > 0 && j > 0 && /* @__PURE__ */ r(
228
228
  "button",
229
229
  {
230
230
  type: "button",
231
- disabled: L.isPending,
232
- onClick: () => L.mutate(h.undo),
231
+ disabled: P.isPending,
232
+ onClick: () => P.mutate(h.undo),
233
233
  className: "rounded border border-slate-300 px-2 py-0.5 text-[11px] font-medium text-slate-700 hover:bg-slate-50 disabled:opacity-50 dark:border-border dark:text-foreground dark:hover:bg-muted",
234
- children: L.isPending ? "Undoing…" : `Undo (${W}s)`
234
+ children: P.isPending ? "Undoing…" : `Undo (${j}s)`
235
235
  }
236
236
  ),
237
237
  /* @__PURE__ */ r(
@@ -244,10 +244,10 @@ function ie({
244
244
  }
245
245
  )
246
246
  ] }) : !s && /* @__PURE__ */ d("div", { className: "space-y-1.5", children: [
247
- B.length === 0 && /* @__PURE__ */ r("p", { className: "text-[11.5px] text-slate-500 dark:text-muted-foreground", children: "Nothing on this record can derive a value — fix it by hand on the form." }),
248
- B.map((e) => {
247
+ V.length === 0 && /* @__PURE__ */ r("p", { className: "text-[11.5px] text-slate-500 dark:text-muted-foreground", children: "Nothing on this record can derive a value — fix it by hand on the form." }),
248
+ V.map((e) => {
249
249
  var C, $;
250
- const c = H[e.confidence] ?? H.low, x = v[e.id], w = (e.choices ?? []).filter(
250
+ const c = z[e.confidence] ?? z.low, x = v[e.id], w = (e.choices ?? []).filter(
251
251
  (o) => !l || o.label.toLowerCase().includes(l.toLowerCase())
252
252
  );
253
253
  return /* @__PURE__ */ r(
@@ -258,7 +258,7 @@ function ie({
258
258
  /* @__PURE__ */ r(
259
259
  "span",
260
260
  {
261
- className: F("mt-1.5 h-2 w-2 shrink-0 rounded-full", c.dot),
261
+ className: S("mt-1.5 h-2 w-2 shrink-0 rounded-full", c.dot),
262
262
  title: c.text,
263
263
  "data-tip": c.text
264
264
  }
@@ -269,8 +269,29 @@ function ie({
269
269
  /* @__PURE__ */ r("span", { className: "ml-1.5 text-[10px] font-normal uppercase tracking-wide text-slate-400", children: e.kind === "ai" ? "AI" : c.text })
270
270
  ] }),
271
271
  /* @__PURE__ */ r("p", { className: "text-[11px] leading-snug text-slate-500 dark:text-muted-foreground", children: e.basis }),
272
+ e.confirm && _ === e.id && /* @__PURE__ */ d(
273
+ "p",
274
+ {
275
+ role: "alert",
276
+ "data-integrity-confirm": !0,
277
+ className: "mt-1 text-[11px] font-medium leading-snug text-red-700 dark:text-red-300",
278
+ children: [
279
+ e.confirm,
280
+ " ",
281
+ /* @__PURE__ */ r(
282
+ "button",
283
+ {
284
+ type: "button",
285
+ onClick: () => O(null),
286
+ className: "font-normal text-slate-600 underline underline-offset-2 hover:text-slate-900 dark:text-muted-foreground dark:hover:text-foreground",
287
+ children: "Keep it"
288
+ }
289
+ )
290
+ ]
291
+ }
292
+ ),
272
293
  e.preview.length > 0 && /* @__PURE__ */ d("div", { className: "mt-1 flex flex-wrap gap-1", children: [
273
- e.preview.slice(0, 8).map((o, P) => /* @__PURE__ */ d(
294
+ e.preview.slice(0, 8).map((o, U) => /* @__PURE__ */ d(
274
295
  "span",
275
296
  {
276
297
  className: "rounded bg-slate-100 px-1.5 py-0.5 text-[10.5px] text-slate-700 dark:bg-muted dark:text-foreground",
@@ -283,7 +304,7 @@ function ie({
283
304
  /* @__PURE__ */ r("span", { className: "font-medium", children: o.to })
284
305
  ]
285
306
  },
286
- `${o.item_id}|${o.field}|${P}`
307
+ `${o.item_id}|${o.field}|${U}`
287
308
  )),
288
309
  e.preview.length > 8 && /* @__PURE__ */ d("span", { className: "text-[10.5px] text-slate-400", children: [
289
310
  "+",
@@ -306,8 +327,8 @@ function ie({
306
327
  "button",
307
328
  {
308
329
  type: "button",
309
- onClick: () => _((P) => ({ ...P, [e.id]: o.id })),
310
- className: F(
330
+ onClick: () => R((U) => ({ ...U, [e.id]: o.id })),
331
+ className: S(
311
332
  "rounded border px-1.5 py-0.5 text-[11px] transition-colors",
312
333
  x === o.id ? "border-nvr-cyan bg-nvr-cyan/10 text-slate-900 dark:text-foreground" : "border-slate-200 text-slate-700 hover:bg-muted dark:border-border dark:text-foreground"
313
334
  ),
@@ -323,13 +344,20 @@ function ie({
323
344
  "button",
324
345
  {
325
346
  type: "button",
326
- disabled: R.isPending || e.kind === "pick" && !x,
327
- onClick: () => R.mutate(e),
328
- className: F(
347
+ disabled: A.isPending || e.kind === "pick" && !x,
348
+ "data-integrity-apply": e.id,
349
+ onClick: () => {
350
+ if (e.confirm && _ !== e.id) {
351
+ O(e.id);
352
+ return;
353
+ }
354
+ O(null), A.mutate(e);
355
+ },
356
+ className: S(
329
357
  "shrink-0 rounded px-2 py-0.5 text-[10.5px] font-semibold text-white transition-colors disabled:opacity-50",
330
- e.kind === "notify" ? "bg-slate-600 hover:bg-slate-700" : "bg-nvr-cyan hover:bg-nvr-cyan-dark"
358
+ e.confirm && _ === e.id ? "bg-red-600 hover:bg-red-700" : e.kind === "notify" ? "bg-slate-600 hover:bg-slate-700" : "bg-nvr-cyan hover:bg-nvr-cyan-dark"
331
359
  ),
332
- children: R.isPending && (($ = R.variables) == null ? void 0 : $.id) === e.id ? "Applying…" : e.kind === "notify" ? "Send" : "Apply"
360
+ children: A.isPending && (($ = A.variables) == null ? void 0 : $.id) === e.id ? "Applying…" : e.confirm && _ === e.id ? "Yes, remove" : e.kind === "notify" ? "Send" : e.confirm ? "Remove" : "Apply"
333
361
  }
334
362
  )
335
363
  ] })
@@ -342,10 +370,10 @@ function ie({
342
370
  "button",
343
371
  {
344
372
  type: "button",
345
- disabled: O.isPending,
346
- onClick: () => O.mutate(),
373
+ disabled: Q.isPending,
374
+ onClick: () => Q.mutate(),
347
375
  className: "text-[11px] font-medium text-slate-600 underline decoration-dotted underline-offset-2 hover:text-slate-900 disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground",
348
- children: O.isPending ? "Asking AI…" : "Ask AI for a suggestion"
376
+ children: Q.isPending ? "Asking AI…" : "Ask AI for a suggestion"
349
377
  }
350
378
  ),
351
379
  /* @__PURE__ */ r(
@@ -358,22 +386,22 @@ function ie({
358
386
  }
359
387
  )
360
388
  ] }),
361
- j && /* @__PURE__ */ r("p", { className: "text-[11px] text-red-600 dark:text-red-400", children: j })
389
+ B && /* @__PURE__ */ r("p", { className: "text-[11px] text-red-600 dark:text-red-400", children: B })
362
390
  ] })
363
391
  ]
364
392
  }
365
393
  );
366
394
  }
367
- function A(n) {
395
+ function F(n) {
368
396
  var a;
369
397
  const t = n;
370
398
  return String(((a = t == null ? void 0 : t.response) == null ? void 0 : a.error) ?? (t == null ? void 0 : t.message) ?? "Request failed");
371
399
  }
372
400
  export {
373
- re as OWN_RECORD_WRITES_EVENT,
401
+ ie as OWN_RECORD_WRITES_EVENT,
374
402
  pe as RecordIntegrityBanner,
375
- ae as findingFieldLabel,
376
- xe as integrityByField,
377
- T as ownWritesOf,
378
- ne as useRecordIntegrity
403
+ de as findingFieldLabel,
404
+ ge as integrityByField,
405
+ H as ownWritesOf,
406
+ ae as useRecordIntegrity
379
407
  };