react-dockable-desktop 7.4.0 → 7.4.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 +55 -3
- package/README.md +4 -5
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +41 -0
- package/dist/index.d.ts +41 -0
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,57 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [7.4.1] — 2026-10-01
|
|
10
|
+
|
|
11
|
+
Fixes from a review of 7.4.0. No API changes.
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- **Restored floating windows kept the wrong stacking order.** After a reload (`initialState` or
|
|
16
|
+
`loadLayout`), focusing a restored window sent it *behind* the others, and a newly floated panel
|
|
17
|
+
opened beneath them: the counter that hands out window z-indexes started from `zIndexBase`
|
|
18
|
+
instead of the highest restored one.
|
|
19
|
+
- **A message placeholder used twice was replaced only once**: `'{n} of {n}'` with the default
|
|
20
|
+
formatter (no `formatMessage` passed) gave `'2 of {n}'`. Every occurrence is replaced now.
|
|
21
|
+
- **The window losing focus mid-drag left the drag half alive.** After an alt-tab during a tab or
|
|
22
|
+
floating-window drag, the next click anywhere docked the panel into the zone it had been over.
|
|
23
|
+
A blur now ends the drag as a `pointercancel` does.
|
|
24
|
+
- **Layout repair on load** also drops a group's panel id that the layout's `panels` doesn't have
|
|
25
|
+
(the group showed an empty body for it), and gives a split whose sizes don't match its children,
|
|
26
|
+
or aren't finite positive numbers, even sizes (a child got `flex-basis: NaN%`).
|
|
27
|
+
- **`RddToolbarSearch` kept searching after it unmounted**: a pending debounce still called
|
|
28
|
+
`onSearch`, and a search in flight never saw its signal abort.
|
|
29
|
+
- **One event subscriber that threw stopped delivery to the rest**, and broke the action that
|
|
30
|
+
published (a `loadLayout`, a close) halfway through. The error is logged and every subscriber
|
|
31
|
+
still runs.
|
|
32
|
+
|
|
33
|
+
### Tests
|
|
34
|
+
|
|
35
|
+
- `Patch741.test.ts` (stacking order after `initialState` and `loadLayout`, placeholders, layout
|
|
36
|
+
repair, the event bus), `DragBlur.test.tsx` (tab and floating-window drags, with an
|
|
37
|
+
uninterrupted drag as the control), `ToolbarSearchUnmount.test.tsx`. Each was seen failing
|
|
38
|
+
before its fix and with the fix removed.
|
|
39
|
+
- `PackageContents.test.ts` no longer needs a build (CI runs the tests before `npm run build`).
|
|
40
|
+
|
|
41
|
+
### Docs
|
|
42
|
+
|
|
43
|
+
- `useWorkspaceState`: its reference documentation was attached to the wrong declaration and
|
|
44
|
+
never shown; it is on the hook now, with a warning that a selector must not build a new object
|
|
45
|
+
or array on each call (React stops with "Maximum update depth exceeded").
|
|
46
|
+
- `RddDesktop` has reference documentation; the Toolbar guide is in the docs sidebar.
|
|
47
|
+
- Titles are documented as `string | MessageDescriptor | (() => string)` everywhere (README,
|
|
48
|
+
Workspace, Panel Registry, Modals & Drawers, Panel Overlay, Forms & Panels).
|
|
49
|
+
- README: `RddSidebar` and the toasts follow the workspace direction (since 7.4.0).
|
|
50
|
+
- The CHANGELOG's migration-guide links point at the docs site, so they work from the npm package.
|
|
51
|
+
|
|
52
|
+
### Repository
|
|
53
|
+
|
|
54
|
+
- **GitHub releases are created automatically**: when CI passes on `main` with a version that has
|
|
55
|
+
no release yet, `.github/workflows/release.yml` tags the commit `vX.Y.Z` and publishes a release
|
|
56
|
+
whose notes are that version's CHANGELOG section (`scripts/release-notes.sh`). npm publishing
|
|
57
|
+
stays manual. Until now only `v4.0.0` had a tag, so the CHANGELOG's compare links were broken;
|
|
58
|
+
`scripts/backfill-releases.sh` tags and releases the earlier versions that a commit identifies.
|
|
59
|
+
|
|
9
60
|
## [7.4.0] — 2026-09-30
|
|
10
61
|
|
|
11
62
|
From a consumer's field report: fixed dropdowns inside frosted windows, direction for the sidebar and toasts, translated titles, and a quieter restore.
|
|
@@ -151,7 +202,7 @@ Fixes found by a consumer migrating a 30-file app from 6.4.0 with the 7.0.0 migr
|
|
|
151
202
|
|
|
152
203
|
## [7.0.0] — 2026-09-25
|
|
153
204
|
|
|
154
|
-
A clean break: the public API takes the names the Vue and Angular ports of this library use, the workspace becomes a store that is live before anything mounts, and the stylesheet stops styling the host page. Nothing is deprecated first — every old name is gone, so the TypeScript compiler finds every call site. **Migration guide: [docs-site/guide/migration.md](
|
|
205
|
+
A clean break: the public API takes the names the Vue and Angular ports of this library use, the workspace becomes a store that is live before anything mounts, and the stylesheet stops styling the host page. Nothing is deprecated first — every old name is gone, so the TypeScript compiler finds every call site. **Migration guide: [docs-site/guide/migration.md](https://felipecarrillo100.github.io/react-dockable-desktop/guide/migration#v6-x-→-v7-0-0)** — written so it can be applied by an automated agent in one pass; this release was accepted by having an agent migrate the four demo apps and a fixture app with the guide alone.
|
|
155
206
|
|
|
156
207
|
### Breaking
|
|
157
208
|
- **React 18 or later.** The peer range said 16.8; the library already relied on React 18 APIs.
|
|
@@ -522,7 +573,7 @@ All of the above is additive and backward-compatible: every new field is optiona
|
|
|
522
573
|
## [4.0.0] — 2026-06-16
|
|
523
574
|
|
|
524
575
|
### Breaking Changes
|
|
525
|
-
- **`replace-react-contexify` peer dependency removed.** The library no longer requires or uses it. Remove the package and delete its CSS import from your entry file. All existing user code continues to work unchanged. See the [v3→v4 migration guide](
|
|
576
|
+
- **`replace-react-contexify` peer dependency removed.** The library no longer requires or uses it. Remove the package and delete its CSS import from your entry file. All existing user code continues to work unchanged. See the [v3→v4 migration guide](https://felipecarrillo100.github.io/react-dockable-desktop/guide/migration).
|
|
526
577
|
|
|
527
578
|
### Added
|
|
528
579
|
- **Built-in `<ContextMenu>` component** — zero-dependency, portal-rendered context menu styled with design tokens. Supports simple items, separators, sub-menus (one level), checkbox items, icons, and i18n labels. Viewport-clamped, RTL-aware, Esc-to-close.
|
|
@@ -604,7 +655,8 @@ All of the above is additive and backward-compatible: every new field is optiona
|
|
|
604
655
|
|
|
605
656
|
---
|
|
606
657
|
|
|
607
|
-
[Unreleased]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.4.
|
|
658
|
+
[Unreleased]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.4.1...HEAD
|
|
659
|
+
[7.4.1]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.4.0...v7.4.1
|
|
608
660
|
[7.4.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.3.0...v7.4.0
|
|
609
661
|
[7.3.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.2.0...v7.3.0
|
|
610
662
|
[7.2.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.1.3...v7.2.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)
|
|
@@ -278,7 +278,7 @@ Lower-level methods (close guards, state providers, split and floating-window ge
|
|
|
278
278
|
| `close(options?)` | `(options?: CloseOptions) => void` | Request the container to close; respects dirty state and close guards (`{ force: true }` skips them) |
|
|
279
279
|
| `minimize()` | `() => void` | Minimize this panel to the taskbar; no effect in a modal or drawer |
|
|
280
280
|
| `setDirty(dirty, options?)` | `(dirty: boolean, options?: DirtyStateOptions) => void` | Mark unsaved changes; triggers confirmation dialog on close |
|
|
281
|
-
| `setTitle(title)` | `(title: string \| MessageDescriptor) => void` | Change the tab/window title dynamically |
|
|
281
|
+
| `setTitle(title)` | `(title: string \| MessageDescriptor \| (() => string)) => void` | Change the tab/window title dynamically |
|
|
282
282
|
| `setIcon(icon)` | `(icon: ReactNode) => void` | Change the tab, floating title bar and taskbar icon (or a modal's or drawer's header icon); `null` restores the registration's `defaultOptions.icon`. Not saved by `saveLayout()` |
|
|
283
283
|
|
|
284
284
|
### ContainerType
|
|
@@ -361,8 +361,7 @@ Touch support is built in. No extra setup required:
|
|
|
361
361
|
The library does **not** auto-detect the workspace's direction — the consuming app owns it. Two things must be wired together:
|
|
362
362
|
|
|
363
363
|
```tsx
|
|
364
|
-
// 1. Keep html[dir] in sync for
|
|
365
|
-
// which take their direction from the page.
|
|
364
|
+
// 1. Keep html[dir] in sync for the rest of your page (your own chrome around the desktop).
|
|
366
365
|
useEffect(() => {
|
|
367
366
|
document.documentElement.dir = isRtl ? 'rtl' : 'ltr';
|
|
368
367
|
}, [isRtl]);
|
|
@@ -376,7 +375,7 @@ useEffect(() => {
|
|
|
376
375
|
>
|
|
377
376
|
```
|
|
378
377
|
|
|
379
|
-
`dir` can be `'ltr'` (default) or `'rtl'`. The workspace's layout, split directions, tab ordering, floating window controls, drop zones and context menus flip automatically;
|
|
378
|
+
`dir` can be `'ltr'` (default) or `'rtl'`. The workspace's layout, split directions, tab ordering, floating window controls, drop zones and context menus flip automatically; so do `RddSidebar` (with everything inside it) and the toasts (since 7.4.0). While the workspace is left-to-right those two follow the page's `dir`.
|
|
380
379
|
|
|
381
380
|
Direction is **independent of locale** — you can have Arabic translations with LTR layout, or RTL without locale changes.
|
|
382
381
|
|