vue-dockable-desktop 1.4.0 → 1.5.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 +81 -0
- package/dist/core/dragResize.d.ts +6 -1
- package/dist/core/layoutTree.d.ts +3 -2
- package/dist/core/messages.d.ts +4 -1
- package/dist/core/serialize.d.ts +7 -0
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +900 -838
- package/dist/index.js.map +1 -1
- package/dist/styles.css +78 -10
- package/dist/types.d.ts +7 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,87 @@ correspondence lives, alongside the feature-by-feature map in [docs/PARITY.md](d
|
|
|
11
11
|
|
|
12
12
|
## [Unreleased]
|
|
13
13
|
|
|
14
|
+
## [1.5.1] — 2026-10-01
|
|
15
|
+
|
|
16
|
+
**Parity: react-dockable-desktop 7.4.1 fixes.** From a review of 1.5.0. No API changes.
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- **A message's placeholder was replaced only once**: `'{n} of {n}'` read `'2 of {n}'`. The
|
|
21
|
+
default formatter replaces every `{key}` now, and the workspace's `format` uses the same
|
|
22
|
+
function instead of a copy of it.
|
|
23
|
+
- **The window losing focus mid-drag left the drag armed.** After an alt-tab, the pointer
|
|
24
|
+
listeners, the drop target and `vdd-dragging-active` stayed, and the next release docked the
|
|
25
|
+
panel into the target it had been over. A `blur` now ends a tab drag (mouse or touch) and a
|
|
26
|
+
floating window's title-bar drag as a `pointercancel` does. `startPointerDrag` ends on `blur`
|
|
27
|
+
too, and takes an optional `onCancel`; the floating window's title bar uses it, so a cancel
|
|
28
|
+
no longer docks the window into the target it was over.
|
|
29
|
+
- **Layout repair** drops a group's panel id that the layout's `panels` doesn't have, and gives
|
|
30
|
+
a split whose sizes don't match its children, or aren't finite positive numbers, even sizes
|
|
31
|
+
(they reached the style as `flex-basis: NaN%`). Each is named in the development warning.
|
|
32
|
+
- **A throwing event subscriber stopped delivery to the others**, and threw into the action
|
|
33
|
+
that published — `loadLayout`, `openPanel`, a close. Each subscriber's error is logged with
|
|
34
|
+
`console.error`, naming the event, and delivery goes on.
|
|
35
|
+
|
|
36
|
+
### Tests
|
|
37
|
+
|
|
38
|
+
- `test/store/reviewFixes.test.ts` (placeholders, layout repair, the event bus) and
|
|
39
|
+
`test/components/dragBlur.test.ts` (mouse, touch and title-bar drags, with uninterrupted
|
|
40
|
+
drags as controls), ported from rdd 7.4.1's `Patch741.test.ts` and `DragBlur.test.tsx`. Each
|
|
41
|
+
seen failing before its fix and with it removed.
|
|
42
|
+
|
|
43
|
+
## [1.5.0] — 2026-09-30
|
|
44
|
+
|
|
45
|
+
**Parity: react-dockable-desktop 6.3.1, plus react-dockable-desktop 7.2.0–7.4.0's skin branding
|
|
46
|
+
and field-report fixes.** From a consumer's field report: fixed dropdowns inside frosted windows,
|
|
47
|
+
direction for the sidebar and toasts, translated titles, and a quieter restore.
|
|
48
|
+
|
|
49
|
+
### Added
|
|
50
|
+
|
|
51
|
+
- **Title functions**: a title (a panel's, a window's, a drawer's, a modal's, a widget's) can be
|
|
52
|
+
`() => string`. The library calls it each time it renders the title, so a function that reads
|
|
53
|
+
your locale ref follows a language change on its own — a translated *string* is fixed in the
|
|
54
|
+
language active when the panel opened. A function isn't saved in a layout: the restored panel
|
|
55
|
+
takes the title its type is registered with. `Label` is now
|
|
56
|
+
`string | MessageDescriptor | (() => string)`.
|
|
57
|
+
- **Reduced motion**: the library's own transitions and animations stop when the user has asked
|
|
58
|
+
the system for reduced motion (`prefers-reduced-motion: reduce`), as with
|
|
59
|
+
`:animations="false"`. Your own are untouched.
|
|
60
|
+
|
|
61
|
+
### Fixed
|
|
62
|
+
|
|
63
|
+
- **A `position: fixed` element inside a frosted container was positioned against the
|
|
64
|
+
container, not the viewport** — so a dropdown, popover or date picker of yours inside a
|
|
65
|
+
floating window, a drawer, an overlay widget, a frosted panel toolbar or (in `macos`) a docked
|
|
66
|
+
panel opened in the wrong place, in some skins and not others. A `backdrop-filter` makes its
|
|
67
|
+
element the containing block for fixed content; the frost now sits on each container's
|
|
68
|
+
`::before` (with the background it tints, where the frost saturates). What is drawn is unchanged.
|
|
69
|
+
- **`setDirection('rtl')` did not mirror the sidebar or the toasts**: they followed only the
|
|
70
|
+
page's `dir`. They follow the workspace into RTL now, and so does everything inside the sidebar
|
|
71
|
+
(a toolbar, your own chrome); while the workspace is left-to-right they still follow the page,
|
|
72
|
+
as before.
|
|
73
|
+
- **A saved window with unusable geometry reached the window's style**: a `NaN` saved as `null`,
|
|
74
|
+
an `Infinity` or a missing size. Such values are replaced on load by the default a new floating
|
|
75
|
+
window gets, with a warning naming the window.
|
|
76
|
+
|
|
77
|
+
### Tests
|
|
78
|
+
|
|
79
|
+
- **M17 browser gate** (`scripts/gates/browser/m17.mjs`, real Chrome): a fixed child of each of
|
|
80
|
+
the 7 frosted cases lands on the viewport, and each renders as before within a small tolerance;
|
|
81
|
+
reduced motion stops every library transition and leaves the page's; the sidebar and toasts
|
|
82
|
+
follow `setDirection` and still follow the page while LTR.
|
|
83
|
+
- `test/components/fieldReport.test.ts` (title functions, finite geometry) and
|
|
84
|
+
`test/core/stylesheet.test.ts` (the consumer content contract), ported from rdd 7.4.0.
|
|
85
|
+
- The M15 colour and M16 corner baselines compare a frosted container's `::before` as its
|
|
86
|
+
element: where it is drawn changed, what is drawn did not.
|
|
87
|
+
- M17 rules (`scripts/gates/m17.mjs`) and two selftest cases.
|
|
88
|
+
|
|
89
|
+
### Documentation
|
|
90
|
+
|
|
91
|
+
- Theming: Frosted glass and your own overlays; reduced motion under Animations. i18n: title
|
|
92
|
+
functions; the sidebar and toasts follow `setDirection`. Panels: objects that cross into Vue's
|
|
93
|
+
reactivity (`markRaw`, `shallowRef`, getters). ADR 0019; PARITY.md; the plan's M17.
|
|
94
|
+
|
|
14
95
|
## [1.4.0] — 2026-09-30
|
|
15
96
|
|
|
16
97
|
**Parity: react-dockable-desktop 6.3.1, plus react-dockable-desktop 7.2.0 and 7.3.0's skin
|
|
@@ -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
|
-
*
|
|
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
|
package/dist/core/messages.d.ts
CHANGED
|
@@ -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
|
-
/**
|
|
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;
|
package/dist/core/serialize.d.ts
CHANGED
|
@@ -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
|
*
|