@vistagenic/vista 0.2.14 → 0.2.15
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/LICENSE +21 -0
- package/dist/server/typed-api-runtime.js +51 -0
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/index.js +9 -0
- package/dist/theme/theme-provider.d.ts +18 -0
- package/dist/theme/theme-provider.js +112 -0
- package/dist/theme/theme-script.d.ts +6 -0
- package/dist/theme/theme-script.js +16 -0
- package/package.json +153 -149
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Vista.js contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -22,6 +22,12 @@ const TYPED_API_ENTRYPOINTS = [
|
|
|
22
22
|
path_1.default.join('app', 'typed-api.js'),
|
|
23
23
|
path_1.default.join('app', 'typed-api.jsx'),
|
|
24
24
|
];
|
|
25
|
+
const METADATA_ROUTE_MAPPINGS = [
|
|
26
|
+
{ requestPath: '/robots.txt', stem: 'robots' },
|
|
27
|
+
{ requestPath: '/sitemap.xml', stem: 'sitemap' },
|
|
28
|
+
{ requestPath: '/manifest.webmanifest', stem: 'manifest' },
|
|
29
|
+
];
|
|
30
|
+
const ROUTE_FILE_EXTENSIONS = ['.ts', '.tsx', '.js', '.jsx'];
|
|
25
31
|
class BodyLimitError extends Error {
|
|
26
32
|
status = 413;
|
|
27
33
|
constructor(limitBytes) {
|
|
@@ -82,6 +88,44 @@ function normalizeRouteRequestPath(requestPath) {
|
|
|
82
88
|
}
|
|
83
89
|
return normalized.replace(/^\/+/, '').replace(/\/+$/, '');
|
|
84
90
|
}
|
|
91
|
+
function isRouteGroupDirectory(name) {
|
|
92
|
+
return /^\([\w-]+\)$/.test(name);
|
|
93
|
+
}
|
|
94
|
+
function resolveMetadataRoutePath(cwd, stem) {
|
|
95
|
+
const appDir = path_1.default.resolve(cwd, 'app');
|
|
96
|
+
const tryStemInDirectory = (dir) => {
|
|
97
|
+
for (const extension of ROUTE_FILE_EXTENSIONS) {
|
|
98
|
+
const candidate = path_1.default.join(dir, `${stem}${extension}`);
|
|
99
|
+
if (fs_1.default.existsSync(candidate)) {
|
|
100
|
+
return candidate;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return null;
|
|
104
|
+
};
|
|
105
|
+
const directMatch = tryStemInDirectory(appDir);
|
|
106
|
+
if (directMatch) {
|
|
107
|
+
return directMatch;
|
|
108
|
+
}
|
|
109
|
+
const searchGroupDirectories = (dir) => {
|
|
110
|
+
const entries = fs_1.default
|
|
111
|
+
.readdirSync(dir, { withFileTypes: true })
|
|
112
|
+
.filter((entry) => entry.isDirectory() && isRouteGroupDirectory(entry.name))
|
|
113
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
114
|
+
for (const entry of entries) {
|
|
115
|
+
const groupDir = path_1.default.join(dir, entry.name);
|
|
116
|
+
const match = tryStemInDirectory(groupDir);
|
|
117
|
+
if (match) {
|
|
118
|
+
return match;
|
|
119
|
+
}
|
|
120
|
+
const nestedMatch = searchGroupDirectories(groupDir);
|
|
121
|
+
if (nestedMatch) {
|
|
122
|
+
return nestedMatch;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return null;
|
|
126
|
+
};
|
|
127
|
+
return searchGroupDirectories(appDir);
|
|
128
|
+
}
|
|
85
129
|
function hasMethodMatch(router, pathname, method) {
|
|
86
130
|
const normalized = method.toLowerCase();
|
|
87
131
|
return router.resolve(pathname, normalized) !== null;
|
|
@@ -307,6 +351,13 @@ function resolveLegacyApiRoutePath(cwd, requestPath) {
|
|
|
307
351
|
function resolveLegacyRouteHandlerPath(cwd, requestPath) {
|
|
308
352
|
const normalized = normalizeRouteRequestPath(requestPath);
|
|
309
353
|
const routeCandidates = [];
|
|
354
|
+
const metadataRoute = METADATA_ROUTE_MAPPINGS.find((entry) => entry.requestPath === String(requestPath || '').split('?')[0]);
|
|
355
|
+
if (metadataRoute) {
|
|
356
|
+
const resolvedMetadataPath = resolveMetadataRoutePath(cwd, metadataRoute.stem);
|
|
357
|
+
if (resolvedMetadataPath) {
|
|
358
|
+
routeCandidates.push(resolvedMetadataPath);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
310
361
|
if (normalized.startsWith('api/')) {
|
|
311
362
|
const apiRoute = normalized.slice('api/'.length);
|
|
312
363
|
routeCandidates.push(path_1.default.resolve(cwd, 'app', 'api', apiRoute, 'route.ts'), path_1.default.resolve(cwd, 'app', 'api', apiRoute, 'route.tsx'), path_1.default.resolve(cwd, 'app', 'api', apiRoute, 'route.js'), path_1.default.resolve(cwd, 'app', 'api', apiRoute, 'route.jsx'), path_1.default.resolve(cwd, 'app', 'api', `${apiRoute}.ts`), path_1.default.resolve(cwd, 'app', 'api', `${apiRoute}.tsx`), path_1.default.resolve(cwd, 'app', 'api', `${apiRoute}.js`), path_1.default.resolve(cwd, 'app', 'api', `${apiRoute}.jsx`));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ThemeScript = exports.useTheme = exports.applyTheme = exports.ThemeProvider = void 0;
|
|
4
|
+
var theme_provider_1 = require("./theme-provider");
|
|
5
|
+
Object.defineProperty(exports, "ThemeProvider", { enumerable: true, get: function () { return theme_provider_1.ThemeProvider; } });
|
|
6
|
+
Object.defineProperty(exports, "applyTheme", { enumerable: true, get: function () { return theme_provider_1.applyTheme; } });
|
|
7
|
+
Object.defineProperty(exports, "useTheme", { enumerable: true, get: function () { return theme_provider_1.useTheme; } });
|
|
8
|
+
var theme_script_1 = require("./theme-script");
|
|
9
|
+
Object.defineProperty(exports, "ThemeScript", { enumerable: true, get: function () { return theme_script_1.ThemeScript; } });
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export type ThemeMode = 'system' | 'light' | 'dark';
|
|
3
|
+
export type ResolvedTheme = 'light' | 'dark';
|
|
4
|
+
interface ThemeContextValue {
|
|
5
|
+
theme: ThemeMode;
|
|
6
|
+
resolvedTheme: ResolvedTheme;
|
|
7
|
+
setTheme: (theme: ThemeMode) => void;
|
|
8
|
+
cycleTheme: () => void;
|
|
9
|
+
mounted: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function applyTheme(theme: ThemeMode): void;
|
|
12
|
+
interface ThemeProviderProps {
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
defaultTheme?: ThemeMode;
|
|
15
|
+
}
|
|
16
|
+
export declare function ThemeProvider({ children, defaultTheme, }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function useTheme(): ThemeContextValue;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.applyTheme = applyTheme;
|
|
5
|
+
exports.ThemeProvider = ThemeProvider;
|
|
6
|
+
exports.useTheme = useTheme;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const THEME_STORAGE_KEY = 'vista-theme';
|
|
10
|
+
const THEME_ORDER = ['system', 'light', 'dark'];
|
|
11
|
+
const MEDIA_QUERY = '(prefers-color-scheme: dark)';
|
|
12
|
+
const ThemeContext = (0, react_1.createContext)(null);
|
|
13
|
+
function sanitizeTheme(value, fallback) {
|
|
14
|
+
if (value === 'system' || value === 'light' || value === 'dark') {
|
|
15
|
+
return value;
|
|
16
|
+
}
|
|
17
|
+
return fallback;
|
|
18
|
+
}
|
|
19
|
+
function getSystemTheme() {
|
|
20
|
+
if (typeof window === 'undefined') {
|
|
21
|
+
return 'dark';
|
|
22
|
+
}
|
|
23
|
+
return window.matchMedia(MEDIA_QUERY).matches ? 'dark' : 'light';
|
|
24
|
+
}
|
|
25
|
+
function resolveTheme(theme) {
|
|
26
|
+
return theme === 'system' ? getSystemTheme() : theme;
|
|
27
|
+
}
|
|
28
|
+
function applyTheme(theme) {
|
|
29
|
+
if (typeof document === 'undefined') {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const resolvedTheme = resolveTheme(theme);
|
|
33
|
+
const root = document.documentElement;
|
|
34
|
+
root.classList.remove('light', 'dark');
|
|
35
|
+
root.classList.add(resolvedTheme);
|
|
36
|
+
root.dataset.theme = theme;
|
|
37
|
+
root.style.colorScheme = resolvedTheme;
|
|
38
|
+
}
|
|
39
|
+
function ThemeProvider({ children, defaultTheme = 'system', }) {
|
|
40
|
+
const [theme, setThemeState] = (0, react_1.useState)(defaultTheme);
|
|
41
|
+
const [mounted, setMounted] = (0, react_1.useState)(false);
|
|
42
|
+
(0, react_1.useEffect)(() => {
|
|
43
|
+
const nextTheme = sanitizeTheme(window.localStorage.getItem(THEME_STORAGE_KEY), defaultTheme);
|
|
44
|
+
setThemeState(nextTheme);
|
|
45
|
+
applyTheme(nextTheme);
|
|
46
|
+
setMounted(true);
|
|
47
|
+
}, [defaultTheme]);
|
|
48
|
+
(0, react_1.useEffect)(() => {
|
|
49
|
+
if (!mounted)
|
|
50
|
+
return;
|
|
51
|
+
window.localStorage.setItem(THEME_STORAGE_KEY, theme);
|
|
52
|
+
applyTheme(theme);
|
|
53
|
+
}, [mounted, theme]);
|
|
54
|
+
(0, react_1.useEffect)(() => {
|
|
55
|
+
if (!mounted)
|
|
56
|
+
return;
|
|
57
|
+
const media = window.matchMedia(MEDIA_QUERY);
|
|
58
|
+
const handleMediaChange = () => {
|
|
59
|
+
const currentTheme = sanitizeTheme(window.localStorage.getItem(THEME_STORAGE_KEY), defaultTheme);
|
|
60
|
+
if (currentTheme === 'system') {
|
|
61
|
+
applyTheme('system');
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
const handleStorage = (event) => {
|
|
65
|
+
if (event.key !== THEME_STORAGE_KEY)
|
|
66
|
+
return;
|
|
67
|
+
const nextTheme = sanitizeTheme(event.newValue, defaultTheme);
|
|
68
|
+
setThemeState(nextTheme);
|
|
69
|
+
applyTheme(nextTheme);
|
|
70
|
+
};
|
|
71
|
+
if (typeof media.addEventListener === 'function') {
|
|
72
|
+
media.addEventListener('change', handleMediaChange);
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
media.addListener(handleMediaChange);
|
|
76
|
+
}
|
|
77
|
+
window.addEventListener('storage', handleStorage);
|
|
78
|
+
return () => {
|
|
79
|
+
if (typeof media.removeEventListener === 'function') {
|
|
80
|
+
media.removeEventListener('change', handleMediaChange);
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
media.removeListener(handleMediaChange);
|
|
84
|
+
}
|
|
85
|
+
window.removeEventListener('storage', handleStorage);
|
|
86
|
+
};
|
|
87
|
+
}, [defaultTheme, mounted]);
|
|
88
|
+
const setTheme = (0, react_1.useCallback)((nextTheme) => {
|
|
89
|
+
setThemeState(nextTheme);
|
|
90
|
+
}, []);
|
|
91
|
+
const cycleTheme = (0, react_1.useCallback)(() => {
|
|
92
|
+
setThemeState((currentTheme) => {
|
|
93
|
+
const index = THEME_ORDER.indexOf(currentTheme);
|
|
94
|
+
return THEME_ORDER[(index + 1) % THEME_ORDER.length];
|
|
95
|
+
});
|
|
96
|
+
}, []);
|
|
97
|
+
const value = (0, react_1.useMemo)(() => ({
|
|
98
|
+
theme,
|
|
99
|
+
resolvedTheme: resolveTheme(theme),
|
|
100
|
+
setTheme,
|
|
101
|
+
cycleTheme,
|
|
102
|
+
mounted,
|
|
103
|
+
}), [cycleTheme, mounted, setTheme, theme]);
|
|
104
|
+
return (0, jsx_runtime_1.jsx)(ThemeContext.Provider, { value: value, children: children });
|
|
105
|
+
}
|
|
106
|
+
function useTheme() {
|
|
107
|
+
const context = (0, react_1.useContext)(ThemeContext);
|
|
108
|
+
if (!context) {
|
|
109
|
+
throw new Error('useTheme must be used within a ThemeProvider.');
|
|
110
|
+
}
|
|
111
|
+
return context;
|
|
112
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ThemeScript = ThemeScript;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const THEME_STORAGE_KEY = 'vista-theme';
|
|
6
|
+
const WINDOW_ACCESS = "Function('return this')()";
|
|
7
|
+
const ROOT_ELEMENT_ACCESS = "runtime['doc'+'ument'].documentElement";
|
|
8
|
+
const STORAGE_ACCESS = "runtime['local'+'Storage']";
|
|
9
|
+
function getThemeScript(defaultTheme) {
|
|
10
|
+
return `(function(){var runtime=${WINDOW_ACCESS};var storageKey='${THEME_STORAGE_KEY}';var defaultTheme='${defaultTheme}';var mediaQuery='(prefers-color-scheme: dark)';function sanitize(value){return value==='system'||value==='light'||value==='dark'?value:defaultTheme;}function resolve(theme){if(theme==='system'){return runtime.matchMedia(mediaQuery).matches?'dark':'light';}return theme;}function apply(theme){var resolved=resolve(theme);var root=${ROOT_ELEMENT_ACCESS};root.classList.remove('light','dark');root.classList.add(resolved);root.dataset.theme=theme;root.style.colorScheme=resolved;}var stored=sanitize(${STORAGE_ACCESS}.getItem(storageKey));apply(stored);}());`;
|
|
11
|
+
}
|
|
12
|
+
function ThemeScript({ defaultTheme = 'system' }) {
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)("script", { dangerouslySetInnerHTML: {
|
|
14
|
+
__html: getThemeScript(defaultTheme),
|
|
15
|
+
} }));
|
|
16
|
+
}
|
package/package.json
CHANGED
|
@@ -1,149 +1,153 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@vistagenic/vista",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "The React Framework for Visionaries - Rust-powered SSR with Server Components",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/vistakit/Vista-Js.git",
|
|
10
|
-
"directory": "packages/vista"
|
|
11
|
-
},
|
|
12
|
-
"author": "Vista Team",
|
|
13
|
-
"license": "MIT",
|
|
14
|
-
"keywords": [
|
|
15
|
-
"react",
|
|
16
|
-
"framework",
|
|
17
|
-
"ssr",
|
|
18
|
-
"server-components",
|
|
19
|
-
"rsc",
|
|
20
|
-
"rust",
|
|
21
|
-
"swc",
|
|
22
|
-
"vista"
|
|
23
|
-
],
|
|
24
|
-
"files": [
|
|
25
|
-
"dist",
|
|
26
|
-
"bin"
|
|
27
|
-
],
|
|
28
|
-
"exports": {
|
|
29
|
-
".": {
|
|
30
|
-
"react-server": "./dist/react-server.js",
|
|
31
|
-
"types": "./dist/index.d.ts",
|
|
32
|
-
"default": "./dist/index.js"
|
|
33
|
-
},
|
|
34
|
-
"./link": {
|
|
35
|
-
"types": "./dist/client/link.d.ts",
|
|
36
|
-
"default": "./dist/client/link.js"
|
|
37
|
-
},
|
|
38
|
-
"./image": {
|
|
39
|
-
"react-server": "./dist/image/react-server.js",
|
|
40
|
-
"types": "./dist/image/index.d.ts",
|
|
41
|
-
"default": "./dist/image/index.js"
|
|
42
|
-
},
|
|
43
|
-
"./router": {
|
|
44
|
-
"types": "./dist/client/router.d.ts",
|
|
45
|
-
"default": "./dist/client/router.js"
|
|
46
|
-
},
|
|
47
|
-
"./navigation": {
|
|
48
|
-
"types": "./dist/client/navigation.d.ts",
|
|
49
|
-
"default": "./dist/client/navigation.js"
|
|
50
|
-
},
|
|
51
|
-
"./dynamic": {
|
|
52
|
-
"types": "./dist/client/dynamic.d.ts",
|
|
53
|
-
"default": "./dist/client/dynamic.js"
|
|
54
|
-
},
|
|
55
|
-
"./script": {
|
|
56
|
-
"types": "./dist/client/script.d.ts",
|
|
57
|
-
"default": "./dist/client/script.js"
|
|
58
|
-
},
|
|
59
|
-
"./font": {
|
|
60
|
-
"types": "./dist/font/index.d.ts",
|
|
61
|
-
"default": "./dist/font/index.js"
|
|
62
|
-
},
|
|
63
|
-
"./font/google": {
|
|
64
|
-
"types": "./dist/font/google.d.ts",
|
|
65
|
-
"default": "./dist/font/google.js"
|
|
66
|
-
},
|
|
67
|
-
"./font/local": {
|
|
68
|
-
"types": "./dist/font/local.d.ts",
|
|
69
|
-
"default": "./dist/font/local.js"
|
|
70
|
-
},
|
|
71
|
-
"./
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
"types": "./dist/
|
|
78
|
-
"default": "./dist/
|
|
79
|
-
},
|
|
80
|
-
"./
|
|
81
|
-
"types": "./dist/
|
|
82
|
-
"default": "./dist/
|
|
83
|
-
},
|
|
84
|
-
"./stack
|
|
85
|
-
"types": "./dist/stack/
|
|
86
|
-
"default": "./dist/stack/
|
|
87
|
-
},
|
|
88
|
-
"./client
|
|
89
|
-
"types": "./dist/client/
|
|
90
|
-
"default": "./dist/client/
|
|
91
|
-
},
|
|
92
|
-
"./client/
|
|
93
|
-
"types": "./dist/client/
|
|
94
|
-
"default": "./dist/client/
|
|
95
|
-
},
|
|
96
|
-
"./server": {
|
|
97
|
-
"types": "./dist/server
|
|
98
|
-
"default": "./dist/server
|
|
99
|
-
},
|
|
100
|
-
"./server
|
|
101
|
-
"types": "./dist/server/
|
|
102
|
-
"default": "./dist/server/
|
|
103
|
-
},
|
|
104
|
-
"./
|
|
105
|
-
"types": "./dist/server/
|
|
106
|
-
"default": "./dist/server/
|
|
107
|
-
},
|
|
108
|
-
"./
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
"
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
"
|
|
127
|
-
"
|
|
128
|
-
"
|
|
129
|
-
"
|
|
130
|
-
"
|
|
131
|
-
"
|
|
132
|
-
"
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
"@types/
|
|
145
|
-
"@types/
|
|
146
|
-
"
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@vistagenic/vista",
|
|
3
|
+
"version": "0.2.15",
|
|
4
|
+
"description": "The React Framework for Visionaries - Rust-powered SSR with Server Components",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/vistakit/Vista-Js.git",
|
|
10
|
+
"directory": "packages/vista"
|
|
11
|
+
},
|
|
12
|
+
"author": "Vista Team",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"react",
|
|
16
|
+
"framework",
|
|
17
|
+
"ssr",
|
|
18
|
+
"server-components",
|
|
19
|
+
"rsc",
|
|
20
|
+
"rust",
|
|
21
|
+
"swc",
|
|
22
|
+
"vista"
|
|
23
|
+
],
|
|
24
|
+
"files": [
|
|
25
|
+
"dist",
|
|
26
|
+
"bin"
|
|
27
|
+
],
|
|
28
|
+
"exports": {
|
|
29
|
+
".": {
|
|
30
|
+
"react-server": "./dist/react-server.js",
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
32
|
+
"default": "./dist/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./link": {
|
|
35
|
+
"types": "./dist/client/link.d.ts",
|
|
36
|
+
"default": "./dist/client/link.js"
|
|
37
|
+
},
|
|
38
|
+
"./image": {
|
|
39
|
+
"react-server": "./dist/image/react-server.js",
|
|
40
|
+
"types": "./dist/image/index.d.ts",
|
|
41
|
+
"default": "./dist/image/index.js"
|
|
42
|
+
},
|
|
43
|
+
"./router": {
|
|
44
|
+
"types": "./dist/client/router.d.ts",
|
|
45
|
+
"default": "./dist/client/router.js"
|
|
46
|
+
},
|
|
47
|
+
"./navigation": {
|
|
48
|
+
"types": "./dist/client/navigation.d.ts",
|
|
49
|
+
"default": "./dist/client/navigation.js"
|
|
50
|
+
},
|
|
51
|
+
"./dynamic": {
|
|
52
|
+
"types": "./dist/client/dynamic.d.ts",
|
|
53
|
+
"default": "./dist/client/dynamic.js"
|
|
54
|
+
},
|
|
55
|
+
"./script": {
|
|
56
|
+
"types": "./dist/client/script.d.ts",
|
|
57
|
+
"default": "./dist/client/script.js"
|
|
58
|
+
},
|
|
59
|
+
"./font": {
|
|
60
|
+
"types": "./dist/font/index.d.ts",
|
|
61
|
+
"default": "./dist/font/index.js"
|
|
62
|
+
},
|
|
63
|
+
"./font/google": {
|
|
64
|
+
"types": "./dist/font/google.d.ts",
|
|
65
|
+
"default": "./dist/font/google.js"
|
|
66
|
+
},
|
|
67
|
+
"./font/local": {
|
|
68
|
+
"types": "./dist/font/local.d.ts",
|
|
69
|
+
"default": "./dist/font/local.js"
|
|
70
|
+
},
|
|
71
|
+
"./theme": {
|
|
72
|
+
"types": "./dist/theme/index.d.ts",
|
|
73
|
+
"default": "./dist/theme/index.js"
|
|
74
|
+
},
|
|
75
|
+
"./head": {
|
|
76
|
+
"react-server": "./dist/client/head.react-server.js",
|
|
77
|
+
"types": "./dist/client/head.d.ts",
|
|
78
|
+
"default": "./dist/client/head.js"
|
|
79
|
+
},
|
|
80
|
+
"./config": {
|
|
81
|
+
"types": "./dist/config.d.ts",
|
|
82
|
+
"default": "./dist/config.js"
|
|
83
|
+
},
|
|
84
|
+
"./stack": {
|
|
85
|
+
"types": "./dist/stack/index.d.ts",
|
|
86
|
+
"default": "./dist/stack/index.js"
|
|
87
|
+
},
|
|
88
|
+
"./stack/client": {
|
|
89
|
+
"types": "./dist/stack/client/index.d.ts",
|
|
90
|
+
"default": "./dist/stack/client/index.js"
|
|
91
|
+
},
|
|
92
|
+
"./client/rsc-router": {
|
|
93
|
+
"types": "./dist/client/rsc-router.d.ts",
|
|
94
|
+
"default": "./dist/client/rsc-router.js"
|
|
95
|
+
},
|
|
96
|
+
"./client/server-actions": {
|
|
97
|
+
"types": "./dist/client/server-actions.d.ts",
|
|
98
|
+
"default": "./dist/client/server-actions.js"
|
|
99
|
+
},
|
|
100
|
+
"./server": {
|
|
101
|
+
"types": "./dist/server/index.d.ts",
|
|
102
|
+
"default": "./dist/server/index.js"
|
|
103
|
+
},
|
|
104
|
+
"./server/runtime-actions": {
|
|
105
|
+
"types": "./dist/server/runtime-actions.d.ts",
|
|
106
|
+
"default": "./dist/server/runtime-actions.js"
|
|
107
|
+
},
|
|
108
|
+
"./cache": {
|
|
109
|
+
"types": "./dist/server/cache.d.ts",
|
|
110
|
+
"default": "./dist/server/cache.js"
|
|
111
|
+
},
|
|
112
|
+
"./package.json": "./package.json"
|
|
113
|
+
},
|
|
114
|
+
"bin": {
|
|
115
|
+
"vista": "bin/vista.js"
|
|
116
|
+
},
|
|
117
|
+
"publishConfig": {
|
|
118
|
+
"access": "public"
|
|
119
|
+
},
|
|
120
|
+
"scripts": {
|
|
121
|
+
"build": "tsc"
|
|
122
|
+
},
|
|
123
|
+
"dependencies": {
|
|
124
|
+
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
|
|
125
|
+
"@swc-node/register": "^1.9.0",
|
|
126
|
+
"@swc/core": "^1.4.0",
|
|
127
|
+
"chokidar": "^3.6.0",
|
|
128
|
+
"css-loader": "^7.1.2",
|
|
129
|
+
"esbuild": "^0.24.2",
|
|
130
|
+
"express": "^4.21.2",
|
|
131
|
+
"mini-css-extract-plugin": "^2.9.4",
|
|
132
|
+
"null-loader": "^4.0.1",
|
|
133
|
+
"react": "^19.0.0",
|
|
134
|
+
"react-dom": "^19.0.0",
|
|
135
|
+
"react-refresh": "^0.14.0",
|
|
136
|
+
"react-server-dom-webpack": "^19.0.0",
|
|
137
|
+
"swc-loader": "^0.2.6",
|
|
138
|
+
"ts-node": "^10.9.2",
|
|
139
|
+
"webpack": "^5.90.0",
|
|
140
|
+
"webpack-dev-middleware": "^7.0.0",
|
|
141
|
+
"webpack-hot-middleware": "^2.26.0"
|
|
142
|
+
},
|
|
143
|
+
"devDependencies": {
|
|
144
|
+
"@types/express": "^5.0.0",
|
|
145
|
+
"@types/node": "^22.10.2",
|
|
146
|
+
"@types/react": "^19.0.1",
|
|
147
|
+
"@types/react-dom": "^19.0.2",
|
|
148
|
+
"@types/webpack": "^5.28.5",
|
|
149
|
+
"@types/webpack-hot-middleware": "^2.25.9",
|
|
150
|
+
"typescript": "^5.7.2"
|
|
151
|
+
},
|
|
152
|
+
"gitHead": "9397c476040f8e0e79fba153a3f05bea5c7bdab9"
|
|
153
|
+
}
|