@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.
@@ -1,342 +1,259 @@
1
- import { NgTemplateOutlet } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { input, signal, afterNextRender, Component, InjectionToken, inject, isDevMode, computed, effect, makeEnvironmentProviders } from '@angular/core';
4
- import { injectRoute } from '@real-router/angular';
5
-
6
- class ClientOnly {
7
- fallback = input(/* @ts-ignore */
8
- ...(ngDevMode ? [undefined, { debugName: "fallback" }] : /* istanbul ignore next */ []));
9
- mounted = signal(false, /* @ts-ignore */
10
- ...(ngDevMode ? [{ debugName: "mounted" }] : /* istanbul ignore next */ []));
11
- constructor() {
12
- afterNextRender(() => {
13
- this.mounted.set(true);
14
- });
15
- }
16
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ClientOnly, deps: [], target: i0.ɵɵFactoryTarget.Component });
17
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: ClientOnly, isStandalone: true, selector: "client-only", inputs: { fallback: { classPropertyName: "fallback", publicName: "fallback", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
1
+ import { NgTemplateOutlet } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { Component, InjectionToken, afterNextRender, computed, effect, inject, input, isDevMode, makeEnvironmentProviders, signal } from "@angular/core";
4
+ import { injectRoute } from "@real-router/angular";
5
+ var ClientOnly = class ClientOnly {
6
+ fallback = input(...ngDevMode ? [void 0, { debugName: "fallback" }] : /* istanbul ignore next */ []);
7
+ mounted = signal(false, ...ngDevMode ? [{ debugName: "mounted" }] : /* istanbul ignore next */ []);
8
+ constructor() {
9
+ afterNextRender(() => {
10
+ this.mounted.set(true);
11
+ });
12
+ }
13
+ static ɵfac = i0.ɵɵngDeclareFactory({
14
+ minVersion: "12.0.0",
15
+ version: "22.2.0",
16
+ ngImport: i0,
17
+ type: ClientOnly,
18
+ deps: [],
19
+ target: i0.ɵɵFactoryTarget.Component
20
+ });
21
+ static ɵcmp = i0.ɵɵngDeclareComponent({
22
+ minVersion: "17.0.0",
23
+ version: "22.2.0",
24
+ type: ClientOnly,
25
+ isStandalone: true,
26
+ selector: "client-only",
27
+ inputs: { fallback: {
28
+ classPropertyName: "fallback",
29
+ publicName: "fallback",
30
+ isSignal: true,
31
+ isRequired: false,
32
+ transformFunction: null
33
+ } },
34
+ ngImport: i0,
35
+ template: `
18
36
  @if (mounted()) {
19
37
  <ng-content />
20
38
  } @else if (fallback()) {
21
39
  <ng-container [ngTemplateOutlet]="fallback() ?? null" />
22
40
  }
23
- `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
24
- }
25
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ClientOnly, decorators: [{
26
- type: Component,
27
- args: [{
28
- selector: "client-only",
29
- template: `
41
+ `,
42
+ isInline: true,
43
+ dependencies: [{
44
+ kind: "directive",
45
+ type: NgTemplateOutlet,
46
+ selector: "[ngTemplateOutlet]",
47
+ inputs: [
48
+ "ngTemplateOutletContext",
49
+ "ngTemplateOutlet",
50
+ "ngTemplateOutletInjector"
51
+ ]
52
+ }]
53
+ });
54
+ };
55
+ i0.ɵɵngDeclareClassMetadata({
56
+ minVersion: "12.0.0",
57
+ version: "22.2.0",
58
+ ngImport: i0,
59
+ type: ClientOnly,
60
+ decorators: [{
61
+ type: Component,
62
+ args: [{
63
+ selector: "client-only",
64
+ template: `
30
65
  @if (mounted()) {
31
66
  <ng-content />
32
67
  } @else if (fallback()) {
33
68
  <ng-container [ngTemplateOutlet]="fallback() ?? null" />
34
69
  }
35
70
  `,
36
- imports: [NgTemplateOutlet],
37
- }]
38
- }], ctorParameters: () => [], propDecorators: { fallback: [{ type: i0.Input, args: [{ isSignal: true, alias: "fallback", required: false }] }] } });
39
-
40
- class ServerOnly {
41
- fallback = input(/* @ts-ignore */
42
- ...(ngDevMode ? [undefined, { debugName: "fallback" }] : /* istanbul ignore next */ []));
43
- mounted = signal(false, /* @ts-ignore */
44
- ...(ngDevMode ? [{ debugName: "mounted" }] : /* istanbul ignore next */ []));
45
- constructor() {
46
- afterNextRender(() => {
47
- this.mounted.set(true);
48
- });
49
- }
50
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ServerOnly, deps: [], target: i0.ɵɵFactoryTarget.Component });
51
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: ServerOnly, isStandalone: true, selector: "server-only", inputs: { fallback: { classPropertyName: "fallback", publicName: "fallback", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
71
+ imports: [NgTemplateOutlet]
72
+ }]
73
+ }],
74
+ ctorParameters: () => [],
75
+ propDecorators: { fallback: [{
76
+ type: i0.Input,
77
+ args: [{
78
+ isSignal: true,
79
+ alias: "fallback",
80
+ required: false
81
+ }]
82
+ }] }
83
+ });
84
+ var ServerOnly = class ServerOnly {
85
+ fallback = input(...ngDevMode ? [void 0, { debugName: "fallback" }] : /* istanbul ignore next */ []);
86
+ mounted = signal(false, ...ngDevMode ? [{ debugName: "mounted" }] : /* istanbul ignore next */ []);
87
+ constructor() {
88
+ afterNextRender(() => {
89
+ this.mounted.set(true);
90
+ });
91
+ }
92
+ static ɵfac = i0.ɵɵngDeclareFactory({
93
+ minVersion: "12.0.0",
94
+ version: "22.2.0",
95
+ ngImport: i0,
96
+ type: ServerOnly,
97
+ deps: [],
98
+ target: i0.ɵɵFactoryTarget.Component
99
+ });
100
+ static ɵcmp = i0.ɵɵngDeclareComponent({
101
+ minVersion: "17.0.0",
102
+ version: "22.2.0",
103
+ type: ServerOnly,
104
+ isStandalone: true,
105
+ selector: "server-only",
106
+ inputs: { fallback: {
107
+ classPropertyName: "fallback",
108
+ publicName: "fallback",
109
+ isSignal: true,
110
+ isRequired: false,
111
+ transformFunction: null
112
+ } },
113
+ ngImport: i0,
114
+ template: `
52
115
  @if (!mounted()) {
53
116
  <ng-content />
54
117
  } @else if (fallback()) {
55
118
  <ng-container [ngTemplateOutlet]="fallback() ?? null" />
56
119
  }
57
- `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
58
- }
59
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ServerOnly, decorators: [{
60
- type: Component,
61
- args: [{
62
- selector: "server-only",
63
- template: `
120
+ `,
121
+ isInline: true,
122
+ dependencies: [{
123
+ kind: "directive",
124
+ type: NgTemplateOutlet,
125
+ selector: "[ngTemplateOutlet]",
126
+ inputs: [
127
+ "ngTemplateOutletContext",
128
+ "ngTemplateOutlet",
129
+ "ngTemplateOutletInjector"
130
+ ]
131
+ }]
132
+ });
133
+ };
134
+ i0.ɵɵngDeclareClassMetadata({
135
+ minVersion: "12.0.0",
136
+ version: "22.2.0",
137
+ ngImport: i0,
138
+ type: ServerOnly,
139
+ decorators: [{
140
+ type: Component,
141
+ args: [{
142
+ selector: "server-only",
143
+ template: `
64
144
  @if (!mounted()) {
65
145
  <ng-content />
66
146
  } @else if (fallback()) {
67
147
  <ng-container [ngTemplateOutlet]="fallback() ?? null" />
68
148
  }
69
149
  `,
70
- imports: [NgTemplateOutlet],
71
- }]
72
- }], ctorParameters: () => [], propDecorators: { fallback: [{ type: i0.Input, args: [{ isSignal: true, alias: "fallback", required: false }] }] } });
73
-
150
+ imports: [NgTemplateOutlet]
151
+ }]
152
+ }],
153
+ ctorParameters: () => [],
154
+ propDecorators: { fallback: [{
155
+ type: i0.Input,
156
+ args: [{
157
+ isSignal: true,
158
+ alias: "fallback",
159
+ required: false
160
+ }]
161
+ }] }
162
+ });
74
163
  function createHttpStatusSink() {
75
- return { code: undefined };
164
+ return { code: void 0 };
76
165
  }
