vike-lite 1.0.0 → 1.0.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.
@@ -0,0 +1,53 @@
1
+ //#region src/index.d.ts
2
+ type PageContext<Data = unknown> = {
3
+ routeParams: Record<string, string>;
4
+ urlOriginal: string;
5
+ urlPathname: string;
6
+ data: Data;
7
+ title: string;
8
+ is404?: boolean;
9
+ is500?: boolean;
10
+ errorMessage?: string;
11
+ };
12
+ type Manifest = Record<string, {
13
+ file: string;
14
+ css?: string[];
15
+ imports?: string[];
16
+ }>;
17
+ declare module 'virtual:routes' {
18
+ type Imported<Name extends string, T> = () => Promise<({ [K in Name]: T } & {
19
+ default?: T;
20
+ }) | ({ [K in Name]?: T } & {
21
+ default: T;
22
+ })>;
23
+ const config: {
24
+ onRenderClient: () => Promise<{
25
+ onRenderClient: () => void;
26
+ }>;
27
+ onRenderHtml: () => Promise<{
28
+ onRenderHtml: (pageContext: any) => string;
29
+ }>;
30
+ };
31
+ const routes: Array<{
32
+ path: string;
33
+ page: string;
34
+ hasData: boolean;
35
+ hasTitle: boolean;
36
+ Page: Imported<'Page', HTMLElement>;
37
+ Head?: Imported<'Head', HTMLElement>;
38
+ Layout?: Imported<'Layout', HTMLElement>;
39
+ data?: Imported<'data', (pageContext: PageContext) => Promise<PageContext['data']>>;
40
+ title?: Imported<'title', string | ((pageContext: PageContext) => string)>;
41
+ }>;
42
+ const errorRoute: {
43
+ path: string;
44
+ page: string;
45
+ Page: Imported<'Page', HTMLElement>;
46
+ Head?: Imported<'Head', HTMLElement>;
47
+ Layout?: Imported<'Layout', HTMLElement>;
48
+ };
49
+ }
50
+ declare module 'virtual:client-manifest' {
51
+ const manifest: Manifest;
52
+ export default manifest;
53
+ }
package/dist/index.mjs ADDED
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "name": "vike-lite",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.mts",
8
8
  "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.mts"
11
+ },
9
12
  "./vite": {
10
13
  "import": "./dist/vite.mjs",
11
14
  "types": "./dist/vite.d.mts"