create-wervt 0.2.4 → 0.2.6

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 (33) hide show
  1. package/package.json +1 -1
  2. package/template/.claude/skills/nuxt-ui/SKILL.md +334 -0
  3. package/template/.claude/skills/nuxt-ui/references/components.md +377 -0
  4. package/template/.claude/skills/nuxt-ui/references/composables.md +127 -0
  5. package/template/.claude/skills/nuxt-ui/references/layouts/chat.md +195 -0
  6. package/template/.claude/skills/nuxt-ui/references/layouts/dashboard.md +220 -0
  7. package/template/.claude/skills/nuxt-ui/references/layouts/docs.md +141 -0
  8. package/template/.claude/skills/nuxt-ui/references/layouts/editor.md +167 -0
  9. package/template/.claude/skills/nuxt-ui/references/layouts/page.md +260 -0
  10. package/template/.claude/skills/nuxt-ui/references/theming.md +427 -0
  11. package/template/.claude/skills/nuxt-ui-mobile/SKILL.md +92 -0
  12. package/template/.claude/skills/nuxt-ui-mobile/examples/app/composables/useDemoItems.ts +18 -0
  13. package/template/.claude/skills/nuxt-ui-mobile/examples/app/pages/index.vue +121 -0
  14. package/template/.claude/skills/nuxt-ui-mobile/examples/app/pages/items/[id].vue +77 -0
  15. package/template/.claude/skills/nuxt-ui-mobile/examples/app/pages/settings/index.vue +71 -0
  16. package/template/.claude/skills/nuxt-ui-mobile/examples/app/pages/settings/sort.vue +23 -0
  17. package/template/.claude/skills/nuxt-ui-mobile/references/patterns.md +212 -0
  18. package/template/.claude/skills/nuxt-ui-mobile/references/review-checklist.md +49 -0
  19. package/template/.claude/skills/nuxt-ui-mobile/references/tokens.md +86 -0
  20. package/template/.claude/skills/nuxt-ui-mobile/scripts/gen-palette.mjs +58 -0
  21. package/template/.claude/skills/nuxt-ui-mobile/template/app/app.config.ts +298 -0
  22. package/template/.claude/skills/nuxt-ui-mobile/template/app/app.vue +8 -0
  23. package/template/.claude/skills/nuxt-ui-mobile/template/app/assets/css/main.css +331 -0
  24. package/template/.claude/skills/nuxt-ui-mobile/template/app/components/mobile/ActionSheet.vue +47 -0
  25. package/template/.claude/skills/nuxt-ui-mobile/template/app/components/mobile/ListRow.vue +73 -0
  26. package/template/.claude/skills/nuxt-ui-mobile/template/app/components/mobile/ListSection.vue +26 -0
  27. package/template/.claude/skills/nuxt-ui-mobile/template/app/components/mobile/NavBar.vue +88 -0
  28. package/template/.claude/skills/nuxt-ui-mobile/template/app/components/mobile/TabBar.vue +45 -0
  29. package/template/.claude/skills/nuxt-ui-mobile/template/app/layouts/default.vue +16 -0
  30. package/template/.claude/skills/nuxt-ui-mobile/template/app/layouts/plain.vue +6 -0
  31. package/template/.claude/skills/nuxt-ui-mobile/template/nuxt.config.ts +27 -0
  32. package/template/AGENTS.md +33 -1
  33. package/template/package.json +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-wervt",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "description": "Create a new wervt app: Nuxt 5, Postgres with Drizzle, live data with Electric.",
5
5
  "homepage": "https://wervt.app",
6
6
  "license": "MIT",
