@synopackageland/ui 0.14.6 → 0.14.8

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,24 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.14.8 (2026-10-23)
4
+
5
+ Visual change: the page behind cards, corners and shadows. Props, slots and exports stay as they were.
6
+
7
+ - `--ui-bg` is a cool page grey (`#f0f2f5`, the hue of Storage Manager's Overview one step deeper) instead of white. A page of cards sits on it in every presentation: `PageContent surface="flat"`, and now `surface="auto"` when the page holds a `Card` or `Surface`; those top-level cards keep a 1px frame (`--ui-border`, the same grey as the web border) and take `--ui-shadow-card`. Pages without cards (lists, Control Panel style forms) and `surface="card"` stay white. The web canvas defaults to `--ui-bg`.
8
+ - Shadows are one soft, layered set: `--ui-shadow-card`, `--ui-shadow-menu` and `--ui-shadow-dialog` use a low-opacity blue-grey instead of 16% / 30% / 60% black. The web card shadow, the phone drawer and the `Slider` and `Switch` thumbs use these tokens instead of their own values.
9
+ - Corners stay within 2px of a card: a message box is 6px (was 8px). The web and phone presentations use 6px for cards and navigation rows (were 10px and 8px) and 8px for dialogs and bottom sheets (were 3px/8px and 12px). Literal 2px and 8px radii now use the radius tokens.
10
+ - `InfoMask` keeps DSM's white mask (it was drawn from `--ui-bg`).
11
+ - Workbench dark mode: three layers (page `#11161c`, card `#1f2832`, menu and dialog `#2b3541`), quieter card frames (`--ui-border-subtle`), a dark inset fill and a dark shadow set.
12
+
13
+ ## 0.14.7 (2026-10-23)
14
+
15
+ Visual change: buttons in `SettingsSection` and `Card` footers and `Notification` actions change shape. Props, slots and exports stay as they were.
16
+
17
+ - Add [docs/button-policy.md](docs/button-policy.md), measured on DSM 7.4: a capsule belongs only to the bar that closes a dialog, form or wizard, with one main action placed last; every other button is a grey tool button, Delete included.
18
+ - `SettingsSection` and `Card` `#footer` buttons are tool buttons (3px radius) instead of capsules. Put a Save / Cancel row there in `FormActions` to keep capsules.
19
+ - `Notification` confirm and cancel buttons are default-size footer capsules instead of small tool buttons.
20
+ - In development, `Button` warns in the console when `kind="action"` is set outside a footer, when a footer has more than one primary or danger button, or when the main action is not last. Production builds do not check.
21
+
3
22
  ## 0.14.6 (2026-10-23)
4
23
 
5
24
  - `AppLayout` uses its navigation drawer at container widths up to 640px, giving narrow windows the full content width. The window layout starts at 641px; `:responsive="false"` still opts out.
package/README.md CHANGED
@@ -9,7 +9,8 @@ For DSM window / full-page Portal / phone layouts, see
9
9
  [Responsive DSM application layout](docs/adaptive-layout.md). To generate UI
10
10
  as JSON (including with an AI and the `syno-pkg-land-ui` validate/render CLI), see
11
11
  [Declarative DSM UI](docs/json-ui.md). For page layout rules, see
12
- [Layout rules](docs/layout-rules.md).
12
+ [Layout rules](docs/layout-rules.md); for which button goes where, see
13
+ [Button policy](docs/button-policy.md).
13
14
 
14
15
  Synology Package Land UI provides Vue components for Synology package applications,
15
16
  including an embedded theme and AppRoot for shared DSM desktop windows.
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -4,7 +4,7 @@ type __VLS_Props = {
4
4
  * `--ui-page-readable-width`; any other value is a CSS maximum width.
5
5
  */
6
6
  width?: 'fill' | 'readable' | (string & {});
7
- /** Web/portal: auto/card use the white content area; flat uses the dashboard canvas. none adds no surface or horizontal gutters, for content that owns its layout at every width. */
7
+ /** card uses the white content area; flat uses the page grey; auto is white unless the page holds a card, then grey like flat. none adds no surface or horizontal gutters, for content that owns its layout at every width. */
8
8
  surface?: 'auto' | 'flat' | 'card' | 'none';
9
9
  /**
10
10
  * `'fill'` takes the container's height and does not scroll: the header,
@@ -10,7 +10,7 @@ type __VLS_Props = {
10
10
  /** Bound with `v-model:open` for controlled collapse. */
11
11
  open?: boolean;
12
12
  };
13
- declare var __VLS_6: {}, __VLS_8: {}, __VLS_10: {}, __VLS_12: {}, __VLS_14: {}, __VLS_21: {}, __VLS_29: {};
13
+ declare var __VLS_6: {}, __VLS_8: {}, __VLS_10: {}, __VLS_12: {}, __VLS_14: {}, __VLS_21: {}, __VLS_23: {};
14
14
  type __VLS_Slots = {} & {
15
15
  title?: (props: typeof __VLS_6) => any;
16
16
  } & {
@@ -24,7 +24,7 @@ type __VLS_Slots = {} & {
24
24
  } & {
25
25
  default?: (props: typeof __VLS_21) => any;
26
26
  } & {
27
- footer?: (props: typeof __VLS_29) => any;
27
+ footer?: (props: typeof __VLS_23) => any;
28
28
  };
29
29
  declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
30
30
  "update:open": (value: boolean) => any;
@@ -14,7 +14,7 @@ type __VLS_Props = {
14
14
  /** Shows a skeleton in place of the body and footer while they load. */
15
15
  loading?: boolean;
16
16
  };
17
- declare var __VLS_8: {}, __VLS_10: {}, __VLS_22: {}, __VLS_24: {}, __VLS_32: {};
17
+ declare var __VLS_8: {}, __VLS_10: {}, __VLS_22: {}, __VLS_24: {}, __VLS_26: {};
18
18
  type __VLS_Slots = {} & {
19
19
  title?: (props: typeof __VLS_8) => any;
20
20
  } & {
@@ -24,7 +24,7 @@ type __VLS_Slots = {} & {
24
24
  } & {
25
25
  default?: (props: typeof __VLS_24) => any;
26
26
  } & {
27
- footer?: (props: typeof __VLS_32) => any;
27
+ footer?: (props: typeof __VLS_26) => any;
28
28
  };
29
29
  declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
30
30
  "update:expanded": (value: boolean) => any;
@@ -6,9 +6,10 @@ type __VLS_Props = {
6
6
  variant?: ButtonVariant;
7
7
  size?: ButtonSize;
8
8
  /**
9
- * `tool` (toolbar and in-form commands) or `action` (a footer's capsule
10
- * with a minimum width). Defaults to what the surrounding footer provides,
11
- * else `tool`.
9
+ * `tool` (toolbar, page and in-form commands) or `action` (the capsule with
10
+ * a minimum width that DSM keeps for a dialog, wizard or form footer).
11
+ * Defaults to what the surrounding footer provides, else `tool`; set it
12
+ * only to opt one footer button out with `tool`.
12
13
  */
13
14
  kind?: ButtonKind;
14
15
  loading?: boolean;
@@ -1,9 +1,17 @@
1
+ import { Ref } from 'vue';
1
2
  /**
2
- * DSM draws two button shapes: a `tool` button (toolbar, in-form commands) with
3
- * the small control radius, and an `action` button (dialog, wizard and page
4
- * footers) as a capsule with a minimum width.
3
+ * DSM draws two button shapes: a `tool` button (toolbar, page and in-form
4
+ * commands) with the small control radius, and an `action` button as a capsule
5
+ * with a minimum width. DSM keeps the capsule for the bar that closes a window,
6
+ * dialog or form: Apply / Reset, OK / Cancel, a wizard's Next. See
7
+ * docs/button-policy.md.
5
8
  */
6
9
  export type ButtonKind = 'tool' | 'action';
7
10
  /** Makes `kind` the default for every Button rendered below the caller. */
8
11
  export declare function provideButtonKind(kind: ButtonKind): void;
9
- export declare function injectButtonKind(): ButtonKind;
12
+ /**
13
+ * Resolves a Button's kind from its prop and the surrounding footer. In
14
+ * development it also checks the button against the policy: a capsule outside a
15
+ * footer, two main actions in one footer, or a main action that is not last.
16
+ */
17
+ export declare function useButtonKind(explicit: () => ButtonKind | undefined, main: () => boolean, el: Ref<HTMLElement | null>): import('vue').ComputedRef<ButtonKind>;