77
- /**
78
- * DI token for the request-scoped HTTP status sink. Application-side wiring:
79
- *
80
- * ```ts
81
- * import { bootstrapApplication } from "@angular/platform-browser";
82
- * import { provideHttpStatusSink, createHttpStatusSink } from "@real-router/angular/ssr";
83
- *
84
- * const sink = createHttpStatusSink();
85
- *
86
- * await bootstrapApplication(AppRoot, {
87
- * providers: [
88
- * provideRealRouterFactory({ ... }),
89
- * provideHttpStatusSink(sink),
90
- * ],
91
- * });
92
- *
93
- * response.status(sink.code ?? 200).send(html);
94
- * ```
95
- */
96
166
  const HTTP_STATUS_SINK = new InjectionToken("HTTP_STATUS_SINK");
97
-
98
- /**
99
- * Render-time HTTP status declaration. Mount inside a route component
100
- * (typical use case: a glob `*` route's NotFound page) when the status is
101
- * decided by the rendered tree rather than a loader.
102
- *
103
- * Writes `code` to the optionally injected `HTTP_STATUS_SINK` in `ngOnInit`
104
- * (after the input binding has fired) and renders nothing. Without a provider
105
- * registered (the standard client-side case) the component is a silent no-op
106
- * — same component tree hydrates without touching the DOM or warning about
107
- * mismatches.
108
- *
109
- * Loader-driven errors (`LoaderNotFound` → 404, `LoaderRedirect` → 30x) keep
110
- * working as before; this component covers render-time decisions only.
111
- *
112
- * Last write wins when several `<http-status-code />` instances mount in the
113
- * same render pass — sink reflects the last component whose `ngOnInit` ran.
114
- *
115
- * ```ts
116
- * // entry-server.ts
117
- * import { bootstrapApplication } from "@angular/platform-browser";
118
- * import {
119
- * createHttpStatusSink,
120
- * provideHttpStatusSink,
121
- * } from "@real-router/angular/ssr";
122
- *
123
- * const sink = createHttpStatusSink();
124
- * await bootstrapApplication(AppRoot, {
125
- * providers: [
126
- * provideRealRouterFactory({ ... }),
127
- * provideHttpStatusSink(sink),
128
- * ],
129
- * });
130
- * response.status(sink.code ?? 200).send(html);
131
- * ```
132
- *
133
- * ```html
134
- * <!-- inside not-found.component.ts template -->
135
- * <http-status-code [code]="404" />
136
- * ```
137
- *
138
- * **Per-request wiring with `AngularNodeAppEngine`:** the sink must be
139
- * passed via the second arg of `handle(req, requestContext)` — Angular
140
- * surfaces it through the `REQUEST_CONTEXT` token. Attaching to `req`
141
- * directly does NOT work: `AngularNodeAppEngine.handle` constructs a fresh
142
- * Web `Request` from the Express `IncomingMessage` and discards every
143
- * custom property. See the `ssr/` example's `app.config.ts` factory for
144
- * the canonical pattern (`inject(REQUEST_CONTEXT, { optional: true })`
145
- * → `(ctx as { httpStatusSink? } | null)?.httpStatusSink`).
146
- *
147
- * **`@angular/ssr` streaming + `@defer` blocks:** `@defer` blocks hydrate
148
- * lazily on the client; their server-side rendering is fully synchronous,
149
- * so `<http-status-code />` inside or outside a `@defer` writes to the
150
- * sink before `AngularNodeAppEngine.handle` resolves. No streaming
151
- * ordering concern in Angular's current SSR model.
152
- *
153
- * **JIT vs AOT:** the `code` input is declared as `input<number>()` (not
154
- * `input.required<number>()`) because `input.required` trips `NG0950` in
155
- * JIT/TestBed even after `componentRef.setInput(...)`. `ngOnInit` skips
156
- * the write when `code()` is `undefined`. AOT (production build) binds
157
- * the value normally and the skip never fires.
158
- *
159
- * **Valid `code` range:** Node's `res.end()` throws `Invalid status code`
160
- * on `NaN`, `0`, negative values, or values `> 999` — this surfaces as a
161
- * 5xx / dropped connection, not silent corruption. Pass a real HTTP status
162
- * integer (commonly 4xx/5xx; 100-999 is what Node accepts).
163
- */
164
- class HttpStatusCode {
165
- /**
166
- * HTTP status to apply to the response. Common values: 404, 410, 451, 503.
167
- *
168
- * Declared as optional so the signal is safe to read in `ngOnInit` under
169
- * both AOT (template binding fires before init hooks) and JIT/TestBed
170
- * (`componentRef.setInput("code", N)` writes the value before the first
171
- * change detection). `input.required` would trip `NG0950` in the JIT path
172
- * because the required-flag is asserted independently of the runtime
173
- * value. Consumers should always pass a value — `undefined` makes
174
- * `ngOnInit` skip the sink write rather than throw.
175
- */
176
- code = input(/* @ts-ignore */
177
- ...(ngDevMode ? [undefined, { debugName: "code" }] : /* istanbul ignore next */ []));
178
- // Optional injection — when no `provideHttpStatusSink(...)` is registered
179
- // (client side) the field is null and `ngOnInit` skips the write.
180
- sink = inject(HTTP_STATUS_SINK, { optional: true });
181
- ngOnInit() {
182
- if (!this.sink) {
183
- return;
184
- }
185
- const value = this.code();
186
- if (value !== undefined) {
187
- // Dev-only validation (parity with the other adapters, #1441): Node's
188
- // res.end() throws `Invalid status code` on NaN / 0 / non-integer / >999.
189
- // Surface the bad value at the source instead of at the response boundary.
190
- // Angular uses `isDevMode()` rather than `process.env.NODE_ENV` — ng-packagr
191
- // does not replace the latter and `process` is undefined in the browser.
192
- // JIT/TestBed reads `code()` as undefined, so this branch (and the sink
193
- // write below) is reachable only under AOT — covered by the AOT
194
- // ssr-examples once an `<http-status-code>` consumer lands there.
195
- if (isDevMode() &&
196
- (!Number.isInteger(value) || value < 100 || value > 999)) {
197
- console.error(`[real-router] <http-status-code [code]="${String(value)}" /> received an invalid HTTP status code. Node's res.end() rejects values that are not an integer in [100, 999] — pass a real HTTP status (commonly 4xx/5xx).`);
198
- }
199
- this.sink.code = value;
200
- }
201
- }
202
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: HttpStatusCode, deps: [], target: i0.ɵɵFactoryTarget.Component });
203
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: HttpStatusCode, isStandalone: true, selector: "http-status-code", inputs: { code: { classPropertyName: "code", publicName: "code", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "", isInline: true });
204
- }
205
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: HttpStatusCode, decorators: [{
206
- type: Component,
207
- args: [{
208
- selector: "http-status-code",
209
- template: "",
210
- }]
211
- }], propDecorators: { code: [{ type: i0.Input, args: [{ isSignal: true, alias: "code", required: false }] }] } });
212
-
213
- const NEVER_PROMISE = new Promise(() => {
214
- // Intentionally never resolves — settles as `undefined` indefinitely when
215
- // a key is requested that the loader never declared. Surfaces consumer/
216
- // loader key drift as a visible "loading" state in the UI.
167
+ var HttpStatusCode = class HttpStatusCode {
168
+ code = input(...ngDevMode ? [void 0, { debugName: "code" }] : /* istanbul ignore next */ []);
169
+ sink = inject(HTTP_STATUS_SINK, { optional: true });
170
+ ngOnInit() {
171
+ if (!this.sink) return;
172
+ const value = this.code();
173
+ if (value !== void 0) {
174
+ if (isDevMode() && (!Number.isInteger(value) || value < 100 || value > 999)) console.error(`[real-router] <http-status-code [code]="${String(value)}" /> received an invalid HTTP status code. Node's res.end() rejects values that are not an integer in [100, 999] — pass a real HTTP status (commonly 4xx/5xx).`);
175
+ this.sink.code = value;
176
+ }
177
+ }
178
+ static ɵfac = i0.ɵɵngDeclareFactory({
179
+ minVersion: "12.0.0",
180
+ version: "22.2.0",
181
+ ngImport: i0,
182
+ type: HttpStatusCode,
183
+ deps: [],
184
+ target: i0.ɵɵFactoryTarget.Component
185
+ });
186
+ static ɵcmp = i0.ɵɵngDeclareComponent({
187
+ minVersion: "17.1.0",
188
+ version: "22.2.0",
189
+ type: HttpStatusCode,
190
+ isStandalone: true,
191
+ selector: "http-status-code",
192
+ inputs: { code: {
193
+ classPropertyName: "code",
194
+ publicName: "code",
195
+ isSignal: true,
196
+ isRequired: false,
197
+ transformFunction: null
198
+ } },
199
+ ngImport: i0,
200
+ template: "",
201
+ isInline: true
202
+ });
203
+ };
204
+ i0.ɵɵngDeclareClassMetadata({
205
+ minVersion: "12.0.0",
206
+ version: "22.2.0",
207
+ ngImport: i0,
208
+ type: HttpStatusCode,
209
+ decorators: [{
210
+ type: Component,
211
+ args: [{
212
+ selector: "http-status-code",
213
+ template: ""
214
+ }]
215
+ }],
216
+ propDecorators: { code: [{
217
+ type: i0.Input,
218
+ args: [{
219
+ isSignal: true,
220
+ alias: "code",
221
+ required: false
222
+ }]
223
+ }] }
217
224
  });
218
- /**
219
- * Read a deferred promise published by `defer({ deferred: { <key>: Promise } })`
220
- * inside an SSR data loader. Returns an Angular `Signal<T | undefined>` that
221
- * tracks the active route — re-keying picks up the new state's deferred map.
222
- *
223
- * The signal starts `undefined` and updates to the resolved value once the
224
- * promise settles. Use with native Angular control flow:
225
- *
226
- * ```ts
227
- * @Component({
228
- * template: `
229
- * @if (reviews()) {
230
- * <ul>
231
- * @for (r of reviews(); track r.id) {
232
- * <li>{{ r.author }}</li>
233
- * }
234
- * </ul>
235
- * } @else {
236
- * <p>Loading reviews…</p>
237
- * }
238
- * `,
239
- * })
240
- * export class Reviews {
241
- * readonly reviews = injectDeferred<Review[]>("reviews");
242
- * }
243
- * ```
244
- *
245
- * **Asymmetric Angular** (see `.claude/SSR_FEATURE_GAPS_RU.md` §8): Angular
246
- * does not ship `<Await>` / `<Streamed>` adapter components — Angular has no
247
- * direct analogue to React's `use(promise)` or Svelte's `{#await}`. Use
248
- * `@if (signal()) { … } @else { … }` or the `async` pipe with
249
- * `from(deferredPromise)` instead.
250
- */
225
+ const NEVER_PROMISE = new Promise(() => {});
251
226
  function injectDeferred(key) {
252
- const { routeState } = injectRoute();
253
- // Re-derive the promise reference whenever the route changes — invalidate()
254
- // + reload, navigation to a new route, etc. all refresh the underlying
255
- // deferred map, and we want the signal to track the *latest* promise.
256
- const promiseSignal = computed(() => {
257
- const context = routeState().route.context;
258
- const deferred = context.ssrDataDeferred;
259
- return (deferred?.[key] ?? NEVER_PROMISE);
260
- }, /* @ts-ignore */
261
- ...(ngDevMode ? [{ debugName: "promiseSignal" }] : /* istanbul ignore next */ []));
262
- const value = signal(undefined, /* @ts-ignore */
263
- ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
264
- effect((onCleanup) => {
265
- const promise = promiseSignal();
266
- let cancelled = false;
267
- onCleanup(() => {
268
- cancelled = true;
269
- });
270
- promise.then((resolved) => {
271
- if (!cancelled) {
272
- value.set(resolved);
273
- }
274
- },
275
- /* v8 ignore next 4 -- @preserve: rejection branch — `effect` swallows
276
- async errors silently, so leaving the signal as `undefined` is the
277
- only observable behaviour. Real error surfacing is the loader's
278
- responsibility (throw → navigation rejects → app error boundary). */
279
- () => {
280
- // Intentional swallow — see v8 ignore note above.
281
- });
282
- });
283
- return value.asReadonly();
227
+ const { routeState } = injectRoute();
228
+ const promiseSignal = computed(() => {
229
+ return routeState().route.context.ssrDataDeferred?.[key] ?? NEVER_PROMISE;
230
+ }, ...ngDevMode ? [{ debugName: "promiseSignal" }] : /* istanbul ignore next */ []);
231
+ const value = signal(void 0, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
232
+ effect((onCleanup) => {
233
+ const promise = promiseSignal();
234
+ let cancelled = false;
235
+ onCleanup(() => {
236
+ cancelled = true;
237
+ });
238
+ promise.then(
239
+ (resolved) => {
240
+ if (!cancelled) value.set(resolved);
241
+ },
242
+ /* v8 ignore next 4 -- @preserve: rejection branch — `effect` swallows
243
+ async errors silently, so leaving the signal as `undefined` is the
244
+ only observable behaviour. Real error surfacing is the loader's
245
+ responsibility (throw → navigation rejects → app error boundary). */
246
+ () => {}
247
+ );
248
+ });
249
+ return value.asReadonly();
284
250
  }
285
-
286
- /**
287
- * Environment providers for a request-scoped `HttpStatusSink`. Pair with
288
- * `createHttpStatusSink()` and read `sink.code` after the SSR render pass
289
- * completes.
290
- *
291
- * Application bootstrap:
292
- *
293
- * ```ts
294
- * const sink = createHttpStatusSink();
295
- *
296
- * await bootstrapApplication(AppRoot, {
297
- * providers: [
298
- * provideRealRouterFactory({ ... }),
299
- * provideHttpStatusSink(sink),
300
- * ],
301
- * });
302
- *
303
- * response.status(sink.code ?? 200).send(html);
304
- * ```
305
- *
306
- * Equivalent to:
307
- *
308
- * ```ts
309
- * { provide: HTTP_STATUS_SINK, useValue: sink }
310
- * ```
311
- *
312
- * Use the explicit `useValue` form when you need to compose with other
313
- * application providers in a single `providers: [...]` block.
314
- */
315
251
  function provideHttpStatusSink(sink) {
316
- return makeEnvironmentProviders([
317
- { provide: HTTP_STATUS_SINK, useValue: sink },
318
- ]);
252
+ return makeEnvironmentProviders([{
253
+ provide: HTTP_STATUS_SINK,
254
+ useValue: sink
255
+ }]);
319
256
  }
320
-
321
- // SSR-feature entry — Angular 21+
322
- //
323
- // Server-side and SSR-aware components/functions. Mirrors the
324
- // `/ssr` subpath split shipped by every other adapter (#604 + #610).
325
- // Trigger reached: `<ClientOnly>`, `<ServerOnly>`, `injectDeferred()`
326
- // — three SSR-feature exports, ≥3 threshold per
327
- // `.claude/SSR_FEATURE_GAPS_RU.md` §8.
328
- //
329
- // Asymmetric Angular note: Angular has no native `<Suspense>` /
330
- // `use(promise)` analogue, so this entry exposes the signal-based
331
- // `injectDeferred()` instead of `<Await>` / `<Streamed>` adapter
332
- // components. Consumers compose with `@if (signal()) { … } @else { … }`,
333
- // the `async` pipe (`from(deferredPromise)`), or native `@defer`
334
- // blocks for chunk-level lazy hydration.
335
- // Components
336
-
337
- /**
338
- * Generated bundle index. Do not edit.
339
- */
340
-
341
257
  export { ClientOnly, HTTP_STATUS_SINK, HttpStatusCode, ServerOnly, createHttpStatusSink, injectDeferred, provideHttpStatusSink };
342
- //# sourceMappingURL=real-router-angular-ssr.mjs.map
258
+
259
+ //# sourceMappingURL=real-router-angular-ssr.mjs.map