vatts 2.0.2 → 2.0.3-canary.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.
@@ -1,329 +1,329 @@
1
- <!--
2
- This file is part of the Vatts.js Project.
3
- Copyright (c) 2026 mfraz
4
-
5
- Licensed under the Apache License, Version 2.0 (the "License");
6
- you may not use this file except in compliance with the License.
7
- You may obtain a copy of the License at
8
-
9
- http://www.apache.org/licenses/LICENSE-2.0
10
-
11
- Unless required by applicable law or agreed to in writing, software
12
- distributed under the License is distributed on an "AS IS" BASIS,
13
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- See the License for the specific language governing permissions and
15
- limitations under the License.
16
- -->
17
- <script setup>
18
- import { ref, onMounted } from 'vue';
19
-
20
- const path = ref('/');
21
-
22
- onMounted(() => {
23
- if (typeof window !== 'undefined') {
24
- path.value = window.location.pathname;
25
- }
26
- });
27
-
28
- const reload = () => {
29
- window.location.reload();
30
- };
31
- </script>
32
-
33
- <template>
34
- <div class="error-page-wrapper">
35
- <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;900&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
36
-
37
- <div class="container">
38
- <div class="card">
39
- <div class="neon-line"></div>
40
-
41
- <div class="content">
42
- <div class="code">404</div>
43
-
44
- <div class="terminal-box">
45
- <div class="terminal-dots">
46
- <div class="dot"></div>
47
- <div class="dot"></div>
48
- <div class="dot"></div>
49
- </div>
50
- <div>
51
- <span class="method">GET</span>
52
- <span class="path">{{ path }}</span>
53
- </div>
54
- <div class="error-msg">
55
- <span>Error: Route not found</span>
56
- </div>
57
- </div>
58
-
59
- <div class="actions">
60
- <a href="/" class="btn btn-primary">
61
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
62
- <path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" />
63
- <polyline points="9 22 9 12 15 12 15 22" />
64
- </svg>
65
- Back Home
66
- </a>
67
- <button @click="reload" class="btn btn-secondary">
68
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
69
- <path d="M21 2v6h-6"></path>
70
- <path d="M3 12a9 9 0 0 1 15-6.7L21 8"></path>
71
- <path d="M3 22v-6h6"></path>
72
- <path d="M21 12a9 9 0 0 1-15 6.7L3 16"></path>
73
- </svg>
74
- Retry
75
- </button>
76
- </div>
77
- </div>
78
-
79
- <div class="footer">
80
- <span>Vatts Server</span>
81
- <div class="status">
82
- <div class="status-dot"></div>
83
- <span class="status-text">Not Found</span>
84
- </div>
85
- </div>
86
- </div>
87
-
88
- <a href="https://npmjs.com/package/vatts" target="_blank" rel="noopener noreferrer" class="brand-link">
89
- <img src="https://raw.githubusercontent.com/mfrazlab/vatts.js/master/docs/public/logo.png" alt="Vatts Logo" class="brand-logo" />
90
- <span class="brand-text">
91
- Vatts<span class="brand-highlight">.js</span>
92
- </span>
93
- </a>
94
- </div>
95
- </div>
96
- </template>
97
-
98
- <style scoped>
99
- /* Reset global local e variáveis */
100
- .error-page-wrapper {
101
- font-family: 'Inter', system-ui, sans-serif;
102
- box-sizing: border-box;
103
- }
104
-
105
- /* Variáveis CSS locais para facilitar manutenção das cores Vue */
106
- .container {
107
- --vue-green: #42b883;
108
- --vue-dark: #35495e;
109
- --bg-color: #000000;
110
- --card-bg: #0a0a0a;
111
-
112
- position: fixed;
113
- top: 0;
114
- left: 0;
115
- right: 0;
116
- bottom: 0;
117
- z-index: 9999;
118
- display: flex;
119
- flex-direction: column;
120
- align-items: center;
121
- justify-content: center;
122
- width: 100vw;
123
- height: 100vh;
124
- background: var(--bg-color);
125
- color: #ffffff;
126
- overflow: hidden;
127
- margin: 0;
128
- padding: 0;
129
- }
130
-
131
- .card {
132
- width: min(90%, 500px);
133
- display: flex;
134
- flex-direction: column;
135
- background: var(--card-bg);
136
- /* Sombra com leve toque de verde */
137
- box-shadow: 0 0 0 1px rgba(66, 184, 131, 0.1), 0 40px 80px -20px rgba(0, 0, 0, 0.9);
138
- border-radius: 20px;
139
- overflow: hidden;
140
- position: relative;
141
- }
142
-
143
- .neon-line {
144
- height: 1px;
145
- width: 100%;
146
- /* Gradiente Verde Vue */
147
- background: linear-gradient(90deg, transparent, var(--vue-dark), var(--vue-green), var(--vue-dark), transparent);
148
- box-shadow: 0 0 15px rgba(66, 184, 131, 0.2);
149
- }
150
-
151
- .content {
152
- padding: 32px;
153
- display: flex;
154
- flex-direction: column;
155
- align-items: center;
156
- text-align: center;
157
- }
158
-
159
- .code {
160
- font-size: 80px;
161
- font-weight: 900;
162
- line-height: 1;
163
- letter-spacing: -0.04em;
164
- color: #fff;
165
- /* Gradiente Texto: Branco para Verde */
166
- background: linear-gradient(180deg, #ffffff 0%, var(--vue-green) 100%);
167
- -webkit-background-clip: text;
168
- -webkit-text-fill-color: transparent;
169
- /* Fallback */
170
- color: var(--vue-green);
171
- margin-bottom: 16px;
172
- filter: drop-shadow(0 0 20px rgba(66, 184, 131, 0.1));
173
- }
174
-
175
- .terminal-box {
176
- width: 100%;
177
- /* Fundo esverdeado muito sutil */
178
- background: rgba(66, 184, 131, 0.03);
179
- border-radius: 12px;
180
- padding: 16px;
181
- margin-bottom: 24px;
182
- /* Borda verde sutil */
183
- border: 1px solid rgba(66, 184, 131, 0.1);
184
- font-family: "JetBrains Mono", monospace;
185
- font-size: 12px;
186
- text-align: left;
187
- color: #a7c4bc; /* Texto terminal mais claro */
188
- box-sizing: border-box;
189
- }
190
-
191
- .terminal-dots {
192
- display: flex;
193
- gap: 6px;
194
- margin-bottom: 8px;
195
- opacity: 0.3;
196
- }
197
-
198
- .dot {
199
- width: 8px;
200
- height: 8px;
201
- border-radius: 50%;
202
- background: #fff;
203
- }
204
-
205
- .method {
206
- color: var(--vue-green); /* GET em verde */
207
- margin-right: 4px;
208
- }
209
-
210
- .path {
211
- color: #fff;
212
- }
213
-
214
- .error-msg {
215
- margin-top: 4px;
216
- color: #5f7e76; /* Verde acinzentado escuro */
217
- }
218
-
219
- .actions {
220
- display: flex;
221
- gap: 12px;
222
- width: 100%;
223
- }
224
-
225
- .btn {
226
- display: flex;
227
- align-items: center;
228
- gap: 8px;
229
- padding: 10px 20px;
230
- border-radius: 10px;
231
- font-size: 13px;
232
- font-weight: 600;
233
- cursor: pointer;
234
- transition: all 0.2s ease;
235
- border: none;
236
- outline: none;
237
- text-decoration: none;
238
- font-family: 'Inter', sans-serif;
239
- flex: 1;
240
- justify-content: center;
241
- }
242
-
243
- .btn-primary {
244
- /* Botão principal Verde Vue */
245
- background: var(--vue-green);
246
- color: #000000;
247
- }
248
-
249
- .btn-primary:hover {
250
- background: #ffffff;
251
- box-shadow: 0 0 20px rgba(66, 184, 131, 0.4);
252
- }
253
-
254
- .btn-secondary {
255
- background: transparent;
256
- color: rgba(255, 255, 255, 0.6);
257
- border: 1px solid rgba(66, 184, 131, 0.2);
258
- }
259
-
260
- .btn-secondary:hover {
261
- background: rgba(66, 184, 131, 0.1);
262
- color: #fff;
263
- border-color: var(--vue-green);
264
- }
265
-
266
- .footer {
267
- padding: 12px 32px;
268
- background: rgba(66, 184, 131, 0.02);
269
- border-top: 1px solid rgba(66, 184, 131, 0.05);
270
- display: flex;
271
- justify-content: space-between;
272
- align-items: center;
273
- font-size: 11px;
274
- color: rgba(255, 255, 255, 0.3);
275
- box-sizing: border-box;
276
- }
277
-
278
- .status {
279
- display: flex;
280
- align-items: center;
281
- gap: 6px;
282
- }
283
-
284
- .status-dot {
285
- width: 6px;
286
- height: 6px;
287
- border-radius: 50%;
288
- /* Ponto de status Verde */
289
- background: var(--vue-green);
290
- box-shadow: 0 0 6px var(--vue-green);
291
- }
292
-
293
- .status-text {
294
- color: var(--vue-green);
295
- }
296
-
297
- .brand-link {
298
- margin-top: 32px;
299
- display: flex;
300
- align-items: center;
301
- gap: 10px;
302
- opacity: 0.4;
303
- transition: opacity 0.3s;
304
- text-decoration: none;
305
- color: #fff;
306
- }
307
-
308
- .brand-link:hover {
309
- opacity: 1;
310
- }
311
-
312
- .brand-logo {
313
- width: 20px;
314
- height: 20px;
315
- /* Removi o grayscale para a logo brilhar normal, se preferir monocromático com verde, pode ajustar */
316
- filter: none;
317
- }
318
-
319
- .brand-text {
320
- font-size: 13px;
321
- font-weight: 600;
322
- color: #fff;
323
- }
324
-
325
- .brand-highlight {
326
- /* .js em verde */
327
- color: var(--vue-green);
328
- }
1
+ <!--
2
+ This file is part of the Vatts.js Project.
3
+ Copyright (c) 2026 mfraz
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ -->
17
+ <script setup>
18
+ import { ref, onMounted } from 'vue';
19
+
20
+ const path = ref('/');
21
+
22
+ onMounted(() => {
23
+ if (typeof window !== 'undefined') {
24
+ path.value = window.location.pathname;
25
+ }
26
+ });
27
+
28
+ const reload = () => {
29
+ window.location.reload();
30
+ };
31
+ </script>
32
+
33
+ <template>
34
+ <div class="error-page-wrapper">
35
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;900&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
36
+
37
+ <div class="container">
38
+ <div class="card">
39
+ <div class="neon-line"></div>
40
+
41
+ <div class="content">
42
+ <div class="code">404</div>
43
+
44
+ <div class="terminal-box">
45
+ <div class="terminal-dots">
46
+ <div class="dot"></div>
47
+ <div class="dot"></div>
48
+ <div class="dot"></div>
49
+ </div>
50
+ <div>
51
+ <span class="method">GET</span>
52
+ <span class="path">{{ path }}</span>
53
+ </div>
54
+ <div class="error-msg">
55
+ <span>Error: Route not found</span>
56
+ </div>
57
+ </div>
58
+
59
+ <div class="actions">
60
+ <a href="/" class="btn btn-primary">
61
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
62
+ <path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" />
63
+ <polyline points="9 22 9 12 15 12 15 22" />
64
+ </svg>
65
+ Back Home
66
+ </a>
67
+ <button @click="reload" class="btn btn-secondary">
68
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
69
+ <path d="M21 2v6h-6"></path>
70
+ <path d="M3 12a9 9 0 0 1 15-6.7L21 8"></path>
71
+ <path d="M3 22v-6h6"></path>
72
+ <path d="M21 12a9 9 0 0 1-15 6.7L3 16"></path>
73
+ </svg>
74
+ Retry
75
+ </button>
76
+ </div>
77
+ </div>
78
+
79
+ <div class="footer">
80
+ <span>Vatts Server</span>
81
+ <div class="status">
82
+ <div class="status-dot"></div>
83
+ <span class="status-text">Not Found</span>
84
+ </div>
85
+ </div>
86
+ </div>
87
+
88
+ <a href="https://npmjs.com/package/vatts" target="_blank" rel="noopener noreferrer" class="brand-link">
89
+ <img src="https://raw.githubusercontent.com/mfrazlab/vatts.js/master/docs/public/logo.png" alt="Vatts Logo" class="brand-logo" />
90
+ <span class="brand-text">
91
+ Vatts<span class="brand-highlight">.js</span>
92
+ </span>
93
+ </a>
94
+ </div>
95
+ </div>
96
+ </template>
97
+
98
+ <style scoped>
99
+ /* Reset global local e variáveis */
100
+ .error-page-wrapper {
101
+ font-family: 'Inter', system-ui, sans-serif;
102
+ box-sizing: border-box;
103
+ }
104
+
105
+ /* Variáveis CSS locais para facilitar manutenção das cores Vue */
106
+ .container {
107
+ --vue-green: #42b883;
108
+ --vue-dark: #35495e;
109
+ --bg-color: #000000;
110
+ --card-bg: #0a0a0a;
111
+
112
+ position: fixed;
113
+ top: 0;
114
+ left: 0;
115
+ right: 0;
116
+ bottom: 0;
117
+ z-index: 9999;
118
+ display: flex;
119
+ flex-direction: column;
120
+ align-items: center;
121
+ justify-content: center;
122
+ width: 100vw;
123
+ height: 100vh;
124
+ background: var(--bg-color);
125
+ color: #ffffff;
126
+ overflow: hidden;
127
+ margin: 0;
128
+ padding: 0;
129
+ }
130
+
131
+ .card {
132
+ width: min(90%, 500px);
133
+ display: flex;
134
+ flex-direction: column;
135
+ background: var(--card-bg);
136
+ /* Sombra com leve toque de verde */
137
+ box-shadow: 0 0 0 1px rgba(66, 184, 131, 0.1), 0 40px 80px -20px rgba(0, 0, 0, 0.9);
138
+ border-radius: 20px;
139
+ overflow: hidden;
140
+ position: relative;
141
+ }
142
+
143
+ .neon-line {
144
+ height: 1px;
145
+ width: 100%;
146
+ /* Gradiente Verde Vue */
147
+ background: linear-gradient(90deg, transparent, var(--vue-dark), var(--vue-green), var(--vue-dark), transparent);
148
+ box-shadow: 0 0 15px rgba(66, 184, 131, 0.2);
149
+ }
150
+
151
+ .content {
152
+ padding: 32px;
153
+ display: flex;
154
+ flex-direction: column;
155
+ align-items: center;
156
+ text-align: center;
157
+ }
158
+
159
+ .code {
160
+ font-size: 80px;
161
+ font-weight: 900;
162
+ line-height: 1;
163
+ letter-spacing: -0.04em;
164
+ color: #fff;
165
+ /* Gradiente Texto: Branco para Verde */
166
+ background: linear-gradient(180deg, #ffffff 0%, var(--vue-green) 100%);
167
+ -webkit-background-clip: text;
168
+ -webkit-text-fill-color: transparent;
169
+ /* Fallback */
170
+ color: var(--vue-green);
171
+ margin-bottom: 16px;
172
+ filter: drop-shadow(0 0 20px rgba(66, 184, 131, 0.1));
173
+ }
174
+
175
+ .terminal-box {
176
+ width: 100%;
177
+ /* Fundo esverdeado muito sutil */
178
+ background: rgba(66, 184, 131, 0.03);
179
+ border-radius: 12px;
180
+ padding: 16px;
181
+ margin-bottom: 24px;
182
+ /* Borda verde sutil */
183
+ border: 1px solid rgba(66, 184, 131, 0.1);
184
+ font-family: "JetBrains Mono", monospace;
185
+ font-size: 12px;
186
+ text-align: left;
187
+ color: #a7c4bc; /* Texto terminal mais claro */
188
+ box-sizing: border-box;
189
+ }
190
+
191
+ .terminal-dots {
192
+ display: flex;
193
+ gap: 6px;
194
+ margin-bottom: 8px;
195
+ opacity: 0.3;
196
+ }
197
+
198
+ .dot {
199
+ width: 8px;
200
+ height: 8px;
201
+ border-radius: 50%;
202
+ background: #fff;
203
+ }
204
+
205
+ .method {
206
+ color: var(--vue-green); /* GET em verde */
207
+ margin-right: 4px;
208
+ }
209
+
210
+ .path {
211
+ color: #fff;
212
+ }
213
+
214
+ .error-msg {
215
+ margin-top: 4px;
216
+ color: #5f7e76; /* Verde acinzentado escuro */
217
+ }
218
+
219
+ .actions {
220
+ display: flex;
221
+ gap: 12px;
222
+ width: 100%;
223
+ }
224
+
225
+ .btn {
226
+ display: flex;
227
+ align-items: center;
228
+ gap: 8px;
229
+ padding: 10px 20px;
230
+ border-radius: 10px;
231
+ font-size: 13px;
232
+ font-weight: 600;
233
+ cursor: pointer;
234
+ transition: all 0.2s ease;
235
+ border: none;
236
+ outline: none;
237
+ text-decoration: none;
238
+ font-family: 'Inter', sans-serif;
239
+ flex: 1;
240
+ justify-content: center;
241
+ }
242
+
243
+ .btn-primary {
244
+ /* Botão principal Verde Vue */
245
+ background: var(--vue-green);
246
+ color: #000000;
247
+ }
248
+
249
+ .btn-primary:hover {
250
+ background: #ffffff;
251
+ box-shadow: 0 0 20px rgba(66, 184, 131, 0.4);
252
+ }
253
+
254
+ .btn-secondary {
255
+ background: transparent;
256
+ color: rgba(255, 255, 255, 0.6);
257
+ border: 1px solid rgba(66, 184, 131, 0.2);
258
+ }
259
+
260
+ .btn-secondary:hover {
261
+ background: rgba(66, 184, 131, 0.1);
262
+ color: #fff;
263
+ border-color: var(--vue-green);
264
+ }
265
+
266
+ .footer {
267
+ padding: 12px 32px;
268
+ background: rgba(66, 184, 131, 0.02);
269
+ border-top: 1px solid rgba(66, 184, 131, 0.05);
270
+ display: flex;
271
+ justify-content: space-between;
272
+ align-items: center;
273
+ font-size: 11px;
274
+ color: rgba(255, 255, 255, 0.3);
275
+ box-sizing: border-box;
276
+ }
277
+
278
+ .status {
279
+ display: flex;
280
+ align-items: center;
281
+ gap: 6px;
282
+ }
283
+
284
+ .status-dot {
285
+ width: 6px;
286
+ height: 6px;
287
+ border-radius: 50%;
288
+ /* Ponto de status Verde */
289
+ background: var(--vue-green);
290
+ box-shadow: 0 0 6px var(--vue-green);
291
+ }
292
+
293
+ .status-text {
294
+ color: var(--vue-green);
295
+ }
296
+
297
+ .brand-link {
298
+ margin-top: 32px;
299
+ display: flex;
300
+ align-items: center;
301
+ gap: 10px;
302
+ opacity: 0.4;
303
+ transition: opacity 0.3s;
304
+ text-decoration: none;
305
+ color: #fff;
306
+ }
307
+
308
+ .brand-link:hover {
309
+ opacity: 1;
310
+ }
311
+
312
+ .brand-logo {
313
+ width: 20px;
314
+ height: 20px;
315
+ /* Removi o grayscale para a logo brilhar normal, se preferir monocromático com verde, pode ajustar */
316
+ filter: none;
317
+ }
318
+
319
+ .brand-text {
320
+ font-size: 13px;
321
+ font-weight: 600;
322
+ color: #fff;
323
+ }
324
+
325
+ .brand-highlight {
326
+ /* .js em verde */
327
+ color: var(--vue-green);
328
+ }
329
329
  </style>