nyte 1.1.4 → 1.2.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,4 +1,3 @@
1
- import { Options as BoxenOptions } from 'boxen';
2
1
  /**
3
2
  * Um "handle" para uma linha dinâmica. As instâncias desta classe
4
3
  * são retornadas por `Console.dynamicLine()` e usadas para controlar
@@ -76,6 +75,5 @@ export default class Console {
76
75
  Field: string;
77
76
  Value: any;
78
77
  }>): void;
79
- static box(content: string, options?: BoxenOptions): void;
80
78
  static dynamicLine(initialContent: string): DynamicLine;
81
79
  }
@@ -1,9 +1,4 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Levels = exports.Colors = exports.DynamicLine = void 0;
7
2
  /*
8
3
  * This file is part of the Nyte.js Project.
9
4
  * Copyright (c) 2026 itsmuzin
@@ -20,7 +15,11 @@ exports.Levels = exports.Colors = exports.DynamicLine = void 0;
20
15
  * See the License for the specific language governing permissions and
21
16
  * limitations under the License.
22
17
  */
23
- const boxen_1 = __importDefault(require("boxen"));
18
+ var __importDefault = (this && this.__importDefault) || function (mod) {
19
+ return (mod && mod.__esModule) ? mod : { "default": mod };
20
+ };
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.Levels = exports.Colors = exports.DynamicLine = void 0;
24
23
  const node_readline_1 = __importDefault(require("node:readline"));
