@noya-app/noya-designsystem 0.1.23 → 0.1.25

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 231.87 KB
9
- CJS dist/index.js.map 466.94 KB
10
- CJS ⚡️ Build success in 168ms
11
- ESM dist/index.mjs 213.59 KB
12
- ESM dist/index.mjs.map 467.05 KB
13
- ESM ⚡️ Build success in 170ms
8
+ ESM dist/index.mjs 216.08 KB
9
+ ESM dist/index.mjs.map 471.92 KB
10
+ ESM ⚡️ Build success in 141ms
11
+ CJS dist/index.js 234.49 KB
12
+ CJS dist/index.js.map 471.82 KB
13
+ CJS ⚡️ Build success in 141ms
14
14
  DTS Build start
15
- DTS ⚡️ Build success in 10431ms
16
- DTS dist/index.d.ts 61.61 KB
17
- DTS dist/index.d.mts 61.61 KB
15
+ DTS ⚡️ Build success in 11480ms
16
+ DTS dist/index.d.ts 62.01 KB
17
+ DTS dist/index.d.mts 62.01 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @noya-app/noya-designsystem
2
2
 
3
+ ## 0.1.25
4
+
5
+ ### Patch Changes
6
+
7
+ - b1903d5: Update json editor and improve multiplayer sync
8
+
9
+ ## 0.1.24
10
+
11
+ ### Patch Changes
12
+
13
+ - d0eb712: Add token import and export
14
+
3
15
  ## 0.1.23
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -3,6 +3,7 @@ import React__default, { CSSProperties, ReactNode, ComponentProps, AriaRole, Key
3
3
  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
+ import * as Icons from '@noya-app/noya-icons';
6
7
  import * as DialogPrimitive from '@radix-ui/react-dialog';
7
8
  import * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu';
8
9
  import { Sketch } from '@noya-app/noya-file-format';
@@ -10,7 +11,6 @@ import * as csstype from 'csstype';
10
11
  import { Property } from 'csstype';
11
12
  import * as _noya_app_noya_keymap from '@noya-app/noya-keymap';
12
13
  import { KeyModifiers, PlatformName } from '@noya-app/noya-keymap';
13
- import * as Icons from '@noya-app/noya-icons';
14
14
  import * as _noya_app_noya_geometry from '@noya-app/noya-geometry';
15
15
  import { Size } from '@noya-app/noya-geometry';
16
16
  import { IItemScore } from 'vscode-fuzzy-scorer';
@@ -73,7 +73,7 @@ interface ButtonRootProps {
73
73
  declare const Button: (props: ButtonRootProps & React__default.RefAttributes<HTMLButtonElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
74
74
 
75
75
  type ChipColorScheme = "primary" | "secondary" | "error";
76
- type ChipSize = "small" | "medium";
76
+ type ChipSize = "small" | "medium" | "large";
77
77
  type ChipVariant = "solid" | "outlined" | "ghost";
78
78
  interface ChipProps {
79
79
  id?: string;
@@ -229,6 +229,8 @@ type PickByValue<T, V> = Pick<T, {
229
229
  }[keyof T]>;
230
230
  type ThemeColorName = keyof PickByValue<Theme['colors'], string>;
231
231
 
232
+ type IconName = keyof typeof Icons;
233
+
232
234
  declare const SEPARATOR_ITEM = "separator";
233
235
  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";
234
236
  type RegularMenuItem<T extends string> = {
@@ -237,7 +239,7 @@ type RegularMenuItem<T extends string> = {
237
239
  shortcut?: string;
238
240
  checked?: boolean;
239
241
  disabled?: boolean;
240
- icon?: ReactNode;
242
+ icon?: Exclude<ReactNode, string> | IconName;
241
243
  items?: MenuItem<T>[];
242
244
  role?: MenuItemRole;
243
245
  };
@@ -432,7 +434,7 @@ declare namespace GridView {
432
434
  }
433
435
 
434
436
  declare const IconButton: (props: Omit<ButtonRootProps, "children" | "size" | "flex" | "variant"> & {
435
- iconName: keyof typeof Icons;
437
+ iconName: IconName;
436
438
  className?: string | undefined;
437
439
  style?: React__default.CSSProperties | undefined;
438
440
  selected?: boolean | undefined;
@@ -537,6 +539,7 @@ declare namespace InputField {
537
539
  onClick?: (() => void) | undefined;
538
540
  }) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
539
541
  const Label: (props: InputFieldLabelProps & React__default.RefAttributes<HTMLLabelElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
542
+ const PrimitiveElement: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<React__default.DetailedHTMLProps<React__default.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
540
543
  }
541
544
 
542
545
  declare function fuzzyScore({ item, query }: {
@@ -869,6 +872,8 @@ type Props$8<T extends string> = {
869
872
  value: T;
870
873
  onSelect?: (value: T) => void;
871
874
  placeholder?: string;
875
+ disabled?: boolean;
876
+ readOnly?: boolean;
872
877
  };
873
878
  declare const SelectMenu: <T extends string = string>(props: Props$8<T>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
874
879
 
@@ -973,8 +978,9 @@ interface Props$4 {
973
978
  value: boolean;
974
979
  onChange: (value: boolean) => void;
975
980
  colorScheme?: SwitchColorScheme;
981
+ disabled?: boolean;
976
982
  }
977
- declare const Switch: ({ value, onChange, colorScheme, }: Props$4) => React__default.JSX.Element;
983
+ declare const Switch: ({ value, onChange, colorScheme, disabled, }: Props$4) => React__default.JSX.Element;
978
984
 
979
985
  type StyleProps = {
980
986
  flex?: CSSProperties$1["flex"];
@@ -1049,7 +1055,7 @@ interface Props$2 {
1049
1055
  declare const Tooltip: (props: Props$2) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
1050
1056
 
1051
1057
  type TreeRowBaseProps = {
1052
- icon?: ReactNode;
1058
+ icon?: Exclude<ReactNode, string> | IconName;
1053
1059
  expanded?: boolean;
1054
1060
  onClickChevron?: ({ altKey }: {
1055
1061
  altKey: boolean;
package/dist/index.d.ts CHANGED
@@ -3,6 +3,7 @@ import React__default, { CSSProperties, ReactNode, ComponentProps, AriaRole, Key
3
3
  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
+ import * as Icons from '@noya-app/noya-icons';
6
7
  import * as DialogPrimitive from '@radix-ui/react-dialog';
7
8
  import * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu';
8
9
  import { Sketch } from '@noya-app/noya-file-format';
@@ -10,7 +11,6 @@ import * as csstype from 'csstype';
10
11
  import { Property } from 'csstype';
11
12
  import * as _noya_app_noya_keymap from '@noya-app/noya-keymap';
12
13
  import { KeyModifiers, PlatformName } from '@noya-app/noya-keymap';
13
- import * as Icons from '@noya-app/noya-icons';
14
14
  import * as _noya_app_noya_geometry from '@noya-app/noya-geometry';
15
15
  import { Size } from '@noya-app/noya-geometry';
16
16
  import { IItemScore } from 'vscode-fuzzy-scorer';
@@ -73,7 +73,7 @@ interface ButtonRootProps {
73
73
  declare const Button: (props: ButtonRootProps & React__default.RefAttributes<HTMLButtonElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
74
74
 
75
75
  type ChipColorScheme = "primary" | "secondary" | "error";
76
- type ChipSize = "small" | "medium";
76
+ type ChipSize = "small" | "medium" | "large";
77
77
  type ChipVariant = "solid" | "outlined" | "ghost";
78
78
  interface ChipProps {
79
79
  id?: string;
@@ -229,6 +229,8 @@ type PickByValue<T, V> = Pick<T, {
229
229
  }[keyof T]>;
230
230
  type ThemeColorName = keyof PickByValue<Theme['colors'], string>;
231
231
 
232
+ type IconName = keyof typeof Icons;
233
+
232
234
  declare const SEPARATOR_ITEM = "separator";
233
235
  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";
234
236
  type RegularMenuItem<T extends string> = {
@@ -237,7 +239,7 @@ type RegularMenuItem<T extends string> = {
237
239
  shortcut?: string;
238
240
  checked?: boolean;
239
241
  disabled?: boolean;
240
- icon?: ReactNode;
242
+ icon?: Exclude<ReactNode, string> | IconName;
241
243
  items?: MenuItem<T>[];
242
244
  role?: MenuItemRole;
243
245
  };
@@ -432,7 +434,7 @@ declare namespace GridView {
432
434
  }
433
435
 
434
436
  declare const IconButton: (props: Omit<ButtonRootProps, "children" | "size" | "flex" | "variant"> & {
435
- iconName: keyof typeof Icons;
437
+ iconName: IconName;
436
438
  className?: string | undefined;
437
439
  style?: React__default.CSSProperties | undefined;
438
440
  selected?: boolean | undefined;
@@ -537,6 +539,7 @@ declare namespace InputField {
537
539
  onClick?: (() => void) | undefined;
538
540
  }) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
539
541
  const Label: (props: InputFieldLabelProps & React__default.RefAttributes<HTMLLabelElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
542
+ const PrimitiveElement: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<React__default.DetailedHTMLProps<React__default.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
540
543
  }
541
544
 
542
545
  declare function fuzzyScore({ item, query }: {
@@ -869,6 +872,8 @@ type Props$8<T extends string> = {
869
872
  value: T;
870
873
  onSelect?: (value: T) => void;
871
874
  placeholder?: string;
875
+ disabled?: boolean;
876
+ readOnly?: boolean;
872
877
  };
873
878
  declare const SelectMenu: <T extends string = string>(props: Props$8<T>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
874
879
 
@@ -973,8 +978,9 @@ interface Props$4 {
973
978
  value: boolean;
974
979
  onChange: (value: boolean) => void;
975
980
  colorScheme?: SwitchColorScheme;
981
+ disabled?: boolean;
976
982
  }
977
- declare const Switch: ({ value, onChange, colorScheme, }: Props$4) => React__default.JSX.Element;
983
+ declare const Switch: ({ value, onChange, colorScheme, disabled, }: Props$4) => React__default.JSX.Element;
978
984
 
979
985
  type StyleProps = {
980
986
  flex?: CSSProperties$1["flex"];
@@ -1049,7 +1055,7 @@ interface Props$2 {
1049
1055
  declare const Tooltip: (props: Props$2) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
1050
1056
 
1051
1057
  type TreeRowBaseProps = {
1052
- icon?: ReactNode;
1058
+ icon?: Exclude<ReactNode, string> | IconName;
1053
1059
  expanded?: boolean;
1054
1060
  onClickChevron?: ({ altKey }: {
1055
1061
  altKey: boolean;