react-dockable-desktop 7.11.0-next.1 → 7.12.0-next.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/CHANGELOG.md +169 -5
- package/README.md +13 -4
- package/dist/index.cjs +10 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +376 -14
- package/dist/index.d.ts +376 -14
- package/dist/index.js +10 -8
- package/dist/index.js.map +1 -1
- package/dist/styles.css +60 -1
- package/package.json +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,168 @@ replacement and the version that removes the old API.
|
|
|
10
10
|
|
|
11
11
|
## [Unreleased]
|
|
12
12
|
|
|
13
|
+
## [7.12.0-next.0] — 2026-11-21
|
|
14
|
+
|
|
15
|
+
**Pre-release** on npm's `next` tag (`npm install react-dockable-desktop@next`), for feedback before
|
|
16
|
+
7.12.0. Pop-out windows: a panel, or a managed widget that left its panel, can move into its own
|
|
17
|
+
browser window, for a second monitor, and come back where it was, without its content remounting.
|
|
18
|
+
The window gets the page's styles and theme; `popoutWrapper` points CSS-in-JS at it, and
|
|
19
|
+
`usePanelWindow()` gives panel code its window. See the new guide, [Pop-out Windows](https://felipecarrillo100.github.io/react-dockable-desktop/guide/popout-windows).
|
|
20
|
+
Additions only and off by default (`createWorkspace({ popOut: true })`): an app that doesn't turn it
|
|
21
|
+
on sees no change. Read **Upgrading** below for five new message keys.
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- **Pop-out windows for panels**: a panel can move into its own browser window, for a second
|
|
26
|
+
monitor, and come back, without remounting: its state, scroll offsets and a canvas's WebGL
|
|
27
|
+
context go with it.
|
|
28
|
+
- `createWorkspace({ popOut: true })` enables it; the default is `false`, and then nothing of it
|
|
29
|
+
runs.
|
|
30
|
+
- `defaultOptions.canPopOut: true` opts a panel type in (off by default). A development warning
|
|
31
|
+
says when a type sets it on a workspace without `popOut`.
|
|
32
|
+
- `workspace.popOutPanel(id): PopOutResult` (new exported type): synchronous, to call inside the
|
|
33
|
+
user's click. `{ ok: true }`, or `{ ok: false, reason }` with `'disabled'`, `'not-open'`,
|
|
34
|
+
`'not-allowed'`, `'no-gesture'`, `'blocked'` (the pop-up blocker) or `'no-window'`; the panel
|
|
35
|
+
stays where it was on a refusal, and nothing is shown to the user. A second call brings the
|
|
36
|
+
window forward.
|
|
37
|
+
- `workspace.returnPanel(id): { ok: boolean }` brings it back where it was: into the group it was
|
|
38
|
+
docked in, among its tabs; when its group went with it, the group of a tab-mate back before it;
|
|
39
|
+
a panel that was alone in its group, beside the same panels on the same side at the same size,
|
|
40
|
+
or beside the nearest part of its old layout still docked when its neighbours are out too; into
|
|
41
|
+
the empty grid when nothing of its old layout is docked. Several panels out at once come back,
|
|
42
|
+
in any order, to the original layout. Otherwise floating (or into the first group, for a type
|
|
43
|
+
that can't float).
|
|
44
|
+
Closing the window and its "Return to desktop" button do the same, and so does unmounting the
|
|
45
|
+
provider. Closing the panel closes its window with it; `loadLayout()` closes every window and
|
|
46
|
+
shows the loaded layout.
|
|
47
|
+
- `maximizePanel` and `floatPanel` are ignored while a panel is in its own window; minimizing or
|
|
48
|
+
docking it from code brings it back to its place first, then applies.
|
|
49
|
+
- While out, the panel is a floating panel with `PanelInfo.poppedOut: true` (runtime only).
|
|
50
|
+
`saveLayout()` writes it where it would come back to, so the saved layout is the one it had
|
|
51
|
+
before it left (docked in its place, or floating at its rect). After a reload it is in the
|
|
52
|
+
page; "Open in new window" reopens it in one click.
|
|
53
|
+
- `<DockableDesktopProvider popoutUrl>`: the app's same-origin page for the window (an empty
|
|
54
|
+
`<body>`); a blank window without it. A page that can't be read (another origin) or doesn't
|
|
55
|
+
load within 10 s sends the panel back, after `popOutPanel` has returned. The window's title
|
|
56
|
+
follows the panel's.
|
|
57
|
+
- An "Open in new window" item in the tab menu and the floating window's ⋮ menu of `canPopOut`
|
|
58
|
+
types; from it, a blocked pop-up shows a toast.
|
|
59
|
+
- Messages `popOutWindow`, `returnToDesktop` and `popOutBlocked`.
|
|
60
|
+
- **Focus across windows** (pop-out windows):
|
|
61
|
+
- `workspace.focusPanelWindow(id): { ok: boolean }` brings forward the window that holds a panel
|
|
62
|
+
(its pop-out, a widget's too, or the main window) and makes it the active panel. Best effort; `ok`
|
|
63
|
+
is false for an id that isn't open. From a widget in its own window, it brings its owner forward.
|
|
64
|
+
- `focusPanel(id)` on a panel in its own window brings that window forward too.
|
|
65
|
+
- A click or focus inside a pop-out makes its panel the active one, so the page's sidebar shows its
|
|
66
|
+
contributions; the frame carries `data-rdd-focused` as a floating window does.
|
|
67
|
+
- Escape is per window: it closes the topmost menu or flyout of the window it was pressed in, so a
|
|
68
|
+
menu in a pop-out stays open through an Escape in the page, and the other way round.
|
|
69
|
+
- While `popOut` is on, the taskbar lists the panels in their own window, with a small marker; a
|
|
70
|
+
click brings the window forward.
|
|
71
|
+
- **Managed widgets in their own window** (widgets out of the panel, 7.11.0):
|
|
72
|
+
- `useFloatingWidgets().popOut(id): PopOutResult`, with the same reasons as `popOutPanel`.
|
|
73
|
+
Synchronous, inside the user's click. From inside its panel the widget leaves the panel and goes
|
|
74
|
+
into the window as one move; from docked, tabbed, floating or minimised, its panel moves. A
|
|
75
|
+
refusal changes nothing.
|
|
76
|
+
- `ManagedWidget.canPopOut` opts it in (off by default; a development warning when the workspace
|
|
77
|
+
has no `popOut`). `useWidget().isPoppedOut`; `WidgetMenuContext.canPopOut`, `isPoppedOut` and
|
|
78
|
+
`popOut()`, for the app's `titleMenu`.
|
|
79
|
+
- While out, `location()` is `'floating'`. `move()` to any place brings it back and moves it, as one
|
|
80
|
+
move. Closing the window, or its "Back into the panel" button, puts it back into its panel where it
|
|
81
|
+
was. `onWillMove` / `onMoved` run around each move, with the new size. `placement()` while out
|
|
82
|
+
reopens it floating at its rect before the window. The owner closing closes the window and the
|
|
83
|
+
widget.
|
|
84
|
+
- `workspace.popOutPanel(id)` / `returnPanel(id)` on the widget's panel id do the same, with the
|
|
85
|
+
widget's rules; `panel:popped-out` / `panel:returned` are sent for that panel.
|
|
86
|
+
- Its content gets its own window from `usePanelWindow()`, and the `popoutWrapper` is around it too.
|
|
87
|
+
- In the window, the frame's title icon opens the widget's `titleMenu`.
|
|
88
|
+
- **Code in a pop-out window: `popoutWrapper`, `usePanelWindow()`, `isPoppedOut`, events.**
|
|
89
|
+
- `<DockableDesktopProvider popoutWrapper>`: a component given `{ window, document, children }`,
|
|
90
|
+
rendered around every panel's content for its whole life while the workspace has `popOut`
|
|
91
|
+
(none otherwise), so nothing remounts. `window` / `document` are where the panel is: the
|
|
92
|
+
pop-out's while it is out, switched before the panel moves in. For CSS-in-JS whose rules are
|
|
93
|
+
inserted with `insertRule` (Emotion, styled-components in production): give it a cache per
|
|
94
|
+
document, and the panel is styled in the pop-out.
|
|
95
|
+
- `usePanelWindow(): PanelWindow` (`{ window, document }`): the window the panel is shown in; it
|
|
96
|
+
changes on pop-out and return.
|
|
97
|
+
- `usePanel().isPoppedOut`.
|
|
98
|
+
- Events `panel:popped-out { id, window }` (once the window's page is ready) and
|
|
99
|
+
`panel:returned { id }` (whatever brought it back; not for a panel closed while out).
|
|
100
|
+
- New exported types `PanelWindow` and `PopoutWrapperProps`.
|
|
101
|
+
- **Styles in pop-out windows.** A pop-out window looks like the page: it gets the page's
|
|
102
|
+
stylesheets (every `<link rel=stylesheet>` and `<style>` in `<head>`, in order, and
|
|
103
|
+
`document.adoptedStyleSheets` as text), `<html>`'s and `<body>`'s attributes (skin, colour
|
|
104
|
+
scheme, theme classes such as `.dark` or `data-bs-theme`, `dir`, `lang`) with their inline CSS
|
|
105
|
+
variables and `color-scheme`, and the workspace's colour scheme and skin on its frame. All of it
|
|
106
|
+
follows changes while the window is open: a sheet added or removed, a scheme or skin switch. The
|
|
107
|
+
frame stays hidden until the copied stylesheets have loaded (3 s at most), so nothing shows
|
|
108
|
+
unstyled. Not copied: rules a CSS-in-JS library inserts with `insertRule` (their `<style>` tags
|
|
109
|
+
are empty).
|
|
110
|
+
|
|
111
|
+
### Upgrading
|
|
112
|
+
|
|
113
|
+
- **Five new message keys:** `popOutWindow`, `returnToDesktop`, `backIntoPanel`, `popOutBlocked` and
|
|
114
|
+
`inOwnWindow`. An app that
|
|
115
|
+
types its translation table as `Record<MessageKey, string>` must add them to compile; at run
|
|
116
|
+
time a missing key falls back to the English default.
|
|
117
|
+
|
|
118
|
+
### Changed
|
|
119
|
+
|
|
120
|
+
- **Internal: the library takes the document and window from the element it acts on** (groundwork
|
|
121
|
+
for pop-out windows; no change in behaviour, no API change). The context menu, the toolbar flyout
|
|
122
|
+
and the panel search dropdown portal into the body of the document they were opened from and fit
|
|
123
|
+
that window; focus, Escape, outside clicks, a managed widget's drag classes, focus restore, frames
|
|
124
|
+
and `ResizeObserver`s on panel content follow the element's own document and window, and DOM
|
|
125
|
+
checks no longer use `instanceof`, which fails for nodes of another window.
|
|
126
|
+
|
|
127
|
+
## [7.11.0] — 2026-11-19
|
|
128
|
+
|
|
129
|
+
**Widgets that can leave their panel.** A managed floating widget (`useFloatingWidgets()`) can be
|
|
130
|
+
docked beside its panel, become a tab in its group, or float as a window of its own, and come back,
|
|
131
|
+
without its content remounting: its state, a canvas and its WebGL context, and a playing `<video>`
|
|
132
|
+
all survive. It stays owned by its panel (`usePanel()` inside it is still the owner). Its
|
|
133
|
+
placement can be saved and restored, and iframes can be kept from reloading as panels and widgets
|
|
134
|
+
move. Guide: [Widgets Out of the Panel](https://felipecarrillo100.github.io/react-dockable-desktop/guide/widgets-out-of-the-panel).
|
|
135
|
+
|
|
136
|
+
This release is the two pre-releases below, tried by a client in production code, plus two small
|
|
137
|
+
fixes and a docs review. Coming from 7.10.1, read both sections below: **7.11.0-next.0** for the
|
|
138
|
+
feature and its **Changed** points (the content wrapper `div.rdd-panel-float__content`), and
|
|
139
|
+
**7.11.0-next.1** for the fixes and additions that followed.
|
|
140
|
+
|
|
141
|
+
In short, new:
|
|
142
|
+
- on `useFloatingWidgets()`: `move()`, `location()` and `placement()`;
|
|
143
|
+
- on `ManagedWidget`: `canDock`, `canFloat`, `titleMenu`, `placement` and `preserveEmbeds`;
|
|
144
|
+
- `useWidget()`, returning a `WidgetHandle` (`id`, `ownerPanelId`, `panelId`, `location`,
|
|
145
|
+
`onWillMove`, `onMoved`);
|
|
146
|
+
- on the workspace: `focusPanel(id, { restore })` and `updatePanelProps()`;
|
|
147
|
+
- `preserveEmbeds` on panel types, and `PanelInfo.owner`;
|
|
148
|
+
- types `WidgetTarget`, `WidgetLocation`, `MoveResult`, `WidgetMenuContext`, `WidgetHandle`,
|
|
149
|
+
`WidgetPlacement` and `PanelOwner`;
|
|
150
|
+
- CSS classes `.rdd-panel-float__content`, `.rdd-hosted-widget`, `.rdd-workspace-tab-icon--menu` and
|
|
151
|
+
`.rdd-window-title-icon--menu`.
|
|
152
|
+
|
|
153
|
+
### Fixed
|
|
154
|
+
|
|
155
|
+
- **`onMoved` now follows every move that called `onWillMove`.** A `move()` from floating to floating
|
|
156
|
+
(a new `rect`), or from a tab to a tab in the same group, called `onWillMove` but never `onMoved`,
|
|
157
|
+
so content restoring its view in `onMoved` didn't.
|
|
158
|
+
- **`move(id, { to: 'floating' })` without a `rect`, for a widget already out of its panel,** opens
|
|
159
|
+
where its panel is on screen, at its size (a floating one stays where it is). It opened at the
|
|
160
|
+
workspace's top-left corner, at the config's size.
|
|
161
|
+
|
|
162
|
+
### Docs
|
|
163
|
+
|
|
164
|
+
- **"Content with its own view", corrected:** a chart, a timeline or a profile keeps its visible range
|
|
165
|
+
on every size change, in the content itself (a splitter drag has the same effect as a move), from a
|
|
166
|
+
camera computed from the range rather than a fit, which drifts by its margin. A map keeping its
|
|
167
|
+
camera through `onWillMove` / `onMoved` is unchanged. Also: a `<video>` needs nothing to survive a
|
|
168
|
+
move.
|
|
169
|
+
- **Reviewed against the code:** the guide, the Panel Overlay, Workspace, Layout, Event Bus, Context
|
|
170
|
+
Menus, Theming, Panel Registry and Panel Contributions pages, the README and the API comments now
|
|
171
|
+
describe widgets out of the panel as they behave (the floating ⋮ menu has Close but no Minimize;
|
|
172
|
+
`placement()` returns `null` for a widget that isn't open; a widget's panel is never saved and has
|
|
173
|
+
no props of its own; `'rdd:'` component keys are reserved).
|
|
174
|
+
|
|
13
175
|
## [7.11.0-next.1] — 2026-11-19
|
|
14
176
|
|
|
15
177
|
**Pre-release** on npm's `next` tag, from the first feedback on 7.11.0-next.0. Additions and fixes
|
|
@@ -80,8 +242,8 @@ Additions only: an app that uses none of it sees no change, apart from the point
|
|
|
80
242
|
`ContextMenuItem[]`, built each time the menu opens.
|
|
81
243
|
- In the panel, the title icon becomes a button that opens the items. Without an icon it shows a
|
|
82
244
|
menu glyph. Without `titleMenu` nothing changes.
|
|
83
|
-
- Out of the panel, the items lead its tab's menu
|
|
84
|
-
|
|
245
|
+
- Out of the panel, the items lead its tab's menu (before the built-in Minimize and Close) and its
|
|
246
|
+
floating title-bar ⋮ menu (before Close). The built-in Float isn't offered for such a panel, because your
|
|
85
247
|
items replace it.
|
|
86
248
|
- New type: `WidgetMenuContext`.
|
|
87
249
|
- **`useWidget()`:** inside a managed widget's content, the widget's own side; `null` elsewhere.
|
|
@@ -98,7 +260,7 @@ Additions only: an app that uses none of it sees no change, apart from the point
|
|
|
98
260
|
- New type: `WidgetHandle`.
|
|
99
261
|
- **`useFloatingWidgets().placement(id)` and `open(id, { placement })`: a widget opens where it was
|
|
100
262
|
after a reload.** `placement()` returns a `WidgetPlacement`: opaque, versioned, plain JSON, the same
|
|
101
|
-
in
|
|
263
|
+
in the Vue and Angular editions. Store it with your panel's own state.
|
|
102
264
|
- It records where the widget is in the panel (corner, stretch, docked or free, size), or where it
|
|
103
265
|
is out of it (docked beside its owner, tabbed, floating) together with where it goes back to.
|
|
104
266
|
- A free position is kept as an offset from the panel corner it was nearest, so it keeps its gap on a
|
|
@@ -118,7 +280,7 @@ Additions only: an app that uses none of it sees no change, apart from the point
|
|
|
118
280
|
- **`updatePanelProps(id, props | (prev) => next)`:** replaces the props an open panel was opened
|
|
119
281
|
with, or derives them from the current ones. The panel re-renders with them, `serializable` is
|
|
120
282
|
re-checked (so `saveLayout()` saves or excludes it accordingly), and `layout:changed` is
|
|
121
|
-
published. It does nothing for a panel that isn't open.
|
|
283
|
+
published. It does nothing for a panel that isn't open, or for a managed widget's own panel.
|
|
122
284
|
- **`preserveEmbeds`**, on a panel type's `defaultOptions` and on a managed widget: an `<iframe>` (or
|
|
123
285
|
other embedded document or media) inside doesn't reload when the panel or widget moves: docked,
|
|
124
286
|
floated, minimised, restored, the grid changing around it, or a widget out of its panel and
|
|
@@ -1340,7 +1502,9 @@ All of the above is additive and backward-compatible: every new field is optiona
|
|
|
1340
1502
|
|
|
1341
1503
|
---
|
|
1342
1504
|
|
|
1343
|
-
[Unreleased]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.
|
|
1505
|
+
[Unreleased]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.12.0-next.0...HEAD
|
|
1506
|
+
[7.12.0-next.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.11.0...v7.12.0-next.0
|
|
1507
|
+
[7.11.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.10.1...v7.11.0
|
|
1344
1508
|
[7.11.0-next.1]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.11.0-next.0...v7.11.0-next.1
|
|
1345
1509
|
[7.11.0-next.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.10.1...v7.11.0-next.0
|
|
1346
1510
|
[7.10.1]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.10.0...v7.10.1
|
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)
|
|
@@ -28,6 +28,7 @@ serialised layout format**, so a layout saved by either library loads in the oth
|
|
|
28
28
|
- **Docking Rules** — keep a panel type in the grid (`canFloat: false`) or floating (`canDock: false`), and veto any move with one `canDrop` function; forbidden targets simply aren't offered
|
|
29
29
|
- **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
|
|
30
30
|
- **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, and can move one out of its panel (docked beside it, a tab, or floating) and back without remounting it
|
|
31
|
+
- **Pop-out Windows** — a panel, or a managed widget out of its panel, moves into its own browser window for a second monitor and comes back where it was, without remounting: state, scroll and a WebGL context go with it. The window gets the page's styles and theme; opt-in with `createWorkspace({ popOut: true })` and `canPopOut` per type ([guide →](https://felipecarrillo100.github.io/react-dockable-desktop/guide/popout-windows))
|
|
31
32
|
- **Touch & Mobile Ready** — full iPad and Android support: long-press to drag tabs, touch resize, 44px coarse-pointer targets throughout
|
|
32
33
|
- **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 (a heavy, rarely shown panel type can opt out with `keepAlive: false`; an `<iframe>` can be kept from reloading on moves with `preserveEmbeds: true`, where the browser has `moveBefore()`)
|
|
33
34
|
- **i18n & RTL** — full Right-to-Left layout support; `dir="rtl"` flips every control, tab order, and drop zone automatically
|
|
@@ -191,8 +192,9 @@ Call these inside any component within the `DockableDesktopProvider` tree:
|
|
|
191
192
|
| `useSidebarTab()` | `SidebarTabContext` | Self-control for content inside a sidebar tab |
|
|
192
193
|
| `useContextMenu()` | `(options) => void` | Show the shared context menu at a pointer event or position |
|
|
193
194
|
| `usePanelContextMenu(items)` | `void` | Inject dynamic context menu items into this panel's right-click menu |
|
|
194
|
-
| `useFloatingWidgets()` | `FloatingWidgetsApi` | Open/close N named floating widgets inside a panel overlay at runtime; each independently anchored, dockable, and resizable. `move()` takes one out of its panel and back, `placement()` saves where it is |
|
|
195
|
-
| `useWidget()` | `WidgetHandle \| null` | Inside a managed widget: its `id`, owner panel, live `location`, and `onWillMove` / `onMoved` around every move |
|
|
195
|
+
| `useFloatingWidgets()` | `FloatingWidgetsApi` | Open/close N named floating widgets inside a panel overlay at runtime; each independently anchored, dockable, and resizable. `move()` takes one out of its panel and back, `placement()` saves where it is, `popOut()` puts it in its own window |
|
|
196
|
+
| `useWidget()` | `WidgetHandle \| null` | Inside a managed widget: its `id`, owner panel, own `panelId` while out of the panel, live `location`, `isPoppedOut`, and `onWillMove` / `onMoved` around every move |
|
|
197
|
+
| `usePanelWindow()` | `PanelWindow` | Inside a panel: `{ window, document }` of the window it is shown in, the pop-out's while it is in its own window |
|
|
196
198
|
| `useFormatMessage()` | `MessageFormatter` | i18n formatter matching the current provider's locale |
|
|
197
199
|
| `useMessages()` | `Record<MessageKey, MessageDescriptor>` | The effective built-in message table |
|
|
198
200
|
| `useHostClasses()` | `HostClasses` | The class props set on the provider (`modalClass`, `windowClass`, …) |
|
|
@@ -217,7 +219,7 @@ const panelCount = useWorkspaceState(s => Object.keys(s.panels).length);
|
|
|
217
219
|
```ts
|
|
218
220
|
const workspace = createWorkspace({
|
|
219
221
|
panels, initialState?, formatMessage?, messages?, dir?,
|
|
220
|
-
defaultSplitRatio?, defaultEdgeSplitRatio?, zIndexBase?,
|
|
222
|
+
defaultSplitRatio?, defaultEdgeSplitRatio?, zIndexBase?, canDrop?, popOut?,
|
|
221
223
|
});
|
|
222
224
|
|
|
223
225
|
// Panel lifecycle
|
|
@@ -244,6 +246,11 @@ workspace.setPanelIcon(id, icon) // null restores the registration
|
|
|
244
246
|
workspace.setPanelDirty(id, dirty, options?)
|
|
245
247
|
workspace.updatePanelProps(id, props | prev => next) // new props; re-checks whether the panel can be saved
|
|
246
248
|
|
|
249
|
+
// Pop-out windows (createWorkspace({ popOut: true }) and defaultOptions.canPopOut)
|
|
250
|
+
workspace.popOutPanel(id) // → PopOutResult; into its own browser window, inside the user's click
|
|
251
|
+
workspace.returnPanel(id) // → { ok }; back where it was
|
|
252
|
+
workspace.focusPanelWindow(id) // → { ok }; bring the window that holds it forward, best effort
|
|
253
|
+
|
|
247
254
|
// Synchronous state queries (no hook needed)
|
|
248
255
|
workspace.isOpen(id) // → boolean
|
|
249
256
|
workspace.getOpenPanelIds() // → string[]
|
|
@@ -282,6 +289,7 @@ Lower-level methods (close guards, state providers, split and floating-window ge
|
|
|
282
289
|
| `containerType` | `ContainerType` | Where it is rendered; updates live (a docked panel that is floated re-renders as `'floating-window'`) |
|
|
283
290
|
| `isActive` | `boolean` | The globally active panel. Always `false` in a modal or drawer |
|
|
284
291
|
| `isMinimized` / `isFloating` | `boolean` | Current state of a workspace panel |
|
|
292
|
+
| `isPoppedOut` | `boolean` | In its own browser window (`isFloating` is true too) |
|
|
285
293
|
| `close(options?)` | `(options?: CloseOptions) => void` | Request the container to close; respects dirty state and close guards (`{ force: true }` skips them) |
|
|
286
294
|
| `minimize()` | `() => void` | Minimize this panel to the taskbar; no effect in a modal or drawer |
|
|
287
295
|
| `setDirty(dirty, options?)` | `(dirty: boolean, options?: DirtyStateOptions) => void` | Mark unsaved changes; triggers confirmation dialog on close |
|
|
@@ -468,6 +476,7 @@ Complete guides, API reference, and interactive demo at:
|
|
|
468
476
|
| [Best Practices](https://felipecarrillo100.github.io/react-dockable-desktop/guide/best-practices) | Patterns for production-ready implementations |
|
|
469
477
|
| [Panel Overlay](https://felipecarrillo100.github.io/react-dockable-desktop/guide/panel-overlay) | `RddPanelOverlay`, panel toolbars, `RddFloatingWidget`, `useFloatingWidgets` |
|
|
470
478
|
| [Widgets Out of the Panel](https://felipecarrillo100.github.io/react-dockable-desktop/guide/widgets-out-of-the-panel) | Dock, tab or float a managed widget beside its panel; `useWidget`, `placement`, `preserveEmbeds` |
|
|
479
|
+
| [Pop-out Windows](https://felipecarrillo100.github.io/react-dockable-desktop/guide/popout-windows) | A panel or widget in its own browser window; `popOutPanel`, `popoutUrl`, `popoutWrapper` for CSS-in-JS, `usePanelWindow` |
|
|
471
480
|
| [Toast Notifications](https://felipecarrillo100.github.io/react-dockable-desktop/guide/toast) | `toast` singleton, `<RddToasts>`, queue behaviour, theming, `ToastAdapter` |
|
|
472
481
|
| [Migration Guide](https://felipecarrillo100.github.io/react-dockable-desktop/guide/migration) | Upgrading across major versions |
|
|
473
482
|
| [UI Frameworks](https://felipecarrillo100.github.io/react-dockable-desktop/guide/ui-frameworks) | Using it with MUI, Bootstrap or Tailwind: dark mode, z-index, overrides |
|