@noya-app/noya-designsystem 0.1.46 → 0.1.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +10 -10
- package/CHANGELOG.md +16 -0
- package/dist/index.css +1 -1
- package/dist/index.d.mts +208 -98
- package/dist/index.d.ts +208 -98
- package/dist/index.js +2148 -1604
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2153 -1618
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -7
- package/src/__tests__/validateDropIndicator.test.ts +263 -0
- package/src/components/ActionMenu.tsx +40 -0
- package/src/components/ActivityIndicator.tsx +7 -1
- package/src/components/Collection.tsx +12 -2
- package/src/components/Combobox.tsx +14 -1
- package/src/components/ComboboxMenu.tsx +14 -5
- package/src/components/Dialog.tsx +28 -31
- package/src/components/Drawer.tsx +98 -0
- package/src/components/Grid.tsx +57 -27
- package/src/components/GridView.tsx +39 -25
- package/src/components/InputField.tsx +87 -92
- package/src/components/Label.tsx +7 -7
- package/src/components/List.tsx +42 -16
- package/src/components/ListView.tsx +21 -17
- package/src/components/MediaThumbnail.tsx +117 -0
- package/src/components/SearchCompletionMenu.tsx +31 -37
- package/src/components/SelectMenu.tsx +19 -17
- package/src/components/Sortable.tsx +70 -44
- package/src/components/Switch.tsx +1 -1
- package/src/components/internal/Menu.tsx +38 -23
- package/src/components/internal/MenuViewport.tsx +7 -1
- package/src/components/internal/SelectItem.tsx +51 -27
- package/src/components/internal/__tests__/Menu.test.tsx +12 -0
- package/src/components/workspace/DrawerWorkspaceLayout.tsx +86 -0
- package/src/components/workspace/PanelWorkspaceLayout.tsx +102 -0
- package/src/components/{WorkspaceLayout.tsx → workspace/WorkspaceLayout.tsx} +109 -106
- package/src/components/workspace/types.ts +31 -0
- package/src/contexts/DialogContext.tsx +91 -30
- package/src/hooks/usePreservePanelSize.tsx +1 -5
- package/src/index.css +3 -1
- package/src/index.tsx +4 -1
- package/tailwind.config.ts +1 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
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
4
|
import * as Icons from '@noya-app/noya-icons';
|
|
5
5
|
export { Icons };
|
|
6
6
|
import * as _noya_app_noya_geometry from '@noya-app/noya-geometry';
|
|
7
7
|
import { Size } from '@noya-app/noya-geometry';
|
|
8
|
+
import { UniqueIdentifier } from '@dnd-kit/core';
|
|
8
9
|
import { useSortable } from '@dnd-kit/sortable';
|
|
9
10
|
import { Property } from 'csstype';
|
|
10
11
|
import * as _noya_app_noya_designsystem from '@noya-app/noya-designsystem';
|
|
11
|
-
import { SelectableMenuItem as SelectableMenuItem$1 } from '@noya-app/noya-designsystem';
|
|
12
12
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
13
13
|
import * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu';
|
|
14
14
|
import { Sketch } from '@noya-app/noya-file-format';
|
|
@@ -26,8 +26,9 @@ interface Props$e {
|
|
|
26
26
|
opacity?: number;
|
|
27
27
|
color?: string;
|
|
28
28
|
trackColor?: string;
|
|
29
|
+
className?: string;
|
|
29
30
|
}
|
|
30
|
-
declare const ActivityIndicator: React.NamedExoticComponent<Props$e>;
|
|
31
|
+
declare const ActivityIndicator: React$1.NamedExoticComponent<Props$e>;
|
|
31
32
|
|
|
32
33
|
type AnimatePresenceProps = {
|
|
33
34
|
children: React__default.ReactNode;
|
|
@@ -220,6 +221,7 @@ declare const config: {
|
|
|
220
221
|
"inspector-h-separator": string;
|
|
221
222
|
"inspector-v-separator": string;
|
|
222
223
|
"dialog-padding": string;
|
|
224
|
+
"input-height": string;
|
|
223
225
|
};
|
|
224
226
|
keyframes: {
|
|
225
227
|
spin: {
|
|
@@ -386,6 +388,7 @@ declare const cssVars: {
|
|
|
386
388
|
inspectorHSeparator: string;
|
|
387
389
|
inspectorVSeparator: string;
|
|
388
390
|
dialogPadding: string;
|
|
391
|
+
inputHeight: string;
|
|
389
392
|
};
|
|
390
393
|
keyframes: {
|
|
391
394
|
spin: {
|
|
@@ -474,10 +477,10 @@ interface ButtonRootProps {
|
|
|
474
477
|
}
|
|
475
478
|
declare const Button: React__default.ForwardRefExoticComponent<ButtonRootProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
476
479
|
|
|
477
|
-
interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
480
|
+
interface CheckboxProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
478
481
|
colorScheme?: "primary" | "secondary";
|
|
479
482
|
}
|
|
480
|
-
declare const Checkbox$1: React.MemoExoticComponent<React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>>;
|
|
483
|
+
declare const Checkbox$1: React$1.MemoExoticComponent<React$1.ForwardRefExoticComponent<CheckboxProps & React$1.RefAttributes<HTMLInputElement>>>;
|
|
481
484
|
|
|
482
485
|
type ChipColorScheme = "primary" | "secondary" | "error";
|
|
483
486
|
type ChipSize = "small" | "medium" | "large";
|
|
@@ -541,16 +544,19 @@ declare function fuzzyTokenize({ item, itemScore, }: {
|
|
|
541
544
|
|
|
542
545
|
type IconName = keyof typeof Icons;
|
|
543
546
|
|
|
544
|
-
declare function renderIcon(iconName: Exclude<React.ReactNode, string> | IconName): React.ReactNode;
|
|
547
|
+
declare function renderIcon(iconName: Exclude<React$1.ReactNode, string> | IconName): React$1.ReactNode;
|
|
545
548
|
|
|
546
549
|
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
550
|
type SeparatorItem = {
|
|
548
551
|
type: "separator";
|
|
549
552
|
};
|
|
553
|
+
declare const separator: SeparatorItem;
|
|
554
|
+
type FalsyReactNode = false | "" | null | undefined;
|
|
555
|
+
type MenuItemIcon = IconName | React__default.ReactElement | FalsyReactNode;
|
|
550
556
|
type BaseMenuItem = {
|
|
551
557
|
checked?: boolean;
|
|
552
558
|
disabled?: boolean;
|
|
553
|
-
icon?:
|
|
559
|
+
icon?: MenuItemIcon;
|
|
554
560
|
role?: MenuItemRole;
|
|
555
561
|
alwaysInclude?: boolean;
|
|
556
562
|
title: NonNullable<ReactNode>;
|
|
@@ -566,6 +572,7 @@ type SelectableMenuItem<T extends string> = BaseMenuItem & {
|
|
|
566
572
|
type?: undefined;
|
|
567
573
|
shortcut?: string;
|
|
568
574
|
value: T;
|
|
575
|
+
testSelected?: boolean;
|
|
569
576
|
};
|
|
570
577
|
type SubMenuItem<T extends string> = BaseMenuItem & {
|
|
571
578
|
type: "submenu";
|
|
@@ -581,10 +588,14 @@ declare const isSelectableMenuItem: <T extends string>(item: MenuItem<T>) => ite
|
|
|
581
588
|
declare const isNonSelectableMenuItem: <T extends string>(item: MenuItem<T>) => item is NonSelectableMenuItem<T>;
|
|
582
589
|
declare const isMenuItemSectionHeader: (item: MenuItem<string>) => item is SectionHeaderMenuItem;
|
|
583
590
|
declare const isSelectableMenuItemWithScore: (item: MenuItem<string>) => item is ScoredSelectableMenuItem<string>;
|
|
591
|
+
declare const getMenuItemKey: <T extends string>(item: MenuItem<T>, index: number) => string;
|
|
584
592
|
declare const CHECKBOX_WIDTH = 16;
|
|
585
593
|
declare const CHECKBOX_RIGHT_INSET = 8;
|
|
594
|
+
declare const CHECKBOX_INDENT_WIDTH = 6;
|
|
586
595
|
declare const styles: {
|
|
587
596
|
separatorStyle: string;
|
|
597
|
+
selectedItemStyle: string;
|
|
598
|
+
testSelectedItemStyle: string;
|
|
588
599
|
itemStyle: ({ disabled }: {
|
|
589
600
|
disabled?: boolean;
|
|
590
601
|
}) => string;
|
|
@@ -603,27 +614,38 @@ declare const SectionHeader$1: React__default.NamedExoticComponent<Omit<SectionH
|
|
|
603
614
|
type RelativeDropPosition = "above" | "below" | "inside";
|
|
604
615
|
type DropValidator = (sourceIndex: number, destinationIndex: number, position: RelativeDropPosition) => boolean;
|
|
605
616
|
declare const normalizeListDestinationIndex: (index: number, position: "above" | "below") => number;
|
|
617
|
+
declare const defaultAcceptsDrop: DropValidator;
|
|
618
|
+
type ValidateDropIndicatorParams = {
|
|
619
|
+
acceptsDrop: DropValidator;
|
|
620
|
+
keys: UniqueIdentifier[];
|
|
621
|
+
activeId: UniqueIdentifier;
|
|
622
|
+
overId: UniqueIdentifier;
|
|
623
|
+
offsetStart: number;
|
|
624
|
+
elementStart: number;
|
|
625
|
+
elementSize: number;
|
|
626
|
+
};
|
|
627
|
+
declare function validateDropIndicator({ acceptsDrop, keys, activeId, overId, offsetStart, elementStart, elementSize, }: ValidateDropIndicatorParams): RelativeDropPosition | undefined;
|
|
606
628
|
type UseSortableReturnType = ReturnType<typeof useSortable>;
|
|
607
629
|
interface ItemProps$1<T> {
|
|
608
|
-
id:
|
|
630
|
+
id: UniqueIdentifier;
|
|
609
631
|
disabled?: boolean;
|
|
610
632
|
children: (props: {
|
|
611
|
-
ref: React.Ref<T>;
|
|
633
|
+
ref: React$1.Ref<T>;
|
|
612
634
|
relativeDropPosition?: RelativeDropPosition;
|
|
613
|
-
|
|
635
|
+
style?: React$1.CSSProperties;
|
|
614
636
|
} & UseSortableReturnType["attributes"]) => JSX.Element;
|
|
615
637
|
}
|
|
616
638
|
interface RootProps {
|
|
617
|
-
keys:
|
|
618
|
-
children: React.ReactNode;
|
|
619
|
-
renderOverlay?: (index: number) => React.ReactNode;
|
|
639
|
+
keys: UniqueIdentifier[];
|
|
640
|
+
children: React$1.ReactNode;
|
|
641
|
+
renderOverlay?: (index: number) => React$1.ReactNode;
|
|
620
642
|
onMoveItem?: (sourceIndex: number, destinationIndex: number, position: RelativeDropPosition) => void;
|
|
621
643
|
acceptsDrop?: DropValidator;
|
|
622
644
|
axis?: "x" | "y";
|
|
623
645
|
}
|
|
624
646
|
declare namespace Sortable {
|
|
625
|
-
const Item: <T extends HTMLElement>(props: ItemProps$1<T>) => React.ReactElement | null;
|
|
626
|
-
const Root: (props: RootProps) => React.ReactElement | null;
|
|
647
|
+
const Item: <T extends HTMLElement>(props: ItemProps$1<T>) => React$1.ReactElement | null;
|
|
648
|
+
const Root: (props: RootProps) => React$1.ReactElement | null;
|
|
627
649
|
}
|
|
628
650
|
|
|
629
651
|
type ListRowMarginType = "none" | "top" | "bottom" | "vertical";
|
|
@@ -735,6 +757,7 @@ type ListViewRootProps = {
|
|
|
735
757
|
onDragEnter?: React__default.DragEventHandler<HTMLDivElement>;
|
|
736
758
|
onDragLeave?: React__default.DragEventHandler<HTMLDivElement>;
|
|
737
759
|
onDrop?: React__default.DragEventHandler<HTMLDivElement>;
|
|
760
|
+
renderEmptyState?: () => ReactNode;
|
|
738
761
|
};
|
|
739
762
|
declare namespace ListView {
|
|
740
763
|
const RowTitle: React__default.MemoExoticComponent<({ className, children, ...props }: {
|
|
@@ -768,6 +791,10 @@ type CollectionViewType = "grid" | "list";
|
|
|
768
791
|
type CollectionRef = {
|
|
769
792
|
editName: (id: string) => void;
|
|
770
793
|
};
|
|
794
|
+
type CollectionThumbnailProps<T> = {
|
|
795
|
+
item: T;
|
|
796
|
+
selected: boolean;
|
|
797
|
+
};
|
|
771
798
|
interface CollectionProps<T, M extends string = string> {
|
|
772
799
|
className?: string;
|
|
773
800
|
items: T[];
|
|
@@ -787,8 +814,8 @@ interface CollectionProps<T, M extends string = string> {
|
|
|
787
814
|
menuItems?: MenuItem<M>[];
|
|
788
815
|
onSelectMenuItem?: (action: M, selectedItems: T[]) => void;
|
|
789
816
|
onRename?: (item: T, newName: string) => void;
|
|
790
|
-
renderThumbnail?: (item
|
|
791
|
-
renderAction?: (item: T, selected: boolean) => React__default.ReactNode;
|
|
817
|
+
renderThumbnail?: ({ item, selected, }: CollectionThumbnailProps<T>) => React__default.ReactNode;
|
|
818
|
+
renderAction?: "menu" | ((item: T, selected: boolean) => React__default.ReactNode);
|
|
792
819
|
renderDetail?: (item: T, selected: boolean) => React__default.ReactNode;
|
|
793
820
|
/** Callback when selection changes. If not provided, selection will be disabled. */
|
|
794
821
|
onSelectionChange?: (selectedItemIds: string[], event?: ListView.ClickInfo) => void;
|
|
@@ -811,7 +838,9 @@ interface CollectionProps<T, M extends string = string> {
|
|
|
811
838
|
/** Currently selected file IDs */
|
|
812
839
|
selectedIds?: string[];
|
|
813
840
|
viewType?: CollectionViewType;
|
|
841
|
+
onClickItem?: (itemId: string) => void;
|
|
814
842
|
onDoubleClickItem?: (itemId: string) => void;
|
|
843
|
+
renderEmptyState?: () => React__default.ReactElement;
|
|
815
844
|
}
|
|
816
845
|
declare const Collection: <T, M extends string = string>(props: CollectionProps<T, M> & React__default.RefAttributes<CollectionRef>) => React__default.ReactElement | null;
|
|
817
846
|
|
|
@@ -857,7 +886,7 @@ type InsetLabelProps = {
|
|
|
857
886
|
/** @default medium */
|
|
858
887
|
size?: InputFieldSize;
|
|
859
888
|
/** 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
|
-
|
|
889
|
+
buttonWidth?: number;
|
|
861
890
|
} & LabelHTMLAttributes<HTMLLabelElement>;
|
|
862
891
|
declare const insetLabelTextStyles = "font-sans text-label uppercase text-text-disabled leading-[19px] font-bold text-[60%] truncate pointer-events-none text-right";
|
|
863
892
|
declare const insetLabelStyles = "flex items-center absolute top-0 bottom-0 z-label";
|
|
@@ -865,30 +894,32 @@ declare const InsetLabel: React__default.MemoExoticComponent<React__default.Forw
|
|
|
865
894
|
/** @default medium */
|
|
866
895
|
size?: InputFieldSize;
|
|
867
896
|
/** 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
|
-
|
|
897
|
+
buttonWidth?: number;
|
|
869
898
|
} & React__default.LabelHTMLAttributes<HTMLLabelElement> & React__default.RefAttributes<HTMLLabelElement>>>;
|
|
870
899
|
declare const Label: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<LabelProps & React__default.RefAttributes<HTMLLabelElement>>>;
|
|
871
900
|
|
|
872
901
|
type InputFieldSize = "small" | "medium" | "large";
|
|
873
902
|
type InputFieldContextValue = {
|
|
874
|
-
|
|
875
|
-
|
|
903
|
+
labelWidth?: number;
|
|
904
|
+
buttonWidth?: number;
|
|
905
|
+
startWidth?: number;
|
|
876
906
|
/** @default medium */
|
|
877
907
|
size: InputFieldSize;
|
|
878
908
|
isFocused: boolean;
|
|
879
909
|
onFocusChange: (isFocused: boolean) => void;
|
|
880
|
-
inputRef
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
910
|
+
inputRef: ForwardedRef<HTMLInputElement>;
|
|
911
|
+
buttonRef: ForwardedRef<HTMLButtonElement>;
|
|
912
|
+
labelRef: ForwardedRef<HTMLLabelElement>;
|
|
913
|
+
startRef: ForwardedRef<HTMLSpanElement>;
|
|
884
914
|
id?: string;
|
|
885
915
|
label?: ReactNode;
|
|
886
916
|
labelPosition?: LabelPosition;
|
|
887
917
|
};
|
|
888
918
|
declare const useInputFieldContext: () => InputFieldContextValue;
|
|
889
|
-
declare const getFieldSpacing: ({
|
|
890
|
-
|
|
891
|
-
|
|
919
|
+
declare const getFieldSpacing: ({ buttonWidth, labelWidth, startWidth, variant, }: {
|
|
920
|
+
buttonWidth?: number;
|
|
921
|
+
labelWidth?: number;
|
|
922
|
+
startWidth?: number;
|
|
892
923
|
variant?: InputFieldVariant;
|
|
893
924
|
}) => {
|
|
894
925
|
paddingLeft: string;
|
|
@@ -923,7 +954,8 @@ interface InputFieldRootProps {
|
|
|
923
954
|
id?: string;
|
|
924
955
|
children?: ReactNode;
|
|
925
956
|
width?: number;
|
|
926
|
-
|
|
957
|
+
labelWidth?: number;
|
|
958
|
+
startWidth?: number;
|
|
927
959
|
/** @default medium */
|
|
928
960
|
size?: InputFieldSize;
|
|
929
961
|
renderPopoverContent?: (options: {
|
|
@@ -937,8 +969,9 @@ interface InputFieldRootProps {
|
|
|
937
969
|
onFocusChange?: (isFocused: boolean) => void;
|
|
938
970
|
style?: React__default.CSSProperties;
|
|
939
971
|
className?: string;
|
|
972
|
+
start?: ReactNode;
|
|
940
973
|
}
|
|
941
|
-
declare function InputFieldRoot({ id: idProp, children, width, sideOffset,
|
|
974
|
+
declare function InputFieldRoot({ id: idProp, children, width, sideOffset, labelWidth, startWidth, size, renderPopoverContent, onFocusChange, style, className, start, }: InputFieldRootProps): React__default.JSX.Element;
|
|
942
975
|
type InputFieldProps = InputFieldRootProps & InputFieldInputProps;
|
|
943
976
|
declare const InputField: React__default.ForwardRefExoticComponent<InputFieldProps & React__default.RefAttributes<HTMLInputElement>> & {
|
|
944
977
|
readonly Root: React__default.MemoExoticComponent<typeof InputFieldRoot>;
|
|
@@ -952,6 +985,7 @@ declare const InputField: React__default.ForwardRefExoticComponent<InputFieldPro
|
|
|
952
985
|
readonly DropdownMenu: <T extends string>(props: InputFieldDropdownProps<T>) => React__default.ReactElement | null;
|
|
953
986
|
readonly Button: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<React__default.ButtonHTMLAttributes<HTMLButtonElement> & ButtonRootProps & {
|
|
954
987
|
buttonClassName?: string;
|
|
988
|
+
buttonStyle?: React__default.CSSProperties;
|
|
955
989
|
variant?: "floating" | "normal";
|
|
956
990
|
} & React__default.RefAttributes<HTMLButtonElement>>>;
|
|
957
991
|
readonly Label: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<React__default.LabelHTMLAttributes<HTMLLabelElement> & React__default.RefAttributes<HTMLLabelElement>>>;
|
|
@@ -1013,6 +1047,7 @@ interface ComboboxMenuProps<T extends string> {
|
|
|
1013
1047
|
onHoverIndex: (index: number) => void;
|
|
1014
1048
|
listSize: Size;
|
|
1015
1049
|
style?: React__default.CSSProperties;
|
|
1050
|
+
indented?: boolean;
|
|
1016
1051
|
}
|
|
1017
1052
|
declare const ComboboxMenu: <T extends string>(props: ComboboxMenuProps<T> & React__default.RefAttributes<IVirtualizedList>) => React__default.ReactElement | null;
|
|
1018
1053
|
|
|
@@ -1020,11 +1055,13 @@ interface ISearchCompletionMenu {
|
|
|
1020
1055
|
focus: () => void;
|
|
1021
1056
|
}
|
|
1022
1057
|
declare const SearchCompletionMenu: React__default.ForwardRefExoticComponent<{
|
|
1023
|
-
onSelect: (item: SelectableMenuItem
|
|
1024
|
-
onHover?: (item: SelectableMenuItem
|
|
1058
|
+
onSelect: (item: SelectableMenuItem<string>) => void;
|
|
1059
|
+
onHover?: (item: SelectableMenuItem<string>) => void;
|
|
1025
1060
|
onClose: () => void;
|
|
1026
|
-
items: SelectableMenuItem
|
|
1061
|
+
items: SelectableMenuItem<string>[];
|
|
1027
1062
|
width?: number;
|
|
1063
|
+
testSelectedIndex?: number;
|
|
1064
|
+
testSearch?: string;
|
|
1028
1065
|
} & React__default.RefAttributes<ISearchCompletionMenu>>;
|
|
1029
1066
|
|
|
1030
1067
|
declare const CommandPalette: React__default.NamedExoticComponent<{
|
|
@@ -1036,6 +1073,8 @@ declare const CommandPalette: React__default.NamedExoticComponent<{
|
|
|
1036
1073
|
onClose: () => void;
|
|
1037
1074
|
items: _noya_app_noya_designsystem.SelectableMenuItem<string>[];
|
|
1038
1075
|
width?: number;
|
|
1076
|
+
testSelectedIndex?: number;
|
|
1077
|
+
testSearch?: string;
|
|
1039
1078
|
} & React__default.RefAttributes<ISearchCompletionMenu>, "onSelect" | "items" | "onHover">>;
|
|
1040
1079
|
|
|
1041
1080
|
interface MenuItemProps<T extends string> {
|
|
@@ -1096,6 +1135,51 @@ declare const DraggableMenuButton: <T extends string>(props: {
|
|
|
1096
1135
|
isVisible?: boolean;
|
|
1097
1136
|
}) => React__default.ReactElement | null;
|
|
1098
1137
|
|
|
1138
|
+
type SidebarRef = {
|
|
1139
|
+
expand: () => void;
|
|
1140
|
+
collapse: () => void;
|
|
1141
|
+
isExpanded: () => boolean;
|
|
1142
|
+
};
|
|
1143
|
+
type PercentageSidebarOptions = {
|
|
1144
|
+
minSize?: number;
|
|
1145
|
+
maxSize?: number;
|
|
1146
|
+
initialSize?: number;
|
|
1147
|
+
resizable?: boolean;
|
|
1148
|
+
};
|
|
1149
|
+
type PanelLayoutState = {
|
|
1150
|
+
leftSidebarCollapsed: boolean;
|
|
1151
|
+
rightSidebarCollapsed: boolean;
|
|
1152
|
+
};
|
|
1153
|
+
type LayoutProps = {
|
|
1154
|
+
leftPanel: React.ReactNode;
|
|
1155
|
+
rightPanel: React.ReactNode;
|
|
1156
|
+
centerPanel: React.ReactNode;
|
|
1157
|
+
leftSidebarOptions: PercentageSidebarOptions;
|
|
1158
|
+
rightSidebarOptions: PercentageSidebarOptions;
|
|
1159
|
+
centerPanelPercentage: number;
|
|
1160
|
+
autoSavePrefix?: string;
|
|
1161
|
+
internalLayoutState: PanelLayoutState | null;
|
|
1162
|
+
leftSidebarRef: React.RefObject<SidebarRef>;
|
|
1163
|
+
rightSidebarRef: React.RefObject<SidebarRef>;
|
|
1164
|
+
handleChangeLayoutState: (state: PanelLayoutState) => void;
|
|
1165
|
+
};
|
|
1166
|
+
|
|
1167
|
+
type DrawerProps = {
|
|
1168
|
+
open?: boolean;
|
|
1169
|
+
onOpenChange?: (open: boolean) => void;
|
|
1170
|
+
trigger: React$1.ReactNode;
|
|
1171
|
+
children: React$1.ReactNode;
|
|
1172
|
+
title?: React$1.ReactNode;
|
|
1173
|
+
className?: string;
|
|
1174
|
+
id?: string;
|
|
1175
|
+
style?: React$1.CSSProperties;
|
|
1176
|
+
positioning?: "fixed" | "absolute";
|
|
1177
|
+
side?: "left" | "right";
|
|
1178
|
+
portalled?: boolean;
|
|
1179
|
+
portalContainer?: HTMLElement | null;
|
|
1180
|
+
};
|
|
1181
|
+
declare const Drawer: React$1.MemoExoticComponent<React$1.ForwardRefExoticComponent<DrawerProps & React$1.RefAttributes<SidebarRef>>>;
|
|
1182
|
+
|
|
1099
1183
|
type DropdownRootProps<T extends string> = MenuProps<T> & {
|
|
1100
1184
|
open?: boolean;
|
|
1101
1185
|
onCloseAutoFocus?: React__default.EventHandler<SyntheticEvent<unknown>>;
|
|
@@ -1176,7 +1260,7 @@ interface Props$a {
|
|
|
1176
1260
|
}
|
|
1177
1261
|
declare const FillInputField: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<Props$a & React__default.RefAttributes<HTMLButtonElement>>>;
|
|
1178
1262
|
|
|
1179
|
-
declare const PatternPreviewBackground: React.NamedExoticComponent<{
|
|
1263
|
+
declare const PatternPreviewBackground: React$1.NamedExoticComponent<{
|
|
1180
1264
|
fillType: Sketch.PatternFillType;
|
|
1181
1265
|
tileScale: number;
|
|
1182
1266
|
imageRef: string;
|
|
@@ -1184,7 +1268,7 @@ declare const PatternPreviewBackground: React.NamedExoticComponent<{
|
|
|
1184
1268
|
interface Props$9 {
|
|
1185
1269
|
value?: Sketch.Color | Sketch.Gradient | SketchPattern;
|
|
1186
1270
|
}
|
|
1187
|
-
declare const FillPreviewBackground: React.NamedExoticComponent<Props$9>;
|
|
1271
|
+
declare const FillPreviewBackground: React$1.NamedExoticComponent<Props$9>;
|
|
1188
1272
|
|
|
1189
1273
|
interface FloatingWindowProps {
|
|
1190
1274
|
title?: string;
|
|
@@ -1214,7 +1298,7 @@ interface Props$8 {
|
|
|
1214
1298
|
onDelete: () => void;
|
|
1215
1299
|
onSelectStop: (index: number) => void;
|
|
1216
1300
|
}
|
|
1217
|
-
declare const GradientPicker: React.NamedExoticComponent<Props$8>;
|
|
1301
|
+
declare const GradientPicker: React$1.NamedExoticComponent<Props$8>;
|
|
1218
1302
|
|
|
1219
1303
|
interface ItemProps<MenuItemType extends string = string> {
|
|
1220
1304
|
id: string;
|
|
@@ -1233,7 +1317,6 @@ interface ItemProps<MenuItemType extends string = string> {
|
|
|
1233
1317
|
onMenuOpenChange?: (open: boolean) => void;
|
|
1234
1318
|
style?: CSSProperties;
|
|
1235
1319
|
action?: ReactNode;
|
|
1236
|
-
testHoveredId?: string;
|
|
1237
1320
|
onKeyDown?: (event: React__default.KeyboardEvent) => void;
|
|
1238
1321
|
hovered?: boolean;
|
|
1239
1322
|
}
|
|
@@ -1249,30 +1332,34 @@ interface GridViewRootProps extends Partial<GridViewContextValue> {
|
|
|
1249
1332
|
onClick?: () => void;
|
|
1250
1333
|
scrollable?: boolean;
|
|
1251
1334
|
className?: string;
|
|
1335
|
+
onDragOver?: React__default.DragEventHandler<HTMLDivElement>;
|
|
1336
|
+
onDragEnter?: React__default.DragEventHandler<HTMLDivElement>;
|
|
1337
|
+
onDragLeave?: React__default.DragEventHandler<HTMLDivElement>;
|
|
1338
|
+
onDrop?: React__default.DragEventHandler<HTMLDivElement>;
|
|
1252
1339
|
}
|
|
1253
|
-
declare function
|
|
1254
|
-
declare function GridViewSection({ children, className, }: {
|
|
1340
|
+
declare function GridViewSection({ children, className, renderEmptyState, }: {
|
|
1255
1341
|
children?: ReactNode;
|
|
1256
1342
|
className?: string;
|
|
1257
|
-
|
|
1343
|
+
renderEmptyState?: () => ReactNode;
|
|
1344
|
+
}): string | number | boolean | React__default.JSX.Element | Iterable<React__default.ReactNode> | null | undefined;
|
|
1258
1345
|
declare function GridViewSectionHeader({ title }: {
|
|
1259
1346
|
title: string;
|
|
1260
1347
|
}): React__default.JSX.Element;
|
|
1261
1348
|
declare namespace GridView {
|
|
1262
|
-
const Root: React__default.MemoExoticComponent<
|
|
1349
|
+
const Root: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<GridViewRootProps & React__default.RefAttributes<HTMLDivElement>>>;
|
|
1263
1350
|
const Item: <MenuItemType extends string>(props: ItemProps<MenuItemType> & React__default.RefAttributes<HTMLDivElement>) => React__default.ReactElement | null;
|
|
1264
1351
|
const Section: React__default.MemoExoticComponent<typeof GridViewSection>;
|
|
1265
1352
|
const SectionHeader: React__default.MemoExoticComponent<typeof GridViewSectionHeader>;
|
|
1266
1353
|
}
|
|
1267
1354
|
|
|
1268
|
-
declare const IconButton: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<ButtonRootProps, "size" | "children" | "variant" | "flex"> & {
|
|
1355
|
+
declare const IconButton: React$1.MemoExoticComponent<React$1.ForwardRefExoticComponent<Omit<ButtonRootProps, "size" | "children" | "variant" | "flex"> & {
|
|
1269
1356
|
iconName: IconName;
|
|
1270
1357
|
className?: string;
|
|
1271
|
-
style?: React.CSSProperties;
|
|
1358
|
+
style?: React$1.CSSProperties;
|
|
1272
1359
|
selected?: boolean;
|
|
1273
1360
|
color?: string;
|
|
1274
1361
|
size?: number;
|
|
1275
|
-
} & React.RefAttributes<HTMLButtonElement>>>;
|
|
1362
|
+
} & React$1.RefAttributes<HTMLButtonElement>>>;
|
|
1276
1363
|
|
|
1277
1364
|
declare const InspectorContainer: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<{
|
|
1278
1365
|
header?: React__default.ReactNode;
|
|
@@ -1296,6 +1383,7 @@ type MenuItemComponent = React__default.ForwardRefExoticComponent<React__default
|
|
|
1296
1383
|
children?: React__default.ReactNode;
|
|
1297
1384
|
value: string;
|
|
1298
1385
|
onSelect?: (event: any) => void;
|
|
1386
|
+
onClick?: (event: React__default.MouseEvent<any>) => void;
|
|
1299
1387
|
}>>;
|
|
1300
1388
|
type MenuCheckboxItemComponent = React__default.FC<{
|
|
1301
1389
|
checked?: boolean | "indeterminate";
|
|
@@ -1327,13 +1415,13 @@ type MenuViewportProps<T extends string> = {
|
|
|
1327
1415
|
declare const MenuViewport: <T extends string>({ items, Components, onSelect, }: MenuViewportProps<T>) => React__default.JSX.Element;
|
|
1328
1416
|
|
|
1329
1417
|
interface ContainerProps {
|
|
1330
|
-
children: React.ReactNode;
|
|
1418
|
+
children: React$1.ReactNode;
|
|
1331
1419
|
renderLabel: (provided: {
|
|
1332
1420
|
id: string;
|
|
1333
1421
|
index: number;
|
|
1334
|
-
}) => React.ReactNode;
|
|
1422
|
+
}) => React$1.ReactNode;
|
|
1335
1423
|
}
|
|
1336
|
-
declare const LabeledElementView: React.NamedExoticComponent<ContainerProps>;
|
|
1424
|
+
declare const LabeledElementView: React$1.NamedExoticComponent<ContainerProps>;
|
|
1337
1425
|
|
|
1338
1426
|
declare const labeledFieldStyles: (labelPosition?: LabelPosition) => string;
|
|
1339
1427
|
declare const LabeledField: React__default.NamedExoticComponent<{
|
|
@@ -1348,9 +1436,24 @@ declare const LabeledField: React__default.NamedExoticComponent<{
|
|
|
1348
1436
|
minWidth?: number;
|
|
1349
1437
|
}>;
|
|
1350
1438
|
|
|
1351
|
-
declare const List: <T, M extends string = string>(props: CollectionProps<T, M> &
|
|
1352
|
-
|
|
1353
|
-
|
|
1439
|
+
declare const List: <T, M extends string = string>(props: CollectionProps<T, M> & React__default.RefAttributes<CollectionRef>) => React__default.ReactElement | null;
|
|
1440
|
+
|
|
1441
|
+
type ColorScheme$1 = "primary" | "icon" | "warning";
|
|
1442
|
+
type MediaThumbnailProps = {
|
|
1443
|
+
contentType?: string;
|
|
1444
|
+
url?: string;
|
|
1445
|
+
selected?: boolean;
|
|
1446
|
+
className?: string;
|
|
1447
|
+
/** Color scheme for the thumbnail. Affects icon color and background.
|
|
1448
|
+
* @default "icon"
|
|
1449
|
+
*/
|
|
1450
|
+
colorScheme?: ColorScheme$1;
|
|
1451
|
+
/**
|
|
1452
|
+
* If provided, use this icon instead of the default one for the asset type
|
|
1453
|
+
*/
|
|
1454
|
+
iconName?: IconName;
|
|
1455
|
+
};
|
|
1456
|
+
declare const MediaThumbnail: React__default.NamedExoticComponent<MediaThumbnailProps>;
|
|
1354
1457
|
|
|
1355
1458
|
type MessageProps = {
|
|
1356
1459
|
role: "user" | "assistant" | "system" | "data";
|
|
@@ -1381,12 +1484,12 @@ declare function Progress({ value, variant, className, }: {
|
|
|
1381
1484
|
value: number;
|
|
1382
1485
|
variant?: ProgressVariant;
|
|
1383
1486
|
className?: string;
|
|
1384
|
-
}): React.JSX.Element;
|
|
1487
|
+
}): React$1.JSX.Element;
|
|
1385
1488
|
|
|
1386
1489
|
interface Props$6 {
|
|
1387
|
-
children?: React.ReactNode | ((scrollElementRef: HTMLDivElement) => React.ReactNode);
|
|
1490
|
+
children?: React$1.ReactNode | ((scrollElementRef: HTMLDivElement) => React$1.ReactNode);
|
|
1388
1491
|
}
|
|
1389
|
-
declare const ScrollArea: React.NamedExoticComponent<Props$6>;
|
|
1492
|
+
declare const ScrollArea: React$1.NamedExoticComponent<Props$6>;
|
|
1390
1493
|
|
|
1391
1494
|
type SegmentedControlColorScheme = "primary" | "secondary";
|
|
1392
1495
|
interface SegmentedControlProps<T extends string> {
|
|
@@ -1449,8 +1552,8 @@ interface Props$3 {
|
|
|
1449
1552
|
inline?: boolean;
|
|
1450
1553
|
}
|
|
1451
1554
|
declare namespace Spacer {
|
|
1452
|
-
const Vertical: React.ForwardRefExoticComponent<Props$3 & React.RefAttributes<HTMLSpanElement>>;
|
|
1453
|
-
const Horizontal: React.ForwardRefExoticComponent<Props$3 & React.RefAttributes<HTMLSpanElement>>;
|
|
1555
|
+
const Vertical: React$1.ForwardRefExoticComponent<Props$3 & React$1.RefAttributes<HTMLSpanElement>>;
|
|
1556
|
+
const Horizontal: React$1.ForwardRefExoticComponent<Props$3 & React$1.RefAttributes<HTMLSpanElement>>;
|
|
1454
1557
|
}
|
|
1455
1558
|
|
|
1456
1559
|
type SwitchColorScheme = "primary" | "secondary";
|
|
@@ -1461,12 +1564,12 @@ interface Props$2 {
|
|
|
1461
1564
|
/** @default normal */
|
|
1462
1565
|
colorScheme?: SwitchColorScheme;
|
|
1463
1566
|
disabled?: boolean;
|
|
1464
|
-
onFocus?: React.FocusEventHandler;
|
|
1465
|
-
onBlur?: React.FocusEventHandler;
|
|
1567
|
+
onFocus?: React$1.FocusEventHandler;
|
|
1568
|
+
onBlur?: React$1.FocusEventHandler;
|
|
1466
1569
|
className?: string;
|
|
1467
|
-
style?: React.CSSProperties;
|
|
1570
|
+
style?: React$1.CSSProperties;
|
|
1468
1571
|
}
|
|
1469
|
-
declare const Switch: ({ id, value, onChange, colorScheme, disabled, onFocus, onBlur, style, className, }: Props$2) => React.JSX.Element;
|
|
1572
|
+
declare const Switch: ({ id, value, onChange, colorScheme, disabled, onFocus, onBlur, style, className, }: Props$2) => React$1.JSX.Element;
|
|
1470
1573
|
|
|
1471
1574
|
declare const useAutoResize: (value: string | undefined) => React__default.MutableRefObject<HTMLTextAreaElement | null>;
|
|
1472
1575
|
declare const TextArea: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<{
|
|
@@ -1498,10 +1601,10 @@ declare const ToastProvider: ({ children }: {
|
|
|
1498
1601
|
}) => React__default.JSX.Element;
|
|
1499
1602
|
|
|
1500
1603
|
interface Props$1 {
|
|
1501
|
-
children: React.ReactNode;
|
|
1502
|
-
content: React.ReactNode;
|
|
1604
|
+
children: React$1.ReactNode;
|
|
1605
|
+
content: React$1.ReactNode;
|
|
1503
1606
|
}
|
|
1504
|
-
declare const Tooltip: React.NamedExoticComponent<Props$1>;
|
|
1607
|
+
declare const Tooltip: React$1.NamedExoticComponent<Props$1>;
|
|
1505
1608
|
|
|
1506
1609
|
type TreeRowBaseProps = {
|
|
1507
1610
|
icon?: Exclude<ReactNode, string> | IconName;
|
|
@@ -1552,16 +1655,8 @@ type UserPointerProps = {
|
|
|
1552
1655
|
};
|
|
1553
1656
|
declare const UserPointer: React__default.NamedExoticComponent<UserPointerProps>;
|
|
1554
1657
|
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
declare const RIGHT_SIDEBAR_ID = "editor-right-sidebar";
|
|
1558
|
-
declare const CONTENT_AREA_ID = "editor-content-area";
|
|
1559
|
-
type PanelLayoutState = {
|
|
1560
|
-
leftSidebarCollapsed: boolean;
|
|
1561
|
-
rightSidebarCollapsed: boolean;
|
|
1562
|
-
};
|
|
1563
|
-
declare function usePreservePanelSize(panelGroupRef: React__default.RefObject<ImperativePanelGroupHandle | null>, setPanelLayoutState?: (state: PanelLayoutState) => void): void;
|
|
1564
|
-
|
|
1658
|
+
type SideType = "auto" | "panel" | "drawer";
|
|
1659
|
+
type DetectSizeType = "container" | "window";
|
|
1565
1660
|
interface WorkspaceLayoutProps {
|
|
1566
1661
|
id?: string;
|
|
1567
1662
|
className?: string;
|
|
@@ -1574,9 +1669,12 @@ interface WorkspaceLayoutProps {
|
|
|
1574
1669
|
right?: React__default.ReactNode;
|
|
1575
1670
|
rightOptions?: SideOptions;
|
|
1576
1671
|
toolbar?: React__default.ReactNode;
|
|
1672
|
+
sideType?: SideType;
|
|
1673
|
+
sideTypeBreakpoint?: number;
|
|
1674
|
+
detectSize?: DetectSizeType;
|
|
1577
1675
|
onChangeLayoutState?: (layoutState: PanelLayoutState) => void;
|
|
1578
1676
|
}
|
|
1579
|
-
type
|
|
1677
|
+
type WorkspaceLayoutRef = {
|
|
1580
1678
|
setLeftExpanded: (expanded: boolean) => void;
|
|
1581
1679
|
setRightExpanded: (expanded: boolean) => void;
|
|
1582
1680
|
toggleSides: () => void;
|
|
@@ -1595,44 +1693,50 @@ type SideOptions = {
|
|
|
1595
1693
|
minSize?: number | string;
|
|
1596
1694
|
maxSize?: number | string;
|
|
1597
1695
|
};
|
|
1598
|
-
declare const WorkspaceLayout: React__default.ForwardRefExoticComponent<WorkspaceLayoutProps & React__default.RefAttributes<
|
|
1696
|
+
declare const WorkspaceLayout: React__default.ForwardRefExoticComponent<WorkspaceLayoutProps & React__default.RefAttributes<WorkspaceLayoutRef>>;
|
|
1599
1697
|
|
|
1600
1698
|
type DesignSystemConfigurationContextValue = {
|
|
1601
1699
|
platform: PlatformName;
|
|
1602
1700
|
};
|
|
1603
|
-
declare const DesignSystemConfigurationProvider: React.NamedExoticComponent<{
|
|
1604
|
-
children: React.ReactNode;
|
|
1701
|
+
declare const DesignSystemConfigurationProvider: React$1.NamedExoticComponent<{
|
|
1702
|
+
children: React$1.ReactNode;
|
|
1605
1703
|
platform?: PlatformName;
|
|
1606
1704
|
}>;
|
|
1607
1705
|
declare function useDesignSystemConfiguration(): DesignSystemConfigurationContextValue;
|
|
1608
1706
|
|
|
1707
|
+
type RenderableProps = {
|
|
1708
|
+
close: () => void;
|
|
1709
|
+
};
|
|
1609
1710
|
type DialogContextValue = {
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1711
|
+
openDialog(options: BaseDialogContents & {
|
|
1712
|
+
children: ReactNode | ((props: RenderableProps) => ReactNode);
|
|
1713
|
+
}): Promise<void>;
|
|
1714
|
+
openInputDialog(options: string | (BaseDialogContents & {
|
|
1613
1715
|
placeholder?: string;
|
|
1614
1716
|
initialValue?: string;
|
|
1615
|
-
}): Promise<string | undefined>;
|
|
1616
|
-
openConfirmationDialog(options: string |
|
|
1617
|
-
title: string;
|
|
1618
|
-
description?: ReactNode;
|
|
1619
|
-
}): Promise<boolean>;
|
|
1717
|
+
})): Promise<string | undefined>;
|
|
1718
|
+
openConfirmationDialog(options: string | BaseDialogContents): Promise<boolean>;
|
|
1620
1719
|
containsElement(element: HTMLElement): boolean;
|
|
1621
1720
|
};
|
|
1721
|
+
type BaseDialogContents = {
|
|
1722
|
+
style?: React__default.CSSProperties;
|
|
1723
|
+
className?: string;
|
|
1724
|
+
title: string;
|
|
1725
|
+
description?: ReactNode;
|
|
1726
|
+
};
|
|
1622
1727
|
declare const DialogProvider: ({ children, }: {
|
|
1623
1728
|
children: ReactNode;
|
|
1624
1729
|
}) => React__default.JSX.Element;
|
|
1625
|
-
declare function
|
|
1626
|
-
|
|
1627
|
-
description?: ReactNode;
|
|
1730
|
+
declare function useDialogContext(): DialogContextValue;
|
|
1731
|
+
declare function useOpenInputDialog(): (options: string | (BaseDialogContents & {
|
|
1628
1732
|
placeholder?: string;
|
|
1629
1733
|
initialValue?: string;
|
|
1630
|
-
}) => Promise<string | undefined>;
|
|
1734
|
+
})) => Promise<string | undefined>;
|
|
1631
1735
|
declare function useDialogContainsElement(): (element: HTMLElement) => boolean;
|
|
1632
|
-
declare function useOpenConfirmationDialog(): (options: string |
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
}) => Promise<
|
|
1736
|
+
declare function useOpenConfirmationDialog(): (options: string | BaseDialogContents) => Promise<boolean>;
|
|
1737
|
+
declare function useOpenDialog(): (options: BaseDialogContents & {
|
|
1738
|
+
children: ReactNode | ((props: RenderableProps) => ReactNode);
|
|
1739
|
+
}) => Promise<void>;
|
|
1636
1740
|
|
|
1637
1741
|
type FloatingWindowContextValue = {
|
|
1638
1742
|
createWindow: (element: React__default.ReactNode) => string;
|
|
@@ -1652,7 +1756,7 @@ type GlobalInputBlurContextValue = {
|
|
|
1652
1756
|
removeListener: (f: () => void) => void;
|
|
1653
1757
|
trigger: () => void;
|
|
1654
1758
|
};
|
|
1655
|
-
declare const GlobalInputBlurProvider: React.Provider<GlobalInputBlurContextValue>;
|
|
1759
|
+
declare const GlobalInputBlurProvider: React$1.Provider<GlobalInputBlurContextValue>;
|
|
1656
1760
|
/**
|
|
1657
1761
|
* Some components store their editable state internally.
|
|
1658
1762
|
* We trigger this event before selection changes so that they can commit their
|
|
@@ -1667,8 +1771,8 @@ declare function useGlobalInputBlurTrigger(): () => void;
|
|
|
1667
1771
|
type ImageDataContextValue = {
|
|
1668
1772
|
getImageData: (ref: string) => ArrayBuffer | undefined;
|
|
1669
1773
|
};
|
|
1670
|
-
declare const ImageDataProvider: React.NamedExoticComponent<{
|
|
1671
|
-
children: React.ReactNode;
|
|
1774
|
+
declare const ImageDataProvider: React$1.NamedExoticComponent<{
|
|
1775
|
+
children: React$1.ReactNode;
|
|
1672
1776
|
getImageData?: (ref: string) => ArrayBuffer | undefined;
|
|
1673
1777
|
}>;
|
|
1674
1778
|
declare function useImageData(ref: string): ArrayBuffer | undefined;
|
|
@@ -1695,7 +1799,7 @@ interface HoverProps extends HoverEvents {
|
|
|
1695
1799
|
}
|
|
1696
1800
|
interface HoverResult {
|
|
1697
1801
|
/** Props to spread on the target element. */
|
|
1698
|
-
hoverProps: React.HTMLAttributes<HTMLElement>;
|
|
1802
|
+
hoverProps: React$1.HTMLAttributes<HTMLElement>;
|
|
1699
1803
|
isHovered: boolean;
|
|
1700
1804
|
}
|
|
1701
1805
|
/**
|
|
@@ -1738,6 +1842,12 @@ declare function usePlatform(): _noya_app_noya_keymap.PlatformName;
|
|
|
1738
1842
|
*/
|
|
1739
1843
|
declare function usePlatformModKey(): 'ctrlKey' | 'metaKey';
|
|
1740
1844
|
|
|
1845
|
+
declare const EDITOR_PANEL_GROUP_ID = "editor-panel-group";
|
|
1846
|
+
declare const LEFT_SIDEBAR_ID = "editor-left-sidebar";
|
|
1847
|
+
declare const RIGHT_SIDEBAR_ID = "editor-right-sidebar";
|
|
1848
|
+
declare const CONTENT_AREA_ID = "editor-content-area";
|
|
1849
|
+
declare function usePreservePanelSize(panelGroupRef: React__default.RefObject<ImperativePanelGroupHandle | null>, setPanelLayoutState?: (state: PanelLayoutState) => void): void;
|
|
1850
|
+
|
|
1741
1851
|
/** @default light */
|
|
1742
1852
|
type UseThemeReturnType = "dark" | "light";
|
|
1743
1853
|
/**
|
|
@@ -1843,7 +1953,7 @@ interface Props {
|
|
|
1843
1953
|
disabled?: boolean;
|
|
1844
1954
|
trigger?: "change" | "submit";
|
|
1845
1955
|
}
|
|
1846
|
-
declare const DimensionInput: React.NamedExoticComponent<Props>;
|
|
1956
|
+
declare const DimensionInput: React$1.NamedExoticComponent<Props>;
|
|
1847
1957
|
|
|
1848
1958
|
declare const Section: React__default.ForwardRefExoticComponent<React__default.HTMLAttributes<HTMLDivElement> & React__default.RefAttributes<HTMLDivElement>>;
|
|
1849
1959
|
declare const SectionHeader: React__default.ForwardRefExoticComponent<React__default.HTMLAttributes<HTMLDivElement> & React__default.RefAttributes<HTMLDivElement>>;
|
|
@@ -1909,4 +2019,4 @@ declare function ToolbarMenu<T extends string>({ items, onSelectMenuItem, }: {
|
|
|
1909
2019
|
onSelectMenuItem?: (value: T) => void;
|
|
1910
2020
|
}): React__default.JSX.Element;
|
|
1911
2021
|
|
|
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,
|
|
2022
|
+
export { ActivityIndicator, AnimatePresence, type AnimatePresenceProps, Avatar, type AvatarProps, AvatarStack, type BaseComboboxProps, BaseToolbar, type BaseToolbarProps, Body, BreadcrumbText, Button, type ButtonRootProps, CHECKBOX_INDENT_WIDTH, CHECKBOX_RIGHT_INSET, CHECKBOX_WIDTH, CONTENT_AREA_ID, Checkbox$1 as Checkbox, Chip, type ChipProps, Collection, type CollectionProps, type CollectionRef, type CollectionThumbnailProps, type CollectionViewType, Combobox, ComboboxMenu, type ComboboxProps, type ComboboxRef, ComboboxState, type ComboboxStateSnapshot, CommandPalette, ContextMenu, type DesignSystemConfigurationContextValue, DesignSystemConfigurationProvider, type DetectSizeType, Dialog, type DialogContextValue, DialogProvider, DimensionInput, type DimensionValue, Divider, DividerVertical, DraggableMenuButton, Drawer, type DrawerProps, 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, 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, type LayoutProps, List, type ListRowMarginType, type ListRowPosition, ListView, type ListViewRootProps, type MatchRange, MediaThumbnail, type MenuComponents, type MenuConfig, type MenuItem, type MenuItemIcon, type MenuItemProps, type MenuItemRole, type MenuProps, MenuViewport, Message, type MessageProps, type NonSelectableMenuItem, type OptionModeOnlyProps, type OptionModeProps, type Optional, type PanelLayoutState, PatternPreviewBackground, type PercentageSidebarOptions, 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 SideType, type SidebarRef, 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, type WorkspaceLayoutRef, colorForStringValues, colorFromString, createSectionedMenu, cssVars, cx, defaultAcceptsDrop, fuzzyFilter, fuzzyScore, fuzzyTokenize, getFieldSpacing, getGradientBackground, getGridSize, getKeyboardShortcutsForMenuItems, getMenuItemKey, getNewValue, getNextIndex, insetLabelStyles, insetLabelTextStyles, isMenuItemSectionHeader, isNonSelectableMenuItem, isSelectableMenuItem, isSelectableMenuItemWithScore, labeledFieldStyles, mediaQuery, normalizeListDestinationIndex, renderIcon, rgbaToSketchColor, separator, size, sketchColorToHex, sketchColorToRgba, sketchColorToRgbaString, styles, textStyles, updateSelection, useAutoResize, useComboboxState, useCurrentFloatingWindowInternal, useDesignSystemConfiguration, useDialogContainsElement, useDialogContext, useFloatingWindowManager, useGlobalInputBlur, useGlobalInputBlurListener, useGlobalInputBlurTrigger, useHover, useImageData, useIndent, useInputFieldContext, useLabel, useLabelPosition, useLabelWidth, useOpenConfirmationDialog, useOpenDialog, useOpenInputDialog, usePlatform, usePlatformModKey, usePreservePanelSize, useTheme, validateDropIndicator, withSeparatorElements };
|