@noya-app/noya-designsystem 0.1.90 → 0.1.91
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 +7 -7
- package/CHANGELOG.md +6 -0
- package/dist/index.d.mts +16 -2
- package/dist/index.d.ts +16 -2
- package/dist/index.js +112 -38
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +144 -70
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/OverlayToolbar.tsx +87 -1
- package/src/components/__tests__/OverlayToolbar.test.tsx +63 -0
- package/src/components/workspace/WorkspaceLayout.tsx +19 -2
- package/src/components/workspace/__tests__/WorkspaceLayout.test.tsx +41 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -8,17 +8,17 @@ $ tsup
|
|
|
8
8
|
[34mESM[39m Build start
|
|
9
9
|
[34mDTS[39m Build start
|
|
10
10
|
[32mCJS[39m [1mdist/emojis.js [22m[32m1.10 KB[39m
|
|
11
|
-
[32mCJS[39m [1mdist/index.js [22m[32m1.
|
|
11
|
+
[32mCJS[39m [1mdist/index.js [22m[32m1.42 MB[39m
|
|
12
12
|
[32mCJS[39m [1mdist/emojis.js.map [22m[32m194.00 B[39m
|
|
13
13
|
[32mCJS[39m [1mdist/index.js.map [22m[32m2.76 MB[39m
|
|
14
|
-
[32mCJS[39m ⚡️ Build success in
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 9431ms
|
|
15
15
|
[32mESM[39m [1mdist/emojis.mjs [22m[32m300.00 B[39m
|
|
16
16
|
[32mESM[39m [1mdist/chunk-L6E2LZOL.mjs [22m[32m2.02 KB[39m
|
|
17
17
|
[32mESM[39m [1mdist/index.mjs [22m[32m1.38 MB[39m
|
|
18
18
|
[32mESM[39m [1mdist/emojis.mjs.map [22m[32m157.00 B[39m
|
|
19
19
|
[32mESM[39m [1mdist/chunk-L6E2LZOL.mjs.map [22m[32m71.00 B[39m
|
|
20
20
|
[32mESM[39m [1mdist/index.mjs.map [22m[32m2.76 MB[39m
|
|
21
|
-
[32mESM[39m ⚡️ Build success in
|
|
21
|
+
[32mESM[39m ⚡️ Build success in 9431ms
|
|
22
22
|
Browserslist: caniuse-lite is outdated. Please run:
|
|
23
23
|
npx update-browserslist-db@latest
|
|
24
24
|
Why you should do it regularly: https://github.com/browserslist/update-db#readme
|
|
@@ -28,10 +28,10 @@ Browserslist: browsers data (caniuse-lite) is 16 months old. Please run:
|
|
|
28
28
|
|
|
29
29
|
Rebuilding...
|
|
30
30
|
|
|
31
|
-
Done in
|
|
31
|
+
Done in 13685ms.
|
|
32
32
|
|
|
33
|
-
[32mDTS[39m ⚡️ Build success in
|
|
33
|
+
[32mDTS[39m ⚡️ Build success in 88495ms
|
|
34
34
|
[32mDTS[39m [1mdist/emojis.d.ts [22m[32m43.00 B[39m
|
|
35
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[
|
|
35
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m130.07 KB[39m
|
|
36
36
|
[32mDTS[39m [1mdist/emojis.d.mts [22m[32m43.00 B[39m
|
|
37
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[
|
|
37
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m130.07 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -2663,14 +2663,24 @@ type VirtualizedProps = {
|
|
|
2663
2663
|
declare const Virtualized: React__default.NamedExoticComponent<VirtualizedProps & React__default.RefAttributes<IVirtualizedList>>;
|
|
2664
2664
|
|
|
2665
2665
|
type OverlayLayout = "bottomCenterTopRight" | "topLeftTopRight";
|
|
2666
|
+
type OverlayToolbarRect = {
|
|
2667
|
+
id: string;
|
|
2668
|
+
rect: {
|
|
2669
|
+
x: number;
|
|
2670
|
+
y: number;
|
|
2671
|
+
width: number;
|
|
2672
|
+
height: number;
|
|
2673
|
+
};
|
|
2674
|
+
};
|
|
2666
2675
|
interface OverlayToolbarProps {
|
|
2667
2676
|
left?: React__default.ReactNode;
|
|
2668
2677
|
right?: React__default.ReactNode;
|
|
2669
2678
|
overlayLayout?: OverlayLayout;
|
|
2670
2679
|
className?: string;
|
|
2671
2680
|
style?: React__default.CSSProperties;
|
|
2681
|
+
onRectsChange?: (rects: OverlayToolbarRect[]) => void;
|
|
2672
2682
|
}
|
|
2673
|
-
declare function OverlayToolbar({ left, right, overlayLayout, className, style, }: OverlayToolbarProps): React__default.JSX.Element;
|
|
2683
|
+
declare function OverlayToolbar({ left, right, overlayLayout, className, style, onRectsChange, }: OverlayToolbarProps): React__default.JSX.Element;
|
|
2674
2684
|
|
|
2675
2685
|
type SideType = "auto" | "panel" | "drawer";
|
|
2676
2686
|
type DetectSizeType = "container" | "window";
|
|
@@ -2705,6 +2715,10 @@ interface WorkspaceLayoutProps<LeftTab extends string, RightTab extends string>
|
|
|
2705
2715
|
* @default "bottomCenterTopRight"
|
|
2706
2716
|
*/
|
|
2707
2717
|
overlayLayout?: OverlayLayout;
|
|
2718
|
+
/** Empty space to reserve above workspace content. @default 0 */
|
|
2719
|
+
contentTopInset?: number;
|
|
2720
|
+
/** Called when the local overlay toolbar panels move or resize. */
|
|
2721
|
+
onOverlayToolbarRectsChange?: (rects: OverlayToolbarRect[]) => void;
|
|
2708
2722
|
sideType?: SideType;
|
|
2709
2723
|
sideTypeBreakpoint?: number;
|
|
2710
2724
|
detectSize?: DetectSizeType;
|
|
@@ -3228,4 +3242,4 @@ type ToolbarDrawerProps = {
|
|
|
3228
3242
|
};
|
|
3229
3243
|
declare const ToolbarDrawer: React__default.NamedExoticComponent<ToolbarDrawerProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
3230
3244
|
|
|
3231
|
-
export { AIAssistantInput, AIAssistantLayout, AIAssistantLoadingIndicator, type AcceptsDrop, type AcceptsDropOptions, type AcceptsFromList, ActionMenu, type ActivityIconSemanticColor, ActivityIndicator, ActivityLog, type ActivityLogItem, Anchor, AnimatePresence, type AnimatePresenceChildState, type AnimatePresenceProps, AppToolbar, type AppToolbarProps, Avatar, type AvatarProps, AvatarStack, Banner, type BannerProps, type BaseComboboxProps, BaseToolbar, BaseToolbarContainer, type BaseToolbarProps, Body, BreadcrumbSlash, BreadcrumbText, Button, type ButtonProps, CHECKBOX_INDENT_WIDTH, CHECKBOX_RIGHT_INSET, CHECKBOX_WIDTH, Card, type CardProps, Checkbox$1 as Checkbox, Chip, type ChipProps, Collection, type CollectionItemSize, type CollectionProps, type CollectionRef, type CollectionRenderActionProps, type CollectionThumbnailProps, type CollectionThumbnailSize, type CollectionViewType, ColorSwatch, ColorSwatchControl, type ColorSwatchSize, Combobox, ComboboxMenu, type ComboboxProps, type ComboboxRef, ComboboxState, type ComboboxStateSnapshot, CommandPalette, ConnectedUsersMenuLayout, ContextMenu, ContinuousPointerSensor, type DesignSystemConfigurationContextValue, DesignSystemConfigurationProvider, type DetectSizeType, Dialog, type DialogContextValue, DialogNavigator, type DialogNavigatorProps, type DialogProps, DialogProvider, DimensionInput, type DimensionValue, Divider, DividerVertical, type DragItem, type DragState, DraggableMenuButton, Drawer, type DrawerProps, type DropValidator, DropdownMenu, type DropdownMenuProps, EditableText, type EditableTextRef, EmojiPicker, type EmojiPickerStorage, ExtraSmall, type ExtractMenuItemType, Fade, type FadeDirection, type FadeProps, FileExplorerCollection, FileExplorerDetail, FileExplorerEmptyState, FileExplorerLayout, FileExplorerUploadButton, FileUploadIndicator, FileUploadList, FloatingWindow, FloatingWindowProvider, FullscreenDialog, type GlobalInputBlurContextValue, GlobalInputBlurProvider, Grid, GridBackground, GridView, Heading1, Heading2, Heading3, Heading4, Heading5, type HoverEvent, type HoverEvents, type HoverProps, type IDialog, INPUT_HEIGHT, type IScoredItem, type ISearchCompletionMenu, type IToken, type IVirtualizedList, Icon, IconButton, type IconName, type IconProp, ImageBlockComponent, type ImageDataContextValue, ImageDataProvider, IndentContext, InputField, type InputFieldInputProps, type InputFieldProps, type InputFieldSize, InspectorContainer, InspectorPrimitives, Italic, type ItemChildrenExtraProps, type ItemChildrenProps, KeyboardShortcut, Label, LabelContext, type LabelProps, type LabelType, LabelTypeContext, type LabelTypeContextValue, LabelWidthContext, type LabelWidthContextValue, LabeledElementView, LabeledField, type LayoutProps, type LinkComponent, LinkComponentProvider, List, ListMenu, type ListMenuProps, ListNavigator, type ListNavigatorProps, ListView, Logo, type MatchRange, MediaThumbnail, type MediaThumbnailProps, type MenuConfig, type MenuItem, type MenuItemIcon, type MenuItemProps, type MenuItemRole, type MenuProps, Message, type MessageProps, type MoveDragItemHandler, type MoveDragItemParameters, type MoveTreeItemOptions, Navigator, type NavigatorHeaderProps, type NavigatorNavigation, type NavigatorParams, type NavigatorProps, type NavigatorPushFunction, type NavigatorRenderContext, type NavigatorRenderHeader, type NavigatorReplaceFunction, type NavigatorRoute, type NavigatorRoutesConfig, type NavigatorScreenProps, type NavigatorStackEntry, type NonSelectableMenuItem, type OpenPortalControlsContextValue, type OpenPortalsContextValue, OpenPortalsProvider, type OptionModeOnlyProps, type OptionModeProps, type Optional, type OverlayLayout, OverlayToolbar, type OverlayToolbarProps, type PanelLayoutState, PipelineResultLayout, PipelineResultLink, Popover, type PopoverMenuItem, type PortalScopeContextValue, PortalScopeProvider, Progress, type RelativeDropPosition, type RenderPanel, type RenderThumbnailIconProps, ResizableContainer, RingProgress, SUPPORTED_CANVAS_UPLOAD_TYPES, SUPPORTED_IMAGE_UPLOAD_TYPES, type ScoredMenuItem, ScrollArea, type ScrollToIndexAlign, type ScrollToIndexOptions, type ScrollToIndexPadding, ScrollableSidebar, SearchCompletionMenu, Section$1 as Section, SectionHeader$1 as SectionHeader, SectionHeaderMenuItem, type SectionProps, SegmentedControl, type SegmentedControlItemProps, type SegmentedControlProps, SelectMenu, type SelectableMenuItem, SelectionToolbarContainer, type SeparatorItem, type SetNumberMode, SharedDragProvider, type SharedDragProviderProps, type SideOptions, type SideType, type SidebarOptions, type SidebarRef, type SidebarState, type SketchPattern, Slider, Small, Sortable, SortableItemContext, type SortableItemContextProps, type SortableProps, Spacer, type StackItem, StackNavigator, type StackNavigatorHeaderProps, type StackNavigatorProps, type StackNavigatorRenderHeader, StatCard, type StatCardColorScheme, type StatCardProps, type StatCardTrend, Stepper, type StringModeOnlyProps, type StringModeProps, type SubMenuItem, type SupportedCanvasUploadType, type SupportedImageUploadType, Switch, Tabs, type TabsProps, Text$1 as Text, TextArea, TextAreaRow, type TextProps, type Theme, type ThemeColor, Toast, ToastProvider, type TokenValue, Toolbar, ToolbarDrawer, ToolbarMenu, ToolbarMenuButton, ToolbarMenuContext, ToolbarMenuDropdown, ToolbarMenuItem, ToolbarMenuPopover, type ToolbarProps, ToolbarShortcut, type ToolbarSize, type ToolbarVariant, Tooltip, TreeView, type UseThemeReturnType, UserAvatar, UserPicker, type UserPickerProps, type UserPickerUser, UserPointer, type UserPointerProps, type ValidateDropIndicatorParams, Virtualized, type VirtualizedProps, type VirtualizedRenderItem, WorkspaceLayout, type WorkspaceLayoutGroup, type WorkspaceLayoutProps, type WorkspaceLayoutRef, type WorkspaceLayoutState, type WorkspaceSideContextValue, WorkspaceSideProvider, acceptsDrop, colorForStringValues, colorFromString, colorSwatchSizeMap, createDialogNavigator, createDragItemKey, createNavigator, createSectionedMenu, createSharedDrag, cssVarNames, cssVars, cx, decodeImageSrc, defaultAcceptsDrop, dragItemKeySeparator, editableBlockStyles, filterWithGroupedSections, formatByteSize, fuzzyFilter, fuzzyScore, fuzzyTokenize, getClosestPortalScope, getFieldSpacing, getGridSize, getItemFirstCollisionDetection, getKeyboardShortcutsForMenuItems, getMenuItemKey, getNewValue, getNextIndex, getPipelineResultLink, getThumbnailColors, getUserDisplayName, isMenuItemSectionHeader, isNonSelectableMenuItem, isPopoverMenuItem, isSelectableMenuItem, isSelectableMenuItemWithScore, isSubMenuItem, labeledFieldStyles, mergeConflictingClassNames, moveTreeItem, normalizeListTargetIndex, parseDragItemKey, popoverStyle, portalScopeDataSetName, portalScopePropName, portalScopeProps, proseTheme, renderIcon, separator, snapIndicatorEdgesToDevicePixels, styles, textStyles, toolbarTransparentStyle, updateSelection, useAutoResize, useBindKeyboardShortcutsForMenuItems, useComboboxState, useCurrentFloatingWindowInternal, useDesignSystemConfiguration, useDialogContainsElement, useDialogContext, useFloatingWindowManager, useGlobalInputBlur, useGlobalInputBlurListener, useGlobalInputBlurTrigger, useHasOpenPortals, useHover, useImageData, useIndent, useInputFieldContext, useLabel, useLabelType, useLabelWidth, useLinkComponent, useNavigator, useNavigatorRoute, useOpenConfirmationDialog, useOpenDialog, useOpenInputDialog, useOpenPortalsControls, usePlatform, usePlatformModKey, usePortalScopeId, useTheme, useToast, useWorkspaceSide, validateDropIndicator, whiteboardProseTheme, withDragProvider, withSeparatorElements };
|
|
3245
|
+
export { AIAssistantInput, AIAssistantLayout, AIAssistantLoadingIndicator, type AcceptsDrop, type AcceptsDropOptions, type AcceptsFromList, ActionMenu, type ActivityIconSemanticColor, ActivityIndicator, ActivityLog, type ActivityLogItem, Anchor, AnimatePresence, type AnimatePresenceChildState, type AnimatePresenceProps, AppToolbar, type AppToolbarProps, Avatar, type AvatarProps, AvatarStack, Banner, type BannerProps, type BaseComboboxProps, BaseToolbar, BaseToolbarContainer, type BaseToolbarProps, Body, BreadcrumbSlash, BreadcrumbText, Button, type ButtonProps, CHECKBOX_INDENT_WIDTH, CHECKBOX_RIGHT_INSET, CHECKBOX_WIDTH, Card, type CardProps, Checkbox$1 as Checkbox, Chip, type ChipProps, Collection, type CollectionItemSize, type CollectionProps, type CollectionRef, type CollectionRenderActionProps, type CollectionThumbnailProps, type CollectionThumbnailSize, type CollectionViewType, ColorSwatch, ColorSwatchControl, type ColorSwatchSize, Combobox, ComboboxMenu, type ComboboxProps, type ComboboxRef, ComboboxState, type ComboboxStateSnapshot, CommandPalette, ConnectedUsersMenuLayout, ContextMenu, ContinuousPointerSensor, type DesignSystemConfigurationContextValue, DesignSystemConfigurationProvider, type DetectSizeType, Dialog, type DialogContextValue, DialogNavigator, type DialogNavigatorProps, type DialogProps, DialogProvider, DimensionInput, type DimensionValue, Divider, DividerVertical, type DragItem, type DragState, DraggableMenuButton, Drawer, type DrawerProps, type DropValidator, DropdownMenu, type DropdownMenuProps, EditableText, type EditableTextRef, EmojiPicker, type EmojiPickerStorage, ExtraSmall, type ExtractMenuItemType, Fade, type FadeDirection, type FadeProps, FileExplorerCollection, FileExplorerDetail, FileExplorerEmptyState, FileExplorerLayout, FileExplorerUploadButton, FileUploadIndicator, FileUploadList, FloatingWindow, FloatingWindowProvider, FullscreenDialog, type GlobalInputBlurContextValue, GlobalInputBlurProvider, Grid, GridBackground, GridView, Heading1, Heading2, Heading3, Heading4, Heading5, type HoverEvent, type HoverEvents, type HoverProps, type IDialog, INPUT_HEIGHT, type IScoredItem, type ISearchCompletionMenu, type IToken, type IVirtualizedList, Icon, IconButton, type IconName, type IconProp, ImageBlockComponent, type ImageDataContextValue, ImageDataProvider, IndentContext, InputField, type InputFieldInputProps, type InputFieldProps, type InputFieldSize, InspectorContainer, InspectorPrimitives, Italic, type ItemChildrenExtraProps, type ItemChildrenProps, KeyboardShortcut, Label, LabelContext, type LabelProps, type LabelType, LabelTypeContext, type LabelTypeContextValue, LabelWidthContext, type LabelWidthContextValue, LabeledElementView, LabeledField, type LayoutProps, type LinkComponent, LinkComponentProvider, List, ListMenu, type ListMenuProps, ListNavigator, type ListNavigatorProps, ListView, Logo, type MatchRange, MediaThumbnail, type MediaThumbnailProps, type MenuConfig, type MenuItem, type MenuItemIcon, type MenuItemProps, type MenuItemRole, type MenuProps, Message, type MessageProps, type MoveDragItemHandler, type MoveDragItemParameters, type MoveTreeItemOptions, Navigator, type NavigatorHeaderProps, type NavigatorNavigation, type NavigatorParams, type NavigatorProps, type NavigatorPushFunction, type NavigatorRenderContext, type NavigatorRenderHeader, type NavigatorReplaceFunction, type NavigatorRoute, type NavigatorRoutesConfig, type NavigatorScreenProps, type NavigatorStackEntry, type NonSelectableMenuItem, type OpenPortalControlsContextValue, type OpenPortalsContextValue, OpenPortalsProvider, type OptionModeOnlyProps, type OptionModeProps, type Optional, type OverlayLayout, OverlayToolbar, type OverlayToolbarProps, type OverlayToolbarRect, type PanelLayoutState, PipelineResultLayout, PipelineResultLink, Popover, type PopoverMenuItem, type PortalScopeContextValue, PortalScopeProvider, Progress, type RelativeDropPosition, type RenderPanel, type RenderThumbnailIconProps, ResizableContainer, RingProgress, SUPPORTED_CANVAS_UPLOAD_TYPES, SUPPORTED_IMAGE_UPLOAD_TYPES, type ScoredMenuItem, ScrollArea, type ScrollToIndexAlign, type ScrollToIndexOptions, type ScrollToIndexPadding, ScrollableSidebar, SearchCompletionMenu, Section$1 as Section, SectionHeader$1 as SectionHeader, SectionHeaderMenuItem, type SectionProps, SegmentedControl, type SegmentedControlItemProps, type SegmentedControlProps, SelectMenu, type SelectableMenuItem, SelectionToolbarContainer, type SeparatorItem, type SetNumberMode, SharedDragProvider, type SharedDragProviderProps, type SideOptions, type SideType, type SidebarOptions, type SidebarRef, type SidebarState, type SketchPattern, Slider, Small, Sortable, SortableItemContext, type SortableItemContextProps, type SortableProps, Spacer, type StackItem, StackNavigator, type StackNavigatorHeaderProps, type StackNavigatorProps, type StackNavigatorRenderHeader, StatCard, type StatCardColorScheme, type StatCardProps, type StatCardTrend, Stepper, type StringModeOnlyProps, type StringModeProps, type SubMenuItem, type SupportedCanvasUploadType, type SupportedImageUploadType, Switch, Tabs, type TabsProps, Text$1 as Text, TextArea, TextAreaRow, type TextProps, type Theme, type ThemeColor, Toast, ToastProvider, type TokenValue, Toolbar, ToolbarDrawer, ToolbarMenu, ToolbarMenuButton, ToolbarMenuContext, ToolbarMenuDropdown, ToolbarMenuItem, ToolbarMenuPopover, type ToolbarProps, ToolbarShortcut, type ToolbarSize, type ToolbarVariant, Tooltip, TreeView, type UseThemeReturnType, UserAvatar, UserPicker, type UserPickerProps, type UserPickerUser, UserPointer, type UserPointerProps, type ValidateDropIndicatorParams, Virtualized, type VirtualizedProps, type VirtualizedRenderItem, WorkspaceLayout, type WorkspaceLayoutGroup, type WorkspaceLayoutProps, type WorkspaceLayoutRef, type WorkspaceLayoutState, type WorkspaceSideContextValue, WorkspaceSideProvider, acceptsDrop, colorForStringValues, colorFromString, colorSwatchSizeMap, createDialogNavigator, createDragItemKey, createNavigator, createSectionedMenu, createSharedDrag, cssVarNames, cssVars, cx, decodeImageSrc, defaultAcceptsDrop, dragItemKeySeparator, editableBlockStyles, filterWithGroupedSections, formatByteSize, fuzzyFilter, fuzzyScore, fuzzyTokenize, getClosestPortalScope, getFieldSpacing, getGridSize, getItemFirstCollisionDetection, getKeyboardShortcutsForMenuItems, getMenuItemKey, getNewValue, getNextIndex, getPipelineResultLink, getThumbnailColors, getUserDisplayName, isMenuItemSectionHeader, isNonSelectableMenuItem, isPopoverMenuItem, isSelectableMenuItem, isSelectableMenuItemWithScore, isSubMenuItem, labeledFieldStyles, mergeConflictingClassNames, moveTreeItem, normalizeListTargetIndex, parseDragItemKey, popoverStyle, portalScopeDataSetName, portalScopePropName, portalScopeProps, proseTheme, renderIcon, separator, snapIndicatorEdgesToDevicePixels, styles, textStyles, toolbarTransparentStyle, updateSelection, useAutoResize, useBindKeyboardShortcutsForMenuItems, useComboboxState, useCurrentFloatingWindowInternal, useDesignSystemConfiguration, useDialogContainsElement, useDialogContext, useFloatingWindowManager, useGlobalInputBlur, useGlobalInputBlurListener, useGlobalInputBlurTrigger, useHasOpenPortals, useHover, useImageData, useIndent, useInputFieldContext, useLabel, useLabelType, useLabelWidth, useLinkComponent, useNavigator, useNavigatorRoute, useOpenConfirmationDialog, useOpenDialog, useOpenInputDialog, useOpenPortalsControls, usePlatform, usePlatformModKey, usePortalScopeId, useTheme, useToast, useWorkspaceSide, validateDropIndicator, whiteboardProseTheme, withDragProvider, withSeparatorElements };
|
package/dist/index.d.ts
CHANGED
|
@@ -2663,14 +2663,24 @@ type VirtualizedProps = {
|
|
|
2663
2663
|
declare const Virtualized: React__default.NamedExoticComponent<VirtualizedProps & React__default.RefAttributes<IVirtualizedList>>;
|
|
2664
2664
|
|
|
2665
2665
|
type OverlayLayout = "bottomCenterTopRight" | "topLeftTopRight";
|
|
2666
|
+
type OverlayToolbarRect = {
|
|
2667
|
+
id: string;
|
|
2668
|
+
rect: {
|
|
2669
|
+
x: number;
|
|
2670
|
+
y: number;
|
|
2671
|
+
width: number;
|
|
2672
|
+
height: number;
|
|
2673
|
+
};
|
|
2674
|
+
};
|
|
2666
2675
|
interface OverlayToolbarProps {
|
|
2667
2676
|
left?: React__default.ReactNode;
|
|
2668
2677
|
right?: React__default.ReactNode;
|
|
2669
2678
|
overlayLayout?: OverlayLayout;
|
|
2670
2679
|
className?: string;
|
|
2671
2680
|
style?: React__default.CSSProperties;
|
|
2681
|
+
onRectsChange?: (rects: OverlayToolbarRect[]) => void;
|
|
2672
2682
|
}
|
|
2673
|
-
declare function OverlayToolbar({ left, right, overlayLayout, className, style, }: OverlayToolbarProps): React__default.JSX.Element;
|
|
2683
|
+
declare function OverlayToolbar({ left, right, overlayLayout, className, style, onRectsChange, }: OverlayToolbarProps): React__default.JSX.Element;
|
|
2674
2684
|
|
|
2675
2685
|
type SideType = "auto" | "panel" | "drawer";
|
|
2676
2686
|
type DetectSizeType = "container" | "window";
|
|
@@ -2705,6 +2715,10 @@ interface WorkspaceLayoutProps<LeftTab extends string, RightTab extends string>
|
|
|
2705
2715
|
* @default "bottomCenterTopRight"
|
|
2706
2716
|
*/
|
|
2707
2717
|
overlayLayout?: OverlayLayout;
|
|
2718
|
+
/** Empty space to reserve above workspace content. @default 0 */
|
|
2719
|
+
contentTopInset?: number;
|
|
2720
|
+
/** Called when the local overlay toolbar panels move or resize. */
|
|
2721
|
+
onOverlayToolbarRectsChange?: (rects: OverlayToolbarRect[]) => void;
|
|
2708
2722
|
sideType?: SideType;
|
|
2709
2723
|
sideTypeBreakpoint?: number;
|
|
2710
2724
|
detectSize?: DetectSizeType;
|
|
@@ -3228,4 +3242,4 @@ type ToolbarDrawerProps = {
|
|
|
3228
3242
|
};
|
|
3229
3243
|
declare const ToolbarDrawer: React__default.NamedExoticComponent<ToolbarDrawerProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
3230
3244
|
|
|
3231
|
-
export { AIAssistantInput, AIAssistantLayout, AIAssistantLoadingIndicator, type AcceptsDrop, type AcceptsDropOptions, type AcceptsFromList, ActionMenu, type ActivityIconSemanticColor, ActivityIndicator, ActivityLog, type ActivityLogItem, Anchor, AnimatePresence, type AnimatePresenceChildState, type AnimatePresenceProps, AppToolbar, type AppToolbarProps, Avatar, type AvatarProps, AvatarStack, Banner, type BannerProps, type BaseComboboxProps, BaseToolbar, BaseToolbarContainer, type BaseToolbarProps, Body, BreadcrumbSlash, BreadcrumbText, Button, type ButtonProps, CHECKBOX_INDENT_WIDTH, CHECKBOX_RIGHT_INSET, CHECKBOX_WIDTH, Card, type CardProps, Checkbox$1 as Checkbox, Chip, type ChipProps, Collection, type CollectionItemSize, type CollectionProps, type CollectionRef, type CollectionRenderActionProps, type CollectionThumbnailProps, type CollectionThumbnailSize, type CollectionViewType, ColorSwatch, ColorSwatchControl, type ColorSwatchSize, Combobox, ComboboxMenu, type ComboboxProps, type ComboboxRef, ComboboxState, type ComboboxStateSnapshot, CommandPalette, ConnectedUsersMenuLayout, ContextMenu, ContinuousPointerSensor, type DesignSystemConfigurationContextValue, DesignSystemConfigurationProvider, type DetectSizeType, Dialog, type DialogContextValue, DialogNavigator, type DialogNavigatorProps, type DialogProps, DialogProvider, DimensionInput, type DimensionValue, Divider, DividerVertical, type DragItem, type DragState, DraggableMenuButton, Drawer, type DrawerProps, type DropValidator, DropdownMenu, type DropdownMenuProps, EditableText, type EditableTextRef, EmojiPicker, type EmojiPickerStorage, ExtraSmall, type ExtractMenuItemType, Fade, type FadeDirection, type FadeProps, FileExplorerCollection, FileExplorerDetail, FileExplorerEmptyState, FileExplorerLayout, FileExplorerUploadButton, FileUploadIndicator, FileUploadList, FloatingWindow, FloatingWindowProvider, FullscreenDialog, type GlobalInputBlurContextValue, GlobalInputBlurProvider, Grid, GridBackground, GridView, Heading1, Heading2, Heading3, Heading4, Heading5, type HoverEvent, type HoverEvents, type HoverProps, type IDialog, INPUT_HEIGHT, type IScoredItem, type ISearchCompletionMenu, type IToken, type IVirtualizedList, Icon, IconButton, type IconName, type IconProp, ImageBlockComponent, type ImageDataContextValue, ImageDataProvider, IndentContext, InputField, type InputFieldInputProps, type InputFieldProps, type InputFieldSize, InspectorContainer, InspectorPrimitives, Italic, type ItemChildrenExtraProps, type ItemChildrenProps, KeyboardShortcut, Label, LabelContext, type LabelProps, type LabelType, LabelTypeContext, type LabelTypeContextValue, LabelWidthContext, type LabelWidthContextValue, LabeledElementView, LabeledField, type LayoutProps, type LinkComponent, LinkComponentProvider, List, ListMenu, type ListMenuProps, ListNavigator, type ListNavigatorProps, ListView, Logo, type MatchRange, MediaThumbnail, type MediaThumbnailProps, type MenuConfig, type MenuItem, type MenuItemIcon, type MenuItemProps, type MenuItemRole, type MenuProps, Message, type MessageProps, type MoveDragItemHandler, type MoveDragItemParameters, type MoveTreeItemOptions, Navigator, type NavigatorHeaderProps, type NavigatorNavigation, type NavigatorParams, type NavigatorProps, type NavigatorPushFunction, type NavigatorRenderContext, type NavigatorRenderHeader, type NavigatorReplaceFunction, type NavigatorRoute, type NavigatorRoutesConfig, type NavigatorScreenProps, type NavigatorStackEntry, type NonSelectableMenuItem, type OpenPortalControlsContextValue, type OpenPortalsContextValue, OpenPortalsProvider, type OptionModeOnlyProps, type OptionModeProps, type Optional, type OverlayLayout, OverlayToolbar, type OverlayToolbarProps, type PanelLayoutState, PipelineResultLayout, PipelineResultLink, Popover, type PopoverMenuItem, type PortalScopeContextValue, PortalScopeProvider, Progress, type RelativeDropPosition, type RenderPanel, type RenderThumbnailIconProps, ResizableContainer, RingProgress, SUPPORTED_CANVAS_UPLOAD_TYPES, SUPPORTED_IMAGE_UPLOAD_TYPES, type ScoredMenuItem, ScrollArea, type ScrollToIndexAlign, type ScrollToIndexOptions, type ScrollToIndexPadding, ScrollableSidebar, SearchCompletionMenu, Section$1 as Section, SectionHeader$1 as SectionHeader, SectionHeaderMenuItem, type SectionProps, SegmentedControl, type SegmentedControlItemProps, type SegmentedControlProps, SelectMenu, type SelectableMenuItem, SelectionToolbarContainer, type SeparatorItem, type SetNumberMode, SharedDragProvider, type SharedDragProviderProps, type SideOptions, type SideType, type SidebarOptions, type SidebarRef, type SidebarState, type SketchPattern, Slider, Small, Sortable, SortableItemContext, type SortableItemContextProps, type SortableProps, Spacer, type StackItem, StackNavigator, type StackNavigatorHeaderProps, type StackNavigatorProps, type StackNavigatorRenderHeader, StatCard, type StatCardColorScheme, type StatCardProps, type StatCardTrend, Stepper, type StringModeOnlyProps, type StringModeProps, type SubMenuItem, type SupportedCanvasUploadType, type SupportedImageUploadType, Switch, Tabs, type TabsProps, Text$1 as Text, TextArea, TextAreaRow, type TextProps, type Theme, type ThemeColor, Toast, ToastProvider, type TokenValue, Toolbar, ToolbarDrawer, ToolbarMenu, ToolbarMenuButton, ToolbarMenuContext, ToolbarMenuDropdown, ToolbarMenuItem, ToolbarMenuPopover, type ToolbarProps, ToolbarShortcut, type ToolbarSize, type ToolbarVariant, Tooltip, TreeView, type UseThemeReturnType, UserAvatar, UserPicker, type UserPickerProps, type UserPickerUser, UserPointer, type UserPointerProps, type ValidateDropIndicatorParams, Virtualized, type VirtualizedProps, type VirtualizedRenderItem, WorkspaceLayout, type WorkspaceLayoutGroup, type WorkspaceLayoutProps, type WorkspaceLayoutRef, type WorkspaceLayoutState, type WorkspaceSideContextValue, WorkspaceSideProvider, acceptsDrop, colorForStringValues, colorFromString, colorSwatchSizeMap, createDialogNavigator, createDragItemKey, createNavigator, createSectionedMenu, createSharedDrag, cssVarNames, cssVars, cx, decodeImageSrc, defaultAcceptsDrop, dragItemKeySeparator, editableBlockStyles, filterWithGroupedSections, formatByteSize, fuzzyFilter, fuzzyScore, fuzzyTokenize, getClosestPortalScope, getFieldSpacing, getGridSize, getItemFirstCollisionDetection, getKeyboardShortcutsForMenuItems, getMenuItemKey, getNewValue, getNextIndex, getPipelineResultLink, getThumbnailColors, getUserDisplayName, isMenuItemSectionHeader, isNonSelectableMenuItem, isPopoverMenuItem, isSelectableMenuItem, isSelectableMenuItemWithScore, isSubMenuItem, labeledFieldStyles, mergeConflictingClassNames, moveTreeItem, normalizeListTargetIndex, parseDragItemKey, popoverStyle, portalScopeDataSetName, portalScopePropName, portalScopeProps, proseTheme, renderIcon, separator, snapIndicatorEdgesToDevicePixels, styles, textStyles, toolbarTransparentStyle, updateSelection, useAutoResize, useBindKeyboardShortcutsForMenuItems, useComboboxState, useCurrentFloatingWindowInternal, useDesignSystemConfiguration, useDialogContainsElement, useDialogContext, useFloatingWindowManager, useGlobalInputBlur, useGlobalInputBlurListener, useGlobalInputBlurTrigger, useHasOpenPortals, useHover, useImageData, useIndent, useInputFieldContext, useLabel, useLabelType, useLabelWidth, useLinkComponent, useNavigator, useNavigatorRoute, useOpenConfirmationDialog, useOpenDialog, useOpenInputDialog, useOpenPortalsControls, usePlatform, usePlatformModKey, usePortalScopeId, useTheme, useToast, useWorkspaceSide, validateDropIndicator, whiteboardProseTheme, withDragProvider, withSeparatorElements };
|
|
3245
|
+
export { AIAssistantInput, AIAssistantLayout, AIAssistantLoadingIndicator, type AcceptsDrop, type AcceptsDropOptions, type AcceptsFromList, ActionMenu, type ActivityIconSemanticColor, ActivityIndicator, ActivityLog, type ActivityLogItem, Anchor, AnimatePresence, type AnimatePresenceChildState, type AnimatePresenceProps, AppToolbar, type AppToolbarProps, Avatar, type AvatarProps, AvatarStack, Banner, type BannerProps, type BaseComboboxProps, BaseToolbar, BaseToolbarContainer, type BaseToolbarProps, Body, BreadcrumbSlash, BreadcrumbText, Button, type ButtonProps, CHECKBOX_INDENT_WIDTH, CHECKBOX_RIGHT_INSET, CHECKBOX_WIDTH, Card, type CardProps, Checkbox$1 as Checkbox, Chip, type ChipProps, Collection, type CollectionItemSize, type CollectionProps, type CollectionRef, type CollectionRenderActionProps, type CollectionThumbnailProps, type CollectionThumbnailSize, type CollectionViewType, ColorSwatch, ColorSwatchControl, type ColorSwatchSize, Combobox, ComboboxMenu, type ComboboxProps, type ComboboxRef, ComboboxState, type ComboboxStateSnapshot, CommandPalette, ConnectedUsersMenuLayout, ContextMenu, ContinuousPointerSensor, type DesignSystemConfigurationContextValue, DesignSystemConfigurationProvider, type DetectSizeType, Dialog, type DialogContextValue, DialogNavigator, type DialogNavigatorProps, type DialogProps, DialogProvider, DimensionInput, type DimensionValue, Divider, DividerVertical, type DragItem, type DragState, DraggableMenuButton, Drawer, type DrawerProps, type DropValidator, DropdownMenu, type DropdownMenuProps, EditableText, type EditableTextRef, EmojiPicker, type EmojiPickerStorage, ExtraSmall, type ExtractMenuItemType, Fade, type FadeDirection, type FadeProps, FileExplorerCollection, FileExplorerDetail, FileExplorerEmptyState, FileExplorerLayout, FileExplorerUploadButton, FileUploadIndicator, FileUploadList, FloatingWindow, FloatingWindowProvider, FullscreenDialog, type GlobalInputBlurContextValue, GlobalInputBlurProvider, Grid, GridBackground, GridView, Heading1, Heading2, Heading3, Heading4, Heading5, type HoverEvent, type HoverEvents, type HoverProps, type IDialog, INPUT_HEIGHT, type IScoredItem, type ISearchCompletionMenu, type IToken, type IVirtualizedList, Icon, IconButton, type IconName, type IconProp, ImageBlockComponent, type ImageDataContextValue, ImageDataProvider, IndentContext, InputField, type InputFieldInputProps, type InputFieldProps, type InputFieldSize, InspectorContainer, InspectorPrimitives, Italic, type ItemChildrenExtraProps, type ItemChildrenProps, KeyboardShortcut, Label, LabelContext, type LabelProps, type LabelType, LabelTypeContext, type LabelTypeContextValue, LabelWidthContext, type LabelWidthContextValue, LabeledElementView, LabeledField, type LayoutProps, type LinkComponent, LinkComponentProvider, List, ListMenu, type ListMenuProps, ListNavigator, type ListNavigatorProps, ListView, Logo, type MatchRange, MediaThumbnail, type MediaThumbnailProps, type MenuConfig, type MenuItem, type MenuItemIcon, type MenuItemProps, type MenuItemRole, type MenuProps, Message, type MessageProps, type MoveDragItemHandler, type MoveDragItemParameters, type MoveTreeItemOptions, Navigator, type NavigatorHeaderProps, type NavigatorNavigation, type NavigatorParams, type NavigatorProps, type NavigatorPushFunction, type NavigatorRenderContext, type NavigatorRenderHeader, type NavigatorReplaceFunction, type NavigatorRoute, type NavigatorRoutesConfig, type NavigatorScreenProps, type NavigatorStackEntry, type NonSelectableMenuItem, type OpenPortalControlsContextValue, type OpenPortalsContextValue, OpenPortalsProvider, type OptionModeOnlyProps, type OptionModeProps, type Optional, type OverlayLayout, OverlayToolbar, type OverlayToolbarProps, type OverlayToolbarRect, type PanelLayoutState, PipelineResultLayout, PipelineResultLink, Popover, type PopoverMenuItem, type PortalScopeContextValue, PortalScopeProvider, Progress, type RelativeDropPosition, type RenderPanel, type RenderThumbnailIconProps, ResizableContainer, RingProgress, SUPPORTED_CANVAS_UPLOAD_TYPES, SUPPORTED_IMAGE_UPLOAD_TYPES, type ScoredMenuItem, ScrollArea, type ScrollToIndexAlign, type ScrollToIndexOptions, type ScrollToIndexPadding, ScrollableSidebar, SearchCompletionMenu, Section$1 as Section, SectionHeader$1 as SectionHeader, SectionHeaderMenuItem, type SectionProps, SegmentedControl, type SegmentedControlItemProps, type SegmentedControlProps, SelectMenu, type SelectableMenuItem, SelectionToolbarContainer, type SeparatorItem, type SetNumberMode, SharedDragProvider, type SharedDragProviderProps, type SideOptions, type SideType, type SidebarOptions, type SidebarRef, type SidebarState, type SketchPattern, Slider, Small, Sortable, SortableItemContext, type SortableItemContextProps, type SortableProps, Spacer, type StackItem, StackNavigator, type StackNavigatorHeaderProps, type StackNavigatorProps, type StackNavigatorRenderHeader, StatCard, type StatCardColorScheme, type StatCardProps, type StatCardTrend, Stepper, type StringModeOnlyProps, type StringModeProps, type SubMenuItem, type SupportedCanvasUploadType, type SupportedImageUploadType, Switch, Tabs, type TabsProps, Text$1 as Text, TextArea, TextAreaRow, type TextProps, type Theme, type ThemeColor, Toast, ToastProvider, type TokenValue, Toolbar, ToolbarDrawer, ToolbarMenu, ToolbarMenuButton, ToolbarMenuContext, ToolbarMenuDropdown, ToolbarMenuItem, ToolbarMenuPopover, type ToolbarProps, ToolbarShortcut, type ToolbarSize, type ToolbarVariant, Tooltip, TreeView, type UseThemeReturnType, UserAvatar, UserPicker, type UserPickerProps, type UserPickerUser, UserPointer, type UserPointerProps, type ValidateDropIndicatorParams, Virtualized, type VirtualizedProps, type VirtualizedRenderItem, WorkspaceLayout, type WorkspaceLayoutGroup, type WorkspaceLayoutProps, type WorkspaceLayoutRef, type WorkspaceLayoutState, type WorkspaceSideContextValue, WorkspaceSideProvider, acceptsDrop, colorForStringValues, colorFromString, colorSwatchSizeMap, createDialogNavigator, createDragItemKey, createNavigator, createSectionedMenu, createSharedDrag, cssVarNames, cssVars, cx, decodeImageSrc, defaultAcceptsDrop, dragItemKeySeparator, editableBlockStyles, filterWithGroupedSections, formatByteSize, fuzzyFilter, fuzzyScore, fuzzyTokenize, getClosestPortalScope, getFieldSpacing, getGridSize, getItemFirstCollisionDetection, getKeyboardShortcutsForMenuItems, getMenuItemKey, getNewValue, getNextIndex, getPipelineResultLink, getThumbnailColors, getUserDisplayName, isMenuItemSectionHeader, isNonSelectableMenuItem, isPopoverMenuItem, isSelectableMenuItem, isSelectableMenuItemWithScore, isSubMenuItem, labeledFieldStyles, mergeConflictingClassNames, moveTreeItem, normalizeListTargetIndex, parseDragItemKey, popoverStyle, portalScopeDataSetName, portalScopePropName, portalScopeProps, proseTheme, renderIcon, separator, snapIndicatorEdgesToDevicePixels, styles, textStyles, toolbarTransparentStyle, updateSelection, useAutoResize, useBindKeyboardShortcutsForMenuItems, useComboboxState, useCurrentFloatingWindowInternal, useDesignSystemConfiguration, useDialogContainsElement, useDialogContext, useFloatingWindowManager, useGlobalInputBlur, useGlobalInputBlurListener, useGlobalInputBlurTrigger, useHasOpenPortals, useHover, useImageData, useIndent, useInputFieldContext, useLabel, useLabelType, useLabelWidth, useLinkComponent, useNavigator, useNavigatorRoute, useOpenConfirmationDialog, useOpenDialog, useOpenInputDialog, useOpenPortalsControls, usePlatform, usePlatformModKey, usePortalScopeId, useTheme, useToast, useWorkspaceSide, validateDropIndicator, whiteboardProseTheme, withDragProvider, withSeparatorElements };
|
package/dist/index.js
CHANGED
|
@@ -41,11 +41,11 @@ var require_use_sync_external_store_shim_production = __commonJS({
|
|
|
41
41
|
var objectIs = "function" === typeof Object.is ? Object.is : is;
|
|
42
42
|
var useState80 = React325.useState;
|
|
43
43
|
var useEffect61 = React325.useEffect;
|
|
44
|
-
var
|
|
44
|
+
var useLayoutEffect13 = React325.useLayoutEffect;
|
|
45
45
|
var useDebugValue2 = React325.useDebugValue;
|
|
46
46
|
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
|
47
47
|
var value = getSnapshot(), _useState = useState80({ inst: { value, getSnapshot } }), inst = _useState[0].inst, forceUpdate = _useState[1];
|
|
48
|
-
|
|
48
|
+
useLayoutEffect13(
|
|
49
49
|
function() {
|
|
50
50
|
inst.value = value;
|
|
51
51
|
inst.getSnapshot = getSnapshot;
|
|
@@ -106,7 +106,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
|
|
|
106
106
|
inst: { value, getSnapshot }
|
|
107
107
|
});
|
|
108
108
|
var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
|
|
109
|
-
|
|
109
|
+
useLayoutEffect13(
|
|
110
110
|
function() {
|
|
111
111
|
inst.value = value;
|
|
112
112
|
inst.getSnapshot = getSnapshot;
|
|
@@ -140,7 +140,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
|
|
|
140
140
|
return getSnapshot();
|
|
141
141
|
}
|
|
142
142
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
143
|
-
var React325 = require("react"), objectIs = "function" === typeof Object.is ? Object.is : is, useState80 = React325.useState, useEffect61 = React325.useEffect,
|
|
143
|
+
var React325 = require("react"), objectIs = "function" === typeof Object.is ? Object.is : is, useState80 = React325.useState, useEffect61 = React325.useEffect, useLayoutEffect13 = React325.useLayoutEffect, useDebugValue2 = React325.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
144
144
|
exports2.useSyncExternalStore = void 0 !== React325.useSyncExternalStore ? React325.useSyncExternalStore : shim;
|
|
145
145
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
146
146
|
}();
|
|
@@ -170,12 +170,12 @@ var require_with_selector_production = __commonJS({
|
|
|
170
170
|
}
|
|
171
171
|
var objectIs = "function" === typeof Object.is ? Object.is : is;
|
|
172
172
|
var useSyncExternalStore3 = shim.useSyncExternalStore;
|
|
173
|
-
var
|
|
173
|
+
var useRef95 = React325.useRef;
|
|
174
174
|
var useEffect61 = React325.useEffect;
|
|
175
175
|
var useMemo156 = React325.useMemo;
|
|
176
176
|
var useDebugValue2 = React325.useDebugValue;
|
|
177
177
|
exports2.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
178
|
-
var instRef =
|
|
178
|
+
var instRef = useRef95(null);
|
|
179
179
|
if (null === instRef.current) {
|
|
180
180
|
var inst = { hasValue: false, value: null };
|
|
181
181
|
instRef.current = inst;
|
|
@@ -237,9 +237,9 @@ var require_with_selector_development = __commonJS({
|
|
|
237
237
|
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
238
238
|
}
|
|
239
239
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
240
|
-
var React325 = require("react"), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore3 = shim.useSyncExternalStore,
|
|
240
|
+
var React325 = require("react"), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore3 = shim.useSyncExternalStore, useRef95 = React325.useRef, useEffect61 = React325.useEffect, useMemo156 = React325.useMemo, useDebugValue2 = React325.useDebugValue;
|
|
241
241
|
exports2.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
242
|
-
var instRef =
|
|
242
|
+
var instRef = useRef95(null);
|
|
243
243
|
if (null === instRef.current) {
|
|
244
244
|
var inst = { hasValue: false, value: null };
|
|
245
245
|
instRef.current = inst;
|
|
@@ -41668,9 +41668,14 @@ function OverlayToolbar({
|
|
|
41668
41668
|
right,
|
|
41669
41669
|
overlayLayout = "bottomCenterTopRight",
|
|
41670
41670
|
className,
|
|
41671
|
-
style: style2
|
|
41671
|
+
style: style2,
|
|
41672
|
+
onRectsChange
|
|
41672
41673
|
}) {
|
|
41673
41674
|
const resolvedLayout = overlayLayout === "topLeftTopRight" ? "topLeftTopRight" : "bottomCenterTopRight";
|
|
41675
|
+
const leftPanelRef = (0, import_react114.useRef)(null);
|
|
41676
|
+
const rightPanelRef = (0, import_react114.useRef)(null);
|
|
41677
|
+
const hasLeft = Boolean(left);
|
|
41678
|
+
const hasRight = Boolean(right);
|
|
41674
41679
|
const panelStyle = (0, import_react114.useMemo)(
|
|
41675
41680
|
() => ({
|
|
41676
41681
|
...toolbarTransparentStyle,
|
|
@@ -41678,11 +41683,68 @@ function OverlayToolbar({
|
|
|
41678
41683
|
}),
|
|
41679
41684
|
[style2]
|
|
41680
41685
|
);
|
|
41686
|
+
const emitRects = (0, import_react114.useCallback)(() => {
|
|
41687
|
+
if (!onRectsChange) return;
|
|
41688
|
+
const panels = [
|
|
41689
|
+
{
|
|
41690
|
+
id: resolvedLayout === "topLeftTopRight" ? "noya-toolbar-top-left" : "noya-toolbar-bottom-center",
|
|
41691
|
+
element: leftPanelRef.current
|
|
41692
|
+
},
|
|
41693
|
+
{
|
|
41694
|
+
id: "noya-toolbar-top-right",
|
|
41695
|
+
element: rightPanelRef.current
|
|
41696
|
+
}
|
|
41697
|
+
];
|
|
41698
|
+
onRectsChange(
|
|
41699
|
+
panels.flatMap(({ id, element }) => {
|
|
41700
|
+
if (!element) return [];
|
|
41701
|
+
const rect = element.getBoundingClientRect();
|
|
41702
|
+
const containerRect = element.closest("[data-workspace-content]")?.getBoundingClientRect();
|
|
41703
|
+
return [
|
|
41704
|
+
{
|
|
41705
|
+
id,
|
|
41706
|
+
rect: {
|
|
41707
|
+
x: rect.x - (containerRect?.x ?? 0),
|
|
41708
|
+
y: rect.y - (containerRect?.y ?? 0),
|
|
41709
|
+
width: rect.width,
|
|
41710
|
+
height: rect.height
|
|
41711
|
+
}
|
|
41712
|
+
}
|
|
41713
|
+
];
|
|
41714
|
+
})
|
|
41715
|
+
);
|
|
41716
|
+
}, [onRectsChange, resolvedLayout]);
|
|
41717
|
+
(0, import_react114.useLayoutEffect)(() => {
|
|
41718
|
+
if (!onRectsChange) return;
|
|
41719
|
+
let animationFrame;
|
|
41720
|
+
const scheduleEmit = () => {
|
|
41721
|
+
if (animationFrame !== void 0) {
|
|
41722
|
+
cancelAnimationFrame(animationFrame);
|
|
41723
|
+
}
|
|
41724
|
+
animationFrame = requestAnimationFrame(emitRects);
|
|
41725
|
+
};
|
|
41726
|
+
emitRects();
|
|
41727
|
+
const resizeObserver = typeof ResizeObserver === "undefined" ? void 0 : new ResizeObserver(scheduleEmit);
|
|
41728
|
+
const panels = [leftPanelRef.current, rightPanelRef.current];
|
|
41729
|
+
panels.forEach((panel) => panel && resizeObserver?.observe(panel));
|
|
41730
|
+
window.addEventListener("resize", scheduleEmit);
|
|
41731
|
+
window.addEventListener("scroll", scheduleEmit, true);
|
|
41732
|
+
return () => {
|
|
41733
|
+
if (animationFrame !== void 0) {
|
|
41734
|
+
cancelAnimationFrame(animationFrame);
|
|
41735
|
+
}
|
|
41736
|
+
resizeObserver?.disconnect();
|
|
41737
|
+
window.removeEventListener("resize", scheduleEmit);
|
|
41738
|
+
window.removeEventListener("scroll", scheduleEmit, true);
|
|
41739
|
+
onRectsChange([]);
|
|
41740
|
+
};
|
|
41741
|
+
}, [emitRects, hasLeft, hasRight, onRectsChange]);
|
|
41681
41742
|
const renderLeftPanel = (overlayId) => {
|
|
41682
41743
|
if (!left) return null;
|
|
41683
41744
|
return /* @__PURE__ */ import_react114.default.createElement(
|
|
41684
41745
|
"div",
|
|
41685
41746
|
{
|
|
41747
|
+
ref: leftPanelRef,
|
|
41686
41748
|
className: panelClassName,
|
|
41687
41749
|
"data-embedded-overlay-id": overlayId,
|
|
41688
41750
|
style: panelStyle
|
|
@@ -41719,6 +41781,7 @@ function OverlayToolbar({
|
|
|
41719
41781
|
/* @__PURE__ */ import_react114.default.createElement(
|
|
41720
41782
|
"div",
|
|
41721
41783
|
{
|
|
41784
|
+
ref: rightPanelRef,
|
|
41722
41785
|
className: panelClassName,
|
|
41723
41786
|
"data-embedded-overlay-id": "noya-toolbar-top-right",
|
|
41724
41787
|
style: panelStyle
|
|
@@ -42958,6 +43021,8 @@ var WorkspaceLayout = forwardRefGeneric(function WorkspaceLayout2({
|
|
|
42958
43021
|
overlayToolbarLeft,
|
|
42959
43022
|
overlayToolbarRight,
|
|
42960
43023
|
overlayLayout,
|
|
43024
|
+
contentTopInset = 0,
|
|
43025
|
+
onOverlayToolbarRectsChange,
|
|
42961
43026
|
children,
|
|
42962
43027
|
sideType = "auto",
|
|
42963
43028
|
sideTypeBreakpoint = 800,
|
|
@@ -43176,36 +43241,45 @@ var WorkspaceLayout = forwardRefGeneric(function WorkspaceLayout2({
|
|
|
43176
43241
|
"data-theme": theme
|
|
43177
43242
|
},
|
|
43178
43243
|
!isOverlay && toolbar,
|
|
43179
|
-
/* @__PURE__ */ import_react125.default.createElement(
|
|
43180
|
-
|
|
43181
|
-
{
|
|
43182
|
-
leftPanel,
|
|
43183
|
-
rightPanel,
|
|
43184
|
-
centerPanel,
|
|
43185
|
-
leftTabItems,
|
|
43186
|
-
leftTabValue,
|
|
43187
|
-
onChangeLeftTab: setLeftTabValue,
|
|
43188
|
-
rightTabItems,
|
|
43189
|
-
rightTabValue,
|
|
43190
|
-
onChangeRightTab: setRightTabValue,
|
|
43191
|
-
leftSidebarOptions,
|
|
43192
|
-
rightSidebarOptions,
|
|
43193
|
-
autoSavePrefix,
|
|
43194
|
-
leftSidebarRef,
|
|
43195
|
-
rightSidebarRef,
|
|
43196
|
-
compactDrawerMenu,
|
|
43197
|
-
onLeftSidebarStateChange,
|
|
43198
|
-
onRightSidebarStateChange,
|
|
43199
|
-
shouldAutoSave
|
|
43200
|
-
}
|
|
43201
|
-
), isOverlay && /* @__PURE__ */ import_react125.default.createElement(
|
|
43202
|
-
OverlayToolbar,
|
|
43244
|
+
/* @__PURE__ */ import_react125.default.createElement(
|
|
43245
|
+
"div",
|
|
43203
43246
|
{
|
|
43204
|
-
|
|
43205
|
-
|
|
43206
|
-
|
|
43207
|
-
}
|
|
43208
|
-
|
|
43247
|
+
className: "n-flex n-flex-row n-flex-1 n-min-h-0 n-relative",
|
|
43248
|
+
"data-workspace-content": true,
|
|
43249
|
+
style: contentTopInset > 0 ? { paddingTop: contentTopInset } : void 0
|
|
43250
|
+
},
|
|
43251
|
+
readyToRender && /* @__PURE__ */ import_react125.default.createElement(import_react125.default.Fragment, null, /* @__PURE__ */ import_react125.default.createElement(
|
|
43252
|
+
LayoutComponent,
|
|
43253
|
+
{
|
|
43254
|
+
leftPanel,
|
|
43255
|
+
rightPanel,
|
|
43256
|
+
centerPanel,
|
|
43257
|
+
leftTabItems,
|
|
43258
|
+
leftTabValue,
|
|
43259
|
+
onChangeLeftTab: setLeftTabValue,
|
|
43260
|
+
rightTabItems,
|
|
43261
|
+
rightTabValue,
|
|
43262
|
+
onChangeRightTab: setRightTabValue,
|
|
43263
|
+
leftSidebarOptions,
|
|
43264
|
+
rightSidebarOptions,
|
|
43265
|
+
autoSavePrefix,
|
|
43266
|
+
leftSidebarRef,
|
|
43267
|
+
rightSidebarRef,
|
|
43268
|
+
compactDrawerMenu,
|
|
43269
|
+
onLeftSidebarStateChange,
|
|
43270
|
+
onRightSidebarStateChange,
|
|
43271
|
+
shouldAutoSave
|
|
43272
|
+
}
|
|
43273
|
+
), isOverlay && /* @__PURE__ */ import_react125.default.createElement(
|
|
43274
|
+
OverlayToolbar,
|
|
43275
|
+
{
|
|
43276
|
+
left: overlayToolbarLeft,
|
|
43277
|
+
right: overlayToolbarRight,
|
|
43278
|
+
overlayLayout,
|
|
43279
|
+
onRectsChange: onOverlayToolbarRectsChange
|
|
43280
|
+
}
|
|
43281
|
+
))
|
|
43282
|
+
)
|
|
43209
43283
|
);
|
|
43210
43284
|
});
|
|
43211
43285
|
var PanelInner = (0, import_react125.memo)(function PanelInner2({
|