@analogjs/router 2.8.0-beta.10 → 2.8.0-beta.12
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-MFY2u07E.mjs +119 -0
- package/fesm2022/analogjs-router-debug.page-MFY2u07E.mjs.map +1 -0
- package/fesm2022/analogjs-router-i18n.mjs +82 -219
- package/fesm2022/analogjs-router-i18n.mjs.map +1 -1
- package/fesm2022/analogjs-router-routes-L2tt-0ms.mjs +263 -0
- package/fesm2022/analogjs-router-routes-L2tt-0ms.mjs.map +1 -0
- package/fesm2022/analogjs-router-server-actions.mjs +228 -463
- package/fesm2022/analogjs-router-server-actions.mjs.map +1 -1
- package/fesm2022/analogjs-router-server.mjs +608 -838
- package/fesm2022/analogjs-router-server.mjs.map +1 -1
- package/fesm2022/analogjs-router-tanstack-query-server.mjs +35 -85
- package/fesm2022/analogjs-router-tanstack-query-server.mjs.map +1 -1
- package/fesm2022/analogjs-router-tanstack-query.mjs +79 -127
- package/fesm2022/analogjs-router-tanstack-query.mjs.map +1 -1
- package/fesm2022/analogjs-router-tokens.mjs +14 -19
- package/fesm2022/analogjs-router-tokens.mjs.map +1 -1
- package/fesm2022/analogjs-router.mjs +772 -1312
- package/fesm2022/analogjs-router.mjs.map +1 -1
- package/package.json +2 -2
- package/types/analogjs-router-i18n.d.ts +55 -24
- package/types/analogjs-router-server-actions.d.ts +98 -107
- package/types/analogjs-router-server.d.ts +76 -116
- package/types/analogjs-router-tanstack-query-server.d.ts +33 -37
- package/types/analogjs-router-tanstack-query.d.ts +19 -24
- package/types/analogjs-router-tokens.d.ts +26 -22
- package/types/analogjs-router.d.ts +268 -265
- package/fesm2022/analogjs-router-debug.page-COcFkgRu.mjs +0 -91
- package/fesm2022/analogjs-router-debug.page-COcFkgRu.mjs.map +0 -1
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component } from '@angular/core';
|
|
3
|
-
import { injectDebugRoutes } from './analogjs-router.mjs';
|
|
4
|
-
|
|
5
|
-
class DebugRoutesComponent {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.collectedRoutes = [];
|
|
8
|
-
this.debugRoutes = injectDebugRoutes();
|
|
9
|
-
}
|
|
10
|
-
ngOnInit() {
|
|
11
|
-
this.traverseRoutes(this.debugRoutes);
|
|
12
|
-
}
|
|
13
|
-
traverseRoutes(routes, parent) {
|
|
14
|
-
routes.forEach((route) => {
|
|
15
|
-
this.collectedRoutes.push({
|
|
16
|
-
path: route.isLayout
|
|
17
|
-
? `${parent ? `/${parent}` : ''}${route.path ? `/${route.path}` : ''}`
|
|
18
|
-
: `${parent ? `/${parent}` : ''}${route.path ? `/${route.path}` : '/'}`,
|
|
19
|
-
filename: route.filename,
|
|
20
|
-
file: route.filename?.replace(/(^.*)pages\//, '') || '',
|
|
21
|
-
isLayout: route.isLayout,
|
|
22
|
-
});
|
|
23
|
-
if (route.children) {
|
|
24
|
-
const parentSegments = [parent, route.path];
|
|
25
|
-
const fullParentPath = parentSegments.filter((s) => !!s).join('/');
|
|
26
|
-
this.traverseRoutes(route.children, fullParentPath);
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: DebugRoutesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
31
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: DebugRoutesComponent, isStandalone: true, selector: "analogjs-debug-routes-page", ngImport: i0, template: `
|
|
32
|
-
<h2>Routes</h2>
|
|
33
|
-
|
|
34
|
-
<div class="table-container">
|
|
35
|
-
<div class="table-header">
|
|
36
|
-
<div class="header-cell">Route Path</div>
|
|
37
|
-
<div class="header-cell">File</div>
|
|
38
|
-
<div class="header-cell">Type</div>
|
|
39
|
-
</div>
|
|
40
|
-
<div class="table-body">
|
|
41
|
-
@for (
|
|
42
|
-
collectedRoute of collectedRoutes;
|
|
43
|
-
track collectedRoute.filename
|
|
44
|
-
) {
|
|
45
|
-
<div class="table-row">
|
|
46
|
-
<div class="table-cell">{{ collectedRoute.path }}</div>
|
|
47
|
-
<div class="table-cell" [title]="collectedRoute.filename">
|
|
48
|
-
{{ collectedRoute.file }}
|
|
49
|
-
</div>
|
|
50
|
-
<div class="table-cell">
|
|
51
|
-
{{ collectedRoute.isLayout ? 'Layout' : 'Page' }}
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
}
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
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
|
-
}
|
|
59
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: DebugRoutesComponent, decorators: [{
|
|
60
|
-
type: Component,
|
|
61
|
-
args: [{ selector: 'analogjs-debug-routes-page', standalone: true, template: `
|
|
62
|
-
<h2>Routes</h2>
|
|
63
|
-
|
|
64
|
-
<div class="table-container">
|
|
65
|
-
<div class="table-header">
|
|
66
|
-
<div class="header-cell">Route Path</div>
|
|
67
|
-
<div class="header-cell">File</div>
|
|
68
|
-
<div class="header-cell">Type</div>
|
|
69
|
-
</div>
|
|
70
|
-
<div class="table-body">
|
|
71
|
-
@for (
|
|
72
|
-
collectedRoute of collectedRoutes;
|
|
73
|
-
track collectedRoute.filename
|
|
74
|
-
) {
|
|
75
|
-
<div class="table-row">
|
|
76
|
-
<div class="table-cell">{{ collectedRoute.path }}</div>
|
|
77
|
-
<div class="table-cell" [title]="collectedRoute.filename">
|
|
78
|
-
{{ collectedRoute.file }}
|
|
79
|
-
</div>
|
|
80
|
-
<div class="table-cell">
|
|
81
|
-
{{ collectedRoute.isLayout ? 'Layout' : 'Page' }}
|
|
82
|
-
</div>
|
|
83
|
-
</div>
|
|
84
|
-
}
|
|
85
|
-
</div>
|
|
86
|
-
</div>
|
|
87
|
-
`, 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"] }]
|
|
88
|
-
}] });
|
|
89
|
-
|
|
90
|
-
export { DebugRoutesComponent as default };
|
|
91
|
-
//# sourceMappingURL=analogjs-router-debug.page-COcFkgRu.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"analogjs-router-debug.page-COcFkgRu.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,IAAA,CAAA,eAAe,GAAqB,EAAE;QACtC,IAAA,CAAA,WAAW,GAAG,iBAAiB,EAAE;AA2BlC,IAAA;IAzBC,QAAQ,GAAA;AACN,QAAA,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC;IACvC;IAEA,cAAc,CAAC,MAAoB,EAAE,MAAe,EAAA;AAClD,QAAA,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,KAAI;AACvB,YAAA,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;gBACxB,IAAI,EAAE,KAAK,CAAC;AACV,sBAAE,CAAA,EAAG,MAAM,GAAG,CAAA,CAAA,EAAI,MAAM,CAAA,CAAE,GAAG,EAAE,CAAA,EAAG,KAAK,CAAC,IAAI,GAAG,CAAA,CAAA,EAAI,KAAK,CAAC,IAAI,CAAA,CAAE,GAAG,EAAE,CAAA;AACpE,sBAAE,CAAA,EAAG,MAAM,GAAG,CAAA,CAAA,EAAI,MAAM,CAAA,CAAE,GAAG,EAAE,CAAA,EAC3B,KAAK,CAAC,IAAI,GAAG,CAAA,CAAA,EAAI,KAAK,CAAC,IAAI,CAAA,CAAE,GAAG,GAClC,CAAA,CAAE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