reroute-js 0.9.3 → 0.10.0

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.
Files changed (201) hide show
  1. package/_/basic/src/index.ts +1 -8
  2. package/_/blog/src/client/index.html +0 -1
  3. package/_/blog/src/client/routes/blog/[layout].tsx +53 -3
  4. package/_/blog/src/client/routes/docs.tsx +1 -1
  5. package/_/blog/src/index.ts +1 -8
  6. package/_/store/src/index.ts +1 -8
  7. package/cli/bin.d.ts +1 -1
  8. package/cli/bin.js +3662 -2681
  9. package/cli/bin.js.map +40 -29
  10. package/cli/index.d.ts +2 -2
  11. package/cli/index.d.ts.map +1 -1
  12. package/cli/index.js +74 -10
  13. package/cli/index.js.map +7 -5
  14. package/cli/src/cli.d.ts +1 -1
  15. package/cli/src/commands/analyze.d.ts +1 -1
  16. package/cli/src/commands/build.d.ts +1 -1
  17. package/cli/src/commands/build.d.ts.map +1 -1
  18. package/cli/src/commands/dev.d.ts +1 -1
  19. package/cli/src/commands/gen.d.ts +1 -1
  20. package/cli/src/commands/gen.d.ts.map +1 -1
  21. package/{core/src/template → cli/src/commands}/index.d.ts +2 -2
  22. package/cli/src/commands/index.d.ts.map +1 -0
  23. package/cli/src/commands/init.d.ts +1 -1
  24. package/cli/src/{libs → commands/lib}/command.d.ts +1 -1
  25. package/cli/src/commands/lib/command.d.ts.map +1 -0
  26. package/cli/src/{libs → commands/lib}/index.d.ts +3 -2
  27. package/cli/src/commands/lib/index.d.ts.map +1 -0
  28. package/cli/src/{libs → commands/lib}/log.d.ts +1 -1
  29. package/cli/src/commands/lib/log.d.ts.map +1 -0
  30. package/cli/src/{libs/markdown.d.ts → commands/lib/markdown/availability.d.ts} +2 -2
  31. package/cli/src/commands/lib/markdown/availability.d.ts.map +1 -0
  32. package/cli/src/commands/lib/markdown/index.d.ts +12 -0
  33. package/cli/src/commands/lib/markdown/index.d.ts.map +1 -0
  34. package/cli/src/{libs/markdown-processor.d.ts → commands/lib/markdown/processor.d.ts} +2 -2
  35. package/cli/src/commands/lib/markdown/processor.d.ts.map +1 -0
  36. package/cli/src/{libs → commands/lib}/production.d.ts +1 -1
  37. package/cli/src/commands/lib/production.d.ts.map +1 -0
  38. package/cli/src/{libs → commands/lib}/server.d.ts +1 -1
  39. package/cli/src/commands/lib/server.d.ts.map +1 -0
  40. package/cli/src/commands/lib/streaming/analyzer.d.ts +26 -0
  41. package/cli/src/commands/lib/streaming/analyzer.d.ts.map +1 -0
  42. package/cli/src/commands/lib/streaming/suspense.d.ts +20 -0
  43. package/cli/src/commands/lib/streaming/suspense.d.ts.map +1 -0
  44. package/cli/src/{libs → commands/lib}/tailwind.d.ts +1 -1
  45. package/cli/src/commands/lib/tailwind.d.ts.map +1 -0
  46. package/cli/src/{libs → commands/lib}/version.d.ts +1 -1
  47. package/cli/src/commands/lib/version.d.ts.map +1 -0
  48. package/cli/src/commands/start.d.ts +2 -2
  49. package/cli/src/commands/start.d.ts.map +1 -1
  50. package/cli/src/index.d.ts +11 -0
  51. package/cli/src/index.d.ts.map +1 -0
  52. package/core/index.d.ts +1 -1
  53. package/core/index.js +1169 -471
  54. package/core/index.js.map +22 -13
  55. package/core/src/bundler/hash.d.ts +1 -1
  56. package/core/src/bundler/index.d.ts +1 -1
  57. package/core/src/config.d.ts +42 -0
  58. package/core/src/config.d.ts.map +1 -0
  59. package/core/src/content/discovery.d.ts +1 -1
  60. package/core/src/content/index.d.ts +1 -1
  61. package/core/src/content/metadata.d.ts +2 -2
  62. package/core/src/content/metadata.d.ts.map +1 -1
  63. package/core/src/index.d.ts +2 -4
  64. package/core/src/index.d.ts.map +1 -1
  65. package/core/src/ssr/index.d.ts +3 -3
  66. package/core/src/ssr/index.d.ts.map +1 -1
  67. package/core/src/ssr/lib/cache.d.ts +67 -0
  68. package/core/src/ssr/lib/cache.d.ts.map +1 -0
  69. package/core/src/ssr/lib/collections.d.ts +18 -0
  70. package/core/src/ssr/lib/collections.d.ts.map +1 -0
  71. package/core/src/{utils → ssr/lib}/compression.d.ts +9 -2
  72. package/core/src/ssr/lib/compression.d.ts.map +1 -0
  73. package/core/src/ssr/lib/compute.d.ts +28 -0
  74. package/core/src/ssr/lib/compute.d.ts.map +1 -0
  75. package/core/src/ssr/{data.d.ts → lib/data.d.ts} +1 -1
  76. package/core/src/ssr/lib/data.d.ts.map +1 -0
  77. package/core/src/{template → ssr/lib}/html.d.ts +2 -2
  78. package/core/src/ssr/lib/html.d.ts.map +1 -0
  79. package/core/src/ssr/lib/index.d.ts +26 -0
  80. package/core/src/ssr/lib/index.d.ts.map +1 -0
  81. package/core/src/ssr/lib/metadata.d.ts +20 -0
  82. package/core/src/ssr/lib/metadata.d.ts.map +1 -0
  83. package/core/src/{utils → ssr/lib}/mime.d.ts +1 -1
  84. package/core/src/ssr/lib/mime.d.ts.map +1 -0
  85. package/core/src/ssr/{modules.d.ts → lib/modules.d.ts} +2 -2
  86. package/core/src/ssr/lib/modules.d.ts.map +1 -0
  87. package/core/src/{utils → ssr/lib}/path.d.ts +1 -1
  88. package/core/src/ssr/lib/path.d.ts.map +1 -0
  89. package/core/src/ssr/lib/preload.d.ts +29 -0
  90. package/core/src/ssr/lib/preload.d.ts.map +1 -0
  91. package/core/src/ssr/lib/scripts.d.ts +31 -0
  92. package/core/src/ssr/lib/scripts.d.ts.map +1 -0
  93. package/core/src/ssr/{seed.d.ts → lib/seed.d.ts} +1 -1
  94. package/core/src/ssr/lib/seed.d.ts.map +1 -0
  95. package/core/src/ssr/lib/styles.d.ts +14 -0
  96. package/core/src/ssr/lib/styles.d.ts.map +1 -0
  97. package/core/src/ssr/lib/template.d.ts +19 -0
  98. package/core/src/ssr/lib/template.d.ts.map +1 -0
  99. package/core/src/{types.d.ts → ssr/lib/types.d.ts} +1 -1
  100. package/core/src/ssr/lib/types.d.ts.map +1 -0
  101. package/core/src/ssr/render.d.ts +2 -1
  102. package/core/src/ssr/render.d.ts.map +1 -1
  103. package/core/src/ssr/stream.d.ts +30 -0
  104. package/core/src/ssr/stream.d.ts.map +1 -0
  105. package/elysia/index.d.ts +1 -1
  106. package/elysia/index.js +1917 -794
  107. package/elysia/index.js.map +34 -19
  108. package/elysia/src/index.d.ts +1 -1
  109. package/elysia/src/libs/cache.d.ts +1 -1
  110. package/elysia/src/libs/http.d.ts +1 -1
  111. package/elysia/src/libs/image.d.ts +1 -1
  112. package/elysia/src/plugin.d.ts +1 -1
  113. package/elysia/src/plugin.d.ts.map +1 -1
  114. package/elysia/src/routes/artifacts.d.ts +1 -1
  115. package/elysia/src/routes/content.d.ts +1 -1
  116. package/elysia/src/routes/image.d.ts +2 -1
  117. package/elysia/src/routes/image.d.ts.map +1 -1
  118. package/elysia/src/routes/internal.d.ts +36 -0
  119. package/elysia/src/routes/internal.d.ts.map +1 -0
  120. package/elysia/src/routes/ssr.d.ts +3 -1
  121. package/elysia/src/routes/ssr.d.ts.map +1 -1
  122. package/elysia/src/routes/static.d.ts +2 -1
  123. package/elysia/src/routes/static.d.ts.map +1 -1
  124. package/elysia/src/types.d.ts +11 -4
  125. package/elysia/src/types.d.ts.map +1 -1
  126. package/package.json +1 -1
  127. package/react/index.d.ts +1 -1
  128. package/react/index.js +295 -53
  129. package/react/index.js.map +10 -9
  130. package/react/src/components/ClientOnly.d.ts +1 -1
  131. package/react/src/components/ContentRoute.d.ts +1 -1
  132. package/react/src/components/ContentRoute.d.ts.map +1 -1
  133. package/react/src/components/Image.d.ts +1 -1
  134. package/react/src/components/LazyRoute.d.ts +26 -0
  135. package/react/src/components/LazyRoute.d.ts.map +1 -0
  136. package/react/src/components/Link.d.ts +1 -1
  137. package/react/src/components/Link.d.ts.map +1 -1
  138. package/react/src/components/Markdown.d.ts +1 -1
  139. package/react/src/components/Outlet.d.ts +1 -1
  140. package/react/src/components/index.d.ts +1 -1
  141. package/react/src/hooks/index.d.ts +2 -1
  142. package/react/src/hooks/index.d.ts.map +1 -1
  143. package/react/src/hooks/useContent.d.ts +1 -1
  144. package/react/src/hooks/useData.d.ts +1 -1
  145. package/react/src/hooks/useData.d.ts.map +1 -1
  146. package/react/src/hooks/useLayoutData.d.ts +18 -0
  147. package/react/src/hooks/useLayoutData.d.ts.map +1 -0
  148. package/react/src/hooks/useNavigate.d.ts +1 -1
  149. package/react/src/hooks/useParams.d.ts +1 -1
  150. package/react/src/hooks/useRouter.d.ts +1 -1
  151. package/react/src/hooks/useSearchParams.d.ts +1 -1
  152. package/react/src/index.d.ts +2 -2
  153. package/react/src/index.d.ts.map +1 -1
  154. package/react/src/{utils → lib}/content.d.ts +1 -1
  155. package/react/src/lib/content.d.ts.map +1 -0
  156. package/react/src/{utils → lib}/head.d.ts +1 -1
  157. package/react/src/lib/head.d.ts.map +1 -0
  158. package/react/src/{utils → lib}/index.d.ts +2 -2
  159. package/react/src/lib/index.d.ts.map +1 -0
  160. package/react/src/{utils → lib}/lazy-route.d.ts +1 -1
  161. package/react/src/lib/lazy-route.d.ts.map +1 -0
  162. package/react/src/lib/route-loader.d.ts +31 -0
  163. package/react/src/lib/route-loader.d.ts.map +1 -0
  164. package/react/src/providers/ContentProvider.d.ts +1 -1
  165. package/react/src/providers/ContentProvider.d.ts.map +1 -1
  166. package/react/src/providers/RerouteProvider.d.ts +1 -1
  167. package/react/src/providers/RerouteProvider.d.ts.map +1 -1
  168. package/react/src/providers/RouterProvider.d.ts +1 -1
  169. package/react/src/providers/RouterProvider.d.ts.map +1 -1
  170. package/react/src/providers/index.d.ts +1 -1
  171. package/react/src/types/any.d.ts +1 -1
  172. package/react/src/types/index.d.ts +1 -1
  173. package/react/src/types/router.d.ts +1 -1
  174. package/cli/src/libs/command.d.ts.map +0 -1
  175. package/cli/src/libs/index.d.ts.map +0 -1
  176. package/cli/src/libs/log.d.ts.map +0 -1
  177. package/cli/src/libs/markdown-processor.d.ts.map +0 -1
  178. package/cli/src/libs/markdown.d.ts.map +0 -1
  179. package/cli/src/libs/production.d.ts.map +0 -1
  180. package/cli/src/libs/server.d.ts.map +0 -1
  181. package/cli/src/libs/tailwind.d.ts.map +0 -1
  182. package/cli/src/libs/version.d.ts.map +0 -1
  183. package/core/src/ssr/data.d.ts.map +0 -1
  184. package/core/src/ssr/modules.d.ts.map +0 -1
  185. package/core/src/ssr/seed.d.ts.map +0 -1
  186. package/core/src/template/html.d.ts.map +0 -1
  187. package/core/src/template/index.d.ts.map +0 -1
  188. package/core/src/types.d.ts.map +0 -1
  189. package/core/src/utils/cache.d.ts +0 -21
  190. package/core/src/utils/cache.d.ts.map +0 -1
  191. package/core/src/utils/compression.d.ts.map +0 -1
  192. package/core/src/utils/index.d.ts +0 -14
  193. package/core/src/utils/index.d.ts.map +0 -1
  194. package/core/src/utils/mime.d.ts.map +0 -1
  195. package/core/src/utils/path.d.ts.map +0 -1
  196. package/elysia/src/routes/dev.d.ts +0 -18
  197. package/elysia/src/routes/dev.d.ts.map +0 -1
  198. package/react/src/utils/content.d.ts.map +0 -1
  199. package/react/src/utils/head.d.ts.map +0 -1
  200. package/react/src/utils/index.d.ts.map +0 -1
  201. package/react/src/utils/lazy-route.d.ts.map +0 -1
