react-dockable-desktop 7.9.0 → 7.10.1

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 CHANGED
@@ -10,6 +10,44 @@ replacement and the version that removes the old API.
10
10
 
11
11
  ## [Unreleased]
12
12
 
13
+ ## [7.10.1] — 2026-11-18
14
+
15
+ Internal groundwork for widgets that can leave their panel (a planned feature). No API change and
16
+ no behaviour change.
17
+
18
+ ### Changed
19
+
20
+ - **Widgets opened with `useFloatingWidgets().open()` now keep their placement in the overlay**
21
+ (`RddPanelOverlay`) instead of inside each widget, as vdd and ndd already do. Their anchor and
22
+ stretch are seeded from the config on the first open, kept when the same id is opened again, and
23
+ reset by closing it, all exactly as before. A drag that ends after its widget closed no longer
24
+ has anywhere to leave a placement behind. `<RddFloatingWidget>` used directly is unchanged.
25
+ - **A hidden panel waits in the hidden store of its workspace's own document**, rather than one
26
+ always found on the global `document`. For a page with one document, which is every page today,
27
+ nothing changes: the store is still `#preserved-dom-container`, hidden, in `<body>`.
28
+
29
+ ## [7.10.0] — 2026-10-07
30
+
31
+ Your own tab content, and an opt-in typed panel registry. Both opt-in: without them nothing changes.
32
+
33
+ ### Added
34
+
35
+ - **`renderTabContent` on `<RddDesktop>`: your own tab content.** `renderTabContent={(tab) => …}`
36
+ replaces what's inside every tab in the grid: the icon, the title and the dirty marker. It receives
37
+ a `TabContentProps`: `{ panelId, component, title, icon, dirty, selected, focused }`, with `title`
38
+ already formatted and `icon` the one the built-in content shows, so the built-in look is one line
39
+ to start from. Branch on `component` for a per-type look. The tab itself stays the library's:
40
+ dragging, keyboard navigation, `role="tab"`, its context menu, state attributes and classes, the
41
+ header actions and the close button. Floating-window title bars and the taskbar are unchanged.
42
+ New type: `TabContentProps`.
43
+ - **`definePanels()`: a typed panel registry, opt-in.** Wrap the `panels` map in `definePanels({…})`
44
+ and the workspace `createWorkspace` returns has a typed `openPanel`: only registered names are
45
+ accepted, and `props` is checked against that panel's component (without `panelId`). It returns its
46
+ argument unchanged; the typing is compile-time only. With typed events too, pass both:
47
+ `createWorkspace<typeof panels, AppEvents>({ panels })`. `useWorkspace()` stays untyped. A plain map
48
+ keeps its types exactly, so existing code is unaffected. New types: `TypedWorkspace`, `PanelMap`,
49
+ `PanelPropsOf`; `createWorkspace` gains an overload for marked maps.
50
+
13
51
  ## [7.9.0] — 2026-10-06
14
52
 
15
53
  Control over where users can move panels: per-panel-type rules and an app-wide veto, all opt-in.
@@ -1169,7 +1207,9 @@ All of the above is additive and backward-compatible: every new field is optiona
1169
1207
 
1170
1208
  ---
1171
1209
 
1172
- [Unreleased]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.9.0...HEAD
1210
+ [Unreleased]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.10.1...HEAD
1211
+ [7.10.1]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.10.0...v7.10.1
1212
+ [7.10.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.9.0...v7.10.0
1173
1213
  [7.9.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.8.0...v7.9.0
1174
1214
  [7.8.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.7.4...v7.8.0
1175
1215
  [7.7.4]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.7.3...v7.7.4
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # React Dockable Desktop
2
2
 
3
- [![npm version](https://img.shields.io/badge/npm-v7.9.0-blue.svg)](https://www.npmjs.com/package/react-dockable-desktop)
3
+ [![npm version](https://img.shields.io/badge/npm-v7.10.1-blue.svg)](https://www.npmjs.com/package/react-dockable-desktop)
4
4
  [![TypeScript](https://img.shields.io/badge/TypeScript-first-3178c6.svg)](https://www.typescriptlang.org/)
5
5
  [![Touch Ready](https://img.shields.io/badge/touch-iPad%20%7C%20Android-success.svg)](#touch--mobile)
6
6
  [![license](https://img.shields.io/badge/license-MIT-green.svg)](#license)
@@ -32,6 +32,8 @@ serialised layout format**, so a layout saved by either library loads in the oth
32
32
  - **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`)
33
33
  - **i18n & RTL** — full Right-to-Left layout support; `dir="rtl"` flips every control, tab order, and drop zone automatically
34
34
  - **Inter-Panel Pub/Sub** — lightweight typed event bus for decoupled panel-to-panel communication
35
+ - **Your Own Tab Content** — `renderTabContent` puts your icon, title, badge or status dot in every tab; dragging, keyboard and accessibility stay the library's
36
+ - **Typed Panel Registry** — wrap the panel map in `definePanels()` and `openPanel` accepts only registered names, with props checked against each panel's component
35
37
  - **Imperative API** — the workspace from `createWorkspace()` opens, closes, focuses, and serializes panels from anywhere — inside or outside React; `dockTo` opens a panel beside another, on any side or as a tab
36
38
  - **Layout Serialization** — save and restore the full workspace as a JSON string; survives page reloads
37
39
  - **7 Built-in Skins** — VSCode, macOS, Chrome, Slate, Nord, Obsidian, Tokyo — all fully themeable via CSS variables