@absolutejs/absolute 0.19.0-beta.743 → 0.19.0-beta.744
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/angular/browser.js +4 -1
- package/dist/angular/browser.js.map +5 -4
- package/dist/angular/index.js +16 -12
- package/dist/angular/index.js.map +6 -5
- package/dist/angular/server.js +16 -12
- package/dist/angular/server.js.map +6 -5
- package/dist/src/angular/browser.d.ts +2 -0
- package/dist/src/angular/index.d.ts +2 -0
- package/dist/src/angular/page.d.ts +5 -0
- package/dist/src/angular/pageHandler.d.ts +7 -5
- package/dist/src/angular/server.d.ts +2 -0
- package/dist/types/angular.d.ts +9 -3
- package/package.json +1 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
export type { AngularPageDefinition, AngularPagePropsOf } from '../../types/angular';
|
|
1
2
|
export { ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER, buildAbsoluteHttpTransferCacheOptions } from './httpTransferCache';
|
|
2
3
|
export { createDeterministicRandom, DETERMINISTIC_NOW, DETERMINISTIC_RANDOM, DETERMINISTIC_SEED, provideDeterministicEnv } from './deterministicEnv';
|
|
4
|
+
export { defineAngularPage } from './page';
|
|
3
5
|
export { Island } from './Island.browser';
|
|
4
6
|
export { withPendingTask } from './pendingTask';
|
|
5
7
|
export { REQUEST, REQUEST_CONTEXT, RESPONSE_INIT } from './requestProviders';
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import '@angular/compiler';
|
|
2
|
+
export type { AngularPageDefinition, AngularPagePropsOf } from '../../types/angular';
|
|
2
3
|
export { ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER, buildAbsoluteHttpTransferCacheOptions } from './httpTransferCache';
|
|
3
4
|
export { createDeterministicRandom, DETERMINISTIC_NOW, DETERMINISTIC_RANDOM, DETERMINISTIC_SEED, provideDeterministicEnv } from './deterministicEnv';
|
|
4
5
|
export { handleAngularPageRequest } from './pageHandler';
|
|
6
|
+
export { defineAngularPage } from './page';
|
|
5
7
|
export { withPendingTask } from './pendingTask';
|
|
6
8
|
export { REQUEST, REQUEST_CONTEXT, RESPONSE_INIT } from './requestProviders';
|
|
7
9
|
export { createTypedIsland } from './createIsland';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Type } from '@angular/core';
|
|
2
|
+
import type { AngularPageDefinition } from '../../types/angular';
|
|
3
|
+
export declare const defineAngularPage: <Props extends Record<string, unknown> = Record<never, never>>(definition: {
|
|
4
|
+
component: Type<unknown>;
|
|
5
|
+
}) => AngularPageDefinition<Props>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AngularPagePropsOf } from '../../types/angular';
|
|
1
|
+
import type { AngularPageDefinition, AngularPagePropsOf } from '../../types/angular';
|
|
2
2
|
import { type StreamingSlotEnhancerOptions } from '../core/responseEnhancers';
|
|
3
3
|
type AngularPageRenderOptions = StreamingSlotEnhancerOptions & {
|
|
4
4
|
collectStreamingSlots?: boolean;
|
|
@@ -6,10 +6,12 @@ type AngularPageRenderOptions = StreamingSlotEnhancerOptions & {
|
|
|
6
6
|
type IsAny<T> = 0 extends 1 & T ? true : false;
|
|
7
7
|
type HasNoRequiredAngularProps<Props> = IsAny<Props> extends true ? true : keyof Props extends never ? true : false;
|
|
8
8
|
type AngularPageHasOptionalProps<Page> = Page extends {
|
|
9
|
-
|
|
10
|
-
} ?
|
|
9
|
+
page: AngularPageDefinition<infer Props>;
|
|
10
|
+
} ? HasNoRequiredAngularProps<Props> : Page extends {
|
|
11
|
+
default: AngularPageDefinition<infer Props>;
|
|
12
|
+
} ? HasNoRequiredAngularProps<Props> : HasNoRequiredAngularProps<AngularPagePropsOf<Page>>;
|
|
11
13
|
export type AngularPageRequestInput<Page = {
|
|
12
|
-
|
|
14
|
+
page: AngularPageDefinition<Record<never, never>>;
|
|
13
15
|
}> = AngularPageRenderOptions & {
|
|
14
16
|
headTag?: `<head>${string}</head>`;
|
|
15
17
|
indexPath: string;
|
|
@@ -30,6 +32,6 @@ export type AngularPageRequestInput<Page = {
|
|
|
30
32
|
});
|
|
31
33
|
export declare const invalidateAngularSsrCache: () => void;
|
|
32
34
|
export declare const handleAngularPageRequest: <Page = {
|
|
33
|
-
|
|
35
|
+
page: AngularPageDefinition<Record<never, never>>;
|
|
34
36
|
}>(input: AngularPageRequestInput<Page>) => Promise<Response>;
|
|
35
37
|
export {};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
export type { AngularPageDefinition, AngularPagePropsOf } from '../../types/angular';
|
|
1
2
|
export { ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER, buildAbsoluteHttpTransferCacheOptions } from './httpTransferCache';
|
|
2
3
|
export { createDeterministicRandom, DETERMINISTIC_NOW, DETERMINISTIC_RANDOM, DETERMINISTIC_SEED, provideDeterministicEnv } from './deterministicEnv';
|
|
3
4
|
export { handleAngularPageRequest } from './pageHandler';
|
|
5
|
+
export { defineAngularPage } from './page';
|
|
4
6
|
export { withPendingTask } from './pendingTask';
|
|
5
7
|
export { REQUEST, REQUEST_CONTEXT, RESPONSE_INIT } from './requestProviders';
|
package/dist/types/angular.d.ts
CHANGED
|
@@ -16,10 +16,16 @@ export type AngularDeps = {
|
|
|
16
16
|
SecurityContext: typeof import('@angular/core').SecurityContext;
|
|
17
17
|
withHttpTransferCacheOptions: typeof import('@angular/platform-browser').withHttpTransferCacheOptions;
|
|
18
18
|
};
|
|
19
|
-
export type
|
|
19
|
+
export type AngularPageDefinition<Props extends Record<string, unknown> = Record<never, never>> = {
|
|
20
|
+
component: import('@angular/core').Type<unknown>;
|
|
21
|
+
/** Type-only marker used by handleAngularPageRequest to infer route props. */
|
|
22
|
+
__absoluteAngularPageProps?: Props;
|
|
23
|
+
};
|
|
20
24
|
export type AngularPagePropsOf<Page> = Page extends {
|
|
21
|
-
|
|
22
|
-
} ?
|
|
25
|
+
page: AngularPageDefinition<infer Props>;
|
|
26
|
+
} ? Props : Page extends {
|
|
27
|
+
default: AngularPageDefinition<infer Props>;
|
|
28
|
+
} ? Props : Record<never, never>;
|
|
23
29
|
export type CachedRouteData = {
|
|
24
30
|
props: Record<string, unknown> | undefined;
|
|
25
31
|
headTag: `<head>${string}</head>`;
|
package/package.json
CHANGED