vatts 1.2.1 → 1.2.3
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 +1 -1
- package/README.md +11 -7
- package/dist/api/console.js +1 -1
- package/dist/api/framework.js +16 -0
- package/dist/bin/vatts.js +1 -1
- package/dist/builder.d.ts +0 -12
- package/dist/builder.js +79 -265
- package/dist/client/clientRouter.js +1 -1
- package/dist/client/rpc.js +1 -1
- package/dist/env/env.js +16 -0
- package/dist/global/global.d.ts +1 -1
- package/dist/helpers.js +1 -1
- package/dist/hotReload.js +3 -2
- package/dist/index.js +1 -1
- package/dist/loaders.js +1 -1
- package/dist/react/BuildingPage.js +52 -31
- package/dist/react/DefaultNotFound.js +39 -33
- package/dist/react/DevIndicator.js +16 -0
- package/dist/react/ErrorModal.js +1 -1
- package/dist/react/Link.js +1 -1
- package/dist/react/client.js +1 -1
- package/dist/react/entry.client.js +1 -1
- package/dist/react/image/Image.js +16 -0
- package/dist/react/react.build.d.ts +24 -0
- package/dist/react/react.build.js +95 -0
- package/dist/react/renderer-react.js +1 -1
- package/dist/router.js +1 -1
- package/dist/rpc/server.js +1 -1
- package/dist/rpc/types.js +1 -1
- package/dist/tsconfigPaths.js +1 -1
- package/dist/vue/App.vue +56 -44
- package/dist/vue/BuildingPage.vue +46 -37
- package/dist/vue/DefaultNotFound.vue +60 -38
- package/dist/vue/DevIndicator.vue +16 -0
- package/dist/vue/ErrorModal.vue +16 -0
- package/dist/vue/Link.vue +16 -0
- package/dist/vue/client.js +1 -1
- package/dist/vue/entry.client.js +13 -2
- package/dist/vue/image/Image.vue +1 -1
- package/dist/vue/vue.build.d.ts +24 -0
- package/dist/vue/vue.build.js +160 -0
- package/package.json +1 -1
package/dist/env/env.js
CHANGED
|
@@ -4,6 +4,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.loadEnv = void 0;
|
|
7
|
+
/*
|
|
8
|
+
* This file is part of the Vatts.js Project.
|
|
9
|
+
* Copyright (c) 2026 mfraz
|
|
10
|
+
*
|
|
11
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
12
|
+
* you may not use this file except in compliance with the License.
|
|
13
|
+
* You may obtain a copy of the License at
|
|
14
|
+
*
|
|
15
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
16
|
+
*
|
|
17
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
18
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
19
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
20
|
+
* See the License for the specific language governing permissions and
|
|
21
|
+
* limitations under the License.
|
|
22
|
+
*/
|
|
7
23
|
const fs_1 = __importDefault(require("fs"));
|
|
8
24
|
const path_1 = __importDefault(require("path"));
|
|
9
25
|
const console_1 = __importDefault(require("../api/console"));
|
package/dist/global/global.d.ts
CHANGED
package/dist/helpers.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
/*
|
|
4
4
|
* This file is part of the Vatts.js Project.
|
|
5
|
-
* Copyright (c) 2026
|
|
5
|
+
* Copyright (c) 2026 mfraz
|
|
6
6
|
*
|
|
7
7
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
8
|
* you may not use this file except in compliance with the License.
|
package/dist/hotReload.js
CHANGED
|
@@ -39,7 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.HotReloadManager = void 0;
|
|
40
40
|
/*
|
|
41
41
|
* This file is part of the Vatts.js Project.
|
|
42
|
-
* Copyright (c) 2026
|
|
42
|
+
* Copyright (c) 2026 mfraz
|
|
43
43
|
*
|
|
44
44
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
45
45
|
* you may not use this file except in compliance with the License.
|
|
@@ -291,7 +291,8 @@ class HotReloadManager {
|
|
|
291
291
|
filePath.includes('not-found.tsx') ||
|
|
292
292
|
filePath.endsWith('.tsx') ||
|
|
293
293
|
filePath.endsWith(".ts") ||
|
|
294
|
-
filePath.endsWith(".vue")
|
|
294
|
+
filePath.endsWith(".vue") ||
|
|
295
|
+
filePath.endsWith(".css");
|
|
295
296
|
const isBackendFile = filePath.includes(path.join('src', 'backend')) && !isFrontendFile;
|
|
296
297
|
(0, router_1.clearFileCache)(filePath);
|
|
297
298
|
this.clearBackendCache(filePath);
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
3
|
* This file is part of the Vatts.js Project.
|
|
4
|
-
* Copyright (c) 2026
|
|
4
|
+
* Copyright (c) 2026 mfraz
|
|
5
5
|
*
|
|
6
6
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
7
|
* you may not use this file except in compliance with the License.
|
package/dist/loaders.js
CHANGED
|
@@ -4,6 +4,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.default = BuildingScreen;
|
|
7
|
+
/*
|
|
8
|
+
* This file is part of the Vatts.js Project.
|
|
9
|
+
* Copyright (c) 2026 mfraz
|
|
10
|
+
*
|
|
11
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
12
|
+
* you may not use this file except in compliance with the License.
|
|
13
|
+
* You may obtain a copy of the License at
|
|
14
|
+
*
|
|
15
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
16
|
+
*
|
|
17
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
18
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
19
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
20
|
+
* See the License for the specific language governing permissions and
|
|
21
|
+
* limitations under the License.
|
|
22
|
+
*/
|
|
7
23
|
const react_1 = __importDefault(require("react"));
|
|
8
24
|
function BuildingScreen() {
|
|
9
25
|
let version = "1.0.0";
|
|
@@ -15,11 +31,13 @@ function BuildingScreen() {
|
|
|
15
31
|
:root {
|
|
16
32
|
--bg-solid: #000000;
|
|
17
33
|
--card-bg: #0a0a0a;
|
|
18
|
-
/* PALETA:
|
|
34
|
+
/* PALETA: React Theme */
|
|
35
|
+
--react-cyan: #61DAFB; /* O azul/ciano clássico do React */
|
|
36
|
+
--react-dark: #20232a; /* Fundo escuro azulado */
|
|
19
37
|
--primary: #ffffff;
|
|
20
|
-
--primary-glow: rgba(
|
|
38
|
+
--primary-glow: rgba(97, 218, 251, 0.1);
|
|
21
39
|
--text-main: #ffffff;
|
|
22
|
-
--text-muted: #
|
|
40
|
+
--text-muted: #8ea9c7; /* Cinza azulado para combinar */
|
|
23
41
|
}
|
|
24
42
|
|
|
25
43
|
body {
|
|
@@ -52,8 +70,8 @@ function BuildingScreen() {
|
|
|
52
70
|
width: 100%;
|
|
53
71
|
max-width: 420px;
|
|
54
72
|
background: var(--card-bg);
|
|
55
|
-
/* Borda sutil
|
|
56
|
-
box-shadow: 0 0 0 1px rgba(
|
|
73
|
+
/* Borda sutil com brilho React Cyan */
|
|
74
|
+
box-shadow: 0 0 0 1px rgba(97, 218, 251, 0.1), 0 40px 80px -20px rgba(0, 0, 0, 0.9);
|
|
57
75
|
border-radius: 20px;
|
|
58
76
|
overflow: hidden;
|
|
59
77
|
display: flex;
|
|
@@ -65,9 +83,9 @@ function BuildingScreen() {
|
|
|
65
83
|
.neon-line {
|
|
66
84
|
height: 1px;
|
|
67
85
|
width: 100%;
|
|
68
|
-
/* Linha de luz
|
|
69
|
-
background: linear-gradient(90deg, transparent,
|
|
70
|
-
box-shadow: 0 0 15px rgba(
|
|
86
|
+
/* Linha de luz: Gradiente usando o Cyan */
|
|
87
|
+
background: linear-gradient(90deg, transparent, var(--react-dark), var(--react-cyan), var(--react-dark), transparent);
|
|
88
|
+
box-shadow: 0 0 15px rgba(97, 218, 251, 0.2);
|
|
71
89
|
}
|
|
72
90
|
|
|
73
91
|
.content {
|
|
@@ -90,8 +108,8 @@ function BuildingScreen() {
|
|
|
90
108
|
object-fit: contain;
|
|
91
109
|
position: relative;
|
|
92
110
|
z-index: 2;
|
|
93
|
-
/*
|
|
94
|
-
filter:
|
|
111
|
+
/* Removi o grayscale para a logo brilhar na cor natural se tiver cor, ou ficar nítida */
|
|
112
|
+
filter: none;
|
|
95
113
|
}
|
|
96
114
|
|
|
97
115
|
.logo-glow {
|
|
@@ -101,9 +119,10 @@ function BuildingScreen() {
|
|
|
101
119
|
transform: translate(-50%, -50%);
|
|
102
120
|
width: 100%;
|
|
103
121
|
height: 100%;
|
|
104
|
-
|
|
122
|
+
/* Glow Cyan do React */
|
|
123
|
+
background: var(--react-cyan);
|
|
105
124
|
filter: blur(25px);
|
|
106
|
-
opacity: 0.
|
|
125
|
+
opacity: 0.2;
|
|
107
126
|
border-radius: 50%;
|
|
108
127
|
animation: pulse 2s ease-in-out infinite;
|
|
109
128
|
}
|
|
@@ -113,14 +132,16 @@ function BuildingScreen() {
|
|
|
113
132
|
font-size: 2rem;
|
|
114
133
|
font-weight: 800;
|
|
115
134
|
letter-spacing: -0.03em;
|
|
116
|
-
|
|
135
|
+
/* Gradiente do texto: Branco para Cyan */
|
|
136
|
+
background: linear-gradient(180deg, #ffffff 0%, var(--react-cyan) 100%);
|
|
117
137
|
-webkit-background-clip: text;
|
|
118
138
|
-webkit-text-fill-color: transparent;
|
|
119
139
|
}
|
|
120
140
|
|
|
121
141
|
h1 span {
|
|
122
|
-
|
|
123
|
-
|
|
142
|
+
/* Span .js em Cyan Sólido */
|
|
143
|
+
color: var(--react-cyan);
|
|
144
|
+
-webkit-text-fill-color: var(--react-cyan);
|
|
124
145
|
}
|
|
125
146
|
|
|
126
147
|
p {
|
|
@@ -132,14 +153,14 @@ function BuildingScreen() {
|
|
|
132
153
|
|
|
133
154
|
.terminal-box {
|
|
134
155
|
width: 100%;
|
|
135
|
-
background: rgba(
|
|
136
|
-
border: 1px solid rgba(
|
|
156
|
+
background: rgba(97, 218, 251, 0.03); /* Fundo azulado bem sutil */
|
|
157
|
+
border: 1px solid rgba(97, 218, 251, 0.1); /* Borda ciano sutil */
|
|
137
158
|
border-radius: 12px;
|
|
138
159
|
padding: 16px;
|
|
139
160
|
text-align: left;
|
|
140
161
|
font-family: 'JetBrains Mono', monospace;
|
|
141
162
|
font-size: 0.75rem;
|
|
142
|
-
color:
|
|
163
|
+
color: var(--text-muted);
|
|
143
164
|
box-sizing: border-box;
|
|
144
165
|
display: flex;
|
|
145
166
|
flex-direction: column;
|
|
@@ -155,25 +176,25 @@ function BuildingScreen() {
|
|
|
155
176
|
.term-spinner {
|
|
156
177
|
width: 10px;
|
|
157
178
|
height: 10px;
|
|
158
|
-
border: 2px solid rgba(
|
|
159
|
-
border-top-color:
|
|
179
|
+
border: 2px solid rgba(97, 218, 251, 0.1);
|
|
180
|
+
border-top-color: var(--react-cyan); /* Spinner Cyan */
|
|
160
181
|
border-radius: 50%;
|
|
161
182
|
animation: spin 0.6s linear infinite;
|
|
162
183
|
}
|
|
163
184
|
|
|
164
|
-
.file-name { color: #
|
|
165
|
-
.accent { color:
|
|
185
|
+
.file-name { color: #8ea9c7; }
|
|
186
|
+
.accent { color: var(--react-cyan); }
|
|
166
187
|
|
|
167
188
|
.card-footer {
|
|
168
189
|
width: 100%;
|
|
169
190
|
padding: 12px 32px;
|
|
170
|
-
background: rgba(
|
|
171
|
-
border-top: 1px solid rgba(
|
|
191
|
+
background: rgba(97, 218, 251, 0.02);
|
|
192
|
+
border-top: 1px solid rgba(97, 218, 251, 0.05);
|
|
172
193
|
display: flex;
|
|
173
194
|
justify-content: space-between;
|
|
174
195
|
align-items: center;
|
|
175
196
|
font-size: 11px;
|
|
176
|
-
color: rgba(255,255,255,0.
|
|
197
|
+
color: rgba(255,255,255,0.3);
|
|
177
198
|
box-sizing: border-box;
|
|
178
199
|
}
|
|
179
200
|
|
|
@@ -181,7 +202,7 @@ function BuildingScreen() {
|
|
|
181
202
|
display: flex;
|
|
182
203
|
align-items: center;
|
|
183
204
|
gap: 6px;
|
|
184
|
-
color:
|
|
205
|
+
color: var(--react-cyan);
|
|
185
206
|
font-weight: 600;
|
|
186
207
|
text-transform: uppercase;
|
|
187
208
|
letter-spacing: 0.05em;
|
|
@@ -190,14 +211,14 @@ function BuildingScreen() {
|
|
|
190
211
|
.dot {
|
|
191
212
|
width: 6px;
|
|
192
213
|
height: 6px;
|
|
193
|
-
background-color:
|
|
214
|
+
background-color: var(--react-cyan);
|
|
194
215
|
border-radius: 50%;
|
|
195
|
-
box-shadow: 0 0 8px
|
|
216
|
+
box-shadow: 0 0 8px var(--react-cyan);
|
|
196
217
|
}
|
|
197
218
|
|
|
198
219
|
@keyframes pulse {
|
|
199
|
-
0%, 100% { opacity: 0.
|
|
200
|
-
50% { opacity: 0.
|
|
220
|
+
0%, 100% { opacity: 0.15; transform: translate(-50%, -50%) scale(1); }
|
|
221
|
+
50% { opacity: 0.25; transform: translate(-50%, -50%) scale(1.1); }
|
|
201
222
|
}
|
|
202
223
|
|
|
203
224
|
@keyframes spin {
|
|
@@ -233,7 +254,7 @@ function BuildingScreen() {
|
|
|
233
254
|
react_1.default.createElement("span", { className: "accent" }, "src/vatts.ts"),
|
|
234
255
|
"...")),
|
|
235
256
|
react_1.default.createElement("div", { className: "term-line", style: { opacity: 0.5 } },
|
|
236
|
-
react_1.default.createElement("span",
|
|
257
|
+
react_1.default.createElement("span", { style: { color: "var(--react-cyan)" } }, "\u2713"),
|
|
237
258
|
react_1.default.createElement("span", { className: "file-name" }, "Optimizing assets")))),
|
|
238
259
|
react_1.default.createElement("div", { className: "card-footer" },
|
|
239
260
|
react_1.default.createElement("span", null, "Building..."),
|
|
@@ -36,7 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.default = ErrorPage;
|
|
37
37
|
/*
|
|
38
38
|
* This file is part of the Vatts.js Project.
|
|
39
|
-
* Copyright (c) 2026
|
|
39
|
+
* Copyright (c) 2026 mfraz
|
|
40
40
|
*
|
|
41
41
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
42
42
|
* you may not use this file except in compliance with the License.
|
|
@@ -60,6 +60,14 @@ function ErrorPage() {
|
|
|
60
60
|
setPath(window.location.pathname);
|
|
61
61
|
}
|
|
62
62
|
}, []);
|
|
63
|
+
// --- CORES DO TEMA REACT ---
|
|
64
|
+
const theme = {
|
|
65
|
+
cyan: '#61DAFB', // React Blue/Cyan
|
|
66
|
+
dark: '#20232a', // React Dark BG Accent
|
|
67
|
+
textMuted: '#8ea9c7', // Azul acinzentado
|
|
68
|
+
bg: '#000000',
|
|
69
|
+
cardBg: '#0a0a0a'
|
|
70
|
+
};
|
|
63
71
|
// --- GLOBAL STYLES ---
|
|
64
72
|
const globalStyles = `
|
|
65
73
|
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;900&family=JetBrains+Mono:wght@400;500&display=swap');
|
|
@@ -67,7 +75,7 @@ function ErrorPage() {
|
|
|
67
75
|
body {
|
|
68
76
|
margin: 0;
|
|
69
77
|
padding: 0;
|
|
70
|
-
background-color:
|
|
78
|
+
background-color: ${theme.bg};
|
|
71
79
|
color: #ffffff;
|
|
72
80
|
font-family: 'Inter', system-ui, sans-serif;
|
|
73
81
|
overflow: hidden;
|
|
@@ -78,10 +86,6 @@ function ErrorPage() {
|
|
|
78
86
|
* { box-sizing: border-box; }
|
|
79
87
|
`;
|
|
80
88
|
// --- INLINE STYLES ---
|
|
81
|
-
// Paleta Estilo Next.js (Preto, Branco, Cinza)
|
|
82
|
-
const primaryColor = '#ffffff';
|
|
83
|
-
const primaryColorDark = '#64748b';
|
|
84
|
-
const primaryRgb = '255, 255, 255';
|
|
85
89
|
const containerStyle = {
|
|
86
90
|
position: 'fixed',
|
|
87
91
|
top: 0,
|
|
@@ -95,15 +99,15 @@ function ErrorPage() {
|
|
|
95
99
|
justifyContent: 'center',
|
|
96
100
|
width: '100vw',
|
|
97
101
|
height: '100vh',
|
|
98
|
-
background:
|
|
102
|
+
background: theme.bg,
|
|
99
103
|
};
|
|
100
104
|
const cardStyle = {
|
|
101
105
|
width: 'min(90%, 500px)',
|
|
102
106
|
display: 'flex',
|
|
103
107
|
flexDirection: 'column',
|
|
104
|
-
background:
|
|
105
|
-
// Borda sutil
|
|
106
|
-
boxShadow: `0 0 0 1px rgba(
|
|
108
|
+
background: theme.cardBg,
|
|
109
|
+
// Borda sutil com brilho Cyan
|
|
110
|
+
boxShadow: `0 0 0 1px rgba(97, 218, 251, 0.1), 0 40px 80px -20px rgba(0, 0, 0, 0.9)`,
|
|
107
111
|
borderRadius: 20,
|
|
108
112
|
overflow: 'hidden',
|
|
109
113
|
position: 'relative',
|
|
@@ -111,10 +115,10 @@ function ErrorPage() {
|
|
|
111
115
|
const neonLine = {
|
|
112
116
|
height: '1px',
|
|
113
117
|
width: '100%',
|
|
114
|
-
// Gradiente
|
|
115
|
-
background: `linear-gradient(90deg, transparent,
|
|
116
|
-
// Brilho
|
|
117
|
-
boxShadow: `0 0 15px rgba(
|
|
118
|
+
// Gradiente usando o Cyan do React
|
|
119
|
+
background: `linear-gradient(90deg, transparent, ${theme.dark}, ${theme.cyan}, ${theme.dark}, transparent)`,
|
|
120
|
+
// Brilho Cyan suave
|
|
121
|
+
boxShadow: `0 0 15px rgba(97, 218, 251, 0.2)`,
|
|
118
122
|
};
|
|
119
123
|
const contentStyle = {
|
|
120
124
|
padding: '32px',
|
|
@@ -129,23 +133,24 @@ function ErrorPage() {
|
|
|
129
133
|
lineHeight: 1,
|
|
130
134
|
letterSpacing: '-0.04em',
|
|
131
135
|
color: '#fff',
|
|
132
|
-
|
|
136
|
+
// Gradiente Branco -> Cyan
|
|
137
|
+
background: `linear-gradient(180deg, #ffffff 0%, ${theme.cyan} 100%)`,
|
|
133
138
|
WebkitBackgroundClip: 'text',
|
|
134
139
|
WebkitTextFillColor: 'transparent',
|
|
135
140
|
marginBottom: 16,
|
|
136
|
-
filter: `drop-shadow(0 0 20px rgba(
|
|
141
|
+
filter: `drop-shadow(0 0 20px rgba(97, 218, 251, 0.1))`,
|
|
137
142
|
};
|
|
138
143
|
const terminalBoxStyle = {
|
|
139
144
|
width: '100%',
|
|
140
|
-
background: 'rgba(
|
|
145
|
+
background: 'rgba(97, 218, 251, 0.03)', // Fundo azulado sutil
|
|
141
146
|
borderRadius: 12,
|
|
142
147
|
padding: '16px',
|
|
143
148
|
marginBottom: 24,
|
|
144
|
-
border: '1px solid rgba(
|
|
149
|
+
border: '1px solid rgba(97, 218, 251, 0.1)', // Borda cyan sutil
|
|
145
150
|
fontFamily: '"JetBrains Mono", monospace',
|
|
146
151
|
fontSize: 12,
|
|
147
152
|
textAlign: 'left',
|
|
148
|
-
color:
|
|
153
|
+
color: theme.textMuted,
|
|
149
154
|
};
|
|
150
155
|
const getBtnStyle = (kind, hovering) => {
|
|
151
156
|
const base = {
|
|
@@ -166,17 +171,18 @@ function ErrorPage() {
|
|
|
166
171
|
if (kind === 'primary') {
|
|
167
172
|
return {
|
|
168
173
|
...base,
|
|
169
|
-
|
|
174
|
+
// Botão Primário agora é o Cyan do React com texto escuro (contraste alto)
|
|
175
|
+
background: hovering ? '#ffffff' : theme.cyan,
|
|
170
176
|
color: '#000000',
|
|
171
|
-
boxShadow: hovering ? `0 0 20px rgba(
|
|
177
|
+
boxShadow: hovering ? `0 0 20px rgba(97, 218, 251, 0.4)` : 'none',
|
|
172
178
|
};
|
|
173
179
|
}
|
|
174
180
|
return {
|
|
175
181
|
...base,
|
|
176
|
-
background: hovering ? 'rgba(
|
|
177
|
-
color: hovering ? '#fff' :
|
|
178
|
-
border: '1px solid
|
|
179
|
-
borderColor: hovering ?
|
|
182
|
+
background: hovering ? 'rgba(97, 218, 251, 0.1)' : 'transparent',
|
|
183
|
+
color: hovering ? '#fff' : theme.textMuted,
|
|
184
|
+
border: '1px solid',
|
|
185
|
+
borderColor: hovering ? theme.cyan : 'rgba(255, 255, 255, 0.1)',
|
|
180
186
|
};
|
|
181
187
|
};
|
|
182
188
|
const brandStyle = {
|
|
@@ -202,10 +208,10 @@ function ErrorPage() {
|
|
|
202
208
|
react_1.default.createElement("div", { style: { width: 8, height: 8, borderRadius: '50%', background: '#fff' } }),
|
|
203
209
|
react_1.default.createElement("div", { style: { width: 8, height: 8, borderRadius: '50%', background: '#fff' } })),
|
|
204
210
|
react_1.default.createElement("div", null,
|
|
205
|
-
react_1.default.createElement("span", { style: { color:
|
|
211
|
+
react_1.default.createElement("span", { style: { color: theme.cyan } }, "GET"),
|
|
206
212
|
' ',
|
|
207
213
|
react_1.default.createElement("span", { style: { color: '#fff' } }, path)),
|
|
208
|
-
react_1.default.createElement("div", { style: { marginTop: 4, color:
|
|
214
|
+
react_1.default.createElement("div", { style: { marginTop: 4, color: theme.textMuted } },
|
|
209
215
|
react_1.default.createElement("span", null, "Error: Route not found"))),
|
|
210
216
|
react_1.default.createElement("div", { style: { display: 'flex', gap: 12, width: '100%' } },
|
|
211
217
|
react_1.default.createElement("a", { href: "/", onMouseEnter: () => setHoverHome(true), onMouseLeave: () => setHoverHome(false), style: { ...getBtnStyle('primary', hoverHome), flex: 1, justifyContent: 'center' } },
|
|
@@ -222,8 +228,8 @@ function ErrorPage() {
|
|
|
222
228
|
"Retry"))),
|
|
223
229
|
react_1.default.createElement("div", { style: {
|
|
224
230
|
padding: '12px 32px',
|
|
225
|
-
background: 'rgba(
|
|
226
|
-
borderTop: '1px solid rgba(
|
|
231
|
+
background: 'rgba(97, 218, 251, 0.02)',
|
|
232
|
+
borderTop: '1px solid rgba(97, 218, 251, 0.05)',
|
|
227
233
|
display: 'flex',
|
|
228
234
|
justifyContent: 'space-between',
|
|
229
235
|
alignItems: 'center',
|
|
@@ -232,11 +238,11 @@ function ErrorPage() {
|
|
|
232
238
|
} },
|
|
233
239
|
react_1.default.createElement("span", null, "Vatts Server"),
|
|
234
240
|
react_1.default.createElement("div", { style: { display: 'flex', alignItems: 'center', gap: 6 } },
|
|
235
|
-
react_1.default.createElement("div", { style: { width: 6, height: 6, borderRadius: '50%', background:
|
|
236
|
-
react_1.default.createElement("span", { style: { color:
|
|
241
|
+
react_1.default.createElement("div", { style: { width: 6, height: 6, borderRadius: '50%', background: theme.cyan, boxShadow: `0 0 6px ${theme.cyan}` } }),
|
|
242
|
+
react_1.default.createElement("span", { style: { color: theme.cyan } }, "Not Found")))),
|
|
237
243
|
react_1.default.createElement("a", { href: "https://npmjs.com/package/vatts", target: "_blank", rel: "noopener noreferrer", style: brandStyle, onMouseEnter: (e) => e.currentTarget.style.opacity = '1', onMouseLeave: (e) => e.currentTarget.style.opacity = '0.4' },
|
|
238
|
-
react_1.default.createElement("img", { src: "https://raw.githubusercontent.com/mfrazlab/vatts.js/master/docs/public/logo.png", alt: "Vatts Logo", style: { width: 20, height: 20
|
|
244
|
+
react_1.default.createElement("img", { src: "https://raw.githubusercontent.com/mfrazlab/vatts.js/master/docs/public/logo.png", alt: "Vatts Logo", style: { width: 20, height: 20 } }),
|
|
239
245
|
react_1.default.createElement("span", { style: { fontSize: 13, fontWeight: 600, color: '#fff' } },
|
|
240
246
|
"Vatts",
|
|
241
|
-
react_1.default.createElement("span", { style: { color:
|
|
247
|
+
react_1.default.createElement("span", { style: { color: theme.cyan } }, ".js"))))));
|
|
242
248
|
}
|
|
@@ -34,6 +34,22 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.default = DevIndicator;
|
|
37
|
+
/*
|
|
38
|
+
* This file is part of the Vatts.js Project.
|
|
39
|
+
* Copyright (c) 2026 mfraz
|
|
40
|
+
*
|
|
41
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
42
|
+
* you may not use this file except in compliance with the License.
|
|
43
|
+
* You may obtain a copy of the License at
|
|
44
|
+
*
|
|
45
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
46
|
+
*
|
|
47
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
48
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
49
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
50
|
+
* See the License for the specific language governing permissions and
|
|
51
|
+
* limitations under the License.
|
|
52
|
+
*/
|
|
37
53
|
const react_1 = __importStar(require("react"));
|
|
38
54
|
const react_dom_1 = require("react-dom");
|
|
39
55
|
function DevIndicator({ hasBuildError = false, onClickBuildError, }) {
|
package/dist/react/ErrorModal.js
CHANGED
|
@@ -36,7 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.ErrorModal = ErrorModal;
|
|
37
37
|
/*
|
|
38
38
|
* This file is part of the Vatts.js Project.
|
|
39
|
-
* Copyright (c) 2026
|
|
39
|
+
* Copyright (c) 2026 mfraz
|
|
40
40
|
*
|
|
41
41
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
42
42
|
* you may not use this file except in compliance with the License.
|
package/dist/react/Link.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.Link = Link;
|
|
7
7
|
/*
|
|
8
8
|
* This file is part of the Vatts.js Project.
|
|
9
|
-
* Copyright (c) 2026
|
|
9
|
+
* Copyright (c) 2026 mfraz
|
|
10
10
|
*
|
|
11
11
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
12
12
|
* you may not use this file except in compliance with the License.
|
package/dist/react/client.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
3
|
* This file is part of the Vatts.js Project.
|
|
4
|
-
* Copyright (c) 2026
|
|
4
|
+
* Copyright (c) 2026 mfraz
|
|
5
5
|
*
|
|
6
6
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
7
|
* you may not use this file except in compliance with the License.
|
|
@@ -38,7 +38,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
/*
|
|
40
40
|
* This file is part of the Vatts.js Project.
|
|
41
|
-
* Copyright (c) 2026
|
|
41
|
+
* Copyright (c) 2026 mfraz
|
|
42
42
|
*
|
|
43
43
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
44
44
|
* you may not use this file except in compliance with the License.
|
|
@@ -3,6 +3,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
/*
|
|
7
|
+
* This file is part of the Vatts.js Project.
|
|
8
|
+
* Copyright (c) 2026 mfraz
|
|
9
|
+
*
|
|
10
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
11
|
+
* you may not use this file except in compliance with the License.
|
|
12
|
+
* You may obtain a copy of the License at
|
|
13
|
+
*
|
|
14
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
+
*
|
|
16
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
17
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
18
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
+
* See the License for the specific language governing permissions and
|
|
20
|
+
* limitations under the License.
|
|
21
|
+
*/
|
|
6
22
|
const react_1 = __importDefault(require("react"));
|
|
7
23
|
const Image = ({ src, width, height, quality = 75, priority = false, className, style, alt = "", ...props }) => {
|
|
8
24
|
function getBaseUrl() {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cria a configuração do Rollup otimizada para React
|
|
3
|
+
* @param {string} entryPoint - Arquivo de entrada
|
|
4
|
+
* @param {string} outdir - Diretório de saída
|
|
5
|
+
* @param {boolean} isProduction - Flag de produção
|
|
6
|
+
* @param {Object} plugins - Objeto contendo arrays de plugins
|
|
7
|
+
* @param {Array} plugins.prePlugins - Plugins para rodar ANTES do framework
|
|
8
|
+
* @param {Array} plugins.postPlugins - Plugins para rodar DEPOIS do framework
|
|
9
|
+
*/
|
|
10
|
+
export function createReactConfig(entryPoint: string, outdir: string, isProduction: boolean, { prePlugins, postPlugins }?: {
|
|
11
|
+
prePlugins: any[];
|
|
12
|
+
postPlugins: any[];
|
|
13
|
+
}): Promise<{
|
|
14
|
+
input: string;
|
|
15
|
+
treeshake: {
|
|
16
|
+
moduleSideEffects: string;
|
|
17
|
+
preset: string;
|
|
18
|
+
};
|
|
19
|
+
cache: boolean;
|
|
20
|
+
perf: boolean;
|
|
21
|
+
maxParallelFileOps: number;
|
|
22
|
+
plugins: any[];
|
|
23
|
+
onwarn(warning: any, warn: any): void;
|
|
24
|
+
}>;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This file is part of the Vatts.js Project.
|
|
4
|
+
* Copyright (c) 2026 mfraz
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
const nodeResolve = require('@rollup/plugin-node-resolve').default;
|
|
19
|
+
const commonjs = require('@rollup/plugin-commonjs').default;
|
|
20
|
+
const replace = require('@rollup/plugin-replace').default;
|
|
21
|
+
const esbuild = require('rollup-plugin-esbuild').default;
|
|
22
|
+
const jsonPlugin = require("@rollup/plugin-json").default;
|
|
23
|
+
/**
|
|
24
|
+
* Cria a configuração do Rollup otimizada para React
|
|
25
|
+
* @param {string} entryPoint - Arquivo de entrada
|
|
26
|
+
* @param {string} outdir - Diretório de saída
|
|
27
|
+
* @param {boolean} isProduction - Flag de produção
|
|
28
|
+
* @param {Object} plugins - Objeto contendo arrays de plugins
|
|
29
|
+
* @param {Array} plugins.prePlugins - Plugins para rodar ANTES do framework
|
|
30
|
+
* @param {Array} plugins.postPlugins - Plugins para rodar DEPOIS do framework
|
|
31
|
+
*/
|
|
32
|
+
async function createReactConfig(entryPoint, outdir, isProduction, { prePlugins = [], postPlugins = [] } = {}) {
|
|
33
|
+
const replaceValues = {
|
|
34
|
+
'process.env.NODE_ENV': JSON.stringify(isProduction ? 'production' : 'development'),
|
|
35
|
+
'process.env.PORT': JSON.stringify(process.vatts?.port || 3000)
|
|
36
|
+
};
|
|
37
|
+
const extensions = ['.mjs', '.js', '.json', '.node', '.jsx', '.tsx', '.ts'];
|
|
38
|
+
const esbuildLoaders = {
|
|
39
|
+
'.js': 'jsx',
|
|
40
|
+
'.ts': 'ts',
|
|
41
|
+
'.tsx': 'tsx'
|
|
42
|
+
};
|
|
43
|
+
return {
|
|
44
|
+
input: entryPoint,
|
|
45
|
+
treeshake: {
|
|
46
|
+
moduleSideEffects: 'no-external',
|
|
47
|
+
preset: isProduction ? 'recommended' : 'smallest'
|
|
48
|
+
},
|
|
49
|
+
cache: isProduction ? true : false,
|
|
50
|
+
perf: false,
|
|
51
|
+
maxParallelFileOps: 20,
|
|
52
|
+
plugins: [
|
|
53
|
+
replace({
|
|
54
|
+
preventAssignment: true,
|
|
55
|
+
values: replaceValues
|
|
56
|
+
}),
|
|
57
|
+
...prePlugins,
|
|
58
|
+
nodeResolve({
|
|
59
|
+
extensions,
|
|
60
|
+
preferBuiltins: true,
|
|
61
|
+
browser: true,
|
|
62
|
+
dedupe: ['react', 'react-dom']
|
|
63
|
+
}),
|
|
64
|
+
commonjs({
|
|
65
|
+
sourceMap: !isProduction,
|
|
66
|
+
requireReturnsDefault: 'auto',
|
|
67
|
+
ignoreTryCatch: true
|
|
68
|
+
}),
|
|
69
|
+
...postPlugins,
|
|
70
|
+
jsonPlugin(),
|
|
71
|
+
esbuild({
|
|
72
|
+
include: /\.[jt]sx?$/,
|
|
73
|
+
exclude: /node_modules/,
|
|
74
|
+
sourceMap: !isProduction,
|
|
75
|
+
minify: isProduction,
|
|
76
|
+
legalComments: 'none',
|
|
77
|
+
treeShaking: isProduction,
|
|
78
|
+
target: 'esnext',
|
|
79
|
+
jsx: 'automatic',
|
|
80
|
+
define: { __VERSION__: '"1.0.0"' },
|
|
81
|
+
loaders: esbuildLoaders
|
|
82
|
+
})
|
|
83
|
+
],
|
|
84
|
+
onwarn(warning, warn) {
|
|
85
|
+
if (warning.code === 'MODULE_LEVEL_DIRECTIVE')
|
|
86
|
+
return;
|
|
87
|
+
if (warning.code === 'THIS_IS_UNDEFINED')
|
|
88
|
+
return;
|
|
89
|
+
if (warning.code === 'CIRCULAR_DEPENDENCY' && warning.message.includes('node_modules'))
|
|
90
|
+
return;
|
|
91
|
+
warn(warning);
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
module.exports = { createReactConfig };
|