@noya-app/noya-designsystem 0.1.44 → 0.1.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/.turbo/turbo-build.log +13 -10
  2. package/CHANGELOG.md +18 -0
  3. package/dist/index.css +1 -1
  4. package/dist/index.d.mts +1194 -878
  5. package/dist/index.d.ts +1194 -878
  6. package/dist/index.js +11432 -10219
  7. package/dist/index.js.map +1 -1
  8. package/dist/index.mjs +11556 -10360
  9. package/dist/index.mjs.map +1 -1
  10. package/package.json +4 -4
  11. package/src/__tests__/combobox.test.ts +137 -89
  12. package/src/components/AnimatePresence.tsx +10 -1
  13. package/src/components/Avatar.tsx +2 -0
  14. package/src/components/Breadcrumbs.tsx +29 -0
  15. package/src/components/Checkbox.tsx +6 -1
  16. package/src/components/Collection.tsx +74 -0
  17. package/src/components/Combobox.tsx +75 -56
  18. package/src/components/ComboboxMenu.tsx +61 -28
  19. package/src/components/CommandPalette.tsx +69 -0
  20. package/src/components/ContextMenu.tsx +33 -134
  21. package/src/components/DropdownMenu.tsx +46 -155
  22. package/src/components/EditableText.tsx +203 -0
  23. package/src/components/Fade.tsx +62 -0
  24. package/src/components/Grid.tsx +243 -0
  25. package/src/components/GridView.tsx +86 -96
  26. package/src/components/InputField.tsx +109 -133
  27. package/src/components/Label.tsx +81 -7
  28. package/src/components/LabeledField.tsx +112 -0
  29. package/src/components/List.tsx +268 -0
  30. package/src/components/ListView.tsx +65 -61
  31. package/src/components/Popover.tsx +12 -1
  32. package/src/components/SearchCompletionMenu.tsx +210 -0
  33. package/src/components/SegmentedControl.tsx +12 -6
  34. package/src/components/SelectMenu.tsx +110 -126
  35. package/src/components/Slider.tsx +18 -26
  36. package/src/components/Text.tsx +1 -0
  37. package/src/components/TextArea.tsx +4 -1
  38. package/src/components/Toolbar.tsx +9 -4
  39. package/src/components/TreeView.tsx +4 -0
  40. package/src/components/WorkspaceLayout.tsx +64 -20
  41. package/src/components/internal/Menu.tsx +107 -18
  42. package/src/components/internal/MenuViewport.tsx +152 -0
  43. package/src/components/internal/SelectItem.tsx +111 -0
  44. package/src/hooks/useIndent.ts +12 -0
  45. package/src/hooks/useLabel.ts +51 -0
  46. package/src/hooks/usePreservePanelSize.tsx +50 -19
  47. package/src/index.tsx +15 -6
  48. package/src/utils/combobox.ts +116 -101
  49. package/src/utils/createSectionedMenu.ts +11 -14
  50. package/src/utils/fuzzyScorer.ts +11 -8
  51. package/src/utils/selection.ts +48 -0
package/dist/index.d.mts CHANGED
@@ -1,17 +1,20 @@
1
1
  import * as React from 'react';
2
- import React__default, { CSSProperties, ReactNode, AriaRole, KeyboardEventHandler, MouseEventHandler, PointerEventHandler, FocusEventHandler, InputHTMLAttributes, HTMLAttributes, ComponentProps, SyntheticEvent, ReactHTML } from 'react';
2
+ import React__default, { ReactHTML, ReactNode, CSSProperties, HTMLAttributes, AriaRole, KeyboardEventHandler, MouseEventHandler, PointerEventHandler, FocusEventHandler, InputHTMLAttributes, LabelHTMLAttributes, ForwardedRef, ComponentProps, SyntheticEvent } from 'react';
3
3
  import { IItemScore } from 'vscode-fuzzy-scorer';
4
- import { Property } from 'csstype';
5
4
  import * as Icons from '@noya-app/noya-icons';
6
5
  export { Icons };
7
6
  import * as _noya_app_noya_geometry from '@noya-app/noya-geometry';
8
7
  import { Size } from '@noya-app/noya-geometry';
9
8
  import { useSortable } from '@dnd-kit/sortable';
9
+ import { Property } from 'csstype';
10
+ import * as _noya_app_noya_designsystem from '@noya-app/noya-designsystem';
11
+ import { SelectableMenuItem as SelectableMenuItem$1 } from '@noya-app/noya-designsystem';
10
12
  import * as DialogPrimitive from '@radix-ui/react-dialog';
11
13
  import * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu';
12
14
  import { Sketch } from '@noya-app/noya-file-format';
13
15
  import * as _noya_app_noya_keymap from '@noya-app/noya-keymap';
14
16
  import { KeyModifiers, PlatformName } from '@noya-app/noya-keymap';
17
+ import * as RadixContextMenu from '@radix-ui/react-context-menu';
15
18
  import { MultiplayerUser } from '@noya-app/noya-multiplayer-react';
16
19
  import * as PopoverPrimitive from '@radix-ui/react-popover';
17
20
  import { SelectProps } from '@radix-ui/react-select';
@@ -49,8 +52,9 @@ type AnimatePresenceProps = {
49
52
  * "crossfade" - crossfade between the previous and next animation
50
53
  */
51
54
  mode?: "wait" | "crossfade";
55
+ className?: string;
52
56
  };
53
- declare const AnimatePresence: ({ children, duration, animationStyles, skipInitialAnimation, mode, }: AnimatePresenceProps) => React__default.JSX.Element;
57
+ declare const AnimatePresence: ({ children, duration, animationStyles, skipInitialAnimation, mode, className, }: AnimatePresenceProps) => React__default.JSX.Element;
54
58
 