@@ -0,0 +1,334 @@
1
+ ---
2
+ name: nuxt-ui
3
+ description: Build UIs with @nuxt/ui v4 — 125+ accessible Vue components with Tailwind CSS theming. Use when creating interfaces, customizing themes to match a brand, building forms, or composing layouts like dashboards, docs sites, and chat interfaces.
4
+ ---
5
+
6
+ # Nuxt UI
7
+
8
+ Vue component library built on [Reka UI](https://reka-ui.com/) + [Tailwind CSS](https://tailwindcss.com/) + [Tailwind Variants](https://www.tailwind-variants.org/). Works with Nuxt, Vue (Vite), Laravel (Inertia), and AdonisJS (Inertia).
9
+
10
+ ## Installation
11
+
12
+ ### Nuxt
13
+
14
+ ```bash
15
+ pnpm add @nuxt/ui tailwindcss
16
+ ```
17
+
18
+ ```ts
19
+ // nuxt.config.ts
20
+ export default defineNuxtConfig({
21
+ modules: ['@nuxt/ui'],
22
+ css: ['~/assets/css/main.css']
23
+ })
24
+ ```
25
+
26
+ ```css
27
+ /* app/assets/css/main.css */
28
+ @import "tailwindcss";
29
+ @import "@nuxt/ui";
30
+ ```
31
+
32
+ ```vue
33
+ <!-- app.vue -->
34
+ <template>
35
+ <UApp>
36
+ <NuxtPage />
37
+ </UApp>
38
+ </template>
39
+ ```
40
+
41
+ ### Vue (Vite)
42
+
43
+ ```bash
44
+ pnpm add @nuxt/ui tailwindcss
45
+ ```
46
+
47
+ ```ts
48
+ // vite.config.ts
49
+ import { defineConfig } from 'vite'
50
+ import vue from '@vitejs/plugin-vue'
51
+ import ui from '@nuxt/ui/vite'
52
+
53
+ export default defineConfig({
54
+ plugins: [
55
+ vue(),
56
+ ui()
57
+ ]
58
+ })
59
+ ```
60
+
61
+ ```ts
62
+ // src/main.ts
63
+ import './assets/main.css'
64
+ import { createApp } from 'vue'
65
+ import { createRouter, createWebHistory } from 'vue-router'
66
+ import ui from '@nuxt/ui/vue-plugin'
67
+ import App from './App.vue'
68
+
69
+ const app = createApp(App)
70
+
71
+ const router = createRouter({
72
+ routes: [],
73
+ history: createWebHistory()
74
+ })
75
+
76
+ app.use(router)
77
+ app.use(ui)
78
+ app.mount('#app')
79
+ ```
80
+
81
+ ```css
82
+ /* assets/main.css */
83
+ @import "tailwindcss";
84
+ @import "@nuxt/ui";
85
+ ```
86
+
87
+ ```vue
88
+ <!-- src/App.vue -->
89
+ <template>
90
+ <UApp>
91
+ <RouterView />
92
+ </UApp>
93
+ </template>
94
+ ```
95
+
96
+ > **Vue**: Add `class="isolate"` to your root `<div id="app">` in `index.html`.
97
+
98
+ > **Vue + Inertia**: Use `ui({ router: 'inertia' })` in `vite.config.ts`.
99
+
100
+ ### UApp
101
+
102
+ Wrapping your app in `UApp` is **required** — it provides global config for toasts, tooltips, and programmatic overlays. It also accepts a `locale` prop for i18n (see [composables reference](references/composables.md)).
103
+
104
+ ## Icons
105
+
106
+ Nuxt UI uses [Iconify](https://iconify.design/) for 200,000+ icons. In Nuxt, `@nuxt/icon` is auto-registered. In Vue, icons work out of the box via the Vite plugin.
107
+
108
+ ### Naming convention
109
+
110
+ Icons use the format `i-{collection}-{name}`:
111
+
112
+ ```vue
113
+ <UIcon name="i-lucide-sun" class="size-5" />
114
+ <UButton icon="i-lucide-plus" label="Add" />
115
+ <UAlert icon="i-lucide-info" title="Heads up" />
116
+ ```
117
+
118
+ > Browse all icons at [icones.js.org](https://icones.js.org). The `lucide` collection is used throughout Nuxt UI defaults.
119
+
120
+ ### Install icon collections locally
121
+
122
+ ```bash
123
+ pnpm i @iconify-json/lucide
124
+ pnpm i @iconify-json/simple-icons
125
+ ```
126
+
127
+ ### Custom local collections (Nuxt)
128
+
129
+ ```ts
130
+ // nuxt.config.ts
131
+ export default defineNuxtConfig({
132
+ icon: {
133
+ customCollections: [{
134
+ prefix: 'custom',
135
+ dir: './app/assets/icons'
136
+ }]
137
+ }
138
+ })
139
+ ```
140
+
141
+ ```vue
142
+ <UIcon name="i-custom-my-icon" />
143
+ ```
144
+
145
+ ## Theming & Branding
146
+
147
+ Nuxt UI ships with a default look. The goal is to adapt it to your brand so every app looks unique.
148
+
149
+ **Always use semantic utilities** (`text-default`, `bg-elevated`, `border-muted`), never raw Tailwind palette colors. See [references/theming.md](references/theming.md) for the full list.
150
+
151
+ ### Colors
152
+
153
+ 7 semantic colors (`primary`, `secondary`, `success`, `info`, `warning`, `error`, `neutral`) configurable at runtime:
154
+
155
+ ```ts
156
+ // Nuxt — app.config.ts
157
+ export default defineAppConfig({
158
+ ui: { colors: { primary: 'indigo', neutral: 'zinc' } }
159
+ })
160
+ ```
161
+
162
+ ```ts
163
+ // Vue — vite.config.ts
164
+ import { defineConfig } from 'vite'
165
+ import vue from '@vitejs/plugin-vue'
166
+ import ui from '@nuxt/ui/vite'
167
+
168
+ export default defineConfig({
169
+ plugins: [
170
+ vue(),
171
+ ui({
172
+ ui: { colors: { primary: 'indigo', neutral: 'zinc' } }
173
+ })
174
+ ]
175
+ })
176
+ ```
177
+
178
+ ### Customizing components
179
+
180
+ **Override priority** (highest wins): `ui` prop / `class` prop > global config > theme defaults.
181
+
182
+ The `ui` prop overrides a component's **slots** after variants are computed — it wins over everything:
183
+
184
+ ```vue
185
+ <UButton :ui="{ base: 'rounded-none', trailingIcon: 'size-3 rotate-90' }" />
186
+ <UCard :ui="{ header: 'bg-muted', body: 'p-8' }" />
187
+ ```
188
+
189
+ **Read the generated theme file** to find slot names for any component:
190
+
191
+ - **Nuxt**: `.nuxt/ui/<component>.ts`
192
+ - **Vue**: `node_modules/.nuxt-ui/ui/<component>.ts`
193
+
194
+ > For CSS variables, custom colors, global config, compound variants, and a **full brand customization playbook**, see [references/theming.md](references/theming.md)
195
+
196
+ ## Composables
197
+
198
+ ```ts
199
+ // Notifications
200
+ const toast = useToast()
201
+ toast.add({ title: 'Saved', color: 'success', icon: 'i-lucide-check' })
202
+
203
+ // Programmatic overlays
204
+ const overlay = useOverlay()
205
+ const modal = overlay.create(MyModal)
206
+ const { result } = modal.open({ title: 'Confirm' })
207
+ await result
208
+
209
+ // Keyboard shortcuts
210
+ defineShortcuts({
211
+ meta_k: () => openSearch(),
212
+ escape: () => close()
213
+ })
214
+ ```
215
+
216
+ > For full composable reference, see [references/composables.md](references/composables.md)
217
+
218
+ ## Form validation
219
+
220
+ Uses Standard Schema — works with Zod, Valibot, Yup, or Joi.
221
+
222
+ ```vue
223
+ <script setup lang="ts">
224
+ import { z } from 'zod'
225
+
226
+ const schema = z.object({
227
+ email: z.string().email('Invalid email'),
228
+ password: z.string().min(8, 'Min 8 characters')
229
+ })
230
+
231
+ type Schema = z.output<typeof schema>
232
+ const state = reactive<Partial<Schema>>({ email: '', password: '' })
233
+
234
+ function onSubmit() {
235
+ // UForm validates before emitting @submit — state is valid here
236
+ }
237
+ </script>
238
+
239
+ <template>
240
+ <UForm :schema="schema" :state="state" @submit="onSubmit">
241
+ <UFormField name="email" label="Email" required>
242
+ <UInput v-model="state.email" type="email" />
243
+ </UFormField>
244
+
245
+ <UFormField name="password" label="Password" required>
246
+ <UInput v-model="state.password" type="password" />
247
+ </UFormField>
248
+
249
+ <UButton type="submit">Sign in</UButton>
250
+ </UForm>
251
+ </template>
252
+ ```
253
+
254
+ > For all form components and validation patterns, see [references/components.md](references/components.md#form)
255
+
256
+ ## Overlays
257
+
258
+ ```vue
259
+ <!-- Modal -->
260
+ <UModal v-model:open="isOpen" title="Edit" description="Edit your profile">
261
+ <template #body>Content</template>
262
+ <template #footer>
263
+ <UButton variant="ghost" @click="isOpen = false">Cancel</UButton>
264
+ <UButton @click="save">Save</UButton>
265
+ </template>
266
+ </UModal>
267
+
268
+ <!-- Slideover (side panel) -->
269
+ <USlideover v-model:open="isOpen" title="Settings" side="right">
270
+ <template #body>Content</template>
271
+ </USlideover>
272
+
273
+ <!-- Dropdown menu (flat array) -->
274
+ <UDropdownMenu :items="[
275
+ { label: 'Edit', icon: 'i-lucide-pencil' },
276
+ { type: 'separator' },
277
+ { label: 'Delete', icon: 'i-lucide-trash', color: 'error' }
278
+ ]">
279
+ <UButton icon="i-lucide-ellipsis-vertical" variant="ghost" />
280
+ </UDropdownMenu>
281
+
282
+ <!-- Dropdown menu (nested array — groups with automatic separators) -->
283
+ <UDropdownMenu :items="[
284
+ [{ label: 'Edit', icon: 'i-lucide-pencil' }, { label: 'Duplicate', icon: 'i-lucide-copy' }],
285
+ [{ label: 'Delete', icon: 'i-lucide-trash', color: 'error' }]
286
+ ]">
287
+ <UButton icon="i-lucide-ellipsis-vertical" variant="ghost" />
288
+ </UDropdownMenu>
289
+ ```
290
+
291
+ > For all overlay components, see [references/components.md](references/components.md#overlay)
292
+
293
+ ## Layouts
294
+
295
+ Nuxt UI provides components to compose full page layouts. Load the reference matching your use case:
296
+
297
+ | Layout | Description | Reference |
298
+ |---|---|---|
299
+ | Page | Landing, blog, changelog, pricing — public-facing pages | [layouts/page.md](references/layouts/page.md) |
300
+ | Dashboard | Admin UI with resizable sidebar and panels | [layouts/dashboard.md](references/layouts/dashboard.md) |
301
+ | Docs | Documentation with sidebar nav and TOC | [layouts/docs.md](references/layouts/docs.md) |
302
+ | Chat | AI chat with messages and prompt | [layouts/chat.md](references/layouts/chat.md) |
303
+ | Editor | Rich text editor with toolbars | [layouts/editor.md](references/layouts/editor.md) |
304
+
305
+ ## Templates
306
+
307
+ Official starter templates at [github.com/nuxt-ui-templates](https://github.com/nuxt-ui-templates):
308
+
309
+ | Template | Framework | GitHub |
310
+ |---|---|---|
311
+ | Starter | Nuxt | [nuxt-ui-templates/starter](https://github.com/nuxt-ui-templates/starter) |
312
+ | Starter | Vue | [nuxt-ui-templates/starter-vue](https://github.com/nuxt-ui-templates/starter-vue) |
313
+ | Dashboard | Nuxt | [nuxt-ui-templates/dashboard](https://github.com/nuxt-ui-templates/dashboard) |
314
+ | Dashboard | Vue | [nuxt-ui-templates/dashboard-vue](https://github.com/nuxt-ui-templates/dashboard-vue) |
315
+ | SaaS | Nuxt | [nuxt-ui-templates/saas](https://github.com/nuxt-ui-templates/saas) |
316
+ | Landing | Nuxt | [nuxt-ui-templates/landing](https://github.com/nuxt-ui-templates/landing) |
317
+ | Docs | Nuxt | [nuxt-ui-templates/docs](https://github.com/nuxt-ui-templates/docs) |
318
+ | Portfolio | Nuxt | [nuxt-ui-templates/portfolio](https://github.com/nuxt-ui-templates/portfolio) |
319
+ | Chat | Nuxt | [nuxt-ui-templates/chat](https://github.com/nuxt-ui-templates/chat) |
320
+ | Editor | Nuxt | [nuxt-ui-templates/editor](https://github.com/nuxt-ui-templates/editor) |
321
+ | Changelog | Nuxt | [nuxt-ui-templates/changelog](https://github.com/nuxt-ui-templates/changelog) |
322
+ | Starter | Laravel | [nuxt-ui-templates/starter-laravel](https://github.com/nuxt-ui-templates/starter-laravel) |
323
+ | Starter | AdonisJS | [nuxt-ui-templates/starter-adonis](https://github.com/nuxt-ui-templates/starter-adonis) |
324
+
325
+ > When starting a new project, clone the matching template instead of setting up from scratch.
326
+
327
+ ## Additional references
328
+
329
+ Load based on your task — **do not load all at once**:
330
+
331
+ - [references/theming.md](references/theming.md) — CSS variables, custom colors, component theme overrides
332
+ - [references/components.md](references/components.md) — all 125+ components by category with props and usage
333
+ - [references/composables.md](references/composables.md) — useToast, useOverlay, defineShortcuts
334
+ - Generated theme files — all slots, variants, and default classes for any component (Nuxt: `.nuxt/ui/<component>.ts`, Vue: `node_modules/.nuxt-ui/ui/<component>.ts`)