@@ -0,0 +1,42 @@
1
+ /**
2
+ * reroute-js v0.10.0
3
+ *
4
+ * @license MIT
5
+ * @copyright 2025 stewones <hi@stewan.io>
6
+ * @see https://github.com/stewones/reroute
7
+ *
8
+ * Built with Bun <3
9
+ */
10
+ import type { ComponentType } from 'react';
11
+ export interface StreamingOptions {
12
+ enabled?: boolean;
13
+ defaultSkeleton?: ComponentType | string;
14
+ defaultLayoutSkeleton?: ComponentType | string;
15
+ }
16
+ export interface ConfigOptions {
17
+ app?: string;
18
+ head?: string;
19
+ lang?: string;
20
+ appId?: string;
21
+ assets?: string;
22
+ prefix?: string;
23
+ ignorePatterns?: (string | RegExp)[];
24
+ staticHeaders?: Record<string, string>;
25
+ maxAge?: number;
26
+ directive?: string;
27
+ indexHTML?: boolean;
28
+ minify?: boolean;
29
+ compression?: boolean;
30
+ imageMaxAge?: number;
31
+ imageAllowedDomains?: string[];
32
+ imageMaxWidth?: number;
33
+ imageMaxHeight?: number;
34
+ bundleMaxAge?: number;
35
+ }
36
+ export interface RerouteConfig {
37
+ options?: ConfigOptions;
38
+ streaming?: StreamingOptions;
39
+ }
40
+ export declare function defineConfig(config: RerouteConfig): RerouteConfig;
41
+ export declare function loadConfig(cwd: string): Promise<RerouteConfig>;
42
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../packages/core/src/config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,WAAW,gBAAgB;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,aAAa,GAAG,MAAM,CAAC;IACzC,qBAAqB,CAAC,EAAE,aAAa,GAAG,MAAM,CAAC;CAC/C;AAED,MAAM,WAAW,aAAa;IAE7B,GAAG,CAAC,EAAE,MAAM,CAAC;IAGb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IACrC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IAGpB,MAAM,CAAC,EAAE,OAAO,CAAC;IAGjB,WAAW,CAAC,EAAE,OAAO,CAAC;IAGtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IAGxB,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC7B,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAC7B;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,GAAG,aAAa,CAEjE;AAED,wBAAsB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAiBpE"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.9.3
2
+ * reroute-js v0.10.0
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.9.3
2
+ * reroute-js v0.10.0
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.9.3
2
+ * reroute-js v0.10.0
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Built with Bun <3
9
9
  */
