react-dockable-desktop 7.9.0 → 7.10.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 +24 -1
- package/README.md +3 -1
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +69 -2
- package/dist/index.d.ts +69 -2
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,28 @@ replacement and the version that removes the old API.
|
|
|
10
10
|
|
|
11
11
|
## [Unreleased]
|
|
12
12
|
|
|
13
|
+
## [7.10.0] — 2026-10-07
|
|
14
|
+
|
|
15
|
+
Your own tab content, and an opt-in typed panel registry. Both opt-in: without them nothing changes.
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- **`renderTabContent` on `<RddDesktop>`: your own tab content.** `renderTabContent={(tab) => …}`
|
|
20
|
+
replaces what's inside every tab in the grid: the icon, the title and the dirty marker. It receives
|
|
21
|
+
a `TabContentProps`: `{ panelId, component, title, icon, dirty, selected, focused }`, with `title`
|
|
22
|
+
already formatted and `icon` the one the built-in content shows, so the built-in look is one line
|
|
23
|
+
to start from. Branch on `component` for a per-type look. The tab itself stays the library's:
|
|
24
|
+
dragging, keyboard navigation, `role="tab"`, its context menu, state attributes and classes, the
|
|
25
|
+
header actions and the close button. Floating-window title bars and the taskbar are unchanged.
|
|
26
|
+
New type: `TabContentProps`.
|
|
27
|
+
- **`definePanels()`: a typed panel registry, opt-in.** Wrap the `panels` map in `definePanels({…})`
|
|
28
|
+
and the workspace `createWorkspace` returns has a typed `openPanel`: only registered names are
|
|
29
|
+
accepted, and `props` is checked against that panel's component (without `panelId`). It returns its
|
|
30
|
+
argument unchanged; the typing is compile-time only. With typed events too, pass both:
|
|
31
|
+
`createWorkspace<typeof panels, AppEvents>({ panels })`. `useWorkspace()` stays untyped. A plain map
|
|
32
|
+
keeps its types exactly, so existing code is unaffected. New types: `TypedWorkspace`, `PanelMap`,
|
|
33
|
+
`PanelPropsOf`; `createWorkspace` gains an overload for marked maps.
|
|
34
|
+
|
|
13
35
|
## [7.9.0] — 2026-10-06
|
|
14
36
|
|
|
15
37
|
Control over where users can move panels: per-panel-type rules and an app-wide veto, all opt-in.
|
|
@@ -1169,7 +1191,8 @@ All of the above is additive and backward-compatible: every new field is optiona
|
|
|
1169
1191
|
|
|
1170
1192
|
---
|
|
1171
1193
|
|
|
1172
|
-
[Unreleased]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.
|
|
1194
|
+
[Unreleased]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.10.0...HEAD
|
|
1195
|
+
[7.10.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.9.0...v7.10.0
|
|
1173
1196
|
[7.9.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.8.0...v7.9.0
|
|
1174
1197
|
[7.8.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.7.4...v7.8.0
|
|
1175
1198
|
[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
|
-
[](https://www.npmjs.com/package/react-dockable-desktop)
|
|
4
4
|
[](https://www.typescriptlang.org/)
|
|
5
5
|
[](#touch--mobile)
|
|
6
6
|
[](#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
|