@gjsify/adwaita-web 0.21.0 → 0.23.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.
@@ -0,0 +1 @@
1
+ export declare const AdwRowStateTest: () => Promise<void>;
@@ -0,0 +1 @@
1
+ export declare const AdwToastOverlayTest: () => Promise<void>;
@@ -0,0 +1 @@
1
+ export declare const AdwViewSwitcherBarTest: () => Promise<void>;
@@ -1,5 +1,6 @@
1
+ import type { AdwResponseAppearance } from '@gjsify/adwaita-core';
1
2
  /** Response button appearance — mirrors Adw.ResponseAppearance. */
2
- export type AdwResponseAppearance = 'default' | 'suggested' | 'destructive';
3
+ export type { AdwResponseAppearance } from '@gjsify/adwaita-core';
3
4
  /**
4
5
  * A single response declared in markup. Child of <adw-alert-dialog>; its `id`
5
6
  * attribute is the response ID, its text content the label. Optional
@@ -17,10 +18,10 @@ export declare class AdwAlertDialog extends HTMLElement {
17
18
  private _bodyEl;
18
19
  private _childEl;
19
20
  private _responseAreaEl;
20
- private _responses;
21
- private _byId;
22
- private _defaultResponse;
23
- private _closeResponse;
21
+ /** The headless response registry + default/close semantics + resolution (ADR 0004). */
22
+ private _model;
23
+ /** The rendered button per registered response id (the DOM half of the model). */
24
+ private readonly _buttons;
24
25
  private _blockCloseResponse;
25
26
  static get observedAttributes(): string[];
26
27
  /** The heading of the dialog. */
