olova 2.0.57 → 2.0.59
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/dist/entry-worker.cjs.map +1 -1
- package/dist/entry-worker.js.map +1 -1
- package/dist/main.cjs +30 -5
- package/dist/main.cjs.map +1 -1
- package/dist/main.js +29 -4
- package/dist/main.js.map +1 -1
- package/dist/olova.cjs +1 -1
- package/dist/olova.cjs.map +1 -1
- package/package.json +34 -18
- package/main.tsx +0 -76
- package/olova.ts +0 -619
- package/src/entry-server.tsx +0 -165
- package/src/entry-worker.tsx +0 -201
- package/src/generator/index.ts +0 -409
- package/src/hydration/flight.ts +0 -320
- package/src/hydration/index.ts +0 -12
- package/src/hydration/types.ts +0 -225
- package/src/logger.ts +0 -182
- package/src/main.tsx +0 -24
- package/src/performance.ts +0 -488
- package/src/plugin/index.ts +0 -204
- package/src/router/ErrorBoundary.tsx +0 -145
- package/src/router/Link.tsx +0 -117
- package/src/router/OlovaRouter.tsx +0 -354
- package/src/router/Outlet.tsx +0 -8
- package/src/router/context.ts +0 -117
- package/src/router/index.ts +0 -29
- package/src/router/matching.ts +0 -63
- package/src/router/router.tsx +0 -23
- package/src/router/search-params.ts +0 -29
- package/src/scanner/index.ts +0 -116
- package/src/types/index.ts +0 -191
- package/src/utils/export.ts +0 -85
- package/src/utils/index.ts +0 -4
- package/src/utils/naming.ts +0 -54
- package/src/utils/path.ts +0 -45
- package/tsup.config.ts +0 -35
package/package.json
CHANGED
|
@@ -1,24 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "olova",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.59",
|
|
4
4
|
"description": "Vite plugin for Olova SSR/SSG framework with React",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "./olova.
|
|
7
|
-
"module": "./olova.
|
|
8
|
-
"types": "./olova.ts",
|
|
6
|
+
"main": "./dist/olova.cjs",
|
|
7
|
+
"module": "./dist/olova.js",
|
|
8
|
+
"types": "./dist/olova.d.ts",
|
|
9
9
|
"exports": {
|
|
10
|
-
".":
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"./
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/olova.d.ts",
|
|
12
|
+
"import": "./dist/olova.js",
|
|
13
|
+
"require": "./dist/olova.cjs"
|
|
14
|
+
},
|
|
15
|
+
"./vite": {
|
|
16
|
+
"types": "./dist/olova.d.ts",
|
|
17
|
+
"import": "./dist/olova.js",
|
|
18
|
+
"require": "./dist/olova.cjs"
|
|
19
|
+
},
|
|
20
|
+
"./main": {
|
|
21
|
+
"import": "./dist/main.js",
|
|
22
|
+
"require": "./dist/main.cjs"
|
|
23
|
+
},
|
|
24
|
+
"./entry-server": {
|
|
25
|
+
"import": "./dist/entry-server.js",
|
|
26
|
+
"require": "./dist/entry-server.cjs"
|
|
27
|
+
},
|
|
28
|
+
"./entry-worker": {
|
|
29
|
+
"import": "./dist/entry-worker.js",
|
|
30
|
+
"require": "./dist/entry-worker.cjs"
|
|
31
|
+
},
|
|
32
|
+
"./router": {
|
|
33
|
+
"types": "./dist/router.d.ts",
|
|
34
|
+
"import": "./dist/router.js",
|
|
35
|
+
"require": "./dist/router.cjs"
|
|
36
|
+
}
|
|
16
37
|
},
|
|
17
38
|
"files": [
|
|
18
|
-
"dist"
|
|
19
|
-
"src",
|
|
20
|
-
"*.ts",
|
|
21
|
-
"*.tsx"
|
|
39
|
+
"dist"
|
|
22
40
|
],
|
|
23
41
|
"scripts": {
|
|
24
42
|
"build": "tsup",
|
|
@@ -56,10 +74,8 @@
|
|
|
56
74
|
"vite": "^7.2.4"
|
|
57
75
|
},
|
|
58
76
|
"dependencies": {
|
|
59
|
-
"
|
|
77
|
+
"picocolors": "^1.1.1",
|
|
60
78
|
"@mdx-js/react": "^3.1.1",
|
|
61
|
-
"@mdx-js/rollup": "^3.1.1"
|
|
62
|
-
"@tanstack/react-query": "^5.90.21",
|
|
63
|
-
"picocolors": "^1.1.1"
|
|
79
|
+
"@mdx-js/rollup": "^3.1.1"
|
|
64
80
|
}
|
|
65
81
|
}
|
package/main.tsx
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck - Path aliases resolved by Vite at runtime; tsconfig conflicts with plugins/tsconfig.json
|
|
2
|
-
import "@/index.css";
|
|
3
|
-
import { notFoundPages, OlovaRouter, layouts as originalLayouts, Outlet, routes } from '@/route.tree';
|
|
4
|
-
import { StrictMode } from 'react';
|
|
5
|
-
import { hydrateRoot } from 'react-dom/client';
|
|
6
|
-
import { QueryClient, QueryClientProvider, HydrationBoundary } from '@tanstack/react-query';
|
|
7
|
-
|
|
8
|
-
// Wrapper to support "children" prop style layouts (Next.js style)
|
|
9
|
-
const layouts = originalLayouts.map((item: any) => ({
|
|
10
|
-
...item,
|
|
11
|
-
layout: (props: any) => (
|
|
12
|
-
<item.layout {...props}>
|
|
13
|
-
<Outlet />
|
|
14
|
-
</item.layout>
|
|
15
|
-
)
|
|
16
|
-
}));
|
|
17
|
-
|
|
18
|
-
const isBrowser = typeof window !== 'undefined' && !(import.meta as any).env.SSR;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Get the global $OLOVA object (populated by Flight runtime)
|
|
22
|
-
*/
|
|
23
|
-
function getOlova(): any {
|
|
24
|
-
if (typeof globalThis === 'undefined') return null;
|
|
25
|
-
return (globalThis as any).$OLOVA || null;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Get TanStack Query state from Flight hydration
|
|
30
|
-
*/
|
|
31
|
-
function getQueryState(): any {
|
|
32
|
-
const olova = getOlova();
|
|
33
|
-
return olova?.$query?.state || null;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Get loader data from Flight hydration
|
|
38
|
-
*/
|
|
39
|
-
function getLoaderData(): any {
|
|
40
|
-
const olova = getOlova();
|
|
41
|
-
return olova?.$loader?.data || null;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
if (isBrowser) {
|
|
45
|
-
// Dev logging
|
|
46
|
-
if (import.meta.env?.DEV) {
|
|
47
|
-
const olova = getOlova();
|
|
48
|
-
if (olova) {
|
|
49
|
-
console.log('[Olova] Flight hydrated:', Object.keys(olova));
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// Get pre-hydrated state from Flight runtime
|
|
54
|
-
const queryState = getQueryState();
|
|
55
|
-
|
|
56
|
-
// Create QueryClient
|
|
57
|
-
const queryClient = new QueryClient({
|
|
58
|
-
defaultOptions: {
|
|
59
|
-
queries: {
|
|
60
|
-
staleTime: 1000 * 60 * 5,
|
|
61
|
-
gcTime: 1000 * 60 * 30,
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
// Hydrate with pre-loaded state
|
|
67
|
-
hydrateRoot(document, (
|
|
68
|
-
<StrictMode>
|
|
69
|
-
<QueryClientProvider client={queryClient}>
|
|
70
|
-
<HydrationBoundary state={queryState || {}}>
|
|
71
|
-
<OlovaRouter routes={routes} layouts={layouts} notFoundPages={notFoundPages} />
|
|
72
|
-
</HydrationBoundary>
|
|
73
|
-
</QueryClientProvider>
|
|
74
|
-
</StrictMode>
|
|
75
|
-
));
|
|
76
|
-
}
|