10
- import type { ContentMeta } from '../types';
10
+ import type { ContentMeta } from '../ssr/lib/types';
11
11
  export declare function getContentMeta(absPath: string, isWatchMode: boolean): Promise<ContentMeta>;
12
12
  /**
13
13
  * Build a minimal <head> snippet from content metadata.
@@ -1 +1 @@
1
- {"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/content/metadata.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAO,MAAM,UAAU,CAAC;AAEjD,wBAAsB,cAAc,CACnC,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,OAAO,GAClB,OAAO,CAAC,WAAW,CAAC,CAetB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAChC,IAAI,EAAE,WAAW,GAAG,SAAS,GAAG,IAAI,GAClC,MAAM,CAgBR"}
1
+ {"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/content/metadata.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAO,MAAM,kBAAkB,CAAC;AAEzD,wBAAsB,cAAc,CACnC,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,OAAO,GAClB,OAAO,CAAC,WAAW,CAAC,CAetB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAChC,IAAI,EAAE,WAAW,GAAG,SAAS,GAAG,IAAI,GAClC,MAAM,CAgBR"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.9.3
2
+ * reroute-js v0.10.0
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -8,9 +8,7 @@
8
8
  * Built with Bun <3
9
9
  */
10
10
  export * from './bundler';
11
+ export * from './config';
11
12
  export * from './content';