55
59
  type AvatarProps = {
56
60
  image?: string;
@@ -79,304 +83,522 @@ declare const AvatarStack: React__default.NamedExoticComponent<{
79
83
  className?: string;
80
84
  }>;
81
85
 
82
- type ButtonVariant = "normal" | "primary" | "secondary" | "secondaryBright" | "thin" | "floating" | "none";
83
- type ButtonSize = "small" | "normal" | "large" | "floating";
84
- interface ButtonRootProps {
85
- id?: string;
86
- className?: string;
87
- style?: CSSProperties;
88
- tabIndex?: number;
89
- children: ReactNode;
90
- active?: boolean;
91
- disabled?: boolean;
92
- variant?: ButtonVariant;
93
- size?: ButtonSize;
94
- tooltip?: ReactNode;
95
- onClick?: (event: React__default.MouseEvent<HTMLButtonElement>) => void;
96
- onPointerDown?: (event: React__default.PointerEvent<HTMLButtonElement>) => void;
97
- contentStyle?: CSSProperties;
98
- as?: React__default.ElementType;
99
- htmlFor?: string;
100
- href?: string;
101
- target?: string;
102
- rel?: string;
103
- }
104
- declare const Button: React__default.ForwardRefExoticComponent<ButtonRootProps & React__default.RefAttributes<HTMLButtonElement>>;
105
-
106
- interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> {
107
- colorScheme?: "primary" | "secondary";
108
- }
109
- declare const Checkbox$1: React.MemoExoticComponent<React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>>;
110
-
111
- type ChipColorScheme = "primary" | "secondary" | "error";
112
- type ChipSize = "small" | "medium" | "large";
113
- type ChipVariant = "solid" | "outlined" | "ghost";
114
- interface ChipProps {
115
- id?: string;
116
- className?: string;
117
- colorScheme?: ChipColorScheme;
118
- variant?: ChipVariant;
119
- size?: ChipSize;
120
- children?: React__default.ReactNode;
121
- clickable?: boolean;
122
- deletable?: boolean;
123
- addable?: boolean;
124
- monospace?: boolean;
125
- onDelete?: () => void;
126
- onAdd?: () => void;
127
- onClick?: () => void;
128
- onHoverDeleteChange?: (hovering: boolean) => void;
129
- style?: React__default.CSSProperties;
130
- tabIndex?: number;
131
- }
132
- declare const Chip: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<ChipProps & React__default.RefAttributes<HTMLSpanElement>>>;
133
-
134
- declare function fuzzyScore({ item, query }: {
135
- item: string;
136
- query: string;
137
- }): IItemScore;
138
- type IScoredItem = IItemScore & {
139
- index: number;
140
- };
141
- declare function fuzzyFilter({ items, query, scoreThreshold, }: {
142
- items: string[];
143
- query: string;
144
- scoreThreshold?: number;
145
- }): IScoredItem[];
146
- type IToken = {
147
- type: 'text';
148
- text: string;
149
- } | {
150
- type: 'match';
151
- text: string;
152
- };
153
- type MatchRange = {
154
- start: number;
155
- end: number;
86
+ declare const config: {
87
+ content: string[];
88
+ corePlugins: {
89
+ preflight: false;
90
+ };
91
+ theme: {
92
+ extend: {
93
+ colors: {
94
+ "logo-fill": string;
95
+ "logo-highlight": string;
96
+ background: string;
97
+ text: string;
98
+ "text-muted": string;
99
+ "text-subtle": string;
100
+ "text-disabled": string;
101
+ "text-decorative-light": string;
102
+ "divider-subtle": string;
103
+ divider: string;
104
+ "divider-strong": string;
105
+ primary: string;
106
+ "primary-light": string;
107
+ "primary-pastel": string;
108
+ secondary: string;
109
+ "secondary-light": string;
110
+ "secondary-pastel": string;
111
+ "secondary-bright": string;
112
+ "input-background": string;
113
+ "input-background-light": string;
114
+ "code-background": string;
115
+ "code-background-dark": string;
116
+ "selected-background": string;
117
+ "breadcrumb-text": string;
118
+ "breadcrumb-text-hover": string;
119
+ "breadcrumb-icon": string;
120
+ "canvas-background": string;
121
+ "canvas-grid": string;
122
+ "sidebar-background": string;
123
+ "sidebar-background-transparent": string;
124
+ "popover-background": string;
125
+ "popover-divider": string;
126
+ "listview-raised-background": string;
127
+ "listview-editing-background": string;
128
+ "slider-thumb-background": string;
129
+ "slider-border": string;
130
+ "segmented-control-item": string;
131
+ mask: string;
132
+ "transparent-checker": string;
133
+ scrollbar: string;
134
+ "placeholder-dots": string;
135
+ "drag-outline": string;
136
+ "active-background": string;
137
+ "thumbnail-background": string;
138
+ "thumbnail-shadow": string;
139
+ "inline-code-text": string;
140
+ "inline-code-background": string;
141
+ "text-link": string;
142
+ "text-link-focused": string;
143
+ icon: string;
144
+ "icon-selected": string;
145
+ warning: string;
146
+ dot: string;
147
+ "row-highlight": string;
148
+ "table-row-background": string;
149
+ "chip-primary-bg": string;
150
+ "chip-secondary-bg": string;
151
+ "chip-error-bg": string;
152
+ "chip-default-bg": string;
153
+ "chip-primary-shadow": string;
154
+ "chip-secondary-shadow": string;
155
+ "chip-error-shadow": string;
156
+ "chip-default-shadow": string;
157
+ "floating-button": string;
158
+ };
159
+ fontFamily: {
160
+ sans: [string, string, string, string, string, string, string, string, string, string];
161
+ mono: [string, string, string, string, string];
162
+ };
163
+ fontSize: {
164
+ title: [string, {
165
+ lineHeight: string;
166
+ letterSpacing: string;
167
+ }];
168
+ subtitle: [string, {
169
+ lineHeight: string;
170
+ letterSpacing: string;
171
+ }];
172
+ heading1: [string, {
173
+ lineHeight: string;
174
+ letterSpacing: string;
175
+ }];
176
+ heading2: [string, {
177
+ lineHeight: string;
178
+ letterSpacing: string;
179
+ }];
180
+ heading3: [string, {
181
+ lineHeight: string;
182
+ letterSpacing: string;
183
+ }];
184
+ heading4: [string, {
185
+ lineHeight: string;
186
+ }];
187
+ heading5: [string, {
188
+ lineHeight: string;
189
+ }];
190
+ body: [string, {
191
+ lineHeight: string;
192
+ }];
193
+ small: [string, {
194
+ lineHeight: string;
195
+ }];
196
+ code: [string, {
197
+ lineHeight: string;
198
+ }];
199
+ button: [string, {
200
+ lineHeight: string;
201
+ letterSpacing: string;
202
+ }];
203
+ label: [string, {
204
+ lineHeight: string;
205
+ letterSpacing: string;
206
+ }];
207
+ };
208
+ spacing: {
209
+ nano: string;
210
+ micro: string;
211
+ small: string;
212
+ medium: string;
213
+ large: string;
214
+ xlarge: string;
215
+ xxlarge: string;
216
+ "inset-top": string;
217
+ "sidebar-width": string;
218
+ "toolbar-height": string;
219
+ "toolbar-separator": string;
220
+ "inspector-h-separator": string;
221
+ "inspector-v-separator": string;
222
+ "dialog-padding": string;
223
+ };
224
+ keyframes: {
225
+ spin: {
226
+ "0%": {
227
+ transform: string;
228
+ };
229
+ "100%": {
230
+ transform: string;
231
+ };
232
+ };
233
+ shimmer: {
234
+ "0%": {
235
+ backgroundPosition: string;
236
+ };
237
+ "100%": {
238
+ backgroundPosition: string;
239
+ };
240
+ };
241
+ };
242
+ animation: {
243
+ spin: string;
244
+ shimmer: string;
245
+ };
246
+ zIndex: {
247
+ interactable: string;
248
+ label: string;
249
+ menu: string;
250
+ };
251
+ };
252
+ };
253
+ safelist: string[];
156
254
  };
157
- declare function fuzzyTokenize({ item, itemScore, }: {
158
- item: string;
159
- itemScore: IItemScore;
160
- }): IToken[];
161
255
 
162
- type ComboboxOption = {
163
- type?: undefined;
164
- id: string;
165
- name: string;
166
- icon?: ReactNode;
167
- alwaysInclude?: boolean;
168
- };
169
- type ComboboxSectionHeader = {
170
- type: "sectionHeader";
171
- id: string;
172
- name: string;
173
- maxVisibleItems?: number;
174
- };
175
- type ComboboxItem = ComboboxOption | ComboboxSectionHeader;
176
- type InternalComboboxItem = (ComboboxOption & IScoredItem) | ComboboxSectionHeader;
177
- type ComboboxStateSnapshot = {
178
- filter: string;
179
- selectedIndex: number;
180
- filteredItems: InternalComboboxItem[];
181
- lastSubmittedValue: {
182
- filter: string;
183
- itemName: string;
256
+ type Theme = (typeof config.theme)["extend"];
257
+ type ThemeColor = keyof Theme["colors"];
258
+ declare const cssVars: {
259
+ colors: {
260
+ logoFill: string;
261
+ logoHighlight: string;
262
+ background: string;
263
+ text: string;
264
+ textMuted: string;
265
+ textSubtle: string;
266
+ textDisabled: string;
267
+ textDecorativeLight: string;
268
+ dividerSubtle: string;
269
+ divider: string;
270
+ dividerStrong: string;
271
+ primary: string;
272
+ primaryLight: string;
273
+ primaryPastel: string;
274
+ secondary: string;
275
+ secondaryLight: string;
276
+ secondaryPastel: string;
277
+ secondaryBright: string;
278
+ inputBackground: string;
279
+ inputBackgroundLight: string;
280
+ codeBackground: string;
281
+ codeBackgroundDark: string;
282
+ selectedBackground: string;
283
+ breadcrumbText: string;
284
+ breadcrumbTextHover: string;
285
+ breadcrumbIcon: string;
286
+ canvasBackground: string;
287
+ canvasGrid: string;
288
+ sidebarBackground: string;
289
+ sidebarBackgroundTransparent: string;
290
+ popoverBackground: string;
291
+ popoverDivider: string;
292
+ listviewRaisedBackground: string;
293
+ listviewEditingBackground: string;
294
+ sliderThumbBackground: string;
295
+ sliderBorder: string;
296
+ segmentedControlItem: string;
297
+ mask: string;
298
+ transparentChecker: string;
299
+ scrollbar: string;
300
+ placeholderDots: string;
301
+ dragOutline: string;
302
+ activeBackground: string;
303
+ thumbnailBackground: string;
304
+ thumbnailShadow: string;
305
+ inlineCodeText: string;
306
+ inlineCodeBackground: string;
307
+ textLink: string;
308
+ textLinkFocused: string;
309
+ icon: string;
310
+ iconSelected: string;
311
+ warning: string;
312
+ dot: string;
313
+ rowHighlight: string;
314
+ tableRowBackground: string;
315
+ chipPrimaryBg: string;
316
+ chipSecondaryBg: string;
317
+ chipErrorBg: string;
318
+ chipDefaultBg: string;
319
+ chipPrimaryShadow: string;
320
+ chipSecondaryShadow: string;
321
+ chipErrorShadow: string;
322
+ chipDefaultShadow: string;
323
+ floatingButton: string;
324
+ };
325
+ fontFamily: {
326
+ sans: [string, string, string, string, string, string, string, string, string, string];
327
+ mono: [string, string, string, string, string];
328
+ };
329
+ fontSize: {
330
+ title: [string, {
331
+ lineHeight: string;
332
+ letterSpacing: string;
333
+ }];
334
+ subtitle: [string, {
335
+ lineHeight: string;
336
+ letterSpacing: string;
337
+ }];
338
+ heading1: [string, {
339
+ lineHeight: string;
340
+ letterSpacing: string;
341
+ }];
342
+ heading2: [string, {
343
+ lineHeight: string;
344
+ letterSpacing: string;
345
+ }];
346
+ heading3: [string, {
347
+ lineHeight: string;
348
+ letterSpacing: string;
349
+ }];
350
+ heading4: [string, {
351
+ lineHeight: string;
352
+ }];
353
+ heading5: [string, {
354
+ lineHeight: string;
355
+ }];
356
+ body: [string, {
357
+ lineHeight: string;
358
+ }];
359
+ small: [string, {
360
+ lineHeight: string;
361
+ }];
362
+ code: [string, {
363
+ lineHeight: string;
364
+ }];
365
+ button: [string, {
366
+ lineHeight: string;
367
+ letterSpacing: string;
368
+ }];
369
+ label: [string, {
370
+ lineHeight: string;
371
+ letterSpacing: string;
372
+ }];
373
+ };
374
+ spacing: {
375
+ nano: string;
376
+ micro: string;
377
+ small: string;
378
+ medium: string;
379
+ large: string;
380
+ xlarge: string;
381
+ xxlarge: string;
382
+ insetTop: string;
383
+ sidebarWidth: string;
384
+ toolbarHeight: string;
385
+ toolbarSeparator: string;
386
+ inspectorHSeparator: string;
387
+ inspectorVSeparator: string;
388
+ dialogPadding: string;
389
+ };
390
+ keyframes: {
391
+ spin: {
392
+ "0%": {
393
+ transform: string;
394
+ };
395
+ "100%": {
396
+ transform: string;
397
+ };
398
+ };
399
+ shimmer: {
400
+ "0%": {
401
+ backgroundPosition: string;
402
+ };
403
+ "100%": {
404
+ backgroundPosition: string;
405
+ };
406
+ };
407
+ };
408
+ animation: {
409
+ spin: string;
410
+ shimmer: string;
411
+ };
412
+ zIndex: {
413
+ interactable: string;
414
+ label: string;
415
+ menu: string;
184
416
  };
185
417
  };
186
- declare class ComboboxState {
187
- private filter;
188
- private selectedIndex;
189
- private items;
190
- private lastSubmittedValue;
191
- private subscribers;
192
- private version;
193
- private _cachedSnapshot;
194
- constructor(items: ComboboxItem[], initialValue: string, allowArbitraryValues: boolean);
195
- subscribe: (listener: () => void) => (() => void);
196
- private notifyChange;
197
- private getFilteredItems;
198
- getSnapshot: () => ComboboxStateSnapshot;
199
- setItems(items: ComboboxItem[]): void;
200
- setFilter(filter: string): void;
201
- moveSelection(direction: "up" | "down"): void;
202
- selectCurrentItem(item?: InternalComboboxItem): InternalComboboxItem | undefined;
203
- restoreLastSubmittedValue(): void;
204
- reset(newFilter?: string): void;
205
- getSelectedItem(): InternalComboboxItem | undefined;
206
- getTypeaheadValue(): string | undefined;
207
- setSelectedIndex(index: number): void;
208
- submitArbitraryFilter(filter: string): void;
209
- }
210
- declare function useComboboxState(state: ComboboxState): ComboboxStateSnapshot;
211
-
212
- type IconName = keyof typeof Icons;
213
418
 
214
- declare function renderIcon(iconName: Exclude<React.ReactNode, string> | IconName): React.ReactNode;
419
+ type KebabToCamelCase<S extends string> = S extends `${infer First}-${infer Rest}` ? `${First}${Capitalize<KebabToCamelCase<Rest>>}` : S;
215
420
 
216
- declare const SEPARATOR_ITEM = "separator";
217
- type MenuItemRole = "undo" | "redo" | "cut" | "copy" | "paste" | "pasteAndMatchStyle" | "delete" | "selectAll" | "reload" | "forceReload" | "toggleDevTools" | "resetZoom" | "zoomIn" | "zoomOut" | "toggleSpellChecker" | "togglefullscreen" | "window" | "minimize" | "close" | "help" | "about" | "services" | "hide" | "hideOthers" | "unhide" | "quit" | "showSubstitutions" | "toggleSmartQuotes" | "toggleSmartDashes" | "toggleTextReplacement" | "startSpeaking" | "stopSpeaking" | "zoom" | "front" | "appMenu" | "fileMenu" | "editMenu" | "viewMenu" | "shareMenu" | "recentDocuments" | "toggleTabBar" | "selectNextTab" | "selectPreviousTab" | "mergeAllWindows" | "clearRecentDocuments" | "moveTabToNewWindow" | "windowMenu";
218
- type RegularMenuItem<T extends string> = {
219
- value?: T;
220
- title: ReactNode;
221
- shortcut?: string;
222
- checked?: boolean;
223
- disabled?: boolean;
224
- icon?: Exclude<ReactNode, string> | IconName;
225
- items?: MenuItem<T>[];
226
- role?: MenuItemRole;
421
+ type Variant = "title" | "subtitle" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "body" | "small" | "button" | "code" | "label";
422
+ declare const textStyles: Record<Variant, string>;
423
+ type TextProps = {
424
+ as?: keyof ReactHTML;
425
+ href?: string;
426
+ className?: string;
427
+ style?: React__default.CSSProperties;
428
+ variant: Variant;
429
+ color?: KebabToCamelCase<ThemeColor>;
430
+ children: ReactNode;
431
+ id?: string;
432
+ onClick?: () => void;
433
+ onDoubleClick?: () => void;
434
+ onKeyDown?: (event: React__default.KeyboardEvent<HTMLSpanElement>) => void;
435
+ tabIndex?: number;
227
436
  };
228
- type MenuItem<T extends string> = typeof SEPARATOR_ITEM | RegularMenuItem<T>;
229
- type ExtractMenuItemType<T> = T extends RegularMenuItem<infer U> ? U : never;
230
- declare function getKeyboardShortcutsForMenuItems<T extends string>(menuItems: MenuItem<T>[], onSelect: (type: T) => void): Record<string, () => void>;
231
- declare const KeyboardShortcut: React__default.NamedExoticComponent<{
232
- shortcut: string;
233
- }>;
437
+ declare const Text$1: React__default.ForwardRefExoticComponent<TextProps & React__default.RefAttributes<HTMLElement>>;
438
+ type PresetProps = Omit<TextProps, "variant">;
439
+ declare const Heading1: React__default.ForwardRefExoticComponent<PresetProps & React__default.RefAttributes<HTMLElement>>;
440
+ declare const Heading2: React__default.ForwardRefExoticComponent<PresetProps & React__default.RefAttributes<HTMLElement>>;
441
+ declare const Heading3: React__default.ForwardRefExoticComponent<PresetProps & React__default.RefAttributes<HTMLElement>>;
442
+ declare const Heading4: React__default.ForwardRefExoticComponent<PresetProps & React__default.RefAttributes<HTMLElement>>;
443
+ declare const Heading5: React__default.ForwardRefExoticComponent<PresetProps & React__default.RefAttributes<HTMLElement>>;
444
+ declare const Body: React__default.ForwardRefExoticComponent<PresetProps & React__default.RefAttributes<HTMLElement>>;
445
+ declare const Small: React__default.ForwardRefExoticComponent<PresetProps & React__default.RefAttributes<HTMLElement>>;
446
+ declare const Italic: ({ children }: {
447
+ children: ReactNode;
448
+ }) => React__default.JSX.Element;
234
449
 
235
- type Props$d = {
450
+ type BreadcrumbTextProps = Omit<TextProps, "variant" | "whiteSpace" | "lineHeight" | "userSelect">;
451
+ declare const BreadcrumbText: React__default.ForwardRefExoticComponent<BreadcrumbTextProps & React__default.RefAttributes<HTMLSpanElement>>;
452
+
453
+ type ButtonVariant = "normal" | "primary" | "secondary" | "secondaryBright" | "thin" | "floating" | "none";
454
+ type ButtonSize = "small" | "normal" | "large" | "floating";
455
+ interface ButtonRootProps {
236
456
  id?: string;
237
- style?: any;
238
457
  className?: string;
239
- type?: "text" | "search";
458
+ style?: CSSProperties;
459
+ tabIndex?: number;
460
+ children: ReactNode;
461
+ active?: boolean;
240
462
  disabled?: boolean;
241
- value: string;
242
- placeholder?: string;
243
- role?: AriaRole;
244
- name?: HTMLInputElement["name"];
245
- onKeyDown?: KeyboardEventHandler;
246
- onClick?: MouseEventHandler;
247
- onDoubleClick?: MouseEventHandler;
248
- onPointerDown?: PointerEventHandler;
249
- onFocusCapture?: FocusEventHandler;
250
- onFocusChange?: (isFocused: boolean) => void;
251
- onBlur?: FocusEventHandler;
252
- } & Pick<InputHTMLAttributes<HTMLInputElement>, "autoComplete" | "autoCapitalize" | "autoCorrect" | "spellCheck" | "autoFocus">;
253
- type ReadOnlyProps = Props$d & {
254
- readOnly: true;
255
- };
256
- type ControlledProps = Props$d & {
257
- onChange: (value: string) => void;
258
- onFocus?: FocusEventHandler;
259
- onBlur?: FocusEventHandler;
260
- };
261
- type SubmittableProps = Props$d & {
262
- onSubmit: (value: string) => void;
263
- allowSubmittingWithSameValue?: boolean;
264
- submitAutomaticallyAfterDelay?: number;
265
- };
266
- type TextInputProps = ReadOnlyProps | ControlledProps | SubmittableProps;
267
-
268
- type LabelPosition = "start" | "end";
269
- type InputFieldSize = "small" | "medium" | "large";
270
- interface InputFieldDropdownProps<T extends string> {
271
- id?: string;
272
- items: MenuItem<T>[];
273
- onSelect: (value: T) => void;
274
- children?: ReactNode;
275
- }
276
- type InputFieldInputProps = TextInputProps & {
277
- textAlign?: Property.TextAlign;
278
- variant?: "bare";
279
- };
280
- type InputFieldNumberInputProps = Omit<TextInputProps, "value" | "onChange" | "onKeyDown" | "onSubmit" | "readOnly"> & {
281
- value: number | undefined;
282
- onNudge?: (value: number) => void;
283
- variant?: "bare";
284
- onFocus?: FocusEventHandler;
285
- onBlur?: FocusEventHandler;
286
- readOnly?: boolean;
287
- } & ({
288
- onChange: (value: number) => void;
289
- } | {
290
- onSubmit: (value: number) => void;
291
- });
292
- declare function InputFieldNumberInput(props: InputFieldNumberInputProps): React__default.JSX.Element;
293
- interface InputFieldRootProps {
294
- id?: string;
295
- children?: ReactNode;
296
- width?: number;
297
- /** @default end */
298
- labelPosition?: LabelPosition;
299
- labelSize?: number;
300
- /** @default medium */
301
- size?: InputFieldSize;
302
- renderPopoverContent?: (options: {
303
- width: number;
304
- }) => ReactNode;
305
- /**
306
- * if there is a popover, this is the offset from the trigger
307
- * @default 3
308
- */
309
- sideOffset?: number;
310
- onFocusChange?: (isFocused: boolean) => void;
311
- style?: React__default.CSSProperties;
312
- className?: string;
463
+ variant?: ButtonVariant;
464
+ size?: ButtonSize;
465
+ tooltip?: ReactNode;
466
+ onClick?: (event: React__default.MouseEvent<HTMLButtonElement>) => void;
467
+ onPointerDown?: (event: React__default.PointerEvent<HTMLButtonElement>) => void;
468
+ contentStyle?: CSSProperties;
469
+ as?: React__default.ElementType;
470
+ htmlFor?: string;
471
+ href?: string;
472
+ target?: string;
473
+ rel?: string;
313
474
  }
314
- declare function InputFieldRoot({ id, children, width, labelPosition, sideOffset, labelSize, size, renderPopoverContent, onFocusChange, style, className, }: InputFieldRootProps): React__default.JSX.Element;
315
- declare namespace InputField {
316
- const Root: React__default.MemoExoticComponent<typeof InputFieldRoot>;
317
- const Input: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<InputFieldInputProps & React__default.RefAttributes<HTMLInputElement>>>;
318
- const Typeahead: React__default.MemoExoticComponent<(props: {
319
- prefix: string;
320
- value: string;
321
- isFocused: boolean;
322
- }) => React__default.JSX.Element>;
323
- const NumberInput: React__default.MemoExoticComponent<typeof InputFieldNumberInput>;
324
- const DropdownMenu: <T extends string>(props: InputFieldDropdownProps<T>) => React__default.ReactElement | null;
325
- const Button: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<React__default.ButtonHTMLAttributes<HTMLButtonElement> & {
326
- buttonClassName?: string;
327
- variant?: "floating" | "normal";
328
- } & React__default.RefAttributes<HTMLButtonElement>>>;
329
- const Label: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<React__default.LabelHTMLAttributes<HTMLLabelElement> & React__default.RefAttributes<HTMLLabelElement>>>;
330
- const PrimitiveElement: ({ readOnly, disabled, className, style, ...props }: {
331
- readOnly?: boolean;
332
- disabled?: boolean;
333
- } & React__default.DetailedHTMLProps<React__default.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>) => React__default.JSX.Element;
475
+ declare const Button: React__default.ForwardRefExoticComponent<ButtonRootProps & React__default.RefAttributes<HTMLButtonElement>>;
476
+
477
+ interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> {
478
+ colorScheme?: "primary" | "secondary";
334
479
  }
480
+ declare const Checkbox$1: React.MemoExoticComponent<React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>>;
335
481
 
336
- type BaseComboboxProps = {
482
+ type ChipColorScheme = "primary" | "secondary" | "error";
483
+ type ChipSize = "small" | "medium" | "large";
484
+ type ChipVariant = "solid" | "outlined" | "ghost";
485
+ interface ChipProps {
337
486
  id?: string;
338
- loading?: boolean;
339
- placeholder?: string;
340
- items: ComboboxItem[];
341
- onFocus?: (event: React__default.FocusEvent<HTMLInputElement>) => void;
342
- onDeleteWhenEmpty?: () => void;
343
- size?: InputFieldSize;
344
- style?: React__default.CSSProperties;
345
487
  className?: string;
346
- label?: React__default.ReactNode;
488
+ colorScheme?: ChipColorScheme;
489
+ variant?: ChipVariant;
490
+ size?: ChipSize;
347
491
  children?: React__default.ReactNode;
348
- hideMenuWhenEmptyValue?: boolean;
349
- readOnly?: boolean;
350
- tabBehavior?: "autocomplete" | "select";
351
- openMenuBehavior?: "showAllItems" | "showFilteredItems";
492
+ clickable?: boolean;
493
+ deletable?: boolean;
494
+ addable?: boolean;
495
+ monospace?: boolean;
496
+ onDelete?: () => void;
497
+ onAdd?: () => void;
498
+ onClick?: () => void;
499
+ onHoverDeleteChange?: (hovering: boolean) => void;
500
+ style?: React__default.CSSProperties;
501
+ tabIndex?: number;
502
+ }
503
+ declare const Chip: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<ChipProps & React__default.RefAttributes<HTMLSpanElement>>>;
504
+
505
+ type GridViewSize = "xxs" | "xs" | "small" | "medium" | "large" | "xl";
506
+ declare const getGridSize: (size: GridViewSize) => {
507
+ minColumnWidth: string;
508
+ gap: number;
352
509
  };
353
- type StringModeOnlyProps = {
354
- mode: "string";
355
- value?: string;
356
- onChange?: (value: string) => void;
357
- onSelectItem?: (value: string) => void;
358
- onBlur?: (didSubmit: boolean, value: string) => void;
359
- onHoverItem?: (value: string | undefined) => void;
360
- allowArbitraryValues?: boolean;
510
+ declare const Grid: <T, M extends string = string>(props: CollectionProps<T, M> & {
511
+ ref?: React__default.ForwardedRef<CollectionRef>;
512
+ } & React__default.RefAttributes<CollectionRef>) => React__default.ReactElement | null;
513
+
514
+ declare function fuzzyScore({ item, query }: {
515
+ item: string;
516
+ query: string;
517
+ }): IItemScore;
518
+ type IScoredItem = IItemScore & {
519
+ index: number;
361
520
  };
362
- type StringModeProps = BaseComboboxProps & StringModeOnlyProps;
363
- type OptionModeOnlyProps = {
364
- mode?: "option";
365
- value?: ComboboxOption;
366
- onChange?: (value: ComboboxOption) => void;
367
- onSelectItem?: (value: ComboboxOption) => void;
368
- onBlur?: (didSubmit: boolean, value: ComboboxOption) => void;
369
- onHoverItem?: (value: ComboboxOption | undefined) => void;
370
- allowArbitraryValues?: false;
521
+ declare function fuzzyFilter({ items, query, scoreThreshold, }: {
522
+ items: string[];
523
+ query: string;
524
+ scoreThreshold?: number;
525
+ }): IScoredItem[];
526
+ type IToken = {
527
+ type: "text";
528
+ text: string;
529
+ } | {
530
+ type: "match";
531
+ text: string;
371
532
  };
372
- type OptionModeProps = BaseComboboxProps & OptionModeOnlyProps;
373
- type ComboboxProps = StringModeProps | OptionModeProps;
374
- interface ComboboxRef {
375
- focus(): void;
376
- setValue(value: string | ComboboxOption): void;
377
- selectAllInputText(): void;
378
- }
379
- declare const Combobox: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<ComboboxProps & React__default.RefAttributes<ComboboxRef>>>;
533
+ type MatchRange = {
534
+ start: number;
535
+ end: number;
536
+ };
537
+ declare function fuzzyTokenize({ item, itemScore, }: {
538
+ item: string;
539
+ itemScore: IItemScore;
540
+ }): IToken[];
541
+
542
+ type IconName = keyof typeof Icons;
543
+
544
+ declare function renderIcon(iconName: Exclude<React.ReactNode, string> | IconName): React.ReactNode;
545
+
546
+ type MenuItemRole = "undo" | "redo" | "cut" | "copy" | "paste" | "pasteAndMatchStyle" | "delete" | "selectAll" | "reload" | "forceReload" | "toggleDevTools" | "resetZoom" | "zoomIn" | "zoomOut" | "toggleSpellChecker" | "togglefullscreen" | "window" | "minimize" | "close" | "help" | "about" | "services" | "hide" | "hideOthers" | "unhide" | "quit" | "showSubstitutions" | "toggleSmartQuotes" | "toggleSmartDashes" | "toggleTextReplacement" | "startSpeaking" | "stopSpeaking" | "zoom" | "front" | "appMenu" | "fileMenu" | "editMenu" | "viewMenu" | "shareMenu" | "recentDocuments" | "toggleTabBar" | "selectNextTab" | "selectPreviousTab" | "mergeAllWindows" | "clearRecentDocuments" | "moveTabToNewWindow" | "windowMenu";
547
+ type SeparatorItem = {
548
+ type: "separator";
549
+ };
550
+ type BaseMenuItem = {
551
+ checked?: boolean;
552
+ disabled?: boolean;
553
+ icon?: Exclude<ReactNode, string> | IconName;
554
+ role?: MenuItemRole;
555
+ alwaysInclude?: boolean;
556
+ title: NonNullable<ReactNode>;
557
+ };
558
+ type SectionHeaderMenuItem = {
559
+ type: "sectionHeader";
560
+ id: string;
561
+ title: ReactNode;
562
+ maxVisibleItems?: number;
563
+ variant?: "normal" | "label";
564
+ };
565
+ type SelectableMenuItem<T extends string> = BaseMenuItem & {
566
+ type?: undefined;
567
+ shortcut?: string;
568
+ value: T;
569
+ };
570
+ type SubMenuItem<T extends string> = BaseMenuItem & {
571
+ type: "submenu";
572
+ items: MenuItem<T>[];
573
+ id: string;
574
+ };
575
+ type NonSelectableMenuItem<T extends string> = SeparatorItem | SectionHeaderMenuItem | SubMenuItem<T>;
576
+ type MenuItem<T extends string> = SeparatorItem | SelectableMenuItem<T> | SectionHeaderMenuItem | SubMenuItem<T>;
577
+ type ScoredSelectableMenuItem<T extends string> = SelectableMenuItem<T> & IScoredItem;
578
+ type ScoredMenuItem<T extends string> = ScoredSelectableMenuItem<T> | SectionHeaderMenuItem;
579
+ type ExtractMenuItemType<T> = T extends SelectableMenuItem<infer U> ? U : never;
580
+ declare const isSelectableMenuItem: <T extends string>(item: MenuItem<T>) => item is SelectableMenuItem<T>;
581
+ declare const isNonSelectableMenuItem: <T extends string>(item: MenuItem<T>) => item is NonSelectableMenuItem<T>;
582
+ declare const isMenuItemSectionHeader: (item: MenuItem<string>) => item is SectionHeaderMenuItem;
583
+ declare const isSelectableMenuItemWithScore: (item: MenuItem<string>) => item is ScoredSelectableMenuItem<string>;
584
+ declare const CHECKBOX_WIDTH = 16;
585
+ declare const CHECKBOX_RIGHT_INSET = 8;
586
+ declare const styles: {
587
+ separatorStyle: string;
588
+ itemStyle: ({ disabled }: {
589
+ disabled?: boolean;
590
+ }) => string;
591
+ itemIndicatorStyle: string;
592
+ contentStyle: string;
593
+ };
594
+ declare function getKeyboardShortcutsForMenuItems<T extends string>(menuItems: MenuItem<T>[], onSelect: (type: T) => void): Record<string, () => void>;
595
+ declare const KeyboardShortcut: React__default.NamedExoticComponent<{
596
+ shortcut: string;
597
+ }>;
598
+ declare const SectionHeader$1: React__default.NamedExoticComponent<Omit<SectionHeaderMenuItem, "type" | "maxVisibleItems"> & {
599
+ isFirst?: boolean;
600
+ indented?: boolean;
601
+ }>;
380
602
 
381
603
  type RelativeDropPosition = "above" | "below" | "inside";
382
604
  type DropValidator = (sourceIndex: number, destinationIndex: number, position: RelativeDropPosition) => boolean;
@@ -426,8 +648,9 @@ interface EditableRowProps {
426
648
  onSubmitEditing: (value: string) => void;
427
649
  autoFocus: boolean;
428
650
  placeholder?: string;
651
+ className?: string;
429
652
  }
430
- declare function ListViewEditableRowTitle({ value, onSubmitEditing, autoFocus, placeholder, }: EditableRowProps): React__default.JSX.Element;
653
+ declare function ListViewEditableRowTitle({ value, onSubmitEditing, autoFocus, placeholder, className, }: EditableRowProps): React__default.JSX.Element;
431
654
  interface ListViewClickInfo {
432
655
  shiftKey: boolean;
433
656
  altKey: boolean;
@@ -437,6 +660,7 @@ interface ListViewClickInfo {
437
660
  interface ListViewRowProps<MenuItemType extends string = string> {
438
661
  id?: string;
439
662
  tabIndex?: number;
663
+ role?: string;
440
664
  selected?: boolean;
441
665
  /** @default 0 */
442
666
  depth?: number;
@@ -484,12 +708,16 @@ type RenderProps<T> = {
484
708
  sortable?: boolean;
485
709
  virtualized?: Size;
486
710
  };
487
- type ListViewVariant = "normal" | "padded" | "bare";
711
+ type ListViewVariant = "normal" | "bare";
488
712
  type ListViewSectionHeaderVariant = "normal" | "label";
489
713
  type ListViewRootProps = {
490
714
  id?: string;
491
715
  className?: string;
492
716
  style?: CSSProperties;
717
+ role?: string;
718
+ "aria-labelledby"?: string;
719
+ "aria-orientation"?: "vertical" | "horizontal";
720
+ "aria-multiselectable"?: boolean;
493
721
  onPress?: () => void;
494
722
  scrollable?: boolean;
495
723
  expandable?: boolean;
@@ -502,6 +730,11 @@ type ListViewRootProps = {
502
730
  divider?: boolean;
503
731
  gap?: number;
504
732
  colorScheme?: ListColorScheme;
733
+ containerRef?: React__default.RefObject<HTMLDivElement>;
734
+ onDragOver?: React__default.DragEventHandler<HTMLDivElement>;
735
+ onDragEnter?: React__default.DragEventHandler<HTMLDivElement>;
736
+ onDragLeave?: React__default.DragEventHandler<HTMLDivElement>;
737
+ onDrop?: React__default.DragEventHandler<HTMLDivElement>;
505
738
  };
506
739
  declare namespace ListView {
507
740
  const RowTitle: React__default.MemoExoticComponent<({ className, children, ...props }: {
@@ -524,38 +757,304 @@ declare namespace ListView {
524
757
  } & React__default.RefAttributes<HTMLDivElement>>;
525
758
  const rowHeight = 31;
526
759
  const sectionHeaderLabelHeight = 27;
527
- const calculateHeight: (items: number, headerCount: number, headerVariant: ListViewSectionHeaderVariant) => number;
760
+ const calculateHeight: ({ menuItemsCount, sectionHeaderCount, }: {
761
+ menuItemsCount: number;
762
+ sectionHeaderCount: number;
763
+ }) => number;
528
764
  const normalizeDestinationIndex: (index: number, position: "above" | "below") => number;
529
765
  }
530
766
 
531
- interface ComboboxMenuProps {
532
- items: InternalComboboxItem[];
533
- selectedIndex: number;
534
- onSelectItem: (item: InternalComboboxItem) => void;
535
- onHoverIndex: (index: number) => void;
536
- listSize: Size;
537
- style?: React__default.CSSProperties;
767
+ type CollectionViewType = "grid" | "list";
768
+ type CollectionRef = {
769
+ editName: (id: string) => void;
770
+ };
771
+ interface CollectionProps<T, M extends string = string> {
772
+ className?: string;
773
+ items: T[];
774
+ getId: (item: T) => string;
775
+ getName: (item: T) => string;
776
+ getExpanded?: (item: T) => boolean | undefined;
777
+ /**
778
+ * Whether directories should be expandable.
779
+ * @default true
780
+ */
781
+ expandable?: boolean;
782
+ /**
783
+ * Whether to allow renaming files
784
+ * @default true
785
+ */
786
+ renamable?: boolean;
787
+ menuItems?: MenuItem<M>[];
788
+ onSelectMenuItem?: (action: M, selectedItems: T[]) => void;
789
+ onRename?: (item: T, newName: string) => void;
790
+ renderThumbnail?: (item: T, selected: boolean) => React__default.ReactNode;
791
+ renderAction?: (item: T, selected: boolean) => React__default.ReactNode;
792
+ renderDetail?: (item: T, selected: boolean) => React__default.ReactNode;
793
+ /** Callback when selection changes. If not provided, selection will be disabled. */
794
+ onSelectionChange?: (selectedItemIds: string[], event?: ListView.ClickInfo) => void;
795
+ scrollable?: boolean;
796
+ itemRoleDescription?: string;
797
+ /** Position of the detail content. Defaults to 'end'. */
798
+ detailPosition?: "end" | "below";
799
+ /** Size of the list items. Defaults to 'medium'. */
800
+ size?: GridViewSize;
801
+ /** For testing: Override the hover state with a specific item ID */
802
+ testHoveredId?: string;
803
+ /** For testing: Override the renaming state with a specific item ID */
804
+ testRenamingId?: string;
805
+ setExpanded?: (item: T, expanded: boolean) => void;
806
+ acceptsDrop?: ListViewRootProps["acceptsDrop"];
807
+ onMoveItem?: ListViewRootProps["onMoveItem"];
808
+ getDepth?: (item: T) => number;
809
+ onFilesDrop?: (event: React__default.DragEvent<Element>) => void;
810
+ getRenamable?: (item: T) => boolean;
811
+ /** Currently selected file IDs */
812
+ selectedIds?: string[];
813
+ viewType?: CollectionViewType;
814
+ onDoubleClickItem?: (itemId: string) => void;
538
815
  }
539
- declare const ComboboxMenu: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<ComboboxMenuProps & React__default.RefAttributes<IVirtualizedList>>>;
816
+ declare const Collection: <T, M extends string = string>(props: CollectionProps<T, M> & React__default.RefAttributes<CollectionRef>) => React__default.ReactElement | null;
540
817
 
541
- interface MenuItemProps<T extends string> {
542
- value?: T;
543
- children: ReactNode;
544
- onSelect: (value: T) => void;
545
- checked: boolean;
546
- disabled: boolean;
547
- indented: boolean;
548
- shortcut?: string;
549
- icon?: ReactNode;
550
- items?: MenuItem<T>[];
818
+ type Props$d = {
819
+ id?: string;
820
+ style?: any;
821
+ className?: string;
822
+ type?: "text" | "search";
823
+ disabled?: boolean;
824
+ value: string;
825
+ placeholder?: string;
826
+ role?: AriaRole;
827
+ name?: HTMLInputElement["name"];
828
+ onKeyDown?: KeyboardEventHandler;
829
+ onClick?: MouseEventHandler;
830
+ onDoubleClick?: MouseEventHandler;
831
+ onPointerDown?: PointerEventHandler;
832
+ onFocusCapture?: FocusEventHandler;
833
+ onFocusChange?: (isFocused: boolean) => void;
834
+ onBlur?: FocusEventHandler;
835
+ } & Pick<InputHTMLAttributes<HTMLInputElement>, "autoComplete" | "autoCapitalize" | "autoCorrect" | "spellCheck" | "autoFocus">;
836
+ type ReadOnlyProps = Props$d & {
837
+ readOnly: true;
838
+ };
839
+ type ControlledProps = Props$d & {
840
+ onChange: (value: string) => void;
841
+ onFocus?: FocusEventHandler;
842
+ onBlur?: FocusEventHandler;
843
+ };
844
+ type SubmittableProps = Props$d & {
845
+ onSubmit: (value: string) => void;
846
+ allowSubmittingWithSameValue?: boolean;
847
+ submitAutomaticallyAfterDelay?: number;
848
+ };
849
+ type TextInputProps = ReadOnlyProps | ControlledProps | SubmittableProps;
850
+
851
+ type LabelPosition = "inset" | "start" | "end" | "above";
852
+ interface LabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
853
+ /** @default start */
854
+ position?: Exclude<LabelPosition, "inset">;
551
855
  }
552
- interface MenuProps<T extends string> {
553
- children: ReactNode;
856
+ type InsetLabelProps = {
857
+ /** @default medium */
858
+ size?: InputFieldSize;
859
+ /** when used with an InputField.Root and label position is inset, it will add padding to the right of the label to account for the button */
860
+ buttonSize?: number;
861
+ } & LabelHTMLAttributes<HTMLLabelElement>;
862
+ declare const insetLabelTextStyles = "font-sans text-label uppercase text-text-disabled leading-[19px] font-bold text-[60%] truncate pointer-events-none text-right";
863
+ declare const insetLabelStyles = "flex items-center absolute top-0 bottom-0 z-label";
864
+ declare const InsetLabel: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<{
865
+ /** @default medium */
866
+ size?: InputFieldSize;
867
+ /** when used with an InputField.Root and label position is inset, it will add padding to the right of the label to account for the button */
868
+ buttonSize?: number;
869
+ } & React__default.LabelHTMLAttributes<HTMLLabelElement> & React__default.RefAttributes<HTMLLabelElement>>>;
870
+ declare const Label: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<LabelProps & React__default.RefAttributes<HTMLLabelElement>>>;
871
+
872
+ type InputFieldSize = "small" | "medium" | "large";
873
+ type InputFieldContextValue = {
874
+ labelSize?: number;
875
+ buttonSize?: number;
876
+ /** @default medium */
877
+ size: InputFieldSize;
878
+ isFocused: boolean;
879
+ onFocusChange: (isFocused: boolean) => void;
880
+ inputRef?: ForwardedRef<HTMLInputElement>;
881
+ setInputRef?: (ref: ForwardedRef<HTMLInputElement>) => void;
882
+ setLabelWidth?: (width: number) => void;
883
+ setButtonWidth?: (width: number) => void;
884
+ id?: string;
885
+ label?: ReactNode;
886
+ labelPosition?: LabelPosition;
887
+ };
888
+ declare const useInputFieldContext: () => InputFieldContextValue;
889
+ declare const getFieldSpacing: ({ buttonSize, labelSize, variant, }: {
890
+ buttonSize?: number;
891
+ labelSize?: number;
892
+ variant?: InputFieldVariant;
893
+ }) => {
894
+ paddingLeft: string;
895
+ paddingRight: string;
896
+ };
897
+ interface InputFieldDropdownProps<T extends string> {
898
+ id?: string;
554
899
  items: MenuItem<T>[];
555
900
  onSelect: (value: T) => void;
556
- isNested?: boolean;
557
- shouldBindKeyboardShortcuts?: boolean;
558
- onOpenChange?: (open: boolean) => void;
901
+ children?: ReactNode;
902
+ }
903
+ type InputFieldVariant = "normal" | "bare";
904
+ type InputFieldInputProps = TextInputProps & {
905
+ textAlign?: Property.TextAlign;
906
+ variant?: "bare";
907
+ };
908
+ type InputFieldNumberInputProps = Omit<TextInputProps, "value" | "onChange" | "onKeyDown" | "onSubmit" | "readOnly"> & {
909
+ value: number | undefined;
910
+ onNudge?: (value: number) => void;
911
+ variant?: "bare";
912
+ onFocus?: FocusEventHandler;
913
+ onBlur?: FocusEventHandler;
914
+ readOnly?: boolean;
915
+ className?: string;
916
+ } & ({
917
+ onChange: (value: number) => void;
918
+ } | {
919
+ onSubmit: (value: number) => void;
920
+ });
921
+ declare function InputFieldNumberInput(props: InputFieldNumberInputProps): React__default.JSX.Element;
922
+ interface InputFieldRootProps {
923
+ id?: string;
924
+ children?: ReactNode;
925
+ width?: number;
926
+ labelSize?: number;
927
+ /** @default medium */
928
+ size?: InputFieldSize;
929
+ renderPopoverContent?: (options: {
930
+ width: number;
931
+ }) => ReactNode;
932
+ /**
933
+ * if there is a popover, this is the offset from the trigger
934
+ * @default 3
935
+ */
936
+ sideOffset?: number;
937
+ onFocusChange?: (isFocused: boolean) => void;
938
+ style?: React__default.CSSProperties;
939
+ className?: string;
940
+ }
941
+ declare function InputFieldRoot({ id: idProp, children, width, sideOffset, labelSize, size, renderPopoverContent, onFocusChange, style, className, }: InputFieldRootProps): React__default.JSX.Element;
942
+ type InputFieldProps = InputFieldRootProps & InputFieldInputProps;
943
+ declare const InputField: React__default.ForwardRefExoticComponent<InputFieldProps & React__default.RefAttributes<HTMLInputElement>> & {
944
+ readonly Root: React__default.MemoExoticComponent<typeof InputFieldRoot>;
945
+ readonly Input: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<InputFieldInputProps & React__default.RefAttributes<HTMLInputElement>>>;
946
+ readonly Typeahead: React__default.MemoExoticComponent<(props: {
947
+ prefix: string;
948
+ value: string;
949
+ isFocused: boolean;
950
+ }) => React__default.JSX.Element>;
951
+ readonly NumberInput: React__default.MemoExoticComponent<typeof InputFieldNumberInput>;
952
+ readonly DropdownMenu: <T extends string>(props: InputFieldDropdownProps<T>) => React__default.ReactElement | null;
953
+ readonly Button: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<React__default.ButtonHTMLAttributes<HTMLButtonElement> & ButtonRootProps & {
954
+ buttonClassName?: string;
955
+ variant?: "floating" | "normal";
956
+ } & React__default.RefAttributes<HTMLButtonElement>>>;
957
+ readonly Label: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<React__default.LabelHTMLAttributes<HTMLLabelElement> & React__default.RefAttributes<HTMLLabelElement>>>;
958
+ readonly PrimitiveElement: ({ readOnly, disabled, className, style, ...props }: {
959
+ readOnly?: boolean;
960
+ disabled?: boolean;
961
+ } & React__default.DetailedHTMLProps<React__default.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>) => React__default.JSX.Element;
962
+ };
963
+
964
+ type BaseComboboxProps<T extends string> = {
965
+ id?: string;
966
+ loading?: boolean;
967
+ placeholder?: string;
968
+ items: MenuItem<T>[];
969
+ onFocus?: (event: React__default.FocusEvent<HTMLInputElement>) => void;
970
+ onDeleteWhenEmpty?: () => void;
971
+ size?: InputFieldSize;
972
+ style?: React__default.CSSProperties;
973
+ className?: string;
974
+ label?: React__default.ReactNode;
975
+ children?: React__default.ReactNode;
976
+ hideMenuWhenEmptyValue?: boolean;
977
+ readOnly?: boolean;
978
+ tabBehavior?: "autocomplete" | "select";
979
+ openMenuBehavior?: "showAllItems" | "showFilteredItems";
980
+ };
981
+ type StringModeOnlyProps = {
982
+ mode: "string";
983
+ value?: string;
984
+ onChange?: (value: string) => void;
985
+ onSelectItem?: (value: string) => void;
986
+ onBlur?: (didSubmit: boolean, value: string) => void;
987
+ onHoverItem?: (value: string | undefined) => void;
988
+ allowArbitraryValues?: boolean;
989
+ };
990
+ type StringModeProps<T extends string> = BaseComboboxProps<T> & StringModeOnlyProps;
991
+ type OptionModeOnlyProps<T extends string> = {
992
+ mode?: "option";
993
+ value?: SelectableMenuItem<T>;
994
+ onChange?: (value: SelectableMenuItem<T>) => void;
995
+ onSelectItem?: (value: SelectableMenuItem<T>) => void;
996
+ onBlur?: (didSubmit: boolean, value: SelectableMenuItem<T>) => void;
997
+ onHoverItem?: (value: SelectableMenuItem<T> | undefined) => void;
998
+ allowArbitraryValues?: false;
999
+ };
1000
+ type OptionModeProps<T extends string> = BaseComboboxProps<T> & OptionModeOnlyProps<T>;
1001
+ type ComboboxProps<T extends string> = StringModeProps<T> | OptionModeProps<T>;
1002
+ interface ComboboxRef<T extends string> {
1003
+ focus(): void;
1004
+ setValue(value: string | SelectableMenuItem<T>): void;
1005
+ selectAllInputText(): void;
1006
+ }
1007
+ declare const Combobox: <T extends string>(props: ComboboxProps<T> & React__default.RefAttributes<ComboboxRef<T>>) => React__default.ReactElement | null;
1008
+
1009
+ interface ComboboxMenuProps<T extends string> {
1010
+ items: ScoredMenuItem<T>[];
1011
+ selectedIndex: number;
1012
+ onSelectItem: (item: ScoredMenuItem<T>) => void;
1013
+ onHoverIndex: (index: number) => void;
1014
+ listSize: Size;
1015
+ style?: React__default.CSSProperties;
1016
+ }
1017
+ declare const ComboboxMenu: <T extends string>(props: ComboboxMenuProps<T> & React__default.RefAttributes<IVirtualizedList>) => React__default.ReactElement | null;
1018
+
1019
+ interface ISearchCompletionMenu {
1020
+ focus: () => void;
1021
+ }
1022
+ declare const SearchCompletionMenu: React__default.ForwardRefExoticComponent<{
1023
+ onSelect: (item: SelectableMenuItem$1<string>) => void;
1024
+ onHover?: (item: SelectableMenuItem$1<string>) => void;
1025
+ onClose: () => void;
1026
+ items: SelectableMenuItem$1<string>[];
1027
+ width?: number;
1028
+ } & React__default.RefAttributes<ISearchCompletionMenu>>;
1029
+
1030
+ declare const CommandPalette: React__default.NamedExoticComponent<{
1031
+ showCommandPalette: boolean;
1032
+ setShowCommandPalette: (value: boolean) => void;
1033
+ } & Pick<{
1034
+ onSelect: (item: _noya_app_noya_designsystem.SelectableMenuItem<string>) => void;
1035
+ onHover?: (item: _noya_app_noya_designsystem.SelectableMenuItem<string>) => void;
1036
+ onClose: () => void;
1037
+ items: _noya_app_noya_designsystem.SelectableMenuItem<string>[];
1038
+ width?: number;
1039
+ } & React__default.RefAttributes<ISearchCompletionMenu>, "onSelect" | "items" | "onHover">>;
1040
+
1041
+ interface MenuItemProps<T extends string> {
1042
+ value?: T;
1043
+ children: ReactNode;
1044
+ onSelect: (value: T) => void;
1045
+ checked: boolean;
1046
+ disabled: boolean;
1047
+ indented: boolean;
1048
+ shortcut?: string;
1049
+ icon?: ReactNode;
1050
+ items?: MenuItem<T>[];
1051
+ }
1052
+ interface MenuProps<T extends string> {
1053
+ children: ReactNode;
1054
+ items: MenuItem<T>[];
1055
+ onSelect: (value: T) => void;
1056
+ shouldBindKeyboardShortcuts?: boolean;
1057
+ onOpenChange?: (open: boolean) => void;
559
1058
  }
560
1059
  declare const ContextMenu: <T extends string>(props: MenuProps<T>) => React__default.ReactElement | null;
561
1060
 
@@ -597,12 +1096,69 @@ declare const DraggableMenuButton: <T extends string>(props: {
597
1096
  isVisible?: boolean;
598
1097
  }) => React__default.ReactElement | null;
599
1098
 
1099
+ type DropdownRootProps<T extends string> = MenuProps<T> & {
1100
+ open?: boolean;
1101
+ onCloseAutoFocus?: React__default.EventHandler<SyntheticEvent<unknown>>;
1102
+ emptyState?: React__default.ReactNode;
1103
+ contentStyle?: React__default.CSSProperties;
1104
+ } & Pick<ComponentProps<typeof RadixDropdownMenu.Content>, "side" | "sideOffset" | "align" | "alignOffset" | "collisionPadding">;
600
1105
  declare const DropdownMenu: <T extends string>(props: MenuProps<T> & {
601
1106
  open?: boolean;
602
1107
  onCloseAutoFocus?: React__default.EventHandler<SyntheticEvent<unknown>>;
603
1108
  emptyState?: React__default.ReactNode;
1109
+ contentStyle?: React__default.CSSProperties;
604
1110
  } & Pick<RadixDropdownMenu.DropdownMenuContentProps & React__default.RefAttributes<HTMLDivElement>, "align" | "side" | "sideOffset" | "alignOffset" | "collisionPadding"> & React__default.RefAttributes<HTMLElement>) => React__default.ReactElement | null;
605
1111
 
1112
+ type RenderPreviewProps = {
1113
+ children: string;
1114
+ onClick: () => void;
1115
+ ref: React__default.Ref<HTMLElement & HTMLAnchorElement & HTMLSpanElement>;
1116
+ tabIndex: number;
1117
+ onKeyDown: (e: React__default.KeyboardEvent) => void;
1118
+ style?: React__default.CSSProperties;
1119
+ className?: string;
1120
+ };
1121
+ type Props$b = {
1122
+ value: string;
1123
+ children?: (props: RenderPreviewProps) => React__default.ReactNode;
1124
+ placeholder?: string;
1125
+ onChange?: (value: string) => void;
1126
+ onSubmit?: (value: string) => void;
1127
+ style?: React__default.CSSProperties;
1128
+ textStyle?: React__default.CSSProperties;
1129
+ className?: string;
1130
+ id?: string;
1131
+ disabled?: boolean;
1132
+ focused?: boolean;
1133
+ textClassName?: string;
1134
+ readOnly?: boolean;
1135
+ onBlur?: () => void;
1136
+ /**
1137
+ * If true, will render an unfocused input. This should only be used for visual regression tests.
1138
+ */
1139
+ testFocused?: boolean;
1140
+ };
1141
+ interface EditableTextRef {
1142
+ startEditing: () => void;
1143
+ }
1144
+ declare const EditableText: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<Props$b & React__default.RefAttributes<EditableTextRef>>>;
1145
+
1146
+ type FadeDirection = "left" | "right" | "top" | "bottom";
1147
+ type FadeProps = {
1148
+ children: ReactNode;
1149
+ direction?: FadeDirection;
1150
+ width?: number;
1151
+ height?: number;
1152
+ className?: string;
1153
+ zIndex?: number;
1154
+ /**
1155
+ * @default "front"
1156
+ * If "back", the fade will be positioned behind the children
1157
+ */
1158
+ position?: "front" | "back";
1159
+ };
1160
+ declare const Fade: ({ children, direction, width, height, className, zIndex, position, }: FadeProps) => React__default.JSX.Element;
1161
+
606
1162
  declare const SUPPORTED_IMAGE_UPLOAD_TYPES: ("image/png" | "image/jpeg" | "image/webp" | "image/svg+xml" | "application/pdf")[];
607
1163
  declare const SUPPORTED_CANVAS_UPLOAD_TYPES: ("" | "image/png" | "image/jpeg" | "image/webp" | "image/svg+xml" | "application/pdf")[];
608
1164
  type SupportedImageUploadType = (typeof SUPPORTED_IMAGE_UPLOAD_TYPES)[number];
@@ -614,21 +1170,21 @@ type SketchPattern = {
614
1170
  patternTileScale: number;
615
1171
  };
616
1172
 
617
- interface Props$b {
1173
+ interface Props$a {
618
1174
  id?: string;
619
1175
  value?: Sketch.Color | Sketch.Gradient | SketchPattern;
620
1176
  }
621
- declare const FillInputField: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<Props$b & React__default.RefAttributes<HTMLButtonElement>>>;
1177
+ declare const FillInputField: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<Props$a & React__default.RefAttributes<HTMLButtonElement>>>;
622
1178
 
623
1179
  declare const PatternPreviewBackground: React.NamedExoticComponent<{
624
1180
  fillType: Sketch.PatternFillType;
625
1181
  tileScale: number;
626
1182
  imageRef: string;
627
1183
  }>;
628
- interface Props$a {
1184
+ interface Props$9 {
629
1185
  value?: Sketch.Color | Sketch.Gradient | SketchPattern;
630
1186
  }
631
- declare const FillPreviewBackground: React.NamedExoticComponent<Props$a>;
1187
+ declare const FillPreviewBackground: React.NamedExoticComponent<Props$9>;
632
1188
 
633
1189
  interface FloatingWindowProps {
634
1190
  title?: string;
@@ -649,7 +1205,7 @@ interface FloatingWindowProps {
649
1205
  }
650
1206
  declare const FloatingWindow: React__default.FC<FloatingWindowProps>;
651
1207
 
652
- interface Props$9 {
1208
+ interface Props$8 {
653
1209
  value: Sketch.GradientStop[];
654
1210
  selectedStop: number;
655
1211
  onChangeColor: (color: Sketch.Color) => void;
@@ -658,561 +1214,259 @@ interface Props$9 {
658
1214
  onDelete: () => void;
659
1215
  onSelectStop: (index: number) => void;
660
1216
  }
661
- declare const GradientPicker: React.NamedExoticComponent<Props$9>;
1217
+ declare const GradientPicker: React.NamedExoticComponent<Props$8>;
662
1218
 
663
- type GridViewSize = "xxs" | "xs" | "small" | "medium" | "large" | "xl";
664
1219
  interface ItemProps<MenuItemType extends string = string> {
665
1220
  id: string;
666
1221
  title?: ReactNode;
667
1222
  subtitle?: ReactNode;
668
1223
  loading?: boolean;
669
1224
  selected?: boolean;
670
- onClick?: (event: React__default.MouseEvent) => void;
671
- onPress?: (options: KeyModifiers) => void;
672
- onDoubleClick?: () => void;
673
- onHoverChange?: (isHovering: boolean) => void;
674
- children?: ReactNode;
675
- menuItems?: MenuItem<MenuItemType>[];
676
- onSelectMenuItem?: (value: MenuItemType) => void;
677
- onContextMenu?: () => void;
678
- style?: CSSProperties;
679
- }
680
- type GridViewContextValue = {
681
- size: GridViewSize;
682
- textPosition: "overlay" | "below" | "toolip";
683
- bordered: boolean;
684
- disabled: boolean;
685
- };
686
- interface GridViewRootProps extends Partial<GridViewContextValue> {
687
- children: ReactNode;
688
- onClick?: () => void;
689
- scrollable?: boolean;
690
- }
691
- declare function GridViewRoot({ size, children, scrollable, onClick, textPosition, bordered, disabled, }: GridViewRootProps): React__default.JSX.Element;
692
- declare function GridViewSection({ children, className, }: {
693
- children?: ReactNode;
694
- className?: string;
695
- }): React__default.JSX.Element;
696
- declare function GridViewSectionHeader({ title }: {
697
- title: string;
698
- }): React__default.JSX.Element;
699
- declare namespace GridView {
700
- const Root: React__default.MemoExoticComponent<typeof GridViewRoot>;
701
- const Item: React__default.MemoExoticComponent<(<MenuItemType extends string>(props: ItemProps<MenuItemType> & React__default.RefAttributes<HTMLDivElement>) => React__default.ReactElement | null)>;
702
- const Section: React__default.MemoExoticComponent<typeof GridViewSection>;
703
- const SectionHeader: React__default.MemoExoticComponent<typeof GridViewSectionHeader>;
704
- }
705
-
706
- declare const IconButton: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<ButtonRootProps, "size" | "children" | "variant" | "flex"> & {
707
- iconName: IconName;
708
- className?: string;
709
- style?: React.CSSProperties;
710
- selected?: boolean;
711
- color?: string;
712
- size?: number;
713
- } & React.RefAttributes<HTMLButtonElement>>>;
714
-
715
- declare const InspectorContainer: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<{
716
- header?: React__default.ReactNode;
717
- children?: React__default.ReactNode;
718
- fallback?: React__default.ReactNode;
719
- showDividers?: boolean;
720
- id?: string;
721
- className?: string;
722
- style?: React__default.CSSProperties;
723
- } & React__default.RefAttributes<HTMLDivElement>>>;
724
-
725
- interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
726
- }
727
- declare const Label: React.MemoExoticComponent<React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>>;
728
-
729
- interface ContainerProps {
730
- children: React.ReactNode;
731
- renderLabel: (provided: {
732
- id: string;
733
- index: number;
734
- }) => React.ReactNode;
735
- }
736
- declare const LabeledElementView: React.NamedExoticComponent<ContainerProps>;
737
-
738
- type MessageProps = {
739
- role: "user" | "assistant" | "system" | "data";
740
- children?: React__default.ReactNode;
741
- user?: MultiplayerUser;
742
- /** @default 27 */
743
- avatarSize?: number;
744
- };
745
- declare const Message: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<MessageProps & React__default.RefAttributes<HTMLDivElement>>>;
746
-
747
- type PopoverVariant = "normal" | "large";
748
- interface Props$8 extends Pick<ComponentProps<(typeof PopoverPrimitive)["Content"]>, "onOpenAutoFocus" | "onCloseAutoFocus" | "onPointerDownOutside" | "onInteractOutside" | "onFocusOutside" | "side"> {
749
- children: React__default.ReactNode;
750
- trigger: React__default.ReactNode;
751
- variant?: PopoverVariant;
752
- closable?: boolean;
753
- open?: boolean;
754
- onOpenChange?: (open: boolean) => void;
755
- sideOffset?: number;
756
- onClickClose?: () => void;
757
- showArrow?: boolean;
758
- }
759
- declare function Popover({ children, trigger, variant, closable, open, side, sideOffset, showArrow, onOpenChange, onOpenAutoFocus, onCloseAutoFocus, onPointerDownOutside, onInteractOutside, onFocusOutside, onClickClose, }: Props$8): React__default.JSX.Element;
760
-
761
- type ProgressVariant = "normal" | "warning" | "primary" | "secondary";
762
- declare function Progress({ value, variant, className, }: {
763
- value: number;
764
- variant?: ProgressVariant;
765
- className?: string;
766
- }): React.JSX.Element;
767
-
768
- interface Props$7 {
769
- children?: React.ReactNode | ((scrollElementRef: HTMLDivElement) => React.ReactNode);
770
- }
771
- declare const ScrollArea: React.NamedExoticComponent<Props$7>;
772
-
773
- type SegmentedControlColorScheme = "primary" | "secondary";
774
- interface SegmentedControlProps<T extends string> {
775
- id?: string;
776
- value?: T;
777
- onValueChange?: (value: T) => void;
778
- /** @default primary */
779
- colorScheme?: SegmentedControlColorScheme;
780
- allowEmpty?: boolean;
781
- separator?: boolean;
782
- items: SegmentedControlItemProps<T>[];
783
- className?: string;
784
- style?: React__default.CSSProperties;
785
- }
786
- type SegmentedControlItemProps<T extends string> = {
787
- title?: ReactNode;
788
- className?: string;
789
- style?: React__default.CSSProperties;
790
- tooltip?: ReactNode;
791
- } & Pick<RegularMenuItem<T>, "value" | "disabled" | "icon" | "role">;
792
- declare const SegmentedControl: React__default.MemoExoticComponent<(<T extends string>({ id, value, onValueChange, colorScheme, allowEmpty, items, separator, className, style, }: SegmentedControlProps<T>) => React__default.JSX.Element)>;
793
-
794
- type Props$6<T extends string> = {
795
- id?: string;
796
- style?: React__default.CSSProperties;
797
- className?: string;
798
- menuItems: MenuItem<T>[];
799
- value: T;
800
- onSelect?: (value: T) => void;
801
- placeholder?: string;
802
- disabled?: boolean;
803
- readOnly?: boolean;
804
- label?: React__default.ReactNode;
805
- onFocus?: FocusEventHandler;
806
- onBlur?: FocusEventHandler;
807
- contentStyle?: React__default.CSSProperties;
808
- } & Pick<SelectProps, "open" | "onOpenChange">;
809
- declare const labelTextStyles = "font-sans text-label uppercase text-text-disabled leading-[19px] font-bold text-[60%]";
810
- declare const SelectMenu: <T extends string = string>(props: Props$6<T>) => React__default.ReactElement | null;
811
-
812
- type ColorScheme = "primary" | "secondary";
813
- interface Props$5 {
814
- id?: string;
815
- style?: React__default.CSSProperties;
816
- className?: string;
817
- value: number;
818
- onValueChange: (value: number) => void;
819
- min: number;
820
- max: number;
821
- step?: number;
822
- colorScheme?: ColorScheme;
823
- label?: React__default.ReactNode;
824
- onFocus?: FocusEventHandler;
825
- onBlur?: FocusEventHandler;
826
- readOnly?: boolean;
827
- }
828
- declare const Slider: React__default.NamedExoticComponent<Props$5>;
829
-
830
- interface Props$4 {
831
- size?: number | string;
832
- inline?: boolean;
833
- }
834
- declare namespace Spacer {
835
- const Vertical: React.ForwardRefExoticComponent<Props$4 & React.RefAttributes<HTMLSpanElement>>;
836
- const Horizontal: React.ForwardRefExoticComponent<Props$4 & React.RefAttributes<HTMLSpanElement>>;
837
- }
838
-
839
- type SwitchColorScheme = "primary" | "secondary";
840
- interface Props$3 {
841
- id?: string;
842
- value: boolean;
843
- onChange: (value: boolean) => void;
844
- /** @default normal */
845
- colorScheme?: SwitchColorScheme;
846
- disabled?: boolean;
847
- onFocus?: React.FocusEventHandler;
848
- onBlur?: React.FocusEventHandler;
849
- className?: string;
850
- style?: React.CSSProperties;
851
- }
852
- declare const Switch: ({ id, value, onChange, colorScheme, disabled, onFocus, onBlur, style, className, }: Props$3) => React.JSX.Element;
853
-
854
- declare const config: {
855
- content: string[];
856
- corePlugins: {
857
- preflight: false;
858
- };
859
- theme: {
860
- extend: {
861
- colors: {
862
- "logo-fill": string;
863
- "logo-highlight": string;
864
- background: string;
865
- text: string;
866
- "text-muted": string;
867
- "text-subtle": string;
868
- "text-disabled": string;
869
- "text-decorative-light": string;
870
- "divider-subtle": string;
871
- divider: string;
872
- "divider-strong": string;
873
- primary: string;
874
- "primary-light": string;
875
- "primary-pastel": string;
876
- secondary: string;
877
- "secondary-light": string;
878
- "secondary-pastel": string;
879
- "secondary-bright": string;
880
- "input-background": string;
881
- "input-background-light": string;
882
- "code-background": string;
883
- "code-background-dark": string;
884
- "selected-background": string;
885
- "breadcrumb-text": string;
886
- "breadcrumb-text-hover": string;
887
- "breadcrumb-icon": string;
888
- "canvas-background": string;
889
- "canvas-grid": string;
890
- "sidebar-background": string;
891
- "sidebar-background-transparent": string;
892
- "popover-background": string;
893
- "popover-divider": string;
894
- "listview-raised-background": string;
895
- "listview-editing-background": string;
896
- "slider-thumb-background": string;
897
- "slider-border": string;
898
- "segmented-control-item": string;
899
- mask: string;
900
- "transparent-checker": string;
901
- scrollbar: string;
902
- "placeholder-dots": string;
903
- "drag-outline": string;
904
- "active-background": string;
905
- "thumbnail-background": string;
906
- "thumbnail-shadow": string;
907
- "inline-code-text": string;
908
- "inline-code-background": string;
909
- "text-link": string;
910
- "text-link-focused": string;
911
- icon: string;
912
- "icon-selected": string;
913
- warning: string;
914
- dot: string;
915
- "row-highlight": string;
916
- "table-row-background": string;
917
- "chip-primary-bg": string;
918
- "chip-secondary-bg": string;
919
- "chip-error-bg": string;
920
- "chip-default-bg": string;
921
- "chip-primary-shadow": string;
922
- "chip-secondary-shadow": string;
923
- "chip-error-shadow": string;
924
- "chip-default-shadow": string;
925
- "floating-button": string;
926
- };
927
- fontFamily: {
928
- sans: [string, string, string, string, string, string, string, string, string, string];
929
- mono: [string, string, string, string, string];
930
- };
931
- fontSize: {
932
- title: [string, {
933
- lineHeight: string;
934
- letterSpacing: string;
935
- }];
936
- subtitle: [string, {
937
- lineHeight: string;
938
- letterSpacing: string;
939
- }];
940
- heading1: [string, {
941
- lineHeight: string;
942
- letterSpacing: string;
943
- }];
944
- heading2: [string, {
945
- lineHeight: string;
946
- letterSpacing: string;
947
- }];
948
- heading3: [string, {
949
- lineHeight: string;
950
- letterSpacing: string;
951
- }];
952
- heading4: [string, {
953
- lineHeight: string;
954
- }];
955
- heading5: [string, {
956
- lineHeight: string;
957
- }];
958
- body: [string, {
959
- lineHeight: string;
960
- }];
961
- small: [string, {
962
- lineHeight: string;
963
- }];
964
- code: [string, {
965
- lineHeight: string;
966
- }];
967
- button: [string, {
968
- lineHeight: string;
969
- letterSpacing: string;
970
- }];
971
- label: [string, {
972
- lineHeight: string;
973
- letterSpacing: string;
974
- }];
975
- };
976
- spacing: {
977
- nano: string;
978
- micro: string;
979
- small: string;
980
- medium: string;
981
- large: string;
982
- xlarge: string;
983
- xxlarge: string;
984
- "inset-top": string;
985
- "sidebar-width": string;
986
- "toolbar-height": string;
987
- "toolbar-separator": string;
988
- "inspector-h-separator": string;
989
- "inspector-v-separator": string;
990
- "dialog-padding": string;
991
- };
992
- keyframes: {
993
- spin: {
994
- "0%": {
995
- transform: string;
996
- };
997
- "100%": {
998
- transform: string;
999
- };
1000
- };
1001
- shimmer: {
1002
- "0%": {
1003
- backgroundPosition: string;
1004
- };
1005
- "100%": {
1006
- backgroundPosition: string;
1007
- };
1008
- };
1009
- };
1010
- animation: {
1011
- spin: string;
1012
- shimmer: string;
1013
- };
1014
- zIndex: {
1015
- interactable: string;
1016
- label: string;
1017
- menu: string;
1018
- };
1019
- };
1020
- };
1021
- safelist: string[];
1022
- };
1023
-
1024
- type Theme = (typeof config.theme)["extend"];
1025
- type ThemeColor = keyof Theme["colors"];
1026
- declare const cssVars: {
1027
- colors: {
1028
- logoFill: string;
1029
- logoHighlight: string;
1030
- background: string;
1031
- text: string;
1032
- textMuted: string;
1033
- textSubtle: string;
1034
- textDisabled: string;
1035
- textDecorativeLight: string;
1036
- dividerSubtle: string;
1037
- divider: string;
1038
- dividerStrong: string;
1039
- primary: string;
1040
- primaryLight: string;
1041
- primaryPastel: string;
1042
- secondary: string;
1043
- secondaryLight: string;
1044
- secondaryPastel: string;
1045
- secondaryBright: string;
1046
- inputBackground: string;
1047
- inputBackgroundLight: string;
1048
- codeBackground: string;
1049
- codeBackgroundDark: string;
1050
- selectedBackground: string;
1051
- breadcrumbText: string;
1052
- breadcrumbTextHover: string;
1053
- breadcrumbIcon: string;
1054
- canvasBackground: string;
1055
- canvasGrid: string;
1056
- sidebarBackground: string;
1057
- sidebarBackgroundTransparent: string;
1058
- popoverBackground: string;
1059
- popoverDivider: string;
1060
- listviewRaisedBackground: string;
1061
- listviewEditingBackground: string;
1062
- sliderThumbBackground: string;
1063
- sliderBorder: string;
1064
- segmentedControlItem: string;
1065
- mask: string;
1066
- transparentChecker: string;
1067
- scrollbar: string;
1068
- placeholderDots: string;
1069
- dragOutline: string;
1070
- activeBackground: string;
1071
- thumbnailBackground: string;
1072
- thumbnailShadow: string;
1073
- inlineCodeText: string;
1074
- inlineCodeBackground: string;
1075
- textLink: string;
1076
- textLinkFocused: string;
1077
- icon: string;
1078
- iconSelected: string;
1079
- warning: string;
1080
- dot: string;
1081
- rowHighlight: string;
1082
- tableRowBackground: string;
1083
- chipPrimaryBg: string;
1084
- chipSecondaryBg: string;
1085
- chipErrorBg: string;
1086
- chipDefaultBg: string;
1087
- chipPrimaryShadow: string;
1088
- chipSecondaryShadow: string;
1089
- chipErrorShadow: string;
1090
- chipDefaultShadow: string;
1091
- floatingButton: string;
1092
- };
1093
- fontFamily: {
1094
- sans: [string, string, string, string, string, string, string, string, string, string];
1095
- mono: [string, string, string, string, string];
1096
- };
1097
- fontSize: {
1098
- title: [string, {
1099
- lineHeight: string;
1100
- letterSpacing: string;
1101
- }];
1102
- subtitle: [string, {
1103
- lineHeight: string;
1104
- letterSpacing: string;
1105
- }];
1106
- heading1: [string, {
1107
- lineHeight: string;
1108
- letterSpacing: string;
1109
- }];
1110
- heading2: [string, {
1111
- lineHeight: string;
1112
- letterSpacing: string;
1113
- }];
1114
- heading3: [string, {
1115
- lineHeight: string;
1116
- letterSpacing: string;
1117
- }];
1118
- heading4: [string, {
1119
- lineHeight: string;
1120
- }];
1121
- heading5: [string, {
1122
- lineHeight: string;
1123
- }];
1124
- body: [string, {
1125
- lineHeight: string;
1126
- }];
1127
- small: [string, {
1128
- lineHeight: string;
1129
- }];
1130
- code: [string, {
1131
- lineHeight: string;
1132
- }];
1133
- button: [string, {
1134
- lineHeight: string;
1135
- letterSpacing: string;
1136
- }];
1137
- label: [string, {
1138
- lineHeight: string;
1139
- letterSpacing: string;
1140
- }];
1141
- };
1142
- spacing: {
1143
- nano: string;
1144
- micro: string;
1145
- small: string;
1146
- medium: string;
1147
- large: string;
1148
- xlarge: string;
1149
- xxlarge: string;
1150
- insetTop: string;
1151
- sidebarWidth: string;
1152
- toolbarHeight: string;
1153
- toolbarSeparator: string;
1154
- inspectorHSeparator: string;
1155
- inspectorVSeparator: string;
1156
- dialogPadding: string;
1157
- };
1158
- keyframes: {
1159
- spin: {
1160
- "0%": {
1161
- transform: string;
1162
- };
1163
- "100%": {
1164
- transform: string;
1165
- };
1166
- };
1167
- shimmer: {
1168
- "0%": {
1169
- backgroundPosition: string;
1170
- };
1171
- "100%": {
1172
- backgroundPosition: string;
1173
- };
1174
- };
1175
- };
1176
- animation: {
1177
- spin: string;
1178
- shimmer: string;
1179
- };
1180
- zIndex: {
1181
- interactable: string;
1182
- label: string;
1183
- menu: string;
1184
- };
1225
+ onClick?: (event: React__default.MouseEvent) => void;
1226
+ onSelect?: (options: KeyModifiers) => void;
1227
+ onDoubleClick?: () => void;
1228
+ onHoverChange?: (isHovering: boolean) => void;
1229
+ children?: ReactNode;
1230
+ menuItems?: MenuItem<MenuItemType>[];
1231
+ onSelectMenuItem?: (value: MenuItemType) => void;
1232
+ onContextMenu?: () => void;
1233
+ onMenuOpenChange?: (open: boolean) => void;
1234
+ style?: CSSProperties;
1235
+ action?: ReactNode;
1236
+ testHoveredId?: string;
1237
+ onKeyDown?: (event: React__default.KeyboardEvent) => void;
1238
+ hovered?: boolean;
1239
+ }
1240
+ type GridViewContextValue = {
1241
+ minColumnWidth: string;
1242
+ textPosition: "overlay" | "below" | "toolip";
1243
+ bordered: boolean;
1244
+ disabled: boolean;
1245
+ gap: number;
1185
1246
  };
1247
+ interface GridViewRootProps extends Partial<GridViewContextValue> {
1248
+ children: ReactNode;
1249
+ onClick?: () => void;
1250
+ scrollable?: boolean;
1251
+ className?: string;
1252
+ }
1253
+ declare function GridViewRoot({ minColumnWidth, gap, children, scrollable, onClick, textPosition, bordered, disabled, className, }: GridViewRootProps): React__default.JSX.Element;
1254
+ declare function GridViewSection({ children, className, }: {
1255
+ children?: ReactNode;
1256
+ className?: string;
1257
+ }): React__default.JSX.Element;
1258
+ declare function GridViewSectionHeader({ title }: {
1259
+ title: string;
1260
+ }): React__default.JSX.Element;
1261
+ declare namespace GridView {
1262
+ const Root: React__default.MemoExoticComponent<typeof GridViewRoot>;
1263
+ const Item: <MenuItemType extends string>(props: ItemProps<MenuItemType> & React__default.RefAttributes<HTMLDivElement>) => React__default.ReactElement | null;
1264
+ const Section: React__default.MemoExoticComponent<typeof GridViewSection>;
1265
+ const SectionHeader: React__default.MemoExoticComponent<typeof GridViewSectionHeader>;
1266
+ }
1186
1267
 
1187
- type KebabToCamelCase<S extends string> = S extends `${infer First}-${infer Rest}` ? `${First}${Capitalize<KebabToCamelCase<Rest>>}` : S;
1268
+ declare const IconButton: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<ButtonRootProps, "size" | "children" | "variant" | "flex"> & {
1269
+ iconName: IconName;
1270
+ className?: string;
1271
+ style?: React.CSSProperties;
1272
+ selected?: boolean;
1273
+ color?: string;
1274
+ size?: number;
1275
+ } & React.RefAttributes<HTMLButtonElement>>>;
1188
1276
 
1189
- type Variant = "title" | "subtitle" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "body" | "small" | "button" | "code" | "label";
1190
- declare const textStyles: Record<Variant, string>;
1191
- type TextProps = {
1192
- as?: keyof ReactHTML;
1193
- href?: string;
1277
+ declare const InspectorContainer: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<{
1278
+ header?: React__default.ReactNode;
1279
+ children?: React__default.ReactNode;
1280
+ fallback?: React__default.ReactNode;
1281
+ showDividers?: boolean;
1282
+ id?: string;
1194
1283
  className?: string;
1195
1284
  style?: React__default.CSSProperties;
1196
- variant: Variant;
1197
- color?: KebabToCamelCase<ThemeColor>;
1198
- children: ReactNode;
1199
- onClick?: () => void;
1200
- onDoubleClick?: () => void;
1201
- onKeyDown?: (event: React__default.KeyboardEvent<HTMLSpanElement>) => void;
1202
- tabIndex?: number;
1285
+ } & React__default.RefAttributes<HTMLDivElement>>>;
1286
+
1287
+ type MenuSeparatorComponent = React__default.FC<{
1288
+ className?: string;
1289
+ }>;
1290
+ type MenuItemTextComponent = React__default.FC<{
1291
+ children?: React__default.ReactNode;
1292
+ }>;
1293
+ type MenuItemComponent = React__default.ForwardRefExoticComponent<React__default.RefAttributes<HTMLDivElement> & React__default.PropsWithoutRef<{
1294
+ className?: string;
1295
+ disabled?: boolean;
1296
+ children?: React__default.ReactNode;
1297
+ value: string;
1298
+ onSelect?: (event: any) => void;
1299
+ }>>;
1300
+ type MenuCheckboxItemComponent = React__default.FC<{
1301
+ checked?: boolean | "indeterminate";
1302
+ disabled?: boolean;
1303
+ onSelect?: (event: any) => void;
1304
+ className?: string;
1305
+ children?: React__default.ReactNode;
1306
+ }>;
1307
+ type MenuItemIndicatorComponent = React__default.FC<{
1308
+ className?: string;
1309
+ children?: React__default.ReactNode;
1310
+ }>;
1311
+ type MenuComponents = {
1312
+ Separator: MenuSeparatorComponent;
1313
+ ItemText: MenuItemTextComponent;
1314
+ Item: MenuItemComponent;
1315
+ CheckboxItem?: MenuCheckboxItemComponent;
1316
+ ItemIndicator?: MenuItemIndicatorComponent;
1317
+ Sub?: typeof RadixDropdownMenu.Sub | typeof RadixContextMenu.Sub;
1318
+ SubTrigger?: typeof RadixDropdownMenu.SubTrigger | typeof RadixContextMenu.SubTrigger;
1319
+ SubContent?: typeof RadixDropdownMenu.SubContent | typeof RadixContextMenu.SubContent;
1320
+ Portal?: typeof RadixDropdownMenu.Portal | typeof RadixContextMenu.Portal;
1203
1321
  };
1204
- declare const Text$1: React__default.ForwardRefExoticComponent<TextProps & React__default.RefAttributes<HTMLElement>>;
1205
- type PresetProps = Omit<TextProps, "variant">;
1206
- declare const Heading1: React__default.ForwardRefExoticComponent<PresetProps & React__default.RefAttributes<HTMLElement>>;
1207
- declare const Heading2: React__default.ForwardRefExoticComponent<PresetProps & React__default.RefAttributes<HTMLElement>>;
1208
- declare const Heading3: React__default.ForwardRefExoticComponent<PresetProps & React__default.RefAttributes<HTMLElement>>;
1209
- declare const Heading4: React__default.ForwardRefExoticComponent<PresetProps & React__default.RefAttributes<HTMLElement>>;
1210
- declare const Heading5: React__default.ForwardRefExoticComponent<PresetProps & React__default.RefAttributes<HTMLElement>>;
1211
- declare const Body: React__default.ForwardRefExoticComponent<PresetProps & React__default.RefAttributes<HTMLElement>>;
1212
- declare const Small: React__default.ForwardRefExoticComponent<PresetProps & React__default.RefAttributes<HTMLElement>>;
1213
- declare const Italic: ({ children }: {
1214
- children: ReactNode;
1215
- }) => React__default.JSX.Element;
1322
+ type MenuViewportProps<T extends string> = {
1323
+ items: MenuItem<T>[];
1324
+ Components: MenuComponents;
1325
+ onSelect?: (value: any) => void;
1326
+ };
1327
+ declare const MenuViewport: <T extends string>({ items, Components, onSelect, }: MenuViewportProps<T>) => React__default.JSX.Element;
1328
+
1329
+ interface ContainerProps {
1330
+ children: React.ReactNode;
1331
+ renderLabel: (provided: {
1332
+ id: string;
1333
+ index: number;
1334
+ }) => React.ReactNode;
1335
+ }
1336
+ declare const LabeledElementView: React.NamedExoticComponent<ContainerProps>;
1337
+
1338
+ declare const labeledFieldStyles: (labelPosition?: LabelPosition) => string;
1339
+ declare const LabeledField: React__default.NamedExoticComponent<{
1340
+ children: React__default.ReactNode;
1341
+ label: React__default.ReactNode;
1342
+ labelPosition?: LabelPosition;
1343
+ /** Used for both the `id` of the field and the `htmlFor` of the label, unless `id` and `htmlFor` are explicitly provided */
1344
+ fieldId?: string;
1345
+ className?: string;
1346
+ style?: React__default.CSSProperties;
1347
+ /** @default 100 */
1348
+ minWidth?: number;
1349
+ }>;
1350
+
1351
+ declare const List: <T, M extends string = string>(props: CollectionProps<T, M> & {
1352
+ ref?: React__default.ForwardedRef<CollectionRef>;
1353
+ } & React__default.RefAttributes<CollectionRef>) => React__default.ReactElement | null;
1354
+
1355
+ type MessageProps = {
1356
+ role: "user" | "assistant" | "system" | "data";
1357
+ children?: React__default.ReactNode;
1358
+ user?: MultiplayerUser;
1359
+ /** @default 27 */
1360
+ avatarSize?: number;
1361
+ };
1362
+ declare const Message: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<MessageProps & React__default.RefAttributes<HTMLDivElement>>>;
1363
+
1364
+ type PopoverVariant = "normal" | "large";
1365
+ interface Props$7 extends Pick<ComponentProps<(typeof PopoverPrimitive)["Content"]>, "onOpenAutoFocus" | "onCloseAutoFocus" | "onPointerDownOutside" | "onInteractOutside" | "onFocusOutside" | "side"> {
1366
+ children: React__default.ReactNode;
1367
+ trigger: React__default.ReactNode;
1368
+ variant?: PopoverVariant;
1369
+ closable?: boolean;
1370
+ open?: boolean;
1371
+ onOpenChange?: (open: boolean) => void;
1372
+ sideOffset?: number;
1373
+ onClickClose?: () => void;
1374
+ showArrow?: boolean;
1375
+ className?: string;
1376
+ }
1377
+ declare function Popover({ children, trigger, variant, closable, open, side, sideOffset, showArrow, onOpenChange, onOpenAutoFocus, onCloseAutoFocus, onPointerDownOutside, onInteractOutside, onFocusOutside, onClickClose, className, }: Props$7): React__default.JSX.Element;
1378
+
1379
+ type ProgressVariant = "normal" | "warning" | "primary" | "secondary";
1380
+ declare function Progress({ value, variant, className, }: {
1381
+ value: number;
1382
+ variant?: ProgressVariant;
1383
+ className?: string;
1384
+ }): React.JSX.Element;
1385
+
1386
+ interface Props$6 {
1387
+ children?: React.ReactNode | ((scrollElementRef: HTMLDivElement) => React.ReactNode);
1388
+ }
1389
+ declare const ScrollArea: React.NamedExoticComponent<Props$6>;
1390
+
1391
+ type SegmentedControlColorScheme = "primary" | "secondary";
1392
+ interface SegmentedControlProps<T extends string> {
1393
+ id?: string;
1394
+ value?: T;
1395
+ onValueChange?: (value: T) => void;
1396
+ /** @default primary */
1397
+ colorScheme?: SegmentedControlColorScheme;
1398
+ allowEmpty?: boolean;
1399
+ separator?: boolean;
1400
+ items: SegmentedControlItemProps<T>[];
1401
+ className?: string;
1402
+ style?: React__default.CSSProperties;
1403
+ }
1404
+ type SegmentedControlItemProps<T extends string> = {
1405
+ title?: ReactNode;
1406
+ className?: string;
1407
+ style?: React__default.CSSProperties;
1408
+ tooltip?: ReactNode;
1409
+ } & Pick<SelectableMenuItem<T>, "value" | "disabled" | "icon" | "role" | "title">;
1410
+ declare const SegmentedControl: <T extends string>(props: SegmentedControlProps<T>) => React__default.ReactElement | null;
1411
+
1412
+ type Props$5<T extends string> = {
1413
+ id?: string;
1414
+ style?: React__default.CSSProperties;
1415
+ className?: string;
1416
+ items: MenuItem<T>[];
1417
+ value: T;
1418
+ onSelect?: (value: T) => void;
1419
+ placeholder?: string;
1420
+ disabled?: boolean;
1421
+ readOnly?: boolean;
1422
+ label?: React__default.ReactNode;
1423
+ onFocus?: FocusEventHandler;
1424
+ onBlur?: FocusEventHandler;
1425
+ contentStyle?: React__default.CSSProperties;
1426
+ } & Pick<SelectProps, "open" | "onOpenChange">;
1427
+ declare const SelectMenu: <T extends string = string>(props: Props$5<T>) => React__default.ReactElement | null;
1428
+
1429
+ type ColorScheme = "primary" | "secondary";
1430
+ interface Props$4 {
1431
+ id?: string;
1432
+ style?: React__default.CSSProperties;
1433
+ className?: string;
1434
+ value: number;
1435
+ onValueChange: (value: number) => void;
1436
+ min: number;
1437
+ max: number;
1438
+ step?: number;
1439
+ colorScheme?: ColorScheme;
1440
+ label?: React__default.ReactNode;
1441
+ onFocus?: FocusEventHandler;
1442
+ onBlur?: FocusEventHandler;
1443
+ readOnly?: boolean;
1444
+ }
1445
+ declare const Slider: React__default.NamedExoticComponent<Props$4>;
1446
+
1447
+ interface Props$3 {
1448
+ size?: number | string;
1449
+ inline?: boolean;
1450
+ }
1451
+ declare namespace Spacer {
1452
+ const Vertical: React.ForwardRefExoticComponent<Props$3 & React.RefAttributes<HTMLSpanElement>>;
1453
+ const Horizontal: React.ForwardRefExoticComponent<Props$3 & React.RefAttributes<HTMLSpanElement>>;
1454
+ }
1455
+
1456
+ type SwitchColorScheme = "primary" | "secondary";
1457
+ interface Props$2 {
1458
+ id?: string;
1459
+ value: boolean;
1460
+ onChange: (value: boolean) => void;
1461
+ /** @default normal */
1462
+ colorScheme?: SwitchColorScheme;
1463
+ disabled?: boolean;
1464
+ onFocus?: React.FocusEventHandler;
1465
+ onBlur?: React.FocusEventHandler;
1466
+ className?: string;
1467
+ style?: React.CSSProperties;
1468
+ }
1469
+ declare const Switch: ({ id, value, onChange, colorScheme, disabled, onFocus, onBlur, style, className, }: Props$2) => React.JSX.Element;
1216
1470
 
1217
1471
  declare const useAutoResize: (value: string | undefined) => React__default.MutableRefObject<HTMLTextAreaElement | null>;
1218
1472
  declare const TextArea: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<{
@@ -1243,18 +1497,20 @@ declare const ToastProvider: ({ children }: {
1243
1497
  children: React__default.ReactNode;
1244
1498
  }) => React__default.JSX.Element;
1245
1499
 
1246
- interface Props$2 {
1500
+ interface Props$1 {
1247
1501
  children: React.ReactNode;
1248
1502
  content: React.ReactNode;
1249
1503
  }
1250
- declare const Tooltip: React.NamedExoticComponent<Props$2>;
1504
+ declare const Tooltip: React.NamedExoticComponent<Props$1>;
1251
1505
 
1252
1506
  type TreeRowBaseProps = {
1253
1507
  icon?: Exclude<ReactNode, string> | IconName;
1254
1508
  expanded?: boolean;
1509
+ chevronClassName?: string;
1255
1510
  onClickChevron?: ({ altKey }: {
1256
1511
  altKey: boolean;
1257
1512
  }) => void;
1513
+ onDoubleClick?: () => void;
1258
1514
  };
1259
1515
  type TreeViewRowProps<MenuItemType extends string> = ListView.RowProps<MenuItemType> & TreeRowBaseProps;
1260
1516
  declare namespace TreeView {
@@ -1268,28 +1524,12 @@ declare namespace TreeView {
1268
1524
  keyExtractor: (item: T, index: number) => string;
1269
1525
  sortable?: boolean;
1270
1526
  virtualized?: _noya_app_noya_geometry.Size;
1271
- }) & {
1272
- id?: string;
1273
- className?: string;
1274
- style?: React__default.CSSProperties;
1275
- onPress?: () => void;
1276
- scrollable?: boolean;
1277
- expandable?: boolean;
1278
- onMoveItem?: (sourceIndex: number, destinationIndex: number, position: RelativeDropPosition) => void;
1279
- indentation?: number;
1280
- acceptsDrop?: DropValidator;
1281
- pressEventName?: "onClick" | "onPointerDown";
1282
- variant?: "normal" | "bare" | "padded";
1283
- sectionHeaderVariant?: "normal" | "label";
1284
- divider?: boolean;
1285
- gap?: number;
1286
- colorScheme?: "primary" | "secondary";
1287
- }) & React__default.RefAttributes<IVirtualizedList>) => React__default.ReactElement | null;
1527
+ }) & ListViewRootProps) & React__default.RefAttributes<IVirtualizedList>) => React__default.ReactElement | null;
1288
1528
  const RowTitle: React__default.MemoExoticComponent<({ className, children, ...props }: {
1289
1529
  className?: string;
1290
1530
  children: React__default.ReactNode;
1291
1531
  } & React__default.HTMLAttributes<HTMLSpanElement>) => React__default.JSX.Element>;
1292
- const EditableRowTitle: React__default.MemoExoticComponent<({ value, onSubmitEditing, autoFocus, placeholder, }: EditableRowProps) => React__default.JSX.Element>;
1532
+ const EditableRowTitle: React__default.MemoExoticComponent<({ value, onSubmitEditing, autoFocus, placeholder, className, }: EditableRowProps) => React__default.JSX.Element>;
1293
1533
  const Row: <MenuItemType extends string>(props: ListView.RowProps<MenuItemType> & TreeRowBaseProps & React__default.RefAttributes<HTMLLIElement>) => React__default.ReactElement | null;
1294
1534
  type ClickInfo = ListView.ClickInfo;
1295
1535
  type RowProps<MenuItemType extends string> = TreeViewRowProps<MenuItemType>;
@@ -1322,10 +1562,11 @@ type PanelLayoutState = {
1322
1562
  };
1323
1563
  declare function usePreservePanelSize(panelGroupRef: React__default.RefObject<ImperativePanelGroupHandle | null>, setPanelLayoutState?: (state: PanelLayoutState) => void): void;
1324
1564
 
1325
- interface Props$1 {
1565
+ interface WorkspaceLayoutProps {
1326
1566
  id?: string;
1327
1567
  className?: string;
1328
1568
  style?: React__default.CSSProperties;
1569
+ theme?: "light" | "dark";
1329
1570
  autoSavePrefix?: string;
1330
1571
  left?: React__default.ReactNode;
1331
1572
  leftOptions?: SideOptions;
@@ -1352,8 +1593,9 @@ type SideOptions = {
1352
1593
  */
1353
1594
  initialSize?: number | string;
1354
1595
  minSize?: number | string;
1596
+ maxSize?: number | string;
1355
1597
  };
1356
- declare const WorkspaceLayout: React__default.ForwardRefExoticComponent<Props$1 & React__default.RefAttributes<IWorkspaceLayout>>;
1598
+ declare const WorkspaceLayout: React__default.ForwardRefExoticComponent<WorkspaceLayoutProps & React__default.RefAttributes<IWorkspaceLayout>>;
1357
1599
 
1358
1600
  type DesignSystemConfigurationContextValue = {
1359
1601
  platform: PlatformName;
@@ -1462,6 +1704,34 @@ interface HoverResult {
1462
1704
  */
1463
1705
  declare function useHover(props?: HoverProps): HoverResult;
1464
1706
 
1707
+ declare const IndentContext: React__default.Context<{
1708
+ indentLevel: number;
1709
+ }>;
1710
+ declare const useIndent: () => number;
1711
+
1712
+ declare const LabelContext: React__default.Context<{
1713
+ fieldId?: string;
1714
+ label?: React__default.ReactNode;
1715
+ }>;
1716
+ type UseLabelParams = {
1717
+ label?: ReactNode;
1718
+ fieldId?: string;
1719
+ };
1720
+ declare const useLabel: ({ label, fieldId }: UseLabelParams) => {
1721
+ label: React__default.ReactNode;
1722
+ fieldId: string | undefined;
1723
+ };
1724
+ declare const LabelPositionContext: React__default.Context<LabelPositionContextValue>;
1725
+ declare const useLabelPosition: () => LabelPosition;
1726
+ type LabelPositionContextValue = {
1727
+ position: LabelPosition;
1728
+ };
1729
+ type LabelWidthContextValue = {
1730
+ width: number;
1731
+ };
1732
+ declare const LabelWidthContext: React__default.Context<LabelWidthContextValue>;
1733
+ declare const useLabelWidth: () => number;
1734
+
1465
1735
  declare function usePlatform(): _noya_app_noya_keymap.PlatformName;
1466
1736
  /**
1467
1737
  * Either ctrl or meta, depending on the platform
@@ -1492,7 +1762,7 @@ declare const mediaQuery: {
1492
1762
  declare function cx(...args: Array<string | number | boolean | null | undefined>): string;
1493
1763
 
1494
1764
  type Optional<T> = T | false | null | undefined;
1495
- type MenuConfig<T extends string> = Optional<Optional<RegularMenuItem<T>>[]>[];
1765
+ type MenuConfig<T extends string> = Optional<Optional<MenuItem<T>>[]>[];
1496
1766
  declare function createSectionedMenu<T extends string>(...sections: MenuConfig<T>): MenuItem<T>[];
1497
1767
 
1498
1768
  declare function getGradientBackground(value: Sketch.GradientStop[], type: Sketch.GradientType, direction?: number): string;
@@ -1504,6 +1774,52 @@ declare const colorForStringValues: Record<string, string>;
1504
1774
  */
1505
1775
  declare function colorFromString(str: string): string;
1506
1776
 
1777
+ type ComboboxStateSnapshot<T extends string> = {
1778
+ filter: string;
1779
+ selectedIndex: number;
1780
+ filteredItems: ScoredMenuItem<T>[];
1781
+ lastSubmittedValue: {
1782
+ filter: string;
1783
+ itemName: string;
1784
+ };
1785
+ };
1786
+ declare class ComboboxState<T extends string> {
1787
+ private filter;
1788
+ private selectedIndex;
1789
+ private items;
1790
+ private lastSubmittedValue;
1791
+ private subscribers;
1792
+ private version;
1793
+ private _cachedSnapshot;
1794
+ constructor(items: MenuItem<T>[], initialTitle: string, allowArbitraryValues: boolean);
1795
+ subscribe: (listener: () => void) => (() => void);
1796
+ private notifyChange;
1797
+ private getFilteredItems;
1798
+ getSnapshot: () => ComboboxStateSnapshot<T>;
1799
+ setItems(items: MenuItem<T>[]): void;
1800
+ setFilter(filter: string): void;
1801
+ moveSelection(direction: "up" | "down"): void;
1802
+ selectCurrentItem(item?: ScoredMenuItem<T>): SelectableMenuItem<T> | undefined;
1803
+ restoreLastSubmittedValue(): void;
1804
+ reset(newFilter?: string): void;
1805
+ getSelectedItem(): ScoredMenuItem<T> | undefined;
1806
+ getTypeaheadValue(): string | undefined;
1807
+ setSelectedIndex(index: number): void;
1808
+ submitArbitraryFilter(filter: string): void;
1809
+ }
1810
+ declare function getNextIndex<T>(items: T[], currentIndex: number, direction: "next" | "previous", isDisabled: (item: T) => boolean): number;
1811
+ declare function useComboboxState<T extends string>(state: ComboboxState<T>): ComboboxStateSnapshot<T>;
1812
+
1813
+ /**
1814
+ * Updates the selection state based on user interaction.
1815
+ * Handles single selection, multi-selection with meta/ctrl, and range selection with shift.
1816
+ */
1817
+ declare function updateSelection(allIds: string[], selectedIds: string[], clickedId: string, event?: {
1818
+ shiftKey?: boolean;
1819
+ metaKey?: boolean;
1820
+ ctrlKey?: boolean;
1821
+ }): string[];
1822
+
1507
1823
  declare function sketchColorToRgba(value: Sketch.Color): RgbaColor;
1508
1824
  declare function sketchColorToRgbaString(value: Sketch.Color): string;
1509
1825
  declare function rgbaToSketchColor(value: RgbaColor): Sketch.Color;
@@ -1593,4 +1909,4 @@ declare function ToolbarMenu<T extends string>({ items, onSelectMenuItem, }: {
1593
1909
  onSelectMenuItem?: (value: T) => void;
1594
1910
  }): React__default.JSX.Element;
1595
1911
 
1596
- export { ActivityIndicator, AnimatePresence, type AnimatePresenceProps, Avatar, type AvatarProps, AvatarStack, type BaseComboboxProps, BaseToolbar, type BaseToolbarProps, Body, Button, type ButtonRootProps, CONTENT_AREA_ID, Checkbox$1 as Checkbox, Chip, type ChipProps, Combobox, type ComboboxItem, ComboboxMenu, type ComboboxOption, type ComboboxProps, type ComboboxRef, type ComboboxSectionHeader, ComboboxState, type ComboboxStateSnapshot, ContextMenu, type DesignSystemConfigurationContextValue, DesignSystemConfigurationProvider, Dialog, type DialogContextValue, DialogProvider, DimensionInput, type DimensionValue, Divider, DividerVertical, DraggableMenuButton, type DropValidator, DropdownMenu, EDITOR_PANEL_GROUP_ID, type EditableRowProps, type ExtractMenuItemType, FillInputField, FillPreviewBackground, FloatingWindow, FloatingWindowProvider, FullscreenDialog, type GlobalInputBlurContextValue, GlobalInputBlurProvider, GradientPicker, GridView, type GridViewSize, Heading1, Heading2, Heading3, Heading4, Heading5, type HoverEvent, type HoverEvents, type HoverProps, type IDialog, type IScoredItem, type IToken, type IVirtualizedList, type IWorkspaceLayout, IconButton, type IconName, type ImageDataContextValue, ImageDataProvider, InputField, type InputFieldInputProps, type InputFieldSize, InspectorContainer, InspectorPrimitives, type InternalComboboxItem, Italic, KeyboardShortcut, LEFT_SIDEBAR_ID, Label, LabeledElementView, type ListRowMarginType, type ListRowPosition, ListView, type MatchRange, type MenuConfig, type MenuItem, type MenuItemProps, type MenuProps, Message, type MessageProps, type OptionModeOnlyProps, type OptionModeProps, type Optional, type PanelLayoutState, PatternPreviewBackground, Popover, Progress, RIGHT_SIDEBAR_ID, type RegularMenuItem, type RelativeDropPosition, SEPARATOR_ITEM, SUPPORTED_CANVAS_UPLOAD_TYPES, SUPPORTED_IMAGE_UPLOAD_TYPES, ScrollArea, SegmentedControl, type SegmentedControlItemProps, type SegmentedControlProps, SelectMenu, type SetNumberMode, type SideOptions, type SketchPattern, Slider, Small, Sortable, Spacer, type StringModeOnlyProps, type StringModeProps, type SupportedCanvasUploadType, type SupportedImageUploadType, Switch, Text$1 as Text, TextArea, TextAreaRow, type TextProps, type Theme, type ThemeColor, Toast, ToastProvider, Toolbar, ToolbarMenu, type ToolbarProps, Tooltip, TreeView, type UseThemeReturnType, UserPointer, type UserPointerProps, WorkspaceLayout, colorForStringValues, colorFromString, createSectionedMenu, cssVars, cx, fuzzyFilter, fuzzyScore, fuzzyTokenize, getGradientBackground, getKeyboardShortcutsForMenuItems, getNewValue, labelTextStyles, mediaQuery, normalizeListDestinationIndex, renderIcon, rgbaToSketchColor, size, sketchColorToHex, sketchColorToRgba, sketchColorToRgbaString, textStyles, useAutoResize, useComboboxState, useCurrentFloatingWindowInternal, useDesignSystemConfiguration, useDialogContainsElement, useFloatingWindowManager, useGlobalInputBlur, useGlobalInputBlurListener, useGlobalInputBlurTrigger, useHover, useImageData, useOpenConfirmationDialog, useOpenInputDialog, usePlatform, usePlatformModKey, usePreservePanelSize, useTheme, withSeparatorElements };
1912
+ export { ActivityIndicator, AnimatePresence, type AnimatePresenceProps, Avatar, type AvatarProps, AvatarStack, type BaseComboboxProps, BaseToolbar, type BaseToolbarProps, Body, BreadcrumbText, Button, type ButtonRootProps, CHECKBOX_RIGHT_INSET, CHECKBOX_WIDTH, CONTENT_AREA_ID, Checkbox$1 as Checkbox, Chip, type ChipProps, Collection, type CollectionProps, type CollectionRef, type CollectionViewType, Combobox, ComboboxMenu, type ComboboxProps, type ComboboxRef, ComboboxState, type ComboboxStateSnapshot, CommandPalette, ContextMenu, type DesignSystemConfigurationContextValue, DesignSystemConfigurationProvider, Dialog, type DialogContextValue, DialogProvider, DimensionInput, type DimensionValue, Divider, DividerVertical, DraggableMenuButton, type DropValidator, DropdownMenu, type DropdownRootProps, EDITOR_PANEL_GROUP_ID, type EditableRowProps, EditableText, type EditableTextRef, type ExtractMenuItemType, Fade, type FadeDirection, type FadeProps, FillInputField, FillPreviewBackground, FloatingWindow, FloatingWindowProvider, FullscreenDialog, type GlobalInputBlurContextValue, GlobalInputBlurProvider, GradientPicker, Grid, GridView, type GridViewSize, Heading1, Heading2, Heading3, Heading4, Heading5, type HoverEvent, type HoverEvents, type HoverProps, type IDialog, type IScoredItem, type ISearchCompletionMenu, type IToken, type IVirtualizedList, type IWorkspaceLayout, IconButton, type IconName, type ImageDataContextValue, ImageDataProvider, IndentContext, InputField, type InputFieldInputProps, type InputFieldProps, type InputFieldSize, InsetLabel, type InsetLabelProps, InspectorContainer, InspectorPrimitives, Italic, KeyboardShortcut, LEFT_SIDEBAR_ID, Label, LabelContext, type LabelPosition, LabelPositionContext, type LabelPositionContextValue, type LabelProps, LabelWidthContext, type LabelWidthContextValue, LabeledElementView, LabeledField, List, type ListRowMarginType, type ListRowPosition, ListView, type ListViewRootProps, type MatchRange, type MenuComponents, type MenuConfig, type MenuItem, type MenuItemProps, type MenuItemRole, type MenuProps, MenuViewport, Message, type MessageProps, type NonSelectableMenuItem, type OptionModeOnlyProps, type OptionModeProps, type Optional, type PanelLayoutState, PatternPreviewBackground, Popover, Progress, RIGHT_SIDEBAR_ID, type RelativeDropPosition, SUPPORTED_CANVAS_UPLOAD_TYPES, SUPPORTED_IMAGE_UPLOAD_TYPES, type ScoredMenuItem, ScrollArea, SearchCompletionMenu, SectionHeader$1 as SectionHeader, type SectionHeaderMenuItem, SegmentedControl, type SegmentedControlItemProps, type SegmentedControlProps, SelectMenu, type SelectableMenuItem, type SeparatorItem, type SetNumberMode, type SideOptions, type SketchPattern, Slider, Small, Sortable, Spacer, type StringModeOnlyProps, type StringModeProps, type SupportedCanvasUploadType, type SupportedImageUploadType, Switch, Text$1 as Text, TextArea, TextAreaRow, type TextProps, type Theme, type ThemeColor, Toast, ToastProvider, Toolbar, ToolbarMenu, type ToolbarProps, Tooltip, TreeView, type UseThemeReturnType, UserPointer, type UserPointerProps, WorkspaceLayout, type WorkspaceLayoutProps, colorForStringValues, colorFromString, createSectionedMenu, cssVars, cx, fuzzyFilter, fuzzyScore, fuzzyTokenize, getFieldSpacing, getGradientBackground, getGridSize, getKeyboardShortcutsForMenuItems, getNewValue, getNextIndex, insetLabelStyles, insetLabelTextStyles, isMenuItemSectionHeader, isNonSelectableMenuItem, isSelectableMenuItem, isSelectableMenuItemWithScore, labeledFieldStyles, mediaQuery, normalizeListDestinationIndex, renderIcon, rgbaToSketchColor, size, sketchColorToHex, sketchColorToRgba, sketchColorToRgbaString, styles, textStyles, updateSelection, useAutoResize, useComboboxState, useCurrentFloatingWindowInternal, useDesignSystemConfiguration, useDialogContainsElement, useFloatingWindowManager, useGlobalInputBlur, useGlobalInputBlurListener, useGlobalInputBlurTrigger, useHover, useImageData, useIndent, useInputFieldContext, useLabel, useLabelPosition, useLabelWidth, useOpenConfirmationDialog, useOpenInputDialog, usePlatform, usePlatformModKey, usePreservePanelSize, useTheme, withSeparatorElements };