vatts 2.0.2 → 2.1.0-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.
Files changed (40) hide show
  1. package/LICENSE +12 -12
  2. package/README.md +63 -63
  3. package/dist/api/console.d.ts +28 -5
  4. package/dist/api/console.js +305 -137
  5. package/dist/api/native-server.js +25 -4
  6. package/dist/bin/vatts.js +192 -4
  7. package/dist/builder.js +70 -69
  8. package/dist/core-go/core-linux-arm64.node +0 -0
  9. package/dist/core-go/core-linux-x64.node +0 -0
  10. package/dist/core-go/core-win-x64.node +0 -0
  11. package/dist/global/global.d.ts +176 -176
  12. package/dist/helpers.d.ts +2 -2
  13. package/dist/helpers.js +20 -41
  14. package/dist/hotReload.js +205 -205
  15. package/dist/index.d.ts +2 -1
  16. package/dist/index.js +104 -19
  17. package/dist/loaders.js +15 -15
  18. package/dist/react/BuildingPage.js +202 -202
  19. package/dist/react/DefaultNotFound.js +16 -16
  20. package/dist/react/DevIndicator.js +101 -101
  21. package/dist/react/entry.client.js +7 -8
  22. package/dist/react/image/Image.js +1 -1
  23. package/dist/react/renderer-react.js +270 -33
  24. package/dist/react/server-error.d.ts +8 -0
  25. package/dist/react/server-error.js +346 -0
  26. package/dist/router.js +1 -65
  27. package/dist/types.d.ts +1 -5
  28. package/dist/utils/utils.d.ts +1 -0
  29. package/dist/utils/utils.js +68 -0
  30. package/dist/vue/App.vue +191 -191
  31. package/dist/vue/BuildingPage.vue +280 -280
  32. package/dist/vue/DefaultNotFound.vue +328 -328
  33. package/dist/vue/DevIndicator.vue +225 -225
  34. package/dist/vue/ErrorModal.vue +316 -316
  35. package/dist/vue/Link.vue +38 -38
  36. package/dist/vue/entry.client.js +7 -7
  37. package/dist/vue/image/Image.vue +106 -106
  38. package/dist/vue/renderer.vue.js +266 -46
  39. package/dist/vue/server-error.vue +351 -0
  40. package/package.json +1 -1
@@ -27,203 +27,203 @@ function BuildingScreen() {
27
27
  version = require("../package.json").version;
28
28
  }
29
29
  catch (e) { }
