vue-dockable-desktop 1.1.2 → 1.3.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 +151 -0
- package/README.md +20 -5
- package/dist/composables/useLibraryMessage.d.ts +10 -0
- package/dist/core/messages.d.ts +8 -0
- package/dist/core/panelDom.d.ts +8 -2
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +689 -613
- package/dist/index.js.map +1 -1
- package/dist/styles.css +211 -163
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,157 @@ correspondence lives, alongside the feature-by-feature map in [docs/PARITY.md](d
|
|
|
11
11
|
|
|
12
12
|
## [Unreleased]
|
|
13
13
|
|
|
14
|
+
## [1.3.0] — 2026-09-29
|
|
15
|
+
|
|
16
|
+
**Parity: react-dockable-desktop 6.3.1, plus react-dockable-desktop 7.2.0's skin branding**
|
|
17
|
+
(the same port angular-dockable-desktop 1.1.0 made). Put your company's colour and font on any
|
|
18
|
+
built-in skin with a few CSS variables — no skin of your own needed. See
|
|
19
|
+
[Brand your app](docs/manual/10-theming.md#brand-your-app).
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- **`--vdd-brand-accent`**: set on `:root`, it replaces the accent of every built-in skin in dark
|
|
24
|
+
and light — tab indicators, active sidebar tabs and toolbar buttons, hover and active tints,
|
|
25
|
+
glows, the focused window's glow, the taskbar, the drop and snap highlights, the primary
|
|
26
|
+
button. Unset, each skin keeps its own accent.
|
|
27
|
+
- **`--vdd-brand-on-accent`**: the text colour on a solid accent fill (the confirm dialog's
|
|
28
|
+
primary button, the highlighted dock target), for light brand colours such as yellow — in both
|
|
29
|
+
schemes. Defaults as before: `#090b11`, and `#ffffff` on the primary button in light mode.
|
|
30
|
+
- **Per-skin fonts** through `--vdd-skin-font-family`: `vscode` uses VS Code's workbench font,
|
|
31
|
+
`macos` San Francisco, `chrome` Google's UI fonts, `slate` Fluent's Segoe UI stack, `nord` a
|
|
32
|
+
humanist sans (Avenir Next) and `tokyo` a monospace (JetBrains Mono); `obsidian` keeps the
|
|
33
|
+
library stack. All are system font stacks — the library still loads no fonts — and your own
|
|
34
|
+
`--vdd-font-family` replaces them all, teleported chrome included. `:root` now declares
|
|
35
|
+
`--vdd-font-family` as `var(--vdd-skin-font-family, 'Outfit', 'Inter', system-ui,
|
|
36
|
+
-apple-system, sans-serif)`.
|
|
37
|
+
- Manual: **Brand your app** — the brand variables, a per-scheme brand colour, loading your own
|
|
38
|
+
font, following a UI framework's theme (PrimeVue, Bootstrap, Tailwind, shadcn-vue), where to
|
|
39
|
+
put a logo (a custom `headerAction` entry on `<VddSidebar>`), and how to keep a custom skin
|
|
40
|
+
brandable.
|
|
41
|
+
|
|
42
|
+
### Changed
|
|
43
|
+
|
|
44
|
+
- **Browser minimum**: CSS `color-mix()` — Chrome / Edge 111, Safari 16.2, Firefox 113 (all
|
|
45
|
+
2023). In an older browser the tinted hover and active highlights lose their colour; layout and
|
|
46
|
+
behaviour are unaffected.
|
|
47
|
+
- **The default skin's font** is VS Code's workbench stack (`-apple-system, BlinkMacSystemFont,
|
|
48
|
+
'Segoe WPC', 'Segoe UI', …`) instead of `'Outfit', 'Inter', …`, which is now the fallback for
|
|
49
|
+
skins that set no font (`obsidian`, and custom skins). If you loaded Outfit for the library,
|
|
50
|
+
set `--vdd-font-family` to it. In `tokyo`, `nord`, `macos`, `chrome` and `slate` the font changes
|
|
51
|
+
too — and panel content inherits it, so in `tokyo` your panels turn monospace unless they set a
|
|
52
|
+
font of their own.
|
|
53
|
+
- **Every tint of the accent is derived from it** (`color-mix()` of `--vdd-accent-color`) instead
|
|
54
|
+
of a hand-copied `rgba()`. With the built-in skins and no brand set, the look is unchanged
|
|
55
|
+
except for the fixes below.
|
|
56
|
+
- `vscode` light mode has an accent of its own, `#0066cc` — the blue its light-mode tokens
|
|
57
|
+
already used. The primary button, the taskbar's peek handle and the other accent uses, which
|
|
58
|
+
were cyan on a light background, are that blue now. A custom skin that sets no accent gets it
|
|
59
|
+
in light mode too.
|
|
60
|
+
- **Set the accent with `--vdd-brand-accent`, not `--vdd-accent-color`.** Every skin and the light
|
|
61
|
+
scheme declare `--vdd-accent-color` with a selector that also matches the workspace element, so
|
|
62
|
+
a `:root` override of it is replaced inside the workspace — now in `vscode` light mode as well,
|
|
63
|
+
where 1.2.0 had no light accent to replace it with.
|
|
64
|
+
|
|
65
|
+
### Fixed
|
|
66
|
+
|
|
67
|
+
- **Overriding `--vdd-accent-color` on `:root` had no effect in 6 of the 7 skins**: each skin
|
|
68
|
+
redeclared it on the workspace element. `--vdd-brand-accent`, which every skin reads first, is
|
|
69
|
+
the supported way to rebrand.
|
|
70
|
+
- **Changing the accent left the old colour behind**: 142 hover, active and glow colours were
|
|
71
|
+
copies of a skin's accent written as fixed `rgba()` values. They follow the accent now.
|
|
72
|
+
- **Skins showed colours that weren't theirs**: the default cyan (and `#0066cc` in light mode)
|
|
73
|
+
left in other skins — the taskbar hover glow, the dock preview and corner-snap highlights, the
|
|
74
|
+
floating-widget drop zones, the light-mode focused-tab indicator and taskbar text, the
|
|
75
|
+
`--vdd-sidebar-card-*` and `--vdd-sidebar-btn-front-*` tokens — now show each skin's own
|
|
76
|
+
accent. `slate` and `tokyo` drew their active states in a blue that wasn't their accent, and
|
|
77
|
+
`obsidian`'s panel toolbar in a violet; they use their accent now. `obsidian`'s dark-mode white
|
|
78
|
+
glows no longer show in light mode, where its accent is black.
|
|
79
|
+
- **The rail and toolbar buttons ignored `--vdd-font-family`**: a `<button>` does not inherit a
|
|
80
|
+
font, so they drew their labels and badges in the browser's button font (Arial in Chrome) in
|
|
81
|
+
every skin. The library's own form controls inherit the chrome font now, as in rdd 6.4.0; your
|
|
82
|
+
own inputs and buttons inside a panel are left alone. Found by the M15 font check.
|
|
83
|
+
|
|
84
|
+
### Tests
|
|
85
|
+
|
|
86
|
+
- **M15 browser gate** (`scripts/gates/browser/m15.mjs`, real Chrome): with no brand set, the
|
|
87
|
+
computed colours of every library element, its pseudo-elements, 8 hover states and every token
|
|
88
|
+
(inside the workspace, in the toolbar outside it, and on `<body>`), in all 7 skins × dark/light
|
|
89
|
+
with the chrome opened, match a 1.2.0 baseline — except exactly the fixes above; with a brand
|
|
90
|
+
set, no trace of any original accent remains; a light brand with a dark on-accent colour is
|
|
91
|
+
readable on the primary button in dark and light; each skin's font reaches every piece of
|
|
92
|
+
chrome, and a brand font set on `:root` wins in every skin, teleported chrome included. Its
|
|
93
|
+
`--control` run (a skin that redeclares its accent and its font) is rejected.
|
|
94
|
+
- `test/core/stylesheet.test.ts`, ported from rdd 7.2.0's branding contract: every
|
|
95
|
+
`--vdd-accent-color` reads `--vdd-brand-accent` first, nothing in the library declares a
|
|
96
|
+
`--vdd-brand-*` variable, no accent colour is written as a literal outside its one declaration,
|
|
97
|
+
only `:root` declares `--vdd-font-family`, and text on accent fills reads
|
|
98
|
+
`--vdd-brand-on-accent`.
|
|
99
|
+
- M15 rules (`scripts/gates/m15.mjs`): the release files, ADR 0017, the manual's skin-font table
|
|
100
|
+
against the stylesheet, the browser minimum in the README and chapter 1, and PARITY.md.
|
|
101
|
+
- The playground takes `?skin=`, `?cs=light`, `?ba=` / `?bon=` (brand variables before mount)
|
|
102
|
+
and `?anim=0`.
|
|
103
|
+
- **The gate runner no longer mistakes another app for its own**: with another dev server on
|
|
104
|
+
the demo's port, `--strictPort` stopped vdd's demo from starting, the runner took the other
|
|
105
|
+
app's answer as ready, and M14 timed out waiting for the demo. It now waits for its own Vite's
|
|
106
|
+
ready line, moves to the next free port when the usual one is taken, and passes the URL to the
|
|
107
|
+
browser gates (`VDD_APP_URL`; the usual ports stay the default when a gate is run by hand).
|
|
108
|
+
|
|
109
|
+
### Documentation
|
|
110
|
+
|
|
111
|
+
- Theming chapter: **Brand your app**, **Skin fonts**, brandable custom skins (the demo's `mono`
|
|
112
|
+
skin now reads `--vdd-brand-accent` too), and the token reference (a branding table; tints
|
|
113
|
+
listed as "the accent at N%").
|
|
114
|
+
- The browser minimum in the README and chapter 1; a Branding item in the README's features;
|
|
115
|
+
the rdd 7.2.0 names in the migration chapter; ADR 0017; PARITY.md.
|
|
116
|
+
|
|
117
|
+
## [1.2.0] — 2026-09-24
|
|
118
|
+
|
|
119
|
+
**Parity: react-dockable-desktop 6.3.1.**
|
|
120
|
+
|
|
121
|
+
The remaining items from the user bug report that 1.1.2 left for a minor release: they add
|
|
122
|
+
behaviour, change a default, or extend a public type.
|
|
123
|
+
|
|
124
|
+
### Added
|
|
125
|
+
|
|
126
|
+
- **Tabs work from the keyboard.** Each tab group is one stop in the Tab order — its selected
|
|
127
|
+
tab. ArrowLeft and ArrowRight move to the previous or next tab and show it, wrapping, and
|
|
128
|
+
mirrored under RTL; Delete closes the focused tab, asking first if it has unsaved changes.
|
|
129
|
+
The tab strip is a `tablist` and the body a `tabpanel`; a tab's close × is hidden from
|
|
130
|
+
assistive technology, since Delete and the menu's Close cover it. A focus ring shows for
|
|
131
|
+
keyboard focus only.
|
|
132
|
+
|
|
133
|
+
- **The context menu works from the keyboard.** It takes focus when it opens; ArrowDown and
|
|
134
|
+
ArrowUp move between enabled items, Enter or Space runs one, and Tab or Escape closes it.
|
|
135
|
+
Closing from the keyboard, or by running an item, hands focus back to whatever had it. A
|
|
136
|
+
submenu now also opens on click, which helps on touch screens. A custom menu slot manages
|
|
137
|
+
its own focus.
|
|
138
|
+
|
|
139
|
+
- **`--vdd-font-family`, one token for the font of all library chrome.** Set it to change the
|
|
140
|
+
font of the workspace, sidebar, toolbar, modals, side panels, toasts, menus and flyouts in
|
|
141
|
+
one place, or to `inherit` to use your page's font. See the theming chapter.
|
|
142
|
+
|
|
143
|
+
- **Two message keys: `notifications` and `closeNotification`.** The toast region's
|
|
144
|
+
accessible name and a toast's close button were hard-coded English, as was the sidebar
|
|
145
|
+
drawer's close button (now the existing `close` key). They go through the message table and
|
|
146
|
+
formatter like every other string, and fall back to English where there is no workspace.
|
|
147
|
+
|
|
148
|
+
- **`<VddDesktop>` can be set up without a DOM.** Server-rendering it threw
|
|
149
|
+
`document is not defined` and took the whole page render down. It now renders the chrome and
|
|
150
|
+
leaves the panels to the client. `<ClientOnly>` remains the supported setup under Nuxt or
|
|
151
|
+
other SSR, and the getting-started chapter says so.
|
|
152
|
+
|
|
153
|
+
### Changed
|
|
154
|
+
|
|
155
|
+
- **The chrome's default font.** The context menu used the system font stack while the rest of
|
|
156
|
+
the chrome used the workspace's, and everything rendered outside the workspace — the sidebar
|
|
157
|
+
and toolbar around it, modals, side panels, toasts, menus and flyouts — took the host page's
|
|
158
|
+
body font. All of it now uses `--vdd-font-family`, which defaults to the workspace's stack.
|
|
159
|
+
To keep the page's font, set `--vdd-font-family: inherit`.
|
|
160
|
+
|
|
161
|
+
- **`MessageKey` has two more keys.** A table typed `Record<MessageKey, string>`, as the i18n
|
|
162
|
+
chapter recommends, fails to compile until it adds `notifications` and `closeNotification`.
|
|
163
|
+
That is the check doing its job; partial `messages` overrides are unaffected.
|
|
164
|
+
|
|
14
165
|
## [1.1.2] — 2026-09-24
|
|
15
166
|
|
|
16
167
|
**Parity: react-dockable-desktop 6.3.1.**
|
package/README.md
CHANGED
|
@@ -23,8 +23,8 @@ so a layout saved by either library loads in the other.
|
|
|
23
23
|
> **Versioning.** vdd follows its own semver, independently of `react-dockable-desktop`:
|
|
24
24
|
> matching the two numbers would be a promise that breaks the first time either library needs
|
|
25
25
|
> a breaking change the other does not. Which rdd release a given version corresponds to is
|
|
26
|
-
> stated per release in [CHANGELOG.md](CHANGELOG.md) — this one tracks **rdd 6.3.
|
|
27
|
-
> feature by feature in [docs/PARITY.md](docs/PARITY.md).
|
|
26
|
+
> stated per release in [CHANGELOG.md](CHANGELOG.md) — this one tracks **rdd 6.3.1**, plus
|
|
27
|
+
> rdd 7.2.0's skin branding — and feature by feature in [docs/PARITY.md](docs/PARITY.md).
|
|
28
28
|
|
|
29
29
|
## Install
|
|
30
30
|
|
|
@@ -32,9 +32,10 @@ so a layout saved by either library loads in the other.
|
|
|
32
32
|
npm install vue-dockable-desktop
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
Requires Vue 3.4
|
|
35
|
+
Requires Vue 3.4+, and a browser with CSS `color-mix()` (Chrome / Edge 111, Safari 16.2,
|
|
36
|
+
Firefox 113 or later). No other runtime dependencies. The published package is
|
|
36
37
|
[`vue-dockable-desktop`](https://www.npmjs.com/package/vue-dockable-desktop); the public API
|
|
37
|
-
is pinned by `api-surface.json` and covered by
|
|
38
|
+
is pinned by `api-surface.json` and covered by 846 tests.
|
|
38
39
|
|
|
39
40
|
## Quick start
|
|
40
41
|
|
|
@@ -103,7 +104,21 @@ localStorage.setItem('layout', ws.saveLayout())
|
|
|
103
104
|
- **Panel overlay** — anchored toolbars and floating widgets inside a single panel
|
|
104
105
|
- **Overlays** — side panels, a modal stack, dirty-close confirmation, and toasts
|
|
105
106
|
- **Layout serialisation** — save and restore the whole workspace as a JSON string
|
|
106
|
-
- **Theming** — built-in skins, light/dark colour schemes, all
|
|
107
|
+
- **Theming** — built-in skins, each with its own font, light/dark colour schemes, all
|
|
108
|
+
`--vdd-*` CSS variables
|
|
109
|
+
- **Branding** — your company's colour and font on any built-in skin, from three variables:
|
|
110
|
+
|
|
111
|
+
```css
|
|
112
|
+
:root {
|
|
113
|
+
--vdd-brand-accent: #e4002b; /* every accent use, in every skin, dark and light */
|
|
114
|
+
--vdd-brand-on-accent: #ffffff; /* text on a brand-coloured fill — a dark one for light brands */
|
|
115
|
+
--vdd-font-family: 'Acme Sans', sans-serif; /* your font (the library loads none) */
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Point them at your UI framework's theme to follow it — `var(--p-primary-color)` (PrimeVue),
|
|
120
|
+
`var(--bs-primary)` (Bootstrap). See
|
|
121
|
+
[Brand your app](docs/manual/10-theming.md#brand-your-app)
|
|
107
122
|
- **i18n and RTL** — every string is a message key; `dir="rtl"` flips the whole workspace
|
|
108
123
|
- **TypeScript-first** — complete types, no separate `@types` package
|
|
109
124
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { MessageKey } from '../core/messages';
|
|
2
|
+
/**
|
|
3
|
+
* One of the library's own strings, for a component that may render with no workspace.
|
|
4
|
+
*
|
|
5
|
+
* Toasts work from anywhere and a sidebar can stand alone, so these cannot `useWorkspace()`,
|
|
6
|
+
* which throws without one. With a workspace the string goes through its message table and
|
|
7
|
+
* formatter, exactly as every other library label does; without one it is the English
|
|
8
|
+
* default. Call the returned function during render, so a locale change is followed. @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare function useLibraryMessage(): (key: MessageKey) => string;
|
package/dist/core/messages.d.ts
CHANGED
|
@@ -107,6 +107,14 @@ export declare const defaultMessages: {
|
|
|
107
107
|
readonly id: "vdd.search";
|
|
108
108
|
readonly defaultMessage: "Search";
|
|
109
109
|
};
|
|
110
|
+
readonly notifications: {
|
|
111
|
+
readonly id: "vdd.notifications";
|
|
112
|
+
readonly defaultMessage: "Notifications";
|
|
113
|
+
};
|
|
114
|
+
readonly closeNotification: {
|
|
115
|
+
readonly id: "vdd.closeNotification";
|
|
116
|
+
readonly defaultMessage: "Close notification";
|
|
117
|
+
};
|
|
110
118
|
};
|
|
111
119
|
/**
|
|
112
120
|
* Every message key. Import it in your own message table to get a compile-time guarantee
|
package/dist/core/panelDom.d.ts
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* workspaces on a page shared panel DOM.
|
|
14
14
|
*/
|
|
15
15
|
export declare class PanelDomCache {
|
|
16
|
-
private readonly
|
|
16
|
+
private readonly ownerDocument?;
|
|
17
17
|
private elements;
|
|
18
18
|
/**
|
|
19
19
|
* Preserved state, **owned per panel and outliving the hidden period**.
|
|
@@ -34,7 +34,13 @@ export declare class PanelDomCache {
|
|
|
34
34
|
*/
|
|
35
35
|
private sizes;
|
|
36
36
|
private hidden;
|
|
37
|
-
|
|
37
|
+
/**
|
|
38
|
+
* The document is looked up on first use, not in a parameter default: constructing the cache
|
|
39
|
+
* then touches nothing, so `<VddDesktop>` can be set up where there is no DOM (server
|
|
40
|
+
* rendering) as long as no panel element is asked for.
|
|
41
|
+
*/
|
|
42
|
+
constructor(ownerDocument?: Document | undefined);
|
|
43
|
+
private get doc();
|
|
38
44
|
/** The off-screen store. Panels live here while minimised, and before their first host. */
|
|
39
45
|
hiddenStore(): HTMLElement;
|
|
40
46
|
/**
|