stx-router 0.2.169 → 0.2.171

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.
@@ -37,5 +37,17 @@ export declare function isNonPageRoutePattern(pattern: string): boolean;
37
37
  *
38
38
  * @module page-routes
39
39
  */
40
- /** Directories under a page root whose contents are never public routes. */
40
+ /**
41
+ * Directories under a page root whose contents are never public routes.
42
+ *
43
+ * `emails` is here for the same reason as the other three and was missed
44
+ * (stacksjs/stx#1897): a stacks app ships `resources/views/emails/` as a
45
+ * first-class convention, so `GET /emails/welcome` answered with an email
46
+ * template, `navigate('/emails/welcome')` type-checked, and an SSG build wrote
47
+ * it out as HTML and advertised it in sitemap.xml. An email body is rendered
48
+ * and sent, never browsed to.
49
+ *
50
+ * `errors` is deliberately NOT here: `errors/404.stx` and `errors/500.stx` are
51
+ * pages, served by the framework on those statuses.
52
+ */
41
53
  export declare const NON_PAGE_DIRS: readonly string[];
@@ -1,4 +1,4 @@
1
- export const NON_PAGE_DIRS = ["components", "layouts", "partials"];
1
+ export const NON_PAGE_DIRS = ["components", "layouts", "partials", "emails"];
2
2
  export function isNonPageRoutePath(relativePath) {
3
3
  return relativePath.split(/[\\/]/).filter(Boolean).slice(0, -1).some((segment) => NON_PAGE_DIRS.includes(segment));
4
4
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "stx-router",
3
3
  "type": "module",
4
- "version": "0.2.169",
4
+ "version": "0.2.171",
5
5
  "description": "File-based router for STX — .stx template discovery, nested layouts, typed route params, middleware, and client-side SPA navigation.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",