12
13
  export * from './ssr';
13
- export * from './template';
14
- export * from './types';
15
- export * from './utils';
16
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/core/src/index.ts"],"names":[],"mappings":"AACA,cAAc,WAAW,CAAC;AAE1B,cAAc,WAAW,CAAC;AAE1B,cAAc,OAAO,CAAC;AAEtB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AAGxB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/core/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.9.3
2
+ * reroute-js v0.10.0
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Built with Bun <3
9
9
  */
10
- export * from './data';
10
+ export * from './lib';
11
11
  export * from './render';
12
- export * from './seed';
12
+ export * from './stream';
13
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/ssr/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/ssr/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * reroute-js v0.10.0
3
+ *
4
+ * @license MIT
5
+ * @copyright 2025 stewones <hi@stewan.io>
6
+ * @see https://github.com/stewones/reroute
7
+ *
8
+ * Built with Bun <3
9
+ */
10
+ type CacheEntry<T> = {
11
+ data: T;
12
+ timestamp: number;
13
+ maxAge: number;
14
+ };
15
+ /**
16
+ * Simple in-memory cache for SSR data
17
+ * Thread-safe for single-process usage
18
+ */
19
+ declare class SSRDataCache {
20
+ private cache;
21
+ private static cleanupInterval;
22
+ constructor();
23
+ /**
24
+ * Get cached data if available and not expired
25
+ */
26
+ get<T>(key: string): T | undefined;
27
+ /**
28
+ * Set data in cache with maxAge (in milliseconds)
29
+ */
30
+ set<T>(key: string, data: T, maxAge: number): void;
31
+ /**
32
+ * Check if key exists and is not expired
33
+ */
34
+ has(key: string): boolean;
35
+ /**
36
+ * Clear all cached data
37
+ */
38
+ clear(): void;
39
+ /**
40
+ * Remove expired entries
41
+ */
42
+ private cleanup;
43
+ /**
44
+ * Get cache stats (useful for debugging)
45
+ */
46
+ stats(): {
47
+ size: number;
48
+ keys: string[];
49
+ };
50
+ /**
51
+ * Cleanup interval on shutdown
52
+ */
53
+ destroy(): void;
54
+ }
55
+ export declare class LRUCache<K, V> {
56
+ private cache;
57
+ private maxSize;
58
+ constructor(maxSize?: number);
59
+ get(key: K): V | undefined;
60
+ set(key: K, value: V): void;
61
+ has(key: K): boolean;
62
+ clear(): void;
63
+ }
64
+ declare const ssrCache: SSRDataCache;
65
+ export { ssrCache, SSRDataCache };
66
+ export type { CacheEntry };
67
+ //# sourceMappingURL=cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/ssr/lib/cache.ts"],"names":[],"mappings":"AAAA,KAAK,UAAU,CAAC,CAAC,IAAI;IACpB,IAAI,EAAE,CAAC,CAAC;IACR,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;GAGG;AACH,cAAM,YAAY;IACjB,OAAO,CAAC,KAAK,CAA+C;IAC5D,OAAO,CAAC,MAAM,CAAC,eAAe,CAA+B;;IAY7D;;OAEG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;IAalC;;OAEG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAUlD;;OAEG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIzB;;OAEG;IACH,KAAK,IAAI,IAAI;IAIb;;OAEG;IACH,OAAO,CAAC,OAAO;IASf;;OAEG;IACH,KAAK,IAAI;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE;IAOzC;;OAEG;IACH,OAAO,IAAI,IAAI;CAOf;AAGD,qBAAa,QAAQ,CAAC,CAAC,EAAE,CAAC;IACzB,OAAO,CAAC,KAAK,CAAwB;IACrC,OAAO,CAAC,OAAO,CAAS;gBAEZ,OAAO,GAAE,MAAY;IAIjC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS;IAU1B,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI;IAa3B,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO;IAIpB,KAAK,IAAI,IAAI;CAGb;AAkBD,QAAA,MAAM,QAAQ,cAAmB,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC;AAClC,YAAY,EAAE,UAAU,EAAE,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * reroute-js v0.10.0
3
+ *
4
+ * @license MIT
5
+ * @copyright 2025 stewones <hi@stewan.io>
6
+ * @see https://github.com/stewones/reroute
7
+ *
8
+ * Built with Bun <3
9
+ */
10
+ /**
11
+ * Load content collections for SSR rendering
12
+ */
13
+ export declare function loadCollections(cwd: string, isWatchMode: boolean): Promise<Record<string, unknown[]>>;
14
+ /**
15
+ * Set global collections for SSR
16
+ */
17
+ export declare function setGlobalCollections(byCollectionForSSR: Record<string, unknown[]>): void;
18
+ //# sourceMappingURL=collections.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collections.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/ssr/lib/collections.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,wBAAsB,eAAe,CACpC,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,OAAO,GAClB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,CAUpC;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CACnC,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,GAC3C,IAAI,CAIN"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.9.3
2
+ * reroute-js v0.10.0
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -7,9 +7,16 @@
7
7
  *
