@gradeui/ui 1.1.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/components/ui/background-fill.md +109 -0
- package/components/ui/checkbox-card.md +43 -0
- package/components/ui/checkbox.md +2 -2
- package/components/ui/code.md +2 -1
- package/components/ui/composer.md +226 -0
- package/components/ui/dropdown-menu.md +2 -0
- package/components/ui/field.md +26 -0
- package/components/ui/fill-picker.md +36 -0
- package/components/ui/input.md +27 -2
- package/components/ui/label.md +2 -1
- package/components/ui/logo.md +57 -0
- package/components/ui/message.md +263 -0
- package/components/ui/radio-card.md +41 -0
- package/components/ui/radio-group.md +2 -2
- package/components/ui/select.md +16 -4
- package/components/ui/switch-card.md +30 -0
- package/components/ui/switch.md +2 -2
- package/components/ui/textarea.md +2 -1
- package/components/ui/three-scene.md +22 -1
- package/dist/contracts.js +48 -4
- package/dist/contracts.js.map +1 -1
- package/dist/contracts.mjs +48 -4
- package/dist/contracts.mjs.map +1 -1
- package/dist/index.d.mts +1255 -39
- package/dist/index.d.ts +1255 -39
- package/dist/index.js +122 -47
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +122 -47
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +3 -1
- 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 +11 -1
package/dist/index.d.ts
CHANGED
|
@@ -9,20 +9,21 @@ 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';
|
|
15
|
+
import { LexicalEditor } from 'lexical';
|
|
13
16
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
14
17
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
15
18
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
16
19
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
17
20
|
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
18
|
-
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
19
21
|
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
20
22
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
21
23
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
22
24
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
23
25
|
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
24
26
|
import { UniqueIdentifier } from '@dnd-kit/core';
|
|
25
|
-
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
26
27
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
27
28
|
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
28
29
|
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
@@ -47,6 +48,7 @@ declare const MediaSurfaceContract: _gradeui_contracts.ComponentContract<{
|
|
|
47
48
|
hint: {
|
|
48
49
|
schema: z.ZodOptional<z.ZodEnum<["album", "tv-show", "movie", "game", "book", "portrait", "landscape", "poster", "product", "food", "video", "audio", "embed", "3d", "generic"]>>;
|
|
49
50
|
design: "knob";
|
|
51
|
+
group: string;
|
|
50
52
|
control: "glyph-picker";
|
|
51
53
|
label: string;
|
|
52
54
|
description: string;
|
|
@@ -92,6 +94,7 @@ declare const MediaSurfaceContract: _gradeui_contracts.ComponentContract<{
|
|
|
92
94
|
alt: {
|
|
93
95
|
schema: z.ZodOptional<z.ZodString>;
|
|
94
96
|
design: "content";
|
|
97
|
+
group: string;
|
|
95
98
|
control: "text";
|
|
96
99
|
label: string;
|
|
97
100
|
description: string;
|
|
@@ -100,6 +103,7 @@ declare const MediaSurfaceContract: _gradeui_contracts.ComponentContract<{
|
|
|
100
103
|
src: {
|
|
101
104
|
schema: z.ZodOptional<z.ZodString>;
|
|
102
105
|
design: "content";
|
|
106
|
+
group: string;
|
|
103
107
|
control: "url";
|
|
104
108
|
label: string;
|
|
105
109
|
description: string;
|
|
@@ -173,14 +177,14 @@ declare const MediaSurfaceContract: _gradeui_contracts.ComponentContract<{
|
|
|
173
177
|
description: z.ZodOptional<z.ZodString>;
|
|
174
178
|
}, "strip", z.ZodTypeAny, {
|
|
175
179
|
kind: "book";
|
|
176
|
-
description?: string | undefined;
|
|
177
180
|
title?: string | undefined;
|
|
181
|
+
description?: string | undefined;
|
|
178
182
|
author?: string | undefined;
|
|
179
183
|
isbn?: string | undefined;
|
|
180
184
|
}, {
|
|
181
185
|
kind: "book";
|
|
182
|
-
description?: string | undefined;
|
|
183
186
|
title?: string | undefined;
|
|
187
|
+
description?: string | undefined;
|
|
184
188
|
author?: string | undefined;
|
|
185
189
|
isbn?: string | undefined;
|
|
186
190
|
}>, z.ZodObject<{
|
|
@@ -466,9 +470,38 @@ interface AppShellFooterProps extends React$1.HTMLAttributes<HTMLElement>, Varia
|
|
|
466
470
|
}
|
|
467
471
|
declare const AppShellFooter: React$1.ForwardRefExoticComponent<AppShellFooterProps & React$1.RefAttributes<HTMLElement>>;
|
|
468
472
|
|
|
469
|
-
|
|
473
|
+
/**
|
|
474
|
+
* Avatar — circular user/entity glyph. Wraps Radix's avatar primitive
|
|
475
|
+
* with two ergonomic additions over the base shadcn shape:
|
|
476
|
+
*
|
|
477
|
+
* size — t-shirt scale (xs / sm / md / lg / xl) so consumers pick a
|
|
478
|
+
* token instead of writing `h-7 w-7` every time. Defaults
|
|
479
|
+
* to md (40px) to preserve previous behaviour.
|
|
480
|
+
*
|
|
481
|
+
* tone — on AvatarFallback only. Picks a tinted bg/text colour
|
|
482
|
+
* pair (violet / amber / emerald / sky / rose / plum / lime /
|
|
483
|
+
* primary / muted). Default `muted` matches the previous
|
|
484
|
+
* `bg-muted` behaviour. Reach for explicit tones when each
|
|
485
|
+
* author needs a stable colour mapping (chat avatars, comment
|
|
486
|
+
* threads, member lists).
|
|
487
|
+
*
|
|
488
|
+
* Both additions are backwards compatible — code that passed className
|
|
489
|
+
* directly still works and overrides the variant defaults.
|
|
490
|
+
*/
|
|
491
|
+
declare const avatarSizes: (props?: ({
|
|
492
|
+
size?: "sm" | "md" | "lg" | "xl" | "xs" | null | undefined;
|
|
493
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
494
|
+
interface AvatarProps extends React$1.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>, VariantProps<typeof avatarSizes> {
|
|
495
|
+
}
|
|
496
|
+
declare const Avatar: React$1.ForwardRefExoticComponent<AvatarProps & React$1.RefAttributes<HTMLSpanElement>>;
|
|
470
497
|
declare const AvatarImage: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React$1.RefAttributes<HTMLImageElement>, "ref"> & React$1.RefAttributes<HTMLImageElement>>;
|
|
471
|
-
declare const
|
|
498
|
+
declare const avatarFallbackTones: (props?: ({
|
|
499
|
+
tone?: "muted" | "primary" | "violet" | "amber" | "emerald" | "sky" | "rose" | "plum" | "lime" | null | undefined;
|
|
500
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
501
|
+
type AvatarTone = NonNullable<VariantProps<typeof avatarFallbackTones>["tone"]>;
|
|
502
|
+
interface AvatarFallbackProps extends React$1.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>, VariantProps<typeof avatarFallbackTones> {
|
|
503
|
+
}
|
|
504
|
+
declare const AvatarFallback: React$1.ForwardRefExoticComponent<AvatarFallbackProps & React$1.RefAttributes<HTMLSpanElement>>;
|
|
472
505
|
|
|
473
506
|
declare const badgeVariants: (props?: ({
|
|
474
507
|
variant?: "default" | "info" | "success" | "warning" | "destructive" | "outline" | "secondary" | "highlight" | "success-soft" | "warning-soft" | "destructive-soft" | "info-soft" | "highlight-soft" | "success-outline" | "warning-outline" | "destructive-outline" | "info-outline" | null | undefined;
|
|
@@ -538,7 +571,7 @@ type Surface = "solid" | "translucent" | "glass" | "glass-strong";
|
|
|
538
571
|
*/
|
|
539
572
|
declare const bannerVariants: (props?: ({
|
|
540
573
|
variant?: "default" | "info" | "success" | "warning" | "destructive" | "announcement" | null | undefined;
|
|
541
|
-
align?: "
|
|
574
|
+
align?: "center" | "start" | "between" | null | undefined;
|
|
542
575
|
sticky?: boolean | null | undefined;
|
|
543
576
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
544
577
|
interface BannerProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "title">, VariantProps<typeof bannerVariants> {
|
|
@@ -594,8 +627,8 @@ declare const Banner: React$1.ForwardRefExoticComponent<BannerProps & React$1.Re
|
|
|
594
627
|
* consistent across primitives.
|
|
595
628
|
*/
|
|
596
629
|
declare const buttonVariants: (props?: ({
|
|
597
|
-
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "
|
|
598
|
-
size?: "default" | "
|
|
630
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | "raised" | null | undefined;
|
|
631
|
+
size?: "default" | "sm" | "md" | "lg" | "icon" | "xs" | null | undefined;
|
|
599
632
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
600
633
|
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
601
634
|
asChild?: boolean;
|
|
@@ -770,6 +803,107 @@ declare const CardFooter: React$1.ForwardRefExoticComponent<React$1.HTMLAttribut
|
|
|
770
803
|
|
|
771
804
|
declare const Checkbox: React$1.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
772
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
|
+
|
|
773
907
|
/**
|
|
774
908
|
* Code — syntax-highlighted code surface with diff, line-emphasis, and
|
|
775
909
|
* reveal animation modes. Designed for marketing heroes ("diff hero"),
|
|
@@ -797,6 +931,7 @@ type CodeLanguage = Language;
|
|
|
797
931
|
type CodeReveal = "none" | "lines" | "typewriter" | "diff";
|
|
798
932
|
type CodeTrigger = "mount" | "inView" | "manual";
|
|
799
933
|
type CodeSpeed = "slow" | "normal" | "fast";
|
|
934
|
+
type CodeSize = "xs" | "sm" | "md";
|
|
800
935
|
/**
|
|
801
936
|
* Step shape for scripted terminal / CLI sessions. Lives on `<Code>`
|
|
802
937
|
* itself rather than a sibling `CodeSequence` so the theme bridge,
|
|
@@ -921,6 +1056,17 @@ interface CodeProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "childr
|
|
|
921
1056
|
* Overflowing content scrolls. Pair with `wrap` to break long lines
|
|
922
1057
|
* instead of horizontal scroll.
|
|
923
1058
|
*/
|
|
1059
|
+
/**
|
|
1060
|
+
* Type-scale preset. `xs` (12px) for dense changelog cards and inline
|
|
1061
|
+
* code in tables; `sm` (14px, default) for marketing heroes and most
|
|
1062
|
+
* docs blocks; `md` (16px) for "this is the focal point" displays
|
|
1063
|
+
* like AI-output demos and large screen-capture replacements.
|
|
1064
|
+
*
|
|
1065
|
+
* Composes with `maxLines` correctly because the container height
|
|
1066
|
+
* uses `1lh` which inherits whatever line-height the size class
|
|
1067
|
+
* produces — switching size resizes the container automatically.
|
|
1068
|
+
*/
|
|
1069
|
+
size?: CodeSize;
|
|
924
1070
|
height?: number | string | "auto";
|
|
925
1071
|
/**
|
|
926
1072
|
* Cap the visible line count — the container is fixed at exactly
|
|
@@ -935,6 +1081,669 @@ interface CodeProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "childr
|
|
|
935
1081
|
}
|
|
936
1082
|
declare const Code: React$1.ForwardRefExoticComponent<CodeProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
937
1083
|
|
|
1084
|
+
/**
|
|
1085
|
+
* Message — the canonical "avatar + author + timestamp + body" row.
|
|
1086
|
+
*
|
|
1087
|
+
* THE primitive for any chat message, comment, post-reply, activity-log
|
|
1088
|
+
* entry, or notification row that follows the people-and-text shape.
|
|
1089
|
+
* Surfaced after three scaffolds (chat, comments, hero preview) all
|
|
1090
|
+
* re-rolled the same flex layout inline — that was the signal.
|
|
1091
|
+
*
|
|
1092
|
+
* Slot-based composition for the avatar so consumers pass whatever
|
|
1093
|
+
* Avatar variant fits their surface (sized, toned, image, fallback).
|
|
1094
|
+
* Message doesn't pick an Avatar shape for you — it just hosts.
|
|
1095
|
+
*
|
|
1096
|
+
* <Message
|
|
1097
|
+
* author="alice"
|
|
1098
|
+
* timestamp="11:24"
|
|
1099
|
+
* avatar={
|
|
1100
|
+
* <Avatar size="sm">
|
|
1101
|
+
* <AvatarFallback tone="violet">A</AvatarFallback>
|
|
1102
|
+
* </Avatar>
|
|
1103
|
+
* }
|
|
1104
|
+
* >
|
|
1105
|
+
* Post copy is in the doc.
|
|
1106
|
+
* </Message>
|
|
1107
|
+
*
|
|
1108
|
+
* For "your messages right-aligned" chat surfaces (iMessage / WhatsApp
|
|
1109
|
+
* / your own DM threads), pass `align="end"` and the row + content
|
|
1110
|
+
* mirror.
|
|
1111
|
+
*
|
|
1112
|
+
* Anti-patterns to avoid (caught from real scaffold use):
|
|
1113
|
+
*
|
|
1114
|
+
* - Don't roll a custom "AuthorDot" inline — Avatar with
|
|
1115
|
+
* <AvatarFallback tone="..."> covers the colored-initials case
|
|
1116
|
+
* cleanly and stays themable.
|
|
1117
|
+
* - Don't use Message for non-people activity (system events,
|
|
1118
|
+
* log lines). Reach for Callout or a plain Row.
|
|
1119
|
+
*/
|
|
1120
|
+
interface MessageProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
1121
|
+
/** Display name of the message author. */
|
|
1122
|
+
author: string;
|
|
1123
|
+
/**
|
|
1124
|
+
* Timestamp string ("11:24", "2 hours ago") OR any node for custom
|
|
1125
|
+
* formatting (tooltip-wrapped time, link to permalink, etc).
|
|
1126
|
+
*/
|
|
1127
|
+
timestamp?: React$1.ReactNode;
|
|
1128
|
+
/**
|
|
1129
|
+
* Avatar slot. Pass any `<Avatar>` composition. When omitted, the
|
|
1130
|
+
* row renders without an avatar column — handy for grouped messages
|
|
1131
|
+
* from the same author where only the first row shows the avatar.
|
|
1132
|
+
*/
|
|
1133
|
+
avatar?: React$1.ReactNode;
|
|
1134
|
+
/**
|
|
1135
|
+
* Small chip(s) next to the author name. Use for "OP", "Bot",
|
|
1136
|
+
* "Admin", or any role/state badge that belongs in the header
|
|
1137
|
+
* rhythm rather than the body.
|
|
1138
|
+
*/
|
|
1139
|
+
badge?: React$1.ReactNode;
|
|
1140
|
+
/**
|
|
1141
|
+
* Editing state — renders an "(edited)" hint next to the timestamp.
|
|
1142
|
+
* Pass a string to customise the label (e.g. "(edited 2 minutes ago)").
|
|
1143
|
+
*/
|
|
1144
|
+
edited?: boolean | string;
|
|
1145
|
+
/**
|
|
1146
|
+
* Pinned state — renders a small pin glyph at the top of the row.
|
|
1147
|
+
* Surfaces "this is a sticky / pinned message" in Slack-style feeds.
|
|
1148
|
+
*/
|
|
1149
|
+
pinned?: boolean;
|
|
1150
|
+
/**
|
|
1151
|
+
* End-of-header slot. Common use: a hover-revealed Row of small
|
|
1152
|
+
* icon buttons (reply / react / pin / more). Pushed to the right
|
|
1153
|
+
* with `ml-auto`.
|
|
1154
|
+
*/
|
|
1155
|
+
actions?: React$1.ReactNode;
|
|
1156
|
+
/**
|
|
1157
|
+
* Reactions slot — renders below the body. Typically a Row of
|
|
1158
|
+
* reaction chips (emoji + count). Hidden when no node is passed.
|
|
1159
|
+
*/
|
|
1160
|
+
reactions?: React$1.ReactNode;
|
|
1161
|
+
/**
|
|
1162
|
+
* Thread / reply count — renders a "N replies" link affordance
|
|
1163
|
+
* below the body. Click handler is the consumer's responsibility.
|
|
1164
|
+
* Wire `onThreadClick` if you want the built-in button to fire.
|
|
1165
|
+
*/
|
|
1166
|
+
threadCount?: number;
|
|
1167
|
+
/** Fires when the built-in "N replies" affordance is clicked. */
|
|
1168
|
+
onThreadClick?: () => void;
|
|
1169
|
+
/**
|
|
1170
|
+
* Visual alignment. `start` (default) puts the avatar on the left
|
|
1171
|
+
* — the standard chat / comment shape. `end` mirrors the row so the
|
|
1172
|
+
* avatar sits on the right and the content right-aligns — use for
|
|
1173
|
+
* "your messages" in DM threads.
|
|
1174
|
+
*/
|
|
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";
|
|
1185
|
+
/**
|
|
1186
|
+
* Body content (the message text). Accepts any node so consumers
|
|
1187
|
+
* can embed rich content — Markdown-rendered prose, images,
|
|
1188
|
+
* embedded cards, etc. Plain text is the common case.
|
|
1189
|
+
*/
|
|
1190
|
+
children: React$1.ReactNode;
|
|
1191
|
+
}
|
|
1192
|
+
declare const Message: React$1.ForwardRefExoticComponent<MessageProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1193
|
+
|
|
1194
|
+
/**
|
|
1195
|
+
* Shared types + presets for scripted component demos.
|
|
1196
|
+
*
|
|
1197
|
+
* Lives at the bottom of the demo primitive stack so the hook, the
|
|
1198
|
+
* cursor, and any component that opts in (`<Code>`, `<Composer>`,
|
|
1199
|
+
* `<DemoStage>`) all read from one definition of "what slow / normal /
|
|
1200
|
+
* fast feels like" and one definition of "when do we start playing".
|
|
1201
|
+
*
|
|
1202
|
+
* If you ever want to retune the cadence of every demo on the marketing
|
|
1203
|
+
* site at once, this is the file to edit.
|
|
1204
|
+
*/
|
|
1205
|
+
/**
|
|
1206
|
+
* Animation feel. Maps onto a triple of timing values so authors can
|
|
1207
|
+
* pick a vibe (slow / normal / fast) instead of hand-tuning ms.
|
|
1208
|
+
* Components that need finer control can still override the resolved
|
|
1209
|
+
* values per-instance.
|
|
1210
|
+
*/
|
|
1211
|
+
type DemoSpeed = "slow" | "normal" | "fast";
|
|
1212
|
+
/**
|
|
1213
|
+
* What kicks the demo off:
|
|
1214
|
+
* - `mount` plays immediately on first paint
|
|
1215
|
+
* - `inView` waits for the container to cross the viewport threshold
|
|
1216
|
+
* - `manual` driven by the `play` prop or imperative ref
|
|
1217
|
+
*/
|
|
1218
|
+
type DemoTrigger = "mount" | "inView" | "manual";
|
|
1219
|
+
/**
|
|
1220
|
+
* Speed presets shared across every scripted-demo surface. Three
|
|
1221
|
+
* unambiguously distinct feels: `slow` is "I am being shown", `normal`
|
|
1222
|
+
* is "I am being told", `fast` is "I am being briefed".
|
|
1223
|
+
*
|
|
1224
|
+
* - `tokenStagger` per-character cadence for typing-style steps
|
|
1225
|
+
* - `lineStagger` per-line cadence for reveal-style demos
|
|
1226
|
+
* - `preDelay` pause after the trigger fires before the first tick
|
|
1227
|
+
* - `fadeMs` default enter-transition duration for revealed parts
|
|
1228
|
+
*/
|
|
1229
|
+
declare const DEMO_SPEED_PRESETS: Record<DemoSpeed, {
|
|
1230
|
+
tokenStagger: number;
|
|
1231
|
+
lineStagger: number;
|
|
1232
|
+
preDelay: number;
|
|
1233
|
+
fadeMs: number;
|
|
1234
|
+
}>;
|
|
1235
|
+
|
|
1236
|
+
/**
|
|
1237
|
+
* Cancellable sleep + type helpers for scripted demos.
|
|
1238
|
+
*
|
|
1239
|
+
* The runner threads an `AbortSignal` through every step so a `stop()`
|
|
1240
|
+
* call (or an unmount) can short-circuit long waits and typing loops
|
|
1241
|
+
* cleanly. Consumers write `await sleep(ms, signal)` inside their
|
|
1242
|
+
* interpret callback and the cancellation is automatic.
|
|
1243
|
+
*
|
|
1244
|
+
* Note: this throws DOMException("Aborted", "AbortError") on cancel.
|
|
1245
|
+
* The runner's outer try/catch swallows that specific error and exits;
|
|
1246
|
+
* any other rejection bubbles up so authoring bugs aren't silenced.
|
|
1247
|
+
*/
|
|
1248
|
+
/**
|
|
1249
|
+
* Promisified setTimeout that resolves after `ms` milliseconds, or
|
|
1250
|
+
* rejects with an AbortError if the signal fires first. Resolves
|
|
1251
|
+
* immediately if `ms <= 0`.
|
|
1252
|
+
*/
|
|
1253
|
+
declare function sleep(ms: number, signal?: AbortSignal): Promise<void>;
|
|
1254
|
+
/**
|
|
1255
|
+
* Type `text` one character at a time, calling `onTick(partial)` for
|
|
1256
|
+
* each prefix. Stagger between ticks defaults to 22ms (the `normal`
|
|
1257
|
+
* speed preset's `tokenStagger`).
|
|
1258
|
+
*
|
|
1259
|
+
* `onTick` receives the cumulative typed text (not the new char), so
|
|
1260
|
+
* consumers can do `setBuffer(prefix + partial)` without tracking state
|
|
1261
|
+
* themselves. The final call fires with the complete text — there's no
|
|
1262
|
+
* separate "done" callback.
|
|
1263
|
+
*/
|
|
1264
|
+
declare function typeText(text: string, onTick: (partial: string) => void, stagger?: number, signal?: AbortSignal): Promise<void>;
|
|
1265
|
+
|
|
1266
|
+
/**
|
|
1267
|
+
* useScriptedDemo — the shared step-machine hook behind every
|
|
1268
|
+
* scripted-demo surface in gradeui (`<Code>`, `<Composer>`,
|
|
1269
|
+
* `<DemoStage>`, anything else that wants the same play / stop / speed
|
|
1270
|
+
* semantics).
|
|
1271
|
+
*
|
|
1272
|
+
* Generic over the Step type. Each consumer defines its own verbs
|
|
1273
|
+
* (Code has `output`, Composer has `mention`, DemoStage has `reveal`)
|
|
1274
|
+
* and passes an `interpret(step, ctx)` callback that executes one
|
|
1275
|
+
* step. The hook owns: sequencing, cancellation, trigger detection
|
|
1276
|
+
* (mount / inView / manual), loop, pre-delay, completion signal, and
|
|
1277
|
+
* the imperative play() / stop() API.
|
|
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
|
+
*
|
|
1288
|
+
* Authoring guide for `interpret`:
|
|
1289
|
+
* - `await sleep(ms, ctx.signal)` for any pause so stop() can short
|
|
1290
|
+
* a long wait cleanly.
|
|
1291
|
+
* - `await typeText(text, onTick, stagger, ctx.signal)` for typing
|
|
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.
|
|
1295
|
+
* - Read `ctx.speed` to grab the resolved DEMO_SPEED_PRESETS entry
|
|
1296
|
+
* when a step doesn't pin its own cadence.
|
|
1297
|
+
* - Throw nothing on cancel — the helpers do it for you. Anything
|
|
1298
|
+
* else thrown is treated as a real bug and bubbles to the console.
|
|
1299
|
+
*/
|
|
1300
|
+
interface ScriptedDemoContext {
|
|
1301
|
+
/** Resolved speed preset for the current run. Zeroed under reduced motion. */
|
|
1302
|
+
speed: (typeof DEMO_SPEED_PRESETS)[DemoSpeed];
|
|
1303
|
+
/** AbortSignal that fires on stop() / unmount / steps change. */
|
|
1304
|
+
signal: AbortSignal;
|
|
1305
|
+
/** Live cancellation check for code paths that can't take a signal. */
|
|
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;
|
|
1311
|
+
}
|
|
1312
|
+
interface UseScriptedDemoOptions<TStep> {
|
|
1313
|
+
/** The steps to run. Undefined or empty means "no script". */
|
|
1314
|
+
steps?: TStep[];
|
|
1315
|
+
/**
|
|
1316
|
+
* Per-step interpreter. Receives one step + a context with timing
|
|
1317
|
+
* helpers, runs whatever the step means, and returns when done.
|
|
1318
|
+
* Synchronous or async — the runner awaits either.
|
|
1319
|
+
*/
|
|
1320
|
+
interpret: (step: TStep, ctx: ScriptedDemoContext) => Promise<void> | void;
|
|
1321
|
+
/** Animation feel. Defaults to `normal`. */
|
|
1322
|
+
speed?: DemoSpeed;
|
|
1323
|
+
/** What kicks the script off. Defaults to `mount`. */
|
|
1324
|
+
trigger?: DemoTrigger;
|
|
1325
|
+
/** For `trigger="manual"` — flip true to play. */
|
|
1326
|
+
play?: boolean;
|
|
1327
|
+
/** Loop the sequence forever after completion. Pause length controlled by `loopDelay`. */
|
|
1328
|
+
loop?: boolean;
|
|
1329
|
+
/**
|
|
1330
|
+
* Milliseconds to pause between loop cycles. Only applies when
|
|
1331
|
+
* `loop` is true. Defaults to 2000. Marketing surfaces that want
|
|
1332
|
+
* the demo to breathe between repeats bump this to 4000-6000; tight
|
|
1333
|
+
* inline demos drop it to 800.
|
|
1334
|
+
*/
|
|
1335
|
+
loopDelay?: number;
|
|
1336
|
+
/** Container ref for inView detection. Required when `trigger="inView"`. */
|
|
1337
|
+
containerRef?: React$1.RefObject<HTMLElement | null>;
|
|
1338
|
+
/**
|
|
1339
|
+
* Fires when one loop iteration completes (or the whole run, when
|
|
1340
|
+
* `loop` is false). Consumers can use this to reset their buffer or
|
|
1341
|
+
* fire a parent callback.
|
|
1342
|
+
*/
|
|
1343
|
+
onComplete?: () => void;
|
|
1344
|
+
/**
|
|
1345
|
+
* Fires before each loop iteration starts (after the 2s pause).
|
|
1346
|
+
* Use to reset per-iteration state in the consumer.
|
|
1347
|
+
*/
|
|
1348
|
+
onLoopReset?: () => void;
|
|
1349
|
+
}
|
|
1350
|
+
interface ScriptedDemoState {
|
|
1351
|
+
/** True while the runner is actively walking steps. */
|
|
1352
|
+
isPlaying: boolean;
|
|
1353
|
+
/** True after the last step has run (and stays true until reset). */
|
|
1354
|
+
isComplete: boolean;
|
|
1355
|
+
/** 0-indexed pointer to the currently executing step, or -1 idle. */
|
|
1356
|
+
currentIndex: number;
|
|
1357
|
+
/** Imperative trigger. Mostly for `trigger="manual"` ref handles. */
|
|
1358
|
+
play: () => void;
|
|
1359
|
+
/** Cancel the in-flight script. Idempotent. */
|
|
1360
|
+
stop: () => void;
|
|
1361
|
+
/**
|
|
1362
|
+
* One-shot replay. Cancels any in-flight run, then re-plays from
|
|
1363
|
+
* step 0. Pass a delay in ms to schedule the replay (useful for
|
|
1364
|
+
* "play, finish, breathe, play once more" cadences without the
|
|
1365
|
+
* commitment of `loop`).
|
|
1366
|
+
*/
|
|
1367
|
+
restart: (delayMs?: number) => void;
|
|
1368
|
+
}
|
|
1369
|
+
declare function useScriptedDemo<TStep>(opts: UseScriptedDemoOptions<TStep>): ScriptedDemoState;
|
|
1370
|
+
|
|
1371
|
+
/**
|
|
1372
|
+
* BlinkingCursor — the shared caret used by every scripted-demo
|
|
1373
|
+
* surface in gradeui. Styled via CSS variables so each host (Code's
|
|
1374
|
+
* terminal, Composer's inline caret, future surfaces) can tweak
|
|
1375
|
+
* dimensions and colour without forking the component.
|
|
1376
|
+
*
|
|
1377
|
+
* Tokens read from the cascade:
|
|
1378
|
+
* --gds-demo-cursor-color defaults to currentColor
|
|
1379
|
+
* --gds-demo-cursor-width defaults to 0.55ch (a hair narrower than
|
|
1380
|
+
* a monospace char so it reads as a caret
|
|
1381
|
+
* rather than a block)
|
|
1382
|
+
* --gds-demo-cursor-height defaults to 1.1em
|
|
1383
|
+
*
|
|
1384
|
+
* The animation lives in `styles/globals.css` as `.gds-demo-cursor`
|
|
1385
|
+
* (alongside the other demo primitives). Keeping it in CSS rather
|
|
1386
|
+
* than motion / framer keeps the cursor available in environments
|
|
1387
|
+
* that disable JS animation but still render the page.
|
|
1388
|
+
*/
|
|
1389
|
+
interface BlinkingCursorProps extends Omit<React$1.HTMLAttributes<HTMLSpanElement>, "children"> {
|
|
1390
|
+
/**
|
|
1391
|
+
* Visual variant. `inline` (default) is for caret-in-text demos
|
|
1392
|
+
* (Code, Composer). `block` is for terminal-style square cursors
|
|
1393
|
+
* that fill a character cell.
|
|
1394
|
+
*/
|
|
1395
|
+
variant?: "inline" | "block";
|
|
1396
|
+
}
|
|
1397
|
+
declare const BlinkingCursor: React$1.ForwardRefExoticComponent<BlinkingCursorProps & React$1.RefAttributes<HTMLSpanElement>>;
|
|
1398
|
+
|
|
1399
|
+
/**
|
|
1400
|
+
* DemoStage + Reveal — staged appearance for whole-interface demos.
|
|
1401
|
+
*
|
|
1402
|
+
* Drop `<Reveal id="hero">…</Reveal>` around any subtree that should
|
|
1403
|
+
* appear on cue. Wrap a region in `<DemoStage steps={…}>` and the
|
|
1404
|
+
* script drives which targets become visible, in what order, with
|
|
1405
|
+
* what cadence. Same speed / trigger / loop / play semantics as
|
|
1406
|
+
* `<Code>` and `<Composer>`.
|
|
1407
|
+
*
|
|
1408
|
+
* Why a context-based pattern instead of one-component-per-region:
|
|
1409
|
+
* - Authoring stays declarative — the script reads as a storyboard,
|
|
1410
|
+
* not as a stack of imperative ref calls.
|
|
1411
|
+
* - Reveals can live deep in a subtree without prop-drilling.
|
|
1412
|
+
* - The same `<Reveal>` works whether or not a parent stage exists
|
|
1413
|
+
* (it just renders visible if there's no context, so the same
|
|
1414
|
+
* markup ships to production without the demo wrapper).
|
|
1415
|
+
*
|
|
1416
|
+
* Reduced motion: if the user has `prefers-reduced-motion`, every
|
|
1417
|
+
* Reveal renders immediately at its destination state — the stage's
|
|
1418
|
+
* script still walks, but the visual transitions are no-ops.
|
|
1419
|
+
*/
|
|
1420
|
+
type RevealStep = {
|
|
1421
|
+
type: "reveal";
|
|
1422
|
+
target: string;
|
|
1423
|
+
} | {
|
|
1424
|
+
type: "reveal-all";
|
|
1425
|
+
} | {
|
|
1426
|
+
type: "hide";
|
|
1427
|
+
target: string;
|
|
1428
|
+
} | {
|
|
1429
|
+
type: "wait";
|
|
1430
|
+
ms: number;
|
|
1431
|
+
} | {
|
|
1432
|
+
type: "reset";
|
|
1433
|
+
};
|
|
1434
|
+
type RevealAnimation = "fade" | "fade-up" | "fade-down" | "fade-left" | "fade-right" | "scale" | "none";
|
|
1435
|
+
interface DemoStageProps {
|
|
1436
|
+
/** Steps that drive which Reveals are visible at what time. */
|
|
1437
|
+
steps?: RevealStep[];
|
|
1438
|
+
/** Speed preset. Same vocabulary as Code / Composer. */
|
|
1439
|
+
speed?: DemoSpeed;
|
|
1440
|
+
/** When the stage starts running. Defaults to `mount`. */
|
|
1441
|
+
trigger?: DemoTrigger;
|
|
1442
|
+
/** For trigger="manual" — flip true to play. */
|
|
1443
|
+
play?: boolean;
|
|
1444
|
+
/** Loop the script forever. */
|
|
1445
|
+
loop?: boolean;
|
|
1446
|
+
/** Default enter animation for child Reveals that don't override. */
|
|
1447
|
+
defaultAnimation?: RevealAnimation;
|
|
1448
|
+
/**
|
|
1449
|
+
* Render content visible by default (every target shown) when the
|
|
1450
|
+
* stage has no steps. Useful for sharing the same JSX between live
|
|
1451
|
+
* production use and demo playback.
|
|
1452
|
+
*/
|
|
1453
|
+
visibleWhenIdle?: boolean;
|
|
1454
|
+
className?: string;
|
|
1455
|
+
children: React$1.ReactNode;
|
|
1456
|
+
}
|
|
1457
|
+
declare function DemoStage({ steps, speed, trigger, play, loop, defaultAnimation, visibleWhenIdle, className, children, }: DemoStageProps): React$1.JSX.Element;
|
|
1458
|
+
interface RevealProps {
|
|
1459
|
+
/** Stage target id. The matching `{ type: "reveal", target: id }` step shows this. */
|
|
1460
|
+
id: string;
|
|
1461
|
+
/** Enter animation. Falls back to the parent stage's `defaultAnimation`. */
|
|
1462
|
+
animation?: RevealAnimation;
|
|
1463
|
+
/** Override transition duration (ms). Defaults to the stage speed's fadeMs. */
|
|
1464
|
+
durationMs?: number;
|
|
1465
|
+
/**
|
|
1466
|
+
* When true and there's no parent DemoStage, render hidden anyway.
|
|
1467
|
+
* Default false — naked usage renders visible so production markup
|
|
1468
|
+
* matches demo markup.
|
|
1469
|
+
*/
|
|
1470
|
+
hideOutsideStage?: boolean;
|
|
1471
|
+
/**
|
|
1472
|
+
* Fires when this Reveal transitions from hidden to visible. Use to
|
|
1473
|
+
* kick off a nested scripted demo (Composer.restart(), Code.play(),
|
|
1474
|
+
* etc) at the moment the user actually sees the surface. Without
|
|
1475
|
+
* this hook, nested demos with `trigger="mount"` would run while
|
|
1476
|
+
* still hidden and the user would miss the animation entirely.
|
|
1477
|
+
*/
|
|
1478
|
+
onReveal?: () => void;
|
|
1479
|
+
/**
|
|
1480
|
+
* Fires when this Reveal transitions from visible to hidden (e.g.
|
|
1481
|
+
* because the stage script ran a `hide` step or looped via `reset`).
|
|
1482
|
+
* Use to pause/reset nested state.
|
|
1483
|
+
*/
|
|
1484
|
+
onHide?: () => void;
|
|
1485
|
+
className?: string;
|
|
1486
|
+
children: React$1.ReactNode;
|
|
1487
|
+
}
|
|
1488
|
+
declare function Reveal({ id, animation, durationMs, hideOutsideStage, onReveal, onHide, className, children, }: RevealProps): React$1.JSX.Element;
|
|
1489
|
+
|
|
1490
|
+
/**
|
|
1491
|
+
* Composer — the generic text composition surface for the design system.
|
|
1492
|
+
*
|
|
1493
|
+
* The answer wherever a user is composing a message: AI chat input,
|
|
1494
|
+
* comment thread reply, post-body editor, future copilot panels.
|
|
1495
|
+
* Replaces the textarea-with-buttons pattern that hosts kept rolling
|
|
1496
|
+
* by hand.
|
|
1497
|
+
*
|
|
1498
|
+
* Built on Lexical (Meta's React-first editor framework) so it can do:
|
|
1499
|
+
* - rich text formatting (B / I / U / S / code, headings, blockquote,
|
|
1500
|
+
* pullquote, lists)
|
|
1501
|
+
* - mentions and slash commands via lexical-beautiful-mentions, with
|
|
1502
|
+
* a typeahead popover and theme-able tokens
|
|
1503
|
+
* - image attachments (paperclip + clipboard paste) when opted in
|
|
1504
|
+
* - scripted demo playback for marketing surfaces (types text, opens
|
|
1505
|
+
* mention popovers, applies formatting, all via the same step
|
|
1506
|
+
* vocabulary as <Code>)
|
|
1507
|
+
*
|
|
1508
|
+
* Slot-based composition for the action row: hosts that need custom
|
|
1509
|
+
* affordances (template picker, voice button, attach-document) pass
|
|
1510
|
+
* `leftActions` / `rightActions`. Default Send / Stop / paperclip
|
|
1511
|
+
* render only when the host hasn't replaced the slot.
|
|
1512
|
+
*
|
|
1513
|
+
* Hosts that want the canned "chat composer with paperclip + send"
|
|
1514
|
+
* preset should reach for `<AIChatComposer>` instead, which configures
|
|
1515
|
+
* this Composer with the right slots wired up.
|
|
1516
|
+
*
|
|
1517
|
+
* Scripted demos: same `speed` / `trigger` / `play` / `loop` vocabulary
|
|
1518
|
+
* as `<Code>`, sharing the underlying `useScriptedDemo` hook from
|
|
1519
|
+
* `lib/demo/`. The Composer adds its own verbs (`mention`, `format`,
|
|
1520
|
+
* `select`, `submit`) on top of the universal `type` / `wait` / `clear`.
|
|
1521
|
+
*/
|
|
1522
|
+
type ComposerFormat = "bold" | "italic" | "underline" | "strikethrough" | "code" | "h1" | "h2" | "h3" | "blockquote" | "pullquote" | "ul" | "ol";
|
|
1523
|
+
interface ComposerMentionItem {
|
|
1524
|
+
id: string;
|
|
1525
|
+
/** Display value (without the trigger char). */
|
|
1526
|
+
value: string;
|
|
1527
|
+
/** Optional secondary label shown in the suggester. */
|
|
1528
|
+
label?: string;
|
|
1529
|
+
/** Avatar URL or initials for the suggester row. */
|
|
1530
|
+
avatar?: string;
|
|
1531
|
+
/** Arbitrary payload the host can attach to the mention. */
|
|
1532
|
+
data?: Record<string, unknown>;
|
|
1533
|
+
}
|
|
1534
|
+
interface ComposerTriggerConfig {
|
|
1535
|
+
/** The trigger character, eg. "@" or "/". */
|
|
1536
|
+
char: string;
|
|
1537
|
+
/**
|
|
1538
|
+
* Items to populate the suggester. Either a static array or a
|
|
1539
|
+
* resolver function (sync or async) that receives the typed query.
|
|
1540
|
+
* The plugin filters automatically when items is an array.
|
|
1541
|
+
*/
|
|
1542
|
+
items: ComposerMentionItem[] | ((query: string) => ComposerMentionItem[] | Promise<ComposerMentionItem[]>);
|
|
1543
|
+
/**
|
|
1544
|
+
* Whether to strip the trigger char on insert. Defaults: keep for
|
|
1545
|
+
* "@" (mentions read as "@alice"), strip for "/" (commands read as
|
|
1546
|
+
* "Insert image" not "/insert-image").
|
|
1547
|
+
*/
|
|
1548
|
+
stripTrigger?: boolean;
|
|
1549
|
+
}
|
|
1550
|
+
interface ComposerAttachmentConfig {
|
|
1551
|
+
/** Master enable. Set true on the prop to use defaults, or pass a config object. */
|
|
1552
|
+
enabled?: boolean;
|
|
1553
|
+
/** HTML accept attribute on the file input. Default "image/*". */
|
|
1554
|
+
accept?: string;
|
|
1555
|
+
/** Max number of attachments. Default 10. */
|
|
1556
|
+
maxItems?: number;
|
|
1557
|
+
/** Allow multiple selection in the file picker. Default true. */
|
|
1558
|
+
multiple?: boolean;
|
|
1559
|
+
}
|
|
1560
|
+
interface ComposerAttachment {
|
|
1561
|
+
id: string;
|
|
1562
|
+
file: File;
|
|
1563
|
+
/** Object URL owned by the composer. Hosts must NOT revoke it. */
|
|
1564
|
+
previewUrl: string;
|
|
1565
|
+
name: string;
|
|
1566
|
+
}
|
|
1567
|
+
interface ComposerContent {
|
|
1568
|
+
/** Plain text representation of the editor contents (whitespace preserved). */
|
|
1569
|
+
text: string;
|
|
1570
|
+
/** Lexical editor state serialised to JSON (for round-trip persistence). */
|
|
1571
|
+
json: string;
|
|
1572
|
+
/** Resolved mention tokens in document order. */
|
|
1573
|
+
mentions: Array<{
|
|
1574
|
+
trigger: string;
|
|
1575
|
+
value: string;
|
|
1576
|
+
data?: Record<string, unknown>;
|
|
1577
|
+
}>;
|
|
1578
|
+
}
|
|
1579
|
+
interface ComposerHandle {
|
|
1580
|
+
/** Run a demo script imperatively (vs. via `steps` + `trigger="manual"`). */
|
|
1581
|
+
play: (steps: ComposerStep[]) => void;
|
|
1582
|
+
/** Cancel an in-flight demo. Idempotent. */
|
|
1583
|
+
stop: () => void;
|
|
1584
|
+
/**
|
|
1585
|
+
* One-shot replay of the configured `steps`. Cancels any in-flight
|
|
1586
|
+
* run, clears the editor, replays from step 0. Pass a delay (ms) to
|
|
1587
|
+
* schedule the replay (useful for chaining demos). Requires `steps`
|
|
1588
|
+
* to be configured.
|
|
1589
|
+
*/
|
|
1590
|
+
restart: (delayMs?: number) => void;
|
|
1591
|
+
/** Move focus into the editor. */
|
|
1592
|
+
focus: () => void;
|
|
1593
|
+
/** Wipe the editor. */
|
|
1594
|
+
clear: () => void;
|
|
1595
|
+
/** Insert plain text at the current selection. */
|
|
1596
|
+
insert: (text: string) => void;
|
|
1597
|
+
/** Snapshot the current content + mentions. */
|
|
1598
|
+
getContent: () => ComposerContent;
|
|
1599
|
+
/** Direct access to the underlying Lexical editor (escape hatch). */
|
|
1600
|
+
getEditor: () => LexicalEditor | null;
|
|
1601
|
+
}
|
|
1602
|
+
/**
|
|
1603
|
+
* Demo step vocabulary for Composer scripts. Shares `type` / `wait` /
|
|
1604
|
+
* `clear` with the universal `lib/demo` verbs; adds composer-specific
|
|
1605
|
+
* `mention`, `format`, `select`, `newline`, `submit` on top.
|
|
1606
|
+
*/
|
|
1607
|
+
type ComposerStep = {
|
|
1608
|
+
type: "type";
|
|
1609
|
+
text: string;
|
|
1610
|
+
speed?: DemoSpeed;
|
|
1611
|
+
} | {
|
|
1612
|
+
type: "wait";
|
|
1613
|
+
ms: number;
|
|
1614
|
+
} | {
|
|
1615
|
+
type: "clear";
|
|
1616
|
+
} | {
|
|
1617
|
+
type: "newline";
|
|
1618
|
+
} | {
|
|
1619
|
+
type: "submit";
|
|
1620
|
+
} | {
|
|
1621
|
+
type: "mention";
|
|
1622
|
+
/** Trigger char (must match a registered ComposerTriggerConfig.char). */
|
|
1623
|
+
trigger: string;
|
|
1624
|
+
/** Value to insert (without the trigger). Looks up the matching item by `value`. */
|
|
1625
|
+
value: string;
|
|
1626
|
+
/** Optional pre-typed query — the demo types this after the trigger char before "selecting" the value, to show the typeahead in action. */
|
|
1627
|
+
query?: string;
|
|
1628
|
+
} | {
|
|
1629
|
+
type: "format";
|
|
1630
|
+
format: ComposerFormat;
|
|
1631
|
+
} | {
|
|
1632
|
+
type: "select";
|
|
1633
|
+
/** Substring to find and select. First match wins. */
|
|
1634
|
+
text: string;
|
|
1635
|
+
};
|
|
1636
|
+
interface ComposerProps {
|
|
1637
|
+
/** Placeholder copy shown when empty. */
|
|
1638
|
+
placeholder?: string;
|
|
1639
|
+
/** Initial plain text content. For richer initial state, use `initialJson`. */
|
|
1640
|
+
initialText?: string;
|
|
1641
|
+
/** Initial Lexical state JSON (from a previous `onSubmit` round-trip). */
|
|
1642
|
+
initialJson?: string;
|
|
1643
|
+
/**
|
|
1644
|
+
* Available formats. Pass false to disable rich text entirely
|
|
1645
|
+
* (plain text mode, half the bundle weight, no toolbar). Default
|
|
1646
|
+
* enables a sensible set for most chat / comment surfaces.
|
|
1647
|
+
*/
|
|
1648
|
+
formats?: ComposerFormat[] | false;
|
|
1649
|
+
/**
|
|
1650
|
+
* Render the formatting toolbar. Default false because most uses
|
|
1651
|
+
* are short-form. Set true (or "top") to show the toolbar above the
|
|
1652
|
+
* editor. "floating" is planned; not yet implemented.
|
|
1653
|
+
*/
|
|
1654
|
+
toolbar?: boolean | "top";
|
|
1655
|
+
/**
|
|
1656
|
+
* Mention / slash command configs. Each entry registers one trigger
|
|
1657
|
+
* char and its items. Pass `[{ char: "@", items: people }, { char: "/", items: commands }]`
|
|
1658
|
+
* for the common chat-app setup.
|
|
1659
|
+
*/
|
|
1660
|
+
triggers?: ComposerTriggerConfig[];
|
|
1661
|
+
/**
|
|
1662
|
+
* Image attachments (paperclip + clipboard paste). Pass true for
|
|
1663
|
+
* defaults, an object to customise, or omit/false to skip the
|
|
1664
|
+
* attachment plumbing entirely.
|
|
1665
|
+
*/
|
|
1666
|
+
attachments?: boolean | ComposerAttachmentConfig;
|
|
1667
|
+
/** Fires when the user submits (Enter, click Send, or scripted `submit` step). */
|
|
1668
|
+
onSubmit?: (content: ComposerContent, attachments?: ComposerAttachment[]) => void;
|
|
1669
|
+
/**
|
|
1670
|
+
* Fires on every editor change with the current plain text. Use for
|
|
1671
|
+
* length validation, controlled-value bridges (eg. AIChatComposer
|
|
1672
|
+
* forwarding to a host's `value`/`onChange` pair), or live preview
|
|
1673
|
+
* surfaces. Cheap, called frequently; debounce if you need the
|
|
1674
|
+
* Lexical state JSON (use `getContent()` via ref instead).
|
|
1675
|
+
*/
|
|
1676
|
+
onChange?: (text: string) => void;
|
|
1677
|
+
/**
|
|
1678
|
+
* Loading state — disables the editor + paperclip and swaps the
|
|
1679
|
+
* default Send button for Stop. Has no effect when `rightActions`
|
|
1680
|
+
* overrides the default Send.
|
|
1681
|
+
*/
|
|
1682
|
+
isLoading?: boolean;
|
|
1683
|
+
/** Stop handler — required for Stop to be active when loading. */
|
|
1684
|
+
onStop?: () => void;
|
|
1685
|
+
/** Hard character cap. */
|
|
1686
|
+
maxLength?: number;
|
|
1687
|
+
/** Auto-focus the editor on mount. Default false. */
|
|
1688
|
+
autoFocus?: boolean;
|
|
1689
|
+
/** Whether Enter submits. Default true (Shift-Enter still inserts a newline). */
|
|
1690
|
+
submitOnEnter?: boolean;
|
|
1691
|
+
/**
|
|
1692
|
+
* Custom content for the left action slot. Replaces the default
|
|
1693
|
+
* paperclip button when `attachments` is enabled.
|
|
1694
|
+
*/
|
|
1695
|
+
leftActions?: React$1.ReactNode;
|
|
1696
|
+
/**
|
|
1697
|
+
* Custom content for the right action slot. Replaces the default
|
|
1698
|
+
* Send / Stop button. Use the `useComposer()` hook inside to access
|
|
1699
|
+
* imperative methods.
|
|
1700
|
+
*/
|
|
1701
|
+
rightActions?: React$1.ReactNode;
|
|
1702
|
+
/** Hide the default Send button without replacing it. */
|
|
1703
|
+
hideSend?: boolean;
|
|
1704
|
+
/** Scripted demo steps. */
|
|
1705
|
+
steps?: ComposerStep[];
|
|
1706
|
+
/** What kicks the script off. Defaults to "mount". */
|
|
1707
|
+
trigger?: DemoTrigger;
|
|
1708
|
+
/** For trigger="manual" — flip true to play. */
|
|
1709
|
+
play?: boolean;
|
|
1710
|
+
/** Animation feel. */
|
|
1711
|
+
speed?: DemoSpeed;
|
|
1712
|
+
/** Loop the script forever. */
|
|
1713
|
+
loop?: boolean;
|
|
1714
|
+
/**
|
|
1715
|
+
* Pause between loop iterations (ms). Defaults to 2000. Marketing
|
|
1716
|
+
* heroes that want the demo to breathe between repeats bump this
|
|
1717
|
+
* higher; tight inline demos drop it.
|
|
1718
|
+
*/
|
|
1719
|
+
loopDelay?: number;
|
|
1720
|
+
/**
|
|
1721
|
+
* Fires once per loop cycle, AFTER the loopDelay pause and BEFORE
|
|
1722
|
+
* the script replays. Use to reset parent state that the script
|
|
1723
|
+
* mutated via onSubmit (e.g., wipe a messages list back to its
|
|
1724
|
+
* seed before the demo types into it again). The editor is cleared
|
|
1725
|
+
* automatically — you only need this hook if state outside the
|
|
1726
|
+
* Composer needs to reset too.
|
|
1727
|
+
*/
|
|
1728
|
+
onLoopReset?: () => void;
|
|
1729
|
+
/**
|
|
1730
|
+
* Bare mode — strip the card chrome (border / bg / rounding). Use
|
|
1731
|
+
* when embedding inside an existing card or column layout.
|
|
1732
|
+
*/
|
|
1733
|
+
bare?: boolean;
|
|
1734
|
+
/**
|
|
1735
|
+
* Read-only mode — disables editing AND focusability. Programmatic
|
|
1736
|
+
* updates (including scripted demo playback) still work. Use for
|
|
1737
|
+
* marketing surfaces that render a Composer purely for show, so the
|
|
1738
|
+
* scripted typing doesn't steal focus from other inputs on the page.
|
|
1739
|
+
* Hides the default Send / paperclip action row.
|
|
1740
|
+
*/
|
|
1741
|
+
readOnly?: boolean;
|
|
1742
|
+
className?: string;
|
|
1743
|
+
}
|
|
1744
|
+
declare const Composer: React$1.ForwardRefExoticComponent<ComposerProps & React$1.RefAttributes<ComposerHandle>>;
|
|
1745
|
+
declare const ComposerReply: React$1.ForwardRefExoticComponent<ComposerProps & React$1.RefAttributes<ComposerHandle>>;
|
|
1746
|
+
|
|
938
1747
|
/**
|
|
939
1748
|
* DatePicker + DateRangePicker
|
|
940
1749
|
*
|
|
@@ -1033,6 +1842,15 @@ declare const DialogDescription: React$1.ForwardRefExoticComponent<Omit<DialogPr
|
|
|
1033
1842
|
|
|
1034
1843
|
declare const DropdownMenu: React$1.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
1035
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";
|
|
1036
1854
|
declare const DropdownMenuGroup: React$1.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1037
1855
|
declare const DropdownMenuPortal: React$1.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
|
|
1038
1856
|
declare const DropdownMenuSub: React$1.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
@@ -1043,6 +1861,8 @@ declare const DropdownMenuSubTrigger: React$1.ForwardRefExoticComponent<Omit<Dro
|
|
|
1043
1861
|
interface DropdownMenuSubContentProps extends React$1.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent> {
|
|
1044
1862
|
/** What the submenu surface is *made of*. See dropdown-menu.md. */
|
|
1045
1863
|
surface?: Surface;
|
|
1864
|
+
/** Menu density — cascades to items via context. */
|
|
1865
|
+
size?: DropdownMenuSize;
|
|
1046
1866
|
}
|
|
1047
1867
|
declare const DropdownMenuSubContent: React$1.ForwardRefExoticComponent<DropdownMenuSubContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1048
1868
|
interface DropdownMenuContentProps extends React$1.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> {
|
|
@@ -1052,6 +1872,8 @@ interface DropdownMenuContentProps extends React$1.ComponentPropsWithoutRef<type
|
|
|
1052
1872
|
* floating over rich canvases. See dropdown-menu.md.
|
|
1053
1873
|
*/
|
|
1054
1874
|
surface?: Surface;
|
|
1875
|
+
/** Menu density — cascades to items via context. */
|
|
1876
|
+
size?: DropdownMenuSize;
|
|
1055
1877
|
}
|
|
1056
1878
|
declare const DropdownMenuContent: React$1.ForwardRefExoticComponent<DropdownMenuContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1057
1879
|
declare const DropdownMenuItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
@@ -1081,15 +1903,26 @@ declare const DropdownMenuShortcut: {
|
|
|
1081
1903
|
* rationale.
|
|
1082
1904
|
*/
|
|
1083
1905
|
declare const inputVariants: (props?: ({
|
|
1084
|
-
size?: "default" | "sm" | null | undefined;
|
|
1906
|
+
size?: "default" | "sm" | "xs" | null | undefined;
|
|
1085
1907
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1086
1908
|
type InputSize = NonNullable<VariantProps<typeof inputVariants>["size"]>;
|
|
1087
1909
|
type InputProps = Omit<React$1.ComponentProps<"input">, "size"> & {
|
|
1088
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;
|
|
1089
1920
|
};
|
|
1090
1921
|
declare const Input: React$1.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
|
|
1091
1922
|
|
|
1092
|
-
declare const Label: React$1.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React$1.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?:
|
|
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>>;
|
|
1093
1926
|
|
|
1094
1927
|
declare const Popover: React$1.FC<PopoverPrimitive.PopoverProps>;
|
|
1095
1928
|
declare const PopoverTrigger: React$1.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1232,7 +2065,7 @@ declare const RadioGroupItem: React$1.ForwardRefExoticComponent<Omit<RadioGroupP
|
|
|
1232
2065
|
* </ResizablePanelGroup>
|
|
1233
2066
|
*/
|
|
1234
2067
|
declare const ResizablePanelGroup: ({ className, ...props }: React$1.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => React$1.JSX.Element;
|
|
1235
|
-
declare const ResizablePanel: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<
|
|
2068
|
+
declare const ResizablePanel: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<HTMLHeadElement | HTMLElement | HTMLLinkElement | HTMLDivElement | HTMLObjectElement | HTMLAnchorElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLButtonElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFormElement | HTMLHeadingElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLImageElement | HTMLInputElement | HTMLLabelElement | HTMLLegendElement | HTMLLIElement | HTMLMapElement | HTMLMetaElement | HTMLMeterElement | HTMLOListElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLParagraphElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSlotElement | HTMLSourceElement | HTMLSpanElement | HTMLStyleElement | HTMLTableElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTemplateElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
|
|
1236
2069
|
className?: string | undefined;
|
|
1237
2070
|
collapsedSize?: number | undefined;
|
|
1238
2071
|
collapsible?: boolean | undefined;
|
|
@@ -1271,9 +2104,9 @@ declare const ResizableHandle: ({ withHandle, className, ...props }: React$1.Com
|
|
|
1271
2104
|
* etc.) and is a separate primitive.
|
|
1272
2105
|
*/
|
|
1273
2106
|
declare const rowVariants: (props?: ({
|
|
1274
|
-
gap?: "none" | "sm" | "md" | "lg" | "
|
|
1275
|
-
align?: "
|
|
1276
|
-
justify?: "
|
|
2107
|
+
gap?: "none" | "sm" | "md" | "lg" | "xl" | "xs" | "2xl" | null | undefined;
|
|
2108
|
+
align?: "center" | "start" | "end" | "stretch" | "baseline" | null | undefined;
|
|
2109
|
+
justify?: "center" | "start" | "between" | "end" | "around" | "evenly" | null | undefined;
|
|
1277
2110
|
wrap?: boolean | null | undefined;
|
|
1278
2111
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1279
2112
|
interface RowProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof rowVariants> {
|
|
@@ -1307,8 +2140,8 @@ declare const Row: React$1.ForwardRefExoticComponent<RowProps & React$1.RefAttri
|
|
|
1307
2140
|
*/
|
|
1308
2141
|
declare const gridVariants: (props?: ({
|
|
1309
2142
|
cols?: "1" | "2" | "3" | "4" | "5" | "6" | "12" | null | undefined;
|
|
1310
|
-
gap?: "none" | "sm" | "md" | "lg" | "
|
|
1311
|
-
align?: "
|
|
2143
|
+
gap?: "none" | "sm" | "md" | "lg" | "xl" | "xs" | "2xl" | null | undefined;
|
|
2144
|
+
align?: "center" | "start" | "end" | "stretch" | null | undefined;
|
|
1312
2145
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1313
2146
|
interface GridProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof gridVariants> {
|
|
1314
2147
|
/** When true, render as the single child element via Radix Slot — lets
|
|
@@ -1340,10 +2173,10 @@ declare const Grid: React$1.ForwardRefExoticComponent<GridProps & React$1.RefAtt
|
|
|
1340
2173
|
* case. Flex is the escape hatch, not the default.
|
|
1341
2174
|
*/
|
|
1342
2175
|
declare const flexVariants: (props?: ({
|
|
1343
|
-
direction?: "
|
|
1344
|
-
gap?: "none" | "sm" | "md" | "lg" | "
|
|
1345
|
-
align?: "
|
|
1346
|
-
justify?: "
|
|
2176
|
+
direction?: "col" | "row" | "row-reverse" | "col-reverse" | null | undefined;
|
|
2177
|
+
gap?: "none" | "sm" | "md" | "lg" | "xl" | "xs" | "2xl" | null | undefined;
|
|
2178
|
+
align?: "center" | "start" | "end" | "stretch" | "baseline" | null | undefined;
|
|
2179
|
+
justify?: "center" | "start" | "between" | "end" | "around" | "evenly" | null | undefined;
|
|
1347
2180
|
wrap?: "wrap" | "nowrap" | "wrap-reverse" | null | undefined;
|
|
1348
2181
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1349
2182
|
interface FlexProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof flexVariants> {
|
|
@@ -1360,6 +2193,15 @@ declare const ScrollBar: React$1.ForwardRefExoticComponent<Omit<ScrollAreaPrimit
|
|
|
1360
2193
|
declare const Select: React$1.FC<SelectPrimitive.SelectProps>;
|
|
1361
2194
|
declare const SelectGroup: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1362
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";
|
|
1363
2205
|
/**
|
|
1364
2206
|
* Select trigger variants — `size` lets dense surfaces (the
|
|
1365
2207
|
* Studio inspector, settings sheets) reach for a compact `sm`
|
|
@@ -1368,7 +2210,7 @@ declare const SelectValue: React$1.ForwardRefExoticComponent<SelectPrimitive.Sel
|
|
|
1368
2210
|
* existing call site.
|
|
1369
2211
|
*/
|
|
1370
2212
|
declare const selectTriggerVariants: (props?: ({
|
|
1371
|
-
size?: "default" | "sm" | null | undefined;
|
|
2213
|
+
size?: "default" | "sm" | "xs" | null | undefined;
|
|
1372
2214
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1373
2215
|
type SelectTriggerSize = NonNullable<VariantProps<typeof selectTriggerVariants>["size"]>;
|
|
1374
2216
|
declare const SelectTrigger: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
@@ -1376,7 +2218,9 @@ declare const SelectTrigger: React$1.ForwardRefExoticComponent<Omit<SelectPrimit
|
|
|
1376
2218
|
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1377
2219
|
declare const SelectScrollUpButton: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1378
2220
|
declare const SelectScrollDownButton: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1379
|
-
declare const SelectContent: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> &
|
|
2221
|
+
declare const SelectContent: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
2222
|
+
size?: SelectMenuSize;
|
|
2223
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
1380
2224
|
declare const SelectLabel: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1381
2225
|
declare const SelectItem: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1382
2226
|
declare const SelectSeparator: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -1389,7 +2233,7 @@ declare const SheetClose: React$1.ForwardRefExoticComponent<DialogPrimitive.Dial
|
|
|
1389
2233
|
declare const SheetPortal: React$1.FC<DialogPrimitive.DialogPortalProps>;
|
|
1390
2234
|
declare const SheetOverlay: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1391
2235
|
declare const sheetVariants: (props?: ({
|
|
1392
|
-
side?: "
|
|
2236
|
+
side?: "bottom" | "top" | "right" | "left" | null | undefined;
|
|
1393
2237
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1394
2238
|
interface SheetContentProps extends React$1.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
1395
2239
|
/**
|
|
@@ -1527,9 +2371,9 @@ declare const Sortable: SortableRootComponent;
|
|
|
1527
2371
|
* for a centred narrow column (auth cards, marketing copy).
|
|
1528
2372
|
*/
|
|
1529
2373
|
declare const stackVariants: (props?: ({
|
|
1530
|
-
gap?: "none" | "sm" | "md" | "lg" | "
|
|
1531
|
-
align?: "
|
|
1532
|
-
justify?: "
|
|
2374
|
+
gap?: "none" | "sm" | "md" | "lg" | "xl" | "xs" | "2xl" | null | undefined;
|
|
2375
|
+
align?: "center" | "start" | "end" | "stretch" | null | undefined;
|
|
2376
|
+
justify?: "center" | "start" | "between" | "end" | "around" | "evenly" | null | undefined;
|
|
1533
2377
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1534
2378
|
interface StackProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof stackVariants> {
|
|
1535
2379
|
/** When true, render as the single child element via Radix Slot — lets
|
|
@@ -1656,15 +2500,27 @@ interface TabsTriggerProps extends React$1.ComponentPropsWithoutRef<typeof TabsP
|
|
|
1656
2500
|
declare const TabsTrigger: React$1.ForwardRefExoticComponent<TabsTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1657
2501
|
declare const TabsContent: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1658
2502
|
|
|
1659
|
-
|
|
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>>;
|
|
1660
2516
|
|
|
1661
2517
|
declare const toggleVariants: (props?: ({
|
|
1662
2518
|
variant?: "default" | "outline" | null | undefined;
|
|
1663
|
-
size?: "default" | "sm" | "lg" | null | undefined;
|
|
2519
|
+
size?: "default" | "sm" | "lg" | "xs" | null | undefined;
|
|
1664
2520
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1665
2521
|
declare const Toggle: React$1.ForwardRefExoticComponent<Omit<TogglePrimitive.ToggleProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
1666
2522
|
variant?: "default" | "outline" | null | undefined;
|
|
1667
|
-
size?: "default" | "sm" | "lg" | null | undefined;
|
|
2523
|
+
size?: "default" | "sm" | "lg" | "xs" | null | undefined;
|
|
1668
2524
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1669
2525
|
|
|
1670
2526
|
declare const TooltipProvider: React$1.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
@@ -1749,7 +2605,7 @@ declare const ToggleGroupItem: React$1.ForwardRefExoticComponent<Omit<ToggleGrou
|
|
|
1749
2605
|
* persistent footer toolbars on mobile-style layouts.
|
|
1750
2606
|
*/
|
|
1751
2607
|
declare const toolbarVariants: (props?: ({
|
|
1752
|
-
position?: "
|
|
2608
|
+
position?: "bottom" | "top" | "inline" | null | undefined;
|
|
1753
2609
|
variant?: "default" | "transparent" | "subtle" | null | undefined;
|
|
1754
2610
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
1755
2611
|
sticky?: boolean | null | undefined;
|
|
@@ -1993,6 +2849,60 @@ declare const Map: React$1.ForwardRefExoticComponent<MapProps & React$1.RefAttri
|
|
|
1993
2849
|
|
|
1994
2850
|
declare const MapMarker: React$1.NamedExoticComponent<MapMarkerProps>;
|
|
1995
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
|
+
|
|
1996
2906
|
/**
|
|
1997
2907
|
* MediaSurface — the shared shell used by VideoPlayer, RivePlayer, ThreeScene
|
|
1998
2908
|
* AND the canonical "media slot" primitive for still images, posters, album
|
|
@@ -2030,7 +2940,7 @@ declare const MapMarker: React$1.NamedExoticComponent<MapMarkerProps>;
|
|
|
2030
2940
|
* the right semantics.
|
|
2031
2941
|
*/
|
|
2032
2942
|
|
|
2033
|
-
type MediaAspect = "video" | "square" | "portrait" | "wide" | "auto";
|
|
2943
|
+
type MediaAspect = "video" | "standard" | "square" | "portrait" | "wide" | "auto";
|
|
2034
2944
|
type MediaRadius = "none" | "sm" | "md" | "lg" | "xl";
|
|
2035
2945
|
/**
|
|
2036
2946
|
* What kind of media is this slot intended for? Drives three things:
|
|
@@ -2288,8 +3198,6 @@ interface BaseMediaProps {
|
|
|
2288
3198
|
className?: string;
|
|
2289
3199
|
style?: React$1.CSSProperties;
|
|
2290
3200
|
}
|
|
2291
|
-
/** Hook — returns `true` when the OS reports reduced-motion preference. */
|
|
2292
|
-
declare function usePrefersReducedMotion(): boolean;
|
|
2293
3201
|
|
|
2294
3202
|
/**
|
|
2295
3203
|
* VideoPlayer — native HTML5 video wrapped in a MediaSurface.
|
|
@@ -2333,6 +3241,153 @@ interface RivePlayerProps extends BaseMediaProps {
|
|
|
2333
3241
|
}
|
|
2334
3242
|
declare const RivePlayer: React$1.ForwardRefExoticComponent<RivePlayerProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
2335
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
|
+
|
|
2336
3391
|
/**
|
|
2337
3392
|
* Shared types for the three.js layer of the design system.
|
|
2338
3393
|
*
|
|
@@ -2402,6 +3457,7 @@ interface PostPreset {
|
|
|
2402
3457
|
};
|
|
2403
3458
|
};
|
|
2404
3459
|
}
|
|
3460
|
+
|
|
2405
3461
|
/** A shader preset is the data needed to instantiate one of the canned scenes. */
|
|
2406
3462
|
interface ShaderPreset {
|
|
2407
3463
|
id: string;
|
|
@@ -2419,6 +3475,10 @@ interface ShaderPreset {
|
|
|
2419
3475
|
defaultPalette?: Partial<Palette>;
|
|
2420
3476
|
/** Static poster image path for non-hover previews. Served from /public. */
|
|
2421
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[];
|
|
2422
3482
|
}
|
|
2423
3483
|
|
|
2424
3484
|
/**
|
|
@@ -2473,7 +3533,7 @@ declare function buildFragmentShaderScene(userFragment: string): SceneFactory;
|
|
|
2473
3533
|
* play/pause overlay. Scene pauses when offscreen (pauseOffscreen default `true`).
|
|
2474
3534
|
*/
|
|
2475
3535
|
|
|
2476
|
-
interface ThreeSceneProps extends Omit<BaseMediaProps, "src" | "poster"> {
|
|
3536
|
+
interface ThreeSceneProps extends Omit<BaseMediaProps, "src" | "poster">, Omit<React$1.HTMLAttributes<HTMLDivElement>, keyof BaseMediaProps> {
|
|
2477
3537
|
/** Preset id from the shader preset registry. */
|
|
2478
3538
|
preset?: string;
|
|
2479
3539
|
/**
|
|
@@ -2489,8 +3549,12 @@ interface ThreeSceneProps extends Omit<BaseMediaProps, "src" | "poster"> {
|
|
|
2489
3549
|
fragmentShader?: string;
|
|
2490
3550
|
/** Called when a supplied `fragmentShader` fails to compile. */
|
|
2491
3551
|
onShaderError?: (error: ShaderCompileError) => void;
|
|
2492
|
-
/** Post-FX preset
|
|
2493
|
-
|
|
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;
|
|
2494
3558
|
/** Palette overrides. Unset slots fall back to `DEFAULT_PALETTE`. */
|
|
2495
3559
|
palette?: Partial<Palette>;
|
|
2496
3560
|
/**
|
|
@@ -2502,9 +3566,161 @@ interface ThreeSceneProps extends Omit<BaseMediaProps, "src" | "poster"> {
|
|
|
2502
3566
|
poster?: string;
|
|
2503
3567
|
/** Pixel-ratio cap. Defaults to `Math.min(window.devicePixelRatio, 2)`. */
|
|
2504
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;
|
|
2505
3576
|
}
|
|
2506
3577
|
declare const ThreeScene: React$1.ForwardRefExoticComponent<ThreeSceneProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
2507
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
|
+
|
|
2508
3724
|
/**
|
|
2509
3725
|
* ShaderPresetPreview — a thumbnail-sized preview of a shader preset.
|
|
2510
3726
|
*
|
|
@@ -2524,7 +3740,7 @@ interface ShaderPresetPreviewProps {
|
|
|
2524
3740
|
postPreset?: string;
|
|
2525
3741
|
palette?: Partial<Palette>;
|
|
2526
3742
|
className?: string;
|
|
2527
|
-
aspect?: "video" | "square" | "portrait" | "wide";
|
|
3743
|
+
aspect?: "video" | "standard" | "square" | "portrait" | "wide";
|
|
2528
3744
|
radius?: "none" | "sm" | "md" | "lg" | "xl";
|
|
2529
3745
|
/** Text label shown on the card. Defaults to preset label. */
|
|
2530
3746
|
label?: string;
|
|
@@ -3076,4 +4292,4 @@ declare function GradeModeSwitcher({ className, variant }: GradeModeSwitcherProp
|
|
|
3076
4292
|
*/
|
|
3077
4293
|
declare function ThemeToggle(): React$1.JSX.Element;
|
|
3078
4294
|
|
|
3079
|
-
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, 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, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, 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, 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, RivePlayer, type RivePlayerProps, Row, type RowProps, type SceneContext, type SceneFactory, type SceneHandle, 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, 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, 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 };
|
|
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 };
|