olova 2.0.55 → 2.0.56
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/README.md +28 -288
- package/dist/chunk-23UAGQ6N.js +2208 -0
- package/dist/chunk-23UAGQ6N.js.map +1 -0
- package/dist/chunk-D7SIC5TC.js +367 -0
- package/dist/chunk-D7SIC5TC.js.map +1 -0
- package/dist/entry-server.cjs +2341 -0
- package/dist/entry-server.cjs.map +1 -0
- package/dist/entry-server.js +114 -0
- package/dist/entry-server.js.map +1 -0
- package/dist/entry-worker.cjs +2354 -0
- package/dist/entry-worker.cjs.map +1 -0
- package/dist/entry-worker.js +126 -0
- package/dist/entry-worker.js.map +1 -0
- package/dist/main.cjs +18 -0
- package/dist/main.cjs.map +1 -0
- package/dist/main.js +16 -0
- package/dist/main.js.map +1 -0
- package/dist/olova.cjs +1684 -0
- package/dist/olova.cjs.map +1 -0
- package/dist/olova.d.cts +72 -0
- package/dist/olova.d.ts +72 -0
- package/dist/olova.js +1325 -0
- package/dist/olova.js.map +1 -0
- package/dist/performance.cjs +386 -0
- package/dist/performance.cjs.map +1 -0
- package/dist/performance.js +3 -0
- package/dist/performance.js.map +1 -0
- package/dist/router.cjs +646 -0
- package/dist/router.cjs.map +1 -0
- package/dist/router.d.cts +113 -0
- package/dist/router.d.ts +113 -0
- package/dist/router.js +632 -0
- package/dist/router.js.map +1 -0
- package/main.tsx +76 -0
- package/olova.ts +619 -0
- package/package.json +42 -61
- package/src/entry-server.tsx +165 -0
- package/src/entry-worker.tsx +201 -0
- package/src/generator/index.ts +409 -0
- package/src/hydration/flight.ts +320 -0
- package/src/hydration/index.ts +12 -0
- package/src/hydration/types.ts +225 -0
- package/src/logger.ts +182 -0
- package/src/main.tsx +24 -0
- package/src/performance.ts +488 -0
- package/src/plugin/index.ts +204 -0
- package/src/router/ErrorBoundary.tsx +145 -0
- package/src/router/Link.tsx +117 -0
- package/src/router/OlovaRouter.tsx +354 -0
- package/src/router/Outlet.tsx +8 -0
- package/src/router/context.ts +117 -0
- package/src/router/index.ts +29 -0
- package/src/router/matching.ts +63 -0
- package/src/router/router.tsx +23 -0
- package/src/router/search-params.ts +29 -0
- package/src/scanner/index.ts +116 -0
- package/src/types/index.ts +191 -0
- package/src/utils/export.ts +85 -0
- package/src/utils/index.ts +4 -0
- package/src/utils/naming.ts +54 -0
- package/src/utils/path.ts +45 -0
- package/tsup.config.ts +35 -0
- package/CHANGELOG.md +0 -31
- package/LICENSE +0 -21
- package/dist/index.cjs +0 -883
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -138
- package/dist/index.d.ts +0 -138
- package/dist/index.js +0 -832
- package/dist/index.js.map +0 -1
- package/dist/plugin.cjs +0 -927
- package/dist/plugin.cjs.map +0 -1
- package/dist/plugin.d.cts +0 -18
- package/dist/plugin.d.ts +0 -18
- package/dist/plugin.js +0 -894
- package/dist/plugin.js.map +0 -1
- package/dist/ssg.cjs +0 -637
- package/dist/ssg.cjs.map +0 -1
- package/dist/ssg.d.cts +0 -191
- package/dist/ssg.d.ts +0 -191
- package/dist/ssg.js +0 -585
- package/dist/ssg.js.map +0 -1
- package/dist/types-BT6YsBGO.d.cts +0 -143
- package/dist/types-BT6YsBGO.d.ts +0 -143
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
interface RouteSegment {
|
|
2
|
-
path: string;
|
|
3
|
-
isDynamic: boolean;
|
|
4
|
-
isCatchAll: boolean;
|
|
5
|
-
isGroup: boolean;
|
|
6
|
-
paramName?: string;
|
|
7
|
-
}
|
|
8
|
-
interface RouteNode {
|
|
9
|
-
id: string;
|
|
10
|
-
path: string;
|
|
11
|
-
fullPath: string;
|
|
12
|
-
segments: RouteSegment[];
|
|
13
|
-
hasPage: boolean;
|
|
14
|
-
hasLayout: boolean;
|
|
15
|
-
hasLoading: boolean;
|
|
16
|
-
hasError: boolean;
|
|
17
|
-
hasNotFound: boolean;
|
|
18
|
-
children: Map<string, RouteNode>;
|
|
19
|
-
parent?: RouteNode;
|
|
20
|
-
}
|
|
21
|
-
interface RouteMatch {
|
|
22
|
-
route: RouteConfig;
|
|
23
|
-
params: Record<string, string>;
|
|
24
|
-
pathname: string;
|
|
25
|
-
searchParams: URLSearchParams;
|
|
26
|
-
}
|
|
27
|
-
interface RouteConfig {
|
|
28
|
-
id: string;
|
|
29
|
-
path: string;
|
|
30
|
-
fullPath: string;
|
|
31
|
-
component: React.ComponentType<any> | null;
|
|
32
|
-
layout: React.ComponentType<any> | null;
|
|
33
|
-
loading: React.ComponentType<any> | null;
|
|
34
|
-
error: React.ComponentType<any> | null;
|
|
35
|
-
notFound: React.ComponentType<any> | null;
|
|
36
|
-
children: RouteConfig[];
|
|
37
|
-
isDynamic: boolean;
|
|
38
|
-
isCatchAll: boolean;
|
|
39
|
-
paramName?: string;
|
|
40
|
-
/** Parallel route slots (e.g., @team, @analytics) */
|
|
41
|
-
slots?: Record<string, RouteConfig>;
|
|
42
|
-
/** Whether this is a parallel route slot */
|
|
43
|
-
isSlot?: boolean;
|
|
44
|
-
/** Slot name (without @) */
|
|
45
|
-
slotName?: string;
|
|
46
|
-
}
|
|
47
|
-
interface OlovaOptions {
|
|
48
|
-
/** Directory to scan for routes (default: 'src/app') */
|
|
49
|
-
appDir?: string;
|
|
50
|
-
/** File extensions to look for (default: ['.tsx', '.ts', '.jsx', '.js']) */
|
|
51
|
-
extensions?: string[];
|
|
52
|
-
/** Enable SSG pre-rendering (default: false) */
|
|
53
|
-
ssg?: boolean;
|
|
54
|
-
/** Base URL path (default: '/') */
|
|
55
|
-
basePath?: string;
|
|
56
|
-
/** Enable trailing slashes (default: false) */
|
|
57
|
-
trailingSlash?: boolean;
|
|
58
|
-
}
|
|
59
|
-
interface OlovaRouterContextValue {
|
|
60
|
-
pathname: string;
|
|
61
|
-
params: Record<string, string>;
|
|
62
|
-
searchParams: URLSearchParams;
|
|
63
|
-
navigate: (to: string, options?: NavigateOptions) => void;
|
|
64
|
-
replace: (to: string, options?: NavigateOptions) => void;
|
|
65
|
-
back: () => void;
|
|
66
|
-
forward: () => void;
|
|
67
|
-
refresh: () => void;
|
|
68
|
-
prefetch: (href: string) => void;
|
|
69
|
-
isNavigating: boolean;
|
|
70
|
-
}
|
|
71
|
-
interface NavigateOptions {
|
|
72
|
-
scroll?: boolean;
|
|
73
|
-
replace?: boolean;
|
|
74
|
-
}
|
|
75
|
-
interface LayoutProps {
|
|
76
|
-
children: React.ReactNode;
|
|
77
|
-
params: Record<string, string>;
|
|
78
|
-
/** Parallel route slots */
|
|
79
|
-
[slotName: string]: React.ReactNode | Record<string, string>;
|
|
80
|
-
}
|
|
81
|
-
interface PageProps {
|
|
82
|
-
params: Record<string, string>;
|
|
83
|
-
searchParams: Record<string, string>;
|
|
84
|
-
}
|
|
85
|
-
interface ErrorProps {
|
|
86
|
-
error: Error;
|
|
87
|
-
reset: () => void;
|
|
88
|
-
}
|
|
89
|
-
interface LoadingProps {
|
|
90
|
-
}
|
|
91
|
-
interface NotFoundProps {
|
|
92
|
-
}
|
|
93
|
-
interface StaticParams {
|
|
94
|
-
[key: string]: string;
|
|
95
|
-
}
|
|
96
|
-
interface Metadata {
|
|
97
|
-
title?: string;
|
|
98
|
-
description?: string;
|
|
99
|
-
keywords?: string[];
|
|
100
|
-
authors?: Array<{
|
|
101
|
-
name: string;
|
|
102
|
-
url?: string;
|
|
103
|
-
}>;
|
|
104
|
-
robots?: string;
|
|
105
|
-
canonical?: string;
|
|
106
|
-
openGraph?: {
|
|
107
|
-
title?: string;
|
|
108
|
-
description?: string;
|
|
109
|
-
url?: string;
|
|
110
|
-
siteName?: string;
|
|
111
|
-
type?: 'website' | 'article';
|
|
112
|
-
images?: Array<{
|
|
113
|
-
url: string;
|
|
114
|
-
width?: number;
|
|
115
|
-
height?: number;
|
|
116
|
-
alt?: string;
|
|
117
|
-
}>;
|
|
118
|
-
};
|
|
119
|
-
twitter?: {
|
|
120
|
-
card?: 'summary' | 'summary_large_image';
|
|
121
|
-
title?: string;
|
|
122
|
-
description?: string;
|
|
123
|
-
images?: string[];
|
|
124
|
-
creator?: string;
|
|
125
|
-
site?: string;
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
interface RouteMetadata {
|
|
129
|
-
routePath: string;
|
|
130
|
-
metadata: Metadata | null;
|
|
131
|
-
hasGenerateMetadata: boolean;
|
|
132
|
-
}
|
|
133
|
-
type GenerateStaticParams = () => Promise<StaticParams[]> | StaticParams[];
|
|
134
|
-
type GenerateMetadata = (props: {
|
|
135
|
-
params: Record<string, string>;
|
|
136
|
-
}) => Promise<Metadata> | Metadata;
|
|
137
|
-
interface RouteManifest {
|
|
138
|
-
routes: RouteConfig[];
|
|
139
|
-
staticPaths: Map<string, StaticParams[]>;
|
|
140
|
-
generatedAt: number;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
export type { ErrorProps as E, GenerateStaticParams as G, LayoutProps as L, Metadata as M, NavigateOptions as N, OlovaRouterContextValue as O, PageProps as P, RouteConfig as R, StaticParams as S, NotFoundProps as a, RouteMatch as b, RouteNode as c, RouteSegment as d, OlovaOptions as e, LoadingProps as f, RouteMetadata as g, GenerateMetadata as h, RouteManifest as i };
|
package/dist/types-BT6YsBGO.d.ts
DELETED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
interface RouteSegment {
|
|
2
|
-
path: string;
|
|
3
|
-
isDynamic: boolean;
|
|
4
|
-
isCatchAll: boolean;
|
|
5
|
-
isGroup: boolean;
|
|
6
|
-
paramName?: string;
|
|
7
|
-
}
|
|
8
|
-
interface RouteNode {
|
|
9
|
-
id: string;
|
|
10
|
-
path: string;
|
|
11
|
-
fullPath: string;
|
|
12
|
-
segments: RouteSegment[];
|
|
13
|
-
hasPage: boolean;
|
|
14
|
-
hasLayout: boolean;
|
|
15
|
-
hasLoading: boolean;
|
|
16
|
-
hasError: boolean;
|
|
17
|
-
hasNotFound: boolean;
|
|
18
|
-
children: Map<string, RouteNode>;
|
|
19
|
-
parent?: RouteNode;
|
|
20
|
-
}
|
|
21
|
-
interface RouteMatch {
|
|
22
|
-
route: RouteConfig;
|
|
23
|
-
params: Record<string, string>;
|
|
24
|
-
pathname: string;
|
|
25
|
-
searchParams: URLSearchParams;
|
|
26
|
-
}
|
|
27
|
-
interface RouteConfig {
|
|
28
|
-
id: string;
|
|
29
|
-
path: string;
|
|
30
|
-
fullPath: string;
|
|
31
|
-
component: React.ComponentType<any> | null;
|
|
32
|
-
layout: React.ComponentType<any> | null;
|
|
33
|
-
loading: React.ComponentType<any> | null;
|
|
34
|
-
error: React.ComponentType<any> | null;
|
|
35
|
-
notFound: React.ComponentType<any> | null;
|
|
36
|
-
children: RouteConfig[];
|
|
37
|
-
isDynamic: boolean;
|
|
38
|
-
isCatchAll: boolean;
|
|
39
|
-
paramName?: string;
|
|
40
|
-
/** Parallel route slots (e.g., @team, @analytics) */
|
|
41
|
-
slots?: Record<string, RouteConfig>;
|
|
42
|
-
/** Whether this is a parallel route slot */
|
|
43
|
-
isSlot?: boolean;
|
|
44
|
-
/** Slot name (without @) */
|
|
45
|
-
slotName?: string;
|
|
46
|
-
}
|
|
47
|
-
interface OlovaOptions {
|
|
48
|
-
/** Directory to scan for routes (default: 'src/app') */
|
|
49
|
-
appDir?: string;
|
|
50
|
-
/** File extensions to look for (default: ['.tsx', '.ts', '.jsx', '.js']) */
|
|
51
|
-
extensions?: string[];
|
|
52
|
-
/** Enable SSG pre-rendering (default: false) */
|
|
53
|
-
ssg?: boolean;
|
|
54
|
-
/** Base URL path (default: '/') */
|
|
55
|
-
basePath?: string;
|
|
56
|
-
/** Enable trailing slashes (default: false) */
|
|
57
|
-
trailingSlash?: boolean;
|
|
58
|
-
}
|
|
59
|
-
interface OlovaRouterContextValue {
|
|
60
|
-
pathname: string;
|
|
61
|
-
params: Record<string, string>;
|
|
62
|
-
searchParams: URLSearchParams;
|
|
63
|
-
navigate: (to: string, options?: NavigateOptions) => void;
|
|
64
|
-
replace: (to: string, options?: NavigateOptions) => void;
|
|
65
|
-
back: () => void;
|
|
66
|
-
forward: () => void;
|
|
67
|
-
refresh: () => void;
|
|
68
|
-
prefetch: (href: string) => void;
|
|
69
|
-
isNavigating: boolean;
|
|
70
|
-
}
|
|
71
|
-
interface NavigateOptions {
|
|
72
|
-
scroll?: boolean;
|
|
73
|
-
replace?: boolean;
|
|
74
|
-
}
|
|
75
|
-
interface LayoutProps {
|
|
76
|
-
children: React.ReactNode;
|
|
77
|
-
params: Record<string, string>;
|
|
78
|
-
/** Parallel route slots */
|
|
79
|
-
[slotName: string]: React.ReactNode | Record<string, string>;
|
|
80
|
-
}
|
|
81
|
-
interface PageProps {
|
|
82
|
-
params: Record<string, string>;
|
|
83
|
-
searchParams: Record<string, string>;
|
|
84
|
-
}
|
|
85
|
-
interface ErrorProps {
|
|
86
|
-
error: Error;
|
|
87
|
-
reset: () => void;
|
|
88
|
-
}
|
|
89
|
-
interface LoadingProps {
|
|
90
|
-
}
|
|
91
|
-
interface NotFoundProps {
|
|
92
|
-
}
|
|
93
|
-
interface StaticParams {
|
|
94
|
-
[key: string]: string;
|
|
95
|
-
}
|
|
96
|
-
interface Metadata {
|
|
97
|
-
title?: string;
|
|
98
|
-
description?: string;
|
|
99
|
-
keywords?: string[];
|
|
100
|
-
authors?: Array<{
|
|
101
|
-
name: string;
|
|
102
|
-
url?: string;
|
|
103
|
-
}>;
|
|
104
|
-
robots?: string;
|
|
105
|
-
canonical?: string;
|
|
106
|
-
openGraph?: {
|
|
107
|
-
title?: string;
|
|
108
|
-
description?: string;
|
|
109
|
-
url?: string;
|
|
110
|
-
siteName?: string;
|
|
111
|
-
type?: 'website' | 'article';
|
|
112
|
-
images?: Array<{
|
|
113
|
-
url: string;
|
|
114
|
-
width?: number;
|
|
115
|
-
height?: number;
|
|
116
|
-
alt?: string;
|
|
117
|
-
}>;
|
|
118
|
-
};
|
|
119
|
-
twitter?: {
|
|
120
|
-
card?: 'summary' | 'summary_large_image';
|
|
121
|
-
title?: string;
|
|
122
|
-
description?: string;
|
|
123
|
-
images?: string[];
|
|
124
|
-
creator?: string;
|
|
125
|
-
site?: string;
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
interface RouteMetadata {
|
|
129
|
-
routePath: string;
|
|
130
|
-
metadata: Metadata | null;
|
|
131
|
-
hasGenerateMetadata: boolean;
|
|
132
|
-
}
|
|
133
|
-
type GenerateStaticParams = () => Promise<StaticParams[]> | StaticParams[];
|
|
134
|
-
type GenerateMetadata = (props: {
|
|
135
|
-
params: Record<string, string>;
|
|
136
|
-
}) => Promise<Metadata> | Metadata;
|
|
137
|
-
interface RouteManifest {
|
|
138
|
-
routes: RouteConfig[];
|
|
139
|
-
staticPaths: Map<string, StaticParams[]>;
|
|
140
|
-
generatedAt: number;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
export type { ErrorProps as E, GenerateStaticParams as G, LayoutProps as L, Metadata as M, NavigateOptions as N, OlovaRouterContextValue as O, PageProps as P, RouteConfig as R, StaticParams as S, NotFoundProps as a, RouteMatch as b, RouteNode as c, RouteSegment as d, OlovaOptions as e, LoadingProps as f, RouteMetadata as g, GenerateMetadata as h, RouteManifest as i };
|