@analogjs/router 2.0.0-alpha.11 → 2.0.0-alpha.13
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/fesm2022/{analogjs-router-debug.page-e5DJlNv3.mjs → analogjs-router-debug.page-D0FWBl4n.mjs} +4 -4
- package/fesm2022/{analogjs-router-debug.page-e5DJlNv3.mjs.map → analogjs-router-debug.page-D0FWBl4n.mjs.map} +1 -1
- package/fesm2022/analogjs-router.mjs +8 -8
- package/fesm2022/analogjs-router.mjs.map +1 -1
- package/index.d.ts +265 -16
- package/package.json +2 -2
- package/server/actions/index.d.ts +16 -1
- package/server/index.d.ts +28 -4
- package/tokens/index.d.ts +16 -12
- package/lib/cache-key.d.ts +0 -3
- package/lib/constants.d.ts +0 -2
- package/lib/cookie-interceptor.d.ts +0 -2
- package/lib/debug/debug.page.d.ts +0 -17
- package/lib/debug/index.d.ts +0 -16
- package/lib/debug/routes.d.ts +0 -10
- package/lib/define-route.d.ts +0 -46
- package/lib/endpoints.d.ts +0 -5
- package/lib/form-action.directive.d.ts +0 -19
- package/lib/get-load-resolver.d.ts +0 -8
- package/lib/inject-load.d.ts +0 -6
- package/lib/inject-route-endpoint-url.d.ts +0 -2
- package/lib/markdown-helpers.d.ts +0 -2
- package/lib/meta-tags.d.ts +0 -28
- package/lib/models.d.ts +0 -29
- package/lib/provide-file-router.d.ts +0 -18
- package/lib/request-context.d.ts +0 -12
- package/lib/route-config.d.ts +0 -2
- package/lib/route-types.d.ts +0 -10
- package/lib/routes.d.ts +0 -19
- package/lib/server.component.d.ts +0 -32
- package/server/actions/actions.d.ts +0 -12
- package/server/provide-server-context.d.ts +0 -10
- package/server/render.d.ts +0 -12
- package/server/server-component-render.d.ts +0 -4
- package/server/tokens.d.ts +0 -7
package/fesm2022/{analogjs-router-debug.page-e5DJlNv3.mjs → analogjs-router-debug.page-D0FWBl4n.mjs}
RENAMED
|
@@ -27,8 +27,8 @@ class DebugRoutesComponent {
|
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
31
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
30
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-rc.2", ngImport: i0, type: DebugRoutesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
31
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0-rc.2", type: DebugRoutesComponent, isStandalone: true, selector: "analogjs-debug-routes-page", ngImport: i0, template: `
|
|
32
32
|
<h2>Routes</h2>
|
|
33
33
|
|
|
34
34
|
<div class="table-container">
|
|
@@ -56,7 +56,7 @@ class DebugRoutesComponent {
|
|
|
56
56
|
</div>
|
|
57
57
|
`, isInline: true, styles: [":host{width:100%}.table-container{width:100%;max-width:900px;margin:0 auto;background:#fff;border-radius:8px;box-shadow:0 2px 4px #0000001a;overflow:hidden}.table-header{display:grid;grid-template-columns:repeat(3,1fr);background:gray;border-bottom:2px solid #e5e7eb}.header-cell{padding:16px 24px;font-weight:600;text-transform:uppercase;font-size:14px;letter-spacing:.05em;color:#fff}.table-body{display:flex;flex-direction:column}.table-row{display:grid;grid-template-columns:repeat(3,1fr);border-bottom:1px solid #e5e7eb;transition:background-color .2s ease}.table-row:last-child{border-bottom:none}.table-row:hover{background-color:#f9fafb}.table-cell{padding:16px 24px;font-size:16px;color:#4b5563}@media (max-width: 640px){.table-container{border-radius:0;margin:0}.header-cell,.table-cell{padding:12px 16px}}\n"] }); }
|
|
58
58
|
}
|
|
59
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-rc.2", ngImport: i0, type: DebugRoutesComponent, decorators: [{
|
|
60
60
|
type: Component,
|
|
61
61
|
args: [{ selector: 'analogjs-debug-routes-page', standalone: true, template: `
|
|
62
62
|
<h2>Routes</h2>
|
|
@@ -88,4 +88,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImpor
|
|
|
88
88
|
}] });
|
|
89
89
|
|
|
90
90
|
export { DebugRoutesComponent as default };
|
|
91
|
-
//# sourceMappingURL=analogjs-router-debug.page-
|
|
91
|
+
//# sourceMappingURL=analogjs-router-debug.page-D0FWBl4n.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analogjs-router-debug.page-
|
|
1
|
+
{"version":3,"file":"analogjs-router-debug.page-D0FWBl4n.mjs","sources":["../../../../packages/router/src/lib/debug/debug.page.ts"],"sourcesContent":["import { Component } from '@angular/core';\n\nimport { injectDebugRoutes, DebugRoute } from './routes';\n\ntype CollectedRoute = {\n path: string;\n filename: string;\n file: string;\n isLayout: boolean;\n};\n\n@Component({\n selector: 'analogjs-debug-routes-page',\n standalone: true,\n template: `\n <h2>Routes</h2>\n\n <div class=\"table-container\">\n <div class=\"table-header\">\n <div class=\"header-cell\">Route Path</div>\n <div class=\"header-cell\">File</div>\n <div class=\"header-cell\">Type</div>\n </div>\n <div class=\"table-body\">\n @for (\n collectedRoute of collectedRoutes;\n track collectedRoute.filename\n ) {\n <div class=\"table-row\">\n <div class=\"table-cell\">{{ collectedRoute.path }}</div>\n <div class=\"table-cell\" [title]=\"collectedRoute.filename\">\n {{ collectedRoute.file }}\n </div>\n <div class=\"table-cell\">\n {{ collectedRoute.isLayout ? 'Layout' : 'Page' }}\n </div>\n </div>\n }\n </div>\n </div>\n `,\n styles: `\n :host {\n width: 100%;\n }\n\n .table-container {\n width: 100%;\n max-width: 900px;\n margin: 0 auto;\n background: white;\n border-radius: 8px;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n overflow: hidden;\n }\n\n .table-header {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n background: gray;\n border-bottom: 2px solid #e5e7eb;\n }\n\n .header-cell {\n padding: 16px 24px;\n font-weight: 600;\n text-transform: uppercase;\n font-size: 14px;\n letter-spacing: 0.05em;\n color: white;\n }\n\n .table-body {\n display: flex;\n flex-direction: column;\n }\n\n .table-row {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n border-bottom: 1px solid #e5e7eb;\n transition: background-color 0.2s ease;\n }\n\n .table-row:last-child {\n border-bottom: none;\n }\n\n .table-row:hover {\n background-color: #f9fafb;\n }\n\n .table-cell {\n padding: 16px 24px;\n font-size: 16px;\n color: #4b5563;\n }\n\n @media (max-width: 640px) {\n .table-container {\n border-radius: 0;\n margin: 0;\n }\n\n .header-cell,\n .table-cell {\n padding: 12px 16px;\n }\n }\n `,\n})\nexport default class DebugRoutesComponent {\n collectedRoutes: CollectedRoute[] = [];\n debugRoutes = injectDebugRoutes();\n\n ngOnInit() {\n this.traverseRoutes(this.debugRoutes);\n }\n\n traverseRoutes(routes: DebugRoute[], parent?: string) {\n routes.forEach((route) => {\n this.collectedRoutes.push({\n path: route.isLayout\n ? `${parent ? `/${parent}` : ''}${route.path ? `/${route.path}` : ''}`\n : `${parent ? `/${parent}` : ''}${\n route.path ? `/${route.path}` : '/'\n }`,\n filename: route.filename,\n file: route.filename?.replace(/(^.*)pages\\//, '') || '',\n isLayout: route.isLayout,\n });\n\n if (route.children) {\n const parentSegments = [parent, route.path];\n\n const fullParentPath = parentSegments.filter((s) => !!s).join('/');\n this.traverseRoutes(route.children, fullParentPath);\n }\n });\n }\n}\n"],"names":[],"mappings":";;;;AA+Gc,MAAO,oBAAoB,CAAA;AApGzC,IAAA,WAAA,GAAA;QAqGE,IAAe,CAAA,eAAA,GAAqB,EAAE;QACtC,IAAW,CAAA,WAAA,GAAG,iBAAiB,EAAE;AA2BlC;IAzBC,QAAQ,GAAA;AACN,QAAA,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC;;IAGvC,cAAc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A,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,aAAA,EAAA,IAAA,EAAA,oBAAoB,EAjG7B,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,4BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,ozBAAA,CAAA,EAAA,CAAA,CAAA;;gGAuEkB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBApGxC,SAAS;+BACE,4BAA4B,EAAA,UAAA,EAC1B,IAAI,EACN,QAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,ozBAAA,CAAA,EAAA;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, PLATFORM_ID, makeEnvironmentProviders, ENVIRONMENT_INITIALIZER, Injector, makeStateKey, TransferState, input, output, Directive, InjectionToken, signal, effect,
|
|
2
|
+
import { inject, PLATFORM_ID, makeEnvironmentProviders, ENVIRONMENT_INITIALIZER, Injector, makeStateKey, TransferState, input, output, Directive, InjectionToken, signal, effect, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
import { HttpClient, HttpHeaders, ɵHTTP_ROOT_INTERCEPTOR_FNS as _HTTP_ROOT_INTERCEPTOR_FNS, HttpResponse, HttpRequest } from '@angular/common/http';
|
|
4
4
|
import { firstValueFrom, map, from, of, throwError, catchError } from 'rxjs';
|
|
5
5
|
import { Meta, DomSanitizer } from '@angular/platform-browser';
|
|
@@ -670,10 +670,10 @@ class FormAction {
|
|
|
670
670
|
const essence = mime[0];
|
|
671
671
|
return essence === 'application/json';
|
|
672
672
|
}
|
|
673
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
674
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
673
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-rc.2", ngImport: i0, type: FormAction, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
674
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.0-rc.2", type: FormAction, isStandalone: true, selector: "form[action],form[method]", inputs: { action: { classPropertyName: "action", publicName: "action", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSuccess: "onSuccess", onError: "onError", state: "state" }, host: { listeners: { "submit": "submitted($event)" } }, ngImport: i0 }); }
|
|
675
675
|
}
|
|
676
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
676
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-rc.2", ngImport: i0, type: FormAction, decorators: [{
|
|
677
677
|
type: Directive,
|
|
678
678
|
args: [{
|
|
679
679
|
selector: 'form[action],form[method]',
|
|
@@ -707,7 +707,7 @@ function withDebugRoutes() {
|
|
|
707
707
|
const routes = [
|
|
708
708
|
{
|
|
709
709
|
path: '__analog/routes',
|
|
710
|
-
loadComponent: () => import('./analogjs-router-debug.page-
|
|
710
|
+
loadComponent: () => import('./analogjs-router-debug.page-D0FWBl4n.mjs'),
|
|
711
711
|
},
|
|
712
712
|
];
|
|
713
713
|
return {
|
|
@@ -787,10 +787,10 @@ class ServerOnly {
|
|
|
787
787
|
}
|
|
788
788
|
return `${baseURL}/_analog/components/${componentId}`;
|
|
789
789
|
}
|
|
790
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
791
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
790
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-rc.2", ngImport: i0, type: ServerOnly, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
791
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.0-rc.2", type: ServerOnly, isStandalone: true, selector: "server-only,ServerOnly,Server", inputs: { component: { classPropertyName: "component", publicName: "component", isSignal: true, isRequired: true, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outputs: "outputs" }, ngImport: i0, template: ` <div [innerHTML]="content()"></div> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
792
792
|
}
|
|
793
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
793
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-rc.2", ngImport: i0, type: ServerOnly, decorators: [{
|
|
794
794
|
type: Component,
|
|
795
795
|
args: [{
|
|
796
796
|
selector: 'server-only,ServerOnly,Server',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analogjs-router.mjs","sources":["../../../../packages/router/src/lib/meta-tags.ts","../../../../packages/router/src/lib/endpoints.ts","../../../../packages/router/src/lib/inject-route-endpoint-url.ts","../../../../packages/router/src/lib/route-config.ts","../../../../packages/router/src/lib/markdown-helpers.ts","../../../../packages/router/src/lib/constants.ts","../../../../packages/router/src/lib/routes.ts","../../../../packages/router/src/lib/define-route.ts","../../../../packages/router/src/lib/cookie-interceptor.ts","../../../../packages/router/src/lib/provide-file-router.ts","../../../../packages/router/src/lib/inject-load.ts","../../../../packages/router/src/lib/get-load-resolver.ts","../../../../packages/router/src/lib/cache-key.ts","../../../../packages/router/src/lib/request-context.ts","../../../../packages/router/src/lib/form-action.directive.ts","../../../../packages/router/src/lib/debug/routes.ts","../../../../packages/router/src/lib/debug/index.ts","../../../../packages/router/src/lib/server.component.ts","../../../../packages/router/src/analogjs-router.ts"],"sourcesContent":["import { inject } from '@angular/core';\nimport { Meta, MetaDefinition as NgMetaTag } from '@angular/platform-browser';\nimport { ActivatedRouteSnapshot, NavigationEnd, Router } from '@angular/router';\nimport { filter } from 'rxjs/operators';\n\nexport const ROUTE_META_TAGS_KEY = Symbol(\n '@analogjs/router Route Meta Tags Key',\n);\n\nconst CHARSET_KEY = 'charset';\nconst HTTP_EQUIV_KEY = 'httpEquiv';\n// httpEquiv selector key needs to be in kebab case format\nconst HTTP_EQUIV_SELECTOR_KEY = 'http-equiv';\nconst NAME_KEY = 'name';\nconst PROPERTY_KEY = 'property';\nconst CONTENT_KEY = 'content';\n\nexport type MetaTag =\n | (CharsetMetaTag & ExcludeRestMetaTagKeys<typeof CHARSET_KEY>)\n | (HttpEquivMetaTag & ExcludeRestMetaTagKeys<typeof HTTP_EQUIV_KEY>)\n | (NameMetaTag & ExcludeRestMetaTagKeys<typeof NAME_KEY>)\n | (PropertyMetaTag & ExcludeRestMetaTagKeys<typeof PROPERTY_KEY>);\n\ntype CharsetMetaTag = { [CHARSET_KEY]: string };\ntype HttpEquivMetaTag = { [HTTP_EQUIV_KEY]: string; [CONTENT_KEY]: string };\ntype NameMetaTag = { [NAME_KEY]: string; [CONTENT_KEY]: string };\ntype PropertyMetaTag = { [PROPERTY_KEY]: string; [CONTENT_KEY]: string };\n\ntype MetaTagKey =\n | typeof CHARSET_KEY\n | typeof HTTP_EQUIV_KEY\n | typeof NAME_KEY\n | typeof PROPERTY_KEY;\ntype ExcludeRestMetaTagKeys<Key extends MetaTagKey> = {\n [K in Exclude<MetaTagKey, Key>]?: never;\n};\n\ntype MetaTagSelector =\n | typeof CHARSET_KEY\n | `${\n | typeof HTTP_EQUIV_SELECTOR_KEY\n | typeof NAME_KEY\n | typeof PROPERTY_KEY}=\"${string}\"`;\ntype MetaTagMap = Record<MetaTagSelector, MetaTag>;\n\nexport function updateMetaTagsOnRouteChange(): void {\n const router = inject(Router);\n const metaService = inject(Meta);\n\n router.events\n .pipe(filter((event) => event instanceof NavigationEnd))\n .subscribe(() => {\n const metaTagMap = getMetaTagMap(router.routerState.snapshot.root);\n\n for (const metaTagSelector in metaTagMap) {\n const metaTag = metaTagMap[\n metaTagSelector as MetaTagSelector\n ] as NgMetaTag;\n metaService.updateTag(metaTag, metaTagSelector);\n }\n });\n}\n\nfunction getMetaTagMap(route: ActivatedRouteSnapshot): MetaTagMap {\n const metaTagMap = {} as MetaTagMap;\n let currentRoute: ActivatedRouteSnapshot | null = route;\n\n while (currentRoute) {\n const metaTags: MetaTag[] = currentRoute.data[ROUTE_META_TAGS_KEY] ?? [];\n for (const metaTag of metaTags) {\n metaTagMap[getMetaTagSelector(metaTag)] = metaTag;\n }\n\n currentRoute = currentRoute.firstChild;\n }\n\n return metaTagMap;\n}\n\nfunction getMetaTagSelector(metaTag: MetaTag): MetaTagSelector {\n if (metaTag.name) {\n return `${NAME_KEY}=\"${metaTag.name}\"`;\n }\n\n if (metaTag.property) {\n return `${PROPERTY_KEY}=\"${metaTag.property}\"`;\n }\n\n if (metaTag.httpEquiv) {\n return `${HTTP_EQUIV_SELECTOR_KEY}=\"${metaTag.httpEquiv}\"`;\n }\n\n return CHARSET_KEY;\n}\n","export const ANALOG_META_KEY = Symbol(\n '@analogjs/router Analog Route Metadata Key',\n);\n\n/**\n * This variable reference is replaced with a glob of all route endpoints.\n */\nexport let ANALOG_PAGE_ENDPOINTS: any = {};\n","import type { ActivatedRouteSnapshot, Route } from '@angular/router';\nimport { injectBaseURL, injectAPIPrefix } from '@analogjs/router/tokens';\n\nimport { ANALOG_META_KEY } from './endpoints';\n\nexport function injectRouteEndpointURL(route: ActivatedRouteSnapshot) {\n const routeConfig = route.routeConfig as Route & {\n [ANALOG_META_KEY]: { endpoint: string; endpointKey: string };\n };\n\n const apiPrefix = injectAPIPrefix();\n const baseUrl = injectBaseURL();\n const { queryParams, fragment: hash, params, parent } = route;\n const segment = parent?.url.map((segment) => segment.path).join('/') || '';\n const url = new URL(\n '',\n import.meta.env['VITE_ANALOG_PUBLIC_BASE_URL'] ||\n baseUrl ||\n (typeof window !== 'undefined' && window.location.origin\n ? window.location.origin\n : ''),\n );\n url.pathname = `${\n url.pathname.endsWith('/') ? url.pathname : url.pathname + '/'\n }${apiPrefix}/_analog${routeConfig[ANALOG_META_KEY].endpoint}`;\n url.search = `${new URLSearchParams(queryParams).toString()}`;\n url.hash = hash ?? '';\n\n Object.keys(params).forEach((param) => {\n url.pathname = url.pathname.replace(`[${param}]`, params[param]);\n });\n url.pathname = url.pathname.replace('**', segment);\n\n return url;\n}\n","import { inject } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport type { Route } from '@angular/router';\nimport { firstValueFrom } from 'rxjs';\n\nimport { RedirectRouteMeta, RouteConfig, RouteMeta } from './models';\nimport { ROUTE_META_TAGS_KEY } from './meta-tags';\nimport { ANALOG_PAGE_ENDPOINTS, ANALOG_META_KEY } from './endpoints';\nimport { injectRouteEndpointURL } from './inject-route-endpoint-url';\n\nexport function toRouteConfig(routeMeta: RouteMeta | undefined): RouteConfig {\n if (routeMeta && isRedirectRouteMeta(routeMeta)) {\n return routeMeta;\n }\n\n let { meta, ...routeConfig } = routeMeta ?? {};\n\n if (Array.isArray(meta)) {\n routeConfig.data = { ...routeConfig.data, [ROUTE_META_TAGS_KEY]: meta };\n } else if (typeof meta === 'function') {\n routeConfig.resolve = {\n ...routeConfig.resolve,\n [ROUTE_META_TAGS_KEY]: meta,\n };\n }\n\n if (!routeConfig) {\n routeConfig = {};\n }\n\n routeConfig.runGuardsAndResolvers =\n routeConfig.runGuardsAndResolvers ?? 'paramsOrQueryParamsChange';\n routeConfig.resolve = {\n ...routeConfig.resolve,\n load: async (route) => {\n const routeConfig = route.routeConfig as Route & {\n [ANALOG_META_KEY]: { endpoint: string; endpointKey: string };\n };\n\n if (ANALOG_PAGE_ENDPOINTS[routeConfig[ANALOG_META_KEY].endpointKey]) {\n const http = inject(HttpClient);\n const url = injectRouteEndpointURL(route);\n\n if (\n !!import.meta.env['VITE_ANALOG_PUBLIC_BASE_URL'] &&\n (globalThis as any).$fetch\n ) {\n return (globalThis as any).$fetch(url.pathname);\n }\n\n return firstValueFrom(http.get(`${url.href}`));\n }\n\n return {};\n },\n };\n\n return routeConfig;\n}\n\nfunction isRedirectRouteMeta(\n routeMeta: RouteMeta,\n): routeMeta is RedirectRouteMeta {\n return !!routeMeta.redirectTo;\n}\n","import { inject } from '@angular/core';\nimport { RouteExport } from './models';\n\ndeclare const Zone: any;\n\n// The Zone is currently enabled by default, so we wouldn't need this check.\n// However, leaving this open space will be useful if zone.js becomes optional\n// in the future. This means we won't have to modify the current code, and it will\n// continue to work seamlessly.\nconst isNgZoneEnabled = typeof Zone !== 'undefined' && !!Zone.root;\n\nexport function toMarkdownModule(\n markdownFileFactory: () => Promise<string>,\n): () => Promise<RouteExport> {\n return async () => {\n const createLoader = () =>\n Promise.all([import('@analogjs/content'), markdownFileFactory()]);\n\n const [\n { parseRawContentFile, MarkdownRouteComponent, ContentRenderer },\n markdownFile,\n ]: [typeof import('@analogjs/content'), string] = await (isNgZoneEnabled\n ? // We are not able to use `runOutsideAngular` because we are not inside\n // an injection context to retrieve the `NgZone` instance.\n // The `Zone.root.run` is required when the code is running in the\n // browser since asynchronous tasks being scheduled in the current context\n // are a reason for unnecessary change detection cycles.\n Zone.root.run(createLoader)\n : createLoader());\n\n const { content, attributes } = parseRawContentFile(markdownFile);\n const { title, meta } = attributes;\n\n return {\n default: MarkdownRouteComponent,\n routeMeta: {\n data: { _analogContent: content },\n title,\n meta,\n resolve: {\n renderedAnalogContent: async () => {\n const contentRenderer = inject(ContentRenderer);\n return contentRenderer.render(content);\n },\n },\n },\n };\n };\n}\n","export const ENDPOINT_EXTENSION = '.server.ts';\nexport const APP_DIR = 'src/app';\n","import type { Route } from '@angular/router';\n\nimport type { RouteExport, RouteMeta } from './models';\nimport { toRouteConfig } from './route-config';\nimport { toMarkdownModule } from './markdown-helpers';\nimport { ENDPOINT_EXTENSION } from './constants';\nimport { ANALOG_META_KEY } from './endpoints';\n\n/**\n * This variable reference is replaced with a glob of all page routes.\n */\nexport let ANALOG_ROUTE_FILES = {};\n\n/**\n * This variable reference is replaced with a glob of all content routes.\n */\nexport let ANALOG_CONTENT_ROUTE_FILES = {};\n\nexport type Files = Record<string, () => Promise<RouteExport | string>>;\n\ntype RawRoute = {\n filename: string | null;\n rawSegment: string;\n ancestorRawSegments: string[];\n segment: string;\n level: number;\n children: RawRoute[];\n};\n\ntype RawRouteMap = Record<string, RawRoute>;\n\ntype RawRouteByLevelMap = Record<number, RawRouteMap>;\n\n/**\n * A function used to parse list of files and create configuration of routes.\n *\n * @param files\n * @returns Array of routes\n */\nexport function createRoutes(files: Files, debug = false): Route[] {\n const filenames = Object.keys(files);\n\n if (filenames.length === 0) {\n return [];\n }\n\n // map filenames to raw routes and group them by level\n const rawRoutesByLevelMap = filenames.reduce((acc, filename) => {\n const rawPath = toRawPath(filename);\n const rawSegments = rawPath.split('/');\n // nesting level starts at 0\n // rawPath: /products => level: 0\n // rawPath: /products/:id => level: 1\n const level = rawSegments.length - 1;\n const rawSegment = rawSegments[level];\n const ancestorRawSegments = rawSegments.slice(0, level);\n\n return {\n ...acc,\n [level]: {\n ...acc[level],\n [rawPath]: {\n filename,\n rawSegment,\n ancestorRawSegments,\n segment: toSegment(rawSegment),\n level,\n children: [],\n },\n },\n };\n }, {} as RawRouteByLevelMap);\n\n const allLevels = Object.keys(rawRoutesByLevelMap).map(Number);\n const maxLevel = Math.max(...allLevels);\n\n // add each raw route to its parent's children array\n for (let level = maxLevel; level > 0; level--) {\n const rawRoutesMap = rawRoutesByLevelMap[level];\n const rawPaths = Object.keys(rawRoutesMap);\n\n for (const rawPath of rawPaths) {\n const rawRoute = rawRoutesMap[rawPath];\n const parentRawPath = rawRoute.ancestorRawSegments.join('/');\n const parentRawSegmentIndex = rawRoute.ancestorRawSegments.length - 1;\n const parentRawSegment =\n rawRoute.ancestorRawSegments[parentRawSegmentIndex];\n\n // create the parent level and/or raw route if it does not exist\n // parent route won't exist for nested routes that don't have a layout route\n rawRoutesByLevelMap[level - 1] ||= {};\n rawRoutesByLevelMap[level - 1][parentRawPath] ||= {\n filename: null,\n rawSegment: parentRawSegment,\n ancestorRawSegments: rawRoute.ancestorRawSegments.slice(\n 0,\n parentRawSegmentIndex,\n ),\n segment: toSegment(parentRawSegment),\n level: level - 1,\n children: [],\n };\n\n rawRoutesByLevelMap[level - 1][parentRawPath].children.push(rawRoute);\n }\n }\n\n // only take raw routes from the root level\n // since they already contain nested routes as their children\n const rootRawRoutesMap = rawRoutesByLevelMap[0];\n const rawRoutes = Object.keys(rootRawRoutesMap).map(\n (segment) => rootRawRoutesMap[segment],\n );\n sortRawRoutes(rawRoutes);\n\n return toRoutes(rawRoutes, files, debug);\n}\n\nfunction toRawPath(filename: string): string {\n return filename\n .replace(\n // convert to relative path and remove file extension\n /^(?:[a-zA-Z]:[\\\\/])?(.*?)[\\\\/](?:routes|pages)[\\\\/]|(?:[\\\\/](?:app[\\\\/](?:routes|pages)[\\\\/]))|(\\.page\\.(js|ts|analog|ag)$)|(\\.(ts|md|analog|ag)$)/g,\n '',\n )\n .replace(/\\[\\.{3}.+\\]/, '**') // [...not-found] => **\n .replace(/\\[([^\\]]+)\\]/g, ':$1'); // [id] => :id\n}\n\nfunction toSegment(rawSegment: string): string {\n return rawSegment\n .replace(/index|\\(.*?\\)/g, '') // replace named empty segments\n .replace(/\\.|\\/+/g, '/') // replace dots with slashes and remove redundant slashes\n .replace(/^\\/+|\\/+$/g, ''); // remove trailing slashes\n}\n\nfunction toRoutes(rawRoutes: RawRoute[], files: Files, debug = false): Route[] {\n const routes: Route[] = [];\n\n for (const rawRoute of rawRoutes) {\n const children: Route[] | undefined =\n rawRoute.children.length > 0\n ? toRoutes(rawRoute.children, files, debug)\n : undefined;\n let module: (() => Promise<RouteExport>) | undefined = undefined;\n let analogMeta: { endpoint: string; endpointKey: string } | undefined =\n undefined;\n\n if (rawRoute.filename) {\n const isMarkdownFile = rawRoute.filename.endsWith('.md');\n\n if (!debug) {\n module = isMarkdownFile\n ? toMarkdownModule(files[rawRoute.filename] as () => Promise<string>)\n : (files[rawRoute.filename] as () => Promise<RouteExport>);\n }\n\n const endpointKey = rawRoute.filename.replace(\n /\\.page\\.(ts|analog|ag)$/,\n ENDPOINT_EXTENSION,\n );\n\n // get endpoint path\n const rawEndpoint = rawRoute.filename\n .replace(/\\.page\\.(ts|analog|ag)$/, '')\n .replace(/\\[\\.{3}.+\\]/, '**') // [...not-found] => **\n .replace(/^(.*?)\\/pages/, '/pages');\n\n // replace periods, remove (index) paths\n const endpoint = (rawEndpoint || '')\n .replace(/\\./g, '/')\n .replace(/\\/\\((.*?)\\)$/, '/-$1-');\n\n analogMeta = {\n endpoint,\n endpointKey,\n };\n }\n\n type DebugRoute = Route & {\n filename?: string | null | undefined;\n isLayout?: boolean;\n };\n\n const route: Route & { meta?: typeof analogMeta } & DebugRoute = module\n ? {\n path: rawRoute.segment,\n loadChildren: () =>\n module!().then((m) => {\n if (import.meta.env.DEV) {\n const hasModuleDefault = !!m.default;\n const hasRedirect = !!m.routeMeta?.redirectTo;\n\n if (!hasModuleDefault && !hasRedirect) {\n console.warn(\n `[Analog] Missing default export at ${rawRoute.filename}`,\n );\n }\n }\n\n return [\n {\n path: '',\n component: m.default,\n ...toRouteConfig(m.routeMeta as RouteMeta | undefined),\n children,\n [ANALOG_META_KEY]: analogMeta,\n },\n ];\n }),\n }\n : {\n path: rawRoute.segment,\n ...(debug\n ? {\n filename: rawRoute.filename ? rawRoute.filename : undefined,\n isLayout: children && children.length > 0 ? true : false,\n }\n : {}),\n children,\n };\n\n routes.push(route);\n }\n\n return routes;\n}\n\nfunction sortRawRoutes(rawRoutes: RawRoute[]): void {\n rawRoutes.sort((a, b) => {\n let segmentA = deprioritizeSegment(a.segment);\n let segmentB = deprioritizeSegment(b.segment);\n\n // prioritize routes with fewer children\n if (a.children.length > b.children.length) {\n segmentA = `~${segmentA}`;\n } else if (a.children.length < b.children.length) {\n segmentB = `~${segmentB}`;\n }\n\n return segmentA > segmentB ? 1 : -1;\n });\n\n for (const rawRoute of rawRoutes) {\n sortRawRoutes(rawRoute.children);\n }\n}\n\nfunction deprioritizeSegment(segment: string): string {\n // deprioritize param and wildcard segments\n return segment.replace(':', '~~').replace('**', '~~~~');\n}\n\nexport const routes: Route[] = createRoutes({\n ...ANALOG_ROUTE_FILES,\n ...ANALOG_CONTENT_ROUTE_FILES,\n});\n","import { inject } from '@angular/core';\nimport { Route as NgRoute, Router } from '@angular/router';\nimport { ActivatedRoute } from '@angular/router';\n\ntype RouteOmitted =\n | 'component'\n | 'loadComponent'\n | 'loadChildren'\n | 'path'\n | 'pathMatch';\n\ntype RestrictedRoute = Omit<NgRoute, RouteOmitted>;\n\n/**\n * @deprecated Use `RouteMeta` type instead.\n * For more info see: https://github.com/analogjs/analog/issues/223\n *\n * Defines additional route config metadata. This\n * object is merged into the route config with\n * the predefined file-based route.\n *\n * @usageNotes\n *\n * ```\n * import { Component } from '@angular/core';\n * import { defineRouteMeta } from '@analogjs/router';\n *\n * export const routeMeta = defineRouteMeta({\n * title: 'Welcome'\n * });\n *\n * @Component({\n * template: `Home`,\n * standalone: true,\n * })\n * export default class HomeComponent {}\n * ```\n *\n * @param route\n * @returns\n */\nexport const defineRouteMeta = (route: RestrictedRoute) => {\n return route;\n};\n\n/**\n * Returns the instance of Angular Router\n *\n * @returns The router\n */\nexport const injectRouter = () => {\n return inject(Router);\n};\n\n/**\n * Returns the instance of the Activate Route for the component\n *\n * @returns The activated route\n */\nexport const injectActivatedRoute = () => {\n return inject(ActivatedRoute);\n};\n","import { isPlatformServer } from '@angular/common';\nimport { HttpHandlerFn, HttpHeaders, HttpRequest } from '@angular/common/http';\nimport { PLATFORM_ID, inject } from '@angular/core';\nimport { injectRequest } from '@analogjs/router/tokens';\n\nexport function cookieInterceptor(\n req: HttpRequest<unknown>,\n next: HttpHandlerFn,\n location = inject(PLATFORM_ID),\n serverRequest = injectRequest(),\n) {\n if (isPlatformServer(location) && req.url.includes('/_analog/')) {\n let headers = new HttpHeaders();\n const cookies = serverRequest?.headers.cookie;\n headers = headers.set('cookie', cookies ?? '');\n\n const cookiedRequest = req.clone({\n headers,\n });\n\n return next(cookiedRequest);\n } else {\n return next(req);\n }\n}\n","import {\n ENVIRONMENT_INITIALIZER,\n EnvironmentProviders,\n makeEnvironmentProviders,\n} from '@angular/core';\nimport { provideRouter, RouterFeatures, ROUTES, Routes } from '@angular/router';\nimport { API_PREFIX } from '@analogjs/router/tokens';\nimport { ɵHTTP_ROOT_INTERCEPTOR_FNS as HTTP_ROOT_INTERCEPTOR_FNS } from '@angular/common/http';\n\nimport { routes } from './routes';\nimport { updateMetaTagsOnRouteChange } from './meta-tags';\nimport { cookieInterceptor } from './cookie-interceptor';\n\ndeclare const ANALOG_API_PREFIX: string;\n\n/**\n * Sets up providers for the Angular router, and registers\n * file-based routes. Additional features can be provided\n * to further configure the behavior of the router.\n *\n * @param features\n * @returns Providers and features to configure the router with routes\n */\nexport function provideFileRouter(\n ...features: RouterFeatures[]\n): EnvironmentProviders {\n const extraRoutesFeature = features.filter((feat) => feat.ɵkind >= 100);\n const routerFeatures = features.filter((feat) => feat.ɵkind < 100);\n\n return makeEnvironmentProviders([\n extraRoutesFeature.map((erf) => erf.ɵproviders),\n provideRouter(routes, ...routerFeatures),\n {\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useValue: () => updateMetaTagsOnRouteChange(),\n },\n {\n provide: HTTP_ROOT_INTERCEPTOR_FNS,\n multi: true,\n useValue: cookieInterceptor,\n },\n {\n provide: API_PREFIX,\n useFactory() {\n return typeof ANALOG_API_PREFIX !== 'undefined'\n ? ANALOG_API_PREFIX\n : 'api';\n },\n },\n ]);\n}\n\n/**\n * Provides extra custom routes in addition to the routes\n * discovered from the filesystem-based routing. These routes are\n * inserted before the filesystem-based routes, and take priority in\n * route matching.\n */\nexport function withExtraRoutes(routes: Routes): RouterFeatures {\n return {\n ɵkind: 100 as number,\n ɵproviders: [{ provide: ROUTES, useValue: routes, multi: true }],\n };\n}\n","import { Injector, inject } from '@angular/core';\nimport { ActivatedRoute, Data } from '@angular/router';\nimport { Observable, map } from 'rxjs';\n\nimport { PageServerLoad } from './route-types';\n\nexport function injectLoad<\n T extends (pageServerLoad: PageServerLoad) => Promise<any>,\n>(options?: { injector?: Injector }): Observable<Awaited<ReturnType<T>>> {\n const injector = options?.injector ?? inject(Injector);\n const route = injector.get(ActivatedRoute);\n\n return route.data.pipe(\n map<Data, Awaited<ReturnType<T>>>((data) => data['load']),\n );\n}\n","import { ActivatedRouteSnapshot } from '@angular/router';\n\n/**\n * Get server load resolver data for the route\n *\n * @param route Provides the route to get server load resolver\n * @returns Returns server load resolver data for the route\n */\nexport async function getLoadResolver<T>(\n route: ActivatedRouteSnapshot,\n): Promise<T> {\n return route.routeConfig?.resolve?.['load']?.(route);\n}\n","import { HttpParams, HttpRequest } from '@angular/common/http';\nimport { StateKey, makeStateKey } from '@angular/core';\n\nfunction sortAndConcatParams(params: HttpParams | URLSearchParams): string {\n return [...params.keys()]\n .sort()\n .map((k) => `${k}=${params.getAll(k)}`)\n .join('&');\n}\n\nexport function makeCacheKey(\n request: HttpRequest<any>,\n mappedRequestUrl: string,\n): StateKey<unknown> {\n // make the params encoded same as a url so it's easy to identify\n const { params, method, responseType } = request;\n const encodedParams = sortAndConcatParams(params);\n\n let serializedBody = request.serializeBody();\n if (serializedBody instanceof URLSearchParams) {\n serializedBody = sortAndConcatParams(serializedBody);\n } else if (typeof serializedBody !== 'string') {\n serializedBody = '';\n }\n\n const key = [\n method,\n responseType,\n mappedRequestUrl,\n serializedBody,\n encodedParams,\n ].join('|');\n\n const hash = generateHash(key);\n\n return makeStateKey(hash);\n}\n\nfunction generateHash(str: string) {\n let hash = 0;\n for (let i = 0, len = str.length; i < len; i++) {\n let chr = str.charCodeAt(i);\n hash = (hash << 5) - hash + chr;\n hash |= 0; // Convert to 32bit integer\n }\n return `${hash}`;\n}\n","import { TransferState, inject, makeStateKey } from '@angular/core';\nimport {\n HttpHandlerFn,\n HttpHeaders,\n HttpRequest,\n HttpResponse,\n} from '@angular/common/http';\n\nimport { from, of } from 'rxjs';\n\nimport { injectBaseURL, injectAPIPrefix } from '@analogjs/router/tokens';\n\nimport { makeCacheKey } from './cache-key';\n\n/**\n * Interceptor that is server-aware when making HttpClient requests.\n * Server-side requests use the full URL\n * Prerendering uses the internal Nitro $fetch function, along with state transfer\n * Client-side requests use the window.location.origin\n *\n * @param req HttpRequest<unknown>\n * @param next HttpHandlerFn\n * @returns\n */\nexport function requestContextInterceptor(\n req: HttpRequest<unknown>,\n next: HttpHandlerFn,\n) {\n const apiPrefix = injectAPIPrefix();\n const baseUrl = injectBaseURL();\n const transferState = inject(TransferState);\n\n // during prerendering with Nitro\n if (\n typeof global !== 'undefined' &&\n global.$fetch &&\n baseUrl &&\n (req.url.startsWith('/') ||\n req.url.startsWith(baseUrl) ||\n req.url.startsWith(`/${apiPrefix}`))\n ) {\n const requestUrl = new URL(req.url, baseUrl);\n const cacheKey = makeCacheKey(req, new URL(requestUrl).pathname);\n const storeKey = makeStateKey<unknown>(`analog_${cacheKey}`);\n const fetchUrl = requestUrl.pathname;\n\n const responseType =\n req.responseType === 'arraybuffer' ? 'arrayBuffer' : req.responseType;\n\n return from(\n global.$fetch\n .raw(fetchUrl, {\n method: req.method as any,\n body: req.body ? req.body : undefined,\n params: requestUrl.searchParams,\n responseType,\n headers: req.headers.keys().reduce((hdrs, current) => {\n return {\n ...hdrs,\n [current]: req.headers.get(current),\n };\n }, {}),\n })\n .then((res) => {\n const cacheResponse = {\n body: res._data,\n headers: new HttpHeaders(res.headers),\n status: 200,\n statusText: 'OK',\n url: fetchUrl,\n };\n const transferResponse = new HttpResponse(cacheResponse);\n\n transferState.set(storeKey, cacheResponse);\n return transferResponse;\n }),\n );\n }\n\n // on the client\n if (\n !import.meta.env.SSR &&\n (req.url.startsWith('/') || req.url.includes('/_analog/'))\n ) {\n // /_analog/ requests are full URLs\n const requestUrl = req.url.includes('/_analog/')\n ? req.url\n : `${window.location.origin}${req.url}`;\n const cacheKey = makeCacheKey(req, new URL(requestUrl).pathname);\n const storeKey = makeStateKey<unknown>(`analog_${cacheKey}`);\n const cacheRestoreResponse = transferState.get(storeKey, null);\n\n if (cacheRestoreResponse) {\n transferState.remove(storeKey);\n return of(new HttpResponse(cacheRestoreResponse));\n }\n\n return next(\n req.clone({\n url: requestUrl,\n }),\n );\n }\n\n // on the server\n if (baseUrl && (req.url.startsWith('/') || req.url.startsWith(baseUrl))) {\n const requestUrl =\n req.url.startsWith(baseUrl) && !req.url.startsWith('/')\n ? req.url\n : `${baseUrl}${req.url}`;\n\n return next(\n req.clone({\n url: requestUrl,\n }),\n );\n }\n\n return next(req);\n}\n","import { Directive, inject, input, output } from '@angular/core';\nimport { ActivatedRoute, Params, Router } from '@angular/router';\n\nimport { injectRouteEndpointURL } from './inject-route-endpoint-url';\n\n@Directive({\n selector: 'form[action],form[method]',\n host: {\n '(submit)': `submitted($event)`,\n },\n standalone: true,\n})\nexport class FormAction {\n action = input<string>('');\n onSuccess = output<unknown>();\n onError = output<unknown>();\n state = output<\n 'submitting' | 'error' | 'redirect' | 'success' | 'navigate'\n >();\n private router = inject(Router);\n private route = inject(ActivatedRoute);\n private path = this._getPath();\n\n submitted($event: { target: HTMLFormElement } & Event) {\n $event.preventDefault();\n\n this.state.emit('submitting');\n const body = new FormData($event.target);\n\n if ($event.target.method.toUpperCase() === 'GET') {\n this._handleGet(body, this.router.url);\n } else {\n this._handlePost(body, this.path, $event);\n }\n }\n\n private _handleGet(body: FormData, path: string) {\n const params: Params = {};\n body.forEach((formVal, formKey) => (params[formKey] = formVal));\n\n this.state.emit('navigate');\n const url = path.split('?')[0];\n this.router.navigate([url], {\n queryParams: params,\n onSameUrlNavigation: 'reload',\n });\n }\n\n private _handlePost(\n body: FormData,\n path: string,\n $event: { target: HTMLFormElement } & Event,\n ) {\n fetch(path, {\n method: $event.target.method,\n body,\n })\n .then((res) => {\n if (res.ok) {\n if (res.redirected) {\n const redirectUrl = new URL(res.url).pathname;\n this.state.emit('redirect');\n this.router.navigate([redirectUrl]);\n } else if (this._isJSON(res.headers.get('Content-type'))) {\n res.json().then((result) => {\n this.onSuccess.emit(result);\n this.state.emit('success');\n });\n } else {\n res.text().then((result) => {\n this.onSuccess.emit(result);\n this.state.emit('success');\n });\n }\n } else {\n if (res.headers.get('X-Analog-Errors')) {\n res.json().then((errors: unknown) => {\n this.onError.emit(errors);\n this.state.emit('error');\n });\n } else {\n this.state.emit('error');\n }\n }\n })\n .catch((_) => {\n this.state.emit('error');\n });\n }\n\n private _getPath() {\n if (this.route) {\n return injectRouteEndpointURL(this.route.snapshot).pathname;\n }\n\n return `/api/_analog/pages${window.location.pathname}`;\n }\n\n private _isJSON(contentType: string | null): boolean {\n const mime = contentType ? contentType.split(';') : [];\n const essence = mime[0];\n\n return essence === 'application/json';\n }\n}\n","import { inject, InjectionToken } from '@angular/core';\nimport { Route } from '@angular/router';\n\nimport {\n ANALOG_CONTENT_ROUTE_FILES,\n ANALOG_ROUTE_FILES,\n createRoutes,\n} from '../routes';\n\nexport const DEBUG_ROUTES = new InjectionToken(\n '@analogjs/router debug routes',\n {\n providedIn: 'root',\n factory() {\n const debugRoutes = createRoutes(\n {\n ...ANALOG_ROUTE_FILES,\n ...ANALOG_CONTENT_ROUTE_FILES,\n },\n true,\n );\n\n return debugRoutes as (Route & DebugRoute)[];\n },\n },\n);\n\nexport type DebugRoute = {\n path: string;\n filename: string;\n isLayout: boolean;\n children?: DebugRoute[];\n};\n\nexport function injectDebugRoutes() {\n return inject(DEBUG_ROUTES);\n}\n","import { ROUTES } from '@angular/router';\n\n/**\n * Provides routes that provide additional\n * pages for displaying and debugging\n * routes.\n */\nexport function withDebugRoutes() {\n const routes = [\n {\n path: '__analog/routes',\n loadComponent: () => import('./debug.page'),\n },\n ];\n\n return {\n ɵkind: 101 as number,\n ɵproviders: [{ provide: ROUTES, useValue: routes, multi: true }],\n };\n}\n","import {\n HttpClient,\n HttpHeaders,\n HttpRequest,\n HttpResponse,\n} from '@angular/common/http';\nimport {\n ChangeDetectionStrategy,\n Component,\n effect,\n inject,\n input,\n makeStateKey,\n output,\n signal,\n TransferState,\n} from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { ActivatedRoute } from '@angular/router';\nimport { injectBaseURL } from '@analogjs/router/tokens';\nimport { catchError, map, of, throwError } from 'rxjs';\n\nimport { makeCacheKey } from './cache-key';\n\ntype ServerProps = Record<string, any>;\ntype ServerOutputs = Record<string, any>;\n\n/**\n * @description\n * Component that defines the bridge between the client and server-only\n * components. The component passes the component ID and props to the server\n * and retrieves the rendered HTML and outputs from the server-only component.\n *\n * Status: experimental\n */\n@Component({\n selector: 'server-only,ServerOnly,Server',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: ` <div [innerHTML]=\"content()\"></div> `,\n})\nexport class ServerOnly {\n component = input.required<string>();\n props = input<ServerProps>();\n outputs = output<ServerOutputs>();\n private http = inject(HttpClient);\n private sanitizer = inject(DomSanitizer);\n protected content = signal<SafeHtml>('');\n private route = inject(ActivatedRoute, { optional: true });\n private baseURL = injectBaseURL();\n private transferState = inject(TransferState);\n\n constructor() {\n effect(() => {\n const routeComponentId: string | undefined =\n this.route?.snapshot.data['component'];\n const props = this.props() || {};\n const componentId = routeComponentId || this.component();\n\n const headers = new HttpHeaders(\n new Headers({\n 'Content-type': 'application/json',\n 'X-Analog-Component': componentId,\n }),\n );\n\n const componentUrl = this.getComponentUrl(componentId);\n const httpRequest = new HttpRequest('POST', componentUrl, props, {\n headers,\n });\n const cacheKey = makeCacheKey(\n httpRequest,\n new URL(componentUrl).pathname,\n );\n const storeKey = makeStateKey<{ html: string; outputs: ServerOutputs }>(\n cacheKey,\n );\n const componentState = this.transferState.get<{\n html: string;\n outputs: ServerOutputs;\n } | null>(storeKey, null);\n\n if (componentState) {\n this.updateContent(componentState);\n this.transferState.remove(storeKey);\n } else {\n this.http\n .request(httpRequest)\n .pipe(\n map((response) => {\n if (response instanceof HttpResponse) {\n if (import.meta.env.SSR) {\n this.transferState.set(storeKey, response.body);\n }\n\n return response.body as {\n html: string;\n outputs: ServerOutputs;\n };\n }\n return throwError(\n () => ({}) as { html: string; outputs: ServerOutputs },\n );\n }),\n catchError((error: unknown) => {\n console.log(error);\n return of({\n html: '',\n outputs: {} as ServerOutputs,\n });\n }),\n )\n .subscribe((content) =>\n this.updateContent(\n content as { html: string; outputs: ServerOutputs },\n ),\n );\n }\n });\n }\n\n updateContent(content: { html: string; outputs: ServerOutputs }) {\n this.content.set(this.sanitizer.bypassSecurityTrustHtml(content.html));\n this.outputs.emit(content.outputs);\n }\n\n getComponentUrl(componentId: string) {\n let baseURL = this.baseURL;\n\n if (!baseURL && typeof window !== 'undefined') {\n baseURL = window.location.origin;\n }\n\n return `${baseURL}/_analog/components/${componentId}`;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["HTTP_ROOT_INTERCEPTOR_FNS"],"mappings":";;;;;;;;;;AAKO,MAAM,mBAAmB,GAAG,MAAM,CACvC,sCAAsC,CACvC;AAED,MAAM,WAAW,GAAG,SAAS;AAC7B,MAAM,cAAc,GAAG,WAAW;AAClC;AACA,MAAM,uBAAuB,GAAG,YAAY;AAC5C,MAAM,QAAQ,GAAG,MAAM;AACvB,MAAM,YAAY,GAAG,UAAU;AAC/B,MAAM,WAAW,GAAG,SAAS;SA8Bb,2BAA2B,GAAA;AACzC,IAAA,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAC7B,IAAA,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC;AAEhC,IAAA,MAAM,CAAC;AACJ,SAAA,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,KAAK,KAAK,YAAY,aAAa,CAAC;SACtD,SAAS,CAAC,MAAK;AACd,QAAA,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,WAAW,CAAC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AA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAV,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAU,iYAFX,CAAuC,qCAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAEtC,UAAU,EAAA,UAAA,EAAA,CAAA;kBALtB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,+BAA+B;oBACzC,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,QAAQ,EAAE,CAAuC,qCAAA,CAAA;AAClD,iBAAA;;;ACvCD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"analogjs-router.mjs","sources":["../../../../packages/router/src/lib/meta-tags.ts","../../../../packages/router/src/lib/endpoints.ts","../../../../packages/router/src/lib/inject-route-endpoint-url.ts","../../../../packages/router/src/lib/route-config.ts","../../../../packages/router/src/lib/markdown-helpers.ts","../../../../packages/router/src/lib/constants.ts","../../../../packages/router/src/lib/routes.ts","../../../../packages/router/src/lib/define-route.ts","../../../../packages/router/src/lib/cookie-interceptor.ts","../../../../packages/router/src/lib/provide-file-router.ts","../../../../packages/router/src/lib/inject-load.ts","../../../../packages/router/src/lib/get-load-resolver.ts","../../../../packages/router/src/lib/cache-key.ts","../../../../packages/router/src/lib/request-context.ts","../../../../packages/router/src/lib/form-action.directive.ts","../../../../packages/router/src/lib/debug/routes.ts","../../../../packages/router/src/lib/debug/index.ts","../../../../packages/router/src/lib/server.component.ts","../../../../packages/router/src/analogjs-router.ts"],"sourcesContent":["import { inject } from '@angular/core';\nimport { Meta, MetaDefinition as NgMetaTag } from '@angular/platform-browser';\nimport { ActivatedRouteSnapshot, NavigationEnd, Router } from '@angular/router';\nimport { filter } from 'rxjs/operators';\n\nexport const ROUTE_META_TAGS_KEY = Symbol(\n '@analogjs/router Route Meta Tags Key',\n);\n\nconst CHARSET_KEY = 'charset';\nconst HTTP_EQUIV_KEY = 'httpEquiv';\n// httpEquiv selector key needs to be in kebab case format\nconst HTTP_EQUIV_SELECTOR_KEY = 'http-equiv';\nconst NAME_KEY = 'name';\nconst PROPERTY_KEY = 'property';\nconst CONTENT_KEY = 'content';\n\nexport type MetaTag =\n | (CharsetMetaTag & ExcludeRestMetaTagKeys<typeof CHARSET_KEY>)\n | (HttpEquivMetaTag & ExcludeRestMetaTagKeys<typeof HTTP_EQUIV_KEY>)\n | (NameMetaTag & ExcludeRestMetaTagKeys<typeof NAME_KEY>)\n | (PropertyMetaTag & ExcludeRestMetaTagKeys<typeof PROPERTY_KEY>);\n\ntype CharsetMetaTag = { [CHARSET_KEY]: string };\ntype HttpEquivMetaTag = { [HTTP_EQUIV_KEY]: string; [CONTENT_KEY]: string };\ntype NameMetaTag = { [NAME_KEY]: string; [CONTENT_KEY]: string };\ntype PropertyMetaTag = { [PROPERTY_KEY]: string; [CONTENT_KEY]: string };\n\ntype MetaTagKey =\n | typeof CHARSET_KEY\n | typeof HTTP_EQUIV_KEY\n | typeof NAME_KEY\n | typeof PROPERTY_KEY;\ntype ExcludeRestMetaTagKeys<Key extends MetaTagKey> = {\n [K in Exclude<MetaTagKey, Key>]?: never;\n};\n\ntype MetaTagSelector =\n | typeof CHARSET_KEY\n | `${\n | typeof HTTP_EQUIV_SELECTOR_KEY\n | typeof NAME_KEY\n | typeof PROPERTY_KEY}=\"${string}\"`;\ntype MetaTagMap = Record<MetaTagSelector, MetaTag>;\n\nexport function updateMetaTagsOnRouteChange(): void {\n const router = inject(Router);\n const metaService = inject(Meta);\n\n router.events\n .pipe(filter((event) => event instanceof NavigationEnd))\n .subscribe(() => {\n const metaTagMap = getMetaTagMap(router.routerState.snapshot.root);\n\n for (const metaTagSelector in metaTagMap) {\n const metaTag = metaTagMap[\n metaTagSelector as MetaTagSelector\n ] as NgMetaTag;\n metaService.updateTag(metaTag, metaTagSelector);\n }\n });\n}\n\nfunction getMetaTagMap(route: ActivatedRouteSnapshot): MetaTagMap {\n const metaTagMap = {} as MetaTagMap;\n let currentRoute: ActivatedRouteSnapshot | null = route;\n\n while (currentRoute) {\n const metaTags: MetaTag[] = currentRoute.data[ROUTE_META_TAGS_KEY] ?? [];\n for (const metaTag of metaTags) {\n metaTagMap[getMetaTagSelector(metaTag)] = metaTag;\n }\n\n currentRoute = currentRoute.firstChild;\n }\n\n return metaTagMap;\n}\n\nfunction getMetaTagSelector(metaTag: MetaTag): MetaTagSelector {\n if (metaTag.name) {\n return `${NAME_KEY}=\"${metaTag.name}\"`;\n }\n\n if (metaTag.property) {\n return `${PROPERTY_KEY}=\"${metaTag.property}\"`;\n }\n\n if (metaTag.httpEquiv) {\n return `${HTTP_EQUIV_SELECTOR_KEY}=\"${metaTag.httpEquiv}\"`;\n }\n\n return CHARSET_KEY;\n}\n","export const ANALOG_META_KEY = Symbol(\n '@analogjs/router Analog Route Metadata Key',\n);\n\n/**\n * This variable reference is replaced with a glob of all route endpoints.\n */\nexport let ANALOG_PAGE_ENDPOINTS: any = {};\n","import type { ActivatedRouteSnapshot, Route } from '@angular/router';\nimport { injectBaseURL, injectAPIPrefix } from '@analogjs/router/tokens';\n\nimport { ANALOG_META_KEY } from './endpoints';\n\nexport function injectRouteEndpointURL(route: ActivatedRouteSnapshot) {\n const routeConfig = route.routeConfig as Route & {\n [ANALOG_META_KEY]: { endpoint: string; endpointKey: string };\n };\n\n const apiPrefix = injectAPIPrefix();\n const baseUrl = injectBaseURL();\n const { queryParams, fragment: hash, params, parent } = route;\n const segment = parent?.url.map((segment) => segment.path).join('/') || '';\n const url = new URL(\n '',\n import.meta.env['VITE_ANALOG_PUBLIC_BASE_URL'] ||\n baseUrl ||\n (typeof window !== 'undefined' && window.location.origin\n ? window.location.origin\n : ''),\n );\n url.pathname = `${\n url.pathname.endsWith('/') ? url.pathname : url.pathname + '/'\n }${apiPrefix}/_analog${routeConfig[ANALOG_META_KEY].endpoint}`;\n url.search = `${new URLSearchParams(queryParams).toString()}`;\n url.hash = hash ?? '';\n\n Object.keys(params).forEach((param) => {\n url.pathname = url.pathname.replace(`[${param}]`, params[param]);\n });\n url.pathname = url.pathname.replace('**', segment);\n\n return url;\n}\n","import { inject } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport type { Route } from '@angular/router';\nimport { firstValueFrom } from 'rxjs';\n\nimport { RedirectRouteMeta, RouteConfig, RouteMeta } from './models';\nimport { ROUTE_META_TAGS_KEY } from './meta-tags';\nimport { ANALOG_PAGE_ENDPOINTS, ANALOG_META_KEY } from './endpoints';\nimport { injectRouteEndpointURL } from './inject-route-endpoint-url';\n\nexport function toRouteConfig(routeMeta: RouteMeta | undefined): RouteConfig {\n if (routeMeta && isRedirectRouteMeta(routeMeta)) {\n return routeMeta;\n }\n\n let { meta, ...routeConfig } = routeMeta ?? {};\n\n if (Array.isArray(meta)) {\n routeConfig.data = { ...routeConfig.data, [ROUTE_META_TAGS_KEY]: meta };\n } else if (typeof meta === 'function') {\n routeConfig.resolve = {\n ...routeConfig.resolve,\n [ROUTE_META_TAGS_KEY]: meta,\n };\n }\n\n if (!routeConfig) {\n routeConfig = {};\n }\n\n routeConfig.runGuardsAndResolvers =\n routeConfig.runGuardsAndResolvers ?? 'paramsOrQueryParamsChange';\n routeConfig.resolve = {\n ...routeConfig.resolve,\n load: async (route) => {\n const routeConfig = route.routeConfig as Route & {\n [ANALOG_META_KEY]: { endpoint: string; endpointKey: string };\n };\n\n if (ANALOG_PAGE_ENDPOINTS[routeConfig[ANALOG_META_KEY].endpointKey]) {\n const http = inject(HttpClient);\n const url = injectRouteEndpointURL(route);\n\n if (\n !!import.meta.env['VITE_ANALOG_PUBLIC_BASE_URL'] &&\n (globalThis as any).$fetch\n ) {\n return (globalThis as any).$fetch(url.pathname);\n }\n\n return firstValueFrom(http.get(`${url.href}`));\n }\n\n return {};\n },\n };\n\n return routeConfig;\n}\n\nfunction isRedirectRouteMeta(\n routeMeta: RouteMeta,\n): routeMeta is RedirectRouteMeta {\n return !!routeMeta.redirectTo;\n}\n","import { inject } from '@angular/core';\nimport { RouteExport } from './models';\n\ndeclare const Zone: any;\n\n// The Zone is currently enabled by default, so we wouldn't need this check.\n// However, leaving this open space will be useful if zone.js becomes optional\n// in the future. This means we won't have to modify the current code, and it will\n// continue to work seamlessly.\nconst isNgZoneEnabled = typeof Zone !== 'undefined' && !!Zone.root;\n\nexport function toMarkdownModule(\n markdownFileFactory: () => Promise<string>,\n): () => Promise<RouteExport> {\n return async () => {\n const createLoader = () =>\n Promise.all([import('@analogjs/content'), markdownFileFactory()]);\n\n const [\n { parseRawContentFile, MarkdownRouteComponent, ContentRenderer },\n markdownFile,\n ]: [typeof import('@analogjs/content'), string] = await (isNgZoneEnabled\n ? // We are not able to use `runOutsideAngular` because we are not inside\n // an injection context to retrieve the `NgZone` instance.\n // The `Zone.root.run` is required when the code is running in the\n // browser since asynchronous tasks being scheduled in the current context\n // are a reason for unnecessary change detection cycles.\n Zone.root.run(createLoader)\n : createLoader());\n\n const { content, attributes } = parseRawContentFile(markdownFile);\n const { title, meta } = attributes;\n\n return {\n default: MarkdownRouteComponent,\n routeMeta: {\n data: { _analogContent: content },\n title,\n meta,\n resolve: {\n renderedAnalogContent: async () => {\n const contentRenderer = inject(ContentRenderer);\n return contentRenderer.render(content);\n },\n },\n },\n };\n };\n}\n","export const ENDPOINT_EXTENSION = '.server.ts';\nexport const APP_DIR = 'src/app';\n","import type { Route } from '@angular/router';\n\nimport type { RouteExport, RouteMeta } from './models';\nimport { toRouteConfig } from './route-config';\nimport { toMarkdownModule } from './markdown-helpers';\nimport { ENDPOINT_EXTENSION } from './constants';\nimport { ANALOG_META_KEY } from './endpoints';\n\n/**\n * This variable reference is replaced with a glob of all page routes.\n */\nexport let ANALOG_ROUTE_FILES = {};\n\n/**\n * This variable reference is replaced with a glob of all content routes.\n */\nexport let ANALOG_CONTENT_ROUTE_FILES = {};\n\nexport type Files = Record<string, () => Promise<RouteExport | string>>;\n\ntype RawRoute = {\n filename: string | null;\n rawSegment: string;\n ancestorRawSegments: string[];\n segment: string;\n level: number;\n children: RawRoute[];\n};\n\ntype RawRouteMap = Record<string, RawRoute>;\n\ntype RawRouteByLevelMap = Record<number, RawRouteMap>;\n\n/**\n * A function used to parse list of files and create configuration of routes.\n *\n * @param files\n * @returns Array of routes\n */\nexport function createRoutes(files: Files, debug = false): Route[] {\n const filenames = Object.keys(files);\n\n if (filenames.length === 0) {\n return [];\n }\n\n // map filenames to raw routes and group them by level\n const rawRoutesByLevelMap = filenames.reduce((acc, filename) => {\n const rawPath = toRawPath(filename);\n const rawSegments = rawPath.split('/');\n // nesting level starts at 0\n // rawPath: /products => level: 0\n // rawPath: /products/:id => level: 1\n const level = rawSegments.length - 1;\n const rawSegment = rawSegments[level];\n const ancestorRawSegments = rawSegments.slice(0, level);\n\n return {\n ...acc,\n [level]: {\n ...acc[level],\n [rawPath]: {\n filename,\n rawSegment,\n ancestorRawSegments,\n segment: toSegment(rawSegment),\n level,\n children: [],\n },\n },\n };\n }, {} as RawRouteByLevelMap);\n\n const allLevels = Object.keys(rawRoutesByLevelMap).map(Number);\n const maxLevel = Math.max(...allLevels);\n\n // add each raw route to its parent's children array\n for (let level = maxLevel; level > 0; level--) {\n const rawRoutesMap = rawRoutesByLevelMap[level];\n const rawPaths = Object.keys(rawRoutesMap);\n\n for (const rawPath of rawPaths) {\n const rawRoute = rawRoutesMap[rawPath];\n const parentRawPath = rawRoute.ancestorRawSegments.join('/');\n const parentRawSegmentIndex = rawRoute.ancestorRawSegments.length - 1;\n const parentRawSegment =\n rawRoute.ancestorRawSegments[parentRawSegmentIndex];\n\n // create the parent level and/or raw route if it does not exist\n // parent route won't exist for nested routes that don't have a layout route\n rawRoutesByLevelMap[level - 1] ||= {};\n rawRoutesByLevelMap[level - 1][parentRawPath] ||= {\n filename: null,\n rawSegment: parentRawSegment,\n ancestorRawSegments: rawRoute.ancestorRawSegments.slice(\n 0,\n parentRawSegmentIndex,\n ),\n segment: toSegment(parentRawSegment),\n level: level - 1,\n children: [],\n };\n\n rawRoutesByLevelMap[level - 1][parentRawPath].children.push(rawRoute);\n }\n }\n\n // only take raw routes from the root level\n // since they already contain nested routes as their children\n const rootRawRoutesMap = rawRoutesByLevelMap[0];\n const rawRoutes = Object.keys(rootRawRoutesMap).map(\n (segment) => rootRawRoutesMap[segment],\n );\n sortRawRoutes(rawRoutes);\n\n return toRoutes(rawRoutes, files, debug);\n}\n\nfunction toRawPath(filename: string): string {\n return filename\n .replace(\n // convert to relative path and remove file extension\n /^(?:[a-zA-Z]:[\\\\/])?(.*?)[\\\\/](?:routes|pages)[\\\\/]|(?:[\\\\/](?:app[\\\\/](?:routes|pages)[\\\\/]))|(\\.page\\.(js|ts|analog|ag)$)|(\\.(ts|md|analog|ag)$)/g,\n '',\n )\n .replace(/\\[\\.{3}.+\\]/, '**') // [...not-found] => **\n .replace(/\\[([^\\]]+)\\]/g, ':$1'); // [id] => :id\n}\n\nfunction toSegment(rawSegment: string): string {\n return rawSegment\n .replace(/index|\\(.*?\\)/g, '') // replace named empty segments\n .replace(/\\.|\\/+/g, '/') // replace dots with slashes and remove redundant slashes\n .replace(/^\\/+|\\/+$/g, ''); // remove trailing slashes\n}\n\nfunction toRoutes(rawRoutes: RawRoute[], files: Files, debug = false): Route[] {\n const routes: Route[] = [];\n\n for (const rawRoute of rawRoutes) {\n const children: Route[] | undefined =\n rawRoute.children.length > 0\n ? toRoutes(rawRoute.children, files, debug)\n : undefined;\n let module: (() => Promise<RouteExport>) | undefined = undefined;\n let analogMeta: { endpoint: string; endpointKey: string } | undefined =\n undefined;\n\n if (rawRoute.filename) {\n const isMarkdownFile = rawRoute.filename.endsWith('.md');\n\n if (!debug) {\n module = isMarkdownFile\n ? toMarkdownModule(files[rawRoute.filename] as () => Promise<string>)\n : (files[rawRoute.filename] as () => Promise<RouteExport>);\n }\n\n const endpointKey = rawRoute.filename.replace(\n /\\.page\\.(ts|analog|ag)$/,\n ENDPOINT_EXTENSION,\n );\n\n // get endpoint path\n const rawEndpoint = rawRoute.filename\n .replace(/\\.page\\.(ts|analog|ag)$/, '')\n .replace(/\\[\\.{3}.+\\]/, '**') // [...not-found] => **\n .replace(/^(.*?)\\/pages/, '/pages');\n\n // replace periods, remove (index) paths\n const endpoint = (rawEndpoint || '')\n .replace(/\\./g, '/')\n .replace(/\\/\\((.*?)\\)$/, '/-$1-');\n\n analogMeta = {\n endpoint,\n endpointKey,\n };\n }\n\n type DebugRoute = Route & {\n filename?: string | null | undefined;\n isLayout?: boolean;\n };\n\n const route: Route & { meta?: typeof analogMeta } & DebugRoute = module\n ? {\n path: rawRoute.segment,\n loadChildren: () =>\n module!().then((m) => {\n if (import.meta.env.DEV) {\n const hasModuleDefault = !!m.default;\n const hasRedirect = !!m.routeMeta?.redirectTo;\n\n if (!hasModuleDefault && !hasRedirect) {\n console.warn(\n `[Analog] Missing default export at ${rawRoute.filename}`,\n );\n }\n }\n\n return [\n {\n path: '',\n component: m.default,\n ...toRouteConfig(m.routeMeta as RouteMeta | undefined),\n children,\n [ANALOG_META_KEY]: analogMeta,\n },\n ];\n }),\n }\n : {\n path: rawRoute.segment,\n ...(debug\n ? {\n filename: rawRoute.filename ? rawRoute.filename : undefined,\n isLayout: children && children.length > 0 ? true : false,\n }\n : {}),\n children,\n };\n\n routes.push(route);\n }\n\n return routes;\n}\n\nfunction sortRawRoutes(rawRoutes: RawRoute[]): void {\n rawRoutes.sort((a, b) => {\n let segmentA = deprioritizeSegment(a.segment);\n let segmentB = deprioritizeSegment(b.segment);\n\n // prioritize routes with fewer children\n if (a.children.length > b.children.length) {\n segmentA = `~${segmentA}`;\n } else if (a.children.length < b.children.length) {\n segmentB = `~${segmentB}`;\n }\n\n return segmentA > segmentB ? 1 : -1;\n });\n\n for (const rawRoute of rawRoutes) {\n sortRawRoutes(rawRoute.children);\n }\n}\n\nfunction deprioritizeSegment(segment: string): string {\n // deprioritize param and wildcard segments\n return segment.replace(':', '~~').replace('**', '~~~~');\n}\n\nexport const routes: Route[] = createRoutes({\n ...ANALOG_ROUTE_FILES,\n ...ANALOG_CONTENT_ROUTE_FILES,\n});\n","import { inject } from '@angular/core';\nimport { Route as NgRoute, Router } from '@angular/router';\nimport { ActivatedRoute } from '@angular/router';\n\ntype RouteOmitted =\n | 'component'\n | 'loadComponent'\n | 'loadChildren'\n | 'path'\n | 'pathMatch';\n\ntype RestrictedRoute = Omit<NgRoute, RouteOmitted>;\n\n/**\n * @deprecated Use `RouteMeta` type instead.\n * For more info see: https://github.com/analogjs/analog/issues/223\n *\n * Defines additional route config metadata. This\n * object is merged into the route config with\n * the predefined file-based route.\n *\n * @usageNotes\n *\n * ```\n * import { Component } from '@angular/core';\n * import { defineRouteMeta } from '@analogjs/router';\n *\n * export const routeMeta = defineRouteMeta({\n * title: 'Welcome'\n * });\n *\n * @Component({\n * template: `Home`,\n * standalone: true,\n * })\n * export default class HomeComponent {}\n * ```\n *\n * @param route\n * @returns\n */\nexport const defineRouteMeta = (route: RestrictedRoute) => {\n return route;\n};\n\n/**\n * Returns the instance of Angular Router\n *\n * @returns The router\n */\nexport const injectRouter = () => {\n return inject(Router);\n};\n\n/**\n * Returns the instance of the Activate Route for the component\n *\n * @returns The activated route\n */\nexport const injectActivatedRoute = () => {\n return inject(ActivatedRoute);\n};\n","import { isPlatformServer } from '@angular/common';\nimport { HttpHandlerFn, HttpHeaders, HttpRequest } from '@angular/common/http';\nimport { PLATFORM_ID, inject } from '@angular/core';\nimport { injectRequest } from '@analogjs/router/tokens';\n\nexport function cookieInterceptor(\n req: HttpRequest<unknown>,\n next: HttpHandlerFn,\n location = inject(PLATFORM_ID),\n serverRequest = injectRequest(),\n) {\n if (isPlatformServer(location) && req.url.includes('/_analog/')) {\n let headers = new HttpHeaders();\n const cookies = serverRequest?.headers.cookie;\n headers = headers.set('cookie', cookies ?? '');\n\n const cookiedRequest = req.clone({\n headers,\n });\n\n return next(cookiedRequest);\n } else {\n return next(req);\n }\n}\n","import {\n ENVIRONMENT_INITIALIZER,\n EnvironmentProviders,\n makeEnvironmentProviders,\n} from '@angular/core';\nimport { provideRouter, RouterFeatures, ROUTES, Routes } from '@angular/router';\nimport { API_PREFIX } from '@analogjs/router/tokens';\nimport { ɵHTTP_ROOT_INTERCEPTOR_FNS as HTTP_ROOT_INTERCEPTOR_FNS } from '@angular/common/http';\n\nimport { routes } from './routes';\nimport { updateMetaTagsOnRouteChange } from './meta-tags';\nimport { cookieInterceptor } from './cookie-interceptor';\n\ndeclare const ANALOG_API_PREFIX: string;\n\n/**\n * Sets up providers for the Angular router, and registers\n * file-based routes. Additional features can be provided\n * to further configure the behavior of the router.\n *\n * @param features\n * @returns Providers and features to configure the router with routes\n */\nexport function provideFileRouter(\n ...features: RouterFeatures[]\n): EnvironmentProviders {\n const extraRoutesFeature = features.filter((feat) => feat.ɵkind >= 100);\n const routerFeatures = features.filter((feat) => feat.ɵkind < 100);\n\n return makeEnvironmentProviders([\n extraRoutesFeature.map((erf) => erf.ɵproviders),\n provideRouter(routes, ...routerFeatures),\n {\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useValue: () => updateMetaTagsOnRouteChange(),\n },\n {\n provide: HTTP_ROOT_INTERCEPTOR_FNS,\n multi: true,\n useValue: cookieInterceptor,\n },\n {\n provide: API_PREFIX,\n useFactory() {\n return typeof ANALOG_API_PREFIX !== 'undefined'\n ? ANALOG_API_PREFIX\n : 'api';\n },\n },\n ]);\n}\n\n/**\n * Provides extra custom routes in addition to the routes\n * discovered from the filesystem-based routing. These routes are\n * inserted before the filesystem-based routes, and take priority in\n * route matching.\n */\nexport function withExtraRoutes(routes: Routes): RouterFeatures {\n return {\n ɵkind: 100 as number,\n ɵproviders: [{ provide: ROUTES, useValue: routes, multi: true }],\n };\n}\n","import { Injector, inject } from '@angular/core';\nimport { ActivatedRoute, Data } from '@angular/router';\nimport { Observable, map } from 'rxjs';\n\nimport { PageServerLoad } from './route-types';\n\nexport function injectLoad<\n T extends (pageServerLoad: PageServerLoad) => Promise<any>,\n>(options?: { injector?: Injector }): Observable<Awaited<ReturnType<T>>> {\n const injector = options?.injector ?? inject(Injector);\n const route = injector.get(ActivatedRoute);\n\n return route.data.pipe(\n map<Data, Awaited<ReturnType<T>>>((data) => data['load']),\n );\n}\n","import { ActivatedRouteSnapshot } from '@angular/router';\n\n/**\n * Get server load resolver data for the route\n *\n * @param route Provides the route to get server load resolver\n * @returns Returns server load resolver data for the route\n */\nexport async function getLoadResolver<T>(\n route: ActivatedRouteSnapshot,\n): Promise<T> {\n return route.routeConfig?.resolve?.['load']?.(route);\n}\n","import { HttpParams, HttpRequest } from '@angular/common/http';\nimport { StateKey, makeStateKey } from '@angular/core';\n\nfunction sortAndConcatParams(params: HttpParams | URLSearchParams): string {\n return [...params.keys()]\n .sort()\n .map((k) => `${k}=${params.getAll(k)}`)\n .join('&');\n}\n\nexport function makeCacheKey(\n request: HttpRequest<any>,\n mappedRequestUrl: string,\n): StateKey<unknown> {\n // make the params encoded same as a url so it's easy to identify\n const { params, method, responseType } = request;\n const encodedParams = sortAndConcatParams(params);\n\n let serializedBody = request.serializeBody();\n if (serializedBody instanceof URLSearchParams) {\n serializedBody = sortAndConcatParams(serializedBody);\n } else if (typeof serializedBody !== 'string') {\n serializedBody = '';\n }\n\n const key = [\n method,\n responseType,\n mappedRequestUrl,\n serializedBody,\n encodedParams,\n ].join('|');\n\n const hash = generateHash(key);\n\n return makeStateKey(hash);\n}\n\nfunction generateHash(str: string) {\n let hash = 0;\n for (let i = 0, len = str.length; i < len; i++) {\n let chr = str.charCodeAt(i);\n hash = (hash << 5) - hash + chr;\n hash |= 0; // Convert to 32bit integer\n }\n return `${hash}`;\n}\n","import { TransferState, inject, makeStateKey } from '@angular/core';\nimport {\n HttpHandlerFn,\n HttpHeaders,\n HttpRequest,\n HttpResponse,\n} from '@angular/common/http';\n\nimport { from, of } from 'rxjs';\n\nimport { injectBaseURL, injectAPIPrefix } from '@analogjs/router/tokens';\n\nimport { makeCacheKey } from './cache-key';\n\n/**\n * Interceptor that is server-aware when making HttpClient requests.\n * Server-side requests use the full URL\n * Prerendering uses the internal Nitro $fetch function, along with state transfer\n * Client-side requests use the window.location.origin\n *\n * @param req HttpRequest<unknown>\n * @param next HttpHandlerFn\n * @returns\n */\nexport function requestContextInterceptor(\n req: HttpRequest<unknown>,\n next: HttpHandlerFn,\n) {\n const apiPrefix = injectAPIPrefix();\n const baseUrl = injectBaseURL();\n const transferState = inject(TransferState);\n\n // during prerendering with Nitro\n if (\n typeof global !== 'undefined' &&\n global.$fetch &&\n baseUrl &&\n (req.url.startsWith('/') ||\n req.url.startsWith(baseUrl) ||\n req.url.startsWith(`/${apiPrefix}`))\n ) {\n const requestUrl = new URL(req.url, baseUrl);\n const cacheKey = makeCacheKey(req, new URL(requestUrl).pathname);\n const storeKey = makeStateKey<unknown>(`analog_${cacheKey}`);\n const fetchUrl = requestUrl.pathname;\n\n const responseType =\n req.responseType === 'arraybuffer' ? 'arrayBuffer' : req.responseType;\n\n return from(\n global.$fetch\n .raw(fetchUrl, {\n method: req.method as any,\n body: req.body ? req.body : undefined,\n params: requestUrl.searchParams,\n responseType,\n headers: req.headers.keys().reduce((hdrs, current) => {\n return {\n ...hdrs,\n [current]: req.headers.get(current),\n };\n }, {}),\n })\n .then((res) => {\n const cacheResponse = {\n body: res._data,\n headers: new HttpHeaders(res.headers),\n status: 200,\n statusText: 'OK',\n url: fetchUrl,\n };\n const transferResponse = new HttpResponse(cacheResponse);\n\n transferState.set(storeKey, cacheResponse);\n return transferResponse;\n }),\n );\n }\n\n // on the client\n if (\n !import.meta.env.SSR &&\n (req.url.startsWith('/') || req.url.includes('/_analog/'))\n ) {\n // /_analog/ requests are full URLs\n const requestUrl = req.url.includes('/_analog/')\n ? req.url\n : `${window.location.origin}${req.url}`;\n const cacheKey = makeCacheKey(req, new URL(requestUrl).pathname);\n const storeKey = makeStateKey<unknown>(`analog_${cacheKey}`);\n const cacheRestoreResponse = transferState.get(storeKey, null);\n\n if (cacheRestoreResponse) {\n transferState.remove(storeKey);\n return of(new HttpResponse(cacheRestoreResponse));\n }\n\n return next(\n req.clone({\n url: requestUrl,\n }),\n );\n }\n\n // on the server\n if (baseUrl && (req.url.startsWith('/') || req.url.startsWith(baseUrl))) {\n const requestUrl =\n req.url.startsWith(baseUrl) && !req.url.startsWith('/')\n ? req.url\n : `${baseUrl}${req.url}`;\n\n return next(\n req.clone({\n url: requestUrl,\n }),\n );\n }\n\n return next(req);\n}\n","import { Directive, inject, input, output } from '@angular/core';\nimport { ActivatedRoute, Params, Router } from '@angular/router';\n\nimport { injectRouteEndpointURL } from './inject-route-endpoint-url';\n\n@Directive({\n selector: 'form[action],form[method]',\n host: {\n '(submit)': `submitted($event)`,\n },\n standalone: true,\n})\nexport class FormAction {\n action = input<string>('');\n onSuccess = output<unknown>();\n onError = output<unknown>();\n state = output<\n 'submitting' | 'error' | 'redirect' | 'success' | 'navigate'\n >();\n private router = inject(Router);\n private route = inject(ActivatedRoute);\n private path = this._getPath();\n\n submitted($event: { target: HTMLFormElement } & Event) {\n $event.preventDefault();\n\n this.state.emit('submitting');\n const body = new FormData($event.target);\n\n if ($event.target.method.toUpperCase() === 'GET') {\n this._handleGet(body, this.router.url);\n } else {\n this._handlePost(body, this.path, $event);\n }\n }\n\n private _handleGet(body: FormData, path: string) {\n const params: Params = {};\n body.forEach((formVal, formKey) => (params[formKey] = formVal));\n\n this.state.emit('navigate');\n const url = path.split('?')[0];\n this.router.navigate([url], {\n queryParams: params,\n onSameUrlNavigation: 'reload',\n });\n }\n\n private _handlePost(\n body: FormData,\n path: string,\n $event: { target: HTMLFormElement } & Event,\n ) {\n fetch(path, {\n method: $event.target.method,\n body,\n })\n .then((res) => {\n if (res.ok) {\n if (res.redirected) {\n const redirectUrl = new URL(res.url).pathname;\n this.state.emit('redirect');\n this.router.navigate([redirectUrl]);\n } else if (this._isJSON(res.headers.get('Content-type'))) {\n res.json().then((result) => {\n this.onSuccess.emit(result);\n this.state.emit('success');\n });\n } else {\n res.text().then((result) => {\n this.onSuccess.emit(result);\n this.state.emit('success');\n });\n }\n } else {\n if (res.headers.get('X-Analog-Errors')) {\n res.json().then((errors: unknown) => {\n this.onError.emit(errors);\n this.state.emit('error');\n });\n } else {\n this.state.emit('error');\n }\n }\n })\n .catch((_) => {\n this.state.emit('error');\n });\n }\n\n private _getPath() {\n if (this.route) {\n return injectRouteEndpointURL(this.route.snapshot).pathname;\n }\n\n return `/api/_analog/pages${window.location.pathname}`;\n }\n\n private _isJSON(contentType: string | null): boolean {\n const mime = contentType ? contentType.split(';') : [];\n const essence = mime[0];\n\n return essence === 'application/json';\n }\n}\n","import { inject, InjectionToken } from '@angular/core';\nimport { Route } from '@angular/router';\n\nimport {\n ANALOG_CONTENT_ROUTE_FILES,\n ANALOG_ROUTE_FILES,\n createRoutes,\n} from '../routes';\n\nexport const DEBUG_ROUTES = new InjectionToken(\n '@analogjs/router debug routes',\n {\n providedIn: 'root',\n factory() {\n const debugRoutes = createRoutes(\n {\n ...ANALOG_ROUTE_FILES,\n ...ANALOG_CONTENT_ROUTE_FILES,\n },\n true,\n );\n\n return debugRoutes as (Route & DebugRoute)[];\n },\n },\n);\n\nexport type DebugRoute = {\n path: string;\n filename: string;\n isLayout: boolean;\n children?: DebugRoute[];\n};\n\nexport function injectDebugRoutes() {\n return inject(DEBUG_ROUTES);\n}\n","import { ROUTES } from '@angular/router';\n\n/**\n * Provides routes that provide additional\n * pages for displaying and debugging\n * routes.\n */\nexport function withDebugRoutes() {\n const routes = [\n {\n path: '__analog/routes',\n loadComponent: () => import('./debug.page'),\n },\n ];\n\n return {\n ɵkind: 101 as number,\n ɵproviders: [{ provide: ROUTES, useValue: routes, multi: true }],\n };\n}\n","import {\n HttpClient,\n HttpHeaders,\n HttpRequest,\n HttpResponse,\n} from '@angular/common/http';\nimport {\n ChangeDetectionStrategy,\n Component,\n effect,\n inject,\n input,\n makeStateKey,\n output,\n signal,\n TransferState,\n} from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { ActivatedRoute } from '@angular/router';\nimport { injectBaseURL } from '@analogjs/router/tokens';\nimport { catchError, map, of, throwError } from 'rxjs';\n\nimport { makeCacheKey } from './cache-key';\n\ntype ServerProps = Record<string, any>;\ntype ServerOutputs = Record<string, any>;\n\n/**\n * @description\n * Component that defines the bridge between the client and server-only\n * components. The component passes the component ID and props to the server\n * and retrieves the rendered HTML and outputs from the server-only component.\n *\n * Status: experimental\n */\n@Component({\n selector: 'server-only,ServerOnly,Server',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: ` <div [innerHTML]=\"content()\"></div> `,\n})\nexport class ServerOnly {\n component = input.required<string>();\n props = input<ServerProps>();\n outputs = output<ServerOutputs>();\n private http = inject(HttpClient);\n private sanitizer = inject(DomSanitizer);\n protected content = signal<SafeHtml>('');\n private route = inject(ActivatedRoute, { optional: true });\n private baseURL = injectBaseURL();\n private transferState = inject(TransferState);\n\n constructor() {\n effect(() => {\n const routeComponentId: string | undefined =\n this.route?.snapshot.data['component'];\n const props = this.props() || {};\n const componentId = routeComponentId || this.component();\n\n const headers = new HttpHeaders(\n new Headers({\n 'Content-type': 'application/json',\n 'X-Analog-Component': componentId,\n }),\n );\n\n const componentUrl = this.getComponentUrl(componentId);\n const httpRequest = new HttpRequest('POST', componentUrl, props, {\n headers,\n });\n const cacheKey = makeCacheKey(\n httpRequest,\n new URL(componentUrl).pathname,\n );\n const storeKey = makeStateKey<{ html: string; outputs: ServerOutputs }>(\n cacheKey,\n );\n const componentState = this.transferState.get<{\n html: string;\n outputs: ServerOutputs;\n } | null>(storeKey, null);\n\n if (componentState) {\n this.updateContent(componentState);\n this.transferState.remove(storeKey);\n } else {\n this.http\n .request(httpRequest)\n .pipe(\n map((response) => {\n if (response instanceof HttpResponse) {\n if (import.meta.env.SSR) {\n this.transferState.set(storeKey, response.body);\n }\n\n return response.body as {\n html: string;\n outputs: ServerOutputs;\n };\n }\n return throwError(\n () => ({}) as { html: string; outputs: ServerOutputs },\n );\n }),\n catchError((error: unknown) => {\n console.log(error);\n return of({\n html: '',\n outputs: {} as ServerOutputs,\n });\n }),\n )\n .subscribe((content) =>\n this.updateContent(\n content as { html: string; outputs: ServerOutputs },\n ),\n );\n }\n });\n }\n\n updateContent(content: { html: string; outputs: ServerOutputs }) {\n this.content.set(this.sanitizer.bypassSecurityTrustHtml(content.html));\n this.outputs.emit(content.outputs);\n }\n\n getComponentUrl(componentId: string) {\n let baseURL = this.baseURL;\n\n if (!baseURL && typeof window !== 'undefined') {\n baseURL = window.location.origin;\n }\n\n return `${baseURL}/_analog/components/${componentId}`;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["HTTP_ROOT_INTERCEPTOR_FNS"],"mappings":";;;;;;;;;;AAKO,MAAM,mBAAmB,GAAG,MAAM,CACvC,sCAAsC,CACvC;AAED,MAAM,WAAW,GAAG,SAAS;AAC7B,MAAM,cAAc,GAAG,WAAW;AAClC;AACA,MAAM,uBAAuB,GAAG,YAAY;AAC5C,MAAM,QAAQ,GAAG,MAAM;AACvB,MAAM,YAAY,GAAG,UAAU;AAC/B,MAAM,WAAW,GAAG,SAAS;SA8Bb,2BAA2B,GAAA;AACzC,IAAA,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAC7B,IAAA,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC;AAEhC,IAAA,MAAM,CAAC;AACJ,SAAA,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,KAAK,KAAK,YAAY,aAAa,CAAC;SACtD,SAAS,CAAC,MAAK;AACd,QAAA,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC;AAElE,QAAA,KAAK,MAAM,eAAe,IAAI,UAAU,EAAE;AACxC,YAAA,MAAM,OAAO,GAAG,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A,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,aAAA,EAAA,IAAA,EAAA,UAAU,iYAFX,CAAuC,qCAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;gGAEtC,UAAU,EAAA,UAAA,EAAA,CAAA;kBALtB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,+BAA+B;oBACzC,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,QAAQ,EAAE,CAAuC,qCAAA,CAAA;AAClD,iBAAA;;;ACvCD;;AAEG;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -1,16 +1,265 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { Type, EnvironmentProviders, Injector } from '@angular/core';
|
|
3
|
+
import * as _angular_router from '@angular/router';
|
|
4
|
+
import { Route, ActivatedRoute, Router, CanActivateFn, DeprecatedGuard, CanActivateChildFn, CanDeactivateFn, CanMatchFn, ResolveFn, RouterFeatures, Routes, ActivatedRouteSnapshot } from '@angular/router';
|
|
5
|
+
import { H3EventContext, H3Event } from 'h3';
|
|
6
|
+
import { $Fetch } from 'nitropack';
|
|
7
|
+
import * as rxjs from 'rxjs';
|
|
8
|
+
import { Observable } from 'rxjs';
|
|
9
|
+
import * as _angular_common_module_d_yNBsZ8gb from '@angular/common/module.d-yNBsZ8gb';
|
|
10
|
+
import { HttpRequest, HttpHandlerFn } from '@angular/common/http';
|
|
11
|
+
import { SafeHtml } from '@angular/platform-browser';
|
|
12
|
+
|
|
13
|
+
type RouteOmitted = 'component' | 'loadComponent' | 'loadChildren' | 'path' | 'pathMatch';
|
|
14
|
+
type RestrictedRoute = Omit<Route, RouteOmitted>;
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Use `RouteMeta` type instead.
|
|
17
|
+
* For more info see: https://github.com/analogjs/analog/issues/223
|
|
18
|
+
*
|
|
19
|
+
* Defines additional route config metadata. This
|
|
20
|
+
* object is merged into the route config with
|
|
21
|
+
* the predefined file-based route.
|
|
22
|
+
*
|
|
23
|
+
* @usageNotes
|
|
24
|
+
*
|
|
25
|
+
* ```
|
|
26
|
+
* import { Component } from '@angular/core';
|
|
27
|
+
* import { defineRouteMeta } from '@analogjs/router';
|
|
28
|
+
*
|
|
29
|
+
* export const routeMeta = defineRouteMeta({
|
|
30
|
+
* title: 'Welcome'
|
|
31
|
+
* });
|
|
32
|
+
*
|
|
33
|
+
* @Component({
|
|
34
|
+
* template: `Home`,
|
|
35
|
+
* standalone: true,
|
|
36
|
+
* })
|
|
37
|
+
* export default class HomeComponent {}
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @param route
|
|
41
|
+
* @returns
|
|
42
|
+
*/
|
|
43
|
+
declare const defineRouteMeta: (route: RestrictedRoute) => RestrictedRoute;
|
|
44
|
+
/**
|
|
45
|
+
* Returns the instance of Angular Router
|
|
46
|
+
*
|
|
47
|
+
* @returns The router
|
|
48
|
+
*/
|
|
49
|
+
declare const injectRouter: () => Router;
|
|
50
|
+
/**
|
|
51
|
+
* Returns the instance of the Activate Route for the component
|
|
52
|
+
*
|
|
53
|
+
* @returns The activated route
|
|
54
|
+
*/
|
|
55
|
+
declare const injectActivatedRoute: () => ActivatedRoute;
|
|
56
|
+
|
|
57
|
+
declare const CHARSET_KEY = "charset";
|
|
58
|
+
declare const HTTP_EQUIV_KEY = "httpEquiv";
|
|
59
|
+
declare const NAME_KEY = "name";
|
|
60
|
+
declare const PROPERTY_KEY = "property";
|
|
61
|
+
declare const CONTENT_KEY = "content";
|
|
62
|
+
type MetaTag = (CharsetMetaTag & ExcludeRestMetaTagKeys<typeof CHARSET_KEY>) | (HttpEquivMetaTag & ExcludeRestMetaTagKeys<typeof HTTP_EQUIV_KEY>) | (NameMetaTag & ExcludeRestMetaTagKeys<typeof NAME_KEY>) | (PropertyMetaTag & ExcludeRestMetaTagKeys<typeof PROPERTY_KEY>);
|
|
63
|
+
type CharsetMetaTag = {
|
|
64
|
+
[CHARSET_KEY]: string;
|
|
65
|
+
};
|
|
66
|
+
type HttpEquivMetaTag = {
|
|
67
|
+
[HTTP_EQUIV_KEY]: string;
|
|
68
|
+
[CONTENT_KEY]: string;
|
|
69
|
+
};
|
|
70
|
+
type NameMetaTag = {
|
|
71
|
+
[NAME_KEY]: string;
|
|
72
|
+
[CONTENT_KEY]: string;
|
|
73
|
+
};
|
|
74
|
+
type PropertyMetaTag = {
|
|
75
|
+
[PROPERTY_KEY]: string;
|
|
76
|
+
[CONTENT_KEY]: string;
|
|
77
|
+
};
|
|
78
|
+
type MetaTagKey = typeof CHARSET_KEY | typeof HTTP_EQUIV_KEY | typeof NAME_KEY | typeof PROPERTY_KEY;
|
|
79
|
+
type ExcludeRestMetaTagKeys<Key extends MetaTagKey> = {
|
|
80
|
+
[K in Exclude<MetaTagKey, Key>]?: never;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
type OmittedRouteProps = 'path' | 'matcher' | 'component' | 'loadComponent' | 'children' | 'loadChildren' | 'canLoad' | 'outlet';
|
|
84
|
+
interface DefaultRouteMeta extends Omit<Route, OmittedRouteProps | keyof RedirectRouteMeta> {
|
|
85
|
+
canActivate?: CanActivateFn[] | DeprecatedGuard[];
|
|
86
|
+
canActivateChild?: CanActivateChildFn[];
|
|
87
|
+
canDeactivate?: CanDeactivateFn<unknown>[];
|
|
88
|
+
canMatch?: CanMatchFn[];
|
|
89
|
+
resolve?: {
|
|
90
|
+
[key: string | symbol]: ResolveFn<unknown>;
|
|
91
|
+
};
|
|
92
|
+
title?: string | ResolveFn<string>;
|
|
93
|
+
meta?: MetaTag[] | ResolveFn<MetaTag[]>;
|
|
94
|
+
}
|
|
95
|
+
interface RedirectRouteMeta {
|
|
96
|
+
redirectTo: string;
|
|
97
|
+
pathMatch?: Route['pathMatch'];
|
|
98
|
+
}
|
|
99
|
+
type RouteMeta = (DefaultRouteMeta & {
|
|
100
|
+
redirectTo?: never;
|
|
101
|
+
}) | RedirectRouteMeta;
|
|
102
|
+
type RouteExport = {
|
|
103
|
+
default: Type<unknown>;
|
|
104
|
+
routeMeta?: RouteMeta | ReturnType<typeof defineRouteMeta>;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
type Files = Record<string, () => Promise<RouteExport | string>>;
|
|
108
|
+
/**
|
|
109
|
+
* A function used to parse list of files and create configuration of routes.
|
|
110
|
+
*
|
|
111
|
+
* @param files
|
|
112
|
+
* @returns Array of routes
|
|
113
|
+
*/
|
|
114
|
+
declare function createRoutes(files: Files, debug?: boolean): Route[];
|
|
115
|
+
declare const routes: Route[];
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Sets up providers for the Angular router, and registers
|
|
119
|
+
* file-based routes. Additional features can be provided
|
|
120
|
+
* to further configure the behavior of the router.
|
|
121
|
+
*
|
|
122
|
+
* @param features
|
|
123
|
+
* @returns Providers and features to configure the router with routes
|
|
124
|
+
*/
|
|
125
|
+
declare function provideFileRouter(...features: RouterFeatures[]): EnvironmentProviders;
|
|
126
|
+
/**
|
|
127
|
+
* Provides extra custom routes in addition to the routes
|
|
128
|
+
* discovered from the filesystem-based routing. These routes are
|
|
129
|
+
* inserted before the filesystem-based routes, and take priority in
|
|
130
|
+
* route matching.
|
|
131
|
+
*/
|
|
132
|
+
declare function withExtraRoutes(routes: Routes): RouterFeatures;
|
|
133
|
+
|
|
134
|
+
type PageServerLoad = {
|
|
135
|
+
params: H3EventContext['params'];
|
|
136
|
+
req: H3Event['node']['req'];
|
|
137
|
+
res: H3Event['node']['res'];
|
|
138
|
+
fetch: $Fetch;
|
|
139
|
+
event: H3Event;
|
|
140
|
+
};
|
|
141
|
+
type LoadResult<A extends (pageServerLoad: PageServerLoad) => Promise<any>> = Awaited<ReturnType<A>>;
|
|
142
|
+
|
|
143
|
+
declare function injectLoad<T extends (pageServerLoad: PageServerLoad) => Promise<any>>(options?: {
|
|
144
|
+
injector?: Injector;
|
|
145
|
+
}): Observable<Awaited<ReturnType<T>>>;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Get server load resolver data for the route
|
|
149
|
+
*
|
|
150
|
+
* @param route Provides the route to get server load resolver
|
|
151
|
+
* @returns Returns server load resolver data for the route
|
|
152
|
+
*/
|
|
153
|
+
declare function getLoadResolver<T>(route: ActivatedRouteSnapshot): Promise<T>;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Interceptor that is server-aware when making HttpClient requests.
|
|
157
|
+
* Server-side requests use the full URL
|
|
158
|
+
* Prerendering uses the internal Nitro $fetch function, along with state transfer
|
|
159
|
+
* Client-side requests use the window.location.origin
|
|
160
|
+
*
|
|
161
|
+
* @param req HttpRequest<unknown>
|
|
162
|
+
* @param next HttpHandlerFn
|
|
163
|
+
* @returns
|
|
164
|
+
*/
|
|
165
|
+
declare function requestContextInterceptor(req: HttpRequest<unknown>, next: HttpHandlerFn): rxjs.Observable<_angular_common_module_d_yNBsZ8gb.HttpEvent<unknown>>;
|
|
166
|
+
|
|
167
|
+
declare function injectRouteEndpointURL(route: ActivatedRouteSnapshot): URL;
|
|
168
|
+
|
|
169
|
+
declare class FormAction {
|
|
170
|
+
action: _angular_core.InputSignal<string>;
|
|
171
|
+
onSuccess: _angular_core.OutputEmitterRef<unknown>;
|
|
172
|
+
onError: _angular_core.OutputEmitterRef<unknown>;
|
|
173
|
+
state: _angular_core.OutputEmitterRef<"error" | "redirect" | "submitting" | "success" | "navigate">;
|
|
174
|
+
private router;
|
|
175
|
+
private route;
|
|
176
|
+
private path;
|
|
177
|
+
submitted($event: {
|
|
178
|
+
target: HTMLFormElement;
|
|
179
|
+
} & Event): void;
|
|
180
|
+
private _handleGet;
|
|
181
|
+
private _handlePost;
|
|
182
|
+
private _getPath;
|
|
183
|
+
private _isJSON;
|
|
184
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormAction, never>;
|
|
185
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FormAction, "form[action],form[method]", never, { "action": { "alias": "action"; "required": false; "isSignal": true; }; }, { "onSuccess": "onSuccess"; "onError": "onError"; "state": "state"; }, never, never, true, never>;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
type DebugRoute = {
|
|
189
|
+
path: string;
|
|
190
|
+
filename: string;
|
|
191
|
+
isLayout: boolean;
|
|
192
|
+
children?: DebugRoute[];
|
|
193
|
+
};
|
|
194
|
+
declare function injectDebugRoutes(): (Route & DebugRoute)[];
|
|
195
|
+
|
|
196
|
+
type CollectedRoute = {
|
|
197
|
+
path: string;
|
|
198
|
+
filename: string;
|
|
199
|
+
file: string;
|
|
200
|
+
isLayout: boolean;
|
|
201
|
+
};
|
|
202
|
+
declare class DebugRoutesComponent {
|
|
203
|
+
collectedRoutes: CollectedRoute[];
|
|
204
|
+
debugRoutes: (_angular_router.Route & DebugRoute)[];
|
|
205
|
+
ngOnInit(): void;
|
|
206
|
+
traverseRoutes(routes: DebugRoute[], parent?: string): void;
|
|
207
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DebugRoutesComponent, never>;
|
|
208
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DebugRoutesComponent, "analogjs-debug-routes-page", never, {}, {}, never, never, true, never>;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
declare namespace __debug_page {
|
|
212
|
+
export {
|
|
213
|
+
DebugRoutesComponent as default,
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Provides routes that provide additional
|
|
219
|
+
* pages for displaying and debugging
|
|
220
|
+
* routes.
|
|
221
|
+
*/
|
|
222
|
+
declare function withDebugRoutes(): {
|
|
223
|
+
ɵkind: number;
|
|
224
|
+
ɵproviders: {
|
|
225
|
+
provide: _angular_core.InjectionToken<_angular_router.Route[][]>;
|
|
226
|
+
useValue: {
|
|
227
|
+
path: string;
|
|
228
|
+
loadComponent: () => Promise<typeof __debug_page>;
|
|
229
|
+
}[];
|
|
230
|
+
multi: boolean;
|
|
231
|
+
}[];
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
type ServerProps = Record<string, any>;
|
|
235
|
+
type ServerOutputs = Record<string, any>;
|
|
236
|
+
/**
|
|
237
|
+
* @description
|
|
238
|
+
* Component that defines the bridge between the client and server-only
|
|
239
|
+
* components. The component passes the component ID and props to the server
|
|
240
|
+
* and retrieves the rendered HTML and outputs from the server-only component.
|
|
241
|
+
*
|
|
242
|
+
* Status: experimental
|
|
243
|
+
*/
|
|
244
|
+
declare class ServerOnly {
|
|
245
|
+
component: _angular_core.InputSignal<string>;
|
|
246
|
+
props: _angular_core.InputSignal<ServerProps | undefined>;
|
|
247
|
+
outputs: _angular_core.OutputEmitterRef<ServerOutputs>;
|
|
248
|
+
private http;
|
|
249
|
+
private sanitizer;
|
|
250
|
+
protected content: _angular_core.WritableSignal<SafeHtml>;
|
|
251
|
+
private route;
|
|
252
|
+
private baseURL;
|
|
253
|
+
private transferState;
|
|
254
|
+
constructor();
|
|
255
|
+
updateContent(content: {
|
|
256
|
+
html: string;
|
|
257
|
+
outputs: ServerOutputs;
|
|
258
|
+
}): void;
|
|
259
|
+
getComponentUrl(componentId: string): string;
|
|
260
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ServerOnly, never>;
|
|
261
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ServerOnly, "server-only,ServerOnly,Server", never, { "component": { "alias": "component"; "required": true; "isSignal": true; }; "props": { "alias": "props"; "required": false; "isSignal": true; }; }, { "outputs": "outputs"; }, never, never, true, never>;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export { FormAction, ServerOnly, createRoutes, defineRouteMeta, getLoadResolver, injectActivatedRoute, injectDebugRoutes, injectLoad, injectRouteEndpointURL, injectRouter, provideFileRouter, requestContextInterceptor, routes, withDebugRoutes, withExtraRoutes };
|
|
265
|
+
export type { Files, LoadResult, MetaTag, PageServerLoad, RouteExport, RouteMeta };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@analogjs/router",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.13",
|
|
4
4
|
"description": "Filesystem-based routing for Angular",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Brandon Roberts <robertsbt@gmail.com>",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"url": "https://github.com/sponsors/brandonroberts"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@analogjs/content": "^2.0.0-alpha.
|
|
27
|
+
"@analogjs/content": "^2.0.0-alpha.13",
|
|
28
28
|
"@angular/core": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
29
29
|
"@angular/router": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
30
30
|
},
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
import { H3EventContext, H3Event } from 'h3';
|
|
2
|
+
import { $Fetch } from 'nitropack';
|
|
3
|
+
|
|
4
|
+
type PageServerAction = {
|
|
5
|
+
params: H3EventContext['params'];
|
|
6
|
+
req: H3Event['node']['req'];
|
|
7
|
+
res: H3Event['node']['res'];
|
|
8
|
+
fetch: $Fetch;
|
|
9
|
+
event: H3Event;
|
|
10
|
+
};
|
|
11
|
+
declare function fail<T = object>(status: number, errors: T): Response;
|
|
12
|
+
declare function json<T = object>(data: T, config?: ResponseInit): Response;
|
|
13
|
+
declare function redirect(url: string, config?: number | ResponseInit): Response;
|
|
14
|
+
|
|
15
|
+
export { fail, json, redirect };
|
|
16
|
+
export type { PageServerAction };
|
package/server/index.d.ts
CHANGED
|
@@ -1,4 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { StaticProvider, ApplicationConfig, Type, Provider } from '@angular/core';
|
|
2
|
+
import { ServerRequest, ServerResponse, ServerContext } from '@analogjs/router/tokens';
|
|
3
|
+
|
|
4
|
+
declare function provideServerContext({ req, res, }: {
|
|
5
|
+
req: ServerRequest;
|
|
6
|
+
res: ServerResponse;
|
|
7
|
+
}): StaticProvider[];
|
|
8
|
+
|
|
9
|
+
declare function injectStaticProps(): Record<string, any>;
|
|
10
|
+
declare function injectStaticOutputs<T>(): {
|
|
11
|
+
set(data: T): void;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
declare function serverComponentRequest(serverContext: ServerContext): string | undefined;
|
|
15
|
+
declare function renderServerComponent(url: string, serverContext: ServerContext, config?: ApplicationConfig): Promise<Response>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Returns a function that accepts the navigation URL,
|
|
19
|
+
* the root HTML, and server context.
|
|
20
|
+
*
|
|
21
|
+
* @param rootComponent
|
|
22
|
+
* @param config
|
|
23
|
+
* @param platformProviders
|
|
24
|
+
* @returns Promise<string | Reponse>
|
|
25
|
+
*/
|
|
26
|
+
declare function render(rootComponent: Type<unknown>, config: ApplicationConfig, platformProviders?: Provider[]): (url: string, document: string, serverContext: ServerContext) => Promise<string | Response>;
|
|
27
|
+
|
|
28
|
+
export { injectStaticOutputs, injectStaticProps, provideServerContext, render, renderServerComponent, serverComponentRequest };
|
package/tokens/index.d.ts
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import { IncomingMessage, ServerResponse as ServerResponse$1 } from 'node:http';
|
|
3
|
+
|
|
4
|
+
type ServerRequest = IncomingMessage & {
|
|
4
5
|
originalUrl: string;
|
|
5
6
|
};
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
type ServerResponse = ServerResponse$1;
|
|
8
|
+
type ServerContext = {
|
|
8
9
|
req: ServerRequest;
|
|
9
10
|
res: ServerResponse;
|
|
10
11
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
declare const REQUEST: InjectionToken<ServerRequest>;
|
|
13
|
+
declare const RESPONSE: InjectionToken<ServerResponse>;
|
|
14
|
+
declare const BASE_URL: InjectionToken<string>;
|
|
15
|
+
declare const API_PREFIX: InjectionToken<string>;
|
|
16
|
+
declare function injectRequest(): ServerRequest | null;
|
|
17
|
+
declare function injectResponse(): ServerResponse | null;
|
|
18
|
+
declare function injectBaseURL(): string | null;
|
|
19
|
+
declare function injectAPIPrefix(): string;
|
|
20
|
+
|
|
21
|
+
export { API_PREFIX, BASE_URL, REQUEST, RESPONSE, injectAPIPrefix, injectBaseURL, injectRequest, injectResponse };
|
|
22
|
+
export type { ServerContext, ServerRequest, ServerResponse };
|
package/lib/cache-key.d.ts
DELETED
package/lib/constants.d.ts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { HttpHandlerFn, HttpRequest } from '@angular/common/http';
|
|
2
|
-
export declare function cookieInterceptor(req: HttpRequest<unknown>, next: HttpHandlerFn, location?: Object, serverRequest?: import("@analogjs/router/tokens").ServerRequest | null): import("rxjs").Observable<import("@angular/common/http").HttpEvent<unknown>>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { DebugRoute } from './routes';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
type CollectedRoute = {
|
|
4
|
-
path: string;
|
|
5
|
-
filename: string;
|
|
6
|
-
file: string;
|
|
7
|
-
isLayout: boolean;
|
|
8
|
-
};
|
|
9
|
-
export default class DebugRoutesComponent {
|
|
10
|
-
collectedRoutes: CollectedRoute[];
|
|
11
|
-
debugRoutes: (import("@angular/router").Route & DebugRoute)[];
|
|
12
|
-
ngOnInit(): void;
|
|
13
|
-
traverseRoutes(routes: DebugRoute[], parent?: string): void;
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DebugRoutesComponent, never>;
|
|
15
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DebugRoutesComponent, "analogjs-debug-routes-page", never, {}, {}, never, never, true, never>;
|
|
16
|
-
}
|
|
17
|
-
export {};
|
package/lib/debug/index.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Provides routes that provide additional
|
|
3
|
-
* pages for displaying and debugging
|
|
4
|
-
* routes.
|
|
5
|
-
*/
|
|
6
|
-
export declare function withDebugRoutes(): {
|
|
7
|
-
ɵkind: number;
|
|
8
|
-
ɵproviders: {
|
|
9
|
-
provide: import("@angular/core").InjectionToken<import("@angular/router").Route[][]>;
|
|
10
|
-
useValue: {
|
|
11
|
-
path: string;
|
|
12
|
-
loadComponent: () => Promise<typeof import("./debug.page")>;
|
|
13
|
-
}[];
|
|
14
|
-
multi: boolean;
|
|
15
|
-
}[];
|
|
16
|
-
};
|
package/lib/debug/routes.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { Route } from '@angular/router';
|
|
3
|
-
export declare const DEBUG_ROUTES: InjectionToken<(Route & DebugRoute)[]>;
|
|
4
|
-
export type DebugRoute = {
|
|
5
|
-
path: string;
|
|
6
|
-
filename: string;
|
|
7
|
-
isLayout: boolean;
|
|
8
|
-
children?: DebugRoute[];
|
|
9
|
-
};
|
|
10
|
-
export declare function injectDebugRoutes(): (Route & DebugRoute)[];
|
package/lib/define-route.d.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { Route as NgRoute, Router } from '@angular/router';
|
|
2
|
-
import { ActivatedRoute } from '@angular/router';
|
|
3
|
-
type RouteOmitted = 'component' | 'loadComponent' | 'loadChildren' | 'path' | 'pathMatch';
|
|
4
|
-
type RestrictedRoute = Omit<NgRoute, RouteOmitted>;
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated Use `RouteMeta` type instead.
|
|
7
|
-
* For more info see: https://github.com/analogjs/analog/issues/223
|
|
8
|
-
*
|
|
9
|
-
* Defines additional route config metadata. This
|
|
10
|
-
* object is merged into the route config with
|
|
11
|
-
* the predefined file-based route.
|
|
12
|
-
*
|
|
13
|
-
* @usageNotes
|
|
14
|
-
*
|
|
15
|
-
* ```
|
|
16
|
-
* import { Component } from '@angular/core';
|
|
17
|
-
* import { defineRouteMeta } from '@analogjs/router';
|
|
18
|
-
*
|
|
19
|
-
* export const routeMeta = defineRouteMeta({
|
|
20
|
-
* title: 'Welcome'
|
|
21
|
-
* });
|
|
22
|
-
*
|
|
23
|
-
* @Component({
|
|
24
|
-
* template: `Home`,
|
|
25
|
-
* standalone: true,
|
|
26
|
-
* })
|
|
27
|
-
* export default class HomeComponent {}
|
|
28
|
-
* ```
|
|
29
|
-
*
|
|
30
|
-
* @param route
|
|
31
|
-
* @returns
|
|
32
|
-
*/
|
|
33
|
-
export declare const defineRouteMeta: (route: RestrictedRoute) => RestrictedRoute;
|
|
34
|
-
/**
|
|
35
|
-
* Returns the instance of Angular Router
|
|
36
|
-
*
|
|
37
|
-
* @returns The router
|
|
38
|
-
*/
|
|
39
|
-
export declare const injectRouter: () => Router;
|
|
40
|
-
/**
|
|
41
|
-
* Returns the instance of the Activate Route for the component
|
|
42
|
-
*
|
|
43
|
-
* @returns The activated route
|
|
44
|
-
*/
|
|
45
|
-
export declare const injectActivatedRoute: () => ActivatedRoute;
|
|
46
|
-
export {};
|
package/lib/endpoints.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class FormAction {
|
|
3
|
-
action: import("@angular/core").InputSignal<string>;
|
|
4
|
-
onSuccess: import("@angular/core").OutputEmitterRef<unknown>;
|
|
5
|
-
onError: import("@angular/core").OutputEmitterRef<unknown>;
|
|
6
|
-
state: import("@angular/core").OutputEmitterRef<"error" | "redirect" | "submitting" | "success" | "navigate">;
|
|
7
|
-
private router;
|
|
8
|
-
private route;
|
|
9
|
-
private path;
|
|
10
|
-
submitted($event: {
|
|
11
|
-
target: HTMLFormElement;
|
|
12
|
-
} & Event): void;
|
|
13
|
-
private _handleGet;
|
|
14
|
-
private _handlePost;
|
|
15
|
-
private _getPath;
|
|
16
|
-
private _isJSON;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FormAction, never>;
|
|
18
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<FormAction, "form[action],form[method]", never, { "action": { "alias": "action"; "required": false; "isSignal": true; }; }, { "onSuccess": "onSuccess"; "onError": "onError"; "state": "state"; }, never, never, true, never>;
|
|
19
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ActivatedRouteSnapshot } from '@angular/router';
|
|
2
|
-
/**
|
|
3
|
-
* Get server load resolver data for the route
|
|
4
|
-
*
|
|
5
|
-
* @param route Provides the route to get server load resolver
|
|
6
|
-
* @returns Returns server load resolver data for the route
|
|
7
|
-
*/
|
|
8
|
-
export declare function getLoadResolver<T>(route: ActivatedRouteSnapshot): Promise<T>;
|
package/lib/inject-load.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Injector } from '@angular/core';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { PageServerLoad } from './route-types';
|
|
4
|
-
export declare function injectLoad<T extends (pageServerLoad: PageServerLoad) => Promise<any>>(options?: {
|
|
5
|
-
injector?: Injector;
|
|
6
|
-
}): Observable<Awaited<ReturnType<T>>>;
|
package/lib/meta-tags.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export declare const ROUTE_META_TAGS_KEY: unique symbol;
|
|
2
|
-
declare const CHARSET_KEY = "charset";
|
|
3
|
-
declare const HTTP_EQUIV_KEY = "httpEquiv";
|
|
4
|
-
declare const NAME_KEY = "name";
|
|
5
|
-
declare const PROPERTY_KEY = "property";
|
|
6
|
-
declare const CONTENT_KEY = "content";
|
|
7
|
-
export type MetaTag = (CharsetMetaTag & ExcludeRestMetaTagKeys<typeof CHARSET_KEY>) | (HttpEquivMetaTag & ExcludeRestMetaTagKeys<typeof HTTP_EQUIV_KEY>) | (NameMetaTag & ExcludeRestMetaTagKeys<typeof NAME_KEY>) | (PropertyMetaTag & ExcludeRestMetaTagKeys<typeof PROPERTY_KEY>);
|
|
8
|
-
type CharsetMetaTag = {
|
|
9
|
-
[CHARSET_KEY]: string;
|
|
10
|
-
};
|
|
11
|
-
type HttpEquivMetaTag = {
|
|
12
|
-
[HTTP_EQUIV_KEY]: string;
|
|
13
|
-
[CONTENT_KEY]: string;
|
|
14
|
-
};
|
|
15
|
-
type NameMetaTag = {
|
|
16
|
-
[NAME_KEY]: string;
|
|
17
|
-
[CONTENT_KEY]: string;
|
|
18
|
-
};
|
|
19
|
-
type PropertyMetaTag = {
|
|
20
|
-
[PROPERTY_KEY]: string;
|
|
21
|
-
[CONTENT_KEY]: string;
|
|
22
|
-
};
|
|
23
|
-
type MetaTagKey = typeof CHARSET_KEY | typeof HTTP_EQUIV_KEY | typeof NAME_KEY | typeof PROPERTY_KEY;
|
|
24
|
-
type ExcludeRestMetaTagKeys<Key extends MetaTagKey> = {
|
|
25
|
-
[K in Exclude<MetaTagKey, Key>]?: never;
|
|
26
|
-
};
|
|
27
|
-
export declare function updateMetaTagsOnRouteChange(): void;
|
|
28
|
-
export {};
|
package/lib/models.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Type } from '@angular/core';
|
|
2
|
-
import { CanActivateChildFn, CanActivateFn, CanDeactivateFn, CanMatchFn, DeprecatedGuard, ResolveFn, Route } from '@angular/router';
|
|
3
|
-
import { defineRouteMeta } from './define-route';
|
|
4
|
-
import { MetaTag } from './meta-tags';
|
|
5
|
-
type OmittedRouteProps = 'path' | 'matcher' | 'component' | 'loadComponent' | 'children' | 'loadChildren' | 'canLoad' | 'outlet';
|
|
6
|
-
export type RouteConfig = Omit<Route, OmittedRouteProps>;
|
|
7
|
-
export interface DefaultRouteMeta extends Omit<Route, OmittedRouteProps | keyof RedirectRouteMeta> {
|
|
8
|
-
canActivate?: CanActivateFn[] | DeprecatedGuard[];
|
|
9
|
-
canActivateChild?: CanActivateChildFn[];
|
|
10
|
-
canDeactivate?: CanDeactivateFn<unknown>[];
|
|
11
|
-
canMatch?: CanMatchFn[];
|
|
12
|
-
resolve?: {
|
|
13
|
-
[key: string | symbol]: ResolveFn<unknown>;
|
|
14
|
-
};
|
|
15
|
-
title?: string | ResolveFn<string>;
|
|
16
|
-
meta?: MetaTag[] | ResolveFn<MetaTag[]>;
|
|
17
|
-
}
|
|
18
|
-
export interface RedirectRouteMeta {
|
|
19
|
-
redirectTo: string;
|
|
20
|
-
pathMatch?: Route['pathMatch'];
|
|
21
|
-
}
|
|
22
|
-
export type RouteMeta = (DefaultRouteMeta & {
|
|
23
|
-
redirectTo?: never;
|
|
24
|
-
}) | RedirectRouteMeta;
|
|
25
|
-
export type RouteExport = {
|
|
26
|
-
default: Type<unknown>;
|
|
27
|
-
routeMeta?: RouteMeta | ReturnType<typeof defineRouteMeta>;
|
|
28
|
-
};
|
|
29
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { EnvironmentProviders } from '@angular/core';
|
|
2
|
-
import { RouterFeatures, Routes } from '@angular/router';
|
|
3
|
-
/**
|
|
4
|
-
* Sets up providers for the Angular router, and registers
|
|
5
|
-
* file-based routes. Additional features can be provided
|
|
6
|
-
* to further configure the behavior of the router.
|
|
7
|
-
*
|
|
8
|
-
* @param features
|
|
9
|
-
* @returns Providers and features to configure the router with routes
|
|
10
|
-
*/
|
|
11
|
-
export declare function provideFileRouter(...features: RouterFeatures[]): EnvironmentProviders;
|
|
12
|
-
/**
|
|
13
|
-
* Provides extra custom routes in addition to the routes
|
|
14
|
-
* discovered from the filesystem-based routing. These routes are
|
|
15
|
-
* inserted before the filesystem-based routes, and take priority in
|
|
16
|
-
* route matching.
|
|
17
|
-
*/
|
|
18
|
-
export declare function withExtraRoutes(routes: Routes): RouterFeatures;
|
package/lib/request-context.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { HttpHandlerFn, HttpRequest } from '@angular/common/http';
|
|
2
|
-
/**
|
|
3
|
-
* Interceptor that is server-aware when making HttpClient requests.
|
|
4
|
-
* Server-side requests use the full URL
|
|
5
|
-
* Prerendering uses the internal Nitro $fetch function, along with state transfer
|
|
6
|
-
* Client-side requests use the window.location.origin
|
|
7
|
-
*
|
|
8
|
-
* @param req HttpRequest<unknown>
|
|
9
|
-
* @param next HttpHandlerFn
|
|
10
|
-
* @returns
|
|
11
|
-
*/
|
|
12
|
-
export declare function requestContextInterceptor(req: HttpRequest<unknown>, next: HttpHandlerFn): import("rxjs").Observable<import("@angular/common/http").HttpEvent<unknown>>;
|
package/lib/route-config.d.ts
DELETED
package/lib/route-types.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { H3Event, H3EventContext } from 'h3';
|
|
2
|
-
import type { $Fetch } from 'nitropack';
|
|
3
|
-
export type PageServerLoad = {
|
|
4
|
-
params: H3EventContext['params'];
|
|
5
|
-
req: H3Event['node']['req'];
|
|
6
|
-
res: H3Event['node']['res'];
|
|
7
|
-
fetch: $Fetch;
|
|
8
|
-
event: H3Event;
|
|
9
|
-
};
|
|
10
|
-
export type LoadResult<A extends (pageServerLoad: PageServerLoad) => Promise<any>> = Awaited<ReturnType<A>>;
|
package/lib/routes.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Route } from '@angular/router';
|
|
2
|
-
import type { RouteExport } from './models';
|
|
3
|
-
/**
|
|
4
|
-
* This variable reference is replaced with a glob of all page routes.
|
|
5
|
-
*/
|
|
6
|
-
export declare let ANALOG_ROUTE_FILES: {};
|
|
7
|
-
/**
|
|
8
|
-
* This variable reference is replaced with a glob of all content routes.
|
|
9
|
-
*/
|
|
10
|
-
export declare let ANALOG_CONTENT_ROUTE_FILES: {};
|
|
11
|
-
export type Files = Record<string, () => Promise<RouteExport | string>>;
|
|
12
|
-
/**
|
|
13
|
-
* A function used to parse list of files and create configuration of routes.
|
|
14
|
-
*
|
|
15
|
-
* @param files
|
|
16
|
-
* @returns Array of routes
|
|
17
|
-
*/
|
|
18
|
-
export declare function createRoutes(files: Files, debug?: boolean): Route[];
|
|
19
|
-
export declare const routes: Route[];
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { SafeHtml } from '@angular/platform-browser';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
type ServerProps = Record<string, any>;
|
|
4
|
-
type ServerOutputs = Record<string, any>;
|
|
5
|
-
/**
|
|
6
|
-
* @description
|
|
7
|
-
* Component that defines the bridge between the client and server-only
|
|
8
|
-
* components. The component passes the component ID and props to the server
|
|
9
|
-
* and retrieves the rendered HTML and outputs from the server-only component.
|
|
10
|
-
*
|
|
11
|
-
* Status: experimental
|
|
12
|
-
*/
|
|
13
|
-
export declare class ServerOnly {
|
|
14
|
-
component: import("@angular/core").InputSignal<string>;
|
|
15
|
-
props: import("@angular/core").InputSignal<ServerProps | undefined>;
|
|
16
|
-
outputs: import("@angular/core").OutputEmitterRef<ServerOutputs>;
|
|
17
|
-
private http;
|
|
18
|
-
private sanitizer;
|
|
19
|
-
protected content: import("@angular/core").WritableSignal<SafeHtml>;
|
|
20
|
-
private route;
|
|
21
|
-
private baseURL;
|
|
22
|
-
private transferState;
|
|
23
|
-
constructor();
|
|
24
|
-
updateContent(content: {
|
|
25
|
-
html: string;
|
|
26
|
-
outputs: ServerOutputs;
|
|
27
|
-
}): void;
|
|
28
|
-
getComponentUrl(componentId: string): string;
|
|
29
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ServerOnly, never>;
|
|
30
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ServerOnly, "server-only,ServerOnly,Server", never, { "component": { "alias": "component"; "required": true; "isSignal": true; }; "props": { "alias": "props"; "required": false; "isSignal": true; }; }, { "outputs": "outputs"; }, never, never, true, never>;
|
|
31
|
-
}
|
|
32
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { H3Event, H3EventContext } from 'h3';
|
|
2
|
-
import type { $Fetch } from 'nitropack';
|
|
3
|
-
export type PageServerAction = {
|
|
4
|
-
params: H3EventContext['params'];
|
|
5
|
-
req: H3Event['node']['req'];
|
|
6
|
-
res: H3Event['node']['res'];
|
|
7
|
-
fetch: $Fetch;
|
|
8
|
-
event: H3Event;
|
|
9
|
-
};
|
|
10
|
-
export declare function fail<T = object>(status: number, errors: T): Response;
|
|
11
|
-
export declare function json<T = object>(data: T, config?: ResponseInit): Response;
|
|
12
|
-
export declare function redirect(url: string, config?: number | ResponseInit): Response;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { StaticProvider } from '@angular/core';
|
|
2
|
-
import { ServerRequest, ServerResponse } from '@analogjs/router/tokens';
|
|
3
|
-
export declare function provideServerContext({ req, res, }: {
|
|
4
|
-
req: ServerRequest;
|
|
5
|
-
res: ServerResponse;
|
|
6
|
-
}): StaticProvider[];
|
|
7
|
-
export declare function getBaseUrl(req: ServerRequest): string;
|
|
8
|
-
export declare function getRequestProtocol(req: ServerRequest, opts?: {
|
|
9
|
-
xForwardedProto?: boolean;
|
|
10
|
-
}): "https" | "http";
|
package/server/render.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ApplicationConfig, Provider, Type } from '@angular/core';
|
|
2
|
-
import type { ServerContext } from '@analogjs/router/tokens';
|
|
3
|
-
/**
|
|
4
|
-
* Returns a function that accepts the navigation URL,
|
|
5
|
-
* the root HTML, and server context.
|
|
6
|
-
*
|
|
7
|
-
* @param rootComponent
|
|
8
|
-
* @param config
|
|
9
|
-
* @param platformProviders
|
|
10
|
-
* @returns Promise<string | Reponse>
|
|
11
|
-
*/
|
|
12
|
-
export declare function render(rootComponent: Type<unknown>, config: ApplicationConfig, platformProviders?: Provider[]): (url: string, document: string, serverContext: ServerContext) => Promise<string | Response>;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ApplicationConfig } from '@angular/core';
|
|
2
|
-
import { ServerContext } from '@analogjs/router/tokens';
|
|
3
|
-
export declare function serverComponentRequest(serverContext: ServerContext): string | undefined;
|
|
4
|
-
export declare function renderServerComponent(url: string, serverContext: ServerContext, config?: ApplicationConfig): Promise<Response>;
|
package/server/tokens.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { InjectionToken, Provider } from '@angular/core';
|
|
2
|
-
export declare const STATIC_PROPS: InjectionToken<Record<string, any>>;
|
|
3
|
-
export declare function provideStaticProps<T = Record<string, any>>(props: T): Provider;
|
|
4
|
-
export declare function injectStaticProps(): Record<string, any>;
|
|
5
|
-
export declare function injectStaticOutputs<T>(): {
|
|
6
|
-
set(data: T): void;
|
|
7
|
-
};
|