react-dockable-desktop 6.1.0 → 6.3.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
@@ -242,7 +242,7 @@ declare class WorkspaceClient<TUserEvents extends Record<string, unknown> = Reco
242
242
  openPanel(...args: Parameters<WindowActions['openPanel']>): void;
243
243
  closePanel(id: string): void;
244
244
  minimizePanel(id: string): void;
245
- restorePanel(id: string): void;
245
+ restorePanel(...args: Parameters<WindowActions['restorePanel']>): void;
246
246
  floatPanel(...args: Parameters<WindowActions['floatPanel']>): void;
247
247
  dockPanel(...args: Parameters<WindowActions['dockPanel']>): void;
248
248
  maximizePanel(id: string): void;
@@ -724,8 +724,11 @@ interface WindowActions {
724
724
  /**
725
725
  * Restores a minimized panel back to its last docked or floating position.
726
726
  * @param id - Panel instance ID.
727
+ * @param options.focus - Set `state.activePanelId` to the restored panel. @default true
727
728
  */
728
- restorePanel: (id: string) => void;
729
+ restorePanel: (id: string, options?: {
730
+ focus?: boolean;
731
+ }) => void;
729
732
  /**
730
733
  * Detaches a docked panel, converting it to a resizable floating window.
731
734
  * @param id - Panel instance ID.
@@ -2080,8 +2083,14 @@ interface PanelFloatPlacement {
2080
2083
  * @see usePanelFloatingWindowManager
2081
2084
  */
2082
2085
  interface ManagedWindowConfig {
2083
- /** Text shown in the window's header bar. */
2084
- title: string;
2086
+ /**
2087
+ * Text shown in the window's header bar. Accepts a plain string or an i18n message descriptor.
2088
+ *
2089
+ * A descriptor is re-resolved on every render, so the header follows a language change without
2090
+ * the window being closed and reopened — which a plain string cannot do here, because this
2091
+ * config is stored by the overlay rather than re-read from your own render.
2092
+ */
2093
+ title: PanelTitle;
2085
2094
  /** Optional icon shown to the left of the title in the header. */
2086
2095
  icon?: React$1.ReactNode;
2087
2096
  /** Window body content. */
@@ -2232,8 +2241,8 @@ declare function ToolbarSearchInput({ placeholder, onSearch, onSelect }: Toolbar
2232
2241
  interface PanelFloatingWindowProps {
2233
2242
  /** Unique identifier within the panel overlay. Used for z-order and stack tracking. */
2234
2243
  id: string;
2235
- /** Text shown in the window's header bar. */
2236
- title: string;
2244
+ /** Text shown in the window's header bar. Accepts a plain string or an i18n message descriptor. */
2245
+ title: PanelTitle;
2237
2246
  /** Optional icon shown to the left of the title in the header. */
2238
2247
  icon?: React$1.ReactNode;
2239
2248
  /** Whether the window is mounted and visible. Set to `false` to close/unmount it. */
package/dist/index.d.ts CHANGED
@@ -242,7 +242,7 @@ declare class WorkspaceClient<TUserEvents extends Record<string, unknown> = Reco
242
242
  openPanel(...args: Parameters<WindowActions['openPanel']>): void;
243
243
  closePanel(id: string): void;
244
244
  minimizePanel(id: string): void;
245
- restorePanel(id: string): void;
245
+ restorePanel(...args: Parameters<WindowActions['restorePanel']>): void;
246
246
  floatPanel(...args: Parameters<WindowActions['floatPanel']>): void;
247
247
  dockPanel(...args: Parameters<WindowActions['dockPanel']>): void;
248
248
  maximizePanel(id: string): void;
@@ -724,8 +724,11 @@ interface WindowActions {
724
724
  /**
725
725
  * Restores a minimized panel back to its last docked or floating position.
726
726
  * @param id - Panel instance ID.
727
+ * @param options.focus - Set `state.activePanelId` to the restored panel. @default true
727
728
  */
728
- restorePanel: (id: string) => void;
729
+ restorePanel: (id: string, options?: {
730
+ focus?: boolean;
731
+ }) => void;
729
732
  /**
730
733
  * Detaches a docked panel, converting it to a resizable floating window.
731
734
  * @param id - Panel instance ID.
@@ -2080,8 +2083,14 @@ interface PanelFloatPlacement {
2080
2083
  * @see usePanelFloatingWindowManager
2081
2084
  */
2082
2085
  interface ManagedWindowConfig {
2083
- /** Text shown in the window's header bar. */
2084
- title: string;
2086
+ /**
2087
+ * Text shown in the window's header bar. Accepts a plain string or an i18n message descriptor.
2088
+ *
2089
+ * A descriptor is re-resolved on every render, so the header follows a language change without
2090
+ * the window being closed and reopened — which a plain string cannot do here, because this
2091
+ * config is stored by the overlay rather than re-read from your own render.
2092
+ */
2093
+ title: PanelTitle;
2085
2094
  /** Optional icon shown to the left of the title in the header. */
2086
2095
  icon?: React$1.ReactNode;
2087
2096
  /** Window body content. */
@@ -2232,8 +2241,8 @@ declare function ToolbarSearchInput({ placeholder, onSearch, onSelect }: Toolbar
2232
2241
  interface PanelFloatingWindowProps {
2233
2242
  /** Unique identifier within the panel overlay. Used for z-order and stack tracking. */
2234
2243
  id: string;
2235
- /** Text shown in the window's header bar. */
2236
- title: string;
2244
+ /** Text shown in the window's header bar. Accepts a plain string or an i18n message descriptor. */
2245
+ title: PanelTitle;
2237
2246
  /** Optional icon shown to the left of the title in the header. */
2238
2247
  icon?: React$1.ReactNode;
2239
2248
  /** Whether the window is mounted and visible. Set to `false` to close/unmount it. */