reroute-js 0.8.0 → 0.9.1

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 (124) hide show
  1. package/_/basic/package.json +1 -0
  2. package/_/basic/src/client/index.html +0 -1
  3. package/_/blog/package.json +1 -0
  4. package/_/store/package.json +1 -0
  5. package/cli/bin.d.ts +1 -1
  6. package/cli/bin.js +589 -615
  7. package/cli/bin.js.map +19 -24
  8. package/cli/index.d.ts +1 -1
  9. package/cli/index.js +48 -25
  10. package/cli/index.js.map +5 -5
  11. package/cli/src/cli.d.ts +1 -1
  12. package/cli/src/commands/analyze.d.ts +1 -1
  13. package/cli/src/commands/build.d.ts +3 -4
  14. package/cli/src/commands/build.d.ts.map +1 -1
  15. package/cli/src/commands/dev.d.ts +2 -3
  16. package/cli/src/commands/dev.d.ts.map +1 -1
  17. package/cli/src/commands/gen.d.ts +1 -1
  18. package/cli/src/commands/gen.d.ts.map +1 -1
  19. package/cli/src/commands/init.d.ts +1 -1
  20. package/cli/src/commands/start.d.ts +3 -4
  21. package/cli/src/commands/start.d.ts.map +1 -1
  22. package/cli/src/libs/command.d.ts +1 -1
  23. package/cli/src/libs/index.d.ts +1 -1
  24. package/cli/src/libs/log.d.ts +1 -1
  25. package/cli/src/libs/log.d.ts.map +1 -1
  26. package/cli/src/libs/markdown-processor.d.ts +2 -1
  27. package/cli/src/libs/markdown-processor.d.ts.map +1 -1
  28. package/cli/src/libs/markdown.d.ts +1 -1
  29. package/cli/src/libs/production.d.ts +1 -1
  30. package/cli/src/libs/server.d.ts +18 -0
  31. package/cli/src/libs/server.d.ts.map +1 -0
  32. package/cli/src/libs/tailwind.d.ts +2 -2
  33. package/cli/src/libs/tailwind.d.ts.map +1 -1
  34. package/cli/src/libs/version.d.ts +1 -1
  35. package/core/index.d.ts +1 -1
  36. package/core/index.js +130 -351
  37. package/core/index.js.map +8 -11
  38. package/core/src/bundler/hash.d.ts +1 -1
  39. package/core/src/bundler/index.d.ts +1 -2
  40. package/core/src/bundler/index.d.ts.map +1 -1
  41. package/core/src/content/discovery.d.ts +1 -3
  42. package/core/src/content/discovery.d.ts.map +1 -1
  43. package/core/src/content/index.d.ts +1 -2
  44. package/core/src/content/index.d.ts.map +1 -1
  45. package/core/src/content/metadata.d.ts +1 -1
  46. package/core/src/index.d.ts +1 -1
  47. package/core/src/ssr/data.d.ts +1 -1
  48. package/core/src/ssr/index.d.ts +1 -1
  49. package/core/src/ssr/modules.d.ts +1 -1
  50. package/core/src/ssr/render.d.ts +1 -1
  51. package/core/src/ssr/render.d.ts.map +1 -1
  52. package/core/src/ssr/seed.d.ts +1 -1
  53. package/core/src/template/html.d.ts +1 -1
  54. package/core/src/template/index.d.ts +1 -1
  55. package/core/src/types.d.ts +7 -19
  56. package/core/src/types.d.ts.map +1 -1
  57. package/core/src/utils/cache.d.ts +1 -1
  58. package/core/src/utils/compression.d.ts +2 -1
  59. package/core/src/utils/compression.d.ts.map +1 -1
  60. package/core/src/utils/index.d.ts +1 -1
  61. package/core/src/utils/mime.d.ts +1 -1
  62. package/core/src/utils/path.d.ts +1 -1
  63. package/elysia/index.d.ts +1 -1
  64. package/elysia/index.js +391 -665
  65. package/elysia/index.js.map +14 -17
  66. package/elysia/src/index.d.ts +1 -1
  67. package/elysia/src/libs/cache.d.ts +14 -0
  68. package/elysia/src/libs/cache.d.ts.map +1 -0
  69. package/elysia/src/libs/http.d.ts +1 -1
  70. package/elysia/src/libs/image.d.ts +1 -1
  71. package/elysia/src/libs/image.d.ts.map +1 -1
  72. package/elysia/src/plugin.d.ts +1 -1
  73. package/elysia/src/plugin.d.ts.map +1 -1
  74. package/elysia/src/routes/artifacts.d.ts +9 -2
  75. package/elysia/src/routes/artifacts.d.ts.map +1 -1
  76. package/elysia/src/routes/content.d.ts +3 -2
  77. package/elysia/src/routes/content.d.ts.map +1 -1
  78. package/elysia/src/routes/dev.d.ts +1 -1
  79. package/elysia/src/routes/dev.d.ts.map +1 -1
  80. package/elysia/src/routes/image.d.ts +1 -1
  81. package/elysia/src/routes/ssr.d.ts +2 -2
  82. package/elysia/src/routes/ssr.d.ts.map +1 -1
  83. package/elysia/src/routes/static.d.ts +2 -5
  84. package/elysia/src/routes/static.d.ts.map +1 -1
  85. package/elysia/src/types.d.ts +10 -3
  86. package/elysia/src/types.d.ts.map +1 -1
  87. package/package.json +4 -4
  88. package/react/index.d.ts +1 -1
  89. package/react/index.js +80 -65
  90. package/react/index.js.map +5 -4
  91. package/react/src/components/ClientOnly.d.ts +1 -1
  92. package/react/src/components/ContentRoute.d.ts +1 -1
  93. package/react/src/components/Image.d.ts +1 -1
  94. package/react/src/components/Link.d.ts +1 -1
  95. package/react/src/components/Markdown.d.ts +1 -1
  96. package/react/src/components/Outlet.d.ts +1 -1
  97. package/react/src/components/index.d.ts +1 -1
  98. package/react/src/hooks/index.d.ts +1 -1
  99. package/react/src/hooks/useContent.d.ts +1 -1
  100. package/react/src/hooks/useData.d.ts +1 -1
  101. package/react/src/hooks/useNavigate.d.ts +1 -1
  102. package/react/src/hooks/useParams.d.ts +1 -1
  103. package/react/src/hooks/useRouter.d.ts +1 -1
  104. package/react/src/hooks/useSearchParams.d.ts +1 -1
  105. package/react/src/index.d.ts +1 -1
  106. package/react/src/providers/ContentProvider.d.ts +1 -1
  107. package/react/src/providers/RerouteProvider.d.ts +1 -1
  108. package/react/src/providers/RouterProvider.d.ts +1 -1
  109. package/react/src/providers/index.d.ts +1 -1
  110. package/react/src/types/any.d.ts +1 -1
  111. package/react/src/types/index.d.ts +1 -1
  112. package/react/src/types/router.d.ts +1 -1
  113. package/react/src/utils/content.d.ts +1 -1
  114. package/react/src/utils/head.d.ts +1 -1
  115. package/react/src/utils/index.d.ts +2 -1
  116. package/react/src/utils/index.d.ts.map +1 -1
  117. package/react/src/utils/lazy-route.d.ts +41 -0
  118. package/react/src/utils/lazy-route.d.ts.map +1 -0
  119. package/cli/src/commands/boot.d.ts +0 -18
  120. package/cli/src/commands/boot.d.ts.map +0 -1
  121. package/core/src/bundler/transpile.d.ts +0 -13
  122. package/core/src/bundler/transpile.d.ts.map +0 -1
  123. package/core/src/content/registry.d.ts +0 -11
  124. package/core/src/content/registry.d.ts.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.8.0
