@noya-app/noya-designsystem 0.1.28 → 0.1.30

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.
@@ -6,13 +6,13 @@
6
6
  CLI Target: esnext
7
7
  CJS Build start
8
8
  ESM Build start
9
- CJS dist/index.js 597.93 KB
10
- CJS dist/index.js.map 1.07 MB
11
- CJS ⚡️ Build success in 115ms
12
- ESM dist/index.mjs 579.92 KB
9
+ ESM dist/index.mjs 576.66 KB
13
10
  ESM dist/index.mjs.map 1.06 MB
14
- ESM ⚡️ Build success in 115ms
11
+ ESM ⚡️ Build success in 279ms
12
+ CJS dist/index.js 594.29 KB
13
+ CJS dist/index.js.map 1.06 MB
14
+ CJS ⚡️ Build success in 290ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 9960ms
17
- DTS dist/index.d.ts 63.28 KB
18
- DTS dist/index.d.mts 63.28 KB
16
+ DTS ⚡️ Build success in 13178ms
17
+ DTS dist/index.d.ts 62.68 KB
18
+ DTS dist/index.d.mts 62.68 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @noya-app/noya-designsystem
2
2
 
3
+ ## 0.1.30
4
+
5
+ ### Patch Changes
6
+
7
+ - 94941e9: Added visual regression testing and JSDoc comments to design system component APIs
8
+
9
+ ## 0.1.29
10
+
11
+ ### Patch Changes
12
+
13
+ - b022ce3: Improve standalone component usage. Don't save to localStorage by default
14
+
3
15
  ## 0.1.28
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -528,9 +528,11 @@ interface InputFieldRootProps {
528
528
  flex?: string;
529
529
  children?: ReactNode;
530
530
  width?: number;
531
+ /** @default end */
531
532
  labelPosition?: LabelPosition;
532
533
  labelSize?: number;
533
534
  hasDropdown?: boolean;
535
+ /** @default medium */
534
536
  size?: InputFieldSize;
535
537
  renderPopoverContent?: (options: {
536
538
  width: number;
@@ -661,6 +663,7 @@ interface ListViewRowProps<MenuItemType extends string = string> {
661
663
  id?: string;
662
664
  tabIndex?: number;
663
665
  selected?: boolean;
666
+ /** @default 0 */
664
667
  depth?: number;
665
668
  disabled?: boolean;
666
669
  hovered?: boolean;
@@ -847,6 +850,7 @@ interface Props$b {
847
850
  id?: string;
848
851
  value?: string;
849
852
  onValueChange?: (value: string) => void;
853
+ /** @default primary */
850
854
  colorScheme?: RadioGroupColorScheme;
851
855
  allowEmpty?: boolean;
852
856
  children: ReactNode;
@@ -995,6 +999,7 @@ type SwitchColorScheme = "normal" | "primary" | "secondary";
995
999
  interface Props$4 {
996
1000
  value: boolean;
997
1001
  onChange: (value: boolean) => void;
1002
+ /** @default normal */
998
1003
  colorScheme?: SwitchColorScheme;
999
1004
  disabled?: boolean;
1000
1005
  }
@@ -1379,27 +1384,6 @@ declare function sketchColorToRgbaString(value: Sketch.Color): string;
1379
1384
  declare function rgbaToSketchColor(value: RgbaColor): Sketch.Color;
1380
1385
  declare function sketchColorToHex(value: Sketch.Color): string;
1381
1386
 
1382
- interface ArrayControllerProps<Item> {
1383
- id: string;
1384
- items: Item[];
1385
- title: ReactNode;
1386
- sortable?: boolean;
1387
- reversed?: boolean;
1388
- expanded?: boolean;
1389
- getKey?: (item: Item) => string;
1390
- onMoveItem?: (sourceIndex: number, destinationIndex: number) => void;
1391
- onClickPlus?: () => void;
1392
- onClickTrash?: () => void;
1393
- onClickExpand?: () => void;
1394
- renderItem: (props: {
1395
- item: Item;
1396
- index: number;
1397
- }) => ReactNode;
1398
- renderExpandedContent?: () => ReactNode;
1399
- padding?: number;
1400
- }
1401
- declare const ArrayController: <Item>(props: ArrayControllerProps<Item>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
1402
-
1403
1387
  type SetNumberMode = "replace" | "adjust";
1404
1388
  declare function getNewValue(value: number, mode: SetNumberMode, delta?: number): number;
1405
1389
  type DimensionValue = number | undefined;
@@ -1468,4 +1452,4 @@ declare module "react" {
1468
1452
  function forwardRef<T, P = {}>(render: (props: P, ref: React.ForwardedRef<T>) => React.ReactElement | null): (props: P & React.RefAttributes<T>) => React.ReactElement | null;
1469
1453
  }
1470
1454
 
1471
- export { ActivityIndicator, ArrayController, type ArrayControllerProps, AutoResizingTextArea, Avatar, AvatarStack, Body, Button, ButtonElement, type ButtonRootProps, Chip, type ChipProps, CloseButtonContainer, type Colors, type CompletionItem, type CompletionListItem, CompletionMenu, type CompletionSectionHeader, CompletionToken, ContextMenu, type DesignSystemConfigurationContextValue, DesignSystemConfigurationProvider, DesignSystemThemeProvider, Dialog, type DialogContextValue, DialogProvider, DimensionInput, type DimensionValue, Divider, DividerVertical, DraggableMenuButton, type DropValidator, DropdownMenu, type EditableRowProps, type ExtractMenuItemType, FillInputField, FillPreviewBackground, FloatingWindow, FloatingWindowProvider, FullscreenDialog, type GlobalInputBlurContextValue, GlobalInputBlurProvider, GradientPicker, type GridProps, GridView, type GridViewSize, Heading1, Heading2, Heading3, Heading4, Heading5, type HoverEvent, type HoverEvents, type HoverProps, type IDialog, type IInputFieldWithCompletions, type IScoredItem, type IToken, type IVirtualizedList, type IWorkspaceLayout, IconButton, type IconName, type ImageDataContextValue, ImageDataProvider, InputElement, InputField, type InputFieldSize, InputFieldWithCompletions, InspectorContainer, InspectorPrimitives, Italic, KeyboardShortcut, Label, LabeledElementView, type ListRowMarginType, type ListRowPosition, ListView, type MatchRange, type MenuConfig, type MenuItem, type MenuItemProps, type MenuProps, type Optional, PatternPreviewBackground, Popover, Progress, RadioGroup, type RegularMenuItem, type RelativeDropPosition, Row$1 as Row, SEPARATOR_ITEM, SUPPORTED_CANVAS_UPLOAD_TYPES, SUPPORTED_IMAGE_UPLOAD_TYPES, ScrollArea, Select, SelectMenu, SelectOption, type SetNumberMode, type SketchPattern, Slider, Small, Sortable, Spacer, Stack, type StackBreakpointList, type SupportedCanvasUploadType, type SupportedImageUploadType, Switch, Text$1 as Text, type TextBreakpointList, type Theme, type ThemeColorName, Toast, ToastProvider, Tooltip, TreeView, WorkspaceLayout, createSectionedMenu, dark as darkTheme, fuzzyFilter, fuzzyScore, fuzzyTokenize, getGradientBackground, getNewValue, lightTheme, mediaQuery, normalizeListDestinationIndex, renderIcon, rgbaToSketchColor, size, sketchColorToHex, sketchColorToRgba, sketchColorToRgbaString, useAutoResize, useCurrentFloatingWindowInternal, useDesignSystemConfiguration, useDesignSystemTheme, useDialogContainsElement, useFloatingWindowManager, useGlobalInputBlur, useGlobalInputBlurListener, useGlobalInputBlurTrigger, useHover, useImageData, useOpenInputDialog, usePlatform, usePlatformModKey, withSeparatorElements };
1455
+ export { ActivityIndicator, AutoResizingTextArea, Avatar, AvatarStack, Body, Button, ButtonElement, type ButtonRootProps, Chip, type ChipProps, CloseButtonContainer, type Colors, type CompletionItem, type CompletionListItem, CompletionMenu, type CompletionSectionHeader, CompletionToken, ContextMenu, type DesignSystemConfigurationContextValue, DesignSystemConfigurationProvider, DesignSystemThemeProvider, Dialog, type DialogContextValue, DialogProvider, DimensionInput, type DimensionValue, Divider, DividerVertical, DraggableMenuButton, type DropValidator, DropdownMenu, type EditableRowProps, type ExtractMenuItemType, FillInputField, FillPreviewBackground, FloatingWindow, FloatingWindowProvider, FullscreenDialog, type GlobalInputBlurContextValue, GlobalInputBlurProvider, GradientPicker, type GridProps, GridView, type GridViewSize, Heading1, Heading2, Heading3, Heading4, Heading5, type HoverEvent, type HoverEvents, type HoverProps, type IDialog, type IInputFieldWithCompletions, type IScoredItem, type IToken, type IVirtualizedList, type IWorkspaceLayout, IconButton, type IconName, type ImageDataContextValue, ImageDataProvider, InputElement, InputField, type InputFieldSize, InputFieldWithCompletions, InspectorContainer, InspectorPrimitives, Italic, KeyboardShortcut, Label, LabeledElementView, type ListRowMarginType, type ListRowPosition, ListView, type MatchRange, type MenuConfig, type MenuItem, type MenuItemProps, type MenuProps, type Optional, PatternPreviewBackground, Popover, Progress, RadioGroup, type RegularMenuItem, type RelativeDropPosition, Row$1 as Row, SEPARATOR_ITEM, SUPPORTED_CANVAS_UPLOAD_TYPES, SUPPORTED_IMAGE_UPLOAD_TYPES, ScrollArea, Select, SelectMenu, SelectOption, type SetNumberMode, type SketchPattern, Slider, Small, Sortable, Spacer, Stack, type StackBreakpointList, type SupportedCanvasUploadType, type SupportedImageUploadType, Switch, Text$1 as Text, type TextBreakpointList, type Theme, type ThemeColorName, Toast, ToastProvider, Tooltip, TreeView, WorkspaceLayout, createSectionedMenu, dark as darkTheme, fuzzyFilter, fuzzyScore, fuzzyTokenize, getGradientBackground, getNewValue, lightTheme, mediaQuery, normalizeListDestinationIndex, renderIcon, rgbaToSketchColor, size, sketchColorToHex, sketchColorToRgba, sketchColorToRgbaString, useAutoResize, useCurrentFloatingWindowInternal, useDesignSystemConfiguration, useDesignSystemTheme, useDialogContainsElement, useFloatingWindowManager, useGlobalInputBlur, useGlobalInputBlurListener, useGlobalInputBlurTrigger, useHover, useImageData, useOpenInputDialog, usePlatform, usePlatformModKey, withSeparatorElements };
package/dist/index.d.ts CHANGED
@@ -528,9 +528,11 @@ interface InputFieldRootProps {
528
528
  flex?: string;
529
529
  children?: ReactNode;
530
530
  width?: number;
531
+ /** @default end */
531
532
  labelPosition?: LabelPosition;
532
533
  labelSize?: number;
533
534
  hasDropdown?: boolean;
535
+ /** @default medium */
534
536
  size?: InputFieldSize;
535
537
  renderPopoverContent?: (options: {
536
538
  width: number;
@@ -661,6 +663,7 @@ interface ListViewRowProps<MenuItemType extends string = string> {
661
663
  id?: string;
662
664
  tabIndex?: number;
663
665
  selected?: boolean;
666
+ /** @default 0 */
664
667
  depth?: number;
665
668
  disabled?: boolean;
666
669
  hovered?: boolean;
@@ -847,6 +850,7 @@ interface Props$b {
847
850
  id?: string;
848
851
  value?: string;
849
852
  onValueChange?: (value: string) => void;
853
+ /** @default primary */
850
854
  colorScheme?: RadioGroupColorScheme;
851
855
  allowEmpty?: boolean;
852
856
  children: ReactNode;
@@ -995,6 +999,7 @@ type SwitchColorScheme = "normal" | "primary" | "secondary";
995
999
  interface Props$4 {
996
1000
  value: boolean;
997
1001
  onChange: (value: boolean) => void;
1002
+ /** @default normal */
998
1003
  colorScheme?: SwitchColorScheme;
999
1004
  disabled?: boolean;
1000
1005
  }
@@ -1379,27 +1384,6 @@ declare function sketchColorToRgbaString(value: Sketch.Color): string;
1379
1384
  declare function rgbaToSketchColor(value: RgbaColor): Sketch.Color;
1380
1385
  declare function sketchColorToHex(value: Sketch.Color): string;
1381
1386
 
1382
- interface ArrayControllerProps<Item> {
1383
- id: string;
1384
- items: Item[];
1385
- title: ReactNode;
1386
- sortable?: boolean;
1387
- reversed?: boolean;
1388
- expanded?: boolean;
1389
- getKey?: (item: Item) => string;
1390
- onMoveItem?: (sourceIndex: number, destinationIndex: number) => void;
1391
- onClickPlus?: () => void;
1392
- onClickTrash?: () => void;
1393
- onClickExpand?: () => void;
1394
- renderItem: (props: {
1395
- item: Item;
1396
- index: number;
1397
- }) => ReactNode;
1398
- renderExpandedContent?: () => ReactNode;
1399
- padding?: number;
1400
- }
1401
- declare const ArrayController: <Item>(props: ArrayControllerProps<Item>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
1402
-
1403
1387
  type SetNumberMode = "replace" | "adjust";
1404
1388
  declare function getNewValue(value: number, mode: SetNumberMode, delta?: number): number;
1405
1389
  type DimensionValue = number | undefined;
@@ -1468,4 +1452,4 @@ declare module "react" {
1468
1452
  function forwardRef<T, P = {}>(render: (props: P, ref: React.ForwardedRef<T>) => React.ReactElement | null): (props: P & React.RefAttributes<T>) => React.ReactElement | null;
1469
1453
  }
1470
1454
 
1471
- export { ActivityIndicator, ArrayController, type ArrayControllerProps, AutoResizingTextArea, Avatar, AvatarStack, Body, Button, ButtonElement, type ButtonRootProps, Chip, type ChipProps, CloseButtonContainer, type Colors, type CompletionItem, type CompletionListItem, CompletionMenu, type CompletionSectionHeader, CompletionToken, ContextMenu, type DesignSystemConfigurationContextValue, DesignSystemConfigurationProvider, DesignSystemThemeProvider, Dialog, type DialogContextValue, DialogProvider, DimensionInput, type DimensionValue, Divider, DividerVertical, DraggableMenuButton, type DropValidator, DropdownMenu, type EditableRowProps, type ExtractMenuItemType, FillInputField, FillPreviewBackground, FloatingWindow, FloatingWindowProvider, FullscreenDialog, type GlobalInputBlurContextValue, GlobalInputBlurProvider, GradientPicker, type GridProps, GridView, type GridViewSize, Heading1, Heading2, Heading3, Heading4, Heading5, type HoverEvent, type HoverEvents, type HoverProps, type IDialog, type IInputFieldWithCompletions, type IScoredItem, type IToken, type IVirtualizedList, type IWorkspaceLayout, IconButton, type IconName, type ImageDataContextValue, ImageDataProvider, InputElement, InputField, type InputFieldSize, InputFieldWithCompletions, InspectorContainer, InspectorPrimitives, Italic, KeyboardShortcut, Label, LabeledElementView, type ListRowMarginType, type ListRowPosition, ListView, type MatchRange, type MenuConfig, type MenuItem, type MenuItemProps, type MenuProps, type Optional, PatternPreviewBackground, Popover, Progress, RadioGroup, type RegularMenuItem, type RelativeDropPosition, Row$1 as Row, SEPARATOR_ITEM, SUPPORTED_CANVAS_UPLOAD_TYPES, SUPPORTED_IMAGE_UPLOAD_TYPES, ScrollArea, Select, SelectMenu, SelectOption, type SetNumberMode, type SketchPattern, Slider, Small, Sortable, Spacer, Stack, type StackBreakpointList, type SupportedCanvasUploadType, type SupportedImageUploadType, Switch, Text$1 as Text, type TextBreakpointList, type Theme, type ThemeColorName, Toast, ToastProvider, Tooltip, TreeView, WorkspaceLayout, createSectionedMenu, dark as darkTheme, fuzzyFilter, fuzzyScore, fuzzyTokenize, getGradientBackground, getNewValue, lightTheme, mediaQuery, normalizeListDestinationIndex, renderIcon, rgbaToSketchColor, size, sketchColorToHex, sketchColorToRgba, sketchColorToRgbaString, useAutoResize, useCurrentFloatingWindowInternal, useDesignSystemConfiguration, useDesignSystemTheme, useDialogContainsElement, useFloatingWindowManager, useGlobalInputBlur, useGlobalInputBlurListener, useGlobalInputBlurTrigger, useHover, useImageData, useOpenInputDialog, usePlatform, usePlatformModKey, withSeparatorElements };
1455
+ export { ActivityIndicator, AutoResizingTextArea, Avatar, AvatarStack, Body, Button, ButtonElement, type ButtonRootProps, Chip, type ChipProps, CloseButtonContainer, type Colors, type CompletionItem, type CompletionListItem, CompletionMenu, type CompletionSectionHeader, CompletionToken, ContextMenu, type DesignSystemConfigurationContextValue, DesignSystemConfigurationProvider, DesignSystemThemeProvider, Dialog, type DialogContextValue, DialogProvider, DimensionInput, type DimensionValue, Divider, DividerVertical, DraggableMenuButton, type DropValidator, DropdownMenu, type EditableRowProps, type ExtractMenuItemType, FillInputField, FillPreviewBackground, FloatingWindow, FloatingWindowProvider, FullscreenDialog, type GlobalInputBlurContextValue, GlobalInputBlurProvider, GradientPicker, type GridProps, GridView, type GridViewSize, Heading1, Heading2, Heading3, Heading4, Heading5, type HoverEvent, type HoverEvents, type HoverProps, type IDialog, type IInputFieldWithCompletions, type IScoredItem, type IToken, type IVirtualizedList, type IWorkspaceLayout, IconButton, type IconName, type ImageDataContextValue, ImageDataProvider, InputElement, InputField, type InputFieldSize, InputFieldWithCompletions, InspectorContainer, InspectorPrimitives, Italic, KeyboardShortcut, Label, LabeledElementView, type ListRowMarginType, type ListRowPosition, ListView, type MatchRange, type MenuConfig, type MenuItem, type MenuItemProps, type MenuProps, type Optional, PatternPreviewBackground, Popover, Progress, RadioGroup, type RegularMenuItem, type RelativeDropPosition, Row$1 as Row, SEPARATOR_ITEM, SUPPORTED_CANVAS_UPLOAD_TYPES, SUPPORTED_IMAGE_UPLOAD_TYPES, ScrollArea, Select, SelectMenu, SelectOption, type SetNumberMode, type SketchPattern, Slider, Small, Sortable, Spacer, Stack, type StackBreakpointList, type SupportedCanvasUploadType, type SupportedImageUploadType, Switch, Text$1 as Text, type TextBreakpointList, type Theme, type ThemeColorName, Toast, ToastProvider, Tooltip, TreeView, WorkspaceLayout, createSectionedMenu, dark as darkTheme, fuzzyFilter, fuzzyScore, fuzzyTokenize, getGradientBackground, getNewValue, lightTheme, mediaQuery, normalizeListDestinationIndex, renderIcon, rgbaToSketchColor, size, sketchColorToHex, sketchColorToRgba, sketchColorToRgbaString, useAutoResize, useCurrentFloatingWindowInternal, useDesignSystemConfiguration, useDesignSystemTheme, useDialogContainsElement, useFloatingWindowManager, useGlobalInputBlur, useGlobalInputBlurListener, useGlobalInputBlurTrigger, useHover, useImageData, useOpenInputDialog, usePlatform, usePlatformModKey, withSeparatorElements };
package/dist/index.js CHANGED
@@ -1416,7 +1416,6 @@ var require_slicedToArray = __commonJS({
1416
1416
  var src_exports = {};
1417
1417
  __export(src_exports, {
1418
1418
  ActivityIndicator: () => ActivityIndicator,
1419
- ArrayController: () => ArrayController,
1420
1419
  AutoResizingTextArea: () => AutoResizingTextArea,
1421
1420
  Avatar: () => Avatar,
1422
1421
  AvatarStack: () => AvatarStack,
@@ -5473,44 +5472,44 @@ var sizes2 = {
5473
5472
  gap: 32
5474
5473
  }
5475
5474
  };
5476
- var Grid2 = import_styled_components24.default.div(({ theme, size: size3, padding }) => {
5475
+ var Grid2 = import_styled_components24.default.div(({ theme, $size, $padding }) => {
5477
5476
  return {
5478
5477
  color: theme.colors.text,
5479
5478
  display: "grid",
5480
- gridTemplateColumns: `repeat(auto-fill, minmax(${sizes2[size3].itemWidth}px, 1fr))`,
5479
+ gridTemplateColumns: `repeat(auto-fill, minmax(${sizes2[$size].itemWidth}px, 1fr))`,
5481
5480
  // gridAutoRows: `${sizes[size].itemHeight}px`,
5482
- gap: `${sizes2[size3].gap}px`,
5481
+ gap: `${sizes2[$size].gap}px`,
5483
5482
  // gridTemplateColumns: `repeat(auto-fill, minmax(
5484
5483
  // ${size === 'large' ? '280px' : size === 'small' ? '160px' : '116px'}
5485
5484
  // , 1fr))`,
5486
5485
  // gridAutoRows:
5487
5486
  // size === 'large' ? '280px' : size === 'small' ? '170px' : '116px',
5488
5487
  // gap: size === 'large' || size === 'small' ? `20px` : `12px`,
5489
- padding
5488
+ padding: $padding
5490
5489
  };
5491
5490
  });
5492
5491
  var Container3 = import_styled_components24.default.div(
5493
- ({ theme, scrollable }) => ({
5494
- flex: scrollable ? "1" : "0 0 auto",
5492
+ ({ theme, $scrollable }) => ({
5493
+ flex: $scrollable ? "1" : "0 0 auto",
5495
5494
  display: "flex",
5496
5495
  flexDirection: "column"
5497
5496
  })
5498
5497
  );
5499
- var ContentContainer = import_styled_components24.default.div(({ theme, selected, hovered, bordered, disabled }) => ({
5498
+ var ContentContainer = import_styled_components24.default.div(({ theme, $selected, $hovered, $bordered, $disabled }) => ({
5500
5499
  display: "flex",
5501
5500
  flex: "1",
5502
5501
  backgroundColor: theme.colors.sidebar.background,
5503
5502
  alignItems: "center",
5504
5503
  justifyContent: "center",
5505
5504
  borderRadius: "2px",
5506
- border: `1px solid ${selected ? theme.colors.primary : (
5505
+ border: `1px solid ${$selected ? theme.colors.primary : (
5507
5506
  // : hovered
5508
5507
  // ? `rgb(132, 63, 255, 0.5)`
5509
- bordered ? theme.colors.divider : "transparent"
5508
+ $bordered ? theme.colors.divider : "transparent"
5510
5509
  )}`,
5511
5510
  overflow: "hidden",
5512
5511
  cursor: "pointer",
5513
- ...disabled ? { opacity: 0.5 } : {
5512
+ ...$disabled ? { opacity: 0.5 } : {
5514
5513
  "&:hover": { opacity: 0.85 },
5515
5514
  "&:active": { opacity: 0.7 }
5516
5515
  }
@@ -5525,7 +5524,7 @@ var ItemContainer = import_styled_components24.default.div(({ theme }) => ({
5525
5524
  }
5526
5525
  }));
5527
5526
  var ItemTitle = import_styled_components24.default.span(
5528
- ({ theme, showBackground }) => ({
5527
+ ({ theme, $showBackground }) => ({
5529
5528
  ...theme.textStyles.small,
5530
5529
  lineHeight: "1",
5531
5530
  color: theme.colors.text,
@@ -5534,7 +5533,7 @@ var ItemTitle = import_styled_components24.default.span(
5534
5533
  whiteSpace: "pre",
5535
5534
  overflow: "hidden",
5536
5535
  textOverflow: "ellipsis",
5537
- ...showBackground && {
5536
+ ...$showBackground && {
5538
5537
  background: theme.colors.sidebar.background,
5539
5538
  // border: `1px solid ${theme.colors.dividerSubtle}`,
5540
5539
  padding: "2px 4px",
@@ -5544,7 +5543,7 @@ var ItemTitle = import_styled_components24.default.span(
5544
5543
  })
5545
5544
  );
5546
5545
  var ItemDescription = import_styled_components24.default.span(
5547
- ({ theme, showBackground }) => ({
5546
+ ({ theme, $showBackground }) => ({
5548
5547
  ...theme.textStyles.small,
5549
5548
  fontSize: "0.7rem",
5550
5549
  lineHeight: "1",
@@ -5553,7 +5552,7 @@ var ItemDescription = import_styled_components24.default.span(
5553
5552
  whiteSpace: "pre",
5554
5553
  overflow: "hidden",
5555
5554
  textOverflow: "ellipsis",
5556
- ...showBackground && {
5555
+ ...$showBackground && {
5557
5556
  background: theme.colors.sidebar.background,
5558
5557
  // border: `1px solid ${theme.colors.dividerSubtle}`,
5559
5558
  padding: "2px 4px",
@@ -5674,10 +5673,10 @@ var GridViewItem = (0, import_react48.forwardRef)(function GridViewItem2({
5674
5673
  /* @__PURE__ */ import_react48.default.createElement(
5675
5674
  ContentContainer,
5676
5675
  {
5677
- disabled,
5678
- bordered,
5679
- selected,
5680
- hovered: !disabled && hovered,
5676
+ $disabled: disabled,
5677
+ $bordered: bordered,
5678
+ $selected: selected,
5679
+ $hovered: !disabled && hovered,
5681
5680
  onClick: handleClick,
5682
5681
  onDoubleClick,
5683
5682
  onContextMenu,
@@ -5685,8 +5684,8 @@ var GridViewItem = (0, import_react48.forwardRef)(function GridViewItem2({
5685
5684
  },
5686
5685
  children2
5687
5686
  ),
5688
- textPosition === "below" && /* @__PURE__ */ import_react48.default.createElement(import_react48.default.Fragment, null, /* @__PURE__ */ import_react48.default.createElement(Spacer.Vertical, { size: 8 }), /* @__PURE__ */ import_react48.default.createElement(ItemTitle, { showBackground: false }, title || " "), /* @__PURE__ */ import_react48.default.createElement(ItemDescription, { showBackground: false }, subtitle || " ")),
5689
- textPosition === "overlay" && hovered && (title || subtitle) && /* @__PURE__ */ import_react48.default.createElement(TextOverlay, null, title && /* @__PURE__ */ import_react48.default.createElement(ItemTitle, { showBackground: true }, title), subtitle && /* @__PURE__ */ import_react48.default.createElement(ItemDescription, { showBackground: true }, subtitle)),
5687
+ textPosition === "below" && /* @__PURE__ */ import_react48.default.createElement(import_react48.default.Fragment, null, /* @__PURE__ */ import_react48.default.createElement(Spacer.Vertical, { size: 8 }), /* @__PURE__ */ import_react48.default.createElement(ItemTitle, { $showBackground: false }, title || " "), /* @__PURE__ */ import_react48.default.createElement(ItemDescription, { $showBackground: false }, subtitle || " ")),
5688
+ textPosition === "overlay" && hovered && (title || subtitle) && /* @__PURE__ */ import_react48.default.createElement(TextOverlay, null, title && /* @__PURE__ */ import_react48.default.createElement(ItemTitle, { $showBackground: true }, title), subtitle && /* @__PURE__ */ import_react48.default.createElement(ItemDescription, { $showBackground: true }, subtitle)),
5690
5689
  loading && /* @__PURE__ */ import_react48.default.createElement(Shimmer, null, /* @__PURE__ */ import_react48.default.createElement(ActivityIndicator, { opacity: 0.5, size: 13 }))
5691
5690
  );
5692
5691
  if (menuItems && onSelectMenuItem) {
@@ -5696,7 +5695,7 @@ var GridViewItem = (0, import_react48.forwardRef)(function GridViewItem2({
5696
5695
  element = /* @__PURE__ */ import_react48.default.createElement(
5697
5696
  Tooltip,
5698
5697
  {
5699
- content: /* @__PURE__ */ import_react48.default.createElement(Stack.V, { gap: 2 }, /* @__PURE__ */ import_react48.default.createElement(ItemTitle, { showBackground: false }, title), /* @__PURE__ */ import_react48.default.createElement(ItemDescription, { showBackground: false }, subtitle))
5698
+ content: /* @__PURE__ */ import_react48.default.createElement(Stack.V, { gap: 2 }, /* @__PURE__ */ import_react48.default.createElement(ItemTitle, { $showBackground: false }, title), /* @__PURE__ */ import_react48.default.createElement(ItemDescription, { $showBackground: false }, subtitle))
5700
5699
  },
5701
5700
  element
5702
5701
  );
@@ -5735,14 +5734,14 @@ function GridViewRoot({
5735
5734
  }),
5736
5735
  [bordered, disabled, size3, textPosition]
5737
5736
  );
5738
- return /* @__PURE__ */ import_react48.default.createElement(GridViewContext.Provider, { value: contextValue }, /* @__PURE__ */ import_react48.default.createElement(Container3, { onClick: handleClick, scrollable }, scrollable ? /* @__PURE__ */ import_react48.default.createElement(ScrollArea, null, children2) : children2));
5737
+ return /* @__PURE__ */ import_react48.default.createElement(GridViewContext.Provider, { value: contextValue }, /* @__PURE__ */ import_react48.default.createElement(Container3, { onClick: handleClick, $scrollable: scrollable }, scrollable ? /* @__PURE__ */ import_react48.default.createElement(ScrollArea, null, children2) : children2));
5739
5738
  }
5740
5739
  function GridViewSection({
5741
5740
  children: children2,
5742
5741
  padding = "20px"
5743
5742
  }) {
5744
5743
  const { size: size3 } = (0, import_react48.useContext)(GridViewContext);
5745
- return /* @__PURE__ */ import_react48.default.createElement(Grid2, { size: size3, padding }, children2);
5744
+ return /* @__PURE__ */ import_react48.default.createElement(Grid2, { $size: size3, $padding: padding }, children2);
5746
5745
  }
5747
5746
  function GridViewSectionHeader({ title }) {
5748
5747
  const grouped = title.split("/");
@@ -5819,14 +5818,14 @@ function mergeRanges(ranges) {
5819
5818
  const merged = [];
5820
5819
  const sorted = [...ranges].sort((a, b) => a.start - b.start);
5821
5820
  let current;
5822
- for (const range3 of sorted) {
5821
+ for (const range2 of sorted) {
5823
5822
  if (!current) {
5824
- current = range3;
5825
- } else if (range3.start <= current.end) {
5826
- current.end = Math.max(current.end, range3.end);
5823
+ current = range2;
5824
+ } else if (range2.start <= current.end) {
5825
+ current.end = Math.max(current.end, range2.end);
5827
5826
  } else {
5828
5827
  merged.push(current);
5829
- current = range3;
5828
+ current = range2;
5830
5829
  }
5831
5830
  }
5832
5831
  if (current) {
@@ -10467,7 +10466,7 @@ var PositionCache = /* @__PURE__ */ function() {
10467
10466
  // Render all cells visible within the viewport range defined.
10468
10467
  }, {
10469
10468
  key: "range",
10470
- value: function range3(scrollTop, clientHeight, renderCallback) {
10469
+ value: function range2(scrollTop, clientHeight, renderCallback) {
10471
10470
  var _this = this;
10472
10471
  this._intervalTree.queryInterval(scrollTop, scrollTop + clientHeight, function(_ref) {
10473
10472
  var _ref2 = (0, import_slicedToArray.default)(_ref, 3), top = _ref2[0], _ = _ref2[1], index = _ref2[2];
@@ -15141,7 +15140,7 @@ function usePreservePanelSize(panelGroupRef, setPanelLayoutState) {
15141
15140
  }
15142
15141
 
15143
15142
  // src/components/WorkspaceLayout.tsx
15144
- var WorkspaceLayout = (0, import_react66.forwardRef)(function WorkspaceLayout2({
15143
+ var WorkspaceLayoutWithTheme = (0, import_react66.forwardRef)(function WorkspaceLayoutWithTheme2({
15145
15144
  autoSavePrefix,
15146
15145
  leftSidebarContent: leftPanelContent,
15147
15146
  children: centerPanelContent,
@@ -15322,6 +15321,9 @@ var WorkspaceLayout = (0, import_react66.forwardRef)(function WorkspaceLayout2({
15322
15321
  )
15323
15322
  );
15324
15323
  });
15324
+ var WorkspaceLayout = (0, import_react66.forwardRef)(function WorkspaceLayout2(props, forwardedRef) {
15325
+ return /* @__PURE__ */ import_react66.default.createElement(DesignSystemThemeProvider, null, /* @__PURE__ */ import_react66.default.createElement(WorkspaceLayoutWithTheme, { ...props, ref: forwardedRef }));
15326
+ });
15325
15327
 
15326
15328
  // src/hooks/usePlatform.ts
15327
15329
  function usePlatform() {
@@ -15363,10 +15365,41 @@ var SUPPORTED_CANVAS_UPLOAD_TYPES = [
15363
15365
  ""
15364
15366
  ];
15365
15367
 
15366
- // src/components/ArrayController.tsx
15368
+ // src/components/DimensionInput.tsx
15367
15369
  var import_noya_utils11 = require("@noya-app/noya-utils");
15368
- var import_react68 = __toESM(require("react"));
15369
- var import_styled_components38 = __toESM(require("styled-components"));
15370
+ var import_react67 = __toESM(require("react"));
15371
+ function getNewValue(value, mode, delta) {
15372
+ return delta === void 0 ? value : mode === "replace" ? delta : value + delta;
15373
+ }
15374
+ var DimensionInput = (0, import_react67.memo)(function DimensionInput2({
15375
+ id,
15376
+ value,
15377
+ onSetValue,
15378
+ label,
15379
+ size: size3,
15380
+ placeholder = "multi",
15381
+ disabled,
15382
+ trigger = "submit"
15383
+ }) {
15384
+ const handleNudgeValue = (0, import_react67.useCallback)(
15385
+ (value2) => onSetValue(value2, "adjust"),
15386
+ [onSetValue]
15387
+ );
15388
+ const handleSetValue = (0, import_react67.useCallback)(
15389
+ (value2) => onSetValue(value2, "replace"),
15390
+ [onSetValue]
15391
+ );
15392
+ return /* @__PURE__ */ import_react67.default.createElement(InputField.Root, { id, width: size3 }, /* @__PURE__ */ import_react67.default.createElement(
15393
+ InputField.NumberInput,
15394
+ {
15395
+ value: value === void 0 ? value : (0, import_noya_utils11.round)(value, 2),
15396
+ placeholder: value === void 0 ? placeholder : void 0,
15397
+ onNudge: handleNudgeValue,
15398
+ disabled,
15399
+ ...trigger === "change" ? { onChange: handleSetValue } : { onSubmit: handleSetValue }
15400
+ }
15401
+ ), label && /* @__PURE__ */ import_react67.default.createElement(InputField.Label, null, label));
15402
+ });
15370
15403
 
15371
15404
  // src/components/InspectorPrimitives.tsx
15372
15405
  var InspectorPrimitives_exports = {};
@@ -15384,7 +15417,7 @@ __export(InspectorPrimitives_exports, {
15384
15417
  Title: () => Title3,
15385
15418
  VerticalSeparator: () => VerticalSeparator
15386
15419
  });
15387
- var import_react67 = __toESM(require("react"));
15420
+ var import_react68 = __toESM(require("react"));
15388
15421
  var import_styled_components37 = __toESM(require("styled-components"));
15389
15422
  var Section2 = import_styled_components37.default.div(({ theme, $padding = "10px", $gap }) => ({
15390
15423
  flex: "0 0 auto",
@@ -15431,8 +15464,8 @@ var Checkbox = import_styled_components37.default.input(({ theme }) => ({
15431
15464
  var Text3 = import_styled_components37.default.span(({ theme }) => ({
15432
15465
  ...theme.textStyles.small
15433
15466
  }));
15434
- var VerticalSeparator = () => /* @__PURE__ */ import_react67.default.createElement(Spacer.Vertical, { size: (0, import_styled_components37.useTheme)().sizes.inspector.verticalSeparator });
15435
- var HorizontalSeparator = () => /* @__PURE__ */ import_react67.default.createElement(Spacer.Horizontal, { size: (0, import_styled_components37.useTheme)().sizes.inspector.horizontalSeparator });
15467
+ var VerticalSeparator = () => /* @__PURE__ */ import_react68.default.createElement(Spacer.Vertical, { size: (0, import_styled_components37.useTheme)().sizes.inspector.verticalSeparator });
15468
+ var HorizontalSeparator = () => /* @__PURE__ */ import_react68.default.createElement(Spacer.Horizontal, { size: (0, import_styled_components37.useTheme)().sizes.inspector.horizontalSeparator });
15436
15469
  var SliderRowLabel = import_styled_components37.default.span(({ theme }) => ({
15437
15470
  ...theme.textStyles.small,
15438
15471
  color: theme.colors.textMuted,
@@ -15452,7 +15485,7 @@ var RowLabel = import_styled_components37.default.span(({ theme, $textStyle }) =
15452
15485
  // Button height
15453
15486
  alignItems: "center"
15454
15487
  }));
15455
- var LabeledRow = (0, import_react67.memo)(function LabeledRow2({
15488
+ var LabeledRow = (0, import_react68.memo)(function LabeledRow2({
15456
15489
  id,
15457
15490
  children: children2,
15458
15491
  label,
@@ -15460,156 +15493,17 @@ var LabeledRow = (0, import_react67.memo)(function LabeledRow2({
15460
15493
  gap,
15461
15494
  right
15462
15495
  }) {
15463
- return /* @__PURE__ */ import_react67.default.createElement(Row2, { id }, /* @__PURE__ */ import_react67.default.createElement(Column2, null, /* @__PURE__ */ import_react67.default.createElement(RowLabel, { $textStyle: labelTextStyle }, label, right && /* @__PURE__ */ import_react67.default.createElement(Spacer.Horizontal, null), right), /* @__PURE__ */ import_react67.default.createElement(Row2, { $gap: gap }, children2)));
15496
+ return /* @__PURE__ */ import_react68.default.createElement(Row2, { id }, /* @__PURE__ */ import_react68.default.createElement(Column2, null, /* @__PURE__ */ import_react68.default.createElement(RowLabel, { $textStyle: labelTextStyle }, label, right && /* @__PURE__ */ import_react68.default.createElement(Spacer.Horizontal, null), right), /* @__PURE__ */ import_react68.default.createElement(Row2, { $gap: gap }, children2)));
15464
15497
  });
15465
- var LabeledSliderRow = (0, import_react67.memo)(function LabeledRow3({
15498
+ var LabeledSliderRow = (0, import_react68.memo)(function LabeledRow3({
15466
15499
  children: children2,
15467
15500
  label
15468
15501
  }) {
15469
- return /* @__PURE__ */ import_react67.default.createElement(Row2, null, /* @__PURE__ */ import_react67.default.createElement(Column2, null, /* @__PURE__ */ import_react67.default.createElement(SliderRowLabel, null, label), /* @__PURE__ */ import_react67.default.createElement(Row2, null, children2)));
15470
- });
15471
-
15472
- // src/components/ArrayController.tsx
15473
- var ElementRow = import_styled_components38.default.div({
15474
- flex: "0 0 auto",
15475
- display: "flex",
15476
- flexDirection: "row",
15477
- alignItems: "center"
15478
- });
15479
- var ItemContainer2 = import_styled_components38.default.div({
15480
- position: "relative"
15481
- });
15482
- var ArrayController = (0, import_react68.memo)(function ArrayController2({
15483
- id,
15484
- items,
15485
- title,
15486
- sortable = false,
15487
- reversed = true,
15488
- expanded = false,
15489
- getKey,
15490
- onMoveItem,
15491
- onClickPlus,
15492
- onClickTrash,
15493
- onClickExpand,
15494
- renderItem,
15495
- renderExpandedContent,
15496
- padding = 10
15497
- }) {
15498
- const iconColor = (0, import_styled_components38.useTheme)().colors.icon;
15499
- const primaryLightColor = (0, import_styled_components38.useTheme)().colors.primaryLight;
15500
- const keys = (0, import_react68.useMemo)(
15501
- () => items.map((item, index) => getKey?.(item) ?? index.toString()),
15502
- [getKey, items]
15503
- );
15504
- const indexes = reversed ? (0, import_noya_utils11.range)(0, items.length).reverse() : (0, import_noya_utils11.range)(0, items.length);
15505
- const handleMoveItem = (0, import_react68.useCallback)(
15506
- (sourceIndex, destinationIndex, position) => {
15507
- if (reversed) {
15508
- if (position === "above") {
15509
- position = "below";
15510
- } else if (position === "below") {
15511
- position = "above";
15512
- }
15513
- }
15514
- onMoveItem?.(
15515
- sourceIndex,
15516
- position === "below" ? destinationIndex + 1 : destinationIndex
15517
- );
15518
- },
15519
- [onMoveItem, reversed]
15520
- );
15521
- const renderRow = (index) => {
15522
- return /* @__PURE__ */ import_react68.default.createElement(ElementRow, { key: keys[index] }, renderItem({ item: items[index], index }));
15523
- };
15524
- return /* @__PURE__ */ import_react68.default.createElement(Section2, { id, $padding: padding, $gap: "2px" }, /* @__PURE__ */ import_react68.default.createElement(SectionHeader, null, /* @__PURE__ */ import_react68.default.createElement(Button, { variant: "none", onClick: onClickPlus }, /* @__PURE__ */ import_react68.default.createElement(Title3, null, title)), /* @__PURE__ */ import_react68.default.createElement(Spacer.Horizontal, null), withSeparatorElements(
15525
- [
15526
- onClickTrash && /* @__PURE__ */ import_react68.default.createElement(
15527
- IconButton,
15528
- {
15529
- id: `${id}-trash`,
15530
- iconName: "TrashIcon",
15531
- color: iconColor,
15532
- onClick: onClickTrash
15533
- }
15534
- ),
15535
- onClickExpand && /* @__PURE__ */ import_react68.default.createElement(
15536
- IconButton,
15537
- {
15538
- id: `${id}-gear`,
15539
- iconName: "GearIcon",
15540
- color: expanded ? primaryLightColor : iconColor,
15541
- onClick: onClickExpand
15542
- }
15543
- ),
15544
- onClickPlus && /* @__PURE__ */ import_react68.default.createElement(
15545
- IconButton,
15546
- {
15547
- id: `${id}-add`,
15548
- iconName: "PlusIcon",
15549
- color: iconColor,
15550
- onClick: onClickPlus
15551
- }
15552
- )
15553
- ],
15554
- /* @__PURE__ */ import_react68.default.createElement(Spacer.Horizontal, { size: 8 })
15555
- )), /* @__PURE__ */ import_react68.default.createElement(Stack.V, { gap: "4px" }, sortable ? /* @__PURE__ */ import_react68.default.createElement(
15556
- Sortable.Root,
15557
- {
15558
- keys,
15559
- renderOverlay: renderRow,
15560
- onMoveItem: handleMoveItem
15561
- },
15562
- indexes.map((index) => /* @__PURE__ */ import_react68.default.createElement(Sortable.Item, { id: keys[index], key: keys[index] }, ({ relativeDropPosition, ...sortableProps }) => /* @__PURE__ */ import_react68.default.createElement(ItemContainer2, { ...sortableProps }, renderRow(index), relativeDropPosition && /* @__PURE__ */ import_react68.default.createElement(
15563
- ListView.DragIndicator,
15564
- {
15565
- $gap: 0,
15566
- $colorScheme: "primary",
15567
- $relativeDropPosition: relativeDropPosition,
15568
- $offsetLeft: 0
15569
- }
15570
- ))))
15571
- ) : indexes.map(renderRow)), expanded && renderExpandedContent?.());
15572
- });
15573
-
15574
- // src/components/DimensionInput.tsx
15575
- var import_noya_utils12 = require("@noya-app/noya-utils");
15576
- var import_react69 = __toESM(require("react"));
15577
- function getNewValue(value, mode, delta) {
15578
- return delta === void 0 ? value : mode === "replace" ? delta : value + delta;
15579
- }
15580
- var DimensionInput = (0, import_react69.memo)(function DimensionInput2({
15581
- id,
15582
- value,
15583
- onSetValue,
15584
- label,
15585
- size: size3,
15586
- placeholder = "multi",
15587
- disabled,
15588
- trigger = "submit"
15589
- }) {
15590
- const handleNudgeValue = (0, import_react69.useCallback)(
15591
- (value2) => onSetValue(value2, "adjust"),
15592
- [onSetValue]
15593
- );
15594
- const handleSetValue = (0, import_react69.useCallback)(
15595
- (value2) => onSetValue(value2, "replace"),
15596
- [onSetValue]
15597
- );
15598
- return /* @__PURE__ */ import_react69.default.createElement(InputField.Root, { id, width: size3 }, /* @__PURE__ */ import_react69.default.createElement(
15599
- InputField.NumberInput,
15600
- {
15601
- value: value === void 0 ? value : (0, import_noya_utils12.round)(value, 2),
15602
- placeholder: value === void 0 ? placeholder : void 0,
15603
- onNudge: handleNudgeValue,
15604
- disabled,
15605
- ...trigger === "change" ? { onChange: handleSetValue } : { onSubmit: handleSetValue }
15606
- }
15607
- ), label && /* @__PURE__ */ import_react69.default.createElement(InputField.Label, null, label));
15502
+ return /* @__PURE__ */ import_react68.default.createElement(Row2, null, /* @__PURE__ */ import_react68.default.createElement(Column2, null, /* @__PURE__ */ import_react68.default.createElement(SliderRowLabel, null, label), /* @__PURE__ */ import_react68.default.createElement(Row2, null, children2)));
15608
15503
  });
15609
15504
  // Annotate the CommonJS export names for ESM import in node:
15610
15505
  0 && (module.exports = {
15611
15506
  ActivityIndicator,
15612
- ArrayController,
15613
15507
  AutoResizingTextArea,
15614
15508
  Avatar,
15615
15509
  AvatarStack,