react-dockable-desktop 7.11.0-next.0 → 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 +89 -5
- package/README.md +2 -2
- package/dist/index.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -11
- package/dist/index.d.ts +20 -11
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/styles.css +12 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,88 @@ 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
|
+
|
|
61
|
+
## [7.11.0-next.1] — 2026-11-19
|
|
62
|
+
|
|
63
|
+
**Pre-release** on npm's `next` tag, from the first feedback on 7.11.0-next.0. Additions and fixes
|
|
64
|
+
to widgets out of the panel only; nothing else changes.
|
|
65
|
+
|
|
66
|
+
### Added
|
|
67
|
+
|
|
68
|
+
- **`useWidget().panelId`:** the id of the widget's own panel while it is out of its panel, for
|
|
69
|
+
workspace calls such as `updatePanelTitle`; `null` while it is in the panel. No need to compose
|
|
70
|
+
`'<ownerId>/<widgetId>'` yourself.
|
|
71
|
+
- **Out of the panel, the title icon opens the widget's menu, as it does in the panel.** Docked or a
|
|
72
|
+
tab, the tab's icon opens the same menu as a right-click on the tab; floating, the title bar's
|
|
73
|
+
icon opens the same menu as its ⋮ button (so, as that button, only with a `titleMenu`). Right-click
|
|
74
|
+
and ⋮ stay; ordinary panels' icons are unchanged. The icon gets
|
|
75
|
+
`.rdd-workspace-tab-icon--menu` / `.rdd-window-title-icon--menu`. With your own
|
|
76
|
+
`renderTabContent`, the tab's icon is yours and opens nothing.
|
|
77
|
+
|
|
78
|
+
### Fixed
|
|
79
|
+
|
|
80
|
+
- **A widget's panel now brings its owner's panel contribution.** While it was the active panel,
|
|
81
|
+
`useActiveContribution()` (and so `useMergedToolbarItems` / `useMergedSidebarTabs`) gave `null`, so
|
|
82
|
+
the owner's toolbar items and sidebar tabs vanished while the user worked in the widget. It now
|
|
83
|
+
gives the owner's. Ordinary panels are unchanged.
|
|
84
|
+
- **A title set on a widget's panel is kept across moves out of the panel.** A move from one place out
|
|
85
|
+
of the panel to another (docked to floating, say) replaces the widget's panel, and the new one took
|
|
86
|
+
the widget's `title`, dropping one set with `updatePanelTitle`. It now keeps the title it had. A
|
|
87
|
+
re-open still applies the widget's `title`, which is the recommended place for a live title.
|
|
88
|
+
|
|
89
|
+
### Docs
|
|
90
|
+
|
|
91
|
+
- **Widgets Out of the Panel:** a new section, "Content with its own view" (a place keeps its camera,
|
|
92
|
+
a range keeps what is visible); where the menu opens in each place; `panelId`; the title and
|
|
93
|
+
contribution notes.
|
|
94
|
+
|
|
13
95
|
## [7.11.0-next.0] — 2026-11-19
|
|
14
96
|
|
|
15
97
|
**Pre-release** on npm's `next` tag (`npm install react-dockable-desktop@next`), for feedback before
|
|
@@ -46,8 +128,8 @@ Additions only: an app that uses none of it sees no change, apart from the point
|
|
|
46
128
|
`ContextMenuItem[]`, built each time the menu opens.
|
|
47
129
|
- In the panel, the title icon becomes a button that opens the items. Without an icon it shows a
|
|
48
130
|
menu glyph. Without `titleMenu` nothing changes.
|
|
49
|
-
- Out of the panel, the items lead its tab's menu
|
|
50
|
-
|
|
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
|
|
51
133
|
items replace it.
|
|
52
134
|
- New type: `WidgetMenuContext`.
|
|
53
135
|
- **`useWidget()`:** inside a managed widget's content, the widget's own side; `null` elsewhere.
|
|
@@ -64,7 +146,7 @@ Additions only: an app that uses none of it sees no change, apart from the point
|
|
|
64
146
|
- New type: `WidgetHandle`.
|
|
65
147
|
- **`useFloatingWidgets().placement(id)` and `open(id, { placement })`: a widget opens where it was
|
|
66
148
|
after a reload.** `placement()` returns a `WidgetPlacement`: opaque, versioned, plain JSON, the same
|
|
67
|
-
in
|
|
149
|
+
in the Vue and Angular editions. Store it with your panel's own state.
|
|
68
150
|
- It records where the widget is in the panel (corner, stretch, docked or free, size), or where it
|
|
69
151
|
is out of it (docked beside its owner, tabbed, floating) together with where it goes back to.
|
|
70
152
|
- A free position is kept as an offset from the panel corner it was nearest, so it keeps its gap on a
|
|
@@ -84,7 +166,7 @@ Additions only: an app that uses none of it sees no change, apart from the point
|
|
|
84
166
|
- **`updatePanelProps(id, props | (prev) => next)`:** replaces the props an open panel was opened
|
|
85
167
|
with, or derives them from the current ones. The panel re-renders with them, `serializable` is
|
|
86
168
|
re-checked (so `saveLayout()` saves or excludes it accordingly), and `layout:changed` is
|
|
87
|
-
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.
|
|
88
170
|
- **`preserveEmbeds`**, on a panel type's `defaultOptions` and on a managed widget: an `<iframe>` (or
|
|
89
171
|
other embedded document or media) inside doesn't reload when the panel or widget moves: docked,
|
|
90
172
|
floated, minimised, restored, the grid changing around it, or a widget out of its panel and
|
|
@@ -1306,7 +1388,9 @@ All of the above is additive and backward-compatible: every new field is optiona
|
|
|
1306
1388
|
|
|
1307
1389
|
---
|
|
1308
1390
|
|
|
1309
|
-
[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
|
|
1393
|
+
[7.11.0-next.1]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.11.0-next.0...v7.11.0-next.1
|
|
1310
1394
|
[7.11.0-next.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.10.1...v7.11.0-next.0
|
|
1311
1395
|
[7.10.1]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.10.0...v7.10.1
|
|
1312
1396
|
[7.10.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.9.0...v7.10.0
|
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`, …) |
|