@synopackageland/ui 0.11.4 → 0.12.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 +42 -0
- package/README.md +36 -12
- package/dist/components/app/app-root/AppRoot.vue.d.ts +6 -0
- package/dist/components/composite/about-dialog/AboutDialog.vue.d.ts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4369 -4296
- package/dist/json-preview/preview.js +4087 -4019
- package/dist/lib/accent.d.ts +17 -0
- package/dist/lib/color.d.ts +16 -0
- package/dist/reka-runtime.json +1 -1
- package/dist/theme.css +1 -1
- package/dist/themes/dsm7-embedded-theme.css +1 -1
- package/dist/themes/dsm7-embedded.css +1 -1
- package/dist/themes/dsm7.css +1 -1
- package/docs/adaptive-layout.md +2 -2
- package/docs/color-system.md +135 -0
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,47 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.12.0 (2026-10-18)
|
|
4
|
+
|
|
5
|
+
- Colours come from five 12-step scales built from DSM 7's colours (`--ui-gray-*`, `--ui-blue-*`, `--ui-green-*`, `--ui-orange-*`, `--ui-red-*`, each with translucent `-a` steps, and `--ui-accent-*`), and every semantic token is now one step of a scale ([colour system](docs/color-system.md)). No token was renamed or removed. A few values changed so every text step reads at AA on its fills: `--ui-text-secondary` 78% → 82%, `--ui-danger-text` `#a81b1b`, the soft tone fills 10% of their tone, `--ui-surface-subtle`, `--ui-control-track` and `--ui-control-divider` one step of the grey scale. `--ui-info-soft` no longer follows `--ui-primary-soft`, and `--ui-info-text` no longer follows `--ui-primary-active` overrides. `--ui-selection` is deprecated (unused; use `--ui-surface-selected`).
|
|
6
|
+
- `AppRoot` takes an `accent` colour: selection, focus and main actions use twelve steps derived from it the way DSM derives its blue, a white label keeps 4.5:1, and the status tones stay DSM's. A floating dialog (`dialog-bounds="viewport"`) carries it too. Without it an app keeps DSM blue. `accentScale()` and `accentStyle()` are exported.
|
|
7
|
+
- Text keeps to DSM's tiers: 12, 13 and 14px, and the new `--ui-font-size-title` (16px) for `PageHeader`, a `WizardStep` headline, the About dialog's app name and the sidebar brand (were 18 and 15px). Select and Combobox group labels, `ScheduleTable` hours, `Ghost` counts and sidebar badges go from 10–11px to 12px.
|
|
8
|
+
- `--ui-hairline`: 1px, one device pixel (0.5px) from 2dppx up. Menu separators, `Separator`, `TypoDivider` and `ListItem` use it.
|
|
9
|
+
- No middle-dot separators: `FilePicker` lists each file limit on its own line, a compact `ConnectionTopology` lane captions each link on its own, and a collapsed `AppSidebarUser` tooltip shows the name over the detail (`Tooltip` keeps line breaks).
|
|
10
|
+
- New browser check `pnpm check:palette`: the colour roles on a Control Panel list and a settings page, in a DSM window and on a narrow screen, with DSM blue and two app accents.
|
|
11
|
+
- Visible changes for apps: slightly darker secondary text and red text, softer status fills, a 16px page title. No code changes needed; an app that overrides `--ui-primary` to rebrand can switch to `accent`.
|
|
12
|
+
|
|
13
|
+
### Token values and migration / Token 值與遷移
|
|
14
|
+
|
|
15
|
+
No existing token was renamed or removed. These values change from 0.11.5; scale aliases resolve to the values below with the default DSM accent. / 既有 token 沒有改名或移除;以下列出相較 0.11.5 調整的值,色階別名以預設 DSM accent 的值表示。
|
|
16
|
+
|
|
17
|
+
| Token | 0.11.5 | 0.12.0 |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| `--ui-surface-subtle` | `rgba(153, 177, 204, 0.1)` | `--ui-gray-a2`: `rgba(198, 212, 224, 0.18)` |
|
|
20
|
+
| `--ui-text-secondary` | `rgba(65, 75, 85, 0.78)` | `--ui-gray-a11`: `rgba(65, 75, 85, 0.82)` |
|
|
21
|
+
| `--ui-neutral-soft` | `#eef2f5` | `--ui-gray-a3`: `rgba(198, 212, 224, 0.4)` |
|
|
22
|
+
| `--ui-neutral-text` | `#56606a` | `--ui-gray-11`: `#636b74` |
|
|
23
|
+
| `--ui-success-soft` | `#eaf5ed` | `--ui-green-a3`: `rgba(0, 158, 5, 0.1)` |
|
|
24
|
+
| `--ui-warning-soft` | `#fdf2e1` | `--ui-orange-a3`: `rgba(245, 132, 20, 0.1)` |
|
|
25
|
+
| `--ui-danger-soft` | `#fceced` | `--ui-red-a3`: `rgba(230, 64, 64, 0.1)` |
|
|
26
|
+
| `--ui-danger-text` | `#b42f2f` | `--ui-red-11`: `#a81b1b` |
|
|
27
|
+
| `--ui-control-divider` | `rgba(124, 138, 152, 0.45)` | `--ui-gray-a7`: `rgba(124, 138, 152, 0.4)` |
|
|
28
|
+
| `--ui-control-track` | `#cbd3dc` | `--ui-gray-7`: `#cbd0d6` |
|
|
29
|
+
| `--ui-info-soft` | `var(--ui-primary-soft)` | `--ui-blue-a3`: `rgba(5, 127, 235, 0.1)` |
|
|
30
|
+
| `--ui-info-text` | `var(--ui-primary-active)` | `--ui-blue-11`: `#0062b8` |
|
|
31
|
+
|
|
32
|
+
`--ui-info-soft` and `--ui-info-text` keep their default blue values but no longer inherit primary overrides. Apps that used `--ui-primary-soft` / `--ui-primary-active` to style info badges must override `--ui-info-soft` / `--ui-info-text` explicitly. For branding, prefer `<AppRoot accent="#7a5af8">` to overriding individual primary tokens: it also supplies hover, selection and focus colours; status tones remain DSM's. Replace reads of deprecated `--ui-selection` with `--ui-surface-selected`. See the [colour system migration guide](docs/color-system.md#migrating-from-011).
|
|
33
|
+
|
|
34
|
+
`--ui-info-soft`/`--ui-info-text` 的預設藍色值不變,但不再繼承 primary 覆寫。原本透過 `--ui-primary-soft`/`--ui-primary-active` 調整 info badge 的 App,須明確覆寫 `--ui-info-soft`/`--ui-info-text`。品牌色建議改用 `<AppRoot accent="#7a5af8">`,一併提供 hover、選取與焦點色,狀態色仍維持 DSM 色。讀取已 deprecated 的 `--ui-selection` 請改用 `--ui-surface-selected`。詳見[色彩系統遷移說明](docs/color-system.md#migrating-from-011)。
|
|
35
|
+
|
|
36
|
+
繁中摘要:色彩改由五組以 DSM 7 色彩推導的 12 階色階(gray/blue/green/orange/red,各含半透明 `-a` 階,另有 `--ui-accent-*`)提供,所有語意 token 都對應到某一階(見 [colour system](docs/color-system.md))。沒有 token 改名或移除;為了讓文字在各底色上達 AA,少數值有調整:`--ui-text-secondary` 由 78% 改 82%、`--ui-danger-text` 改 `#a81b1b`、狀態淺底改為該色 10%、`--ui-surface-subtle`、`--ui-control-track`、`--ui-control-divider` 改為灰階的一階;`--ui-info-soft` 不再跟著 `--ui-primary-soft`、`--ui-info-text` 不再跟著 `--ui-primary-active` 的覆寫;`--ui-selection` 標為 deprecated(未使用,請改用 `--ui-surface-selected`)。`AppRoot` 新增 `accent`:選取、焦點與主要動作改用由該色推導的 12 階(推導方式同 DSM 藍,白字維持 4.5:1),狀態色維持 DSM 色;`dialog-bounds="viewport"` 的浮動對話框同樣套用;不設定則維持 DSM 藍;並匯出 `accentScale()`、`accentStyle()`。字級收斂到 DSM 層級 12/13/14px,新增 `--ui-font-size-title`(16px)給 `PageHeader`、`WizardStep` 標題、About 對話框 App 名稱與側欄品牌(原 18/15px);Select/Combobox 群組標籤、`ScheduleTable` 時數、`Ghost` 計數與側欄 badge 由 10–11px 改 12px。新增 `--ui-hairline`(1px,2dppx 以上為 0.5px,即一個裝置像素),選單分隔線、`Separator`、`TypoDivider`、`ListItem` 使用。移除「·」分隔:`FilePicker` 每項限制各自一行、compact `ConnectionTopology` 每段連線各自標示、收合的 `AppSidebarUser` tooltip 名稱與說明分兩行(`Tooltip` 保留換行)。新增瀏覽器檢查 `pnpm check:palette`。App 程式不必改;以覆寫 `--ui-primary` 換品牌色的 App 可改用 `accent`。
|
|
37
|
+
|
|
38
|
+
## 0.11.5 (2026-10-18)
|
|
39
|
+
|
|
40
|
+
- **Behavior change:** `AboutDialog` no longer defaults to Synology legal URLs. Apps must supply `tosUrl` and/or `privacyUrl`; an omitted or empty URL hides that individual link. The close action remains available. To retain legal links after upgrading, pass the application's intended URLs explicitly.
|
|
41
|
+
- Removed the obsolete internal development example file `.evn.example`.
|
|
42
|
+
|
|
43
|
+
繁中摘要:**行為變更:**`AboutDialog` 不再預設連到 Synology 法律頁面;App 須自行傳入 `tosUrl`/`privacyUrl`,未提供或空字串就不顯示該連結,關閉按鈕仍可使用。原本依賴預設 Synology 連結的 App,升級後須自行傳入 App 適用的網址。另移除過時的內部開發範例檔 `.evn.example`。
|
|
44
|
+
|
|
3
45
|
## 0.11.4 (2026-10-17)
|
|
4
46
|
|
|
5
47
|
- Fixed: five `SectionTabs` in a 390 px dialog were cut off, with no sign of the hidden tabs and no way to reach them with a mouse wheel. `SectionTabs` and `Tabs` now fade the side of the strip that hides tabs (`data-overflow-start`, `data-overflow-end`), scroll sideways on a vertical mouse wheel until the strip ends (then the page scrolls), and scroll the selected tab into view, clear of the fade, when it is selected and when the strip resizes. In `SectionTabs`, the arrow keys, Home and End move focus between enabled tabs.
|
package/README.md
CHANGED
|
@@ -91,6 +91,26 @@ Components imported in `<script setup>` are available directly in the template.
|
|
|
91
91
|
No `app.use()` plugin registration is required. JavaScript consumers can omit
|
|
92
92
|
`lang="ts"`, the type import, and the `: SelectOption[]` annotation.
|
|
93
93
|
|
|
94
|
+
## AboutDialog legal links
|
|
95
|
+
|
|
96
|
+
`AboutDialog` displays each legal link only when the application supplies its
|
|
97
|
+
URL through `tosUrl` or `privacyUrl`. Both default to an empty string; omitting
|
|
98
|
+
a prop or passing `''` hides that link. URLs can be updated while the dialog is
|
|
99
|
+
open. The footer's close button remains available without legal links.
|
|
100
|
+
|
|
101
|
+
```vue
|
|
102
|
+
<AboutDialog
|
|
103
|
+
v-model:open="aboutOpen"
|
|
104
|
+
title="My App"
|
|
105
|
+
tos-url="https://example.com/terms"
|
|
106
|
+
privacy-url="https://example.com/privacy"
|
|
107
|
+
/>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Replace these example URLs with your application's Terms of Service and Privacy
|
|
111
|
+
Policy. Apps that relied on the former Synology legal URL defaults must now
|
|
112
|
+
provide their intended URLs explicitly.
|
|
113
|
+
|
|
94
114
|
## Using inside a DSM window
|
|
95
115
|
|
|
96
116
|
A DSM package window is not a page of its own: every window shares the DSM
|
|
@@ -365,12 +385,24 @@ faint grey block with no border of its own, at 12px × 16px padding.
|
|
|
365
385
|
|
|
366
386
|
## Theme override
|
|
367
387
|
|
|
368
|
-
Components use semantic CSS tokens
|
|
388
|
+
Components use semantic CSS tokens, each a step of a 12-step scale built from
|
|
389
|
+
DSM 7's colours ([colour system](docs/color-system.md)). Without an override an
|
|
390
|
+
app looks like DSM's own apps: DSM blue for selection, focus and main actions.
|
|
391
|
+
|
|
392
|
+
An app with a colour of its own sets it on its root. The theme derives the
|
|
393
|
+
hover, pressed, selected and focus colours from it, keeps a white label
|
|
394
|
+
readable on it, and leaves the status tones DSM's:
|
|
395
|
+
|
|
396
|
+
```vue
|
|
397
|
+
<AppRoot accent="#7a5af8">
|
|
398
|
+
<App />
|
|
399
|
+
</AppRoot>
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
Other tokens are overridden in a stylesheet imported after the library's:
|
|
369
403
|
|
|
370
404
|
```css
|
|
371
405
|
:root {
|
|
372
|
-
--ui-primary: #0086e5;
|
|
373
|
-
--ui-primary-hover: #0077cf;
|
|
374
406
|
--ui-radius-md: 6px;
|
|
375
407
|
--ui-page-padding-x: 24px;
|
|
376
408
|
--ui-section-gap: 16px;
|
|
@@ -380,15 +412,7 @@ Components use semantic CSS tokens. Import your override stylesheet after the li
|
|
|
380
412
|
Status tones come in pairs, a soft fill and the text that reads on it:
|
|
381
413
|
`--ui-{neutral,info,success,warning,danger}-soft` and `-text`. `Badge`,
|
|
382
414
|
`StatusDot`, `StepList` and `ConnectionTopology` use only these and the base
|
|
383
|
-
tones (`--ui-success`, …)
|
|
384
|
-
|
|
385
|
-
```css
|
|
386
|
-
[data-ui-theme='dark'] {
|
|
387
|
-
--ui-success-soft: #173222;
|
|
388
|
-
--ui-success-text: #6fdc8a;
|
|
389
|
-
/* … the other tones, and the surface and text tokens */
|
|
390
|
-
}
|
|
391
|
-
```
|
|
415
|
+
tones (`--ui-success`, …).
|
|
392
416
|
|
|
393
417
|
Density can be switched per application subtree:
|
|
394
418
|
|
|
@@ -6,6 +6,12 @@ type __VLS_Props = {
|
|
|
6
6
|
* anywhere in the viewport. Set it only inside a DSM window.
|
|
7
7
|
*/
|
|
8
8
|
dialogBounds?: 'app' | 'viewport';
|
|
9
|
+
/**
|
|
10
|
+
* The app's own accent (`#rrggbb` or `rgb()`), drawn on selection, focus and
|
|
11
|
+
* main actions in place of DSM blue. Leave it unset to look like DSM's own
|
|
12
|
+
* apps; set it only for a colour that belongs to the app.
|
|
13
|
+
*/
|
|
14
|
+
accent?: string;
|
|
9
15
|
};
|
|
10
16
|
declare var __VLS_7: {}, __VLS_9: {};
|
|
11
17
|
type __VLS_Slots = {} & {
|
|
@@ -22,7 +22,9 @@ type __VLS_Props = {
|
|
|
22
22
|
copyrightYear?: string;
|
|
23
23
|
iconSrc?: string;
|
|
24
24
|
beta?: boolean;
|
|
25
|
+
/** App-provided Terms of Service URL. Omitted or empty hides the link. */
|
|
25
26
|
tosUrl?: string;
|
|
27
|
+
/** App-provided Privacy Policy URL. Omitted or empty hides the link. */
|
|
26
28
|
privacyUrl?: string;
|
|
27
29
|
releaseNotesUrl?: string;
|
|
28
30
|
/** Runs on open. Return `newVersion` for an update, `betaVersion` for beta info, `{}`/undefined for failure. */
|
package/dist/index.d.ts
CHANGED
|
@@ -176,6 +176,8 @@ export { default as AboutDialog } from './components/composite/about-dialog/Abou
|
|
|
176
176
|
export type { AboutCheckState, AboutVersionInfo } from './components/composite/about-dialog/types';
|
|
177
177
|
export { default as AppRoot } from './components/app/app-root/AppRoot.vue';
|
|
178
178
|
export { APP_ROOT_ATTRIBUTE, APP_ROOT_SELECTOR } from './lib/appRoot';
|
|
179
|
+
export { accentScale, accentStyle } from './lib/accent';
|
|
180
|
+
export type { AccentScale } from './lib/accent';
|
|
179
181
|
export { default as AppLayout } from './components/app/app-layout/AppLayout.vue';
|
|
180
182
|
export { default as ResponsiveView } from './components/app/responsive-view/ResponsiveView.vue';
|
|
181
183
|
export { appPresentationForWidth, MOBILE_LAYOUT_MAX, WEB_LAYOUT_MIN } from './lib/adaptiveLayout';
|