@declarion/react 0.45.0 → 0.48.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.
- package/dist-lib/{DraggableChildrenTable-BDnJK0AU.js → DraggableChildrenTable-p2ZSdwzj.js} +2 -2
- package/dist-lib/{DynamicIcon-DeRpAaXm.js → DynamicIcon-Dc2j-rg_.js} +19 -17
- package/dist-lib/{Grid-CcCveEE7.js → Grid-CjLFAKMZ.js} +2 -2
- package/dist-lib/{LayoutRenderer-BReuhVdX.js → LayoutRenderer-X3p4yfo_.js} +598 -585
- package/dist-lib/{MarkdownRenderer-DPKDFR60.js → MarkdownRenderer-Sb7zcvj0.js} +10 -10
- package/dist-lib/{RefreshControl-KddgOhUG.js → RefreshControl-Cnl9nE0x.js} +268 -238
- package/dist-lib/{SmartDetailPage.impl-D_hMxiHy.js → SmartDetailPage.impl-bb0UNOII.js} +545 -532
- package/dist-lib/{SmartRecordListPage.impl-GIo_mPIJ.js → SmartRecordListPage.impl-BFh8auUZ.js} +171 -158
- package/dist-lib/api/agents.d.ts +47 -18
- package/dist-lib/components/agents/AgentChatPanel.d.ts +7 -1
- package/dist-lib/components/agents/AgentPicker.d.ts +9 -0
- package/dist-lib/components/agents/transcript-runs.d.ts +29 -0
- package/dist-lib/components/file-widgets/host.d.ts +1 -0
- package/dist-lib/components/list/QuickPeek.d.ts +1 -1
- package/dist-lib/components/pages/list/ListFloatbar.d.ts +4 -2
- package/dist-lib/components/pages/list/cardProjection.d.ts +2 -1
- package/dist-lib/components/primitives/Tooltip.d.ts +4 -0
- package/dist-lib/components/shared/ResponsiveActionBar.d.ts +10 -5
- package/dist-lib/components/shared/RowActionsKebab.d.ts +3 -2
- package/dist-lib/components/views/ViewSwitcher.d.ts +2 -1
- package/dist-lib/declarion-react.css +1 -1
- package/dist-lib/hooks/useAgentConversation.d.ts +10 -24
- package/dist-lib/hooks/useBrandingChrome.d.ts +11 -0
- package/dist-lib/hooks/useFilters.d.ts +1 -0
- package/dist-lib/hooks/useLongPress.d.ts +29 -0
- package/dist-lib/hooks/useResponsiveMode.d.ts +2 -21
- package/dist-lib/icons.js +1 -1
- package/dist-lib/index.d.ts +10 -3
- package/dist-lib/index.js +3305 -2741
- package/dist-lib/lib/actions.d.ts +13 -5
- package/dist-lib/lib/filter-evaluator.d.ts +16 -0
- package/dist-lib/lib/filters.d.ts +10 -4
- package/dist-lib/lib/longPressGesture.d.ts +55 -0
- package/dist-lib/lib/messages.d.ts +1 -0
- package/dist-lib/lib/page-inset.d.ts +3 -0
- package/dist-lib/lib/variants.d.ts +7 -0
- package/dist-lib/lib/viewport-category.d.ts +44 -0
- package/dist-lib/{registry-DJKp0yaV.js → registry-CWDnxiLJ.js} +1291 -1008
- package/dist-lib/testing.js +10 -10
- package/dist-lib/types/api.d.ts +15 -2
- package/dist-lib/types/schema.d.ts +26 -0
- package/dist-lib/{useCurrentScreen-A3xZDs7U.js → useCurrentScreen-BshVTPVq.js} +1124 -1088
- package/dist-lib/{useProperties-TlltWwLv.js → useProperties-B5p9mIH8.js} +92 -61
- package/dist-lib/{value-CHY7LgZ-.js → value-B1O6QikE.js} +1 -1
- package/dist-lib/vite/index.js +23 -22
- package/package.json +12 -12
- package/dist-lib/components/agents/AgentVisualHints.d.ts +0 -6
package/dist-lib/testing.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Dt as e, Et as t, Ot as n,
|
|
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-BshVTPVq.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
|
-
|
|
73
|
+
i.getState().setUser(t, e);
|
|
74
74
|
}
|
|
75
75
|
function C(e) {
|
|
76
76
|
if (e === void 0) return { rows: [] };
|
|
@@ -125,7 +125,7 @@ function w(r) {
|
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
127
|
function T() {
|
|
128
|
-
n(null), e(null), t(null),
|
|
128
|
+
n(null), e(null), t(null), i.setState({
|
|
129
129
|
user: null,
|
|
130
130
|
isAuthenticated: !1,
|
|
131
131
|
activeTenant: null,
|
|
@@ -138,28 +138,28 @@ function E(e, t = {}) {
|
|
|
138
138
|
gcTime: Infinity
|
|
139
139
|
} } });
|
|
140
140
|
S(), n.setQueryData(["schema", !0], t.schema ?? g()), w(t);
|
|
141
|
-
let
|
|
141
|
+
let i = t.screenCode ? /* @__PURE__ */ p(o, {
|
|
142
142
|
code: t.screenCode,
|
|
143
143
|
children: e
|
|
144
144
|
}) : e, s = /* @__PURE__ */ m(d, {
|
|
145
145
|
client: n,
|
|
146
146
|
children: [/* @__PURE__ */ p(l, {
|
|
147
147
|
initialEntries: [t.route ?? "/"],
|
|
148
|
-
children: /* @__PURE__ */ p(
|
|
148
|
+
children: /* @__PURE__ */ p(a, { children: i })
|
|
149
149
|
}), /* @__PURE__ */ p(f, {})]
|
|
150
|
-
}), c = h(t.viewport ? /* @__PURE__ */ p(
|
|
150
|
+
}), c = h(t.viewport ? /* @__PURE__ */ p(r, {
|
|
151
151
|
viewportOverride: t.viewport,
|
|
152
152
|
children: s
|
|
153
153
|
}) : s);
|
|
154
154
|
return Object.assign(c, { queryClient: n });
|
|
155
155
|
}
|
|
156
156
|
function D({ children: e, authenticated: t = !0, ...n }) {
|
|
157
|
-
let [
|
|
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], n.schema ?? g())) :
|
|
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,
|
|
@@ -167,10 +167,10 @@ function D({ children: e, authenticated: t = !0, ...n }) {
|
|
|
167
167
|
}), w(n), e;
|
|
168
168
|
});
|
|
169
169
|
return /* @__PURE__ */ m(d, {
|
|
170
|
-
client:
|
|
170
|
+
client: r,
|
|
171
171
|
children: [/* @__PURE__ */ p(l, {
|
|
172
172
|
initialEntries: [n.route ?? "/"],
|
|
173
|
-
children: /* @__PURE__ */ p(
|
|
173
|
+
children: /* @__PURE__ */ p(a, { children: e })
|
|
174
174
|
}), /* @__PURE__ */ p(f, {})]
|
|
175
175
|
});
|
|
176
176
|
}
|
package/dist-lib/types/api.d.ts
CHANGED
|
@@ -285,13 +285,25 @@ export interface BrandingShellFlags {
|
|
|
285
285
|
}
|
|
286
286
|
/**
|
|
287
287
|
* The device class the SDK renders for. `auto` derives it from the measured
|
|
288
|
-
*
|
|
289
|
-
* declares nothing keeps.
|
|
288
|
+
* viewport, which is what the platform has always done and what a deployment
|
|
289
|
+
* that declares nothing keeps.
|
|
290
290
|
*/
|
|
291
291
|
export type BrandingViewport = "auto" | "phone" | "tablet" | "desktop";
|
|
292
|
+
/**
|
|
293
|
+
* Where a deployment draws the device-class boundaries. Each key overrides one
|
|
294
|
+
* bound of the SDK's default table; an omitted key keeps the default, so a
|
|
295
|
+
* deployment moves the one boundary its devices need without restating the
|
|
296
|
+
* others. A forced `viewport` bypasses the boundaries entirely and wins.
|
|
297
|
+
*/
|
|
298
|
+
export interface BrandingBreakpoints {
|
|
299
|
+
phone_max?: number;
|
|
300
|
+
tablet_max?: number;
|
|
301
|
+
landscape_phone_max_height?: number;
|
|
302
|
+
}
|
|
292
303
|
export interface BrandingChrome {
|
|
293
304
|
full?: {
|
|
294
305
|
viewport?: BrandingViewport;
|
|
306
|
+
breakpoints?: BrandingBreakpoints;
|
|
295
307
|
shell?: BrandingShellFlags;
|
|
296
308
|
surfaces?: {
|
|
297
309
|
list?: BrandingSurfaceFlags;
|
|
@@ -302,6 +314,7 @@ export interface BrandingChrome {
|
|
|
302
314
|
};
|
|
303
315
|
embed?: {
|
|
304
316
|
viewport?: BrandingViewport;
|
|
317
|
+
breakpoints?: BrandingBreakpoints;
|
|
305
318
|
surfaces?: {
|
|
306
319
|
list?: BrandingSurfaceFlags;
|
|
307
320
|
detail?: BrandingSurfaceFlags;
|
|
@@ -311,6 +311,11 @@ export interface EntityMutations {
|
|
|
311
311
|
delete?: boolean;
|
|
312
312
|
restore?: boolean;
|
|
313
313
|
}
|
|
314
|
+
export interface EntityVariant {
|
|
315
|
+
name?: string;
|
|
316
|
+
when?: FilterNode[];
|
|
317
|
+
actions?: string[];
|
|
318
|
+
}
|
|
314
319
|
/** A set of CRUD op flags, each present or absent. The YAML-decoded shape of
|
|
315
320
|
* an entity's `public` opt-out block (deny-by-default authorization, plan
|
|
316
321
|
* 2026-06-17). A flag being true means that op is open to ALL authenticated
|
|
@@ -361,6 +366,7 @@ export interface Entity {
|
|
|
361
366
|
properties?: Record<string, PropertyDef>;
|
|
362
367
|
search_fields?: string[];
|
|
363
368
|
actions?: Record<string, Action>;
|
|
369
|
+
variants?: OrderedMap<EntityVariant>;
|
|
364
370
|
/**
|
|
365
371
|
* Platform-default action codes the engine must NOT inject for this entity
|
|
366
372
|
* (`__new`, `__edit`, `__create`, ...). Declared in the entity's YAML.
|
|
@@ -540,6 +546,7 @@ export interface WidgetNode {
|
|
|
540
546
|
export interface LayoutField {
|
|
541
547
|
name: string;
|
|
542
548
|
actions?: Action[];
|
|
549
|
+
structure?: string;
|
|
543
550
|
}
|
|
544
551
|
export interface LayoutNode {
|
|
545
552
|
row?: RowConfig;
|
|
@@ -618,6 +625,20 @@ export interface ScreenResponsiveViewport {
|
|
|
618
625
|
detail?: ResponsiveDetailBranch;
|
|
619
626
|
}
|
|
620
627
|
export type ScreenResponsive = Partial<Record<ViewportKey, ScreenResponsiveViewport>>;
|
|
628
|
+
export interface ScreenVariant {
|
|
629
|
+
name?: string;
|
|
630
|
+
when?: FilterNode[];
|
|
631
|
+
items?: LayoutNode[];
|
|
632
|
+
sidebar?: LayoutNode[];
|
|
633
|
+
sidebar_width?: string;
|
|
634
|
+
highlights?: string[];
|
|
635
|
+
audit?: AuditConfig;
|
|
636
|
+
actions?: string[];
|
|
637
|
+
row_actions?: string[];
|
|
638
|
+
action_layout?: ActionLayoutNode[];
|
|
639
|
+
card?: CardSpec;
|
|
640
|
+
quick_peek?: QuickPeekConfig;
|
|
641
|
+
}
|
|
621
642
|
export interface Screen {
|
|
622
643
|
type: "list" | "detail" | "custom" | "record_list";
|
|
623
644
|
entity?: string;
|
|
@@ -651,6 +672,7 @@ export interface Screen {
|
|
|
651
672
|
sort_default?: string;
|
|
652
673
|
actions?: string[];
|
|
653
674
|
row_actions?: string[];
|
|
675
|
+
variants?: OrderedMap<ScreenVariant>;
|
|
654
676
|
items?: LayoutNode[];
|
|
655
677
|
sidebar?: LayoutNode[];
|
|
656
678
|
sidebar_width?: string;
|
|
@@ -674,6 +696,10 @@ export interface Screen {
|
|
|
674
696
|
* and denied `contains`, the one that works. */
|
|
675
697
|
filter_operators?: Record<string, string[]>;
|
|
676
698
|
views?: ViewDefinition[];
|
|
699
|
+
/** Code of the view this list OPENS on. A starting point, never a bound: the
|
|
700
|
+
* switcher still offers every other view and the unfiltered "All", and a
|
|
701
|
+
* viewer's own default view wins over it. */
|
|
702
|
+
default_view?: string;
|
|
677
703
|
/** Action slot promotion for list screens (rule-of-2). UI honors first 2.
|
|
678
704
|
* Note: primary_record_actions (detail header) was removed in Task 5 of plan
|
|
679
705
|
* 2026-04-21-action-toolbar-priority-overflow. Use action_layout instead. */
|