vue-dockable-desktop 1.4.0 → 1.6.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 CHANGED
@@ -11,6 +11,151 @@ correspondence lives, alongside the feature-by-feature map in [docs/PARITY.md](d
11
11
 
12
12
  ## [Unreleased]
13
13
 
14
+ ## [1.6.0] — 2026-10-04
15
+
16
+ **Parity: react-dockable-desktop 7.5.0.** Toolbar buttons: the library sizes the icon inside its
17
+ own buttons, and a toggle that is on can be told from one that is off at a glance, on chrome and
18
+ over panel content alike. No props were added or removed; everything new is a CSS custom property.
19
+
20
+ ### Added
21
+
22
+ - **Icon size tokens.** `--vdd-panel-toolbar-icon-size` (`20px`) sizes icons in
23
+ `<VddPanelToolbar>` buttons and toggles; `--vdd-chrome-icon-size` (`22px`) sizes them in the
24
+ workspace toolbar and the sidebar rail. Icon fonts follow the button's `font-size`; SVG icons
25
+ follow the token's width and height, even when the SVG has its own `width`/`height` attributes.
26
+ - **`soft` chip tokens**: `--vdd-panel-toolbar-btn-bg`, `--vdd-panel-toolbar-btn-bg-hover`,
27
+ `--vdd-panel-toolbar-btn-border`.
28
+ - **Workspace toolbar toggle tokens**: `--vdd-toolbar-btn-toggle-active-color` and
29
+ `--vdd-toolbar-btn-toggle-active-border`.
30
+
31
+ ### Changed
32
+
33
+ - **Panel toolbar "on" state** is a solid chip with a white icon, the same in every
34
+ `buttonVariant`: in dark the accent mixed 65% with black, in light the plain accent. The icon is
35
+ `--vdd-brand-on-accent` when a brand sets it. It clears WCAG's 3:1 non-text contrast. Before, it
36
+ was a 14–15% accent tint.
37
+ - **`buttonVariant="soft"`** is a near-opaque chip with a hairline edge, readable over panel
38
+ content. Before, it was a 6% (dark) / 4% (light) wash.
39
+ - **Workspace toolbar toggle "on"**: the accent tint goes from 6–8% to 22% (dark) / 16% (light),
40
+ with a 1px accent edge and the accent icon.
41
+ - **Icons in toolbar and rail buttons are larger by default**: 20px in panel toolbars, 22px in
42
+ the workspace toolbar and rail.
43
+
44
+ ### Fixed
45
+
46
+ - **Keyboard focus was invisible on toolbar and rail buttons**: `.vdd-toolbar-btn` and
47
+ `.vdd-sidebar-tab-btn` removed the outline with nothing in its place. They, and panel toolbar
48
+ buttons, show a focus ring for keyboard focus now (`--vdd-focus-ring`, default a 2px accent
49
+ outline), as rdd does.
50
+ - **`filled` toggles looked the same on and off**; it now rests on an accent tint with an accent
51
+ edge, and "on" is the solid chip.
52
+ - **vscode and macos painted a white hover tint in light mode** on panel toolbar buttons; it now
53
+ applies in dark only.
54
+ - **`buttonSize` was documented as the icon size.** It sets the button size.
55
+ - The theming chapter no longer claims a coarse-pointer rule enlarges panel toolbar buttons.
56
+
57
+ ### Upgrading
58
+
59
+ - Remove per-icon sizes inside toolbar and rail buttons (`width`/`height` props, inline sizes):
60
+ set `--vdd-panel-toolbar-icon-size` / `--vdd-chrome-icon-size` instead. An inline `style` size
61
+ still wins over the tokens.
62
+ - If you added shadows to keep toolbar icons readable over panel content, remove them and use
63
+ `button-variant="soft"` or a `frosted`/`solid` toolbar.
64
+ - To restyle "on", set `--vdd-panel-toolbar-btn-active-bg` and `--vdd-panel-toolbar-btn-active-color`
65
+ (recipes in the panel overlay chapter).
66
+
67
+ ### Documentation
68
+
69
+ - Panel overlay chapter: "Styling toolbar buttons" (what the library owns, icon sizes, variants,
70
+ the "on" tokens, recipes); corrected `buttonSize`.
71
+ - Theming chapter: new icon and toggle tokens; panel toolbar defaults updated.
72
+
73
+ ### Demo
74
+
75
+ - "Toolbar Buttons" panel (Control Center → open): every `buttonVariant` in every state over
76
+ light, dark and busy content, with icon-size sliders.
77
+
78
+ ## [1.5.1] — 2026-10-01
79
+
80
+ **Parity: react-dockable-desktop 7.4.1 fixes.** From a review of 1.5.0. No API changes.
81
+
82
+ ### Fixed
83
+
84
+ - **A message's placeholder was replaced only once**: `'{n} of {n}'` read `'2 of {n}'`. The
85
+ default formatter replaces every `{key}` now, and the workspace's `format` uses the same
86
+ function instead of a copy of it.
87
+ - **The window losing focus mid-drag left the drag armed.** After an alt-tab, the pointer
88
+ listeners, the drop target and `vdd-dragging-active` stayed, and the next release docked the
89
+ panel into the target it had been over. A `blur` now ends a tab drag (mouse or touch) and a
90
+ floating window's title-bar drag as a `pointercancel` does. `startPointerDrag` ends on `blur`
91
+ too, and takes an optional `onCancel`; the floating window's title bar uses it, so a cancel
92
+ no longer docks the window into the target it was over.
93
+ - **Layout repair** drops a group's panel id that the layout's `panels` doesn't have, and gives
94
+ a split whose sizes don't match its children, or aren't finite positive numbers, even sizes
95
+ (they reached the style as `flex-basis: NaN%`). Each is named in the development warning.
96
+ - **A throwing event subscriber stopped delivery to the others**, and threw into the action
97
+ that published — `loadLayout`, `openPanel`, a close. Each subscriber's error is logged with
98
+ `console.error`, naming the event, and delivery goes on.
99
+
100
+ ### Tests
101
+
102
+ - `test/store/reviewFixes.test.ts` (placeholders, layout repair, the event bus) and
103
+ `test/components/dragBlur.test.ts` (mouse, touch and title-bar drags, with uninterrupted
104
+ drags as controls), ported from rdd 7.4.1's `Patch741.test.ts` and `DragBlur.test.tsx`. Each
105
+ seen failing before its fix and with it removed.
106
+
107
+ ## [1.5.0] — 2026-09-30
108
+
109
+ **Parity: react-dockable-desktop 6.3.1, plus react-dockable-desktop 7.2.0–7.4.0's skin branding
110
+ and field-report fixes.** From a consumer's field report: fixed dropdowns inside frosted windows,
111
+ direction for the sidebar and toasts, translated titles, and a quieter restore.
112
+
113
+ ### Added
114
+
115
+ - **Title functions**: a title (a panel's, a window's, a drawer's, a modal's, a widget's) can be
116
+ `() => string`. The library calls it each time it renders the title, so a function that reads
117
+ your locale ref follows a language change on its own — a translated *string* is fixed in the
118
+ language active when the panel opened. A function isn't saved in a layout: the restored panel
119
+ takes the title its type is registered with. `Label` is now
120
+ `string | MessageDescriptor | (() => string)`.
121
+ - **Reduced motion**: the library's own transitions and animations stop when the user has asked
122
+ the system for reduced motion (`prefers-reduced-motion: reduce`), as with
123
+ `:animations="false"`. Your own are untouched.
124
+
125
+ ### Fixed
126
+
127
+ - **A `position: fixed` element inside a frosted container was positioned against the
128
+ container, not the viewport** — so a dropdown, popover or date picker of yours inside a
129
+ floating window, a drawer, an overlay widget, a frosted panel toolbar or (in `macos`) a docked
130
+ panel opened in the wrong place, in some skins and not others. A `backdrop-filter` makes its
131
+ element the containing block for fixed content; the frost now sits on each container's
132
+ `::before` (with the background it tints, where the frost saturates). What is drawn is unchanged.
133
+ - **`setDirection('rtl')` did not mirror the sidebar or the toasts**: they followed only the
134
+ page's `dir`. They follow the workspace into RTL now, and so does everything inside the sidebar
135
+ (a toolbar, your own chrome); while the workspace is left-to-right they still follow the page,
136
+ as before.
137
+ - **A saved window with unusable geometry reached the window's style**: a `NaN` saved as `null`,
138
+ an `Infinity` or a missing size. Such values are replaced on load by the default a new floating
139
+ window gets, with a warning naming the window.
140
+
141
+ ### Tests
142
+
143
+ - **M17 browser gate** (`scripts/gates/browser/m17.mjs`, real Chrome): a fixed child of each of
144
+ the 7 frosted cases lands on the viewport, and each renders as before within a small tolerance;
145
+ reduced motion stops every library transition and leaves the page's; the sidebar and toasts
146
+ follow `setDirection` and still follow the page while LTR.
147
+ - `test/components/fieldReport.test.ts` (title functions, finite geometry) and
148
+ `test/core/stylesheet.test.ts` (the consumer content contract), ported from rdd 7.4.0.
149
+ - The M15 colour and M16 corner baselines compare a frosted container's `::before` as its
150
+ element: where it is drawn changed, what is drawn did not.
151
+ - M17 rules (`scripts/gates/m17.mjs`) and two selftest cases.
152
+
153
+ ### Documentation
154
+
155
+ - Theming: Frosted glass and your own overlays; reduced motion under Animations. i18n: title
156
+ functions; the sidebar and toasts follow `setDirection`. Panels: objects that cross into Vue's
157
+ reactivity (`markRaw`, `shallowRef`, getters). ADR 0019; PARITY.md; the plan's M17.
158
+
14
159
  ## [1.4.0] — 2026-09-30
15
160
 
16
161
  **Parity: react-dockable-desktop 6.3.1, plus react-dockable-desktop 7.2.0 and 7.3.0's skin
@@ -5,7 +5,7 @@ type __VLS_Props = {
5
5
  variant?: ToolbarVariant;
6
6
  /** Inherited by this toolbar's buttons unless they override it. @default 'ghost' */
7
7
  buttonVariant?: ButtonVariant;
8
- /** Icon button size in pixels. Left to the stylesheet when unset. */
8
+ /** Button size in pixels (sets `--vdd-panel-toolbar-btn-size`). The icon inside follows `--vdd-panel-toolbar-icon-size`. Left to the stylesheet when unset. */
9
9
  buttonSize?: number;
10
10
  };
11
11
  declare var __VLS_1: {};
@@ -1,4 +1,4 @@
1
- /** An icon button for a `<VddPanelToolbar>`. The icon is a slot, so anything renders. */
1
+ /** An icon button for a `<VddPanelToolbar>`. The icon is a slot, so anything renders; pass it no size, the library sizes it with `--vdd-panel-toolbar-icon-size`. */
2
2
  type __VLS_Props = {
3
3
  /** Tooltip and accessible name. */
4
4
  title?: string;
@@ -21,8 +21,13 @@ export interface PointerDragConfig<TStart> {
21
21
  captureStart: () => TStart;
22
22
  /** Called on every pointermove with the delta from the drag's start position. */
23
23
  onMove: (dx: number, dy: number, start: TStart) => void;
24
- /** Called once when the drag ends (pointerup or pointercancel). */
24
+ /** Called once when the drag ends (pointerup, or pointercancel and window blur when `onCancel` is absent). */
25
25
  onEnd?: (start: TStart) => void;
26
+ /**
27
+ * Called instead of `onEnd` when the drag is cancelled — a pointercancel, or the window losing
28
+ * focus (1.5.1) — for a drag whose release does something a cancel must not.
29
+ */
30
+ onCancel?: (start: TStart) => void;
26
31
  /** Classes toggled on the given elements for the duration of the drag. */
27
32
  activeClasses?: Array<{
28
33
  el: HTMLElement;
@@ -67,9 +67,10 @@ export declare function findLeaf(node: LayoutNode | null, leafId: string): Layou
67
67
  */
68
68
  export declare function isLoneOccupant(node: LayoutNode, leafId: string, panelId: string): boolean;
69
69
  /**
70
- * Heal a tree that lists a panel twice, or lists none of a docked panel.
70
+ * Heal a tree that lists a panel twice, or lists none of a docked panel — or, since 1.5.1, lists
71
+ * a panel the layout doesn't have, or gives a split sizes that don't fit its children.
71
72
  *
72
- * Both are states this library once produced and then *saved*: a lone docked panel dropped
73
+ * The first two are states this library once produced and then *saved*: a lone docked panel dropped
73
74
  * on its own group left rdd with the panel in two leaves and vdd with it in none, and
74
75
  * `saveLayout()` wrote the result out, so the fault returned on every reload. Repairing on
75
76
  * read means a layout stored by an affected version loads clean with nothing asked of the
@@ -121,5 +121,8 @@ export declare const defaultMessages: {
121
121
  * that all keys are present and none are misspelled.
122
122
  */
123
123
  export type MessageKey = keyof typeof defaultMessages;
124
- /** Resolve a label with a formatter, falling back to its `defaultMessage` then its `id`. */
124
+ /**
125
+ * Resolve a label with a formatter, falling back to its `defaultMessage` then its `id`, with each
126
+ * `{key}` replaced by its value — every occurrence (1.5.1; it replaced only the first).
127
+ */
125
128
  export declare function formatLabel(label: Label | undefined, format?: MessageFormatter): string;
@@ -18,6 +18,13 @@ export interface ParsedLayout {
18
18
  panels: Record<string, PanelInfo>;
19
19
  activePanelId: string | null;
20
20
  }
21
+ /** The geometry a newly floated panel gets, and what a saved window's unusable geometry is repaired to. */
22
+ export declare const DEFAULT_FLOAT_RECT: {
23
+ x: number;
24
+ y: number;
25
+ width: number;
26
+ height: number;
27
+ };
21
28
  /**
22
29
  * Validate and normalise a parsed JSON payload, or return `null` if it is not a layout.
23
30
  *