8
8
  * Built with Bun <3
9
9
  */
10
- import type { CompressionResult } from '../types';
10
+ import type { CompressionResult } from './types';
11
11
  export declare function acceptsGzip(acceptEncoding?: string): boolean;
12
12
  export declare function acceptsBrotli(acceptEncoding?: string): boolean;
13
13
  export declare function toBytes(input: string | Uint8Array): Uint8Array<ArrayBuffer> | string;
14
14
  export declare function gzipIfAccepted(body: string | Uint8Array, contentType: string, acceptEncoding?: string): CompressionResult;
15
+ declare function compressStreamIfAccepted(stream: ReadableStream<Uint8Array>, contentType: string, _acceptEncoding?: string): StreamCompressionResult;
16
+ type StreamCompressionResult = {
17
+ stream: ReadableStream<Uint8Array>;
18
+ extraHeaders: Record<string, string>;
19
+ };
20
+ export { compressStreamIfAccepted };
21
+ export type { StreamCompressionResult };
15
22
  //# sourceMappingURL=compression.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compression.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/ssr/lib/compression.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,wBAAgB,WAAW,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAE5D;AAED,wBAAgB,aAAa,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAE9D;AAED,wBAAgB,OAAO,CACtB,KAAK,EAAE,MAAM,GAAG,UAAU,GACxB,UAAU,CAAC,WAAW,CAAC,GAAG,MAAM,CAIlC;AAED,wBAAgB,cAAc,CAC7B,IAAI,EAAE,MAAM,GAAG,UAAU,EACzB,WAAW,EAAE,MAAM,EACnB,cAAc,CAAC,EAAE,MAAM,GACrB,iBAAiB,CA4BnB;AAED,iBAAS,wBAAwB,CAChC,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC,EAClC,WAAW,EAAE,MAAM,EACnB,eAAe,CAAC,EAAE,MAAM,GACtB,uBAAuB,CAWzB;AAED,KAAK,uBAAuB,GAAG;IAC9B,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC,CAAC;AAEF,OAAO,EAAE,wBAAwB,EAAE,CAAC;AACpC,YAAY,EAAE,uBAAuB,EAAE,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * reroute-js v0.10.0
