vatts 2.2.6 → 2.3.0-canary
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/builder.js +54 -17
- package/dist/frameworks/FrontCore.d.ts +34 -0
- package/dist/frameworks/FrontCore.js +128 -0
- package/dist/{vue → frameworks/builds}/vue.build.js +1 -1
- package/dist/frameworks/react/client.d.ts +8 -0
- package/dist/{react → frameworks/react}/client.js +14 -14
- package/dist/{react → frameworks/react/components}/Link.js +2 -2
- package/dist/frameworks/react/entry.client.d.ts +14 -0
- package/dist/frameworks/react/entry.client.js +211 -0
- package/dist/frameworks/react/react-elements.d.ts +10 -0
- package/dist/{react → frameworks/renderers}/renderer-react.d.ts +2 -2
- package/dist/{react → frameworks/renderers}/renderer-react.js +34 -67
- package/dist/{vue → frameworks/renderers}/renderer.vue.d.ts +2 -2
- package/dist/frameworks/renderers/renderer.vue.js +193 -0
- package/dist/frameworks/themes/BuildingPage.d.ts +1 -0
- package/dist/frameworks/themes/BuildingPage.js +312 -0
- package/dist/frameworks/themes/DefaultNotFound.d.ts +1 -0
- package/dist/frameworks/themes/DefaultNotFound.js +330 -0
- package/dist/frameworks/themes/ErrorModal.d.ts +1 -0
- package/dist/frameworks/themes/ErrorModal.js +345 -0
- package/dist/frameworks/themes/ServerError.d.ts +1 -0
- package/dist/frameworks/themes/ServerError.js +401 -0
- package/dist/frameworks/themes/VattsDevBadge.d.ts +1 -0
- package/dist/frameworks/themes/VattsDevBadge.js +232 -0
- package/dist/frameworks/vue/App.vue +149 -0
- package/dist/frameworks/vue/client.d.ts +9 -0
- package/dist/{vue → frameworks/vue}/client.js +13 -11
- package/dist/{vue → frameworks/vue/components}/Link.vue +1 -1
- package/dist/frameworks/vue/entry.client.js +75 -0
- package/dist/global/global.d.ts +1 -2
- package/dist/index.js +12 -1
- package/dist/renderer.js +2 -2
- package/package.json +10 -26
- package/dist/react/BuildingPage.d.ts +0 -2
- package/dist/react/BuildingPage.js +0 -270
- package/dist/react/DefaultNotFound.d.ts +0 -2
- package/dist/react/DefaultNotFound.js +0 -248
- package/dist/react/DevIndicator.d.ts +0 -5
- package/dist/react/DevIndicator.js +0 -203
- package/dist/react/ErrorModal.d.ts +0 -20
- package/dist/react/ErrorModal.js +0 -266
- package/dist/react/client.d.ts +0 -8
- package/dist/react/entry.client.d.ts +0 -6
- package/dist/react/entry.client.js +0 -325
- package/dist/react/server-error.d.ts +0 -8
- package/dist/react/server-error.js +0 -346
- package/dist/vue/App.vue +0 -199
- package/dist/vue/BuildingPage.vue +0 -281
- package/dist/vue/DefaultNotFound.vue +0 -329
- package/dist/vue/DevIndicator.vue +0 -226
- package/dist/vue/ErrorModal.vue +0 -317
- package/dist/vue/client.d.ts +0 -9
- package/dist/vue/entry.client.js +0 -110
- package/dist/vue/renderer.vue.js +0 -387
- package/dist/vue/server-error.vue +0 -351
- /package/dist/{react → frameworks/builds}/react.build.d.ts +0 -0
- /package/dist/{react → frameworks/builds}/react.build.js +0 -0
- /package/dist/{vue → frameworks/builds}/vue.build.d.ts +0 -0
- /package/dist/{react → frameworks/react/components}/Link.d.ts +0 -0
- /package/dist/{react → frameworks/react/components}/image/Image.d.ts +0 -0
- /package/dist/{react → frameworks/react/components}/image/Image.js +0 -0
- /package/dist/{vue → frameworks/vue/components}/image/Image.vue +0 -0
- /package/dist/{vue → frameworks/vue}/entry.client.d.ts +0 -0
|
@@ -0,0 +1,312 @@
|
|
|
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 fs = require('fs');
|
|
19
|
+
const path = require('path');
|
|
20
|
+
function getBuildingScreenHtml() {
|
|
21
|
+
let version = "1.0.0";
|
|
22
|
+
try {
|
|
23
|
+
// 1. Acha o arquivo principal do pacote (ex: dist/index.js)
|
|
24
|
+
const mainFilePath = require.resolve('vatts');
|
|
25
|
+
let packageRoot = path.dirname(mainFilePath);
|
|
26
|
+
// 2. Sobe as pastas até encontrar o diretório que realmente contém o package.json
|
|
27
|
+
while (packageRoot && !fs.existsSync(path.join(packageRoot, 'package.json'))) {
|
|
28
|
+
const parentDir = path.dirname(packageRoot);
|
|
29
|
+
if (parentDir === packageRoot)
|
|
30
|
+
break; // Evita loop infinito na raiz do sistema
|
|
31
|
+
packageRoot = parentDir;
|
|
32
|
+
}
|
|
33
|
+
// 3. Monta o caminho correto e lê a versão
|
|
34
|
+
const pkgPath = path.join(packageRoot, 'package.json');
|
|
35
|
+
version = JSON.parse(fs.readFileSync(pkgPath, 'utf8')).version;
|
|
36
|
+
}
|
|
37
|
+
catch (e) {
|
|
38
|
+
console.error(e);
|
|
39
|
+
}
|
|
40
|
+
return `
|
|
41
|
+
<!DOCTYPE html>
|
|
42
|
+
<html lang="en">
|
|
43
|
+
<head>
|
|
44
|
+
<meta charset="UTF-8" />
|
|
45
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
46
|
+
<title>Vatts.js | Building...</title>
|
|
47
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
48
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
49
|
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;800;900&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
|
|
50
|
+
<style>
|
|
51
|
+
:root {
|
|
52
|
+
--bg-base-start: #050507;
|
|
53
|
+
--bg-base-end: #09090b;
|
|
54
|
+
|
|
55
|
+
--bg-card: #0a0a0c;
|
|
56
|
+
--bg-terminal: #050505;
|
|
57
|
+
|
|
58
|
+
--text-main: #ffffff;
|
|
59
|
+
--text-dim: #71717a;
|
|
60
|
+
|
|
61
|
+
--color-terciary: #6366f1;
|
|
62
|
+
--color-secondary: #0ea5e9;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
body {
|
|
66
|
+
margin: 0;
|
|
67
|
+
padding: 0;
|
|
68
|
+
width: 100vw;
|
|
69
|
+
height: 100vh;
|
|
70
|
+
background-color: var(--bg-base-start);
|
|
71
|
+
background-image: linear-gradient(135deg, var(--bg-base-start), var(--bg-base-end));
|
|
72
|
+
font-family: 'Inter', system-ui, sans-serif;
|
|
73
|
+
color: var(--text-main);
|
|
74
|
+
display: flex;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
align-items: center;
|
|
77
|
+
overflow: hidden;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.container {
|
|
81
|
+
display: flex;
|
|
82
|
+
flex-direction: column;
|
|
83
|
+
align-items: center;
|
|
84
|
+
width: 100%;
|
|
85
|
+
z-index: 2;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* LAYOUT DEITADO COM A BORDA FAKE DE 3PX */
|
|
89
|
+
.card-wrapper {
|
|
90
|
+
width: min(90%, 540px);
|
|
91
|
+
padding: 3px;
|
|
92
|
+
border-radius: 16px;
|
|
93
|
+
background: linear-gradient(135deg, rgb(24, 24, 27), rgb(39, 39, 42), transparent);
|
|
94
|
+
box-sizing: border-box;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.card {
|
|
98
|
+
background-color: var(--bg-card);
|
|
99
|
+
border-radius: 13px;
|
|
100
|
+
padding: 32px 40px;
|
|
101
|
+
width: 100%;
|
|
102
|
+
display: flex;
|
|
103
|
+
flex-direction: column;
|
|
104
|
+
gap: 24px;
|
|
105
|
+
box-sizing: border-box;
|
|
106
|
+
border: none;
|
|
107
|
+
box-shadow: none;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.content {
|
|
111
|
+
display: flex;
|
|
112
|
+
align-items: center;
|
|
113
|
+
justify-content: space-between;
|
|
114
|
+
gap: 32px;
|
|
115
|
+
width: 100%;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.left-side {
|
|
119
|
+
display: flex;
|
|
120
|
+
flex-direction: column;
|
|
121
|
+
align-items: center;
|
|
122
|
+
gap: 12px;
|
|
123
|
+
min-width: 120px;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.left-side img {
|
|
127
|
+
width: 56px;
|
|
128
|
+
height: 56px;
|
|
129
|
+
object-fit: contain;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.title-wrap {
|
|
133
|
+
display: flex;
|
|
134
|
+
flex-direction: column;
|
|
135
|
+
align-items: center;
|
|
136
|
+
gap: 2px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
h1 {
|
|
140
|
+
margin: 0;
|
|
141
|
+
font-size: 1.6rem;
|
|
142
|
+
font-weight: 800;
|
|
143
|
+
letter-spacing: -0.04em;
|
|
144
|
+
background: linear-gradient(to right, #fff, var(--text-dim));
|
|
145
|
+
-webkit-background-clip: text;
|
|
146
|
+
-webkit-text-fill-color: transparent;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.version {
|
|
150
|
+
color: var(--text-dim);
|
|
151
|
+
font-size: 0.8rem;
|
|
152
|
+
font-weight: 500;
|
|
153
|
+
letter-spacing: 0.05em;
|
|
154
|
+
font-family: 'JetBrains Mono', monospace;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.right-side {
|
|
158
|
+
flex: 1;
|
|
159
|
+
display: flex;
|
|
160
|
+
flex-direction: column;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.terminal {
|
|
164
|
+
background-color: var(--bg-terminal);
|
|
165
|
+
border-radius: 8px;
|
|
166
|
+
padding: 20px;
|
|
167
|
+
display: flex;
|
|
168
|
+
flex-direction: column;
|
|
169
|
+
gap: 12px;
|
|
170
|
+
font-family: 'JetBrains Mono', monospace;
|
|
171
|
+
font-size: 0.8rem;
|
|
172
|
+
box-sizing: border-box;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.term-line {
|
|
176
|
+
display: flex;
|
|
177
|
+
align-items: center;
|
|
178
|
+
gap: 12px;
|
|
179
|
+
color: var(--text-dim);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.term-line.active {
|
|
183
|
+
color: var(--text-main);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.spinner {
|
|
187
|
+
width: 12px;
|
|
188
|
+
height: 12px;
|
|
189
|
+
border: 2px solid var(--text-dim);
|
|
190
|
+
border-top-color: var(--color-secondary);
|
|
191
|
+
border-radius: 50%;
|
|
192
|
+
animation: spin 0.8s linear infinite;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.check {
|
|
196
|
+
color: var(--color-secondary);
|
|
197
|
+
font-size: 13px;
|
|
198
|
+
margin-left: 1px;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.file-name {
|
|
202
|
+
color: var(--color-terciary);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.footer {
|
|
206
|
+
display: flex;
|
|
207
|
+
justify-content: space-between;
|
|
208
|
+
align-items: center;
|
|
209
|
+
font-size: 0.75rem;
|
|
210
|
+
color: var(--text-dim);
|
|
211
|
+
font-weight: 500;
|
|
212
|
+
width: 100%;
|
|
213
|
+
border-top: 1px solid rgba(255, 255, 255, 0.02);
|
|
214
|
+
padding-top: 16px;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.pulse-wrap {
|
|
218
|
+
display: flex;
|
|
219
|
+
align-items: center;
|
|
220
|
+
gap: 8px;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.pulse-dot {
|
|
224
|
+
width: 6px;
|
|
225
|
+
height: 6px;
|
|
226
|
+
background-color: var(--color-secondary);
|
|
227
|
+
border-radius: 50%;
|
|
228
|
+
animation: pulse 2s infinite;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
@keyframes spin {
|
|
232
|
+
to { transform: rotate(360deg); }
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
@keyframes pulse {
|
|
236
|
+
0% { opacity: 1; transform: scale(1); }
|
|
237
|
+
50% { opacity: 0.4; transform: scale(0.8); }
|
|
238
|
+
100% { opacity: 1; transform: scale(1); }
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.brand-link {
|
|
242
|
+
margin-top: 40px;
|
|
243
|
+
display: flex;
|
|
244
|
+
align-items: center;
|
|
245
|
+
gap: 10px;
|
|
246
|
+
opacity: 0.5;
|
|
247
|
+
transition: opacity 0.3s ease;
|
|
248
|
+
text-decoration: none;
|
|
249
|
+
color: var(--text-main);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.brand-link:hover {
|
|
253
|
+
opacity: 1;
|
|
254
|
+
}
|
|
255
|
+
</style>
|
|
256
|
+
</head>
|
|
257
|
+
<body>
|
|
258
|
+
<div class="container">
|
|
259
|
+
<div class="card-wrapper">
|
|
260
|
+
<div class="card">
|
|
261
|
+
<div class="content">
|
|
262
|
+
<div class="left-side">
|
|
263
|
+
<img src="https://raw.githubusercontent.com/murillo-frazao-cunha/vatts-docs/master/public/logo.png" alt="Vatts.js Logo" />
|
|
264
|
+
<div class="title-wrap">
|
|
265
|
+
<h1>Vatts.js</h1>
|
|
266
|
+
<span class="version">v${version}</span>
|
|
267
|
+
</div>
|
|
268
|
+
</div>
|
|
269
|
+
|
|
270
|
+
<div class="right-side">
|
|
271
|
+
<div class="terminal">
|
|
272
|
+
<div class="term-line">
|
|
273
|
+
<span class="check">✓</span>
|
|
274
|
+
<span>Initializing environment</span>
|
|
275
|
+
</div>
|
|
276
|
+
<div class="term-line active">
|
|
277
|
+
<div class="spinner"></div>
|
|
278
|
+
<span>Compiling <span class="file-name">src/vatts.ts</span></span>
|
|
279
|
+
</div>
|
|
280
|
+
<div class="term-line" style="opacity: 0.4;">
|
|
281
|
+
<span style="width: 12px; text-align: center;">-</span>
|
|
282
|
+
<span>Optimizing assets</span>
|
|
283
|
+
</div>
|
|
284
|
+
</div>
|
|
285
|
+
</div>
|
|
286
|
+
</div>
|
|
287
|
+
|
|
288
|
+
<div class="footer">
|
|
289
|
+
<div class="pulse-wrap">
|
|
290
|
+
<div class="pulse-dot"></div>
|
|
291
|
+
<span>Building your application...</span>
|
|
292
|
+
</div>
|
|
293
|
+
</div>
|
|
294
|
+
</div>
|
|
295
|
+
</div>
|
|
296
|
+
|
|
297
|
+
<a href="https://npmjs.com/package/vatts" target="_blank" rel="noopener noreferrer" class="brand-link">
|
|
298
|
+
<img src="https://raw.githubusercontent.com/murillo-frazao-cunha/vatts-docs/master/public/logo.png" alt="Vatts Logo" style="width: 24px; height: 24px;" />
|
|
299
|
+
<span style="font-size: 14px; font-weight: 600; letter-spacing: 0.02em;">Vatts.js</span>
|
|
300
|
+
</a>
|
|
301
|
+
</div>
|
|
302
|
+
|
|
303
|
+
<script>
|
|
304
|
+
setTimeout(() => {
|
|
305
|
+
window.location.reload();
|
|
306
|
+
}, 2500);
|
|
307
|
+
</script>
|
|
308
|
+
</body>
|
|
309
|
+
</html>
|
|
310
|
+
`;
|
|
311
|
+
}
|
|
312
|
+
module.exports = { getBuildingScreenHtml };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function getDefaultNotFound(): string;
|
|
@@ -0,0 +1,330 @@
|
|
|
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
|
+
function getDefaultNotFound() {
|
|
19
|
+
return `
|
|
20
|
+
<!DOCTYPE html>
|
|
21
|
+
<html lang="en">
|
|
22
|
+
<head>
|
|
23
|
+
<meta charset="UTF-8" />
|
|
24
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
25
|
+
<title>404 | Not Found</title>
|
|
26
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
27
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
28
|
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;800;900&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
|
|
29
|
+
<style>
|
|
30
|
+
:root {
|
|
31
|
+
--bg-base-start: #050507;
|
|
32
|
+
--bg-base-end: #09090b;
|
|
33
|
+
|
|
34
|
+
--bg-card: #0a0a0c;
|
|
35
|
+
--bg-terminal: #050505;
|
|
36
|
+
|
|
37
|
+
--text-main: #ffffff;
|
|
38
|
+
--text-dim: #71717a;
|
|
39
|
+
--color-accent: #0ea5e9;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
body {
|
|
43
|
+
margin: 0;
|
|
44
|
+
padding: 0;
|
|
45
|
+
width: 100vw;
|
|
46
|
+
height: 100vh;
|
|
47
|
+
background-color: var(--bg-base-start);
|
|
48
|
+
background-image: linear-gradient(135deg, var(--bg-base-start), var(--bg-base-end));
|
|
49
|
+
font-family: 'Inter', system-ui, sans-serif;
|
|
50
|
+
color: var(--text-main);
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
align-items: center;
|
|
55
|
+
overflow: hidden;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.container {
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: column;
|
|
61
|
+
align-items: center;
|
|
62
|
+
width: 100%;
|
|
63
|
+
z-index: 2;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.card-wrapper {
|
|
67
|
+
padding: 3px;
|
|
68
|
+
border-radius: 16px;
|
|
69
|
+
background: linear-gradient(135deg, rgb(24, 24, 27), rgb(39, 39, 42), transparent);
|
|
70
|
+
box-sizing: border-box;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.card {
|
|
74
|
+
background-color: var(--bg-card);
|
|
75
|
+
border-radius: 13px;
|
|
76
|
+
padding: 32px 40px;
|
|
77
|
+
width: 100%;
|
|
78
|
+
display: flex;
|
|
79
|
+
flex-direction: column;
|
|
80
|
+
gap: 24px;
|
|
81
|
+
box-sizing: border-box;
|
|
82
|
+
border: none;
|
|
83
|
+
box-shadow: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* GRID PARA CONTROLAR O ESPAÇO E EVITAR QUE OS ELEMENTOS VAZEM */
|
|
87
|
+
.content {
|
|
88
|
+
display: grid;
|
|
89
|
+
grid-template-columns: auto 1fr;
|
|
90
|
+
align-items: center;
|
|
91
|
+
gap: 32px;
|
|
92
|
+
width: 100%;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.left-side {
|
|
96
|
+
display: flex;
|
|
97
|
+
flex-direction: column;
|
|
98
|
+
align-items: center;
|
|
99
|
+
justify-content: center;
|
|
100
|
+
min-width: 100px;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.code {
|
|
104
|
+
font-size: 4.5rem;
|
|
105
|
+
font-weight: 900;
|
|
106
|
+
line-height: 1;
|
|
107
|
+
letter-spacing: -0.05em;
|
|
108
|
+
background: linear-gradient(to right, #fff, var(--text-dim));
|
|
109
|
+
-webkit-background-clip: text;
|
|
110
|
+
-webkit-text-fill-color: transparent;
|
|
111
|
+
margin: 0;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.error-label {
|
|
115
|
+
font-size: 10px;
|
|
116
|
+
font-weight: 800;
|
|
117
|
+
letter-spacing: 0.1em;
|
|
118
|
+
color: #ef4444;
|
|
119
|
+
text-transform: uppercase;
|
|
120
|
+
margin-top: 4px;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.right-side {
|
|
124
|
+
display: flex;
|
|
125
|
+
flex-direction: column;
|
|
126
|
+
gap: 16px;
|
|
127
|
+
min-width: 0; /* Permite que o container encolha sem quebrar a grid */
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.terminal-box {
|
|
131
|
+
width: 100%;
|
|
132
|
+
background-color: var(--bg-terminal);
|
|
133
|
+
border-radius: 8px;
|
|
134
|
+
padding: 16px;
|
|
135
|
+
font-family: 'JetBrains Mono', monospace;
|
|
136
|
+
font-size: 0.8rem;
|
|
137
|
+
text-align: left;
|
|
138
|
+
color: var(--text-dim);
|
|
139
|
+
box-sizing: border-box;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.terminal-dots {
|
|
143
|
+
display: flex;
|
|
144
|
+
gap: 6px;
|
|
145
|
+
margin-bottom: 10px;
|
|
146
|
+
opacity: 0.5;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.dot {
|
|
150
|
+
width: 8px;
|
|
151
|
+
height: 8px;
|
|
152
|
+
border-radius: 50%;
|
|
153
|
+
background: var(--text-dim);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.terminal-route {
|
|
157
|
+
overflow-wrap: anywhere; /* Impede a rota de vazar para fora do terminal */
|
|
158
|
+
word-break: break-all;
|
|
159
|
+
line-height: 1.4;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.method {
|
|
163
|
+
color: var(--color-accent);
|
|
164
|
+
font-weight: 600;
|
|
165
|
+
margin-right: 6px;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.route-path {
|
|
169
|
+
color: var(--text-main);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.actions {
|
|
173
|
+
display: flex;
|
|
174
|
+
gap: 12px;
|
|
175
|
+
width: 100%;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.btn {
|
|
179
|
+
display: flex;
|
|
180
|
+
align-items: center;
|
|
181
|
+
justify-content: center;
|
|
182
|
+
gap: 8px;
|
|
183
|
+
padding: 10px 20px;
|
|
184
|
+
border-radius: 8px;
|
|
185
|
+
font-size: 0.85rem;
|
|
186
|
+
font-weight: 600;
|
|
187
|
+
cursor: pointer;
|
|
188
|
+
transition: all 0.2s ease;
|
|
189
|
+
border: none;
|
|
190
|
+
outline: none;
|
|
191
|
+
text-decoration: none;
|
|
192
|
+
font-family: 'Inter', sans-serif;
|
|
193
|
+
flex: 1;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.btn-primary {
|
|
197
|
+
background: var(--text-main);
|
|
198
|
+
color: #000000;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.btn-primary:hover {
|
|
202
|
+
opacity: 0.85;
|
|
203
|
+
transform: translateY(-1px);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.btn-secondary {
|
|
207
|
+
background: var(--bg-terminal);
|
|
208
|
+
color: var(--text-main);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.btn-secondary:hover {
|
|
212
|
+
background: #1a1a1a;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.footer {
|
|
216
|
+
display: flex;
|
|
217
|
+
justify-content: space-between;
|
|
218
|
+
align-items: center;
|
|
219
|
+
font-size: 0.75rem;
|
|
220
|
+
color: var(--text-dim);
|
|
221
|
+
font-weight: 500;
|
|
222
|
+
width: 100%;
|
|
223
|
+
border-top: 1px solid rgba(255, 255, 255, 0.02);
|
|
224
|
+
padding-top: 16px;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.status {
|
|
228
|
+
display: flex;
|
|
229
|
+
align-items: center;
|
|
230
|
+
gap: 6px;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.status-dot {
|
|
234
|
+
width: 6px;
|
|
235
|
+
height: 6px;
|
|
236
|
+
border-radius: 50%;
|
|
237
|
+
background: #ef4444;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.brand-link {
|
|
241
|
+
margin-top: 40px;
|
|
242
|
+
display: flex;
|
|
243
|
+
align-items: center;
|
|
244
|
+
gap: 10px;
|
|
245
|
+
opacity: 0.5;
|
|
246
|
+
transition: opacity 0.3s ease;
|
|
247
|
+
text-decoration: none;
|
|
248
|
+
color: var(--text-main);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.brand-link:hover {
|
|
252
|
+
opacity: 1;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/* Responsividade básica para telas muito pequenas */
|
|
256
|
+
@media (max-width: 480px) {
|
|
257
|
+
.content {
|
|
258
|
+
grid-template-columns: 1fr;
|
|
259
|
+
gap: 20px;
|
|
260
|
+
}
|
|
261
|
+
.left-side {
|
|
262
|
+
align-items: center;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
</style>
|
|
266
|
+
</head>
|
|
267
|
+
<body>
|
|
268
|
+
<div class="container">
|
|
269
|
+
<div class="card-wrapper">
|
|
270
|
+
<div class="card">
|
|
271
|
+
<div class="content">
|
|
272
|
+
<div class="left-side">
|
|
273
|
+
<h1 class="code">404</h1>
|
|
274
|
+
<span class="error-label">Not Found</span>
|
|
275
|
+
</div>
|
|
276
|
+
|
|
277
|
+
<div class="right-side">
|
|
278
|
+
<div class="terminal-box">
|
|
279
|
+
<div class="terminal-dots">
|
|
280
|
+
<div class="dot"></div>
|
|
281
|
+
<div class="dot"></div>
|
|
282
|
+
<div class="dot"></div>
|
|
283
|
+
</div>
|
|
284
|
+
<div class="terminal-route">
|
|
285
|
+
<span class="method">GET</span>
|
|
286
|
+
<span class="route-path" id="display-path">/</span>
|
|
287
|
+
</div>
|
|
288
|
+
</div>
|
|
289
|
+
|
|
290
|
+
<div class="actions">
|
|
291
|
+
<a href="/" class="btn btn-primary">
|
|
292
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" /><polyline points="9 22 9 12 15 12 15 22" /></svg>
|
|
293
|
+
Home
|
|
294
|
+
</a>
|
|
295
|
+
<button id="retry-btn" class="btn btn-secondary">
|
|
296
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M21 2v6h-6"></path><path d="M3 12a9 9 0 0 1 15-6.7L21 8"></path><path d="M3 22v-6h6"></path><path d="M21 12a9 9 0 0 1-15 6.7L3 16"></path></svg>
|
|
297
|
+
Retry
|
|
298
|
+
</button>
|
|
299
|
+
</div>
|
|
300
|
+
</div>
|
|
301
|
+
</div>
|
|
302
|
+
|
|
303
|
+
<div class="footer">
|
|
304
|
+
<span>Vatts.js</span>
|
|
305
|
+
<div class="status">
|
|
306
|
+
<div class="status-dot"></div>
|
|
307
|
+
<span style="color: var(--text-main);">404</span>
|
|
308
|
+
</div>
|
|
309
|
+
</div>
|
|
310
|
+
</div>
|
|
311
|
+
</div>
|
|
312
|
+
|
|
313
|
+
<a href="https://npmjs.com/package/vatts" target="_blank" rel="noopener noreferrer" class="brand-link">
|
|
314
|
+
<img src="https://raw.githubusercontent.com/murillo-frazao-cunha/vatts-docs/master/public/logo.png" alt="Vatts Logo" style="width: 24px; height: 24px;" />
|
|
315
|
+
<span style="font-size: 14px; font-weight: 600; letter-spacing: 0.02em;">Vatts.js</span>
|
|
316
|
+
</a>
|
|
317
|
+
</div>
|
|
318
|
+
|
|
319
|
+
<script>
|
|
320
|
+
document.getElementById('display-path').textContent = window.location.pathname;
|
|
321
|
+
|
|
322
|
+
document.getElementById('retry-btn').addEventListener('click', () => {
|
|
323
|
+
window.location.reload();
|
|
324
|
+
});
|
|
325
|
+
</script>
|
|
326
|
+
</body>
|
|
327
|
+
</html>
|
|
328
|
+
`;
|
|
329
|
+
}
|
|
330
|
+
module.exports = { getDefaultNotFound };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|