@gradeui/ui 1.2.0 → 1.3.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/index.d.mts CHANGED
@@ -9,6 +9,8 @@ import * as AvatarPrimitive from '@radix-ui/react-avatar';
9
9
  import { DayPicker, DayButton, DateRange } from 'react-day-picker';
10
10
  import { UseEmblaCarouselType } from 'embla-carousel-react';
11
11
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
12
+ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
13
+ import * as SwitchPrimitives from '@radix-ui/react-switch';
12
14
  import { Language } from 'prism-react-renderer';
13
15
  import { LexicalEditor } from 'lexical';
14
16
  import * as DialogPrimitive from '@radix-ui/react-dialog';
@@ -16,14 +18,12 @@ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
16
18
  import * as LabelPrimitive from '@radix-ui/react-label';
17
19
  import * as PopoverPrimitive from '@radix-ui/react-popover';
18
20
  import * as ProgressPrimitive from '@radix-ui/react-progress';
19
- import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
20
21
  import * as ResizablePrimitive from 'react-resizable-panels';
21
22
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
22
23
  import * as SelectPrimitive from '@radix-ui/react-select';
23
24
  import * as SeparatorPrimitive from '@radix-ui/react-separator';
24
25
  import * as SliderPrimitive from '@radix-ui/react-slider';
25
26
  import { UniqueIdentifier } from '@dnd-kit/core';
26
- import * as SwitchPrimitives from '@radix-ui/react-switch';
27
27
  import * as TabsPrimitive from '@radix-ui/react-tabs';
28
28
  import * as TogglePrimitive from '@radix-ui/react-toggle';
29
29
  import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
