@spartan-native/desktop-ui 0.0.0-stage → 0.2.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.
@@ -0,0 +1,2223 @@
1
+ import { MenuItem, MessageOptions, PlatformFamily, Skin } from "@spartan-native/theme";
2
+ import * as i0 from "@angular/core";
3
+ import { TemplateRef } from "@angular/core";
4
+ import { FocusableOption } from "@angular/cdk/a11y";
5
+ import { ConnectedPosition } from "@angular/cdk/overlay";
6
+ import { ControlValueAccessor } from "@angular/forms";
7
+ import * as i1 from "@angular/cdk/menu";
8
+ type WindowButton = 'minimize' | 'maximize' | 'close';
9
+ /**
10
+ * The window's own buttons, drawn the way the OS draws them:
11
+ * - Windows 11 (`win`): minimize / maximize / close caption buttons on the right; close turns red
12
+ * - Windows 10 (`w10`): the same caption buttons with square glyphs and the Windows 10 red
13
+ * - macOS 26 (`mac`) and macOS 13–15 (`macc`): the traffic lights (close / minimize / zoom);
14
+ * glyphs appear on hover; grey when the window is inactive
15
+ * - GNOME (`gtk`): a round close button, the GNOME default button layout (`linuxAll` adds the other two)
16
+ * - KDE Plasma (`qt`): Breeze buttons: chevron minimize / maximize and a close cross;
17
+ * a circle appears on hover, red for close
18
+ * - ChromeOS (`cros`): Material 3 round caption buttons
19
+ *
20
+ * Use it inside <sn-title-bar>, or on its own wherever your layout puts it
21
+ * (on macOS the lights often sit at the top of the sidebar).
22
+ *
23
+ * ```html
24
+ * <sn-window-controls /> <!-- in Wails, Tauri, … the buttons act on the real window -->
25
+ * <sn-window-controls [nativeActions]="false" (close)="confirmAndClose()" />
26
+ * ```
27
+ *
28
+ * With a host that owns a window (wailsHost(), …) the buttons minimize, maximize and close
29
+ * it, and the maximize glyph follows the real state. The outputs always fire too.
30
+ */
31
+ export declare class SnWindowControls {
32
+ /** Which buttons to show. Close is always shown. */
33
+ readonly buttons: import("@angular/core").InputSignal<readonly WindowButton[]>;
34
+ /** Show the restore glyph instead of maximize (all but macOS). */
35
+ readonly maximized: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
36
+ /** GNOME shows only close by default; set to show minimize and maximize too. */
37
+ readonly linuxAll: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
38
+ /** Act on the host's real window (when it has one). Default: true. */
39
+ readonly nativeActions: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
40
+ readonly minimize: import("@angular/core").OutputEmitterRef<void>;
41
+ readonly maximize: import("@angular/core").OutputEmitterRef<void>;
42
+ readonly close: import("@angular/core").OutputEmitterRef<void>;
43
+ protected readonly skin: import("@angular/core").Signal<Skin>;
44
+ protected readonly family: import("@angular/core").Signal<import("@spartan-native/theme").PlatformFamily>;
45
+ /** Which button set to draw. */
46
+ protected readonly look: import("@angular/core").Signal<"cros" | "windows" | "macos" | "gnome" | "kde">;
47
+ private readonly hostWindow;
48
+ private readonly hostMaximized;
49
+ protected readonly isMaximized: import("@angular/core").Signal<boolean>;
50
+ constructor();
51
+ protected act(action: WindowButton): void;
52
+ protected show(button: WindowButton): boolean;
53
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnWindowControls, never>;
54
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnWindowControls, "sn-window-controls", never, {
55
+ "buttons": {
56
+ "alias": "buttons";
57
+ "required": false;
58
+ "isSignal": true;
59
+ };
60
+ "maximized": {
61
+ "alias": "maximized";
62
+ "required": false;
63
+ "isSignal": true;
64
+ };
65
+ "linuxAll": {
66
+ "alias": "linuxAll";
67
+ "required": false;
68
+ "isSignal": true;
69
+ };
70
+ "nativeActions": {
71
+ "alias": "nativeActions";
72
+ "required": false;
73
+ "isSignal": true;
74
+ };
75
+ }, {
76
+ "minimize": "minimize";
77
+ "maximize": "maximize";
78
+ "close": "close";
79
+ }, never, never, true, never>;
80
+ }
81
+ /**
82
+ * A complete title bar, laid out the way each OS does it:
83
+ * - Windows 11 (`win`) / Windows 10 (`w10`): app icon and title on the left, caption buttons on the right
84
+ * - macOS 26 (`mac`): traffic lights on the left, title centered, a 38px unified bar
85
+ * - macOS 13–15 (`macc`): the classic 28px title bar, lights inset 8px, title centered
86
+ * - GNOME (`gtk`): an AdwHeaderBar, bold title centered, close button on the right
87
+ * - KDE Plasma (`qt`): the Breeze title bar: app icon on the left, title centered,
88
+ * minimize / maximize / close on the right
89
+ * - ChromeOS (`cros`): the caption bar: app icon and title on the left, round M3 caption buttons on the right
90
+ *
91
+ * The bar is a window drag region for Electron/Chromium (`app-region`), Wails
92
+ * (`--wails-draggable`) and Tauri (`data-tauri-drag-region`); buttons inside are not.
93
+ * It carries `sn-chrome`, so the theme dims it when the window is inactive.
94
+ *
95
+ * ```html
96
+ * <sn-title-bar title="Harbor Backup" (close)="host.close()">
97
+ * <img snTitleBarIcon src="icon.svg" alt="" />
98
+ * <button hlmBtn variant="ghost" snTitleBarEnd>…</button>
99
+ * </sn-title-bar>
100
+ * ```
101
+ *
102
+ * Set `windowControls="native"` when the OS draws its own buttons
103
+ * (Electron titleBarOverlay, Window Controls Overlay, a macOS hidden-inset title bar): space is
104
+ * left for them where the real OS puts them, so a Mac dressed as Windows keeps the room for its
105
+ * traffic lights at the start, and the layout of the rest follows the skin.
106
+ */
107
+ export declare class SnTitleBar {
108
+ /** The window title. */
109
+ readonly title: import("@angular/core").InputSignal<string>;
110
+ /** A second, smaller line under the title. */
111
+ readonly subtitle: import("@angular/core").InputSignal<string>;
112
+ /** `custom`: draw the window buttons · `native`: the OS draws them (leave space). */
113
+ readonly windowControls: import("@angular/core").InputSignal<"custom" | "native">;
114
+ /** Which window buttons to draw. Close is always drawn. */
115
+ readonly buttons: import("@angular/core").InputSignal<readonly WindowButton[]>;
116
+ /** Show the restore glyph instead of maximize. */
117
+ readonly maximized: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
118
+ readonly minimize: import("@angular/core").OutputEmitterRef<void>;
119
+ readonly maximize: import("@angular/core").OutputEmitterRef<void>;
120
+ readonly close: import("@angular/core").OutputEmitterRef<void>;
121
+ protected readonly skin: import("@angular/core").Signal<Skin>;
122
+ protected readonly family: import("@angular/core").Signal<import("@spartan-native/theme").PlatformFamily>;
123
+ /** The real OS's skin: where and how big its own window buttons are. */
124
+ protected readonly nativeSkin: import("@angular/core").Signal<Skin>;
125
+ protected readonly showIcon: import("@angular/core").Signal<boolean>;
126
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnTitleBar, never>;
127
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnTitleBar, "sn-title-bar", never, {
128
+ "title": {
129
+ "alias": "title";
130
+ "required": false;
131
+ "isSignal": true;
132
+ };
133
+ "subtitle": {
134
+ "alias": "subtitle";
135
+ "required": false;
136
+ "isSignal": true;
137
+ };
138
+ "windowControls": {
139
+ "alias": "windowControls";
140
+ "required": false;
141
+ "isSignal": true;
142
+ };
143
+ "buttons": {
144
+ "alias": "buttons";
145
+ "required": false;
146
+ "isSignal": true;
147
+ };
148
+ "maximized": {
149
+ "alias": "maximized";
150
+ "required": false;
151
+ "isSignal": true;
152
+ };
153
+ }, {
154
+ "minimize": "minimize";
155
+ "maximize": "maximize";
156
+ "close": "close";
157
+ }, never, ["[snTitleBarIcon]", "[snTitleBarStart]", "[snTitleBarEnd]"], true, never>;
158
+ }
159
+ /**
160
+ * One piece of information in an `<sn-status-bar>`: "4 items", "1 selected · 48 KB",
161
+ * "Last backup 09:12". The bar separates items the way the OS does (spacing on Windows 11,
162
+ * vertical rules on Windows 10 and KDE, commas on macOS).
163
+ *
164
+ * `live` makes a screen reader announce changes to this item (e.g. a progress message);
165
+ * leave it off for text that changes on every selection, so it doesn't interrupt.
166
+ */
167
+ export declare class SnStatusItem {
168
+ readonly live: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
169
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnStatusItem, never>;
170
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SnStatusItem, "[snStatusItem]", never, {
171
+ "live": {
172
+ "alias": "live";
173
+ "required": false;
174
+ "isSignal": true;
175
+ };
176
+ }, {}, never, never, true, never>;
177
+ }
178
+ /**
179
+ * The window's status bar, along the bottom edge:
180
+ * - Windows 11: File Explorer's status bar, small text, items spaced apart, no rules
181
+ * - Windows 10: the classic status bar, items divided by vertical rules
182
+ * - macOS 26 / 13–15: Finder's status bar, small centered text, items joined by commas
183
+ * - GNOME: a GtkActionBar at the bottom of an AdwToolbarView (start · end)
184
+ * - KDE: Dolphin's status bar, items divided by rules, extra controls (zoom, free space) at the end
185
+ * - ChromeOS: a slim M3 footer, muted label-medium text
186
+ *
187
+ * ```html
188
+ * <sn-status-bar>
189
+ * <span snStatusItem>4 items</span>
190
+ * <span snStatusItem>1 selected · 48 KB</span>
191
+ * <span snStatusItem snStatusBarEnd>1.2 TB free</span>
192
+ * </sn-status-bar>
193
+ * ```
194
+ *
195
+ * `[snStatusBarEnd]` items go to the trailing edge (on macOS they join the centered text).
196
+ * It carries `sn-chrome`, so the theme dims it when the window is inactive.
197
+ */
198
+ export declare class SnStatusBar {
199
+ /** Accessible name of the bar. */
200
+ readonly ariaLabel: import("@angular/core").InputSignal<string>;
201
+ protected readonly skin: import("@angular/core").Signal<import("@spartan-native/theme").Skin>;
202
+ protected readonly family: import("@angular/core").Signal<import("@spartan-native/theme").PlatformFamily>;
203
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnStatusBar, never>;
204
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnStatusBar, "sn-status-bar", never, {
205
+ "ariaLabel": {
206
+ "alias": "ariaLabel";
207
+ "required": false;
208
+ "isSignal": true;
209
+ };
210
+ }, {}, never, ["*", "[snStatusBarEnd]"], true, never>;
211
+ }
212
+ export declare const SnStatusBarImports: readonly [typeof SnStatusBar, typeof SnStatusItem];
213
+ /**
214
+ * A group of settings rows, drawn as each OS draws its settings:
215
+ * - Windows 11 (`win`): a stack of SettingsCards under a section title
216
+ * - Windows 10 (`w10`): the Settings app's plain list: a light heading, label above each control
217
+ * - macOS 26 (`mac`): a grouped Form section (small header above an inset rounded glass list)
218
+ * - macOS 13–15 (`macc`): the same section with the classic corner and vibrancy
219
+ * - GNOME (`gtk`): AdwPreferencesGroup (bold title above a boxed list)
220
+ * - KDE Plasma (`qt`): a Kirigami FormLayout (centered section title, "Label:" right-aligned
221
+ * in one column, controls in the next, help text under the control; icons hidden)
222
+ * - ChromeOS (`cros`): a Settings list (M3 list rows inside a tonal card)
223
+ *
224
+ * ```html
225
+ * <sn-settings-group title="Backups" description="Choose when and how backups run.">
226
+ * <sn-settings-row title="Automatic backups" subtitle="Run in the background">
227
+ * <hlm-switch [checked]="true" aria-label="Automatic backups" />
228
+ * </sn-settings-row>
229
+ * </sn-settings-group>
230
+ * ```
231
+ */
232
+ export declare class SnSettingsGroup {
233
+ /** The group heading (labels the group for assistive tech). */
234
+ readonly title: import("@angular/core").InputSignal<string>;
235
+ /** A line of explanation under the heading. */
236
+ readonly description: import("@angular/core").InputSignal<string>;
237
+ protected readonly headingId: string;
238
+ protected readonly skin: import("@angular/core").Signal<import("@spartan-native/theme").Skin>;
239
+ protected readonly family: import("@angular/core").Signal<import("@spartan-native/theme").PlatformFamily>;
240
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnSettingsGroup, never>;
241
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnSettingsGroup, "sn-settings-group", never, {
242
+ "title": {
243
+ "alias": "title";
244
+ "required": false;
245
+ "isSignal": true;
246
+ };
247
+ "description": {
248
+ "alias": "description";
249
+ "required": false;
250
+ "isSignal": true;
251
+ };
252
+ }, {}, never, ["*"], true, never>;
253
+ }
254
+ /**
255
+ * One setting: title, optional subtitle, and its control on the trailing side
256
+ * (Windows 10: below the label; KDE: in the FormLayout's control column).
257
+ * Put an icon in front with `snSettingsIcon` (hidden on Windows 10 and KDE, which don't use them).
258
+ */
259
+ export declare class SnSettingsRow {
260
+ /** The setting's name (on KDE: the FormLayout label). */
261
+ readonly title: import("@angular/core").InputSignal<string>;
262
+ /** Help text (on KDE: shown under the control). */
263
+ readonly subtitle: import("@angular/core").InputSignal<string>;
264
+ protected readonly skin: import("@angular/core").Signal<import("@spartan-native/theme").Skin>;
265
+ protected readonly family: import("@angular/core").Signal<import("@spartan-native/theme").PlatformFamily>;
266
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnSettingsRow, never>;
267
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnSettingsRow, "sn-settings-row", never, {
268
+ "title": {
269
+ "alias": "title";
270
+ "required": true;
271
+ "isSignal": true;
272
+ };
273
+ "subtitle": {
274
+ "alias": "subtitle";
275
+ "required": false;
276
+ "isSignal": true;
277
+ };
278
+ }, {}, never, ["[snSettingsIcon]", "*"], true, never>;
279
+ }
280
+ /**
281
+ * A full-page empty or status state:
282
+ * - Windows 11 (`win`) / Windows 10 (`w10`): a Fluent empty state (accent glyph in a tinted circle,
283
+ * subtitle-size title)
284
+ * - macOS 26 (`mac`) / macOS 13–15 (`macc`): ContentUnavailableView (medium grey icon, bold title)
285
+ * - GNOME (`gtk`): AdwStatusPage (128px faded icon, big heavy title, pill buttons)
286
+ * - KDE Plasma (`qt`): Kirigami PlaceholderMessage (faded 64px icon, muted level-2 heading)
287
+ * - ChromeOS (`cros`): the Material 3 empty state (icon in a primary-container circle, light headline)
288
+ *
289
+ * `icon` is an @ng-icons name the app has registered with provideIcons().
290
+ * Buttons go in the content.
291
+ *
292
+ * ```html
293
+ * <sn-status-page icon="lucideArchive" title="No backups yet" description="Add a destination to start protecting your files.">
294
+ * <button hlmBtn>Add destination</button>
295
+ * </sn-status-page>
296
+ * ```
297
+ */
298
+ export declare class SnStatusPage {
299
+ /** An @ng-icons name registered with provideIcons(). Leave empty for no icon. */
300
+ readonly icon: import("@angular/core").InputSignal<string>;
301
+ /** The headline. */
302
+ readonly title: import("@angular/core").InputSignal<string>;
303
+ /** A sentence that says what to do next. */
304
+ readonly description: import("@angular/core").InputSignal<string>;
305
+ protected readonly skin: import("@angular/core").Signal<import("@spartan-native/theme").Skin>;
306
+ protected readonly family: import("@angular/core").Signal<import("@spartan-native/theme").PlatformFamily>;
307
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnStatusPage, never>;
308
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnStatusPage, "sn-status-page", never, {
309
+ "icon": {
310
+ "alias": "icon";
311
+ "required": false;
312
+ "isSignal": true;
313
+ };
314
+ "title": {
315
+ "alias": "title";
316
+ "required": true;
317
+ "isSignal": true;
318
+ };
319
+ "description": {
320
+ "alias": "description";
321
+ "required": false;
322
+ "isSignal": true;
323
+ };
324
+ }, {}, never, ["*"], true, never>;
325
+ }
326
+ /**
327
+ * One entry of a desktop-ui menu: the host's plain `MenuItem`, plus the function to run.
328
+ * The same data feeds a native menu (the macOS menu bar, an OS context menu) and the
329
+ * in-page menu that stands in for it elsewhere.
330
+ *
331
+ * ```ts
332
+ * const menu: SnMenuItem[] = [
333
+ * { role: 'appMenu' },
334
+ * { label: 'File', submenu: [
335
+ * { label: 'New backup…', accelerator: 'mod+n', action: () => this.create() },
336
+ * { type: 'separator' },
337
+ * { role: 'close' },
338
+ * ]},
339
+ * { role: 'editMenu' },
340
+ * ];
341
+ * ```
342
+ */
343
+ interface SnMenuItem extends Omit<MenuItem, 'submenu'> {
344
+ /** Runs when the item is chosen (also from its accelerator in the in-page menubar). */
345
+ readonly action?: () => void;
346
+ readonly submenu?: readonly SnMenuItem[];
347
+ }
348
+ /** The window actions a role can fall back to in the page. */
349
+ interface SnMenuWindowActions {
350
+ minimize?(): void;
351
+ toggleMaximize?(): void;
352
+ close?(): void;
353
+ }
354
+ /**
355
+ * Converts to the host's plain data: every item with an `action` gets an `id` (its own, or a
356
+ * generated one), and `actions` maps the ids back to the items.
357
+ */
358
+ export declare function toHostMenu(items: readonly SnMenuItem[], actions?: Map<string, SnMenuItem>): {
359
+ menu: MenuItem[];
360
+ actions: Map<string, SnMenuItem>;
361
+ };
362
+ /** Drops separators at the edges and next to each other, and submenus left empty. */
363
+ export declare function tidyMenu(items: readonly SnMenuItem[]): SnMenuItem[];
364
+ /**
365
+ * Replaces roles with ordinary items for an in-page menu: Edit and Window submenus, edit
366
+ * commands on the focused field, the window actions through the host. Roles that have no
367
+ * meaning in a page (the macOS app menu, About without an action) are left out.
368
+ */
369
+ export declare function inPageMenu(items: readonly SnMenuItem[], family: PlatformFamily, window?: SnMenuWindowActions, run?: (command: EditCommand) => void): SnMenuItem[];
370
+ type EditCommand = 'undo' | 'redo' | 'cut' | 'copy' | 'paste' | 'selectAll';
371
+ /** Runs an edit command on the focused field, as the OS Edit menu would. */
372
+ export declare function runEditCommand(command: EditCommand): void;
373
+ /** Whether a key event is the accelerator (`mod` is ⌘ on macOS, Ctrl elsewhere). */
374
+ export declare function matchesAccelerator(event: KeyboardEvent, accelerator: string, family: PlatformFamily): boolean;
375
+ /** @internal The bubble. Styled by the theme, per skin, like hlmTooltip (data-slot="sn-tooltip"). */
376
+ export declare class SnTooltipPanel {
377
+ readonly text: import("@angular/core").WritableSignal<string>;
378
+ protected readonly skin: import("@angular/core").Signal<import("@spartan-native/theme").Skin>;
379
+ protected readonly family: import("@angular/core").Signal<import("@spartan-native/theme").PlatformFamily>;
380
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnTooltipPanel, never>;
381
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnTooltipPanel, "sn-tooltip-panel", never, {}, {}, never, never, true, never>;
382
+ }
383
+ /**
384
+ * A short label that shows when the pointer rests on an element, or when it gets the keyboard
385
+ * focus, drawn the way the active skin draws tooltips (a light card on Windows 11 and macOS, an
386
+ * inverse bubble on GNOME, a framed surface on KDE, an M3 plain tooltip on ChromeOS).
387
+ *
388
+ * The text is a visual hint only (the bubble is `aria-hidden`): give the element its own
389
+ * accessible name. Esc and a click hide it. An empty text shows nothing.
390
+ *
391
+ * ```html
392
+ * <button hlmBtn size="icon" aria-label="Refresh" snTooltip="Refresh">…</button>
393
+ * ```
394
+ */
395
+ export declare class SnTooltip {
396
+ /** The text. Empty: no tooltip. */
397
+ readonly snTooltip: import("@angular/core").InputSignal<string>;
398
+ readonly snTooltipDisabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
399
+ /** Set by components that own the tooltip (e.g. snCommand); wins over the input. */
400
+ readonly text: import("@angular/core").WritableSignal<string | null>;
401
+ private readonly shown;
402
+ private readonly element;
403
+ private readonly injector;
404
+ private readonly modality;
405
+ private overlay;
406
+ private panel;
407
+ private timer;
408
+ constructor();
409
+ protected onPointerEnter(event: PointerEvent): void;
410
+ /** Keyboard focus shows it at once; a click's focus doesn't. */
411
+ protected onFocus(): void;
412
+ private schedule;
413
+ /** Shows the tooltip now (no delay). */
414
+ show(): void;
415
+ /** Hides the tooltip and cancels a pending one. */
416
+ hide(): void;
417
+ private clearTimer;
418
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnTooltip, never>;
419
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SnTooltip, "[snTooltip]", never, {
420
+ "snTooltip": {
421
+ "alias": "snTooltip";
422
+ "required": false;
423
+ "isSignal": true;
424
+ };
425
+ "snTooltipDisabled": {
426
+ "alias": "snTooltipDisabled";
427
+ "required": false;
428
+ "isSignal": true;
429
+ };
430
+ }, {}, never, never, true, never>;
431
+ }
432
+ /** Where the title sits: the skin's own place, or forced to the start or the center. */
433
+ type SnCommandBarTitlePosition = 'auto' | 'start' | 'center';
434
+ /**
435
+ * What the bar does when it is too narrow: `auto` first drops the labels (on skins that show
436
+ * them), then moves commands into the overflow menu, lowest `priority` first; `none` does neither.
437
+ */
438
+ type SnCommandBarCollapse = 'auto' | 'none';
439
+ /**
440
+ * The secondary commands as your own menu, shown by the bar's overflow button (Windows `…`,
441
+ * macOS `…`, GNOME/KDE menu button, ChromeOS `⋮`). Put a stock menu inside, e.g. hlmDropdownMenu:
442
+ *
443
+ * ```html
444
+ * <ng-template snCommandOverflow>
445
+ * <div hlmDropdownMenu>
446
+ * <button hlmDropdownMenuItem>Rename</button>
447
+ * </div>
448
+ * </ng-template>
449
+ * ```
450
+ *
451
+ * It is used while the bar has nothing of its own to put in the menu. Once commands collapse
452
+ * into the overflow (or are `secondary`, or `overflowItems` is set), the bar draws the menu
453
+ * itself: prefer `secondary` commands and `overflowItems` with a collapsing bar.
454
+ */
455
+ export declare class SnCommandOverflow {
456
+ readonly template: TemplateRef<any>;
457
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnCommandOverflow, never>;
458
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SnCommandOverflow, "ng-template[snCommandOverflow]", never, {}, {}, never, never, true, never>;
459
+ }
460
+ /**
461
+ * The current page's own commands, for a shell whose single command bar is shared by every
462
+ * page. A page declares them with `<ng-template snPageCommands>`; the shell's bar shows them
463
+ * after its own:
464
+ *
465
+ * ```html
466
+ * <!-- the shell -->
467
+ * <sn-command-bar [title]="title()" [commands]="pageCommands.template()">…</sn-command-bar>
468
+ *
469
+ * <!-- a page -->
470
+ * <ng-template snPageCommands>
471
+ * <button snCommand icon="lucideRefreshCw" label="Refresh" (click)="reload()"></button>
472
+ * </ng-template>
473
+ * ```
474
+ *
475
+ * The commands keep the page's context, so its bindings and handlers work as written. They go
476
+ * away with the page. One set at a time: a page that opens later replaces the earlier one's.
477
+ */
478
+ export declare class SnPageCommands {
479
+ /** The current page's commands; null when the page has none. */
480
+ readonly template: import("@angular/core").WritableSignal<TemplateRef<unknown> | null>;
481
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnPageCommands, never>;
482
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
483
+ }
484
+ /** Declares the current page's commands; see `SnPageCommands`. */
485
+ export declare class SnPageCommandsTemplate {
486
+ constructor();
487
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnPageCommandsTemplate, never>;
488
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SnPageCommandsTemplate, "ng-template[snPageCommands]", never, {}, {}, never, never, true, never>;
489
+ }
490
+ /**
491
+ * A group of commands that belong together: on macOS 26 each group is its own Liquid Glass
492
+ * capsule, elsewhere groups are divided by a separator (Windows, GNOME, KDE) or a gap (ChromeOS).
493
+ *
494
+ * ```html
495
+ * <sn-command-group label="History">
496
+ * <button snCommand icon="lucideUndo2" label="Undo"></button>
497
+ * <button snCommand icon="lucideRedo2" label="Redo"></button>
498
+ * </sn-command-group>
499
+ * ```
500
+ */
501
+ export declare class SnCommandGroup {
502
+ /** Accessible name of the group. */
503
+ readonly label: import("@angular/core").InputSignal<string>;
504
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnCommandGroup, never>;
505
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnCommandGroup, "sn-command-group", never, {
506
+ "label": {
507
+ "alias": "label";
508
+ "required": false;
509
+ "isSignal": true;
510
+ };
511
+ }, {}, never, ["*"], true, never>;
512
+ }
513
+ /**
514
+ * One command in an `<sn-command-bar>`: an icon and a label.
515
+ * The label is visible on Windows and KDE; on macOS, GNOME and ChromeOS the command is
516
+ * icon-only, the label stays as its accessible name and shows as the skin's tooltip.
517
+ * Without `icon`, project your own `<svg>`/`<ng-icon>`, or none (then the label always shows).
518
+ *
519
+ * When the bar runs out of room, commands move into its overflow menu, lowest `priority` first.
520
+ * `secondary` commands always live there.
521
+ */
522
+ export declare class SnCommand implements FocusableOption {
523
+ readonly icon: import("@angular/core").InputSignal<string>;
524
+ readonly label: import("@angular/core").InputSignal<string>;
525
+ readonly isDisabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
526
+ /** Show only the icon on every OS (the label stays as accessible name and tooltip). */
527
+ readonly hideLabel: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
528
+ /** `accent`: the window's main action, filled with the accent color (Fluent accent, macOS prominent). */
529
+ readonly variant: import("@angular/core").InputSignal<"default" | "accent">;
530
+ /** Commands with a lower priority move into the overflow menu first. Default: 0. */
531
+ readonly priority: import("@angular/core").InputSignalWithTransform<number, unknown>;
532
+ /** Always in the overflow menu, never in the bar (WinUI secondary commands). */
533
+ readonly secondary: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
534
+ /** Set by the bar: the one command in the tab order (roving tabindex). */
535
+ readonly tabbable: import("@angular/core").WritableSignal<boolean>;
536
+ /** Set by the bar: in the overflow menu instead of the bar. */
537
+ readonly collapsed: import("@angular/core").WritableSignal<boolean>;
538
+ readonly element: HTMLButtonElement;
539
+ private readonly bar;
540
+ protected readonly iconOnly: import("@angular/core").Signal<boolean>;
541
+ constructor();
542
+ /** For the key manager: collapsed commands are skipped like disabled ones. */
543
+ get disabled(): boolean;
544
+ focus(): void;
545
+ /** @internal Moves the command into (or out of) the overflow menu, right away in the DOM so the bar can measure. */
546
+ setCollapsed(collapsed: boolean): void;
547
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnCommand, never>;
548
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnCommand, "button[snCommand]", never, {
549
+ "icon": {
550
+ "alias": "icon";
551
+ "required": false;
552
+ "isSignal": true;
553
+ };
554
+ "label": {
555
+ "alias": "label";
556
+ "required": true;
557
+ "isSignal": true;
558
+ };
559
+ "isDisabled": {
560
+ "alias": "disabled";
561
+ "required": false;
562
+ "isSignal": true;
563
+ };
564
+ "hideLabel": {
565
+ "alias": "hideLabel";
566
+ "required": false;
567
+ "isSignal": true;
568
+ };
569
+ "variant": {
570
+ "alias": "variant";
571
+ "required": false;
572
+ "isSignal": true;
573
+ };
574
+ "priority": {
575
+ "alias": "priority";
576
+ "required": false;
577
+ "isSignal": true;
578
+ };
579
+ "secondary": {
580
+ "alias": "secondary";
581
+ "required": false;
582
+ "isSignal": true;
583
+ };
584
+ }, {}, never, ["*"], true, [{
585
+ directive: typeof SnTooltip;
586
+ inputs: {};
587
+ outputs: {};
588
+ }]>;
589
+ }
590
+ /**
591
+ * The window's command surface, with the same markup on every OS:
592
+ * - Windows 11: a CommandBar, title left, commands right with the label beside the icon, `…` overflow
593
+ * - Windows 10: the same, labels under the icons, square
594
+ * - macOS 26: a unified toolbar, title left, icon-only commands in Liquid Glass capsules (macOS 13–15: plain bezels)
595
+ * - GNOME: an AdwHeaderBar, commands at the start, title centered, menu button at the end
596
+ * - KDE: a KToolBar, title then commands with text beside the icon, menu button at the end
597
+ * - ChromeOS: an M3 top app bar, title left, round icon actions right, `⋮` overflow
598
+ *
599
+ * The title is a heading (`headingLevel`, default 1) and goes where the skin puts it, or where
600
+ * `titlePosition` says. A centered title stays centered while it fits and moves aside instead
601
+ * of running under the commands.
602
+ *
603
+ * The commands form one `role="toolbar"`: Tab enters it once, ← → Home End move between
604
+ * commands (disabled ones are skipped), ↓ or Enter on the overflow button opens its menu.
605
+ * When the bar is too narrow, labels drop first (Windows, KDE), then commands move into the
606
+ * overflow menu by `priority`.
607
+ *
608
+ * ```html
609
+ * <sn-command-bar title="Documents">
610
+ * <button snCommand icon="lucidePlus" label="New" variant="accent" (click)="create()"></button>
611
+ * <sn-command-group label="Selection">
612
+ * <button snCommand icon="lucideShare2" label="Share" priority="1"></button>
613
+ * <button snCommand icon="lucideTrash2" label="Delete" [disabled]="!selection()"></button>
614
+ * </sn-command-group>
615
+ * <button snCommand icon="lucidePencil" label="Rename" secondary></button>
616
+ * </sn-command-bar>
617
+ * ```
618
+ *
619
+ * Commands declared elsewhere (a page's commands shown by the shell's bar): pass them as a
620
+ * template, `<sn-command-bar [commands]="page.commands()">`. Commands in it work exactly like
621
+ * projected ones. `SnPageCommands` and `<ng-template snPageCommands>` do the plumbing.
622
+ *
623
+ * Extra content: `[snCommandBarStart]` (e.g. a back button, or the window controls when the
624
+ * bar is the title bar) and `[snCommandBarEnd]` (e.g. a search field). It carries `sn-chrome`,
625
+ * so the theme dims it when the window is inactive.
626
+ */
627
+ export declare class SnCommandBar {
628
+ readonly title: import("@angular/core").InputSignal<string>;
629
+ /** Where the title goes. `auto`: the skin's place (centered on GNOME, at the start elsewhere). */
630
+ readonly titlePosition: import("@angular/core").InputSignal<SnCommandBarTitlePosition>;
631
+ /** The title's heading level (`role="heading"`). 0: not a heading. Default: 1. */
632
+ readonly headingLevel: import("@angular/core").InputSignalWithTransform<number, unknown>;
633
+ /** Accessible name of the toolbar; defaults to `title`. */
634
+ readonly ariaLabel: import("@angular/core").InputSignal<string>;
635
+ /** Accessible name and tooltip of the overflow button. */
636
+ readonly overflowLabel: import("@angular/core").InputSignal<string>;
637
+ /** Commands declared somewhere else, e.g. by the current page. Rendered after the projected ones. */
638
+ readonly commands: import("@angular/core").InputSignal<TemplateRef<unknown> | null>;
639
+ /** More entries for the overflow menu, after the collapsed and secondary commands. */
640
+ readonly overflowItems: import("@angular/core").InputSignal<readonly SnMenuItem[]>;
641
+ /** What happens when the bar is too narrow. Default: `auto`. */
642
+ readonly collapse: import("@angular/core").InputSignal<SnCommandBarCollapse>;
643
+ protected readonly skin: import("@angular/core").Signal<Skin>;
644
+ protected readonly family: import("@angular/core").Signal<import("@spartan-native/theme").PlatformFamily>;
645
+ /** The real OS: how shortcuts in the overflow menu are written. */
646
+ protected readonly platform: import("@angular/core").Signal<import("@spartan-native/theme").PlatformFamily>;
647
+ private readonly layout;
648
+ /** macOS, GNOME, ChromeOS: commands show only their icon. */
649
+ readonly iconOnly: import("@angular/core").Signal<boolean>;
650
+ /** The bar dropped the labels to make room. */
651
+ readonly compact: import("@angular/core").WritableSignal<boolean>;
652
+ protected readonly resolvedTitlePosition: import("@angular/core").Signal<"center" | "start">;
653
+ /** GNOME puts the commands at the start of the header bar, before the title. */
654
+ protected readonly commandsLead: import("@angular/core").Signal<boolean>;
655
+ protected readonly moreGlyph: import("@angular/core").Signal<"menu" | "dots" | "vertical">;
656
+ protected readonly overflow: import("@angular/core").Signal<SnCommandOverflow | undefined>;
657
+ protected readonly menuPosition: ConnectedPosition[];
658
+ protected readonly commandInjector: import("@angular/core").DestroyableInjector;
659
+ private readonly host;
660
+ private readonly destroyRef;
661
+ private readonly titleEl;
662
+ private readonly more;
663
+ private readonly registered;
664
+ /**
665
+ * Every command in document order: projected, grouped, from `[commands]`, and the overflow
666
+ * button (it is a command too).
667
+ */
668
+ private readonly ordered;
669
+ /** The commands currently in the overflow menu, in document order. */
670
+ private readonly collapsedCommands;
671
+ /** The overflow menu the bar draws: collapsed and secondary commands, then `overflowItems`. */
672
+ protected readonly menuItems: import("@angular/core").Signal<SnMenuItem[]>;
673
+ /** The view exists, so fit() can measure it. */
674
+ private rendered;
675
+ /** Bumped after each fit: which commands are hidden changed. */
676
+ private readonly fitted;
677
+ private readonly active;
678
+ private readonly keys;
679
+ constructor();
680
+ /** @internal */
681
+ register(command: SnCommand): void;
682
+ /** @internal */
683
+ unregister(command: SnCommand): void;
684
+ /** Roving tabindex: the last focused command, or else the first enabled one, is the only tab stop. */
685
+ private keepOneTabStop;
686
+ /** Commands register in creation order; keep them in document order, whichever template they came from. */
687
+ private keepDocumentOrder;
688
+ /** Fit again whenever an input that changes the bar's content width changes. */
689
+ private refitWhenContentChanges;
690
+ /** Fit again when the bar's own width changes. */
691
+ private refitWhenResized;
692
+ /** Text gets wider when a web font arrives, without the bar changing size: fit again then. */
693
+ private refitWhenFontsLoad;
694
+ /** Drops labels and collapses commands until the bar fits. See fitCommandBar(). */
695
+ private fit;
696
+ protected onKeydown(event: KeyboardEvent): void;
697
+ protected onFocusin(event: FocusEvent): void;
698
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnCommandBar, never>;
699
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnCommandBar, "sn-command-bar", never, {
700
+ "title": {
701
+ "alias": "title";
702
+ "required": false;
703
+ "isSignal": true;
704
+ };
705
+ "titlePosition": {
706
+ "alias": "titlePosition";
707
+ "required": false;
708
+ "isSignal": true;
709
+ };
710
+ "headingLevel": {
711
+ "alias": "headingLevel";
712
+ "required": false;
713
+ "isSignal": true;
714
+ };
715
+ "ariaLabel": {
716
+ "alias": "ariaLabel";
717
+ "required": false;
718
+ "isSignal": true;
719
+ };
720
+ "overflowLabel": {
721
+ "alias": "overflowLabel";
722
+ "required": false;
723
+ "isSignal": true;
724
+ };
725
+ "commands": {
726
+ "alias": "commands";
727
+ "required": false;
728
+ "isSignal": true;
729
+ };
730
+ "overflowItems": {
731
+ "alias": "overflowItems";
732
+ "required": false;
733
+ "isSignal": true;
734
+ };
735
+ "collapse": {
736
+ "alias": "collapse";
737
+ "required": false;
738
+ "isSignal": true;
739
+ };
740
+ }, {}, ["overflow"], ["[snCommandBarStart]", "[snCommandBarEnd]", "*"], true, never>;
741
+ }
742
+ export declare const SnCommandBarImports: readonly [typeof SnCommandBar, typeof SnCommand, typeof SnCommandGroup, typeof SnCommandOverflow, typeof SnPageCommandsTemplate];
743
+ /** The side of the anchor the coach mark prefers. It flips to the opposite side when there is no room. */
744
+ type CoachMarkPlacement = 'top' | 'bottom' | 'start' | 'end';
745
+ /** The physical side of the anchor the coach mark ended up on (the beak points back at the anchor). */
746
+ type CoachMarkSide = 'top' | 'bottom' | 'left' | 'right';
747
+ /**
748
+ * An anchored, non-modal teaching popup: title, body, an optional icon or hero image,
749
+ * a close button and action buttons.
750
+ * - Windows 11 / 10: TeachingTip (native): acrylic card with a tail, stretched buttons, primary first
751
+ * - macOS 26 / 13–15: NSPopover: glass popover with an arrow, buttons right-aligned, primary last
752
+ * - GNOME: GtkPopover: opaque rounded popover with an arrow, buttons at the end
753
+ * - KDE Plasma: Kirigami popup: Breeze frame, no arrow, primary first
754
+ * - ChromeOS: Material 3 rich tooltip: tonal container, no arrow, text buttons at the start
755
+ *
756
+ * Anchor it with `[snCoachMarkFor]`. Write the actions secondary first, primary last
757
+ * (the order macOS, GNOME and ChromeOS use); Windows and KDE show them reversed. It doesn't take focus when it opens,
758
+ * but it is placed right after the anchor in the tab order; Esc closes it and returns focus to the anchor.
759
+ *
760
+ * ```html
761
+ * <button hlmBtn [snCoachMarkFor]="tip" (click)="tip.toggle()">Sync</button>
762
+ * <sn-coach-mark #tip title="Sync across devices" [(open)]="showTip">
763
+ * Turn on sync to keep your backups available on every device you sign in to.
764
+ * <button snCoachMarkAction hlmBtn variant="secondary" (click)="tip.hide()">Not now</button>
765
+ * <button snCoachMarkAction hlmBtn (click)="turnOnSync()">Turn on</button>
766
+ * </sn-coach-mark>
767
+ * ```
768
+ *
769
+ * The host gets `data-placed` once the overlay has positioned it, and `data-side` with the side it landed on.
770
+ */
771
+ export declare class SnCoachMark {
772
+ readonly title: import("@angular/core").InputSignal<string>;
773
+ /** An @ng-icons name the app has registered, shown before the title. */
774
+ readonly icon: import("@angular/core").InputSignal<string>;
775
+ readonly placement: import("@angular/core").InputSignal<CoachMarkPlacement>;
776
+ readonly closeLabel: import("@angular/core").InputSignal<string>;
777
+ readonly open: import("@angular/core").ModelSignal<boolean>;
778
+ /** Set by `[snCoachMarkFor]`. */
779
+ readonly anchor: import("@angular/core").WritableSignal<HTMLElement | null>;
780
+ protected readonly skin: import("@angular/core").Signal<import("@spartan-native/theme").Skin>;
781
+ protected readonly family: import("@angular/core").Signal<import("@spartan-native/theme").PlatformFamily>;
782
+ protected readonly titleId: string;
783
+ readonly bodyId: string;
784
+ private readonly host;
785
+ private readonly document;
786
+ private readonly injector;
787
+ private overlay?;
788
+ private strategy?;
789
+ private overlayAnchor?;
790
+ constructor();
791
+ show(): void;
792
+ hide(): void;
793
+ toggle(): void;
794
+ protected onEscape(event: Event): void;
795
+ private attach;
796
+ private detach;
797
+ /** After each positioning: which side it landed on and where the beak points. */
798
+ private placed;
799
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnCoachMark, never>;
800
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnCoachMark, "sn-coach-mark", never, {
801
+ "title": {
802
+ "alias": "title";
803
+ "required": true;
804
+ "isSignal": true;
805
+ };
806
+ "icon": {
807
+ "alias": "icon";
808
+ "required": false;
809
+ "isSignal": true;
810
+ };
811
+ "placement": {
812
+ "alias": "placement";
813
+ "required": false;
814
+ "isSignal": true;
815
+ };
816
+ "closeLabel": {
817
+ "alias": "closeLabel";
818
+ "required": false;
819
+ "isSignal": true;
820
+ };
821
+ "open": {
822
+ "alias": "open";
823
+ "required": false;
824
+ "isSignal": true;
825
+ };
826
+ }, {
827
+ "open": "openChange";
828
+ }, never, ["[snCoachMarkHero]", "*", "[snCoachMarkAction]"], true, never>;
829
+ }
830
+ /**
831
+ * Anchors a `<sn-coach-mark>` to this element. Esc on the anchor closes the open coach mark,
832
+ * and the anchor is described by the coach mark while it is open.
833
+ */
834
+ export declare class SnCoachMarkFor {
835
+ readonly snCoachMarkFor: import("@angular/core").InputSignal<SnCoachMark>;
836
+ constructor();
837
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnCoachMarkFor, never>;
838
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SnCoachMarkFor, "[snCoachMarkFor]", never, {
839
+ "snCoachMarkFor": {
840
+ "alias": "snCoachMarkFor";
841
+ "required": true;
842
+ "isSignal": true;
843
+ };
844
+ }, {}, never, never, true, never>;
845
+ }
846
+ export declare const SnCoachMarkImports: readonly [typeof SnCoachMark, typeof SnCoachMarkFor];
847
+ /**
848
+ * A modal form whose layout follows the OS:
849
+ * - macOS: a sheet that slides down from under the window's title bar, no title bar of its own,
850
+ * buttons bottom-right with the default button rightmost
851
+ * - Windows: a ContentDialog, centered over a smoke backdrop, title top-left, buttons in a footer
852
+ * band (primary first, buttons share the width)
853
+ * - GNOME: an AdwDialog, Cancel and the primary button in a header bar around a centered title, no footer
854
+ * - KDE: a window-modal QDialog with a frame and a title strip, buttons bottom-right (primary, then Cancel)
855
+ * - ChromeOS: a Material 3 dialog, large corners, headline, actions at the bottom end
856
+ *
857
+ * Mark the buttons with `snSheetCancel` and `snSheetPrimary` so they can be placed per OS.
858
+ * Esc and the Cancel button close the sheet (`open` becomes false); the primary button is yours to handle.
859
+ * A third button that doesn't close the sheet (Back, Don't Save, Help) goes in `snSheetSecondary`:
860
+ * at the leading edge on macOS, KDE and ChromeOS, between primary and Cancel on Windows, and in
861
+ * a row under the content on GNOME.
862
+ * On macOS the sheet hangs from the title bar of the nearest ancestor marked `snSheetHost`
863
+ * (the window frame); without one it hangs from the top of the viewport.
864
+ *
865
+ * ```html
866
+ * <div class="sn-window" snSheetHost>
867
+ * <sn-title-bar title="Harbor Backup" />
868
+ * <sn-modal-sheet [(open)]="adding" title="New destination">
869
+ * <label hlmLabel>Name <input hlmInput /></label>
870
+ * <button hlmBtn variant="outline" snSheetCancel>Cancel</button>
871
+ * <button hlmBtn variant="outline" snSheetSecondary (click)="back()">Back</button>
872
+ * <button hlmBtn snSheetPrimary (click)="create()">Create</button>
873
+ * </sn-modal-sheet>
874
+ * </div>
875
+ * ```
876
+ */
877
+ export declare class SnModalSheet {
878
+ readonly open: import("@angular/core").ModelSignal<boolean>;
879
+ readonly title: import("@angular/core").InputSignal<string>;
880
+ /** Use `alertdialog` for confirmations (e.g. a destructive action). */
881
+ readonly role: import("@angular/core").InputSignal<"dialog" | "alertdialog">;
882
+ protected readonly skin: import("@angular/core").Signal<import("@spartan-native/theme").Skin>;
883
+ protected readonly family: import("@angular/core").Signal<import("@spartan-native/theme").PlatformFamily>;
884
+ protected readonly titleId: string;
885
+ private readonly panel;
886
+ private readonly dialog;
887
+ private readonly injector;
888
+ private readonly host;
889
+ private ref?;
890
+ constructor();
891
+ private show;
892
+ /** The viewport y where a macOS sheet hangs from: the host window's title bar, else its top edge. */
893
+ private sheetTop;
894
+ private position;
895
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnModalSheet, never>;
896
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnModalSheet, "sn-modal-sheet", never, {
897
+ "open": {
898
+ "alias": "open";
899
+ "required": false;
900
+ "isSignal": true;
901
+ };
902
+ "title": {
903
+ "alias": "title";
904
+ "required": true;
905
+ "isSignal": true;
906
+ };
907
+ "role": {
908
+ "alias": "role";
909
+ "required": false;
910
+ "isSignal": true;
911
+ };
912
+ }, {
913
+ "open": "openChange";
914
+ }, never, ["*", "[snSheetSecondary]", "[snSheetCancel]", "[snSheetPrimary]"], true, never>;
915
+ }
916
+ /** The words of `SnAlert.confirm()`. */
917
+ interface SnConfirmOptions {
918
+ /** A short heading; the message goes under it. */
919
+ readonly title?: string;
920
+ /** Default: `'question'`. */
921
+ readonly kind?: MessageOptions['kind'];
922
+ /** The button that confirms. Default: "OK". Say what it does ("Send", "Delete") where you can. */
923
+ readonly confirmLabel?: string;
924
+ /** Default: "Cancel". */
925
+ readonly cancelLabel?: string;
926
+ }
927
+ /**
928
+ * Alerts and confirmations, native where the host can draw them. The host's alert
929
+ * (`NativeHost.dialogs.message`) is used when there is one: the real NSAlert, TaskDialog or
930
+ * AdwAlertDialog. Otherwise, in the browser and on hosts without one, an in-page
931
+ * `alertdialog` sheet in the skin's dialog layout. Either way you get the same answer:
932
+ *
933
+ * ```ts
934
+ * private readonly alert = inject(SnAlert);
935
+ *
936
+ * async remove() {
937
+ * if (!(await this.alert.confirm('Delete “Q3 report.pdf”?', { confirmLabel: 'Delete', kind: 'warning' }))) return;
938
+ * …
939
+ * }
940
+ *
941
+ * const answer = await this.alert.show({
942
+ * kind: 'warning',
943
+ * message: 'Save changes to “Report.md”?',
944
+ * buttons: [{ id: 'save', label: 'Save' }, { id: 'discard', label: "Don't Save" }, { id: 'cancel', label: 'Cancel' }],
945
+ * defaultId: 'save',
946
+ * cancelId: 'cancel',
947
+ * });
948
+ * ```
949
+ *
950
+ * In the in-page sheet, Enter presses the default button (`defaultId`, else the first button
951
+ * that isn't Cancel) and Esc presses `cancelId`. On macOS it hangs from the window marked
952
+ * `snSheetHost`, like `<sn-modal-sheet>`.
953
+ */
954
+ export declare class SnAlert {
955
+ private readonly host;
956
+ private readonly appRef;
957
+ private readonly environmentInjector;
958
+ private readonly document;
959
+ /**
960
+ * Shows the alert and resolves the id of the pressed button: `cancelId` when it was dismissed
961
+ * (Esc, the window's close button), or null when there is no `cancelId`.
962
+ */
963
+ show(options: MessageOptions): Promise<string | null>;
964
+ /** "Are you sure?": true when the user pressed the confirm button. */
965
+ confirm(message: string, options?: SnConfirmOptions): Promise<boolean>;
966
+ private inPage;
967
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnAlert, never>;
968
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
969
+ }
970
+ /**
971
+ * Lays out the main content with an `<sn-inspector>` on the trailing side. Below 40rem of
972
+ * width the inspector floats over the content instead of squeezing it (AdwOverlaySplitView).
973
+ *
974
+ * ```html
975
+ * <sn-inspector-layout>
976
+ * <div snSelectable [(selection)]="selected">…</div>
977
+ * <sn-inspector [(open)]="infoOpen" [title]="file().name" icon="lucideFileText">…</sn-inspector>
978
+ * </sn-inspector-layout>
979
+ * ```
980
+ */
981
+ export declare class SnInspectorLayout {
982
+ protected readonly skin: import("@angular/core").Signal<import("@spartan-native/theme").Skin>;
983
+ protected readonly family: import("@angular/core").Signal<import("@spartan-native/theme").PlatformFamily>;
984
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnInspectorLayout, never>;
985
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnInspectorLayout, "sn-inspector-layout", never, {}, {}, never, ["*", "sn-inspector"], true, never>;
986
+ }
987
+ /**
988
+ * The detail side panel for the current selection:
989
+ * - macOS: Inspector, a glass trailing column with section headers (floating on macOS 26)
990
+ * - Windows: SplitView pane on the trailing side with a stroke divider
991
+ * - GNOME: AdwOverlaySplitView sidebar (sidebar color, header-bar title; overlays on narrow widths)
992
+ * - KDE: Dolphin information panel, big preview icon on top, then the properties
993
+ * - ChromeOS: Material 3 side sheet with a headline and a close button
994
+ *
995
+ * `icon` is an @ng-icons name the app registered with provideIcons(). Hidden while `open` is false.
996
+ *
997
+ * ```html
998
+ * <sn-inspector [(open)]="infoOpen" title="Q3 report.pdf" icon="lucideFileText">
999
+ * <sn-inspector-section title="General">
1000
+ * <sn-inspector-property label="Kind">PDF document</sn-inspector-property>
1001
+ * <sn-inspector-property label="Size">2.4 MB</sn-inspector-property>
1002
+ * </sn-inspector-section>
1003
+ * </sn-inspector>
1004
+ * ```
1005
+ */
1006
+ export declare class SnInspector {
1007
+ /** Shown or hidden. Two-way bindable; the ChromeOS close button sets it to false. */
1008
+ readonly open: import("@angular/core").ModelSignal<boolean>;
1009
+ /** The panel's heading, usually the selected item's name; also its accessible name. */
1010
+ readonly title: import("@angular/core").InputSignal<string>;
1011
+ /** Preview icon above (KDE) or next to the title. */
1012
+ readonly icon: import("@angular/core").InputSignal<string>;
1013
+ protected readonly headingId: string;
1014
+ protected readonly skin: import("@angular/core").Signal<import("@spartan-native/theme").Skin>;
1015
+ protected readonly family: import("@angular/core").Signal<import("@spartan-native/theme").PlatformFamily>;
1016
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnInspector, never>;
1017
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnInspector, "sn-inspector", never, {
1018
+ "open": {
1019
+ "alias": "open";
1020
+ "required": false;
1021
+ "isSignal": true;
1022
+ };
1023
+ "title": {
1024
+ "alias": "title";
1025
+ "required": true;
1026
+ "isSignal": true;
1027
+ };
1028
+ "icon": {
1029
+ "alias": "icon";
1030
+ "required": false;
1031
+ "isSignal": true;
1032
+ };
1033
+ }, {
1034
+ "open": "openChange";
1035
+ }, never, ["*"], true, never>;
1036
+ }
1037
+ /** A titled group of properties or controls inside the inspector ("General", "Sharing", …). */
1038
+ export declare class SnInspectorSection {
1039
+ readonly title: import("@angular/core").InputSignal<string>;
1040
+ protected readonly headingId: string;
1041
+ protected readonly skin: import("@angular/core").Signal<import("@spartan-native/theme").Skin>;
1042
+ protected readonly family: import("@angular/core").Signal<import("@spartan-native/theme").PlatformFamily>;
1043
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnInspectorSection, never>;
1044
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnInspectorSection, "sn-inspector-section", never, {
1045
+ "title": {
1046
+ "alias": "title";
1047
+ "required": false;
1048
+ "isSignal": true;
1049
+ };
1050
+ }, {}, never, ["*"], true, never>;
1051
+ }
1052
+ /**
1053
+ * A label/value row. The value is the content. macOS and KDE align labels in a column
1054
+ * ("Kind: PDF document"); Windows, GNOME and ChromeOS stack a small label above the value.
1055
+ */
1056
+ export declare class SnInspectorProperty {
1057
+ readonly label: import("@angular/core").InputSignal<string>;
1058
+ protected readonly skin: import("@angular/core").Signal<import("@spartan-native/theme").Skin>;
1059
+ protected readonly family: import("@angular/core").Signal<import("@spartan-native/theme").PlatformFamily>;
1060
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnInspectorProperty, never>;
1061
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnInspectorProperty, "sn-inspector-property", never, {
1062
+ "label": {
1063
+ "alias": "label";
1064
+ "required": true;
1065
+ "isSignal": true;
1066
+ };
1067
+ }, {}, never, ["*"], true, never>;
1068
+ }
1069
+ export declare const SnInspectorImports: readonly [typeof SnInspectorLayout, typeof SnInspector, typeof SnInspectorSection, typeof SnInspectorProperty];
1070
+ /**
1071
+ * The app's sidebar navigation, with the platform's selection idiom on the current item:
1072
+ * - Windows 11: NavigationView, hover fill plus the accent pill on the selected item
1073
+ * - Windows 10: square items, `primary 30%` fill with a full-height accent bar
1074
+ * - macOS: source list on the sidebar material, accent-tinted fill, grey while the window is inactive
1075
+ * - GNOME: AdwNavigationSplitView sidebar, neutral rounded selection
1076
+ * - KDE: Breeze places panel, accent outline on hover, accent-filled selection
1077
+ * - ChromeOS: Material 3 navigation drawer, tonal pill
1078
+ *
1079
+ * The host carries the theme's `sn-sidebar` material. Items are plain links or buttons
1080
+ * (no Router needed); mark the current one with `[active]`. ↑ ↓ Home End move between items.
1081
+ *
1082
+ * ```html
1083
+ * <sn-sidebar-nav aria-label="Sections">
1084
+ * <sn-sidebar-section title="Backups">
1085
+ * <a snSidebarItem href="#" icon="lucideLayoutDashboard" [active]="page() === 'overview'">Overview</a>
1086
+ * <button snSidebarItem icon="lucideHistory" badge="3" (click)="page.set('restore')">Restore files</button>
1087
+ * </sn-sidebar-section>
1088
+ * </sn-sidebar-nav>
1089
+ * ```
1090
+ *
1091
+ * With the Router: `<a snSidebarItem routerLink="/x" routerLinkActive #rla="routerLinkActive" [active]="rla.isActive">`.
1092
+ *
1093
+ * `collapsed` folds it to a strip of icons (Windows NavigationView's compact mode, a folded
1094
+ * GNOME/KDE sidebar): labels and section titles stay for screen readers and show as tooltips,
1095
+ * badges become a small mark on the icon. An item without an `icon` keeps its content (make it
1096
+ * short enough for the strip, e.g. a number), with `tooltip` for what the tooltip should say. Resizable with
1097
+ * `snResizable`; pass `[resizeDisabled]="collapsed"` so the folded strip keeps its own width.
1098
+ */
1099
+ export declare class SnSidebarNav {
1100
+ /** Folded to icons only; labels show as tooltips. */
1101
+ readonly collapsed: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
1102
+ private readonly items;
1103
+ /** The item that keeps the single Tab stop: the last focused one, else the active one, else the first. */
1104
+ private readonly focused;
1105
+ readonly tabStop: import("@angular/core").Signal<any>;
1106
+ protected readonly skin: import("@angular/core").Signal<import("@spartan-native/theme").Skin>;
1107
+ protected readonly family: import("@angular/core").Signal<import("@spartan-native/theme").PlatformFamily>;
1108
+ /** @internal */
1109
+ setFocused(item: SnSidebarItem): void;
1110
+ protected onKeydown(event: KeyboardEvent): void;
1111
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnSidebarNav, never>;
1112
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnSidebarNav, "sn-sidebar-nav", never, {
1113
+ "collapsed": {
1114
+ "alias": "collapsed";
1115
+ "required": false;
1116
+ "isSignal": true;
1117
+ };
1118
+ }, {}, ["items"], ["*"], true, never>;
1119
+ }
1120
+ /**
1121
+ * A titled group of items: "Favorites", "Locations", … Leave `title` empty for an unlabeled group.
1122
+ */
1123
+ export declare class SnSidebarSection {
1124
+ readonly title: import("@angular/core").InputSignal<string>;
1125
+ protected readonly nav: SnSidebarNav | null;
1126
+ protected readonly headingId: string;
1127
+ protected readonly skin: import("@angular/core").Signal<import("@spartan-native/theme").Skin>;
1128
+ protected readonly family: import("@angular/core").Signal<import("@spartan-native/theme").PlatformFamily>;
1129
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnSidebarSection, never>;
1130
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnSidebarSection, "sn-sidebar-section", never, {
1131
+ "title": {
1132
+ "alias": "title";
1133
+ "required": false;
1134
+ "isSignal": true;
1135
+ };
1136
+ }, {}, never, ["*"], true, never>;
1137
+ }
1138
+ /**
1139
+ * One navigation item, on an `<a>` or a `<button>`. `icon` is an @ng-icons name the app
1140
+ * registered with provideIcons(); `badge` is a short count or label on the trailing side.
1141
+ *
1142
+ * The styles hang on the `sn-sidebar-item` class, not on `data-slot`, so the item can also be
1143
+ * the trigger of a spartan menu (`hlmDropdownMenuTrigger` sets its own `data-slot`).
1144
+ */
1145
+ export declare class SnSidebarItem {
1146
+ readonly active: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
1147
+ readonly icon: import("@angular/core").InputSignal<string>;
1148
+ readonly badge: import("@angular/core").InputSignal<string | number>;
1149
+ /** The tooltip while the sidebar is collapsed. Default: the item's text (and badge). */
1150
+ readonly tooltip: import("@angular/core").InputSignal<string>;
1151
+ readonly element: HTMLElement;
1152
+ protected readonly nav: SnSidebarNav | null;
1153
+ protected readonly skin: import("@angular/core").Signal<import("@spartan-native/theme").Skin>;
1154
+ protected readonly family: import("@angular/core").Signal<import("@spartan-native/theme").PlatformFamily>;
1155
+ private readonly hint;
1156
+ /** Collapsed: the label (and badge) as the tooltip, read when the pointer or focus arrives. */
1157
+ protected syncTooltip(): void;
1158
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnSidebarItem, never>;
1159
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnSidebarItem, "a[snSidebarItem], button[snSidebarItem]", never, {
1160
+ "active": {
1161
+ "alias": "active";
1162
+ "required": false;
1163
+ "isSignal": true;
1164
+ };
1165
+ "icon": {
1166
+ "alias": "icon";
1167
+ "required": false;
1168
+ "isSignal": true;
1169
+ };
1170
+ "badge": {
1171
+ "alias": "badge";
1172
+ "required": false;
1173
+ "isSignal": true;
1174
+ };
1175
+ "tooltip": {
1176
+ "alias": "tooltip";
1177
+ "required": false;
1178
+ "isSignal": true;
1179
+ };
1180
+ }, {}, never, ["*"], true, [{
1181
+ directive: typeof SnTooltip;
1182
+ inputs: {};
1183
+ outputs: {};
1184
+ }]>;
1185
+ }
1186
+ export declare const SnSidebarNavImports: readonly [typeof SnSidebarNav, typeof SnSidebarSection, typeof SnSidebarItem];
1187
+ /**
1188
+ * One page of an `<sn-assistant>`.
1189
+ *
1190
+ * ```html
1191
+ * <ng-template snAssistantPage title="Destination" [canContinue]="form.valid">…</ng-template>
1192
+ * ```
1193
+ */
1194
+ export declare class SnAssistantPage {
1195
+ readonly template: TemplateRef<any>;
1196
+ /** The page's title, shown as its heading (and in the KDE step list). */
1197
+ readonly title: import("@angular/core").InputSignal<string>;
1198
+ /** False disables Next / Continue (e.g. while the page's form is invalid). Default: true. */
1199
+ readonly canContinue: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
1200
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnAssistantPage, never>;
1201
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SnAssistantPage, "ng-template[snAssistantPage]", never, {
1202
+ "title": {
1203
+ "alias": "title";
1204
+ "required": true;
1205
+ "isSignal": true;
1206
+ };
1207
+ "canContinue": {
1208
+ "alias": "canContinue";
1209
+ "required": false;
1210
+ "isSignal": true;
1211
+ };
1212
+ }, {}, never, never, true, never>;
1213
+ }
1214
+ /**
1215
+ * A step-by-step setup flow, laid out the way each OS does it:
1216
+ * - Windows: a wizard, "Step 2 of 4" over the page title, Back · Next · Cancel at the bottom right
1217
+ * - macOS: a Setup Assistant page, large centered title, Go Back · Continue at the bottom right
1218
+ * - GNOME: Back and Next in a header bar around the page title, page dots at the bottom
1219
+ * - KDE: a QWizard with the list of steps at the side, Back · Next · Cancel at the bottom right
1220
+ * - ChromeOS: an M3 flow, headline, page dots, Back · Next at the bottom end
1221
+ *
1222
+ * Pages are templates; only the current one is rendered. Next becomes Finish / Done on the last
1223
+ * page and emits `finish`; Cancel emits `cancel`. Bind `step` to keep or set the page. Put it in an
1224
+ * `<sn-modal-sheet>` (without sheet buttons) for a modal assistant, or in a window as a page.
1225
+ *
1226
+ * ```html
1227
+ * <sn-assistant [(step)]="step" (finish)="save()" (cancel)="open.set(false)">
1228
+ * <ng-template snAssistantPage title="Welcome">…</ng-template>
1229
+ * <ng-template snAssistantPage title="Destination" [canContinue]="destination() !== null">…</ng-template>
1230
+ * <ng-template snAssistantPage title="Schedule">…</ng-template>
1231
+ * </sn-assistant>
1232
+ * ```
1233
+ *
1234
+ * The buttons carry spartan's button hooks (`data-slot="button"`), so the theme draws them as each
1235
+ * skin's standard and accent buttons. Their words follow the OS (Continue on macOS, Finish on
1236
+ * Windows…); set `backLabel`, `nextLabel`, `finishLabel`, `cancelLabel` to translate them.
1237
+ */
1238
+ export declare class SnAssistant {
1239
+ /** The current page, from 0. */
1240
+ readonly step: import("@angular/core").ModelSignal<number>;
1241
+ /** Show a Cancel button. Default: true. */
1242
+ readonly cancelable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
1243
+ readonly backLabel: import("@angular/core").InputSignal<string>;
1244
+ readonly nextLabel: import("@angular/core").InputSignal<string>;
1245
+ readonly finishLabel: import("@angular/core").InputSignal<string>;
1246
+ readonly cancelLabel: import("@angular/core").InputSignal<string>;
1247
+ /** "Step {current} of {total}" on Windows; `{current}` and `{total}` are replaced. */
1248
+ readonly progressLabel: import("@angular/core").InputSignal<string>;
1249
+ /** Next on the last page. */
1250
+ readonly finish: import("@angular/core").OutputEmitterRef<void>;
1251
+ readonly cancel: import("@angular/core").OutputEmitterRef<void>;
1252
+ protected readonly skin: import("@angular/core").Signal<Skin>;
1253
+ protected readonly family: import("@angular/core").Signal<PlatformFamily>;
1254
+ protected readonly words: import("@angular/core").Signal<{
1255
+ back: string;
1256
+ next: string;
1257
+ finish: string;
1258
+ cancel: string;
1259
+ }>;
1260
+ protected readonly pages: import("@angular/core").Signal<readonly SnAssistantPage[]>;
1261
+ protected readonly current: import("@angular/core").Signal<number>;
1262
+ protected readonly page: import("@angular/core").Signal<SnAssistantPage>;
1263
+ protected readonly last: import("@angular/core").Signal<boolean>;
1264
+ protected readonly showDots: import("@angular/core").Signal<boolean>;
1265
+ protected readonly progressText: import("@angular/core").Signal<string>;
1266
+ protected readonly headingId: string;
1267
+ private readonly heading;
1268
+ private readonly host;
1269
+ constructor();
1270
+ /** Goes to the next page, or emits `finish` on the last one. */
1271
+ next(): void;
1272
+ /** Goes to the previous page. */
1273
+ back(): void;
1274
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnAssistant, never>;
1275
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnAssistant, "sn-assistant", never, {
1276
+ "step": {
1277
+ "alias": "step";
1278
+ "required": false;
1279
+ "isSignal": true;
1280
+ };
1281
+ "cancelable": {
1282
+ "alias": "cancelable";
1283
+ "required": false;
1284
+ "isSignal": true;
1285
+ };
1286
+ "backLabel": {
1287
+ "alias": "backLabel";
1288
+ "required": false;
1289
+ "isSignal": true;
1290
+ };
1291
+ "nextLabel": {
1292
+ "alias": "nextLabel";
1293
+ "required": false;
1294
+ "isSignal": true;
1295
+ };
1296
+ "finishLabel": {
1297
+ "alias": "finishLabel";
1298
+ "required": false;
1299
+ "isSignal": true;
1300
+ };
1301
+ "cancelLabel": {
1302
+ "alias": "cancelLabel";
1303
+ "required": false;
1304
+ "isSignal": true;
1305
+ };
1306
+ "progressLabel": {
1307
+ "alias": "progressLabel";
1308
+ "required": false;
1309
+ "isSignal": true;
1310
+ };
1311
+ }, {
1312
+ "step": "stepChange";
1313
+ "finish": "finish";
1314
+ "cancel": "cancel";
1315
+ }, ["pages"], never, true, never>;
1316
+ }
1317
+ export declare const SnAssistantImports: readonly [typeof SnAssistant, typeof SnAssistantPage];
1318
+ /**
1319
+ * A list of setup tasks: numbered rows that tick off as they are done, each with an action.
1320
+ *
1321
+ * ```html
1322
+ * <sn-checklist aria-label="Get started">
1323
+ * <sn-checklist-item title="Add a destination" [done]="hasDestination()">
1324
+ * Where your backups go: a disk, a NAS or the cloud.
1325
+ * <button hlmBtn size="sm" snChecklistAction (click)="add()">Add…</button>
1326
+ * </sn-checklist-item>
1327
+ * <sn-checklist-item title="Choose what to back up">…</sn-checklist-item>
1328
+ * </sn-checklist>
1329
+ * ```
1330
+ */
1331
+ export declare class SnChecklist {
1332
+ protected readonly skin: import("@angular/core").Signal<import("@spartan-native/theme").Skin>;
1333
+ protected readonly family: import("@angular/core").Signal<import("@spartan-native/theme").PlatformFamily>;
1334
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnChecklist, never>;
1335
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnChecklist, "sn-checklist", never, {}, {}, never, ["*"], true, never>;
1336
+ }
1337
+ /**
1338
+ * One task of an `<sn-checklist>`: a number (a tick once `done`), the title, a description
1339
+ * (the content) and an action (`[snChecklistAction]`, hidden once done unless `keepAction`).
1340
+ */
1341
+ export declare class SnChecklistItem {
1342
+ readonly title: import("@angular/core").InputSignal<string>;
1343
+ readonly done: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
1344
+ /** Keep the action visible once the task is done (e.g. "Change…"). */
1345
+ readonly keepAction: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
1346
+ /** Read by screen readers after the title. */
1347
+ readonly doneLabel: import("@angular/core").InputSignal<string>;
1348
+ readonly todoLabel: import("@angular/core").InputSignal<string>;
1349
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnChecklistItem, never>;
1350
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnChecklistItem, "sn-checklist-item", never, {
1351
+ "title": {
1352
+ "alias": "title";
1353
+ "required": true;
1354
+ "isSignal": true;
1355
+ };
1356
+ "done": {
1357
+ "alias": "done";
1358
+ "required": false;
1359
+ "isSignal": true;
1360
+ };
1361
+ "keepAction": {
1362
+ "alias": "keepAction";
1363
+ "required": false;
1364
+ "isSignal": true;
1365
+ };
1366
+ "doneLabel": {
1367
+ "alias": "doneLabel";
1368
+ "required": false;
1369
+ "isSignal": true;
1370
+ };
1371
+ "todoLabel": {
1372
+ "alias": "todoLabel";
1373
+ "required": false;
1374
+ "isSignal": true;
1375
+ };
1376
+ }, {}, never, ["*", "[snChecklistAction]"], true, never>;
1377
+ }
1378
+ export declare const SnChecklistImports: readonly [typeof SnChecklist, typeof SnChecklistItem];
1379
+ /**
1380
+ * The menu of an `<sn-split-button>`: the other choices for the action. Put a stock menu
1381
+ * inside, e.g. hlmDropdownMenu:
1382
+ *
1383
+ * ```html
1384
+ * <ng-template snSplitButtonMenu>
1385
+ * <div hlmDropdownMenu>
1386
+ * <button hlmDropdownMenuItem>Back up Documents only</button>
1387
+ * </div>
1388
+ * </ng-template>
1389
+ * ```
1390
+ */
1391
+ export declare class SnSplitButtonMenu {
1392
+ readonly template: TemplateRef<any>;
1393
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnSplitButtonMenu, never>;
1394
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SnSplitButtonMenu, "ng-template[snSplitButtonMenu]", never, {}, {}, never, never, true, never>;
1395
+ }
1396
+ /** standard: the platform's normal button · accent: the suggested / default action */
1397
+ type SnSplitButtonVariant = 'standard' | 'accent';
1398
+ /**
1399
+ * A button that runs its main action, joined to a second button that opens a menu of
1400
+ * alternatives. Each part is drawn as the skin's own button, so it matches the buttons next to it:
1401
+ * - Windows 11 / 10: Fluent SplitButton, one control with a divider before the chevron
1402
+ * - macOS 26 / 13–15: NSComboButton (split style), a capsule (26) or bezel (13–15) with a divider
1403
+ * - GNOME: AdwSplitButton, two linked buttons
1404
+ * - KDE: a QToolButton with a MenuButtonPopup arrow
1405
+ * - ChromeOS: the Material 3 split button, two segments with a 2px gap and tight inner corners
1406
+ *
1407
+ * Two Tab stops: the action, then the menu button. On the action, ↓ (Alt+↓ on Windows)
1408
+ * opens the menu too.
1409
+ *
1410
+ * ```html
1411
+ * <sn-split-button label="Back up now" icon="lucideCloudUpload" variant="accent" (triggered)="backUp()">
1412
+ * <ng-template snSplitButtonMenu>
1413
+ * <div hlmDropdownMenu>
1414
+ * <button hlmDropdownMenuItem (triggered)="backUp('documents')">Documents only</button>
1415
+ * <button hlmDropdownMenuItem (triggered)="verify()">Verify last backup</button>
1416
+ * </div>
1417
+ * </ng-template>
1418
+ * </sn-split-button>
1419
+ * ```
1420
+ */
1421
+ export declare class SnSplitButton {
1422
+ /** The main action's text (also the group's accessible name). */
1423
+ readonly label: import("@angular/core").InputSignal<string>;
1424
+ /** An @ng-icons name registered with provideIcons(), shown before the label. */
1425
+ readonly icon: import("@angular/core").InputSignal<string>;
1426
+ readonly variant: import("@angular/core").InputSignal<SnSplitButtonVariant>;
1427
+ /** The compact size (the theme's small button height). */
1428
+ readonly small: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
1429
+ readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
1430
+ /** Accessible name and tooltip of the menu button. */
1431
+ readonly menuLabel: import("@angular/core").InputSignal<string>;
1432
+ /** The main action was clicked (or Enter / Space). */
1433
+ readonly triggered: import("@angular/core").OutputEmitterRef<void>;
1434
+ protected readonly skin: import("@angular/core").Signal<import("@spartan-native/theme").Skin>;
1435
+ protected readonly family: import("@angular/core").Signal<import("@spartan-native/theme").PlatformFamily>;
1436
+ protected readonly menu: import("@angular/core").Signal<SnSplitButtonMenu | undefined>;
1437
+ private readonly trigger;
1438
+ protected readonly partClass: import("@angular/core").Signal<string>;
1439
+ protected readonly menuPosition: ConnectedPosition[];
1440
+ /** Opens the menu, e.g. from a keyboard shortcut. */
1441
+ open(): void;
1442
+ protected onActionKeydown(event: KeyboardEvent): void;
1443
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnSplitButton, never>;
1444
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnSplitButton, "sn-split-button", never, {
1445
+ "label": {
1446
+ "alias": "label";
1447
+ "required": true;
1448
+ "isSignal": true;
1449
+ };
1450
+ "icon": {
1451
+ "alias": "icon";
1452
+ "required": false;
1453
+ "isSignal": true;
1454
+ };
1455
+ "variant": {
1456
+ "alias": "variant";
1457
+ "required": false;
1458
+ "isSignal": true;
1459
+ };
1460
+ "small": {
1461
+ "alias": "small";
1462
+ "required": false;
1463
+ "isSignal": true;
1464
+ };
1465
+ "disabled": {
1466
+ "alias": "disabled";
1467
+ "required": false;
1468
+ "isSignal": true;
1469
+ };
1470
+ "menuLabel": {
1471
+ "alias": "menuLabel";
1472
+ "required": false;
1473
+ "isSignal": true;
1474
+ };
1475
+ }, {
1476
+ "triggered": "triggered";
1477
+ }, ["menu"], never, true, never>;
1478
+ }
1479
+ export declare const SnSplitButtonImports: readonly [typeof SnSplitButton, typeof SnSplitButtonMenu];
1480
+ /**
1481
+ * Evaluates the simple arithmetic a Fluent NumberBox accepts: numbers, + − * /, parentheses
1482
+ * and unary minus. A comma works as the decimal separator too. Returns null for anything else
1483
+ * (no variables, no functions, nothing is executed).
1484
+ *
1485
+ * ```ts
1486
+ * evaluateNumberExpression('1.5 * (2 + 2)') // 6
1487
+ * evaluateNumberExpression('12,5') // 12.5
1488
+ * ```
1489
+ */
1490
+ export declare function evaluateNumberExpression(text: string): number | null;
1491
+ /**
1492
+ * A number field with step buttons, in the OS's own layout:
1493
+ * - Windows 11 / 10: Fluent NumberBox, ∧ ∨ buttons inside the field (SpinButtonPlacementMode.Inline)
1494
+ * - macOS 26 / 13–15: a text field with an NSStepper beside it (stacked arrows)
1495
+ * - GNOME: GtkSpinButton, − and + buttons inside the entry's end, divided by lines
1496
+ * - KDE: QSpinBox (Breeze), small stacked arrows inside the field
1497
+ * - ChromeOS: an M3 text field with round − / + icon buttons at the end
1498
+ *
1499
+ * The field is drawn by the skin's text field, so it has the OS's border, focus and hover.
1500
+ * Keyboard: ↑ ↓ step, PgUp PgDn take a large step, Home End go to min / max, Enter commits,
1501
+ * Esc reverts what you typed. Typing `2*15` or `100/4` works (Fluent NumberBox math).
1502
+ * The step buttons repeat while held; they aren't Tab stops (the arrow keys do the same).
1503
+ *
1504
+ * Bind with `[(value)]`, or as a form control (`formControlName`, `[(ngModel)]`):
1505
+ *
1506
+ * ```html
1507
+ * <label hlmLabel for="keep">Keep versions</label>
1508
+ * <sn-number-box inputId="keep" [(value)]="versions" [min]="1" [max]="100" />
1509
+ * ```
1510
+ */
1511
+ export declare class SnNumberBox implements ControlValueAccessor {
1512
+ /** The number; null when the field is empty. Two-way bindable. */
1513
+ readonly value: import("@angular/core").ModelSignal<number | null>;
1514
+ readonly min: import("@angular/core").InputSignalWithTransform<number | null, unknown>;
1515
+ readonly max: import("@angular/core").InputSignalWithTransform<number | null, unknown>;
1516
+ /** What ↑ ↓ and the buttons add or subtract. */
1517
+ readonly step: import("@angular/core").InputSignalWithTransform<number, unknown>;
1518
+ /** What PgUp / PgDn add or subtract; defaults to 10 steps. */
1519
+ readonly largeStep: import("@angular/core").InputSignalWithTransform<number | null, unknown>;
1520
+ /** Round to this many decimal places (and always show them). Default: as typed. */
1521
+ readonly decimals: import("@angular/core").InputSignalWithTransform<number | null, unknown>;
1522
+ /** Show the step buttons. */
1523
+ readonly spinButtons: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
1524
+ /** Accept arithmetic such as `2*15` (Fluent NumberBox). */
1525
+ readonly acceptsExpression: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
1526
+ readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
1527
+ readonly placeholder: import("@angular/core").InputSignal<string>;
1528
+ /** The input's id, for `<label for>`. */
1529
+ readonly inputId: import("@angular/core").InputSignal<string>;
1530
+ /** Accessible name when there's no `<label for>`. */
1531
+ readonly ariaLabel: import("@angular/core").InputSignal<string>;
1532
+ protected readonly skin: import("@angular/core").Signal<Skin>;
1533
+ protected readonly family: import("@angular/core").Signal<import("@spartan-native/theme").PlatformFamily>;
1534
+ protected readonly glyphs: import("@angular/core").Signal<"plus-minus" | "chevrons">;
1535
+ private readonly formDisabled;
1536
+ protected readonly isDisabled: import("@angular/core").Signal<boolean>;
1537
+ /** The text in the field: the formatted value, or what the user is typing. */
1538
+ protected readonly draft: import("@angular/core").WritableSignal<string>;
1539
+ /** The text doesn't parse; shown until it's committed or reverted. */
1540
+ protected readonly invalid: import("@angular/core").Signal<boolean>;
1541
+ protected readonly atMin: import("@angular/core").Signal<boolean>;
1542
+ protected readonly atMax: import("@angular/core").Signal<boolean>;
1543
+ private readonly field;
1544
+ private repeatTimer;
1545
+ private onChange;
1546
+ protected onTouched: () => void;
1547
+ constructor();
1548
+ /** Adds `steps` × step (negative to subtract) and commits. */
1549
+ stepBy(steps: number, size?: number): void;
1550
+ /** Parses the text in the field and makes it the value; reverts text that doesn't parse. */
1551
+ commit(): void;
1552
+ focus(): void;
1553
+ protected onInput(event: Event): void;
1554
+ protected onKeydown(event: KeyboardEvent): void;
1555
+ protected onWheel(event: WheelEvent): void;
1556
+ protected press(event: PointerEvent, steps: number): void;
1557
+ protected release(): void;
1558
+ writeValue(value: unknown): void;
1559
+ registerOnChange(fn: (value: number | null) => void): void;
1560
+ registerOnTouched(fn: () => void): void;
1561
+ setDisabledState(disabled: boolean): void;
1562
+ private set;
1563
+ /**
1564
+ * Puts `text` in the field. Written to the element too: when the value didn't change, the
1565
+ * `[value]` binding sees the same string as last time and wouldn't replace what was typed.
1566
+ */
1567
+ private show;
1568
+ private parse;
1569
+ private format;
1570
+ private bound;
1571
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnNumberBox, never>;
1572
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnNumberBox, "sn-number-box", never, {
1573
+ "value": {
1574
+ "alias": "value";
1575
+ "required": false;
1576
+ "isSignal": true;
1577
+ };
1578
+ "min": {
1579
+ "alias": "min";
1580
+ "required": false;
1581
+ "isSignal": true;
1582
+ };
1583
+ "max": {
1584
+ "alias": "max";
1585
+ "required": false;
1586
+ "isSignal": true;
1587
+ };
1588
+ "step": {
1589
+ "alias": "step";
1590
+ "required": false;
1591
+ "isSignal": true;
1592
+ };
1593
+ "largeStep": {
1594
+ "alias": "largeStep";
1595
+ "required": false;
1596
+ "isSignal": true;
1597
+ };
1598
+ "decimals": {
1599
+ "alias": "decimals";
1600
+ "required": false;
1601
+ "isSignal": true;
1602
+ };
1603
+ "spinButtons": {
1604
+ "alias": "spinButtons";
1605
+ "required": false;
1606
+ "isSignal": true;
1607
+ };
1608
+ "acceptsExpression": {
1609
+ "alias": "acceptsExpression";
1610
+ "required": false;
1611
+ "isSignal": true;
1612
+ };
1613
+ "disabled": {
1614
+ "alias": "disabled";
1615
+ "required": false;
1616
+ "isSignal": true;
1617
+ };
1618
+ "placeholder": {
1619
+ "alias": "placeholder";
1620
+ "required": false;
1621
+ "isSignal": true;
1622
+ };
1623
+ "inputId": {
1624
+ "alias": "inputId";
1625
+ "required": false;
1626
+ "isSignal": true;
1627
+ };
1628
+ "ariaLabel": {
1629
+ "alias": "ariaLabel";
1630
+ "required": false;
1631
+ "isSignal": true;
1632
+ };
1633
+ }, {
1634
+ "value": "valueChange";
1635
+ }, never, never, true, never>;
1636
+ }
1637
+ /**
1638
+ * A hierarchical list (folders, sections, a document outline) with the desktop selection model:
1639
+ * - Windows 11: WinUI TreeView, chevrons, the accent pill on the selected row
1640
+ * - Windows 10: square rows, chevrons, accent-tinted selection
1641
+ * - macOS 26 / 13–15: NSOutlineView, disclosure triangles, accent selection that turns grey
1642
+ * when the tree loses focus
1643
+ * - GNOME: a GtkListView with GtkTreeExpander, triangles, neutral rounded selection
1644
+ * - KDE: a Breeze QTreeView, chevrons, accent-filled selection (muted without focus)
1645
+ * - ChromeOS: the Files app tree, chevrons, tonal pill selection
1646
+ *
1647
+ * Items nest in markup; any depth, `@for` and `@if` work. Values must be unique in the tree.
1648
+ *
1649
+ * ```html
1650
+ * <sn-tree aria-label="Folders" [(selection)]="folder" (activated)="open($event)">
1651
+ * <sn-tree-item value="docs" label="Documents" icon="lucideFolder" [(expanded)]="docsOpen">
1652
+ * <sn-tree-item value="docs/taxes" label="Taxes" icon="lucideFolder" />
1653
+ * <sn-tree-item value="docs/work" label="Work" icon="lucideFolder" />
1654
+ * </sn-tree-item>
1655
+ * <sn-tree-item value="photos" label="Photos" icon="lucideFolder" />
1656
+ * </sn-tree>
1657
+ * ```
1658
+ *
1659
+ * Mouse: click selects, Ctrl/⌘-click and Shift-click with `multiple`, the expander or a
1660
+ * double-click on a parent opens and closes it, double-click on a leaf activates.
1661
+ * Keyboard: ↑ ↓ Home End PgUp PgDn move (Shift extends, Ctrl/⌘ moves focus only with `multiple`),
1662
+ * → opens or goes to the first child, ← closes or goes to the parent, `*` opens all siblings,
1663
+ * Enter activates, Space selects (Ctrl+Space toggles), Ctrl/⌘+A selects all, type to jump.
1664
+ */
1665
+ export declare class SnTree<K = unknown> {
1666
+ /** Allow more than one selected item. */
1667
+ readonly multiple: import("@angular/core").InputSignal<boolean>;
1668
+ /** The selected values, in visible order. Two-way bindable. */
1669
+ readonly selection: import("@angular/core").ModelSignal<readonly K[]>;
1670
+ /** Enter, or a double-click on an item without children. */
1671
+ readonly activated: import("@angular/core").OutputEmitterRef<K>;
1672
+ protected readonly skin: import("@angular/core").Signal<Skin>;
1673
+ protected readonly family: import("@angular/core").Signal<import("@spartan-native/theme").PlatformFamily>;
1674
+ /** @internal */
1675
+ readonly triangle: import("@angular/core").Signal<boolean>;
1676
+ private readonly dir;
1677
+ private readonly injector;
1678
+ private readonly registered;
1679
+ /** Bumped after items render or move, so the document order is read again. */
1680
+ private readonly orderVersion;
1681
+ private orderPending;
1682
+ /** Every item, in document order. */
1683
+ private readonly ordered;
1684
+ /** The items whose ancestors are all open: what the keyboard and Shift ranges walk. */
1685
+ private readonly visible;
1686
+ private readonly visibleKeys;
1687
+ private readonly cursor;
1688
+ private readonly selectedSet;
1689
+ /** The item that holds the single Tab stop. */
1690
+ readonly tabStop: import("@angular/core").Signal<SnTreeItem<K>>;
1691
+ private typeahead;
1692
+ private typeaheadTimer;
1693
+ constructor();
1694
+ /** @internal */
1695
+ register(item: SnTreeItem<K>): void;
1696
+ /** @internal */
1697
+ unregister(item: SnTreeItem<K>): void;
1698
+ /** @internal The direct children of `parent` (null: the top level), in document order. */
1699
+ childrenOf(parent: SnTreeItem<K> | null): SnTreeItem<K>[];
1700
+ /** @internal */
1701
+ isSelected(key: K): boolean;
1702
+ /** @internal Focus landed on an item (Tab, click): it becomes the cursor. */
1703
+ focused(item: SnTreeItem<K>): void;
1704
+ /** @internal */
1705
+ click(item: SnTreeItem<K>, event: MouseEvent): void;
1706
+ /** @internal */
1707
+ activate(item: SnTreeItem<K>): void;
1708
+ /** @internal An item closed: if the cursor or a selection was inside it, it moves to the item. */
1709
+ collapsed(item: SnTreeItem<K>): void;
1710
+ protected onKeydown(event: KeyboardEvent): void;
1711
+ private onTypeahead;
1712
+ private state;
1713
+ private apply;
1714
+ /** ⌘ toggles on macOS, Ctrl everywhere else (Ctrl-click is the context menu on macOS). */
1715
+ private modifiers;
1716
+ /** Reads the document order again once the newly registered items are in place. */
1717
+ private reorder;
1718
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnTree<any>, never>;
1719
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnTree<any>, "sn-tree", never, {
1720
+ "multiple": {
1721
+ "alias": "multiple";
1722
+ "required": false;
1723
+ "isSignal": true;
1724
+ };
1725
+ "selection": {
1726
+ "alias": "selection";
1727
+ "required": false;
1728
+ "isSignal": true;
1729
+ };
1730
+ }, {
1731
+ "selection": "selectionChange";
1732
+ "activated": "activated";
1733
+ }, never, ["*"], true, never>;
1734
+ }
1735
+ /**
1736
+ * One item of an `<sn-tree>`; nest items inside it for its children. `label` is its text (and
1737
+ * the type-ahead text); `icon` an @ng-icons name registered with provideIcons().
1738
+ * Extra trailing content (a count, a badge) goes in `[snTreeItemEnd]`.
1739
+ *
1740
+ * `expandable` shows the expander before the children exist, for lazy loading: listen to
1741
+ * `(expandedChange)` and add the children then.
1742
+ */
1743
+ export declare class SnTreeItem<K = unknown> {
1744
+ /** The key this item stands for; unique in the tree. Declared optional because the tree reads its items while Angular is still binding them. */
1745
+ readonly value: import("@angular/core").InputSignal<K>;
1746
+ readonly label: import("@angular/core").InputSignal<string>;
1747
+ readonly icon: import("@angular/core").InputSignal<string>;
1748
+ /** Open, showing its children. Two-way bindable. */
1749
+ readonly expanded: import("@angular/core").ModelSignal<boolean>;
1750
+ /** Show the expander even without children (they load when it opens). */
1751
+ readonly expandable: import("@angular/core").InputSignal<boolean>;
1752
+ readonly element: HTMLElement;
1753
+ protected readonly tree: SnTree<K>;
1754
+ /** The item this one is nested in; null at the top level. */
1755
+ readonly parent: SnTreeItem<K> | null;
1756
+ readonly level: () => number;
1757
+ readonly children: import("@angular/core").Signal<SnTreeItem<K>[]>;
1758
+ readonly hasChildren: import("@angular/core").Signal<boolean>;
1759
+ readonly selected: import("@angular/core").Signal<boolean>;
1760
+ /** Every ancestor is open. */
1761
+ readonly isVisible: () => boolean;
1762
+ constructor();
1763
+ /** Every item nested below this one, at any depth. */
1764
+ descendants(): SnTreeItem<K>[];
1765
+ setExpanded(open: boolean): void;
1766
+ protected onMouseDown(event: MouseEvent): void;
1767
+ protected onExpanderClick(event: MouseEvent): void;
1768
+ protected onDoubleClick(): void;
1769
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnTreeItem<any>, never>;
1770
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnTreeItem<any>, "sn-tree-item", never, {
1771
+ "value": {
1772
+ "alias": "value";
1773
+ "required": false;
1774
+ "isSignal": true;
1775
+ };
1776
+ "label": {
1777
+ "alias": "label";
1778
+ "required": true;
1779
+ "isSignal": true;
1780
+ };
1781
+ "icon": {
1782
+ "alias": "icon";
1783
+ "required": false;
1784
+ "isSignal": true;
1785
+ };
1786
+ "expanded": {
1787
+ "alias": "expanded";
1788
+ "required": false;
1789
+ "isSignal": true;
1790
+ };
1791
+ "expandable": {
1792
+ "alias": "expandable";
1793
+ "required": false;
1794
+ "isSignal": true;
1795
+ };
1796
+ }, {
1797
+ "expanded": "expandedChange";
1798
+ }, never, ["[snTreeItemEnd]", "*"], true, never>;
1799
+ }
1800
+ export declare const SnTreeImports: readonly [typeof SnTree, typeof SnTreeItem];
1801
+ /**
1802
+ * The platform's search field: a text field with a magnifier and a clear button, drawn as each
1803
+ * skin draws its text fields.
1804
+ * - macOS (NSSearchField), GNOME (GtkSearchEntry), KDE and ChromeOS: magnifier at the start
1805
+ * - Windows (AutoSuggestBox): magnifier at the end
1806
+ *
1807
+ * Esc empties a field that has text and stops there; on an empty field it goes on to the
1808
+ * surrounding dialog or menu, so Esc still closes them. The clear button empties it and gives
1809
+ * the focus back to the field.
1810
+ *
1811
+ * ```html
1812
+ * <sn-search-field [(value)]="query" placeholder="Search files" />
1813
+ * <sn-search-field [formControl]="query" label="Filter the list" />
1814
+ * ```
1815
+ *
1816
+ * The placeholder is also the accessible name unless `label` is set. Works with `[(value)]`,
1817
+ * `ngModel` and reactive forms.
1818
+ */
1819
+ export declare class SnSearchField implements ControlValueAccessor {
1820
+ /** The text. Two-way bindable. */
1821
+ readonly value: import("@angular/core").ModelSignal<string>;
1822
+ /** Default: "Search". Also the accessible name when `label` is empty. */
1823
+ readonly placeholder: import("@angular/core").InputSignal<string>;
1824
+ /** The accessible name, when the placeholder doesn't say enough. */
1825
+ readonly label: import("@angular/core").InputSignal<string>;
1826
+ /** The clear button's accessible name. Default: "Clear". */
1827
+ readonly clearLabel: import("@angular/core").InputSignal<string>;
1828
+ readonly disabledInput: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
1829
+ /** Enter in the field, with its text. */
1830
+ readonly submitted: import("@angular/core").OutputEmitterRef<string>;
1831
+ protected readonly skin: import("@angular/core").Signal<import("@spartan-native/theme").Skin>;
1832
+ protected readonly family: import("@angular/core").Signal<import("@spartan-native/theme").PlatformFamily>;
1833
+ private readonly formDisabled;
1834
+ protected readonly isDisabled: import("@angular/core").Signal<boolean>;
1835
+ private readonly field;
1836
+ private onChange;
1837
+ protected touched: () => void;
1838
+ /** Puts the keyboard focus in the field (e.g. for ⌘F / Ctrl+F). */
1839
+ focus(): void;
1840
+ /** Empties the field and keeps the focus in it. */
1841
+ clear(): void;
1842
+ protected onInput(event: Event): void;
1843
+ protected onEscape(event: Event): void;
1844
+ private set;
1845
+ /** @internal ControlValueAccessor */
1846
+ writeValue(value: unknown): void;
1847
+ /** @internal ControlValueAccessor */
1848
+ registerOnChange(fn: (value: string) => void): void;
1849
+ /** @internal ControlValueAccessor */
1850
+ registerOnTouched(fn: () => void): void;
1851
+ /** @internal ControlValueAccessor */
1852
+ setDisabledState(disabled: boolean): void;
1853
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnSearchField, never>;
1854
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnSearchField, "sn-search-field", never, {
1855
+ "value": {
1856
+ "alias": "value";
1857
+ "required": false;
1858
+ "isSignal": true;
1859
+ };
1860
+ "placeholder": {
1861
+ "alias": "placeholder";
1862
+ "required": false;
1863
+ "isSignal": true;
1864
+ };
1865
+ "label": {
1866
+ "alias": "label";
1867
+ "required": false;
1868
+ "isSignal": true;
1869
+ };
1870
+ "clearLabel": {
1871
+ "alias": "clearLabel";
1872
+ "required": false;
1873
+ "isSignal": true;
1874
+ };
1875
+ "disabledInput": {
1876
+ "alias": "disabled";
1877
+ "required": false;
1878
+ "isSignal": true;
1879
+ };
1880
+ }, {
1881
+ "value": "valueChange";
1882
+ "submitted": "submitted";
1883
+ }, never, never, true, never>;
1884
+ }
1885
+ /** Which edge of the panel the handle sits on. `auto`: the edge facing the middle of the parent. */
1886
+ type SnResizeEdge = 'auto' | 'start' | 'end';
1887
+ /**
1888
+ * Lets the user widen or narrow a side panel by dragging its inner edge, like the sidebars and
1889
+ * inspectors of Finder, Explorer, Files and Dolphin. Put it on `<sn-sidebar-nav>`,
1890
+ * `<sn-inspector>` or any panel that sits beside the content in a row:
1891
+ *
1892
+ * ```html
1893
+ * <sn-sidebar-nav snResizable="sidebar" aria-label="Sections">…</sn-sidebar-nav>
1894
+ * <sn-inspector snResizable="inspector" resizeLabel="Resize the details">…</sn-inspector>
1895
+ * ```
1896
+ *
1897
+ * The width is kept as a share of the parent's width, so the panel grows and shrinks with the
1898
+ * window instead of staying a fixed number of pixels. The value of `snResizable` is the key the
1899
+ * share is remembered under (`localStorage`, per window); leave it empty to not remember it.
1900
+ * A double-click on the edge goes back to the default. The edge is a focusable separator:
1901
+ * ← → resize it (Shift for bigger steps), Home and End jump to the limits.
1902
+ *
1903
+ * The handle lives in the panel's parent (which becomes `position: relative`), so it doesn't
1904
+ * scroll away with a long panel. While `resizeDisabled` is set (a collapsed sidebar), the panel
1905
+ * keeps its stylesheet width and the handle hides.
1906
+ */
1907
+ export declare class SnResizable {
1908
+ /** The storage key the width is remembered under; empty: not remembered. */
1909
+ readonly snResizable: import("@angular/core").InputSignal<string>;
1910
+ /** The handle's edge. `auto` (default): the edge facing the middle of the parent. */
1911
+ readonly resizeEdge: import("@angular/core").InputSignal<SnResizeEdge>;
1912
+ /** The share of the parent's width the panel takes until the user drags it. Default: 0.2. */
1913
+ readonly resizeRatio: import("@angular/core").InputSignalWithTransform<number, unknown>;
1914
+ /** Never narrower than this, in pixels. Default: 192. */
1915
+ readonly resizeMin: import("@angular/core").InputSignalWithTransform<number, unknown>;
1916
+ /** Never wider than this share of the parent. Default: 0.5. */
1917
+ readonly resizeMaxRatio: import("@angular/core").InputSignalWithTransform<number, unknown>;
1918
+ /** Keep the stylesheet width and hide the handle (e.g. a collapsed sidebar). */
1919
+ readonly resizeDisabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
1920
+ /** The handle's accessible name. Default: "Resize". */
1921
+ readonly resizeLabel: import("@angular/core").InputSignal<string>;
1922
+ /** True while the user drags the edge (also `data-resizing` on the panel: turn transitions off). */
1923
+ readonly dragging: import("@angular/core").WritableSignal<boolean>;
1924
+ /** The share of the parent the user chose; null: `resizeRatio`. */
1925
+ readonly share: import("@angular/core").WritableSignal<number | null>;
1926
+ private readonly el;
1927
+ private handle?;
1928
+ private parent?;
1929
+ constructor();
1930
+ /** The handle is on the panel's left side (a panel on the right of its parent, in LTR). */
1931
+ private onLeft;
1932
+ /** Sizes the panel from its share and puts the handle on its edge. */
1933
+ private layout;
1934
+ private startDrag;
1935
+ private onKey;
1936
+ /** A width in pixels, turned into a share of the parent (clamped); `persist` remembers it. */
1937
+ private setWidth;
1938
+ private save;
1939
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnResizable, never>;
1940
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SnResizable, "[snResizable]", ["snResizable"], {
1941
+ "snResizable": {
1942
+ "alias": "snResizable";
1943
+ "required": false;
1944
+ "isSignal": true;
1945
+ };
1946
+ "resizeEdge": {
1947
+ "alias": "resizeEdge";
1948
+ "required": false;
1949
+ "isSignal": true;
1950
+ };
1951
+ "resizeRatio": {
1952
+ "alias": "resizeRatio";
1953
+ "required": false;
1954
+ "isSignal": true;
1955
+ };
1956
+ "resizeMin": {
1957
+ "alias": "resizeMin";
1958
+ "required": false;
1959
+ "isSignal": true;
1960
+ };
1961
+ "resizeMaxRatio": {
1962
+ "alias": "resizeMaxRatio";
1963
+ "required": false;
1964
+ "isSignal": true;
1965
+ };
1966
+ "resizeDisabled": {
1967
+ "alias": "resizeDisabled";
1968
+ "required": false;
1969
+ "isSignal": true;
1970
+ };
1971
+ "resizeLabel": {
1972
+ "alias": "resizeLabel";
1973
+ "required": false;
1974
+ "isSignal": true;
1975
+ };
1976
+ }, {}, never, never, true, never>;
1977
+ }
1978
+ /**
1979
+ * The bridge to the host's native menus (`NativeHost.menus`). It converts desktop-ui menus to
1980
+ * the host's plain data and runs an item's `action` when the host reports it was chosen.
1981
+ * `<sn-menubar>` and `[snContextMenu]` use it; call it directly for menus built in code.
1982
+ */
1983
+ export declare class SnNativeMenus {
1984
+ private readonly theme;
1985
+ private readonly host;
1986
+ private readonly appActions;
1987
+ private readonly contextActions;
1988
+ private off;
1989
+ constructor();
1990
+ /** The host can set the application menu (the macOS global menu bar, a window menu). */
1991
+ get canSetApplicationMenu(): boolean;
1992
+ /** The host can show OS context menus. */
1993
+ get canShowContextMenu(): boolean;
1994
+ /** Sets (or, with `[]`, removes) the application menu. */
1995
+ setApplicationMenu(items: readonly SnMenuItem[]): Promise<void>;
1996
+ /** Shows an OS context menu at `x`, `y` (CSS pixels from the window's content corner). */
1997
+ showContextMenu(items: readonly SnMenuItem[], position: {
1998
+ x: number;
1999
+ y: number;
2000
+ }): Promise<void>;
2001
+ private listen;
2002
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnNativeMenus, never>;
2003
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
2004
+ }
2005
+ /** auto: native on macOS when the host can · always: native whenever the host can · never: in the page */
2006
+ type SnMenubarNative = 'auto' | 'always' | 'never';
2007
+ /**
2008
+ * The application menu, from one menu definition:
2009
+ * - macOS with a host that has native menus (Wails): the global menu bar at the top of the
2010
+ * screen. Nothing is drawn in the window, and the OS handles the shortcuts.
2011
+ * - Everywhere else (Windows, Linux, ChromeOS, and macOS in a browser): an in-window menu bar,
2012
+ * drawn by the skin's menubar and menu styles, with the shortcuts bound in the page.
2013
+ *
2014
+ * Roles become the OS's own items natively (`appMenu`, `editMenu`, `windowMenu`, `quit`, …); in
2015
+ * the page `editMenu` and `windowMenu` become Edit and Window menus that act on the focused field
2016
+ * and the host's window, and the macOS-only roles are left out.
2017
+ *
2018
+ * ```ts
2019
+ * readonly menu = computed<SnMenuItem[]>(() => [
2020
+ * { role: 'appMenu' },
2021
+ * { label: 'File', submenu: [
2022
+ * { label: 'New backup…', accelerator: 'mod+n', action: () => this.create() },
2023
+ * { label: 'Pause backups', type: 'checkbox', checked: this.paused(), action: () => this.togglePause() },
2024
+ * { type: 'separator' },
2025
+ * { role: 'close' },
2026
+ * ]},
2027
+ * { role: 'editMenu' },
2028
+ * { role: 'windowMenu' },
2029
+ * ]);
2030
+ * ```
2031
+ * ```html
2032
+ * <sn-menubar [menu]="menu()" />
2033
+ * ```
2034
+ *
2035
+ * Pass a new array to update it (a `computed` is the easy way): the native menu is sent again.
2036
+ * In the page: F10 focuses the bar (Windows, Linux), ← → move between menus, ↓ or Enter opens one.
2037
+ */
2038
+ export declare class SnMenubar {
2039
+ /** The menus: top-level items with a `submenu` (or a role such as `editMenu`). */
2040
+ readonly menu: import("@angular/core").InputSignal<readonly SnMenuItem[]>;
2041
+ /** When to use the host's native menu bar. Default: `auto` (macOS only). */
2042
+ readonly native: import("@angular/core").InputSignal<SnMenubarNative>;
2043
+ /** Accessible name of the in-page bar. */
2044
+ readonly ariaLabel: import("@angular/core").InputSignal<string>;
2045
+ protected readonly skin: import("@angular/core").Signal<import("@spartan-native/theme").Skin>;
2046
+ protected readonly family: import("@angular/core").Signal<import("@spartan-native/theme").PlatformFamily>;
2047
+ /** The real OS: what the keyboard, the shortcut notation and the macOS menu bar follow. */
2048
+ protected readonly platform: import("@angular/core").Signal<import("@spartan-native/theme").PlatformFamily>;
2049
+ private readonly menus;
2050
+ private readonly hostWindow;
2051
+ private readonly element;
2052
+ private readonly bar;
2053
+ /** The menu bar is the host's native one. */
2054
+ readonly isNative: import("@angular/core").Signal<boolean>;
2055
+ /** The menu as drawn in the page: roles replaced by ordinary items. */
2056
+ protected readonly pageMenu: import("@angular/core").Signal<SnMenuItem[]>;
2057
+ private readonly accelerated;
2058
+ /** The field that had the focus before the menu bar took it (Edit commands act on it). */
2059
+ private lastFocus;
2060
+ protected readonly restoreFocus: () => false | void | undefined;
2061
+ constructor();
2062
+ protected onDocumentKeydown(event: KeyboardEvent): void;
2063
+ protected onDocumentFocusin(event: FocusEvent): void;
2064
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnMenubar, never>;
2065
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnMenubar, "sn-menubar", never, {
2066
+ "menu": {
2067
+ "alias": "menu";
2068
+ "required": true;
2069
+ "isSignal": true;
2070
+ };
2071
+ "native": {
2072
+ "alias": "native";
2073
+ "required": false;
2074
+ "isSignal": true;
2075
+ };
2076
+ "ariaLabel": {
2077
+ "alias": "ariaLabel";
2078
+ "required": false;
2079
+ "isSignal": true;
2080
+ };
2081
+ }, {}, never, never, true, never>;
2082
+ }
2083
+ /**
2084
+ * A context menu on an element, from the same menu data as `<sn-menubar>`:
2085
+ * - with a host that has native menus (Wails): the OS's own context menu
2086
+ * - otherwise: an in-page menu at the pointer, drawn by the skin's menu styles
2087
+ *
2088
+ * Right-click, the Menu key and Shift+F10 open it. Roles such as `cut`, `copy`, `paste` and
2089
+ * `selectAll` are the OS's items natively, and act on the focused field in the page.
2090
+ *
2091
+ * ```html
2092
+ * <li [snContextMenu]="fileMenu(file)">{{ file.name }}</li>
2093
+ * ```
2094
+ * ```ts
2095
+ * fileMenu(file: File): SnMenuItem[] {
2096
+ * return [
2097
+ * { label: 'Restore', action: () => this.restore(file) },
2098
+ * { label: 'Rename', accelerator: 'f2', action: () => this.rename(file) },
2099
+ * { type: 'separator' },
2100
+ * { label: 'Delete', accelerator: 'delete', action: () => this.remove(file) },
2101
+ * ];
2102
+ * }
2103
+ * ```
2104
+ *
2105
+ * The accelerators are shown, not bound: bind them where the selection lives.
2106
+ */
2107
+ export declare class SnContextMenu {
2108
+ /** The menu. */
2109
+ readonly items: import("@angular/core").InputSignal<readonly SnMenuItem[]>;
2110
+ /** `never` keeps the in-page menu even when the host has native menus. */
2111
+ readonly native: import("@angular/core").InputSignal<"auto" | "never">;
2112
+ readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
2113
+ private readonly trigger;
2114
+ private readonly menus;
2115
+ private readonly hostWindow;
2116
+ private readonly element;
2117
+ /** The real OS: shortcut notation and the Edit roles' keys follow the keyboard, not the skin. */
2118
+ private readonly family;
2119
+ /** The OS shows the menu. */
2120
+ private readonly useNative;
2121
+ constructor();
2122
+ protected onContextMenu(event: MouseEvent): void;
2123
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnContextMenu, never>;
2124
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SnContextMenu, "[snContextMenu]", never, {
2125
+ "items": {
2126
+ "alias": "snContextMenu";
2127
+ "required": true;
2128
+ "isSignal": true;
2129
+ };
2130
+ "native": {
2131
+ "alias": "snContextMenuNative";
2132
+ "required": false;
2133
+ "isSignal": true;
2134
+ };
2135
+ "disabled": {
2136
+ "alias": "snContextMenuDisabled";
2137
+ "required": false;
2138
+ "isSignal": true;
2139
+ };
2140
+ }, {}, never, never, true, [{
2141
+ directive: typeof i1.CdkContextMenuTrigger;
2142
+ inputs: {};
2143
+ outputs: {};
2144
+ }]>;
2145
+ }
2146
+ export declare function formatShortcut(shortcut: string, family: PlatformFamily): string;
2147
+ /**
2148
+ * Shows a shortcut in the notation of the keyboard the user really has: the real OS
2149
+ * (`injectPlatformFamily()`), not the skin, so a Mac dressed as Windows still shows ⌘.
2150
+ * - macOS: symbols in Apple's order, no separators (⇧⌘S)
2151
+ * - Windows, Linux, ChromeOS, web: words joined with `+` (Ctrl+Shift+S)
2152
+ *
2153
+ * The text is also the element's aria-label, so screen readers read the same thing.
2154
+ *
2155
+ * ```html
2156
+ * <kbd snShortcut="mod+shift+s"></kbd> <!-- ⇧⌘S on macOS, Ctrl+Shift+S elsewhere -->
2157
+ * ```
2158
+ */
2159
+ export declare class SnShortcut {
2160
+ /** The shortcut in the portable notation, e.g. `mod+shift+s`. */
2161
+ readonly shortcut: import("@angular/core").InputSignal<string>;
2162
+ protected readonly skin: import("@angular/core").Signal<import("@spartan-native/theme").Skin>;
2163
+ protected readonly family: import("@angular/core").Signal<PlatformFamily>;
2164
+ protected readonly text: import("@angular/core").Signal<string>;
2165
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnShortcut, never>;
2166
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SnShortcut, "[snShortcut]", never, {
2167
+ "shortcut": {
2168
+ "alias": "snShortcut";
2169
+ "required": true;
2170
+ "isSignal": true;
2171
+ };
2172
+ }, {}, never, never, true, never>;
2173
+ }
2174
+ /**
2175
+ * A skin or a whole family.
2176
+ * Skins: 'win' (Windows 11), 'w10' (Windows 10), 'mac' (macOS 26), 'macc' (macOS 13–15),
2177
+ * 'gtk' (GNOME), 'qt' (KDE Plasma), 'cros' (ChromeOS).
2178
+ * Families: 'windows' (win, w10), 'macos' (mac, macc), 'linux' (gtk, qt), 'chromeos' (cros), 'web'.
2179
+ */
2180
+ type PlatformMatch = Skin | PlatformFamily;
2181
+ /**
2182
+ * Renders its template only on the given platforms: a skin, a family, or a list of either
2183
+ * (see PlatformMatch). Follows the skin live. With `else`, renders that template instead.
2184
+ *
2185
+ * ```html
2186
+ * <p *snPlatformIf="'macos'; else other">Use the menu bar.</p>
2187
+ * <ng-template #other><p>Use the ☰ menu.</p></ng-template>
2188
+ *
2189
+ * <button *snPlatformIf="['windows', 'linux']">Exit</button>
2190
+ * <p *snPlatformIf="'qt'">Plasma only: also in System Settings.</p>
2191
+ * ```
2192
+ */
2193
+ export declare class SnPlatformIf {
2194
+ /** The skins and families to render on. */
2195
+ readonly platforms: import("@angular/core").InputSignal<PlatformMatch | readonly PlatformMatch[]>;
2196
+ /** Rendered on every other platform. */
2197
+ readonly elseTemplate: import("@angular/core").InputSignal<TemplateRef<unknown> | null>;
2198
+ private readonly template;
2199
+ private readonly container;
2200
+ private readonly skin;
2201
+ private shown;
2202
+ constructor();
2203
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnPlatformIf, never>;
2204
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SnPlatformIf, "[snPlatformIf]", never, {
2205
+ "platforms": {
2206
+ "alias": "snPlatformIf";
2207
+ "required": true;
2208
+ "isSignal": true;
2209
+ };
2210
+ "elseTemplate": {
2211
+ "alias": "snPlatformIfElse";
2212
+ "required": false;
2213
+ "isSignal": true;
2214
+ };
2215
+ }, {}, never, never, true, never>;
2216
+ }
2217
+ export declare const SnWindowImports: readonly [typeof SnTitleBar, typeof SnWindowControls, typeof import("@spartan-native/desktop-ui").SnStatusBar, typeof import("@spartan-native/desktop-ui").SnStatusItem];
2218
+ export declare const SnControlsImports: readonly [typeof import("@spartan-native/desktop-ui").SnSplitButton, typeof import("@spartan-native/desktop-ui").SnSplitButtonMenu, typeof SnNumberBox, typeof import("@spartan-native/desktop-ui").SnTree, typeof import("@spartan-native/desktop-ui").SnTreeItem, typeof SnTooltip, typeof SnSearchField, typeof SnResizable];
2219
+ export declare const SnMenuImports: readonly [typeof SnMenubar, typeof SnContextMenu];
2220
+ export declare const SnSettingsImports: readonly [typeof SnSettingsGroup, typeof SnSettingsRow];
2221
+ export declare const SnPlatformImports: readonly [typeof SnPlatformIf, typeof SnShortcut];
2222
+ export declare const SnDesktopUiImports: readonly [typeof SnTitleBar, typeof SnWindowControls, typeof import("@spartan-native/desktop-ui").SnStatusBar, typeof import("@spartan-native/desktop-ui").SnStatusItem, typeof SnSettingsGroup, typeof SnSettingsRow, typeof SnStatusPage, typeof import("@spartan-native/desktop-ui").SnCommandBar, typeof import("@spartan-native/desktop-ui").SnCommand, typeof import("@spartan-native/desktop-ui").SnCommandGroup, typeof import("@spartan-native/desktop-ui").SnCommandOverflow, typeof import("@spartan-native/desktop-ui").SnPageCommandsTemplate, typeof import("@spartan-native/desktop-ui").SnCoachMark, typeof import("@spartan-native/desktop-ui").SnCoachMarkFor, typeof SnModalSheet, typeof import("@spartan-native/desktop-ui").SnInspectorLayout, typeof import("@spartan-native/desktop-ui").SnInspector, typeof import("@spartan-native/desktop-ui").SnInspectorSection, typeof import("@spartan-native/desktop-ui").SnInspectorProperty, typeof import("@spartan-native/desktop-ui").SnSidebarNav, typeof import("@spartan-native/desktop-ui").SnSidebarSection, typeof import("@spartan-native/desktop-ui").SnSidebarItem, typeof import("@spartan-native/desktop-ui").SnAssistant, typeof import("@spartan-native/desktop-ui").SnAssistantPage, typeof import("@spartan-native/desktop-ui").SnChecklist, typeof import("@spartan-native/desktop-ui").SnChecklistItem, typeof import("@spartan-native/desktop-ui").SnSplitButton, typeof import("@spartan-native/desktop-ui").SnSplitButtonMenu, typeof SnNumberBox, typeof import("@spartan-native/desktop-ui").SnTree, typeof import("@spartan-native/desktop-ui").SnTreeItem, typeof SnTooltip, typeof SnSearchField, typeof SnResizable, typeof SnMenubar, typeof SnContextMenu, typeof SnPlatformIf, typeof SnShortcut];
2223
+ export type { CoachMarkPlacement, CoachMarkSide, EditCommand, PlatformMatch, SnCommandBarCollapse, SnCommandBarTitlePosition, SnConfirmOptions, SnMenuItem, SnMenuWindowActions, SnMenubarNative, SnResizeEdge, SnSplitButtonVariant, WindowButton };