xertica-ui 2.3.0 → 2.4.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.
- package/CHANGELOG.md +22 -2
- package/README.md +33 -22
- package/bin/cli.ts +136 -47
- package/bin/language-config.ts +5 -8
- package/components/assistant/modern-chat-input/ModernChatInput.tsx +17 -7
- package/components/assistant/xertica-assistant/parts/AssistantConversationList.tsx +1 -3
- package/components/assistant/xertica-assistant/parts/AssistantFeedbackDialog.tsx +13 -3
- package/components/assistant/xertica-assistant/parts/AssistantMessageBubble.tsx +10 -6
- package/components/assistant/xertica-assistant/xertica-assistant.tsx +1 -3
- package/components/blocks/card-patterns/FeatureCardSkeleton.tsx +1 -6
- package/components/blocks/card-patterns/ProfileCard.tsx +1 -3
- package/components/blocks/card-patterns/ProjectCardSkeleton.tsx +1 -6
- package/components/brand/language-selector/language-selector.stories.tsx +1 -4
- package/components/brand/theme-toggle/ThemeToggle.tsx +5 -1
- package/components/brand/xertica-provider/XerticaProvider.tsx +1 -4
- package/components/index.ts +1 -5
- package/components/layout/sidebar/sidebar.tsx +9 -3
- package/components/media/audio-player/AudioPlayer.tsx +4 -2
- package/components/pages/forgot-password-page/ForgotPasswordPage.tsx +188 -188
- package/components/pages/home-content/HomeContent.tsx +55 -55
- package/components/pages/home-page/HomePage.tsx +5 -1
- package/components/pages/login-page/LoginPage.tsx +4 -2
- package/components/pages/reset-password-page/ResetPasswordPage.tsx +7 -3
- package/components/pages/template-content/TemplateContent.tsx +268 -149
- package/components/pages/verify-email-page/VerifyEmailPage.tsx +9 -9
- package/components/shared/error-boundary.stories.tsx +114 -132
- package/components/shared/error-boundary.tsx +150 -154
- package/components/shared/error-fallbacks.tsx +222 -226
- package/components/ui/stats-card/stats-card-skeleton.tsx +1 -3
- package/components/ui/stats-card/stats-card.stories.tsx +18 -0
- package/components/ui/stats-card/stats-card.tsx +18 -2
- package/components.json +512 -892
- package/contexts/AuthContext.tsx +121 -118
- package/contexts/LanguageContext.tsx +1 -2
- package/dist/AssistantChart-BKVtGUKF.js +3383 -0
- package/dist/AssistantChart-WeycT5Pd.cjs +3551 -0
- package/dist/VerifyEmailPage-Bp1XXl3H.cjs +3305 -0
- package/dist/VerifyEmailPage-DGhuIqkb.js +3296 -0
- package/dist/XerticaProvider-BErr83Bg.js +42 -0
- package/dist/XerticaProvider-CwOkHxiT.cjs +44 -0
- package/dist/XerticaXLogo-BX3ueACh.js +255 -0
- package/dist/XerticaXLogo-qBPhwK3g.cjs +260 -0
- package/dist/assistant.cjs.js +1 -1
- package/dist/assistant.es.js +1 -1
- package/dist/brand.cjs.js +2 -2
- package/dist/brand.es.js +2 -2
- package/dist/cli.js +90 -37
- package/dist/components/brand/theme-toggle/ThemeToggle.d.ts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/ui/stats-card/stats-card.d.ts +10 -0
- package/dist/index.cjs.js +6 -6
- package/dist/index.es.js +6 -6
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +1 -1
- package/dist/pages.cjs.js +1 -1
- package/dist/pages.es.js +1 -1
- package/dist/sidebar-B4ZWaMrE.js +792 -0
- package/dist/sidebar-BS1p2V7t.cjs +795 -0
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +1 -1
- package/dist/xertica-assistant-B1NaSFFj.js +2173 -0
- package/dist/xertica-assistant-CIaUlbIt.cjs +2180 -0
- package/dist/xertica-ui.css +1 -1
- package/docs/architecture-improvements.md +5 -5
- package/docs/architecture.md +16 -10
- package/docs/components/card-patterns.md +19 -17
- package/docs/components/error-boundary.md +201 -191
- package/docs/components/hooks.md +15 -13
- package/docs/components/language-selector.md +20 -16
- package/docs/components/pages.md +323 -309
- package/docs/components/stats-card.md +20 -2
- package/docs/doc-audit.md +12 -11
- package/docs/getting-started.md +41 -28
- package/docs/guidelines.md +14 -12
- package/docs/i18n.md +61 -57
- package/docs/installation.md +268 -267
- package/docs/llms.md +17 -17
- package/docs/state-management.md +17 -17
- package/guidelines/Guidelines.md +17 -14
- package/llms-compact.txt +1 -1
- package/llms-full.txt +11553 -7133
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/styles/xertica/base.css +90 -84
- package/templates/CLAUDE.md +16 -1
- package/templates/guidelines/Guidelines.md +42 -18
- package/templates/package.json +3 -3
- package/templates/src/app/components/AuthGuard.tsx +131 -82
- package/templates/src/features/auth/ui/AuthPageShell.tsx +32 -32
- package/templates/src/features/auth/ui/ForgotPasswordContent.tsx +1 -3
- package/templates/src/features/auth/ui/ResetPasswordContent.tsx +6 -2
- package/templates/src/features/auth/ui/VerifyEmailContent.tsx +2 -6
- package/templates/src/features/home/data/mock.ts +41 -35
- package/templates/src/features/home/ui/HomeContent.tsx +62 -64
- package/templates/src/features/template/ui/CrudTemplate.tsx +1 -4
- package/templates/src/features/template/ui/LoginTemplate.tsx +1 -1
- package/templates/src/features/template/ui/TemplateContent.tsx +28 -20
- package/templates/src/locales/en/pages/templates.json +17 -17
- package/templates/src/locales/es/pages/templates.json +17 -17
- package/templates/src/locales/pt-BR/pages/templates.json +17 -17
- package/templates/src/pages/AssistantPage.tsx +26 -20
- package/templates/src/pages/HomePage.tsx +5 -1
- package/templates/src/shared/error-boundary.tsx +150 -154
- package/templates/src/shared/error-fallbacks.tsx +222 -226
- package/templates/vite.config.ts +12 -9
|
@@ -1,226 +1,222 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { FallbackProps } from './error-boundary';
|
|
3
|
-
|
|
4
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
5
|
-
// error-fallbacks.tsx
|
|
6
|
-
//
|
|
7
|
-
// Three UI fallbacks for the three ErrorBoundary variants.
|
|
8
|
-
// All are intentionally kept dependency-light (no xertica-ui imports) so they
|
|
9
|
-
// work even if the library itself fails to load.
|
|
10
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
11
|
-
|
|
12
|
-
// ── Shared helpers ────────────────────────────────────────────────────────────
|
|
13
|
-
|
|
14
|
-
function isDev() {
|
|
15
|
-
return import.meta.env.DEV;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// ── AppErrorFallback — root crash ─────────────────────────────────────────────
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Full-screen fallback for root-level crashes.
|
|
22
|
-
* Shown when a provider or the app shell itself throws.
|
|
23
|
-
*/
|
|
24
|
-
export function AppErrorFallback({ error, reset }: FallbackProps) {
|
|
25
|
-
return (
|
|
26
|
-
<div
|
|
27
|
-
role="alert"
|
|
28
|
-
style={{
|
|
29
|
-
display: 'flex',
|
|
30
|
-
flexDirection: 'column',
|
|
31
|
-
alignItems: 'center',
|
|
32
|
-
justifyContent: 'center',
|
|
33
|
-
minHeight: '100vh',
|
|
34
|
-
padding: '2rem',
|
|
35
|
-
background: 'var(--background, #f8f9fa)',
|
|
36
|
-
color: 'var(--foreground, #1a1a1a)',
|
|
37
|
-
fontFamily: 'system-ui, sans-serif',
|
|
38
|
-
textAlign: 'center',
|
|
39
|
-
gap: '1rem',
|
|
40
|
-
}}
|
|
41
|
-
>
|
|
42
|
-
{/* Icon */}
|
|
43
|
-
<svg
|
|
44
|
-
width="48"
|
|
45
|
-
height="48"
|
|
46
|
-
viewBox="0 0 24 24"
|
|
47
|
-
fill="none"
|
|
48
|
-
stroke="var(--destructive, #ef4444)"
|
|
49
|
-
strokeWidth="2"
|
|
50
|
-
strokeLinecap="round"
|
|
51
|
-
strokeLinejoin="round"
|
|
52
|
-
aria-hidden="true"
|
|
53
|
-
>
|
|
54
|
-
<circle cx="12" cy="12" r="10" />
|
|
55
|
-
<line x1="12" y1="8" x2="12" y2="12" />
|
|
56
|
-
<line x1="12" y1="16" x2="12.01" y2="16" />
|
|
57
|
-
</svg>
|
|
58
|
-
|
|
59
|
-
<h1 style={{ fontSize: '1.5rem', fontWeight: 700, margin: 0 }}>
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
>
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
>
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
<
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
>
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
>
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
<
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
</button>
|
|
224
|
-
</div>
|
|
225
|
-
);
|
|
226
|
-
}
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FallbackProps } from './error-boundary';
|
|
3
|
+
|
|
4
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
5
|
+
// error-fallbacks.tsx
|
|
6
|
+
//
|
|
7
|
+
// Three UI fallbacks for the three ErrorBoundary variants.
|
|
8
|
+
// All are intentionally kept dependency-light (no xertica-ui imports) so they
|
|
9
|
+
// work even if the library itself fails to load.
|
|
10
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
11
|
+
|
|
12
|
+
// ── Shared helpers ────────────────────────────────────────────────────────────
|
|
13
|
+
|
|
14
|
+
function isDev() {
|
|
15
|
+
return import.meta.env.DEV;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// ── AppErrorFallback — root crash ─────────────────────────────────────────────
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Full-screen fallback for root-level crashes.
|
|
22
|
+
* Shown when a provider or the app shell itself throws.
|
|
23
|
+
*/
|
|
24
|
+
export function AppErrorFallback({ error, reset }: FallbackProps) {
|
|
25
|
+
return (
|
|
26
|
+
<div
|
|
27
|
+
role="alert"
|
|
28
|
+
style={{
|
|
29
|
+
display: 'flex',
|
|
30
|
+
flexDirection: 'column',
|
|
31
|
+
alignItems: 'center',
|
|
32
|
+
justifyContent: 'center',
|
|
33
|
+
minHeight: '100vh',
|
|
34
|
+
padding: '2rem',
|
|
35
|
+
background: 'var(--background, #f8f9fa)',
|
|
36
|
+
color: 'var(--foreground, #1a1a1a)',
|
|
37
|
+
fontFamily: 'system-ui, sans-serif',
|
|
38
|
+
textAlign: 'center',
|
|
39
|
+
gap: '1rem',
|
|
40
|
+
}}
|
|
41
|
+
>
|
|
42
|
+
{/* Icon */}
|
|
43
|
+
<svg
|
|
44
|
+
width="48"
|
|
45
|
+
height="48"
|
|
46
|
+
viewBox="0 0 24 24"
|
|
47
|
+
fill="none"
|
|
48
|
+
stroke="var(--destructive, #ef4444)"
|
|
49
|
+
strokeWidth="2"
|
|
50
|
+
strokeLinecap="round"
|
|
51
|
+
strokeLinejoin="round"
|
|
52
|
+
aria-hidden="true"
|
|
53
|
+
>
|
|
54
|
+
<circle cx="12" cy="12" r="10" />
|
|
55
|
+
<line x1="12" y1="8" x2="12" y2="12" />
|
|
56
|
+
<line x1="12" y1="16" x2="12.01" y2="16" />
|
|
57
|
+
</svg>
|
|
58
|
+
|
|
59
|
+
<h1 style={{ fontSize: '1.5rem', fontWeight: 700, margin: 0 }}>Algo deu errado</h1>
|
|
60
|
+
<p style={{ color: 'var(--muted-foreground, #6b7280)', maxWidth: 420, margin: 0 }}>
|
|
61
|
+
Ocorreu um erro inesperado na aplicação. Tente recarregar a página ou entre em contato com o
|
|
62
|
+
suporte se o problema persistir.
|
|
63
|
+
</p>
|
|
64
|
+
|
|
65
|
+
{isDev() && (
|
|
66
|
+
<pre
|
|
67
|
+
style={{
|
|
68
|
+
background: 'var(--muted, #f3f4f6)',
|
|
69
|
+
border: '1px solid var(--border, #e5e7eb)',
|
|
70
|
+
borderRadius: 8,
|
|
71
|
+
padding: '0.75rem 1rem',
|
|
72
|
+
fontSize: '0.75rem',
|
|
73
|
+
textAlign: 'left',
|
|
74
|
+
maxWidth: 600,
|
|
75
|
+
overflowX: 'auto',
|
|
76
|
+
whiteSpace: 'pre-wrap',
|
|
77
|
+
wordBreak: 'break-word',
|
|
78
|
+
}}
|
|
79
|
+
>
|
|
80
|
+
{error.message}
|
|
81
|
+
{error.stack ? `\n\n${error.stack}` : ''}
|
|
82
|
+
</pre>
|
|
83
|
+
)}
|
|
84
|
+
|
|
85
|
+
<div style={{ display: 'flex', gap: '0.75rem', flexWrap: 'wrap', justifyContent: 'center' }}>
|
|
86
|
+
<button
|
|
87
|
+
onClick={reset}
|
|
88
|
+
style={{
|
|
89
|
+
padding: '0.5rem 1.25rem',
|
|
90
|
+
borderRadius: 6,
|
|
91
|
+
border: '1px solid var(--border, #e5e7eb)',
|
|
92
|
+
background: 'transparent',
|
|
93
|
+
cursor: 'pointer',
|
|
94
|
+
fontSize: '0.875rem',
|
|
95
|
+
color: 'var(--foreground, #1a1a1a)',
|
|
96
|
+
}}
|
|
97
|
+
>
|
|
98
|
+
Tentar novamente
|
|
99
|
+
</button>
|
|
100
|
+
<button
|
|
101
|
+
onClick={() => window.location.assign('/')}
|
|
102
|
+
style={{
|
|
103
|
+
padding: '0.5rem 1.25rem',
|
|
104
|
+
borderRadius: 6,
|
|
105
|
+
border: 'none',
|
|
106
|
+
background: 'var(--primary, #2563eb)',
|
|
107
|
+
color: 'var(--primary-foreground, #fff)',
|
|
108
|
+
cursor: 'pointer',
|
|
109
|
+
fontSize: '0.875rem',
|
|
110
|
+
}}
|
|
111
|
+
>
|
|
112
|
+
Ir para o início
|
|
113
|
+
</button>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// ── PageErrorFallback — route-level crash ─────────────────────────────────────
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Page-area fallback. Shown when a lazy chunk fails to load or a page
|
|
123
|
+
* component throws. The app shell (header, sidebar) remains intact.
|
|
124
|
+
*/
|
|
125
|
+
export function PageErrorFallback({ error, reset }: FallbackProps) {
|
|
126
|
+
return (
|
|
127
|
+
<div
|
|
128
|
+
role="alert"
|
|
129
|
+
className="flex flex-col items-center justify-center flex-1 min-h-[400px] p-8 gap-4 text-center"
|
|
130
|
+
>
|
|
131
|
+
<svg
|
|
132
|
+
width="40"
|
|
133
|
+
height="40"
|
|
134
|
+
viewBox="0 0 24 24"
|
|
135
|
+
fill="none"
|
|
136
|
+
stroke="currentColor"
|
|
137
|
+
strokeWidth="2"
|
|
138
|
+
strokeLinecap="round"
|
|
139
|
+
strokeLinejoin="round"
|
|
140
|
+
className="text-destructive"
|
|
141
|
+
aria-hidden="true"
|
|
142
|
+
>
|
|
143
|
+
<path d="M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" />
|
|
144
|
+
<line x1="12" y1="9" x2="12" y2="13" />
|
|
145
|
+
<line x1="12" y1="17" x2="12.01" y2="17" />
|
|
146
|
+
</svg>
|
|
147
|
+
|
|
148
|
+
<div className="space-y-1">
|
|
149
|
+
<h2 className="text-lg font-semibold">Erro ao carregar página</h2>
|
|
150
|
+
<p className="text-sm text-muted-foreground max-w-sm">
|
|
151
|
+
Esta página encontrou um problema. Clique em "Tentar novamente" ou navegue para outra
|
|
152
|
+
seção.
|
|
153
|
+
</p>
|
|
154
|
+
</div>
|
|
155
|
+
|
|
156
|
+
{isDev() && (
|
|
157
|
+
<pre className="text-left text-xs bg-muted border border-border rounded-lg p-3 max-w-lg w-full overflow-x-auto whitespace-pre-wrap break-words">
|
|
158
|
+
{error.message}
|
|
159
|
+
</pre>
|
|
160
|
+
)}
|
|
161
|
+
|
|
162
|
+
<div className="flex gap-3 flex-wrap justify-center">
|
|
163
|
+
<button
|
|
164
|
+
onClick={reset}
|
|
165
|
+
className="inline-flex items-center px-4 py-2 text-sm rounded-[var(--radius-button)] border border-border bg-transparent hover:bg-accent hover:text-accent-foreground transition-colors"
|
|
166
|
+
>
|
|
167
|
+
Tentar novamente
|
|
168
|
+
</button>
|
|
169
|
+
<button
|
|
170
|
+
onClick={() => window.location.assign('/')}
|
|
171
|
+
className="inline-flex items-center px-4 py-2 text-sm rounded-[var(--radius-button)] bg-primary text-primary-foreground hover:bg-primary/90 transition-colors"
|
|
172
|
+
>
|
|
173
|
+
Ir para o início
|
|
174
|
+
</button>
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// ── SectionErrorFallback — feature/section-level crash ────────────────────────
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Compact inline fallback for section-level errors (data tables, charts,
|
|
184
|
+
* the assistant panel, etc.). Prevents one broken section from crashing the page.
|
|
185
|
+
*/
|
|
186
|
+
export function SectionErrorFallback({ error, reset }: FallbackProps) {
|
|
187
|
+
return (
|
|
188
|
+
<div
|
|
189
|
+
role="alert"
|
|
190
|
+
className="flex flex-col items-center justify-center gap-3 p-6 rounded-[var(--radius-lg)] border border-destructive/30 bg-destructive/5 text-center"
|
|
191
|
+
>
|
|
192
|
+
<svg
|
|
193
|
+
width="24"
|
|
194
|
+
height="24"
|
|
195
|
+
viewBox="0 0 24 24"
|
|
196
|
+
fill="none"
|
|
197
|
+
stroke="currentColor"
|
|
198
|
+
strokeWidth="2"
|
|
199
|
+
strokeLinecap="round"
|
|
200
|
+
strokeLinejoin="round"
|
|
201
|
+
className="text-destructive shrink-0"
|
|
202
|
+
aria-hidden="true"
|
|
203
|
+
>
|
|
204
|
+
<circle cx="12" cy="12" r="10" />
|
|
205
|
+
<line x1="12" y1="8" x2="12" y2="12" />
|
|
206
|
+
<line x1="12" y1="16" x2="12.01" y2="16" />
|
|
207
|
+
</svg>
|
|
208
|
+
|
|
209
|
+
<div className="space-y-1">
|
|
210
|
+
<p className="text-sm font-medium">Não foi possível carregar este conteúdo</p>
|
|
211
|
+
{isDev() && <p className="text-xs text-muted-foreground font-mono">{error.message}</p>}
|
|
212
|
+
</div>
|
|
213
|
+
|
|
214
|
+
<button
|
|
215
|
+
onClick={reset}
|
|
216
|
+
className="inline-flex items-center px-3 py-1.5 text-xs rounded-[var(--radius-button)] border border-border bg-background hover:bg-accent hover:text-accent-foreground transition-colors"
|
|
217
|
+
>
|
|
218
|
+
Tentar novamente
|
|
219
|
+
</button>
|
|
220
|
+
</div>
|
|
221
|
+
);
|
|
222
|
+
}
|
package/templates/vite.config.ts
CHANGED
|
@@ -19,16 +19,19 @@ const isMonorepo = fs.existsSync(path.join(LIB_ROOT, 'components', 'index.ts'));
|
|
|
19
19
|
|
|
20
20
|
const libAliases = isMonorepo
|
|
21
21
|
? [
|
|
22
|
-
{ find: 'xertica-ui/ui',
|
|
23
|
-
{ find: 'xertica-ui/blocks',
|
|
24
|
-
{
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
{ find: 'xertica-ui/
|
|
29
|
-
{ find: 'xertica-ui/
|
|
22
|
+
{ find: 'xertica-ui/ui', replacement: path.join(LIB_ROOT, 'components/ui/index.ts') },
|
|
23
|
+
{ find: 'xertica-ui/blocks', replacement: path.join(LIB_ROOT, 'components/blocks/index.ts') },
|
|
24
|
+
{
|
|
25
|
+
find: 'xertica-ui/assistant',
|
|
26
|
+
replacement: path.join(LIB_ROOT, 'components/assistant/index.ts'),
|
|
27
|
+
},
|
|
28
|
+
{ find: 'xertica-ui/layout', replacement: path.join(LIB_ROOT, 'components/layout/index.ts') },
|
|
29
|
+
{ find: 'xertica-ui/brand', replacement: path.join(LIB_ROOT, 'components/brand/index.ts') },
|
|
30
|
+
{ find: 'xertica-ui/media', replacement: path.join(LIB_ROOT, 'components/media/index.ts') },
|
|
31
|
+
{ find: 'xertica-ui/hooks', replacement: path.join(LIB_ROOT, 'components/hooks/index.ts') },
|
|
32
|
+
{ find: 'xertica-ui/pages', replacement: path.join(LIB_ROOT, 'components/pages/index.ts') },
|
|
30
33
|
// Bare `xertica-ui` must come AFTER subpaths (most-specific first).
|
|
31
|
-
{ find: 'xertica-ui',
|
|
34
|
+
{ find: 'xertica-ui', replacement: path.join(LIB_ROOT, 'components/index.ts') },
|
|
32
35
|
]
|
|
33
36
|
: [];
|
|
34
37
|
|