@real-router/angular 0.24.0 → 0.24.2

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/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@real-router/angular",
3
- "version": "0.24.0",
3
+ "version": "0.24.2",
4
4
  "type": "module",
5
5
  "description": "Angular 22 integration for Real-Router",
6
6
  "exports": {
@@ -17,8 +17,7 @@
17
17
  }
18
18
  },
19
19
  "files": [
20
- "dist",
21
- "ssr"
20
+ "dist"
22
21
  ],
23
22
  "homepage": "https://github.com/greydragon888/real-router",
24
23
  "repository": {
@@ -1,22 +1,31 @@
1
- import * as i0 from '@angular/core';
2
- import { TemplateRef, OnInit, Signal, InjectionToken, EnvironmentProviders } from '@angular/core';
3
-
4
- declare class ClientOnly {
5
- readonly fallback: i0.InputSignal<TemplateRef<unknown> | undefined>;
6
- readonly mounted: i0.WritableSignal<boolean>;
7
- constructor();
8
- static ɵfac: i0.ɵɵFactoryDeclaration<ClientOnly, never>;
9
- static ɵcmp: i0.ɵɵComponentDeclaration<ClientOnly, "client-only", never, { "fallback": { "alias": "fallback"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
1
+ import * as i0 from "@angular/core";
2
+ import { EnvironmentProviders, InjectionToken, OnInit, Signal, TemplateRef } from "@angular/core";
3
+ export declare class ClientOnly {
4
+ readonly fallback: import("@angular/core").InputSignal<TemplateRef<unknown> | undefined>;
5
+ readonly mounted: import("@angular/core").WritableSignal<boolean>;
6
+ constructor();
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClientOnly, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<ClientOnly, "client-only", never, {
9
+ "fallback": {
10
+ "alias": "fallback";
11
+ "required": false;
12
+ "isSignal": true;
13
+ };
14
+ }, {}, never, ["*"], true, never>;
10
15
  }
11
-
12
- declare class ServerOnly {
13
- readonly fallback: i0.InputSignal<TemplateRef<unknown> | undefined>;
14
- readonly mounted: i0.WritableSignal<boolean>;
15
- constructor();
16
- static ɵfac: i0.ɵɵFactoryDeclaration<ServerOnly, never>;
17
- static ɵcmp: i0.ɵɵComponentDeclaration<ServerOnly, "server-only", never, { "fallback": { "alias": "fallback"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
16
+ export declare class ServerOnly {
17
+ readonly fallback: import("@angular/core").InputSignal<TemplateRef<unknown> | undefined>;
18
+ readonly mounted: import("@angular/core").WritableSignal<boolean>;
19
+ constructor();
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<ServerOnly, never>;
21
+ static ɵcmp: i0.ɵɵComponentDeclaration<ServerOnly, "server-only", never, {
22
+ "fallback": {
23
+ "alias": "fallback";
24
+ "required": false;
25
+ "isSignal": true;
26
+ };
27
+ }, {}, never, ["*"], true, never>;
18
28
  }
19
-
20
29
  /**
21
30
  * Render-time HTTP status declaration. Mount inside a route component
22
31
  * (typical use case: a glob `*` route's NotFound page) when the status is
@@ -83,25 +92,30 @@ declare class ServerOnly {
83
92
  * 5xx / dropped connection, not silent corruption. Pass a real HTTP status
84
93
  * integer (commonly 4xx/5xx; 100-999 is what Node accepts).
85
94
  */
86
- declare class HttpStatusCode implements OnInit {
87
- /**
88
- * HTTP status to apply to the response. Common values: 404, 410, 451, 503.
89
- *
90
- * Declared as optional so the signal is safe to read in `ngOnInit` under
91
- * both AOT (template binding fires before init hooks) and JIT/TestBed
92
- * (`componentRef.setInput("code", N)` writes the value before the first
93
- * change detection). `input.required` would trip `NG0950` in the JIT path
94
- * because the required-flag is asserted independently of the runtime
95
- * value. Consumers should always pass a value — `undefined` makes
96
- * `ngOnInit` skip the sink write rather than throw.
97
- */
98
- readonly code: i0.InputSignal<number | undefined>;
99
- private readonly sink;
100
- ngOnInit(): void;
101
- static ɵfac: i0.ɵɵFactoryDeclaration<HttpStatusCode, never>;
102
- static ɵcmp: i0.ɵɵComponentDeclaration<HttpStatusCode, "http-status-code", never, { "code": { "alias": "code"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
95
+ export declare class HttpStatusCode implements OnInit {
96
+ /**
97
+ * HTTP status to apply to the response. Common values: 404, 410, 451, 503.
98
+ *
99
+ * Declared as optional so the signal is safe to read in `ngOnInit` under
100
+ * both AOT (template binding fires before init hooks) and JIT/TestBed
101
+ * (`componentRef.setInput("code", N)` writes the value before the first
102
+ * change detection). `input.required` would trip `NG0950` in the JIT path
103
+ * because the required-flag is asserted independently of the runtime
104
+ * value. Consumers should always pass a value — `undefined` makes
105
+ * `ngOnInit` skip the sink write rather than throw.
106
+ */
107
+ readonly code: import("@angular/core").InputSignal<number | undefined>;
108
+ private readonly sink;
109
+ ngOnInit(): void;
110
+ static ɵfac: i0.ɵɵFactoryDeclaration<HttpStatusCode, never>;
111
+ static ɵcmp: i0.ɵɵComponentDeclaration<HttpStatusCode, "http-status-code", never, {
112
+ "code": {
113
+ "alias": "code";
114
+ "required": false;
115
+ "isSignal": true;
116
+ };
117
+ }, {}, never, never, true, never>;
103
118
  }
104
-
105
119
  /**
106
120
  * Read a deferred promise published by `defer({ deferred: { <key>: Promise } })`
107
121
  * inside an SSR data loader. Returns an Angular `Signal<T | undefined>` that
@@ -135,8 +149,7 @@ declare class HttpStatusCode implements OnInit {
135
149
  * `@if (signal()) { … } @else { … }` or the `async` pipe with
136
150
  * `from(deferredPromise)` instead.
137
151
  */
138
- declare function injectDeferred<T = unknown>(key: string): Signal<T | undefined>;
139
-
152
+ export declare function injectDeferred<T = unknown>(key: string): Signal<T | undefined>;
140
153
  /**
141
154
  * Render-scoped HTTP status sink. Created per request on the server and
142
155
  * provided via `provideHttpStatusSink(sink)` (or directly through
@@ -167,9 +180,9 @@ declare function injectDeferred<T = unknown>(key: string): Signal<T | undefined>
167
180
  * `req` directly silently no-ops.
168
181
  */
169
182
  interface HttpStatusSink {
170
- code: number | undefined;
183
+ code: number | undefined;
171
184
  }
172
- declare function createHttpStatusSink(): HttpStatusSink;
185
+ export declare function createHttpStatusSink(): HttpStatusSink;
173
186
  /**
174
187
  * DI token for the request-scoped HTTP status sink. Application-side wiring:
175
188
  *
@@ -189,8 +202,7 @@ declare function createHttpStatusSink(): HttpStatusSink;
189
202
  * response.status(sink.code ?? 200).send(html);
190
203
  * ```
191
204
  */
192
- declare const HTTP_STATUS_SINK: InjectionToken<HttpStatusSink>;
193
-
205
+ export declare const HTTP_STATUS_SINK: InjectionToken<HttpStatusSink>;
194
206
  /**
195
207
  * Environment providers for a request-scoped `HttpStatusSink`. Pair with
196
208
  * `createHttpStatusSink()` and read `sink.code` after the SSR render pass
@@ -220,8 +232,6 @@ declare const HTTP_STATUS_SINK: InjectionToken<HttpStatusSink>;
220
232
  * Use the explicit `useValue` form when you need to compose with other
221
233
  * application providers in a single `providers: [...]` block.
222
234
  */
223
- declare function provideHttpStatusSink(sink: HttpStatusSink): EnvironmentProviders;
224
-
225
- export { ClientOnly, HTTP_STATUS_SINK, HttpStatusCode, ServerOnly, createHttpStatusSink, injectDeferred, provideHttpStatusSink };
235
+ export declare function provideHttpStatusSink(sink: HttpStatusSink): EnvironmentProviders;
226
236
  export type { HttpStatusSink };
227
- //# sourceMappingURL=real-router-angular-ssr.d.ts.map
237
+ //# sourceMappingURL=real-router-angular-ssr.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"real-router-angular-ssr.d.ts","sources":["../../ssr/components/ClientOnly.ts","../../ssr/components/ServerOnly.ts","../../ssr/components/HttpStatusCode.ts","../../ssr/functions/injectDeferred.ts","../../ssr/utils/createHttpStatusSink.ts","../../ssr/functions/provideHttpStatusSink.ts"],"mappings":";;;AAKA,cAWa,UAAU;uBACJA,EAAA,CAAA,WAAA,CAAA,WAAA;sBAEDA,EAAA,CAAA,cAAA;;yCAHL,UAAU;2CAAV,UAAU;AAUtB;;ACrBD,cAWa,UAAU;uBACJA,EAAA,CAAA,WAAA,CAAA,WAAA;sBAEDA,EAAA,CAAA,cAAA;;yCAHL,UAAU;2CAAV,UAAU;AAUtB;;ACpBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiEG;AACH,cAIa,cAAe,YAAW,MAAM;AAC3C;;;;;;;;;;AAUG;mBACUA,EAAA,CAAA,WAAA;AAIb;AAEA;yCAlBW,cAAc;2CAAd,cAAc;AA8C1B;;AC1GD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCG;AACH,iBAAgB,cAAc,4BAE3B,MAAM;;ACjDT;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;UACc,cAAc;AAC7B;AACD;AAED,iBAAgB,oBAAoB,IAAI,cAAc;AAItD;;;;;;;;;;;;;;;;;;AAkBG;AACH,cAAa,gBAAgB,EAAA,cAAA,CAAA,cAAA;;ACnD7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;AACH,iBAAgB,qBAAqB,OAC7B,cAAc,GACnB,oBAAoB;;","names":["_angular_core"]}
1
+ {"version":3,"file":"real-router-angular-ssr.d.ts","names":[],"sources":["../../src/ssr/components/ClientOnly.ts","../../src/ssr/components/ServerOnly.ts","../../src/ssr/components/HttpStatusCode.ts","../../src/ssr/functions/injectDeferred.ts","../../src/ssr/utils/createHttpStatusSink.ts","../../src/ssr/functions/provideHttpStatusSink.ts"],"mappings":";;qBAgBa;WACF,kCAAQ,YAAA;WAER,iCAAO;;SAHL,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAU;MAAA;MAAA;MAAA;;;;qBCAV;WACF,kCAAQ,YAAA;WAER,iCAAO;;SAHL,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAU;MAAA;MAAA;MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBC4DV,0BAA0B;;;;;;;;;;;;WAY5B,8BAAI;mBAII;EAEjB;SAlBW,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAc;MAAA;MAAA;MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBC3BX,eAAe,aAC7B,cACC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UCpBO;EACf;;wBAGc,wBAAwB;;;;;;;;;;;;;;;;;;;;qBAuB3B,kBAAgB,eAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBCtBb,sBACd,MAAM,iBACL"}