3
+ *
4
+ * @license MIT
5
+ * @copyright 2025 stewones <hi@stewan.io>
6
+ * @see https://github.com/stewones/reroute
7
+ *
8
+ * Built with Bun <3
9
+ */
10
+ type ComputeResult = {
11
+ data: Record<string, unknown>;
12
+ error?: string;
13
+ pending?: Promise<void>;
14
+ };
15
+ type ComputeOptions = {
16
+ streaming?: boolean;
17
+ maxAge?: number;
18
+ };
19
+ /**
20
+ * Compute SSR data by executing ssr.data() from layouts (hierarchical) and route/content modules
21
+ */
22
+ export declare function computeSSRData(pathname: string, clientDir: string, cwd: string, isWatchMode: boolean, options?: ComputeOptions): Promise<ComputeResult>;
23
+ /**
24
+ * Set global SSR data
25
+ */
26
+ export declare function setGlobalSSRData(data: Record<string, unknown>): void;
27
+ export type { ComputeResult };
28
+ //# sourceMappingURL=compute.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compute.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/ssr/lib/compute.ts"],"names":[],"mappings":"AAOA,KAAK,aAAa,GAAG;IACpB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB,CAAC;AAEF,KAAK,cAAc,GAAG;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAaF;;GAEG;AACH,wBAAsB,cAAc,CACnC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,OAAO,EACpB,OAAO,GAAE,cAAmB,GAC1B,OAAO,CAAC,aAAa,CAAC,CAgZxB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAIpE;AAED,YAAY,EAAE,aAAa,EAAE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.9.3
2
+ * reroute-js v0.10.0
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/ssr/lib/data.ts"],"names":[],"mappings":"AAKA,KAAK,aAAa,GAAG;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,wBAAsB,qBAAqB,CAC1C,MAAM,EAAE,aAAa,GACnB,OAAO,CAAC,OAAO,CAAC,CA6PlB"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.9.3
2
+ * reroute-js v0.10.0
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Built with Bun <3
9
9
  */
10
- import type { TemplateContext } from '../types';
10
+ import type { TemplateContext } from './types';
11
11
  export declare function loadIndexHtml(clientDir: string): Promise<string>;
12
12
  export declare function applyIndexTemplate(templateHtml: string, appHtml: string, { head, hydrationScript, lang, appId, }: TemplateContext): string;
13
13
  //# sourceMappingURL=html.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/ssr/lib/html.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,wBAAsB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAatE;AAED,wBAAgB,kBAAkB,CACjC,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,MAAM,EACf,EACC,IAAS,EACT,eAAoB,EACpB,IAAW,EACX,KAAc,GACd,EAAE,eAAe,GAChB,MAAM,CAkGR"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * reroute-js v0.10.0
3
+ *
4
+ * @license MIT
5
+ * @copyright 2025 stewones <hi@stewan.io>
6
+ * @see https://github.com/stewones/reroute
7
+ *
8
+ * Built with Bun <3
9
+ */
10
+ export * from './cache';
11
+ export * from './collections';
12
+ export * from './compression';
13
+ export * from './compute';
14
+ export * from './data';
15
+ export * from './html';
16
+ export * from './metadata';
17
+ export * from './mime';
18
+ export * from './modules';
19
+ export * from './path';
20
+ export * from './preload';
21
+ export * from './scripts';
22
+ export * from './seed';
23
+ export * from './styles';
24
+ export * from './template';
25
+ export * from './types';
26
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/ssr/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * reroute-js v0.10.0
3
+ *
4
+ * @license MIT
5
+ * @copyright 2025 stewones <hi@stewan.io>
6
+ * @see https://github.com/stewones/reroute
7
+ *
8
+ * Built with Bun <3
9
+ */
10
+ type MetadataResult = {
11
+ perPageHead: string;
12
+ pageLang?: string;
13
+ statusOverride?: number;
14
+ };
15
+ /**
16
+ * Extract per-page head and metadata from layouts (hierarchical), routes, and content modules
17
+ */
18
+ export declare function extractPageMetadata(pathname: string, clientDir: string, cwd: string, isWatchMode: boolean, currentStatusOverride?: number): Promise<MetadataResult>;
19
+ export type { MetadataResult };
20
+ //# sourceMappingURL=metadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/ssr/lib/metadata.ts"],"names":[],"mappings":"AAOA,KAAK,cAAc,GAAG;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;GAEG;AACH,wBAAsB,mBAAmB,CACxC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,OAAO,EACpB,qBAAqB,CAAC,EAAE,MAAM,GAC5B,OAAO,CAAC,cAAc,CAAC,CA+KzB;AAED,YAAY,EAAE,cAAc,EAAE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.9.3
2
+ * reroute-js v0.10.0
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mime.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/ssr/lib/mime.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAmBpD;AAED,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAc3D"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.9.3
2
+ * reroute-js v0.10.0
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Built with Bun <3
9
9
  */
