react-dockable-desktop 6.4.0 → 7.0.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
@@ -1,341 +1,4 @@
1
- import React$1, { ComponentType, Context, Provider, ReactNode } from 'react';
2
-
3
- interface ContextMenuPredefinedMessage$1 {
4
- id: string;
5
- defaultMessage?: string;
6
- values?: Record<string, string | number>;
7
- }
8
- type MessageFormatter$1 = (msg: ContextMenuPredefinedMessage$1) => string;
9
- type ContextMenuLabel = string | ContextMenuPredefinedMessage$1;
10
- type MenuItemAction = () => void;
11
-
12
- interface ContextMenuCheckbox {
13
- /** Whether the checkbox column renders at all (default: true). */
14
- active?: boolean;
15
- /** Whether the item is interactive (default: true). Prefer top-level `disabled` on the item instead. */
16
- enabled?: boolean;
17
- /** Current checked state. */
18
- value: boolean;
19
- }
20
- interface ContextMenuSimpleItem {
21
- label: ContextMenuLabel;
22
- icon?: React$1.ReactNode;
23
- title?: ContextMenuLabel;
24
- checkbox?: ContextMenuCheckbox;
25
- action?: MenuItemAction;
26
- cyAction?: string;
27
- disabled?: boolean;
28
- }
29
- interface ContextMenuSeparator {
30
- separator: true;
31
- }
32
- interface ContextMenuSubMenu {
33
- label: ContextMenuLabel;
34
- title?: ContextMenuLabel;
35
- items?: ContextMenuItem[];
36
- }
37
- type ContextMenuItem = ContextMenuSimpleItem | ContextMenuSeparator | ContextMenuSubMenu;
38
- interface ShowContextMenuOptions {
39
- event?: React$1.MouseEvent | React$1.TouchEvent | MouseEvent | TouchEvent;
40
- x?: number;
41
- y?: number;
42
- items: ContextMenuItem[];
43
- }
44
- interface ContextMenuHandle {
45
- show(options: ShowContextMenuOptions): void;
46
- }
47
- interface ContextMenuProps {
48
- theme?: string;
49
- animation?: string;
50
- formatMessageProvider?: MessageFormatter$1;
51
- onShow?: () => void;
52
- onHide?: () => void;
53
- onOpenChange?: (open: boolean) => void;
54
- className?: string;
55
- style?: React$1.CSSProperties;
56
- }
57
- interface ContextMenuAdapter {
58
- Component: React$1.ForwardRefExoticComponent<ContextMenuProps & React$1.RefAttributes<ContextMenuHandle>>;
59
- }
60
- declare const ContextMenu: React$1.ForwardRefExoticComponent<ContextMenuProps & React$1.RefAttributes<ContextMenuHandle>>;
61
- declare const DefaultContextMenuAdapter: ContextMenuAdapter;
62
- declare const ContextMenuProvider: React$1.FC<{
63
- adapter?: ContextMenuAdapter;
64
- children: React$1.ReactNode;
65
- } & ContextMenuProps>;
66
- declare function useShowContextMenu(): (options: ShowContextMenuOptions) => void;
67
-
68
- /**
69
- * @file WindowManager.tsx
70
- * @description Core component for react-dockable-desktop layout engine.
71
- * Renders the workspace desktop containing docked splits, tabbed panels, floated windows,
72
- * resize handles, context menus, and taskbar docks. Exposes lifecycle event listeners.
73
- */
74
-
75
- /** Controls when the minimized-panel taskbar is visible. */
76
- type TaskbarVisibility = 'always' | 'compact' | 'autohide';
77
- /** Props for `<WindowManager>`. */
78
- interface WindowManagerProps {
79
- /** Built-in skin name or a custom skin key registered via CSS. @default 'vscode' */
80
- skin?: string;
81
- /** Fallback icon shown in panel tabs when no panel-specific icon is provided. */
82
- defaultPanelIcon?: React$1.ReactNode;
83
- /**
84
- * Controls taskbar visibility.
85
- * - `'always'` — permanent bar at the bottom (default)
86
- * - `'compact'` — only visible when minimized panels exist
87
- * - `'autohide'` — overlay bar with 8 px peek strip
88
- * @default 'always'
89
- */
90
- taskbarVisibility?: TaskbarVisibility;
91
- /** Custom context menu renderer. Defaults to the built-in `DefaultContextMenuAdapter`. */
92
- contextMenuAdapter?: ContextMenuAdapter;
93
- /** Enables the library's own transitions/animations (tab hover, dock preview, etc.). Never affects the consumer's own page. @default true */
94
- animations?: boolean;
95
- }
96
- declare const WindowManager: React$1.FC<WindowManagerProps>;
97
-
98
- /** Built-in lifecycle events always available on the WorkspaceClient event bus. */
99
- interface BuiltInPanelEvents {
100
- 'panel:opened': {
101
- id: string;
102
- component: string;
103
- };
104
- 'panel:closed': {
105
- id: string;
106
- };
107
- 'panel:minimized': {
108
- id: string;
109
- };
110
- 'panel:restored': {
111
- id: string;
112
- };
113
- /**
114
- * Fires whenever something `saveLayout()` would capture changes — open/close/minimize/restore,
115
- * float/dock/re-order/dock-to-edge, closing a group, maximizing a minimized panel, and an
116
- * `openPanel` `dedupeKey` redirect. Coalesces those into one signal for autosave-style
117
- * consumers, so they don't need to subscribe to separate events. Does **not** cover a
118
- * `registerStateProvider` callback's return value changing on its own — that's a pull, there's
119
- * no way to observe it changing without the panel separately notifying — nor resize/split-ratio
120
- * drag, which has no hook yet.
121
- */
122
- 'layout:changed': Record<string, never>;
123
- /**
124
- * Fires from inside `saveLayout()` itself, only when that specific call excluded at least one
125
- * panel (a panel whose current `props` — static or from a `registerStateProvider` — failed
126
- * {@link isSerializable}). A passive `PanelInfo.serializable` flag alone isn't enough for this:
127
- * nobody may be polling it at the exact moment a save happens and something silently drops out
128
- * (e.g. a floating window rendering data from a live class instance). This is deliberately just
129
- * a signal, not a UI opinion — decide for yourself whether that becomes a toast, a console
130
- * warning, or nothing.
131
- */
132
- 'layout:panels-excluded': {
133
- panels: {
134
- id: string;
135
- component: string;
136
- }[];
137
- };
138
- }
139
- /** Per-panel definition supplied to WorkspaceClient constructor. */
140
- interface PanelDefinition {
141
- component: ComponentType<any>;
142
- defaultOptions?: PanelRegistryEntry['defaultOptions'];
143
- }
144
- /** Configuration object accepted by the WorkspaceClient constructor. */
145
- interface WorkspaceClientConfig {
146
- /**
147
- * Declarative panel catalog. Replaces imperative PanelRegistry.register() calls.
148
- * Keys are the component identifiers used in openPanel() and serialised layouts.
149
- */
150
- panels?: Record<string, PanelDefinition>;
151
- /**
152
- * Serialised layout produced by a previous saveLayout() call.
153
- * Pass null or omit to start with an empty canvas.
154
- *
155
- * Parsed synchronously before the first render. The restored `activePanelId` is the one the
156
- * snapshot recorded, or — for layouts saved before that was persisted — the selected tab of
157
- * the first leaf in the grid.
158
- */
159
- initialState?: string | null;
160
- /** Custom i18n formatter for all internal strings. */
161
- formatMessage?: MessageFormatter;
162
- /** Override any subset of the built-in predefined message catalog. */
163
- predefinedMessages?: Record<string, ContextMenuPredefinedMessage>;
164
- /** Initial layout direction. */
165
- dir?: 'ltr' | 'rtl';
166
- /**
167
- * Fraction of the target panel the new panel takes when dropped on a panel's
168
- * top/bottom/left/right cross target. Range 0.1–0.9. Default: 0.5.
169
- */
170
- defaultSplitRatio?: number;
171
- /**
172
- * Fraction of the workspace the new panel takes when dropped on the workspace
173
- * outer edge. Range 0.1–0.9. Default: 0.2.
174
- */
175
- defaultEdgeSplitRatio?: number;
176
- /**
177
- * Starting z-index for floating windows and the library's own chrome overlays
178
- * (context menu, toolbar flyout, modal stack, toast, workspace edge zones),
179
- * all of which shift together via `--rdd-z-base`. Set this above/below a host
180
- * app's own modal z-index range to control stacking against it. Default: 1000.
181
- */
182
- zIndexBase?: number;
183
- }
184
- /**
185
- * WorkspaceClient is the central configuration and imperative API object for
186
- * react-dockable-desktop. Create one instance outside the React tree and pass
187
- * it to `<WindowManagerProvider client={client}>`.
188
- *
189
- * Pattern: TanStack QueryClient / Redux store — configuration and imperative
190
- * access live on the client; rendering is delegated to the thin React provider.
191
- *
192
- * @remarks
193
- * Calls made before the provider mounts are queued and replayed automatically
194
- * in order once `_connect()` fires. Duplicate `openPanel` calls for the same
195
- * ID are deduplicated while queued. Subscriptions made before mount are
196
- * buffered and re-registered on each connect/reconnect.
197
- *
198
- * @example
199
- * const workspace = new WorkspaceClient<MyEvents>({
200
- * panels: {
201
- * map: { component: MapPanel },
202
- * editor: { component: EditorPanel, defaultOptions: { title: 'Code Editor' } },
203
- * },
204
- * initialState: localStorage.getItem('layout'),
205
- * });
206
- *
207
- * <WindowManagerProvider client={workspace}>
208
- * <WindowManager />
209
- * </WindowManagerProvider>
210
- *
211
- * // Imperative access from anywhere:
212
- * workspace.saveLayout();
213
- * workspace.openPanel('map-1', 'map');
214
- * workspace.focusPanel('map-1');
215
- */
216
- declare class WorkspaceClient<TUserEvents extends object = Record<string, unknown>> {
217
- /** Scoped panel registry — fully independent from the global singleton. */
218
- readonly registry: PanelRegistryClass;
219
- /** Serialised layout to restore on mount, or null to start with an empty canvas. */
220
- readonly initialState: string | null;
221
- /** Non-rendering configuration forwarded to the provider. */
222
- readonly config: Pick<WorkspaceClientConfig, 'formatMessage' | 'predefinedMessages' | 'dir' | 'defaultSplitRatio' | 'defaultEdgeSplitRatio' | 'zIndexBase'>;
223
- private _actions;
224
- private _initialized;
225
- /** Calls queued before _connect() fires — replayed in order on first connect. */
226
- private _pendingCalls;
227
- /** Tracks openPanel IDs in the pending queue to prevent duplicates before mount. */
228
- private _pendingOpenPanelIds;
229
- /** Subscriptions buffered before connect — re-registered on every connect/reconnect. */
230
- private _pendingSubscriptions;
231
- /** Timer that emits an error if _connect() is never called with pending work. */
232
- private _disconnectedWarnTimer;
233
- constructor(config?: WorkspaceClientConfig);
234
- /** @internal Called by WindowManagerProvider after mount. */
235
- _connect(actions: WindowActions): void;
236
- /** @internal Called by WindowManagerProvider on unmount. */
237
- _disconnect(): void;
238
- /** True while the provider is mounted and React state is accessible. */
239
- get isConnected(): boolean;
240
- private _startWarnTimer;
241
- private _dispatch;
242
- private _subscribeRaw;
243
- openPanel(...args: Parameters<WindowActions['openPanel']>): void;
244
- closePanel(id: string): void;
245
- minimizePanel(id: string): void;
246
- restorePanel(...args: Parameters<WindowActions['restorePanel']>): void;
247
- floatPanel(...args: Parameters<WindowActions['floatPanel']>): void;
248
- dockPanel(...args: Parameters<WindowActions['dockPanel']>): void;
249
- maximizePanel(id: string): void;
250
- /**
251
- * Activates the given panel regardless of its current state.
252
- * For floating panels: raises z-index so the window appears on top.
253
- * For docked panels: selects the tab within its leaf group.
254
- */
255
- focusPanel(id: string): void;
256
- /** Returns `true` if a panel with this ID is currently open. */
257
- isOpen(id: string): boolean;
258
- /** Returns the IDs of all currently open panels. */
259
- getOpenPanelIds(): string[];
260
- /** Finds an already-open panel of the given component with a matching `dedupeKey` (set via
261
- * `openPanel`'s `dedupeKey` option). Returns `null` if none is open. */
262
- findPanelId(component: string, dedupeKey: string): string | null;
263
- saveLayout(): string;
264
- loadLayout(json: string): boolean;
265
- setDirection(dir: 'ltr' | 'rtl'): void;
266
- /** Updates the split-size fractions at the given grid path. */
267
- updateSplitSizes(path: number[], sizes: number[]): void;
268
- /** Updates position/size/anchor of a floating panel. */
269
- updateFloatingPosition(id: string, updates: Partial<Pick<FloatingWindow, 'x' | 'y' | 'width' | 'height' | 'anchor'>>): void;
270
- /** @internal Drives the drag-in-progress visual state; normally only the library's own drag UI calls this. */
271
- setDraggedPanelId(id: string | null): void;
272
- /** Docks a panel into an existing leaf group at the given drop position. */
273
- dockPanelToGroup(id: string, targetLeafId: string, position: DropPosition): void;
274
- /** Reorders a panel's tab within its leaf group. */
275
- movePanelOrder(panelId: string, targetLeafId: string, targetIndex: number): void;
276
- /**
277
- * Closes a leaf group: each of its tabs is closed through the guarded close path, then the
278
- * group is removed once empty. A tab whose close guard refuses — or a dirty tab that
279
- * `onConfirm` doesn't approve — stays open, and so does its group.
280
- * Resolves once every close request has been settled.
281
- *
282
- * @remarks If called before the provider mounts, the request is queued and this returns an
283
- * already-resolved promise, as `requestClosePanel` does.
284
- */
285
- closeLeafGroup(leafId: string, options?: {
286
- onConfirm?: (opts?: DirtyStateOptions) => Promise<boolean>;
287
- }): Promise<void>;
288
- /** Registers a guard that can veto closing the given panel. */
289
- registerCloseGuard(id: string, guard: () => boolean | Promise<boolean>): void;
290
- /** Removes a previously registered close guard. */
291
- unregisterCloseGuard(id: string): void;
292
- /** Registers a callback reporting a panel's current restorable state, pulled fresh on every
293
- * `saveLayout()` call — see {@link BuiltInPanelEvents}'s `'layout:panels-excluded'` doc and
294
- * `FormContainerContract.registerStateProvider`. */
295
- registerStateProvider(id: string, provider: () => unknown): void;
296
- /** Removes a previously registered state provider. */
297
- unregisterStateProvider(id: string): void;
298
- /** Sets/clears a panel's dirty (unsaved changes) flag. */
299
- setPanelDirty(id: string, dirty: boolean, options?: DirtyStateOptions): void;
300
- /** Updates a panel's displayed title. */
301
- updatePanelTitle(id: string, title: string | ContextMenuPredefinedMessage): void;
302
- /**
303
- * Requests that a panel close, honoring its dirty flag and any registered close guard.
304
- * Resolves once the close (or user cancellation) has been resolved.
305
- *
306
- * @remarks If called before the provider mounts, the request is queued and this
307
- * returns an already-resolved promise immediately — the caller can't observe the
308
- * eventual outcome of a queued call, only that the request was accepted.
309
- */
310
- requestClosePanel(id: string, options?: {
311
- force?: boolean;
312
- onConfirm?: (opts?: DirtyStateOptions) => Promise<boolean>;
313
- }): Promise<void>;
314
- /** Docks a panel to one of the workspace's outer edges. */
315
- dockPanelToWorkspaceEdge(id: string, position: SplitDirection): void;
316
- /** Shows a context menu using the app's configured ContextMenuAdapter. */
317
- showContextMenu(options: ShowContextMenuOptions): void;
318
- publish<K extends keyof (TUserEvents & BuiltInPanelEvents)>(event: K, data: (TUserEvents & BuiltInPanelEvents)[K]): void;
319
- subscribe<K extends keyof (TUserEvents & BuiltInPanelEvents)>(event: K, callback: (data: (TUserEvents & BuiltInPanelEvents)[K]) => void): () => void;
320
- /** Subscribe to panel open events. Fires only for newly created panels. */
321
- onPanelOpen(callback: (id: string, component: string) => void): () => void;
322
- /** Subscribe to panel close events. */
323
- onPanelClose(callback: (id: string) => void): () => void;
324
- /** Subscribe to panel minimize events. */
325
- onPanelMinimize(callback: (id: string) => void): () => void;
326
- /** Subscribe to panel restore events. */
327
- onPanelRestore(callback: (id: string) => void): () => void;
328
- /** Subscribe to the coalesced layout-change signal — see {@link BuiltInPanelEvents}'s
329
- * `'layout:changed'` doc for exactly what it covers (and doesn't). */
330
- onLayoutChanged(callback: () => void): () => void;
331
- /** Subscribe to notification that a `saveLayout()` call excluded one or more panels because
332
- * their current props weren't serializable — see {@link BuiltInPanelEvents}'s
333
- * `'layout:panels-excluded'` doc. */
334
- onPanelsExcluded(callback: (panels: {
335
- id: string;
336
- component: string;
337
- }[]) => void): () => void;
338
- }
1
+ import React$1, { ComponentType } from 'react';
339
2
 
