@declarion/react 0.31.1 → 0.32.0

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 (41) hide show
  1. package/dist-lib/{ActionRunner-BzaZQtiI.js → ActionRunner-CaSrGpBi.js} +264 -260
  2. package/dist-lib/{DraggableChildrenTable-DILqStHQ.js → DraggableChildrenTable-CAHg7paQ.js} +1 -1
  3. package/dist-lib/{Grid-BIsiUwPh.js → Grid-DDbBhqcl.js} +2 -2
  4. package/dist-lib/{LayoutRenderer-3RvIsC9M.js → LayoutRenderer-CelsqsZ6.js} +433 -433
  5. package/dist-lib/{MarkdownRenderer-CaHhWrfm.js → MarkdownRenderer-DThy2ixe.js} +1 -1
  6. package/dist-lib/RefreshControl-CorluL6r.js +582 -0
  7. package/dist-lib/{SmartDetailPage.impl--EO-9fos.js → SmartDetailPage.impl-USIxbl-8.js} +449 -411
  8. package/dist-lib/{SmartRecordListPage.impl-B1iws8yf.js → SmartRecordListPage.impl-BKIpTNK7.js} +210 -210
  9. package/dist-lib/api/data.d.ts +4 -4
  10. package/dist-lib/api/params.d.ts +1 -1
  11. package/dist-lib/components/layout/Rail.d.ts +5 -5
  12. package/dist-lib/components/layout/TopBar.d.ts +3 -1
  13. package/dist-lib/components/pages/auth/AuthShell.d.ts +1 -1
  14. package/dist-lib/components/pages/list/ListHeader.d.ts +1 -1
  15. package/dist-lib/components/primitives/BrandLogo.d.ts +1 -1
  16. package/dist-lib/components/shared/ActionRunner.d.ts +1 -0
  17. package/dist-lib/components/shared/ObjectActionBar.d.ts +29 -0
  18. package/dist-lib/components/shared/PageHeader.d.ts +1 -1
  19. package/dist-lib/components/shared/RecordHeader.d.ts +2 -1
  20. package/dist-lib/components/shared/RefreshControl.d.ts +6 -0
  21. package/dist-lib/hooks/useBranding.d.ts +8 -0
  22. package/dist-lib/hooks/useBrandingChrome.d.ts +6 -0
  23. package/dist-lib/hooks/useLiveObject.d.ts +9 -0
  24. package/dist-lib/hooks/useMutations.d.ts +3 -3
  25. package/dist-lib/hooks/useObject.d.ts +10 -0
  26. package/dist-lib/hooks/usePageStateRuntime.d.ts +1 -1
  27. package/dist-lib/hooks/useParams.d.ts +10 -1
  28. package/dist-lib/index.d.ts +11 -5
  29. package/dist-lib/index.js +1890 -1722
  30. package/dist-lib/lib/actions.d.ts +6 -2
  31. package/dist-lib/lib/branding.d.ts +10 -1
  32. package/dist-lib/{registry-2KliNTHB.js → registry-KQyyL5Gt.js} +1452 -1401
  33. package/dist-lib/testing.d.ts +5 -3
  34. package/dist-lib/testing.js +35 -31
  35. package/dist-lib/types/api.d.ts +70 -3
  36. package/dist-lib/types/schema.d.ts +1 -15
  37. package/dist-lib/{useProperties-Co3RdtuT.js → useProperties-D74hyWIa.js} +53 -53
  38. package/dist-lib/{value-BooGwUik.js → value-BfXXl5EE.js} +1 -1
  39. package/package.json +1 -1
  40. package/dist-lib/hooks/useEntityItem.d.ts +0 -10
  41. package/dist-lib/peekDraftStore-yyzMbaiI.js +0 -468
@@ -4,7 +4,7 @@ import { QueryClient } from "@tanstack/react-query";
4
4
  import { type ResponsiveViewport } from "./hooks/useResponsiveMode";