10
- import type { Doc } from '../types';
10
+ import type { Doc } from './types';
11
11
  /**
12
12
  * Import a content module for a given pathname like "/collection/name".
13
13
  * Prefer the latest built chunk in .reroute to align with the client preload,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/ssr/lib/modules.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAEnC;;;;GAIG;AACH,wBAAsB,0BAA0B,CAC/C,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,OAAO,GAClB,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,CAmGrB"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.9.3
2
+ * reroute-js v0.10.0
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -0,0 +1 @@
1
+ {"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/ssr/lib/path.ts"],"names":[],"mappings":"AAAA,wBAAgB,IAAI,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAE/C;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAGzC;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAGxD;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAExD;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAEtD"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * reroute-js v0.10.0
3
+ *
4
+ * @license MIT
5
+ * @copyright 2025 stewones <hi@stewan.io>
6
+ * @see https://github.com/stewones/reroute
7
+ *
8
+ * Built with Bun <3
9
+ */
10
+ type PreloadResult = {
11
+ modulePath?: string;
12
+ extraHead: string;
13
+ hydrationScript: string;
14
+ statusOverride?: number;
15
+ };
16
+ /**
17
+ * Handle content module preloading for content pages
18
+ */
19
+ export declare function preloadContentModule(pathname: string, clientDir: string, cwd: string, isWatchMode: boolean): Promise<PreloadResult>;
20
+ /**
21
+ * Reset SSR access tracking for a new request
22
+ */
23
+ export declare function resetSSRAccessTracking(): void;
24
+ /**
25
+ * Create bundle preload link
26
+ */
27
+ export declare function createBundlePreload(bundleUrl: string): string;
28
+ export type { PreloadResult };
29
+ //# sourceMappingURL=preload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preload.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/ssr/lib/preload.ts"],"names":[],"mappings":"AAOA,KAAK,aAAa,GAAG;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;GAEG;AACH,wBAAsB,oBAAoB,CACzC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,OAAO,GAClB,OAAO,CAAC,aAAa,CAAC,CAkHxB;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAI7C;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAO7D;AAED,YAAY,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * reroute-js v0.10.0
3
+ *
4
+ * @license MIT
5
+ * @copyright 2025 stewones <hi@stewan.io>
6
+ * @see https://github.com/stewones/reroute
7
+ *
8
+ * Built with Bun <3
9
+ */
10
+ type Doc = any;
11
+ /**
12
+ * Escape JSON for safe embedding in HTML script tags
13
+ */
14
+ export declare function escapeJsonForScript(json: string): string;
15
+ /**
16
+ * Create inline script for SSR data
17
+ */
18
+ export declare function createDataScript(ssrData: Record<string, unknown>, errorMsg?: string): string;
19
+ /**
20
+ * Create inline script for collection data
21
+ */
22
+ export declare function createCollectionScript(subset: Record<string, unknown[]>, partial: Record<string, boolean>): string;
23
+ /**
24
+ * Process collections based on SSR access tracking
25
+ */
26
+ export declare function processCollections(accessedCollections: Doc, byCollectionForSSR: Record<string, unknown[]>): {
27
+ subset: Record<string, unknown[]>;
28
+ partial: Record<string, boolean>;
29
+ };
30
+ export {};
31
+ //# sourceMappingURL=scripts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scripts.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/ssr/lib/scripts.ts"],"names":[],"mappings":"AACA,KAAK,GAAG,GAAG,GAAG,CAAC;AAEf;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKxD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC/B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,QAAQ,CAAC,EAAE,MAAM,GACf,MAAM,CAoBR;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACrC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,EACjC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,MAAM,CAIR;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CACjC,mBAAmB,EAAE,GAAG,EACxB,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,GAC3C;IAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CA0DzE"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.9.3
2
+ * reroute-js v0.10.0
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seed.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/ssr/lib/seed.ts"],"names":[],"mappings":"AAGA,wBAAsB,oBAAoB,CACzC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,OAAO,GAClB,OAAO,CAAC,IAAI,CAAC,CAkCf"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * reroute-js v0.10.0
3
+ *
4
+ * @license MIT
5
+ * @copyright 2025 stewones <hi@stewan.io>
6
+ * @see https://github.com/stewones/reroute
7
+ *
8
+ * Built with Bun <3
9
+ */
10
+ /**
11
+ * Find and inline Tailwind CSS from .reroute directory
12
+ */
13
+ export declare function inlineTailwindCSS(clientDir: string, minify?: boolean): Promise<string>;
14
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/ssr/lib/styles.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAsB,iBAAiB,CACtC,SAAS,EAAE,MAAM,EACjB,MAAM,UAAQ,GACZ,OAAO,CAAC,MAAM,CAAC,CAwCjB"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * reroute-js v0.10.0
3
+ *
4
+ * @license MIT
5
+ * @copyright 2025 stewones <hi@stewan.io>
6
+ * @see https://github.com/stewones/reroute
7
+ *
8
+ * Built with Bun <3
9
+ */
10
+ declare function splitTemplate(html: string, appId?: string): TemplateParts;
11
+ type TemplateParts = {
12
+ htmlHead: string;
13
+ rootStart: string;
14
+ rootEnd: string;
15
+ htmlTail: string;
16
+ };
17
+ export { splitTemplate };
18
+ export type { TemplateParts };
19
+ //# sourceMappingURL=template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/ssr/lib/template.ts"],"names":[],"mappings":"AAAA,iBAAS,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,GAAE,MAAe,GAAG,aAAa,CAwB1E;AAED,KAAK,aAAa,GAAG;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC;AACzB,YAAY,EAAE,aAAa,EAAE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.9.3
2
+ * reroute-js v0.10.0
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/ssr/lib/types.ts"],"names":[],"mappings":"AACA,KAAK,GAAG,GAAG,GAAG,CAAC;AAEf,KAAK,eAAe,GAAG;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,UAAU,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,MAAM,CAAC,EAAE;QACR,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACb,EAAE,CAAC;CACJ,CAAC;AAEF,KAAK,WAAW,GAAG;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACvB,CAAC;AAEF,KAAK,cAAc,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACxB,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC,CAAC;AAEF,YAAY,EACX,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,WAAW,EACX,GAAG,EACH,eAAe,GACf,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.9.3
2
+ * reroute-js v0.10.0
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -19,6 +19,7 @@ type SSRRenderOptions = {
19
19
  lang?: string;
20
20
  appId?: string;
21
21
  minify?: boolean;
22
+ maxAge?: number;
22
23
  };
