@synopackageland/ui 0.11.5 → 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 CHANGED
@@ -1,5 +1,40 @@
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
+
3
38
  ## 0.11.5 (2026-10-18)
4
39
 
5
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.
package/README.md CHANGED
@@ -385,12 +385,24 @@ faint grey block with no border of its own, at 12px × 16px padding.
385
385
 
386
386
  ## Theme override
387
387
 
388
- Components use semantic CSS tokens. Import your override stylesheet after the library stylesheet to customize branding:
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:
389
403
 
390
404
  ```css
391
405
  :root {
392
- --ui-primary: #0086e5;
393
- --ui-primary-hover: #0077cf;
394
406
  --ui-radius-md: 6px;
395
407
  --ui-page-padding-x: 24px;
396
408
  --ui-section-gap: 16px;
@@ -400,15 +412,7 @@ Components use semantic CSS tokens. Import your override stylesheet after the li
400
412
  Status tones come in pairs, a soft fill and the text that reads on it:
401
413
  `--ui-{neutral,info,success,warning,danger}-soft` and `-text`. `Badge`,
402
414
  `StatusDot`, `StepList` and `ConnectionTopology` use only these and the base
403
- tones (`--ui-success`, …), so a dark theme overrides the pairs once:
404
-
405
- ```css
406
- [data-ui-theme='dark'] {
407
- --ui-success-soft: #173222;
408
- --ui-success-text: #6fdc8a;
409
- /* … the other tones, and the surface and text tokens */
410
- }
411
- ```
415
+ tones (`--ui-success`, …).
412
416
 
413
417
  Density can be switched per application subtree:
414
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 = {} & {
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';