@analogjs/router 2.0.0-alpha.6 → 2.0.0-alpha.7

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.
@@ -27,8 +27,8 @@ class DebugRoutesComponent {
27
27
  }
28
28
  });
29
29
  }
30
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DebugRoutesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
31
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: DebugRoutesComponent, isStandalone: true, selector: "analogjs-debug-routes-page", ngImport: i0, template: `
30
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: DebugRoutesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
31
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.4", 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: "19.0.4", ngImport: i0, type: DebugRoutesComponent, decorators: [{
59
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", 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.0.4", ngImpor
88
88
  }] });
89
89
 
90
90
  export { DebugRoutesComponent as default };
91
- //# sourceMappingURL=analogjs-router-debug.page-Cf3Gtqpz.mjs.map
91
+ //# sourceMappingURL=analogjs-router-debug.page-e5DJlNv3.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"analogjs-router-debug.page-Cf3Gtqpz.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,iBAAi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A,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAApB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,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;;2FAuEkB,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
+ {"version":3,"file":"analogjs-router-debug.page-e5DJlNv3.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,o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AK,CAAC,QAAQ,EAAE,cAAc,CAAC;;AAEvD,SAAC,CAAC;;8GA3Be,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAApB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,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;;2FAuEkB,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;;;;;"}
@@ -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: "19.0.4", ngImport: i0, type: FormAction, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
674
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.4", 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 }); }
673
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: FormAction, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
674
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.4", 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: "19.0.4", ngImport: i0, type: FormAction, decorators: [{
676
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", 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-Cf3Gtqpz.mjs'),
710
+ loadComponent: () => import('./analogjs-router-debug.page-e5DJlNv3.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: "19.0.4", ngImport: i0, type: ServerOnly, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
791
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.4", 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 }); }
790
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ServerOnly, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
791
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.4", 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: "19.0.4", ngImport: i0, type: ServerOnly, decorators: [{
793
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ServerOnly, decorators: [{
794
794
  type: Component,
795
795
  args: [{
796
796
  selector: 'server-only,ServerOnly,Server',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@analogjs/router",
3
- "version": "2.0.0-alpha.6",
3
+ "version": "2.0.0-alpha.7",
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.6",
27
+ "@analogjs/content": "^2.0.0-alpha.7",
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
  },