@declarion/react 0.31.2 → 0.34.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 (55) hide show
  1. package/dist-lib/{ActionRunner-BzaZQtiI.js → ActionRunner-UGGvGypS.js} +925 -788
  2. package/dist-lib/{DraggableChildrenTable-DILqStHQ.js → DraggableChildrenTable-CljdYXd_.js} +30 -30
  3. package/dist-lib/DynamicIcon-BWO6QtNF.js +261 -0
  4. package/dist-lib/{Grid-BIsiUwPh.js → Grid-5Y_iPqNW.js} +2 -2
  5. package/dist-lib/{LayoutRenderer-3RvIsC9M.js → LayoutRenderer-CoTMmvNW.js} +670 -670
  6. package/dist-lib/{MarkdownRenderer-CaHhWrfm.js → MarkdownRenderer-unbncYEV.js} +1 -1
  7. package/dist-lib/RefreshControl-oeKhCjEC.js +837 -0
  8. package/dist-lib/SmartDetailPage.impl-Caxd97q6.js +1771 -0
  9. package/dist-lib/{SmartRecordListPage.impl-B1iws8yf.js → SmartRecordListPage.impl-BF_ieDc2.js} +253 -253
  10. package/dist-lib/api/data.d.ts +4 -4
  11. package/dist-lib/api/params.d.ts +1 -1
  12. package/dist-lib/components/layout/Rail.d.ts +5 -5
  13. package/dist-lib/components/layout/TopBar.d.ts +3 -1
  14. package/dist-lib/components/pages/DocumentsMenu.d.ts +22 -0
  15. package/dist-lib/components/pages/RecordDocumentsPanel.d.ts +42 -0
  16. package/dist-lib/components/pages/auth/AuthShell.d.ts +1 -1
  17. package/dist-lib/components/pages/list/ListHeader.d.ts +1 -11
  18. package/dist-lib/components/primitives/BrandLogo.d.ts +1 -1
  19. package/dist-lib/components/primitives/Icons.d.ts +1 -0
  20. package/dist-lib/components/primitives/Tooltip.d.ts +30 -0
  21. package/dist-lib/components/primitives/index.d.ts +2 -0
  22. package/dist-lib/components/shared/ActionResultDialog.d.ts +4 -0
  23. package/dist-lib/components/shared/ActionRunner.d.ts +1 -0
  24. package/dist-lib/components/shared/ObjectActionBar.d.ts +29 -0
  25. package/dist-lib/components/shared/PageHeader.d.ts +1 -1
  26. package/dist-lib/components/shared/RecordHeader.d.ts +3 -1
  27. package/dist-lib/components/shared/RefreshControl.d.ts +6 -0
  28. package/dist-lib/components/shared/ResponsiveActionBar.d.ts +9 -1
  29. package/dist-lib/hooks/useBranding.d.ts +8 -0
  30. package/dist-lib/hooks/useBrandingChrome.d.ts +6 -0
  31. package/dist-lib/hooks/useLiveObject.d.ts +9 -0
  32. package/dist-lib/hooks/useMutations.d.ts +3 -3
  33. package/dist-lib/hooks/useObject.d.ts +10 -0
  34. package/dist-lib/hooks/usePageStateRuntime.d.ts +1 -1
  35. package/dist-lib/hooks/useParams.d.ts +10 -1
  36. package/dist-lib/icons.js +1 -1
  37. package/dist-lib/index.d.ts +11 -5
  38. package/dist-lib/index.js +2457 -2335
  39. package/dist-lib/lib/actions.d.ts +6 -2
  40. package/dist-lib/lib/branding.d.ts +10 -1
  41. package/dist-lib/lib/document-templates.d.ts +12 -0
  42. package/dist-lib/lib/download.d.ts +20 -0
  43. package/dist-lib/lib/record-documents-key.d.ts +1 -0
  44. package/dist-lib/{registry-2KliNTHB.js → registry-DnPK3Msj.js} +1658 -1607
  45. package/dist-lib/testing.d.ts +5 -3
  46. package/dist-lib/testing.js +37 -33
  47. package/dist-lib/types/api.d.ts +62 -3
  48. package/dist-lib/types/schema.d.ts +18 -16
  49. package/dist-lib/{useProperties-Co3RdtuT.js → useProperties-CgRhBh0k.js} +70 -70
  50. package/dist-lib/{value-BooGwUik.js → value-GmL5BVFm.js} +29 -29
  51. package/package.json +1 -1
  52. package/dist-lib/DynamicIcon-DCRdxxZ7.js +0 -260
  53. package/dist-lib/SmartDetailPage.impl--EO-9fos.js +0 -1494
  54. package/dist-lib/hooks/useEntityItem.d.ts +0 -10
  55. package/dist-lib/peekDraftStore-yyzMbaiI.js +0 -468
