@arsedizioni/ars-utils 22.7.4 → 22.7.6

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.
@@ -329,7 +329,14 @@ export declare class NavigationBarComponent {
329
329
  readonly variant: import("@angular/core").InputSignal<NavigationVariant>;
330
330
  /** Breakpoint → variant map used when `variant` is `auto`. Missing entries fall back to the M3 defaults. */
331
331
  readonly autoVariants: import("@angular/core").InputSignal<Partial<Record<"xs" | "sm" | "md" | "lg" | "xl", ResolvedNavigationVariant>>>;
332
- /** Two-way bound id of the selected destination. The router, when active, takes precedence. */
332
+ /**
333
+ * Two-way bound id of the selected destination.
334
+ *
335
+ * While {@link routerSync} is on, a routed destination is lit by the URL alone: this id only
336
+ * lights a destination with no `route` (an action, an external `href`). So when the URL matches
337
+ * no destination — a page the menu does not map — nothing is lit, even though the id still
338
+ * names the destination clicked last.
339
+ */
333
340
  readonly selectedId: import("@angular/core").ModelSignal<string>;
334
341
  /**
335
342
  * Two-way bound ids of the expanded parent destinations.
@@ -453,6 +460,12 @@ export declare class NavigationBarComponent {
453
460
  private readonly panelElements;
454
461
  /** Current router URL, kept in a signal so the template stays zoneless-friendly. */
455
462
  private readonly routerUrl;
463
+ /**
464
+ * Routed destination just clicked, while the navigation it started has not settled yet. It lights
465
+ * the destination at once, without waiting for a lazy route to load, and it is dropped as soon as
466
+ * the navigation ends, is cancelled, fails or is skipped: from then on the URL decides.
467
+ */
468
+ private readonly pendingId;
456
469
  /**
457
470
  * Ticks whenever the application theme moves. The emitted value is ignored on
458
471
  * purpose: it is a change notification, not the answer.
@@ -543,9 +556,25 @@ export declare class NavigationBarComponent {
543
556
  * per theme, and the frames are baked into the inline style of the icon.
544
557
  */
545
558
  private readonly renderGroups;
559
+ /** `true` when the URL decides which routed destination is lit: {@link routerSync} is on and there is a router. */
560
+ private readonly routerDriven;
561
+ /**
562
+ * The destinations the router drives — a `route`, no `href`, and a URL the router could
563
+ * build — each with that URL.
564
+ */
565
+ private readonly routedTargets;
566
+ /** Ids of the destinations in {@link routedTargets}. */
567
+ private readonly routedIds;
546
568
  /** Id of the destination matching the current router URL, using longest-prefix matching. */
547
569
  private readonly routerActiveId;
548
- /** Id of the currently active destination: router URL first, explicit selection as fallback. */
570
+ /**
571
+ * Id of the currently active destination: the routed one just clicked, while its navigation is
572
+ * under way; then the one matching the URL; then the explicit selection.
573
+ *
574
+ * The selection is NOT a fallback for a routed destination while the router drives: on a URL
575
+ * that matches nothing it would keep the destination clicked last lit over a page that has
576
+ * nothing to do with it. There, nothing is lit.
577
+ */
549
578
  protected readonly activeId: import("@angular/core").Signal<string>;
550
579
  /**
551
580
  * Expansion state used when `expandedIds` is left unbound: the destinations