@tailor-platform/app-shell 1.4.1 → 1.6.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/app-shell.css +1 -1
- package/dist/app-shell.d.ts +371 -33
- package/dist/app-shell.js +4766 -3846
- package/dist/theme.css +42 -78
- package/dist/theme.shims.css +7 -0
- package/dist/themes/_template.css +116 -0
- package/dist/themes/bloom.css +159 -0
- package/dist/themes/cream.css +159 -0
- package/dist/themes/default.css +162 -0
- package/package.json +5 -3
- package/skills/app-shell-patterns/references/fundamental/components.md +21 -0
package/dist/app-shell.d.ts
CHANGED
|
@@ -188,6 +188,44 @@ export declare interface ActivityCardRootProps<T extends ActivityCardBaseItem> {
|
|
|
188
188
|
*/
|
|
189
189
|
declare function ActivityCardStandalone({ items, title, maxVisible, overflowLabel, groupBy, className, }: ActivityCardProps): JSX.Element;
|
|
190
190
|
|
|
191
|
+
export declare type AIChatCompletionEvent = {
|
|
192
|
+
type: "text-delta";
|
|
193
|
+
text: string;
|
|
194
|
+
} | {
|
|
195
|
+
type: "done";
|
|
196
|
+
finishReason?: string;
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
export declare interface AIChatMessage {
|
|
200
|
+
id: string;
|
|
201
|
+
role: "user" | "assistant";
|
|
202
|
+
content: string;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export declare type AIChatStatus = "ready" | "submitted" | "streaming" | "error";
|
|
206
|
+
|
|
207
|
+
export declare type AIGatewayChatMessage = {
|
|
208
|
+
role: "system" | "user";
|
|
209
|
+
content: string;
|
|
210
|
+
} | {
|
|
211
|
+
role: "assistant";
|
|
212
|
+
content?: string;
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
export declare interface AIGatewayChatRequest {
|
|
216
|
+
model: string;
|
|
217
|
+
messages: AIGatewayChatMessage[];
|
|
218
|
+
stream?: boolean;
|
|
219
|
+
signal?: AbortSignal;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export declare interface AIGatewayClient {
|
|
223
|
+
/**
|
|
224
|
+
* Honor request.signal when possible so callers can stop work early.
|
|
225
|
+
*/
|
|
226
|
+
streamChatCompletion(request: AIGatewayChatRequest): AsyncIterable<AIChatCompletionEvent>;
|
|
227
|
+
}
|
|
228
|
+
|
|
191
229
|
export declare const Alert: {
|
|
192
230
|
Root: typeof Root;
|
|
193
231
|
Title: typeof Title;
|
|
@@ -200,6 +238,12 @@ export declare const alertVariants: (props?: ({
|
|
|
200
238
|
variant?: "error" | "neutral" | "success" | "warning" | "info" | null | undefined;
|
|
201
239
|
} & ClassProp) | undefined) => string;
|
|
202
240
|
|
|
241
|
+
/**
|
|
242
|
+
* Appearance menu. The end-user controls **color theme** (light / dark / system);
|
|
243
|
+
* the color palette/brand is a developer configuration, so it is not shown here.
|
|
244
|
+
*/
|
|
245
|
+
export declare function AppearanceSwitcher(): JSX.Element;
|
|
246
|
+
|
|
203
247
|
export declare const AppShell: {
|
|
204
248
|
(props: AppShellProps): JSX.Element | null;
|
|
205
249
|
WithPages(pages: PageEntry[]): FC<AppShellProps>;
|
|
@@ -212,6 +256,7 @@ export declare const AppShell: {
|
|
|
212
256
|
declare type AppShellConfigContextType = {
|
|
213
257
|
title?: string;
|
|
214
258
|
icon?: ReactNode;
|
|
259
|
+
favicon?: string;
|
|
215
260
|
configurations: RootConfiguration;
|
|
216
261
|
};
|
|
217
262
|
|
|
@@ -268,10 +313,6 @@ export declare type AppShellPageProps = {
|
|
|
268
313
|
* ```
|
|
269
314
|
*/
|
|
270
315
|
guards?: Guard[];
|
|
271
|
-
/**
|
|
272
|
-
* Loader function to fetch data before rendering the page.
|
|
273
|
-
*/
|
|
274
|
-
loader?: LoaderHandler;
|
|
275
316
|
};
|
|
276
317
|
|
|
277
318
|
/**
|
|
@@ -781,6 +822,12 @@ declare namespace Body_2 {
|
|
|
781
822
|
var displayName: string;
|
|
782
823
|
}
|
|
783
824
|
|
|
825
|
+
/**
|
|
826
|
+
* Responsive breakpoints, aligned with Tailwind's default breakpoints.
|
|
827
|
+
* `initial` is the base (mobile-first) value applied below the `sm` breakpoint.
|
|
828
|
+
*/
|
|
829
|
+
declare type Breakpoint = "initial" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
830
|
+
|
|
784
831
|
/**
|
|
785
832
|
* Builds a Tailor Platform QueryInput-compatible type from table metadata.
|
|
786
833
|
*/
|
|
@@ -835,12 +882,18 @@ export declare const Card: {
|
|
|
835
882
|
};
|
|
836
883
|
|
|
837
884
|
/** A table data cell (`<td>`). */
|
|
838
|
-
declare function Cell({ className, ...props }:
|
|
885
|
+
declare function Cell({ className, align, ...props }: CellProps): JSX.Element;
|
|
839
886
|
|
|
840
887
|
declare namespace Cell {
|
|
841
888
|
var displayName: string;
|
|
842
889
|
}
|
|
843
890
|
|
|
891
|
+
declare type CellAlign = "left" | "center" | "right";
|
|
892
|
+
|
|
893
|
+
declare type CellProps = React_2.ComponentProps<"td"> & {
|
|
894
|
+
align?: CellAlign;
|
|
895
|
+
};
|
|
896
|
+
|
|
844
897
|
/** A menu item that toggles a setting on or off. */
|
|
845
898
|
declare function CheckboxItem({ className, ...props }: React_2.ComponentProps<typeof Menu_2.CheckboxItem>): JSX.Element;
|
|
846
899
|
|
|
@@ -946,6 +999,35 @@ export declare function CollectionControlProvider({ value, children, }: {
|
|
|
946
999
|
children: ReactNode;
|
|
947
1000
|
}): JSX.Element;
|
|
948
1001
|
|
|
1002
|
+
/**
|
|
1003
|
+
* Partial initial state used to seed `useCollectionVariables`.
|
|
1004
|
+
*/
|
|
1005
|
+
export declare type CollectionInitialState<TFieldName extends string = string, TFilter extends Filter<TFieldName> = Filter<TFieldName>> = Partial<CollectionPersistedState<TFieldName, TFilter>>;
|
|
1006
|
+
|
|
1007
|
+
/**
|
|
1008
|
+
* Initial and change payload shape for `useCollectionVariables`.
|
|
1009
|
+
*/
|
|
1010
|
+
export declare interface CollectionParams<TFieldName extends string = string, TFilter extends Filter<TFieldName> = Filter<TFieldName>> {
|
|
1011
|
+
initialFilters?: TFilter[];
|
|
1012
|
+
initialSort?: {
|
|
1013
|
+
field: TFieldName;
|
|
1014
|
+
direction: "Asc" | "Desc";
|
|
1015
|
+
}[];
|
|
1016
|
+
pageSize?: number;
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
/**
|
|
1020
|
+
* Serializable subset of collection state used for initialization and persistence.
|
|
1021
|
+
*/
|
|
1022
|
+
export declare interface CollectionPersistedState<TFieldName extends string = string, TFilter extends Filter<TFieldName> = Filter<TFieldName>> {
|
|
1023
|
+
filters: TFilter[];
|
|
1024
|
+
sortStates: {
|
|
1025
|
+
field: TFieldName;
|
|
1026
|
+
direction: "Asc" | "Desc";
|
|
1027
|
+
}[];
|
|
1028
|
+
pageSize: number;
|
|
1029
|
+
}
|
|
1030
|
+
|
|
949
1031
|
/**
|
|
950
1032
|
* GraphQL collection result format (Tailor Platform standard).
|
|
951
1033
|
*/
|
|
@@ -969,6 +1051,12 @@ export declare interface CollectionVariables {
|
|
|
969
1051
|
pagination: PaginationVariables;
|
|
970
1052
|
}
|
|
971
1053
|
|
|
1054
|
+
/**
|
|
1055
|
+
* Color theme — the end-user accessibility preference. `system` follows the OS
|
|
1056
|
+
* light/dark setting. Applied to `<html>` as the `.light` / `.dark` class.
|
|
1057
|
+
*/
|
|
1058
|
+
export declare type ColorTheme = "light" | "dark" | "system";
|
|
1059
|
+
|
|
972
1060
|
/**
|
|
973
1061
|
* A column definition for DataTable. Use one of the built-in `type` values
|
|
974
1062
|
* (`text`, `number`, `money`, `date`, `badge`, `link`) for automatic
|
|
@@ -1583,6 +1671,11 @@ declare interface CreatableProps<T extends object> {
|
|
|
1583
1671
|
formatCreateLabel?: (value: string) => string;
|
|
1584
1672
|
}
|
|
1585
1673
|
|
|
1674
|
+
export declare function createAIGatewayClient(config: {
|
|
1675
|
+
gatewayUri: string;
|
|
1676
|
+
authClient: AuthClient;
|
|
1677
|
+
}): AIGatewayClient;
|
|
1678
|
+
|
|
1586
1679
|
/**
|
|
1587
1680
|
* Create an enhanced authentication client.
|
|
1588
1681
|
*
|
|
@@ -2334,6 +2427,76 @@ declare type DialogRootProps = Pick<React_2.ComponentProps<typeof Dialog_2.Root>
|
|
|
2334
2427
|
children: React_2.ReactNode;
|
|
2335
2428
|
};
|
|
2336
2429
|
|
|
2430
|
+
/**
|
|
2431
|
+
* DocumentProgressCard — a generic, presentational card for a document's
|
|
2432
|
+
* lifecycle/fulfilment state: an optional headline percentage, a stacked
|
|
2433
|
+
* progress bar, and a status legend.
|
|
2434
|
+
*
|
|
2435
|
+
* View-only and domain-agnostic — pass an arbitrary set of `segments` (e.g.
|
|
2436
|
+
* shipped / returned / pending, or cancelled / blocked / …) plus an explicit
|
|
2437
|
+
* `percent`. Derive the percentage and, where buckets overlap, the bar
|
|
2438
|
+
* breakdown in the consumer (see the docs for a purchase-order example).
|
|
2439
|
+
*
|
|
2440
|
+
* @example
|
|
2441
|
+
* ```tsx
|
|
2442
|
+
* <DocumentProgressCard
|
|
2443
|
+
* title="Shipment status"
|
|
2444
|
+
* percent={60}
|
|
2445
|
+
* segments={[
|
|
2446
|
+
* { label: "Shipped", value: 30, color: "green" },
|
|
2447
|
+
* { label: "Returned", value: 3, color: "red" },
|
|
2448
|
+
* { label: "Pending", value: 17, color: "neutral" },
|
|
2449
|
+
* ]}
|
|
2450
|
+
* />
|
|
2451
|
+
* ```
|
|
2452
|
+
*/
|
|
2453
|
+
export declare function DocumentProgressCard({ title, percent, segments, legend, total, className, }: DocumentProgressCardProps): JSX.Element;
|
|
2454
|
+
|
|
2455
|
+
/**
|
|
2456
|
+
* Props for the generic DocumentProgressCard.
|
|
2457
|
+
*/
|
|
2458
|
+
export declare interface DocumentProgressCardProps {
|
|
2459
|
+
/** Optional card title shown top-left. */
|
|
2460
|
+
title?: ReactNode;
|
|
2461
|
+
/**
|
|
2462
|
+
* Headline percentage shown top-right (0–100). Optional and explicit — the
|
|
2463
|
+
* generic card has no notion of "complete", so the consumer supplies it.
|
|
2464
|
+
*/
|
|
2465
|
+
percent?: number;
|
|
2466
|
+
/** Status segments rendered as a single stacked bar (and, by default, the legend). */
|
|
2467
|
+
segments: DocumentProgressSegment[];
|
|
2468
|
+
/**
|
|
2469
|
+
* Legend rows. Defaults to `segments`. Provide this only when the legend
|
|
2470
|
+
* should differ from the bar (e.g. overlapping buckets shown distinctly).
|
|
2471
|
+
*/
|
|
2472
|
+
legend?: DocumentProgressSegment[];
|
|
2473
|
+
/**
|
|
2474
|
+
* Denominator used to size the bar. Defaults to the sum of segment values
|
|
2475
|
+
* (the bar is fully tiled). A larger value leaves an unfilled track remainder.
|
|
2476
|
+
*/
|
|
2477
|
+
total?: number;
|
|
2478
|
+
/** Additional CSS classes for the card root. */
|
|
2479
|
+
className?: string;
|
|
2480
|
+
}
|
|
2481
|
+
|
|
2482
|
+
/**
|
|
2483
|
+
* Curated palette for progress segments. Each value maps to a fixed fill used
|
|
2484
|
+
* for both the stacked bar and the legend marker.
|
|
2485
|
+
*/
|
|
2486
|
+
declare type DocumentProgressColor = "indigo" | "pink" | "green" | "amber" | "red" | "blue" | "neutral";
|
|
2487
|
+
|
|
2488
|
+
/**
|
|
2489
|
+
* A single status segment: its amount, a legend label, and a color.
|
|
2490
|
+
*/
|
|
2491
|
+
declare interface DocumentProgressSegment {
|
|
2492
|
+
/** Legend label (e.g. "Shipped"). */
|
|
2493
|
+
label: string;
|
|
2494
|
+
/** Amount — shown in the legend and used to size the bar. */
|
|
2495
|
+
value: number;
|
|
2496
|
+
/** Bar / legend-marker color. */
|
|
2497
|
+
color: DocumentProgressColor;
|
|
2498
|
+
}
|
|
2499
|
+
|
|
2337
2500
|
declare type DynamicLocales<Def extends Record<string, LabelValue>> = {
|
|
2338
2501
|
[locale: string]: Partial<LabelDefinition<Def>> | undefined;
|
|
2339
2502
|
};
|
|
@@ -2836,6 +2999,69 @@ export declare type FormProps<FormValues extends Record<string, any> = Record<st
|
|
|
2836
2999
|
|
|
2837
3000
|
declare type FormSubmitEventDetails = NonNullable<React_2.ComponentProps<typeof Form_2>["onFormSubmit"]> extends (values: any, details: infer D) => any ? D : never;
|
|
2838
3001
|
|
|
3002
|
+
export declare const Grid: React_2.ForwardRefExoticComponent<Omit<GridProps, "ref"> & React_2.RefAttributes<HTMLDivElement>> & {
|
|
3003
|
+
Item: React_2.ForwardRefExoticComponent<Omit<GridItemProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
3004
|
+
};
|
|
3005
|
+
|
|
3006
|
+
/**
|
|
3007
|
+
* Props for {@link Grid.Item} — a grid cell that spans or is placed explicitly.
|
|
3008
|
+
*
|
|
3009
|
+
* Only needed when a child must span multiple tracks or be positioned; plain
|
|
3010
|
+
* children render in a single cell without it.
|
|
3011
|
+
*/
|
|
3012
|
+
export declare interface GridItemProps extends React_2.ComponentProps<"div"> {
|
|
3013
|
+
/** Number of columns to span, or `"full"` to span all columns. Responsive. */
|
|
3014
|
+
colSpan?: Responsive<number | "full">;
|
|
3015
|
+
/** Number of rows to span, or `"full"` to span all rows. Responsive. */
|
|
3016
|
+
rowSpan?: Responsive<number | "full">;
|
|
3017
|
+
/** 1-based column line to start at (`grid-column-start`). Responsive. */
|
|
3018
|
+
colStart?: Responsive<number>;
|
|
3019
|
+
/** 1-based column line to end at (`grid-column-end`). Responsive. */
|
|
3020
|
+
colEnd?: Responsive<number>;
|
|
3021
|
+
}
|
|
3022
|
+
|
|
3023
|
+
/**
|
|
3024
|
+
* Props for the {@link Grid} component.
|
|
3025
|
+
*
|
|
3026
|
+
* `Grid` is a generic, presentational CSS-Grid container. It does not assume
|
|
3027
|
+
* any data shape — children flow into the tracks defined by `columns`/`rows`.
|
|
3028
|
+
*/
|
|
3029
|
+
export declare interface GridProps extends React_2.ComponentProps<"div"> {
|
|
3030
|
+
/**
|
|
3031
|
+
* Column tracks. A number creates that many equal columns
|
|
3032
|
+
* (`repeat(n, minmax(0, 1fr))`); a string is used verbatim as a
|
|
3033
|
+
* `grid-template-columns` value (e.g. `"280px 1fr"`). Responsive.
|
|
3034
|
+
*/
|
|
3035
|
+
columns?: Responsive<number | string>;
|
|
3036
|
+
/**
|
|
3037
|
+
* Row tracks. A number creates that many equal rows
|
|
3038
|
+
* (`repeat(n, minmax(0, 1fr))`); a string is used verbatim as a
|
|
3039
|
+
* `grid-template-rows` value. Responsive.
|
|
3040
|
+
*/
|
|
3041
|
+
rows?: Responsive<number | string>;
|
|
3042
|
+
/**
|
|
3043
|
+
* Gap between rows and columns, in spacing-scale units (`4` = `1rem`).
|
|
3044
|
+
* Defaults to `3` (12px). Responsive.
|
|
3045
|
+
*/
|
|
3046
|
+
gap?: Responsive<number>;
|
|
3047
|
+
/** Horizontal (column) gap override, in spacing-scale units. Responsive. */
|
|
3048
|
+
gapX?: Responsive<number>;
|
|
3049
|
+
/** Vertical (row) gap override, in spacing-scale units. Responsive. */
|
|
3050
|
+
gapY?: Responsive<number>;
|
|
3051
|
+
/**
|
|
3052
|
+
* Auto-fit columns: each child is at least this wide and as many as fit are
|
|
3053
|
+
* placed per row (`repeat(auto-fit, minmax(w, 1fr))`). A number is treated as
|
|
3054
|
+
* pixels. **Overrides `columns`** when set.
|
|
3055
|
+
*/
|
|
3056
|
+
minChildWidth?: number | string;
|
|
3057
|
+
/** `grid-auto-flow` direction. */
|
|
3058
|
+
flow?: "row" | "column" | "dense" | "row-dense" | "column-dense";
|
|
3059
|
+
/** `align-items` — block-axis alignment of children within their tracks. */
|
|
3060
|
+
align?: "start" | "center" | "end" | "stretch" | "baseline";
|
|
3061
|
+
/** `justify-content` — inline-axis distribution of tracks within the grid. */
|
|
3062
|
+
justify?: "start" | "center" | "end" | "between" | "around" | "evenly";
|
|
3063
|
+
}
|
|
3064
|
+
|
|
2839
3065
|
/** Groups related menu items with the corresponding label. */
|
|
2840
3066
|
declare function Group({ ...props }: React_2.ComponentProps<typeof Menu_2.Group>): JSX.Element;
|
|
2841
3067
|
|
|
@@ -2883,7 +3109,7 @@ export declare type GuardResult =
|
|
|
2883
3109
|
};
|
|
2884
3110
|
|
|
2885
3111
|
/** A table header cell (`<th>`). */
|
|
2886
|
-
declare function Head({ className, ...props }:
|
|
3112
|
+
declare function Head({ className, align, ...props }: HeadProps): JSX.Element;
|
|
2887
3113
|
|
|
2888
3114
|
declare namespace Head {
|
|
2889
3115
|
var displayName: string;
|
|
@@ -2966,6 +3192,10 @@ declare type HeaderProps = Omit<React_2.ComponentProps<"div">, "title"> & {
|
|
|
2966
3192
|
description?: React_2.ReactNode;
|
|
2967
3193
|
};
|
|
2968
3194
|
|
|
3195
|
+
declare type HeadProps = React_2.ComponentProps<"th"> & {
|
|
3196
|
+
align?: CellAlign;
|
|
3197
|
+
};
|
|
3198
|
+
|
|
2969
3199
|
/**
|
|
2970
3200
|
* Deny access and show 404 Not Found.
|
|
2971
3201
|
*
|
|
@@ -3432,7 +3662,7 @@ declare type OrderableFieldType = "string" | "number" | "boolean" | "datetime" |
|
|
|
3432
3662
|
* A React component that can be used as a page in file-based routing.
|
|
3433
3663
|
*
|
|
3434
3664
|
* The component can optionally have an `appShellPageProps` static field
|
|
3435
|
-
* for configuring navigation metadata
|
|
3665
|
+
* for configuring navigation metadata and guards.
|
|
3436
3666
|
*/
|
|
3437
3667
|
export declare type PageComponent = FC & {
|
|
3438
3668
|
appShellPageProps?: AppShellPageProps;
|
|
@@ -3558,6 +3788,9 @@ declare namespace RadioItemIndicator {
|
|
|
3558
3788
|
*/
|
|
3559
3789
|
export declare const redirectTo: (to: string) => GuardResult;
|
|
3560
3790
|
|
|
3791
|
+
/** Color theme after resolving `system` to a concrete value. */
|
|
3792
|
+
export declare type ResolvedColorTheme = "light" | "dark";
|
|
3793
|
+
|
|
3561
3794
|
declare type ResolveFieldValueType<F, T extends keyof FieldTypeToTSType> = T extends "enum" ? F extends {
|
|
3562
3795
|
readonly enumValues: readonly (infer V extends string)[];
|
|
3563
3796
|
} ? V : string : FieldTypeToTSType[T];
|
|
@@ -3596,6 +3829,18 @@ declare type ResourceMeta = {
|
|
|
3596
3829
|
breadcrumbTitle?: string | ((segment: string) => string);
|
|
3597
3830
|
};
|
|
3598
3831
|
|
|
3832
|
+
/**
|
|
3833
|
+
* A value that can either be a single value applied at all breakpoints, or an
|
|
3834
|
+
* object keyed by breakpoint for responsive behavior.
|
|
3835
|
+
*
|
|
3836
|
+
* @example
|
|
3837
|
+
* ```tsx
|
|
3838
|
+
* columns={4} // same at every breakpoint
|
|
3839
|
+
* columns={{ initial: 1, md: 2, xl: 4 }} // responsive
|
|
3840
|
+
* ```
|
|
3841
|
+
*/
|
|
3842
|
+
declare type Responsive<T> = T | Partial<Record<Breakpoint, T>>;
|
|
3843
|
+
|
|
3599
3844
|
declare function Root({ className, variant, action, dismissible, onDismiss, children, ...props }: RootProps): JSX.Element | null;
|
|
3600
3845
|
|
|
3601
3846
|
declare namespace Root {
|
|
@@ -3892,6 +4137,16 @@ export declare interface RowAction<TRow extends Record<string, unknown>> {
|
|
|
3892
4137
|
onClick: (row: TRow) => void;
|
|
3893
4138
|
}
|
|
3894
4139
|
|
|
4140
|
+
/**
|
|
4141
|
+
* Setter shape compatible with `useSearchParams()`.
|
|
4142
|
+
*/
|
|
4143
|
+
declare type SearchParamsBinding = readonly [
|
|
4144
|
+
URLSearchParams,
|
|
4145
|
+
(next: URLSearchParams | ((prev: URLSearchParams) => URLSearchParams), options?: {
|
|
4146
|
+
replace?: boolean;
|
|
4147
|
+
}) => void
|
|
4148
|
+
];
|
|
4149
|
+
|
|
3895
4150
|
/**
|
|
3896
4151
|
* An async search source that can be plugged into the CommandPalette.
|
|
3897
4152
|
*
|
|
@@ -4110,13 +4365,30 @@ declare namespace SelectValue {
|
|
|
4110
4365
|
*/
|
|
4111
4366
|
declare type SharedAppShellProps = React.PropsWithChildren<{
|
|
4112
4367
|
/**
|
|
4113
|
-
* App shell title
|
|
4368
|
+
* App shell title.
|
|
4369
|
+
*
|
|
4370
|
+
* Also used as the suffix of the browser tab title: AppShell keeps
|
|
4371
|
+
* `document.title` in sync with the active page as `"<page> · <title>"`
|
|
4372
|
+
* (the page part is the current breadcrumb leaf, including any
|
|
4373
|
+
* {@link useOverrideBreadcrumb} override). When omitted, the tab shows just
|
|
4374
|
+
* the page title.
|
|
4114
4375
|
*/
|
|
4115
4376
|
title?: string;
|
|
4116
4377
|
/**
|
|
4117
4378
|
* App shell icon
|
|
4118
4379
|
*/
|
|
4119
4380
|
icon?: React.ReactNode;
|
|
4381
|
+
/**
|
|
4382
|
+
* Browser-tab favicon href. Accepts anything valid on `<link rel="icon">` —
|
|
4383
|
+
* a public-path URL (e.g. `/favicon.ico`) or a data URI. AppShell renders the
|
|
4384
|
+
* `<link rel="icon">` for you (React hoists it into `<head>`). When omitted,
|
|
4385
|
+
* AppShell preserves any favicon link already declared by the host page and
|
|
4386
|
+
* only falls back to the bundled Tailor favicon when none exists.
|
|
4387
|
+
*
|
|
4388
|
+
* If you pass this prop, prefer not to also declare a static
|
|
4389
|
+
* `<link rel="icon">` in `index.html`.
|
|
4390
|
+
*/
|
|
4391
|
+
favicon?: string;
|
|
4120
4392
|
/**
|
|
4121
4393
|
* Base path for the app shell
|
|
4122
4394
|
*/
|
|
@@ -4245,6 +4517,15 @@ declare type SharedAppShellProps = React.PropsWithChildren<{
|
|
|
4245
4517
|
* ```
|
|
4246
4518
|
*/
|
|
4247
4519
|
searchSources?: readonly SearchSource[];
|
|
4520
|
+
/**
|
|
4521
|
+
* Initial color mode before any value is loaded from localStorage (`appshell-ui-theme`).
|
|
4522
|
+
* This is the end-user accessibility preference; does not replace a stored preference.
|
|
4523
|
+
*
|
|
4524
|
+
* One of **`light`**, **`dark`**, or **`system`** (follows the OS).
|
|
4525
|
+
*
|
|
4526
|
+
* @default "system"
|
|
4527
|
+
*/
|
|
4528
|
+
defaultColorTheme?: ColorTheme;
|
|
4248
4529
|
}>;
|
|
4249
4530
|
|
|
4250
4531
|
export declare const Sheet: {
|
|
@@ -4596,14 +4877,6 @@ export declare const Tabs: {
|
|
|
4596
4877
|
|
|
4597
4878
|
declare type TabsVariant = "default" | "line" | "capsule";
|
|
4598
4879
|
|
|
4599
|
-
declare type Theme = "dark" | "light" | "system";
|
|
4600
|
-
|
|
4601
|
-
declare type ThemeProviderState = {
|
|
4602
|
-
theme: Theme;
|
|
4603
|
-
resolvedTheme: Omit<Theme, "system">;
|
|
4604
|
-
setTheme: (theme: Theme) => void;
|
|
4605
|
-
};
|
|
4606
|
-
|
|
4607
4880
|
declare function Title({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
|
|
4608
4881
|
|
|
4609
4882
|
declare namespace Title {
|
|
@@ -4663,6 +4936,18 @@ declare namespace Trigger_4 {
|
|
|
4663
4936
|
var displayName: string;
|
|
4664
4937
|
}
|
|
4665
4938
|
|
|
4939
|
+
/**
|
|
4940
|
+
* Metadata-aware collection variables that remain assignable to the broad
|
|
4941
|
+
* `CollectionVariables` shape expected by GraphQL clients.
|
|
4942
|
+
*/
|
|
4943
|
+
declare type TypedCollectionVariables<TTable extends TableMetadata> = CollectionVariables & {
|
|
4944
|
+
query: BuildQueryVariables<TTable> | undefined;
|
|
4945
|
+
order: {
|
|
4946
|
+
field: TableOrderableFieldName<TTable>;
|
|
4947
|
+
direction: "Asc" | "Desc";
|
|
4948
|
+
}[] | undefined;
|
|
4949
|
+
};
|
|
4950
|
+
|
|
4666
4951
|
/**
|
|
4667
4952
|
* Type-safe path builder interface.
|
|
4668
4953
|
*
|
|
@@ -4691,6 +4976,22 @@ declare type TypedPaths<TRoutes extends Record<string, Record<string, string>>>
|
|
|
4691
4976
|
for<T extends (keyof TRoutes & string) | `${keyof TRoutes & string}?${string}`>(path: T, ...params: ExtractBasePath<T> extends keyof TRoutes ? IsEmptyObject<TRoutes[ExtractBasePath<T>]> extends true ? [] : [TRoutes[ExtractBasePath<T>]] : never): string;
|
|
4692
4977
|
};
|
|
4693
4978
|
|
|
4979
|
+
export declare function useAIChat(config: {
|
|
4980
|
+
client: AIGatewayClient;
|
|
4981
|
+
model: string;
|
|
4982
|
+
stream?: boolean;
|
|
4983
|
+
}): {
|
|
4984
|
+
messages: AIChatMessage[];
|
|
4985
|
+
status: AIChatStatus;
|
|
4986
|
+
error?: Error;
|
|
4987
|
+
/**
|
|
4988
|
+
* Returns true when the message is sent and the stream finishes successfully.
|
|
4989
|
+
* Returns false when the call is ignored, aborted, or the request fails.
|
|
4990
|
+
*/
|
|
4991
|
+
sendMessage: (message: string) => Promise<boolean>;
|
|
4992
|
+
stop: () => void;
|
|
4993
|
+
};
|
|
4994
|
+
|
|
4694
4995
|
/**
|
|
4695
4996
|
* Hook to access the full AppShell context (both config and data).
|
|
4696
4997
|
* For better performance, prefer useAppShellConfig() or useAppShellData()
|
|
@@ -4700,6 +5001,7 @@ export declare const useAppShell: () => {
|
|
|
4700
5001
|
contextData: ContextData;
|
|
4701
5002
|
title?: string;
|
|
4702
5003
|
icon?: ReactNode;
|
|
5004
|
+
favicon?: string;
|
|
4703
5005
|
configurations: RootConfiguration;
|
|
4704
5006
|
};
|
|
4705
5007
|
|
|
@@ -5003,14 +5305,8 @@ export declare function useCollectionControl<TFieldName extends string = string>
|
|
|
5003
5305
|
* Options for `useCollectionVariables` hook.
|
|
5004
5306
|
*/
|
|
5005
5307
|
export declare interface UseCollectionOptions<TFieldName extends string = string, TFilter extends Filter<TFieldName> = Filter<TFieldName>> {
|
|
5006
|
-
params?:
|
|
5007
|
-
|
|
5008
|
-
initialSort?: {
|
|
5009
|
-
field: TFieldName;
|
|
5010
|
-
direction: "Asc" | "Desc";
|
|
5011
|
-
}[];
|
|
5012
|
-
pageSize?: number;
|
|
5013
|
-
};
|
|
5308
|
+
params?: CollectionParams<TFieldName, TFilter>;
|
|
5309
|
+
onParamsChange?(params: CollectionParams<TFieldName, TFilter>): void;
|
|
5014
5310
|
}
|
|
5015
5311
|
|
|
5016
5312
|
/**
|
|
@@ -5045,14 +5341,7 @@ export declare interface UseCollectionReturn<TFieldName extends string = string,
|
|
|
5045
5341
|
*/
|
|
5046
5342
|
export declare function useCollectionVariables<const TTable extends TableMetadata>(options: UseCollectionOptions<TableFieldName<TTable>, TableMetadataFilter<TTable>> & {
|
|
5047
5343
|
tableMetadata: TTable;
|
|
5048
|
-
}): UseCollectionReturn<TableFieldName<TTable>,
|
|
5049
|
-
query: BuildQueryVariables<TTable> | undefined;
|
|
5050
|
-
order: {
|
|
5051
|
-
field: TableOrderableFieldName<TTable>;
|
|
5052
|
-
direction: "Asc" | "Desc";
|
|
5053
|
-
}[] | undefined;
|
|
5054
|
-
pagination: PaginationVariables;
|
|
5055
|
-
}, TableMetadataFilter<TTable>>;
|
|
5344
|
+
}): UseCollectionReturn<TableFieldName<TTable>, TypedCollectionVariables<TTable>, TableMetadataFilter<TTable>>;
|
|
5056
5345
|
|
|
5057
5346
|
/**
|
|
5058
5347
|
* Hook for managing collection query parameters (filters, sort, pagination).
|
|
@@ -5521,10 +5810,46 @@ declare interface UseSelectAsyncReturn<T> {
|
|
|
5521
5810
|
onOpenChange: (open: boolean) => void;
|
|
5522
5811
|
}
|
|
5523
5812
|
|
|
5524
|
-
|
|
5813
|
+
/** Color theme hook — returns the current color theme and a setter. */
|
|
5814
|
+
export declare const useTheme: () => {
|
|
5815
|
+
theme: ColorTheme;
|
|
5816
|
+
resolvedTheme: ResolvedColorTheme;
|
|
5817
|
+
setTheme: (colorTheme: ColorTheme) => void;
|
|
5818
|
+
};
|
|
5525
5819
|
|
|
5526
5820
|
export declare const useToast: () => typeof toast;
|
|
5527
5821
|
|
|
5822
|
+
/**
|
|
5823
|
+
* Hook for managing collection query parameters (filters, sort, pagination)
|
|
5824
|
+
* with state persisted to the URL query string.
|
|
5825
|
+
*
|
|
5826
|
+
* This is the one-call convenience over {@link useCollectionVariables}: it seeds
|
|
5827
|
+
* the initial filter/sort/page-size state from the current router search params
|
|
5828
|
+
* and writes changes back as the user filters, sorts, or pages (using `replace`
|
|
5829
|
+
* so each change doesn't push a new history entry).
|
|
5830
|
+
*
|
|
5831
|
+
* Reach for the bare {@link useCollectionVariables} when you don't want URL
|
|
5832
|
+
* persistence, or the pure {@link withURLCollectionState} decorator when you
|
|
5833
|
+
* need to supply a non-react-router search-params binding.
|
|
5834
|
+
*
|
|
5835
|
+
* @example
|
|
5836
|
+
* ```tsx
|
|
5837
|
+
* import { tableMetadata } from "./generated/data-viewer-metadata.generated";
|
|
5838
|
+
*
|
|
5839
|
+
* const { variables, control } = useURLCollectionVariables({
|
|
5840
|
+
* tableMetadata: tableMetadata.task,
|
|
5841
|
+
* params: { pageSize: 20 },
|
|
5842
|
+
* });
|
|
5843
|
+
* ```
|
|
5844
|
+
*/
|
|
5845
|
+
export declare function useURLCollectionVariables<const TTable extends TableMetadata>(options: UseCollectionOptions<TableFieldName<TTable>, TableMetadataFilter<TTable>> & {
|
|
5846
|
+
tableMetadata: TTable;
|
|
5847
|
+
}): UseCollectionReturn<TableFieldName<TTable>, TypedCollectionVariables<TTable>, TableMetadataFilter<TTable>>;
|
|
5848
|
+
|
|
5849
|
+
export declare function useURLCollectionVariables(options: UseCollectionOptions & {
|
|
5850
|
+
tableMetadata?: never;
|
|
5851
|
+
}): UseCollectionReturn<string, CollectionVariables>;
|
|
5852
|
+
|
|
5528
5853
|
/**
|
|
5529
5854
|
* Used to display a custom message based on the field's validity state.
|
|
5530
5855
|
*
|
|
@@ -5642,4 +5967,17 @@ export declare type WithGuardProps = {
|
|
|
5642
5967
|
loading?: ReactNode;
|
|
5643
5968
|
};
|
|
5644
5969
|
|
|
5970
|
+
/**
|
|
5971
|
+
* Decorate `useCollectionVariables` options with URL-backed collection state.
|
|
5972
|
+
*/
|
|
5973
|
+
export declare function withURLCollectionState<const TTable extends TableMetadata>(options: UseCollectionOptions<TableFieldName<TTable>, TableMetadataFilter<TTable>> & {
|
|
5974
|
+
tableMetadata: TTable;
|
|
5975
|
+
}, [searchParams, setSearchParams]: SearchParamsBinding): UseCollectionOptions<TableFieldName<TTable>, TableMetadataFilter<TTable>> & {
|
|
5976
|
+
tableMetadata: TTable;
|
|
5977
|
+
};
|
|
5978
|
+
|
|
5979
|
+
export declare function withURLCollectionState(options: UseCollectionOptions & {
|
|
5980
|
+
tableMetadata?: never;
|
|
5981
|
+
}, [searchParams, setSearchParams]: SearchParamsBinding): UseCollectionOptions;
|
|
5982
|
+
|
|
5645
5983
|
export { }
|