reroute-js 0.9.0 → 0.9.2
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.
- package/_/basic/package.json +1 -0
- package/_/basic/src/client/index.html +0 -1
- package/_/blog/package.json +1 -0
- package/_/store/package.json +1 -0
- package/cli/bin.d.ts +1 -1
- package/cli/bin.js +558 -674
- package/cli/bin.js.map +19 -24
- package/cli/index.d.ts +1 -1
- package/cli/index.js +47 -24
- package/cli/index.js.map +5 -5
- package/cli/src/cli.d.ts +1 -1
- package/cli/src/commands/analyze.d.ts +1 -1
- package/cli/src/commands/build.d.ts +3 -4
- package/cli/src/commands/build.d.ts.map +1 -1
- package/cli/src/commands/dev.d.ts +2 -3
- package/cli/src/commands/dev.d.ts.map +1 -1
- package/cli/src/commands/gen.d.ts +1 -1
- package/cli/src/commands/gen.d.ts.map +1 -1
- package/cli/src/commands/init.d.ts +1 -1
- package/cli/src/commands/start.d.ts +3 -4
- package/cli/src/commands/start.d.ts.map +1 -1
- package/cli/src/libs/command.d.ts +1 -1
- package/cli/src/libs/index.d.ts +1 -1
- package/cli/src/libs/log.d.ts +1 -1
- package/cli/src/libs/log.d.ts.map +1 -1
- package/cli/src/libs/markdown-processor.d.ts +2 -1
- package/cli/src/libs/markdown-processor.d.ts.map +1 -1
- package/cli/src/libs/markdown.d.ts +1 -1
- package/cli/src/libs/production.d.ts +1 -1
- package/cli/src/libs/server.d.ts +18 -0
- package/cli/src/libs/server.d.ts.map +1 -0
- package/cli/src/libs/tailwind.d.ts +2 -2
- package/cli/src/libs/tailwind.d.ts.map +1 -1
- package/cli/src/libs/version.d.ts +1 -1
- package/core/index.d.ts +1 -1
- package/core/index.js +99 -410
- package/core/index.js.map +7 -10
- package/core/src/bundler/hash.d.ts +1 -1
- package/core/src/bundler/index.d.ts +1 -2
- package/core/src/bundler/index.d.ts.map +1 -1
- package/core/src/content/discovery.d.ts +1 -3
- package/core/src/content/discovery.d.ts.map +1 -1
- package/core/src/content/index.d.ts +1 -2
- package/core/src/content/index.d.ts.map +1 -1
- package/core/src/content/metadata.d.ts +1 -1
- package/core/src/index.d.ts +1 -1
- package/core/src/ssr/data.d.ts +1 -1
- package/core/src/ssr/index.d.ts +1 -1
- package/core/src/ssr/modules.d.ts +1 -1
- package/core/src/ssr/render.d.ts +1 -1
- package/core/src/ssr/render.d.ts.map +1 -1
- package/core/src/ssr/seed.d.ts +1 -1
- package/core/src/template/html.d.ts +1 -1
- package/core/src/template/index.d.ts +1 -1
- package/core/src/types.d.ts +2 -22
- package/core/src/types.d.ts.map +1 -1
- package/core/src/utils/cache.d.ts +1 -1
- package/core/src/utils/compression.d.ts +1 -1
- package/core/src/utils/compression.d.ts.map +1 -1
- package/core/src/utils/index.d.ts +1 -1
- package/core/src/utils/mime.d.ts +1 -1
- package/core/src/utils/path.d.ts +1 -1
- package/elysia/index.d.ts +1 -1
- package/elysia/index.js +300 -773
- package/elysia/index.js.map +14 -17
- package/elysia/src/index.d.ts +1 -1
- package/elysia/src/libs/cache.d.ts +14 -0
- package/elysia/src/libs/cache.d.ts.map +1 -0
- package/elysia/src/libs/http.d.ts +1 -1
- package/elysia/src/libs/image.d.ts +1 -1
- package/elysia/src/libs/image.d.ts.map +1 -1
- package/elysia/src/plugin.d.ts +1 -1
- package/elysia/src/plugin.d.ts.map +1 -1
- package/elysia/src/routes/artifacts.d.ts +9 -2
- package/elysia/src/routes/artifacts.d.ts.map +1 -1
- package/elysia/src/routes/content.d.ts +3 -2
- package/elysia/src/routes/content.d.ts.map +1 -1
- package/elysia/src/routes/dev.d.ts +1 -1
- package/elysia/src/routes/dev.d.ts.map +1 -1
- package/elysia/src/routes/image.d.ts +1 -1
- package/elysia/src/routes/ssr.d.ts +1 -1
- package/elysia/src/routes/ssr.d.ts.map +1 -1
- package/elysia/src/routes/static.d.ts +2 -5
- package/elysia/src/routes/static.d.ts.map +1 -1
- package/elysia/src/types.d.ts +10 -3
- package/elysia/src/types.d.ts.map +1 -1
- package/package.json +4 -4
- package/react/index.d.ts +1 -1
- package/react/index.js +17 -2
- package/react/index.js.map +5 -4
- package/react/src/components/ClientOnly.d.ts +1 -1
- package/react/src/components/ContentRoute.d.ts +1 -1
- package/react/src/components/Image.d.ts +1 -1
- package/react/src/components/Link.d.ts +1 -1
- package/react/src/components/Markdown.d.ts +1 -1
- package/react/src/components/Outlet.d.ts +1 -1
- package/react/src/components/index.d.ts +1 -1
- package/react/src/hooks/index.d.ts +1 -1
- package/react/src/hooks/useContent.d.ts +1 -1
- package/react/src/hooks/useData.d.ts +1 -1
- package/react/src/hooks/useNavigate.d.ts +1 -1
- package/react/src/hooks/useParams.d.ts +1 -1
- package/react/src/hooks/useRouter.d.ts +1 -1
- package/react/src/hooks/useSearchParams.d.ts +1 -1
- package/react/src/index.d.ts +1 -1
- package/react/src/providers/ContentProvider.d.ts +1 -1
- package/react/src/providers/RerouteProvider.d.ts +1 -1
- package/react/src/providers/RouterProvider.d.ts +1 -1
- package/react/src/providers/index.d.ts +1 -1
- package/react/src/types/any.d.ts +1 -1
- package/react/src/types/index.d.ts +1 -1
- package/react/src/types/router.d.ts +1 -1
- package/react/src/utils/content.d.ts +1 -1
- package/react/src/utils/head.d.ts +1 -1
- package/react/src/utils/index.d.ts +2 -1
- package/react/src/utils/index.d.ts.map +1 -1
- package/react/src/utils/lazy-route.d.ts +41 -0
- package/react/src/utils/lazy-route.d.ts.map +1 -0
- package/cli/src/commands/boot.d.ts +0 -18
- package/cli/src/commands/boot.d.ts.map +0 -1
- package/core/src/bundler/transpile.d.ts +0 -14
- package/core/src/bundler/transpile.d.ts.map +0 -1
- package/core/src/content/registry.d.ts +0 -11
- package/core/src/content/registry.d.ts.map +0 -1
package/react/src/index.d.ts
CHANGED
package/react/src/types/any.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* reroute-js v0.9.
|
|
2
|
+
* reroute-js v0.9.2
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @copyright 2025 stewones <hi@stewan.io>
|
|
@@ -9,4 +9,5 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export * from './content';
|
|
11
11
|
export * from './head';
|
|
12
|
+
export * from './lazy-route';
|
|
12
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* reroute-js v0.9.2
|
|
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
|
+
import type { Any } from '../types/any';
|
|
12
|
+
/**
|
|
13
|
+
* Creates a route component that:
|
|
14
|
+
* - Loads synchronously during SSR and hydration
|
|
15
|
+
* - Lazy loads for subsequent client-side navigation
|
|
16
|
+
*
|
|
17
|
+
* This approach ensures no hydration mismatches by always using eager components
|
|
18
|
+
* for the initial render, and only using lazy loading for subsequent navigations.
|
|
19
|
+
*/
|
|
20
|
+
export declare function createLazyRoute(
|
|
21
|
+
/**
|
|
22
|
+
* Eager import of the route component (for SSR and initial hydration)
|
|
23
|
+
*/
|
|
24
|
+
eagerComponent: ComponentType<Any>,
|
|
25
|
+
/**
|
|
26
|
+
* Function that returns a dynamic import promise (for lazy loading)
|
|
27
|
+
*/
|
|
28
|
+
_lazyImport: () => Promise<{
|
|
29
|
+
default: ComponentType<Any>;
|
|
30
|
+
}>,
|
|
31
|
+
/**
|
|
32
|
+
* The route pattern for cache key
|
|
33
|
+
*/
|
|
34
|
+
_routePattern: string): ComponentType<Any>;
|
|
35
|
+
/**
|
|
36
|
+
* Preload a route component before navigation
|
|
37
|
+
*/
|
|
38
|
+
export declare function preloadRoute(lazyImport: () => Promise<{
|
|
39
|
+
default: ComponentType<Any>;
|
|
40
|
+
}>): Promise<void>;
|
|
41
|
+
//# sourceMappingURL=lazy-route.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazy-route.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/utils/lazy-route.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAOxC;;;;;;;GAOG;AACH,wBAAgB,eAAe;AAC9B;;GAEG;AACH,cAAc,EAAE,aAAa,CAAC,GAAG,CAAC;AAClC;;GAEG;AACH,WAAW,EAAE,MAAM,OAAO,CAAC;IAAE,OAAO,EAAE,aAAa,CAAC,GAAG,CAAC,CAAA;CAAE,CAAC;AAC3D;;GAEG;AACH,aAAa,EAAE,MAAM,GACnB,aAAa,CAAC,GAAG,CAAC,CAUpB;AAED;;GAEG;AACH,wBAAsB,YAAY,CACjC,UAAU,EAAE,MAAM,OAAO,CAAC;IAAE,OAAO,EAAE,aAAa,CAAC,GAAG,CAAC,CAAA;CAAE,CAAC,GACxD,OAAO,CAAC,IAAI,CAAC,CAMf"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* reroute-js v0.9.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
|
-
* Boot command - Initialize .reroute folder with stub files
|
|
12
|
-
*
|
|
13
|
-
* This command creates the .reroute directory with minimal stub files
|
|
14
|
-
* to prevent import errors when running the app for the first time
|
|
15
|
-
* before the gen command has completed.
|
|
16
|
-
*/
|
|
17
|
-
export default function boot(_: string[]): Promise<void>;
|
|
18
|
-
//# sourceMappingURL=boot.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"boot.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/commands/boot.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAmDH,wBAA8B,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,iBAgC7C"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* reroute-js v0.9.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 { BundleInfo, BundleOptions } from '../types';
|
|
11
|
-
export declare function transpileFile(filePath: string, originalPath: string, options: BundleOptions, bundleCache: Map<string, BundleInfo>): Promise<BundleInfo>;
|
|
12
|
-
export declare function getBundleUrlsFor(modules: string | string[], clientDir: string, prefix: string, options: BundleOptions, bundleCache: Map<string, BundleInfo>): Promise<string[]>;
|
|
13
|
-
export declare function getStaticDepsForUrl(entryUrl: string): string[];
|
|
14
|
-
//# sourceMappingURL=transpile.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transpile.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/bundler/transpile.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAmB1D,wBAAsB,aAAa,CAClC,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,aAAa,EACtB,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,GAClC,OAAO,CAAC,UAAU,CAAC,CAyJrB;AAID,wBAAsB,gBAAgB,CACrC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,aAAa,EACtB,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,GAClC,OAAO,CAAC,MAAM,EAAE,CAAC,CA6CnB;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAE9D"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* reroute-js v0.9.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 declare function generateContentRegistry(cwd: string): Promise<void>;
|
|
11
|
-
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/content/registry.ts"],"names":[],"mappings":"AAEA,wBAAsB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAYxE"}
|