30
- const styles = `
31
- :root {
32
- --bg-solid: #000000;
33
- --card-bg: #0a0a0a;
34
- /* PALETA: React Theme */
35
- --react-cyan: #61DAFB; /* O azul/ciano clássico do React */
36
- --react-dark: #20232a; /* Fundo escuro azulado */
37
- --primary: #ffffff;
38
- --primary-glow: rgba(97, 218, 251, 0.1);
39
- --text-main: #ffffff;
40
- --text-muted: #8ea9c7; /* Cinza azulado para combinar */
41
- }
42
-
43
- body {
44
- margin: 0;
45
- padding: 0;
46
- width: 100vw;
47
- height: 100vh;
48
- background-color: var(--bg-solid);
49
- font-family: 'Inter', sans-serif;
50
- color: var(--text-main);
51
- overflow: hidden;
52
- position: relative;
53
- }
54
-
55
- .container {
56
- position: absolute;
57
- top: 50%;
58
- left: 50%;
59
- transform: translate(-50%, -50%);
60
- display: flex;
61
- justify-content: center;
62
- align-items: center;
63
- width: 100%;
64
- pointer-events: none;
65
- }
66
-
67
- .build-card {
68
- pointer-events: auto;
69
- position: relative;
70
- width: 100%;
71
- max-width: 420px;
72
- background: var(--card-bg);
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);
75
- border-radius: 20px;
76
- overflow: hidden;
77
- display: flex;
78
- flex-direction: column;
79
- align-items: center;
80
- text-align: center;
81
- }
82
-
83
- .neon-line {
84
- height: 1px;
85
- width: 100%;
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);
89
- }
90
-
91
- .content {
92
- padding: 40px 32px;
93
- width: 100%;
94
- box-sizing: border-box;
95
- display: flex;
96
- flex-direction: column;
97
- align-items: center;
98
- }
99
-
100
- .logo-wrapper {
101
- position: relative;
102
- margin-bottom: 24px;
103
- }
104
-
105
- .logo-wrapper img {
106
- width: 64px;
107
- height: 64px;
108
- object-fit: contain;
109
- position: relative;
110
- z-index: 2;
111
- /* Removi o grayscale para a logo brilhar na cor natural se tiver cor, ou ficar nítida */
112
- filter: none;
113
- }
114
-
115
- .logo-glow {
116
- position: absolute;
117
- top: 50%;
118
- left: 50%;
119
- transform: translate(-50%, -50%);
120
- width: 100%;
121
- height: 100%;
122
- /* Glow Cyan do React */
123
- background: var(--react-cyan);
124
- filter: blur(25px);
125
- opacity: 0.2;
126
- border-radius: 50%;
127
- animation: pulse 2s ease-in-out infinite;
128
- }
129
-
130
- h1 {
131
- margin: 0;
132
- font-size: 2rem;
133
- font-weight: 800;
134
- letter-spacing: -0.03em;
135
- /* Gradiente do texto: Branco para Cyan */
136
- background: linear-gradient(180deg, #ffffff 0%, var(--react-cyan) 100%);
137
- -webkit-background-clip: text;
138
- -webkit-text-fill-color: transparent;
139
- }
140
-
141
- h1 span {
142
- /* Span .js em Cyan Sólido */
143
- color: var(--react-cyan);
144
- -webkit-text-fill-color: var(--react-cyan);
145
- }
146
-
147
- p {
148
- margin: 8px 0 32px 0;
149
- color: var(--text-muted);
150
- font-size: 0.9rem;
151
- font-weight: 500;
152
- }
153
-
154
- .terminal-box {
155
- width: 100%;
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 */
158
- border-radius: 12px;
159
- padding: 16px;
160
- text-align: left;
161
- font-family: 'JetBrains Mono', monospace;
162
- font-size: 0.75rem;
163
- color: var(--text-muted);
164
- box-sizing: border-box;
165
- display: flex;
166
- flex-direction: column;
167
- gap: 8px;
168
- }
169
-
170
- .term-line {
171
- display: flex;
172
- align-items: center;
173
- gap: 8px;
174
- }
175
-
176
- .term-spinner {
177
- width: 10px;
178
- height: 10px;
179
- border: 2px solid rgba(97, 218, 251, 0.1);
180
- border-top-color: var(--react-cyan); /* Spinner Cyan */
181
- border-radius: 50%;
182
- animation: spin 0.6s linear infinite;
183
- }
184
-
185
- .file-name { color: #8ea9c7; }
186
- .accent { color: var(--react-cyan); }
187
-
188
- .card-footer {
189
- width: 100%;
190
- padding: 12px 32px;
191
- background: rgba(97, 218, 251, 0.02);
192
- border-top: 1px solid rgba(97, 218, 251, 0.05);
193
- display: flex;
194
- justify-content: space-between;
195
- align-items: center;
196
- font-size: 11px;
197
- color: rgba(255,255,255,0.3);
198
- box-sizing: border-box;
199
- }
200
-
201
- .status-active {
202
- display: flex;
203
- align-items: center;
204
- gap: 6px;
205
- color: var(--react-cyan);
206
- font-weight: 600;
207
- text-transform: uppercase;
208
- letter-spacing: 0.05em;
209
- }
210
-
211
- .dot {
212
- width: 6px;
213
- height: 6px;
214
- background-color: var(--react-cyan);
215
- border-radius: 50%;
216
- box-shadow: 0 0 8px var(--react-cyan);
217
- }
218
-
219
- @keyframes pulse {
220
- 0%, 100% { opacity: 0.15; transform: translate(-50%, -50%) scale(1); }
221
- 50% { opacity: 0.25; transform: translate(-50%, -50%) scale(1.1); }
222
- }
223
-
224
- @keyframes spin {
225
- to { transform: rotate(360deg); }
226
- }
30
+ const styles = `
31
+ :root {
32
+ --bg-solid: #000000;
33
+ --card-bg: #0a0a0a;
34
+ /* PALETA: React Theme */
35
+ --react-cyan: #61DAFB; /* O azul/ciano clássico do React */
36
+ --react-dark: #20232a; /* Fundo escuro azulado */
37
+ --primary: #ffffff;
38
+ --primary-glow: rgba(97, 218, 251, 0.1);
39
+ --text-main: #ffffff;
40
+ --text-muted: #8ea9c7; /* Cinza azulado para combinar */
41
+ }
42
+
43
+ body {
44
+ margin: 0;
45
+ padding: 0;
46
+ width: 100vw;
47
+ height: 100vh;
48
+ background-color: var(--bg-solid);
49
+ font-family: 'Inter', sans-serif;
50
+ color: var(--text-main);
51
+ overflow: hidden;
52
+ position: relative;
53
+ }
54
+
55
+ .container {
56
+ position: absolute;
57
+ top: 50%;
58
+ left: 50%;
59
+ transform: translate(-50%, -50%);
60
+ display: flex;
61
+ justify-content: center;
62
+ align-items: center;
63
+ width: 100%;
64
+ pointer-events: none;
65
+ }
66
+
67
+ .build-card {
68
+ pointer-events: auto;
69
+ position: relative;
70
+ width: 100%;
71
+ max-width: 420px;
72
+ background: var(--card-bg);
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);
75
+ border-radius: 20px;
76
+ overflow: hidden;
77
+ display: flex;
78
+ flex-direction: column;
79
+ align-items: center;
80
+ text-align: center;
81
+ }
82
+
83
+ .neon-line {
84
+ height: 1px;
85
+ width: 100%;
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);
89
+ }
90
+
91
+ .content {
92
+ padding: 40px 32px;
93
+ width: 100%;
94
+ box-sizing: border-box;
95
+ display: flex;
96
+ flex-direction: column;
97
+ align-items: center;
98
+ }
99
+
100
+ .logo-wrapper {
101
+ position: relative;
102
+ margin-bottom: 24px;
103
+ }
104
+
105
+ .logo-wrapper img {
106
+ width: 64px;
107
+ height: 64px;
108
+ object-fit: contain;
109
+ position: relative;
110
+ z-index: 2;
111
+ /* Removi o grayscale para a logo brilhar na cor natural se tiver cor, ou ficar nítida */
112
+ filter: none;
113
+ }
114
+
115
+ .logo-glow {
116
+ position: absolute;
117
+ top: 50%;
118
+ left: 50%;
119
+ transform: translate(-50%, -50%);
120
+ width: 100%;
121
+ height: 100%;
122
+ /* Glow Cyan do React */
123
+ background: var(--react-cyan);
124
+ filter: blur(25px);
125
+ opacity: 0.2;
126
+ border-radius: 50%;
127
+ animation: pulse 2s ease-in-out infinite;
128
+ }
129
+
130
+ h1 {
131
+ margin: 0;
132
+ font-size: 2rem;
133
+ font-weight: 800;
134
+ letter-spacing: -0.03em;
135
+ /* Gradiente do texto: Branco para Cyan */
136
+ background: linear-gradient(180deg, #ffffff 0%, var(--react-cyan) 100%);
137
+ -webkit-background-clip: text;
138
+ -webkit-text-fill-color: transparent;
139
+ }
140
+
141
+ h1 span {
142
+ /* Span .js em Cyan Sólido */
143
+ color: var(--react-cyan);
144
+ -webkit-text-fill-color: var(--react-cyan);
145
+ }
146
+
147
+ p {
148
+ margin: 8px 0 32px 0;
149
+ color: var(--text-muted);
150
+ font-size: 0.9rem;
151
+ font-weight: 500;
152
+ }
153
+
154
+ .terminal-box {
155
+ width: 100%;
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 */
158
+ border-radius: 12px;
159
+ padding: 16px;
160
+ text-align: left;
161
+ font-family: 'JetBrains Mono', monospace;
162
+ font-size: 0.75rem;
163
+ color: var(--text-muted);
164
+ box-sizing: border-box;
165
+ display: flex;
166
+ flex-direction: column;
167
+ gap: 8px;
168
+ }
169
+
170
+ .term-line {
171
+ display: flex;
172
+ align-items: center;
173
+ gap: 8px;
174
+ }
175
+
176
+ .term-spinner {
177
+ width: 10px;
178
+ height: 10px;
179
+ border: 2px solid rgba(97, 218, 251, 0.1);
180
+ border-top-color: var(--react-cyan); /* Spinner Cyan */
181
+ border-radius: 50%;
182
+ animation: spin 0.6s linear infinite;
183
+ }
184
+
185
+ .file-name { color: #8ea9c7; }
186
+ .accent { color: var(--react-cyan); }
187
+
188
+ .card-footer {
189
+ width: 100%;
190
+ padding: 12px 32px;
191
+ background: rgba(97, 218, 251, 0.02);
192
+ border-top: 1px solid rgba(97, 218, 251, 0.05);
193
+ display: flex;
194
+ justify-content: space-between;
195
+ align-items: center;
196
+ font-size: 11px;
197
+ color: rgba(255,255,255,0.3);
198
+ box-sizing: border-box;
199
+ }
200
+
201
+ .status-active {
202
+ display: flex;
203
+ align-items: center;
204
+ gap: 6px;
205
+ color: var(--react-cyan);
206
+ font-weight: 600;
207
+ text-transform: uppercase;
208
+ letter-spacing: 0.05em;
209
+ }
210
+
211
+ .dot {
212
+ width: 6px;
213
+ height: 6px;
214
+ background-color: var(--react-cyan);
215
+ border-radius: 50%;
216
+ box-shadow: 0 0 8px var(--react-cyan);
217
+ }
218
+
219
+ @keyframes pulse {
220
+ 0%, 100% { opacity: 0.15; transform: translate(-50%, -50%) scale(1); }
221
+ 50% { opacity: 0.25; transform: translate(-50%, -50%) scale(1.1); }
222
+ }
223
+
224
+ @keyframes spin {
225
+ to { transform: rotate(360deg); }
226
+ }
227
227
  `;
228
228
  return (react_1.default.createElement("html", { lang: "en" },
229
229
  react_1.default.createElement("head", null,
@@ -241,7 +241,7 @@ function BuildingScreen() {
241
241
  react_1.default.createElement("div", { className: "content" },
242
242
  react_1.default.createElement("div", { className: "logo-wrapper" },
243
243
  react_1.default.createElement("div", { className: "logo-glow" }),
244
- react_1.default.createElement("img", { src: "https://raw.githubusercontent.com/mfrazlab/vatts.js/master/docs/public/logo.png", alt: "Vatts Logo" })),
244
+ react_1.default.createElement("img", { src: "https://raw.githubusercontent.com/mfrazlab/vatts.js/docs/public/logo.png", alt: "Vatts Logo" })),
245
245
  react_1.default.createElement("h1", null,
246
246
  "Vatts",
247
247
  react_1.default.createElement("span", null, ".js")),
@@ -262,9 +262,9 @@ function BuildingScreen() {
262
262
  react_1.default.createElement("div", { className: "dot" }),
263
263
  "v",
264
264
  version)))),
265
- react_1.default.createElement("script", { dangerouslySetInnerHTML: { __html: `
266
- setTimeout(() => {
267
- window.location.reload();
268
- }, 2500);
265
+ react_1.default.createElement("script", { dangerouslySetInnerHTML: { __html: `
266
+ setTimeout(() => {
267
+ window.location.reload();
268
+ }, 2500);
269
269
  ` } }))));
