reroute-js 0.4.4 → 0.5.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 (81) hide show
  1. package/cli/bin.d.ts +1 -1
  2. package/cli/bin.js +6 -6
  3. package/cli/bin.js.map +1 -1
  4. package/cli/index.d.ts +1 -1
  5. package/cli/index.js +2 -2
  6. package/cli/index.js.map +1 -1
  7. package/cli/src/cli.d.ts +1 -1
  8. package/cli/src/commands/boot.d.ts +1 -1
  9. package/cli/src/commands/gen.d.ts +1 -1
  10. package/cli/src/commands/init.d.ts +1 -1
  11. package/cli/src/libs/index.d.ts +1 -1
  12. package/cli/src/libs/tailwind.d.ts +1 -1
  13. package/cli/src/libs/version.d.ts +1 -1
  14. package/core/index.d.ts +1 -1
  15. package/core/index.js +2 -2
  16. package/core/index.js.map +1 -1
  17. package/core/src/bundler/hash.d.ts +1 -1
  18. package/core/src/bundler/index.d.ts +1 -1
  19. package/core/src/bundler/transpile.d.ts +1 -1
  20. package/core/src/content/discovery.d.ts +1 -1
  21. package/core/src/content/index.d.ts +1 -1
  22. package/core/src/content/metadata.d.ts +1 -1
  23. package/core/src/content/registry.d.ts +1 -1
  24. package/core/src/index.d.ts +1 -1
  25. package/core/src/ssr/data.d.ts +1 -1
  26. package/core/src/ssr/index.d.ts +1 -1
  27. package/core/src/ssr/modules.d.ts +1 -1
  28. package/core/src/ssr/render.d.ts +1 -1
  29. package/core/src/ssr/seed.d.ts +1 -1
  30. package/core/src/template/html.d.ts +1 -1
  31. package/core/src/template/index.d.ts +1 -1
  32. package/core/src/types.d.ts +1 -1
  33. package/core/src/utils/cache.d.ts +1 -1
  34. package/core/src/utils/compression.d.ts +1 -1
  35. package/core/src/utils/index.d.ts +1 -1
  36. package/core/src/utils/mime.d.ts +1 -1
  37. package/core/src/utils/path.d.ts +1 -1
  38. package/elysia/index.d.ts +1 -1
  39. package/elysia/index.js +2 -2
  40. package/elysia/index.js.map +1 -1
  41. package/elysia/src/index.d.ts +1 -1
  42. package/elysia/src/libs/http.d.ts +1 -1
  43. package/elysia/src/libs/image.d.ts +1 -1
  44. package/elysia/src/plugin.d.ts +1 -1
  45. package/elysia/src/routes/artifacts.d.ts +1 -1
  46. package/elysia/src/routes/content.d.ts +1 -1
  47. package/elysia/src/routes/dev.d.ts +1 -1
  48. package/elysia/src/routes/image.d.ts +1 -1
  49. package/elysia/src/routes/ssr.d.ts +1 -1
  50. package/elysia/src/routes/static.d.ts +1 -1
  51. package/elysia/src/types.d.ts +1 -1
  52. package/package.json +1 -1
  53. package/react/index.d.ts +1 -1
  54. package/react/index.js +75 -57
  55. package/react/index.js.map +4 -3
  56. package/react/src/components/ClientOnly.d.ts +31 -0
  57. package/react/src/components/ClientOnly.d.ts.map +1 -0
  58. package/react/src/components/ContentRoute.d.ts +1 -1
  59. package/react/src/components/Image.d.ts +1 -1
  60. package/react/src/components/Link.d.ts +1 -1
  61. package/react/src/components/Outlet.d.ts +1 -1
  62. package/react/src/components/index.d.ts +2 -1
  63. package/react/src/components/index.d.ts.map +1 -1
  64. package/react/src/hooks/index.d.ts +1 -1
  65. package/react/src/hooks/useContent.d.ts +1 -1
  66. package/react/src/hooks/useData.d.ts +1 -1
  67. package/react/src/hooks/useNavigate.d.ts +1 -1
  68. package/react/src/hooks/useParams.d.ts +1 -1
  69. package/react/src/hooks/useRouter.d.ts +1 -1
  70. package/react/src/hooks/useSearchParams.d.ts +1 -1
  71. package/react/src/index.d.ts +1 -1
  72. package/react/src/providers/ContentProvider.d.ts +1 -1
  73. package/react/src/providers/RerouteProvider.d.ts +1 -1
  74. package/react/src/providers/RouterProvider.d.ts +1 -1
  75. package/react/src/providers/index.d.ts +1 -1
  76. package/react/src/types/any.d.ts +1 -1
  77. package/react/src/types/index.d.ts +1 -1
  78. package/react/src/types/router.d.ts +1 -1
  79. package/react/src/utils/content.d.ts +1 -1
  80. package/react/src/utils/head.d.ts +1 -1
  81. package/react/src/utils/index.d.ts +1 -1