5
5
  import { type ActionExecuteRequest, type ActionExecuteResponse } from "./api/data";
6
6
  import type { Schema } from "./types/schema";
7
- import type { ListMeta, ListResponse, Refs } from "./types/api";
7
+ import type { DataResponse, ListMeta, ListResponse, Refs } from "./types/api";
8
8
  /** A single action's stubbed outcome: the action's RESULT payload (what
9
9
  * executeDeclarionAction unwraps from response.result), or a function of the
10
10
  * dispatched body returning it. The harness always wraps it in a success
@@ -25,8 +25,10 @@ export interface RenderWithDeclarionOptions {
25
25
  schema?: Schema;
26
26
  /** entity -> rows, { rows, meta }, or an entityDataFixture() ListResponse; resolves useEntityData / useEntityCount. */
27
27
  entityData?: Record<string, Record<string, unknown>[] | EntityDataFixture | ListResponse>;
28
- /** entity -> { [id]: row }; resolves useEntityItem. */
29
- entityItems?: Record<string, Record<string, Record<string, unknown>>>;
28
+ /** entity -> { [id]: row | Error }; resolves useObject. Error entries let tests model 404/403 without network. */
29
+ entityItems?: Record<string, Record<string, Record<string, unknown> | Error>>;
30
+ /** entity -> { [id]: DataResponse | Error }; resolves useObject when a test needs envelope metadata like `$refs`. */
31
+ entityItemResponses?: Record<string, Record<string, DataResponse | Error>>;
30
32
  /** action code -> result | (body) => result; resolves executeAction (and create/update/delete/restore). */
31
33
  actionResults?: Record<string, ActionResult>;
32
34
  /** Initial path for the memory router (e.g. "/replay/abc/compare"). Default "/". */
@@ -1,4 +1,4 @@
1
- import { H as e, Nn as t, X as n, Y as r, Z as i, mt as a, t as o } from "./ActionRunner-BzaZQtiI.js";
1
+ import { Nn as e, dt as t, lt as n, mt as r, nt as i, t as a, ut as o } from "./ActionRunner-CaSrGpBi.js";
2
2
  import { useState as s } from "react";
3
3
  import { MemoryRouter as c } from "react-router-dom";
4
4
  import { QueryClient as l, QueryClientProvider as u } from "@tanstack/react-query";
@@ -70,7 +70,7 @@ function x() {
70
70
  created_at: "2026-01-01T00:00:00Z",
71
71
  updated_at: "2026-01-01T00:00:00Z"
72
72
  };
73
- a.getState().setUser(t, e);
73
+ r.getState().setUser(t, e);
74
74
  }
75
75
  function S(e) {
76
76
  if (e === void 0) return { rows: [] };
@@ -85,50 +85,54 @@ function S(e) {
85
85
  }
86
86
  return e;
87
87
  }