23
24
  type SSRRenderResult = {
24
25
  html: string;
@@ -1 +1 @@
1
- {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/ssr/render.ts"],"names":[],"mappings":"AAGA,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAQxD,KAAK,gBAAgB,GAAG;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,YAAY,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,KAAK,eAAe,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,iBAAe,iBAAiB,CAC/B,OAAO,EAAE,gBAAgB,GACvB,OAAO,CAAC,eAAe,CAAC,CAke1B;AAED,OAAO,EAAE,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/ssr/render.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAoBxD,KAAK,gBAAgB,GAAG;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,YAAY,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,eAAe,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,iBAAe,iBAAiB,CAC/B,OAAO,EAAE,gBAAgB,GACvB,OAAO,CAAC,eAAe,CAAC,CAuH1B;AAED,OAAO,EAAE,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * reroute-js v0.10.0
3
+ *
4
+ * @license MIT
5
+ * @copyright 2025 stewones <hi@stewan.io>
6
+ * @see https://github.com/stewones/reroute
7
+ *
8
+ * Built with Bun <3
9
+ */
10
+ import { type ReactElement } from 'react';
11
+ declare function renderSSRDocumentStream(options: StreamingSSROptions): Promise<StreamingSSRResult>;
12
+ type StreamingSSROptions = {
13
+ pathname: string;
14
+ rootComponent: ReactElement;
15
+ clientDir: string;
16
+ cwd: string;
17
+ isWatchMode: boolean;
18
+ bundleUrl: string;
19
+ head?: string;
20
+ lang?: string;
21
+ appId?: string;
22
+ maxAge?: number;
23
+ };
24
+ type StreamingSSRResult = {
25
+ stream: ReadableStream<Uint8Array>;
26
+ status: number;
27
+ };
28
+ export { renderSSRDocumentStream };
29
+ export type { StreamingSSROptions, StreamingSSRResult };
30
+ //# sourceMappingURL=stream.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/ssr/stream.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AA+BxD,iBAAe,uBAAuB,CACrC,OAAO,EAAE,mBAAmB,GAC1B,OAAO,CAAC,kBAAkB,CAAC,CAoL7B;AAED,KAAK,mBAAmB,GAAG;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,YAAY,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACzB,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;IACnC,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,OAAO,EAAE,uBAAuB,EAAE,CAAC;AACnC,YAAY,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,CAAC"}
package/elysia/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.9.3
2
+ * reroute-js v0.10.0
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>