@declarion/react 0.56.0 → 0.59.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 (167) hide show
  1. package/README.md +0 -2
  2. package/dist-lib/AgentChatPanel.impl-DBH1Ff4G.js +1200 -0
  3. package/dist-lib/DetailAuditStrip-GNRA_eP5.js +289 -0
  4. package/dist-lib/{DraggableChildrenTable-BV5sb8Uo.js → DraggableChildrenTable-4RZC351U.js} +87 -86
  5. package/dist-lib/Grid-CQabaBLx.js +405 -0
  6. package/dist-lib/{LayoutRenderer-C9AH9cXf.js → LayoutRenderer-DGKWZKpW.js} +1000 -1114
  7. package/dist-lib/{ListCardsBody-DXcDg536.js → ListCardsBody-DfGmyNIu.js} +84 -84
  8. package/dist-lib/MarkdownRenderer-BDbzDv_y.js +87 -0
  9. package/dist-lib/{RefreshControl-CNtN8zSl.js → RefreshControl-Bhoib0ZA.js} +126 -155
  10. package/dist-lib/SmartDetailPage.impl-Ds2RGg6K.js +1565 -0
  11. package/dist-lib/SmartListPage.impl-BrZLE_Gb.js +3046 -0
  12. package/dist-lib/{SmartRecordListPage.impl-Bkl9aZJ8.js → SmartRecordListPage.impl-C1FJLr80.js} +281 -280
  13. package/dist-lib/SortHeaderMenu-Cijxk4cX.js +107 -0
  14. package/dist-lib/action-dispatch-DY0c8U81.js +1967 -0
  15. package/dist-lib/api/client.d.ts +5 -0
  16. package/dist-lib/api/data.d.ts +2 -4
  17. package/dist-lib/api/entities.d.ts +8 -15
  18. package/dist-lib/api/events.d.ts +3 -3
  19. package/dist-lib/cardProjection-Bkl2SSYz.js +499 -0
  20. package/dist-lib/components/actions/ResponsiveActionBar.d.ts +17 -16
  21. package/dist-lib/components/agents/AgentChatPanel.d.ts +3 -13
  22. package/dist-lib/components/agents/AgentChatPanel.impl.d.ts +14 -0
  23. package/dist-lib/components/agents/AgentPicker.d.ts +1 -2
  24. package/dist-lib/components/chrome/PageShell.d.ts +7 -0
  25. package/dist-lib/components/chrome/RecordHeader.d.ts +1 -2
  26. package/dist-lib/components/detail-layout/ChildrenBlock.d.ts +1 -1
  27. package/dist-lib/components/detail-layout/DetailAuditStrip.d.ts +1 -2
  28. package/dist-lib/components/detail-layout/DetailHighlights.d.ts +1 -2
  29. package/dist-lib/components/detail-layout/blockMeta.d.ts +2 -1
  30. package/dist-lib/components/fields/BoolField.d.ts +1 -1
  31. package/dist-lib/components/fields/EnumField.d.ts +1 -1
  32. package/dist-lib/components/fields/IntArrayField.d.ts +1 -1
  33. package/dist-lib/components/fields/MultilangArrayField.d.ts +2 -0
  34. package/dist-lib/components/fields/MultilangField.d.ts +1 -1
  35. package/dist-lib/components/fields/MultilangTextField.d.ts +1 -1
  36. package/dist-lib/components/fields/NumberField.d.ts +1 -1
  37. package/dist-lib/components/fields/PasswordField.d.ts +1 -1
  38. package/dist-lib/components/fields/RefCombobox.d.ts +1 -1
  39. package/dist-lib/components/fields/SecretField.d.ts +1 -1
  40. package/dist-lib/components/fields/StringArrayField.d.ts +1 -1
  41. package/dist-lib/components/fields/TimestampField.d.ts +1 -1
  42. package/dist-lib/components/fields/cells/registry.d.ts +2 -1
  43. package/dist-lib/components/fields/index.d.ts +2 -1
  44. package/dist-lib/components/fields/langMap.d.ts +2 -0
  45. package/dist-lib/components/fields/secretValue.d.ts +2 -0
  46. package/dist-lib/components/file-widgets/UnknownFileWidget.d.ts +3 -0
  47. package/dist-lib/components/file-widgets/UploadFailureText.d.ts +4 -0
  48. package/dist-lib/components/file-widgets/helpers.d.ts +1 -1
  49. package/dist-lib/components/file-widgets/host.d.ts +4 -3
  50. package/dist-lib/components/file-widgets/types.d.ts +1 -0
  51. package/dist-lib/components/file-widgets/upload.d.ts +18 -3
  52. package/dist-lib/components/filters/filter-op-label.d.ts +3 -0
  53. package/dist-lib/components/layout/ImpersonationBanner.d.ts +1 -1
  54. package/dist-lib/components/layout/ImpersonationFrame.d.ts +1 -1
  55. package/dist-lib/components/layout/Layout.d.ts +2 -1
  56. package/dist-lib/components/layout/Sidebar.d.ts +2 -1
  57. package/dist-lib/components/layout/TenantChip.d.ts +1 -1
  58. package/dist-lib/components/list/ViewSwitcher.d.ts +4 -2
  59. package/dist-lib/components/pages/DocumentsMenu.d.ts +1 -2
  60. package/dist-lib/components/pages/ExportMenu.d.ts +3 -5
  61. package/dist-lib/components/pages/RecordDocumentsPanel.d.ts +1 -2
  62. package/dist-lib/components/pages/auth/AuthShell.d.ts +4 -31
  63. package/dist-lib/components/pages/exportRequest.d.ts +4 -6
  64. package/dist-lib/components/pages/list/DeleteViewDialog.d.ts +8 -0
  65. package/dist-lib/components/pages/list/ListCardRow.d.ts +1 -2
  66. package/dist-lib/components/pages/list/ListCardsBody.d.ts +0 -1
  67. package/dist-lib/components/pages/list/ListFloatbar.d.ts +2 -2
  68. package/dist-lib/components/pages/list/ListHeader.d.ts +2 -2
  69. package/dist-lib/components/pages/list/ListNoRows.d.ts +4 -5
  70. package/dist-lib/components/pages/list/ListToolbar.d.ts +3 -2
  71. package/dist-lib/components/pages/list/ListUrlBanner.d.ts +10 -0
  72. package/dist-lib/components/pages/list/RowActionsCell.d.ts +2 -4
  73. package/dist-lib/components/pages/list/RowContextMenu.d.ts +1 -2
  74. package/dist-lib/components/pages/list/columns.d.ts +2 -1
  75. package/dist-lib/components/pages/list/filter-meta.d.ts +2 -1
  76. package/dist-lib/components/pages/list/useActiveView.d.ts +38 -0
  77. package/dist-lib/components/pages/list/useListColumnLayout.d.ts +6 -5
  78. package/dist-lib/components/pages/list/useListQuery.d.ts +4 -4
  79. package/dist-lib/components/pages/list/useListSort.d.ts +5 -4
  80. package/dist-lib/components/pages/list/useListViews.d.ts +18 -8
  81. package/dist-lib/components/pages/list/useRowMenu.d.ts +2 -3
  82. package/dist-lib/components/pages/profile/Profile.d.ts +3 -0
  83. package/dist-lib/components/params/ParamsBlock.d.ts +1 -13
  84. package/dist-lib/components/params/param-editors.d.ts +3 -11
  85. package/dist-lib/components/primitives/ClassifiedFieldLocked.d.ts +1 -2
  86. package/dist-lib/components/shared/DynamicIcon.d.ts +2 -2
  87. package/dist-lib/components/shared/ErrorBoundary.d.ts +1 -1
  88. package/dist-lib/components/shared/LoadingSkeleton.d.ts +1 -0
  89. package/dist-lib/components/shared/LucideIcon.d.ts +1 -1
  90. package/dist-lib/components/shared/useOwnRefresh.d.ts +1 -1
  91. package/dist-lib/declarion-react.css +1 -1
  92. package/dist-lib/embed/theme.d.ts +1 -1
  93. package/dist-lib/embed/useEmbedNavigate.d.ts +1 -1
  94. package/dist-lib/failure-v-uGSpbX.js +158 -0
  95. package/dist-lib/{field-classification-D6xQYn-h.js → field-classification-C28XE-_P.js} +514 -307
  96. package/dist-lib/format-count-DA4wmmWR.js +1771 -0
  97. package/dist-lib/hooks/useEntityData.d.ts +1 -1
  98. package/dist-lib/hooks/useFilters.d.ts +7 -5
  99. package/dist-lib/hooks/useLanguage.d.ts +4 -0
  100. package/dist-lib/hooks/useParams.d.ts +4 -51
  101. package/dist-lib/hooks/useRegisterScreenTab.d.ts +1 -1
  102. package/dist-lib/hooks/useSSE.d.ts +3 -3
  103. package/dist-lib/hooks/useTabTitle.d.ts +2 -0
  104. package/dist-lib/hooks/useText.d.ts +3 -3
  105. package/dist-lib/hooks/useVersionWatcher.d.ts +1 -1
  106. package/dist-lib/hooks/useViews.d.ts +20 -0
  107. package/dist-lib/index.d.ts +8 -7
  108. package/dist-lib/index.js +2716 -5795
  109. package/dist-lib/lib/action-dispatch.d.ts +2 -1
  110. package/dist-lib/lib/actions.d.ts +30 -42
  111. package/dist-lib/lib/anchor.d.ts +3 -4
  112. package/dist-lib/lib/decimal-text.d.ts +1 -0
  113. package/dist-lib/lib/document-templates.d.ts +1 -2
  114. package/dist-lib/lib/download.d.ts +2 -1
  115. package/dist-lib/lib/evidence-verdict.d.ts +2 -1
  116. package/dist-lib/lib/failure.d.ts +2 -0
  117. package/dist-lib/lib/field-classification.d.ts +3 -3
  118. package/dist-lib/lib/filters.d.ts +18 -2
  119. package/dist-lib/lib/format-count.d.ts +8 -7
  120. package/dist-lib/lib/language.d.ts +19 -0
  121. package/dist-lib/lib/mass-edit.d.ts +2 -1
  122. package/dist-lib/lib/realtime-query-keys.d.ts +1 -1
  123. package/dist-lib/lib/realtime-reconcile.d.ts +3 -4
  124. package/dist-lib/lib/screen-back.d.ts +4 -6
  125. package/dist-lib/lib/sort.d.ts +9 -9
  126. package/dist-lib/lib/timestamp.d.ts +5 -7
  127. package/dist-lib/lib/ui-actions.d.ts +2 -1
  128. package/dist-lib/peekDraftStore-D-cTbiIr.js +199 -0
  129. package/dist-lib/registry-Cb3W-czW.js +1950 -0
  130. package/dist-lib/safe-url-oSJw5pzO.js +34 -0
  131. package/dist-lib/stores/icon-registry.d.ts +2 -2
  132. package/dist-lib/stores/list-layout.d.ts +3 -4
  133. package/dist-lib/stores/realtime.d.ts +1 -1
  134. package/dist-lib/stores/tabs.d.ts +3 -2
  135. package/dist-lib/testing.d.ts +6 -0
  136. package/dist-lib/testing.js +98 -76
  137. package/dist-lib/types/api.d.ts +7 -8
  138. package/dist-lib/types/fieldType.d.ts +1 -1
  139. package/dist-lib/types/files.d.ts +4 -4
  140. package/dist-lib/types/schema.d.ts +44 -50
  141. package/dist-lib/useAgentConversation-D97IqE-J.js +623 -0
  142. package/dist-lib/{useCurrentScreen-CzwzQpoW.js → useCurrentScreen-BL5NZFCw.js} +2777 -3768
  143. package/dist-lib/useListQuery-BG1GyKtJ.js +103 -0
  144. package/dist-lib/useProperties-4Lg3odrt.js +83 -0
  145. package/dist-lib/{useTabSearchMirror-C39U85cg.js → useTabSearchMirror-ZVLlINBX.js} +49 -51
  146. package/dist-lib/useText-BFDCTUSo.js +952 -0
  147. package/dist-lib/{value-Bo8C8WMU.js → value-By1-WJ8J.js} +74 -76
  148. package/dist-lib/vite/fingerprint-plugin.d.ts +2 -3
  149. package/package.json +13 -12
  150. package/dist-lib/Grid-DWgUPuZ3.js +0 -404
  151. package/dist-lib/MarkdownRenderer-CcSFc2N3.js +0 -85
  152. package/dist-lib/RecordIdBadge-CGxPR-8q.js +0 -24
  153. package/dist-lib/SmartDetailPage.impl-lskCd-WG.js +0 -1846
  154. package/dist-lib/SmartListPage.impl-CrGbdzyK.js +0 -2854
  155. package/dist-lib/SortHeaderMenu-SYSAaqQJ.js +0 -106
  156. package/dist-lib/action-dispatch-CR4ajBtT.js +0 -1985
  157. package/dist-lib/cardProjection-CW5RIMko.js +0 -699
  158. package/dist-lib/components/pages/home/HomeStub.d.ts +0 -6
  159. package/dist-lib/components/pages/jobs/Jobs.d.ts +0 -1
  160. package/dist-lib/components/pages/pipeline/Pipeline.d.ts +0 -1
  161. package/dist-lib/format-count-Dobmi-Ji.js +0 -1551
  162. package/dist-lib/hooks/useUserLocale.d.ts +0 -1
  163. package/dist-lib/lib/messages.d.ts +0 -12
  164. package/dist-lib/peekDraftStore-5wQ7lq_V.js +0 -194
  165. package/dist-lib/registry-CjgUaF7C.js +0 -1768
  166. package/dist-lib/useListQuery-D7Hr5WM1.js +0 -96
  167. package/dist-lib/useProperties-CqtCzFCr.js +0 -81