@@ -0,0 +1,31 @@
1
+ /**
2
+ * reroute-js v0.5.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 { ReactNode } from 'react';
11
+ interface ClientOnlyProps {
12
+ children: ReactNode;
13
+ fallback?: ReactNode;
14
+ }
15
+ /**
16
+ * ClientOnly component that only renders its children on the client-side.
17
+ * Useful for components that cause hydration mismatches due to:
18
+ * - Using Date.now(), Math.random(), or other dynamic values
19
+ * - Browser-specific APIs (localStorage, window, etc.)
20
+ * - Time-sensitive data that changes between server and client render
21
+ *
22
+ * @example
23
+ * ```tsx
24
+ * <ClientOnly fallback={<div>Loading...</div>}>
25
+ * <CountdownTimer />
26
+ * </ClientOnly>
27
+ * ```
28
+ */
29
+ declare function ClientOnly({ children, fallback }: ClientOnlyProps): import("react/jsx-runtime").JSX.Element;
30
+ export { ClientOnly };
31
+ //# sourceMappingURL=ClientOnly.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClientOnly.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/components/ClientOnly.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,UAAU,eAAe;IACxB,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;GAaG;AACH,iBAAS,UAAU,CAAC,EAAE,QAAQ,EAAE,QAAe,EAAE,EAAE,eAAe,2CAYjE;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.4.4
2
+ * reroute-js v0.5.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.4.4
2
+ * reroute-js v0.5.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.4.4
2
+ * reroute-js v0.5.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.4.4
2
+ * reroute-js v0.5.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.4.4
2
+ * reroute-js v0.5.0
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -7,6 +7,7 @@
7
7
  *
8
8
  * Built with Bun <3
9
9
  */
10
+ export * from './ClientOnly';
10
11
  export * from './ContentRoute';
11
12
  export * from './Image';
12
13
  export * from './Link';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.4.4
2
+ * reroute-js v0.5.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.4.4
2
+ * reroute-js v0.5.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.4.4
2
+ * reroute-js v0.5.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.4.4
2
+ * reroute-js v0.5.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.4.4
2
+ * reroute-js v0.5.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.4.4
2
+ * reroute-js v0.5.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.4.4
2
+ * reroute-js v0.5.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.4.4
2
+ * reroute-js v0.5.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.4.4
2
+ * reroute-js v0.5.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.4.4
2
+ * reroute-js v0.5.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.4.4
2
+ * reroute-js v0.5.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.4.4
2
+ * reroute-js v0.5.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.4.4
2
+ * reroute-js v0.5.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.4.4
2
+ * reroute-js v0.5.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.4.4
2
+ * reroute-js v0.5.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.4.4
2
+ * reroute-js v0.5.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.4.4
2
+ * reroute-js v0.5.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.4.4
2
+ * reroute-js v0.5.0
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>