react-dockable-desktop 5.4.0 → 6.0.1
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/README.md +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +73 -3
- package/dist/index.d.ts +73 -3
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/styles.css +41 -13
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -150,6 +150,10 @@ interface WorkspaceClientConfig {
|
|
|
150
150
|
/**
|
|
151
151
|
* Serialised layout produced by a previous saveLayout() call.
|
|
152
152
|
* Pass null or omit to start with an empty canvas.
|
|
153
|
+
*
|
|
154
|
+
* Parsed synchronously before the first render. The restored `activePanelId` is the one the
|
|
155
|
+
* snapshot recorded, or — for layouts saved before that was persisted — the selected tab of
|
|
156
|
+
* the first leaf in the grid.
|
|
153
157
|
*/
|
|
154
158
|
initialState?: string | null;
|
|
155
159
|
/** Custom i18n formatter for all internal strings. */
|
|
@@ -641,7 +645,15 @@ interface WindowState {
|
|
|
641
645
|
panels: Record<string, PanelInfo>;
|
|
642
646
|
/** The ID of the panel tab currently being dragged. */
|
|
643
647
|
draggedPanelId: string | null;
|
|
644
|
-
/**
|
|
648
|
+
/**
|
|
649
|
+
* The ID of the active/focused panel — the one contributions are read from
|
|
650
|
+
* (see `useActivePanelContribution`) and the one drawn with focused chrome.
|
|
651
|
+
*
|
|
652
|
+
* Always a panel the user can actually see: the selected tab of its leaf, or a floating
|
|
653
|
+
* window. Never a minimized panel, except when an app explicitly calls `focusPanel()` on
|
|
654
|
+
* one. Restored layouts resolve it from the saved snapshot's own `activePanelId`, falling
|
|
655
|
+
* back to the first leaf's selected tab — never to an arbitrary entry in `panels`.
|
|
656
|
+
*/
|
|
645
657
|
activePanelId: string | null;
|
|
646
658
|
/** Current layout direction ('ltr' or 'rtl') */
|
|
647
659
|
dir: 'ltr' | 'rtl';
|
|
@@ -793,7 +805,8 @@ interface WindowActions {
|
|
|
793
805
|
findPanelId: (component: string, dedupeKey: string) => string | null;
|
|
794
806
|
/**
|
|
795
807
|
* Serializes the entire workspace state to a JSON string.
|
|
796
|
-
* Includes grid layout, floating window positions, minimized panels,
|
|
808
|
+
* Includes grid layout, floating window positions, minimized panels, panel metadata, and the
|
|
809
|
+
* globally active panel (see {@link SerializedLayout.activePanelId}).
|
|
797
810
|
* @returns JSON string suitable for storage and later restoration via {@link loadLayout}.
|
|
798
811
|
* @example
|
|
799
812
|
* ```ts
|
|
@@ -804,6 +817,12 @@ interface WindowActions {
|
|
|
804
817
|
/**
|
|
805
818
|
* Restores a previously serialized workspace from a JSON string.
|
|
806
819
|
* Replaces the entire current layout — all panels not in the snapshot are closed.
|
|
820
|
+
*
|
|
821
|
+
* `state.activePanelId` is resolved from the snapshot's own `activePanelId` when that panel is
|
|
822
|
+
* still visible in it, and otherwise from the first leaf's selected tab (which is also the path
|
|
823
|
+
* layouts saved before that field existed take). It is never seeded from an arbitrary entry in
|
|
824
|
+
* `panels`.
|
|
825
|
+
*
|
|
807
826
|
* @param layoutJson - JSON string produced by {@link saveLayout}.
|
|
808
827
|
* @returns `true` if the layout was successfully parsed and applied, `false` otherwise.
|
|
809
828
|
*/
|
|
@@ -948,6 +967,18 @@ declare const useRegistry: () => PanelRegistryClass;
|
|
|
948
967
|
interface SerializedLayout {
|
|
949
968
|
/** Schema version — absent on layouts saved before this field was introduced (treated as 0). */
|
|
950
969
|
version?: number;
|
|
970
|
+
/**
|
|
971
|
+
* The globally active panel at save time — the one the user was actually looking at.
|
|
972
|
+
*
|
|
973
|
+
* Omitted when nothing was active, and when the active panel didn't survive this snapshot's
|
|
974
|
+
* serializability pruning (see {@link WindowActions.saveLayout}) — so it never names a panel
|
|
975
|
+
* absent from this payload's own `panels`. Absent on every layout saved before this field
|
|
976
|
+
* existed, in which case the restore derives it from `gridRoot`'s own per-leaf selection
|
|
977
|
+
* instead; a present-but-no-longer-valid value falls back to the same derivation. `version`
|
|
978
|
+
* is deliberately not bumped for this: the field is optional and its absence is a supported,
|
|
979
|
+
* fully-handled case rather than a schema a migration has to branch on.
|
|
980
|
+
*/
|
|
981
|
+
activePanelId?: string | null;
|
|
951
982
|
gridRoot: LayoutNode;
|
|
952
983
|
floating: FloatingWindow[];
|
|
953
984
|
minimized: {
|
|
@@ -1321,6 +1352,12 @@ interface SidePanelOptions {
|
|
|
1321
1352
|
icon?: React$1.ReactNode;
|
|
1322
1353
|
/** Specific CSS width (e.g. 300, '40%') for the panel container. */
|
|
1323
1354
|
width?: number | string;
|
|
1355
|
+
/**
|
|
1356
|
+
* CSS padding for the panel body content — a number (px) or any CSS value/shorthand
|
|
1357
|
+
* (e.g. `'10px 16px'`). Default: `0` (edge-to-edge) — pass `10` to restore the pre-v6.0.0
|
|
1358
|
+
* default, or any value your content needs.
|
|
1359
|
+
*/
|
|
1360
|
+
bodyPadding?: number | string;
|
|
1324
1361
|
}
|
|
1325
1362
|
/** Configuration options applied when opening a Modal. */
|
|
1326
1363
|
interface ModalOptions {
|
|
@@ -1332,6 +1369,12 @@ interface ModalOptions {
|
|
|
1332
1369
|
size?: 'small' | 'medium' | 'large' | 'fullscreen' | 'auto';
|
|
1333
1370
|
/** If false, hides the modal backdrop exit click and header close button. */
|
|
1334
1371
|
closable?: boolean;
|
|
1372
|
+
/**
|
|
1373
|
+
* CSS padding for the modal body content — a number (px) or any CSS value/shorthand
|
|
1374
|
+
* (e.g. `'10px 16px'`). Default: `0` (edge-to-edge) — pass `10` to restore the pre-v6.0.0
|
|
1375
|
+
* default, or any value your content needs.
|
|
1376
|
+
*/
|
|
1377
|
+
bodyPadding?: number | string;
|
|
1335
1378
|
}
|
|
1336
1379
|
/**
|
|
1337
1380
|
* Represents a rendered instance of a panel or modal in the layout.
|
|
@@ -1625,6 +1668,12 @@ interface SidebarProps {
|
|
|
1625
1668
|
* @param onOpen - call to (re-)select this tab
|
|
1626
1669
|
*/
|
|
1627
1670
|
renderHeader?: (tab: SidebarTab, onClose: () => void, onOpen: () => void) => React$1.ReactNode;
|
|
1671
|
+
/**
|
|
1672
|
+
* @internal Marks this instance as a secondary sidebar for context-broadcasting
|
|
1673
|
+
* purposes. Set automatically by `<SecondarySidebar>` — do not pass this directly.
|
|
1674
|
+
* Default: false
|
|
1675
|
+
*/
|
|
1676
|
+
isSecondary?: boolean;
|
|
1628
1677
|
/** Main workspace content rendered alongside the sidebar. */
|
|
1629
1678
|
children?: React$1.ReactNode;
|
|
1630
1679
|
}
|
|
@@ -1651,6 +1700,10 @@ interface SidebarContextValue {
|
|
|
1651
1700
|
openTab: (tabId: string) => void;
|
|
1652
1701
|
closeDrawer: () => void;
|
|
1653
1702
|
getActiveTab: () => string | null;
|
|
1703
|
+
/** Which side this Sidebar instance is rendering on. */
|
|
1704
|
+
position: 'left' | 'right';
|
|
1705
|
+
/** True if this instance is a `<SecondarySidebar>`, false for a primary `<Sidebar>`. */
|
|
1706
|
+
isSecondary: boolean;
|
|
1654
1707
|
}
|
|
1655
1708
|
/**
|
|
1656
1709
|
* Value provided by `useSidebarTab()`. Available only to components rendered
|
|
@@ -1663,6 +1716,23 @@ interface SidebarTabContextValue {
|
|
|
1663
1716
|
openTab: (tabId: string) => void;
|
|
1664
1717
|
}
|
|
1665
1718
|
declare const Sidebar: React$1.ForwardRefExoticComponent<SidebarProps & React$1.RefAttributes<SidebarHandle>>;
|
|
1719
|
+
/**
|
|
1720
|
+
* Props for {@link SecondarySidebar} — identical to {@link SidebarProps} except
|
|
1721
|
+
* `position` (always the opposite of whatever primary `Sidebar` it's nested inside)
|
|
1722
|
+
* and `isSecondary` (always `true`) are not settable.
|
|
1723
|
+
*/
|
|
1724
|
+
type SecondarySidebarProps = Omit<SidebarProps, 'position' | 'isSecondary'>;
|
|
1725
|
+
/**
|
|
1726
|
+
* A second, independent `Sidebar` instance for the opposite edge of the screen —
|
|
1727
|
+
* same component, same behavior, zero forked code. Must be rendered inside a
|
|
1728
|
+
* primary `Sidebar`'s `children`; automatically takes whichever side that primary
|
|
1729
|
+
* isn't using, so the side is never specified directly.
|
|
1730
|
+
*
|
|
1731
|
+
* @throws Error if rendered without an ancestor `Sidebar`, or nested inside another
|
|
1732
|
+
* `SecondarySidebar` — this library supports exactly one primary and one secondary,
|
|
1733
|
+
* nothing deeper.
|
|
1734
|
+
*/
|
|
1735
|
+
declare const SecondarySidebar: React$1.ForwardRefExoticComponent<SecondarySidebarProps & React$1.RefAttributes<SidebarHandle>>;
|
|
1666
1736
|
/**
|
|
1667
1737
|
* Returns sidebar control functions from anywhere inside a `<Sidebar>` tree,
|
|
1668
1738
|
* including floating panels rendered via `{children}`.
|
|
@@ -2381,4 +2451,4 @@ declare function computeResizedRect(dir: ResizeDir, dx: number, dy: number, star
|
|
|
2381
2451
|
*/
|
|
2382
2452
|
declare function useColorScheme(): 'dark' | 'light';
|
|
2383
2453
|
|
|
2384
|
-
export { type BuiltInPanelEvents, type ButtonVariant, type CloseOptions, ConfirmationForm, type ConfirmationFormProps, ContextMenu, type ContextMenuAdapter, type ContextMenuCheckbox, type ContextMenuHandle, type ContextMenuItem, type ContextMenuLabel, type ContextMenuPredefinedMessage, type ContextMenuProps, ContextMenuProvider, type ContextMenuSeparator, type ContextMenuSimpleItem, type ContextMenuSubMenu, DefaultContextMenuAdapter, DockableDesktopProvider, type DockableDesktopProviderProps, type DropPosition, type DropTarget, type FloatAnchor, type FloatingWindow, FormContainerContext, type FormContainerContract, FormContainerProvider, type LayoutGridNode, type LayoutLeafNode, type LayoutNode, LeftPanelRenderer, type ManagedWindowConfig, type MenuItemAction, type MessageFormatter, type ModalOptions, ModalStackRenderer, type OpenPanelOptions, type PanelActions, type PanelContribution, PanelContributionProvider, type PanelDefinition, PanelFloatingWindow, type PanelFloatingWindowManagerHandle, type PanelFloatingWindowProps, type PanelInfo, type PanelInstance, type PanelInstanceId, PanelOverlayRoot, type PanelOverlayRootProps, PanelProvider, PanelRegistry, PanelRegistryClass, type PanelRegistryEntry, type PanelSidebarSection, type PanelState, type PanelTitle, PanelToolbar, ToolbarItem as PanelToolbarItem, type PanelToolbarProps, ToolbarSeparator as PanelToolbarSeparator, type PointerDragConfig, type PredefinedMessageKey, type ResizeConstraints, type ResizeDir, type ResizeRect, type ResolvedToastOptions, RightPanelRenderer, type SearchResult, type SerializedLayout, type ShowContextMenuOptions, type SidePanelOptions, SidePanelRenderer, type SidePanelRendererProps, Sidebar, type SidebarContextValue, type SidebarHandle, type SidebarHeaderAction, type SidebarHeaderActionButton, type SidebarHeaderActionCustom, type SidebarProps, type SidebarTab, type SidebarTabContextValue, type SplitDirection, type SplitOrientation, type StyleClasses, type TaskbarVisibility, type ToastAdapter, ToastContainer, type ToastContainerProps, type ToastFunction, type ToastOptions, type ToastPosition, type ToastPromiseMessages, type ToastType, Toolbar, type ToolbarActionItem, ToolbarButton, type ToolbarButtonProps, ToolbarCenter, type ToolbarContextValue, type ToolbarGroupEntry, type ToolbarGroupItem, type ToolbarGroupSubItem, type ToolbarHandle, type ToolbarItem$1 as ToolbarItem, type ToolbarPosition, type ToolbarProps, ToolbarProvider, type ToolbarRadioItem, ToolbarSearchInput, type ToolbarSearchInputProps, type ToolbarSeparator$1 as ToolbarSeparator, ToolbarSpacer, ToolbarToggle, type ToolbarToggleItem, type ToolbarToggleProps, type ToolbarVariant, type UsePanelFloatingWindowReturn, type WindowActions, WindowManager, type WindowManagerProps, WindowManagerProvider, type WindowManagerProviderProps, type WindowState, WorkspaceClient, type WorkspaceClientConfig, computeResizedRect, defaultPredefinedMessages, formatLabel, isSerializable, sidebarSectionToTab, startPointerDrag, toast, useActivePanelContribution, useColorScheme, useFormContainer, useFormatMessage, useMergedSidebarTabs, useMergedToolbarItems, usePanelActions, usePanelContext, usePanelContextMenu, usePanelContribution, usePanelFloatingWindow, usePanelFloatingWindowManager, usePanelId, usePanelSize, usePanelState, usePredefinedMessages, useRegistry, useShowContextMenu, useSidebar, useSidebarTab, useStyleClasses, useToolbar, useWindowManagerActions, useWindowManagerState };
|
|
2454
|
+
export { type BuiltInPanelEvents, type ButtonVariant, type CloseOptions, ConfirmationForm, type ConfirmationFormProps, ContextMenu, type ContextMenuAdapter, type ContextMenuCheckbox, type ContextMenuHandle, type ContextMenuItem, type ContextMenuLabel, type ContextMenuPredefinedMessage, type ContextMenuProps, ContextMenuProvider, type ContextMenuSeparator, type ContextMenuSimpleItem, type ContextMenuSubMenu, DefaultContextMenuAdapter, DockableDesktopProvider, type DockableDesktopProviderProps, type DropPosition, type DropTarget, type FloatAnchor, type FloatingWindow, FormContainerContext, type FormContainerContract, FormContainerProvider, type LayoutGridNode, type LayoutLeafNode, type LayoutNode, LeftPanelRenderer, type ManagedWindowConfig, type MenuItemAction, type MessageFormatter, type ModalOptions, ModalStackRenderer, type OpenPanelOptions, type PanelActions, type PanelContribution, PanelContributionProvider, type PanelDefinition, PanelFloatingWindow, type PanelFloatingWindowManagerHandle, type PanelFloatingWindowProps, type PanelInfo, type PanelInstance, type PanelInstanceId, PanelOverlayRoot, type PanelOverlayRootProps, PanelProvider, PanelRegistry, PanelRegistryClass, type PanelRegistryEntry, type PanelSidebarSection, type PanelState, type PanelTitle, PanelToolbar, ToolbarItem as PanelToolbarItem, type PanelToolbarProps, ToolbarSeparator as PanelToolbarSeparator, type PointerDragConfig, type PredefinedMessageKey, type ResizeConstraints, type ResizeDir, type ResizeRect, type ResolvedToastOptions, RightPanelRenderer, type SearchResult, SecondarySidebar, type SecondarySidebarProps, type SerializedLayout, type ShowContextMenuOptions, type SidePanelOptions, SidePanelRenderer, type SidePanelRendererProps, Sidebar, type SidebarContextValue, type SidebarHandle, type SidebarHeaderAction, type SidebarHeaderActionButton, type SidebarHeaderActionCustom, type SidebarProps, type SidebarTab, type SidebarTabContextValue, type SplitDirection, type SplitOrientation, type StyleClasses, type TaskbarVisibility, type ToastAdapter, ToastContainer, type ToastContainerProps, type ToastFunction, type ToastOptions, type ToastPosition, type ToastPromiseMessages, type ToastType, Toolbar, type ToolbarActionItem, ToolbarButton, type ToolbarButtonProps, ToolbarCenter, type ToolbarContextValue, type ToolbarGroupEntry, type ToolbarGroupItem, type ToolbarGroupSubItem, type ToolbarHandle, type ToolbarItem$1 as ToolbarItem, type ToolbarPosition, type ToolbarProps, ToolbarProvider, type ToolbarRadioItem, ToolbarSearchInput, type ToolbarSearchInputProps, type ToolbarSeparator$1 as ToolbarSeparator, ToolbarSpacer, ToolbarToggle, type ToolbarToggleItem, type ToolbarToggleProps, type ToolbarVariant, type UsePanelFloatingWindowReturn, type WindowActions, WindowManager, type WindowManagerProps, WindowManagerProvider, type WindowManagerProviderProps, type WindowState, WorkspaceClient, type WorkspaceClientConfig, computeResizedRect, defaultPredefinedMessages, formatLabel, isSerializable, sidebarSectionToTab, startPointerDrag, toast, useActivePanelContribution, useColorScheme, useFormContainer, useFormatMessage, useMergedSidebarTabs, useMergedToolbarItems, usePanelActions, usePanelContext, usePanelContextMenu, usePanelContribution, usePanelFloatingWindow, usePanelFloatingWindowManager, usePanelId, usePanelSize, usePanelState, usePredefinedMessages, useRegistry, useShowContextMenu, useSidebar, useSidebarTab, useStyleClasses, useToolbar, useWindowManagerActions, useWindowManagerState };
|
package/dist/index.d.ts
CHANGED
|
@@ -150,6 +150,10 @@ interface WorkspaceClientConfig {
|
|
|
150
150
|
/**
|
|
151
151
|
* Serialised layout produced by a previous saveLayout() call.
|
|
152
152
|
* Pass null or omit to start with an empty canvas.
|
|
153
|
+
*
|
|
154
|
+
* Parsed synchronously before the first render. The restored `activePanelId` is the one the
|
|
155
|
+
* snapshot recorded, or — for layouts saved before that was persisted — the selected tab of
|
|
156
|
+
* the first leaf in the grid.
|
|
153
157
|
*/
|
|
154
158
|
initialState?: string | null;
|
|
155
159
|
/** Custom i18n formatter for all internal strings. */
|
|
@@ -641,7 +645,15 @@ interface WindowState {
|
|
|
641
645
|
panels: Record<string, PanelInfo>;
|
|
642
646
|
/** The ID of the panel tab currently being dragged. */
|
|
643
647
|
draggedPanelId: string | null;
|
|
644
|
-
/**
|
|
648
|
+
/**
|
|
649
|
+
* The ID of the active/focused panel — the one contributions are read from
|
|
650
|
+
* (see `useActivePanelContribution`) and the one drawn with focused chrome.
|
|
651
|
+
*
|
|
652
|
+
* Always a panel the user can actually see: the selected tab of its leaf, or a floating
|
|
653
|
+
* window. Never a minimized panel, except when an app explicitly calls `focusPanel()` on
|
|
654
|
+
* one. Restored layouts resolve it from the saved snapshot's own `activePanelId`, falling
|
|
655
|
+
* back to the first leaf's selected tab — never to an arbitrary entry in `panels`.
|
|
656
|
+
*/
|
|
645
657
|
activePanelId: string | null;
|
|
646
658
|
/** Current layout direction ('ltr' or 'rtl') */
|
|
647
659
|
dir: 'ltr' | 'rtl';
|
|
@@ -793,7 +805,8 @@ interface WindowActions {
|
|
|
793
805
|
findPanelId: (component: string, dedupeKey: string) => string | null;
|
|
794
806
|
/**
|
|
795
807
|
* Serializes the entire workspace state to a JSON string.
|
|
796
|
-
* Includes grid layout, floating window positions, minimized panels,
|
|
808
|
+
* Includes grid layout, floating window positions, minimized panels, panel metadata, and the
|
|
809
|
+
* globally active panel (see {@link SerializedLayout.activePanelId}).
|
|
797
810
|
* @returns JSON string suitable for storage and later restoration via {@link loadLayout}.
|
|
798
811
|
* @example
|
|
799
812
|
* ```ts
|
|
@@ -804,6 +817,12 @@ interface WindowActions {
|
|
|
804
817
|
/**
|
|
805
818
|
* Restores a previously serialized workspace from a JSON string.
|
|
806
819
|
* Replaces the entire current layout — all panels not in the snapshot are closed.
|
|
820
|
+
*
|
|
821
|
+
* `state.activePanelId` is resolved from the snapshot's own `activePanelId` when that panel is
|
|
822
|
+
* still visible in it, and otherwise from the first leaf's selected tab (which is also the path
|
|
823
|
+
* layouts saved before that field existed take). It is never seeded from an arbitrary entry in
|
|
824
|
+
* `panels`.
|
|
825
|
+
*
|
|
807
826
|
* @param layoutJson - JSON string produced by {@link saveLayout}.
|
|
808
827
|
* @returns `true` if the layout was successfully parsed and applied, `false` otherwise.
|
|
809
828
|
*/
|
|
@@ -948,6 +967,18 @@ declare const useRegistry: () => PanelRegistryClass;
|
|
|
948
967
|
interface SerializedLayout {
|
|
949
968
|
/** Schema version — absent on layouts saved before this field was introduced (treated as 0). */
|
|
950
969
|
version?: number;
|
|
970
|
+
/**
|
|
971
|
+
* The globally active panel at save time — the one the user was actually looking at.
|
|
972
|
+
*
|
|
973
|
+
* Omitted when nothing was active, and when the active panel didn't survive this snapshot's
|
|
974
|
+
* serializability pruning (see {@link WindowActions.saveLayout}) — so it never names a panel
|
|
975
|
+
* absent from this payload's own `panels`. Absent on every layout saved before this field
|
|
976
|
+
* existed, in which case the restore derives it from `gridRoot`'s own per-leaf selection
|
|
977
|
+
* instead; a present-but-no-longer-valid value falls back to the same derivation. `version`
|
|
978
|
+
* is deliberately not bumped for this: the field is optional and its absence is a supported,
|
|
979
|
+
* fully-handled case rather than a schema a migration has to branch on.
|
|
980
|
+
*/
|
|
981
|
+
activePanelId?: string | null;
|
|
951
982
|
gridRoot: LayoutNode;
|
|
952
983
|
floating: FloatingWindow[];
|
|
953
984
|
minimized: {
|
|
@@ -1321,6 +1352,12 @@ interface SidePanelOptions {
|
|
|
1321
1352
|
icon?: React$1.ReactNode;
|
|
1322
1353
|
/** Specific CSS width (e.g. 300, '40%') for the panel container. */
|
|
1323
1354
|
width?: number | string;
|
|
1355
|
+
/**
|
|
1356
|
+
* CSS padding for the panel body content — a number (px) or any CSS value/shorthand
|
|
1357
|
+
* (e.g. `'10px 16px'`). Default: `0` (edge-to-edge) — pass `10` to restore the pre-v6.0.0
|
|
1358
|
+
* default, or any value your content needs.
|
|
1359
|
+
*/
|
|
1360
|
+
bodyPadding?: number | string;
|
|
1324
1361
|
}
|
|
1325
1362
|
/** Configuration options applied when opening a Modal. */
|
|
1326
1363
|
interface ModalOptions {
|
|
@@ -1332,6 +1369,12 @@ interface ModalOptions {
|
|
|
1332
1369
|
size?: 'small' | 'medium' | 'large' | 'fullscreen' | 'auto';
|
|
1333
1370
|
/** If false, hides the modal backdrop exit click and header close button. */
|
|
1334
1371
|
closable?: boolean;
|
|
1372
|
+
/**
|
|
1373
|
+
* CSS padding for the modal body content — a number (px) or any CSS value/shorthand
|
|
1374
|
+
* (e.g. `'10px 16px'`). Default: `0` (edge-to-edge) — pass `10` to restore the pre-v6.0.0
|
|
1375
|
+
* default, or any value your content needs.
|
|
1376
|
+
*/
|
|
1377
|
+
bodyPadding?: number | string;
|
|
1335
1378
|
}
|
|
1336
1379
|
/**
|
|
1337
1380
|
* Represents a rendered instance of a panel or modal in the layout.
|
|
@@ -1625,6 +1668,12 @@ interface SidebarProps {
|
|
|
1625
1668
|
* @param onOpen - call to (re-)select this tab
|
|
1626
1669
|
*/
|
|
1627
1670
|
renderHeader?: (tab: SidebarTab, onClose: () => void, onOpen: () => void) => React$1.ReactNode;
|
|
1671
|
+
/**
|
|
1672
|
+
* @internal Marks this instance as a secondary sidebar for context-broadcasting
|
|
1673
|
+
* purposes. Set automatically by `<SecondarySidebar>` — do not pass this directly.
|
|
1674
|
+
* Default: false
|
|
1675
|
+
*/
|
|
1676
|
+
isSecondary?: boolean;
|
|
1628
1677
|
/** Main workspace content rendered alongside the sidebar. */
|
|
1629
1678
|
children?: React$1.ReactNode;
|
|
1630
1679
|
}
|
|
@@ -1651,6 +1700,10 @@ interface SidebarContextValue {
|
|
|
1651
1700
|
openTab: (tabId: string) => void;
|
|
1652
1701
|
closeDrawer: () => void;
|
|
1653
1702
|
getActiveTab: () => string | null;
|
|
1703
|
+
/** Which side this Sidebar instance is rendering on. */
|
|
1704
|
+
position: 'left' | 'right';
|
|
1705
|
+
/** True if this instance is a `<SecondarySidebar>`, false for a primary `<Sidebar>`. */
|
|
1706
|
+
isSecondary: boolean;
|
|
1654
1707
|
}
|
|
1655
1708
|
/**
|
|
1656
1709
|
* Value provided by `useSidebarTab()`. Available only to components rendered
|
|
@@ -1663,6 +1716,23 @@ interface SidebarTabContextValue {
|
|
|
1663
1716
|
openTab: (tabId: string) => void;
|
|
1664
1717
|
}
|
|
1665
1718
|
declare const Sidebar: React$1.ForwardRefExoticComponent<SidebarProps & React$1.RefAttributes<SidebarHandle>>;
|
|
1719
|
+
/**
|
|
1720
|
+
* Props for {@link SecondarySidebar} — identical to {@link SidebarProps} except
|
|
1721
|
+
* `position` (always the opposite of whatever primary `Sidebar` it's nested inside)
|
|
1722
|
+
* and `isSecondary` (always `true`) are not settable.
|
|
1723
|
+
*/
|
|
1724
|
+
type SecondarySidebarProps = Omit<SidebarProps, 'position' | 'isSecondary'>;
|
|
1725
|
+
/**
|
|
1726
|
+
* A second, independent `Sidebar` instance for the opposite edge of the screen —
|
|
1727
|
+
* same component, same behavior, zero forked code. Must be rendered inside a
|
|
1728
|
+
* primary `Sidebar`'s `children`; automatically takes whichever side that primary
|
|
1729
|
+
* isn't using, so the side is never specified directly.
|
|
1730
|
+
*
|
|
1731
|
+
* @throws Error if rendered without an ancestor `Sidebar`, or nested inside another
|
|
1732
|
+
* `SecondarySidebar` — this library supports exactly one primary and one secondary,
|
|
1733
|
+
* nothing deeper.
|
|
1734
|
+
*/
|
|
1735
|
+
declare const SecondarySidebar: React$1.ForwardRefExoticComponent<SecondarySidebarProps & React$1.RefAttributes<SidebarHandle>>;
|
|
1666
1736
|
/**
|
|
1667
1737
|
* Returns sidebar control functions from anywhere inside a `<Sidebar>` tree,
|
|
1668
1738
|
* including floating panels rendered via `{children}`.
|
|
@@ -2381,4 +2451,4 @@ declare function computeResizedRect(dir: ResizeDir, dx: number, dy: number, star
|
|
|
2381
2451
|
*/
|
|
2382
2452
|
declare function useColorScheme(): 'dark' | 'light';
|
|
2383
2453
|
|
|
2384
|
-
export { type BuiltInPanelEvents, type ButtonVariant, type CloseOptions, ConfirmationForm, type ConfirmationFormProps, ContextMenu, type ContextMenuAdapter, type ContextMenuCheckbox, type ContextMenuHandle, type ContextMenuItem, type ContextMenuLabel, type ContextMenuPredefinedMessage, type ContextMenuProps, ContextMenuProvider, type ContextMenuSeparator, type ContextMenuSimpleItem, type ContextMenuSubMenu, DefaultContextMenuAdapter, DockableDesktopProvider, type DockableDesktopProviderProps, type DropPosition, type DropTarget, type FloatAnchor, type FloatingWindow, FormContainerContext, type FormContainerContract, FormContainerProvider, type LayoutGridNode, type LayoutLeafNode, type LayoutNode, LeftPanelRenderer, type ManagedWindowConfig, type MenuItemAction, type MessageFormatter, type ModalOptions, ModalStackRenderer, type OpenPanelOptions, type PanelActions, type PanelContribution, PanelContributionProvider, type PanelDefinition, PanelFloatingWindow, type PanelFloatingWindowManagerHandle, type PanelFloatingWindowProps, type PanelInfo, type PanelInstance, type PanelInstanceId, PanelOverlayRoot, type PanelOverlayRootProps, PanelProvider, PanelRegistry, PanelRegistryClass, type PanelRegistryEntry, type PanelSidebarSection, type PanelState, type PanelTitle, PanelToolbar, ToolbarItem as PanelToolbarItem, type PanelToolbarProps, ToolbarSeparator as PanelToolbarSeparator, type PointerDragConfig, type PredefinedMessageKey, type ResizeConstraints, type ResizeDir, type ResizeRect, type ResolvedToastOptions, RightPanelRenderer, type SearchResult, type SerializedLayout, type ShowContextMenuOptions, type SidePanelOptions, SidePanelRenderer, type SidePanelRendererProps, Sidebar, type SidebarContextValue, type SidebarHandle, type SidebarHeaderAction, type SidebarHeaderActionButton, type SidebarHeaderActionCustom, type SidebarProps, type SidebarTab, type SidebarTabContextValue, type SplitDirection, type SplitOrientation, type StyleClasses, type TaskbarVisibility, type ToastAdapter, ToastContainer, type ToastContainerProps, type ToastFunction, type ToastOptions, type ToastPosition, type ToastPromiseMessages, type ToastType, Toolbar, type ToolbarActionItem, ToolbarButton, type ToolbarButtonProps, ToolbarCenter, type ToolbarContextValue, type ToolbarGroupEntry, type ToolbarGroupItem, type ToolbarGroupSubItem, type ToolbarHandle, type ToolbarItem$1 as ToolbarItem, type ToolbarPosition, type ToolbarProps, ToolbarProvider, type ToolbarRadioItem, ToolbarSearchInput, type ToolbarSearchInputProps, type ToolbarSeparator$1 as ToolbarSeparator, ToolbarSpacer, ToolbarToggle, type ToolbarToggleItem, type ToolbarToggleProps, type ToolbarVariant, type UsePanelFloatingWindowReturn, type WindowActions, WindowManager, type WindowManagerProps, WindowManagerProvider, type WindowManagerProviderProps, type WindowState, WorkspaceClient, type WorkspaceClientConfig, computeResizedRect, defaultPredefinedMessages, formatLabel, isSerializable, sidebarSectionToTab, startPointerDrag, toast, useActivePanelContribution, useColorScheme, useFormContainer, useFormatMessage, useMergedSidebarTabs, useMergedToolbarItems, usePanelActions, usePanelContext, usePanelContextMenu, usePanelContribution, usePanelFloatingWindow, usePanelFloatingWindowManager, usePanelId, usePanelSize, usePanelState, usePredefinedMessages, useRegistry, useShowContextMenu, useSidebar, useSidebarTab, useStyleClasses, useToolbar, useWindowManagerActions, useWindowManagerState };
|
|
2454
|
+
export { type BuiltInPanelEvents, type ButtonVariant, type CloseOptions, ConfirmationForm, type ConfirmationFormProps, ContextMenu, type ContextMenuAdapter, type ContextMenuCheckbox, type ContextMenuHandle, type ContextMenuItem, type ContextMenuLabel, type ContextMenuPredefinedMessage, type ContextMenuProps, ContextMenuProvider, type ContextMenuSeparator, type ContextMenuSimpleItem, type ContextMenuSubMenu, DefaultContextMenuAdapter, DockableDesktopProvider, type DockableDesktopProviderProps, type DropPosition, type DropTarget, type FloatAnchor, type FloatingWindow, FormContainerContext, type FormContainerContract, FormContainerProvider, type LayoutGridNode, type LayoutLeafNode, type LayoutNode, LeftPanelRenderer, type ManagedWindowConfig, type MenuItemAction, type MessageFormatter, type ModalOptions, ModalStackRenderer, type OpenPanelOptions, type PanelActions, type PanelContribution, PanelContributionProvider, type PanelDefinition, PanelFloatingWindow, type PanelFloatingWindowManagerHandle, type PanelFloatingWindowProps, type PanelInfo, type PanelInstance, type PanelInstanceId, PanelOverlayRoot, type PanelOverlayRootProps, PanelProvider, PanelRegistry, PanelRegistryClass, type PanelRegistryEntry, type PanelSidebarSection, type PanelState, type PanelTitle, PanelToolbar, ToolbarItem as PanelToolbarItem, type PanelToolbarProps, ToolbarSeparator as PanelToolbarSeparator, type PointerDragConfig, type PredefinedMessageKey, type ResizeConstraints, type ResizeDir, type ResizeRect, type ResolvedToastOptions, RightPanelRenderer, type SearchResult, SecondarySidebar, type SecondarySidebarProps, type SerializedLayout, type ShowContextMenuOptions, type SidePanelOptions, SidePanelRenderer, type SidePanelRendererProps, Sidebar, type SidebarContextValue, type SidebarHandle, type SidebarHeaderAction, type SidebarHeaderActionButton, type SidebarHeaderActionCustom, type SidebarProps, type SidebarTab, type SidebarTabContextValue, type SplitDirection, type SplitOrientation, type StyleClasses, type TaskbarVisibility, type ToastAdapter, ToastContainer, type ToastContainerProps, type ToastFunction, type ToastOptions, type ToastPosition, type ToastPromiseMessages, type ToastType, Toolbar, type ToolbarActionItem, ToolbarButton, type ToolbarButtonProps, ToolbarCenter, type ToolbarContextValue, type ToolbarGroupEntry, type ToolbarGroupItem, type ToolbarGroupSubItem, type ToolbarHandle, type ToolbarItem$1 as ToolbarItem, type ToolbarPosition, type ToolbarProps, ToolbarProvider, type ToolbarRadioItem, ToolbarSearchInput, type ToolbarSearchInputProps, type ToolbarSeparator$1 as ToolbarSeparator, ToolbarSpacer, ToolbarToggle, type ToolbarToggleItem, type ToolbarToggleProps, type ToolbarVariant, type UsePanelFloatingWindowReturn, type WindowActions, WindowManager, type WindowManagerProps, WindowManagerProvider, type WindowManagerProviderProps, type WindowState, WorkspaceClient, type WorkspaceClientConfig, computeResizedRect, defaultPredefinedMessages, formatLabel, isSerializable, sidebarSectionToTab, startPointerDrag, toast, useActivePanelContribution, useColorScheme, useFormContainer, useFormatMessage, useMergedSidebarTabs, useMergedToolbarItems, usePanelActions, usePanelContext, usePanelContextMenu, usePanelContribution, usePanelFloatingWindow, usePanelFloatingWindowManager, usePanelId, usePanelSize, usePanelState, usePredefinedMessages, useRegistry, useShowContextMenu, useSidebar, useSidebarTab, useStyleClasses, useToolbar, useWindowManagerActions, useWindowManagerState };
|