@real-router/angular 0.23.0 → 0.24.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
|
@@ -760,11 +760,9 @@ export class MyComponent {
|
|
|
760
760
|
}
|
|
761
761
|
```
|
|
762
762
|
|
|
763
|
-
`sourceToSignal` follows the same rule — it calls `inject(DestroyRef)` internally.
|
|
764
|
-
|
|
765
763
|
### DestroyRef for Cleanup
|
|
766
764
|
|
|
767
|
-
|
|
765
|
+
Router subscriptions the adapter creates — in its `inject*` functions, providers and directives — clean up automatically via `DestroyRef.onDestroy`. No manual unsubscribe needed.
|
|
768
766
|
|
|
769
767
|
### Zoneless Compatibility
|
|
770
768
|
|
|
@@ -776,19 +774,6 @@ The adapter is signal-first and does not depend on Zone.js. It works with `provi
|
|
|
776
774
|
|
|
777
775
|
In `RealLink` / `RealLinkActive`, `[routeParams]` is routed through `shallowEqual` content-stabilization before the effect reads it, so an inline-literal binding re-allocated on every change detection only re-creates the source on real content change (see [Object `routeParams`](#object-routeparams--content-stabilized), #988).
|
|
778
776
|
|
|
779
|
-
## Signal Bridge
|
|
780
|
-
|
|
781
|
-
### `sourceToSignal(source)`
|
|
782
|
-
|
|
783
|
-
Bridges any `RouterSource<T>` (from `@real-router/sources`) into an Angular `Signal<T>`. Cleanup wires through `inject(DestroyRef)` — must be called in an injection context. Used internally by `RouterErrorBoundary`; exposed for custom composables that need to bridge router sources into reactive signals.
|
|
784
|
-
|
|
785
|
-
```typescript
|
|
786
|
-
import { sourceToSignal } from "@real-router/angular";
|
|
787
|
-
import { createTransitionSource } from "@real-router/sources";
|
|
788
|
-
|
|
789
|
-
const transitionSignal = sourceToSignal(createTransitionSource(router));
|
|
790
|
-
```
|
|
791
|
-
|
|
792
777
|
## Documentation
|
|
793
778
|
|
|
794
779
|
Full documentation: [Wiki](https://github.com/greydragon888/real-router/wiki) — start with the [Angular Integration guide](https://github.com/greydragon888/real-router/wiki/Angular-Integration) for Angular-specific examples and gotchas.
|
package/dist/README.md
CHANGED
|
@@ -760,11 +760,9 @@ export class MyComponent {
|
|
|
760
760
|
}
|
|
761
761
|
```
|
|
762
762
|
|
|
763
|
-
`sourceToSignal` follows the same rule — it calls `inject(DestroyRef)` internally.
|
|
764
|
-
|
|
765
763
|
### DestroyRef for Cleanup
|
|
766
764
|
|
|
767
|
-
|
|
765
|
+
Router subscriptions the adapter creates — in its `inject*` functions, providers and directives — clean up automatically via `DestroyRef.onDestroy`. No manual unsubscribe needed.
|
|
768
766
|
|
|
769
767
|
### Zoneless Compatibility
|
|
770
768
|
|
|
@@ -776,19 +774,6 @@ The adapter is signal-first and does not depend on Zone.js. It works with `provi
|
|
|
776
774
|
|
|
777
775
|
In `RealLink` / `RealLinkActive`, `[routeParams]` is routed through `shallowEqual` content-stabilization before the effect reads it, so an inline-literal binding re-allocated on every change detection only re-creates the source on real content change (see [Object `routeParams`](#object-routeparams--content-stabilized), #988).
|
|
778
776
|
|
|
779
|
-
## Signal Bridge
|
|
780
|
-
|
|
781
|
-
### `sourceToSignal(source)`
|
|
782
|
-
|
|
783
|
-
Bridges any `RouterSource<T>` (from `@real-router/sources`) into an Angular `Signal<T>`. Cleanup wires through `inject(DestroyRef)` — must be called in an injection context. Used internally by `RouterErrorBoundary`; exposed for custom composables that need to bridge router sources into reactive signals.
|
|
784
|
-
|
|
785
|
-
```typescript
|
|
786
|
-
import { sourceToSignal } from "@real-router/angular";
|
|
787
|
-
import { createTransitionSource } from "@real-router/sources";
|
|
788
|
-
|
|
789
|
-
const transitionSignal = sourceToSignal(createTransitionSource(router));
|
|
790
|
-
```
|
|
791
|
-
|
|
792
777
|
## Documentation
|
|
793
778
|
|
|
794
779
|
Full documentation: [Wiki](https://github.com/greydragon888/real-router/wiki) — start with the [Angular Integration guide](https://github.com/greydragon888/real-router/wiki/Angular-Integration) for Angular-specific examples and gotchas.
|
|
@@ -3003,5 +3003,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
3003
3003
|
* Generated bundle index. Do not edit.
|
|
3004
3004
|
*/
|
|
3005
3005
|
|
|
3006
|
-
export { NAVIGATOR, NavigationAnnouncer, ROUTE, ROUTER, RealLink, RealLinkActive, RouteMatch, RouteNotFound, RouteSelf, RouteView, RouterErrorBoundary, createDirectionTracker, injectIsActiveRoute, injectNavigator, injectRoute, injectRouteEnter, injectRouteExit, injectRouteNode, injectRouteUtils, injectRouter, injectRouterTransition, provideRealRouter, provideRealRouterFactory
|
|
3006
|
+
export { NAVIGATOR, NavigationAnnouncer, ROUTE, ROUTER, RealLink, RealLinkActive, RouteMatch, RouteNotFound, RouteSelf, RouteView, RouterErrorBoundary, createDirectionTracker, injectIsActiveRoute, injectNavigator, injectRoute, injectRouteEnter, injectRouteExit, injectRouteNode, injectRouteUtils, injectRouter, injectRouterTransition, provideRealRouter, provideRealRouterFactory };
|
|
3007
3007
|
//# sourceMappingURL=real-router-angular.mjs.map
|
package/dist/package.json
CHANGED
|
@@ -3,7 +3,7 @@ import { Signal, InjectionToken, EnvironmentProviders, TemplateRef, OnInit } fro
|
|
|
3
3
|
import * as _real_router_core from '@real-router/core';
|
|
4
4
|
import { Router, RouterError, Params, Navigator, DefaultDependencies, PluginFactory, State, SearchParams, NavigationTarget, NavigationOptions } from '@real-router/core';
|
|
5
5
|
export { Navigator } from '@real-router/core';
|
|
6
|
-
import { RouteSnapshot,
|
|
6
|
+
import { RouteSnapshot, RouterTransitionSnapshot } from '@real-router/sources';
|
|
7
7
|
export { RouteSnapshot, RouterErrorSnapshot, RouterTransitionSnapshot } from '@real-router/sources';
|
|
8
8
|
import { RouteUtils } from '@real-router/route-utils';
|
|
9
9
|
|
|
@@ -252,9 +252,6 @@ interface RealRouterFactoryOptions<TDeps extends DefaultDependencies = DefaultDe
|
|
|
252
252
|
*/
|
|
253
253
|
declare function provideRealRouterFactory<TDeps extends DefaultDependencies = DefaultDependencies>(options: RealRouterFactoryOptions<TDeps>): EnvironmentProviders;
|
|
254
254
|
|
|
255
|
-
/** Must be called within an injection context (constructor, field initializer, runInInjectionContext). */
|
|
256
|
-
declare function sourceToSignal<T>(source: RouterSource<T>): Signal<T>;
|
|
257
|
-
|
|
258
255
|
declare function injectRouter(): Router;
|
|
259
256
|
|
|
260
257
|
declare function injectNavigator(): Navigator;
|
|
@@ -569,6 +566,6 @@ declare class RealLinkActive {
|
|
|
569
566
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RealLinkActive, "[realLinkActive]", never, { "realLinkActive": { "alias": "realLinkActive"; "required": false; "isSignal": true; }; "routeName": { "alias": "routeName"; "required": false; "isSignal": true; }; "routeParams": { "alias": "routeParams"; "required": false; "isSignal": true; }; "activeStrict": { "alias": "activeStrict"; "required": false; "isSignal": true; }; "ignoreQueryParams": { "alias": "ignoreQueryParams"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
570
567
|
}
|
|
571
568
|
|
|
572
|
-
export { NAVIGATOR, NavigationAnnouncer, ROUTE, ROUTER, RealLink, RealLinkActive, RouteMatch, RouteNotFound, RouteSelf, RouteView, RouterErrorBoundary, createDirectionTracker, injectIsActiveRoute, injectNavigator, injectRoute, injectRouteEnter, injectRouteExit, injectRouteNode, injectRouteUtils, injectRouter, injectRouterTransition, provideRealRouter, provideRealRouterFactory
|
|
569
|
+
export { NAVIGATOR, NavigationAnnouncer, ROUTE, ROUTER, RealLink, RealLinkActive, RouteMatch, RouteNotFound, RouteSelf, RouteView, RouterErrorBoundary, createDirectionTracker, injectIsActiveRoute, injectNavigator, injectRoute, injectRouteEnter, injectRouteExit, injectRouteNode, injectRouteUtils, injectRouter, injectRouterTransition, provideRealRouter, provideRealRouterFactory };
|
|
573
570
|
export type { DirectionTracker, ErrorContext, RealRouterFactoryOptions, RealRouterOptions, RequestDepsFactory, RequestPluginsFactory, RouteEnterContext, RouteEnterHandler, RouteExitContext, RouteExitHandler, RouteSignals, UseRouteEnterOptions, UseRouteExitOptions };
|
|
574
571
|
//# sourceMappingURL=real-router-angular.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"real-router-angular.d.ts","sources":["../../src/dom-utils/direction-tracker.ts","../../src/dom-utils/scroll-restore.ts","../../src/dom-utils/scroll-spy.ts","../../src/types.ts","../../src/tokens.ts","../../src/providers.ts","../../src/providersFactory.ts","../../src/
|
|
1
|
+
{"version":3,"file":"real-router-angular.d.ts","sources":["../../src/dom-utils/direction-tracker.ts","../../src/dom-utils/scroll-restore.ts","../../src/dom-utils/scroll-spy.ts","../../src/types.ts","../../src/tokens.ts","../../src/providers.ts","../../src/providersFactory.ts","../../src/functions/injectRouter.ts","../../src/functions/injectNavigator.ts","../../src/functions/injectRoute.ts","../../src/functions/injectRouteNode.ts","../../src/functions/injectRouteUtils.ts","../../src/functions/injectRouterTransition.ts","../../src/functions/injectIsActiveRoute.ts","../../src/functions/injectRouteExit.ts","../../src/functions/injectRouteEnter.ts","../../src/directives/RouteMatch.ts","../../src/directives/RouteNotFound.ts","../../src/directives/RouteSelf.ts","../../src/components/RouteView.ts","../../src/components/RouterErrorBoundary.ts","../../src/components/NavigationAnnouncer.ts","../../src/directives/RealLink.ts","../../src/directives/RealLinkActive.ts"],"mappings":";;;;;;;;;UAKiB,gBAAgB;;AAEhC;AAQD;;;;;;;;;;;;;;;;;;;;AAoBG;AACH,iBAAgB,sBAAsB,SAAS,MAAM,GAAG,gBAAgB;;ACflE,KAAM,qBAAqB;UAEhB,wBAAwB;AACvC,WAAO,qBAAqB;AAC5B;6BACyB,WAAW;AACpC;;;;;;;;;;;AAWG;AACH,eAAW,cAAc;AACzB;;;;;;AAMG;AACH;AACD;;AC5CD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCG;UACc,gBAAgB;AAC/B;;;;AAIG;;AAGH;;;;AAIG;AACH;AAEA;;;;;;;;AAQG;6BACsB,WAAW;AACrC;;UC/DgB,YAAY,WAAW,MAAM,GAAG,MAAM;yB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