@@ -3,7 +3,8 @@ export declare class AdwComboRow extends HTMLElement {
3
3
  private _valueEl;
4
4
  private _titleEl;
5
5
  private _subtitleEl;
6
- private _items;
6
+ /** The headless options list + selectedIndex↔selectedValue state machine (ADR 0004). */
7
+ private readonly _state;
7
8
  private _initialized;
8
9
  static get observedAttributes(): string[];
9
10
  get selected(): number;
@@ -8,7 +8,10 @@ export declare class AdwExpanderRow extends HTMLElement {
8
8
  private _contentEl;
9
9
  private _prefixEl;
10
10
  private _suffixEl;
11
+ /** The headless expanded/collapsed disclosure state machine (ADR 0004). */
12
+ private readonly _state;
11
13
  private _initialized;
14
+ constructor();
12
15
  static get observedAttributes(): string[];
13
16
  get expanded(): boolean;
14
17
  set expanded(value: boolean);
@@ -21,6 +24,6 @@ export declare class AdwExpanderRow extends HTMLElement {
21
24
  /** The header prefix section — append icons/widgets here imperatively. */
22
25
  get prefixSection(): HTMLDivElement;
23
26
  connectedCallback(): void;
24
- attributeChangedCallback(): void;
27
+ attributeChangedCallback(name: string): void;
25
28
  private _render;
26
29
  }
@@ -2,10 +2,8 @@ export declare class AdwSpinRow extends HTMLElement {
2
2
  private _input;
3
3
  private _titleEl;
4
4
  private _subtitleEl;
5
- private _min;
6
- private _max;
7
- private _step;
8
- private _value;
5
+ /** The headless value/min/max/step adjustment with clamping (ADR 0004). */
6
+ private readonly _state;
9
7
  private _initialized;
10
8
  static get observedAttributes(): string[];
11
9
  get value(): number;
@@ -13,8 +11,12 @@ export declare class AdwSpinRow extends HTMLElement {
13
11
  connectedCallback(): void;
14
12
  attributeChangedCallback(name: string, _old: string | null, val: string | null): void;
15
13
  private _renderText;
14
+ /** A stepper press — the interactive path, so it emits `notify::value`. */
16
15
  private _adjust;
17
16
  private _emitChange;
17
+ /** Mirror the core value into the input display + the reflected attribute. */
18
+ private _syncValue;
19
+ private _roundToStep;
18
20
  private _countDecimals;
19
21
  private _formatValue;
20
22
  }
@@ -1,3 +1,6 @@
1
+ import { AdwToast } from '@gjsify/adwaita-core';
2
+ import type { ToastScheduler } from '@gjsify/adwaita-core';
3
+ export type { ToastScheduler, ToastTimerHandle } from '@gjsify/adwaita-core';
1
4
  /** Options for {@link AdwToastOverlay.addToast}, mirroring Adw.Toast's properties. */
2
5
  export interface AdwToastOptions {
3
6
  /** Seconds before the toast auto-dismisses; `0` keeps it until dismissed. Mirrors Adw.Toast:timeout (default 5). */
@@ -10,14 +13,52 @@ export interface AdwToastOptions {
10
13
  export declare class AdwToastOverlay extends HTMLElement {
11
14
  private _toasts;
12
15
  private _initialized;
16
+ /** The headless one-at-a-time + FIFO + auto-dismiss state machine (ADR 0004). */
17
+ private readonly _queue;
18
+ /** The timing source the queue's auto-dismiss runs on — swappable, see {@link scheduler}. */
19
+ private _scheduler;
20
+ /** The strip currently mounted for {@link AdwToastQueue.current}, if any. */
21
+ private _currentEl;
22
+ /** Per-toast action callbacks (the core toast descriptor carries only the label). */
23
+ private readonly _actions;
24
+ constructor();
13
25
  connectedCallback(): void;
26
+ /**
27
+ * The timing source driving the queue's auto-dismiss and the exit transition.
28
+ * Defaults to the browser's `setTimeout`/`clearTimeout`; swap it for a
29
+ * deterministic fake to drive toast lifetimes without real timers (the
30
+ * {@link ToastScheduler} seam `@gjsify/adwaita-core` defines).
31
+ */
32
+ get scheduler(): ToastScheduler;
33
+ set scheduler(scheduler: ToastScheduler);
34
+ /** The toast currently on screen, or `null` when nothing is shown. */
35
+ get currentToast(): AdwToast | null;
36
+ /** Number of toasts queued behind the visible one. */
37
+ get pendingToasts(): number;
14
38
  /**
15
39
  * Show a toast notification — the web equivalent of Adw.ToastOverlay.add_toast()
16
40
  * with a freshly-built Adw.Toast.
17
41
  *
42
+ * Like Adw.ToastOverlay, only ONE toast is visible at a time: this one shows
43
+ * immediately when the slot is free, otherwise it waits its turn behind the
44
+ * toasts already queued.
45
+ *
18
46
  * @param title The text to display.
19
- * @param options Either a timeout in seconds (legacy shorthand) or an
47
+ * @param options Either a timeout in milliseconds (legacy shorthand) or an
20
48
  * {@link AdwToastOptions} bag (title text already supplied here).
21
49
  */
22
50
  addToast(title: string, options?: number | AdwToastOptions): void;
51
+ /** Dismiss the visible toast early; the next queued toast takes its place. */
52
+ dismiss(): void;
53
+ /** Dismiss the visible toast and discard everything still queued behind it. */
54
+ clearToasts(): void;
55
+ /** Build + attach the strip for `toast` — the DOM half of the queue's `onShow`. */
56
+ private _mountToast;
57
+ /**
58
+ * Detach the mounted strip — the DOM half of the queue's `onHide`.
59
+ *
60
+ * @param immediate Skip the exit transition because the next queued toast is
61
+ * about to take this slot (keeps exactly one strip mounted).
62
+ */
63
+ private _unmountToast;
23
64
  }
@@ -5,7 +5,8 @@ export declare class AdwToggle extends HTMLElement {
5
5
  export declare class AdwToggleGroup extends HTMLElement {
6
6
  private _innerEl;
7
7
  private _buttons;
8
- private _active;
8
+ /** The headless segment list + guarded selection state machine (ADR 0004). */
9
+ private readonly _state;
9
10
  private _initialized;
10
11
  static get observedAttributes(): string[];
11
12
  /** Zero-based index of the active toggle. */
@@ -0,0 +1 @@
1
+ export declare const AdwStyleIsolationTest: () => Promise<void>;