@gradeui/ui 1.3.0 → 2.0.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/components/ui/background-fill.md +28 -2
- package/components/ui/logo.md +4 -2
- package/components/ui/screen-animator.md +54 -0
- package/dist/contracts.js +6 -6
- package/dist/contracts.js.map +1 -1
- package/dist/contracts.mjs +6 -6
- package/dist/contracts.mjs.map +1 -1
- package/dist/index.d.mts +155 -30
- package/dist/index.d.ts +155 -30
- package/dist/index.js +43 -40
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +43 -40
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +2 -3
- package/dist/tailwind-preset.js +1 -1
- package/dist/tailwind-preset.js.map +1 -1
- package/dist/tailwind-preset.mjs +1 -1
- package/dist/tailwind-preset.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -177,14 +177,14 @@ declare const MediaSurfaceContract: _gradeui_contracts.ComponentContract<{
|
|
|
177
177
|
description: z.ZodOptional<z.ZodString>;
|
|
178
178
|
}, "strip", z.ZodTypeAny, {
|
|
179
179
|
kind: "book";
|
|
180
|
-
title?: string | undefined;
|
|
181
180
|
description?: string | undefined;
|
|
181
|
+
title?: string | undefined;
|
|
182
182
|
author?: string | undefined;
|
|
183
183
|
isbn?: string | undefined;
|
|
184
184
|
}, {
|
|
185
185
|
kind: "book";
|
|
186
|
-
title?: string | undefined;
|
|
187
186
|
description?: string | undefined;
|
|
187
|
+
title?: string | undefined;
|
|
188
188
|
author?: string | undefined;
|
|
189
189
|
isbn?: string | undefined;
|
|
190
190
|
}>, z.ZodObject<{
|
|
@@ -489,7 +489,7 @@ declare const AppShellFooter: React$1.ForwardRefExoticComponent<AppShellFooterPr
|
|
|
489
489
|
* directly still works and overrides the variant defaults.
|
|
490
490
|
*/
|
|
491
491
|
declare const avatarSizes: (props?: ({
|
|
492
|
-
size?: "sm" | "md" | "lg" | "xl" | "xs" | null | undefined;
|
|
492
|
+
size?: "sm" | "md" | "lg" | "xl" | "xs" | "2xs" | null | undefined;
|
|
493
493
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
494
494
|
interface AvatarProps extends React$1.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>, VariantProps<typeof avatarSizes> {
|
|
495
495
|
}
|
|
@@ -571,7 +571,7 @@ type Surface = "solid" | "translucent" | "glass" | "glass-strong";
|
|
|
571
571
|
*/
|
|
572
572
|
declare const bannerVariants: (props?: ({
|
|
573
573
|
variant?: "default" | "info" | "success" | "warning" | "destructive" | "announcement" | null | undefined;
|
|
574
|
-
align?: "
|
|
574
|
+
align?: "between" | "start" | "center" | null | undefined;
|
|
575
575
|
sticky?: boolean | null | undefined;
|
|
576
576
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
577
577
|
interface BannerProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "title">, VariantProps<typeof bannerVariants> {
|
|
@@ -627,8 +627,8 @@ declare const Banner: React$1.ForwardRefExoticComponent<BannerProps & React$1.Re
|
|
|
627
627
|
* consistent across primitives.
|
|
628
628
|
*/
|
|
629
629
|
declare const buttonVariants: (props?: ({
|
|
630
|
-
variant?: "
|
|
631
|
-
size?: "
|
|
630
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | "raised" | null | undefined;
|
|
631
|
+
size?: "sm" | "md" | "lg" | "default" | "icon" | "xs" | "2xs" | null | undefined;
|
|
632
632
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
633
633
|
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
634
634
|
asChild?: boolean;
|
|
@@ -1326,6 +1326,10 @@ interface UseScriptedDemoOptions<TStep> {
|
|
|
1326
1326
|
play?: boolean;
|
|
1327
1327
|
/** Loop the sequence forever after completion. Pause length controlled by `loopDelay`. */
|
|
1328
1328
|
loop?: boolean;
|
|
1329
|
+
/** Cap the number of loop cycles, then settle and stop. A demo is a movie —
|
|
1330
|
+
* it shouldn't spin forever. Default Infinity. Grid/embed surfaces set a
|
|
1331
|
+
* small number so the loop ends instead of running unattended. */
|
|
1332
|
+
maxLoops?: number;
|
|
1329
1333
|
/**
|
|
1330
1334
|
* Milliseconds to pause between loop cycles. Only applies when
|
|
1331
1335
|
* `loop` is true. Defaults to 2000. Marketing surfaces that want
|
|
@@ -1903,7 +1907,7 @@ declare const DropdownMenuShortcut: {
|
|
|
1903
1907
|
* rationale.
|
|
1904
1908
|
*/
|
|
1905
1909
|
declare const inputVariants: (props?: ({
|
|
1906
|
-
size?: "
|
|
1910
|
+
size?: "sm" | "default" | "xs" | "2xs" | null | undefined;
|
|
1907
1911
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1908
1912
|
type InputSize = NonNullable<VariantProps<typeof inputVariants>["size"]>;
|
|
1909
1913
|
type InputProps = Omit<React$1.ComponentProps<"input">, "size"> & {
|
|
@@ -1921,7 +1925,7 @@ type InputProps = Omit<React$1.ComponentProps<"input">, "size"> & {
|
|
|
1921
1925
|
declare const Input: React$1.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
|
|
1922
1926
|
|
|
1923
1927
|
declare const Label: React$1.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React$1.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: ({
|
|
1924
|
-
size?: "
|
|
1928
|
+
size?: "sm" | "default" | "xs" | "2xs" | null | undefined;
|
|
1925
1929
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLLabelElement>>;
|
|
1926
1930
|
|
|
1927
1931
|
declare const Popover: React$1.FC<PopoverPrimitive.PopoverProps>;
|
|
@@ -2065,7 +2069,7 @@ declare const RadioGroupItem: React$1.ForwardRefExoticComponent<Omit<RadioGroupP
|
|
|
2065
2069
|
* </ResizablePanelGroup>
|
|
2066
2070
|
*/
|
|
2067
2071
|
declare const ResizablePanelGroup: ({ className, ...props }: React$1.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => React$1.JSX.Element;
|
|
2068
|
-
declare const ResizablePanel: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<
|
|
2072
|
+
declare const ResizablePanel: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<HTMLDivElement | HTMLElement | HTMLObjectElement | HTMLSelectElement | HTMLTextAreaElement | HTMLMapElement | HTMLTitleElement | HTMLVideoElement | HTMLButtonElement | HTMLLinkElement | HTMLLabelElement | HTMLStyleElement | HTMLSourceElement | HTMLHtmlElement | HTMLOptionElement | HTMLTableColElement | HTMLAudioElement | HTMLEmbedElement | HTMLProgressElement | HTMLHRElement | HTMLTableElement | HTMLAnchorElement | HTMLFormElement | HTMLHeadingElement | HTMLImageElement | HTMLInputElement | HTMLLIElement | HTMLOListElement | HTMLParagraphElement | HTMLSpanElement | HTMLUListElement | HTMLAreaElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLFieldSetElement | HTMLHeadElement | HTMLIFrameElement | HTMLLegendElement | HTMLMetaElement | HTMLMeterElement | HTMLOptGroupElement | HTMLOutputElement | HTMLPreElement | HTMLSlotElement | HTMLScriptElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTimeElement | HTMLTableRowElement | HTMLTrackElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
|
|
2069
2073
|
className?: string | undefined;
|
|
2070
2074
|
collapsedSize?: number | undefined;
|
|
2071
2075
|
collapsible?: boolean | undefined;
|
|
@@ -2105,8 +2109,8 @@ declare const ResizableHandle: ({ withHandle, className, ...props }: React$1.Com
|
|
|
2105
2109
|
*/
|
|
2106
2110
|
declare const rowVariants: (props?: ({
|
|
2107
2111
|
gap?: "none" | "sm" | "md" | "lg" | "xl" | "xs" | "2xl" | null | undefined;
|
|
2108
|
-
align?: "
|
|
2109
|
-
justify?: "
|
|
2112
|
+
align?: "start" | "center" | "end" | "stretch" | "baseline" | null | undefined;
|
|
2113
|
+
justify?: "between" | "start" | "center" | "end" | "around" | "evenly" | null | undefined;
|
|
2110
2114
|
wrap?: boolean | null | undefined;
|
|
2111
2115
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
2112
2116
|
interface RowProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof rowVariants> {
|
|
@@ -2141,7 +2145,7 @@ declare const Row: React$1.ForwardRefExoticComponent<RowProps & React$1.RefAttri
|
|
|
2141
2145
|
declare const gridVariants: (props?: ({
|
|
2142
2146
|
cols?: "1" | "2" | "3" | "4" | "5" | "6" | "12" | null | undefined;
|
|
2143
2147
|
gap?: "none" | "sm" | "md" | "lg" | "xl" | "xs" | "2xl" | null | undefined;
|
|
2144
|
-
align?: "
|
|
2148
|
+
align?: "start" | "center" | "end" | "stretch" | null | undefined;
|
|
2145
2149
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
2146
2150
|
interface GridProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof gridVariants> {
|
|
2147
2151
|
/** When true, render as the single child element via Radix Slot — lets
|
|
@@ -2173,10 +2177,10 @@ declare const Grid: React$1.ForwardRefExoticComponent<GridProps & React$1.RefAtt
|
|
|
2173
2177
|
* case. Flex is the escape hatch, not the default.
|
|
2174
2178
|
*/
|
|
2175
2179
|
declare const flexVariants: (props?: ({
|
|
2176
|
-
direction?: "
|
|
2180
|
+
direction?: "row" | "col" | "row-reverse" | "col-reverse" | null | undefined;
|
|
2177
2181
|
gap?: "none" | "sm" | "md" | "lg" | "xl" | "xs" | "2xl" | null | undefined;
|
|
2178
|
-
align?: "
|
|
2179
|
-
justify?: "
|
|
2182
|
+
align?: "start" | "center" | "end" | "stretch" | "baseline" | null | undefined;
|
|
2183
|
+
justify?: "between" | "start" | "center" | "end" | "around" | "evenly" | null | undefined;
|
|
2180
2184
|
wrap?: "wrap" | "nowrap" | "wrap-reverse" | null | undefined;
|
|
2181
2185
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
2182
2186
|
interface FlexProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof flexVariants> {
|
|
@@ -2201,7 +2205,7 @@ declare const SelectValue: React$1.ForwardRefExoticComponent<SelectPrimitive.Sel
|
|
|
2201
2205
|
* flows through the Radix portal (it follows the React tree, not the
|
|
2202
2206
|
* DOM), so items styled this way work even though the menu is portaled.
|
|
2203
2207
|
*/
|
|
2204
|
-
type SelectMenuSize = "default" | "sm" | "xs";
|
|
2208
|
+
type SelectMenuSize = "default" | "sm" | "xs" | "2xs";
|
|
2205
2209
|
/**
|
|
2206
2210
|
* Select trigger variants — `size` lets dense surfaces (the
|
|
2207
2211
|
* Studio inspector, settings sheets) reach for a compact `sm`
|
|
@@ -2210,11 +2214,20 @@ type SelectMenuSize = "default" | "sm" | "xs";
|
|
|
2210
2214
|
* existing call site.
|
|
2211
2215
|
*/
|
|
2212
2216
|
declare const selectTriggerVariants: (props?: ({
|
|
2213
|
-
size?: "
|
|
2217
|
+
size?: "sm" | "default" | "xs" | "2xs" | null | undefined;
|
|
2214
2218
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
2215
2219
|
type SelectTriggerSize = NonNullable<VariantProps<typeof selectTriggerVariants>["size"]>;
|
|
2216
2220
|
declare const SelectTrigger: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
2217
2221
|
size?: SelectTriggerSize;
|
|
2222
|
+
/** Adornment rendered inside the trigger on the leading edge — a
|
|
2223
|
+
* property glyph, a unit. Mirrors Input's startSlot. Grouped with
|
|
2224
|
+
* the value in a div (NOT a bare span: the trigger's
|
|
2225
|
+
* `[&>span]:line-clamp-1` would stack a span's children
|
|
2226
|
+
* vertically). */
|
|
2227
|
+
startSlot?: React$1.ReactNode;
|
|
2228
|
+
/** Hide the dropdown chevron — Figma-style token fields keep the
|
|
2229
|
+
* right edge for their own affordances (detach/attach). */
|
|
2230
|
+
chevron?: boolean;
|
|
2218
2231
|
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
2219
2232
|
declare const SelectScrollUpButton: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
2220
2233
|
declare const SelectScrollDownButton: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -2222,7 +2235,12 @@ declare const SelectContent: React$1.ForwardRefExoticComponent<Omit<SelectPrimit
|
|
|
2222
2235
|
size?: SelectMenuSize;
|
|
2223
2236
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
2224
2237
|
declare const SelectLabel: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
2225
|
-
declare const SelectItem: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> &
|
|
2238
|
+
declare const SelectItem: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
2239
|
+
/** Optional right-aligned secondary text (e.g. a token's resolved
|
|
2240
|
+
* value). Rendered in the menu row only — NOT inside ItemText, so
|
|
2241
|
+
* it never mirrors into the trigger via SelectValue. */
|
|
2242
|
+
hint?: React$1.ReactNode;
|
|
2243
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
2226
2244
|
declare const SelectSeparator: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
2227
2245
|
|
|
2228
2246
|
declare const Separator: React$1.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -2233,7 +2251,7 @@ declare const SheetClose: React$1.ForwardRefExoticComponent<DialogPrimitive.Dial
|
|
|
2233
2251
|
declare const SheetPortal: React$1.FC<DialogPrimitive.DialogPortalProps>;
|
|
2234
2252
|
declare const SheetOverlay: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
2235
2253
|
declare const sheetVariants: (props?: ({
|
|
2236
|
-
side?: "
|
|
2254
|
+
side?: "top" | "right" | "bottom" | "left" | null | undefined;
|
|
2237
2255
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
2238
2256
|
interface SheetContentProps extends React$1.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
2239
2257
|
/**
|
|
@@ -2372,8 +2390,8 @@ declare const Sortable: SortableRootComponent;
|
|
|
2372
2390
|
*/
|
|
2373
2391
|
declare const stackVariants: (props?: ({
|
|
2374
2392
|
gap?: "none" | "sm" | "md" | "lg" | "xl" | "xs" | "2xl" | null | undefined;
|
|
2375
|
-
align?: "
|
|
2376
|
-
justify?: "
|
|
2393
|
+
align?: "start" | "center" | "end" | "stretch" | null | undefined;
|
|
2394
|
+
justify?: "between" | "start" | "center" | "end" | "around" | "evenly" | null | undefined;
|
|
2377
2395
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
2378
2396
|
interface StackProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof stackVariants> {
|
|
2379
2397
|
/** When true, render as the single child element via Radix Slot — lets
|
|
@@ -2383,7 +2401,20 @@ interface StackProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProp
|
|
|
2383
2401
|
}
|
|
2384
2402
|
declare const Stack: React$1.ForwardRefExoticComponent<StackProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
2385
2403
|
|
|
2386
|
-
|
|
2404
|
+
/**
|
|
2405
|
+
* Switch — track + thumb scale together via the shared control size
|
|
2406
|
+
* scale. Dimensions stay on Tailwind's spacing scale (no arbitrary
|
|
2407
|
+
* values): thumb travel = trackWidth − thumbWidth − 2×border, which
|
|
2408
|
+
* lands on a clean `translate-x-*` step at each size. `xs`/`sm` are the
|
|
2409
|
+
* dense tool-panel sizes (the Studio inspector).
|
|
2410
|
+
*/
|
|
2411
|
+
declare const switchTrackVariants: (props?: ({
|
|
2412
|
+
size?: "sm" | "default" | "xs" | "2xs" | null | undefined;
|
|
2413
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
2414
|
+
type SwitchSize = NonNullable<VariantProps<typeof switchTrackVariants>["size"]>;
|
|
2415
|
+
declare const Switch: React$1.ForwardRefExoticComponent<Omit<Omit<SwitchPrimitives.SwitchProps & React$1.RefAttributes<HTMLButtonElement>, "ref">, "size"> & {
|
|
2416
|
+
size?: SwitchSize;
|
|
2417
|
+
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
2387
2418
|
|
|
2388
2419
|
declare const Table: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableElement> & React$1.RefAttributes<HTMLTableElement>>;
|
|
2389
2420
|
declare const TableHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
@@ -2506,7 +2537,7 @@ declare const TabsContent: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.
|
|
|
2506
2537
|
* px-3 / text-sm; `sm` and `xs` are for dense tool panels.
|
|
2507
2538
|
*/
|
|
2508
2539
|
declare const textareaVariants: (props?: ({
|
|
2509
|
-
size?: "
|
|
2540
|
+
size?: "sm" | "default" | "xs" | "2xs" | null | undefined;
|
|
2510
2541
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
2511
2542
|
type TextareaSize = NonNullable<VariantProps<typeof textareaVariants>["size"]>;
|
|
2512
2543
|
type TextareaProps = Omit<React$1.ComponentProps<"textarea">, "size"> & {
|
|
@@ -2516,11 +2547,11 @@ declare const Textarea: React$1.ForwardRefExoticComponent<Omit<TextareaProps, "r
|
|
|
2516
2547
|
|
|
2517
2548
|
declare const toggleVariants: (props?: ({
|
|
2518
2549
|
variant?: "default" | "outline" | null | undefined;
|
|
2519
|
-
size?: "
|
|
2550
|
+
size?: "sm" | "lg" | "default" | "xs" | "2xs" | null | undefined;
|
|
2520
2551
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
2521
2552
|
declare const Toggle: React$1.ForwardRefExoticComponent<Omit<TogglePrimitive.ToggleProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
2522
2553
|
variant?: "default" | "outline" | null | undefined;
|
|
2523
|
-
size?: "
|
|
2554
|
+
size?: "sm" | "lg" | "default" | "xs" | "2xs" | null | undefined;
|
|
2524
2555
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
2525
2556
|
|
|
2526
2557
|
declare const TooltipProvider: React$1.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
@@ -2605,7 +2636,7 @@ declare const ToggleGroupItem: React$1.ForwardRefExoticComponent<Omit<ToggleGrou
|
|
|
2605
2636
|
* persistent footer toolbars on mobile-style layouts.
|
|
2606
2637
|
*/
|
|
2607
2638
|
declare const toolbarVariants: (props?: ({
|
|
2608
|
-
position?: "
|
|
2639
|
+
position?: "top" | "bottom" | "inline" | null | undefined;
|
|
2609
2640
|
variant?: "default" | "transparent" | "subtle" | null | undefined;
|
|
2610
2641
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
2611
2642
|
sticky?: boolean | null | undefined;
|
|
@@ -2891,6 +2922,24 @@ declare function useReducedMotion(): boolean;
|
|
|
2891
2922
|
* global `data-motion="off"` toggle, not just the OS query.
|
|
2892
2923
|
*/
|
|
2893
2924
|
declare const usePrefersReducedMotion: typeof useReducedMotion;
|
|
2925
|
+
/**
|
|
2926
|
+
* Returns `true` when the page is actually being watched — the tab is visible
|
|
2927
|
+
* AND (for a top-level document) the window is focused. Inside an iframe the
|
|
2928
|
+
* focus check is skipped, because an iframe rarely "has focus" even when its
|
|
2929
|
+
* tab is frontmost; it falls back to visibility, which correctly tracks the
|
|
2930
|
+
* top tab. Use it to PAUSE autoplay loops when nobody's looking: a movie stops
|
|
2931
|
+
* when you tab away.
|
|
2932
|
+
*
|
|
2933
|
+
* SSR-safe — defaults to `true` and rehydrates in an effect.
|
|
2934
|
+
*
|
|
2935
|
+
* Scope, deliberately: this knows about tab visibility + window focus, NOT
|
|
2936
|
+
* whether the element is scrolled into view (pair it with an
|
|
2937
|
+
* IntersectionObserver — e.g. motion's `useInView` — for that), and NOT
|
|
2938
|
+
* whether a cross-document iframe has scrolled off its PARENT's viewport. An
|
|
2939
|
+
* iframe can't see the parent's scroll; the parent must observe the host and
|
|
2940
|
+
* pause it. See the grid poster/promote policy in STUDIO-CAPTURE.md.
|
|
2941
|
+
*/
|
|
2942
|
+
declare function usePageActive(): boolean;
|
|
2894
2943
|
/**
|
|
2895
2944
|
* Imperatively set the global motion toggle on `<html>`.
|
|
2896
2945
|
*
|
|
@@ -3084,6 +3133,11 @@ declare global {
|
|
|
3084
3133
|
interface Window {
|
|
3085
3134
|
__gradeMediaUrls?: MediaUrlMap;
|
|
3086
3135
|
__gradeMediaOverrides?: MediaOverrideMap;
|
|
3136
|
+
/** Source-keys with a Fill request currently in flight. Stamped by
|
|
3137
|
+
* the sandbox agent on `grade:set-media-pending`; drives the
|
|
3138
|
+
* placeholder's Presence shimmer (gds-aura-shimmer) so slots read
|
|
3139
|
+
* as "being generated" rather than inert while the resolver works. */
|
|
3140
|
+
__gradeMediaPending?: Record<string, true>;
|
|
3087
3141
|
}
|
|
3088
3142
|
}
|
|
3089
3143
|
interface MediaSurfaceProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "children"> {
|
|
@@ -3279,8 +3333,11 @@ interface LogoSources {
|
|
|
3279
3333
|
icon?: LogoVariant;
|
|
3280
3334
|
}
|
|
3281
3335
|
interface LogoProps extends Omit<React$1.HTMLAttributes<HTMLElement>, "children"> {
|
|
3282
|
-
/** The brand artwork. Supply only the slots you have.
|
|
3283
|
-
|
|
3336
|
+
/** The brand artwork. Supply only the slots you have. Optional — with
|
|
3337
|
+
* no artwork at all the neutral placeholder renders, which keeps
|
|
3338
|
+
* layout intact (and keeps a model-emitted bare `<Logo />` from
|
|
3339
|
+
* crashing a Studio preview). */
|
|
3340
|
+
sources?: LogoSources;
|
|
3284
3341
|
/** Which lockup to show. Falls back to another lockup if this one is
|
|
3285
3342
|
* empty. Default `"horizontal"`. */
|
|
3286
3343
|
lockup?: LogoLockup;
|
|
@@ -3305,6 +3362,67 @@ interface LogoProps extends Omit<React$1.HTMLAttributes<HTMLElement>, "children"
|
|
|
3305
3362
|
}
|
|
3306
3363
|
declare const Logo: React$1.ForwardRefExoticComponent<LogoProps & React$1.RefAttributes<HTMLElement>>;
|
|
3307
3364
|
|
|
3365
|
+
/**
|
|
3366
|
+
* ScreenAnimator — wrap any content in a directed camera.
|
|
3367
|
+
*
|
|
3368
|
+
* Give it a list of `shots` (a zoom + focal point + dwell) and it tours them:
|
|
3369
|
+
* flies in from offscreen, eases between shots, settles back to the start,
|
|
3370
|
+
* exits, and loops, with a focus spotlight, a synthetic cursor, captions, and
|
|
3371
|
+
* a play/pause/restart transport. The content stays live and interactive
|
|
3372
|
+
* underneath; the camera just directs the eye. It works around ANY children,
|
|
3373
|
+
* a dashboard, an app shell, a single card.
|
|
3374
|
+
*
|
|
3375
|
+
* It's the reusable form of the camera in the embed (`useCameraTimeline` /
|
|
3376
|
+
* `ZoomPan`) and the `camera-tour` scaffold — see STUDIO-DIRECTOR.md. Honours
|
|
3377
|
+
* reduced motion (settles on the starter frame, no movement).
|
|
3378
|
+
*/
|
|
3379
|
+
interface ScreenAnimatorShot {
|
|
3380
|
+
/** Magnification (1 = fit). >1 pushes in. */
|
|
3381
|
+
zoom?: number;
|
|
3382
|
+
/** Focal point as fractions of the content (0..1). Defaults to centre. */
|
|
3383
|
+
cx?: number;
|
|
3384
|
+
cy?: number;
|
|
3385
|
+
/** Milliseconds to dwell on this shot. */
|
|
3386
|
+
hold?: number;
|
|
3387
|
+
/** Milliseconds to glide INTO this shot from the previous one. */
|
|
3388
|
+
trans?: number;
|
|
3389
|
+
/** Caption shown while on this shot. */
|
|
3390
|
+
label?: string;
|
|
3391
|
+
}
|
|
3392
|
+
interface ScreenAnimatorProps {
|
|
3393
|
+
/** The shot list. Omit (or one shot) for a static framed view. */
|
|
3394
|
+
shots?: ScreenAnimatorShot[];
|
|
3395
|
+
/** Start playing on mount. Default true. */
|
|
3396
|
+
autoplay?: boolean;
|
|
3397
|
+
/** Loop the tour (fly in → shots → back to start → exit → repeat). Default true. */
|
|
3398
|
+
loop?: boolean;
|
|
3399
|
+
/** Cap the number of loop cycles, then settle and stop — a demo is a movie,
|
|
3400
|
+
* it shouldn't spin forever. Default Infinity (loops while watched). Set a
|
|
3401
|
+
* small number for grid/embed contexts so it ends. */
|
|
3402
|
+
maxLoops?: number;
|
|
3403
|
+
/** Show the play / pause / restart transport. Default true. */
|
|
3404
|
+
controls?: boolean;
|
|
3405
|
+
/** Dim the edges when pushed in (focus vignette). Default false — opt in. */
|
|
3406
|
+
spotlight?: boolean;
|
|
3407
|
+
/** Render the synthetic cursor pulse on detail shots. Default true. */
|
|
3408
|
+
cursor?: boolean;
|
|
3409
|
+
/** Fly in from offscreen on start (and exit on loop). Default true. */
|
|
3410
|
+
enter?: boolean;
|
|
3411
|
+
/** Where the caption sits over the frame. Default "bottom". */
|
|
3412
|
+
captionPosition?: "top" | "bottom";
|
|
3413
|
+
/** Background of the stage the content sits on while it's small (fly in/out).
|
|
3414
|
+
* A CSS background string. Default a dark cinematic stage. */
|
|
3415
|
+
stage?: string;
|
|
3416
|
+
/** A live backdrop rendered BEHIND the content, filling the stage — an
|
|
3417
|
+
* image, a gradient, or a `<ThreeScene>` shader. Shows around the screen
|
|
3418
|
+
* while it's small (fly in/out) and behind any padding. */
|
|
3419
|
+
backdrop?: React$1.ReactNode;
|
|
3420
|
+
className?: string;
|
|
3421
|
+
style?: React$1.CSSProperties;
|
|
3422
|
+
children: React$1.ReactNode;
|
|
3423
|
+
}
|
|
3424
|
+
declare function ScreenAnimator({ shots, autoplay, loop, maxLoops, controls, spotlight, cursor, enter, captionPosition, stage, backdrop, className, style, children, }: ScreenAnimatorProps): React$1.JSX.Element;
|
|
3425
|
+
|
|
3308
3426
|
/**
|
|
3309
3427
|
* Control schema — the canonical, UI-agnostic descriptor for a shader's
|
|
3310
3428
|
* (or effect layer's) tweakable parameters. Shared by base demos AND the
|
|
@@ -3639,12 +3757,19 @@ interface BackgroundFillProps {
|
|
|
3639
3757
|
type: BackgroundFillType;
|
|
3640
3758
|
/** Token name (`primary`, `card`, …) or any CSS colour. */
|
|
3641
3759
|
color?: string;
|
|
3642
|
-
/** Gradient stops — token names or CSS colours.
|
|
3760
|
+
/** Gradient stops — token names or CSS colours. `shape: "radial"`
|
|
3761
|
+
* swaps the linear paint for a radial wash (the classic "soft glow
|
|
3762
|
+
* behind the hero"); `at` positions its centre, `size` fixes the
|
|
3763
|
+
* ellipse (e.g. "45rem 50rem" — defaults to farthest-corner).
|
|
3764
|
+
* `angle` is linear-only; `at`/`size` are radial-only. */
|
|
3643
3765
|
gradient?: {
|
|
3644
3766
|
from?: string;
|
|
3645
3767
|
via?: string;
|
|
3646
3768
|
to?: string;
|
|
3647
3769
|
angle?: number;
|
|
3770
|
+
shape?: "linear" | "radial";
|
|
3771
|
+
at?: string;
|
|
3772
|
+
size?: string;
|
|
3648
3773
|
};
|
|
3649
3774
|
/** Image or video URL. */
|
|
3650
3775
|
src?: string;
|
|
@@ -4292,4 +4417,4 @@ declare function GradeModeSwitcher({ className, variant }: GradeModeSwitcherProp
|
|
|
4292
4417
|
*/
|
|
4293
4418
|
declare function ThemeToggle(): React$1.JSX.Element;
|
|
4294
4419
|
|
|
4295
|
-
export { ALL_MODES, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AppShell, AppShellAside, type AppShellAsideProps, AppShellFooter, type AppShellFooterProps, AppShellHeader, type AppShellHeaderProps, AppShellMain, type AppShellMainProps, AppShellNav, type AppShellNavProps, type AppShellProps, Avatar, AvatarFallback, AvatarImage, type AvatarTone, BUILT_IN_INPUTS, BackgroundFill, type BackgroundFillFit, type BackgroundFillProps, type BackgroundFillType, Badge, Banner, type BannerProps, type BaseMediaProps, BlinkingCursor, type BlinkingCursorProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, type BreadcrumbMenuItem, BreadcrumbMenuTrigger, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonShape, COMPONENT_CONTRACTS, Calendar, CalendarDayButton, Callout, CalloutDescription, CalloutTitle, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardStyle, CardTitle, Carousel, CarouselArrows, type CarouselArrowsProps, type AutoplayConfig as CarouselAutoplayConfig, CarouselDots, type CarouselDotsProps, type CarouselNavButtonProps, CarouselNext, CarouselPrev, type CarouselProps, CarouselSlide, type CarouselSlideProps, CarouselVideoSlide, type CarouselVideoSlideProps, type ChartPalette, Checkbox, CheckboxCard, type CheckboxCardProps, Code, type CodeDiff, type CodeLanguage, type CodeProps, type CodeReveal, type CodeTrigger, type ColorIntensity, Composer, type ComposerAttachment, type ComposerAttachmentConfig, type ComposerContent, type ComposerFormat, type ComposerHandle, type ComposerMentionItem, type ComposerProps, ComposerReply, type ComposerStep, type ComposerTriggerConfig, DEMO_SPEED_PRESETS, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, type DemoSpeed, DemoStage, type DemoStageProps, type DemoTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FILL_TOKENS, FRAGMENT_HEADER, Field, FieldDescription, FieldLabel, type FieldProps, FieldTrailing, FillPicker, type FillPickerProps, type FillValue, Flex, type FlexProps, type FontKey, GRADE_PRE_HYDRATION_SCRIPT, type GeneratedTheme, GradeModeSwitcher, GradeThemeProvider, type GradeThemeProviderProps, GradeThemeSwitcher, Grid, type GridProps, Input, type InputStyle, Label, LenisProvider, Logo, type LogoLockup, type LogoMode, type LogoProps, type LogoSize, type LogoSources, type LogoVariant, MOTION_ATTR, Map, MapHandle, MapMarker, MapMarkerProps, MapProps, type MediaAspect, type MediaRadius, MediaSurface, MediaSurfaceContract, type MediaSurfaceProps, Message, type MessageProps, type ModeName, MultiSelect, type MultiSelectOption, type MultiSelectProps, type OKLCHTriplet, type Palette, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, type PostPreset, Progress, RadioCard, type RadioCardProps, RadioGroup, RadioGroupItem, type RadiusStyle, type Ramp, ResizableHandle, ResizablePanel, ResizablePanelGroup, Reveal, type RevealAnimation, type RevealProps, type RevealStep, RivePlayer, type RivePlayerProps, Row, type RowProps, type SceneContext, type SceneFactory, type SceneHandle, type ScriptedDemoContext, type ScriptedDemoState, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, ShaderCompileError, ShaderControls, type ShaderControlsProps, type ShaderPreset, ShaderPresetPicker, type ShaderPresetPickerProps, ShaderPresetPreview, type ShaderPresetPreviewProps, type ShadowIntensity, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, type SidebarContentProps, SidebarFooter, type SidebarFooterProps, SidebarHeader, type SidebarHeaderProps, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, type SidebarSectionProps, SidebarTreeItem, type SidebarTreeItemProps, Skeleton, Slider, Sortable, SortableGroup, type SortableGroupProps, SortableHandle, type SortableHandleProps, SortableItem, type SortableItemProps, type SortableProps, type SpacingDensity, Stack, type StackProps, Switch, SwitchCard, type SwitchCardProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type ThemeInput, ThemeToggle, ThreeScene, type ThreeSceneProps, Toggle, ToggleGroup, ToggleGroupItem, Toolbar, type ToolbarProps, ToolbarSlot, type ToolbarSlotProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TypeScalePreset, type UseScriptedDemoOptions, VideoPlayer, type VideoPlayerProps, asideVariants as appShellAsideVariants, footerVariants as appShellFooterVariants, headerVariants as appShellHeaderVariants, mainVariants as appShellMainVariants, navVariants as appShellNavVariants, applyThemeToRoot, badgeVariants, bannerVariants, buildFragmentShaderScene, builtInThemes, buttonVariants, calloutVariants, calmInput, cn, defaultPostPreset, defaultThemeId, deleteUserTheme, sleep as demoSleep, typeText as demoTypeText, duplicateTheme, energyInput, flexVariants, generateTheme, getComponentContract, getTheme, gridVariants, listContractedComponents, listThemes, listUserThemes, loadUserThemeInput, postPresets, rowVariants, saveUserTheme, sceneRegistry, setMotion, shaderPresetById, shaderPresets, shellVariants, stackVariants, themeToCSSVars, toggleVariants, useCarouselApi, useGradeTheme, useMaybeGradeTheme, usePrefersReducedMotion, useReducedMotion, useScriptedDemo };
|
|
4420
|
+
export { ALL_MODES, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AppShell, AppShellAside, type AppShellAsideProps, AppShellFooter, type AppShellFooterProps, AppShellHeader, type AppShellHeaderProps, AppShellMain, type AppShellMainProps, AppShellNav, type AppShellNavProps, type AppShellProps, Avatar, AvatarFallback, AvatarImage, type AvatarTone, BUILT_IN_INPUTS, BackgroundFill, type BackgroundFillFit, type BackgroundFillProps, type BackgroundFillType, Badge, Banner, type BannerProps, type BaseMediaProps, BlinkingCursor, type BlinkingCursorProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, type BreadcrumbMenuItem, BreadcrumbMenuTrigger, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonShape, COMPONENT_CONTRACTS, Calendar, CalendarDayButton, Callout, CalloutDescription, CalloutTitle, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardStyle, CardTitle, Carousel, CarouselArrows, type CarouselArrowsProps, type AutoplayConfig as CarouselAutoplayConfig, CarouselDots, type CarouselDotsProps, type CarouselNavButtonProps, CarouselNext, CarouselPrev, type CarouselProps, CarouselSlide, type CarouselSlideProps, CarouselVideoSlide, type CarouselVideoSlideProps, type ChartPalette, Checkbox, CheckboxCard, type CheckboxCardProps, Code, type CodeDiff, type CodeLanguage, type CodeProps, type CodeReveal, type CodeTrigger, type ColorIntensity, Composer, type ComposerAttachment, type ComposerAttachmentConfig, type ComposerContent, type ComposerFormat, type ComposerHandle, type ComposerMentionItem, type ComposerProps, ComposerReply, type ComposerStep, type ComposerTriggerConfig, DEMO_SPEED_PRESETS, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, type DemoSpeed, DemoStage, type DemoStageProps, type DemoTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FILL_TOKENS, FRAGMENT_HEADER, Field, FieldDescription, FieldLabel, type FieldProps, FieldTrailing, FillPicker, type FillPickerProps, type FillValue, Flex, type FlexProps, type FontKey, GRADE_PRE_HYDRATION_SCRIPT, type GeneratedTheme, GradeModeSwitcher, GradeThemeProvider, type GradeThemeProviderProps, GradeThemeSwitcher, Grid, type GridProps, Input, type InputStyle, Label, LenisProvider, Logo, type LogoLockup, type LogoMode, type LogoProps, type LogoSize, type LogoSources, type LogoVariant, MOTION_ATTR, Map, MapHandle, MapMarker, MapMarkerProps, MapProps, type MediaAspect, type MediaRadius, MediaSurface, MediaSurfaceContract, type MediaSurfaceProps, Message, type MessageProps, type ModeName, MultiSelect, type MultiSelectOption, type MultiSelectProps, type OKLCHTriplet, type Palette, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, type PostPreset, Progress, RadioCard, type RadioCardProps, RadioGroup, RadioGroupItem, type RadiusStyle, type Ramp, ResizableHandle, ResizablePanel, ResizablePanelGroup, Reveal, type RevealAnimation, type RevealProps, type RevealStep, RivePlayer, type RivePlayerProps, Row, type RowProps, type SceneContext, type SceneFactory, type SceneHandle, ScreenAnimator, type ScreenAnimatorProps, type ScreenAnimatorShot, type ScriptedDemoContext, type ScriptedDemoState, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, ShaderCompileError, ShaderControls, type ShaderControlsProps, type ShaderPreset, ShaderPresetPicker, type ShaderPresetPickerProps, ShaderPresetPreview, type ShaderPresetPreviewProps, type ShadowIntensity, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, type SidebarContentProps, SidebarFooter, type SidebarFooterProps, SidebarHeader, type SidebarHeaderProps, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, type SidebarSectionProps, SidebarTreeItem, type SidebarTreeItemProps, Skeleton, Slider, Sortable, SortableGroup, type SortableGroupProps, SortableHandle, type SortableHandleProps, SortableItem, type SortableItemProps, type SortableProps, type SpacingDensity, Stack, type StackProps, Switch, SwitchCard, type SwitchCardProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type ThemeInput, ThemeToggle, ThreeScene, type ThreeSceneProps, Toggle, ToggleGroup, ToggleGroupItem, Toolbar, type ToolbarProps, ToolbarSlot, type ToolbarSlotProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TypeScalePreset, type UseScriptedDemoOptions, VideoPlayer, type VideoPlayerProps, asideVariants as appShellAsideVariants, footerVariants as appShellFooterVariants, headerVariants as appShellHeaderVariants, mainVariants as appShellMainVariants, navVariants as appShellNavVariants, applyThemeToRoot, badgeVariants, bannerVariants, buildFragmentShaderScene, builtInThemes, buttonVariants, calloutVariants, calmInput, cn, defaultPostPreset, defaultThemeId, deleteUserTheme, sleep as demoSleep, typeText as demoTypeText, duplicateTheme, energyInput, flexVariants, generateTheme, getComponentContract, getTheme, gridVariants, listContractedComponents, listThemes, listUserThemes, loadUserThemeInput, postPresets, rowVariants, saveUserTheme, sceneRegistry, setMotion, shaderPresetById, shaderPresets, shellVariants, stackVariants, themeToCSSVars, toggleVariants, useCarouselApi, useGradeTheme, useMaybeGradeTheme, usePageActive, usePrefersReducedMotion, useReducedMotion, useScriptedDemo };
|