@@ -0,0 +1,34 @@
1
+ //#region src/lib/safe-url.ts
2
+ var e = [
3
+ "http:",
4
+ "https:",
5
+ "mailto:"
6
+ ], t = /[\u0000-\u001f\u007f]/g;
7
+ function n(n) {
8
+ if (!n) return;
9
+ let r = n.trim();
10
+ if (!r) return;
11
+ let i = r.replace(t, "");
12
+ if (!i || i.startsWith("//")) return;
13
+ let a = i.match(/^([a-zA-Z][a-zA-Z0-9+.-]*):/);
14
+ if (a) {
15
+ let t = a[1].toLowerCase() + ":";
16
+ if (!e.includes(t)) return;
17
+ }
18
+ return i;
19
+ }
20
+ function r(e) {
21
+ if (!e) return !1;
22
+ if (e.startsWith("//")) return !0;
23
+ let t = typeof window < "u" ? window.location.href : "http://localhost/", n;
24
+ try {
25
+ n = new URL(e, t);
26
+ } catch {
27
+ return !1;
28
+ }
29
+ if (n.protocol !== "http:" && n.protocol !== "https:") return !0;
30
+ let r = typeof window < "u" ? window.location.origin : "http://localhost";
31
+ return n.origin !== r;
32
+ }
33
+ //#endregion
34
+ export { n, r as t };
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * One declared glyph. Matches the wire JSON the Go side serves on /api/schema
3
- * as `icons` (plan §4):
3
+ * as `icons`:
4
4
  * - svg: geometry-only path `d` strings, rendered into the fixed 24x24
