@synopackageland/ui 0.16.4 → 0.17.1

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,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.17.1 (2026-10-26)
4
+
5
+ - `WizardDialog` is sized like DSM's wizard windows: 75% of the app's width (560px to 860px) and its height less 48px (600px at most), so the app shows around it; it was DSM's widest dialog (860px) and 600px high, nearly the whole of a 960x600 window. `width`, `height` and `size` still set your own.
6
+ - A compact `ConnectionTopology` on a step's stage is a centred row of three boxes of one width with room around their words, without its own frame inside the stage. The stage is one even surface; the accent light in its corner is gone.
7
+ - A short step with a hero takes up to 32px of its free room above it instead of leaving all of it below.
8
+ - The focus `Dialog` and `Wizard` move by script (on opening, on a step change) shows a ring only when the last input was a key, as `:focus-visible` does for Tab; after a click Chrome rang it.
9
+ - Releases are published from the staged package directory, not a tarball path, so the registry document carries no local path (`_resolved`, `_from`); `pnpm check:npm-metadata <version>` checks a published version. Versions up to 0.17.0 carry such fields.
10
+
11
+ ## 0.17.0 (2026-10-26)
12
+
13
+ Visual change: `Wizard` and `WizardDialog` follow DSM's wizard window. Props, slots, events and exposed methods keep working except where noted.
14
+
15
+ - `Wizard` has a fixed header: the wizard's name small (`title`), the current step's `headline` large, and a compact progress bar (a segment per step) with "Step n of total" beside it, then one line. The step no longer repeats its headline; it opens with its hero and its `description`. The header's title takes the focus on a step change and is described by the progress.
16
+ - The footer keeps the main action last at the right edge on every step: the step's `#actions` at the start, then Cancel (when `cancellable`), Back and the main action together at the end. Back was at the start.
17
+ - `stepper`: `auto` / `bar` is the header bar; `rail` lists the steps beside the step from `rail-min-width` (the bar below it); `header` (0.16's numbered band) now means the bar. `Wizard description` is deprecated and no longer shown.
18
+ - `WizardDialog`: no Cancel in the footer (`cancellable` defaults to `false`); the close button sits beside the wizard's name in one header band. Closing it, with the button or Escape, emits `cancel`. It opens like a DSM modal window: a light scrim instead of the dark mask, a soft glow all round (`--ui-shadow-modal`), rounder corners, and a press outside neither closes it nor reaches the app.
19
+ - `Dialog scrim` (`dim` | `light` | `none`), `close-on-outside` and `header-divider`, for a window-like dialog of your own. New tokens `--ui-overlay-light` and `--ui-shadow-modal`, light and dark.
20
+ - A quiet text action at the start of the wizard's footer (a ghost `#actions` button) shows its whole label; it was cut by the offset that lines it up with the step. A step scrolls a focused card into view with a small gap above and below.
21
+ - `Dialog` opens with the focus on the first visible field or button; a focusable element in a hidden part (a wizard's later step) no longer sends it to the close button.
22
+ - `pnpm check:wizard`: a real-browser check of `WizardDialog` at 960x600 and 1280x800, light and dark.
23
+
3
24
  ## 0.16.4 (2026-10-25)
4
25
 
5
26
  - `ConnectionTopology` compact lanes no longer switch between wrap levels without end in a tight lane (a row of three cards at DPR 2): Chrome can report the track sizes of the last drawn frame right after a lane's words change, so the fit is now a first guess that each lane checks once drawn, wrapping a level more or less, and never back to a level it was drawn failing at.
package/README.md CHANGED
@@ -302,11 +302,13 @@ lets dialogs be dragged out of the window, within the browser viewport. See
302
302
 
303
303
  ### Wizard
304
304
 
305
- `WizardDialog` opens a multi-step setup in a large app-local dialog: a step
306
- rail (a stepper band under 600px), a hero, headline and one line per step, a
307
- scrolling step area and a fixed footer with Back on the left and one main
308
- action on the right. `Wizard` is the same layout for a `<Dialog flush>` of your
309
- own or a page (`framed`). See [docs/wizard.md](docs/wizard.md).
305
+ `WizardDialog` opens a multi-step setup in a large app-local dialog, built like
306
+ DSM's wizards: a fixed header with the wizard's name, the step's title and a
307
+ compact progress bar; a scrolling step with its hero and one line; and a fixed
308
+ footer with Back and the one main action together at the end. The app behind
309
+ takes a light scrim, and a press on it does not close the wizard. `Wizard` is
310
+ the same layout for a `<Dialog flush>` of your own or a page (`framed`). See
311
+ [docs/wizard.md](docs/wizard.md).
310
312
 
311
313
  ### Toast notifications
312
314
 
@@ -3,25 +3,25 @@ type __VLS_Props = {
3
3
  /** Initial / external reset key. Internal navigation keeps working when the caller does not bind it back. */
4
4
  activeStepKey?: string;
5
5
  footer?: WizardFooterConfig;
6
- /** Shows the Cancel action in the footer. */
6
+ /** Shows Cancel in the footer, beside Back. A wizard in a dialog leaves it to the header's close button. */
7
7
  cancellable?: boolean;
8
8
  ariaLabel?: string;
9
- /** The wizard's name, at the top of the step rail. */
9
+ /** The wizard's name, small above the step title. `WizardDialog` puts it in the dialog header instead. */
10
10
  title?: string;
11
- /** One short line under the title in the step rail. */
11
+ /** @deprecated Not shown since 0.17; put the line in the first step's `description`. */
12
12
  description?: string;
13
- /** Where the steps show; see `WizardStepper`. */
13
+ /** How the header shows the progress; see `WizardStepper`. */
14
14
  stepper?: WizardStepper;
15
15
  /** @deprecated Use `stepper`. `false` is `stepper="none"`. */
16
16
  showSteps?: boolean;
17
17
  /** Draws a border, rounded corners and a shadow, for a wizard placed on a page rather than in a dialog. */
18
18
  framed?: boolean;
19
19
  /** On a page: takes the height left below it in its scroll container, so
20
- * the rail, the band and the footer stay in view and only the step scrolls. */
20
+ * the header and the footer stay in view and only the step scrolls. */
21
21
  fit?: boolean;
22
22
  /** The least height `fit` takes; in a shorter window the page scrolls instead. */
23
23
  fitMinHeight?: number;
24
- /** With `stepper="auto"`, the wizard width from which the rail shows; narrower shows the band. */
24
+ /** With `stepper="rail"`, the wizard width from which the rail shows; narrower shows the bar. */
25
25
  railMinWidth?: number;
26
26
  progressText?: (current: number, total: number) => string;
27
27
  };
@@ -29,7 +29,7 @@ declare function toNextStep(): Promise<void>;
29
29
  declare function toPreviousStep(): Promise<void>;
30
30
  declare function finish(): Promise<void>;
31
31
  declare function cancel(): void;
32
- declare var __VLS_11: {}, __VLS_19: {
32
+ declare var __VLS_6: {}, __VLS_14: {
33
33
  nextStep: typeof toNextStep;
34
34
  previousStep: typeof toPreviousStep;
35
35
  finish: typeof finish;
@@ -40,9 +40,9 @@ declare var __VLS_11: {}, __VLS_19: {
40
40
  stepKey: string;
41
41
  };
42
42
  type __VLS_Slots = {} & {
43
- default?: (props: typeof __VLS_11) => any;
43
+ default?: (props: typeof __VLS_6) => any;
44
44
  } & {
45
- footer?: (props: typeof __VLS_19) => any;
45
+ footer?: (props: typeof __VLS_14) => any;
46
46
  };
47
47
  declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
48
48
  activeStepKey: import('vue').ComputedRef<string>;
@@ -4,9 +4,11 @@ type __VLS_Props = {
4
4
  defaultOpen?: boolean;
5
5
  title?: string;
6
6
  description?: string;
7
+ /** A DSM dialog width instead of the wizard's own; `width` wins over it. */
7
8
  size?: DialogSize;
9
+ /** The panel's width (default: 75% of the app, between 560px and 860px). */
8
10
  width?: string;
9
- /** The panel's height, capped to the room the window leaves. */
11
+ /** The panel's height, capped to the room the window leaves (default: the app's height less 48px, at most 600px). */
10
12
  height?: string;
11
13
  closeLabel?: string;
12
14
  showClose?: boolean;
@@ -27,8 +29,6 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
27
29
  onCancel?: (() => any) | undefined;
28
30
  onFinished?: (() => any) | undefined;
29
31
  }>, {
30
- size: DialogSize;
31
- height: string;
32
32
  defaultOpen: boolean;
33
33
  open: boolean;
34
34
  showClose: boolean;
@@ -1,7 +1,7 @@
1
1
  import { WizardStepProps } from './types';
2
2
  type __VLS_Slots = {
3
3
  default?: () => unknown;
4
- /** A picture or a diagram above the headline, in place of the icon tile. */
4
+ /** A picture or a diagram at the top of the step, in place of the icon tile. */
5
5
  hero?: () => unknown;
6
6
  /** Secondary actions drawn in the wizard footer, before Cancel and the main action, while this step shows. */
7
7
  actions?: () => unknown;
@@ -5,24 +5,25 @@ import { Component } from 'vue';
5
5
  */
6
6
  export type WizardStepType = 'normal' | 'welcome' | 'done';
7
7
  /**
8
- * Where the wizard shows its steps: a rail beside the step (`'rail'`), a
9
- * stepper band above it (`'header'`), the rail when the wizard is at least
10
- * 600px wide and the band below that (`'auto'`), or nowhere (`'none'`).
8
+ * How the wizard shows its progress: a segmented bar beside the step title in
9
+ * the header (`'auto'`, `'bar'`), a rail listing the steps beside the step
10
+ * from `railMinWidth` and the bar below that (`'rail'`), or only the
11
+ * "Step n of total" line (`'none'`). `'header'` is the bar, kept for 0.16.
11
12
  */
12
- export type WizardStepper = 'auto' | 'rail' | 'header' | 'none';
13
+ export type WizardStepper = 'auto' | 'bar' | 'rail' | 'header' | 'none';
13
14
  /** A guard may return `false` (or resolve `false`) to block the step change. */
14
15
  export type MaybePromise<T> = T | Promise<T>;
15
16
  export type WizardStepProps = {
16
17
  /** Unique key the wizard uses to identify this step. */
17
18
  stepKey: string;
18
19
  type?: WizardStepType;
19
- /** The step's title, above its content. */
20
+ /** The step's title, shown large in the wizard header while the step shows. */
20
21
  headline?: string;
21
22
  /** A shorter name for the step list; falls back to `headline`. */
22
23
  label?: string;
23
- /** One short line under the headline. */
24
+ /** One short line at the top of the step, under its hero. */
24
25
  description?: string;
25
- /** An icon shown in a tile beside the headline; the `#hero` slot replaces it with a picture or a diagram. */
26
+ /** An icon shown in a tile beside the description; the `#hero` slot replaces it with a picture or a diagram. */
26
27
  icon?: Component;
27
28
  /** Omitted on the final step: the forward button then becomes Apply. */
28
29
  nextStepKey?: string | (() => string);
@@ -16,6 +16,8 @@ export type WizardContext = {
16
16
  direction: Ref<WizardDirection>;
17
17
  steps: Ref<WizardStepRegistration[]>;
18
18
  busy: Ref<boolean>;
19
+ /** The id of the header's step title, which labels the shown step. */
20
+ headingId: string;
19
21
  register: (registration: WizardStepRegistration) => void;
20
22
  unregister: (key: string) => void;
21
23
  };
@@ -19,14 +19,20 @@ type __VLS_Props = {
19
19
  showClose?: boolean;
20
20
  /** Drops the body's padding and scrolling, for content that lays out and scrolls itself (a `Wizard`). */
21
21
  flush?: boolean;
22
+ /** `false` drops the line under the header, for content whose own header continues it (a `Wizard`'s step title). */
23
+ headerDivider?: boolean;
24
+ /** `false` keeps the dialog open when the user presses outside it, as DSM's modal windows do; Escape still closes it. */
25
+ closeOnOutside?: boolean;
26
+ /** The mask over the app behind: `dim` (default), `light` (a faint tint, as DSM leaves the window behind a wizard) or `none`. It blocks presses in each case. */
27
+ scrim?: 'dim' | 'light' | 'none';
22
28
  };
23
- declare var __VLS_14: {}, __VLS_71: {}, __VLS_79: {};
29
+ declare var __VLS_14: {}, __VLS_73: {}, __VLS_81: {};
24
30
  type __VLS_Slots = {} & {
25
31
  trigger?: (props: typeof __VLS_14) => any;
26
32
  } & {
27
- default?: (props: typeof __VLS_71) => any;
33
+ default?: (props: typeof __VLS_73) => any;
28
34
  } & {
29
- footer?: (props: typeof __VLS_79) => any;
35
+ footer?: (props: typeof __VLS_81) => any;
30
36
  };
31
37
  declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
32
38
  escapeKeyDown: (event: KeyboardEvent) => any;
@@ -47,6 +53,9 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
47
53
  open: boolean;
48
54
  flush: boolean;
49
55
  showClose: boolean;
56
+ headerDivider: boolean;
57
+ closeOnOutside: boolean;
58
+ scrim: "dim" | "light" | "none";
50
59
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
51
60
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
52
61
  declare const _default: typeof __VLS_export;
@@ -0,0 +1,2 @@
1
+ /** Focuses `element` without scrolling, with a ring only when the last input was a key. */
2
+ export declare function focusLikeInput(element: HTMLElement): void;