@noya-app/noya-designsystem 0.1.26 → 0.1.27

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.
@@ -5,13 +5,13 @@
5
5
  CLI Target: esnext
6
6
  CJS Build start
7
7
  ESM Build start
8
+ CJS dist/index.js 237.83 KB
9
+ CJS dist/index.js.map 477.71 KB
10
+ CJS ⚡️ Build success in 179ms
11
+ ESM dist/index.mjs 219.11 KB
12
+ ESM dist/index.mjs.map 477.79 KB
13
+ ESM ⚡️ Build success in 180ms
8
14
  DTS Build start
9
- CJS dist/index.js 237.57 KB
10
- CJS dist/index.js.map 477.33 KB
11
- CJS ⚡️ Build success in 262ms
12
- ESM dist/index.mjs 218.90 KB
13
- ESM dist/index.mjs.map 477.46 KB
14
- ESM ⚡️ Build success in 262ms
15
- DTS ⚡️ Build success in 11217ms
16
- DTS dist/index.d.ts 62.86 KB
17
- DTS dist/index.d.mts 62.86 KB
15
+ DTS ⚡️ Build success in 12078ms
16
+ DTS dist/index.d.ts 63.28 KB
17
+ DTS dist/index.d.mts 63.28 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @noya-app/noya-designsystem
2
2
 
3
+ ## 0.1.27
4
+
5
+ ### Patch Changes
6
+
7
+ - 6f9f2df: Improve design system theme and json editor
8
+ - 2acd3e5: Export icons
9
+
3
10
  ## 0.1.26
4
11
 
5
12
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -4,6 +4,7 @@ import * as styled_components_dist_types from 'styled-components/dist/types';
4
4
  import * as styled_components from 'styled-components';
5
5
  import { CSSObject, CSSProperties as CSSProperties$1 } from 'styled-components';
6
6
  import * as Icons from '@noya-app/noya-icons';
7
+ export { Icons };
7
8
  import * as DialogPrimitive from '@radix-ui/react-dialog';
8
9
  import * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu';
9
10
  import { Sketch } from '@noya-app/noya-file-format';
@@ -171,6 +172,12 @@ declare const colors$1: {
171
172
  selection: string;
172
173
  thumbnailBackground: string;
173
174
  thumbnailShadow: string;
175
+ inlineCode: {
176
+ text: string;
177
+ background: string;
178
+ };
179
+ textLink: string;
180
+ textLinkFocused: string;
174
181
  };
