react-dockable-desktop 7.5.0 → 7.6.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
@@ -6,6 +6,90 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [7.6.1] — 2026-10-04
10
+
11
+ Internal restructuring. No behaviour, API or visual change.
12
+
13
+ ### Internal
14
+
15
+ - **The large source files are split into modules**, mirroring vue- and angular-dockable-desktop:
16
+ - `src/types.ts`: the layout, state and action types.
17
+ - `src/core/`: `workspaceCore.ts` (the workspace store), `layoutTree.ts`, `serialize.ts`,
18
+ `eventBus.ts`, `messages.ts`, `stretch.ts`, `panelOverlayGeometry.ts`. None depends on React.
19
+ - `src/components/workspace/`: the workspace view (`LeafGroup`, `WorkspaceGrid`,
20
+ `FloatingWindows`, `Taskbar`, `WorkspaceZones`, `panelMount`, the drag, menu and size hooks).
21
+ - `src/components/panelOverlay/`: the overlay root, toolbar, search, floating widget and hooks.
22
+
23
+ `WindowManager.tsx` (2,420 lines → 502), `WindowManagerContext.tsx` (2,475 → 321) and
24
+ `PanelOverlay.tsx` (1,497 → 18) keep every export they had, re-exporting what moved, so every
25
+ import path still works. Code was moved, not rewritten: the published API (157 exported names) is
26
+ unchanged, and the unit, browser and visual-baseline suites pass untouched.
27
+ - **The stylesheet is built from area files.** `src/styles/NN-area.css` (tokens, base, tabs, grid,
28
+ taskbar, floating windows, context menu, drop zones, one file per skin, sidebar, modals, drawers,
29
+ RTL, toolbar, panel overlay, toasts, focus…) are concatenated in file-name order into
30
+ `src/index.css`, which is generated and committed, and published as `dist/styles.css`. The
31
+ published stylesheet is byte-identical to 7.6.0 apart from a header comment. To change a style,
32
+ edit the area file and run `npm run css` (or `npm run css:watch`); `npm run css:check` and a
33
+ unit test fail if `src/index.css` is out of date.
34
+
35
+ ## [7.6.0] — 2026-10-04
36
+
37
+ Context menus open with nothing highlighted, the same every time.
38
+
39
+ ### Changed
40
+
41
+ - **A context menu opens with focus on the menu itself, no item highlighted.** It used to focus
42
+ its first item, and whether the browser then drew a focus ring depended on the user's previous
43
+ interaction: a menu opened from script (a map library's right-click calling `showContextMenu`,
44
+ say) showed a ring after a page load or a key press and none after a mouse click. ↓ reaches the
45
+ first item and ↑ the last, so keyboard use is unchanged but for that one key press.
46
+ - **Menus opened from the keyboard still start on their first item**: the library's own (the
47
+ ContextMenu key or Shift+F10 on a tab or taskbar item, Enter or Space on a window's ⋮ button),
48
+ a keyboard `contextmenu` event, and any menu shown with `initialFocus: 'first-item'`.
49
+
50
+ ### Added
51
+
52
+ - **`initialFocus?: 'menu' | 'first-item'`** on `showContextMenu` / `ShowContextMenuOptions`
53
+ (`useContextMenu()`, `useWorkspace().showContextMenu`, a `ContextMenuHandle`). A custom
54
+ `ContextMenuAdapter` receives it too.
55
+ - **`--rdd-context-menu-focus-ring`**: the outline on a menu item with keyboard focus, by default
56
+ `--rdd-focus-ring` (the skin's accent). `--rdd-focus-ring` is now documented with the theming
57
+ tokens; both are read with a fallback rather than declared, so they follow the skin's or your
58
+ brand's accent.
59
+
60
+ ### Fixed
61
+
62
+ - **↑ from a menu with nothing highlighted went to the second-to-last item**; it goes to the last.
63
+ - **A submenu opened by hovering took focus** when an earlier submenu had been opened from the
64
+ keyboard; a hover-opened submenu never takes focus now.
65
+ - **The focused menu element drew the global focus ring**; it draws none, and items draw the
66
+ skin's ring rather than the browser's default.
67
+
68
+ ### Upgrading
69
+
70
+ - Nothing to change for menus opened with the mouse or from script: they now open with no item
71
+ highlighted. If you open a menu from your own keyboard shortcut, pass
72
+ `initialFocus: 'first-item'` (or the keyboard `contextmenu` event) so it starts on an item.
73
+ - Tests that expected the first item to have focus right after `showContextMenu` should press ↓
74
+ first, or open the menu with `initialFocus: 'first-item'`.
75
+
76
+ ### Tests
77
+
78
+ - `KeyboardAccess.test.tsx`: the menu itself is focused on open; ↓/↑ from it; `initialFocus`;
79
+ keyboard and mouse `contextmenu` events; the Menu key and a right-click on a tab; a hover-opened
80
+ submenu after a keyboard-opened one. Each new test was seen failing with its part of the fix
81
+ removed. The old "focuses the first enabled item" test passed vacuously (its label helper read
82
+ the first label inside whatever had focus) and is replaced.
83
+ - The branding browser baseline (`tests/browser/fixtures/branding-baseline.json`) is regenerated
84
+ for 7.5.0's intended toolbar changes (toggle "on" colours and edge, the new tokens, the
85
+ vscode/macos light-mode hover), which 7.5.0 shipped without refreshing it. No context-menu
86
+ colour changed.
87
+
88
+ ### Docs
89
+
90
+ - Context Menus guide: initial focus, the option, the adapter and `ContextMenuHandle` signatures,
91
+ keyboard behaviour, the focus ring token. Advanced guide keyboard table; Theming token table.
92
+
9
93
  ## [7.5.0] — 2026-10-04
10
94
 
11
95
  Toolbar buttons: the library now sizes the icon inside its own buttons, and a toggle that is on
@@ -722,7 +806,9 @@ All of the above is additive and backward-compatible: every new field is optiona
722
806
 
723
807
  ---
724
808
 
725
- [Unreleased]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.5.0...HEAD
809
+ [Unreleased]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.6.1...HEAD
810
+ [7.6.1]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.6.0...v7.6.1
811
+ [7.6.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.5.0...v7.6.0
726
812
  [7.5.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.4.1...v7.5.0
727
813
  [7.4.1]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.4.0...v7.4.1
728
814
  [7.4.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.3.0...v7.4.0
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.5.0-blue.svg)](https://www.npmjs.com/package/react-dockable-desktop)
3
+ [![npm version](https://img.shields.io/badge/npm-v7.6.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)