@synopackageland/ui 0.14.6 → 0.14.7

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,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.14.7 (2026-10-23)
4
+
5
+ Visual change: buttons in `SettingsSection` and `Card` footers and `Notification` actions change shape. Props, slots and exports stay as they were.
6
+
7
+ - 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.
8
+ - `SettingsSection` and `Card` `#footer` buttons are tool buttons (3px radius) instead of capsules. Put a Save / Cancel row there in `FormActions` to keep capsules.
9
+ - `Notification` confirm and cancel buttons are default-size footer capsules instead of small tool buttons.
10
+ - 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.
11
+
3
12
  ## 0.14.6 (2026-10-23)
4
13
 
5
14
  - `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;
@@ -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>;