88
- function C(t) {
89
- let a = t.entityData ?? {};
90
- i((e, t) => {
91
- let n = a[e], r = S(n), i = r.meta?.per_page ?? 50, o = r.meta?.total ?? r.rows.length;
88
+ function C(e) {
89
+ let r = e.entityData ?? {};
90
+ t((e, t) => {
91
+ let n = r[e], i = S(n), a = i.meta?.per_page ?? 50, o = i.meta?.total ?? i.rows.length;
92
92
  return t.count === "only" ? {
93
93
  data: [],
94
94
  meta: {
95
95
  page: 1,
96
- per_page: i,
96
+ per_page: a,
97
97
  total: o,
98
- total_pages: r.meta?.total_pages ?? Math.max(1, Math.ceil(o / i)),
99
- count_mode: r.meta?.count_mode ?? "exact"
98
+ total_pages: i.meta?.total_pages ?? Math.max(1, Math.ceil(o / a)),
99
+ count_mode: i.meta?.count_mode ?? "exact"
100
100
  }
101
101
  } : {
102
- data: r.rows,
102
+ data: i.rows,
103
103
  meta: {
104
- page: r.meta?.page ?? 1,
105
- per_page: i,
106
- has_more: r.meta?.has_more ?? !1
104
+ page: i.meta?.page ?? 1,
105
+ per_page: a,
106
+ has_more: i.meta?.has_more ?? !1
107
107
  },
108
- ...r.refs === void 0 ? {} : { $refs: r.refs }
108
+ ...i.refs === void 0 ? {} : { $refs: i.refs }
109
109
  };
110
110
  });
111
- let o = t.entityItems ?? {};
112
- n((t, n) => {
113
- let r = typeof n == "string" ? n : e(n);
114
- return { data: o[t]?.[r] };
111
+ let a = e.entityItems ?? {}, s = e.entityItemResponses ?? {};
112
+ o((e, t) => {
113
+ let n = typeof t == "string" ? t : i(t), r = s[e]?.[n];
114
+ if (r instanceof Error) throw r;
115
+ if (r !== void 0) return r;
116
+ let o = a[e]?.[n];
117
+ if (o instanceof Error) throw o;
118
+ return { data: o };
115
119
  });
116
- let s = t.actionResults ?? {};
117
- r(async (e, t) => {
118
- if (!(e in s)) throw Error(`renderWithDeclarion: no action result registered for "${e}" (seed it via actionResults)`);
119
- let n = s[e];
120
+ let c = e.actionResults ?? {};
121
+ n(async (e, t) => {
122
+ if (!(e in c)) throw Error(`renderWithDeclarion: no action result registered for "${e}" (seed it via actionResults)`);
123
+ let n = c[e];
120
124
  return b(typeof n == "function" ? await n(t) : n);
121
125
  });
122
126
  }
123
127
  function w() {
124
- i(null), n(null), r(null), a.setState({
128
+ t(null), o(null), n(null), r.setState({
125
129
  user: null,
126
130
  isAuthenticated: !1,
127
131
  activeTenant: null,
128
132
  tenants: []
129
133
  });
130
134
  }
131
- function T(e, n = {}) {
135
+ function T(t, n = {}) {
132
136
  let r = new l({ defaultOptions: { queries: {
133
137
  retry: !1,
134
138
  gcTime: Infinity
@@ -138,21 +142,21 @@ function T(e, n = {}) {
138
142
  client: r,
139
143
  children: [/* @__PURE__ */ f(c, {
140
144
  initialEntries: [n.route ?? "/"],
141
- children: /* @__PURE__ */ f(o, { children: e })
145
+ children: /* @__PURE__ */ f(a, { children: t })
142
146
  }), /* @__PURE__ */ f(d, {})]
143
- }), a = m(n.viewport ? /* @__PURE__ */ f(t, {
147
+ }), o = m(n.viewport ? /* @__PURE__ */ f(e, {
144
148
  viewportOverride: n.viewport,
145
149
  children: i
146
150
  }) : i);
147
- return Object.assign(a, { queryClient: r });
151
+ return Object.assign(o, { queryClient: r });
148
152
  }
149
153
  function E({ children: e, authenticated: t = !0, ...n }) {
150
- let [r] = s(() => {
154
+ let [i] = s(() => {
151
155
  let e = new l({ defaultOptions: { queries: {
152
156
  retry: !1,
153
157
  gcTime: Infinity
154
158
  } } });
155
- return t ? (x(), e.setQueryData(["schema", !0], n.schema ?? h())) : a.setState({
159
+ return t ? (x(), e.setQueryData(["schema", !0], n.schema ?? h())) : r.setState({
156
160
  user: null,
157
161
  isAuthenticated: !1,
158
162
  activeTenant: null,
@@ -160,10 +164,10 @@ function E({ children: e, authenticated: t = !0, ...n }) {
160
164
  }), C(n), e;
161
165
  });
162
166
  return /* @__PURE__ */ p(u, {
163
- client: r,
167
+ client: i,
164
168
  children: [/* @__PURE__ */ f(c, {
165
169
  initialEntries: [n.route ?? "/"],
166
- children: /* @__PURE__ */ f(o, { children: e })
170
+ children: /* @__PURE__ */ f(a, { children: e })
167
171
  }), /* @__PURE__ */ f(d, {})]
168
172
  });
169
173
  }
@@ -30,6 +30,7 @@ export interface ListResponse<T = Record<string, unknown>> {
30
30
  }
31
31
  export interface DataResponse<T = Record<string, unknown>> {
32
32
  data: T;
33
+ $refs?: Refs;
33
34
  }
34
35
  export interface ApiErrorBody {
35
36
  error: {
@@ -148,6 +149,7 @@ export interface PublicParam {
148
149
  code: string;
149
150
  name: LocalizedString;
150
151
  type: string;
152
+ structure?: string;
151
153
  category: string;
152
154
  description?: LocalizedString;
153
155
  value: unknown;
@@ -159,8 +161,7 @@ export interface PublicLegalLinks {
159
161
  terms_url?: string;
160
162
  docs_url?: string;
161
163
  }
162
- /** Subset of branding exposed pre-login by /api/params/public. */
163
- export interface PublicBranding {
164
+ export interface BrandingIdentity {
164
165
  app_name?: string;
165
166
  app_logo?: string;
166
167
  app_initial?: string;
@@ -176,6 +177,73 @@ export interface PublicBranding {
176
177
  workspace_domain?: string;
177
178
  legal_links?: PublicLegalLinks;
178
179
  }
180
+ export interface BrandingThemeColors {
181
+ accent?: string;
182
+ accent_hover?: string;
183
+ accent_soft?: string;
184
+ primary?: string;
185
+ sidebar?: string;
186
+ rail?: string;
187
+ surface?: string;
188
+ surface_2?: string;
189
+ background?: string;
190
+ text?: string;
191
+ text_muted?: string;
192
+ border?: string;
193
+ }
194
+ export interface BrandingThemeTypography {
195
+ font_display?: string;
196
+ body?: number;
197
+ page_title?: number;
198
+ table_cell?: number;
199
+ control?: number;
200
+ caption?: number;
201
+ }
202
+ export interface BrandingTheme {
203
+ css_url?: string;
204
+ font_sans?: string;
205
+ font_mono?: string;
206
+ radius?: string;
207
+ density?: string;
208
+ colors?: BrandingThemeColors;
209
+ typography?: BrandingThemeTypography;
210
+ }
211
+ export interface BrandingSurfaceFlags {
212
+ show_title?: boolean;
213
+ show_breadcrumbs?: boolean;
214
+ show_actions?: boolean;
215
+ show_count?: boolean;
216
+ show_sidebar?: boolean;
217
+ show_topbar?: boolean;
218
+ show_rail?: boolean;
219
+ show_tabs?: boolean;
220
+ show_tenant_switcher?: boolean;
221
+ }
222
+ export interface BrandingChrome {
223
+ full?: {
224
+ shell?: BrandingSurfaceFlags;
225
+ surfaces?: {
226
+ list?: BrandingSurfaceFlags;
227
+ detail?: BrandingSurfaceFlags;
228
+ record_list?: BrandingSurfaceFlags;
229
+ custom?: BrandingSurfaceFlags;
230
+ };
231
+ };
232
+ embed?: {
233
+ surfaces?: {
234
+ list?: BrandingSurfaceFlags;
235
+ detail?: BrandingSurfaceFlags;
236
+ record_list?: BrandingSurfaceFlags;
237
+ custom?: BrandingSurfaceFlags;
238
+ };
239
+ };
240
+ }
241
+ /** Structured value of the public `branding` parameter. */
242
+ export interface PublicBranding {
243
+ identity?: BrandingIdentity;
244
+ theme?: BrandingTheme;
245
+ chrome?: BrandingChrome;
246
+ }
179
247
  /**
180
248
  * Deploy-time identity exposed pre-login by /api/params/public so the
181
249
  * auth shell can render real region/build values (no mockup placeholders).
@@ -193,7 +261,6 @@ export interface PublicParamsResponse {
193
261
  parameters: PublicParam[];
194
262
  accents?: Record<string, AccentDef>;
195
263
  messages?: Record<string, LocalizedString>;
196
- branding?: PublicBranding;
197
264
  meta?: PublicMeta;
198
265
  }
199
266
  /**
@@ -261,6 +261,7 @@ export interface ParameterDef {
261
261
  name: LocalizedString;
262
262
  description?: LocalizedString;
263
263
  type: string;
264
+ structure?: string;
264
265
  default?: unknown;
265
266
  is_public?: boolean;
266
267
  category?: string;
@@ -925,20 +926,6 @@ export interface HandlerDef {
925
926
  params?: OrderedMap<HandlerParam>;
926
927
  success_event?: string;
927
928
  }
928
- export interface Branding {
929
- app_name?: string;
930
- app_logo?: string;
931
- app_initial?: string;
932
- accent_color?: string;
933
- ai_name?: string;
934
- wordmark?: string;
935
- version_label?: string;
936
- status_url?: string;
937
- auth_tagline?: LocalizedString;
938
- auth_subtagline?: LocalizedString;
939
- auth_badges?: LocalizedString[];
940
- css_url?: string;
941
- }
942
929
  export interface Schema {
943
930
  languages: LanguageDef[];
944
931
  structures: Record<string, StructureDef>;
@@ -950,7 +937,6 @@ export interface Schema {
950
937
  enums: Record<string, EnumDef>;
951
938
  parameters: Record<string, ParameterDef>;
952
939
  messages?: Record<string, LocalizedString>;
953
- branding?: Branding;
954
940
  areas?: AreaDef[];
955
941
  accents?: Record<string, AccentDef>;
956
942
  /**
@@ -1,5 +1,5 @@
1
- import { $ as e, Ot as t, U as n, Yt as r, gn as i, kt as a, lt as o, on as s } from "./ActionRunner-BzaZQtiI.js";
2
- import { ht as c } from "./registry-2KliNTHB.js";
1
+ import { J as e, Ot as t, R as n, Yt as r, gn as i, kt as a, on as o, rt as s } from "./ActionRunner-CaSrGpBi.js";
2
+ import { vt as c } from "./registry-KQyyL5Gt.js";
3
3
  import { useEffect as l, useMemo as u } from "react";
4
4
  import { useSearchParams as d } from "react-router-dom";
5
5
  import { useInfiniteQuery as f, useMutation as p, useQueryClient as m } from "@tanstack/react-query";
@@ -109,7 +109,7 @@ var b = class {
109
109
  await this.deleteMany([e]);
110
110
  }
111
111
  async deleteMany(e) {
112
- return e.length === 0 ? { count: 0 } : { count: (await n(`${this.entity}.__delete`, {
112
+ return e.length === 0 ? { count: 0 } : { count: (await s(`${this.entity}.__delete`, {
113
113
  object_ids: e,
114
114
  entity: this.entity
115
115
  })).object_count ?? e.length };
@@ -118,7 +118,7 @@ var b = class {
118
118
  await this.restoreMany([e]);
119
119
  }
120
120
  async restoreMany(e) {
121
- return e.length === 0 ? { count: 0 } : { count: (await n(`${this.entity}.__restore`, {
121
+ return e.length === 0 ? { count: 0 } : { count: (await s(`${this.entity}.__restore`, {
122
122
  object_ids: e,
123
123
  entity: this.entity
124
124
  })).object_count ?? e.length };
@@ -232,39 +232,39 @@ function O(e, t, n) {
232
232
  }
233
233
  //#endregion
234
234
  //#region src/hooks/useTabSearchMirror.ts
235
- function k(e) {
236
- let t = o(), [n] = d();
235
+ function k(t) {
236
+ let n = e(), [r] = d();
237
237
  l(() => {
238
- if (!e || t.enabled) return;
239
- let r = c.getState(), i = r.findTabByPathname(e);
240
- i && r.updateTabSearch(i.id, n.toString());
238
+ if (!t || n.enabled) return;
239
+ let e = c.getState(), i = e.findTabByPathname(t);
240
+ i && e.updateTabSearch(i.id, r.toString());
241
241
  }, [
242
- n,
243
- e,
244
- t.enabled
242
+ r,
243
+ t,
244
+ n.enabled
245
245
  ]);
246
246
  }
247
247
  //#endregion
248
248
  //#region src/hooks/useRegisterScreenTab.ts
249
- function A(e, t, n, r) {
250
- let i = o();
249
+ function A(t, n, r, i) {
250
+ let a = e();
251
251
  l(() => {
252
- !e || i.enabled || c.getState().openTab({
253
- pathname: e,
254
- search: r,
255
- title: t,
256
- icon: n,
252
+ !t || a.enabled || c.getState().openTab({
253
+ pathname: t,
254
+ search: i,
255
+ title: n,
256
+ icon: r,
257
257
  closable: !0
258
258
  });
259
259
  }, [
260
- e,
261
260
  t,
262
261
  n,
263
- i.enabled
262
+ r,
263
+ a.enabled
264
264
  ]);
265
265
  }
266
266
  function j(e, t, n) {
267
- let r = e?.route, i = t ? s(e?.display?.name) || s(t.display.name_plural) : "", a = e?.display?.icon || t?.display.icon;
267
+ let r = e?.route, i = t ? o(e?.display?.name) || o(t.display.name_plural) : "", a = e?.display?.icon || t?.display.icon;
268
268
  A(t ? r : void 0, i, a, n);
269
269
  }
270
270
  //#endregion
@@ -373,79 +373,79 @@ function V(e, t) {
373
373
  }
374
374
  //#endregion
375
375
  //#region src/api/status.ts
376
- async function H(e, t, r, i, a) {
377
- let o = {
378
- status_group_code: r,
379
- status_code: i
376
+ async function H(e, t, n, r, i) {
377
+ let a = {
378
+ status_group_code: n,
379
+ status_code: r
380
380
  };
381
- a != null && (o.note = a);
382
- let s = (await n(`${e}.__update`, {
381
+ i != null && (a.note = i);
382
+ let o = (await s(`${e}.__update`, {
383
383
  object_ids: [t],
384
384
  entity: e,
385
- fields: { $statuses: [o] }
385
+ fields: { $statuses: [a] }
386
386
  })).result?.rows?.[0]?.$statuses ?? [];
387
- return s.find((e) => e.group_code === r) ?? s[0];
387
+ return o.find((e) => e.group_code === n) ?? o[0];
388
388
  }
389
389
  //#endregion
390
390
  //#region src/hooks/useObjectStatus.ts
391
- function U(t, n) {
391
+ function U(e, t) {
392
392
  let r = m();
393
393
  return p({
394
- mutationFn: ({ groupCode: e, statusCode: r, note: i }) => H(t, n, e, r, i),
394
+ mutationFn: ({ groupCode: n, statusCode: r, note: i }) => H(e, t, n, r, i),
395
395
  onSuccess: () => {
396
- r.invalidateQueries({ queryKey: ["entity-item", t] });
396
+ r.invalidateQueries({ queryKey: ["entity-item", e] });
397
397
  },
398
- onError: (t) => {
399
- e.error(t.message);
398
+ onError: (e) => {
399
+ n.error(e.message);
400
400
  }
401
401
  });
402
402
  }
403
403
  //#endregion
404
404
  //#region src/api/properties.ts
405
- async function W(e, t, r, i) {
406
- let a = (await n(`${e}.__update`, {
405
+ async function W(e, t, n, r) {
406
+ let i = (await s(`${e}.__update`, {
407
407
  object_ids: [t],
408
408
  entity: e,
409
409
  fields: { $properties: [{
410
- property_code: r,
411
- value: i
410
+ property_code: n,
411
+ value: r
412
412
  }] }
413
413
  })).result?.rows?.[0]?.$properties ?? [];
414
- return a.find((e) => e.property_code === r) ?? a[0];
414
+ return i.find((e) => e.property_code === n) ?? i[0];
415
415
  }
416
- async function G(e, t, r) {
417
- await n(`${e}.__update`, {
416
+ async function G(e, t, n) {
417
+ await s(`${e}.__update`, {
418
418
  object_ids: [t],
419
419
  entity: e,
420
420
  fields: { $properties: [{
421
- property_code: r,
421
+ property_code: n,
422
422
  value: null
423
423
  }] }
424
424
  });
425
425
  }
426
426
  //#endregion
427
427
  //#region src/hooks/useProperties.ts
428
- function K(t, n) {
428
+ function K(e, t) {
429
429
  let r = m();
430
430
  return p({
431
- mutationFn: ({ propertyCode: e, value: r }) => W(t, n, e, r),
431
+ mutationFn: ({ propertyCode: n, value: r }) => W(e, t, n, r),
432
432
  onSuccess: () => {
433
- r.invalidateQueries({ queryKey: ["entity-item", t] });
433
+ r.invalidateQueries({ queryKey: ["entity-item", e] });
434
434
  },
435
- onError: (t) => {
436
- e.error(t.message);
435
+ onError: (e) => {
436
+ n.error(e.message);
437
437
  }
438
438
  });
439
439
  }
440
- function q(t, n) {
440
+ function q(e, t) {
441
441
  let r = m();
442
442
  return p({
443
- mutationFn: (e) => G(t, n, e),
443
+ mutationFn: (n) => G(e, t, n),
444
444
  onSuccess: () => {
445
- r.invalidateQueries({ queryKey: ["entity-item", t] });
445
+ r.invalidateQueries({ queryKey: ["entity-item", e] });
446
446
  },
447
- onError: (t) => {
448
- e.error(t.message);
447
+ onError: (e) => {
448
+ n.error(e.message);
449
449
  }
450
450
  });
451
451
  }
@@ -1,4 +1,4 @@
1
- import { Ft as e, It as t, zt as n } from "./ActionRunner-BzaZQtiI.js";
1
+ import { Ft as e, It as t, zt as n } from "./ActionRunner-CaSrGpBi.js";
2
2
  import { useCallback as r, useEffect as i, useRef as a, useState as o } from "react";
3
3
  //#region src/components/file-widgets/helpers.ts
4
4
  var s = ["thumb_200", "thumb_300"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@declarion/react",
3
- "version": "0.31.1",
3
+ "version": "0.32.0",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "description": "React SDK for Declarion, the schema-driven business apps platform.",
@@ -1,10 +0,0 @@
1
- import { type QueryKey } from "@tanstack/react-query";
2
- import type { PkValues } from "../types/schema";
3
- /**
4
- * The React Query key for a single-record read. Single source of truth for both
5
- * `useEntityItem` and a detail screen registering its PRIMARY read with its
6
- * retained page (`useRegisterRetainedQuery`). For a string PK uses it directly;
7
- * for a composite PK sorts the parts so key order does not fork the cache.
8
- */
9
- export declare function entityItemQueryKey(entity: string | undefined, pkValues: PkValues | string | undefined): QueryKey;
10
- export declare function useEntityItem(entity: string | undefined, pkValues: PkValues | string | undefined): import("@tanstack/react-query").UseQueryResult<NoInfer<import("..").DataResponse<Record<string, unknown>>>, Error>;