@declarion/react 0.41.0 → 0.43.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.
@@ -1,4 +1,4 @@
1
- import { $n as e, Dt as t, Mt as n, Ot as r, bt as i, kt as a, r as o, t as s } from "./useCurrentScreen-D6LPBFOi.js";
1
+ import { Dt as e, Et as t, Ot as n, er as r, jt as i, r as a, t as o, yt as s } from "./useCurrentScreen-CpQjVmrT.js";
2
2
  import { useState as c } from "react";
3
3
  import { MemoryRouter as l } from "react-router";
4
4
  import { QueryClient as u, QueryClientProvider as d } from "@tanstack/react-query";
@@ -70,7 +70,7 @@ function S() {
70
70
  created_at: "2026-01-01T00:00:00Z",
71
71
  updated_at: "2026-01-01T00:00:00Z"
72
72
  };
73
- n.getState().setUser(t, e);
73
+ i.getState().setUser(t, e);
74
74
  }
75
75
  function C(e) {
76
76
  if (e === void 0) return { rows: [] };
@@ -85,39 +85,39 @@ function C(e) {
85
85
  }
86
86
  return e;
87
87
  }
88
- function w(e) {
89
- let n = e.entityData ?? {};
90
- a((e, t) => {
91
- let r = n[e], i = C(r), a = i.meta?.per_page ?? 50, o = i.meta?.total ?? i.rows.length;
88
+ function w(r) {
89
+ let i = r.entityData ?? {};
90
+ n((e, t) => {
91
+ let n = i[e], r = C(n), a = r.meta?.per_page ?? 50, o = r.meta?.total ?? r.rows.length;
92
92
  return t.count === "only" ? {
93
93
  data: [],
94
94
  meta: {
95
95
  page: 1,
96
96
  per_page: a,
97
97
  total: o,
98
- total_pages: i.meta?.total_pages ?? Math.max(1, Math.ceil(o / a)),
99
- count_mode: i.meta?.count_mode ?? "exact"
98
+ total_pages: r.meta?.total_pages ?? Math.max(1, Math.ceil(o / a)),
99
+ count_mode: r.meta?.count_mode ?? "exact"
100
100
  }
101
101
  } : {
102
- data: i.rows,
102
+ data: r.rows,
103
103
  meta: {
104
- page: i.meta?.page ?? 1,
104
+ page: r.meta?.page ?? 1,
105
105
  per_page: a,
106
- has_more: i.meta?.has_more ?? !1
106
+ has_more: r.meta?.has_more ?? !1
107
107
  },
108
- ...i.refs === void 0 ? {} : { $refs: i.refs }
108
+ ...r.refs === void 0 ? {} : { $refs: r.refs }
109
109
  };
110
110
  });
111
- let o = e.entityItems ?? {}, s = e.entityItemResponses ?? {};
112
- r((e, t) => {
113
- let n = typeof t == "string" ? t : i(t), r = s[e]?.[n];
111
+ let a = r.entityItems ?? {}, o = r.entityItemResponses ?? {};
112
+ e((e, t) => {
113
+ let n = typeof t == "string" ? t : s(t), r = o[e]?.[n];
114
114
  if (r instanceof Error) throw r;
115
115
  if (r !== void 0) return r;
116
- let a = o[e]?.[n];
117
- if (a instanceof Error) throw a;
118
- return { data: a };
116
+ let i = a[e]?.[n];
117
+ if (i instanceof Error) throw i;
118
+ return { data: i };
119
119
  });
120
- let c = e.actionResults ?? {};
120
+ let c = r.actionResults ?? {};
121
121
  t(async (e, t) => {
122
122
  if (!(e in c)) throw Error(`renderWithDeclarion: no action result registered for "${e}" (seed it via actionResults)`);
123
123
  let n = c[e];
@@ -125,52 +125,52 @@ function w(e) {
125
125
  });
126
126
  }
127
127
  function T() {
128
- a(null), r(null), t(null), n.setState({
128
+ n(null), e(null), t(null), i.setState({
129
129
  user: null,
130
130
  isAuthenticated: !1,
131
131
  activeTenant: null,
132
132
  tenants: []
133
133
  });
134
134
  }
135
- function E(t, n = {}) {
136
- let r = new u({ defaultOptions: { queries: {
135
+ function E(e, t = {}) {
136
+ let n = new u({ defaultOptions: { queries: {
137
137
  retry: !1,
138
138
  gcTime: Infinity
139
139
  } } });
140
- S(), r.setQueryData(["schema", !0], n.schema ?? g()), w(n);
141
- let i = n.screenCode ? /* @__PURE__ */ p(s, {
142
- code: n.screenCode,
143
- children: t
144
- }) : t, a = /* @__PURE__ */ m(d, {
145
- client: r,
140
+ S(), n.setQueryData(["schema", !0], t.schema ?? g()), w(t);
141
+ let i = t.screenCode ? /* @__PURE__ */ p(o, {
142
+ code: t.screenCode,
143
+ children: e
144
+ }) : e, s = /* @__PURE__ */ m(d, {
145
+ client: n,
146
146
  children: [/* @__PURE__ */ p(l, {
147
- initialEntries: [n.route ?? "/"],
148
- children: /* @__PURE__ */ p(o, { children: i })
147
+ initialEntries: [t.route ?? "/"],
148
+ children: /* @__PURE__ */ p(a, { children: i })
149
149
  }), /* @__PURE__ */ p(f, {})]
150
- }), c = h(n.viewport ? /* @__PURE__ */ p(e, {
151
- viewportOverride: n.viewport,
152
- children: a
153
- }) : a);
154
- return Object.assign(c, { queryClient: r });
150
+ }), c = h(t.viewport ? /* @__PURE__ */ p(r, {
151
+ viewportOverride: t.viewport,
152
+ children: s
153
+ }) : s);
154
+ return Object.assign(c, { queryClient: n });
155
155
  }
156
- function D({ children: e, authenticated: t = !0, ...r }) {
157
- let [i] = c(() => {
156
+ function D({ children: e, authenticated: t = !0, ...n }) {
157
+ let [r] = c(() => {
158
158
  let e = new u({ defaultOptions: { queries: {
159
159
  retry: !1,
160
160
  gcTime: Infinity
161
161
  } } });
162
- return t ? (S(), e.setQueryData(["schema", !0], r.schema ?? g())) : n.setState({
162
+ return t ? (S(), e.setQueryData(["schema", !0], n.schema ?? g())) : i.setState({
163
163
  user: null,
164
164
  isAuthenticated: !1,
165
165
  activeTenant: null,
166
166
  tenants: []
167
- }), w(r), e;
167
+ }), w(n), e;
168
168
  });
169
169
  return /* @__PURE__ */ m(d, {
170
- client: i,
170
+ client: r,
171
171
  children: [/* @__PURE__ */ p(l, {
172
- initialEntries: [r.route ?? "/"],
173
- children: /* @__PURE__ */ p(o, { children: e })
172
+ initialEntries: [n.route ?? "/"],
173
+ children: /* @__PURE__ */ p(a, { children: e })
174
174
  }), /* @__PURE__ */ p(f, {})]
175
175
  });
176
176
  }
@@ -465,7 +465,7 @@ export interface V2PropertyInstance {
465
465
  * row's `$evidence` key (the evidence satellite, mirroring `$statuses`). Read
466
466
  * cheaply from the stored verification result - never a live re-verify. Mirrors
467
467
  * the Go `evidence.RowVerdict`. `verdict` is one of: `verified`, `unverified`,
468
- * `tampered`, `erased`, `indeterminate`, `outside_coverage`.
468
+ * `tampered`, `indeterminate`, `outside_coverage`.
469
469
  */
470
470
  export interface EvidenceVerdict {
471
471
  verdict: string;