25
24
  /**
26
25
  * Um "handle" para uma linha dinâmica. As instâncias desta classe
@@ -295,18 +294,6 @@ class Console {
295
294
  output += bottom + '\n';
296
295
  this.writeStatic(output);
297
296
  }
298
- static box(content, options) {
299
- const defaultOptions = {
300
- padding: 1,
301
- margin: 1,
302
- borderStyle: 'round',
303
- borderColor: 'cyan',
304
- titleAlignment: 'left',
305
- };
306
- const finalOptions = { ...defaultOptions, ...options };
307
- const boxedContent = (0, boxen_1.default)(content, finalOptions);
308
- this.writeStatic(boxedContent + '\n');
309
- }
310
297
  static dynamicLine(initialContent) {
311
298
  return new DynamicLine(initialContent);
312
299
  }
package/dist/builder.js CHANGED
@@ -347,13 +347,70 @@ async function watchWithChunks(entryPoint, outdir, hotReloadManager = null) {
347
347
  // Adiciona notificação de build via plugin
348
348
  config.plugins.push({
349
349
  name: 'build-notifier',
350
+ // Controle de ciclo: um ciclo começa no buildStart e termina no buildEnd.
351
+ // Se houve erro no ciclo, não podemos considerar "complete".
352
+ buildStart() {
353
+ this.__nyteCycleHadError = false;
354
+ },
350
355
  closeBundle() {
351
- if (hotReloadManager) {
352
- hotReloadManager.onBuildComplete(true);
356
+ // closeBundle pode rodar em situações inesperadas; não usamos isso pra limpar erro.
357
+ },
358
+ buildEnd(error) {
359
+ if (error) {
360
+ this.__nyteCycleHadError = true;
361
+ if (hotReloadManager) {
362
+ hotReloadManager.onBuildComplete(false, {
363
+ message: error.message,
364
+ name: error.name,
365
+ stack: error.stack,
366
+ // Vite/Rollup às vezes coloca infos adicionais
367
+ cause: error.cause,
368
+ loc: error.loc,
369
+ frame: error.frame,
370
+ id: error.id,
371
+ plugin: error.plugin,
372
+ pluginCode: error.pluginCode,
373
+ watchFiles: error.watchFiles
374
+ });
375
+ }
353
376
  }
354
377
  }
355
378
  });
356
379
  const watcher = await viteBuild(config);
380
+ // Flags do ciclo do watcher (mais confiável para decidir sucesso)
381
+ let watcherCycleHadError = false;
382
+ if (watcher && typeof watcher.on === 'function') {
383
+ watcher.on('event', (event) => {
384
+ if (!event)
385
+ return;
386
+ if (event.code === 'ERROR') {
387
+ watcherCycleHadError = true;
388
+ if (hotReloadManager) {
389
+ hotReloadManager.onBuildComplete(false, {
390
+ message: event.error?.message || 'Unknown build error',
391
+ name: event.error?.name,
392
+ stack: event.error?.stack,
393
+ cause: event.error?.cause,
394
+ loc: event.error?.loc,
395
+ frame: event.error?.frame,
396
+ id: event.error?.id,
397
+ plugin: event.error?.plugin,
398
+ pluginCode: event.error?.pluginCode,
399
+ watchFiles: event.error?.watchFiles
400
+ });
401
+ }
402
+ }
403
+ if (event.code === 'BUNDLE_END') {
404
+ if (hotReloadManager) {
405
+ if (!watcherCycleHadError) {
406
+ hotReloadManager.onBuildComplete(true);
407
+ }
408
+ }
409
+ // Próximo ciclo
410
+ watcherCycleHadError = false;
411
+ }
412
+ });
413
+ }
357
414
  // Aguarda o primeiro build terminar
358
415
  await new Promise((resolve) => {
359
416
  let initialBuild = true;
@@ -370,6 +427,13 @@ async function watchWithChunks(entryPoint, outdir, hotReloadManager = null) {
370
427
  }
371
428
  catch (error) {
372
429
  Console.error('Error starting watch mode with chunks:', error);
430
+ if (hotReloadManager) {
431
+ hotReloadManager.onBuildComplete(false, {
432
+ message: error.message,
433
+ name: error.name,
434
+ stack: error.stack
435
+ });
436
+ }
373
437
  throw error;
374
438
  }
375
439
  }
@@ -391,16 +455,76 @@ async function watch(entryPoint, outfile, hotReloadManager = null) {
391
455
  };
392
456
  config.plugins.push({
393
457
  name: 'build-notifier',
458
+ buildStart() {
459
+ this.__nyteCycleHadError = false;
460
+ },
394
461
  closeBundle() {
395
- if (hotReloadManager) {
396
- hotReloadManager.onBuildComplete(true);
462
+ // Ignorado para sinalização de sucesso
463
+ },
464
+ buildEnd(error) {
465
+ if (error) {
466
+ this.__nyteCycleHadError = true;
467
+ if (hotReloadManager) {
468
+ hotReloadManager.onBuildComplete(false, {
469
+ message: error.message,
470
+ name: error.name,
471
+ stack: error.stack,
472
+ cause: error.cause,
473
+ loc: error.loc,
474
+ frame: error.frame,
475
+ id: error.id,
476
+ plugin: error.plugin,
477
+ pluginCode: error.pluginCode,
478
+ watchFiles: error.watchFiles
479
+ });
480
+ }
397
481
  }
398
482
  }
399
483
  });
400
- await viteBuild(config);
484
+ const watcher = await viteBuild(config);
485
+ let watcherCycleHadError = false;
486
+ if (watcher && typeof watcher.on === 'function') {
487
+ watcher.on('event', (event) => {
488
+ if (!event)
489
+ return;
490
+ if (event.code === 'ERROR') {
491
+ watcherCycleHadError = true;
492
+ if (hotReloadManager) {
493
+ hotReloadManager.onBuildComplete(false, {
494
+ message: event.error?.message || 'Unknown build error',
495
+ name: event.error?.name,
496
+ stack: event.error?.stack,
497
+ cause: event.error?.cause,
498
+ loc: event.error?.loc,
499
+ frame: event.error?.frame,
500
+ id: event.error?.id,
501
+ plugin: event.error?.plugin,
502
+ pluginCode: event.error?.pluginCode,
503
+ watchFiles: event.error?.watchFiles
504
+ });
505
+ }
506
+ }
507
+ if (event.code === 'BUNDLE_END') {
508
+ if (hotReloadManager) {
509
+ if (!watcherCycleHadError) {
510
+ hotReloadManager.onBuildComplete(true);
511
+ }
512
+ }
513
+ watcherCycleHadError = false;
514
+ }
515
+ });
516
+ }
517
+ // (removido) await viteBuild(config); // já estamos em watch mode
401
518
  }
402
519
  catch (error) {
403
520
  Console.error('Error starting watch mode:', error);
521
+ if (hotReloadManager) {
522
+ hotReloadManager.onBuildComplete(false, {
523
+ message: error.message,
524
+ name: error.name,
525
+ stack: error.stack
526
+ });
527
+ }
404
528
  throw error;
405
529
  }
406
530
  }
@@ -2,159 +2,158 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = ErrorPage;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ /*
6
+ * This file is part of the Nyte.js Project.
7
+ * Copyright (c) 2026 itsmuzin
8
+ */
9
+ const react_1 = require("react");
5
10
  const lucide_react_1 = require("lucide-react");
