react-dockable-desktop 7.7.4 → 7.8.0

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/dist/index.d.cts CHANGED
@@ -274,6 +274,23 @@ interface OpenPanelOptions<P extends object = Record<string, unknown>> {
274
274
  * for the document at this path"). See also {@link WorkspaceActions.findPanelId}.
275
275
  */
276
276
  dedupeKey?: string;
277
+ /**
278
+ * Dock the new panel beside an open, docked panel: in that panel's group (`position: 'center'`,
279
+ * as a tab) or in a new group split off on one side of it. `size` is the new group's share of
280
+ * that split, from 0.1 to 0.9 (the workspace's default split ratio when omitted). Wins over
281
+ * `initialTarget`. If `panel` is not docked (not open, floating or minimized), the new panel is
282
+ * placed as usual and a development warning says why. Applies only to a newly opened panel. (7.8.0)
283
+ *
284
+ * @example
285
+ * ```ts
286
+ * ws.openPanel('legend', 'legend', { dockTo: { panel: 'chart-1', position: 'right', size: 0.25 } });
287
+ * ```
288
+ */
289
+ dockTo?: {
290
+ panel: string;
291
+ position: DropPosition;
292
+ size?: number;
293
+ };
277
294
  }
278
295
  /**
279
296
  * Global window manager state tree representing grid nodes, windows, and panels.
@@ -701,6 +718,22 @@ interface PanelRegistryEntry {
701
718
  disableLivePreview?: boolean;
702
719
  /** Custom header actions renderer, placing custom components in the window/tab titlebar. */
703
720
  renderHeaderActions?: (panelId: string) => React.ReactNode;
721
+ /**
722
+ * Class added to each panel of this type, on its own content element (`.rdd-panel-content`),
723
+ * which moves with the panel between groups, windows and the taskbar preview. (7.8.0)
724
+ */
725
+ className?: string;
726
+ /** Class added to the tab of each panel of this type. (7.8.0) */
727
+ tabClassName?: string;
728
+ /**
729
+ * `false` unmounts the panel's component while it is hidden (an unselected tab, or minimized)
730
+ * and mounts it afresh when it is shown, to free what a heavy, rarely shown panel holds. Its
731
+ * own state is lost each time; its tab, title and lifecycle continue (`onClose` is not called),
732
+ * and the taskbar shows a placeholder instead of a live preview. While it is unmounted,
733
+ * `saveLayout()` saves its open-time props. @default true: panels stay mounted and keep their
734
+ * state, as they always have. (7.8.0)
735
+ */
736
+ keepAlive?: boolean;
704
737
  };
705
738
  }
706
739
  /**
@@ -1677,6 +1710,12 @@ interface RddDesktopProps {
1677
1710
  taskbarVisibility?: TaskbarVisibility;
1678
1711
  /** Enables the library's own transitions/animations (tab hover, dock preview, etc.). Never affects the consumer's own page. @default true */
1679
1712
  animations?: boolean;
1713
+ /**
1714
+ * What the workspace shows while no panel is docked: a welcome screen, a "pick a file" prompt.
1715
+ * It fills the empty group in place of the built-in message; the group stays a drop target, so a
1716
+ * floating window can still be docked into it. Floating windows still show over it. (7.8.0)
1717
+ */
1718
+ emptyWorkspace?: React$1.ReactNode;
1680
1719
  }
1681
1720
  /**
1682
1721
  * The desktop itself: the docked grid of tab groups, the floating windows, the taskbar of
package/dist/index.d.ts CHANGED
@@ -274,6 +274,23 @@ interface OpenPanelOptions<P extends object = Record<string, unknown>> {
274
274
  * for the document at this path"). See also {@link WorkspaceActions.findPanelId}.
275
275
  */
276
276
  dedupeKey?: string;
277
+ /**
278
+ * Dock the new panel beside an open, docked panel: in that panel's group (`position: 'center'`,
279
+ * as a tab) or in a new group split off on one side of it. `size` is the new group's share of
280
+ * that split, from 0.1 to 0.9 (the workspace's default split ratio when omitted). Wins over
281
+ * `initialTarget`. If `panel` is not docked (not open, floating or minimized), the new panel is
282
+ * placed as usual and a development warning says why. Applies only to a newly opened panel. (7.8.0)
283
+ *
284
+ * @example
285
+ * ```ts
286
+ * ws.openPanel('legend', 'legend', { dockTo: { panel: 'chart-1', position: 'right', size: 0.25 } });
287
+ * ```
288
+ */
289
+ dockTo?: {
290
+ panel: string;
291
+ position: DropPosition;
292
+ size?: number;
293
+ };
277
294
  }
278
295
  /**
279
296
  * Global window manager state tree representing grid nodes, windows, and panels.
@@ -701,6 +718,22 @@ interface PanelRegistryEntry {
701
718
  disableLivePreview?: boolean;
702
719
  /** Custom header actions renderer, placing custom components in the window/tab titlebar. */
703
720
  renderHeaderActions?: (panelId: string) => React.ReactNode;
721
+ /**
722
+ * Class added to each panel of this type, on its own content element (`.rdd-panel-content`),
723
+ * which moves with the panel between groups, windows and the taskbar preview. (7.8.0)
724
+ */
725
+ className?: string;
726
+ /** Class added to the tab of each panel of this type. (7.8.0) */
727
+ tabClassName?: string;
728
+ /**
729
+ * `false` unmounts the panel's component while it is hidden (an unselected tab, or minimized)
730
+ * and mounts it afresh when it is shown, to free what a heavy, rarely shown panel holds. Its
731
+ * own state is lost each time; its tab, title and lifecycle continue (`onClose` is not called),
732
+ * and the taskbar shows a placeholder instead of a live preview. While it is unmounted,
733
+ * `saveLayout()` saves its open-time props. @default true: panels stay mounted and keep their
734
+ * state, as they always have. (7.8.0)
735
+ */
736
+ keepAlive?: boolean;
704
737
  };
705
738
  }
706
739
  /**
@@ -1677,6 +1710,12 @@ interface RddDesktopProps {
1677
1710
  taskbarVisibility?: TaskbarVisibility;
1678
1711
  /** Enables the library's own transitions/animations (tab hover, dock preview, etc.). Never affects the consumer's own page. @default true */
1679
1712
  animations?: boolean;
1713
+ /**
1714
+ * What the workspace shows while no panel is docked: a welcome screen, a "pick a file" prompt.
1715
+ * It fills the empty group in place of the built-in message; the group stays a drop target, so a
1716
+ * floating window can still be docked into it. Floating windows still show over it. (7.8.0)
1717
+ */
1718
+ emptyWorkspace?: React$1.ReactNode;
1680
1719
  }
1681
1720
  /**
1682
1721
  * The desktop itself: the docked grid of tab groups, the floating windows, the taskbar of