@@ -7,9 +7,9 @@ export declare function listEntities(entity: string, params?: ListParams, option
7
7
  export declare function getEntity(entity: string, pkValues: PkValues | string): Promise<DataResponse>;
8
8
  export declare function createEntity(entity: string, data: Record<string, unknown>): Promise<DataResponse>;
9
9
  export declare function updateEntity(entity: string, pkValues: PkValues | string, data: Record<string, unknown>): Promise<DataResponse>;
10
- export declare function deleteEntity(entity: string, pkValues: PkValues | string): Promise<void>;
10
+ export declare function deleteObject(entity: string, pkValues: PkValues | string): Promise<void>;
11
11
  export declare function encodeObjectId(pkValues: PkValues): string;
12
- export declare function restoreEntity(entity: string, pkValues: PkValues | string): Promise<void>;
12
+ export declare function restoreObject(entity: string, pkValues: PkValues | string): Promise<void>;
13
13
  /** Result of POST /api/data/{entity}/export. The server streams a CSV
14
14
  * blob; the client gets the bytes plus the server-resolved filename
15
15
  * (parsed from Content-Disposition by apiFetchBlob, with RFC 5987
@@ -85,7 +85,7 @@ export declare function buildActionBody(params: Record<string, unknown> | undefi
85
85
  export type ActionExecutor = (code: string, body: ActionExecuteRequest) => Promise<ActionExecuteResponse>;
86
86
  /**
87
87
  * Install a test-time override for executeAction - and therefore for
88
- * createEntity / updateEntity / deleteEntity / restoreEntity, which all
88
+ * createEntity / updateEntity / deleteObject / restoreObject, which all
89
89
  * dispatch through executeAction. The @declarion/react/testing harness uses
90
90
  * this (mirroring setApiErrorReporter) to resolve actions from a fixture map
91
91
  * instead of the network. Returns the previous executor so a test can restore
@@ -100,7 +100,7 @@ export declare function setActionExecutor(fn: ActionExecutor | null): ActionExec
100
100
  * per_page / sort / filters, which a cache seed cannot know ahead of render).
101
101
  */
102
102
  export type ListEntitiesResolver = (entity: string, params: ListParams) => ListResponse | undefined;
103
- /** Test-time override for the single-record read seam (useEntityItem -> getEntity). */
103
+ /** Test-time override for the single-record read seam (useObject -> getEntity). */
104
104
  export type GetEntityResolver = (entity: string, pkValues: PkValues | string) => DataResponse | undefined;
105
105
  /** Install/clear the list read seam. Returns the previous resolver. */
106
106
  export declare function setListEntitiesResolver(fn: ListEntitiesResolver | null): ListEntitiesResolver | null;
@@ -1,7 +1,7 @@
1
1
  import type { ParamLookup, PublicParamsResponse } from "../types/api";
2
2
  /**
3
3
  * Fetches the full pre-login envelope from /api/params/public:
4
- * {parameters, accents, branding, meta}. Used by AuthShell to theme
4
+ * {parameters, accents, meta}. Used by AuthShell to theme
5
5
  * unauthenticated screens before any user context exists.
6
6
  */
7
7
  export declare function fetchPublicParams(): Promise<PublicParamsResponse>;
@@ -1,5 +1,5 @@
1
1
  import type { AreaDef } from "../../types/schema";
2
- import type { PublicBranding } from "../../types/api";
2
+ import type { BrandingIdentity } from "../../types/api";
3
3
  export interface RailAreaItem {
4
4
  id: string;
5
5
  icon: string | undefined;
@@ -13,10 +13,10 @@ export interface RailProps {
13
13
  onCmdK: () => void;
14
14
  areas?: AreaDef[];
15
15
  /**
16
- * Consumer branding from /api/params/public. When `app_logo` is present
17
- * the rail's brand tile renders the consumer image; otherwise it falls
18
- * back to the Declarion wordmark SVG. `app_name` drives the tooltip.
16
+ * Consumer branding identity. When `app_logo` is present
17
+ * the rail's brand tile renders the consumer image. Otherwise `app_name`
18
+ * supplies an initial and tooltip; with neither value the tile is empty.
19
19
  */
20
- branding?: PublicBranding;
20
+ branding?: BrandingIdentity;
21
21
  }
22
22
  export declare function Rail({ activeArea, onPick, onToggleAI, aiOpen, onCmdK, areas, branding }: RailProps): import("react").JSX.Element;
@@ -15,5 +15,7 @@ export interface TopBarProps {
15
15
  aiOpen?: boolean;
16
16
  onOpenProfile?: () => void;
17
17
  onOpenPrefs?: () => void;
18
+ showTenantSwitcher?: boolean;
19
+ showBreadcrumbs?: boolean;
18
20
  }
19
- export declare function TopBar({ breadcrumbs, onCrumbClick, onOpenNav, navButtonRef, showNavButton, onOpenTabs, tabsButtonRef, showTabsButton, mobileTabCount, onCmdK, onToggleAI, aiOpen, onOpenProfile, onOpenPrefs, }?: TopBarProps): import("react").JSX.Element;
21
+ export declare function TopBar({ breadcrumbs, onCrumbClick, onOpenNav, navButtonRef, showNavButton, onOpenTabs, tabsButtonRef, showTabsButton, mobileTabCount, onCmdK, onToggleAI, aiOpen, onOpenProfile, onOpenPrefs, showTenantSwitcher, showBreadcrumbs, }?: TopBarProps): import("react").JSX.Element;
@@ -0,0 +1,22 @@
1
+ import { type Entity } from "../../types/schema";
2
+ import { type ListViewState } from "./exportRequest";
3
+ export interface DocumentsMenuProps {
4
+ entityCode: string;
5
+ scope: "detail" | "list";
6
+ objectIds?: string[];
7
+ viewState?: ListViewState;
8
+ selectedIds?: string[];
9
+ locale?: string;
10
+ /** Static system-template capability from the schema projection
11
+ * (`entity.documents`). Absent/both-falsy means no SYSTEM template
12
+ * applies for this caller/tenant/entity - the button still renders if
13
+ * the lazy tenant-template probe (below) finds one. */
14
+ capability?: Entity["documents"];
15
+ /** True when the caller can manage tenant document templates (heuristic:
16
+ * `document_template` is present & readable in `schema.entities`). Gates
17
+ * the lazy `document.templates.available` visibility probe so a
18
+ * template-less, non-manager caller (the Haia default) makes ZERO extra
19
+ * network calls - Business Case 6. */
20
+ canManageTemplates?: boolean;
21
+ }
22
+ export declare function DocumentsMenu({ entityCode, scope, objectIds, viewState, selectedIds, capability, canManageTemplates, }: DocumentsMenuProps): import("react").JSX.Element | null;
@@ -0,0 +1,42 @@
1
+ import { type LocalizedString } from "../../types/schema";
2
+ interface RecordDocumentsPanelProps {
3
+ entityCode: string;
4
+ objectId: string;
5
+ /** Static system-template capability for this entity's detail scope
6
+ * (`entity.documents.generate_one` from the schema projection). When
7
+ * true the shelf always mounts (even with zero attachments yet, since a
8
+ * template applies and the caller may generate one from Generate). When
9
+ * false/absent the shelf mounts ONLY if the record already has >=1
10
+ * attached document - it never orphans visible history, but it also
11
+ * never shows an empty "no documents" shelf on an entity with nothing to
12
+ * generate and nothing generated (the Haia case). */
13
+ canGenerateOne?: boolean;
14
+ /** True when the caller can manage tenant document templates. Together with
15
+ * canGenerateOne this gates whether the attachment fetch runs at all: a
16
+ * template-less, non-manager caller (the Haia default) makes ZERO
17
+ * document.object_links calls per record view. The rare orphaned-attachment
18
+ * case (a template was removed but its current-attached docs remain) then
19
+ * surfaces only to managers on the record and to everyone via My Documents,
20
+ * which is the right trade for the stakeholder's "no gratuitous cost" bar. */
21
+ canManageTemplates?: boolean;
22
+ }
23
+ interface RecordDocument {
24
+ generated_document_id: string;
25
+ template_code: string;
26
+ template_source: string;
27
+ input?: Record<string, unknown>;
28
+ title?: LocalizedString;
29
+ output_format: string;
30
+ status: string;
31
+ download_url?: string;
32
+ filename?: string;
33
+ created_at: string;
34
+ ready_at?: string;
35
+ error_text?: string;
36
+ }
37
+ /** Pure refetchInterval predicate, exported for direct unit testing (a
38
+ * timer-driven integration test through the full useQuery/React lifecycle
39
+ * is slow and flaky; this is the actual decision logic). */
40
+ export declare function pendingPollInterval(rows: Array<Pick<RecordDocument, "status">> | undefined): number | false;
41
+ export declare function RecordDocumentsPanel({ entityCode, objectId, canGenerateOne, canManageTemplates }: RecordDocumentsPanelProps): import("react").JSX.Element | null;
42
+ export {};
@@ -4,7 +4,7 @@ export type AuthShellProps = {
4
4
  children: ReactNode;
5
5
  /**
6
6
  * Tenant slug used to compose the workspace pill. The pill renders
7
- * `<tenantSlug>.<branding.workspace_domain>` only when both pieces
7
+ * `<tenantSlug>.<branding.identity.workspace_domain>` only when both pieces
8
8
  * are set; otherwise it is hidden. Callers are not required to
9
9
  * provide a slug — the auth shell fails closed (no pill) rather
10
10
  * than display a placeholder host.
@@ -8,16 +8,6 @@ export interface ListHeaderProps {
8
8
  * description). Empty = no affordance, header renders identically. The
9
9
  * affordance is inline with the title baseline: zero height delta. */
10
10
  description?: string;
11
- /** Total matching rows, from the separate count query. Undefined while
12
- * the count is in flight or after it failed. */
13
- total: number | undefined;
14
- /** Strategy used to produce `total` ("exact" | "estimated"). Drives
15
- * display precision. Undefined when no count has resolved. */
16
- countMode?: "exact" | "estimated";
17
- /** True while the count query is in flight - render a loading affordance
18
- * in the count slot instead of a number. */
19
- countPending?: boolean;
20
- loaded: number;
21
11
  toolbarActions: {
22
12
  code: string;
23
13
  action: Action;
@@ -33,4 +23,4 @@ export interface ListHeaderProps {
33
23
  /** Dispatch surface threaded into ResponsiveActionBar (plan §8 Task 10). */
34
24
  widgetContext: WidgetContext;
35
25
  }
36
- export declare function ListHeader({ title, description, total, countMode, countPending, loaded, toolbarActions, screenActionLayout, entityActionLayout, selectedIds, data, rowKey, onActionSuccess, widgetContext, }: ListHeaderProps): import("react").JSX.Element;
26
+ export declare function ListHeader({ title, description, toolbarActions, screenActionLayout, entityActionLayout, selectedIds, data, rowKey, onActionSuccess, widgetContext, }: ListHeaderProps): import("react").JSX.Element | null;
@@ -1,6 +1,6 @@
1
1
  import type { ReactNode } from "react";
2
2
  export interface BrandLogoProps {
3
- /** URL from branding.app_logo in consumer YAML. */
3
+ /** URL from branding.identity.app_logo. */
4
4
  appLogo?: string;
5
5
  /** Pixel edge of the rendered image. */
6
6
  size: number;
@@ -48,6 +48,7 @@ export declare const Icon: {
48
48
  field: FC<IconProps>;
49
49
  file: FC<IconProps>;
50
50
  "file-diff": FC<IconProps>;
51
+ filePlus: FC<IconProps>;
51
52
  filter: FC<IconProps>;
52
53
  flow: FC<IconProps>;
53
54
  folder: FC<IconProps>;
@@ -0,0 +1,30 @@
1
+ import type { FocusEventHandler, ReactNode, RefObject } from "react";
2
+ export interface AnchoredTooltip {
3
+ open: boolean;
4
+ /** Spread onto the trigger element (button, span, ...). */
5
+ triggerHandlers: {
6
+ onMouseEnter: () => void;
7
+ onMouseLeave: () => void;
8
+ onFocus: FocusEventHandler;
9
+ onBlur: () => void;
10
+ };
11
+ /** aria-describedby value for the trigger while the tooltip is open. */
12
+ describedBy: string | undefined;
13
+ /** The tooltip portal; render as a sibling of the trigger. null when empty. */
14
+ portal: ReactNode;
15
+ }
16
+ export declare function useAnchoredTooltip(ref: RefObject<HTMLElement | null>, content: string | undefined): AnchoredTooltip;
17
+ export interface TooltipProps {
18
+ /** Tooltip text. Empty/absent renders the trigger with no tooltip. */
19
+ content?: string;
20
+ children: ReactNode;
21
+ /** Extra props forwarded to the trigger wrapper (e.g. data-testid). */
22
+ triggerProps?: React.HTMLAttributes<HTMLSpanElement>;
23
+ }
24
+ export declare function Tooltip({ content, children, triggerProps }: TooltipProps): import("react").JSX.Element;
25
+ export interface InfoTooltipProps {
26
+ label: string;
27
+ size?: number;
28
+ "data-testid"?: string;
29
+ }
30
+ export declare function InfoTooltip({ label, size, ...rest }: InfoTooltipProps): import("react").JSX.Element;
@@ -15,6 +15,8 @@ export { Dropdown } from "./Dropdown";
15
15
  export type { DropdownProps } from "./Dropdown";
16
16
  export { HoverCard } from "./HoverCard";
17
17
  export type { HoverCardProps, HoverCardAlign } from "./HoverCard";
18
+ export { Tooltip, InfoTooltip } from "./Tooltip";
19
+ export type { TooltipProps, InfoTooltipProps } from "./Tooltip";
18
20
  export { Chip } from "./Chip";
19
21
  export type { ChipProps } from "./Chip";
20
22
  export { SectionCard } from "./SectionCard";
@@ -1,6 +1,10 @@
1
1
  export interface DisplayField {
2
2
  label: string;
3
3
  value: string;
4
+ type?: "text" | "download" | "link";
5
+ href?: string;
6
+ download_url?: string;
7
+ filename?: string;
4
8
  copyable?: boolean;
5
9
  monospace?: boolean;
6
10
  }
@@ -38,6 +38,7 @@ interface ActionRunnerContextValue {
38
38
  * resolves immediately - the dialog owns its own pending UI.
39
39
  */
40
40
  run: (opts: RunActionOptions) => Promise<void>;
41
+ isRunning: boolean;
41
42
  }
42
43
  export declare function useActionRunner(): ActionRunnerContextValue;
43
44
  export declare function ActionRunnerProvider({ children }: {
@@ -0,0 +1,29 @@
1
+ import { type ReactNode } from "react";
2
+ import { type ResolvedActionLayoutNode } from "../../lib/actions";
3
+ import { type Action } from "../../types/schema";
4
+ import { type WidgetContext } from "../../components/shared/ResponsiveActionBar";
5
+ export type ObjectActionBarSlot = "detail" | "detail_toolbar" | "list_row" | "quick_peek";
6
+ export type ObjectActionSelection = {
7
+ include: string[];
8
+ exclude?: never;
9
+ } | {
10
+ exclude: string[];
11
+ include?: never;
12
+ };
13
+ export interface ObjectActionBarProps {
14
+ entity: string;
15
+ object: Record<string, unknown> | undefined;
16
+ slot: ObjectActionBarSlot;
17
+ screen?: string;
18
+ select?: ObjectActionSelection;
19
+ extraActions?: ReactNode;
20
+ onAfterRun?: (code: string, result: unknown) => void;
21
+ }
22
+ export interface UseObjectActionsResult {
23
+ nodes: ResolvedActionLayoutNode[];
24
+ run: (code: string, action: Action) => void | Promise<void>;
25
+ isBusy: boolean;
26
+ widgetContext?: WidgetContext;
27
+ }
28
+ export declare function useObjectActions({ entity: entityCode, object, slot, screen: screenCode, select, onAfterRun, }: Omit<ObjectActionBarProps, "extraActions">): UseObjectActionsResult;
29
+ export declare function ObjectActionBar({ entity, object, slot, screen, select, extraActions, onAfterRun, }: ObjectActionBarProps): import("react").JSX.Element | null;
@@ -4,5 +4,5 @@ interface PageHeaderProps {
4
4
  backTo?: string;
5
5
  actions?: ReactNode;
6
6
  }
7
- export declare function PageHeader({ title, backTo, actions }: PageHeaderProps): import("react").JSX.Element;
7
+ export declare function PageHeader({ title, backTo, actions }: PageHeaderProps): import("react").JSX.Element | null;
8
8
  export {};
@@ -4,12 +4,14 @@ interface RecordHeaderProps {
4
4
  avatarName?: string;
5
5
  title: string;
6
6
  recordId?: string;
7
+ description?: string;
7
8
  highlights?: ReactNode;
8
9
  mode: "display" | "edit" | "create";
9
10
  dirty?: boolean;
10
11
  showBack?: boolean;
11
12
  onBack?: () => void;
12
13
  right?: ReactNode;
14
+ showTitle?: boolean;
13
15
  }
14
- export declare function RecordHeader({ icon, avatarName, title, recordId, highlights, mode, dirty, showBack, onBack, right, }: RecordHeaderProps): import("react").JSX.Element;
16
+ export declare function RecordHeader({ icon, avatarName, title, recordId, description, highlights, mode, dirty, showBack, onBack, right, showTitle, }: RecordHeaderProps): import("react").JSX.Element;
15
17
  export {};
@@ -0,0 +1,6 @@
1
+ import type { LiveObjectResult } from "../../hooks/useLiveObject";
2
+ export interface RefreshControlProps<T extends Record<string, unknown> = Record<string, unknown>> {
3
+ liveObject: Pick<LiveObjectResult<T>, "refetch" | "isFetching" | "isLoading" | "isLive">;
4
+ realtime?: boolean;
5
+ }
6
+ export declare function RefreshControl<T extends Record<string, unknown> = Record<string, unknown>>({ liveObject, realtime, }: RefreshControlProps<T>): import("react").JSX.Element;
@@ -117,6 +117,14 @@ export interface ResponsiveActionBarProps {
117
117
  reservedRightWidth?: number;
118
118
  /** Rendering density / measurement strategy. */
119
119
  kind?: "detail" | "toolbar" | "row";
120
+ /**
121
+ * When true (default) a kind="detail" bar stretches to `width: 100%` so it
122
+ * can measure the available width and overflow into a "More" menu. Set false
123
+ * when the bar shares a single flex row with other controls (e.g. the detail
124
+ * header's Refresh/Live pill): a 100%-width bar would wrap onto its own line.
125
+ * Content-sized is safe for the header slot, which carries few actions.
126
+ */
127
+ fillContainer?: boolean;
120
128
  /**
121
129
  * Test seam: when provided, overrides the measurement decision for each
122
130
  * node. Return true = node fits inline; false = overflows to More.
@@ -176,4 +184,4 @@ export interface ResponsiveActionBarProps {
176
184
  * kind="row": single kebab "⋮" with all actions in dropdown.
177
185
  * kind default: "toolbar".
178
186
  */
179
- export declare function ResponsiveActionBar({ layout, row, rowSelection, onRun, reservedRightWidth, kind, measurementOverride, entityActions, globalActions, ariaLabel, trailingNormalItems, trailingDestructiveItems, widgetContext, onActionClick, }: ResponsiveActionBarProps): import("react").JSX.Element | null;
187
+ export declare function ResponsiveActionBar({ layout, row, rowSelection, onRun, reservedRightWidth, kind, fillContainer, measurementOverride, entityActions, globalActions, ariaLabel, trailingNormalItems, trailingDestructiveItems, widgetContext, onActionClick, }: ResponsiveActionBarProps): import("react").JSX.Element | null;
@@ -0,0 +1,8 @@
1
+ import type { PublicBranding } from "../types/api";
2
+ export declare function useBranding(): {
3
+ branding: PublicBranding | undefined;
4
+ isLoading: boolean;
5
+ };
6
+ export declare function useBrandingIdentity(): import("../types/api").BrandingIdentity | undefined;
7
+ export declare function useBrandingTheme(): import("../types/api").BrandingTheme | undefined;
8
+ export declare function useBrandingChromeValue(): import("../types/api").BrandingChrome | undefined;
@@ -0,0 +1,6 @@
1
+ import type { BrandingSurfaceFlags } from "../types/api";
2
+ export type BrandingChromeSurface = "list" | "detail" | "record_list" | "custom";
3
+ export interface ResolvedBrandingChrome extends BrandingSurfaceFlags {
4
+ isVisible: (key: keyof BrandingSurfaceFlags) => boolean;
5
+ }
6
+ export declare function useBrandingChrome(surface?: BrandingChromeSurface): ResolvedBrandingChrome;
@@ -0,0 +1,9 @@
1
+ import type { UseQueryResult } from "@tanstack/react-query";
2
+ import { type DataResponse, type EnrichedRow } from "../types/api";
3
+ import type { PkValues } from "../types/schema";
4
+ export type LiveObjectResult<T extends Record<string, unknown> = EnrichedRow> = UseQueryResult<DataResponse<T>, Error> & {
5
+ object: T | undefined;
6
+ isLive: boolean;
7
+ isNotFound: boolean;
8
+ };
9
+ export declare function useLiveObject<T extends Record<string, unknown> = EnrichedRow>(entity: string | undefined, pkValues: PkValues | string | undefined): LiveObjectResult<T>;
@@ -1,11 +1,11 @@
1
1
  import type { PkValues } from "../types/schema";
2
2
  import type { ActionExecuteRequest } from "../api/data";
3
- export declare function useCreateEntity(entityCode: string): import("@tanstack/react-query").UseMutationResult<import("..").DataResponse<Record<string, unknown>>, Error, Record<string, unknown>, unknown>;
4
- export declare function useUpdateEntity(entityCode: string): import("@tanstack/react-query").UseMutationResult<import("..").DataResponse<Record<string, unknown>>, Error, {
3
+ export declare function useCreateObject(entityCode: string): import("@tanstack/react-query").UseMutationResult<import("..").DataResponse<Record<string, unknown>>, Error, Record<string, unknown>, unknown>;
4
+ export declare function useUpdateObject(entityCode: string): import("@tanstack/react-query").UseMutationResult<import("..").DataResponse<Record<string, unknown>>, Error, {
5
5
  pkValues: PkValues | string;
6
6
  data: Record<string, unknown>;
7
7
  }, unknown>;
8
- export declare function useDeleteEntity(entityCode: string): import("@tanstack/react-query").UseMutationResult<void, Error, string | PkValues, unknown>;
8
+ export declare function useDeleteObject(entityCode: string): import("@tanstack/react-query").UseMutationResult<void, Error, string | PkValues, unknown>;
9
9
  export declare function useRestoreEntity(entityCode: string): import("@tanstack/react-query").UseMutationResult<void, Error, string | PkValues, unknown>;
10
10
  export declare function useExecuteAction(entityCode?: string): import("@tanstack/react-query").UseMutationResult<import("../api/data").ActionExecuteResponse, Error, {
11
11
  actionCode: string;
@@ -0,0 +1,10 @@
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
+ * `useObject` 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 objectQueryKey(entity: string | undefined, pkValues: PkValues | string | undefined): QueryKey;
10
+ export declare function useObject(entity: string | undefined, pkValues: PkValues | string | undefined): import("@tanstack/react-query").UseQueryResult<NoInfer<import("..").DataResponse<Record<string, unknown>>>, Error>;
@@ -17,7 +17,7 @@ export declare function usePageStateRuntime(): void;
17
17
  * current retained page, so a kill/sweep `removeQueries` releases the cached
18
18
  * data alongside the deep state. Call from the standard pages (and custom
19
19
  * screens) with the key from the matching key-builder (`entityDataQueryKey` /
20
- * `cursorEntityDataQueryKey` / `entityItemQueryKey`).
20
+ * `cursorEntityDataQueryKey` / `objectQueryKey`).
21
21
  *
22
22
  * Pass ONLY primary heavy reads - never a shared ref/lookup query, or a
23
23
  * sibling screen that shares its key would lose it on this page's eviction.
@@ -5,7 +5,16 @@ export declare function usePublicParams(): import("@tanstack/react-query").UseQu
5
5
  * Returns the full ParamLookup envelope (`found`, `value`, `source`).
6
6
  * Prefer `useParam` for typical reads where the call site has a default.
7
7
  */
8
- export declare function useResolvedParam(code: string): import("@tanstack/react-query").UseQueryResult<NoInfer<ParamLookup>, Error>;
8
+ export declare function useResolvedParam(code: string, options?: {
9
+ enabled?: boolean;
10
+ }): import("@tanstack/react-query").UseQueryResult<NoInfer<ParamLookup>, Error>;
11
+ export declare function useEffectiveParam<T = unknown>(code: string): {
12
+ value: T | undefined;
13
+ found: boolean;
14
+ source: ParamLookup["source"] | "public" | undefined;
15
+ loading: boolean;
16
+ error: Error | null;
17
+ };
9
18
  /**
10
19
  * Reads a parameter and substitutes a caller-supplied default when the
11
20
  * platform has no value for it. The default never crosses the wire; the
package/dist-lib/icons.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./DynamicIcon-DCRdxxZ7.js";
1
+ import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./DynamicIcon-BWO6QtNF.js";
2
2
  export { o as DynamicIcon, a as Icon, n as LucideIcon, i as getIcon, t as getIconRegistryVersion, e as setIconRegistry, r as subscribeIconRegistry };
@@ -2,13 +2,13 @@ import "./globals.css";
2
2
  export { App } from "./app";
3
3
  export { App as Declarion } from "./app";
4
4
  export type { LocalizedString, LanguageDef, Schema, Entity, EntityField, Screen, NavNode, Action, ChildRelation, StatusDef, StatusGroupDef, PropertyDef, EnumDef, ParameterDef, StructureDef, PkValues, } from "./types/schema";
5
- export { loc, fieldDisplayName, getPrimaryKeyFields, extractPkValues, pkValuePartsToId, pkValuesToId, pkValuesToDetailId, pkValuesFromId, resolveDetailRoute, buildDetailHrefFromId, buildEntityDetailHref, buildRowDetailHref, } from "./types/schema";
5
+ export { OrderedMap, loc, fieldDisplayName, getPrimaryKeyFields, extractPkValues, pkValuePartsToId, pkValuesToId, pkValuesToDetailId, pkValuesFromId, resolveDetailRoute, buildDetailHrefFromId, buildEntityDetailHref, buildRowDetailHref, } from "./types/schema";
6
6
  export type { ListResponse, DataResponse, ListMeta, ApiError, AuthUser, LoginResponse, CheckSetupResponse, ListParams, Tenant, StatusInfo, PropertyValue, PublicParam, V2Meta, Refs, V2StatusInstance, V2PropertyInstance, V2ParamInstance, V2ListResponse, V2ListParams, EnrichedRow, } from "./types/api";
7
7
  export { CURSOR_SEMANTICS_MISMATCH, CURSOR_LOCALE_CHANGED, isCursorStaleError } from "./types/api";
8
8
  export { coerceDisplayString } from "./lib/display-value";
9
9
  export { EntityClient, RefCache, entityClient } from "./api/entities";
10
10
  export type { RowHelpers } from "./api/entities";
11
- export { executeAction, buildActionBody, ActionBatchError, deleteEntity, restoreEntity } from "./api/data";
11
+ export { executeAction, buildActionBody, ActionBatchError, deleteObject, restoreObject } from "./api/data";
12
12
  export type { ActionExecuteRequest, ActionExecuteResponse, ActionItemError, ActionItemSkip, } from "./api/data";
13
13
  export { Batch } from "./api/batch";
14
14
  export type { BatchOp, BatchOpResult, BatchResponse } from "./api/batch";
@@ -20,14 +20,16 @@ export { useEntityData, useEntityCount, entityDataQueryKey } from "./hooks/useEn
20
20
  export { useCursorEntityData, cursorEntityDataQueryKey, cursorEntityStableKey, } from "./hooks/useCursorEntityData";
21
21
  export type { CursorEntityDataParams, CursorEntityDataResult, } from "./hooks/useCursorEntityData";
22
22
  export { useAllEntityData } from "./hooks/useAllEntityData";
23
- export { useEntityItem, entityItemQueryKey } from "./hooks/useEntityItem";
23
+ export { useObject, objectQueryKey } from "./hooks/useObject";
24
+ export { useLiveObject } from "./hooks/useLiveObject";
25
+ export type { LiveObjectResult } from "./hooks/useLiveObject";
24
26
  export { useActionData, useCursorActionData, actionDataQueryKey, cursorActionDataQueryKey, ACTION_DATA_KEY, ACTION_DATA_CURSOR_KEY, } from "./hooks/useActionData";
25
27
  export type { ActionListPage, CursorActionDataResult } from "./hooks/useActionData";
26
- export { useCreateEntity, useUpdateEntity, useDeleteEntity } from "./hooks/useMutations";
28
+ export { useCreateObject, useUpdateObject, useDeleteObject } from "./hooks/useMutations";
27
29
  export { useDebounce } from "./hooks/useDebounce";
28
30
  export { ResponsiveModeProvider, useResponsiveMode, resolveViewportCategory, DEFAULT_RESPONSIVE_BREAKPOINTS, } from "./hooks/useResponsiveMode";
29
31
  export type { ResponsiveBreakpoints, ResponsiveMode, ResponsiveViewport, ViewportCategory, } from "./hooks/useResponsiveMode";
30
- export { usePublicParams, useResolvedParam, useParam } from "./hooks/useParams";
32
+ export { usePublicParams, useResolvedParam, useEffectiveParam, useParam } from "./hooks/useParams";
31
33
  export { useSetStatus } from "./hooks/useObjectStatus";
32
34
  export { useSetProperty, useDeleteProperty } from "./hooks/useProperties";
33
35
  export { useFilters } from "./hooks/useFilters";
@@ -66,6 +68,10 @@ export { ColumnPicker } from "./components/columns/ColumnPicker";
66
68
  export { ViewSwitcher } from "./components/views/ViewSwitcher";
67
69
  export { ActionRunnerProvider, useActionRunner } from "./components/shared/ActionRunner";
68
70
  export type { RunActionOptions } from "./components/shared/ActionRunner";
71
+ export { ObjectActionBar, useObjectActions } from "./components/shared/ObjectActionBar";
72
+ export type { ObjectActionBarProps, ObjectActionBarSlot, ObjectActionSelection, UseObjectActionsResult, } from "./components/shared/ObjectActionBar";
73
+ export { RefreshControl } from "./components/shared/RefreshControl";
74
+ export type { RefreshControlProps } from "./components/shared/RefreshControl";
69
75
  export { RowMenu } from "./components/list/RowMenu";
70
76
  export type { RowMenuProps, RowMenuEntry } from "./components/list/RowMenu";
71
77
  export { QuickPeek, QEField } from "./components/list/QuickPeek";