2
+ * reroute-js v0.9.1
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -0,0 +1,14 @@
1
+ /**
2
+ * reroute-js v0.9.1
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
+ * Determine encoding that will be used (matches gzipIfAccepted priority: Brotli > Gzip > Raw)
12
+ */
13
+ export declare function getEncoding(acceptEncoding: string): 'br' | 'gz' | 'raw';
14
+ //# sourceMappingURL=cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../../../../packages/elysia/src/libs/cache.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,WAAW,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAMvE"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.8.0
2
+ * reroute-js v0.9.1
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.8.0
2
+ * reroute-js v0.9.1
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -1 +1 @@
1
- {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../../../../packages/elysia/src/libs/image.ts"],"names":[],"mappings":"AAMA,UAAU,qBAAqB;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;IACnD,GAAG,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;CAC1D;AAED,UAAU,uBAAuB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACb;AASD;;GAEG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,QAE9C;AAkID;;GAEG;AACH,wBAAsB,aAAa,CAClC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,qBAAqB,EAC9B,YAAY,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,uBAAuB,CAAC,CA0HlC;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAIjD"}
1
+ {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../../../../packages/elysia/src/libs/image.ts"],"names":[],"mappings":"AAIA,UAAU,qBAAqB;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;IACnD,GAAG,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;CAC1D;AAED,UAAU,uBAAuB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACb;AASD;;GAEG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,QAE9C;AA+HD;;GAEG;AACH,wBAAsB,aAAa,CAClC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,qBAAqB,EAC9B,YAAY,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,uBAAuB,CAAC,CA0HlC;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAIjD"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.8.0
2
+ * reroute-js v0.9.1
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/elysia/src/plugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAkBrC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,QAAA,MAAM,OAAO,GACX,UAAS,cAAmB,MACtB,KAAK,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkPjB,CAAC;AAEH,OAAO,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/elysia/src/plugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAerC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,QAAA,MAAM,OAAO,GACX,UAAS,cAAmB,MACtB,KAAK,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4QjB,CAAC;AAEH,OAAO,EAAE,OAAO,EAAE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.8.0
2
+ * reroute-js v0.9.1
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -8,5 +8,12 @@
8
8
  * Built with Bun <3
9
9
  */
10
10
  import type { Elysia } from 'elysia';
11
- export declare function registerArtifactsRoutes(app: Elysia, cwd: string): Elysia;
11
+ import { type LRUCache } from 'reroute-js/core';
12
+ type ArtifactsOptions = {
13
+ bundleMaxAge: number;
14
+ directive: string;
15
+ isWatchMode?: boolean;
16
+ };
17
+ export declare function registerArtifactsRoutes(app: Elysia, cwd: string, fileCache: LRUCache<string, Response>, options: ArtifactsOptions): Elysia;
18
+ export {};
12
19
  //# sourceMappingURL=artifacts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"artifacts.d.ts","sourceRoot":"","sources":["../../../../../../packages/elysia/src/routes/artifacts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIrC,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAiCxE"}
1
+ {"version":3,"file":"artifacts.d.ts","sourceRoot":"","sources":["../../../../../../packages/elysia/src/routes/artifacts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,OAAO,EAIN,KAAK,QAAQ,EACb,MAAM,iBAAiB,CAAC;AAGzB,KAAK,gBAAgB,GAAG;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAiDF,wBAAgB,uBAAuB,CACtC,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,EACrC,OAAO,EAAE,gBAAgB,GACvB,MAAM,CAkER"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.8.0
2
+ * reroute-js v0.9.1
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -8,5 +8,6 @@
8
8
  * Built with Bun <3
9
9
  */
10
10
  import type { Elysia } from 'elysia';
11
- export declare function registerContentRoutes(app: Elysia, clientDir: string, prefix: string, isWatchMode: boolean): Elysia;
11
+ import type { LRUCache } from 'reroute-js/core';
12
+ export declare function registerContentRoutes(app: Elysia, cwd: string, collectionCache: LRUCache<string, Response>, directive: string, maxAge: number, isWatchMode: boolean): Elysia;
12
13
  //# sourceMappingURL=content.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../../../../packages/elysia/src/routes/content.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIrC,wBAAgB,qBAAqB,CACpC,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,OAAO,GAClB,MAAM,CAkBR"}
1
+ {"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../../../../packages/elysia/src/routes/content.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,wBAAgB,qBAAqB,CACpC,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,eAAe,EAAE,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,EAC3C,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,OAAO,GAClB,MAAM,CAoDR"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.8.0
2
+ * reroute-js v0.9.1
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -1 +1 @@
1
- {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../../../../../packages/elysia/src/routes/dev.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,OAAO,EAAyB,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGvE,wBAAgB,iBAAiB,CAChC,GAAG,EAAE,MAAM,EACX,iBAAiB,EAAE,GAAG,CAAC,+BAA+B,CAAC,EACvD,WAAW,EAAE,OAAO,EACpB,IAAI,CAAC,EAAE;IACN,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC,GACC,MAAM,CAuIR"}
1
+ {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../../../../../packages/elysia/src/routes/dev.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,OAAO,EAAyB,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGvE,wBAAgB,iBAAiB,CAChC,GAAG,EAAE,MAAM,EACX,iBAAiB,EAAE,GAAG,CAAC,+BAA+B,CAAC,EACvD,WAAW,EAAE,OAAO,EACpB,IAAI,CAAC,EAAE;IACN,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC,GACC,MAAM,CA2IR"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.8.0
2
+ * reroute-js v0.9.1
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.8.0
2
+ * reroute-js v0.9.1
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -9,7 +9,7 @@
9
9
  */
10
10
  import type { Elysia } from 'elysia';
11
11
  import type { ReactElement } from 'react';
12
- import { type LRUCache } from 'reroute-js/core';
12
+ import { LRUCache } from 'reroute-js/core';
13
13
  type SSRRouteOptions = {
14
14
  rootComponent: ReactElement;
15
15
  clientDir: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ssr.d.ts","sourceRoot":"","sources":["../../../../../../packages/elysia/src/routes/ssr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAIN,KAAK,QAAQ,EAEb,MAAM,iBAAiB,CAAC;AAGzB,KAAK,eAAe,GAAG;IACtB,aAAa,EAAE,YAAY,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;CACrD,CAAC;AAEF,iBAAS,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,MAAM,CAoKxE;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
1
+ {"version":3,"file":"ssr.d.ts","sourceRoot":"","sources":["../../../../../../packages/elysia/src/routes/ssr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAGN,QAAQ,EAER,MAAM,iBAAiB,CAAC;AAGzB,KAAK,eAAe,GAAG;IACtB,aAAa,EAAE,YAAY,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;CACrD,CAAC;AAEF,iBAAS,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,MAAM,CA4RxE;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.8.0
2
+ * reroute-js v0.9.1
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -8,7 +8,7 @@
8
8
  * Built with Bun <3
9
9
  */
10
10
  import type { Elysia } from 'elysia';
11
- import { type BundleInfo, type LRUCache } from 'reroute-js/core';
11
+ import { type LRUCache } from 'reroute-js/core';
12
12
  type StaticRouteOptions = {
13
13
  clientDir: string;
14
14
  prefix: string;
@@ -16,10 +16,7 @@ type StaticRouteOptions = {
16
16
  directive: string;
17
17
  indexHTML: boolean;
18
18
  staticHeaders?: Record<string, string>;
19
- minify: boolean;
20
- sourcemap: boolean;
21
19
  shouldIgnore: (file: string) => boolean;
22
- bundleCache: Map<string, BundleInfo>;
23
20
  fileCache: LRUCache<string, Response>;
24
21
  isWatchMode?: boolean;
25
22
  };
@@ -1 +1 @@
1
- {"version":3,"file":"static.d.ts","sourceRoot":"","sources":["../../../../../../packages/elysia/src/routes/static.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,OAAO,EACN,KAAK,UAAU,EAIf,KAAK,QAAQ,EAEb,MAAM,iBAAiB,CAAC;AAEzB,KAAK,kBAAkB,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IACxC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACrC,SAAS,EAAE,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACtC,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,iBAAS,oBAAoB,CAC5B,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,kBAAkB,GACzB,MAAM,CAsSR;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
1
+ {"version":3,"file":"static.d.ts","sourceRoot":"","sources":["../../../../../../packages/elysia/src/routes/static.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,OAAO,EAIN,KAAK,QAAQ,EACb,MAAM,iBAAiB,CAAC;AAGzB,KAAK,kBAAkB,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IACxC,SAAS,EAAE,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACtC,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,iBAAS,oBAAoB,CAC5B,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,kBAAkB,GACzB,MAAM,CAoGR;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.8.0
2
+ * reroute-js v0.9.1
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -13,7 +13,6 @@ type RerouteOptions = {
13
13
  head?: string;
14
14
  lang?: string;
15
15
  appId?: string;
16
- entrypoint?: string;
17
16
  /**
18
17
  * Component to render for all HTML document requests.
19
18
  *
@@ -34,11 +33,19 @@ type RerouteOptions = {
34
33
  directive?: string;
35
34
  indexHTML?: boolean;
36
35
  minify?: boolean;
37
- sourcemap?: boolean;
38
36
  imageMaxAge?: number;
39
37
  imageAllowedDomains?: string[];
40
38
  imageMaxWidth?: number;
41
39
  imageMaxHeight?: number;
40
+ /**
41
+ * Cache duration (in seconds) for the main bundle entry point (e.g., index.js).
42
+ * Content-hashed chunks will always use long-term caching (1 year, immutable).
43
+ *
44
+ * @default 3600 (1 hour) - short cache to ensure updates are picked up
45
+ * @example 0 - no caching (dev mode)
46
+ * @example 86400 - 1 day
47
+ */
48
+ bundleMaxAge?: number;
42
49
  };
43
50
  export type { Any, RerouteOptions };
44
51
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../packages/elysia/src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG1C,KAAK,GAAG,GAAG,GAAG,CAAC;AAEf,KAAK,cAAc,GAAG;IAErB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;;;;;OAUG;IACH,GAAG,CAAC,EAAE,YAAY,CAAC;IAGnB,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;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IAGpB,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;CACxB,CAAC;AAEF,YAAY,EAAE,GAAG,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../packages/elysia/src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG1C,KAAK,GAAG,GAAG,GAAG,CAAC;AAEf,KAAK,cAAc,GAAG;IAErB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;;;OAUG;IACH,GAAG,CAAC,EAAE,YAAY,CAAC;IAGnB,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,MAAM,CAAC;IACrB,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IAGxB;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,YAAY,EAAE,GAAG,EAAE,cAAc,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reroute-js",
3
- "version": "0.8.0",
3
+ "version": "0.9.1",
4
4
  "type": "module",
5
5
  "author": "stewones <hi@stewan.io>",
6
6
  "scripts": {
@@ -97,14 +97,14 @@
97
97
  "peerDependencies": {
98
98
  "@mdx-js/mdx": "^3.1.0",
99
99
  "@shikijs/rehype": "^1.0.0",
100
- "elysia": "^1.4.12",
100
+ "elysia": "^1.4.15",
101
101
  "react": "^19.2.0",
102
102
  "react-dom": "^19.2.0",
103
103
  "react-markdown": "^10.1.0",
104
- "remark-gfm": "^4.0.0",
105
104
  "sharp": "^0.34.4",
106
105
  "tailwindcss": "^4.1.16",
107
- "typescript": "^5"
106
+ "typescript": "^5",
107
+ "remark-gfm": "^4.0.1"
108
108
  },
109
109
  "workspaces": [
110
110
  "packages/*",
package/react/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.8.0
2
+ * reroute-js v0.9.1
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
package/react/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.8.0
2
+ * reroute-js v0.9.1
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -10,20 +10,20 @@
10
10
 
11
11
  // packages/react/src/components/ClientOnly.tsx
12
12
  import { useEffect, useState } from "react";
13
- import { jsx, Fragment } from "react/jsx-runtime";
13
+ import { jsxDEV, Fragment } from "react/jsx-dev-runtime";
14
14
  function ClientOnly({ children, fallback = null }) {
15
15
  const [mounted, setMounted] = useState(false);
16
16
  useEffect(() => {
17
17
  setMounted(true);
18
18
  }, []);
19
19
  if (!mounted) {
20
- return /* @__PURE__ */ jsx(Fragment, {
20
+ return /* @__PURE__ */ jsxDEV(Fragment, {
21
21
  children: fallback
22
- });
22
+ }, undefined, false, undefined, this);
23
23
  }
24
- return /* @__PURE__ */ jsx(Fragment, {
24
+ return /* @__PURE__ */ jsxDEV(Fragment, {
25
25
  children
26
- });
26
+ }, undefined, false, undefined, this);
27
27
  }
28
28
  // packages/react/src/components/ContentRoute.tsx
29
29
  import {
@@ -76,7 +76,7 @@ function createResolverFromGetEntry(getEntry) {
76
76
  }
77
77
 
78
78
  // packages/react/src/providers/ContentProvider.tsx
79
- import { jsx as jsx2 } from "react/jsx-runtime";
79
+ import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
80
80
  var ContentRegistryContext = createContext(null);
81
81
  var ContentIndexContext = createContext(null);
82
82
  var ContentGetEntryContext = createContext(null);
@@ -153,19 +153,19 @@ function ContentProvider({
153
153
  return;
154
154
  }
155
155
  }, [idx, loadCollection]);
156
- return /* @__PURE__ */ jsx2(ContentRegistryContext.Provider, {
156
+ return /* @__PURE__ */ jsxDEV2(ContentRegistryContext.Provider, {
157
157
  value: resolver,
158
- children: /* @__PURE__ */ jsx2(ContentIndexContext.Provider, {
158
+ children: /* @__PURE__ */ jsxDEV2(ContentIndexContext.Provider, {
159
159
  value: idx,
160
- children: /* @__PURE__ */ jsx2(ContentGetEntryContext.Provider, {
160
+ children: /* @__PURE__ */ jsxDEV2(ContentGetEntryContext.Provider, {
161
161
  value: entryFn,
162
- children: /* @__PURE__ */ jsx2(ContentLoadCollectionContext.Provider, {
162
+ children: /* @__PURE__ */ jsxDEV2(ContentLoadCollectionContext.Provider, {
163
163
  value: ensureCollection,
164
164
  children
165
- })
166
- })
167
- })
168
- });
165
+ }, undefined, false, undefined, this)
166
+ }, undefined, false, undefined, this)
167
+ }, undefined, false, undefined, this)
168
+ }, undefined, false, undefined, this);
169
169
  }
170
170
  function useContentResolver() {
171
171
  return useContext(ContentRegistryContext);
@@ -371,7 +371,7 @@ function applyRouteHead(head) {
371
371
  }
372
372
 
373
373
  // packages/react/src/providers/RouterProvider.tsx
374
- import { jsx as jsx3, jsxs } from "react/jsx-runtime";
374
+ import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
375
375
  var isBrowser2 = typeof window !== "undefined" && typeof window.document !== "undefined";
376
376
  var OutletContext = createContext2(null);
377
377
  var RouterContext = createContext2(null);
@@ -732,50 +732,50 @@ function RouterProvider({
732
732
  let content;
733
733
  if (target) {
734
734
  const Component = target.route.component;
735
- let outletContent = /* @__PURE__ */ jsx3(Component, {});
735
+ let outletContent = /* @__PURE__ */ jsxDEV3(Component, {}, undefined, false, undefined, this);
736
736
  for (let i = matchingLayouts.length - 1;i >= 0; i--) {
737
737
  const Layout = matchingLayouts[i].component;
738
738
  const currentOutlet = outletContent;
739
- outletContent = /* @__PURE__ */ jsx3(OutletContext.Provider, {
739
+ outletContent = /* @__PURE__ */ jsxDEV3(OutletContext.Provider, {
740
740
  value: currentOutlet,
741
- children: /* @__PURE__ */ jsx3(Layout, {})
742
- });
741
+ children: /* @__PURE__ */ jsxDEV3(Layout, {}, undefined, false, undefined, this)
742
+ }, undefined, false, undefined, this);
743
743
  }
744
744
  content = outletContent;
745
745
  } else {
746
746
  const Fallback = notFoundResolver(location.pathname) || NotFound;
747
747
  if (Fallback) {
748
- content = /* @__PURE__ */ jsx3(Fallback, {});
748
+ content = /* @__PURE__ */ jsxDEV3(Fallback, {}, undefined, false, undefined, this);
749
749
  } else {
750
- content = /* @__PURE__ */ jsxs("div", {
750
+ content = /* @__PURE__ */ jsxDEV3("div", {
751
751
  style: { padding: "2rem", textAlign: "center" },
752
752
  children: [
753
- /* @__PURE__ */ jsx3("h1", {
753
+ /* @__PURE__ */ jsxDEV3("h1", {
754
754
  children: "404 - Page Not Found"
755
- }),
756
- /* @__PURE__ */ jsxs("p", {
755
+ }, undefined, false, undefined, this),
756
+ /* @__PURE__ */ jsxDEV3("p", {
757
757
  children: [
758
758
  "The page ",
759
759
  location.pathname,
760
760
  " could not be found."
761
761
  ]
762
- }),
763
- /* @__PURE__ */ jsx3("a", {
762
+ }, undefined, true, undefined, this),
763
+ /* @__PURE__ */ jsxDEV3("a", {
764
764
  href: "/",
765
765
  children: "Go Home"
766
- })
766
+ }, undefined, false, undefined, this)
767
767
  ]
768
- });
768
+ }, undefined, true, undefined, this);
769
769
  }
770
770
  }
771
- return /* @__PURE__ */ jsx3(RouterContext.Provider, {
771
+ return /* @__PURE__ */ jsxDEV3(RouterContext.Provider, {
772
772
  value: contextValue,
773
773
  children: children || content
774
- });
774
+ }, undefined, false, undefined, this);
775
775
  }
776
776
 
777
777
  // packages/react/src/providers/RerouteProvider.tsx
778
- import { jsx as jsx4 } from "react/jsx-runtime";
778
+ import { jsxDEV as jsxDEV4 } from "react/jsx-dev-runtime";
779
779
  function RerouteProvider({
780
780
  from,
781
781
  children
@@ -794,11 +794,11 @@ function RerouteProvider({
794
794
  scrollRestoration
795
795
  } = from;
796
796
  const loader = loadContent || (contentBaseUrl ? (c) => import(`${contentBaseUrl}/${c}.js`) : undefined);
797
- return /* @__PURE__ */ jsx4(ContentProvider, {
797
+ return /* @__PURE__ */ jsxDEV4(ContentProvider, {
798
798
  getEntry: getContentEntry,
799
799
  byCollection: byCollection || null,
800
800
  loadCollection: loader,
801
- children: /* @__PURE__ */ jsx4(RouterProvider, {
801
+ children: /* @__PURE__ */ jsxDEV4(RouterProvider, {
802
802
  layouts,
803
803
  matchRoute,
804
804
  notFoundRoutes,
@@ -807,8 +807,8 @@ function RerouteProvider({
807
807
  viewTransitions,
808
808
  scrollRestoration,
809
809
  children
810
- })
811
- });
810
+ }, undefined, false, undefined, this)
811
+ }, undefined, false, undefined, this);
812
812
  }
813
813
  // packages/react/src/hooks/useRouter.tsx
814
814
  function useRouter() {
@@ -906,7 +906,7 @@ function useSearchParams() {
906
906
  return searchParams;
907
907
  }
908
908
  // packages/react/src/components/ContentRoute.tsx
909
- import { jsx as jsx5 } from "react/jsx-runtime";
909
+ import { jsxDEV as jsxDEV5 } from "react/jsx-dev-runtime";
910
910
  function toComponent(x) {
911
911
  if (typeof x === "function")
912
912
  return x;
@@ -1044,11 +1044,11 @@ function ContentRoute({
1044
1044
  console.groupEnd();
1045
1045
  } catch {}
1046
1046
  }, [key]);
1047
- return /* @__PURE__ */ jsx5("div", {
1047
+ return /* @__PURE__ */ jsxDEV5("div", {
1048
1048
  "data-reroute": "content",
1049
1049
  ref: containerRef,
1050
- children: /* @__PURE__ */ jsx5(Comp, {})
1051
- });
1050
+ children: /* @__PURE__ */ jsxDEV5(Comp, {}, undefined, false, undefined, this)
1051
+ }, undefined, false, undefined, this);
1052
1052
  }
1053
1053
  // packages/react/src/components/Image.tsx
1054
1054
  import {
@@ -1056,7 +1056,7 @@ import {
1056
1056
  useRef as useRef2,
1057
1057
  useState as useState6
1058
1058
  } from "react";
1059
- import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
1059
+ import { jsxDEV as jsxDEV6 } from "react/jsx-dev-runtime";
1060
1060
  var DEFAULT_DEVICE_SIZES = [640, 750, 828, 1080, 1200, 1920, 2048, 3840];
1061
1061
  function generateSrcSet(src, width, quality, format, loader) {
1062
1062
  const sizes = width ? DEFAULT_DEVICE_SIZES.filter((size) => size <= width * 2) : DEFAULT_DEVICE_SIZES;
@@ -1181,7 +1181,7 @@ function Image({
1181
1181
  };
1182
1182
  const loadingAttr = priority ? "eager" : "lazy";
1183
1183
  const placeholderSrc = placeholder === "blur" && blurDataURL ? blurDataURL : undefined;
1184
- return /* @__PURE__ */ jsxs2("span", {
1184
+ return /* @__PURE__ */ jsxDEV6("span", {
1185
1185
  style: {
1186
1186
  position: "relative",
1187
1187
  display: "flex",
@@ -1191,7 +1191,7 @@ function Image({
1191
1191
  height: "100%"
1192
1192
  },
1193
1193
  children: [
1194
- showSpinner && !isLoaded && !hasError && /* @__PURE__ */ jsx6("div", {
1194
+ showSpinner && !isLoaded && !hasError && /* @__PURE__ */ jsxDEV6("div", {
1195
1195
  style: {
1196
1196
  position: "absolute",
1197
1197
  inset: 0,
@@ -1202,7 +1202,7 @@ function Image({
1202
1202
  zIndex: 1,
1203
1203
  pointerEvents: "none"
1204
1204
  },
1205
- children: spinner || /* @__PURE__ */ jsx6("div", {
1205
+ children: spinner || /* @__PURE__ */ jsxDEV6("div", {
1206
1206
  style: {
1207
1207
  width: `${spinnerSize}px`,
1208
1208
  height: `${spinnerSize}px`,
@@ -1211,9 +1211,9 @@ function Image({
1211
1211
  borderRadius: "50%",
1212
1212
  animation: "reroute-spin 0.8s linear infinite"
1213
1213
  }
1214
- })
1215
- }),
1216
- placeholder === "blur" && placeholderSrc && !isLoaded && !hasError && /* @__PURE__ */ jsx6("img", {
1214
+ }, undefined, false, undefined, this)
1215
+ }, undefined, false, undefined, this),
1216
+ placeholder === "blur" && placeholderSrc && !isLoaded && !hasError && /* @__PURE__ */ jsxDEV6("img", {
1217
1217
  src: placeholderSrc,
1218
1218
  alt: "",
1219
1219
  "aria-hidden": "true",
@@ -1227,8 +1227,8 @@ function Image({
1227
1227
  transform: "scale(1.1)",
1228
1228
  zIndex: -1
1229
1229
  }
1230
- }),
1231
- /* @__PURE__ */ jsx6("img", {
1230
+ }, undefined, false, undefined, this),
1231
+ /* @__PURE__ */ jsxDEV6("img", {
1232
1232
  ref: imgRef,
1233
1233
  src: priority || supportsNativeLazyLoading() ? imageUrl : undefined,
1234
1234
  "data-src": !priority && !supportsNativeLazyLoading() ? imageUrl : undefined,
@@ -1245,21 +1245,21 @@ function Image({
1245
1245
  style: imgStyle,
1246
1246
  className,
1247
1247
  ...props
1248
- }),
1249
- showSpinner && !isLoaded && /* @__PURE__ */ jsx6("style", {
1248
+ }, undefined, false, undefined, this),
1249
+ showSpinner && !isLoaded && /* @__PURE__ */ jsxDEV6("style", {
1250
1250
  children: `
1251
1251
  @keyframes reroute-spin {
1252
1252
  0% { transform: rotate(0deg); }
1253
1253
  100% { transform: rotate(360deg); }
1254
1254
  }
1255
1255
  `
1256
- })
1256
+ }, undefined, false, undefined, this)
1257
1257
  ]
1258
- });
1258
+ }, undefined, true, undefined, this);
1259
1259
  }
1260
1260
  // packages/react/src/components/Link.tsx
1261
1261
  import { useCallback as useCallback4, useContext as useContext3, useMemo as useMemo6 } from "react";
1262
- import { jsx as jsx7 } from "react/jsx-runtime";
1262
+ import { jsxDEV as jsxDEV7 } from "react/jsx-dev-runtime";
1263
1263
  function Link({
1264
1264
  to,
1265
1265
  replace,
@@ -1475,17 +1475,17 @@ function Link({
1475
1475
  matchRoute
1476
1476
  ]);
1477
1477
  const href = fragment ? `${to}#${fragment}` : to;
1478
- return /* @__PURE__ */ jsx7("a", {
1478
+ return /* @__PURE__ */ jsxDEV7("a", {
1479
1479
  href,
1480
1480
  onClick: handleClick,
1481
1481
  onMouseEnter: handleMouseEnter,
1482
1482
  onFocus: handleFocus,
1483
1483
  ...props
1484
- });
1484
+ }, undefined, false, undefined, this);
1485
1485
  }
1486
1486
  // packages/react/src/components/Markdown.tsx
1487
1487
  import ReactMarkdownLib from "react-markdown";
1488
- import { jsx as jsx8 } from "react/jsx-runtime";
1488
+ import { jsxDEV as jsxDEV8 } from "react/jsx-dev-runtime";
1489
1489
  function Markdown({
1490
1490
  children,
1491
1491
  className,
@@ -1496,25 +1496,38 @@ function Markdown({
1496
1496
  }) {
1497
1497
  const finalRemarkPlugins = [...remarkPlugins];
1498
1498
  const finalRehypePlugins = [...rehypePlugins];
1499
- return /* @__PURE__ */ jsx8("div", {
1499
+ return /* @__PURE__ */ jsxDEV8("div", {
1500
1500
  className,
1501
- children: /* @__PURE__ */ jsx8(ReactMarkdownLib, {
1501
+ children: /* @__PURE__ */ jsxDEV8(ReactMarkdownLib, {
1502
1502
  remarkPlugins: finalRemarkPlugins,
1503
1503
  rehypePlugins: finalRehypePlugins,
1504
1504
  skipHtml,
1505
1505
  components,
1506
1506
  children
1507
- })
1508
- });
1507
+ }, undefined, false, undefined, this)
1508
+ }, undefined, false, undefined, this);
1509
1509
  }
1510
1510
  // packages/react/src/components/Outlet.tsx
1511
1511
  import { useContext as useContext4 } from "react";
1512
- import { jsx as jsx9, Fragment as Fragment2 } from "react/jsx-runtime";
1512
+ import { jsxDEV as jsxDEV9, Fragment as Fragment2 } from "react/jsx-dev-runtime";
1513
1513
  function Outlet() {
1514
1514
  const outletContent = useContext4(OutletContext);
1515
- return /* @__PURE__ */ jsx9(Fragment2, {
1515
+ return /* @__PURE__ */ jsxDEV9(Fragment2, {
1516
1516
  children: outletContent
1517
- });
1517
+ }, undefined, false, undefined, this);
1518
+ }
1519
+ // packages/react/src/utils/lazy-route.tsx
1520
+ var isBrowser3 = typeof window !== "undefined";
1521
+ function createLazyRoute(eagerComponent, _lazyImport, _routePattern) {
1522
+ if (!isBrowser3) {
1523
+ return eagerComponent;
1524
+ }
1525
+ return eagerComponent;
1526
+ }
1527
+ async function preloadRoute(lazyImport) {
1528
+ try {
1529
+ await lazyImport();
1530
+ } catch {}
1518
1531
  }
1519
1532
  export {
1520
1533
  useSearchParams,
@@ -1527,9 +1540,11 @@ export {
1527
1540
  useContentIndex,
1528
1541
  useContentGetEntry,
1529
1542
  useContent,
1543
+ preloadRoute,
1530
1544
  prefetchContent,
1531
1545
  parseContentHref,
1532
1546
  createResolverFromGetEntry,
1547
+ createLazyRoute,
1533
1548
  applySsrHead,
1534
1549
  applyRouteHead,
1535
1550
  applyPageMeta,
@@ -1547,4 +1562,4 @@ export {
1547
1562
  ClientOnly
1548
1563
  };
1549
1564
 
1550
- //# debugId=6F9715D8ABB0C6EE64756E2164756E21
1565
+ //# debugId=09A573A10679F94864756E2164756E21