270
270
  }
@@ -69,21 +69,21 @@ function ErrorPage() {
69
69
  cardBg: '#0a0a0a'
70
70
  };
71
71
  // --- GLOBAL STYLES ---
72
- const globalStyles = `
73
- @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;900&family=JetBrains+Mono:wght@400;500&display=swap');
74
-
75
- body {
76
- margin: 0;
77
- padding: 0;
78
- background-color: ${theme.bg};
79
- color: #ffffff;
80
- font-family: 'Inter', system-ui, sans-serif;
81
- overflow: hidden;
82
- height: 100vh;
83
- width: 100vw;
84
- }
85
-
86
- * { box-sizing: border-box; }
72
+ const globalStyles = `
73
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;900&family=JetBrains+Mono:wght@400;500&display=swap');
74
+
75
+ body {
76
+ margin: 0;
77
+ padding: 0;
78
+ background-color: ${theme.bg};
79
+ color: #ffffff;
80
+ font-family: 'Inter', system-ui, sans-serif;
81
+ overflow: hidden;
82
+ height: 100vh;
83
+ width: 100vw;
84
+ }
85
+
86
+ * { box-sizing: border-box; }
87
87
  `;
88
88
  // --- INLINE STYLES ---
89
89
  const containerStyle = {
@@ -241,7 +241,7 @@ function ErrorPage() {
241
241
  react_1.default.createElement("div", { style: { width: 6, height: 6, borderRadius: '50%', background: theme.cyan, boxShadow: `0 0 6px ${theme.cyan}` } }),
242
242
  react_1.default.createElement("span", { style: { color: theme.cyan } }, "Not Found")))),
243
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' },
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 } }),
244
+ react_1.default.createElement("img", { src: "https://raw.githubusercontent.com/mfrazlab/vatts.js/docs/public/logo.png", alt: "Vatts Logo", style: { width: 20, height: 20 } }),
245
245
  react_1.default.createElement("span", { style: { fontSize: 13, fontWeight: 600, color: '#fff' } },
246
246
  "Vatts",
247
247
  react_1.default.createElement("span", { style: { color: theme.cyan } }, ".js"))))));