175
182
  declare const fonts: {
176
183
  normal: string;
@@ -191,6 +198,9 @@ declare const textStyles: {
191
198
  label: CSSObject;
192
199
  };
193
200
  declare const sizes: {
201
+ inset: {
202
+ top: number;
203
+ };
194
204
  sidebarWidth: number;
195
205
  toolbar: {
196
206
  height: number;
@@ -235,6 +245,8 @@ type ThemeColorName = keyof PickByValue<Theme['colors'], string>;
235
245
 
236
246
  type IconName = keyof typeof Icons;
237
247
 
248
+ declare function renderIcon(iconName: Exclude<ReactNode, string> | IconName): ReactNode;
249
+
238
250
  declare const SEPARATOR_ITEM = "separator";
239
251
  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";
240
252
  type RegularMenuItem<T extends string> = {
@@ -1339,6 +1351,12 @@ declare const colors: {
1339
1351
  selection: string;
1340
1352
  thumbnailBackground: string;
1341
1353
  thumbnailShadow: string;
1354
+ inlineCode: {
1355
+ text: string;
1356
+ background: string;
1357
+ };
1358
+ textLink: string;
1359
+ textLinkFocused: string;
1342
1360
  };
1343
1361
 
1344
1362
  declare const dark_colors: typeof colors;
@@ -1450,4 +1468,4 @@ declare module "react" {
1450
1468
  function forwardRef<T, P = {}>(render: (props: P, ref: React.ForwardedRef<T>) => React.ReactElement | null): (props: P & React.RefAttributes<T>) => React.ReactElement | null;
1451
1469
  }
1452
1470
 
1453
- 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 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, rgbaToSketchColor, size, sketchColorToHex, sketchColorToRgba, sketchColorToRgbaString, useAutoResize, useCurrentFloatingWindowInternal, useDesignSystemConfiguration, useDesignSystemTheme, useDialogContainsElement, useFloatingWindowManager, useGlobalInputBlur, useGlobalInputBlurListener, useGlobalInputBlurTrigger, useHover, useImageData, useOpenInputDialog, usePlatform, usePlatformModKey, withSeparatorElements };
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 };
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ import * as styled_components_dist_types from 'styled-components/dist/types';
4
4
  import * as styled_components from 'styled-components';
5
5
  import { CSSObject, CSSProperties as CSSProperties$1 } from 'styled-components';
6
6
  import * as Icons from '@noya-app/noya-icons';
7
+ export { Icons };
7
8
  import * as DialogPrimitive from '@radix-ui/react-dialog';
8
9
  import * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu';
9
10
  import { Sketch } from '@noya-app/noya-file-format';
@@ -171,6 +172,12 @@ declare const colors$1: {
171
172
  selection: string;
172
173
  thumbnailBackground: string;
173
174
  thumbnailShadow: string;
175
+ inlineCode: {
176
+ text: string;
177
+ background: string;
178
+ };
179
+ textLink: string;
180
+ textLinkFocused: string;
174
181
  };
175
182
  declare const fonts: {
176
183
  normal: string;
@@ -191,6 +198,9 @@ declare const textStyles: {
191
198
  label: CSSObject;
192
199
  };
193
200
  declare const sizes: {
201
+ inset: {
202
+ top: number;
203
+ };
194
204
  sidebarWidth: number;
195
205
  toolbar: {
196
206
  height: number;
@@ -235,6 +245,8 @@ type ThemeColorName = keyof PickByValue<Theme['colors'], string>;
235
245
 
236
246
  type IconName = keyof typeof Icons;
237
247
 
248
+ declare function renderIcon(iconName: Exclude<ReactNode, string> | IconName): ReactNode;
249
+
238
250
  declare const SEPARATOR_ITEM = "separator";
239
251
  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";
240
252
  type RegularMenuItem<T extends string> = {
@@ -1339,6 +1351,12 @@ declare const colors: {
1339
1351
  selection: string;
1340
1352
  thumbnailBackground: string;
1341
1353
  thumbnailShadow: string;
1354
+ inlineCode: {
1355
+ text: string;
1356
+ background: string;
1357
+ };
1358
+ textLink: string;
1359
+ textLinkFocused: string;
1342
1360
  };
1343
1361
 
1344
1362
  declare const dark_colors: typeof colors;
@@ -1450,4 +1468,4 @@ declare module "react" {
1450
1468
  function forwardRef<T, P = {}>(render: (props: P, ref: React.ForwardedRef<T>) => React.ReactElement | null): (props: P & React.RefAttributes<T>) => React.ReactElement | null;
1451
1469
  }
1452
1470
 
1453
- 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 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, rgbaToSketchColor, size, sketchColorToHex, sketchColorToRgba, sketchColorToRgbaString, useAutoResize, useCurrentFloatingWindowInternal, useDesignSystemConfiguration, useDesignSystemTheme, useDialogContainsElement, useFloatingWindowManager, useGlobalInputBlur, useGlobalInputBlurListener, useGlobalInputBlurTrigger, useHover, useImageData, useOpenInputDialog, usePlatform, usePlatformModKey, withSeparatorElements };
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 };
package/dist/index.js CHANGED
@@ -66,6 +66,7 @@ __export(src_exports, {
66
66
  Heading4: () => Heading4,
67
67
  Heading5: () => Heading5,
68
68
  IconButton: () => IconButton,
69
+ Icons: () => Icons,
69
70
  ImageDataProvider: () => ImageDataProvider,
70
71
  InputElement: () => InputElement,
71
72
  InputField: () => InputField,
@@ -111,6 +112,7 @@ __export(src_exports, {
111
112
  lightTheme: () => light_exports,
112
113
  mediaQuery: () => mediaQuery,
113
114
  normalizeListDestinationIndex: () => normalizeListDestinationIndex,
115
+ renderIcon: () => renderIcon,
114
116
  rgbaToSketchColor: () => rgbaToSketchColor,
115
117
  size: () => size,
116
118
  sketchColorToHex: () => sketchColorToHex,
@@ -753,7 +755,13 @@ var colors = {
753
755
  },
754
756
  selection: "rgb(179,215,254)",
755
757
  thumbnailBackground: "#f0efff",
756
- thumbnailShadow: "#D3CEED66"
758
+ thumbnailShadow: "#D3CEED66",
759
+ inlineCode: {
760
+ text: "rgb(103, 70, 255)",
761
+ background: "rgb(240, 242, 246)"
762
+ },
763
+ textLink: "rgb(103, 70, 255)",
764
+ textLinkFocused: "rgb(147, 86, 255)"
757
765
  };
758
766
  var fonts = {
759
767
  normal: "'__Inter_6b0edc', '__Inter_Fallback_6b0edc', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
@@ -850,6 +858,9 @@ var textStyles = {
850
858
  }
851
859
  };
852
860
  var sizes = {
861
+ inset: {
862
+ top: 46
863
+ },
853
864
  sidebarWidth: 260,
854
865
  toolbar: {
855
866
  height: 46,
@@ -7103,6 +7114,7 @@ var DimensionInput = (0, import_react69.memo)(function DimensionInput2({
7103
7114
  Heading4,
7104
7115
  Heading5,
7105
7116
  IconButton,
7117
+ Icons,
7106
7118
  ImageDataProvider,
7107
7119
  InputElement,
7108
7120
  InputField,
@@ -7148,6 +7160,7 @@ var DimensionInput = (0, import_react69.memo)(function DimensionInput2({
7148
7160
  lightTheme,
7149
7161
  mediaQuery,
7150
7162
  normalizeListDestinationIndex,
7163
+ renderIcon,
7151
7164
  rgbaToSketchColor,
7152
7165
  size,
7153
7166
  sketchColorToHex,