340
3
  /**
341
4
  * @file predefinedMessages.ts
@@ -346,8 +9,8 @@ declare class WorkspaceClient<TUserEvents extends object = Record<string, unknow
346
9
  * define in their IntlProvider messages table. The `defaultMessage` is used
347
10
  * as a fallback when no external formatter is provided.
348
11
  *
349
- * Pass a partial or full override to `<WindowManagerProvider predefinedMessages={…} />`
350
- * to customise labels without replacing the whole table.
12
+ * Pass a partial or full override as `createWorkspace({ messages })` or
13
+ * `<DockableDesktopProvider messages={…}>` to customise labels without replacing the whole table.
351
14
  */
352
15
  declare const defaultPredefinedMessages: {
353
16
  readonly floatWindow: {
@@ -500,16 +163,16 @@ declare const defaultPredefinedMessages: {
500
163
  };
501
164
  };
502
165
  /**
503
- * Union of every key in `defaultPredefinedMessages`.
166
+ * Union of every key in `defaultMessages`.
504
167
  *
505
168
  * Import this type in your i18n message tables to get a compile-time
506
169
  * guarantee that all keys are present and no typos exist:
507
170
  *
508
- * import type { PredefinedMessageKey } from 'react-dockable-desktop';
171
+ * import type { MessageKey } from 'react-dockable-desktop';
509
172
  *
510
- * const myMessages: Record<PredefinedMessageKey, string> = { ... };
173
+ * const myMessages: Record<MessageKey, string> = { ... };
511
174
  */
512
- type PredefinedMessageKey = keyof typeof defaultPredefinedMessages;
175
+ type MessageKey = keyof typeof defaultPredefinedMessages;
513
176
 
514
177
  /**
515
178
  * @file dirtyOptions.ts
@@ -524,12 +187,12 @@ interface DirtyStateOptions {
524
187
  * Custom header title text or localizable message descriptor.
525
188
  * Replaces the default "Unsaved Changes" title.
526
189
  */
527
- title?: string | ContextMenuPredefinedMessage;
190
+ title?: string | MessageDescriptor;
528
191
  /**
529
192
  * Custom warning explanation text or localizable message descriptor.
530
193
  * Replaces the standard default message body templates.
531
194
  */
532
- message?: string | ContextMenuPredefinedMessage;
195
+ message?: string | MessageDescriptor;
533
196
  /**
534
197
  * Optional custom alert notification banner text.
535
198
  * Typically lists missing validation field requirements or backup statuses.
@@ -542,10 +205,69 @@ interface DirtyStateOptions {
542
205
  alertType?: 'info' | 'warning' | 'success' | 'danger';
543
206
  }
544
207
 
208
+ interface MessageDescriptor$1 {
209
+ id: string;
210
+ defaultMessage?: string;
211
+ values?: Record<string, string | number>;
212
+ }
213
+ type MessageFormatter$1 = (msg: MessageDescriptor$1) => string;
214
+ type ContextMenuLabel = string | MessageDescriptor$1;
215
+ type MenuItemAction = () => void;
216
+
217
+ interface ContextMenuCheckbox {
218
+ /** Whether the checkbox column renders at all (default: true). */
219
+ active?: boolean;
220
+ /** Whether the item is interactive (default: true). Prefer top-level `disabled` on the item instead. */
221
+ enabled?: boolean;
222
+ /** Current checked state. */
223
+ value: boolean;
224
+ }
225
+ interface ContextMenuSimpleItem {
226
+ label: ContextMenuLabel;
227
+ icon?: React$1.ReactNode;
228
+ title?: ContextMenuLabel;
229
+ checkbox?: ContextMenuCheckbox;
230
+ action?: MenuItemAction;
231
+ cyAction?: string;
232
+ disabled?: boolean;
233
+ }
234
+ interface ContextMenuSeparator {
235
+ separator: true;
236
+ }
237
+ interface ContextMenuSubMenu {
238
+ label: ContextMenuLabel;
239
+ title?: ContextMenuLabel;
240
+ items?: ContextMenuItem[];
241
+ }
242
+ type ContextMenuItem = ContextMenuSimpleItem | ContextMenuSeparator | ContextMenuSubMenu;
243
+ interface ShowContextMenuOptions {
244
+ event?: React$1.MouseEvent | React$1.TouchEvent | MouseEvent | TouchEvent;
245
+ x?: number;
246
+ y?: number;
247
+ items: ContextMenuItem[];
248
+ }
249
+ interface ContextMenuHandle {
250
+ show(options: ShowContextMenuOptions): void;
251
+ }
252
+ interface ContextMenuProps {
253
+ theme?: string;
254
+ animation?: string;
255
+ formatMessageProvider?: MessageFormatter$1;
256
+ onShow?: () => void;
257
+ onHide?: () => void;
258
+ onOpenChange?: (open: boolean) => void;
259
+ className?: string;
260
+ style?: React$1.CSSProperties;
261
+ }
262
+ interface ContextMenuAdapter {
263
+ Component: React$1.ForwardRefExoticComponent<ContextMenuProps & React$1.RefAttributes<ContextMenuHandle>>;
264
+ }
265
+ declare function useShowContextMenu(): (options: ShowContextMenuOptions) => void;
266
+
545
267
  /**
546
268
  * Structure representing localizable message descriptors used in context menus.
547
269
  */