5
5
  * stroke frame (the same frame as the built-in set).
6
6
  * - lucide: a Lucide icon name, lazily resolved via dynamicIconImports.
7
- * - url: an asset URL, rendered via <img src> ONLY (security boundary, §6).
7
+ * - url: an asset URL, rendered via <img src> ONLY (security boundary).
8
8
  */
9
9
  export type IconDef = {
10
10
  kind: "svg";
@@ -1,7 +1,6 @@
1
1
  /**
2
- * Per-device list-table WIDTH store (plan 2026-07-18 "Adjustable table
3
- * columns", rev 2). Holds ONE thing: column pixel widths, device-local in
4
- * localStorage, per (tenant, user, SCREEN) by column id. Screen-keyed, so
2
+ * Per-device list-table WIDTH store. Holds ONE thing: column pixel widths,
3
+ * device-local in localStorage, per (tenant, user, SCREEN) by column id. Screen-keyed, so
5
4
  * widening a column once holds across EVERY view of that screen on this device.
6
5
  * Absent entry = the YAML default (`field.display.width ?? 150`), resolved by
7
6
  * TanStack when `header.getSize()` reads `columnSizing[id] ?? columnDef.size`.
@@ -15,7 +14,7 @@
15
14
  * for a teammate on a laptop), so it is device-local and never in a saved view.
16
15
  *
17
16
  * This does NOT violate the "browser stores nothing" appearance-preferences
18
- * rule (Decision 33, `preferences.ts`): that governs deployment BRANDING
17
+ * rule (`preferences.ts`): that governs deployment BRANDING
19
18
  * (theme/accent/density). Widths are device state of the same class as the
20
19
  * `tabs` store, which already uses localStorage. Keying + persistence mirror
21
20
  * `stores/tabs.ts`: a module-level (tenant,user) scope set via `setScope`, the
@@ -90,7 +90,7 @@ export declare function screenCurrentness(state: CurrentnessInputs, realtimeFlag
90
90
  /**
91
91
  * The one predicate every indicator reads: is the screen showing this entity
92
92
  * CURRENT. The rows keep rendering throughout; this says whether they may be
93
- * behind. docs/realtime.md "Currentness".
93
+ * behind.
94
94
  */
95
95
  export declare function useScreenIsLive(realtimeFlag: boolean | undefined, entityCode: string): boolean;
96
96
  export {};
@@ -10,7 +10,7 @@ export type TabCloseScope = "current" | "others" | "right" | "all";
10
10
  * origin tab with a hash is reopened via pathname+search, and the hash is
11
11
  * applied only in the `navigate()` call. `tabId`/`title`/`icon`/`screen` are
12
12
  * hints for switching to (or reopening) the origin tab. Never stores secrets,
13
- * external URLs, or row data. See docs/plans/2026-06-29-origin-aware-back-navigation.md.
13
+ * external URLs, or row data.
14
14
  */
15
15
  export interface ReturnTarget {
16
16
  pathname: string;
@@ -26,6 +26,7 @@ export interface TabItem {
26
26
  pathname: string;
27
27
  search: string;
28
28
  title: string;
29
+ derivedTitle?: boolean;
29
30
  icon?: string;
30
31
  closable: boolean;
31
32
  area?: string;
@@ -46,7 +47,7 @@ interface TabState {
46
47
  switchTab: (id: string) => void;
47
48
  reorderTabs: (activeId: string, overId: string) => void;
48
49
  findTabByPathname: (pathname: string) => TabItem | undefined;
49
- updateTabTitle: (id: string, title: string) => void;
50
+ updateTabTitle: (id: string, title: string, derived?: boolean) => void;
50
51
  updateTabSearch: (id: string, search: string) => void;
51
52
  setReturnTarget: (id: string, rt: ReturnTarget | null) => void;
52
53
  commitTabNavigation: (id: string, patch: {
@@ -5,6 +5,8 @@ import { type ResponsiveViewport } from "./hooks/useResponsiveMode.d.ts";
5
5
  import { type ActionExecuteRequest, type ActionExecuteResponse } from "./api/data.d.ts";
6
6
  import type { Schema } from "./types/schema.d.ts";
7
7
  import type { DataResponse, ListMeta, ListResponse, Refs } from "./types/api.d.ts";
8
+ import { type TextFn } from "./lib/language.d.ts";
9
+ import type { LocalizedString } from "./types/schema.d.ts";
8
10
  /** A single action's stubbed outcome: the action's RESULT payload (what
9
11
  * executeDeclarionAction unwraps from response.result), or a function of the
10
12
  * dispatched body returning it. The harness always wraps it in a success
@@ -63,6 +65,10 @@ export interface RenderWithDeclarionResult extends RenderResult {
63
65
  * CALLED something rather than that the user arrived. */
64
66
  location: () => string;
65
67
  }
68
+ export declare function textFixture(language?: string, messages?: Record<string, LocalizedString>): TextFn;
69
+ export declare function languageWrapper(language?: string, messages?: Record<string, LocalizedString>): ({ children }: {
70
+ children: ReactNode;
71
+ }) => import("react").JSX.Element;
66
72
  /** Build a valid Schema from a partial - fills the required empty maps so a
67
73
  * consumer only declares the entities/screens its test needs. */
68
74
  export declare function schemaFixture(partial?: Partial<Schema>): Schema;
@@ -1,14 +1,36 @@
1
- import { $t as e, Bt as t, cn as n, dn as r, jr as i, on as a, r as o, sn as s, t as c } from "./useCurrentScreen-CzwzQpoW.js";
2
- import { useState as l } from "react";
3
- import { MemoryRouter as u, useLocation as d } from "react-router";
4
- import { QueryClient as f, QueryClientProvider as p } from "@tanstack/react-query";
5
- import { Toaster as m } from "sonner";
6
- import { jsx as h, jsxs as g } from "react/jsx-runtime";
7
- import { render as _ } from "@testing-library/react";
1
+ import { an as e, r as t, t as n } from "./useCurrentScreen-BL5NZFCw.js";
2
+ import { E as r, p as i, s as a } from "./useText-BFDCTUSo.js";
3
+ import { _ as o, c as s, g as c, v as l } from "./failure-v-uGSpbX.js";
4
+ import { useState as u } from "react";
5
+ import { MemoryRouter as d, useLocation as f } from "react-router";
6
+ import { QueryClient as p, QueryClientProvider as m } from "@tanstack/react-query";
7
+ import { Toaster as h } from "sonner";
8
+ import { jsx as g, jsxs as _ } from "react/jsx-runtime";
9
+ import { render as v } from "@testing-library/react";
8
10
  //#region src/testing.tsx
9
- function v(e = {}) {
11
+ function y(e = "en", t) {
12
+ return a(t, e, "en");
13
+ }
14
+ function b(e = "en", t) {
15
+ let n = new p({ defaultOptions: { queries: { retry: !1 } } });
16
+ return n.setQueryData(["schema", !1], x({
17
+ language: e,
18
+ messages: t
19
+ })), n.setQueryData(["schema", !0], x({
20
+ language: e,
21
+ messages: t
22
+ })), function({ children: e }) {
23
+ return /* @__PURE__ */ g(m, {
24
+ client: n,
25
+ children: e
26
+ });
27
+ };
28
+ }
29
+ function x(e = {}) {
10
30
  return {
11
31
  languages: [],
32
+ language: "en",
33
+ deployment_language: "en",
12
34
  structures: {},
13
35
  entities: {},
14
36
  screens: {},
@@ -19,7 +41,7 @@ function v(e = {}) {
19
41
  ...e
20
42
  };
21
43
  }
22
- function y(e, t = {}, n) {
44
+ function S(e, t = {}, n) {
23
45
  return {
24
46
  data: e,
25
47
  meta: {
@@ -33,31 +55,31 @@ function y(e, t = {}, n) {
33
55
  ...n === void 0 ? {} : { $refs: n }
34
56
  };
35
57
  }
36
- function b(e) {
58
+ function C(e) {
37
59
  return e;
38
60
  }
39
- var x = Symbol("declarion.testing.actionEnvelope");
40
- function S(e) {
61
+ var w = Symbol("declarion.testing.actionEnvelope");
62
+ function T(e) {
41
63
  return {
42
64
  ...e,
43
- [x]: !0
65
+ [w]: !0
44
66
  };
45
67
  }
46
- function C(e) {
47
- if (e && typeof e == "object" && e[x]) {
68
+ function E(e) {
69
+ if (e && typeof e == "object" && e[w]) {
48
70
  let t = { ...e };
49
- return delete t[x], t;
71
+ return delete t[w], t;
50
72
  }
51
73
  return {
52
74
  status: "success",
53
75
  result: e
54
76
  };
55
77
  }
56
- function w({ into: e }) {
57
- let t = d();
78
+ function D({ into: e }) {
79
+ let t = f();
58
80
  return e.current = `${t.pathname}${t.search}${t.hash}`, null;
59
81
  }
60
- function T() {
82
+ function O() {
61
83
  let e = {
62
84
  id: "test-tenant",
63
85
  code: "test",
@@ -74,9 +96,9 @@ function T() {
74
96
  created_at: "2026-01-01T00:00:00Z",
75
97
  updated_at: "2026-01-01T00:00:00Z"
76
98
  };
77
- r.getState().setUser(t, e);
99
+ i.getState().setUser(t, e);
78
100
  }
79
- function E(e) {
101
+ function k(e) {
80
102
  if (e === void 0) return { rows: [] };
81
103
  if (Array.isArray(e)) return { rows: e };
82
104
  if (Array.isArray(e.data)) {
@@ -89,15 +111,15 @@ function E(e) {
89
111
  }
90
112
  return e;
91
113
  }
92
- function D(t) {
93
- let r = t.entityData ?? {};
94
- n((e, n) => {
95
- let i = n;
96
- t.onListRequest?.(e, i);
97
- let a = r[e], o = typeof a == "function" ? a(i) : a;
114
+ function A(e) {
115
+ let t = e.entityData ?? {};
116
+ l((n, r) => {
117
+ let i = r;
118
+ e.onListRequest?.(n, i);
119
+ let a = t[n], o = typeof a == "function" ? a(i) : a;
98
120
  if (o instanceof Error) throw o;
99
- let s = E(o), c = s.meta?.per_page ?? 50, l = s.meta?.total ?? s.rows.length;
100
- return n.count === "only" ? {
121
+ let s = k(o), c = s.meta?.per_page ?? 50, l = s.meta?.total ?? s.rows.length;
122
+ return r.count === "only" ? {
101
123
  data: [],
102
124
  meta: {
103
125
  page: 1,
@@ -116,78 +138,78 @@ function D(t) {
116
138
  ...s.refs === void 0 ? {} : { $refs: s.refs }
117
139
  };
118
140
  });
119
- let i = t.entityItems ?? {}, o = t.entityItemResponses ?? {};
120
- s((t, n) => {
121
- let r = typeof n == "string" ? n : e(n), a = o[t]?.[r];
141
+ let n = e.entityItems ?? {}, r = e.entityItemResponses ?? {};
142
+ o((e, t) => {
143
+ let i = typeof t == "string" ? t : s(t), a = r[e]?.[i];
122
144
  if (a instanceof Error) throw a;
123
145
  if (a !== void 0) return a;
124
- let s = i[t]?.[r];
125
- if (s instanceof Error) throw s;
126
- return { data: s };
146
+ let o = n[e]?.[i];
147
+ if (o instanceof Error) throw o;
148
+ return { data: o };
127
149
  });
128
- let c = t.actionResults ?? {};
129
- a(async (e, t) => {
130
- if (!(e in c)) throw Error(`renderWithDeclarion: no action result registered for "${e}" (seed it via actionResults)`);
131
- let n = c[e];
132
- return C(typeof n == "function" ? await n(t) : n);
150
+ let i = e.actionResults ?? {};
151
+ c(async (e, t) => {
152
+ if (!(e in i)) throw Error(`renderWithDeclarion: no action result registered for "${e}" (seed it via actionResults)`);
153
+ let n = i[e];
154
+ return E(typeof n == "function" ? await n(t) : n);
133
155
  });
134
156
  }
135
- function O() {
136
- n(null), s(null), a(null), r.setState({
157
+ function j() {
158
+ l(null), o(null), c(null), i.setState({
137
159
  user: null,
138
160
  isAuthenticated: !1,
139
161
  activeTenant: null,
140
162
  tenants: []
141
163
  });
142
164
  }
143
- function k(e, n = {}) {
144
- let r = new f({ defaultOptions: { queries: {
165
+ function M(i, a = {}) {
166
+ let o = new p({ defaultOptions: { queries: {
145
167
  retry: !1,
146
168
  gcTime: Infinity
147
169
  } } });
148
- T(), r.setQueryData(["schema", !0], n.schema ?? v()), D(n);
149
- let a = n.screenCode ? /* @__PURE__ */ h(c, {
150
- code: n.screenCode,
151
- children: e
152
- }) : e, s = { current: n.route ?? "/" }, l = /* @__PURE__ */ g(p, {
153
- client: r,
154
- children: [/* @__PURE__ */ g(u, {
155
- initialEntries: [n.route ?? "/"],
156
- children: [/* @__PURE__ */ h(w, { into: s }), /* @__PURE__ */ h(o, { children: a })]
157
- }), /* @__PURE__ */ h(m, {})]
158
- }), d = n.embedQuery ? /* @__PURE__ */ h(t, {
159
- query: n.embedQuery,
170
+ O(), o.setQueryData(["schema", !0], a.schema ?? x()), A(a);
171
+ let s = a.screenCode ? /* @__PURE__ */ g(n, {
172
+ code: a.screenCode,
173
+ children: i
174
+ }) : i, c = { current: a.route ?? "/" }, l = /* @__PURE__ */ _(m, {
175
+ client: o,
176
+ children: [/* @__PURE__ */ _(d, {
177
+ initialEntries: [a.route ?? "/"],
178
+ children: [/* @__PURE__ */ g(D, { into: c }), /* @__PURE__ */ g(t, { children: s })]
179
+ }), /* @__PURE__ */ g(h, {})]
180
+ }), u = a.embedQuery ? /* @__PURE__ */ g(r, {
181
+ query: a.embedQuery,
160
182
  children: l
161
- }) : l, y = _(n.viewport ? /* @__PURE__ */ h(i, {
162
- viewportOverride: n.viewport,
163
- children: d
164
- }) : d);
165
- return Object.assign(y, {
166
- queryClient: r,
167
- location: () => s.current
183
+ }) : l, f = v(a.viewport ? /* @__PURE__ */ g(e, {
184
+ viewportOverride: a.viewport,
185
+ children: u
186
+ }) : u);
187
+ return Object.assign(f, {
188
+ queryClient: o,
189
+ location: () => c.current
168
190
  });
169
191
  }
170
- function A({ children: e, authenticated: t = !0, ...n }) {
171
- let [i] = l(() => {
172
- let e = new f({ defaultOptions: { queries: {
192
+ function N({ children: e, authenticated: n = !0, ...r }) {
193
+ let [a] = u(() => {
194
+ let e = new p({ defaultOptions: { queries: {
173
195
  retry: !1,
174
196
  gcTime: Infinity
175
197
  } } });
176
- return t ? (T(), e.setQueryData(["schema", !0], n.schema ?? v())) : r.setState({
198
+ return n ? (O(), e.setQueryData(["schema", !0], r.schema ?? x())) : i.setState({
177
199
  user: null,
178
200
  isAuthenticated: !1,
179
201
  activeTenant: null,
180
202
  tenants: []
181
- }), D(n), e;
203
+ }), A(r), e;
182
204
  });
183
- return /* @__PURE__ */ g(p, {
184
- client: i,
185
- children: [/* @__PURE__ */ h(u, {
186
- initialEntries: [n.route ?? "/"],
187
- children: /* @__PURE__ */ h(o, { children: e })
188
- }), /* @__PURE__ */ h(m, {})]
205
+ return /* @__PURE__ */ _(m, {
206
+ client: a,
207
+ children: [/* @__PURE__ */ g(d, {
208
+ initialEntries: [r.route ?? "/"],
209
+ children: /* @__PURE__ */ g(t, { children: e })
210
+ }), /* @__PURE__ */ g(h, {})]
189
211
  });
190
212
  }
191
- typeof afterEach == "function" && afterEach(() => O());
213
+ typeof afterEach == "function" && afterEach(() => j());
192
214
  //#endregion
193
- export { A as PreviewHarness, S as actionEnvelope, b as actionResults, O as cleanupDeclarion, y as entityDataFixture, k as renderWithDeclarion, v as schemaFixture };
215
+ export { N as PreviewHarness, T as actionEnvelope, C as actionResults, j as cleanupDeclarion, S as entityDataFixture, b as languageWrapper, M as renderWithDeclarion, x as schemaFixture, y as textFixture };
@@ -85,9 +85,9 @@ export declare function isApiErrorBody(body: unknown): body is ApiErrorBody;
85
85
  * - CURSOR_SEMANTICS_MISMATCH: the cursor was minted under different sort
86
86
  * semantics (multi-column ordering, NULL placement). Server bumped its
87
87
  * cursor format version since the cursor was issued.
88
- * - CURSOR_LOCALE_CHANGED: the cursor was minted under one active locale
89
- * and the request now carries a different one. Issued so multilang sort
90
- * cannot silently re-order mid-pagination.
88
+ * - CURSOR_LANGUAGE_CHANGED: the cursor was minted in one language and the
89
+ * request now reads in another. Issued so multilang sort cannot silently
90
+ * re-order mid-pagination.
91
91
  *
92
92
  * UX contract for both: clear the `after` token and refetch page 1 under
93
93
  * the current conditions. EntityClient.list does this transparently;
@@ -95,7 +95,7 @@ export declare function isApiErrorBody(body: unknown): body is ApiErrorBody;
95
95
  * retry logic.
96
96
  */
97
97
  export declare const CURSOR_SEMANTICS_MISMATCH = "cursor.semantics_mismatch";
98
- export declare const CURSOR_LOCALE_CHANGED = "cursor.locale_changed";
98
+ export declare const CURSOR_LANGUAGE_CHANGED = "cursor.language_changed";
99
99
  /**
100
100
  * A cross-store (Postgres-hot / ClickHouse-cold) archive cursor that the server
101
101
  * could not decode for this read - a malformed token, a tenant/entity mismatch,
@@ -266,8 +266,8 @@ export interface BrandingTheme {
266
266
  }
267
267
  /**
268
268
  * The deployment's DEFAULTS for the controls the Preferences screen renders,
269
- * and the single durable source of preference state (Decision 33: the browser
270
- * stores nothing). A user's toggle holds for the SPA session and resets to
269
+ * and the single durable source of preference state: the browser stores
270
+ * nothing. A user's toggle holds for the SPA session and resets to
271
271
  * these on reload.
272
272
  *
273
273
  * Wire shape is snake_case because it is YAML. `stores/preferences.ts` owns the
@@ -372,7 +372,6 @@ export interface PublicMeta {
372
372
  export interface PublicParamsResponse {
373
373
  parameters: PublicParam[];
374
374
  accents?: Record<string, AccentDef>;
375
- messages?: Record<string, LocalizedString>;
376
375
  meta?: PublicMeta;
377
376
  }
378
377
  /**
@@ -419,6 +418,7 @@ export interface ResolvedParam {
419
418
  /** Shared enum this parameter names, when it names one rather than listing
420
419
  * its members inline. Present for display; `values` is what to render. */
421
420
  enum?: string;
421
+ ref?: EntityField["ref"];
422
422
  }
423
423
  export interface ParamOverride {
424
424
  param_code: string;
@@ -454,7 +454,6 @@ export interface ListParams {
454
454
  * "only" - total only, no rows (the follow-up count request).
455
455
  * "with" - rows + total, using the entity's declared strategy.
456
456
  * "exact" - rows + forced exact total.
457
- * See docs/plans/2026-05-18-declarative-row-count.md.
458
457
  */
459
458
  count?: "window" | "only" | "with" | "exact";
460
459
  }
@@ -1,2 +1,2 @@
1
- export type FieldType = "uuid" | "string" | "text" | "rich_text" | "int" | "float" | "bool" | "date" | "time" | "timestamp" | "email" | "url" | "phone" | "enum" | "json" | "ref" | "tags" | "multilang" | "multilang_text" | "structure" | "secret" | "password" | "decimal" | "string_array" | "int_array" | "uuid_array" | "bytes";
1
+ export type FieldType = "uuid" | "string" | "text" | "rich_text" | "int" | "float" | "bool" | "date" | "time" | "timestamp" | "email" | "url" | "phone" | "enum" | "json" | "ref" | "tags" | "multilang" | "multilang_text" | "multilang_array" | "structure" | "secret" | "password" | "decimal" | "string_array" | "int_array" | "uuid_array" | "bytes";
2
2
  export declare const FIELD_TYPES: readonly FieldType[];
@@ -1,7 +1,9 @@
1
+ import type { LocalizedString } from "./schema";
1
2
  export type FileFieldMode = "single" | "array" | "named_map" | "rich_text_inline";
2
3
  export interface FileFieldDisplay {
3
4
  widget: string;
4
- placeholder?: string;
5
+ placeholder?: LocalizedString;
6
+ initials?: boolean;
5
7
  crop_on_upload?: boolean;
6
8
  aspect_ratio?: string;
7
9
  focal_point?: boolean;
@@ -13,11 +15,9 @@ export interface FileFieldDisplay {
13
15
  lazy_load?: boolean;
14
16
  }
15
17
  export interface FileNamedSlotDef {
18
+ name: LocalizedString;
16
19
  accepts?: string[];
17
20
  max_size_bytes?: number;
18
- svg_sanitize?: boolean;
19
- pdf_strip_js?: boolean;
20
- exif_strip?: boolean;
21
21
  aspect_ratio?: string;
22
22
  storage_backend?: string;
23
23
  }