6
11
  function ErrorPage() {
12
+ const [path, setPath] = (0, react_1.useState)('/');
13
+ // Estados apenas para mudar a COR do botão, sem mover nada de lugar
14
+ const [hoverHome, setHoverHome] = (0, react_1.useState)(false);
15
+ const [hoverRetry, setHoverRetry] = (0, react_1.useState)(false);
16
+ (0, react_1.useEffect)(() => {
17
+ if (typeof window !== 'undefined') {
18
+ setPath(window.location.pathname);
19
+ }
20
+ }, []);
21
+ // --- GLOBAL STYLES ---
7
22
  const globalStyles = `
8
- @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;900&display=swap');
23
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;900&family=JetBrains+Mono:wght@400;500&display=swap');
9
24
 
10
25
  body {
11
26
  margin: 0;
12
27
  padding: 0;
13
- background-color: #030712;
14
- color: #f8fafc;
15
- font-family: 'Inter', sans-serif;
16
- overflow: hidden;
17
- display: flex;
18
- align-items: center;
19
- justify-content: center;
20
- min-height: 100vh;
28
+ background-color: #0d0d0d;
29
+ color: #e2e8f0;
30
+ font-family: 'Inter', system-ui, sans-serif;
31
+ overflow: hidden; /* Trava scroll */
32
+ height: 100vh;
33
+ width: 100vw;
21
34
  }
22
35
 
23
- .bg-glow {
24
- position: fixed;
25
- top: 50%;
26
- left: 50%;
27
- transform: translate(-50%, -50%);
28
- width: 500px;
29
- height: 500px;
30
- background: radial-gradient(circle, rgba(34, 211, 238, 0.15) 0%, transparent 70%);
31
- filter: blur(60px);
32
- z-index: -1;
33
- }
34
-
35
- .glass-container {
36
- background: rgba(255, 255, 255, 0.02);
37
- backdrop-filter: blur(20px);
38
- border: 1px solid rgba(255, 255, 255, 0.05);
39
- padding: 3rem;
40
- border-radius: 2rem;
41
- display: flex;
42
- flex-direction: column;
43
- align-items: center;
44
- box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
45
- max-width: 90%;
46
- }
47
-
48
- .error-code {
49
- font-size: 8rem;
50
- font-weight: 900;
51
- line-height: 1;
52
- letter-spacing: -0.05em;
53
- background: linear-gradient(to bottom, #fff, #94a3b8);
54
- -webkit-background-clip: text;
55
- -webkit-text-fill-color: transparent;
56
- margin-bottom: 1rem;
57
- position: relative;
58
- }
59
-
60
- .error-code::after {
61
- content: '404';
62
- position: absolute;
63
- left: 2px;
64
- top: 2px;
65
- z-index: -1;
66
- background: linear-gradient(to bottom, #22d3ee, transparent);
67
- -webkit-background-clip: text;
68
- -webkit-text-fill-color: transparent;
69
- opacity: 0.5;
70
- filter: blur(8px);
71
- }
72
-
73
- .divider {
74
- width: 40px;
75
- height: 4px;
76
- background: #22d3ee;
77
- border-radius: 2px;
78
- margin-bottom: 2rem;
79
- box-shadow: 0 0 15px rgba(34, 211, 238, 0.5);
80
- }
81
-
82
- .message {
83
- font-size: 1.25rem;
84
- color: #94a3b8;
85
- font-weight: 500;
86
- margin-bottom: 2.5rem;
87
- }
88
-
89
- .actions {
90
- display: flex;
91
- gap: 1rem;
92
- }
93
-
94
- .btn {
95
- display: flex;
96
- align-items: center;
97
- gap: 0.5rem;
98
- padding: 0.75rem 1.5rem;
99
- border-radius: 0.75rem;
100
- font-size: 0.875rem;
101
- font-weight: 600;
102
- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
103
- cursor: pointer;
104
- border: none;
105
- text-decoration: none;
106
- }
107
-
108
- .btn-primary {
109
- background: #22d3ee;
110
- color: #030712;
111
- box-shadow: 0 10px 15px -3px rgba(34, 211, 238, 0.3);
112
- }
113
-
114
- .btn-primary:hover {
115
- background: #67e8f9;
116
- transform: translateY(-2px);
117
- box-shadow: 0 20px 25px -5px rgba(34, 211, 238, 0.4);
118
- }
119
-
120
- .btn-secondary {
121
- background: rgba(255, 255, 255, 0.05);
122
- color: #fff;
123
- backdrop-filter: blur(10px);
124
- border: 1px solid rgba(255, 255, 255, 0.1);
125
- }
126
-
127
- .btn-secondary:hover {
128
- background: rgba(255, 255, 255, 0.1);
129
- border-color: rgba(34, 211, 238, 0.3);
130
- transform: translateY(-2px);
131
- }
132
-
133
- .brand {
134
- position: absolute;
135
- bottom: 3rem;
136
- display: flex;
137
- align-items: center;
138
- gap: 0.75rem;
139
- opacity: 0.6;
140
- transition: opacity 0.3s;
141
- }
142
-
143
- .brand:hover {
144
- opacity: 1;
145
- }
146
-
147
- .brand img {
148
- width: 24px;
149
- height: 24px;
150
- object-fit: contain;
151
- }
152
-
153
- .brand span {
154
- font-size: 0.875rem;
155
- font-weight: 700;
156
- letter-spacing: -0.025em;
157
- }
36
+ * { box-sizing: border-box; }
158
37
  `;
159
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("style", { dangerouslySetInnerHTML: { __html: globalStyles } }), (0, jsx_runtime_1.jsx)("div", { className: "bg-glow" }), (0, jsx_runtime_1.jsxs)("div", { className: "glass-container text-center", children: [(0, jsx_runtime_1.jsx)("div", { className: "error-code", children: "404" }), (0, jsx_runtime_1.jsx)("div", { className: "divider" }), (0, jsx_runtime_1.jsx)("h2", { className: "message", children: "Oops! This page has vanished into the nyte." }), (0, jsx_runtime_1.jsxs)("div", { className: "actions", children: [(0, jsx_runtime_1.jsxs)("a", { href: "/", className: "btn btn-primary", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Home, { size: 18 }), "Back Home"] }), (0, jsx_runtime_1.jsxs)("button", { onClick: () => window.location.reload(), className: "btn btn-secondary", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.RefreshCw, { size: 18 }), "Retry"] })] })] }), (0, jsx_runtime_1.jsxs)("a", { className: "brand", href: "https://npmjs.com/package/nyte", target: "_blank", rel: "noopener noreferrer", children: [(0, jsx_runtime_1.jsx)("img", { src: "https://i.imgur.com/zUTrtM5.png", alt: "Nyte Logo" }), (0, jsx_runtime_1.jsxs)("span", { children: ["Nyte", (0, jsx_runtime_1.jsx)("span", { style: { color: '#22d3ee' }, children: ".js" })] })] })] }));
38
+ // --- INLINE STYLES ---
39
+ const containerStyle = {
40
+ // MUDANÇA CRÍTICA:
41
+ // Position fixed cobrindo a tela toda (inset: 0)
42
+ // Usamos Flexbox para centralizar. Isso não tem animação, é layout puro.
43
+ position: 'fixed',
44
+ top: 0,
45
+ left: 0,
46
+ right: 0,
47
+ bottom: 0,
48
+ zIndex: 9999,
49
+ display: 'flex',
50
+ flexDirection: 'column',
51
+ alignItems: 'center', // Centraliza Horizontalmente
52
+ justifyContent: 'center', // Centraliza Verticalmente
53
+ width: '100vw',
54
+ height: '100vh',
55
+ background: '#0d0d0d', // Fundo sólido de segurança
56
+ };
57
+ const cardStyle = {
58
+ width: 'min(90%, 500px)',
59
+ display: 'flex',
60
+ flexDirection: 'column',
61
+ background: 'rgba(10, 10, 12, 0.95)',
62
+ boxShadow: '0 0 0 1px rgba(34, 211, 238, 0.15), 0 40px 80px -20px rgba(0, 0, 0, 0.8)',
63
+ borderRadius: 20,
64
+ overflow: 'hidden',
65
+ position: 'relative',
66
+ // REMOVIDO: transform, transition, opacity
67
+ // O card nasce desenhado na posição final.
68
+ };
69
+ const neonLine = {
70
+ height: '1px',
71
+ width: '100%',
72
+ background: 'linear-gradient(90deg, transparent, #06b6d4, #22d3ee, transparent)',
73
+ boxShadow: '0 0 15px rgba(34, 211, 238, 0.6)',
74
+ };
75
+ const contentStyle = {
76
+ padding: '32px',
77
+ display: 'flex',
78
+ flexDirection: 'column',
79
+ alignItems: 'center',
80
+ textAlign: 'center',
81
+ };
82
+ const codeStyle = {
83
+ fontSize: 80,
84
+ fontWeight: 900,
85
+ lineHeight: 1,
86
+ letterSpacing: '-0.04em',
87
+ color: '#fff',
88
+ background: 'linear-gradient(180deg, #ffffff 0%, #94a3b8 100%)',
89
+ WebkitBackgroundClip: 'text',
90
+ WebkitTextFillColor: 'transparent',
91
+ marginBottom: 16,
92
+ filter: 'drop-shadow(0 0 20px rgba(34, 211, 238, 0.15))',
93
+ };
94
+ const terminalBoxStyle = {
95
+ width: '100%',
96
+ background: 'rgba(0, 0, 0, 0.4)',
97
+ borderRadius: 12,
98
+ padding: '16px',
99
+ marginBottom: 24,
100
+ border: '1px solid rgba(255, 255, 255, 0.05)',
101
+ fontFamily: '"JetBrains Mono", monospace',
102
+ fontSize: 12,
103
+ textAlign: 'left',
104
+ color: '#94a3b8',
105
+ };
106
+ const getBtnStyle = (kind, hovering) => {
107
+ const base = {
108
+ display: 'flex',
109
+ alignItems: 'center',
110
+ gap: 8,
111
+ padding: '10px 20px',
112
+ borderRadius: 10,
113
+ fontSize: 13,
114
+ fontWeight: 600,
115
+ cursor: 'pointer',
116
+ // Mantive a transição de COR (0.2s), mas não move pixel nenhum
117
+ transition: 'background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease',
118
+ border: 'none',
119
+ outline: 'none',
120
+ textDecoration: 'none',
121
+ fontFamily: 'Inter, sans-serif',
122
+ };
123
+ if (kind === 'primary') {
124
+ return {
125
+ ...base,
126
+ background: hovering ? 'rgba(34, 211, 238, 0.15)' : 'rgba(34, 211, 238, 0.1)',
127
+ color: '#22d3ee',
128
+ boxShadow: hovering ? '0 0 20px rgba(34, 211, 238, 0.25)' : 'inset 0 0 0 1px rgba(34, 211, 238, 0.2)',
129
+ };
130
+ }
131
+ return {
132
+ ...base,
133
+ background: hovering ? 'rgba(255, 255, 255, 0.08)' : 'rgba(255, 255, 255, 0.03)',
134
+ color: hovering ? '#fff' : 'rgba(255, 255, 255, 0.6)',
135
+ border: '1px solid transparent',
136
+ borderColor: hovering ? 'rgba(255, 255, 255, 0.1)' : 'transparent',
137
+ };
138
+ };
139
+ const brandStyle = {
140
+ marginTop: 32,
141
+ display: 'flex',
142
+ alignItems: 'center',
143
+ gap: 10,
144
+ opacity: 0.4,
145
+ transition: 'opacity 0.3s', // Apenas opacidade muda, sem movimento
146
+ textDecoration: 'none',
147
+ color: '#fff',
148
+ };
149
+ return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("style", { dangerouslySetInnerHTML: { __html: globalStyles } }), (0, jsx_runtime_1.jsxs)("div", { style: containerStyle, children: [(0, jsx_runtime_1.jsxs)("div", { style: cardStyle, children: [(0, jsx_runtime_1.jsx)("div", { style: neonLine }), (0, jsx_runtime_1.jsxs)("div", { style: contentStyle, children: [(0, jsx_runtime_1.jsx)("div", { style: codeStyle, children: "404" }), (0, jsx_runtime_1.jsxs)("div", { style: terminalBoxStyle, children: [(0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', gap: 6, marginBottom: 8, opacity: 0.5 }, children: [(0, jsx_runtime_1.jsx)("div", { style: { width: 8, height: 8, borderRadius: '50%', background: '#f87171' } }), (0, jsx_runtime_1.jsx)("div", { style: { width: 8, height: 8, borderRadius: '50%', background: '#fbbf24' } }), (0, jsx_runtime_1.jsx)("div", { style: { width: 8, height: 8, borderRadius: '50%', background: '#4ade80' } })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("span", { style: { color: '#c084fc' }, children: "GET" }), ' ', (0, jsx_runtime_1.jsx)("span", { style: { color: '#22d3ee' }, children: path })] }), (0, jsx_runtime_1.jsx)("div", { style: { marginTop: 4, color: '#f87171' }, children: (0, jsx_runtime_1.jsx)("span", { children: "Error: Route not found" }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', gap: 12, width: '100%' }, children: [(0, jsx_runtime_1.jsxs)("a", { href: "/", onMouseEnter: () => setHoverHome(true), onMouseLeave: () => setHoverHome(false), style: { ...getBtnStyle('primary', hoverHome), flex: 1, justifyContent: 'center' }, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Home, { size: 16 }), "Back Home"] }), (0, jsx_runtime_1.jsxs)("button", { onClick: () => window.location.reload(), onMouseEnter: () => setHoverRetry(true), onMouseLeave: () => setHoverRetry(false), style: { ...getBtnStyle('secondary', hoverRetry), flex: 1, justifyContent: 'center' }, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.RefreshCw, { size: 16 }), "Retry"] })] })] }), (0, jsx_runtime_1.jsxs)("div", { style: {
150
+ padding: '12px 32px',
151
+ background: 'rgba(0,0,0,0.3)',
152
+ borderTop: '1px solid rgba(255,255,255,0.03)',
153
+ display: 'flex',
154
+ justifyContent: 'space-between',
155
+ alignItems: 'center',
156
+ fontSize: 11,
157
+ color: 'rgba(255,255,255,0.2)'
158
+ }, children: [(0, jsx_runtime_1.jsx)("span", { children: "Nyte Server" }), (0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', alignItems: 'center', gap: 6 }, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.AlertTriangle, { size: 10, color: "#f87171" }), (0, jsx_runtime_1.jsx)("span", { style: { color: '#f87171' }, children: "Not Found" })] })] })] }), (0, jsx_runtime_1.jsxs)("a", { href: "https://npmjs.com/package/nyte", target: "_blank", rel: "noopener noreferrer", style: brandStyle, onMouseEnter: (e) => e.currentTarget.style.opacity = '1', onMouseLeave: (e) => e.currentTarget.style.opacity = '0.4', children: [(0, jsx_runtime_1.jsx)("img", { src: "https://i.imgur.com/zUTrtM5.png", alt: "Nyte Logo", style: { width: 20, height: 20 } }), (0, jsx_runtime_1.jsxs)("span", { style: { fontSize: 13, fontWeight: 600 }, children: ["Nyte", (0, jsx_runtime_1.jsx)("span", { style: { color: '#22d3ee' }, children: ".js" })] })] })] })] }));
160
159
  }
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ export interface NyteBuildError {
3
+ message?: string;
4
+ name?: string;
5
+ stack?: string;
6
+ frame?: string;
7
+ id?: string;
8
+ plugin?: string;
9
+ pluginCode?: string;
10
+ loc?: any;
11
+ watchFiles?: any;
12
+ cause?: any;
13
+ ts?: number;
14
+ }
15
+ export declare function ErrorModal({ error, isOpen, onClose, onCopy, }: {
16
+ error: NyteBuildError | null;
17
+ isOpen: boolean;
18
+ onClose: () => void;
19
+ onCopy?: () => void;
20
+ }): React.ReactPortal | null;