@@ -48,6 +48,7 @@ declare const MediaSurfaceContract: _gradeui_contracts.ComponentContract<{
48
48
  hint: {
49
49
  schema: z.ZodOptional<z.ZodEnum<["album", "tv-show", "movie", "game", "book", "portrait", "landscape", "poster", "product", "food", "video", "audio", "embed", "3d", "generic"]>>;
50
50
  design: "knob";
51
+ group: string;
51
52
  control: "glyph-picker";
52
53
  label: string;
53
54
  description: string;
@@ -93,6 +94,7 @@ declare const MediaSurfaceContract: _gradeui_contracts.ComponentContract<{
93
94
  alt: {
94
95
  schema: z.ZodOptional<z.ZodString>;
95
96
  design: "content";
97
+ group: string;
96
98
  control: "text";
97
99
  label: string;
98
100
  description: string;
@@ -101,6 +103,7 @@ declare const MediaSurfaceContract: _gradeui_contracts.ComponentContract<{
101
103
  src: {
102
104
  schema: z.ZodOptional<z.ZodString>;
103
105
  design: "content";
106
+ group: string;
104
107
  control: "url";
105
108
  label: string;
106
109
  description: string;
@@ -486,7 +489,7 @@ declare const AppShellFooter: React$1.ForwardRefExoticComponent<AppShellFooterPr
486
489
  * directly still works and overrides the variant defaults.
487
490
  */
488
491
  declare const avatarSizes: (props?: ({
489
- size?: "sm" | "md" | "lg" | "xs" | "xl" | null | undefined;
492
+ size?: "sm" | "md" | "lg" | "xl" | "xs" | null | undefined;
490
493
  } & class_variance_authority_types.ClassProp) | undefined) => string;
491
494
  interface AvatarProps extends React$1.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>, VariantProps<typeof avatarSizes> {
492
495
  }
@@ -495,6 +498,7 @@ declare const AvatarImage: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitiv
495
498
  declare const avatarFallbackTones: (props?: ({
496
499
  tone?: "muted" | "primary" | "violet" | "amber" | "emerald" | "sky" | "rose" | "plum" | "lime" | null | undefined;
497
500
  } & class_variance_authority_types.ClassProp) | undefined) => string;
501
+ type AvatarTone = NonNullable<VariantProps<typeof avatarFallbackTones>["tone"]>;
498
502
  interface AvatarFallbackProps extends React$1.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>, VariantProps<typeof avatarFallbackTones> {
499
503
  }
500
504
  declare const AvatarFallback: React$1.ForwardRefExoticComponent<AvatarFallbackProps & React$1.RefAttributes<HTMLSpanElement>>;
@@ -624,7 +628,7 @@ declare const Banner: React$1.ForwardRefExoticComponent<BannerProps & React$1.Re
624
628
  */
625
629
  declare const buttonVariants: (props?: ({
626
630
  variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | "raised" | null | undefined;
627
- size?: "default" | "icon" | "sm" | "md" | "lg" | null | undefined;
631
+ size?: "default" | "sm" | "md" | "lg" | "icon" | "xs" | null | undefined;
628
632
  } & class_variance_authority_types.ClassProp) | undefined) => string;
629
633
  interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
630
634
  asChild?: boolean;
@@ -799,6 +803,107 @@ declare const CardFooter: React$1.ForwardRefExoticComponent<React$1.HTMLAttribut
799
803
 
800
804
  declare const Checkbox: React$1.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
801
805
 
806
+ /**
807
+ * Field — the inline composition primitive for a control + its caption.
808
+ *
809
+ * Pairs a bare control (Checkbox / RadioGroupItem / Switch) with a label,
810
+ * an optional description, and an optional trailing slot — and wires the
811
+ * accessibility plumbing for you:
812
+ *
813
+ * - generates one id, hands it to the control, and points the label's
814
+ * `htmlFor` at it (click-the-label-to-toggle for free)
815
+ * - if a <Field.Description> is present, links it via `aria-describedby`
816
+ *
817
+ * The control stays a bare primitive — Field clones it to inject the id +
818
+ * aria wiring, so Checkbox/Radio/Switch never grow a `description` prop.
819
+ *
820
+ * <Field>
821
+ * <Checkbox value="terms" />
822
+ * <Field.Label>Accept terms</Field.Label>
823
+ * <Field.Description>You agree to the privacy policy.</Field.Description>
824
+ * <Field.Trailing><Badge>New</Badge></Field.Trailing>
825
+ * </Field>
826
+ *
827
+ * Two layouts:
828
+ * - `option` (default) — control leads, text stacks beside it. The
829
+ * checkbox/radio-with-label case. Top-aligned for two lines.
830
+ * - `setting` — text leads, control pinned trailing. The classic
831
+ * settings row (label + description on the left, Switch right).
832
+ *
833
+ * For a selectable *card* (the whole surface is the control), reach for
834
+ * RadioCard / CheckboxCard / SwitchCard instead — see `selection-card.tsx`.
835
+ */
836
+ type FieldLayout = "option" | "setting";
837
+ declare const FieldLabel: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & React$1.RefAttributes<HTMLLabelElement>>;
838
+ declare const FieldDescription: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
839
+ declare const FieldTrailing: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
840
+ interface FieldProps extends React$1.HTMLAttributes<HTMLDivElement> {
841
+ /** `option` (control leads) or `setting` (text leads, control trailing). */
842
+ layout?: FieldLayout;
843
+ }
844
+ declare const Field: React$1.ForwardRefExoticComponent<FieldProps & React$1.RefAttributes<HTMLDivElement>> & {
845
+ Label: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & React$1.RefAttributes<HTMLLabelElement>>;
846
+ Description: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
847
+ Trailing: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
848
+ };
849
+
850
+ /**
851
+ * Selection cards — RadioCard / CheckboxCard / SwitchCard.
852
+ *
853
+ * The whole card IS the control. RadioCard renders as a
854
+ * `RadioGroupPrimitive.Item`, CheckboxCard as a `CheckboxPrimitive.Root`,
855
+ * SwitchCard as a `SwitchPrimitives.Root` — so focus, hover, and the
856
+ * checked state all live on the parent surface, and the entire card is the
857
+ * hit target. The small glyph (dot / check / switch) is just a visual
858
+ * indicator; it differs by type on purpose, because that's how someone
859
+ * reads single-select vs multi-select vs toggle at a glance.
860
+ *
861
+ * All three share ONE surface (`.gds-selection-card`) so they look identical
862
+ * sitting together. Every visual is token-driven (`--gds-selection-card-*`
863
+ * with semantic fallbacks), so a project can re-skin the cards through the
864
+ * per-project override layer without forking the component.
865
+ *
866
+ * <RadioGroup defaultValue="standard" className="grid gap-3">
867
+ * <RadioCard value="standard" label="Standard" description="4–10 business days" />
868
+ * <RadioCard value="fast" label="Fast" description="2–5 business days" />
869
+ * <RadioCard value="next-day" label="Next day" description="1 business day" />
870
+ * </RadioGroup>
871
+ *
872
+ * IMPORTANT — interactive content. Because the card is itself a control
873
+ * (a `role=radio`/`checkbox`/`switch` button), you must NOT nest other
874
+ * interactive elements (Slider, Input, Button, links) inside it. Put only
875
+ * static content here (text, images, badges). If a card needs its own
876
+ * controls, use a plain `Card` containing a `Field` row + the control as
877
+ * siblings instead.
878
+ */
879
+ type IndicatorPosition = "leading" | "trailing";
880
+ interface SelectionCardOwnProps {
881
+ /** Title line. Omit and pass `children` for fully custom content. */
882
+ label?: React$1.ReactNode;
883
+ /** Secondary line under the label. */
884
+ description?: React$1.ReactNode;
885
+ /** Optional slot rendered between the content and the indicator
886
+ * (a Badge, price, kbd hint, …). */
887
+ aside?: React$1.ReactNode;
888
+ /** Hide the dot/check/switch glyph — selection is then conveyed purely by
889
+ * the card's selected border + background. Semantics stay intact. */
890
+ hideIndicator?: boolean;
891
+ /** Which side the indicator sits on. Default `trailing`. */
892
+ indicatorPosition?: IndicatorPosition;
893
+ }
894
+ interface RadioCardProps extends Omit<React$1.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>, "children">, SelectionCardOwnProps {
895
+ children?: React$1.ReactNode;
896
+ }
897
+ declare const RadioCard: React$1.ForwardRefExoticComponent<RadioCardProps & React$1.RefAttributes<HTMLButtonElement>>;
898
+ interface CheckboxCardProps extends Omit<React$1.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, "children">, SelectionCardOwnProps {
899
+ children?: React$1.ReactNode;
900
+ }
901
+ declare const CheckboxCard: React$1.ForwardRefExoticComponent<CheckboxCardProps & React$1.RefAttributes<HTMLButtonElement>>;
902
+ interface SwitchCardProps extends Omit<React$1.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>, "children">, SelectionCardOwnProps {
903
+ children?: React$1.ReactNode;
904
+ }
905
+ declare const SwitchCard: React$1.ForwardRefExoticComponent<SwitchCardProps & React$1.RefAttributes<HTMLButtonElement>>;
906
+
802
907
  /**
803
908
  * Code — syntax-highlighted code surface with diff, line-emphasis, and
804
909
  * reveal animation modes. Designed for marketing heroes ("diff hero"),
@@ -1068,6 +1173,15 @@ interface MessageProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "tit
1068
1173
  * "your messages" in DM threads.
1069
1174
  */
1070
1175
  align?: "start" | "end";
1176
+ /**
1177
+ * Row rhythm. `default` is the canonical chat / channel-feed shape.
1178
+ * `compact` tightens text sizes + gaps for dense side-panel use
1179
+ * (Studio comments tab, activity feeds, notification rows where many
1180
+ * rows stack vertically and the surface is narrow). Avatar size is
1181
+ * still consumer-controlled — pair `density="compact"` with
1182
+ * `Avatar size="xs"` for the tightest rhythm.
1183
+ */
1184
+ density?: "default" | "compact";
1071
1185
  /**
1072
1186
  * Body content (the message text). Accepts any node so consumers
1073
1187
  * can embed rich content — Markdown-rendered prose, images,
@@ -1162,23 +1276,38 @@ declare function typeText(text: string, onTick: (partial: string) => void, stagg
1162
1276
  * (mount / inView / manual), loop, pre-delay, completion signal, and
1163
1277
  * the imperative play() / stop() API.
1164
1278
  *
1279
+ * Reduced motion: this hook is the declarative-motion layer's accessibility
1280
+ * boundary. When the OS reports `prefers-reduced-motion: reduce` OR the
1281
+ * global `data-motion="off"` toggle is set (both via `useReducedMotion`),
1282
+ * the runner settles on the FINAL frame instead of animating — zeroed
1283
+ * timings run every step instantly and the sequence never loops, so the
1284
+ * end state shows and holds. That keeps lib/demo honouring the same motion
1285
+ * control as ThreeScene and the CSS reset; without it, a screen built with
1286
+ * <Code> would keep typing under reduced motion and would not be accessible.
1287
+ *
1165
1288
  * Authoring guide for `interpret`:
1166
1289
  * - `await sleep(ms, ctx.signal)` for any pause so stop() can short
1167
1290
  * a long wait cleanly.
1168
1291
  * - `await typeText(text, onTick, stagger, ctx.signal)` for typing
1169
- * loops, again so stop() interrupts mid-character.
1292
+ * loops, again so stop() interrupts mid-character. A non-positive
1293
+ * stagger (what the reduced-motion preset supplies) emits the whole
1294
+ * string in one tick, so the final state shows with no animation.
1170
1295
  * - Read `ctx.speed` to grab the resolved DEMO_SPEED_PRESETS entry
1171
1296
  * when a step doesn't pin its own cadence.
1172
1297
  * - Throw nothing on cancel — the helpers do it for you. Anything
1173
1298
  * else thrown is treated as a real bug and bubbles to the console.
1174
1299
  */
1175
1300
  interface ScriptedDemoContext {
1176
- /** Resolved speed preset for the current run. */
1301
+ /** Resolved speed preset for the current run. Zeroed under reduced motion. */
1177
1302
  speed: (typeof DEMO_SPEED_PRESETS)[DemoSpeed];
1178
1303
  /** AbortSignal that fires on stop() / unmount / steps change. */
1179
1304
  signal: AbortSignal;
1180
1305
  /** Live cancellation check for code paths that can't take a signal. */
1181
1306
  cancelled: () => boolean;
1307
+ /** True when the run is in reduced-motion mode (settling, not animating).
1308
+ * Most interpreters don't need this — zeroed timings handle it — but a
1309
+ * step that does something non-timing-based (confetti, sound) can skip it. */
1310
+ reduced: boolean;
1182
1311
  }
1183
1312
  interface UseScriptedDemoOptions<TStep> {
1184
1313
  /** The steps to run. Undefined or empty means "no script". */
@@ -1713,6 +1842,15 @@ declare const DialogDescription: React$1.ForwardRefExoticComponent<Omit<DialogPr
1713
1842
 
1714
1843
  declare const DropdownMenu: React$1.FC<DropdownMenuPrimitive.DropdownMenuProps>;
1715
1844
  declare const DropdownMenuTrigger: React$1.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
1845
+ /**
1846
+ * Menu density. Set `size` on `<DropdownMenuContent>` (or
1847
+ * `<DropdownMenuSubContent>`) and every item inside — Item, Checkbox,
1848
+ * Radio, SubTrigger, Label — picks up matching padding / text-size via
1849
+ * context (which flows through the Radix portal). Mirrors Select so a
1850
+ * compact trigger can have an equally compact menu. `xs` is the
1851
+ * tool-panel density (the Studio inspector).
1852
+ */
1853
+ type DropdownMenuSize = "default" | "sm" | "xs";
1716
1854
  declare const DropdownMenuGroup: React$1.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React$1.RefAttributes<HTMLDivElement>>;
1717
1855
  declare const DropdownMenuPortal: React$1.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
1718
1856
  declare const DropdownMenuSub: React$1.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
@@ -1723,6 +1861,8 @@ declare const DropdownMenuSubTrigger: React$1.ForwardRefExoticComponent<Omit<Dro
1723
1861
  interface DropdownMenuSubContentProps extends React$1.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent> {
1724
1862
  /** What the submenu surface is *made of*. See dropdown-menu.md. */
1725
1863
  surface?: Surface;
1864
+ /** Menu density — cascades to items via context. */
1865
+ size?: DropdownMenuSize;
1726
1866
  }
1727
1867
  declare const DropdownMenuSubContent: React$1.ForwardRefExoticComponent<DropdownMenuSubContentProps & React$1.RefAttributes<HTMLDivElement>>;
1728
1868
  interface DropdownMenuContentProps extends React$1.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> {
@@ -1732,6 +1872,8 @@ interface DropdownMenuContentProps extends React$1.ComponentPropsWithoutRef<type
1732
1872
  * floating over rich canvases. See dropdown-menu.md.
1733
1873
  */
1734
1874
  surface?: Surface;
1875
+ /** Menu density — cascades to items via context. */
1876
+ size?: DropdownMenuSize;
1735
1877
  }
1736
1878
  declare const DropdownMenuContent: React$1.ForwardRefExoticComponent<DropdownMenuContentProps & React$1.RefAttributes<HTMLDivElement>>;
1737
1879
  declare const DropdownMenuItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
@@ -1761,15 +1903,26 @@ declare const DropdownMenuShortcut: {
1761
1903
  * rationale.
1762
1904
  */
1763
1905
  declare const inputVariants: (props?: ({
1764
- size?: "default" | "sm" | null | undefined;
1906
+ size?: "default" | "sm" | "xs" | null | undefined;
1765
1907
  } & class_variance_authority_types.ClassProp) | undefined) => string;
1766
1908
  type InputSize = NonNullable<VariantProps<typeof inputVariants>["size"]>;
1767
1909
  type InputProps = Omit<React$1.ComponentProps<"input">, "size"> & {
1768
1910
  size?: InputSize;
1911
+ /** Adornment rendered inside the field on the leading edge — an icon,
1912
+ * a unit, a prefix. Non-interactive by default (clicks pass through
1913
+ * to focus the input); pass an element with its own pointer-events
1914
+ * if you need it clickable. */
1915
+ startSlot?: React$1.ReactNode;
1916
+ /** Adornment rendered inside the field on the trailing edge — a unit
1917
+ * ("px"), a clear button, a stepper. Same pointer rules as
1918
+ * `startSlot`. */
1919
+ endSlot?: React$1.ReactNode;
1769
1920
  };
1770
1921
  declare const Input: React$1.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
1771
1922
 
1772
- declare const Label: React$1.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React$1.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: class_variance_authority_types.ClassProp | undefined) => string> & React$1.RefAttributes<HTMLLabelElement>>;
1923
+ declare const Label: React$1.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React$1.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: ({
1924
+ size?: "default" | "sm" | "xs" | null | undefined;
1925
+ } & class_variance_authority_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLLabelElement>>;
1773
1926
 
1774
1927
  declare const Popover: React$1.FC<PopoverPrimitive.PopoverProps>;
1775
1928
  declare const PopoverTrigger: React$1.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
@@ -1951,7 +2104,7 @@ declare const ResizableHandle: ({ withHandle, className, ...props }: React$1.Com
1951
2104
  * etc.) and is a separate primitive.
1952
2105
  */
1953
2106
  declare const rowVariants: (props?: ({
1954
- gap?: "none" | "sm" | "md" | "lg" | "xs" | "xl" | "2xl" | null | undefined;
2107
+ gap?: "none" | "sm" | "md" | "lg" | "xl" | "xs" | "2xl" | null | undefined;
1955
2108
  align?: "center" | "start" | "end" | "stretch" | "baseline" | null | undefined;
1956
2109
  justify?: "center" | "start" | "between" | "end" | "around" | "evenly" | null | undefined;
1957
2110
  wrap?: boolean | null | undefined;
@@ -1987,7 +2140,7 @@ declare const Row: React$1.ForwardRefExoticComponent<RowProps & React$1.RefAttri
1987
2140
  */
1988
2141
  declare const gridVariants: (props?: ({
1989
2142
  cols?: "1" | "2" | "3" | "4" | "5" | "6" | "12" | null | undefined;
1990
- gap?: "none" | "sm" | "md" | "lg" | "xs" | "xl" | "2xl" | null | undefined;
2143
+ gap?: "none" | "sm" | "md" | "lg" | "xl" | "xs" | "2xl" | null | undefined;
1991
2144
  align?: "center" | "start" | "end" | "stretch" | null | undefined;
1992
2145
  } & class_variance_authority_types.ClassProp) | undefined) => string;
1993
2146
  interface GridProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof gridVariants> {
@@ -2021,7 +2174,7 @@ declare const Grid: React$1.ForwardRefExoticComponent<GridProps & React$1.RefAtt
2021
2174
  */
2022
2175
  declare const flexVariants: (props?: ({
2023
2176
  direction?: "col" | "row" | "row-reverse" | "col-reverse" | null | undefined;
2024
- gap?: "none" | "sm" | "md" | "lg" | "xs" | "xl" | "2xl" | null | undefined;
2177
+ gap?: "none" | "sm" | "md" | "lg" | "xl" | "xs" | "2xl" | null | undefined;
2025
2178
  align?: "center" | "start" | "end" | "stretch" | "baseline" | null | undefined;
2026
2179
  justify?: "center" | "start" | "between" | "end" | "around" | "evenly" | null | undefined;
2027
2180
  wrap?: "wrap" | "nowrap" | "wrap-reverse" | null | undefined;
@@ -2040,6 +2193,15 @@ declare const ScrollBar: React$1.ForwardRefExoticComponent<Omit<ScrollAreaPrimit
2040
2193
  declare const Select: React$1.FC<SelectPrimitive.SelectProps>;
2041
2194
  declare const SelectGroup: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React$1.RefAttributes<HTMLDivElement>>;
2042
2195
  declare const SelectValue: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React$1.RefAttributes<HTMLSpanElement>>;
2196
+ /**
2197
+ * Menu density. Set `size` on `<SelectContent>` and every `<SelectItem>`
2198
+ * inside it picks up matching padding / text-size / check-indicator
2199
+ * sizing via context — so a compact trigger (`size="xs"`) can have an
2200
+ * equally compact dropdown without per-item overrides. React context
2201
+ * flows through the Radix portal (it follows the React tree, not the
2202
+ * DOM), so items styled this way work even though the menu is portaled.
2203
+ */
2204
+ type SelectMenuSize = "default" | "sm" | "xs";
2043
2205
  /**
2044
2206
  * Select trigger variants — `size` lets dense surfaces (the
2045
2207
  * Studio inspector, settings sheets) reach for a compact `sm`
@@ -2048,7 +2210,7 @@ declare const SelectValue: React$1.ForwardRefExoticComponent<SelectPrimitive.Sel
2048
2210
  * existing call site.
2049
2211
  */
2050
2212
  declare const selectTriggerVariants: (props?: ({
2051
- size?: "default" | "sm" | null | undefined;
2213
+ size?: "default" | "sm" | "xs" | null | undefined;
2052
2214
  } & class_variance_authority_types.ClassProp) | undefined) => string;
2053
2215
  type SelectTriggerSize = NonNullable<VariantProps<typeof selectTriggerVariants>["size"]>;
2054
2216
  declare const SelectTrigger: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & {
@@ -2056,7 +2218,9 @@ declare const SelectTrigger: React$1.ForwardRefExoticComponent<Omit<SelectPrimit
2056
2218
  } & React$1.RefAttributes<HTMLButtonElement>>;
2057
2219
  declare const SelectScrollUpButton: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
2058
2220
  declare const SelectScrollDownButton: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
2059
- declare const SelectContent: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
2221
+ declare const SelectContent: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
2222
+ size?: SelectMenuSize;
2223
+ } & React$1.RefAttributes<HTMLDivElement>>;
2060
2224
  declare const SelectLabel: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
2061
2225
  declare const SelectItem: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
2062
2226
  declare const SelectSeparator: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
@@ -2207,7 +2371,7 @@ declare const Sortable: SortableRootComponent;
2207
2371
  * for a centred narrow column (auth cards, marketing copy).
2208
2372
  */
2209
2373
  declare const stackVariants: (props?: ({
2210
- gap?: "none" | "sm" | "md" | "lg" | "xs" | "xl" | "2xl" | null | undefined;
2374
+ gap?: "none" | "sm" | "md" | "lg" | "xl" | "xs" | "2xl" | null | undefined;
2211
2375
  align?: "center" | "start" | "end" | "stretch" | null | undefined;
2212
2376
  justify?: "center" | "start" | "between" | "end" | "around" | "evenly" | null | undefined;
2213
2377
  } & class_variance_authority_types.ClassProp) | undefined) => string;
@@ -2336,15 +2500,27 @@ interface TabsTriggerProps extends React$1.ComponentPropsWithoutRef<typeof TabsP
2336
2500
  declare const TabsTrigger: React$1.ForwardRefExoticComponent<TabsTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
2337
2501
  declare const TabsContent: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
2338
2502
 
2339
- declare const Textarea: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & React$1.RefAttributes<HTMLTextAreaElement>>;
2503
+ /**
2504
+ * Textarea variants — `size` mirrors Input so the whole form-control
2505
+ * family scales together. Default keeps the existing min-h-[80px] /
2506
+ * px-3 / text-sm; `sm` and `xs` are for dense tool panels.
2507
+ */
2508
+ declare const textareaVariants: (props?: ({
2509
+ size?: "default" | "sm" | "xs" | null | undefined;
2510
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
2511
+ type TextareaSize = NonNullable<VariantProps<typeof textareaVariants>["size"]>;
2512
+ type TextareaProps = Omit<React$1.ComponentProps<"textarea">, "size"> & {
2513
+ size?: TextareaSize;
2514
+ };
2515
+ declare const Textarea: React$1.ForwardRefExoticComponent<Omit<TextareaProps, "ref"> & React$1.RefAttributes<HTMLTextAreaElement>>;
2340
2516
 
2341
2517
  declare const toggleVariants: (props?: ({
2342
2518
  variant?: "default" | "outline" | null | undefined;
2343
- size?: "default" | "sm" | "lg" | null | undefined;
2519
+ size?: "default" | "sm" | "lg" | "xs" | null | undefined;
2344
2520
  } & class_variance_authority_types.ClassProp) | undefined) => string;
2345
2521
  declare const Toggle: React$1.ForwardRefExoticComponent<Omit<TogglePrimitive.ToggleProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
2346
2522
  variant?: "default" | "outline" | null | undefined;
2347
- size?: "default" | "sm" | "lg" | null | undefined;
2523
+ size?: "default" | "sm" | "lg" | "xs" | null | undefined;
2348
2524
  } & class_variance_authority_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLButtonElement>>;
2349
2525
 
2350
2526
  declare const TooltipProvider: React$1.FC<TooltipPrimitive.TooltipProviderProps>;
@@ -2673,6 +2849,60 @@ declare const Map: React$1.ForwardRefExoticComponent<MapProps & React$1.RefAttri
2673
2849
 
2674
2850
  declare const MapMarker: React$1.NamedExoticComponent<MapMarkerProps>;
2675
2851
 
2852
+ /**
2853
+ * lib/motion — the global motion control for gradeui.
2854
+ *
2855
+ * One choke point for "should this animate?". Every animated component
2856
+ * (ThreeScene, RivePlayer, VideoPlayer, aura surfaces) asks
2857
+ * `useReducedMotion()`, so flipping motion off in one place stills them all.
2858
+ *
2859
+ * Two independent inputs, ORed together (reduce-only by design — the toggle
2860
+ * can ADD restriction but never override a user's OS preference to force
2861
+ * motion ON):
2862
+ *
2863
+ * 1. the OS `prefers-reduced-motion: reduce` media query, and
2864
+ * 2. a `data-motion="off"` attribute on the document root (`<html>`),
2865
+ * the manual toggle.
2866
+ *
2867
+ * The attribute is the same mechanism the renderer's `data-fidelity` flag
2868
+ * uses: stamp it on `<html>` and CSS + components react. Inside Studio's
2869
+ * Fast Frame / embed / share iframes it is driven over postMessage
2870
+ * (`grade:set-motion`), so the toggle reaches into the sandbox where the
2871
+ * ThreeScene surfaces actually run. A matching `[data-motion="off"]` CSS
2872
+ * reset in `styles/globals.css` covers pure-CSS animation/transition.
2873
+ *
2874
+ * Sibling to lib/demo (the scripted-reveal spine).
2875
+ */
2876
+ /** The attribute stamped on `<html>` to force motion off. */
2877
+ declare const MOTION_ATTR = "data-motion";
2878
+ /**
2879
+ * Returns `true` when motion should be suppressed — either the OS reports
2880
+ * `prefers-reduced-motion: reduce`, or the global `data-motion="off"` toggle
2881
+ * is set on `<html>`. Stays live: re-reads on media-query change and on the
2882
+ * attribute mutating.
2883
+ *
2884
+ * SSR-safe — defaults to `false` (motion allowed) on the server and
2885
+ * rehydrates in an effect, so it never causes a hydration mismatch.
2886
+ */
2887
+ declare function useReducedMotion(): boolean;
2888
+ /**
2889
+ * @deprecated Prefer {@link useReducedMotion}. Kept for back-compat with the
2890
+ * components that import it from `media-surface`; it now also folds in the
2891
+ * global `data-motion="off"` toggle, not just the OS query.
2892
+ */
2893
+ declare const usePrefersReducedMotion: typeof useReducedMotion;
2894
+ /**
2895
+ * Imperatively set the global motion toggle on `<html>`.
2896
+ *
2897
+ * setMotion(false) → stamps `data-motion="off"` (animation suppressed)
2898
+ * setMotion(true) → removes the attribute (default: respect the OS only)
2899
+ *
2900
+ * Reduce-only: turning motion "on" never forces animation for a viewer whose
2901
+ * OS asks for reduced motion — `useReducedMotion()` still honours the query.
2902
+ * No-op on the server.
2903
+ */
2904
+ declare function setMotion(enabled: boolean): void;
2905
+
2676
2906
  /**
2677
2907
  * MediaSurface — the shared shell used by VideoPlayer, RivePlayer, ThreeScene
2678
2908
  * AND the canonical "media slot" primitive for still images, posters, album
@@ -2710,7 +2940,7 @@ declare const MapMarker: React$1.NamedExoticComponent<MapMarkerProps>;
2710
2940
  * the right semantics.
2711
2941
  */
2712
2942
 
2713
- type MediaAspect = "video" | "square" | "portrait" | "wide" | "auto";
2943
+ type MediaAspect = "video" | "standard" | "square" | "portrait" | "wide" | "auto";
2714
2944
  type MediaRadius = "none" | "sm" | "md" | "lg" | "xl";
2715
2945
  /**
2716
2946
  * What kind of media is this slot intended for? Drives three things:
@@ -2968,8 +3198,6 @@ interface BaseMediaProps {
2968
3198
  className?: string;
2969
3199
  style?: React$1.CSSProperties;
2970
3200
  }
2971
- /** Hook — returns `true` when the OS reports reduced-motion preference. */
2972
- declare function usePrefersReducedMotion(): boolean;
2973
3201
 
2974
3202
  /**
2975
3203
  * VideoPlayer — native HTML5 video wrapped in a MediaSurface.
@@ -3013,6 +3241,153 @@ interface RivePlayerProps extends BaseMediaProps {
3013
3241
  }
3014
3242
  declare const RivePlayer: React$1.ForwardRefExoticComponent<RivePlayerProps & React$1.RefAttributes<HTMLDivElement>>;
3015
3243
 
3244
+ /**
3245
+ * Logo — a brand mark with lockup, background-mode, and monochrome
3246
+ * variations, fed bespoke artwork per slot.
3247
+ *
3248
+ * A brand rarely has one logo: there's a square mark for tight spaces, a
3249
+ * horizontal lockup for headers, and single-colour versions for busy or
3250
+ * inverted backgrounds. This component holds that set and renders the right
3251
+ * one for the context, so a sidenav, toolbar, and footer can all reach for
3252
+ * `<Logo>` and ask for the lockup/mode they need.
3253
+ *
3254
+ * Artwork is yours: each slot is any React node — an inline `<svg>`, an
3255
+ * `<img>`, or a component. Supply only what you have; the component falls
3256
+ * back across appearances and lockups so a partial set still renders
3257
+ * something. Monochrome artwork should paint with `currentColor` so it
3258
+ * inherits the surrounding text colour.
3259
+ *
3260
+ * Selection is explicit, not theme-coupled: set `mode="dark"` when the logo
3261
+ * sits on a dark surface. (Wrap it in your own theme hook if you want it
3262
+ * automatic.)
3263
+ */
3264
+ type LogoLockup = "square" | "horizontal" | "icon";
3265
+ type LogoMode = "light" | "dark";
3266
+ type LogoSize = "sm" | "md" | "lg" | "xl";
3267
+ /** Artwork for one lockup. `light`/`dark` are the full-colour versions for a
3268
+ * light or dark background; `mono` is a single-colour treatment that
3269
+ * inherits `currentColor` and works on any background. */
3270
+ interface LogoVariant {
3271
+ light?: React$1.ReactNode;
3272
+ dark?: React$1.ReactNode;
3273
+ mono?: React$1.ReactNode;
3274
+ }
3275
+ /** The brand artwork set, keyed by lockup then appearance. */
3276
+ interface LogoSources {
3277
+ square?: LogoVariant;
3278
+ horizontal?: LogoVariant;
3279
+ icon?: LogoVariant;
3280
+ }
3281
+ interface LogoProps extends Omit<React$1.HTMLAttributes<HTMLElement>, "children"> {
3282
+ /** The brand artwork. Supply only the slots you have. */
3283
+ sources: LogoSources;
3284
+ /** Which lockup to show. Falls back to another lockup if this one is
3285
+ * empty. Default `"horizontal"`. */
3286
+ lockup?: LogoLockup;
3287
+ /** The background the logo sits on — selects the light/dark artwork.
3288
+ * Explicit (not theme-coupled). Default `"light"`. */
3289
+ mode?: LogoMode;
3290
+ /** Render the monochrome artwork instead of full colour. Mono inherits
3291
+ * `currentColor`, so set the text colour on a parent. Default `false`. */
3292
+ mono?: boolean;
3293
+ /** Height of the logo — a t-shirt token or a raw pixel number. Width is
3294
+ * intrinsic (square/icon are 1:1, horizontal keeps its ratio).
3295
+ * Default `"md"`. */
3296
+ size?: LogoSize | number;
3297
+ /** Accessible name (e.g. the brand name) → `aria-label` + `role="img"`.
3298
+ * Omit and set `decorative` when something nearby already names it. */
3299
+ label?: string;
3300
+ /** Mark the logo decorative (`aria-hidden`, no role). Use when the brand
3301
+ * name is already in the DOM beside it. */
3302
+ decorative?: boolean;
3303
+ /** Optional link target — renders the logo as an `<a>` (logo-links-home). */
3304
+ href?: string;
3305
+ }
3306
+ declare const Logo: React$1.ForwardRefExoticComponent<LogoProps & React$1.RefAttributes<HTMLElement>>;
3307
+
3308
+ /**
3309
+ * Control schema — the canonical, UI-agnostic descriptor for a shader's
3310
+ * (or effect layer's) tweakable parameters. Shared by base demos AND the
3311
+ * universal post stack, so a single `<ShaderControls schema={...} />`
3312
+ * renders any of them.
3313
+ *
3314
+ * Ported from the three-lab experiments (the proven shape) and extended
3315
+ * with two controls from the Paper reference — `segmented` and
3316
+ * `colorList` (Paper's colorCount) — plus an optional palette-slot
3317
+ * binding on `color` (the "Line colour → accent" affordance).
3318
+ *
3319
+ * Kept free of three.js / React imports so post-stack.ts and any other
3320
+ * renderer can depend on it without a circular import.
3321
+ */
3322
+ /** Global palette slots a colour control can bind to. */
3323
+ type PaletteSlot = "primary" | "secondary" | "accent" | "background";
3324
+ type NumberControl = {
3325
+ type: "slider";
3326
+ key: string;
3327
+ label: string;
3328
+ min: number;
3329
+ max: number;
3330
+ step: number;
3331
+ default: number;
3332
+ /** Display unit appended in the readout (e.g. "px", "°", "%"). */
3333
+ unit?: string;
3334
+ };
3335
+ type ColorControl = {
3336
+ type: "color";
3337
+ key: string;
3338
+ label: string;
3339
+ default: string;
3340
+ /** When set, the control FOLLOWS this palette slot (re-tints with the
3341
+ * theme, shows a "→ accent" affordance) until the user overrides it. */
3342
+ slot?: PaletteSlot;
3343
+ };
3344
+ /** A variable-length list of colours — Paper's colorCount + swatches. */
3345
+ type ColorListControl = {
3346
+ type: "colorList";
3347
+ key: string;
3348
+ label: string;
3349
+ default: string[];
3350
+ /** Min / max swatches the user can add. */
3351
+ min?: number;
3352
+ max?: number;
3353
+ };
3354
+ type ToggleControl = {
3355
+ type: "toggle";
3356
+ key: string;
3357
+ label: string;
3358
+ default: boolean;
3359
+ };
3360
+ type SelectControl = {
3361
+ type: "select";
3362
+ key: string;
3363
+ label: string;
3364
+ options: ReadonlyArray<{
3365
+ value: string;
3366
+ label: string;
3367
+ }>;
3368
+ default: string;
3369
+ };
3370
+ /** Same data as a select, rendered as a segmented toggle (≤4 options). */
3371
+ type SegmentedControl = {
3372
+ type: "segmented";
3373
+ key: string;
3374
+ label: string;
3375
+ options: ReadonlyArray<{
3376
+ value: string;
3377
+ label: string;
3378
+ }>;
3379
+ default: string;
3380
+ };
3381
+ type DividerControl = {
3382
+ type: "divider";
3383
+ key: string;
3384
+ /** Optional section heading above the divider line. */
3385
+ label?: string;
3386
+ };
3387
+ type ControlSpec = NumberControl | ColorControl | ColorListControl | ToggleControl | SelectControl | SegmentedControl | DividerControl;
3388
+ /** A flat bag of current values, keyed by ControlSpec.key. */
3389
+ type DemoState = Record<string, number | string | boolean | string[]>;
3390
+
3016
3391
  /**
3017
3392
  * Shared types for the three.js layer of the design system.
3018
3393
  *
@@ -3082,6 +3457,7 @@ interface PostPreset {
3082
3457
  };
3083
3458
  };
3084
3459
  }
3460
+
3085
3461
  /** A shader preset is the data needed to instantiate one of the canned scenes. */
3086
3462
  interface ShaderPreset {
3087
3463
  id: string;
@@ -3099,6 +3475,10 @@ interface ShaderPreset {
3099
3475
  defaultPalette?: Partial<Palette>;
3100
3476
  /** Static poster image path for non-hover previews. Served from /public. */
3101
3477
  poster?: string;
3478
+ /** Tweakable controls for this base shader (drives the controls panel
3479
+ * + maps to uniforms). Effect layers (grain etc.) carry their own
3480
+ * controls separately via EffectLayerSpec. */
3481
+ controls?: ControlSpec[];
3102
3482
  }
3103
3483
 
3104
3484
  /**
@@ -3153,7 +3533,7 @@ declare function buildFragmentShaderScene(userFragment: string): SceneFactory;
3153
3533
  * play/pause overlay. Scene pauses when offscreen (pauseOffscreen default `true`).
3154
3534
  */
3155
3535
 
3156
- interface ThreeSceneProps extends Omit<BaseMediaProps, "src" | "poster"> {
3536
+ interface ThreeSceneProps extends Omit<BaseMediaProps, "src" | "poster">, Omit<React$1.HTMLAttributes<HTMLDivElement>, keyof BaseMediaProps> {
3157
3537
  /** Preset id from the shader preset registry. */
3158
3538
  preset?: string;
3159
3539
  /**
@@ -3169,8 +3549,12 @@ interface ThreeSceneProps extends Omit<BaseMediaProps, "src" | "poster"> {
3169
3549
  fragmentShader?: string;
3170
3550
  /** Called when a supplied `fragmentShader` fails to compile. */
3171
3551
  onShaderError?: (error: ShaderCompileError) => void;
3172
- /** Post-FX preset id. Defaults to the preset's `defaultPostPreset` or "vhs". */
3173
- postPreset?: string;
3552
+ /** Post-FX preset. Either a registry id (`"vhs"`) OR a full `PostPreset`
3553
+ * object — pass an object (e.g. from `postStateToPreset`) to drive the
3554
+ * stack live from a controls panel; changes are applied via the
3555
+ * composer's `setPreset` WITHOUT remounting WebGL. Defaults to the
3556
+ * base preset's `defaultPostPreset` or "vhs". */
3557
+ postPreset?: string | PostPreset;
3174
3558
  /** Palette overrides. Unset slots fall back to `DEFAULT_PALETTE`. */
3175
3559
  palette?: Partial<Palette>;
3176
3560
  /**
@@ -3182,9 +3566,161 @@ interface ThreeSceneProps extends Omit<BaseMediaProps, "src" | "poster"> {
3182
3566
  poster?: string;
3183
3567
  /** Pixel-ratio cap. Defaults to `Math.min(window.devicePixelRatio, 2)`. */
3184
3568
  maxDpr?: number;
3569
+ /**
3570
+ * Controlled play/pause. When provided, pauses/resumes the render loop
3571
+ * WITHOUT remounting the WebGL context (unlike `autoPlay`, which only
3572
+ * sets the initial state and remounts on change). Use for "animate on
3573
+ * hover" thumbnails. Reduced-motion still forces paused.
3574
+ */
3575
+ play?: boolean;
3185
3576
  }
3186
3577
  declare const ThreeScene: React$1.ForwardRefExoticComponent<ThreeSceneProps & React$1.RefAttributes<HTMLDivElement>>;
3187
3578
 
3579
+ /**
3580
+ * ShaderControls — renders a `ControlSpec[]` schema into a live controls
3581
+ * panel using the DS control primitives. One component drives every
3582
+ * shader's params, the universal post stack (POST_CONTROLS), and any
3583
+ * effect layer — because they all describe themselves as ControlSpec[].
3584
+ *
3585
+ * Controlled: parent owns the `DemoState` and gets `onChange(key, value)`
3586
+ * on every edit. UI-only; it knows nothing about WebGL.
3587
+ *
3588
+ * Mapping:
3589
+ * slider → Slider + editable number (with optional unit)
3590
+ * segmented → ToggleGroup (single)
3591
+ * select → Select (compact)
3592
+ * toggle → Switch
3593
+ * color → swatch + hex field (with optional "→ slot" binding hint)
3594
+ * colorList → N swatches + add/remove (Paper's colorCount)
3595
+ * divider → section heading + rule
3596
+ */
3597
+
3598
+ interface ShaderControlsProps {
3599
+ controls: readonly ControlSpec[];
3600
+ state: DemoState;
3601
+ onChange: (key: string, value: number | string | boolean | string[]) => void;
3602
+ disabled?: boolean;
3603
+ className?: string;
3604
+ }
3605
+ declare function ShaderControls({ controls, state, onChange, disabled, className, }: ShaderControlsProps): React$1.JSX.Element;
3606
+
3607
+ /**
3608
+ * BackgroundFill — a frame's background *paint*, as a layer.
3609
+ *
3610
+ * This is the render boundary for the "fill" model: a generative
3611
+ * background (shader), an image, a video, a gradient, a repeating
3612
+ * texture, or a solid token is NEVER a free-standing selectable node.
3613
+ * It is a paint that belongs to a frame, exactly like a fill in Figma /
3614
+ * Paper. The frame is the thing you select; this layer is plumbing.
3615
+ *
3616
+ * Drop it as the FIRST child of a `relative` frame. It paints an
3617
+ * `absolute inset-0`, `z-0`, `pointer-events-none` layer behind the
3618
+ * frame's content — so siblings that carry `relative z-10` (or any
3619
+ * positioned/z-indexed content) sit on top automatically. It is marked
3620
+ * `data-gds-part="frame-fill"` + `aria-hidden` so Studio treats it as
3621
+ * chrome (not separately selectable) and a11y trees skip it.
3622
+ *
3623
+ * The `type` switch picks what gets painted:
3624
+ * none → renders nothing
3625
+ * solid → a theme token (or any CSS colour)
3626
+ * gradient → a linear-gradient from from/via/to stops
3627
+ * image → an <img> (object-fit) or a tiled background (repeat)
3628
+ * video → a muted, looping, autoplaying <video>
3629
+ * shader → a <ThreeScene> generative shader (preset or GLSL)
3630
+ *
3631
+ * Common controls — `opacity` and `blendMode` — apply to every type,
3632
+ * mirroring the inspector's Blending section.
3633
+ */
3634
+
3635
+ type BackgroundFillType = "none" | "solid" | "gradient" | "image" | "video" | "shader";
3636
+ type BackgroundFillFit = "cover" | "contain" | "fill" | "none";
3637
+ interface BackgroundFillProps {
3638
+ /** Which paint to render. */
3639
+ type: BackgroundFillType;
3640
+ /** Token name (`primary`, `card`, …) or any CSS colour. */
3641
+ color?: string;
3642
+ /** Gradient stops — token names or CSS colours. */
3643
+ gradient?: {
3644
+ from?: string;
3645
+ via?: string;
3646
+ to?: string;
3647
+ angle?: number;
3648
+ };
3649
+ /** Image or video URL. */
3650
+ src?: string;
3651
+ /** object-fit for image / video. Default `cover`. */
3652
+ fit?: BackgroundFillFit;
3653
+ /** CSS object-position / background-position. Default `center`. */
3654
+ position?: string;
3655
+ /** Tile the image (uses background-image + repeat instead of <img>). */
3656
+ repeat?: boolean;
3657
+ /** Tile size when `repeat` (CSS background-size, e.g. "120px"). */
3658
+ tileSize?: string;
3659
+ /** Shader preset id (see ThreeScene). */
3660
+ preset?: string;
3661
+ /** Custom GLSL fragment shader (takes precedence over preset). */
3662
+ fragmentShader?: string;
3663
+ /** Palette overrides for the shader. */
3664
+ palette?: Partial<Palette>;
3665
+ /** Post-FX preset id or live PostPreset object. */
3666
+ postPreset?: string | PostPreset;
3667
+ /** Layer opacity (0–1). */
3668
+ opacity?: number;
3669
+ /** CSS mix-blend-mode against the frame behind it. */
3670
+ blendMode?: React$1.CSSProperties["mixBlendMode"];
3671
+ /** Corner radius — match the frame's so the paint clips cleanly. */
3672
+ radius?: MediaRadius;
3673
+ className?: string;
3674
+ style?: React$1.CSSProperties;
3675
+ }
3676
+ declare const BackgroundFill: React$1.ForwardRefExoticComponent<BackgroundFillProps & React$1.RefAttributes<HTMLDivElement>>;
3677
+
3678
+ /**
3679
+ * FillPicker — Grade's paint picker, modelled on Figma's fill popover.
3680
+ *
3681
+ * A type-icon row across the top (solid · gradient · image · pattern ·
3682
+ * video · shader) switches the panel below to that paint's controls,
3683
+ * with a global opacity at the foot. It emits a `FillValue` that maps
3684
+ * 1:1 onto `<BackgroundFill>` props, so the inspector's Fill section and
3685
+ * any frame background share one control + one data shape.
3686
+ *
3687
+ * Grade is token-led, so the SOLID tab leads with theme-token swatches
3688
+ * (the "Libraries" half of Figma's picker) rather than a freeform HSV
3689
+ * square. A custom-colour square is a deliberate later pass.
3690
+ */
3691
+
3692
+ /** A paint value — the serialisable shape both the picker and
3693
+ * `<BackgroundFill>` speak. */
3694
+ interface FillValue {
3695
+ type: BackgroundFillType;
3696
+ color?: string;
3697
+ gradient?: {
3698
+ from?: string;
3699
+ via?: string;
3700
+ to?: string;
3701
+ angle?: number;
3702
+ };
3703
+ src?: string;
3704
+ fit?: BackgroundFillFit;
3705
+ repeat?: boolean;
3706
+ tileSize?: string;
3707
+ preset?: string;
3708
+ palette?: Partial<Palette>;
3709
+ postPreset?: string | PostPreset;
3710
+ opacity?: number;
3711
+ }
3712
+ /** Theme tokens offered as solid / gradient swatches. */
3713
+ declare const FILL_TOKENS: readonly ["primary", "accent", "secondary", "muted", "card", "background", "destructive", "transparent"];
3714
+ interface FillPickerProps {
3715
+ value: FillValue;
3716
+ onChange: (value: FillValue) => void;
3717
+ className?: string;
3718
+ }
3719
+ declare function FillPicker({ value, onChange, className }: FillPickerProps): React$1.JSX.Element;
3720
+ declare namespace FillPicker {
3721
+ var displayName: string;
3722
+ }
3723
+
3188
3724
  /**
3189
3725
  * ShaderPresetPreview — a thumbnail-sized preview of a shader preset.
3190
3726
  *
@@ -3204,7 +3740,7 @@ interface ShaderPresetPreviewProps {
3204
3740
  postPreset?: string;
3205
3741
  palette?: Partial<Palette>;
3206
3742
  className?: string;
3207
- aspect?: "video" | "square" | "portrait" | "wide";
3743
+ aspect?: "video" | "standard" | "square" | "portrait" | "wide";
3208
3744
  radius?: "none" | "sm" | "md" | "lg" | "xl";
3209
3745
  /** Text label shown on the card. Defaults to preset label. */
3210
3746
  label?: string;
@@ -3756,4 +4292,4 @@ declare function GradeModeSwitcher({ className, variant }: GradeModeSwitcherProp
3756
4292
  */
3757
4293
  declare function ThemeToggle(): React$1.JSX.Element;
3758
4294
 
3759
- 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, BUILT_IN_INPUTS, 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, 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, FRAGMENT_HEADER, Flex, type FlexProps, type FontKey, GRADE_PRE_HYDRATION_SCRIPT, type GeneratedTheme, GradeModeSwitcher, GradeThemeProvider, type GradeThemeProviderProps, GradeThemeSwitcher, Grid, type GridProps, Input, type InputStyle, Label, LenisProvider, 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, 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, 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, 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, shaderPresetById, shaderPresets, shellVariants, stackVariants, themeToCSSVars, toggleVariants, useCarouselApi, useGradeTheme, useMaybeGradeTheme, usePrefersReducedMotion, useScriptedDemo };
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 };