react-dockable-desktop 7.11.0-next.1 → 7.11.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 +54 -5
- package/README.md +2 -2
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -11
- package/dist/index.d.ts +14 -11
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,54 @@ replacement and the version that removes the old API.
|
|
|
10
10
|
|
|
11
11
|
## [Unreleased]
|
|
12
12
|
|
|
13
|
+
## [7.11.0] — 2026-11-19
|
|
14
|
+
|
|
15
|
+
**Widgets that can leave their panel.** A managed floating widget (`useFloatingWidgets()`) can be
|
|
16
|
+
docked beside its panel, become a tab in its group, or float as a window of its own, and come back,
|
|
17
|
+
without its content remounting: its state, a canvas and its WebGL context, and a playing `<video>`
|
|
18
|
+
all survive. It stays owned by its panel (`usePanel()` inside it is still the owner). Its
|
|
19
|
+
placement can be saved and restored, and iframes can be kept from reloading as panels and widgets
|
|
20
|
+
move. Guide: [Widgets Out of the Panel](https://felipecarrillo100.github.io/react-dockable-desktop/guide/widgets-out-of-the-panel).
|
|
21
|
+
|
|
22
|
+
This release is the two pre-releases below, tried by a client in production code, plus two small
|
|
23
|
+
fixes and a docs review. Coming from 7.10.1, read both sections below: **7.11.0-next.0** for the
|
|
24
|
+
feature and its **Changed** points (the content wrapper `div.rdd-panel-float__content`), and
|
|
25
|
+
**7.11.0-next.1** for the fixes and additions that followed.
|
|
26
|
+
|
|
27
|
+
In short, new:
|
|
28
|
+
- on `useFloatingWidgets()`: `move()`, `location()` and `placement()`;
|
|
29
|
+
- on `ManagedWidget`: `canDock`, `canFloat`, `titleMenu`, `placement` and `preserveEmbeds`;
|
|
30
|
+
- `useWidget()`, returning a `WidgetHandle` (`id`, `ownerPanelId`, `panelId`, `location`,
|
|
31
|
+
`onWillMove`, `onMoved`);
|
|
32
|
+
- on the workspace: `focusPanel(id, { restore })` and `updatePanelProps()`;
|
|
33
|
+
- `preserveEmbeds` on panel types, and `PanelInfo.owner`;
|
|
34
|
+
- types `WidgetTarget`, `WidgetLocation`, `MoveResult`, `WidgetMenuContext`, `WidgetHandle`,
|
|
35
|
+
`WidgetPlacement` and `PanelOwner`;
|
|
36
|
+
- CSS classes `.rdd-panel-float__content`, `.rdd-hosted-widget`, `.rdd-workspace-tab-icon--menu` and
|
|
37
|
+
`.rdd-window-title-icon--menu`.
|
|
38
|
+
|
|
39
|
+
### Fixed
|
|
40
|
+
|
|
41
|
+
- **`onMoved` now follows every move that called `onWillMove`.** A `move()` from floating to floating
|
|
42
|
+
(a new `rect`), or from a tab to a tab in the same group, called `onWillMove` but never `onMoved`,
|
|
43
|
+
so content restoring its view in `onMoved` didn't.
|
|
44
|
+
- **`move(id, { to: 'floating' })` without a `rect`, for a widget already out of its panel,** opens
|
|
45
|
+
where its panel is on screen, at its size (a floating one stays where it is). It opened at the
|
|
46
|
+
workspace's top-left corner, at the config's size.
|
|
47
|
+
|
|
48
|
+
### Docs
|
|
49
|
+
|
|
50
|
+
- **"Content with its own view", corrected:** a chart, a timeline or a profile keeps its visible range
|
|
51
|
+
on every size change, in the content itself (a splitter drag has the same effect as a move), from a
|
|
52
|
+
camera computed from the range rather than a fit, which drifts by its margin. A map keeping its
|
|
53
|
+
camera through `onWillMove` / `onMoved` is unchanged. Also: a `<video>` needs nothing to survive a
|
|
54
|
+
move.
|
|
55
|
+
- **Reviewed against the code:** the guide, the Panel Overlay, Workspace, Layout, Event Bus, Context
|
|
56
|
+
Menus, Theming, Panel Registry and Panel Contributions pages, the README and the API comments now
|
|
57
|
+
describe widgets out of the panel as they behave (the floating ⋮ menu has Close but no Minimize;
|
|
58
|
+
`placement()` returns `null` for a widget that isn't open; a widget's panel is never saved and has
|
|
59
|
+
no props of its own; `'rdd:'` component keys are reserved).
|
|
60
|
+
|
|
13
61
|
## [7.11.0-next.1] — 2026-11-19
|
|
14
62
|
|
|
15
63
|
**Pre-release** on npm's `next` tag, from the first feedback on 7.11.0-next.0. Additions and fixes
|
|
@@ -80,8 +128,8 @@ Additions only: an app that uses none of it sees no change, apart from the point
|
|
|
80
128
|
`ContextMenuItem[]`, built each time the menu opens.
|
|
81
129
|
- In the panel, the title icon becomes a button that opens the items. Without an icon it shows a
|
|
82
130
|
menu glyph. Without `titleMenu` nothing changes.
|
|
83
|
-
- Out of the panel, the items lead its tab's menu
|
|
84
|
-
|
|
131
|
+
- Out of the panel, the items lead its tab's menu (before the built-in Minimize and Close) and its
|
|
132
|
+
floating title-bar ⋮ menu (before Close). The built-in Float isn't offered for such a panel, because your
|
|
85
133
|
items replace it.
|
|
86
134
|
- New type: `WidgetMenuContext`.
|
|
87
135
|
- **`useWidget()`:** inside a managed widget's content, the widget's own side; `null` elsewhere.
|
|
@@ -98,7 +146,7 @@ Additions only: an app that uses none of it sees no change, apart from the point
|
|
|
98
146
|
- New type: `WidgetHandle`.
|
|
99
147
|
- **`useFloatingWidgets().placement(id)` and `open(id, { placement })`: a widget opens where it was
|
|
100
148
|
after a reload.** `placement()` returns a `WidgetPlacement`: opaque, versioned, plain JSON, the same
|
|
101
|
-
in
|
|
149
|
+
in the Vue and Angular editions. Store it with your panel's own state.
|
|
102
150
|
- It records where the widget is in the panel (corner, stretch, docked or free, size), or where it
|
|
103
151
|
is out of it (docked beside its owner, tabbed, floating) together with where it goes back to.
|
|
104
152
|
- A free position is kept as an offset from the panel corner it was nearest, so it keeps its gap on a
|
|
@@ -118,7 +166,7 @@ Additions only: an app that uses none of it sees no change, apart from the point
|
|
|
118
166
|
- **`updatePanelProps(id, props | (prev) => next)`:** replaces the props an open panel was opened
|
|
119
167
|
with, or derives them from the current ones. The panel re-renders with them, `serializable` is
|
|
120
168
|
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.
|
|
169
|
+
published. It does nothing for a panel that isn't open, or for a managed widget's own panel.
|
|
122
170
|
- **`preserveEmbeds`**, on a panel type's `defaultOptions` and on a managed widget: an `<iframe>` (or
|
|
123
171
|
other embedded document or media) inside doesn't reload when the panel or widget moves: docked,
|
|
124
172
|
floated, minimised, restored, the grid changing around it, or a widget out of its panel and
|
|
@@ -1340,7 +1388,8 @@ All of the above is additive and backward-compatible: every new field is optiona
|
|
|
1340
1388
|
|
|
1341
1389
|
---
|
|
1342
1390
|
|
|
1343
|
-
[Unreleased]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.11.0
|
|
1391
|
+
[Unreleased]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.11.0...HEAD
|
|
1392
|
+
[7.11.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.10.1...v7.11.0
|
|
1344
1393
|
[7.11.0-next.1]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.11.0-next.0...v7.11.0-next.1
|
|
1345
1394
|
[7.11.0-next.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.10.1...v7.11.0-next.0
|
|
1346
1395
|
[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)
|
|
@@ -192,7 +192,7 @@ Call these inside any component within the `DockableDesktopProvider` tree:
|
|
|
192
192
|
| `useContextMenu()` | `(options) => void` | Show the shared context menu at a pointer event or position |
|
|
193
193
|
| `usePanelContextMenu(items)` | `void` | Inject dynamic context menu items into this panel's right-click menu |
|
|
194
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
|
+
| `useWidget()` | `WidgetHandle \| null` | Inside a managed widget: its `id`, owner panel, own `panelId` while out of the panel, live `location`, and `onWillMove` / `onMoved` around every move |
|
|
196
196
|
| `useFormatMessage()` | `MessageFormatter` | i18n formatter matching the current provider's locale |
|
|
197
197
|
| `useMessages()` | `Record<MessageKey, MessageDescriptor>` | The effective built-in message table |
|
|
198
198
|
| `useHostClasses()` | `HostClasses` | The class props set on the provider (`modalClass`, `windowClass`, …) |
|