548
- interface ContextMenuPredefinedMessage {
270
+ interface MessageDescriptor {
549
271
  /** Translation dictionary key. */
550
272
  id: string;
551
273
  /** Fallback label text if translation key is missing. */
@@ -554,7 +276,7 @@ interface ContextMenuPredefinedMessage {
554
276
  values?: Record<string, string | number>;
555
277
  }
556
278
  /** Function type interface responsible for resolving localizable messages to flat strings. */
557
- type MessageFormatter = (msg: ContextMenuPredefinedMessage) => string;
279
+ type MessageFormatter = (msg: MessageDescriptor) => string;
558
280
  /** Orientation modifier indicating split directions. */
559
281
  type SplitOrientation = 'horizontal' | 'vertical';
560
282
  /** The four cardinal directions a panel can be docked relative to another. */
@@ -635,8 +357,8 @@ interface PanelInfo {
635
357
  /** Unique panel identifier. */
636
358
  id: string;
637
359
  /** Plain text label or localizable message descriptor. */
638
- title: string | ContextMenuPredefinedMessage;
639
- /** String matching the component registration ID in the {@link PanelRegistry}. */
360
+ title: string | MessageDescriptor;
361
+ /** String matching the component registration ID in the workspace's {@link PanelRegistry}. */
640
362
  component: string;
641
363
  /** Current workspace placement mode. */
642
364
  state: 'docked' | 'floating' | 'minimized';
@@ -658,7 +380,7 @@ interface PanelInfo {
658
380
  dirtyOptions?: DirtyStateOptions;
659
381
  /** Custom per-instance data passed via `openPanel(id, component, { props })`. Unconstrained —
660
382
  * any value is accepted, but only a value that passes {@link isSerializable} is actually
661
- * included in {@link WindowActions.saveLayout}'s output. See {@link PanelInfo.serializable}. */
383
+ * included in {@link WorkspaceActions.saveLayout}'s output. See {@link PanelInfo.serializable}. */
662
384
  props?: Record<string, unknown>;
663
385
  /** Whether this panel's current `props` can round-trip through `saveLayout()`/`loadLayout()`.
664
386
  * Computed automatically — `true` when no `props` were passed, or when they were and passed
@@ -668,15 +390,15 @@ interface PanelInfo {
668
390
  serializable: boolean;
669
391
  /** Optional dedup key. If another open panel of the same `component` already has this exact
670
392
  * key, `openPanel` focuses that existing panel instead of creating a new one — see
671
- * {@link WindowActions.openPanel}'s `dedupeKey` option and {@link WindowActions.findPanelId}. */
393
+ * {@link WorkspaceActions.openPanel}'s `dedupeKey` option and {@link WorkspaceActions.findPanelId}. */
672
394
  dedupeKey?: string;
673
395
  }
674
396
  /**
675
- * Options accepted by {@link WindowActions.openPanel}.
397
+ * Options accepted by {@link WorkspaceActions.openPanel}.
676
398
  */
677
399
  interface OpenPanelOptions<P extends object = Record<string, unknown>> {
678
400
  /** Override the panel tab/window title. Accepts a plain string or an i18n message descriptor. */
679
- title?: string | ContextMenuPredefinedMessage;
401
+ title?: string | MessageDescriptor;
680
402
  /** Initial placement: `'floating'`, `'docked'` (default when a grid exists), or `'tabbed'`. */
681
403
  initialTarget?: 'floating' | 'docked' | 'tabbed';
682
404
  /** Pin the new floating window to a workspace corner on creation. Has no effect when
@@ -698,14 +420,14 @@ interface OpenPanelOptions<P extends object = Record<string, unknown>> {
698
420
  * passed to *this* call are ignored in that case, the same way re-opening an already-open exact
699
421
  * `id` already focuses it instead of duplicating it. Use this when multiple call sites might
700
422
  * not agree on the same literal `id` for what is semantically the same entity (e.g. "the panel
701
- * for the document at this path"). See also {@link WindowActions.findPanelId}.
423
+ * for the document at this path"). See also {@link WorkspaceActions.findPanelId}.
702
424
  */
703
425
  dedupeKey?: string;
704
426
  }
705
427
  /**
706
428
  * Global window manager state tree representing grid nodes, windows, and panels.
707
429
  */
708
- interface WindowState {
430
+ interface WorkspaceState {
709
431
  /** Root branch node representing the grid. */
710
432
  gridRoot: LayoutNode;
711
433
  /** Array of active floated windows. */
@@ -713,7 +435,7 @@ interface WindowState {
713
435
  /** Array of minimized panels waiting in the taskbar dock. */
714
436
  minimized: {
715
437
  id: string;
716
- title: string | ContextMenuPredefinedMessage;
438
+ title: string | MessageDescriptor;
717
439
  component: string;
718
440
  }[];
719
441
  /** Map indexing panel metadata descriptors. */
@@ -722,7 +444,7 @@ interface WindowState {
722
444
  draggedPanelId: string | null;
723
445
  /**
724
446
  * The ID of the active/focused panel — the one contributions are read from
725
- * (see `useActivePanelContribution`) and the one drawn with focused chrome.
447
+ * (see `useActiveContribution`) and the one drawn with focused chrome.
726
448
  *
727
449
  * Always a panel the user can actually see: the selected tab of its leaf, or a floating
728
450
  * window. Never a minimized panel, except when an app explicitly calls `focusPanel()` on
@@ -740,22 +462,20 @@ interface WindowState {
740
462
  edgeSplitRatio: number;
741
463
  }
742
464
  /**
743
- * All layout mutation methods, event bus handles, and serialization methods
744
- * exposed by the `WindowManagerProvider`.
465
+ * Every layout action, the event bus, and layout serialization — the methods of a workspace.
745
466
  *
746
- * Obtain this object via {@link useWindowManagerActions} inside a component,
747
- * or via {@link WorkspaceClient} methods from outside the React tree.
467
+ * Call them on the workspace from `useWorkspace()` inside a component, or on the object
468
+ * `createWorkspace()` returned, from anywhere.
748
469
  *
749
- * @group Hooks
750
470
  * @example
751
471
  * ```tsx
752
- * function MyToolbar() {
753
- * const actions = useWindowManagerActions();
754
- * return <button onClick={() => actions.openPanel('map-1', 'map')}>Open Map</button>;
472
+ * function OpenMapButton() {
473
+ * const { openPanel } = useWorkspace();
474
+ * return <button onClick={() => openPanel('map-1', 'map')}>Open Map</button>;
755
475
  * }
756
476
  * ```
757
477
  */
758
- interface WindowActions {
478
+ interface WorkspaceActions {
759
479
  /**
760
480
  * Opens a registered panel into the workspace.
761
481
  * If the panel ID is already open, the panel is focused instead of duplicated.
@@ -991,7 +711,7 @@ interface WindowActions {
991
711
  * @param id - Panel instance ID.
992
712
  * @param title - New title string or localizable message descriptor.
993
713
  */
994
- updatePanelTitle: (id: string, title: string | ContextMenuPredefinedMessage) => void;
714
+ updatePanelTitle: (id: string, title: string | MessageDescriptor) => void;
995
715
  /**
996
716
  * Closes a panel, first running any registered close guards.
997
717
  * If the panel is dirty, shows the built-in unsaved-changes confirmation dialog.
@@ -1015,13 +735,29 @@ interface WindowActions {
1015
735
  setDirection: (dir: 'ltr' | 'rtl') => void;
1016
736
  /**
1017
737
  * Imperatively shows the workspace context menu at the given position.
1018
- * Delegates to the active {@link ContextMenuProvider}, so custom adapters
1019
- * and externally-placed providers are respected automatically.
738
+ * Uses the workspace's context menu (the `contextMenuAdapter` given to
739
+ * `<DockableDesktopProvider>`, or an enclosing `<RddContextMenu>`).
1020
740
  */
1021
741
  showContextMenu: (options: ShowContextMenuOptions) => void;
1022
742
  }
743
+ /**
744
+ * Extension of {@link WorkspaceActions} used internally by WindowManager components.
745
+ * `setActivePanel` is not part of the public API — it is a low-level tab-focus
746
+ * primitive used exclusively within this library's rendering layer.
747
+ * @internal
748
+ */
749
+ interface InternalWindowActions extends WorkspaceActions {
750
+ /** @internal */
751
+ setActivePanel: (id: string | null) => void;
752
+ /** @internal */
753
+ registerPanelContextMenu: (panelId: string, getItems: () => ContextMenuItem[]) => () => void;
754
+ /** @internal */
755
+ getPanelContextMenuItems: (panelId: string) => ContextMenuItem[];
756
+ /** @internal */
757
+ registerContextMenuFn: (fn: (options: ShowContextMenuOptions) => void) => () => void;
758
+ }
1023
759
  /** Represents custom CSS classes injected into layout parts. */
1024
- interface StyleClasses {
760
+ interface HostClasses {
1025
761
  modalClass?: string;
1026
762
  modalBodyClass?: string;
1027
763
  sidePanelClass?: string;
@@ -1030,24 +766,7 @@ interface StyleClasses {
1030
766
  windowBodyClass?: string;
1031
767
  }
1032
768
  /** Custom hook to read configured style class contexts. */
1033
- declare const useStyleClasses: () => StyleClasses;
1034
- /**
1035
- * React hook to read the scoped {@link PanelRegistryClass} for the current provider.
1036
- * When the provider was created with a {@link WorkspaceClient}, this returns the client's
1037
- * private registry. Otherwise it returns the global `PanelRegistry` singleton.
1038
- *
1039
- * @group Hooks
1040
- * @returns The panel registry instance in scope.
1041
- * @example
1042
- * ```tsx
1043
- * function MyComponent() {
1044
- * const registry = useRegistry();
1045
- * const entry = registry.get('map');
1046
- * return entry ? <entry.Component panelId="preview" /> : null;
1047
- * }
1048
- * ```
1049
- */
1050
- declare const useRegistry: () => PanelRegistryClass;
769
+ declare const useStyleClasses: () => HostClasses;
1051
770
  /** The on-disk shape produced by `saveLayout()` and accepted by `loadLayout()`/`initialState`. */
1052
771
  interface SerializedLayout {
1053
772
  /** Schema version — absent on layouts saved before this field was introduced (treated as 0). */
@@ -1056,7 +775,7 @@ interface SerializedLayout {
1056
775
  * The globally active panel at save time — the one the user was actually looking at.
1057
776
  *
1058
777
  * Omitted when nothing was active, and when the active panel didn't survive this snapshot's
1059
- * serializability pruning (see {@link WindowActions.saveLayout}) — so it never names a panel
778
+ * serializability pruning (see {@link WorkspaceActions.saveLayout}) — so it never names a panel
1060
779
  * absent from this payload's own `panels`. Absent on every layout saved before this field
1061
780
  * existed, in which case the restore derives it from `gridRoot`'s own per-leaf selection
1062
781
  * instead; a present-but-no-longer-valid value falls back to the same derivation. `version`
@@ -1068,72 +787,24 @@ interface SerializedLayout {
1068
787
  floating: FloatingWindow[];
1069
788
  minimized: {
1070
789
  id: string;
1071
- title: string | ContextMenuPredefinedMessage;
790
+ title: string | MessageDescriptor;
1072
791
  component: string;
1073
792
  }[];
1074
793
  panels: Record<string, PanelInfo>;
1075
794
  }
1076
- /**
1077
- * Props for `<DockableDesktopProvider>` and `<WindowManagerProvider>`.
1078
- * Also exported as `DockableDesktopProviderProps` for consumers who use
1079
- * the composite provider.
1080
- * @see DockableDesktopProviderProps
1081
- */
1082
- interface WindowManagerProviderProps {
1083
- children: React$1.ReactNode;
1084
- /** `WorkspaceClient` instance created outside the React tree. When provided, its panel
1085
- * registry and config take precedence over the individual props below. */
1086
- client?: WorkspaceClient;
1087
- /** Custom i18n formatter. Receives a `{ id, defaultMessage }` descriptor and returns
1088
- * the translated string. When omitted, `defaultMessage` is used as-is. */
1089
- formatMessage?: MessageFormatter;
1090
- /** Override the built-in predefined UI strings (confirm button labels, close tooltips, etc.).
1091
- * Merge with or replace `defaultPredefinedMessages` to localise system strings. */
1092
- predefinedMessages?: Record<string, ContextMenuPredefinedMessage>;
1093
- /** Layout direction. `'rtl'` mirrors all controls, tab order, and drop zones.
1094
- * Can also be changed at runtime via `WorkspaceClient.setDirection()`. @default 'ltr' */
1095
- dir?: 'ltr' | 'rtl';
1096
- /** CSS class applied to the outer wrapper element of every modal overlay. */
1097
- modalClass?: string;
1098
- /** CSS class applied to the inner content area of every modal overlay. */
1099
- modalBodyClass?: string;
1100
- /** CSS class applied to the outer wrapper of left/right side-panel drawers. */
1101
- sidePanelClass?: string;
1102
- /** CSS class applied to the inner content area of side-panel drawers. */
1103
- sidePanelBodyClass?: string;
1104
- /** CSS class applied to the outer wrapper of floating panel windows. */
1105
- windowClass?: string;
1106
- /** CSS class applied to the inner content area of floating panel windows. */
1107
- windowBodyClass?: string;
1108
- /**
1109
- * Starting z-index for floating windows and the library's own chrome overlays
1110
- * (context menu, toolbar flyout, modal stack, toast, workspace edge zones),
1111
- * all of which shift together via `--rdd-z-base`. Set this above/below a host
1112
- * app's own modal z-index range to control stacking against it. @default 1000
1113
- */
1114
- zIndexBase?: number;
795
+ /** @internal What a workspace store exposes: its actions, and a subscribable snapshot. */
796
+ interface WorkspaceCore {
797
+ actions: InternalWindowActions;
798
+ getSnapshot: () => WorkspaceState;
799
+ subscribeToState: (cb: () => void) => () => void;
800
+ /** Provider props fill in what the workspace's own config left unset (dir, zIndexBase). */
801
+ applyProviderDefaults: (defaults: {
802
+ dir?: 'ltr' | 'rtl';
803
+ zIndexBase?: number;
804
+ }) => void;
1115
805
  }
1116
- declare const WindowManagerProvider: React$1.FC<WindowManagerProviderProps>;
1117
- declare function useWindowManagerState(): WindowState;
1118
- declare function useWindowManagerState<T>(selector: (state: WindowState) => T): T;
1119
- /**
1120
- * React hook to retrieve all layout mutation actions.
1121
- * Returns the public {@link WindowActions} interface.
1122
- *
1123
- * @group Hooks
1124
- * @returns The full set of workspace mutation methods.
1125
- * @throws Error if used outside of a {@link WindowManagerProvider}.
1126
- * @example
1127
- * ```tsx
1128
- * function Toolbar() {
1129
- * const actions = useWindowManagerActions();
1130
- * return (
1131
- * <button onClick={() => actions.openPanel('map-1', 'map')}>Open Map</button>
1132
- * );
1133
- * }
1134
- * ```
1135
- */
1136
- declare const useWindowManagerActions: () => WindowActions;
806
+ declare function useWindowManagerState(): WorkspaceState;
807
+ declare function useWindowManagerState<T>(selector: (state: WorkspaceState) => T): T;
1137
808
  /**
1138
809
  * React hook to retrieve the active i18n formatter.
1139
810
  */
@@ -1141,36 +812,15 @@ declare const useFormatMessage: () => MessageFormatter;
1141
812
  /**
1142
813
  * Helper to resolve dynamic label strings or localizable descriptor objects into text.
1143
814
  */
1144
- declare const formatLabel: (label: string | ContextMenuPredefinedMessage | undefined, formatter: MessageFormatter) => string;
1145
- /**
1146
- * React hook providing pub-sub helper methods for inter-panel event messaging.
1147
- */
1148
- declare const usePanelContext: () => Pick<WindowActions, "publish" | "subscribe">;
815
+ declare const formatLabel: (label: string | MessageDescriptor | undefined, formatter: MessageFormatter) => string;
1149
816
  /**
1150
817
  * React hook to fetch the localizable predefined message map catalog.
1151
818
  */
1152
- declare const usePredefinedMessages: () => Record<PredefinedMessageKey, ContextMenuPredefinedMessage>;
1153
- /**
1154
- * React hook to retrieve the panel instance ID for the component currently rendered inside
1155
- * the dockable desktop. Works for docked, floating, modal, and side-panel containers.
1156
- * Opt-in — components that don't need the ID require no changes.
1157
- *
1158
- * @group Hooks
1159
- * @returns The unique panel instance ID string.
1160
- * @example
1161
- * ```tsx
1162
- * function MyPanel() {
1163
- * const panelId = usePanelId();
1164
- * const { closePanel } = useWindowManagerActions();
1165
- * return <button onClick={() => closePanel(panelId)}>Close</button>;
1166
- * }
1167
- * ```
1168
- */
1169
- declare const usePanelId: () => string;
819
+ declare const usePredefinedMessages: () => Record<MessageKey, MessageDescriptor>;
1170
820
  /**
1171
821
  * React hook for injecting custom context menu items into a panel's context menu from inside the panel component.
1172
822
  * Items are dynamic — the array is re-read each time the menu opens, so state-driven changes (enable/disable, add/remove) work automatically.
1173
- * The hook reads the panel ID internally via {@link usePanelId} — no prop needed.
823
+ * The hook knows which panel it is in — no id needed.
1174
824
  *
1175
825
  * @param items - Array of `ContextMenuItem` entries (simple items, separators, submenus).
1176
826
  * @example
@@ -1231,9 +881,9 @@ interface PanelRegistryEntry {
1231
881
  /**
1232
882
  * Registry mapping catalog entries to allow programmatic panel instantiation
1233
883
  * inside dynamic layout cells or floating windows.
1234
- * Exported so WorkspaceClient can create scoped, per-instance registries.
884
+ * Exported so `createWorkspace()` can create scoped, per-instance registries.
1235
885
  */
1236
- declare class PanelRegistryClass {
886
+ declare class PanelRegistry {
1237
887
  private registry;
1238
888
  /**
1239
889
  * Register a new component to the panel catalog registry.
@@ -1249,68 +899,228 @@ declare class PanelRegistryClass {
1249
899
  /**
1250
900
  * Returns a list of all registered panel entry identifiers.
1251
901
  */
1252
- getRegisteredIds(): string[];
1253
- }
1254
- /** Global singleton instance of the Panel Registry. */
1255
- declare const PanelRegistry: PanelRegistryClass;
1256
-
1257
- /**
1258
- * Props for `<DockableDesktopProvider>`.
1259
- * Extends `WindowManagerProviderProps` with workspace-level context menu configuration.
1260
- */
1261
- interface DockableDesktopProviderProps extends WindowManagerProviderProps {
902
+ getRegisteredIds(): string[];
903
+ }
904
+
905
+ /** Built-in lifecycle events always available on the workspace event bus. */
906
+ interface BuiltInEvents {
907
+ 'panel:opened': {
908
+ id: string;
909
+ component: string;
910
+ };
911
+ 'panel:closed': {
912
+ id: string;
913
+ };
914
+ 'panel:minimized': {
915
+ id: string;
916
+ };
917
+ 'panel:restored': {
918
+ id: string;
919
+ };
920
+ /**
921
+ * Fires whenever something `saveLayout()` would capture changes — open/close/minimize/restore,
922
+ * float/dock/re-order/dock-to-edge, closing a group, maximizing a minimized panel, and an
923
+ * `openPanel` `dedupeKey` redirect. Coalesces those into one signal for autosave-style
924
+ * consumers, so they don't need to subscribe to separate events. Does **not** cover a
925
+ * `registerStateProvider` callback's return value changing on its own — that's a pull, there's
926
+ * no way to observe it changing without the panel separately notifying — nor resize/split-ratio
927
+ * drag, which has no hook yet.
928
+ */
929
+ 'layout:changed': Record<string, never>;
930
+ /**
931
+ * Fires from inside `saveLayout()` itself, only when that specific call excluded at least one
932
+ * panel (a panel whose current `props` — static or from a `registerStateProvider` — failed
933
+ * {@link isSerializable}). A passive `PanelInfo.serializable` flag alone isn't enough for this:
934
+ * nobody may be polling it at the exact moment a save happens and something silently drops out
935
+ * (e.g. a floating window rendering data from a live class instance). This is deliberately just
936
+ * a signal, not a UI opinion — decide for yourself whether that becomes a toast, a console
937
+ * warning, or nothing.
938
+ */
939
+ 'layout:panels-excluded': {
940
+ panels: {
941
+ id: string;
942
+ component: string;
943
+ }[];
944
+ };
945
+ }
946
+ /** Per-panel definition supplied to `createWorkspace({ panels })`. */
947
+ interface PanelDefinition {
948
+ component: ComponentType<any>;
949
+ defaultOptions?: PanelRegistryEntry['defaultOptions'];
950
+ }
951
+ /** Configuration object accepted by `createWorkspace()`. */
952
+ interface WorkspaceClientConfig {
953
+ /**
954
+ * Declarative panel catalog. Replaces imperative globalPanelRegistry.register() calls.
955
+ * Keys are the component identifiers used in openPanel() and serialised layouts.
956
+ */
957
+ panels?: Record<string, PanelDefinition>;
958
+ /**
959
+ * Serialised layout produced by a previous saveLayout() call.
960
+ * Pass null or omit to start with an empty canvas.
961
+ *
962
+ * Parsed synchronously before the first render. The restored `activePanelId` is the one the
963
+ * snapshot recorded, or — for layouts saved before that was persisted — the selected tab of
964
+ * the first leaf in the grid.
965
+ */
966
+ initialState?: string | null;
967
+ /** Custom i18n formatter for all internal strings. */
968
+ formatMessage?: MessageFormatter;
969
+ /** Override any subset of the built-in predefined message catalog. */
970
+ predefinedMessages?: Record<string, MessageDescriptor>;
971
+ /** Initial layout direction. */
972
+ dir?: 'ltr' | 'rtl';
973
+ /**
974
+ * Fraction of the target panel the new panel takes when dropped on a panel's
975
+ * top/bottom/left/right cross target. Range 0.1–0.9. Default: 0.5.
976
+ */
977
+ defaultSplitRatio?: number;
978
+ /**
979
+ * Fraction of the workspace the new panel takes when dropped on the workspace
980
+ * outer edge. Range 0.1–0.9. Default: 0.2.
981
+ */
982
+ defaultEdgeSplitRatio?: number;
1262
983
  /**
1263
- * Context menu adapter for the workspace-level `ContextMenuProvider`.
1264
- * Defaults to `DefaultContextMenuAdapter`. Ignored if a `<ContextMenuProvider>`
1265
- * already exists above `<DockableDesktopProvider>` in the tree.
984
+ * Starting z-index for floating windows and the library's own chrome overlays
985
+ * (context menu, toolbar flyout, modal stack, toast, workspace edge zones),
986
+ * all of which shift together via `--rdd-z-base`. Set this above/below a host
987
+ * app's own modal z-index range to control stacking against it. Default: 1000.
1266
988
  */
1267
- contextMenuAdapter?: ContextMenuAdapter;
989
+ zIndexBase?: number;
1268
990
  }
1269
991
  /**
1270
- * Composite provider that wraps `WindowManagerProvider`, `PanelProvider`, `ToolbarProvider`,
1271
- * and `PanelContributionProvider` in the correct order, and mounts the workspace-level
1272
- * `ContextMenuProvider` so that
1273
- * `showContextMenu()` and `useShowContextMenu()` work from any component in the tree —
1274
- * including siblings of `<WindowManager>` such as `<Sidebar>`, `<SidePanelRenderer>`,
1275
- * and `<ModalStackRenderer>`.
992
+ * A workspace: the layout, every action on it, the panel registry and the event bus. Create one
993
+ * with `createWorkspace()` outside the React tree and pass it to
994
+ * `<DockableDesktopProvider workspace={…}>`; inside the tree, `useWorkspace()` returns it.
1276
995
  *
1277
- * Drop-in replacement for manually nesting both providers.
996
+ * Pattern: TanStack QueryClient / Redux store — configuration and imperative access live on the
997
+ * workspace; rendering is delegated to the thin React provider.
1278
998
  *
1279
- * `WindowManagerProvider` and `PanelProvider` remain independently exported
1280
- * for cases that require custom nesting or separate configuration.
999
+ * @remarks
1000
+ * The workspace is live from the moment it is created: calls made before any provider mounts
1001
+ * apply immediately, and a provider that mounts later shows the result.
1281
1002
  *
1282
1003
  * @example
1283
- * ```tsx
1284
- * <DockableDesktopProvider client={workspace}>
1285
- * <Sidebar>
1286
- * <WindowManager />
1287
- * </Sidebar>
1288
- * <SidePanelRenderer />
1289
- * <ModalStackRenderer />
1290
- * </DockableDesktopProvider>
1291
- * ```
1292
- */
1293
- declare const DockableDesktopProvider: React$1.FC<DockableDesktopProviderProps>;
1294
-
1295
- /**
1296
- * Recursively checks whether a value can round-trip through `JSON.stringify`/`JSON.parse`
1297
- * without silently losing information.
1298
- *
1299
- * Deliberately **not** a `JSON.stringify` try/catch — that call doesn't throw for the actual
1300
- * failure case this guards against: a function-valued property is simply dropped by
1301
- * `JSON.stringify`, not rejected. This walks the value tree instead, returning `false` as soon as
1302
- * it finds a function, symbol, `undefined`, React element, or any non-plain object (a class
1303
- * instance, `Map`, `Set`, `RegExp`, etc.).
1004
+ * const workspace = createWorkspace<MyEvents>({
1005
+ * panels: {
1006
+ * map: { component: MapPanel },
1007
+ * editor: { component: EditorPanel, defaultOptions: { title: 'Code Editor' } },
1008
+ * },
1009
+ * initialState: localStorage.getItem('layout'),
1010
+ * });
1304
1011
  *
1305
- * `Date` is treated as an explicit exception — serializable-enough, matching `JSON.stringify`'s
1306
- * own behavior — even though it doesn't round-trip back to a `Date` instance on parse. That's a
1307
- * smaller, more tolerable gotcha than a silently-vanishing function, so it's documented rather
1308
- * than treated as a disqualifying case.
1012
+ * <DockableDesktopProvider workspace={workspace}>
1013
+ * <RddDesktop />
1014
+ * </DockableDesktopProvider>
1309
1015
  *
1310
- * Used to decide whether a docked/floating panel's `props` can be included in
1311
- * `WorkspaceClient.saveLayout()`'s output — see {@link PanelInfo.serializable}.
1016
+ * // Imperative access from anywhere:
1017
+ * workspace.saveLayout();
1018
+ * workspace.openPanel('map-1', 'map');
1019
+ * workspace.focusPanel('map-1');
1312
1020
  */
1313
- declare function isSerializable(value: unknown): boolean;
1021
+ declare class WorkspaceClient<TUserEvents extends object = Record<string, unknown>> {
1022
+ /** Scoped panel registry — fully independent from the global singleton. */
1023
+ readonly registry: PanelRegistry;
1024
+ /** Serialised layout to restore on mount, or null to start with an empty canvas. */
1025
+ readonly initialState: string | null;
1026
+ /** Non-rendering configuration forwarded to the provider. */
1027
+ readonly config: Pick<WorkspaceClientConfig, 'formatMessage' | 'predefinedMessages' | 'dir' | 'defaultSplitRatio' | 'defaultEdgeSplitRatio' | 'zIndexBase'>;
1028
+ /** @internal The workspace store. Live from construction; a provider only subscribes to it. */
1029
+ readonly _core: WorkspaceCore;
1030
+ /** The store's actions, to which every method below forwards. */
1031
+ private get _actions();
1032
+ constructor(config?: WorkspaceClientConfig);
1033
+ private _dispatch;
1034
+ private _subscribeRaw;
1035
+ openPanel(...args: Parameters<WorkspaceActions['openPanel']>): void;
1036
+ closePanel(id: string): void;
1037
+ minimizePanel(id: string): void;
1038
+ restorePanel(...args: Parameters<WorkspaceActions['restorePanel']>): void;
1039
+ floatPanel(...args: Parameters<WorkspaceActions['floatPanel']>): void;
1040
+ dockPanel(...args: Parameters<WorkspaceActions['dockPanel']>): void;
1041
+ maximizePanel(id: string): void;
1042
+ /**
1043
+ * Activates the given panel regardless of its current state.
1044
+ * For floating panels: raises z-index so the window appears on top.
1045
+ * For docked panels: selects the tab within its leaf group.
1046
+ */
1047
+ focusPanel(id: string): void;
1048
+ /** Returns `true` if a panel with this ID is currently open. */
1049
+ isOpen(id: string): boolean;
1050
+ /** Returns the IDs of all currently open panels. */
1051
+ getOpenPanelIds(): string[];
1052
+ /** Finds an already-open panel of the given component with a matching `dedupeKey` (set via
1053
+ * `openPanel`'s `dedupeKey` option). Returns `null` if none is open. */
1054
+ findPanelId(component: string, dedupeKey: string): string | null;
1055
+ saveLayout(): string;
1056
+ loadLayout(json: string): boolean;
1057
+ setDirection(dir: 'ltr' | 'rtl'): void;
1058
+ /** Updates the split-size fractions at the given grid path. */
1059
+ updateSplitSizes(path: number[], sizes: number[]): void;
1060
+ /** Updates position/size/anchor of a floating panel. */
1061
+ updateFloatingPosition(id: string, updates: Partial<Pick<FloatingWindow, 'x' | 'y' | 'width' | 'height' | 'anchor'>>): void;
1062
+ /** @internal Drives the drag-in-progress visual state; normally only the library's own drag UI calls this. */
1063
+ setDraggedPanelId(id: string | null): void;
1064
+ /** Docks a panel into an existing leaf group at the given drop position. */
1065
+ dockPanelToGroup(id: string, targetLeafId: string, position: DropPosition): void;
1066
+ /** Reorders a panel's tab within its leaf group. */
1067
+ movePanelOrder(panelId: string, targetLeafId: string, targetIndex: number): void;
1068
+ /**
1069
+ * Closes a leaf group: each of its tabs is closed through the guarded close path, then the
1070
+ * group is removed once empty. A tab whose close guard refuses — or a dirty tab that
1071
+ * `onConfirm` doesn't approve — stays open, and so does its group.
1072
+ * Resolves once every close request has been settled.
1073
+ */
1074
+ closeLeafGroup(leafId: string, options?: {
1075
+ onConfirm?: (opts?: DirtyStateOptions) => Promise<boolean>;
1076
+ }): Promise<void>;
1077
+ /** Registers a guard that can veto closing the given panel. */
1078
+ registerCloseGuard(id: string, guard: () => boolean | Promise<boolean>): void;
1079
+ /** Removes a previously registered close guard. */
1080
+ unregisterCloseGuard(id: string): void;
1081
+ /** Registers a callback reporting a panel's current restorable state, pulled fresh on every
1082
+ * `saveLayout()` call — see {@link BuiltInEvents}'s `'layout:panels-excluded'` doc and
1083
+ * `FormContainerContract.registerStateProvider`. */
1084
+ registerStateProvider(id: string, provider: () => unknown): void;
1085
+ /** Removes a previously registered state provider. */
1086
+ unregisterStateProvider(id: string): void;
1087
+ /** Sets/clears a panel's dirty (unsaved changes) flag. */
1088
+ setPanelDirty(id: string, dirty: boolean, options?: DirtyStateOptions): void;
1089
+ /** Updates a panel's displayed title. */
1090
+ updatePanelTitle(id: string, title: string | MessageDescriptor): void;
1091
+ /**
1092
+ * Requests that a panel close, honoring its dirty flag and any registered close guard.
1093
+ * Resolves once the close (or user cancellation) has been resolved.
1094
+ */
1095
+ requestClosePanel(id: string, options?: {
1096
+ force?: boolean;
1097
+ onConfirm?: (opts?: DirtyStateOptions) => Promise<boolean>;
1098
+ }): Promise<void>;
1099
+ /** Docks a panel to one of the workspace's outer edges. */
1100
+ dockPanelToWorkspaceEdge(id: string, position: SplitDirection): void;
1101
+ /** Shows a context menu using the app's configured ContextMenuAdapter. */
1102
+ showContextMenu(options: ShowContextMenuOptions): void;
1103
+ publish<K extends keyof (TUserEvents & BuiltInEvents)>(event: K, data: (TUserEvents & BuiltInEvents)[K]): void;
1104
+ subscribe<K extends keyof (TUserEvents & BuiltInEvents)>(event: K, callback: (data: (TUserEvents & BuiltInEvents)[K]) => void): () => void;
1105
+ /** Subscribe to panel open events. Fires only for newly created panels. */
1106
+ onPanelOpen(callback: (id: string, component: string) => void): () => void;
1107
+ /** Subscribe to panel close events. */
1108
+ onPanelClose(callback: (id: string) => void): () => void;
1109
+ /** Subscribe to panel minimize events. */
1110
+ onPanelMinimize(callback: (id: string) => void): () => void;
1111
+ /** Subscribe to panel restore events. */
1112
+ onPanelRestore(callback: (id: string) => void): () => void;
1113
+ /** Subscribe to the coalesced layout-change signal — see {@link BuiltInEvents}'s
1114
+ * `'layout:changed'` doc for exactly what it covers (and doesn't). */
1115
+ onLayoutChanged(callback: () => void): () => void;
1116
+ /** Subscribe to notification that a `saveLayout()` call excluded one or more panels because
1117
+ * their current props weren't serializable — see {@link BuiltInEvents}'s
1118
+ * `'layout:panels-excluded'` doc. */
1119
+ onPanelsExcluded(callback: (panels: {
1120
+ id: string;
1121
+ component: string;
1122
+ }[]) => void): () => void;
1123
+ }
1314
1124
 
1315
1125
  /**
1316
1126
  * Options used when requesting to close a container.
@@ -1322,88 +1132,7 @@ interface CloseOptions {
1322
1132
  /** Represents the type of container context a panel/form is currently rendered inside. */
1323
1133
  type ContainerType = 'left-panel' | 'right-panel' | 'modal' | 'dockable-panel' | 'floating-window' | 'standalone';
1324
1134
  /**
1325
- * Contract interface exposed by a container (like a tab, window, modal, or side-panel)
1326
- * to its children forms, enabling them to control or listen to container events.
1327
- */
1328
- interface FormContainerContract {
1329
- /** Request the container to close itself. Bypassed by default unless options.force is true. */
1330
- requestClose: (options?: CloseOptions) => void;
1331
- /** Mark the form's content as dirty (having unsaved changes), triggering alert dialogs on close. */
1332
- setDirty: (dirty: boolean, options?: DirtyStateOptions) => void;
1333
- /** Register a custom close guard handler. Returning false or a promise resolving to false blocks closing. */
1334
- onCloseRequested: (handler: () => boolean | Promise<boolean>) => (() => void);
1335
- /**
1336
- * Registers a callback reporting this panel's *current* restorable state, pulled fresh by
1337
- * `WorkspaceClient.saveLayout()` every time it's called — for panels whose static open-time
1338
- * props can't capture state accumulated after opening (scroll position, an in-progress edit, a
1339
- * view-mode toggle). Only meaningful for docked/floating panels — left/right side panels and
1340
- * modals already have a complete answer to this via `openLeftPanel`/`openRightPanel`/
1341
- * `openModal`'s own `props` argument plus `updateInstance`, so this is `undefined` there.
1342
- * The returned value must be synchronous — `saveLayout()` itself never returns a `Promise`.
1343
- * Return `undefined` to fall back to the static `props` this panel was opened with.
1344
- */
1345
- registerStateProvider?: (getState: () => unknown) => (() => void);
1346
- /** Change the display title of the containing tab or window dynamically. */
1347
- setTitle: (title: string | {
1348
- id: string;
1349
- defaultMessage: string;
1350
- values?: Record<string, any>;
1351
- }) => void;
1352
- /** Change the tab or window icon dynamically. */
1353
- setIcon?: (icon: React.ReactNode) => void;
1354
- /** The type of container the panel is mounted in. Reflects the state at mount time; subscribe to {@link onContainerTypeChange} for live updates. */
1355
- containerType?: ContainerType;
1356
- /** Unique identifier of the panel or window instance. */
1357
- instanceId: string;
1358
- /** Subscribe to the container's close event. Returns an unsubscribe function. */
1359
- onClose?: (handler: () => void) => () => void;
1360
- /** Subscribe to the container's minimize event. Returns an unsubscribe function. */
1361
- onMinimize?: (handler: () => void) => () => void;
1362
- /** Subscribe to the container's restore event. Returns an unsubscribe function. */
1363
- onRestore?: (handler: () => void) => () => void;
1364
- /** Subscribe to the container's window resize event, returning width and height. Returns an unsubscribe function. */
1365
- onResize?: (handler: (width: number, height: number) => void) => () => void;
1366
- /** Request the container to minimize itself to the taskbar. No-op if the container type does not support minimize. */
1367
- requestMinimize?: () => void;
1368
- /** Returns the current rendered dimensions of this panel, or `null` if the panel has not been laid out yet. */
1369
- getDimensions?: () => {
1370
- width: number;
1371
- height: number;
1372
- } | null;
1373
- /**
1374
- * Subscribe to this panel becoming the globally active panel.
1375
- * Fires when `activePanelId` transitions to this panel's id.
1376
- * Returns an unsubscribe function.
1377
- */
1378
- onActivate?: (handler: () => void) => () => void;
1379
- /**
1380
- * Subscribe to this panel losing active status.
1381
- * Fires when `activePanelId` transitions away from this panel's id,
1382
- * and also fires if the panel is destroyed while it is active.
1383
- * Returns an unsubscribe function.
1384
- */
1385
- onDeactivate?: (handler: () => void) => () => void;
1386
- /**
1387
- * Subscribe to changes in the panel's container type (e.g. docked ↔ floating).
1388
- * Does not fire for minimize/restore cycles — use {@link onMinimize} / {@link onRestore} for those.
1389
- * Returns an unsubscribe function.
1390
- */
1391
- onContainerTypeChange?: (handler: (type: ContainerType) => void) => () => void;
1392
- }
1393
- /**
1394
- * Context that supplies the {@link FormContainerContract} to panels inside the Window Manager.
1395
- */
1396
- declare const FormContainerContext: Context<FormContainerContract>;
1397
- declare const FormContainerProvider: Provider<FormContainerContract>;
1398
- /**
1399
- * React hook to retrieve the current {@link FormContainerContract} from context.
1400
- * Enables sub-forms to trigger close/minimize requests, mark themselves dirty,
1401
- * rename their tabs, query dimensions, or subscribe to lifecycle events
1402
- * (resize, close, minimize, restore, activate, deactivate, container-type changes).
1403
- */
1404
- declare const useFormContainer: () => FormContainerContract;
1405
- /**
1406
- * Reactive alternative to calling {@link FormContainerContract.getDimensions} yourself.
1135
+ * Reactive alternative to measuring the panel's container yourself.
1407
1136
  * Returns the panel's current `{ width, height }`, or `null` before it has been laid
1408
1137
  * out, and re-renders whenever the panel's rendered box changes — including resizes
1409
1138
  * caused by the workspace itself (a grid split being dragged, docking, floating, or
@@ -1415,7 +1144,7 @@ declare const usePanelSize: () => {
1415
1144
  } | null;
1416
1145
 
1417
1146
  /** Unique string identifier for panel/modal instances. */
1418
- type PanelInstanceId = string;
1147
+ type OverlayId = string;
1419
1148
  /**
1420
1149
  * Descriptor object for localizable panel titles, supporting context translation systems.
1421
1150
  */
@@ -1464,9 +1193,9 @@ interface ModalOptions {
1464
1193
  /**
1465
1194
  * Represents a rendered instance of a panel or modal in the layout.
1466
1195
  */
1467
- interface PanelInstance {
1196
+ interface OverlayInstance {
1468
1197
  /** Unique ID generated for this instance. */
1469
- id: PanelInstanceId;
1198
+ id: OverlayId;
1470
1199
  /** React Component to mount inside the panel. */
1471
1200
  Component: ComponentType<any>;
1472
1201
  /** Property props passed to the Component. */
@@ -1481,89 +1210,276 @@ interface PanelInstance {
1481
1210
  dirtyOptions?: DirtyStateOptions;
1482
1211
  }
1483
1212
  /** Stores the active layout structures for floating overlays. */
1484
- interface PanelState {
1213
+ interface OverlayState {
1485
1214
  /** The currently open left drawer panel instance, or null. */
1486
- leftPanel: PanelInstance | null;
1215
+ leftPanel: OverlayInstance | null;
1487
1216
  /** The currently open right drawer panel instance, or null. */
1488
- rightPanel: PanelInstance | null;
1217
+ rightPanel: OverlayInstance | null;
1489
1218
  /** Stack containing all active floating modal instances. */
1490
- modals: PanelInstance[];
1491
- }
1492
- /** Exposes methods to trigger state actions on drawers and modals. */
1493
- interface PanelActions {
1494
- /** Mounts a panel in the left-side container drawer. */
1495
- openLeftPanel: <P extends object>(Component: ComponentType<P>, props: P, options?: SidePanelOptions) => Promise<PanelInstanceId | null>;
1496
- /** Mounts a panel in the right-side container drawer. */
1497
- openRightPanel: <P extends object>(Component: ComponentType<P>, props: P, options?: SidePanelOptions) => Promise<PanelInstanceId | null>;
1498
- /** Pushes a new modal component instance to the top of the stack. */
1499
- openModal: <P extends object>(Component: ComponentType<P>, props: P, options?: ModalOptions) => PanelInstanceId;
1500
- /** Closes an instance by ID. */
1501
- close: (id: PanelInstanceId) => void;
1502
- /** Closes all drawers and modals in a single action. */
1503
- closeAll: () => void;
1504
- /** Closes all open modals. */
1505
- closeAllModals: () => void;
1506
- /** Retrieves metadata for an active instance by ID. */
1507
- getInstance: (id: PanelInstanceId) => PanelInstance | undefined;
1508
- /** Updates the props, configuration options, or dirty flag of an active panel. */
1509
- updateInstance: (id: PanelInstanceId, updates: Partial<Pick<PanelInstance, 'props' | 'options' | 'dirty' | 'dirtyOptions'>>) => void;
1510
- /** Flags an instance as dirty (contains unsaved changes). */
1511
- setDirty: (id: PanelInstanceId, dirty: boolean, options?: DirtyStateOptions) => void;
1512
- /** Subscribes a custom close confirmation intercept handler. */
1513
- registerCloseHandler: (id: PanelInstanceId, handler: () => Promise<boolean>) => void;
1514
- /** Unsubscribes close confirmation handler. */
1515
- unregisterCloseHandler: (id: PanelInstanceId) => void;
1219
+ modals: OverlayInstance[];
1220
+ }
1221
+
1222
+ /**
1223
+ * The 7.0 public API layer: `createWorkspace()`, the hooks a panel or an app component uses, and
1224
+ * the two components that replace several 6.x ones (`RddSidePanels`, `RddContextMenu`).
1225
+ *
1226
+ * Everything here is built on the library's internal modules; `src/index.ts` exports it together
1227
+ * with the internal components under their 7.0 names.
1228
+ */
1229
+
1230
+ /** Configuration for {@link createWorkspace}. */
1231
+ interface WorkspaceConfig extends Omit<WorkspaceClientConfig, 'predefinedMessages'> {
1232
+ /** Overrides any subset of the built-in message table. */
1233
+ messages?: Record<string, MessageDescriptor>;
1516
1234
  }
1517
1235
  /**
1518
- * PanelProvider component manages the state and action handlers
1519
- * for drawers (left/right) and active stacked modal overlays.
1236
+ * A workspace: the layout, every action on it, the panel registry and the event bus. It is live
1237
+ * from the moment it is created — calls made before any `<DockableDesktopProvider>` mounts apply
1238
+ * immediately.
1520
1239
  */
1521
- declare const PanelProvider: React$1.FC<{
1522
- children: ReactNode;
1523
- }>;
1240
+ interface Workspace<TEvents extends object = Record<string, unknown>> extends WorkspaceClient<TEvents> {
1241
+ }
1524
1242
  /**
1525
- * React hook to retrieve the active floating/drawer panels state.
1526
- * @throws Error if used outside of a {@link PanelProvider}.
1243
+ * Creates a workspace. Pass it to `<DockableDesktopProvider workspace={…}>`.
1244
+ *
1245
+ * @example
1246
+ * ```ts
1247
+ * interface AppEvents { 'layer:select': { layerId: string } }
1248
+ * export const workspace = createWorkspace<AppEvents>({
1249
+ * panels: { map: { component: MapPanel } },
1250
+ * initialState: localStorage.getItem('layout'),
1251
+ * });
1252
+ * ```
1527
1253
  */
1528
- declare const usePanelState: () => PanelState;
1254
+ declare function createWorkspace<TEvents extends object = Record<string, unknown>>(config?: WorkspaceConfig): Workspace<TEvents>;
1529
1255
  /**
1530
- * React hook to retrieve actions enabling drawer toggles and modal push actions.
1531
- * @throws Error if used outside of a {@link PanelProvider}.
1256
+ * The workspace of the nearest `<DockableDesktopProvider>`. A stable object: it never changes, so
1257
+ * a component that only calls actions never re-renders because of it.
1532
1258
  */
1533
- declare const usePanelActions: () => PanelActions;
1534
-
1259
+ declare function useWorkspace<TEvents extends object = Record<string, unknown>>(): Workspace<TEvents>;
1260
+ /** The state of a workspace panel: where it is. */
1261
+ type PanelState = PanelInfo['state'];
1262
+ /** What a panel component knows about, and can do to, its own container. See {@link usePanel}. */
1263
+ interface PanelHandle {
1264
+ /** This panel's instance id. */
1265
+ id: string;
1266
+ /** Where it is rendered. Updates live (a docked panel that is floated re-renders as `'floating-window'`). */
1267
+ containerType: ContainerType;
1268
+ /** A workspace panel that is the globally active one. Always false in a modal or drawer. */
1269
+ isActive: boolean;
1270
+ /** A workspace panel that is minimized to the taskbar. */
1271
+ isMinimized: boolean;
1272
+ /** A workspace panel shown as a floating window. */
1273
+ isFloating: boolean;
1274
+ /** Asks the container to close, honouring close guards and the dirty flag. */
1275
+ close: (options?: CloseOptions) => void;
1276
+ /** Minimizes a workspace panel. No effect in a modal or drawer. */
1277
+ minimize: () => void;
1278
+ /** Marks the panel as having unsaved changes. */
1279
+ setDirty: (dirty: boolean, options?: DirtyStateOptions) => void;
1280
+ /** Changes the title shown on the tab, window or modal. */
1281
+ setTitle: (title: string | MessageDescriptor) => void;
1282
+ /** Changes the icon shown on the tab or window. */
1283
+ setIcon: (icon: React$1.ReactNode) => void;
1284
+ }
1285
+ /**
1286
+ * The panel's own container: its id, where it is, and what it can do. Works in docked panels,
1287
+ * floating windows, modals and side drawers.
1288
+ */
1289
+ declare function usePanel(): PanelHandle;
1290
+ /** Lifecycle callbacks for {@link usePanelEvents}. Each is called at the moment it describes. */
1291
+ interface PanelEvents {
1292
+ onActivate?: () => void;
1293
+ onDeactivate?: () => void;
1294
+ onMinimize?: () => void;
1295
+ onRestore?: () => void;
1296
+ onClose?: () => void;
1297
+ onResize?: (width: number, height: number) => void;
1298
+ onContainerTypeChange?: (type: ContainerType) => void;
1299
+ }
1535
1300
  /**
1536
- * ModalStackRenderer component acts as the global container rendering
1537
- * all active stacked modal windows in the workspace.
1301
+ * Subscribes to the panel's lifecycle. Call it at the top level of the panel component; it always
1302
+ * calls the latest callbacks passed in and cleans up on unmount — no dependency array.
1538
1303
  */
1539
- declare const ModalStackRenderer: React$1.FC;
1304
+ declare function usePanelEvents(events: PanelEvents): void;
1305
+ /**
1306
+ * Registers a close guard: resolve `false` to keep the panel open (ask the user, save first, …).
1307
+ * Pass `null` to register none. Always calls the latest guard passed in.
1308
+ */
1309
+ declare function useBeforeClose(guard: (() => boolean | Promise<boolean>) | null): void;
1310
+ /**
1311
+ * Reports the panel's restorable state, pulled fresh on every `saveLayout()` and saved as the
1312
+ * panel's props. Pass `null` to report none. Always calls the latest function passed in.
1313
+ */
1314
+ declare function useSaveState(getState: (() => unknown) | null): void;
1315
+ type OverlayUpdate = Partial<Pick<OverlayInstance, 'props' | 'options' | 'dirty' | 'dirtyOptions'>>;
1316
+ /** Returned by {@link useModals}. */
1317
+ interface ModalsApi {
1318
+ /** Open modals, bottom to top. */
1319
+ stack: OverlayInstance[];
1320
+ /** The top modal, or null. */
1321
+ topmost: OverlayInstance | null;
1322
+ open: <P extends object>(component: React$1.ComponentType<P>, props: P, options?: ModalOptions) => OverlayId;
1323
+ close: (id: OverlayId) => void;
1324
+ closeAll: () => void;
1325
+ get: (id: OverlayId) => OverlayInstance | undefined;
1326
+ update: (id: OverlayId, updates: OverlayUpdate) => void;
1327
+ setDirty: (id: OverlayId, dirty: boolean, options?: DirtyStateOptions) => void;
1328
+ }
1329
+ /** Returned by {@link useSidePanels}. */
1330
+ interface SidePanelsApi {
1331
+ left: OverlayInstance | null;
1332
+ right: OverlayInstance | null;
1333
+ openLeft: <P extends object>(component: React$1.ComponentType<P>, props: P, options?: SidePanelOptions) => Promise<OverlayId | null>;
1334
+ openRight: <P extends object>(component: React$1.ComponentType<P>, props: P, options?: SidePanelOptions) => Promise<OverlayId | null>;
1335
+ close: (id: OverlayId) => void;
1336
+ /** Closes both drawers. */
1337
+ closeAll: () => void;
1338
+ get: (id: OverlayId) => OverlayInstance | undefined;
1339
+ update: (id: OverlayId, updates: OverlayUpdate) => void;
1340
+ setDirty: (id: OverlayId, dirty: boolean, options?: DirtyStateOptions) => void;
1341
+ }
1342
+ /** Opens and tracks modals. */
1343
+ declare function useModals(): ModalsApi;
1344
+ /** Opens and tracks the left and right side drawers. */
1345
+ declare function useSidePanels(): SidePanelsApi;
1346
+ /** Props for {@link RddSidePanels}. */
1347
+ interface RddSidePanelsProps {
1348
+ /** Render only one side's drawer. Omit to render both. */
1349
+ side?: 'left' | 'right';
1350
+ /** Width used when an `openLeft`/`openRight` call doesn't give one. Number = px. @default 400 */
1351
+ defaultWidth?: number | string;
1352
+ }
1353
+ /** Renders the side drawers opened through {@link useSidePanels}. */
1354
+ declare function RddSidePanels({ side, defaultWidth }: RddSidePanelsProps): React$1.ReactElement;
1355
+ /** Props for {@link RddContextMenu}. */
1356
+ type RddContextMenuProps = ContextMenuProps & {
1357
+ /** With children: the context-menu implementation for them. @default the built-in menu */
1358
+ adapter?: ContextMenuAdapter;
1359
+ /**
1360
+ * With children, `RddContextMenu` provides a context menu to them (`useContextMenu()` inside
1361
+ * shows it) — for a surface outside `<DockableDesktopProvider>`, or to override the menu for a
1362
+ * subtree. Without children, it is a single menu you drive through its `ref`.
1363
+ */
1364
+ children?: React$1.ReactNode;
1365
+ };
1366
+ /**
1367
+ * A context menu. Inside `<DockableDesktopProvider>` one is already provided — use
1368
+ * `useContextMenu()` or `showContextMenu()` and you need no `RddContextMenu` at all.
1369
+ */
1370
+ declare const RddContextMenu: React$1.ForwardRefExoticComponent<RddContextMenuProps & React$1.RefAttributes<ContextMenuHandle>>;
1540
1371
 
1541
- interface SidePanelRendererProps {
1372
+ /** Props for `<DockableDesktopProvider>`. */
1373
+ interface DockableDesktopProviderProps {
1374
+ children: React$1.ReactNode;
1542
1375
  /**
1543
- * Default panel width applied when openLeftPanel/openRightPanel do not specify one.
1544
- * Accepts a number (treated as px) or any CSS width string (e.g. '40vw').
1545
- * Falls back to 400px if omitted.
1376
+ * The workspace to render, from `createWorkspace()`. Omit it and the provider creates an empty
1377
+ * one of its own (register panels through `useWorkspace().registry`).
1546
1378
  */
1547
- defaultWidth?: number | string;
1379
+ workspace?: Workspace<object>;
1380
+ /** Translates every built-in label. Overridden by the workspace's own `formatMessage`. */
1381
+ formatMessage?: MessageFormatter;
1382
+ /** Overrides any subset of the built-in message table. Overridden by the workspace's own `messages`. */
1383
+ messages?: Record<string, MessageDescriptor>;
1384
+ /** Initial layout direction, when the workspace doesn't set one. */
1385
+ dir?: 'ltr' | 'rtl';
1386
+ /** CSS class for the outer wrapper of every modal. */
1387
+ modalClass?: string;
1388
+ /** CSS class for the content area of every modal. */
1389
+ modalBodyClass?: string;
1390
+ /** CSS class for the outer wrapper of the side drawers. */
1391
+ sidePanelClass?: string;
1392
+ /** CSS class for the content area of the side drawers. */
1393
+ sidePanelBodyClass?: string;
1394
+ /** CSS class for the outer wrapper of floating windows. */
1395
+ windowClass?: string;
1396
+ /** CSS class for the content area of floating windows. */
1397
+ windowBodyClass?: string;
1398
+ /**
1399
+ * Starting z-index for floating windows and all of the library's chrome overlays, which shift
1400
+ * together via `--rdd-z-base`. @default 1000
1401
+ */
1402
+ zIndexBase?: number;
1403
+ /** Context menu implementation. Defaults to the built-in menu. */
1404
+ contextMenuAdapter?: ContextMenuAdapter;
1548
1405
  }
1549
1406
  /**
1550
- * SidePanelRenderer component acts as the global container rendering both
1551
- * left and right side drawers if they are currently active.
1407
+ * The one provider. Place it above everything from this library: `<RddDesktop>`, `<RddSidebar>`,
1408
+ * `<RddToolbar>`, `<RddSidePanels>`, `<RddModals>`.
1409
+ *
1410
+ * @example
1411
+ * ```tsx
1412
+ * const workspace = createWorkspace({ panels: { map: { component: MapPanel } } });
1413
+ *
1414
+ * <DockableDesktopProvider workspace={workspace}>
1415
+ * <RddSidebar tabs={tabs}>
1416
+ * <RddDesktop />
1417
+ * </RddSidebar>
1418
+ * <RddSidePanels />
1419
+ * <RddModals />
1420
+ * </DockableDesktopProvider>
1421
+ * ```
1422
+ */
1423
+ declare const DockableDesktopProvider: React$1.FC<DockableDesktopProviderProps>;
1424
+
1425
+ /**
1426
+ * Recursively checks whether a value can round-trip through `JSON.stringify`/`JSON.parse`
1427
+ * without silently losing information.
1428
+ *
1429
+ * Deliberately **not** a `JSON.stringify` try/catch — that call doesn't throw for the actual
1430
+ * failure case this guards against: a function-valued property is simply dropped by
1431
+ * `JSON.stringify`, not rejected. This walks the value tree instead, returning `false` as soon as
1432
+ * it finds a function, symbol, `undefined`, React element, or any non-plain object (a class
1433
+ * instance, `Map`, `Set`, `RegExp`, etc.).
1434
+ *
1435
+ * `Date` is treated as an explicit exception — serializable-enough, matching `JSON.stringify`'s
1436
+ * own behavior — even though it doesn't round-trip back to a `Date` instance on parse. That's a
1437
+ * smaller, more tolerable gotcha than a silently-vanishing function, so it's documented rather
1438
+ * than treated as a disqualifying case.
1439
+ *
1440
+ * Used to decide whether a docked/floating panel's `props` can be included in
1441
+ * the workspace's `saveLayout()` output — see {@link PanelInfo.serializable}.
1552
1442
  */
1553
- declare const SidePanelRenderer: React$1.FC<SidePanelRendererProps>;
1443
+ declare function isSerializable(value: unknown): boolean;
1444
+
1554
1445
  /**
1555
- * LeftPanelRenderer component renders ONLY the left side drawer if it is currently active.
1446
+ * @file WindowManager.tsx
1447
+ * @description Core component for react-dockable-desktop layout engine.
1448
+ * Renders the workspace desktop containing docked splits, tabbed panels, floated windows,
1449
+ * resize handles, context menus, and taskbar docks. Exposes lifecycle event listeners.
1556
1450
  */
1557
- declare const LeftPanelRenderer: React$1.FC<SidePanelRendererProps>;
1451
+
1452
+ /** Controls when the minimized-panel taskbar is visible. */
1453
+ type TaskbarVisibility = 'always' | 'compact' | 'autohide';
1454
+ /** Props for `<RddDesktop>`. */
1455
+ interface RddDesktopProps {
1456
+ /** Built-in skin name or a custom skin key registered via CSS. @default 'vscode' */
1457
+ skin?: string;
1458
+ /** Fallback icon shown in panel tabs when no panel-specific icon is provided. */
1459
+ defaultPanelIcon?: React$1.ReactNode;
1460
+ /**
1461
+ * Controls taskbar visibility.
1462
+ * - `'always'` — permanent bar at the bottom
1463
+ * - `'compact'` — only visible when minimized panels exist
1464
+ * - `'autohide'` — overlay bar with 8 px peek strip (default)
1465
+ * @default 'autohide'
1466
+ */
1467
+ taskbarVisibility?: TaskbarVisibility;
1468
+ /** Enables the library's own transitions/animations (tab hover, dock preview, etc.). Never affects the consumer's own page. @default true */
1469
+ animations?: boolean;
1470
+ }
1471
+ declare const WindowManager: React$1.FC<RddDesktopProps>;
1472
+
1558
1473
  /**
1559
- * RightPanelRenderer component renders ONLY the right side drawer if it is currently active.
1474
+ * Renders the modals opened through `useModals()`, stacked, topmost last. Mount one, inside
1475
+ * `<DockableDesktopProvider>`.
1560
1476
  */
1561
- declare const RightPanelRenderer: React$1.FC<SidePanelRendererProps>;
1477
+ declare const ModalStackRenderer: React$1.FC;
1562
1478
 
1563
1479
  /**
1564
- * Props for the {@link ConfirmationForm} component.
1480
+ * Props for the {@link RddConfirm} component.
1565
1481
  */
1566
- interface ConfirmationFormProps {
1482
+ interface RddConfirmProps {
1567
1483
  /** Optional custom title text or localizable descriptor for the dialog container. */
1568
1484
  title?: string | {
1569
1485
  id: string;
@@ -1588,10 +1504,10 @@ interface ConfirmationFormProps {
1588
1504
  onCancel?: () => void;
1589
1505
  }
1590
1506
  /**
1591
- * ConfirmationForm component renders a standard dialog content layout,
1507
+ * RddConfirm component renders a standard dialog content layout,
1592
1508
  * allowing users to confirm actions or abort them. Exposes action callbacks.
1593
1509
  */
1594
- declare const ConfirmationForm: React$1.FC<ConfirmationFormProps>;
1510
+ declare const ConfirmationForm: React$1.FC<RddConfirmProps>;
1595
1511
 
1596
1512
  /**
1597
1513
  * @file Sidebar.tsx
@@ -1638,11 +1554,11 @@ interface SidebarTab {
1638
1554
  renderContent: (tabId: string, onClose: () => void, onOpen: () => void) => React$1.ReactNode;
1639
1555
  }
1640
1556
  /**
1641
- * Simple case for `SidebarProps.headerAction`/`footerAction`: the library renders a
1557
+ * Simple case for `RddSidebarProps.headerAction`/`footerAction`: the library renders a
1642
1558
  * default-styled icon button (visually consistent with the regular tab buttons) and forwards
1643
1559
  * the click.
1644
1560
  */
1645
- interface SidebarHeaderActionButton {
1561
+ interface SidebarActionButton {
1646
1562
  /** Only needed when used inside a `SidebarRailEntry[]` array, for the React key. */
1647
1563
  id?: string;
1648
1564
  icon: React$1.ReactNode;
@@ -1652,12 +1568,12 @@ interface SidebarHeaderActionButton {
1652
1568
  disabled?: boolean;
1653
1569
  }
1654
1570
  /**
1655
- * Full-control case for `SidebarProps.headerAction`/`footerAction`: the consumer supplies their
1571
+ * Full-control case for `RddSidebarProps.headerAction`/`footerAction`: the consumer supplies their
1656
1572
  * own markup (a Material UI `IconButton`, a Bootstrap `Button`, a Tailwind-styled `<button>`, or
1657
1573
  * anything else) wholesale. The library renders exactly what this returns, unwrapped, so the
1658
1574
  * consumer's own hover/active/focus/ripple behavior and click handling are untouched.
1659
1575
  */
1660
- interface SidebarHeaderActionCustom {
1576
+ interface SidebarCustomEntry {
1661
1577
  /** Only needed when used inside a `SidebarRailEntry[]` array, for the React key. */
1662
1578
  id?: string;
1663
1579
  render: () => React$1.ReactNode;
@@ -1668,15 +1584,15 @@ interface SidebarHeaderActionCustom {
1668
1584
  * it and forwards the click; what happens next (opening a side panel, a modal, anything else)
1669
1585
  * is entirely up to the consumer.
1670
1586
  */
1671
- type SidebarHeaderAction = SidebarHeaderActionButton | SidebarHeaderActionCustom;
1587
+ type SidebarHeaderAction = SidebarActionButton | SidebarCustomEntry;
1672
1588
  /**
1673
- * A single entry inside `SidebarProps.headerAction`/`footerAction` when used as an array: either
1589
+ * A single entry inside `RddSidebarProps.headerAction`/`footerAction` when used as an array: either
1674
1590
  * a non-toggling action button/custom render (see `SidebarHeaderAction`), or a real `SidebarTab`
1675
1591
  * that behaves exactly like a main-list tab — it mounts, activates, and closes through the same
1676
1592
  * lifecycle, so e.g. a "Settings" entry pinned to the footer can expand like any other tab.
1677
1593
  */
1678
- type SidebarRailEntry = SidebarTab | SidebarHeaderActionButton | SidebarHeaderActionCustom;
1679
- interface SidebarProps {
1594
+ type SidebarRailEntry = SidebarTab | SidebarActionButton | SidebarCustomEntry;
1595
+ interface RddSidebarProps {
1680
1596
  /** Which side the activity bar and drawer appear on. Default: 'right' */
1681
1597
  position?: 'left' | 'right';
1682
1598
  tabs: SidebarTab[];
@@ -1755,7 +1671,7 @@ interface SidebarProps {
1755
1671
  renderHeader?: (tab: SidebarTab, onClose: () => void, onOpen: () => void) => React$1.ReactNode;
1756
1672
  /**
1757
1673
  * @internal Marks this instance as a secondary sidebar for context-broadcasting
1758
- * purposes. Set automatically by `<SecondarySidebar>` — do not pass this directly.
1674
+ * purposes. Set automatically by `<RddSecondarySidebar>` — do not pass this directly.
1759
1675
  * Default: false
1760
1676
  */
1761
1677
  isSecondary?: boolean;
@@ -1763,7 +1679,7 @@ interface SidebarProps {
1763
1679
  children?: React$1.ReactNode;
1764
1680
  }
1765
1681
  /**
1766
- * Imperative handle exposed by `<Sidebar ref={...}>`.
1682
+ * Imperative handle exposed by `<RddSidebar ref={...}>`.
1767
1683
  */
1768
1684
  interface SidebarHandle {
1769
1685
  openTab: (tabId: string) => void;
@@ -1779,7 +1695,7 @@ interface SidebarHandle {
1779
1695
  }
1780
1696
  /**
1781
1697
  * Value provided by `useSidebar()`. Available to any component inside the
1782
- * `<Sidebar>` React tree, including panels rendered via `{children}`.
1698
+ * `<RddSidebar>` React tree, including panels rendered via `{children}`.
1783
1699
  */
1784
1700
  interface SidebarContextValue {
1785
1701
  openTab: (tabId: string) => void;
@@ -1787,7 +1703,7 @@ interface SidebarContextValue {
1787
1703
  getActiveTab: () => string | null;
1788
1704
  /** Which side this Sidebar instance is rendering on. */
1789
1705
  position: 'left' | 'right';
1790
- /** True if this instance is a `<SecondarySidebar>`, false for a primary `<Sidebar>`. */
1706
+ /** True if this instance is a `<RddSecondarySidebar>`, false for a primary `<RddSidebar>`. */
1791
1707
  isSecondary: boolean;
1792
1708
  }
1793
1709
  /**
@@ -1800,13 +1716,13 @@ interface SidebarTabContextValue {
1800
1716
  onClose: () => void;
1801
1717
  openTab: (tabId: string) => void;
1802
1718
  }
1803
- declare const Sidebar: React$1.ForwardRefExoticComponent<SidebarProps & React$1.RefAttributes<SidebarHandle>>;
1719
+ declare const Sidebar: React$1.ForwardRefExoticComponent<RddSidebarProps & React$1.RefAttributes<SidebarHandle>>;
1804
1720
  /**
1805
- * Props for {@link SecondarySidebar} — identical to {@link SidebarProps} except
1721
+ * Props for {@link RddSecondarySidebar} — identical to {@link RddSidebarProps} except
1806
1722
  * `position` (always the opposite of whatever primary `Sidebar` it's nested inside)
1807
1723
  * and `isSecondary` (always `true`) are not settable.
1808
1724
  */
1809
- type SecondarySidebarProps = Omit<SidebarProps, 'position' | 'isSecondary'>;
1725
+ type RddSecondarySidebarProps = Omit<RddSidebarProps, 'position' | 'isSecondary'>;
1810
1726
  /**
1811
1727
  * A second, independent `Sidebar` instance for the opposite edge of the screen —
1812
1728
  * same component, same behavior, zero forked code. Must be rendered inside a
@@ -1814,12 +1730,12 @@ type SecondarySidebarProps = Omit<SidebarProps, 'position' | 'isSecondary'>;
1814
1730
  * isn't using, so the side is never specified directly.
1815
1731
  *
1816
1732
  * @throws Error if rendered without an ancestor `Sidebar`, or nested inside another
1817
- * `SecondarySidebar` — this library supports exactly one primary and one secondary,
1733
+ * `RddSecondarySidebar` — this library supports exactly one primary and one secondary,
1818
1734
  * nothing deeper.
1819
1735
  */
1820
- declare const SecondarySidebar: React$1.ForwardRefExoticComponent<SecondarySidebarProps & React$1.RefAttributes<SidebarHandle>>;
1736
+ declare const SecondarySidebar: React$1.ForwardRefExoticComponent<RddSecondarySidebarProps & React$1.RefAttributes<SidebarHandle>>;
1821
1737
  /**
1822
- * Returns sidebar control functions from anywhere inside a `<Sidebar>` tree,
1738
+ * Returns sidebar control functions from anywhere inside a `<RddSidebar>` tree,
1823
1739
  * including floating panels rendered via `{children}`.
1824
1740
  *
1825
1741
  * @throws Error if used outside of a {@link Sidebar}.
@@ -1851,9 +1767,6 @@ interface ToolbarContextValue {
1851
1767
  /** Flip a toggle modifier between active and inactive. */
1852
1768
  toggleModifier: (id: string) => void;
1853
1769
  }
1854
- declare const ToolbarProvider: React$1.FC<{
1855
- children: React$1.ReactNode;
1856
- }>;
1857
1770
  /**
1858
1771
  * Returns toolbar state and control functions from anywhere inside
1859
1772
  * a `<DockableDesktopProvider>` tree.
@@ -1976,7 +1889,7 @@ interface ToolbarGroupItem {
1976
1889
  onActiveItemChange?: (id: string) => void;
1977
1890
  }
1978
1891
  type ToolbarItem$1 = ToolbarActionItem | ToolbarRadioItem | ToolbarToggleItem | ToolbarGroupItem | ToolbarSeparator$1;
1979
- interface ToolbarProps {
1892
+ interface RddToolbarProps {
1980
1893
  /** Side the strip is attached to. Controls strip orientation. Default: 'left' */
1981
1894
  position?: 'left' | 'right' | 'top' | 'bottom';
1982
1895
  /** Ordered list of items to render. */
@@ -1993,15 +1906,15 @@ interface ToolbarHandle {
1993
1906
  hide(): void;
1994
1907
  toggle(): void;
1995
1908
  }
1996
- declare const Toolbar: React$1.ForwardRefExoticComponent<ToolbarProps & React$1.RefAttributes<ToolbarHandle>>;
1909
+ declare const Toolbar: React$1.ForwardRefExoticComponent<RddToolbarProps & React$1.RefAttributes<ToolbarHandle>>;
1997
1910
 
1998
1911
  /** Visual type of a toast notification. Determines the icon and accent color. */
1999
1912
  type ToastType = 'info' | 'success' | 'warning' | 'error';
2000
- /** Corner position of the `<ToastContainer>` relative to the viewport. */
1913
+ /** Corner position of the `<RddToasts>` relative to the viewport. */
2001
1914
  type ToastPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
2002
1915
  /**
2003
1916
  * Per-notification options passed to `toast()`, `toast.info()`, etc.
2004
- * All fields are optional and fall back to `<ToastContainer>` defaults when unset.
1917
+ * All fields are optional and fall back to `<RddToasts>` defaults when unset.
2005
1918
  */
2006
1919
  interface ToastOptions {
2007
1920
  /** Visual type. Overridden by the `toast.info/success/warning/error` shorthands. @default 'info' */
@@ -2033,11 +1946,11 @@ interface ResolvedToastOptions {
2033
1946
  onClose?: () => void;
2034
1947
  }
2035
1948
  /**
2036
- * Props for `<ToastContainer>`. Mount one instance at your app root alongside `ModalStackRenderer`.
1949
+ * Props for `<RddToasts>`. Mount one instance at your app root, alongside `<RddModals>`.
2037
1950
  * @example
2038
- * <ToastContainer position="top-right" progressBar />
1951
+ * <RddToasts position="top-right" progressBar />
2039
1952
  */
2040
- interface ToastContainerProps {
1953
+ interface RddToastsProps {
2041
1954
  /** Where notifications appear in the viewport. @default 'top-right' */
2042
1955
  position?: ToastPosition;
2043
1956
  /** Maximum number of notifications shown simultaneously. Extras are queued. @default 3 */
@@ -2074,9 +1987,9 @@ interface ToastPromiseMessages<T> {
2074
1987
  }
2075
1988
  /**
2076
1989
  * Strategy interface for replacing the built-in toast renderer with an external library.
2077
- * Pass an instance via `<ToastContainer adapter={...} />` to redirect all `toast.*` calls
1990
+ * Pass an instance via `<RddToasts adapter={...} />` to redirect all `toast.*` calls
2078
1991
  * without changing any call sites in your application.
2079
- * @see ToastContainerProps.adapter
1992
+ * @see RddToastsProps.adapter
2080
1993
  */
2081
1994
  interface ToastAdapter {
2082
1995
  /** Called when a new notification is requested. */
@@ -2086,8 +1999,8 @@ interface ToastAdapter {
2086
1999
  /** Called to dismiss one notification (`id` provided) or all active notifications (no `id`). */
2087
2000
  dismiss(id?: string): void;
2088
2001
  /**
2089
- * `null` means the adapter manages its own DOM and `<ToastContainer>` renders nothing.
2090
- * A component causes `<ToastContainer>` to portal-render it with a `position` prop.
2002
+ * `null` means the adapter manages its own DOM and `<RddToasts>` renders nothing.
2003
+ * A component causes `<RddToasts>` to portal-render it with a `position` prop.
2091
2004
  */
2092
2005
  Container: React$1.ComponentType<{
2093
2006
  position: ToastPosition;
@@ -2121,7 +2034,7 @@ interface ToastFunction {
2121
2034
  }
2122
2035
  /**
2123
2036
  * Imperative notification singleton. Call from anywhere — inside or outside React.
2124
- * Mount `<ToastContainer>` once at your app root to activate the renderer.
2037
+ * Mount `<RddToasts>` once at your app root to activate the renderer.
2125
2038
  * @example
2126
2039
  * toast.success('File saved.');
2127
2040
  * toast.error('Upload failed.', { duration: 0 }); // sticky
@@ -2132,9 +2045,9 @@ declare const toast: ToastFunction;
2132
2045
  * Portal-rendered notification host. Mount once at your app root, outside the workspace
2133
2046
  * container. All `toast.*` calls are routed here automatically via the internal event emitter.
2134
2047
  * @example
2135
- * <ToastContainer position="top-right" progressBar />
2048
+ * <RddToasts position="top-right" progressBar />
2136
2049
  */
2137
- declare function ToastContainer({ position, maxVisible, defaultDuration, defaultClosable, pauseOnHover, animation, newestOnTop, progressBar, width, adapter, }: ToastContainerProps): React$1.ReactElement | null;
2050
+ declare function ToastContainer({ position, maxVisible, defaultDuration, defaultClosable, pauseOnHover, animation, newestOnTop, progressBar, width, adapter, }: RddToastsProps): React$1.ReactElement | null;
2138
2051
 
2139
2052
  /** Edge of a panel to which a `PanelToolbar` attaches. */
2140
2053
  type ToolbarPosition = 'top' | 'bottom' | 'left' | 'right';
@@ -2161,10 +2074,9 @@ interface PanelFloatPlacement {
2161
2074
  stretch: Stretch | null;
2162
2075
  }
2163
2076
  /**
2164
- * Configuration for a window spawned imperatively via `usePanelFloatingWindowManager().open()`.
2165
- * @see usePanelFloatingWindowManager
2077
+ * Configuration for a widget spawned imperatively via `useFloatingWidgets().open()`.
2166
2078
  */
2167
- interface ManagedWindowConfig {
2079
+ interface ManagedWidget {
2168
2080
  /**
2169
2081
  * Text shown in the window's header bar. Accepts a plain string or an i18n message descriptor.
2170
2082
  *
@@ -2190,32 +2102,32 @@ interface ManagedWindowConfig {
2190
2102
  */
2191
2103
  stretch?: Stretch;
2192
2104
  }
2193
- /** Props for `<PanelOverlayRoot>`. */
2194
- interface PanelOverlayRootProps {
2105
+ /** Props for `<RddPanelOverlay>`. */
2106
+ interface RddPanelOverlayProps {
2195
2107
  children: React$1.ReactNode;
2196
2108
  className?: string;
2197
2109
  style?: React$1.CSSProperties;
2198
2110
  }
2199
2111
  /**
2200
2112
  * Context provider and layout root for the Panel Overlay system. Wrap your panel content
2201
- * with this to enable `PanelToolbar`, `PanelFloatingWindow`, and `usePanelFloatingWindowManager`.
2113
+ * with this to enable `RddPanelToolbar`, `RddFloatingWidget`, and `useFloatingWidgets`.
2202
2114
  * @example
2203
2115
  * function MyPanel() {
2204
2116
  * return (
2205
- * <PanelOverlayRoot style={{ position: 'relative', width: '100%', height: '100%' }}>
2206
- * <PanelToolbar position="top">...</PanelToolbar>
2207
- * <div className="panel-body">content</div>
2208
- * </PanelOverlayRoot>
2117
+ * <RddPanelOverlay style={{ position: 'relative', width: '100%', height: '100%' }}>
2118
+ * <RddPanelToolbar position="top">...</RddPanelToolbar>
2119
+ * <div className="my-panel-body">content</div>
2120
+ * </RddPanelOverlay>
2209
2121
  * );
2210
2122
  * }
2211
2123
  */
2212
- declare function PanelOverlayRoot({ children, className, style }: PanelOverlayRootProps): React$1.ReactElement;
2124
+ declare function PanelOverlayRoot({ children, className, style }: RddPanelOverlayProps): React$1.ReactElement;
2213
2125
  /** Background style of a `PanelToolbar`. */
2214
2126
  type ToolbarVariant = 'transparent' | 'frosted' | 'solid';
2215
2127
  /** Visual style applied to `ToolbarButton` and `ToolbarToggle` components. */
2216
2128
  type ButtonVariant = 'ghost' | 'soft' | 'outlined' | 'filled';
2217
- /** Props for `<PanelToolbar>`. */
2218
- interface PanelToolbarProps {
2129
+ /** Props for `<RddPanelToolbar>`. */
2130
+ interface RddPanelToolbarProps {
2219
2131
  /** Edge of the panel overlay to attach to. @see ToolbarPosition */
2220
2132
  position: ToolbarPosition;
2221
2133
  /** Background style of the toolbar strip. @default 'transparent' */
@@ -2229,18 +2141,18 @@ interface PanelToolbarProps {
2229
2141
  children?: React$1.ReactNode;
2230
2142
  }
2231
2143
  /**
2232
- * Toolbar strip that attaches to any edge of a `PanelOverlayRoot`.
2144
+ * Toolbar strip that attaches to any edge of an `RddPanelOverlay`.
2233
2145
  * Left/right toolbars inset automatically to avoid overlapping top/bottom toolbars.
2234
2146
  * RTL layouts are detected and handled automatically.
2235
2147
  * @example
2236
- * <PanelToolbar position="top" variant="frosted">
2237
- * <ToolbarButton icon={<SaveIcon />} title="Save" onClick={save} />
2238
- * <ToolbarToggle icon={<GridIcon />} title="Grid" active={grid} onToggle={() => setGrid(v => !v)} />
2239
- * </PanelToolbar>
2240
- */
2241
- declare function PanelToolbar({ position, variant, buttonVariant, buttonSize, style, className, children }: PanelToolbarProps): React$1.ReactElement;
2242
- /** Props for `<ToolbarButton>`. */
2243
- interface ToolbarButtonProps {
2148
+ * <RddPanelToolbar position="top" variant="frosted">
2149
+ * <RddToolbarButton icon={<SaveIcon />} title="Save" onClick={save} />
2150
+ * <RddToolbarToggle icon={<GridIcon />} title="Grid" active={grid} onToggle={() => setGrid(v => !v)} />
2151
+ * </RddPanelToolbar>
2152
+ */
2153
+ declare function PanelToolbar({ position, variant, buttonVariant, buttonSize, style, className, children }: RddPanelToolbarProps): React$1.ReactElement;
2154
+ /** Props for `<RddToolbarButton>`. */
2155
+ interface RddToolbarButtonProps {
2244
2156
  /** Button icon — typically a small SVG component. */
2245
2157
  icon: React$1.ReactNode;
2246
2158
  /** Click handler. */
@@ -2252,9 +2164,9 @@ interface ToolbarButtonProps {
2252
2164
  variant?: ButtonVariant;
2253
2165
  }
2254
2166
  /** Icon button for use inside a `PanelToolbar`. */
2255
- declare function ToolbarButton({ icon, onClick, disabled, title, variant }: ToolbarButtonProps): React$1.ReactElement;
2256
- /** Props for `<ToolbarToggle>`. */
2257
- interface ToolbarToggleProps {
2167
+ declare function ToolbarButton({ icon, onClick, disabled, title, variant }: RddToolbarButtonProps): React$1.ReactElement;
2168
+ /** Props for `<RddToolbarToggle>`. */
2169
+ interface RddToolbarToggleProps {
2258
2170
  /** Button icon — typically a small SVG component. */
2259
2171
  icon: React$1.ReactNode;
2260
2172
  /** Whether the toggle is in the active/pressed state. Sets `aria-pressed` automatically. */
@@ -2268,7 +2180,7 @@ interface ToolbarToggleProps {
2268
2180
  variant?: ButtonVariant;
2269
2181
  }
2270
2182
  /** Two-state icon toggle button for use inside a `PanelToolbar`. Sets `aria-pressed` automatically. */
2271
- declare function ToolbarToggle({ icon, active, onToggle, disabled, title, variant }: ToolbarToggleProps): React$1.ReactElement;
2183
+ declare function ToolbarToggle({ icon, active, onToggle, disabled, title, variant }: RddToolbarToggleProps): React$1.ReactElement;
2272
2184
  /** Vertical (or horizontal) divider line between groups of toolbar items. */
2273
2185
  declare function ToolbarSeparator(): React$1.ReactElement;
2274
2186
  /** Flex-grow spacer that pushes subsequent toolbar items to the far edge. */
@@ -2281,7 +2193,7 @@ declare function ToolbarItem({ children }: {
2281
2193
  declare function ToolbarCenter({ children }: {
2282
2194
  children: React$1.ReactNode;
2283
2195
  }): React$1.ReactElement;
2284
- /** A single result item returned by `ToolbarSearchInputProps.onSearch`. */
2196
+ /** A single result item returned by `RddToolbarSearchProps.onSearch`. */
2285
2197
  interface SearchResult {
2286
2198
  /** Unique identifier for this result — passed to `onSelect`. */
2287
2199
  id: string;
@@ -2294,8 +2206,8 @@ interface SearchResult {
2294
2206
  /** Optional icon shown to the left of the label. */
2295
2207
  icon?: React$1.ReactNode;
2296
2208
  }
2297
- /** Props for `<ToolbarSearchInput>`. */
2298
- interface ToolbarSearchInputProps {
2209
+ /** Props for `<RddToolbarSearch>`. */
2210
+ interface RddToolbarSearchProps {
2299
2211
  /** Placeholder text shown in the expanded input field. @default the `searchPlaceholder` message ('Search…') */
2300
2212
  placeholder?: string;
2301
2213
  /**
@@ -2318,9 +2230,9 @@ interface ToolbarSearchInputProps {
2318
2230
  * onSelect={result => workspace.focusLayer(result.id)}
2319
2231
  * />
2320
2232
  */
2321
- declare function ToolbarSearchInput({ placeholder, onSearch, onSelect }: ToolbarSearchInputProps): React$1.ReactElement;
2322
- /** Props for `<PanelFloatingWindow>`. */
2323
- interface PanelFloatingWindowProps {
2233
+ declare function ToolbarSearchInput({ placeholder, onSearch, onSelect }: RddToolbarSearchProps): React$1.ReactElement;
2234
+ /** Props for `<RddFloatingWidget>`. */
2235
+ interface RddFloatingWidgetProps {
2324
2236
  /** Unique identifier within the panel overlay. Used for z-order and stack tracking. */
2325
2237
  id: string;
2326
2238
  /** Text shown in the window's header bar. Accepts a plain string or an i18n message descriptor. */
@@ -2346,7 +2258,7 @@ interface PanelFloatingWindowProps {
2346
2258
  defaultStretch?: Stretch;
2347
2259
  /**
2348
2260
  * Controlled stretch state. When provided — **including as `null`** — the caller is the single
2349
- * source of truth: gestures report through {@link PanelFloatingWindowProps.onPlacementChange}
2261
+ * source of truth: gestures report through {@link RddFloatingWidgetProps.onPlacementChange}
2350
2262
  * instead of updating internally, and the caller must echo the new value back. Omit entirely
2351
2263
  * (`undefined`) for uncontrolled behaviour, matching `ToolbarToggleItem.active` and
2352
2264
  * `Sidebar.activeTabId`.
@@ -2369,65 +2281,46 @@ interface PanelFloatingWindowProps {
2369
2281
  children?: React$1.ReactNode;
2370
2282
  }
2371
2283
  /**
2372
- * Declarative floating window anchored inside a `PanelOverlayRoot`.
2284
+ * A floating widget inside a panel — anchored within an `RddPanelOverlay`.
2373
2285
  *
2374
2286
  * Docks to any corner, drags free of it, and drops back onto one. Windows sharing a corner stack
2375
2287
  * along the block axis with animated offsets. An axis can also **span the panel** instead of
2376
2288
  * carrying a fixed size, so the window tracks the panel as it resizes — see
2377
- * {@link PanelFloatingWindowProps.defaultStretch} and {@link Stretch}.
2289
+ * {@link RddFloatingWidgetProps.defaultStretch} and {@link Stretch}.
2378
2290
  *
2379
2291
  * Resize handles follow what is actually movable: a free-floating window is pinned by nothing and
2380
2292
  * offers all eight, while a docked one offers only its free edges — plus both ends of any spanning
2381
2293
  * axis, either of which releases it.
2382
2294
  *
2383
2295
  * @example
2384
- * const info = usePanelFloatingWindow();
2385
- * <PanelFloatingWindow
2296
+ * const [infoOpen, setInfoOpen] = useState(false);
2297
+ * <RddFloatingWidget
2386
2298
  * id="layer-info" title="Layer Info"
2387
- * open={info.isOpen} onClose={info.close}
2299
+ * open={infoOpen} onClose={() => setInfoOpen(false)}
2388
2300
  * defaultAnchor="top-right" defaultWidth={300} defaultHeight={200}
2389
2301
  * >
2390
2302
  * <LayerInfoContent />
2391
- * </PanelFloatingWindow>
2303
+ * </RddFloatingWidget>
2392
2304
  *
2393
2305
  * @example
2394
2306
  * // A full-width status strip along the bottom, tracking the panel's width.
2395
2307
  * // defaultHeight still applies; defaultWidth is what the inline axis returns to if released.
2396
- * <PanelFloatingWindow
2308
+ * <RddFloatingWidget
2397
2309
  * id="timeline" title="Timeline"
2398
2310
  * open onClose={close}
2399
2311
  * defaultAnchor="bottom-left" defaultStretch="width"
2400
2312
  * defaultWidth={240} defaultHeight={120}
2401
2313
  * >
2402
2314
  * <TimelineContent />
2403
- * </PanelFloatingWindow>
2404
- */
2405
- declare function PanelFloatingWindow(props: PanelFloatingWindowProps): React$1.ReactElement | null;
2406
- /** Return type of `usePanelFloatingWindow`. @see usePanelFloatingWindow */
2407
- interface UsePanelFloatingWindowReturn {
2408
- /** Whether the floating window is currently open. */
2409
- isOpen: boolean;
2410
- /** Open the floating window. */
2411
- open(): void;
2412
- /** Close the floating window. */
2413
- close(): void;
2414
- }
2415
- /**
2416
- * Manages the open/close boolean state for a single `PanelFloatingWindow`.
2417
- * Pass `isOpen` to `open`, `close` to `onClose` on the component directly.
2418
- * @returns A stable `UsePanelFloatingWindowReturn` object.
2419
- * @example
2420
- * const info = usePanelFloatingWindow();
2421
- * <PanelFloatingWindow id="info" open={info.isOpen} onClose={info.close} ... />
2315
+ * </RddFloatingWidget>
2422
2316
  */
2423
- declare function usePanelFloatingWindow(): UsePanelFloatingWindowReturn;
2317
+ declare function PanelFloatingWindow(props: RddFloatingWidgetProps): React$1.ReactElement | null;
2424
2318
  /**
2425
- * Imperative handle returned by `usePanelFloatingWindowManager`.
2426
- * @see usePanelFloatingWindowManager
2319
+ * What `useFloatingWidgets()` returns.
2427
2320
  */
2428
- interface PanelFloatingWindowManagerHandle {
2321
+ interface FloatingWidgetsApi {
2429
2322
  /** Spawn or reconfigure a named window. Safe to call with an already-open ID to update config. */
2430
- open(id: string, config: ManagedWindowConfig): void;
2323
+ open(id: string, config: ManagedWidget): void;
2431
2324
  /** Close a named window by ID. No-op if the window is not open. */
2432
2325
  close(id: string): void;
2433
2326
  /** Close all managed windows. */
@@ -2439,28 +2332,28 @@ interface PanelFloatingWindowManagerHandle {
2439
2332
  }
2440
2333
  /**
2441
2334
  * Imperative hook for spawning N named floating windows at runtime from data or event handlers.
2442
- * All windows share z-ordering, drag, and corner-docking infrastructure of the `PanelOverlayRoot`,
2443
- * and accept the same placement options — including {@link ManagedWindowConfig.stretch} to span an
2335
+ * All widgets share z-ordering, drag, and corner-docking infrastructure of the `RddPanelOverlay`,
2336
+ * and accept the same placement options — including {@link ManagedWidget.stretch} to span an
2444
2337
  * axis of the panel.
2445
2338
  *
2446
- * Must be called inside a **descendant** of `PanelOverlayRoot`, not in the component that renders the root.
2447
- * @returns A stable `PanelFloatingWindowManagerHandle`.
2339
+ * Must be called inside a **descendant** of `RddPanelOverlay`, not in the component that renders it.
2340
+ * @returns A stable `FloatingWidgetsApi`.
2448
2341
  * @example
2449
- * const manager = usePanelFloatingWindowManager();
2342
+ * const manager = useFloatingWidgets();
2450
2343
  * manager.open('feature-42', { title: 'Feature 42', content: <FeatureDetail id={42} />, anchor: 'top-right' });
2451
2344
  *
2452
2345
  * // A full-width strip along the bottom edge:
2453
2346
  * manager.open('timeline', { title: 'Timeline', content: <Timeline />, anchor: 'bottom-left', stretch: 'width', height: 120 });
2454
2347
  */
2455
- declare function usePanelFloatingWindowManager(): PanelFloatingWindowManagerHandle;
2348
+ declare function usePanelFloatingWindowManager(): FloatingWidgetsApi;
2456
2349
 
2457
2350
  /**
2458
2351
  * @file PanelContributionContext.tsx
2459
2352
  * @description Lets any panel publish toolbar items and/or sidebar sections that
2460
2353
  * should only be surfaced while it is the globally active panel (`state.activePanelId`).
2461
2354
  * Optional, additive module — `DockableDesktopProvider` wires it up automatically.
2462
- * Neither `<Toolbar>` nor `<Sidebar>` reads from this automatically; the app shell
2463
- * merges `useActivePanelContribution()`'s result into its own `items`/`tabs` calls.
2355
+ * Neither `<RddToolbar>` nor `<RddSidebar>` reads from this automatically; the app shell
2356
+ * merges `useActiveContribution()`'s result into its own `items`/`tabs` calls.
2464
2357
  */
2465
2358
 
2466
2359
  /** A single named, labeled slot of content a panel contributes to the app's Sidebar while active. */
@@ -2480,14 +2373,6 @@ interface PanelContribution {
2480
2373
  toolbarItems?: ToolbarItem$1[];
2481
2374
  sidebarSections?: PanelSidebarSection[];
2482
2375
  }
2483
- /**
2484
- * Provider enabling `usePanelContribution()` / `useActivePanelContribution()`.
2485
- * Mounted automatically by `DockableDesktopProvider` — only needed manually when
2486
- * composing `WindowManagerProvider` directly without it.
2487
- */
2488
- declare const PanelContributionProvider: React$1.FC<{
2489
- children: React$1.ReactNode;
2490
- }>;
2491
2376
  /**
2492
2377
  * Publish this panel's toolbar items and/or sidebar sections. Call on every render —
2493
2378
  * republishes automatically whenever `contribution` changes, and is cleared when the
@@ -2495,9 +2380,9 @@ declare const PanelContributionProvider: React$1.FC<{
2495
2380
  * `useMemo`/`useCallback`) to avoid republishing on every unrelated re-render.
2496
2381
  *
2497
2382
  * Contributions are only ever surfaced while this panel is `state.activePanelId` —
2498
- * see `useActivePanelContribution()`.
2383
+ * see `useActiveContribution()`.
2499
2384
  *
2500
- * @throws Error if used outside of a {@link PanelContributionProvider}.
2385
+ * @throws Error if used outside of a {@link DockableDesktopProvider}.
2501
2386
  * @example
2502
2387
  * function MapPanel() {
2503
2388
  * const [controller, setController] = useState<'pan' | 'draw' | 'measure'>('pan');
@@ -2516,13 +2401,13 @@ declare function usePanelContribution(contribution: PanelContribution): void;
2516
2401
  * Returns whatever the currently active panel (`state.activePanelId`) has published
2517
2402
  * via `usePanelContribution()`, or `null` if no panel is active or the active panel
2518
2403
  * hasn't contributed anything. Intended for the app shell to merge into its own
2519
- * `<Toolbar items={...}>` / `<Sidebar tabs={...}>` calls.
2404
+ * `<RddToolbar items={...}>` / `<RddSidebar tabs={...}>` calls.
2520
2405
  *
2521
- * @throws Error if used outside of a {@link PanelContributionProvider}.
2406
+ * @throws Error if used outside of a {@link DockableDesktopProvider}.
2522
2407
  */
2523
2408
  declare function useActivePanelContribution(): PanelContribution | null;
2524
2409
  /**
2525
- * Converts a contributed sidebar section into a `SidebarTab` for `<Sidebar tabs={...}>`.
2410
+ * Converts a contributed sidebar section into a `SidebarTab` for `<RddSidebar tabs={...}>`.
2526
2411
  * `SidebarTab.icon` is optional but recommended unless the tab is `hidden`; supply
2527
2412
  * `fallbackIcon` for sections that omit one.
2528
2413
  * `eagerMount`/`preserveState` have no contribution-side equivalent — a contribution
@@ -2530,16 +2415,16 @@ declare function useActivePanelContribution(): PanelContribution | null;
2530
2415
  */
2531
2416
  declare function sidebarSectionToTab(section: PanelSidebarSection, fallbackIcon?: React$1.ReactNode): SidebarTab;
2532
2417
  /**
2533
- * Convenience wrapper around `useActivePanelContribution()` for the common case:
2418
+ * Convenience wrapper around `useActiveContribution()` for the common case:
2534
2419
  * append the active panel's contributed toolbar items (behind a separator) to a
2535
2420
  * static list. Returns `staticItems` unchanged when there's nothing to add.
2536
2421
  * For manual control (a different merge position, no separator, etc.), call
2537
- * `useActivePanelContribution()` directly instead.
2422
+ * `useActiveContribution()` directly instead.
2538
2423
  */
2539
2424
  declare function useMergedToolbarItems(staticItems: ToolbarItem$1[]): ToolbarItem$1[];
2540
2425
  /**
2541
- * Convenience wrapper around `useActivePanelContribution()` for the common case:
2542
- * append the active panel's contributed sidebar sections (via `sidebarSectionToTab`)
2426
+ * Convenience wrapper around `useActiveContribution()` for the common case:
2427
+ * append the active panel's contributed sidebar sections (via `sectionToTab`)
2543
2428
  * to a static tab list, as dynamic tabs that appear only while their panel is active.
2544
2429
  * Returns `staticTabs` unchanged when there's nothing to add.
2545
2430
  */
@@ -2616,7 +2501,7 @@ declare function computeResizedRect(dir: ResizeDir, dx: number, dy: number, star
2616
2501
  type ColorScheme = 'dark' | 'light';
2617
2502
  /**
2618
2503
  * Reactively reads the workspace's current `data-color-scheme` attribute
2619
- * (set on `document.documentElement` by `<WindowManager />`), returning
2504
+ * (set on `document.documentElement` by `<RddDesktop />`), returning
2620
2505
  * `'dark'` or `'light'` and re-rendering whenever it changes.
2621
2506
  *
2622
2507
  * Useful for panel content that needs to react to the same scheme the
@@ -2638,4 +2523,4 @@ declare function isElementRtl(el: HTMLElement | null): boolean;
2638
2523
  */
2639
2524
  declare function isComputedRtl(el: Element | null | undefined): boolean;
2640
2525
 
2641
- 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, type PanelFloatPlacement, 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 Stretch, 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, isComputedRtl, isElementRtl, 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 };
2526
+ export { type BuiltInEvents, type ButtonVariant, type CloseOptions, type ContainerType, type ContextMenuAdapter, type ContextMenuCheckbox, type ContextMenuHandle, type ContextMenuItem, type ContextMenuLabel, type ContextMenuSeparator, type ContextMenuSimpleItem, type ContextMenuSubMenu, type DirtyStateOptions, DockableDesktopProvider, type DockableDesktopProviderProps, type DropPosition, type DropTarget, type FloatAnchor, type FloatingWidgetsApi, type FloatingWindow, type HostClasses, type LayoutGridNode, type LayoutLeafNode, type LayoutNode, type ManagedWidget, type MenuItemAction, type MessageDescriptor, type MessageFormatter, type MessageKey, type ModalOptions, type ModalsApi, type OpenPanelOptions, type OverlayId, type OverlayInstance, type OverlayState, type PanelContribution, type PanelDefinition, type PanelEvents, type PanelFloatPlacement, type PanelHandle, type PanelInfo, PanelRegistry, type PanelRegistryEntry, type PanelSidebarSection, type PanelState, type PanelTitle, type PanelTitleDescriptor, type PointerDragConfig, ConfirmationForm as RddConfirm, type RddConfirmProps, RddContextMenu, type RddContextMenuProps, WindowManager as RddDesktop, type RddDesktopProps, PanelFloatingWindow as RddFloatingWidget, type RddFloatingWidgetProps, ModalStackRenderer as RddModals, PanelOverlayRoot as RddPanelOverlay, type RddPanelOverlayProps, PanelToolbar as RddPanelToolbar, type RddPanelToolbarProps, SecondarySidebar as RddSecondarySidebar, type RddSecondarySidebarProps, RddSidePanels, type RddSidePanelsProps, Sidebar as RddSidebar, type RddSidebarProps, ToastContainer as RddToasts, type RddToastsProps, Toolbar as RddToolbar, ToolbarButton as RddToolbarButton, type RddToolbarButtonProps, ToolbarCenter as RddToolbarCenter, ToolbarItem as RddToolbarItem, type RddToolbarProps, ToolbarSearchInput as RddToolbarSearch, type RddToolbarSearchProps, ToolbarSeparator as RddToolbarSeparator, ToolbarSpacer as RddToolbarSpacer, ToolbarToggle as RddToolbarToggle, type RddToolbarToggleProps, type ResizeConstraints, type ResizeDir, type ResizeRect, type ResolvedToastOptions, type SearchResult, type SerializedLayout, type ShowContextMenuOptions, type SidePanelOptions, type SidePanelsApi, type SidebarActionButton, type SidebarContextValue as SidebarContext, type SidebarCustomEntry, type SidebarHandle, type SidebarHeaderAction, type SidebarRailEntry, type SidebarTab, type SidebarTabContextValue as SidebarTabContext, type SplitDirection, type SplitOrientation, type Stretch, type TaskbarVisibility, type ToastAdapter, type ToastFunction, type ToastOptions, type ToastPosition, type ToastPromiseMessages, type ToastType, type ToolbarActionItem, type ToolbarContextValue, type ToolbarGroupEntry, type ToolbarGroupItem, type ToolbarGroupSubItem, type ToolbarHandle, type ToolbarItem$1 as ToolbarItem, type ToolbarPosition, type ToolbarRadioItem, type ToolbarSeparator$1 as ToolbarSeparator, type ToolbarToggleItem, type ToolbarVariant, type Workspace, type WorkspaceActions, type WorkspaceConfig, type WorkspaceState, computeResizedRect, createWorkspace, defaultPredefinedMessages as defaultMessages, formatLabel, isComputedRtl, isElementRtl, isSerializable, sidebarSectionToTab as sectionToTab, startPointerDrag, toast, useActivePanelContribution as useActiveContribution, useBeforeClose, useColorScheme, useShowContextMenu as useContextMenu, usePanelFloatingWindowManager as useFloatingWidgets, useFormatMessage, useStyleClasses as useHostClasses, useMergedSidebarTabs, useMergedToolbarItems, usePredefinedMessages as useMessages, useModals, usePanel, usePanelContextMenu, usePanelContribution, usePanelEvents, usePanelSize, useSaveState, useSidePanels, useSidebar, useSidebarTab, useToolbar, useWorkspace, useWindowManagerState as useWorkspaceState };