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/README.md +96 -119
- package/dist/index.cjs +10 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +684 -799
- package/dist/index.d.ts +684 -799
- package/dist/index.js +10 -5
- package/dist/index.js.map +1 -1
- package/dist/styles.css +360 -366
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# React Dockable Desktop
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/react-dockable-desktop)
|
|
4
4
|
[](https://www.typescriptlang.org/)
|
|
5
5
|
[](#touch--mobile)
|
|
6
6
|
[](#license)
|
|
@@ -26,12 +26,12 @@ serialised layout format**, so a layout saved by either library loads in the oth
|
|
|
26
26
|
- **Split-Docking Grid** — drag panels to split any zone into rows/columns or group into tabbed containers
|
|
27
27
|
- **Workspace Edge Docking** — drag to the outer edges to dock a panel as a full-width or full-height strip
|
|
28
28
|
- **Floating Windows** — pop panels into freely resizable floating windows; 8-direction resize handles (N/NE/E/SE/S/SW/W/NW), maximize, minimize; drag to a workspace corner to anchor it there — anchored windows stack with 8 px gaps and reposition when the viewport resizes
|
|
29
|
-
- **Panel Overlay** — per-panel overlay layer with anchored toolbars (`
|
|
29
|
+
- **Panel Overlay** — per-panel overlay layer with anchored toolbars (`RddPanelToolbar`, `RddToolbarButton`, `RddToolbarToggle`, async search) and corner-anchored floating windows that stack, drag, and dock; an axis can span the panel instead of carrying a fixed size, so a strip or column tracks the panel as it resizes — set declaratively or by dragging an edge out until it snaps; `useFloatingWidgets()` opens N named windows dynamically from data or event handlers
|
|
30
30
|
- **Touch & Mobile Ready** — full iPad and Android support: long-press to drag tabs, touch resize, 44px coarse-pointer targets throughout
|
|
31
31
|
- **Zero-Unmount DOM Persistence** — panel DOM nodes are moved, never destroyed, across docking, floating, and tab-switching alike, all by default; WebGL, maps, terminals, and forms retain full state with zero integration work
|
|
32
32
|
- **i18n & RTL** — full Right-to-Left layout support; `dir="rtl"` flips every control, tab order, and drop zone automatically
|
|
33
33
|
- **Inter-Panel Pub/Sub** — lightweight typed event bus for decoupled panel-to-panel communication
|
|
34
|
-
- **Imperative API** — `
|
|
34
|
+
- **Imperative API** — the workspace from `createWorkspace()` opens, closes, focuses, and serializes panels from anywhere — inside or outside React
|
|
35
35
|
- **Layout Serialization** — save and restore the full workspace as a JSON string; survives page reloads
|
|
36
36
|
- **7 Built-in Skins** — VSCode, macOS, Chrome, Slate, Nord, Obsidian, Tokyo — all fully themeable via CSS variables
|
|
37
37
|
- **Toast Notifications** — imperative singleton `toast.info/success/warning/error/promise()` with queue, pause-on-hover, progress bar, and a `ToastAdapter` interface for delegating to a third-party notification library
|
|
@@ -53,23 +53,23 @@ Import styles in your app entry file:
|
|
|
53
53
|
import 'react-dockable-desktop/styles.css';
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
**Requirements:** React ≥
|
|
56
|
+
**Requirements:** React ≥ 18. No other runtime dependencies.
|
|
57
57
|
|
|
58
58
|
---
|
|
59
59
|
|
|
60
60
|
## Quick Start
|
|
61
61
|
|
|
62
|
-
### 1. Create a
|
|
62
|
+
### 1. Create a workspace
|
|
63
63
|
|
|
64
|
-
Define your panel catalog and create
|
|
64
|
+
Define your panel catalog and create the workspace with `createWorkspace()` **outside React**, at module scope. It acts as the bridge between your imperative code and the React tree, and it is live immediately — calls made before the provider mounts apply straight away.
|
|
65
65
|
|
|
66
66
|
```ts
|
|
67
67
|
// workspace.ts
|
|
68
|
-
import {
|
|
68
|
+
import { createWorkspace } from 'react-dockable-desktop';
|
|
69
69
|
import MapPanel from './panels/MapPanel';
|
|
70
70
|
import EditorPanel from './panels/EditorPanel';
|
|
71
71
|
|
|
72
|
-
export const workspace =
|
|
72
|
+
export const workspace = createWorkspace({
|
|
73
73
|
panels: {
|
|
74
74
|
map: { component: MapPanel, defaultOptions: { title: 'Map View' } },
|
|
75
75
|
editor: { component: EditorPanel, defaultOptions: { title: 'Editor' } },
|
|
@@ -80,26 +80,26 @@ export const workspace = new WorkspaceClient({
|
|
|
80
80
|
|
|
81
81
|
### 2. Mount the Provider
|
|
82
82
|
|
|
83
|
-
`DockableDesktopProvider` is the
|
|
83
|
+
`DockableDesktopProvider` is the only provider — it wraps everything the library needs:
|
|
84
84
|
|
|
85
85
|
```tsx
|
|
86
86
|
// App.tsx
|
|
87
|
-
import { DockableDesktopProvider,
|
|
87
|
+
import { DockableDesktopProvider, RddDesktop, RddModals } from 'react-dockable-desktop';
|
|
88
88
|
import { workspace } from './workspace';
|
|
89
89
|
|
|
90
90
|
export default function App() {
|
|
91
91
|
return (
|
|
92
|
-
<DockableDesktopProvider
|
|
93
|
-
<div
|
|
94
|
-
<
|
|
92
|
+
<DockableDesktopProvider workspace={workspace}>
|
|
93
|
+
<div className="rdd-fill-viewport">
|
|
94
|
+
<RddDesktop />
|
|
95
95
|
</div>
|
|
96
|
-
<
|
|
96
|
+
<RddModals />
|
|
97
97
|
</DockableDesktopProvider>
|
|
98
98
|
);
|
|
99
99
|
}
|
|
100
100
|
```
|
|
101
101
|
|
|
102
|
-
> **Important:** the `
|
|
102
|
+
> **Important:** the `RddDesktop` container must have an explicit height. A `height: 100%` that resolves to zero will produce a development warning. The stylesheet styles nothing outside the library's own elements, so `rdd-fill-viewport` (full-window height, no overflow) is opt-in — and remove the browser's default body margin in your own CSS (`body { margin: 0 }`).
|
|
103
103
|
|
|
104
104
|
### 3. Open Panels
|
|
105
105
|
|
|
@@ -126,11 +126,10 @@ Panels can now be dragged, split, tabbed, floated, and minimized out of the box.
|
|
|
126
126
|
A panel is any React component. Use built-in hooks to integrate with the layout:
|
|
127
127
|
|
|
128
128
|
```tsx
|
|
129
|
-
import {
|
|
129
|
+
import { usePanel } from 'react-dockable-desktop';
|
|
130
130
|
|
|
131
131
|
export default function EditorPanel() {
|
|
132
|
-
const
|
|
133
|
-
const { setDirty, setTitle } = useFormContainer();
|
|
132
|
+
const { id, setDirty, setTitle } = usePanel(); // id: this panel's instance ID — no prop needed
|
|
134
133
|
|
|
135
134
|
const handleChange = (value: string) => {
|
|
136
135
|
setDirty(true); // blocks close until user confirms discard
|
|
@@ -143,43 +142,24 @@ export default function EditorPanel() {
|
|
|
143
142
|
|
|
144
143
|
### Lifecycle callbacks
|
|
145
144
|
|
|
146
|
-
|
|
145
|
+
Lifecycle hooks are called at the top level of the panel component. They always call the latest function you pass (no dependency array) and clean up on unmount:
|
|
147
146
|
|
|
148
147
|
```tsx
|
|
149
|
-
import {
|
|
150
|
-
import { useEffect } from 'react';
|
|
148
|
+
import { usePanel, usePanelEvents, usePanelSize, useBeforeClose, useSaveState } from 'react-dockable-desktop';
|
|
151
149
|
|
|
152
150
|
export default function MapPanel() {
|
|
153
|
-
const {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
onActivate?.(() => {
|
|
166
|
-
// e.g. resume animation, reload data
|
|
167
|
-
const dims = getDimensions?.();
|
|
168
|
-
console.log('active, size:', dims);
|
|
169
|
-
}),
|
|
170
|
-
onDeactivate?.(() => {
|
|
171
|
-
// e.g. pause background work
|
|
172
|
-
}),
|
|
173
|
-
onContainerTypeChange?.((type) => {
|
|
174
|
-
// type === 'floating-window' | 'dockable-panel'
|
|
175
|
-
// e.g. trigger map.resize() after layout change
|
|
176
|
-
}),
|
|
177
|
-
onClose?.(() => {
|
|
178
|
-
// final cleanup — unsubscribe from external stores
|
|
179
|
-
}),
|
|
180
|
-
];
|
|
181
|
-
return () => unsub.forEach(fn => fn?.());
|
|
182
|
-
}, []);
|
|
151
|
+
const { containerType, minimize } = usePanel(); // containerType: 'dockable-panel' | 'floating-window' | …, updates live
|
|
152
|
+
const size = usePanelSize(); // { width, height } | null — re-renders on resize
|
|
153
|
+
|
|
154
|
+
usePanelEvents({
|
|
155
|
+
onActivate: () => { /* e.g. resume animation, reload data */ },
|
|
156
|
+
onDeactivate: () => { /* e.g. pause background work */ },
|
|
157
|
+
onContainerTypeChange: (type) => { /* e.g. trigger map.resize() after layout change */ },
|
|
158
|
+
onClose: () => { /* final cleanup — unsubscribe from external stores */ },
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
useBeforeClose(async () => confirm('Close the map?')); // resolve false to keep it open
|
|
162
|
+
useSaveState(() => ({ zoom: currentZoom() })); // saved with the layout by saveLayout()
|
|
183
163
|
|
|
184
164
|
return <div>Map</div>;
|
|
185
165
|
}
|
|
@@ -193,40 +173,44 @@ Call these inside any component within the `DockableDesktopProvider` tree:
|
|
|
193
173
|
|
|
194
174
|
| Hook | Returns | Use For |
|
|
195
175
|
| :--- | :--- | :--- |
|
|
196
|
-
| `
|
|
197
|
-
| `
|
|
198
|
-
| `
|
|
199
|
-
| `
|
|
200
|
-
| `
|
|
201
|
-
| `
|
|
202
|
-
| `
|
|
203
|
-
| `
|
|
204
|
-
| `
|
|
205
|
-
| `
|
|
176
|
+
| `useWorkspace()` | `Workspace` | The workspace: open, close, float, dock, minimize, maximize, serialize panels; `publish`/`subscribe`; `registry` |
|
|
177
|
+
| `useWorkspaceState(selector?)` | `WorkspaceState` or selected slice | Read layout, floating windows, active panel ID |
|
|
178
|
+
| `useModals()` | `ModalsApi` | Open, close and track modal overlays |
|
|
179
|
+
| `useSidePanels()` | `SidePanelsApi` | Open, close and track the left/right side drawers |
|
|
180
|
+
| `usePanel()` | `PanelHandle` | Inside a panel: its `id`, live `containerType`, `isActive`, dirty state, dynamic title/icon, `close()`, `minimize()` |
|
|
181
|
+
| `usePanelEvents(events)` | `void` | Inside a panel: activate, deactivate, minimize, restore, close, resize, container-type change |
|
|
182
|
+
| `useBeforeClose(guard)` | `void` | Inside a panel: a close guard; resolve `false` to keep it open |
|
|
183
|
+
| `useSaveState(getState)` | `void` | Inside a panel: state pulled fresh by every `saveLayout()` |
|
|
184
|
+
| `usePanelSize()` | `{ width, height } \| null` | Live panel dimensions across docking, floating, and tab changes, no manual subscription |
|
|
185
|
+
| `useToolbar()` | `ToolbarContextValue` | Read/write toolbar state (active tool, modifiers) from any panel |
|
|
186
|
+
| `useSidebar()` | `SidebarContext` | Open/close sidebar tabs from any component in the `RddSidebar` tree |
|
|
187
|
+
| `useSidebarTab()` | `SidebarTabContext` | Self-control for content inside a sidebar tab |
|
|
188
|
+
| `useContextMenu()` | `(options) => void` | Show the shared context menu at a pointer event or position |
|
|
206
189
|
| `usePanelContextMenu(items)` | `void` | Inject dynamic context menu items into this panel's right-click menu |
|
|
207
|
-
| `
|
|
208
|
-
| `useRegistry()` | `PanelRegistryClass` | The scoped panel registry for the current provider |
|
|
190
|
+
| `useFloatingWidgets()` | `FloatingWidgetsApi` | Open/close N named floating widgets inside a panel overlay at runtime; each independently anchored, dockable, and resizable |
|
|
209
191
|
| `useFormatMessage()` | `MessageFormatter` | i18n formatter matching the current provider's locale |
|
|
192
|
+
| `useMessages()` | `Record<MessageKey, MessageDescriptor>` | The effective built-in message table |
|
|
193
|
+
| `useHostClasses()` | `HostClasses` | The class props set on the provider (`modalClass`, `windowClass`, …) |
|
|
210
194
|
| `usePanelContribution(contribution)` | `void` | Publish toolbar items/sidebar sections shown only while this panel is active |
|
|
211
|
-
| `
|
|
212
|
-
| `useMergedToolbarItems(staticItems)` | `ToolbarItem[]` | `staticItems` + the active panel's contributed toolbar items, ready for `<
|
|
213
|
-
| `useMergedSidebarTabs(staticTabs)` | `SidebarTab[]` | `staticTabs` + the active panel's contributed sections as dynamic tabs, ready for `<
|
|
195
|
+
| `useActiveContribution()` | `PanelContribution \| null` | Read the active panel's published contribution, to merge manually |
|
|
196
|
+
| `useMergedToolbarItems(staticItems)` | `ToolbarItem[]` | `staticItems` + the active panel's contributed toolbar items, ready for `<RddToolbar items={...}>` |
|
|
197
|
+
| `useMergedSidebarTabs(staticTabs)` | `SidebarTab[]` | `staticTabs` + the active panel's contributed sections as dynamic tabs, ready for `<RddSidebar tabs={...}>` |
|
|
214
198
|
| `useColorScheme()` | `'dark' \| 'light'` | Reactively read the workspace's current color scheme from your own panel content |
|
|
215
199
|
|
|
216
200
|
**State selectors** prevent unnecessary re-renders:
|
|
217
201
|
|
|
218
202
|
```ts
|
|
219
203
|
// Only re-renders when activePanelId changes — not on every layout mutation:
|
|
220
|
-
const activeId =
|
|
221
|
-
const panelCount =
|
|
204
|
+
const activeId = useWorkspaceState(s => s.activePanelId);
|
|
205
|
+
const panelCount = useWorkspaceState(s => Object.keys(s.panels).length);
|
|
222
206
|
```
|
|
223
207
|
|
|
224
208
|
---
|
|
225
209
|
|
|
226
|
-
##
|
|
210
|
+
## Workspace Reference
|
|
227
211
|
|
|
228
212
|
```ts
|
|
229
|
-
const workspace =
|
|
213
|
+
const workspace = createWorkspace({ panels, initialState?, formatMessage?, messages?, dir? });
|
|
230
214
|
|
|
231
215
|
// Panel lifecycle
|
|
232
216
|
workspace.openPanel(id, component, options?) // options: title, initialTarget, anchor
|
|
@@ -261,28 +245,21 @@ workspace.setDirection('ltr' | 'rtl')
|
|
|
261
245
|
|
|
262
246
|
---
|
|
263
247
|
|
|
264
|
-
##
|
|
248
|
+
## PanelHandle Reference
|
|
265
249
|
|
|
266
|
-
`
|
|
250
|
+
`usePanel()` returns a `PanelHandle` — in docked panels, floating windows, modals and side drawers alike:
|
|
267
251
|
|
|
268
252
|
| Member | Type | Description |
|
|
269
253
|
| :--- | :--- | :--- |
|
|
270
|
-
| `
|
|
271
|
-
| `
|
|
272
|
-
| `
|
|
273
|
-
| `
|
|
274
|
-
| `
|
|
275
|
-
| `
|
|
276
|
-
| `
|
|
277
|
-
| `
|
|
278
|
-
| `
|
|
279
|
-
| `onRestore?(handler)` | `(handler) => unsubscribe` | Subscribe to restore-from-taskbar events |
|
|
280
|
-
| `onResize?(handler)` | `(handler) => unsubscribe` | Subscribe to resize events; handler receives `(width, height)` |
|
|
281
|
-
| `requestMinimize?()` | `() => void` | Imperatively minimize this panel to the taskbar |
|
|
282
|
-
| `getDimensions?()` | `() => {width, height} \| null` | Synchronously read the current rendered size; `null` until first layout |
|
|
283
|
-
| `onActivate?(handler)` | `(handler) => unsubscribe` | Subscribe to this panel becoming the globally active panel |
|
|
284
|
-
| `onDeactivate?(handler)` | `(handler) => unsubscribe` | Subscribe to this panel losing active status; also fires on destruction |
|
|
285
|
-
| `onContainerTypeChange?(handler)` | `(handler) => unsubscribe` | Subscribe to dock↔float transitions; handler receives the new `ContainerType` |
|
|
254
|
+
| `id` | `string` | The panel's instance ID |
|
|
255
|
+
| `containerType` | `ContainerType` | Where it is rendered; updates live (a docked panel that is floated re-renders as `'floating-window'`) |
|
|
256
|
+
| `isActive` | `boolean` | The globally active panel. Always `false` in a modal or drawer |
|
|
257
|
+
| `isMinimized` / `isFloating` | `boolean` | Current state of a workspace panel |
|
|
258
|
+
| `close(options?)` | `(options?: CloseOptions) => void` | Request the container to close; respects dirty state and close guards (`{ force: true }` skips them) |
|
|
259
|
+
| `minimize()` | `() => void` | Minimize this panel to the taskbar; no effect in a modal or drawer |
|
|
260
|
+
| `setDirty(dirty, options?)` | `(dirty: boolean, options?: DirtyStateOptions) => void` | Mark unsaved changes; triggers confirmation dialog on close |
|
|
261
|
+
| `setTitle(title)` | `(title: string \| MessageDescriptor) => void` | Change the tab/window title dynamically |
|
|
262
|
+
| `setIcon(icon)` | `(icon: ReactNode) => void` | Change the tab/window icon dynamically |
|
|
286
263
|
|
|
287
264
|
### ContainerType
|
|
288
265
|
|
|
@@ -293,12 +270,10 @@ type ContainerType =
|
|
|
293
270
|
| 'left-panel' // rendered inside the left side drawer
|
|
294
271
|
| 'right-panel' // rendered inside the right side drawer
|
|
295
272
|
| 'modal' // rendered inside a modal overlay
|
|
296
|
-
| 'standalone'; // rendered outside the
|
|
273
|
+
| 'standalone'; // rendered outside the desktop (default / no context)
|
|
297
274
|
```
|
|
298
275
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
All `on*` subscribers return an unsubscribe function. Call it (or return it from `useEffect`) to avoid leaks.
|
|
276
|
+
Minimize/restore cycles do **not** change `containerType` or fire `onContainerTypeChange`; use `usePanelEvents({ onMinimize, onRestore })` for those.
|
|
302
277
|
|
|
303
278
|
---
|
|
304
279
|
|
|
@@ -310,8 +285,8 @@ window.addEventListener('beforeunload', () => {
|
|
|
310
285
|
localStorage.setItem('workspace-layout', workspace.saveLayout());
|
|
311
286
|
});
|
|
312
287
|
|
|
313
|
-
// Restore by passing the saved string to
|
|
314
|
-
|
|
288
|
+
// Restore by passing the saved string to createWorkspace():
|
|
289
|
+
createWorkspace({
|
|
315
290
|
panels: { ... },
|
|
316
291
|
initialState: localStorage.getItem('workspace-layout'),
|
|
317
292
|
});
|
|
@@ -321,29 +296,30 @@ new WorkspaceClient({
|
|
|
321
296
|
|
|
322
297
|
## Side Panels & Modals
|
|
323
298
|
|
|
324
|
-
Add `
|
|
299
|
+
Add `RddSidePanels` and `RddModals` to your app root. Placement matters — `RddSidePanels` must be **inside** the workspace container so drawers position correctly; `RddModals` goes **outside** as a full-screen overlay:
|
|
325
300
|
|
|
326
301
|
```tsx
|
|
327
302
|
// App.tsx
|
|
328
|
-
import {
|
|
303
|
+
import { DockableDesktopProvider, RddDesktop, RddSidePanels, RddModals } from 'react-dockable-desktop';
|
|
329
304
|
|
|
330
305
|
function App() {
|
|
331
306
|
return (
|
|
332
|
-
<DockableDesktopProvider
|
|
333
|
-
<div style={{
|
|
334
|
-
<
|
|
335
|
-
<
|
|
307
|
+
<DockableDesktopProvider workspace={workspace}>
|
|
308
|
+
<div className="rdd-fill-viewport" style={{ position: 'relative' }}>
|
|
309
|
+
<RddDesktop />
|
|
310
|
+
<RddSidePanels /> {/* inside — drawers position relative to this container */}
|
|
336
311
|
</div>
|
|
337
|
-
<
|
|
312
|
+
<RddModals /> {/* outside — full-screen overlay */}
|
|
338
313
|
</DockableDesktopProvider>
|
|
339
314
|
);
|
|
340
315
|
}
|
|
341
316
|
|
|
342
|
-
// From any
|
|
343
|
-
const
|
|
317
|
+
// From any component inside the provider:
|
|
318
|
+
const modals = useModals();
|
|
319
|
+
const sidePanels = useSidePanels();
|
|
344
320
|
|
|
345
|
-
|
|
346
|
-
|
|
321
|
+
modals.open(MyForm, { itemId: 42 }, { title: 'Edit Item', size: 'medium' });
|
|
322
|
+
sidePanels.openRight(PropertiesPanel, { nodeId }, { title: 'Properties', width: 320 });
|
|
347
323
|
```
|
|
348
324
|
|
|
349
325
|
---
|
|
@@ -365,7 +341,7 @@ Touch support is built in for v3.1.0+. No extra setup required:
|
|
|
365
341
|
The library does **not** auto-detect direction — the consuming app owns it. Two things must be wired together:
|
|
366
342
|
|
|
367
343
|
```tsx
|
|
368
|
-
// 1. Keep html[dir] in sync for portals (
|
|
344
|
+
// 1. Keep html[dir] in sync for portals (context menu, flyout, toasts)
|
|
369
345
|
// that render into document.body and need CSS direction inheritance.
|
|
370
346
|
useEffect(() => {
|
|
371
347
|
document.documentElement.dir = isRtl ? 'rtl' : 'ltr';
|
|
@@ -374,8 +350,9 @@ useEffect(() => {
|
|
|
374
350
|
// 2. Pass dir prop to the provider — controls workspace layout engine.
|
|
375
351
|
<DockableDesktopProvider
|
|
376
352
|
dir={isRtl ? 'rtl' : 'ltr'}
|
|
353
|
+
workspace={workspace}
|
|
377
354
|
formatMessage={(msg) => intl.formatMessage({ id: msg.id, defaultMessage: msg.defaultMessage })}
|
|
378
|
-
|
|
355
|
+
messages={customMessages}
|
|
379
356
|
>
|
|
380
357
|
```
|
|
381
358
|
|
|
@@ -390,10 +367,10 @@ See the [RTL Support guide](https://felipecarrillo100.github.io/react-dockable-d
|
|
|
390
367
|
## Skins
|
|
391
368
|
|
|
392
369
|
```tsx
|
|
393
|
-
<
|
|
394
|
-
<
|
|
395
|
-
<
|
|
396
|
-
<
|
|
370
|
+
<RddDesktop skin="vscode" /> // default
|
|
371
|
+
<RddDesktop skin="macos" />
|
|
372
|
+
<RddDesktop skin="nord" />
|
|
373
|
+
<RddDesktop skin="tokyo" />
|
|
397
374
|
```
|
|
398
375
|
|
|
399
376
|
| Skin | Character | Active state (Sidebar & Toolbar) |
|
|
@@ -406,7 +383,7 @@ See the [RTL Support guide](https://felipecarrillo100.github.io/react-dockable-d
|
|
|
406
383
|
| `obsidian` | Vercel Midnight — pure black/white | Deep glow + icon drop-shadow |
|
|
407
384
|
| `tokyo` | Tokyo Night — purple accent | Neon glow + vivid icon drop-shadow |
|
|
408
385
|
|
|
409
|
-
All built-in skins include dark and light variants. Create your own skin by overriding CSS custom properties under a `[data-
|
|
386
|
+
All built-in skins include dark and light variants. Create your own skin by overriding CSS custom properties under a `[data-rdd-skin="myskin"]` selector. See the [Theming Guide](https://felipecarrillo100.github.io/react-dockable-desktop/guide/theming) for the full variable reference and the [Per-skin active state guide](https://felipecarrillo100.github.io/react-dockable-desktop/guide/theming#per-skin-active-state-design-language) to customise the sidebar/toolbar active indicator in your own skin.
|
|
410
387
|
|
|
411
388
|
---
|
|
412
389
|
|
|
@@ -430,18 +407,18 @@ Complete guides, API reference, and interactive demo at:
|
|
|
430
407
|
| :--- | :--- |
|
|
431
408
|
| [Installation](https://felipecarrillo100.github.io/react-dockable-desktop/guide/installation) | Requirements, CSS import order, module formats |
|
|
432
409
|
| [Quick Start](https://felipecarrillo100.github.io/react-dockable-desktop/guide/quick-start) | Minimal working app with layout persistence |
|
|
433
|
-
| [
|
|
434
|
-
| [Panel Registry](https://felipecarrillo100.github.io/react-dockable-desktop/guide/panel-registry) | `defaultOptions`,
|
|
410
|
+
| [Workspace](https://felipecarrillo100.github.io/react-dockable-desktop/guide/workspace-client) | `createWorkspace`, full imperative API, multiple providers, i18n config |
|
|
411
|
+
| [Panel Registry](https://felipecarrillo100.github.io/react-dockable-desktop/guide/panel-registry) | `defaultOptions`, per-workspace registry |
|
|
435
412
|
| [Layout System](https://felipecarrillo100.github.io/react-dockable-desktop/guide/layout) | Opening, floating, minimizing, serializing layouts |
|
|
436
|
-
| [Panel Lifecycle & Forms](https://felipecarrillo100.github.io/react-dockable-desktop/guide/forms-and-panels) | Dirty state, close guards, `
|
|
437
|
-
| [Modals & Side Panels](https://felipecarrillo100.github.io/react-dockable-desktop/guide/modals-and-drawers) | Modal stack, drawers, `
|
|
413
|
+
| [Panel Lifecycle & Forms](https://felipecarrillo100.github.io/react-dockable-desktop/guide/forms-and-panels) | Dirty state, close guards, `usePanel` and lifecycle hooks |
|
|
414
|
+
| [Modals & Side Panels](https://felipecarrillo100.github.io/react-dockable-desktop/guide/modals-and-drawers) | Modal stack, drawers, `RddSidebar` component |
|
|
438
415
|
| [Event Bus](https://felipecarrillo100.github.io/react-dockable-desktop/guide/event-bus) | Typed pub/sub, built-in lifecycle events |
|
|
439
416
|
| [Theming](https://felipecarrillo100.github.io/react-dockable-desktop/guide/theming) | CSS variables, custom skins, dark/light modes |
|
|
440
417
|
| [Advanced Topics](https://felipecarrillo100.github.io/react-dockable-desktop/guide/advanced) | RTL, multiple workspaces, custom header actions, custom drag-resize interactions |
|
|
441
418
|
| [Best Practices](https://felipecarrillo100.github.io/react-dockable-desktop/guide/best-practices) | Patterns for production-ready implementations |
|
|
442
|
-
| [Panel Overlay](https://felipecarrillo100.github.io/react-dockable-desktop/guide/panel-overlay) | `
|
|
443
|
-
| [Toast Notifications](https://felipecarrillo100.github.io/react-dockable-desktop/guide/toast) | `toast` singleton, `<
|
|
444
|
-
| [Migration Guide](https://felipecarrillo100.github.io/react-dockable-desktop/guide/migration) |
|
|
419
|
+
| [Panel Overlay](https://felipecarrillo100.github.io/react-dockable-desktop/guide/panel-overlay) | `RddPanelOverlay`, panel toolbars, `RddFloatingWidget`, `useFloatingWidgets` |
|
|
420
|
+
| [Toast Notifications](https://felipecarrillo100.github.io/react-dockable-desktop/guide/toast) | `toast` singleton, `<RddToasts>`, queue behaviour, theming, `ToastAdapter` |
|
|
421
|
+
| [Migration Guide](https://felipecarrillo100.github.io/react-dockable-desktop/guide/migration) | Upgrading across major versions |
|
|
445
422
|
| [API Reference](https://felipecarrillo100.github.io/react-dockable-desktop/api/) | Full type-level reference for all exports |
|
|
446
423
|
|
|
447
424
|
---
|