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.
@@ -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,
@@ -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 = {
@@ -78,107 +78,107 @@ function DevIndicator({ hasBuildError = false, onClickBuildError, }) {
78
78
  const isError = !!hasBuildError;
79
79
  // Criamos o elemento via Portal para injetar no final do <body>
80
80
  return (0, react_dom_1.createPortal)(react_1.default.createElement(react_1.default.Fragment, null,
81
- react_1.default.createElement("style", null, `
82
- @keyframes vatts-pulse {
83
- 0% { opacity: 0.4; }
84
- 50% { opacity: 1; }
85
- 100% { opacity: 0.4; }
86
- }
87
-
88
- @keyframes vatts-spin {
89
- 0% { transform: rotate(0deg); }
90
- 100% { transform: rotate(360deg); }
91
- }
92
-
93
- .vatts-dev-badge {
94
- position: fixed;
95
- bottom: 20px;
96
- right: 20px;
97
- /* Z-index absurdo para garantir que fique acima de tudo */
98
- z-index: 2147483647;
99
-
100
- display: flex;
101
- align-items: center;
102
- gap: 12px;
103
- padding: 8px 14px;
104
- background: rgba(0, 0, 0, 0.85);
105
- backdrop-filter: blur(12px);
106
- -webkit-backdrop-filter: blur(12px);
107
-
108
- border-radius: 10px;
109
- color: #fff;
110
- font-family: 'Inter', system-ui, sans-serif;
111
- font-size: 11px;
112
- font-weight: 600;
113
- letter-spacing: 0.05em;
114
-
115
- /* Estilo Monocromático Next.js */
116
- border: 1px solid rgba(255, 255, 255, 0.1);
117
- box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
118
- transition: all 0.2s ease;
119
- cursor: default;
120
- user-select: none;
121
- }
122
-
123
- .vatts-dev-badge.clickable {
124
- cursor: pointer;
125
- }
126
-
127
- .vatts-dev-badge:hover {
128
- border-color: rgba(255, 255, 255, 0.3);
129
- transform: translateY(-2px);
130
- background: rgba(10, 10, 10, 0.95);
131
- }
132
-
133
- .vatts-status-dot {
134
- width: 7px;
135
- height: 7px;
136
- background: #ffffff; /* Branco para status OK (Estilo Vercel) */
137
- border-radius: 50%;
138
- box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
139
- animation: vatts-pulse 2.5s infinite ease-in-out;
140
- }
141
-
142
- .vatts-status-dot.reloading {
143
- background: #64748b; /* Slate */
144
- box-shadow: none;
145
- }
146
-
147
- .vatts-status-dot.error {
148
- background: #ef4444; /* Mantido vermelho por semântica de erro */
149
- box-shadow: 0 0 10px #ef4444;
150
- animation: vatts-pulse 1s infinite ease-in-out;
151
- }
152
-
153
- .vatts-spinner {
154
- width: 10px;
155
- height: 10px;
156
- border-radius: 50%;
157
- border: 2px solid rgba(255,255,255,0.1);
158
- border-top-color: #ffffff;
159
- animation: vatts-spin 0.8s linear infinite;
160
- }
161
-
162
- .vatts-logo {
163
- color: #ffffff;
164
- font-weight: 800;
165
- display: flex;
166
- align-items: center;
167
- }
168
-
169
- .vatts-logo span {
170
- color: #64748b;
171
- }
172
-
173
- .vatts-error-pill {
174
- margin-left: 8px;
175
- padding: 2px 6px;
176
- border-radius: 4px;
177
- background: #ffffff;
178
- color: #000000;
179
- font-size: 9px;
180
- font-weight: 900;
181
- }
81
+ react_1.default.createElement("style", null, `
82
+ @keyframes vatts-pulse {
83
+ 0% { opacity: 0.4; }
84
+ 50% { opacity: 1; }
85
+ 100% { opacity: 0.4; }
86
+ }
87
+
88
+ @keyframes vatts-spin {
89
+ 0% { transform: rotate(0deg); }
90
+ 100% { transform: rotate(360deg); }
91
+ }
92
+
93
+ .vatts-dev-badge {
94
+ position: fixed;
95
+ bottom: 20px;
96
+ right: 20px;
97
+ /* Z-index absurdo para garantir que fique acima de tudo */
98
+ z-index: 2147483647;
99
+
100
+ display: flex;
101
+ align-items: center;
102
+ gap: 12px;
103
+ padding: 8px 14px;
104
+ background: rgba(0, 0, 0, 0.85);
105
+ backdrop-filter: blur(12px);
106
+ -webkit-backdrop-filter: blur(12px);
107
+
108
+ border-radius: 10px;
109
+ color: #fff;
110
+ font-family: 'Inter', system-ui, sans-serif;
111
+ font-size: 11px;
112
+ font-weight: 600;
113
+ letter-spacing: 0.05em;
114
+
115
+ /* Estilo Monocromático Next.js */
116
+ border: 1px solid rgba(255, 255, 255, 0.1);
117
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
118
+ transition: all 0.2s ease;
119
+ cursor: default;
120
+ user-select: none;
121
+ }
122
+
123
+ .vatts-dev-badge.clickable {
124
+ cursor: pointer;
125
+ }
126
+
127
+ .vatts-dev-badge:hover {
128
+ border-color: rgba(255, 255, 255, 0.3);
129
+ transform: translateY(-2px);
130
+ background: rgba(10, 10, 10, 0.95);
131
+ }
132
+
133
+ .vatts-status-dot {
134
+ width: 7px;
135
+ height: 7px;
136
+ background: #ffffff; /* Branco para status OK (Estilo Vercel) */
137
+ border-radius: 50%;
138
+ box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
139
+ animation: vatts-pulse 2.5s infinite ease-in-out;
140
+ }
141
+
142
+ .vatts-status-dot.reloading {
143
+ background: #64748b; /* Slate */
144
+ box-shadow: none;
145
+ }
146
+
147
+ .vatts-status-dot.error {
148
+ background: #ef4444; /* Mantido vermelho por semântica de erro */
149
+ box-shadow: 0 0 10px #ef4444;
150
+ animation: vatts-pulse 1s infinite ease-in-out;
151
+ }
152
+
153
+ .vatts-spinner {
154
+ width: 10px;
155
+ height: 10px;
156
+ border-radius: 50%;
157
+ border: 2px solid rgba(255,255,255,0.1);
158
+ border-top-color: #ffffff;
159
+ animation: vatts-spin 0.8s linear infinite;
160
+ }
161
+
162
+ .vatts-logo {
163
+ color: #ffffff;
164
+ font-weight: 800;
165
+ display: flex;
166
+ align-items: center;
167
+ }
168
+
169
+ .vatts-logo span {
170
+ color: #64748b;
171
+ }
172
+
173
+ .vatts-error-pill {
174
+ margin-left: 8px;
175
+ padding: 2px 6px;
176
+ border-radius: 4px;
177
+ background: #ffffff;
178
+ color: #000000;
179
+ font-size: 9px;
180
+ font-weight: 900;
181
+ }
182
182
  `),
183
183
  react_1.default.createElement("div", { className: `vatts-dev-badge${isError ? ' clickable' : ''}`, onClick: () => isError && onClickBuildError?.() },
184
184
  isReloading ? (react_1.default.createElement("div", { className: "vatts-spinner" })) : (react_1.default.createElement("div", { className: `vatts-status-dot${isReloading ? ' reloading' : ''}${isError ? ' error' : ''}` })),