@stacknav/angular 0.1.2 → 0.2.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.
package/README.md CHANGED
@@ -1,14 +1,14 @@
1
1
  # @stacknav/angular
2
2
 
3
- `<sn-outlet />`: a router outlet with the iOS push/pop transition, built on
3
+ `<sn-outlet />`: a router outlet with the native push/pop transition (iOS, or
4
+ Android's own on Android), built on
4
5
  [`@stacknav/core`](../core).
5
6
 
6
7
  It is an outlet, not a router. Angular Router keeps doing everything it does:
7
8
  routes, guards, resolvers, `routerLink`, `router.navigate`, lazy loading,
8
9
  component input binding and browser history. The outlet only changes what
9
10
  happens when the router activates a route: the page that was showing stays alive
10
- beneath the new one, the change is animated, and a swipe from the leading edge
11
- pops.
11
+ beneath the new one and the change is animated. Interactive edge swiping is opt-in.
12
12
 
13
13
  - **Works alongside the router.** There is no navigation API of its own. You
14
14
  navigate with the router, go back with `Location`, and read params as you
@@ -16,9 +16,10 @@ pops.
16
16
  - **Pages stay alive.** The page you came from is kept beneath the top one,
17
17
  hidden. Its scroll position, form state, signals and subscriptions are intact
18
18
  when you pop back, with nothing to restore.
19
- - **Swipe back.** Drag from the leading edge and the page follows the pointer;
20
- the router follows the gesture, through `history.back()` when that lands on the
21
- right page. A `canDeactivate` guard that rejects puts the page back.
19
+ - **Interactive pop, if you drive it.** The outlet ships no gesture: in a browser tab the browser owns
20
+ the edge. An app that owns it can drive `outlet.stack.beginInteractivePop()`, and the router follows,
21
+ through `history.back()` when that lands on the right page. A `canDeactivate` guard that rejects puts
22
+ the page back.
22
23
  - **Configurable direction.** Whether a navigation is a push, a pop or a replace
23
24
  comes from strategies you order: an explicit hint, the browser's back/forward,
24
25
  the kept stack, numbers on your routes, or the route tree.
@@ -67,6 +68,49 @@ export class Item {
67
68
  router's default, a back navigation refused by a guard rewrites the history entry
68
69
  the browser landed on.
69
70
 
71
+ ## Swipe-back modes
72
+
73
+ ```ts
74
+ provideStackNav({ swipeBack: 'browser' }); // default: leave browser gestures alone
75
+ provideStackNav({ swipeBack: 'disabled' }); // request browser swipe suppression
76
+ ```
77
+
78
+ Change a single outlet live with `<sn-outlet [swipeBack]="mode()" />`. Changing
79
+ modes preserves the pages, URL and history.
80
+
81
+ **There is no gesture of our own to choose.** Suppression cannot stop Safari's
82
+ edge swipe, so a recognizer next to it reads as two backs at once. An app that
83
+ owns the edge -- an installed PWA, a native webview -- can drive the stack's
84
+ `beginInteractivePop()` from its own pointer handling; the outlet treats the
85
+ resulting pop exactly as it treated the old gesture's, syncing the router and
86
+ restoring the page if a guard refuses.
87
+
88
+ ```ts
89
+ readonly outlet = viewChild.required(StackNavOutlet);
90
+ // on your own pointerdown/pointermove/pointerup
91
+ const pop = this.outlet().stack.beginInteractivePop();
92
+ pop?.update(1 - dx / width);
93
+ void pop?.finish({ complete: dx > width / 2, velocity });
94
+ ```
95
+
96
+ **Migration:** `swipeBack: 'custom'` and the `gesture` option (on both
97
+ `provideStackNav()` and `<sn-outlet />`) were removed. `'custom'` now throws;
98
+ `'disabled'` keeps the suppression half of what it did.
99
+
100
+ The demos let you try both modes in **Lab → Swipe back** (Angular) or
101
+ **Options → Swipe back** (vanilla).
102
+
103
+ Browser suppression uses `overscroll-behavior-x: contain` on the document root.
104
+ It is **document-wide and best effort**, not a guarantee against Safari edge
105
+ navigation or OS gestures. A `browser` outlet cannot undo another outlet's
106
+ suppression request; the original inline declaration is restored after the last
107
+ request ends or its outlet is destroyed. Avoid enabling suppression in an outlet
108
+ when the rest of the document should retain native swipe navigation.
109
+ See the [CSS specification](https://drafts.csswg.org/css-overscroll/) and
110
+ [WebKit's history navigation limitation](https://bugs.webkit.org/show_bug.cgi?id=240183).
111
+ Browser Back/Forward buttons, keyboard navigation, router guards, page retention
112
+ and push/pop animation are independent of this policy.
113
+
70
114
  ## Deciding the direction
71
115
 
72
116
  ### Implicit: number your routes
@@ -127,6 +171,13 @@ provideStackNav({
127
171
  A strategy receives `{ from, to, trigger, historyDelta, hint, stack }`, where
128
172
  `from` and `to` carry `{ key, segments, level, data, snapshot }`.
129
173
 
174
+ Because `data` is the route's own data, a strategy can work off metadata your
175
+ routes already carry. An app that names its routes the way Angular's
176
+ route-transition recipe does (`data: { animation: 'Thread' }`) keeps those names
177
+ and adds one strategy that looks the from/to pair up in a
178
+ `transition('Inbox => Thread')`-style table; see the Mail demo's
179
+ [`animation.ts`](../../apps/angular-demo/src/app/demos/mail/animation.ts).
180
+
130
181
  ### Back buttons
131
182
 
132
183
  A back button is `Location.back()`. After a deep link there is nothing to go back
@@ -147,6 +198,33 @@ exports, like any other:
147
198
 
148
199
  Routes opt out of it with `data: { reuseRoute: true }`.
149
200
 
201
+ ### Mobile only
202
+
203
+ The transition is an iOS idiom, and plenty of apps want it on handhelds and a
204
+ plain instant change on a desktop. `animated: 'touch'` is that: it animates where
205
+ the primary pointer is coarse, and not where it is a mouse. It is asked before
206
+ every navigation, so a tablet that gets docked to a trackpad is handled too.
207
+
208
+ ```ts
209
+ provideStackNav({ animated: 'touch' });
210
+ ```
211
+
212
+ `isTouchPrimary()` is exported from `@stacknav/core` for the same decision made
213
+ once rather than per navigation — pointer handling of your own, for instance,
214
+ if you only want it where the pointer is coarse.
215
+
216
+ Pass a function instead of `'touch'` to decide it yourself, e.g. from a user
217
+ setting or the window's width:
218
+
219
+ ```ts
220
+ provideStackNav({ animated: () => window.innerWidth < 768 });
221
+ ```
222
+
223
+ Turning animation off does not change any of the rest: pages beneath the top are
224
+ still kept alive with their scroll position and state, and the direction is still
225
+ resolved, so `pop` still restores the page you came from rather than rebuilding
226
+ it.
227
+
150
228
  ## API
151
229
 
152
230
  ### `provideStackNav(config?)`
@@ -158,15 +236,15 @@ Routes opt out of it with `data: { reuseRoute: true }`.
158
236
  | `levelOf(snapshot)` | `data.stackLevel` | the route's number |
159
237
  | `keyOf(snapshot)` | the route's URL path | identity of a page |
160
238
  | `infoKey` | `'stacknav'` | key in `NavigationExtras.info` for hints |
161
- | `transition` | `{}` | `createIOSTransition` options for every outlet. The same options are CSS variables (`--sn-duration`, `--sn-easing`, `--sn-parallax`, `--sn-dim-max`, `--sn-shadow`, …) read off the outlet, so a stylesheet can retune them. See the [core README](../core#tuning-from-css) |
162
- | `gesture` | `{}` | `createEdgePanGesture` options; `false` disables swiping |
239
+ | `transition` | `{}` | `createNativeTransition` options for every outlet: `platform` (`'auto'`, `'ios'`, `'android'`), duration, curve and the rest. The same options are CSS variables (`--sn-duration`, `--sn-easing`, `--sn-parallax`, `--sn-dim-max`, `--sn-shadow`, …) read off the outlet, so a stylesheet can retune them. See the [core README](../core#tuning-from-css) |
240
+ | `swipeBack` | `browser` | `browser` or `disabled`; see the browser suppression limitations above |
163
241
  | `detachInactiveViews` | `false` | detach change detection from hidden pages |
164
242
  | `injectStyles` | `true` | insert the core stylesheet at runtime |
165
- | `animated` | `true` | animate at all |
243
+ | `animated` | `true` | animate at all. `'touch'` only on a coarse pointer, or a predicate asked before every navigation; see [Mobile only](#mobile-only) |
166
244
 
167
245
  ### `<sn-outlet>` (`StackNavOutlet`)
168
246
 
169
- Inputs: `name`, `transition`, `gesture`, `routerOutletData`.
247
+ Inputs: `name`, `transition`, `swipeBack`, `routerOutletData`.
170
248
 
171
249
  Outputs: `activate`, `deactivate`, `attach`, `detach` (as on `router-outlet`) and
172
250
  `navigated` with `{ view, direction, animated, reused }`.
@@ -1,8 +1,8 @@
1
1
  import { Location, DOCUMENT } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { InjectionToken, makeEnvironmentProviders, inject, Injectable, input, EventEmitter, ViewContainerRef, ChangeDetectorRef, ElementRef, Injector, reflectComponentType, Output, Input, Directive } from '@angular/core';
3
+ import { InjectionToken, makeEnvironmentProviders, inject, Injectable, input, EventEmitter, ViewContainerRef, ChangeDetectorRef, ElementRef, ErrorHandler, effect, Injector, reflectComponentType, Output, Input, Directive } from '@angular/core';
4
4
  import { Router, ROUTER_CONFIGURATION, NavigationStart, NavigationEnd, NavigationCancel, NavigationError, NavigationSkipped, PRIMARY_OUTLET, ChildrenOutletContexts, ActivatedRoute, ROUTER_OUTLET_DATA, BaseRouteReuseStrategy } from '@angular/router';
5
- import { createDirectionResolver, defaultStrategies, createIOSStack, injectStyles, segmentsOf } from '@stacknav/core';
5
+ import { createDirectionResolver, defaultStrategies, isTouchPrimary, createNativeStack, injectStyles, segmentsOf } from '@stacknav/core';
6
6
  import { BehaviorSubject, switchMap, Subscription, combineLatest, of, from } from 'rxjs';
7
7
 
8
8
  /**
@@ -98,12 +98,20 @@ function resolveConfig(c) {
98
98
  keyOf: c.keyOf ?? defaultKeyOf,
99
99
  infoKey: c.infoKey ?? 'stacknav',
100
100
  transition: c.transition ?? {},
101
- gesture: c.gesture ?? {},
101
+ swipeBack: c.swipeBack ?? 'browser',
102
102
  detachInactiveViews: c.detachInactiveViews ?? false,
103
103
  injectStyles: c.injectStyles ?? true,
104
- animated: c.animated ?? true,
104
+ animated: resolveAnimated(c.animated),
105
105
  };
106
106
  }
107
+ function resolveAnimated(animated) {
108
+ if (typeof animated === 'function')
109
+ return animated;
110
+ if (animated === 'touch')
111
+ return isTouchPrimary;
112
+ const on = animated ?? true;
113
+ return () => on;
114
+ }
107
115
  /**
108
116
  * Configures the outlets. Add it next to `provideRouter()`. It changes no
109
117
  * router configuration.
@@ -260,7 +268,7 @@ function readHint(info, key) {
260
268
 
261
269
  /**
262
270
  * A router outlet (`RouterOutletContract`) that keeps a stack of pages and moves
263
- * between them with the iOS push/pop transition. Use it where you would use
271
+ * between them with the platform's native push/pop transition. Use it where you would use
264
272
  * `<router-outlet>`. The router drives it the same way:
265
273
  *
266
274
  * ```html
@@ -268,8 +276,8 @@ function readHint(info, key) {
268
276
  * ```
269
277
  *
270
278
  * Pages beneath the top stay alive, keeping scroll position, form state and
271
- * subscriptions. A swipe from the leading edge pops interactively, and the
272
- * direction of every navigation is decided by the strategies configured in
279
+ * subscriptions, and the direction of every navigation is decided by the
280
+ * strategies configured in
273
281
  * `provideStackNav()`. The element needs a height; it is the pages' scroll
274
282
  * container.
275
283
  */
@@ -278,8 +286,9 @@ class StackNavOutlet {
278
286
  name = PRIMARY_OUTLET;
279
287
  /** Per-outlet transition options, merged over `provideStackNav({ transition })`. */
280
288
  transition;
281
- /** Per-outlet gesture options, merged over `provideStackNav({ gesture })`. `false` disables the swipe. */
282
- gesture;
289
+ /** Live per-outlet override of the configured swipe policy. */
290
+ swipeBack = input(/* @ts-ignore */
291
+ ...(ngDevMode ? [undefined, { debugName: "swipeBack" }] : /* istanbul ignore next */ []));
283
292
  /** Same as on `router-outlet`: available to pages through `ROUTER_OUTLET_DATA`. */
284
293
  routerOutletData = input(undefined, /* @ts-ignore */
285
294
  ...(ngDevMode ? [{ debugName: "routerOutletData" }] : /* istanbul ignore next */ []));
@@ -301,6 +310,8 @@ class StackNavOutlet {
301
310
  router = inject(Router);
302
311
  browserLocation = inject(Location);
303
312
  document = inject(DOCUMENT);
313
+ errorHandler = inject(ErrorHandler);
314
+ destroyed = false;
304
315
  /**
305
316
  * The underlying core stack. Chrome that just has to move with the pages is
306
317
  * usually best driven from CSS, off `--sn-t` / `--sn-e` and the
@@ -321,19 +332,20 @@ class StackNavOutlet {
321
332
  _activatedRoute = null;
322
333
  subs = new Subscription();
323
334
  constructor() {
335
+ effect(() => {
336
+ const mode = this.swipeBack() ?? this.config.swipeBack;
337
+ this.stack?.setSwipeBack(mode);
338
+ });
324
339
  if (this.router.componentInputBindingEnabled)
325
340
  this.supportsBindingToComponentInputs = true;
326
341
  }
327
342
  // ------------------------------------------------------------- lifecycle
328
343
  ngOnInit() {
329
- const gesture = this.gesture === false || this.config.gesture === false ? false : { ...(this.config.gesture || {}), ...(this.gesture || {}) };
330
- this.stack = createIOSStack({
344
+ this.stack = createNativeStack({
331
345
  container: this.host,
332
346
  transition: { ...this.config.transition, ...(this.transition || {}) },
333
- gesture: gesture || {},
347
+ swipeBack: this.swipeBack() ?? this.config.swipeBack,
334
348
  });
335
- if (gesture === false)
336
- this.stack.gesture.detach();
337
349
  if (this.config.injectStyles)
338
350
  injectStyles(this.document);
339
351
  this.stack.on('pop', (e) => this.onStackRemoved(e.removed, e.source));
@@ -366,6 +378,8 @@ class StackNavOutlet {
366
378
  }
367
379
  }
368
380
  ngOnDestroy() {
381
+ this.destroyed = true;
382
+ this.leaving = null;
369
383
  if (this.parentContexts.getContext(this.name)?.outlet === this)
370
384
  this.parentContexts.onChildOutletDestroyed(this.name);
371
385
  this.subs.unsubscribe();
@@ -436,7 +450,7 @@ class StackNavOutlet {
436
450
  return;
437
451
  this.leaving = null;
438
452
  this.views = [];
439
- void this.stack.reset([]);
453
+ this.runStackTask(this.stack.reset([]));
440
454
  });
441
455
  }
442
456
  detach() {
@@ -451,7 +465,7 @@ class StackNavOutlet {
451
465
  this.byEl.delete(view.el);
452
466
  this.views = this.views.filter((v) => v !== view);
453
467
  this.detached.set(ref, view);
454
- void this.stack.remove(view.el);
468
+ this.runStackTask(this.stack.remove(view.el));
455
469
  const i = this.location.indexOf(ref.hostView);
456
470
  if (i >= 0)
457
471
  this.location.detach(i);
@@ -471,6 +485,14 @@ class StackNavOutlet {
471
485
  this.show(view, activatedRoute, leaving, true);
472
486
  }
473
487
  // -------------------------------------------------------------- internals
488
+ /** Teardown cancels queued navigation; report other failures through Angular. */
489
+ runStackTask(task) {
490
+ void task.catch((error) => {
491
+ if (this.destroyed && error instanceof Error && error.name === 'AbortError')
492
+ return;
493
+ this.errorHandler.handleError(error);
494
+ });
495
+ }
474
496
  takeLeaving() {
475
497
  const leaving = this.leaving;
476
498
  this.leaving = null;
@@ -495,7 +517,7 @@ class StackNavOutlet {
495
517
  // is gone. A pop onto anything else has nothing to pop, so just show the page.
496
518
  if (!leaving && this.stack.top && direction === 'pop' && !reused)
497
519
  direction = 'replace';
498
- const animated = this.config.animated && (nav?.animated ?? true) && (this.views.length > 0 || !!leaving);
520
+ const animated = this.config.animated() && (nav?.animated ?? true) && (this.views.length > 0 || !!leaving);
499
521
  view.route = activatedRoute;
500
522
  view.proxy?.swap(activatedRoute);
501
523
  const current = this.router.getCurrentNavigation();
@@ -510,7 +532,7 @@ class StackNavOutlet {
510
532
  this.lastDirection = direction;
511
533
  this.place(view, direction, leaving);
512
534
  if (!alreadyOnScreen) {
513
- void this.stack.present(view.el, direction, { key: view.key, animated, source: sourceOf(nav?.trigger) });
535
+ this.runStackTask(this.stack.present(view.el, direction, { key: view.key, animated, source: sourceOf(nav?.trigger) }));
514
536
  }
515
537
  this.changeDetector.markForCheck();
516
538
  this.bindInputs(view);
@@ -584,7 +606,7 @@ class StackNavOutlet {
584
606
  }
585
607
  }
586
608
  }
587
- /** The swipe already revealed the page beneath. Bring the router in line with it. */
609
+ /** The interactive pop already revealed the page beneath. Bring the router in line with it. */
588
610
  navigateBackAfterGesture() {
589
611
  const lower = this.views[this.views.length - 1];
590
612
  if (!lower)
@@ -601,14 +623,14 @@ class StackNavOutlet {
601
623
  const norm = (u) => this.router.serializeUrl(this.router.parseUrl(u));
602
624
  return norm(a) === norm(b);
603
625
  }
604
- /** The router refused the navigation the swipe asked for, so put the page back. */
626
+ /** The router refused the navigation the pop asked for, so put the page back. */
605
627
  restorePending() {
606
628
  for (const view of this.byEl.values()) {
607
629
  if (!view.pendingRemoval)
608
630
  continue;
609
631
  view.pendingRemoval = false;
610
632
  this.views.push(view);
611
- void this.stack.push(view.el, { animated: false, key: view.key, source: 'restore' });
633
+ this.runStackTask(this.stack.push(view.el, { animated: false, key: view.key, source: 'restore' }));
612
634
  }
613
635
  }
614
636
  destroyView(view) {
@@ -654,7 +676,7 @@ class StackNavOutlet {
654
676
  }
655
677
  }
656
678
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: StackNavOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });
657
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.6", type: StackNavOutlet, isStandalone: true, selector: "sn-outlet", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, transition: { classPropertyName: "transition", publicName: "transition", isSignal: false, isRequired: false, transformFunction: null }, gesture: { classPropertyName: "gesture", publicName: "gesture", isSignal: false, isRequired: false, transformFunction: null }, routerOutletData: { classPropertyName: "routerOutletData", publicName: "routerOutletData", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activateEvents: "activate", deactivateEvents: "deactivate", attachEvents: "attach", detachEvents: "detach", navigatedEvents: "navigated" }, host: { styleAttribute: "display: block" }, exportAs: ["snOutlet"], ngImport: i0 });
679
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.6", type: StackNavOutlet, isStandalone: true, selector: "sn-outlet", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, transition: { classPropertyName: "transition", publicName: "transition", isSignal: false, isRequired: false, transformFunction: null }, swipeBack: { classPropertyName: "swipeBack", publicName: "swipeBack", isSignal: true, isRequired: false, transformFunction: null }, routerOutletData: { classPropertyName: "routerOutletData", publicName: "routerOutletData", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activateEvents: "activate", deactivateEvents: "deactivate", attachEvents: "attach", detachEvents: "detach", navigatedEvents: "navigated" }, host: { styleAttribute: "display: block" }, exportAs: ["snOutlet"], ngImport: i0 });
658
680
  }
659
681
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: StackNavOutlet, decorators: [{
660
682
  type: Directive,
@@ -667,9 +689,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
667
689
  type: Input
668
690
  }], transition: [{
669
691
  type: Input
670
- }], gesture: [{
671
- type: Input
672
- }], routerOutletData: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerOutletData", required: false }] }], activateEvents: [{
692
+ }], swipeBack: [{ type: i0.Input, args: [{ isSignal: true, alias: "swipeBack", required: false }] }], routerOutletData: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerOutletData", required: false }] }], activateEvents: [{
673
693
  type: Output,
674
694
  args: ['activate']
675
695
  }], deactivateEvents: [{
@@ -1 +1 @@
1
- {"version":3,"file":"stacknav-angular.mjs","sources":["../../src/lib/activated-route-proxy.ts","../../src/lib/config.ts","../../src/lib/history.ts","../../src/lib/outlet.ts","../../src/lib/route-reuse-strategy.ts","../../src/stacknav-angular.ts"],"sourcesContent":["import type { ActivatedRoute, ActivatedRouteSnapshot, Data, ParamMap, Params, Route, UrlSegment } from '@angular/router';\nimport { BehaviorSubject, type Observable, switchMap } from 'rxjs';\n\n/**\n * The `ActivatedRoute` a page component injects. When a page kept alive beneath\n * the stack is reached again, the router hands it a new route object. This\n * proxy keeps the component's subscriptions valid by switching them to whichever\n * route is current.\n */\nexport class StackNavActivatedRoute {\n private readonly current$: BehaviorSubject<ActivatedRoute>;\n\n readonly url: Observable<UrlSegment[]>;\n readonly params: Observable<Params>;\n readonly queryParams: Observable<Params>;\n readonly fragment: Observable<string | null>;\n readonly data: Observable<Data>;\n readonly title: Observable<string | undefined>;\n readonly paramMap: Observable<ParamMap>;\n readonly queryParamMap: Observable<ParamMap>;\n\n constructor(route: ActivatedRoute) {\n this.current$ = new BehaviorSubject(route);\n const of = <T>(pick: (r: ActivatedRoute) => Observable<T>) => this.current$.pipe(switchMap(pick));\n this.url = of((r) => r.url);\n this.params = of((r) => r.params);\n this.queryParams = of((r) => r.queryParams);\n this.fragment = of((r) => r.fragment);\n this.data = of((r) => r.data);\n this.title = of((r) => r.title);\n this.paramMap = of((r) => r.paramMap);\n this.queryParamMap = of((r) => r.queryParamMap);\n }\n\n /** The router's route object behind the proxy right now. */\n get actual(): ActivatedRoute {\n return this.current$.value;\n }\n /** @internal */\n swap(route: ActivatedRoute): void {\n if (route !== this.current$.value) this.current$.next(route);\n }\n\n get snapshot(): ActivatedRouteSnapshot {\n return this.actual.snapshot;\n }\n get outlet(): string {\n return this.actual.outlet;\n }\n get component(): ActivatedRoute['component'] {\n return this.actual.component;\n }\n get routeConfig(): Route | null {\n return this.actual.routeConfig;\n }\n get root(): ActivatedRoute {\n return this.actual.root;\n }\n get parent(): ActivatedRoute | null {\n return this.actual.parent;\n }\n get firstChild(): ActivatedRoute | null {\n return this.actual.firstChild;\n }\n get children(): ActivatedRoute[] {\n return this.actual.children;\n }\n get pathFromRoot(): ActivatedRoute[] {\n return this.actual.pathFromRoot;\n }\n toString(): string {\n return this.actual.toString();\n }\n}\n","import { InjectionToken, type EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\nimport type { ActivatedRouteSnapshot } from '@angular/router';\nimport {\n createDirectionResolver,\n defaultStrategies,\n type Direction,\n type DirectionResolver,\n type DirectionStrategy,\n type EdgePanGestureOptions,\n type IOSTransitionOptions,\n} from '@stacknav/core';\n\n/** Everything `provideStackNav()` accepts. All optional. */\nexport interface StackNavConfig {\n /**\n * Strategies that decide push / pop / replace for a navigation, in priority\n * order. Defaults to the core's `defaultStrategies()`: an explicit hint, then\n * browser history, then the kept stack, then route numbering\n * (`data.stackLevel`), then the route tree. Pass a resolver function to\n * replace the whole mechanism.\n */\n direction?: readonly DirectionStrategy[] | DirectionResolver;\n /** The direction to use when no strategy has an answer. Default `push`. */\n fallbackDirection?: Direction;\n /**\n * Where a route's number comes from, for the numbering strategy.\n * Default: `snapshot.data['stackLevel']`.\n */\n levelOf?: (snapshot: ActivatedRouteSnapshot) => number | null | undefined;\n /**\n * What identifies a page, so that a later navigation to the same key pops\n * back to the kept page. Default: the route's full URL path, including matrix\n * params.\n */\n keyOf?: (snapshot: ActivatedRouteSnapshot) => string;\n /**\n * The key under which a navigation's `info` carries a hint for this library:\n * `router.navigate(cmds, { info: { stacknav: 'pop' } })`. Default `stacknav`.\n */\n infoKey?: string;\n /** Defaults for every outlet's transition. An outlet's `transition` input overrides these per key. */\n transition?: Partial<IOSTransitionOptions>;\n /** Defaults for every outlet's swipe-back gesture. `false` disables it. */\n gesture?: Partial<EdgePanGestureOptions> | false;\n /**\n * Detaches change detection from pages hidden beneath the top and reattaches\n * it when they are shown again. Saves work on deep stacks. Off by default.\n */\n detachInactiveViews?: boolean;\n /** Inserts the engine's stylesheet at runtime. Default true. Turn it off if you import `stacknav.css`. */\n injectStyles?: boolean;\n /** Whether to animate at all. Default true. `prefers-reduced-motion` is honoured either way. */\n animated?: boolean;\n}\n\nexport interface ResolvedStackNavConfig {\n resolve: DirectionResolver;\n levelOf: (snapshot: ActivatedRouteSnapshot) => number | null | undefined;\n keyOf: (snapshot: ActivatedRouteSnapshot) => string;\n infoKey: string;\n transition: Partial<IOSTransitionOptions>;\n gesture: Partial<EdgePanGestureOptions> | false;\n detachInactiveViews: boolean;\n injectStyles: boolean;\n animated: boolean;\n}\n\nexport const STACKNAV_CONFIG = /*#__PURE__*/ new InjectionToken<ResolvedStackNavConfig>('STACKNAV_CONFIG', {\n providedIn: 'root',\n factory: () => resolveConfig({}),\n});\n\nexport function defaultLevelOf(snapshot: ActivatedRouteSnapshot): number | null | undefined {\n const v = snapshot.data?.['stackLevel'];\n return typeof v === 'number' ? v : undefined;\n}\n\n/** The route's URL path from the root down to and including this route, e.g. `items/42;view=full`. */\nexport function defaultKeyOf(snapshot: ActivatedRouteSnapshot): string {\n return snapshot.pathFromRoot\n .flatMap((s) => s.url.map((u) => u.toString()))\n .join('/');\n}\n\nexport function resolveConfig(c: StackNavConfig): ResolvedStackNavConfig {\n const resolve =\n typeof c.direction === 'function'\n ? c.direction\n : createDirectionResolver(c.direction ?? defaultStrategies(), c.fallbackDirection ?? 'push');\n return {\n resolve,\n levelOf: c.levelOf ?? defaultLevelOf,\n keyOf: c.keyOf ?? defaultKeyOf,\n infoKey: c.infoKey ?? 'stacknav',\n transition: c.transition ?? {},\n gesture: c.gesture ?? {},\n detachInactiveViews: c.detachInactiveViews ?? false,\n injectStyles: c.injectStyles ?? true,\n animated: c.animated ?? true,\n };\n}\n\n/**\n * Configures the outlets. Add it next to `provideRouter()`. It changes no\n * router configuration.\n *\n * ```ts\n * bootstrapApplication(App, { providers: [provideRouter(routes), provideStackNav()] });\n * ```\n */\nexport function provideStackNav(config: StackNavConfig = {}): EnvironmentProviders {\n return makeEnvironmentProviders([{ provide: STACKNAV_CONFIG, useValue: resolveConfig(config) }]);\n}\n","import { Injectable, inject } from '@angular/core';\nimport { NavigationCancel, NavigationEnd, NavigationError, NavigationSkipped, NavigationStart, ROUTER_CONFIGURATION, Router } from '@angular/router';\nimport type { Direction, DirectionOpinion, NavigationTrigger } from '@stacknav/core';\nimport { STACKNAV_CONFIG } from './config';\n\n/**\n * What a navigation can say to the outlet through the router's own\n * `NavigationExtras.info`, under the configured key (default `stacknav`):\n *\n * ```ts\n * router.navigate(['/items', 2], { info: { stacknav: 'push' } });\n * router.navigate(['/login'], { info: { stacknav: { direction: 'replace', animated: false } } });\n * ```\n */\nexport type StackNavHint = Direction | { direction?: DirectionOpinion; animated?: boolean };\n\nexport interface NavigationInfo {\n id: number;\n trigger: NavigationTrigger;\n /** negative = back, positive = forward, undefined when unknown */\n historyDelta: number | undefined;\n hint: DirectionOpinion;\n animated: boolean | undefined;\n replaceUrl: boolean;\n skipLocationChange: boolean;\n restoredId: number | null;\n}\n\ninterface Entry {\n id: number;\n url: string;\n}\n\n/**\n * A model of the browser's history as the router walks it: which entry is\n * current, and which came before. It answers two questions for the outlet: is\n * this navigation going back or forward, and is the previous history entry the\n * page beneath the top? Everything comes from public router events, so it needs\n * no router configuration. Internal to the outlet.\n */\n@Injectable({ providedIn: 'root' })\nexport class StackNavHistory {\n private readonly router = inject(Router);\n private readonly config = inject(STACKNAV_CONFIG);\n private readonly cancelResolution = inject(ROUTER_CONFIGURATION, { optional: true })?.canceledNavigationResolution ?? 'replace';\n private entries: Entry[] = [];\n private cursor = -1;\n private pending: NavigationInfo | null = null;\n\n constructor() {\n this.router.events.subscribe((e) => {\n if (e instanceof NavigationStart) this.onStart(e);\n else if (e instanceof NavigationEnd) this.onEnd(e);\n else if (e instanceof NavigationCancel || e instanceof NavigationError) this.onAbort();\n else if (e instanceof NavigationSkipped) this.pending = null;\n });\n }\n\n /** The navigation in flight, if any. Valid while the router activates routes. */\n get current(): NavigationInfo | null {\n return this.pending;\n }\n\n /** URL of the history entry before the current one, or null. */\n get previousUrl(): string | null {\n return this.cursor > 0 ? this.entries[this.cursor - 1].url : null;\n }\n\n get currentUrl(): string | null {\n return this.cursor >= 0 ? this.entries[this.cursor].url : null;\n }\n\n get canGoBack(): boolean {\n return this.cursor > 0;\n }\n\n private onStart(e: NavigationStart): void {\n const nav = this.router.getCurrentNavigation();\n const isHistory = e.navigationTrigger === 'popstate' || e.navigationTrigger === 'hashchange';\n const restoredId = e.restoredState?.navigationId ?? null;\n let historyDelta: number | undefined;\n if (isHistory) {\n const idx = this.indexOf(restoredId);\n if (idx >= 0 && this.cursor >= 0) historyDelta = idx - this.cursor;\n else if (restoredId != null && this.cursor >= 0) historyDelta = restoredId < this.entries[this.cursor].id ? -1 : 1;\n }\n const hint = isHistory ? undefined : readHint(nav?.extras.info, this.config.infoKey);\n this.pending = {\n id: e.id,\n trigger: isHistory ? 'history' : 'imperative',\n historyDelta,\n hint: hint?.direction,\n animated: hint?.animated,\n replaceUrl: !!nav?.extras.replaceUrl,\n skipLocationChange: !!nav?.extras.skipLocationChange,\n restoredId,\n };\n }\n\n private onEnd(e: NavigationEnd): void {\n const p = this.pending;\n this.pending = null;\n const entry: Entry = { id: e.id, url: e.urlAfterRedirects };\n if (!p || this.cursor < 0) {\n this.entries = [entry];\n this.cursor = 0;\n return;\n }\n if (p.trigger === 'history') {\n const idx = this.indexOf(p.restoredId);\n if (idx >= 0) {\n this.cursor = idx;\n this.entries[idx] = entry; // the router rewrites the entry's navigationId on popstate\n } else {\n this.entries = [entry];\n this.cursor = 0;\n }\n return;\n }\n if (p.skipLocationChange) return;\n if (p.replaceUrl) {\n this.entries[this.cursor] = entry;\n return;\n }\n this.entries.splice(this.cursor + 1);\n this.entries.push(entry);\n this.cursor++;\n }\n\n /**\n * Handles a history navigation the router refused. With\n * `canceledNavigationResolution: 'computed'` the router walks the browser back\n * to where it was, so nothing changes here. With the default `'replace'` it\n * overwrites the entry the browser landed on with the current URL and the last\n * successful id.\n */\n private onAbort(): void {\n const p = this.pending;\n this.pending = null;\n if (!p || p.trigger !== 'history' || this.cursor < 0 || this.cancelResolution === 'computed') return;\n const idx = this.indexOf(p.restoredId);\n if (idx < 0) return;\n this.entries[idx] = { ...this.entries[this.cursor] };\n this.cursor = idx;\n }\n\n /** The entry carrying `id`, preferring the nearest one that is not the current entry. */\n private indexOf(id: number | null): number {\n if (id == null) return -1;\n let best = -1;\n for (let i = 0; i < this.entries.length; i++) {\n if (this.entries[i].id !== id) continue;\n if (best < 0 || best === this.cursor || (i !== this.cursor && Math.abs(i - this.cursor) < Math.abs(best - this.cursor))) best = i;\n }\n return best;\n }\n}\n\nfunction readHint(info: unknown, key: string): { direction?: DirectionOpinion; animated?: boolean } | undefined {\n if (info == null || typeof info !== 'object') return undefined;\n const v = (info as Record<string, unknown>)[key] as StackNavHint | undefined;\n if (v == null) return undefined;\n return typeof v === 'string' ? { direction: v } : v;\n}\n","import { DOCUMENT, Location } from '@angular/common';\nimport {\n ChangeDetectorRef,\n Directive,\n ElementRef,\n EventEmitter,\n Injector,\n Input,\n Output,\n ViewContainerRef,\n inject,\n input,\n reflectComponentType,\n type ComponentRef,\n type EnvironmentInjector,\n type OnDestroy,\n type OnInit,\n type Type,\n} from '@angular/core';\nimport {\n ActivatedRoute,\n ChildrenOutletContexts,\n NavigationCancel,\n NavigationEnd,\n NavigationError,\n NavigationSkipped,\n PRIMARY_OUTLET,\n ROUTER_OUTLET_DATA,\n Router,\n type ActivatedRouteSnapshot,\n type OutletContext,\n type RouterOutletContract,\n} from '@angular/router';\nimport {\n createIOSStack,\n injectStyles,\n segmentsOf,\n type Direction,\n type EdgePanGestureOptions,\n type IOSStack,\n type IOSTransitionOptions,\n type NavigationSource,\n type RouteRef,\n type StackEntry,\n} from '@stacknav/core';\nimport { Subscription, combineLatest, from, of, switchMap } from 'rxjs';\nimport { StackNavActivatedRoute } from './activated-route-proxy';\nimport { STACKNAV_CONFIG } from './config';\nimport { StackNavHistory } from './history';\n\n/** What the outlet knows about a page, passed to direction strategies. */\nexport interface StackNavRouteRef extends RouteRef {\n snapshot: ActivatedRouteSnapshot;\n}\n\n/** A page the outlet keeps alive. */\nexport interface StackNavView {\n readonly ref: ComponentRef<unknown>;\n readonly el: HTMLElement;\n readonly key: string;\n readonly routeRef: StackNavRouteRef;\n /** the full app URL when the page was last active */\n url: string;\n route: ActivatedRoute;\n}\n\ninterface View extends StackNavView {\n routeRef: StackNavRouteRef;\n proxy: StackNavActivatedRoute | null;\n savedContexts: Map<string, OutletContext> | null;\n /** popped by the swipe gesture, waiting for the router to catch up */\n pendingRemoval: boolean;\n inputs: Subscription | null;\n}\n\nexport interface StackNavActivation {\n view: StackNavView;\n direction: Direction;\n animated: boolean;\n reused: boolean;\n}\n\n/**\n * A router outlet (`RouterOutletContract`) that keeps a stack of pages and moves\n * between them with the iOS push/pop transition. Use it where you would use\n * `<router-outlet>`. The router drives it the same way:\n *\n * ```html\n * <sn-outlet />\n * ```\n *\n * Pages beneath the top stay alive, keeping scroll position, form state and\n * subscriptions. A swipe from the leading edge pops interactively, and the\n * direction of every navigation is decided by the strategies configured in\n * `provideStackNav()`. The element needs a height; it is the pages' scroll\n * container.\n */\n@Directive({\n selector: 'sn-outlet',\n exportAs: 'snOutlet',\n host: { style: 'display: block' },\n})\nexport class StackNavOutlet implements RouterOutletContract, OnInit, OnDestroy {\n /** Outlet name, as on `router-outlet`. Static. */\n @Input() name: string = PRIMARY_OUTLET;\n /** Per-outlet transition options, merged over `provideStackNav({ transition })`. */\n @Input() transition: Partial<IOSTransitionOptions> | undefined;\n /** Per-outlet gesture options, merged over `provideStackNav({ gesture })`. `false` disables the swipe. */\n @Input() gesture: Partial<EdgePanGestureOptions> | false | undefined;\n /** Same as on `router-outlet`: available to pages through `ROUTER_OUTLET_DATA`. */\n readonly routerOutletData = input<unknown>(undefined);\n\n /** A page component was created. */\n @Output('activate') activateEvents = new EventEmitter<unknown>();\n /** A page component was destroyed. */\n @Output('deactivate') deactivateEvents = new EventEmitter<unknown>();\n /** A kept page was shown again, or a detached one re-attached. */\n @Output('attach') attachEvents = new EventEmitter<unknown>();\n @Output('detach') detachEvents = new EventEmitter<unknown>();\n /** Every activation, with the direction that was resolved for it. */\n @Output('navigated') navigatedEvents = new EventEmitter<StackNavActivation>();\n\n private readonly parentContexts = inject(ChildrenOutletContexts);\n private readonly location = inject(ViewContainerRef);\n private readonly changeDetector = inject(ChangeDetectorRef);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n private readonly config = inject(STACKNAV_CONFIG);\n private readonly history = inject(StackNavHistory);\n private readonly router = inject(Router);\n private readonly browserLocation = inject(Location);\n private readonly document = inject(DOCUMENT);\n\n /**\n * The underlying core stack. Chrome that just has to move with the pages is\n * usually best driven from CSS, off `--sn-t` / `--sn-e` and the\n * `sn-page-upper` / `sn-page-lower` classes; subscribe to `progress` when\n * you need the number itself.\n */\n stack!: IOSStack;\n /** The direction of the last activation. */\n lastDirection: Direction | null = null;\n\n /** Inputs are bound when the router was configured with `withComponentInputBinding()`. */\n readonly supportsBindingToComponentInputs?: true;\n\n private views: View[] = [];\n private readonly byEl = new Map<HTMLElement, View>();\n private readonly detached = new Map<ComponentRef<unknown>, View>();\n private activeView: View | null = null;\n private leaving: View | null = null;\n private activated: ComponentRef<unknown> | null = null;\n private _activatedRoute: ActivatedRoute | null = null;\n private subs = new Subscription();\n\n constructor() {\n if (this.router.componentInputBindingEnabled) this.supportsBindingToComponentInputs = true;\n }\n\n // ------------------------------------------------------------- lifecycle\n ngOnInit(): void {\n const gesture = this.gesture === false || this.config.gesture === false ? false : { ...(this.config.gesture || {}), ...(this.gesture || {}) };\n this.stack = createIOSStack({\n container: this.host,\n transition: { ...this.config.transition, ...(this.transition || {}) },\n gesture: gesture || {},\n });\n if (gesture === false) this.stack.gesture.detach();\n if (this.config.injectStyles) injectStyles(this.document);\n\n this.stack.on('pop', (e) => this.onStackRemoved(e.removed, e.source));\n this.stack.on('replace', (e) => this.onStackRemoved(e.removed, e.source));\n this.stack.on('reset', (e) => this.onStackRemoved(e.removed, e.source));\n if (this.config.detachInactiveViews) {\n this.stack.on('transitionstart', ({ lower, upper }) => {\n for (const entry of [lower, upper]) {\n const view = entry && this.byEl.get(entry.el);\n if (view) view.ref.changeDetectorRef.reattach();\n }\n });\n for (const event of ['push', 'pop', 'replace', 'reset'] as const) this.stack.on(event, () => this.syncChangeDetection());\n }\n this.subs.add(\n this.router.events.subscribe((e) => {\n if (e instanceof NavigationCancel || e instanceof NavigationError || e instanceof NavigationSkipped) this.restorePending();\n else if (e instanceof NavigationEnd && this.activeView) this.activeView.url = e.urlAfterRedirects;\n }),\n );\n\n this.parentContexts.onChildOutletCreated(this.name, this);\n const context = this.parentContexts.getContext(this.name);\n if (context?.route) {\n if (context.attachRef) this.attach(context.attachRef, context.route);\n else this.activateWith(context.route, context.injector);\n }\n }\n\n ngOnDestroy(): void {\n if (this.parentContexts.getContext(this.name)?.outlet === this) this.parentContexts.onChildOutletDestroyed(this.name);\n this.subs.unsubscribe();\n for (const view of this.byEl.values()) view.inputs?.unsubscribe();\n this.stack?.destroy();\n }\n\n // -------------------------------------------------------- outlet contract\n get isActivated(): boolean {\n return !!this.activated;\n }\n get component(): object {\n if (!this.activated) throw new Error('Outlet is not activated');\n return this.activated.instance as object;\n }\n get activatedComponentRef(): ComponentRef<unknown> | null {\n return this.activated;\n }\n get activatedRoute(): ActivatedRoute {\n if (!this.activated) throw new Error('Outlet is not activated');\n return this._activatedRoute!;\n }\n get activatedRouteData(): Record<string, unknown> {\n return this._activatedRoute ? this._activatedRoute.snapshot.data : {};\n }\n\n /** Pages currently kept, bottom to top. The last one is on screen. */\n get pages(): readonly StackNavView[] {\n return this.views;\n }\n /** Whether a swipe has a kept page to reveal. */\n get canPop(): boolean {\n return this.views.length > 1;\n }\n\n activateWith(activatedRoute: ActivatedRoute, environmentInjector: EnvironmentInjector): void {\n if (this.activated) throw new Error('Cannot activate an already activated outlet');\n const snapshot = activatedRoute.snapshot;\n const key = this.config.keyOf(snapshot);\n const leaving = this.takeLeaving();\n let existing = this.views.find((v) => v.key === key) ?? null;\n if (existing === leaving) existing = null;\n const view = existing ?? this.createView(snapshot.component!, activatedRoute, environmentInjector, key);\n this.show(view, activatedRoute, leaving, !!existing);\n }\n\n deactivate(): void {\n if (!this.activated) return;\n const view = this.activeView!;\n this.unbindInputs(view);\n const context = this.parentContexts.getContext(this.name);\n if (context) view.savedContexts = (context.children as unknown as { contexts: Map<string, OutletContext> }).contexts;\n this.activated = null;\n this._activatedRoute = null;\n this.activeView = null;\n if (view.pendingRemoval) {\n this.destroyView(view);\n return;\n }\n // The router deactivates before it activates, synchronously. If no\n // activation follows, the outlet is really empty.\n this.leaving = view;\n queueMicrotask(() => {\n if (this.leaving !== view) return;\n this.leaving = null;\n this.views = [];\n void this.stack.reset([]);\n });\n }\n\n detach(): ComponentRef<unknown> {\n if (!this.activated) throw new Error('Outlet is not activated');\n const view = this.activeView!;\n const ref = view.ref;\n this.unbindInputs(view);\n this.activated = null;\n this._activatedRoute = null;\n this.activeView = null;\n this.byEl.delete(view.el);\n this.views = this.views.filter((v) => v !== view);\n this.detached.set(ref, view);\n void this.stack.remove(view.el);\n const i = this.location.indexOf(ref.hostView);\n if (i >= 0) this.location.detach(i);\n this.detachEvents.emit(ref.instance);\n return ref;\n }\n\n attach(ref: ComponentRef<unknown>, activatedRoute: ActivatedRoute): void {\n const key = this.config.keyOf(activatedRoute.snapshot);\n let view = this.detached.get(ref) ?? null;\n this.detached.delete(ref);\n if (!view) view = this.wrap(ref, activatedRoute, key, null);\n this.location.insert(ref.hostView);\n this.park(view.el);\n this.byEl.set(view.el, view);\n const leaving = this.takeLeaving();\n this.show(view, activatedRoute, leaving, true);\n }\n\n // -------------------------------------------------------------- internals\n private takeLeaving(): View | null {\n const leaving = this.leaving;\n this.leaving = null;\n return leaving;\n }\n\n /** Decides the direction, places the page in the stack, and makes it active. */\n private show(view: View, activatedRoute: ActivatedRoute, leaving: View | null, reused: boolean): void {\n const nav = this.history.current;\n const from = leaving ?? this.views[this.views.length - 1] ?? null;\n // Resolvers may have rerun, and a custom keyOf may group several snapshots, so the old snapshot cannot be trusted.\n view.routeRef = this.routeRefOf(activatedRoute.snapshot, view.key);\n const alreadyOnScreen = reused && !this.stack.busy && this.stack.top?.el === view.el;\n let direction = this.config.resolve({\n from: from?.routeRef ?? null,\n to: view.routeRef,\n trigger: nav?.trigger ?? 'imperative',\n historyDelta: nav?.historyDelta,\n hint: nav?.hint,\n stack: this.views.map((v) => v.key),\n });\n // After a swipe the page beneath is already showing and the one that left\n // is gone. A pop onto anything else has nothing to pop, so just show the page.\n if (!leaving && this.stack.top && direction === 'pop' && !reused) direction = 'replace';\n const animated = this.config.animated && (nav?.animated ?? true) && (this.views.length > 0 || !!leaving);\n\n view.route = activatedRoute;\n view.proxy?.swap(activatedRoute);\n const current = this.router.getCurrentNavigation();\n view.url = current ? this.router.serializeUrl(current.finalUrl ?? current.extractedUrl) : this.router.url;\n if (view.savedContexts) {\n this.parentContexts.getOrCreateContext(this.name).children.onOutletReAttached(view.savedContexts);\n view.savedContexts = null;\n }\n\n this.activated = view.ref;\n this._activatedRoute = activatedRoute;\n this.activeView = view;\n this.lastDirection = direction;\n this.place(view, direction, leaving);\n if (!alreadyOnScreen) {\n void this.stack.present(view.el, direction, { key: view.key, animated, source: sourceOf(nav?.trigger) });\n }\n this.changeDetector.markForCheck();\n this.bindInputs(view);\n // An animated page renders off screen during its first frames. A page that\n // appears immediately (no animation, or a replace, which the stack never\n // animates) would otherwise be blank until the next scheduled tick.\n if ((!animated || direction === 'replace') && !alreadyOnScreen) view.ref.changeDetectorRef.detectChanges();\n (reused ? this.attachEvents : this.activateEvents).emit(view.ref.instance);\n this.navigatedEvents.emit({ view, direction, animated, reused });\n }\n\n /** Mirrors what the stack will do, synchronously, so `pages` and the next direction stay correct. */\n private place(view: View, direction: Direction, leaving: View | null): void {\n const views = this.views;\n const drop = (v: View | null) => {\n const i = v ? views.indexOf(v) : -1;\n if (i >= 0) views.splice(i, 1);\n };\n if (direction === 'pop' && views.includes(view)) {\n views.splice(views.indexOf(view) + 1);\n return;\n }\n if (direction !== 'push') drop(leaving);\n drop(view);\n views.push(view);\n }\n\n private createView(component: Type<unknown>, route: ActivatedRoute, environmentInjector: EnvironmentInjector, key: string): View {\n const childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n const proxy = new StackNavActivatedRoute(route);\n const injector = Injector.create({\n providers: [\n { provide: ActivatedRoute, useValue: proxy },\n { provide: ChildrenOutletContexts, useValue: childContexts },\n { provide: ROUTER_OUTLET_DATA, useValue: this.routerOutletData },\n ],\n parent: this.location.injector,\n });\n const ref = this.location.createComponent(component, { index: this.location.length, injector, environmentInjector });\n const view = this.wrap(ref, route, key, proxy);\n this.park(view.el);\n this.byEl.set(view.el, view);\n return view;\n }\n\n private wrap(ref: ComponentRef<unknown>, route: ActivatedRoute, key: string, proxy: StackNavActivatedRoute | null): View {\n const el = ref.location.nativeElement as HTMLElement;\n return { ref, el, key, routeRef: this.routeRefOf(route.snapshot, key), url: '', route, proxy, savedContexts: null, pendingRemoval: false, inputs: null };\n }\n\n /** Hidden inside the container until the stack shows it, never a visible sibling of the outlet. */\n private park(el: HTMLElement): void {\n el.classList.add(this.stack.pageClass);\n if (el.parentElement !== this.host) this.host.append(el);\n }\n\n private routeRefOf(snapshot: ActivatedRouteSnapshot, key: string): StackNavRouteRef {\n return { key, segments: segmentsOf(key), level: this.config.levelOf(snapshot), data: snapshot.data, snapshot };\n }\n\n private onStackRemoved(removed: StackEntry[], source: NavigationSource): void {\n for (const entry of removed) {\n const view = this.byEl.get(entry.el);\n if (!view) continue;\n if (source === 'gesture') {\n view.pendingRemoval = true;\n this.views = this.views.filter((v) => v !== view);\n this.navigateBackAfterGesture();\n } else {\n this.destroyView(view);\n }\n }\n }\n\n /** The swipe already revealed the page beneath. Bring the router in line with it. */\n private navigateBackAfterGesture(): void {\n const lower = this.views[this.views.length - 1];\n if (!lower) return;\n const previous = this.history.previousUrl;\n if (previous != null && this.sameUrl(previous, lower.url)) {\n this.browserLocation.back();\n } else {\n void this.router.navigateByUrl(lower.url, { info: { [this.config.infoKey]: { direction: 'pop', animated: false } } });\n }\n }\n\n private sameUrl(a: string, b: string): boolean {\n const norm = (u: string) => this.router.serializeUrl(this.router.parseUrl(u));\n return norm(a) === norm(b);\n }\n\n /** The router refused the navigation the swipe asked for, so put the page back. */\n private restorePending(): void {\n for (const view of this.byEl.values()) {\n if (!view.pendingRemoval) continue;\n view.pendingRemoval = false;\n this.views.push(view);\n void this.stack.push(view.el, { animated: false, key: view.key, source: 'restore' });\n }\n }\n\n private destroyView(view: View): void {\n this.byEl.delete(view.el);\n this.views = this.views.filter((v) => v !== view);\n this.unbindInputs(view);\n if (this.activeView === view) {\n this.activeView = null;\n this.activated = null;\n this._activatedRoute = null;\n }\n const instance = view.ref.instance;\n view.ref.destroy();\n this.deactivateEvents.emit(instance);\n }\n\n private bindInputs(view: View): void {\n if (!this.router.componentInputBindingEnabled) return;\n const mirror = reflectComponentType(view.ref.componentType);\n if (!mirror) return;\n const route = view.route;\n view.inputs = combineLatest([route.queryParams, route.params, route.data])\n .pipe(switchMap(([queryParams, params, data], i) => (i === 0 ? of({ ...queryParams, ...params, ...data }) : from(Promise.resolve({ ...queryParams, ...params, ...data })))))\n .subscribe((data) => {\n if (this.activeView !== view) return;\n for (const { templateName } of mirror.inputs) view.ref.setInput(templateName, data[templateName]);\n });\n }\n private unbindInputs(view: View): void {\n view.inputs?.unsubscribe();\n view.inputs = null;\n }\n\n private syncChangeDetection(): void {\n const top = this.stack.top?.el;\n for (const view of this.byEl.values()) {\n if (view.el === top || view.pendingRemoval) view.ref.changeDetectorRef.reattach();\n else view.ref.changeDetectorRef.detach();\n }\n }\n}\n\nfunction sourceOf(trigger: 'imperative' | 'history' | undefined): NavigationSource {\n return trigger === 'history' ? 'history' : 'api';\n}\n","import { Injectable } from '@angular/core';\nimport { BaseRouteReuseStrategy, type ActivatedRouteSnapshot } from '@angular/router';\n\n/**\n * The router's default strategy reuses a component when only the params change\n * (`/items/1` → `/items/2`), so no outlet activation happens and no transition\n * can run. This strategy asks for a fresh page whenever the URL of the matched\n * route differs, which is what a navigation stack expects. Routes opt out with\n * `data: { reuseRoute: true }`.\n *\n * It is not installed automatically. Provide it like any other strategy to get\n * this behaviour:\n *\n * ```ts\n * { provide: RouteReuseStrategy, useClass: StackNavRouteReuseStrategy }\n * ```\n */\n@Injectable()\nexport class StackNavRouteReuseStrategy extends BaseRouteReuseStrategy {\n override shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\n if (future.routeConfig !== curr.routeConfig) return false;\n if (future.data?.['reuseRoute'] === true) return true;\n return urlOf(future) === urlOf(curr);\n }\n}\n\nfunction urlOf(s: ActivatedRouteSnapshot): string {\n return s.url.map((u) => u.toString()).join('/');\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAGA;;;;;AAKG;MACU,sBAAsB,CAAA;AAChB,IAAA,QAAQ;AAEhB,IAAA,GAAG;AACH,IAAA,MAAM;AACN,IAAA,WAAW;AACX,IAAA,QAAQ;AACR,IAAA,IAAI;AACJ,IAAA,KAAK;AACL,IAAA,QAAQ;AACR,IAAA,aAAa;AAEtB,IAAA,WAAA,CAAY,KAAqB,EAAA;QAC/B,IAAI,CAAC,QAAQ,GAAG,IAAI,eAAe,CAAC,KAAK,CAAC;AAC1C,QAAA,MAAM,EAAE,GAAG,CAAI,IAA0C,KAAK,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AACjG,QAAA,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CA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A;AACpF,QAAA,IAAI,MAAM,CAAC,WAAW,KAAK,IAAI,CAAC,WAAW;AAAE,YAAA,OAAO,KAAK;QACzD,IAAI,MAAM,CAAC,IAAI,GAAG,YAAY,CAAC,KAAK,IAAI;AAAE,YAAA,OAAO,IAAI;QACrD,OAAO,KAAK,CAAC,MAAM,CAAC,KAAK,KAAK,CAAC,IAAI,CAAC;IACtC;uGALW,0BAA0B,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;2GAA1B,0BAA0B,EAAA,CAAA;;2FAA1B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBADtC;;AASD,SAAS,KAAK,CAAC,CAAyB,EAAA;IACtC,OAAO,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;AACjD;;AC5BA;;AAEG;;"}
1
+ {"version":3,"file":"stacknav-angular.mjs","sources":["../../src/lib/activated-route-proxy.ts","../../src/lib/config.ts","../../src/lib/history.ts","../../src/lib/outlet.ts","../../src/lib/route-reuse-strategy.ts","../../src/stacknav-angular.ts"],"sourcesContent":["import type { ActivatedRoute, ActivatedRouteSnapshot, Data, ParamMap, Params, Route, UrlSegment } from '@angular/router';\nimport { BehaviorSubject, type Observable, switchMap } from 'rxjs';\n\n/**\n * The `ActivatedRoute` a page component injects. When a page kept alive beneath\n * the stack is reached again, the router hands it a new route object. This\n * proxy keeps the component's subscriptions valid by switching them to whichever\n * route is current.\n */\nexport class StackNavActivatedRoute {\n private readonly current$: BehaviorSubject<ActivatedRoute>;\n\n readonly url: Observable<UrlSegment[]>;\n readonly params: Observable<Params>;\n readonly queryParams: Observable<Params>;\n readonly fragment: Observable<string | null>;\n readonly data: Observable<Data>;\n readonly title: Observable<string | undefined>;\n readonly paramMap: Observable<ParamMap>;\n readonly queryParamMap: Observable<ParamMap>;\n\n constructor(route: ActivatedRoute) {\n this.current$ = new BehaviorSubject(route);\n const of = <T>(pick: (r: ActivatedRoute) => Observable<T>) => this.current$.pipe(switchMap(pick));\n this.url = of((r) => r.url);\n this.params = of((r) => r.params);\n this.queryParams = of((r) => r.queryParams);\n this.fragment = of((r) => r.fragment);\n this.data = of((r) => r.data);\n this.title = of((r) => r.title);\n this.paramMap = of((r) => r.paramMap);\n this.queryParamMap = of((r) => r.queryParamMap);\n }\n\n /** The router's route object behind the proxy right now. */\n get actual(): ActivatedRoute {\n return this.current$.value;\n }\n /** @internal */\n swap(route: ActivatedRoute): void {\n if (route !== this.current$.value) this.current$.next(route);\n }\n\n get snapshot(): ActivatedRouteSnapshot {\n return this.actual.snapshot;\n }\n get outlet(): string {\n return this.actual.outlet;\n }\n get component(): ActivatedRoute['component'] {\n return this.actual.component;\n }\n get routeConfig(): Route | null {\n return this.actual.routeConfig;\n }\n get root(): ActivatedRoute {\n return this.actual.root;\n }\n get parent(): ActivatedRoute | null {\n return this.actual.parent;\n }\n get firstChild(): ActivatedRoute | null {\n return this.actual.firstChild;\n }\n get children(): ActivatedRoute[] {\n return this.actual.children;\n }\n get pathFromRoot(): ActivatedRoute[] {\n return this.actual.pathFromRoot;\n }\n toString(): string {\n return this.actual.toString();\n }\n}\n","import { InjectionToken, type EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\nimport type { ActivatedRouteSnapshot } from '@angular/router';\nimport {\n createDirectionResolver,\n defaultStrategies,\n isTouchPrimary,\n type Direction,\n type DirectionResolver,\n type DirectionStrategy,\n type NativeTransitionOptions,\n type SwipeBackMode,\n} from '@stacknav/core';\n\n/** Everything `provideStackNav()` accepts. All optional. */\nexport interface StackNavConfig {\n /**\n * Strategies that decide push / pop / replace for a navigation, in priority\n * order. Defaults to the core's `defaultStrategies()`: an explicit hint, then\n * browser history, then the kept stack, then route numbering\n * (`data.stackLevel`), then the route tree. Pass a resolver function to\n * replace the whole mechanism.\n */\n direction?: readonly DirectionStrategy[] | DirectionResolver;\n /** The direction to use when no strategy has an answer. Default `push`. */\n fallbackDirection?: Direction;\n /**\n * Where a route's number comes from, for the numbering strategy.\n * Default: `snapshot.data['stackLevel']`.\n */\n levelOf?: (snapshot: ActivatedRouteSnapshot) => number | null | undefined;\n /**\n * What identifies a page, so that a later navigation to the same key pops\n * back to the kept page. Default: the route's full URL path, including matrix\n * params.\n */\n keyOf?: (snapshot: ActivatedRouteSnapshot) => string;\n /**\n * The key under which a navigation's `info` carries a hint for this library:\n * `router.navigate(cmds, { info: { stacknav: 'pop' } })`. Default `stacknav`.\n */\n infoKey?: string;\n /** Defaults for every outlet's transition. An outlet's `transition` input overrides these per key. */\n transition?: Partial<NativeTransitionOptions>;\n /** Default browser. `disabled` requests document-wide browser gesture suppression where supported. */\n swipeBack?: SwipeBackMode;\n /**\n * Detaches change detection from pages hidden beneath the top and reattaches\n * it when they are shown again. Saves work on deep stacks. Off by default.\n */\n detachInactiveViews?: boolean;\n /** Inserts the engine's stylesheet at runtime. Default true. Turn it off if you import `stacknav.css`. */\n injectStyles?: boolean;\n /**\n * Whether to animate at all. Default true. `prefers-reduced-motion` is\n * honoured either way.\n *\n * `'touch'` animates only where the primary pointer is coarse — a phone or a\n * tablet — and navigates instantly on a desktop, which is the usual reason to\n * ask. A function is asked again before every navigation, so it can decide on\n * whatever the app knows: a user setting, the window's width, a route.\n *\n * ```ts\n * provideStackNav({ animated: 'touch' });\n * provideStackNav({ animated: () => settings.pageTransitions() });\n * ```\n */\n animated?: boolean | 'touch' | (() => boolean);\n}\n\nexport interface ResolvedStackNavConfig {\n resolve: DirectionResolver;\n levelOf: (snapshot: ActivatedRouteSnapshot) => number | null | undefined;\n keyOf: (snapshot: ActivatedRouteSnapshot) => string;\n infoKey: string;\n transition: Partial<NativeTransitionOptions>;\n swipeBack: SwipeBackMode;\n detachInactiveViews: boolean;\n injectStyles: boolean;\n /** Asked before every navigation. */\n animated: () => boolean;\n}\n\nexport const STACKNAV_CONFIG = /*#__PURE__*/ new InjectionToken<ResolvedStackNavConfig>('STACKNAV_CONFIG', {\n providedIn: 'root',\n factory: () => resolveConfig({}),\n});\n\nexport function defaultLevelOf(snapshot: ActivatedRouteSnapshot): number | null | undefined {\n const v = snapshot.data?.['stackLevel'];\n return typeof v === 'number' ? v : undefined;\n}\n\n/** The route's URL path from the root down to and including this route, e.g. `items/42;view=full`. */\nexport function defaultKeyOf(snapshot: ActivatedRouteSnapshot): string {\n return snapshot.pathFromRoot\n .flatMap((s) => s.url.map((u) => u.toString()))\n .join('/');\n}\n\nexport function resolveConfig(c: StackNavConfig): ResolvedStackNavConfig {\n const resolve =\n typeof c.direction === 'function'\n ? c.direction\n : createDirectionResolver(c.direction ?? defaultStrategies(), c.fallbackDirection ?? 'push');\n return {\n resolve,\n levelOf: c.levelOf ?? defaultLevelOf,\n keyOf: c.keyOf ?? defaultKeyOf,\n infoKey: c.infoKey ?? 'stacknav',\n transition: c.transition ?? {},\n swipeBack: c.swipeBack ?? 'browser',\n detachInactiveViews: c.detachInactiveViews ?? false,\n injectStyles: c.injectStyles ?? true,\n animated: resolveAnimated(c.animated),\n };\n}\n\nfunction resolveAnimated(animated: StackNavConfig['animated']): () => boolean {\n if (typeof animated === 'function') return animated;\n if (animated === 'touch') return isTouchPrimary;\n const on = animated ?? true;\n return () => on;\n}\n\n/**\n * Configures the outlets. Add it next to `provideRouter()`. It changes no\n * router configuration.\n *\n * ```ts\n * bootstrapApplication(App, { providers: [provideRouter(routes), provideStackNav()] });\n * ```\n */\nexport function provideStackNav(config: StackNavConfig = {}): EnvironmentProviders {\n return makeEnvironmentProviders([{ provide: STACKNAV_CONFIG, useValue: resolveConfig(config) }]);\n}\n","import { Injectable, inject } from '@angular/core';\nimport { NavigationCancel, NavigationEnd, NavigationError, NavigationSkipped, NavigationStart, ROUTER_CONFIGURATION, Router } from '@angular/router';\nimport type { Direction, DirectionOpinion, NavigationTrigger } from '@stacknav/core';\nimport { STACKNAV_CONFIG } from './config';\n\n/**\n * What a navigation can say to the outlet through the router's own\n * `NavigationExtras.info`, under the configured key (default `stacknav`):\n *\n * ```ts\n * router.navigate(['/items', 2], { info: { stacknav: 'push' } });\n * router.navigate(['/login'], { info: { stacknav: { direction: 'replace', animated: false } } });\n * ```\n */\nexport type StackNavHint = Direction | { direction?: DirectionOpinion; animated?: boolean };\n\nexport interface NavigationInfo {\n id: number;\n trigger: NavigationTrigger;\n /** negative = back, positive = forward, undefined when unknown */\n historyDelta: number | undefined;\n hint: DirectionOpinion;\n animated: boolean | undefined;\n replaceUrl: boolean;\n skipLocationChange: boolean;\n restoredId: number | null;\n}\n\ninterface Entry {\n id: number;\n url: string;\n}\n\n/**\n * A model of the browser's history as the router walks it: which entry is\n * current, and which came before. It answers two questions for the outlet: is\n * this navigation going back or forward, and is the previous history entry the\n * page beneath the top? Everything comes from public router events, so it needs\n * no router configuration. Internal to the outlet.\n */\n@Injectable({ providedIn: 'root' })\nexport class StackNavHistory {\n private readonly router = inject(Router);\n private readonly config = inject(STACKNAV_CONFIG);\n private readonly cancelResolution = inject(ROUTER_CONFIGURATION, { optional: true })?.canceledNavigationResolution ?? 'replace';\n private entries: Entry[] = [];\n private cursor = -1;\n private pending: NavigationInfo | null = null;\n\n constructor() {\n this.router.events.subscribe((e) => {\n if (e instanceof NavigationStart) this.onStart(e);\n else if (e instanceof NavigationEnd) this.onEnd(e);\n else if (e instanceof NavigationCancel || e instanceof NavigationError) this.onAbort();\n else if (e instanceof NavigationSkipped) this.pending = null;\n });\n }\n\n /** The navigation in flight, if any. Valid while the router activates routes. */\n get current(): NavigationInfo | null {\n return this.pending;\n }\n\n /** URL of the history entry before the current one, or null. */\n get previousUrl(): string | null {\n return this.cursor > 0 ? this.entries[this.cursor - 1].url : null;\n }\n\n get currentUrl(): string | null {\n return this.cursor >= 0 ? this.entries[this.cursor].url : null;\n }\n\n get canGoBack(): boolean {\n return this.cursor > 0;\n }\n\n private onStart(e: NavigationStart): void {\n const nav = this.router.getCurrentNavigation();\n const isHistory = e.navigationTrigger === 'popstate' || e.navigationTrigger === 'hashchange';\n const restoredId = e.restoredState?.navigationId ?? null;\n let historyDelta: number | undefined;\n if (isHistory) {\n const idx = this.indexOf(restoredId);\n if (idx >= 0 && this.cursor >= 0) historyDelta = idx - this.cursor;\n else if (restoredId != null && this.cursor >= 0) historyDelta = restoredId < this.entries[this.cursor].id ? -1 : 1;\n }\n const hint = isHistory ? undefined : readHint(nav?.extras.info, this.config.infoKey);\n this.pending = {\n id: e.id,\n trigger: isHistory ? 'history' : 'imperative',\n historyDelta,\n hint: hint?.direction,\n animated: hint?.animated,\n replaceUrl: !!nav?.extras.replaceUrl,\n skipLocationChange: !!nav?.extras.skipLocationChange,\n restoredId,\n };\n }\n\n private onEnd(e: NavigationEnd): void {\n const p = this.pending;\n this.pending = null;\n const entry: Entry = { id: e.id, url: e.urlAfterRedirects };\n if (!p || this.cursor < 0) {\n this.entries = [entry];\n this.cursor = 0;\n return;\n }\n if (p.trigger === 'history') {\n const idx = this.indexOf(p.restoredId);\n if (idx >= 0) {\n this.cursor = idx;\n this.entries[idx] = entry; // the router rewrites the entry's navigationId on popstate\n } else {\n this.entries = [entry];\n this.cursor = 0;\n }\n return;\n }\n if (p.skipLocationChange) return;\n if (p.replaceUrl) {\n this.entries[this.cursor] = entry;\n return;\n }\n this.entries.splice(this.cursor + 1);\n this.entries.push(entry);\n this.cursor++;\n }\n\n /**\n * Handles a history navigation the router refused. With\n * `canceledNavigationResolution: 'computed'` the router walks the browser back\n * to where it was, so nothing changes here. With the default `'replace'` it\n * overwrites the entry the browser landed on with the current URL and the last\n * successful id.\n */\n private onAbort(): void {\n const p = this.pending;\n this.pending = null;\n if (!p || p.trigger !== 'history' || this.cursor < 0 || this.cancelResolution === 'computed') return;\n const idx = this.indexOf(p.restoredId);\n if (idx < 0) return;\n this.entries[idx] = { ...this.entries[this.cursor] };\n this.cursor = idx;\n }\n\n /** The entry carrying `id`, preferring the nearest one that is not the current entry. */\n private indexOf(id: number | null): number {\n if (id == null) return -1;\n let best = -1;\n for (let i = 0; i < this.entries.length; i++) {\n if (this.entries[i].id !== id) continue;\n if (best < 0 || best === this.cursor || (i !== this.cursor && Math.abs(i - this.cursor) < Math.abs(best - this.cursor))) best = i;\n }\n return best;\n }\n}\n\nfunction readHint(info: unknown, key: string): { direction?: DirectionOpinion; animated?: boolean } | undefined {\n if (info == null || typeof info !== 'object') return undefined;\n const v = (info as Record<string, unknown>)[key] as StackNavHint | undefined;\n if (v == null) return undefined;\n return typeof v === 'string' ? { direction: v } : v;\n}\n","import { DOCUMENT, Location } from '@angular/common';\nimport {\n ChangeDetectorRef,\n Directive,\n ElementRef,\n EventEmitter,\n ErrorHandler,\n Injector,\n Input,\n Output,\n ViewContainerRef,\n inject,\n effect,\n input,\n reflectComponentType,\n type ComponentRef,\n type EnvironmentInjector,\n type OnDestroy,\n type OnInit,\n type Type,\n} from '@angular/core';\nimport {\n ActivatedRoute,\n ChildrenOutletContexts,\n NavigationCancel,\n NavigationEnd,\n NavigationError,\n NavigationSkipped,\n PRIMARY_OUTLET,\n ROUTER_OUTLET_DATA,\n Router,\n type ActivatedRouteSnapshot,\n type OutletContext,\n type RouterOutletContract,\n} from '@angular/router';\nimport {\n createNativeStack,\n injectStyles,\n segmentsOf,\n type Direction,\n type NativeStack,\n type NativeTransitionOptions,\n type NavigationSource,\n type RouteRef,\n type StackEntry,\n type SwipeBackMode,\n} from '@stacknav/core';\nimport { Subscription, combineLatest, from, of, switchMap } from 'rxjs';\nimport { StackNavActivatedRoute } from './activated-route-proxy';\nimport { STACKNAV_CONFIG } from './config';\nimport { StackNavHistory } from './history';\n\n/** What the outlet knows about a page, passed to direction strategies. */\nexport interface StackNavRouteRef extends RouteRef {\n snapshot: ActivatedRouteSnapshot;\n}\n\n/** A page the outlet keeps alive. */\nexport interface StackNavView {\n readonly ref: ComponentRef<unknown>;\n readonly el: HTMLElement;\n readonly key: string;\n readonly routeRef: StackNavRouteRef;\n /** the full app URL when the page was last active */\n url: string;\n route: ActivatedRoute;\n}\n\ninterface View extends StackNavView {\n routeRef: StackNavRouteRef;\n proxy: StackNavActivatedRoute | null;\n savedContexts: Map<string, OutletContext> | null;\n /** popped by an interactive pop, waiting for the router to catch up */\n pendingRemoval: boolean;\n inputs: Subscription | null;\n}\n\nexport interface StackNavActivation {\n view: StackNavView;\n direction: Direction;\n animated: boolean;\n reused: boolean;\n}\n\n/**\n * A router outlet (`RouterOutletContract`) that keeps a stack of pages and moves\n * between them with the platform's native push/pop transition. Use it where you would use\n * `<router-outlet>`. The router drives it the same way:\n *\n * ```html\n * <sn-outlet />\n * ```\n *\n * Pages beneath the top stay alive, keeping scroll position, form state and\n * subscriptions, and the direction of every navigation is decided by the\n * strategies configured in\n * `provideStackNav()`. The element needs a height; it is the pages' scroll\n * container.\n */\n@Directive({\n selector: 'sn-outlet',\n exportAs: 'snOutlet',\n host: { style: 'display: block' },\n})\nexport class StackNavOutlet implements RouterOutletContract, OnInit, OnDestroy {\n /** Outlet name, as on `router-outlet`. Static. */\n @Input() name: string = PRIMARY_OUTLET;\n /** Per-outlet transition options, merged over `provideStackNav({ transition })`. */\n @Input() transition: Partial<NativeTransitionOptions> | undefined;\n /** Live per-outlet override of the configured swipe policy. */\n readonly swipeBack = input<SwipeBackMode>();\n /** Same as on `router-outlet`: available to pages through `ROUTER_OUTLET_DATA`. */\n readonly routerOutletData = input<unknown>(undefined);\n\n /** A page component was created. */\n @Output('activate') activateEvents = new EventEmitter<unknown>();\n /** A page component was destroyed. */\n @Output('deactivate') deactivateEvents = new EventEmitter<unknown>();\n /** A kept page was shown again, or a detached one re-attached. */\n @Output('attach') attachEvents = new EventEmitter<unknown>();\n @Output('detach') detachEvents = new EventEmitter<unknown>();\n /** Every activation, with the direction that was resolved for it. */\n @Output('navigated') navigatedEvents = new EventEmitter<StackNavActivation>();\n\n private readonly parentContexts = inject(ChildrenOutletContexts);\n private readonly location = inject(ViewContainerRef);\n private readonly changeDetector = inject(ChangeDetectorRef);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n private readonly config = inject(STACKNAV_CONFIG);\n private readonly history = inject(StackNavHistory);\n private readonly router = inject(Router);\n private readonly browserLocation = inject(Location);\n private readonly document = inject(DOCUMENT);\n private readonly errorHandler = inject(ErrorHandler);\n private destroyed = false;\n\n /**\n * The underlying core stack. Chrome that just has to move with the pages is\n * usually best driven from CSS, off `--sn-t` / `--sn-e` and the\n * `sn-page-upper` / `sn-page-lower` classes; subscribe to `progress` when\n * you need the number itself.\n */\n stack!: NativeStack;\n /** The direction of the last activation. */\n lastDirection: Direction | null = null;\n\n /** Inputs are bound when the router was configured with `withComponentInputBinding()`. */\n readonly supportsBindingToComponentInputs?: true;\n\n private views: View[] = [];\n private readonly byEl = new Map<HTMLElement, View>();\n private readonly detached = new Map<ComponentRef<unknown>, View>();\n private activeView: View | null = null;\n private leaving: View | null = null;\n private activated: ComponentRef<unknown> | null = null;\n private _activatedRoute: ActivatedRoute | null = null;\n private subs = new Subscription();\n\n constructor() {\n effect(() => {\n const mode = this.swipeBack() ?? this.config.swipeBack;\n this.stack?.setSwipeBack(mode);\n });\n if (this.router.componentInputBindingEnabled) this.supportsBindingToComponentInputs = true;\n }\n\n // ------------------------------------------------------------- lifecycle\n ngOnInit(): void {\n this.stack = createNativeStack({\n container: this.host,\n transition: { ...this.config.transition, ...(this.transition || {}) },\n swipeBack: this.swipeBack() ?? this.config.swipeBack,\n });\n if (this.config.injectStyles) injectStyles(this.document);\n\n this.stack.on('pop', (e) => this.onStackRemoved(e.removed, e.source));\n this.stack.on('replace', (e) => this.onStackRemoved(e.removed, e.source));\n this.stack.on('reset', (e) => this.onStackRemoved(e.removed, e.source));\n if (this.config.detachInactiveViews) {\n this.stack.on('transitionstart', ({ lower, upper }) => {\n for (const entry of [lower, upper]) {\n const view = entry && this.byEl.get(entry.el);\n if (view) view.ref.changeDetectorRef.reattach();\n }\n });\n for (const event of ['push', 'pop', 'replace', 'reset'] as const) this.stack.on(event, () => this.syncChangeDetection());\n }\n this.subs.add(\n this.router.events.subscribe((e) => {\n if (e instanceof NavigationCancel || e instanceof NavigationError || e instanceof NavigationSkipped) this.restorePending();\n else if (e instanceof NavigationEnd && this.activeView) this.activeView.url = e.urlAfterRedirects;\n }),\n );\n\n this.parentContexts.onChildOutletCreated(this.name, this);\n const context = this.parentContexts.getContext(this.name);\n if (context?.route) {\n if (context.attachRef) this.attach(context.attachRef, context.route);\n else this.activateWith(context.route, context.injector);\n }\n }\n\n ngOnDestroy(): void {\n this.destroyed = true;\n this.leaving = null;\n if (this.parentContexts.getContext(this.name)?.outlet === this) this.parentContexts.onChildOutletDestroyed(this.name);\n this.subs.unsubscribe();\n for (const view of this.byEl.values()) view.inputs?.unsubscribe();\n this.stack?.destroy();\n }\n\n // -------------------------------------------------------- outlet contract\n get isActivated(): boolean {\n return !!this.activated;\n }\n get component(): object {\n if (!this.activated) throw new Error('Outlet is not activated');\n return this.activated.instance as object;\n }\n get activatedComponentRef(): ComponentRef<unknown> | null {\n return this.activated;\n }\n get activatedRoute(): ActivatedRoute {\n if (!this.activated) throw new Error('Outlet is not activated');\n return this._activatedRoute!;\n }\n get activatedRouteData(): Record<string, unknown> {\n return this._activatedRoute ? this._activatedRoute.snapshot.data : {};\n }\n\n /** Pages currently kept, bottom to top. The last one is on screen. */\n get pages(): readonly StackNavView[] {\n return this.views;\n }\n /** Whether a swipe has a kept page to reveal. */\n get canPop(): boolean {\n return this.views.length > 1;\n }\n\n activateWith(activatedRoute: ActivatedRoute, environmentInjector: EnvironmentInjector): void {\n if (this.activated) throw new Error('Cannot activate an already activated outlet');\n const snapshot = activatedRoute.snapshot;\n const key = this.config.keyOf(snapshot);\n const leaving = this.takeLeaving();\n let existing = this.views.find((v) => v.key === key) ?? null;\n if (existing === leaving) existing = null;\n const view = existing ?? this.createView(snapshot.component!, activatedRoute, environmentInjector, key);\n this.show(view, activatedRoute, leaving, !!existing);\n }\n\n deactivate(): void {\n if (!this.activated) return;\n const view = this.activeView!;\n this.unbindInputs(view);\n const context = this.parentContexts.getContext(this.name);\n if (context) view.savedContexts = (context.children as unknown as { contexts: Map<string, OutletContext> }).contexts;\n this.activated = null;\n this._activatedRoute = null;\n this.activeView = null;\n if (view.pendingRemoval) {\n this.destroyView(view);\n return;\n }\n // The router deactivates before it activates, synchronously. If no\n // activation follows, the outlet is really empty.\n this.leaving = view;\n queueMicrotask(() => {\n if (this.leaving !== view) return;\n this.leaving = null;\n this.views = [];\n this.runStackTask(this.stack.reset([]));\n });\n }\n\n detach(): ComponentRef<unknown> {\n if (!this.activated) throw new Error('Outlet is not activated');\n const view = this.activeView!;\n const ref = view.ref;\n this.unbindInputs(view);\n this.activated = null;\n this._activatedRoute = null;\n this.activeView = null;\n this.byEl.delete(view.el);\n this.views = this.views.filter((v) => v !== view);\n this.detached.set(ref, view);\n this.runStackTask(this.stack.remove(view.el));\n const i = this.location.indexOf(ref.hostView);\n if (i >= 0) this.location.detach(i);\n this.detachEvents.emit(ref.instance);\n return ref;\n }\n\n attach(ref: ComponentRef<unknown>, activatedRoute: ActivatedRoute): void {\n const key = this.config.keyOf(activatedRoute.snapshot);\n let view = this.detached.get(ref) ?? null;\n this.detached.delete(ref);\n if (!view) view = this.wrap(ref, activatedRoute, key, null);\n this.location.insert(ref.hostView);\n this.park(view.el);\n this.byEl.set(view.el, view);\n const leaving = this.takeLeaving();\n this.show(view, activatedRoute, leaving, true);\n }\n\n // -------------------------------------------------------------- internals\n /** Teardown cancels queued navigation; report other failures through Angular. */\n private runStackTask(task: Promise<unknown>): void {\n void task.catch((error: unknown) => {\n if (this.destroyed && error instanceof Error && error.name === 'AbortError') return;\n this.errorHandler.handleError(error);\n });\n }\n\n private takeLeaving(): View | null {\n const leaving = this.leaving;\n this.leaving = null;\n return leaving;\n }\n\n /** Decides the direction, places the page in the stack, and makes it active. */\n private show(view: View, activatedRoute: ActivatedRoute, leaving: View | null, reused: boolean): void {\n const nav = this.history.current;\n const from = leaving ?? this.views[this.views.length - 1] ?? null;\n // Resolvers may have rerun, and a custom keyOf may group several snapshots, so the old snapshot cannot be trusted.\n view.routeRef = this.routeRefOf(activatedRoute.snapshot, view.key);\n const alreadyOnScreen = reused && !this.stack.busy && this.stack.top?.el === view.el;\n let direction = this.config.resolve({\n from: from?.routeRef ?? null,\n to: view.routeRef,\n trigger: nav?.trigger ?? 'imperative',\n historyDelta: nav?.historyDelta,\n hint: nav?.hint,\n stack: this.views.map((v) => v.key),\n });\n // After a swipe the page beneath is already showing and the one that left\n // is gone. A pop onto anything else has nothing to pop, so just show the page.\n if (!leaving && this.stack.top && direction === 'pop' && !reused) direction = 'replace';\n const animated = this.config.animated() && (nav?.animated ?? true) && (this.views.length > 0 || !!leaving);\n\n view.route = activatedRoute;\n view.proxy?.swap(activatedRoute);\n const current = this.router.getCurrentNavigation();\n view.url = current ? this.router.serializeUrl(current.finalUrl ?? current.extractedUrl) : this.router.url;\n if (view.savedContexts) {\n this.parentContexts.getOrCreateContext(this.name).children.onOutletReAttached(view.savedContexts);\n view.savedContexts = null;\n }\n\n this.activated = view.ref;\n this._activatedRoute = activatedRoute;\n this.activeView = view;\n this.lastDirection = direction;\n this.place(view, direction, leaving);\n if (!alreadyOnScreen) {\n this.runStackTask(this.stack.present(view.el, direction, { key: view.key, animated, source: sourceOf(nav?.trigger) }));\n }\n this.changeDetector.markForCheck();\n this.bindInputs(view);\n // An animated page renders off screen during its first frames. A page that\n // appears immediately (no animation, or a replace, which the stack never\n // animates) would otherwise be blank until the next scheduled tick.\n if ((!animated || direction === 'replace') && !alreadyOnScreen) view.ref.changeDetectorRef.detectChanges();\n (reused ? this.attachEvents : this.activateEvents).emit(view.ref.instance);\n this.navigatedEvents.emit({ view, direction, animated, reused });\n }\n\n /** Mirrors what the stack will do, synchronously, so `pages` and the next direction stay correct. */\n private place(view: View, direction: Direction, leaving: View | null): void {\n const views = this.views;\n const drop = (v: View | null) => {\n const i = v ? views.indexOf(v) : -1;\n if (i >= 0) views.splice(i, 1);\n };\n if (direction === 'pop' && views.includes(view)) {\n views.splice(views.indexOf(view) + 1);\n return;\n }\n if (direction !== 'push') drop(leaving);\n drop(view);\n views.push(view);\n }\n\n private createView(component: Type<unknown>, route: ActivatedRoute, environmentInjector: EnvironmentInjector, key: string): View {\n const childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n const proxy = new StackNavActivatedRoute(route);\n const injector = Injector.create({\n providers: [\n { provide: ActivatedRoute, useValue: proxy },\n { provide: ChildrenOutletContexts, useValue: childContexts },\n { provide: ROUTER_OUTLET_DATA, useValue: this.routerOutletData },\n ],\n parent: this.location.injector,\n });\n const ref = this.location.createComponent(component, { index: this.location.length, injector, environmentInjector });\n const view = this.wrap(ref, route, key, proxy);\n this.park(view.el);\n this.byEl.set(view.el, view);\n return view;\n }\n\n private wrap(ref: ComponentRef<unknown>, route: ActivatedRoute, key: string, proxy: StackNavActivatedRoute | null): View {\n const el = ref.location.nativeElement as HTMLElement;\n return { ref, el, key, routeRef: this.routeRefOf(route.snapshot, key), url: '', route, proxy, savedContexts: null, pendingRemoval: false, inputs: null };\n }\n\n /** Hidden inside the container until the stack shows it, never a visible sibling of the outlet. */\n private park(el: HTMLElement): void {\n el.classList.add(this.stack.pageClass);\n if (el.parentElement !== this.host) this.host.append(el);\n }\n\n private routeRefOf(snapshot: ActivatedRouteSnapshot, key: string): StackNavRouteRef {\n return { key, segments: segmentsOf(key), level: this.config.levelOf(snapshot), data: snapshot.data, snapshot };\n }\n\n private onStackRemoved(removed: StackEntry[], source: NavigationSource): void {\n for (const entry of removed) {\n const view = this.byEl.get(entry.el);\n if (!view) continue;\n if (source === 'gesture') {\n view.pendingRemoval = true;\n this.views = this.views.filter((v) => v !== view);\n this.navigateBackAfterGesture();\n } else {\n this.destroyView(view);\n }\n }\n }\n\n /** The interactive pop already revealed the page beneath. Bring the router in line with it. */\n private navigateBackAfterGesture(): void {\n const lower = this.views[this.views.length - 1];\n if (!lower) return;\n const previous = this.history.previousUrl;\n if (previous != null && this.sameUrl(previous, lower.url)) {\n this.browserLocation.back();\n } else {\n void this.router.navigateByUrl(lower.url, { info: { [this.config.infoKey]: { direction: 'pop', animated: false } } });\n }\n }\n\n private sameUrl(a: string, b: string): boolean {\n const norm = (u: string) => this.router.serializeUrl(this.router.parseUrl(u));\n return norm(a) === norm(b);\n }\n\n /** The router refused the navigation the pop asked for, so put the page back. */\n private restorePending(): void {\n for (const view of this.byEl.values()) {\n if (!view.pendingRemoval) continue;\n view.pendingRemoval = false;\n this.views.push(view);\n this.runStackTask(this.stack.push(view.el, { animated: false, key: view.key, source: 'restore' }));\n }\n }\n\n private destroyView(view: View): void {\n this.byEl.delete(view.el);\n this.views = this.views.filter((v) => v !== view);\n this.unbindInputs(view);\n if (this.activeView === view) {\n this.activeView = null;\n this.activated = null;\n this._activatedRoute = null;\n }\n const instance = view.ref.instance;\n view.ref.destroy();\n this.deactivateEvents.emit(instance);\n }\n\n private bindInputs(view: View): void {\n if (!this.router.componentInputBindingEnabled) return;\n const mirror = reflectComponentType(view.ref.componentType);\n if (!mirror) return;\n const route = view.route;\n view.inputs = combineLatest([route.queryParams, route.params, route.data])\n .pipe(switchMap(([queryParams, params, data], i) => (i === 0 ? of({ ...queryParams, ...params, ...data }) : from(Promise.resolve({ ...queryParams, ...params, ...data })))))\n .subscribe((data) => {\n if (this.activeView !== view) return;\n for (const { templateName } of mirror.inputs) view.ref.setInput(templateName, data[templateName]);\n });\n }\n private unbindInputs(view: View): void {\n view.inputs?.unsubscribe();\n view.inputs = null;\n }\n\n private syncChangeDetection(): void {\n const top = this.stack.top?.el;\n for (const view of this.byEl.values()) {\n if (view.el === top || view.pendingRemoval) view.ref.changeDetectorRef.reattach();\n else view.ref.changeDetectorRef.detach();\n }\n }\n}\n\nfunction sourceOf(trigger: 'imperative' | 'history' | undefined): NavigationSource {\n return trigger === 'history' ? 'history' : 'api';\n}\n","import { Injectable } from '@angular/core';\nimport { BaseRouteReuseStrategy, type ActivatedRouteSnapshot } from '@angular/router';\n\n/**\n * The router's default strategy reuses a component when only the params change\n * (`/items/1` → `/items/2`), so no outlet activation happens and no transition\n * can run. This strategy asks for a fresh page whenever the URL of the matched\n * route differs, which is what a navigation stack expects. Routes opt out with\n * `data: { reuseRoute: true }`.\n *\n * It is not installed automatically. Provide it like any other strategy to get\n * this behaviour:\n *\n * ```ts\n * { provide: RouteReuseStrategy, useClass: StackNavRouteReuseStrategy }\n * ```\n */\n@Injectable()\nexport class StackNavRouteReuseStrategy extends BaseRouteReuseStrategy {\n override shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\n if (future.routeConfig !== curr.routeConfig) return false;\n if (future.data?.['reuseRoute'] === true) return true;\n return urlOf(future) === urlOf(curr);\n }\n}\n\nfunction urlOf(s: ActivatedRouteSnapshot): string {\n return s.url.map((u) => u.toString()).join('/');\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAGA;;;;;AAKG;MACU,sBAAsB,CAAA;AAChB,IAAA,QAAQ;AAEhB,IAAA,GAAG;AACH,IAAA,MAAM;AACN,IAAA,WAAW;AACX,IAAA,QAAQ;AACR,IAAA,IAAI;AACJ,IAAA,KAAK;AACL,IAAA,QAAQ;AACR,IAAA,aAAa;AAEtB,IAAA,WAAA,CAAY,KAAqB,EAAA;QAC/B,IAAI,CAAC,QAAQ,GAAG,IAAI,eAAe,CAAC,KAAK,CAAC;AAC1C,QAAA,MAAM,EAAE,GAAG,CAAI,IAA0C,KAAK,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AACjG,QAAA,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC;AAC3B,QAAA,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;AACjC,QAAA,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC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
1
  {
2
2
  "name": "@stacknav/angular",
3
- "version": "0.1.2",
4
- "description": "Angular router outlet with iOS-style push/pop transitions and interactive swipe back, built on @stacknav/core.",
3
+ "version": "0.2.0",
4
+ "description": "Angular router outlet with native-style (iOS and Android) push/pop transitions and interactive swipe back, built on @stacknav/core.",
5
5
  "license": "MIT",
6
6
  "keywords": [
7
7
  "angular",
@@ -9,6 +9,7 @@
9
9
  "navigation",
10
10
  "transition",
11
11
  "ios",
12
+ "android",
12
13
  "swipe-back",
13
14
  "stack",
14
15
  "animation"
@@ -21,7 +22,7 @@
21
22
  },
22
23
  "dependencies": {
23
24
  "tslib": "^2.8.0",
24
- "@stacknav/core": "^0.3.0"
25
+ "@stacknav/core": "^0.4.0"
25
26
  },
26
27
  "sideEffects": false,
27
28
  "type": "module",
@@ -1,7 +1,8 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { ComponentRef, OnInit, OnDestroy, EventEmitter, EnvironmentInjector, InjectionToken, EnvironmentProviders } from '@angular/core';
3
3
  import { ActivatedRouteSnapshot, ActivatedRoute, RouterOutletContract, BaseRouteReuseStrategy, UrlSegment, Params, Data, ParamMap, Route } from '@angular/router';
4
- import { RouteRef, Direction, IOSTransitionOptions, EdgePanGestureOptions, IOSStack, DirectionOpinion, DirectionResolver, DirectionStrategy } from '@stacknav/core';
4
+ import { RouteRef, Direction, NativeTransitionOptions, SwipeBackMode, NativeStack, DirectionOpinion, DirectionResolver, DirectionStrategy } from '@stacknav/core';
5
+ export { SwipeBackMode } from '@stacknav/core';
5
6
  import { Observable } from 'rxjs';
6
7
 
7
8
  /** What the outlet knows about a page, passed to direction strategies. */
@@ -26,7 +27,7 @@ interface StackNavActivation {
26
27
  }
27
28
  /**
28
29
  * A router outlet (`RouterOutletContract`) that keeps a stack of pages and moves
29
- * between them with the iOS push/pop transition. Use it where you would use
30
+ * between them with the platform's native push/pop transition. Use it where you would use
30
31
  * `<router-outlet>`. The router drives it the same way:
31
32
  *
32
33
  * ```html
@@ -34,8 +35,8 @@ interface StackNavActivation {
34
35
  * ```
35
36
  *
36
37
  * Pages beneath the top stay alive, keeping scroll position, form state and
37
- * subscriptions. A swipe from the leading edge pops interactively, and the
38
- * direction of every navigation is decided by the strategies configured in
38
+ * subscriptions, and the direction of every navigation is decided by the
39
+ * strategies configured in
39
40
  * `provideStackNav()`. The element needs a height; it is the pages' scroll
40
41
  * container.
41
42
  */
@@ -43,9 +44,9 @@ declare class StackNavOutlet implements RouterOutletContract, OnInit, OnDestroy
43
44
  /** Outlet name, as on `router-outlet`. Static. */
44
45
  name: string;
45
46
  /** Per-outlet transition options, merged over `provideStackNav({ transition })`. */
46
- transition: Partial<IOSTransitionOptions> | undefined;
47
- /** Per-outlet gesture options, merged over `provideStackNav({ gesture })`. `false` disables the swipe. */
48
- gesture: Partial<EdgePanGestureOptions> | false | undefined;
47
+ transition: Partial<NativeTransitionOptions> | undefined;
48
+ /** Live per-outlet override of the configured swipe policy. */
49
+ readonly swipeBack: i0.InputSignal<SwipeBackMode | undefined>;
49
50
  /** Same as on `router-outlet`: available to pages through `ROUTER_OUTLET_DATA`. */
50
51
  readonly routerOutletData: i0.InputSignal<unknown>;
51
52
  /** A page component was created. */
@@ -66,13 +67,15 @@ declare class StackNavOutlet implements RouterOutletContract, OnInit, OnDestroy
66
67
  private readonly router;
67
68
  private readonly browserLocation;
68
69
  private readonly document;
70
+ private readonly errorHandler;
71
+ private destroyed;
69
72
  /**
70
73
  * The underlying core stack. Chrome that just has to move with the pages is
71
74
  * usually best driven from CSS, off `--sn-t` / `--sn-e` and the
72
75
  * `sn-page-upper` / `sn-page-lower` classes; subscribe to `progress` when
73
76
  * you need the number itself.
74
77
  */
75
- stack: IOSStack;
78
+ stack: NativeStack;
76
79
  /** The direction of the last activation. */
77
80
  lastDirection: Direction | null;
78
81
  /** Inputs are bound when the router was configured with `withComponentInputBinding()`. */
@@ -101,6 +104,8 @@ declare class StackNavOutlet implements RouterOutletContract, OnInit, OnDestroy
101
104
  deactivate(): void;
102
105
  detach(): ComponentRef<unknown>;
103
106
  attach(ref: ComponentRef<unknown>, activatedRoute: ActivatedRoute): void;
107
+ /** Teardown cancels queued navigation; report other failures through Angular. */
108
+ private runStackTask;
104
109
  private takeLeaving;
105
110
  /** Decides the direction, places the page in the stack, and makes it active. */
106
111
  private show;
@@ -112,17 +117,17 @@ declare class StackNavOutlet implements RouterOutletContract, OnInit, OnDestroy
112
117
  private park;
113
118
  private routeRefOf;
114
119
  private onStackRemoved;
115
- /** The swipe already revealed the page beneath. Bring the router in line with it. */
120
+ /** The interactive pop already revealed the page beneath. Bring the router in line with it. */
116
121
  private navigateBackAfterGesture;
117
122
  private sameUrl;
118
- /** The router refused the navigation the swipe asked for, so put the page back. */
123
+ /** The router refused the navigation the pop asked for, so put the page back. */
119
124
  private restorePending;
120
125
  private destroyView;
121
126
  private bindInputs;
122
127
  private unbindInputs;
123
128
  private syncChangeDetection;
124
129
  static ɵfac: i0.ɵɵFactoryDeclaration<StackNavOutlet, never>;
125
- static ɵdir: i0.ɵɵDirectiveDeclaration<StackNavOutlet, "sn-outlet", ["snOutlet"], { "name": { "alias": "name"; "required": false; }; "transition": { "alias": "transition"; "required": false; }; "gesture": { "alias": "gesture"; "required": false; }; "routerOutletData": { "alias": "routerOutletData"; "required": false; "isSignal": true; }; }, { "activateEvents": "activate"; "deactivateEvents": "deactivate"; "attachEvents": "attach"; "detachEvents": "detach"; "navigatedEvents": "navigated"; }, never, never, true, never>;
130
+ static ɵdir: i0.ɵɵDirectiveDeclaration<StackNavOutlet, "sn-outlet", ["snOutlet"], { "name": { "alias": "name"; "required": false; }; "transition": { "alias": "transition"; "required": false; }; "swipeBack": { "alias": "swipeBack"; "required": false; "isSignal": true; }; "routerOutletData": { "alias": "routerOutletData"; "required": false; "isSignal": true; }; }, { "activateEvents": "activate"; "deactivateEvents": "deactivate"; "attachEvents": "attach"; "detachEvents": "detach"; "navigatedEvents": "navigated"; }, never, never, true, never>;
126
131
  }
127
132
 
128
133
  /**
@@ -168,9 +173,9 @@ interface StackNavConfig {
168
173
  */
169
174
  infoKey?: string;
170
175
  /** Defaults for every outlet's transition. An outlet's `transition` input overrides these per key. */
171
- transition?: Partial<IOSTransitionOptions>;
172
- /** Defaults for every outlet's swipe-back gesture. `false` disables it. */
173
- gesture?: Partial<EdgePanGestureOptions> | false;
176
+ transition?: Partial<NativeTransitionOptions>;
177
+ /** Default browser. `disabled` requests document-wide browser gesture suppression where supported. */
178
+ swipeBack?: SwipeBackMode;
174
179
  /**
175
180
  * Detaches change detection from pages hidden beneath the top and reattaches
176
181
  * it when they are shown again. Saves work on deep stacks. Off by default.
@@ -178,19 +183,33 @@ interface StackNavConfig {
178
183
  detachInactiveViews?: boolean;
179
184
  /** Inserts the engine's stylesheet at runtime. Default true. Turn it off if you import `stacknav.css`. */
180
185
  injectStyles?: boolean;
181
- /** Whether to animate at all. Default true. `prefers-reduced-motion` is honoured either way. */
182
- animated?: boolean;
186
+ /**
187
+ * Whether to animate at all. Default true. `prefers-reduced-motion` is
188
+ * honoured either way.
189
+ *
190
+ * `'touch'` animates only where the primary pointer is coarse — a phone or a
191
+ * tablet — and navigates instantly on a desktop, which is the usual reason to
192
+ * ask. A function is asked again before every navigation, so it can decide on
193
+ * whatever the app knows: a user setting, the window's width, a route.
194
+ *
195
+ * ```ts
196
+ * provideStackNav({ animated: 'touch' });
197
+ * provideStackNav({ animated: () => settings.pageTransitions() });
198
+ * ```
199
+ */
200
+ animated?: boolean | 'touch' | (() => boolean);
183
201
  }
184
202
  interface ResolvedStackNavConfig {
185
203
  resolve: DirectionResolver;
186
204
  levelOf: (snapshot: ActivatedRouteSnapshot) => number | null | undefined;
187
205
  keyOf: (snapshot: ActivatedRouteSnapshot) => string;
188
206
  infoKey: string;
189
- transition: Partial<IOSTransitionOptions>;
190
- gesture: Partial<EdgePanGestureOptions> | false;
207
+ transition: Partial<NativeTransitionOptions>;
208
+ swipeBack: SwipeBackMode;
191
209
  detachInactiveViews: boolean;
192
210
  injectStyles: boolean;
193
- animated: boolean;
211
+ /** Asked before every navigation. */
212
+ animated: () => boolean;
194
213
  }
195
214
  declare const STACKNAV_CONFIG: InjectionToken<ResolvedStackNavConfig>;
196
215
  declare function defaultLevelOf(snapshot: ActivatedRouteSnapshot): number | null | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"stacknav-angular.d.ts","sources":["../../src/lib/outlet.ts","../../src/lib/history.ts","../../src/lib/config.ts","../../src/lib/route-reuse-strategy.ts","../../src/lib/activated-route-proxy.ts"],"mappings":";;;;;;AAkDA;AACM,UAAW,gBAAiB,SAAQ,QAAQ;cACtC,sBAAsB;AACjC;AAED;UACiB,YAAY;AAC3B,kBAAc,YAAY;AAC1B,iBAAa,WAAW;AACxB;AACA,uBAAmB,gBAAgB;;;WAG5B,cAAc;AACtB;UAWgB,kBAAkB;UAC3B,YAAY;eACP,SAAS;;;AAGrB;AAED;;;;;;;;;;;;;;AAcG;AACH,cAKa,cAAe,YAAW,oBAAoB,EAAE,MAAM,EAAE,SAAS;;;;AAInE,gBAAY,OAAO,CAAC,oBAAoB;;aAE/B,OAAO,CAAC,qBAAqB;;+BAEtBA,EAAA,CAAA,WAAA;;AAGL,oBAAc,YAAA;;AAEZ,sBAAgB,YAAA;;AAEpB,kBAAY,YAAA;AACZ,kBAAY,YAAA;;AAET,qBAAe,YAAA,CAAA,kBAAA;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;AAKG;WACK,QAAQ;;AAEhB,mBAAe,SAAS;;AAGxB;;AAGA;AACA;;;;;;;AAYA;AAqCA;;;iCAe6B,YAAY;0BAGnB,cAAc;8BAIV,MAAM;;AAKhC,0BAAsB,YAAY;;;iCAQL,cAAc,uBAAuB,mBAAmB;AAWrF;AAwBA,cAAU,YAAY;AAkBtB,gBAAY,YAAY,2BAA2B,cAAc;AAajE;;AAOA;;AA+CA;AAeA;AAkBA;;AAMA;AAKA;AAIA;;AAeA;AAWA;;AAMA;AASA;AAcA;AAY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AAiB,cAAc;AAG/B,uBAAmB,KAAK;gBAGZ,cAAc;AAG1B,kBAAc,cAAc;AAG5B,sBAAkB,cAAc;AAGhC,oBAAgB,cAAc;AAG9B,wBAAoB,cAAc;AAGlC;AAGD;;","names":["_angular_core"]}
1
+ {"version":3,"file":"stacknav-angular.d.ts","sources":["../../src/lib/outlet.ts","../../src/lib/history.ts","../../src/lib/config.ts","../../src/lib/route-reuse-strategy.ts","../../src/lib/activated-route-proxy.ts"],"mappings":";;;;;;;AAoDA;AACM,UAAW,gBAAiB,SAAQ,QAAQ;cACtC,sBAAsB;AACjC;AAED;UACiB,YAAY;AAC3B,kBAAc,YAAY;AAC1B,iBAAa,WAAW;AACxB;AACA,uBAAmB,gBAAgB;;;WAG5B,cAAc;AACtB;UAWgB,kBAAkB;UAC3B,YAAY;eACP,SAAS;;;AAGrB;AAED;;;;;;;;;;;;;;AAcG;AACH,cAKa,cAAe,YAAW,oBAAoB,EAAE,MAAM,EAAE,SAAS;;;;AAInE,gBAAY,OAAO,CAAC,uBAAuB;;wBAElCA,EAAA,CAAA,WAAA,CAAA,aAAA;;+BAEOA,EAAA,CAAA,WAAA;;AAGL,oBAAc,YAAA;;AAEZ,sBAAgB,YAAA;;AAEpB,kBAAY,YAAA;AACZ,kBAAY,YAAA;;AAET,qBAAe,YAAA,CAAA,kBAAA;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;;;;;AAKG;WACK,WAAW;;AAEnB,mBAAe,SAAS;;AAGxB;;AAGA;AACA;;;;;;;AAgBA;AAmCA;;;iCAiB6B,YAAY;0BAGnB,cAAc;8BAIV,MAAM;;AAKhC,0BAAsB,YAAY;;;iCAQL,cAAc,uBAAuB,mBAAmB;AAWrF;AAwBA,cAAU,YAAY;AAkBtB,gBAAY,YAAY,2BAA2B,cAAc;;AAcjE;AAOA;;AAOA;;AA+CA;AAeA;AAkBA;;AAMA;AAKA;AAIA;;AAeA;AAWA;;AAMA;AASA;AAcA;A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