ng-hub-ui-nav 21.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1280 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { InjectionToken, TemplateRef, AfterViewInit, OnDestroy, OnInit } from '@angular/core';
3
+ import * as ng_hub_ui_nav from 'ng-hub-ui-nav';
4
+
5
+ /**
6
+ * Configuration for the `hub-nav` component.
7
+ * All properties are optional — defaults are applied via `HubNavConfigService`.
8
+ */
9
+ interface HubNavConfig {
10
+ /**
11
+ * Orientation of the navigation menu.
12
+ * - `horizontal`: Top navigation bar.
13
+ * - `vertical`: Side navigation bar.
14
+ * @default 'horizontal'
15
+ */
16
+ orientation: HubNavOrientation;
17
+ /**
18
+ * Expansion mode for child items in vertical orientation.
19
+ * - `accordion`: Children expand/collapse inline with animation.
20
+ * - `flyout`: Children appear as a positioned side panel.
21
+ * @default 'accordion'
22
+ */
23
+ verticalExpandMode: HubNavVerticalExpandMode;
24
+ /**
25
+ * Trigger mechanism for opening dropdowns.
26
+ * - `hover`: Open on mouse hover.
27
+ * - `click`: Open on click.
28
+ * - `both`: Open on hover or click.
29
+ * @default 'click'
30
+ */
31
+ dropdownTrigger: HubNavDropdownTrigger;
32
+ /**
33
+ * CSS positioning strategy for the nav container.
34
+ * Sticky positioning is only activated for vertical, non-collapsed navs.
35
+ * @default 'static'
36
+ */
37
+ position: HubNavPosition;
38
+ /**
39
+ * Top offset used when sticky positioning is enabled.
40
+ * Accepts any valid CSS length value.
41
+ * @default '0px'
42
+ */
43
+ stickyTop: string;
44
+ /**
45
+ * Display mode when the menu collapses on smaller viewports.
46
+ * - `offcanvas`: Slide-in drawer panel.
47
+ * - `dropdown`: Panel drops below the toggler.
48
+ * - `fullscreen`: Full-screen overlay.
49
+ * @default 'offcanvas'
50
+ */
51
+ collapseMode: HubNavCollapseMode;
52
+ /**
53
+ * Viewport width in pixels below which the menu collapses.
54
+ * Set to `0` to disable responsive collapsing.
55
+ * @default 992
56
+ */
57
+ collapseBreakpoint: number;
58
+ /**
59
+ * Position from which the offcanvas panel slides in.
60
+ * Only applicable when `collapseMode` is `'offcanvas'`.
61
+ * @default 'start'
62
+ */
63
+ offcanvasPosition: HubNavOffcanvasPosition;
64
+ /**
65
+ * Accessible label for the `<nav>` element.
66
+ * @default 'Navigation'
67
+ */
68
+ ariaLabel: string;
69
+ /**
70
+ * Maximum number of simultaneously visible panels in panel expand mode.
71
+ * When exceeded, the last panel uses drill-down (replaces its content with back navigation).
72
+ * Only applies when `verticalExpandMode` is `'panel'` or individual items have `expandMode: 'panel'`.
73
+ * @default 3
74
+ */
75
+ panelMaxVisible: number;
76
+ /**
77
+ * Physical side where the sidebar is placed.
78
+ * - `left`: Sidebar on the left, panels extend to the right.
79
+ * - `right`: Sidebar on the right, panels extend to the left.
80
+ * @default 'left'
81
+ */
82
+ sidebarSide: HubNavSidebarSide;
83
+ /**
84
+ * Width of each panel in panel expand mode.
85
+ * Accepts any valid CSS width value.
86
+ * @default '16rem'
87
+ */
88
+ panelWidth: string;
89
+ }
90
+ /** Orientation of the navigation layout. */
91
+ type HubNavOrientation = 'horizontal' | 'vertical';
92
+ /** Expansion mode for vertical child items. */
93
+ type HubNavVerticalExpandMode = 'accordion' | 'flyout' | 'panel';
94
+ /** Physical placement side of the sidebar navigation. */
95
+ type HubNavSidebarSide = 'left' | 'right';
96
+ /** Trigger mechanism for dropdown menus. */
97
+ type HubNavDropdownTrigger = 'hover' | 'click' | 'both';
98
+ /** CSS positioning strategy. */
99
+ type HubNavPosition = 'static' | 'sticky' | 'fixed';
100
+ /** Collapse display mode for responsive viewports. */
101
+ type HubNavCollapseMode = 'offcanvas' | 'dropdown' | 'fullscreen';
102
+ /** Offcanvas slide-in direction. */
103
+ type HubNavOffcanvasPosition = 'start' | 'end' | 'top' | 'bottom';
104
+
105
+ /**
106
+ * Represents a single navigation item in the menu hierarchy.
107
+ * Supports unlimited nesting through the `children` property.
108
+ */
109
+ interface HubNavItem {
110
+ /** Unique identifier for the item. */
111
+ id: string;
112
+ /** Visible text label. */
113
+ label: string;
114
+ /**
115
+ * Type of navigation item.
116
+ * - `link`: Navigable item with routerLink.
117
+ * - `dropdown`: Parent item that opens a submenu with children.
118
+ * - `header`: Non-clickable section header text.
119
+ * - `separator`: Visual divider between groups.
120
+ * - `custom`: Custom content rendered via template directive.
121
+ */
122
+ type: HubNavItemType;
123
+ /** Icon CSS class or identifier (e.g., `'bi bi-house'`). */
124
+ icon?: string;
125
+ /** Route path for `routerLink`. Can be a string or an array of segments. */
126
+ route?: string | string[];
127
+ /** Query parameters for `routerLink`. */
128
+ queryParams?: Record<string, string>;
129
+ /** URL fragment for `routerLink`. */
130
+ fragment?: string;
131
+ /** Options for `routerLinkActive` matching. */
132
+ routerLinkActiveOptions?: {
133
+ exact: boolean;
134
+ };
135
+ /** Child items for dropdown/nested menus. Supports unlimited depth. */
136
+ children?: HubNavItem[];
137
+ /** Badge text displayed alongside the label (e.g., notification count). */
138
+ badge?: string;
139
+ /** CSS class applied to the badge element. */
140
+ badgeClass?: string;
141
+ /** Whether the item is disabled (visually muted, non-interactive). */
142
+ disabled?: boolean;
143
+ /** Additional CSS class applied to the item element. */
144
+ cssClass?: string;
145
+ /** Arbitrary consumer data attached to the item. */
146
+ data?: unknown;
147
+ /**
148
+ * Per-item override for how children are expanded.
149
+ * If set, overrides the global `verticalExpandMode` for this specific item.
150
+ * - `accordion`: Children expand inline.
151
+ * - `flyout`: Children appear as a positioned dropdown.
152
+ * - `panel`: Children open in a new stacked side panel.
153
+ */
154
+ expandMode?: HubNavVerticalExpandMode;
155
+ }
156
+ /** Allowed types for navigation items. */
157
+ type HubNavItemType = 'link' | 'dropdown' | 'header' | 'separator' | 'custom';
158
+
159
+ /**
160
+ * Template context provided to the `hubNavItemTemplate` directive.
161
+ * Allows consumers to customize how individual nav items are rendered.
162
+ */
163
+ interface HubNavItemTemplateContext {
164
+ /** The navigation item being rendered. */
165
+ $implicit: HubNavItem;
166
+ /** Whether the item (or one of its descendants) is currently active. */
167
+ active: boolean;
168
+ /** Whether the item's dropdown is currently expanded (only for `type: 'dropdown'`). */
169
+ expanded: boolean;
170
+ /** Nesting depth level (0 = root level). */
171
+ depth: number;
172
+ }
173
+ /**
174
+ * Template context provided to the `hubNavStart` directive.
175
+ */
176
+ interface HubNavStartTemplateContext {
177
+ /** Whether the navigation menu is currently collapsed (mobile viewport). */
178
+ collapsed: boolean;
179
+ }
180
+ /**
181
+ * Template context provided to the `hubNavEnd` directive.
182
+ */
183
+ interface HubNavEndTemplateContext {
184
+ /** Whether the navigation menu is currently collapsed (mobile viewport). */
185
+ collapsed: boolean;
186
+ }
187
+
188
+ /**
189
+ * Event emitted when a navigation item is clicked.
190
+ */
191
+ interface HubNavItemClickEvent {
192
+ /** The item that was clicked. */
193
+ item: HubNavItem;
194
+ /** The original DOM event. */
195
+ originalEvent: Event;
196
+ }
197
+ /**
198
+ * Event emitted when a dropdown opens or closes.
199
+ */
200
+ interface HubNavDropdownEvent {
201
+ /** The dropdown parent item. */
202
+ item: HubNavItem;
203
+ /** Whether the dropdown is now open. */
204
+ open: boolean;
205
+ }
206
+ /** Action type for panel events. */
207
+ type HubNavPanelAction = 'open' | 'close' | 'drill-down' | 'drill-back';
208
+ /**
209
+ * Event emitted when a panel opens, closes, or performs drill-down navigation.
210
+ */
211
+ interface HubNavPanelEvent {
212
+ /** The parent item whose children are displayed in the panel. */
213
+ item: HubNavItem;
214
+ /** Zero-based index of the panel in the stack. */
215
+ panelIndex: number;
216
+ /** The action that triggered this event. */
217
+ action: HubNavPanelAction;
218
+ }
219
+
220
+ /**
221
+ * Represents a single entry in the drill-down history stack of a panel.
222
+ */
223
+ interface HubNavPanelHistoryEntry {
224
+ /** The items that were displayed before the drill-down. */
225
+ items: HubNavItem[];
226
+ /** The parent item of the previous level (used when navigating back). */
227
+ parentItem: HubNavItem;
228
+ }
229
+ /**
230
+ * Represents the state of a single panel in the stacked panel navigation.
231
+ */
232
+ interface HubNavPanelState {
233
+ /** Unique identifier for this panel instance. */
234
+ id: string;
235
+ /** The parent item that triggered opening this panel. */
236
+ parentItem: HubNavItem;
237
+ /** The items currently displayed in this panel. */
238
+ items: HubNavItem[];
239
+ /** History stack for drill-down navigation within this panel. */
240
+ history: HubNavPanelHistoryEntry[];
241
+ /** Whether this panel is currently in drill-down mode (has history entries). */
242
+ isDrillDown: boolean;
243
+ }
244
+
245
+ /**
246
+ * Injection token for providing global nav configuration at application startup.
247
+ *
248
+ * @example
249
+ * ```typescript
250
+ * import { HUB_NAV_CONFIG } from 'ng-hub-ui-nav';
251
+ *
252
+ * export const appConfig: ApplicationConfig = {
253
+ * providers: [
254
+ * {
255
+ * provide: HUB_NAV_CONFIG,
256
+ * useValue: {
257
+ * orientation: 'vertical',
258
+ * dropdownTrigger: 'hover',
259
+ * collapseBreakpoint: 768
260
+ * }
261
+ * }
262
+ * ]
263
+ * };
264
+ * ```
265
+ */
266
+ declare const HUB_NAV_CONFIG: InjectionToken<Partial<HubNavConfig>>;
267
+ /**
268
+ * Global configuration service for `hub-nav` components.
269
+ * Provides centralized configuration management with signal-based reactivity.
270
+ *
271
+ * @example
272
+ * ```typescript
273
+ * const configService = inject(HubNavConfigService);
274
+ * configService.updateConfig({ orientation: 'vertical' });
275
+ * const config = configService.getConfig();
276
+ * ```
277
+ */
278
+ declare class HubNavConfigService {
279
+ /** Signal containing the current global configuration. */
280
+ private config;
281
+ /**
282
+ * Returns the current configuration as a readonly signal.
283
+ *
284
+ * @returns Readonly signal with the current `HubNavConfig`.
285
+ */
286
+ getConfig(): _angular_core.Signal<HubNavConfig>;
287
+ /**
288
+ * Returns the default configuration values.
289
+ *
290
+ * @returns A copy of the default `HubNavConfig`.
291
+ */
292
+ getDefaults(): HubNavConfig;
293
+ /**
294
+ * Merges the given partial configuration into the current config.
295
+ *
296
+ * @param partial - Partial configuration to merge.
297
+ */
298
+ updateConfig(partial: Partial<HubNavConfig>): void;
299
+ /**
300
+ * Resets the configuration to factory defaults.
301
+ */
302
+ resetToDefaults(): void;
303
+ /**
304
+ * Resolves a complete config by merging defaults with the given partial overrides.
305
+ * Used internally by `hub-nav` to merge component-level inputs with global defaults.
306
+ *
307
+ * @param overrides - Partial configuration from the component input.
308
+ * @returns A complete `HubNavConfig`.
309
+ */
310
+ resolve(overrides: Partial<HubNavConfig>): HubNavConfig;
311
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubNavConfigService, never>;
312
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<HubNavConfigService>;
313
+ }
314
+
315
+ /**
316
+ * Internal state management service for a single `hub-nav` instance.
317
+ * Scoped per component — provided at the component level, not root.
318
+ *
319
+ * Manages:
320
+ * - Resolved configuration.
321
+ * - Open dropdown tracking.
322
+ * - Mobile menu state.
323
+ * - Active route propagation.
324
+ * - Panel stack for drill-down navigation.
325
+ */
326
+ declare class HubNavStateService {
327
+ /** Currently resolved configuration. */
328
+ private _config;
329
+ /** Set of dropdown item IDs that are currently open. */
330
+ private _openDropdowns;
331
+ /** Whether the mobile panel is open. */
332
+ private _mobileOpen;
333
+ /** Whether the viewport is below the collapse breakpoint. */
334
+ private _collapsed;
335
+ /** Stack of open panels for panel expand mode. */
336
+ private _panelStack;
337
+ /** Auto-incrementing counter for unique panel IDs. */
338
+ private _panelIdCounter;
339
+ /** Readonly config signal. */
340
+ readonly config: _angular_core.Signal<HubNavConfig>;
341
+ /** Readonly mobile-open signal. */
342
+ readonly mobileOpen: _angular_core.Signal<boolean>;
343
+ /** Readonly collapsed signal. */
344
+ readonly collapsed: _angular_core.Signal<boolean>;
345
+ /** Readonly panel stack signal. */
346
+ readonly panelStack: _angular_core.Signal<HubNavPanelState[]>;
347
+ /** Number of currently open panels. */
348
+ readonly panelCount: _angular_core.Signal<number>;
349
+ /** Computed orientation shortcut. */
350
+ readonly orientation: _angular_core.Signal<ng_hub_ui_nav.HubNavOrientation>;
351
+ /** Computed vertical expand mode shortcut. */
352
+ readonly verticalExpandMode: _angular_core.Signal<HubNavVerticalExpandMode>;
353
+ /** Computed dropdown trigger shortcut. */
354
+ readonly dropdownTrigger: _angular_core.Signal<ng_hub_ui_nav.HubNavDropdownTrigger>;
355
+ /**
356
+ * Updates the resolved configuration.
357
+ *
358
+ * @param config - Full resolved configuration.
359
+ */
360
+ setConfig(config: HubNavConfig): void;
361
+ /**
362
+ * Normalizes the panel stack after config changes.
363
+ *
364
+ * This is required when `panelMaxVisible` changes after panels were already
365
+ * opened (for example during initial input binding in the host app shell).
366
+ * Without this reconciliation, the UI can temporarily render more panels
367
+ * than allowed or keep a last panel without header while its parent panel
368
+ * is no longer visible.
369
+ *
370
+ * @param config - The latest resolved configuration.
371
+ */
372
+ private reconcilePanelStackWithConfig;
373
+ /**
374
+ * Checks whether a dropdown with the given item ID is open.
375
+ *
376
+ * @param id - Item ID to check.
377
+ * @returns `true` if the dropdown is open.
378
+ */
379
+ isDropdownOpen(id: string): boolean;
380
+ /**
381
+ * Opens a dropdown by item ID.
382
+ * In accordion mode, closes sibling dropdowns at the same level.
383
+ *
384
+ * @param id - Item ID to open.
385
+ * @param siblings - Optional array of sibling item IDs to close when opening this one.
386
+ */
387
+ openDropdown(id: string, siblings?: string[]): void;
388
+ /**
389
+ * Closes a dropdown by item ID.
390
+ *
391
+ * @param id - Item ID to close.
392
+ */
393
+ closeDropdown(id: string): void;
394
+ /**
395
+ * Toggles a dropdown open/closed by item ID.
396
+ *
397
+ * @param id - Item ID to toggle.
398
+ * @returns `true` if the dropdown is now open.
399
+ */
400
+ toggleDropdown(id: string): boolean;
401
+ /** Closes all open dropdowns. */
402
+ closeAllDropdowns(): void;
403
+ /**
404
+ * Synchronizes the open dropdown set with the current active route.
405
+ * Only ancestor items in the active trail remain open.
406
+ *
407
+ * @param items - Root navigation items to inspect.
408
+ * @param activeRoute - Current router URL including optional fragment.
409
+ */
410
+ syncDropdownsWithRoute(items: HubNavItem[], activeRoute: string): void;
411
+ /**
412
+ * Sets the mobile panel open state.
413
+ *
414
+ * @param open - Whether the mobile panel should be open.
415
+ */
416
+ setMobileOpen(open: boolean): void;
417
+ /** Toggles the mobile panel. */
418
+ toggleMobile(): void;
419
+ /**
420
+ * Sets the collapsed state (below breakpoint).
421
+ *
422
+ * @param collapsed - Whether the viewport is below the collapse breakpoint.
423
+ */
424
+ setCollapsed(collapsed: boolean): void;
425
+ /**
426
+ * Opens a new panel for the given parent item's children.
427
+ * If the panel count has reached `panelMaxVisible`, drills down within the last panel instead.
428
+ *
429
+ * @param parentItem - The item whose children should be displayed in the panel.
430
+ * @param rootItems - The root-level navigation items (to determine if parentItem is at root level).
431
+ */
432
+ openPanel(parentItem: HubNavItem, rootItems?: HubNavItem[]): void;
433
+ /**
434
+ * Finds the depth (index) where a panel for the given item should be placed.
435
+ * Returns the index of the first panel whose items contain parentItem,
436
+ * or -1 if parentItem is not found in any panel.
437
+ *
438
+ * @param parentItem - The item to search for.
439
+ * @param stack - The current panel stack.
440
+ * @returns The panel index, or -1 if not found.
441
+ */
442
+ private findPanelDepth;
443
+ /**
444
+ * Finds the ordered list of dropdown ancestor IDs for the active route.
445
+ *
446
+ * @param items - Items to search recursively.
447
+ * @param activeRoute - Current router URL.
448
+ * @param trail - Accumulated ancestor trail.
449
+ * @returns Ancestor IDs that must remain expanded.
450
+ */
451
+ private findActiveDropdownTrail;
452
+ /**
453
+ * Closes a panel by its ID and all panels opened after it.
454
+ *
455
+ * @param panelId - ID of the panel to close.
456
+ */
457
+ closePanel(panelId: string): void;
458
+ /**
459
+ * Closes all panels from the given index onward.
460
+ *
461
+ * @param index - Zero-based index from which to start closing.
462
+ */
463
+ closePanelsFromIndex(index: number): void;
464
+ /** Closes all open panels. */
465
+ closeAllPanels(): void;
466
+ /**
467
+ * Performs a drill-down within an existing panel: pushes current items to history
468
+ * and replaces them with the new item's children.
469
+ *
470
+ * @param panelId - ID of the panel to drill down in.
471
+ * @param parentItem - The item whose children will replace the panel content.
472
+ * @param items - The new items to display.
473
+ */
474
+ drillDownInPanel(panelId: string, parentItem: HubNavItem, items: HubNavItem[]): void;
475
+ /**
476
+ * Navigates back one level in a panel's drill-down history.
477
+ * If there is no history, the panel is closed.
478
+ *
479
+ * @param panelId - ID of the panel to navigate back in.
480
+ */
481
+ navigateBackInPanel(panelId: string): void;
482
+ /**
483
+ * Retrieves a panel by its ID.
484
+ *
485
+ * @param panelId - ID of the panel to find.
486
+ * @returns The panel state, or `undefined` if not found.
487
+ */
488
+ getPanelById(panelId: string): HubNavPanelState | undefined;
489
+ /**
490
+ * Checks whether there is an open panel whose parent item matches the given ID.
491
+ *
492
+ * @param itemId - Parent item ID to match against the panel stack.
493
+ * @returns `true` when a panel for the given item is currently open.
494
+ */
495
+ isPanelOpenForItem(itemId: string): boolean;
496
+ /**
497
+ * Resolves the effective expand mode for an item, considering:
498
+ * 1. Per-item `expandMode` override.
499
+ * 2. Global `verticalExpandMode` from config.
500
+ * 3. Fallback to `'accordion'` when collapsed (mobile).
501
+ *
502
+ * @param item - The item to resolve the expand mode for.
503
+ * @returns The effective expand mode.
504
+ */
505
+ getEffectiveExpandMode(item: HubNavItem): HubNavVerticalExpandMode;
506
+ /**
507
+ * Recursively checks whether the given item or any of its descendants
508
+ * match the provided active route.
509
+ *
510
+ * @param item - Item to check.
511
+ * @param activeRoute - Currently active route path.
512
+ * @returns `true` if the item or a descendant is active.
513
+ */
514
+ isItemOrDescendantActive(item: HubNavItem, activeRoute: string): boolean;
515
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubNavStateService, never>;
516
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<HubNavStateService>;
517
+ }
518
+
519
+ /**
520
+ * Structural directive that projects content into the navigation start slot.
521
+ *
522
+ * Slot behavior:
523
+ * - Horizontal nav: appears at the visual start (left in LTR, right in RTL).
524
+ * - Vertical nav: appears at the top of the primary column.
525
+ *
526
+ * The template receives a {@link HubNavStartTemplateContext}.
527
+ */
528
+ declare class HubNavStartDirective {
529
+ /** Reference to the projected template. */
530
+ readonly template: TemplateRef<any>;
531
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubNavStartDirective, never>;
532
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<HubNavStartDirective, "[hubNavStart]", never, {}, {}, never, never, true, never>;
533
+ }
534
+
535
+ /**
536
+ * Structural directive that projects content into the navigation end slot.
537
+ *
538
+ * Slot behavior:
539
+ * - Horizontal nav: appears at the visual end (right in LTR, left in RTL).
540
+ * - Vertical nav: appears at the bottom of the primary column.
541
+ *
542
+ * The template receives a {@link HubNavEndTemplateContext}.
543
+ */
544
+ declare class HubNavEndDirective {
545
+ /** Reference to the projected template. */
546
+ readonly template: TemplateRef<any>;
547
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubNavEndDirective, never>;
548
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<HubNavEndDirective, "[hubNavEnd]", never, {}, {}, never, never, true, never>;
549
+ }
550
+
551
+ /**
552
+ * Structural directive that provides a custom template for rendering individual nav items.
553
+ * When present, each nav item is rendered using this template instead of the default markup.
554
+ *
555
+ * The template receives a {@link HubNavItemTemplateContext} with `$implicit` (the item),
556
+ * `active`, `expanded`, and `depth`.
557
+ *
558
+ * @example
559
+ * ```html
560
+ * <hub-nav [items]="menuItems">
561
+ * <ng-template hubNavItemTemplate let-item let-active="active" let-depth="depth">
562
+ * <div class="custom-item" [class.active]="active">
563
+ * <i [class]="item.icon"></i>
564
+ * {{ item.label }}
565
+ * </div>
566
+ * </ng-template>
567
+ * </hub-nav>
568
+ * ```
569
+ */
570
+ declare class HubNavItemTemplateDirective {
571
+ /** Reference to the template provided by the consumer. */
572
+ readonly template: TemplateRef<any>;
573
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubNavItemTemplateDirective, never>;
574
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<HubNavItemTemplateDirective, "[hubNavItemTemplate]", never, {}, {}, never, never, true, never>;
575
+ }
576
+
577
+ /**
578
+ * Scroll spy container directive that tracks the currently visible section and
579
+ * emits section changes using `IntersectionObserver`.
580
+ */
581
+ declare class HubNavScrollSpyDirective implements AfterViewInit, OnDestroy {
582
+ /** Enables or disables section tracking. */
583
+ readonly enabled: _angular_core.InputSignal<boolean>;
584
+ /** Top offset in pixels to compensate sticky headers. */
585
+ readonly offset: _angular_core.InputSignal<number>;
586
+ /** CSS selector used to locate section elements inside the host container. */
587
+ readonly sectionSelector: _angular_core.InputSignal<string>;
588
+ /** Emits the active section id whenever it changes. */
589
+ readonly activeSectionChange: _angular_core.OutputEmitterRef<string>;
590
+ private readonly el;
591
+ private readonly zone;
592
+ private observer;
593
+ private activeId;
594
+ private initialized;
595
+ /** Current active section id (readonly signal). */
596
+ readonly activeSectionId: _angular_core.Signal<string | null>;
597
+ private readonly configEffect;
598
+ /** @inheritDoc */
599
+ ngAfterViewInit(): void;
600
+ /** @inheritDoc */
601
+ ngOnDestroy(): void;
602
+ /**
603
+ * Scrolls to a tracked section by id.
604
+ *
605
+ * @param sectionId - Target section id.
606
+ * @param behavior - Native scroll behavior.
607
+ * @returns `true` when the target exists and scroll was requested.
608
+ */
609
+ scrollTo(sectionId: string, behavior?: ScrollBehavior): boolean;
610
+ private scheduleInit;
611
+ private initializeObserver;
612
+ private destroyObserver;
613
+ private getSectionElements;
614
+ private getSectionId;
615
+ private handleObserverEntries;
616
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubNavScrollSpyDirective, never>;
617
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<HubNavScrollSpyDirective, "[hubNavScrollSpy]", ["hubNavScrollSpy"], { "enabled": { "alias": "hubNavScrollSpy"; "required": false; "isSignal": true; }; "offset": { "alias": "offset"; "required": false; "isSignal": true; }; "sectionSelector": { "alias": "sectionSelector"; "required": false; "isSignal": true; }; }, { "activeSectionChange": "activeSectionChange"; }, never, never, true, never>;
618
+ }
619
+
620
+ /**
621
+ * Marks an element as a trackable section for `HubNavScrollSpyDirective`.
622
+ *
623
+ * If no explicit section id is provided, the directive falls back to the host
624
+ * element `id` attribute.
625
+ */
626
+ declare class HubNavScrollSpySectionDirective {
627
+ /** Optional section id. When omitted, host `id` is used. */
628
+ readonly sectionId: _angular_core.InputSignal<string | null>;
629
+ private readonly el;
630
+ /** Effective section id exposed to the container directive. */
631
+ readonly resolvedSectionId: _angular_core.Signal<any>;
632
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubNavScrollSpySectionDirective, never>;
633
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<HubNavScrollSpySectionDirective, "[hubNavScrollSpySection]", never, { "sectionId": { "alias": "hubNavScrollSpySection"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
634
+ }
635
+
636
+ /**
637
+ * Root navigation component. Renders a horizontal or vertical navigation bar
638
+ * with support for nested dropdowns, responsive collapsing, brand slot, panel
639
+ * drill-down navigation, and custom item templates.
640
+ *
641
+ * @example
642
+ * ```html
643
+ * <hub-nav [items]="menuItems" [config]="{ orientation: 'horizontal' }" />
644
+ * ```
645
+ */
646
+ declare class HubNavComponent implements OnInit, OnDestroy {
647
+ /**
648
+ * Last route path (without query/fragment) used to synchronize panel state.
649
+ * Prevents unnecessary panel rebuilds on fragment-only navigations, e.g.
650
+ * scroll-spy updates in documentation pages.
651
+ */
652
+ private _lastSyncedPath;
653
+ /** Navigation items to render. */
654
+ readonly items: _angular_core.InputSignal<HubNavItem[]>;
655
+ /** Partial configuration overrides (merged with global defaults). */
656
+ readonly config: _angular_core.InputSignal<Partial<HubNavConfig>>;
657
+ /** Additional CSS class for the nav container. */
658
+ readonly navClass: _angular_core.InputSignal<string>;
659
+ /** Optional custom template for rendering nav items (via input binding). */
660
+ readonly itemTemplate: _angular_core.InputSignal<TemplateRef<unknown> | null>;
661
+ /**
662
+ * When `true`, the component automatically opens the panels matching the
663
+ * active router URL on initialization and on every subsequent navigation.
664
+ * Useful for sidebar navigations where the URL should drive the open state.
665
+ */
666
+ readonly autoOpenFromRoute: _angular_core.InputSignal<boolean>;
667
+ /** Start slot template projected via `hubNavStart` directive. */
668
+ private readonly startDirective;
669
+ /** End slot template projected via `hubNavEnd` directive. */
670
+ private readonly endDirective;
671
+ /** Item template projected via `hubNavItemTemplate` directive. */
672
+ private readonly itemTemplateDirective;
673
+ /** Resolved start slot template (from directive content projection). */
674
+ readonly startTemplate: _angular_core.Signal<TemplateRef<any> | null>;
675
+ /** Resolved end slot template (from directive content projection). */
676
+ readonly endTemplate: _angular_core.Signal<TemplateRef<any> | null>;
677
+ /** Resolved item template: directive takes priority over input. */
678
+ readonly resolvedItemTemplate: _angular_core.Signal<TemplateRef<any> | null>;
679
+ /** Start slot context. */
680
+ readonly startContext: _angular_core.Signal<{
681
+ collapsed: boolean;
682
+ }>;
683
+ /** End slot context. */
684
+ readonly endContext: _angular_core.Signal<{
685
+ collapsed: boolean;
686
+ }>;
687
+ /** Emitted when a link item is clicked. */
688
+ readonly itemClick: _angular_core.OutputEmitterRef<HubNavItem>;
689
+ /** Emitted when a dropdown opens. */
690
+ readonly dropdownOpen: _angular_core.OutputEmitterRef<HubNavItem>;
691
+ /** Emitted when a dropdown closes. */
692
+ readonly dropdownClose: _angular_core.OutputEmitterRef<HubNavItem>;
693
+ /** Emitted when the mobile panel toggles. */
694
+ readonly mobileToggle: _angular_core.OutputEmitterRef<boolean>;
695
+ /** Emitted when a panel is opened, drilled-down, or navigated back. */
696
+ readonly panelChange: _angular_core.OutputEmitterRef<HubNavPanelEvent>;
697
+ /** Global config service. */
698
+ private readonly configService;
699
+ /** Scoped state service (provided per component). */
700
+ readonly state: HubNavStateService;
701
+ /** Host element reference for click-outside detection. */
702
+ private readonly elementRef;
703
+ /** NgZone for running outside-click handler inside Angular. */
704
+ private readonly zone;
705
+ /** Angular router for URL-based panel initialization. */
706
+ private readonly router;
707
+ /** Whether component lifecycle initialization has completed. */
708
+ private initialized;
709
+ /** Last applied config signature used to prevent reactive no-op loops. */
710
+ private lastAppliedConfigSignature;
711
+ /** Last breakpoint-related signature used to avoid redundant listener rebinds. */
712
+ private lastBreakpointSignature;
713
+ /** Subscription for router NavigationEnd events. */
714
+ private routerSub?;
715
+ /** Media query list for responsive breakpoint detection. */
716
+ private mediaQuery;
717
+ /** Bound handler for media query changes. */
718
+ private mediaQueryHandler;
719
+ /** Bound handler for window resize fallback. */
720
+ private resizeHandler;
721
+ /** Bound handler for document click events (click-outside). */
722
+ private documentClickHandler;
723
+ /** Resolved config = global defaults + component overrides. */
724
+ readonly resolvedConfig: _angular_core.Signal<HubNavConfig>;
725
+ /** Shortcut to resolved orientation. */
726
+ readonly resolvedOrientation: _angular_core.Signal<ng_hub_ui_nav.HubNavOrientation>;
727
+ /** Whether panels are currently active (panel stack is non-empty). */
728
+ readonly hasPanels: _angular_core.Signal<boolean>;
729
+ /** The sidebar side from resolved config. */
730
+ readonly sidebarSide: _angular_core.Signal<ng_hub_ui_nav.HubNavSidebarSide>;
731
+ /** The panel width from resolved config. */
732
+ readonly panelWidth: _angular_core.Signal<string>;
733
+ /** Sync config to state service whenever it changes. */
734
+ private configEffect;
735
+ /** ARIA label for the nav element. */
736
+ readonly ariaLabel: _angular_core.Signal<string>;
737
+ /** Whether the viewport is below the collapse breakpoint. */
738
+ readonly isCollapsed: _angular_core.Signal<boolean>;
739
+ /** Whether the mobile panel is open. */
740
+ readonly isMobileOpen: _angular_core.Signal<boolean>;
741
+ /** Collapse mode from resolved config. */
742
+ readonly collapseMode: _angular_core.Signal<ng_hub_ui_nav.HubNavCollapseMode>;
743
+ /** Offcanvas position from resolved config. */
744
+ readonly offcanvasPosition: _angular_core.Signal<ng_hub_ui_nav.HubNavOffcanvasPosition>;
745
+ /**
746
+ * Whether sticky positioning should be activated for the current layout.
747
+ * Sticky mode is restricted to vertical navigation and also applies while
748
+ * the nav is collapsed on mobile so the toggler row stays pinned.
749
+ */
750
+ readonly isStickyActive: _angular_core.Signal<boolean>;
751
+ /** @inheritDoc */
752
+ ngOnInit(): void;
753
+ /** @inheritDoc */
754
+ ngOnDestroy(): void;
755
+ /**
756
+ * Handles item click events bubbled up from the item list.
757
+ *
758
+ * @param payload - The clicked item and original DOM event.
759
+ */
760
+ onItemClick(payload: {
761
+ item: HubNavItem;
762
+ event: Event;
763
+ }): void;
764
+ /**
765
+ * Toggles the mobile panel and emits the state change.
766
+ */
767
+ onMobileToggle(): void;
768
+ /**
769
+ * Closes the mobile panel.
770
+ */
771
+ onMobilePanelClose(): void;
772
+ /**
773
+ * Handles dropdown toggle events bubbled up from the item list.
774
+ * The toggle has already been performed in the item-list; this just
775
+ * emits the appropriate output event.
776
+ *
777
+ * @param item - The dropdown item that was toggled.
778
+ */
779
+ onDropdownToggle(item: HubNavItem): void;
780
+ /**
781
+ * Opens a new panel for the given item's children, or drills down if max panels reached.
782
+ * Focuses the first item in the newly opened/drilled panel.
783
+ *
784
+ * @param item - The item whose children should be displayed in a panel.
785
+ */
786
+ onPanelOpen(item: HubNavItem): void;
787
+ /**
788
+ * Closes a panel and all panels opened after it.
789
+ * Returns focus to the previous panel or the main nav trigger.
790
+ *
791
+ * @param panelId - ID of the panel to close.
792
+ */
793
+ onPanelClose(panelId: string): void;
794
+ /**
795
+ * Navigates back within a panel's drill-down history.
796
+ * Focuses the first item after navigating back.
797
+ *
798
+ * @param panelId - ID of the panel to navigate back in.
799
+ */
800
+ onPanelBack(panelId: string): void;
801
+ /**
802
+ * Focuses the first focusable item inside a panel at the given index.
803
+ *
804
+ * @param panelIndex - Zero-based index of the panel in the DOM.
805
+ */
806
+ private focusPanelFirstItem;
807
+ /**
808
+ * Returns focus to the appropriate element after a panel is closed.
809
+ * If a previous panel exists, focuses its trigger for the closed item.
810
+ * Otherwise, returns focus to the main nav item-list.
811
+ *
812
+ * @param closedIndex - The index of the panel that was closed.
813
+ * @param parentItemId - The ID of the parent item that triggered the closed panel.
814
+ */
815
+ private returnFocusAfterPanelClose;
816
+ /**
817
+ * Sets up a `matchMedia` listener for the configured collapse breakpoint.
818
+ */
819
+ private setupBreakpointListener;
820
+ /** Tears down the `matchMedia` listener. */
821
+ private teardownBreakpointListener;
822
+ /**
823
+ * Registers a document click listener that closes dropdowns on outside clicks.
824
+ * Panel drill-down mode panels are NOT closed by outside clicks.
825
+ */
826
+ private setupClickOutsideListener;
827
+ /** Removes the document click listener. */
828
+ private teardownClickOutsideListener;
829
+ /**
830
+ * Callback invoked when the viewport crosses the collapse breakpoint.
831
+ *
832
+ * @param belowBreakpoint - `true` if the viewport is now below the breakpoint.
833
+ */
834
+ private onBreakpointChange;
835
+ /**
836
+ * Recomputes the collapsed state from the current viewport width.
837
+ * This complements `matchMedia` events, which can become unreliable in
838
+ * some browser/devtools combinations when the viewport is resized or
839
+ * docked without emitting the expected media-query change sequence.
840
+ */
841
+ private refreshCollapsedState;
842
+ /**
843
+ * Parses the given URL and opens the panels that correspond to the active route.
844
+ *
845
+ * The algorithm:
846
+ * 1. Extract the path without fragment/query: `/calendar/examples` → `['calendar', 'examples']`
847
+ * 2. Find the root item whose id matches the first segment.
848
+ * 3. Open a panel for that root item (closes any existing panels first).
849
+ * 4. If a second segment exists and matches a child item that has its own
850
+ * children (e.g. the "Examples" dropdown), open a second panel for it.
851
+ *
852
+ * @param url - The full URL including optional fragment, e.g. `/calendar/examples#cal-basic`.
853
+ */
854
+ private openPanelsFromRoute;
855
+ /**
856
+ * Checks whether the first panel in the current stack belongs to the same
857
+ * root route context.
858
+ *
859
+ * This remains true even when panel mode drill-down has replaced the first
860
+ * panel content (the original root items are still present in panel history).
861
+ *
862
+ * @param rootItem - Root nav item resolved from the current route.
863
+ * @param stack - Current panel stack snapshot.
864
+ * @returns `true` when the stack already belongs to the same root context.
865
+ */
866
+ private isRootContextVisible;
867
+ /**
868
+ * Compares two item collections by stable item IDs.
869
+ *
870
+ * @param source - First collection.
871
+ * @param target - Second collection.
872
+ * @returns `true` when both collections contain the same IDs in the same order.
873
+ */
874
+ private isSameItemCollection;
875
+ /**
876
+ * Restores the first panel to the root context when it is currently showing
877
+ * drill-down content for a child section (e.g. the "Examples" third level).
878
+ *
879
+ * @param rootItem - Root nav item resolved from the current route.
880
+ */
881
+ private ensureRootPanelContext;
882
+ /**
883
+ * Extracts the path part from a URL-like string, removing query and fragment.
884
+ *
885
+ * @param url - Router URL.
886
+ * @returns Normalized path for route-state comparisons.
887
+ */
888
+ private extractPath;
889
+ /**
890
+ * Builds a stable signature for the effective nav config so repeated
891
+ * reactivity passes with identical values do not trigger work.
892
+ *
893
+ * @param config - Effective nav config.
894
+ * @returns Stable string signature.
895
+ */
896
+ private buildConfigSignature;
897
+ /**
898
+ * Builds a stable signature for breakpoint listener inputs.
899
+ *
900
+ * @param config - Effective nav config.
901
+ * @returns Stable breakpoint signature.
902
+ */
903
+ private buildBreakpointSignature;
904
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubNavComponent, never>;
905
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<HubNavComponent, "hub-nav", never, { "items": { "alias": "items"; "required": true; "isSignal": true; }; "config": { "alias": "config"; "required": false; "isSignal": true; }; "navClass": { "alias": "navClass"; "required": false; "isSignal": true; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; "isSignal": true; }; "autoOpenFromRoute": { "alias": "autoOpenFromRoute"; "required": false; "isSignal": true; }; }, { "itemClick": "itemClick"; "dropdownOpen": "dropdownOpen"; "dropdownClose": "dropdownClose"; "mobileToggle": "mobileToggle"; "panelChange": "panelChange"; }, ["startDirective", "endDirective", "itemTemplateDirective"], never, true, never>;
906
+ }
907
+
908
+ /**
909
+ * Renders a single navigation item (link, dropdown trigger, header, or custom content).
910
+ * Handles routing integration, active state, badges, icons, and disabled state.
911
+ *
912
+ * @internal Used internally by `HubNavItemListComponent`.
913
+ */
914
+ declare class HubNavItemComponent {
915
+ /** The navigation item data to render. */
916
+ readonly item: _angular_core.InputSignal<HubNavItem>;
917
+ /** Nesting depth (0 = root). */
918
+ readonly depth: _angular_core.InputSignal<number>;
919
+ /** Whether this item is currently active (set by parent list). */
920
+ readonly isActive: _angular_core.InputSignal<boolean>;
921
+ /** Whether the dropdown is currently expanded (only for dropdown items). */
922
+ readonly isExpanded: _angular_core.InputSignal<boolean>;
923
+ /** Optional custom template for rendering the item content. */
924
+ readonly itemTemplate: _angular_core.InputSignal<TemplateRef<unknown> | null>;
925
+ /**
926
+ * Forces the item to behave as part of a mobile accordion list.
927
+ * This keeps indicators and layout aligned with the collapsed nav panel.
928
+ */
929
+ readonly forceAccordionMode: _angular_core.InputSignal<boolean>;
930
+ /** Emitted when the item is clicked. */
931
+ readonly clicked: _angular_core.OutputEmitterRef<{
932
+ item: HubNavItem;
933
+ event: Event;
934
+ }>;
935
+ /** Emitted when the dropdown toggle is activated. */
936
+ readonly toggleDropdown: _angular_core.OutputEmitterRef<HubNavItem>;
937
+ /** Reference to the nav state service. */
938
+ private readonly state;
939
+ /** Whether this item has child items. */
940
+ readonly hasChildren: _angular_core.Signal<boolean>;
941
+ /** Whether this item is a header type. */
942
+ readonly isHeader: _angular_core.Signal<boolean>;
943
+ /** Whether this item is a link type. */
944
+ readonly isLink: _angular_core.Signal<boolean>;
945
+ /** Whether this item is a dropdown type. */
946
+ readonly isDropdown: _angular_core.Signal<boolean>;
947
+ /** Whether this item is a custom type. */
948
+ readonly isCustom: _angular_core.Signal<boolean>;
949
+ /** Resolved route for routerLink binding. */
950
+ readonly resolvedRoute: _angular_core.Signal<string[] | null>;
951
+ /** Template context for custom item templates. */
952
+ readonly templateContext: _angular_core.Signal<{
953
+ $implicit: HubNavItem;
954
+ active: boolean;
955
+ expanded: boolean;
956
+ depth: number;
957
+ }>;
958
+ /**
959
+ * Whether the dropdown caret should be visible for this item.
960
+ * In panel mode, caret is hidden because expansion happens in side panels.
961
+ */
962
+ readonly showCaret: _angular_core.Signal<boolean>;
963
+ /**
964
+ * Handles click events on the item.
965
+ * Delegates to dropdown toggle or emits a click event depending on item type.
966
+ *
967
+ * @param event - The original DOM event.
968
+ */
969
+ onItemClick(event: Event): void;
970
+ /**
971
+ * Handles clicks on the label/link area of a routable dropdown item.
972
+ * In this case the click only performs navigation and does not toggle
973
+ * the submenu; submenu expansion is delegated to the dedicated caret.
974
+ *
975
+ * @param event - The original DOM event.
976
+ */
977
+ onRouteItemClick(event: Event): void;
978
+ /**
979
+ * Handles clicks on the dedicated caret button for routable dropdown items.
980
+ * The caret only toggles submenu visibility and must never trigger routing.
981
+ *
982
+ * @param event - The original DOM event.
983
+ */
984
+ onCaretClick(event: Event): void;
985
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubNavItemComponent, never>;
986
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<HubNavItemComponent, "hub-nav-item", never, { "item": { "alias": "item"; "required": true; "isSignal": true; }; "depth": { "alias": "depth"; "required": false; "isSignal": true; }; "isActive": { "alias": "isActive"; "required": false; "isSignal": true; }; "isExpanded": { "alias": "isExpanded"; "required": false; "isSignal": true; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; "isSignal": true; }; "forceAccordionMode": { "alias": "forceAccordionMode"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; "toggleDropdown": "toggleDropdown"; }, never, never, true, never>;
987
+ }
988
+
989
+ /**
990
+ * Renders a list of navigation items at a given depth level.
991
+ * Self-recursive: when an item has children and its dropdown is open,
992
+ * this component renders another `hub-nav-item-list` for the children.
993
+ *
994
+ * Includes keyboard navigation following WAI-ARIA menubar/menu patterns.
995
+ *
996
+ * @internal Used internally by `HubNavComponent`.
997
+ */
998
+ declare class HubNavItemListComponent implements OnInit, OnDestroy {
999
+ /** The list of items to render. */
1000
+ readonly items: _angular_core.InputSignal<HubNavItem[]>;
1001
+ /** Nesting depth (0 = root level). */
1002
+ readonly depth: _angular_core.InputSignal<number>;
1003
+ /** Optional custom template for rendering item content. */
1004
+ readonly itemTemplate: _angular_core.InputSignal<TemplateRef<unknown> | null>;
1005
+ /**
1006
+ * Forces all nested items in this list to use accordion expansion.
1007
+ * Primarily used by the collapsed/mobile panel to avoid flyout/panel
1008
+ * behaviors that are not suitable for small viewports.
1009
+ */
1010
+ readonly forceAccordionMode: _angular_core.InputSignal<boolean>;
1011
+ /** Emitted when any item in the list is clicked. */
1012
+ readonly itemClick: _angular_core.OutputEmitterRef<{
1013
+ item: HubNavItem;
1014
+ event: Event;
1015
+ }>;
1016
+ /** Emitted when a dropdown toggle is requested. */
1017
+ readonly dropdownToggle: _angular_core.OutputEmitterRef<HubNavItem>;
1018
+ /** Emitted when an item with panel expand mode is clicked and needs a new panel. */
1019
+ readonly panelOpen: _angular_core.OutputEmitterRef<HubNavItem>;
1020
+ /** Reference to the nav state service. */
1021
+ readonly state: HubNavStateService;
1022
+ /** Reference to the Angular router for active state detection. */
1023
+ private readonly router;
1024
+ /** Reactive URL value used to recompute active states on navigation changes. */
1025
+ private readonly currentUrl;
1026
+ /** Router events subscription lifecycle handle. */
1027
+ private routerSub?;
1028
+ /** Host element reference. */
1029
+ private readonly el;
1030
+ /**
1031
+ * Whether children should render in accordion mode (inline with indentation).
1032
+ * True when orientation is vertical and expand mode is 'accordion'.
1033
+ */
1034
+ readonly isAccordionMode: _angular_core.Signal<boolean>;
1035
+ /** Whether this is a horizontal root-level nav (affects arrow key mapping). */
1036
+ private get isHorizontalRoot();
1037
+ /**
1038
+ * Checks if the given item or any of its descendants is currently active.
1039
+ *
1040
+ * @param item - The item to check.
1041
+ * @returns `true` if the item or a descendant matches the current route.
1042
+ */
1043
+ isItemActive(item: HubNavItem): boolean;
1044
+ /** @inheritDoc */
1045
+ ngOnInit(): void;
1046
+ /** @inheritDoc */
1047
+ ngOnDestroy(): void;
1048
+ /**
1049
+ * Checks if a dropdown is currently expanded.
1050
+ *
1051
+ * @param item - The dropdown item to check.
1052
+ * @returns `true` if the dropdown is open.
1053
+ */
1054
+ isExpanded(item: HubNavItem): boolean;
1055
+ /**
1056
+ * Whether the given item has child items.
1057
+ *
1058
+ * @param item - The item to check.
1059
+ * @returns `true` if the item has children.
1060
+ */
1061
+ hasChildren(item: HubNavItem): boolean;
1062
+ /**
1063
+ * Resolves the effective expand mode for an item.
1064
+ * Considers per-item override, global config, and mobile fallback.
1065
+ *
1066
+ * @param item - The item to resolve the expand mode for.
1067
+ * @returns The effective expand mode.
1068
+ */
1069
+ getItemExpandMode(item: HubNavItem): HubNavVerticalExpandMode;
1070
+ /**
1071
+ * Handles click events from a child item component.
1072
+ *
1073
+ * @param payload - The item and original event.
1074
+ */
1075
+ onItemClick(payload: {
1076
+ item: HubNavItem;
1077
+ event: Event;
1078
+ }): void;
1079
+ /**
1080
+ * Handles dropdown toggle events from a child item component.
1081
+ * In panel mode, emits `panelOpen` instead of toggling the dropdown.
1082
+ *
1083
+ * @param item - The dropdown item to toggle.
1084
+ */
1085
+ onDropdownToggle(item: HubNavItem): void;
1086
+ /**
1087
+ * Handles hover enter events on items with children.
1088
+ * Opens the dropdown if the trigger mode includes hover.
1089
+ *
1090
+ * @param item - The hovered item.
1091
+ */
1092
+ onItemMouseEnter(item: HubNavItem): void;
1093
+ /**
1094
+ * Handles hover leave events on items with children.
1095
+ * Closes the dropdown if the trigger mode includes hover.
1096
+ *
1097
+ * @param item - The item that lost hover.
1098
+ */
1099
+ onItemMouseLeave(item: HubNavItem): void;
1100
+ /**
1101
+ * Handles keyboard events for accessible navigation.
1102
+ *
1103
+ * @param event - The keyboard event.
1104
+ */
1105
+ onKeyDown(event: KeyboardEvent): void;
1106
+ /** Returns all focusable item elements (direct children only). */
1107
+ private getFocusableItems;
1108
+ /** Returns the index of the currently focused item. */
1109
+ private getCurrentFocusIndex;
1110
+ /** Moves focus to the item at the given index (wraps around). */
1111
+ private focusItem;
1112
+ /** Opens the dropdown of the focused item and focuses its first child. */
1113
+ private openFocusedDropdown;
1114
+ /** Closes the dropdown of the focused item. */
1115
+ private closeFocusedDropdown;
1116
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubNavItemListComponent, never>;
1117
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<HubNavItemListComponent, "hub-nav-item-list", never, { "items": { "alias": "items"; "required": true; "isSignal": true; }; "depth": { "alias": "depth"; "required": false; "isSignal": true; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; "isSignal": true; }; "forceAccordionMode": { "alias": "forceAccordionMode"; "required": false; "isSignal": true; }; }, { "itemClick": "itemClick"; "dropdownToggle": "dropdownToggle"; "panelOpen": "panelOpen"; }, never, never, true, never>;
1118
+ }
1119
+
1120
+ /**
1121
+ * Visual separator between navigation item groups.
1122
+ * Renders as a horizontal rule in vertical list contexts.
1123
+ * Root horizontal nav bars hide separators because structural grouping
1124
+ * should not consume inline menu space there.
1125
+ *
1126
+ * @internal This component is used internally by `HubNavItemListComponent`.
1127
+ */
1128
+ declare class HubNavSeparatorComponent {
1129
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubNavSeparatorComponent, never>;
1130
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<HubNavSeparatorComponent, "hub-nav-separator", never, {}, {}, never, never, true, never>;
1131
+ }
1132
+
1133
+ /**
1134
+ * Renders a single side panel in the stacked panel navigation.
1135
+ * Contains a header with the parent item's label (plus back/close buttons)
1136
+ * and a body with a `hub-nav-item-list` for the panel's items.
1137
+ *
1138
+ * Includes keyboard navigation:
1139
+ * - **Escape**: closes the panel and returns focus to the parent trigger.
1140
+ * - **ArrowLeft**: navigates back (if drill-down) or closes the panel.
1141
+ *
1142
+ * @internal Used internally by `HubNavPanelContainerComponent`.
1143
+ */
1144
+ declare class HubNavPanelComponent {
1145
+ /** The panel state to render. */
1146
+ readonly panel: _angular_core.InputSignal<HubNavPanelState>;
1147
+ /** Width of this panel (CSS value). */
1148
+ readonly panelWidth: _angular_core.InputSignal<string>;
1149
+ /** Optional custom template for rendering item content. */
1150
+ readonly itemTemplate: _angular_core.InputSignal<TemplateRef<unknown> | null>;
1151
+ /**
1152
+ * Controls whether the panel header is rendered.
1153
+ * Used by horizontal layouts to avoid duplicating the selected root item
1154
+ * title when that item is already visible in the top row.
1155
+ */
1156
+ readonly showHeader: _angular_core.InputSignal<boolean>;
1157
+ /** Emitted when the panel close button is clicked. Carries the panel ID. */
1158
+ readonly closePanel: _angular_core.OutputEmitterRef<string>;
1159
+ /** Emitted when the back button is clicked. Carries the panel ID. */
1160
+ readonly backClick: _angular_core.OutputEmitterRef<string>;
1161
+ /** Emitted when an item in the panel is clicked. */
1162
+ readonly itemClick: _angular_core.OutputEmitterRef<{
1163
+ item: HubNavItem;
1164
+ event: Event;
1165
+ }>;
1166
+ /** Emitted when a dropdown toggle is requested within the panel. */
1167
+ readonly dropdownToggle: _angular_core.OutputEmitterRef<HubNavItem>;
1168
+ /** Emitted when an item with panel expand mode is clicked (needs a new panel). */
1169
+ readonly panelOpen: _angular_core.OutputEmitterRef<HubNavItem>;
1170
+ /** Host element reference. */
1171
+ private readonly el;
1172
+ /** The label displayed in the panel header. */
1173
+ readonly currentLabel: _angular_core.Signal<string>;
1174
+ /** Accessible label for the panel navigation landmark. */
1175
+ readonly ariaLabel: _angular_core.Signal<string>;
1176
+ /**
1177
+ * Handles keyboard events for panel navigation.
1178
+ *
1179
+ * @param event - The keyboard event.
1180
+ */
1181
+ onKeyDown(event: KeyboardEvent): void;
1182
+ /**
1183
+ * Handles close button click.
1184
+ */
1185
+ onCloseClick(): void;
1186
+ /**
1187
+ * Handles back button click for drill-down navigation.
1188
+ */
1189
+ onBackClick(): void;
1190
+ /**
1191
+ * Forwards item click events from the inner item list.
1192
+ *
1193
+ * @param payload - The clicked item and DOM event.
1194
+ */
1195
+ onItemClick(payload: {
1196
+ item: HubNavItem;
1197
+ event: Event;
1198
+ }): void;
1199
+ /**
1200
+ * Forwards dropdown toggle events from the inner item list.
1201
+ *
1202
+ * @param item - The dropdown item that was toggled.
1203
+ */
1204
+ onDropdownToggle(item: HubNavItem): void;
1205
+ /**
1206
+ * Forwards panel open events from the inner item list.
1207
+ *
1208
+ * @param item - The item requesting a new panel.
1209
+ */
1210
+ onPanelOpen(item: HubNavItem): void;
1211
+ /**
1212
+ * Focuses the first focusable item inside this panel.
1213
+ */
1214
+ focusFirstItem(): void;
1215
+ /**
1216
+ * Checks whether the event target is a direct child of this panel's item-list
1217
+ * (not inside a nested flyout/accordion submenu rendered by descendants).
1218
+ *
1219
+ * @param target - The DOM element that received the event.
1220
+ * @returns `true` if the target belongs directly to this panel's navigation items.
1221
+ */
1222
+ private isDirectPanelFocus;
1223
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubNavPanelComponent, never>;
1224
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<HubNavPanelComponent, "hub-nav-panel", never, { "panel": { "alias": "panel"; "required": true; "isSignal": true; }; "panelWidth": { "alias": "panelWidth"; "required": false; "isSignal": true; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; "isSignal": true; }; "showHeader": { "alias": "showHeader"; "required": false; "isSignal": true; }; }, { "closePanel": "closePanel"; "backClick": "backClick"; "itemClick": "itemClick"; "dropdownToggle": "dropdownToggle"; "panelOpen": "panelOpen"; }, never, never, true, never>;
1225
+ }
1226
+
1227
+ /**
1228
+ * Container that renders the stack of side panels in a horizontal flex layout.
1229
+ * Panels are stacked left-to-right or right-to-left depending on `sidebarSide`.
1230
+ *
1231
+ * @internal Used internally by `HubNavComponent`.
1232
+ */
1233
+ declare class HubNavPanelContainerComponent {
1234
+ /** Array of panel states to render. */
1235
+ readonly panels: _angular_core.InputSignal<HubNavPanelState[]>;
1236
+ /** Physical side where the sidebar is placed. */
1237
+ readonly sidebarSide: _angular_core.InputSignal<HubNavSidebarSide>;
1238
+ /** Width for each panel. */
1239
+ readonly panelWidth: _angular_core.InputSignal<string>;
1240
+ /** Optional custom template for rendering item content. */
1241
+ readonly itemTemplate: _angular_core.InputSignal<TemplateRef<unknown> | null>;
1242
+ /**
1243
+ * When true, the first panel hides its header while it is not in drill-down
1244
+ * mode. This is primarily used by horizontal nav where the selected root
1245
+ * item is already visible in the top row.
1246
+ */
1247
+ readonly hideFirstPanelHeader: _angular_core.InputSignal<boolean>;
1248
+ /** Emitted when a panel close button is clicked. Carries the panel ID. */
1249
+ readonly panelClose: _angular_core.OutputEmitterRef<string>;
1250
+ /** Emitted when a panel back button is clicked. Carries the panel ID. */
1251
+ readonly panelBack: _angular_core.OutputEmitterRef<string>;
1252
+ /** Emitted when an item inside a panel is clicked. */
1253
+ readonly itemClick: _angular_core.OutputEmitterRef<{
1254
+ item: HubNavItem;
1255
+ event: Event;
1256
+ }>;
1257
+ /** Emitted when a dropdown toggle is requested inside a panel. */
1258
+ readonly dropdownToggle: _angular_core.OutputEmitterRef<HubNavItem>;
1259
+ /** Emitted when an item inside a panel requests a new panel. */
1260
+ readonly panelOpen: _angular_core.OutputEmitterRef<HubNavItem>;
1261
+ /**
1262
+ * Resolves whether a panel header should be rendered for a given index.
1263
+ *
1264
+ * When `hideFirstPanelHeader` is true (used in layouts where parent context
1265
+ * is always visible as a sibling column), headers are suppressed on all panels
1266
+ * that are not in drill-down mode. A header is only shown when the panel is in
1267
+ * drill-down mode — meaning its parent level has been replaced and is no longer
1268
+ * visible.
1269
+ *
1270
+ * @param index - Zero-based panel index in the rendered stack.
1271
+ * @param panel - Panel state at the given index.
1272
+ * @returns `true` when the header should be visible.
1273
+ */
1274
+ shouldShowHeader(index: number, panel: HubNavPanelState): boolean;
1275
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubNavPanelContainerComponent, never>;
1276
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<HubNavPanelContainerComponent, "hub-nav-panel-container", never, { "panels": { "alias": "panels"; "required": true; "isSignal": true; }; "sidebarSide": { "alias": "sidebarSide"; "required": false; "isSignal": true; }; "panelWidth": { "alias": "panelWidth"; "required": false; "isSignal": true; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; "isSignal": true; }; "hideFirstPanelHeader": { "alias": "hideFirstPanelHeader"; "required": false; "isSignal": true; }; }, { "panelClose": "panelClose"; "panelBack": "panelBack"; "itemClick": "itemClick"; "dropdownToggle": "dropdownToggle"; "panelOpen": "panelOpen"; }, never, never, true, never>;
1277
+ }
1278
+
1279
+ export { HUB_NAV_CONFIG, HubNavComponent, HubNavConfigService, HubNavEndDirective, HubNavItemComponent, HubNavItemListComponent, HubNavItemTemplateDirective, HubNavPanelComponent, HubNavPanelContainerComponent, HubNavScrollSpyDirective, HubNavScrollSpySectionDirective, HubNavSeparatorComponent, HubNavStartDirective, HubNavStateService };
1280
+ export type { HubNavCollapseMode, HubNavConfig, HubNavDropdownEvent, HubNavDropdownTrigger, HubNavEndTemplateContext, HubNavItem, HubNavItemClickEvent, HubNavItemTemplateContext, HubNavItemType, HubNavOffcanvasPosition, HubNavOrientation, HubNavPanelAction, HubNavPanelEvent, HubNavPanelHistoryEntry, HubNavPanelState, HubNavPosition, HubNavSidebarSide, HubNavStartTemplateContext, HubNavVerticalExpandMode };