mozaic-mcp-server 1.0.0
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/INSTALLATION.md +232 -0
- package/README.md +262 -0
- package/SKILLS.md +411 -0
- package/bin/install-skills.js +171 -0
- package/data/mozaic.db +0 -0
- package/data/mozaic.db-shm +0 -0
- package/data/mozaic.db-wal +0 -0
- package/dist/__tests__/sanity-check.test.d.ts +2 -0
- package/dist/__tests__/sanity-check.test.d.ts.map +1 -0
- package/dist/__tests__/sanity-check.test.js +167 -0
- package/dist/__tests__/sanity-check.test.js.map +1 -0
- package/dist/__tests__/tools.integration.test.d.ts +2 -0
- package/dist/__tests__/tools.integration.test.d.ts.map +1 -0
- package/dist/__tests__/tools.integration.test.js +220 -0
- package/dist/__tests__/tools.integration.test.js.map +1 -0
- package/dist/db/queries.d.ts +144 -0
- package/dist/db/queries.d.ts.map +1 -0
- package/dist/db/queries.js +536 -0
- package/dist/db/queries.js.map +1 -0
- package/dist/db/schema.d.ts +4 -0
- package/dist/db/schema.d.ts.map +1 -0
- package/dist/db/schema.js +253 -0
- package/dist/db/schema.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +416 -0
- package/dist/index.js.map +1 -0
- package/dist/parsers/__tests__/docs-parser.test.d.ts +2 -0
- package/dist/parsers/__tests__/docs-parser.test.d.ts.map +1 -0
- package/dist/parsers/__tests__/docs-parser.test.js +251 -0
- package/dist/parsers/__tests__/docs-parser.test.js.map +1 -0
- package/dist/parsers/__tests__/icons-parser.test.d.ts +2 -0
- package/dist/parsers/__tests__/icons-parser.test.d.ts.map +1 -0
- package/dist/parsers/__tests__/icons-parser.test.js +169 -0
- package/dist/parsers/__tests__/icons-parser.test.js.map +1 -0
- package/dist/parsers/__tests__/react-parser.test.d.ts +2 -0
- package/dist/parsers/__tests__/react-parser.test.d.ts.map +1 -0
- package/dist/parsers/__tests__/react-parser.test.js +274 -0
- package/dist/parsers/__tests__/react-parser.test.js.map +1 -0
- package/dist/parsers/__tests__/scss-parser.test.d.ts +2 -0
- package/dist/parsers/__tests__/scss-parser.test.d.ts.map +1 -0
- package/dist/parsers/__tests__/scss-parser.test.js +364 -0
- package/dist/parsers/__tests__/scss-parser.test.js.map +1 -0
- package/dist/parsers/__tests__/tokens-parser.test.d.ts +2 -0
- package/dist/parsers/__tests__/tokens-parser.test.d.ts.map +1 -0
- package/dist/parsers/__tests__/tokens-parser.test.js +172 -0
- package/dist/parsers/__tests__/tokens-parser.test.js.map +1 -0
- package/dist/parsers/__tests__/vue-parser.test.d.ts +2 -0
- package/dist/parsers/__tests__/vue-parser.test.d.ts.map +1 -0
- package/dist/parsers/__tests__/vue-parser.test.js +207 -0
- package/dist/parsers/__tests__/vue-parser.test.js.map +1 -0
- package/dist/parsers/docs-parser.d.ts +4 -0
- package/dist/parsers/docs-parser.d.ts.map +1 -0
- package/dist/parsers/docs-parser.js +237 -0
- package/dist/parsers/docs-parser.js.map +1 -0
- package/dist/parsers/icons-parser.d.ts +33 -0
- package/dist/parsers/icons-parser.d.ts.map +1 -0
- package/dist/parsers/icons-parser.js +125 -0
- package/dist/parsers/icons-parser.js.map +1 -0
- package/dist/parsers/react-parser.d.ts +3 -0
- package/dist/parsers/react-parser.d.ts.map +1 -0
- package/dist/parsers/react-parser.js +406 -0
- package/dist/parsers/react-parser.js.map +1 -0
- package/dist/parsers/scss-parser.d.ts +9 -0
- package/dist/parsers/scss-parser.d.ts.map +1 -0
- package/dist/parsers/scss-parser.js +351 -0
- package/dist/parsers/scss-parser.js.map +1 -0
- package/dist/parsers/tokens/border-parser.d.ts +3 -0
- package/dist/parsers/tokens/border-parser.d.ts.map +1 -0
- package/dist/parsers/tokens/border-parser.js +83 -0
- package/dist/parsers/tokens/border-parser.js.map +1 -0
- package/dist/parsers/tokens/color-parser.d.ts +3 -0
- package/dist/parsers/tokens/color-parser.d.ts.map +1 -0
- package/dist/parsers/tokens/color-parser.js +88 -0
- package/dist/parsers/tokens/color-parser.js.map +1 -0
- package/dist/parsers/tokens/grid-parser.d.ts +3 -0
- package/dist/parsers/tokens/grid-parser.d.ts.map +1 -0
- package/dist/parsers/tokens/grid-parser.js +97 -0
- package/dist/parsers/tokens/grid-parser.js.map +1 -0
- package/dist/parsers/tokens/index.d.ts +9 -0
- package/dist/parsers/tokens/index.d.ts.map +1 -0
- package/dist/parsers/tokens/index.js +10 -0
- package/dist/parsers/tokens/index.js.map +1 -0
- package/dist/parsers/tokens/screen-parser.d.ts +3 -0
- package/dist/parsers/tokens/screen-parser.d.ts.map +1 -0
- package/dist/parsers/tokens/screen-parser.js +54 -0
- package/dist/parsers/tokens/screen-parser.js.map +1 -0
- package/dist/parsers/tokens/shadow-parser.d.ts +3 -0
- package/dist/parsers/tokens/shadow-parser.d.ts.map +1 -0
- package/dist/parsers/tokens/shadow-parser.js +62 -0
- package/dist/parsers/tokens/shadow-parser.js.map +1 -0
- package/dist/parsers/tokens/spacing-parser.d.ts +4 -0
- package/dist/parsers/tokens/spacing-parser.d.ts.map +1 -0
- package/dist/parsers/tokens/spacing-parser.js +85 -0
- package/dist/parsers/tokens/spacing-parser.js.map +1 -0
- package/dist/parsers/tokens/types.d.ts +33 -0
- package/dist/parsers/tokens/types.d.ts.map +1 -0
- package/dist/parsers/tokens/types.js +42 -0
- package/dist/parsers/tokens/types.js.map +1 -0
- package/dist/parsers/tokens/typography-parser.d.ts +3 -0
- package/dist/parsers/tokens/typography-parser.d.ts.map +1 -0
- package/dist/parsers/tokens/typography-parser.js +76 -0
- package/dist/parsers/tokens/typography-parser.js.map +1 -0
- package/dist/parsers/tokens-parser.d.ts +18 -0
- package/dist/parsers/tokens-parser.d.ts.map +1 -0
- package/dist/parsers/tokens-parser.js +57 -0
- package/dist/parsers/tokens-parser.js.map +1 -0
- package/dist/parsers/vue-parser.d.ts +3 -0
- package/dist/parsers/vue-parser.d.ts.map +1 -0
- package/dist/parsers/vue-parser.js +343 -0
- package/dist/parsers/vue-parser.js.map +1 -0
- package/dist/tools/generate-react-component.d.ts +35 -0
- package/dist/tools/generate-react-component.d.ts.map +1 -0
- package/dist/tools/generate-react-component.js +81 -0
- package/dist/tools/generate-react-component.js.map +1 -0
- package/dist/tools/generate-vue-component.d.ts +35 -0
- package/dist/tools/generate-vue-component.d.ts.map +1 -0
- package/dist/tools/generate-vue-component.js +81 -0
- package/dist/tools/generate-vue-component.js.map +1 -0
- package/dist/tools/get-component-info.d.ts +52 -0
- package/dist/tools/get-component-info.d.ts.map +1 -0
- package/dist/tools/get-component-info.js +94 -0
- package/dist/tools/get-component-info.js.map +1 -0
- package/dist/tools/get-css-utility.d.ts +41 -0
- package/dist/tools/get-css-utility.d.ts.map +1 -0
- package/dist/tools/get-css-utility.js +57 -0
- package/dist/tools/get-css-utility.js.map +1 -0
- package/dist/tools/get-design-tokens.d.ts +44 -0
- package/dist/tools/get-design-tokens.d.ts.map +1 -0
- package/dist/tools/get-design-tokens.js +124 -0
- package/dist/tools/get-design-tokens.js.map +1 -0
- package/dist/tools/get-icon.d.ts +32 -0
- package/dist/tools/get-icon.d.ts.map +1 -0
- package/dist/tools/get-icon.js +108 -0
- package/dist/tools/get-icon.js.map +1 -0
- package/dist/tools/get-install-info.d.ts +39 -0
- package/dist/tools/get-install-info.d.ts.map +1 -0
- package/dist/tools/get-install-info.js +160 -0
- package/dist/tools/get-install-info.js.map +1 -0
- package/dist/tools/list-components.d.ts +32 -0
- package/dist/tools/list-components.d.ts.map +1 -0
- package/dist/tools/list-components.js +62 -0
- package/dist/tools/list-components.js.map +1 -0
- package/dist/tools/list-css-utilities.d.ts +27 -0
- package/dist/tools/list-css-utilities.d.ts.map +1 -0
- package/dist/tools/list-css-utilities.js +48 -0
- package/dist/tools/list-css-utilities.js.map +1 -0
- package/dist/tools/search-documentation.d.ts +37 -0
- package/dist/tools/search-documentation.d.ts.map +1 -0
- package/dist/tools/search-documentation.js +120 -0
- package/dist/tools/search-documentation.js.map +1 -0
- package/dist/tools/search-icons.d.ts +41 -0
- package/dist/tools/search-icons.d.ts.map +1 -0
- package/dist/tools/search-icons.js +134 -0
- package/dist/tools/search-icons.js.map +1 -0
- package/package.json +98 -0
- package/skills/mozaic-css-utilities/skill.md +633 -0
- package/skills/mozaic-design-tokens/skill.md +621 -0
- package/skills/mozaic-icons/skill.md +624 -0
- package/skills/mozaic-react-builder/skill.md +652 -0
- package/skills/mozaic-vue-builder/skill.md +491 -0
|
@@ -0,0 +1,491 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mozaic-vue-builder
|
|
3
|
+
description: Interactive Vue 3 component generator with Mozaic Design System. Helps discover, configure, and generate production-ready Vue components with proper imports and installation guidance.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Mozaic Vue Builder
|
|
8
|
+
|
|
9
|
+
An interactive assistant for building Vue 3 applications with the Mozaic Design System by ADEO. This skill helps you discover components, understand their props, generate ready-to-use code, and set up installation properly.
|
|
10
|
+
|
|
11
|
+
## What This Skill Does
|
|
12
|
+
|
|
13
|
+
1. **Discover Components**: Browse Mozaic Vue components by category (forms, navigation, feedback, etc.)
|
|
14
|
+
2. **Interactive Selection**: Propose component combinations based on your needs
|
|
15
|
+
3. **Generate Code**: Create complete Vue 3 SFC code with proper imports
|
|
16
|
+
4. **Installation Guidance**: Provide package manager commands and setup instructions
|
|
17
|
+
5. **Props Configuration**: Help configure component props with type safety
|
|
18
|
+
|
|
19
|
+
## MCP Tools Used
|
|
20
|
+
|
|
21
|
+
This skill uses the Mozaic MCP server tools:
|
|
22
|
+
- `mcp__mozaic__list_components` - Browse available components by category
|
|
23
|
+
- `mcp__mozaic__get_component_info` - Get detailed component information (props, slots, events)
|
|
24
|
+
- `mcp__mozaic__generate_vue_component` - Generate Vue 3 component code
|
|
25
|
+
- `mcp__mozaic__get_install_info` - Get installation commands and imports
|
|
26
|
+
|
|
27
|
+
## When to Use This Skill
|
|
28
|
+
|
|
29
|
+
Use this skill when you:
|
|
30
|
+
- Need to build Vue 3 UI components with Mozaic
|
|
31
|
+
- Want to explore available Mozaic components
|
|
32
|
+
- Need help with component props and configuration
|
|
33
|
+
- Want installation and import guidance
|
|
34
|
+
- Are building forms, navigation, modals, or other UI elements
|
|
35
|
+
|
|
36
|
+
## Interactive Workflow
|
|
37
|
+
|
|
38
|
+
### Step 1: Understanding Your Needs
|
|
39
|
+
|
|
40
|
+
When you activate this skill, I'll ask:
|
|
41
|
+
|
|
42
|
+
**"What type of component do you need to build?"**
|
|
43
|
+
|
|
44
|
+
Common options:
|
|
45
|
+
- A) Form (inputs, selects, checkboxes, validation)
|
|
46
|
+
- B) Navigation (tabs, breadcrumb, pagination)
|
|
47
|
+
- C) Modal/Dialog (overlay, confirmation, form modal)
|
|
48
|
+
- D) Button/Action (primary, secondary, with icons)
|
|
49
|
+
- E) Layout (cards, containers, grids)
|
|
50
|
+
- F) Data Display (tables, lists, badges)
|
|
51
|
+
- G) Other (describe your needs)
|
|
52
|
+
|
|
53
|
+
### Step 2: Browse Available Components
|
|
54
|
+
|
|
55
|
+
Based on your answer, I'll use `mcp__mozaic__list_components` to show relevant components.
|
|
56
|
+
|
|
57
|
+
**Example**:
|
|
58
|
+
```
|
|
59
|
+
For forms, Mozaic offers:
|
|
60
|
+
- TextInput (text, email, password fields)
|
|
61
|
+
- Select (dropdowns with single/multiple selection)
|
|
62
|
+
- Checkbox (single or group)
|
|
63
|
+
- Radio (radio button groups)
|
|
64
|
+
- Toggle (switch control)
|
|
65
|
+
- FileUpload (file input with drag-drop)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Step 3: Component Details
|
|
69
|
+
|
|
70
|
+
I'll use `mcp__mozaic__get_component_info` to show:
|
|
71
|
+
- Available props with types and defaults
|
|
72
|
+
- Slots for customization
|
|
73
|
+
- Events you can listen to
|
|
74
|
+
- Code examples
|
|
75
|
+
|
|
76
|
+
**Example**:
|
|
77
|
+
```javascript
|
|
78
|
+
// TextInput Props
|
|
79
|
+
{
|
|
80
|
+
modelValue: String, // v-model binding
|
|
81
|
+
label: String, // Field label
|
|
82
|
+
placeholder: String, // Placeholder text
|
|
83
|
+
type: 'text' | 'email' | 'password', // Input type
|
|
84
|
+
disabled: Boolean, // Disable state
|
|
85
|
+
error: String, // Error message
|
|
86
|
+
required: Boolean, // Required field
|
|
87
|
+
size: 's' | 'm' | 'l' // Size variant
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Step 4: Propose Component Combinations
|
|
92
|
+
|
|
93
|
+
I'll suggest 2-3 combinations that work well together:
|
|
94
|
+
|
|
95
|
+
**Example for "Login Form"**:
|
|
96
|
+
|
|
97
|
+
**Option 1: Simple Login**
|
|
98
|
+
```vue
|
|
99
|
+
<template>
|
|
100
|
+
<form>
|
|
101
|
+
<MTextInput label="Email" type="email" />
|
|
102
|
+
<MTextInput label="Password" type="password" />
|
|
103
|
+
<MButton theme="primary">Login</MButton>
|
|
104
|
+
</form>
|
|
105
|
+
</template>
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**Option 2: Enhanced Login with Validation**
|
|
109
|
+
```vue
|
|
110
|
+
<template>
|
|
111
|
+
<form>
|
|
112
|
+
<MTextInput
|
|
113
|
+
v-model="email"
|
|
114
|
+
label="Email"
|
|
115
|
+
type="email"
|
|
116
|
+
:error="errors.email"
|
|
117
|
+
required
|
|
118
|
+
/>
|
|
119
|
+
<MTextInput
|
|
120
|
+
v-model="password"
|
|
121
|
+
label="Password"
|
|
122
|
+
type="password"
|
|
123
|
+
:error="errors.password"
|
|
124
|
+
required
|
|
125
|
+
/>
|
|
126
|
+
<MCheckbox label="Remember me" />
|
|
127
|
+
<MButton theme="primary" :disabled="!isValid">
|
|
128
|
+
Login
|
|
129
|
+
</MButton>
|
|
130
|
+
</form>
|
|
131
|
+
</template>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Step 5: Refinement & Configuration
|
|
135
|
+
|
|
136
|
+
You can:
|
|
137
|
+
- Choose an option: "I like Option 2"
|
|
138
|
+
- Customize: "Add a forgot password link"
|
|
139
|
+
- Combine: "Use Option 1 but add validation from Option 2"
|
|
140
|
+
- Request changes: "Make the button larger"
|
|
141
|
+
|
|
142
|
+
### Step 6: Generate Final Code
|
|
143
|
+
|
|
144
|
+
I'll use `mcp__mozaic__generate_vue_component` to create complete code:
|
|
145
|
+
|
|
146
|
+
```vue
|
|
147
|
+
<script setup>
|
|
148
|
+
import { ref, computed } from 'vue'
|
|
149
|
+
import { MTextInput, MButton, MCheckbox } from '@mozaic-ds/vue-3'
|
|
150
|
+
|
|
151
|
+
const email = ref('')
|
|
152
|
+
const password = ref('')
|
|
153
|
+
const rememberMe = ref(false)
|
|
154
|
+
const errors = ref({})
|
|
155
|
+
|
|
156
|
+
const isValid = computed(() => {
|
|
157
|
+
return email.value && password.value
|
|
158
|
+
})
|
|
159
|
+
|
|
160
|
+
const handleSubmit = () => {
|
|
161
|
+
// Your submit logic
|
|
162
|
+
}
|
|
163
|
+
</script>
|
|
164
|
+
|
|
165
|
+
<template>
|
|
166
|
+
<form @submit.prevent="handleSubmit">
|
|
167
|
+
<MTextInput
|
|
168
|
+
v-model="email"
|
|
169
|
+
label="Email"
|
|
170
|
+
type="email"
|
|
171
|
+
placeholder="Enter your email"
|
|
172
|
+
:error="errors.email"
|
|
173
|
+
required
|
|
174
|
+
/>
|
|
175
|
+
<MTextInput
|
|
176
|
+
v-model="password"
|
|
177
|
+
label="Password"
|
|
178
|
+
type="password"
|
|
179
|
+
placeholder="Enter your password"
|
|
180
|
+
:error="errors.password"
|
|
181
|
+
required
|
|
182
|
+
/>
|
|
183
|
+
<MCheckbox v-model="rememberMe" label="Remember me" />
|
|
184
|
+
<MButton
|
|
185
|
+
theme="primary"
|
|
186
|
+
size="l"
|
|
187
|
+
:disabled="!isValid"
|
|
188
|
+
>
|
|
189
|
+
Login
|
|
190
|
+
</MButton>
|
|
191
|
+
</form>
|
|
192
|
+
</template>
|
|
193
|
+
|
|
194
|
+
<style scoped>
|
|
195
|
+
form {
|
|
196
|
+
display: flex;
|
|
197
|
+
flex-direction: column;
|
|
198
|
+
gap: 1rem;
|
|
199
|
+
max-width: 400px;
|
|
200
|
+
}
|
|
201
|
+
</style>
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Step 7: Installation Guidance
|
|
205
|
+
|
|
206
|
+
I'll use `mcp__mozaic__get_install_info` to provide:
|
|
207
|
+
|
|
208
|
+
**Package Manager Choice**:
|
|
209
|
+
- npm
|
|
210
|
+
- yarn
|
|
211
|
+
- pnpm (default)
|
|
212
|
+
|
|
213
|
+
**Installation Commands**:
|
|
214
|
+
```bash
|
|
215
|
+
# Install Mozaic Vue 3
|
|
216
|
+
pnpm add @mozaic-ds/vue-3
|
|
217
|
+
|
|
218
|
+
# Install peer dependencies (if needed)
|
|
219
|
+
pnpm add vue@^3.3.0
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
**Import Setup**:
|
|
223
|
+
```javascript
|
|
224
|
+
// In your main.js or component
|
|
225
|
+
import { MTextInput, MButton, MCheckbox } from '@mozaic-ds/vue-3'
|
|
226
|
+
import '@mozaic-ds/vue-3/dist/style.css'
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
**Quick Start**:
|
|
230
|
+
```javascript
|
|
231
|
+
// Global registration (optional)
|
|
232
|
+
import { createApp } from 'vue'
|
|
233
|
+
import MozaicVue from '@mozaic-ds/vue-3'
|
|
234
|
+
|
|
235
|
+
const app = createApp(App)
|
|
236
|
+
app.use(MozaicVue)
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
## Common Use Cases
|
|
240
|
+
|
|
241
|
+
### Use Case 1: Contact Form
|
|
242
|
+
|
|
243
|
+
**User**: "I need a contact form"
|
|
244
|
+
|
|
245
|
+
**Workflow**:
|
|
246
|
+
1. List form components
|
|
247
|
+
2. Propose: Name, Email, Message (textarea), Submit button
|
|
248
|
+
3. Show validation patterns
|
|
249
|
+
4. Generate code with v-model bindings
|
|
250
|
+
5. Provide installation commands
|
|
251
|
+
|
|
252
|
+
### Use Case 2: Navigation Tabs
|
|
253
|
+
|
|
254
|
+
**User**: "Build tab navigation for settings"
|
|
255
|
+
|
|
256
|
+
**Workflow**:
|
|
257
|
+
1. Show navigation components
|
|
258
|
+
2. Demonstrate MTabs component
|
|
259
|
+
3. Configure tabs with icons
|
|
260
|
+
4. Generate code with tab content slots
|
|
261
|
+
5. Provide styling guidance
|
|
262
|
+
|
|
263
|
+
### Use Case 3: Modal Dialog
|
|
264
|
+
|
|
265
|
+
**User**: "Confirmation modal for delete action"
|
|
266
|
+
|
|
267
|
+
**Workflow**:
|
|
268
|
+
1. Show feedback components
|
|
269
|
+
2. Demonstrate MModal component
|
|
270
|
+
3. Configure: title, message, actions
|
|
271
|
+
4. Add danger button styling
|
|
272
|
+
5. Generate code with v-model for visibility
|
|
273
|
+
|
|
274
|
+
### Use Case 4: Data Table
|
|
275
|
+
|
|
276
|
+
**User**: "Display user list in a table"
|
|
277
|
+
|
|
278
|
+
**Workflow**:
|
|
279
|
+
1. Show data-display components
|
|
280
|
+
2. Demonstrate MTable component
|
|
281
|
+
3. Configure columns, pagination
|
|
282
|
+
4. Add row actions
|
|
283
|
+
5. Generate code with data binding
|
|
284
|
+
|
|
285
|
+
## Component Categories Reference
|
|
286
|
+
|
|
287
|
+
### Form Components
|
|
288
|
+
- **TextInput**: Text, email, password, number inputs
|
|
289
|
+
- **Select**: Dropdown with single/multiple selection
|
|
290
|
+
- **Checkbox**: Single checkbox or checkbox group
|
|
291
|
+
- **Radio**: Radio button groups
|
|
292
|
+
- **Toggle**: Switch control
|
|
293
|
+
- **FileUpload**: File input with drag-drop support
|
|
294
|
+
- **DatePicker**: Date selection
|
|
295
|
+
- **Textarea**: Multi-line text input
|
|
296
|
+
|
|
297
|
+
### Navigation Components
|
|
298
|
+
- **Tabs**: Tab navigation with content panels
|
|
299
|
+
- **Breadcrumb**: Hierarchical navigation trail
|
|
300
|
+
- **Pagination**: Page navigation controls
|
|
301
|
+
- **Stepper**: Multi-step progress indicator
|
|
302
|
+
|
|
303
|
+
### Feedback Components
|
|
304
|
+
- **Modal**: Overlay dialog/modal
|
|
305
|
+
- **Toast**: Notification messages
|
|
306
|
+
- **Alert**: Inline alerts and warnings
|
|
307
|
+
- **ProgressBar**: Progress indication
|
|
308
|
+
- **Loader**: Loading spinners
|
|
309
|
+
|
|
310
|
+
### Action Components
|
|
311
|
+
- **Button**: Primary, secondary, tertiary buttons
|
|
312
|
+
- **IconButton**: Button with icon only
|
|
313
|
+
- **Link**: Styled hyperlinks
|
|
314
|
+
|
|
315
|
+
### Layout Components
|
|
316
|
+
- **Card**: Content container with header/footer
|
|
317
|
+
- **Accordion**: Collapsible content sections
|
|
318
|
+
- **Divider**: Visual separator
|
|
319
|
+
|
|
320
|
+
### Data Display Components
|
|
321
|
+
- **Table**: Data grid with sorting/filtering
|
|
322
|
+
- **Badge**: Status indicators
|
|
323
|
+
- **Tag**: Labeled items
|
|
324
|
+
- **Avatar**: User profile images
|
|
325
|
+
|
|
326
|
+
## Best Practices
|
|
327
|
+
|
|
328
|
+
### 1. Component Composition
|
|
329
|
+
```vue
|
|
330
|
+
<!-- Good: Compose small components -->
|
|
331
|
+
<MCard>
|
|
332
|
+
<template #header>
|
|
333
|
+
<h2>User Profile</h2>
|
|
334
|
+
</template>
|
|
335
|
+
<MTextInput label="Name" v-model="name" />
|
|
336
|
+
<MTextInput label="Email" v-model="email" />
|
|
337
|
+
<template #footer>
|
|
338
|
+
<MButton theme="primary">Save</MButton>
|
|
339
|
+
</template>
|
|
340
|
+
</MCard>
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
### 2. Use v-model for Two-Way Binding
|
|
344
|
+
```vue
|
|
345
|
+
<!-- Good: Use v-model -->
|
|
346
|
+
<MTextInput v-model="username" label="Username" />
|
|
347
|
+
|
|
348
|
+
<!-- Avoid: Manual binding -->
|
|
349
|
+
<MTextInput :modelValue="username" @update:modelValue="username = $event" />
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
### 3. Validate Props with TypeScript
|
|
353
|
+
```vue
|
|
354
|
+
<script setup lang="ts">
|
|
355
|
+
import type { ComponentProps } from '@mozaic-ds/vue-3'
|
|
356
|
+
|
|
357
|
+
interface FormData {
|
|
358
|
+
email: string
|
|
359
|
+
password: string
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
const formData = ref<FormData>({
|
|
363
|
+
email: '',
|
|
364
|
+
password: ''
|
|
365
|
+
})
|
|
366
|
+
</script>
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
### 4. Handle Events Properly
|
|
370
|
+
```vue
|
|
371
|
+
<MButton
|
|
372
|
+
@click="handleClick"
|
|
373
|
+
@focus="handleFocus"
|
|
374
|
+
>
|
|
375
|
+
Submit
|
|
376
|
+
</MButton>
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
### 5. Use Slots for Customization
|
|
380
|
+
```vue
|
|
381
|
+
<MModal v-model="isOpen">
|
|
382
|
+
<template #header>
|
|
383
|
+
Custom Header
|
|
384
|
+
</template>
|
|
385
|
+
<template #default>
|
|
386
|
+
Modal content
|
|
387
|
+
</template>
|
|
388
|
+
<template #footer>
|
|
389
|
+
<MButton @click="isOpen = false">Close</MButton>
|
|
390
|
+
</template>
|
|
391
|
+
</MModal>
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
## Troubleshooting
|
|
395
|
+
|
|
396
|
+
### Issue: Components not rendering
|
|
397
|
+
|
|
398
|
+
**Solution**: Ensure CSS is imported
|
|
399
|
+
```javascript
|
|
400
|
+
import '@mozaic-ds/vue-3/dist/style.css'
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
### Issue: TypeScript errors
|
|
404
|
+
|
|
405
|
+
**Solution**: Install type definitions
|
|
406
|
+
```bash
|
|
407
|
+
pnpm add -D @types/node
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
### Issue: Props not working
|
|
411
|
+
|
|
412
|
+
**Solution**: Check prop names and types
|
|
413
|
+
```javascript
|
|
414
|
+
// Use mcp__mozaic__get_component_info to verify props
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
### Issue: Styling conflicts
|
|
418
|
+
|
|
419
|
+
**Solution**: Use scoped styles
|
|
420
|
+
```vue
|
|
421
|
+
<style scoped>
|
|
422
|
+
/* Your styles won't leak */
|
|
423
|
+
</style>
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
## Commands
|
|
427
|
+
|
|
428
|
+
When this skill is active:
|
|
429
|
+
|
|
430
|
+
- **"Show me [category] components"**: Browse components by category
|
|
431
|
+
- **"I need a [type]"**: Build specific component type
|
|
432
|
+
- **"How do I configure [component]?"**: Get component details
|
|
433
|
+
- **"Generate code for [description]"**: Create component code
|
|
434
|
+
- **"Install instructions"**: Get setup guidance
|
|
435
|
+
- **"Show examples"**: See usage examples
|
|
436
|
+
- **"What props does [component] have?"**: List component props
|
|
437
|
+
|
|
438
|
+
## Integration with Other Skills
|
|
439
|
+
|
|
440
|
+
This skill works well with:
|
|
441
|
+
- **mozaic-design-tokens**: Get color/spacing tokens for styling
|
|
442
|
+
- **mozaic-css-utilities**: Add layout utilities (Flexy grid, spacing)
|
|
443
|
+
- **mozaic-icons**: Add icons to buttons and inputs
|
|
444
|
+
|
|
445
|
+
## Example Session
|
|
446
|
+
|
|
447
|
+
**User**: "I need a registration form"
|
|
448
|
+
|
|
449
|
+
**Skill**:
|
|
450
|
+
I'll help you build a registration form with Mozaic Vue components!
|
|
451
|
+
|
|
452
|
+
What fields do you need?
|
|
453
|
+
- A) Basic (name, email, password)
|
|
454
|
+
- B) Extended (+ phone, address, terms)
|
|
455
|
+
- C) Custom (tell me what fields)
|
|
456
|
+
|
|
457
|
+
**User**: "B - Extended"
|
|
458
|
+
|
|
459
|
+
**Skill**:
|
|
460
|
+
Perfect! Here's a registration form with extended fields:
|
|
461
|
+
|
|
462
|
+
[Uses `mcp__mozaic__list_components` and `mcp__mozaic__get_component_info`]
|
|
463
|
+
|
|
464
|
+
**Proposed Components**:
|
|
465
|
+
1. TextInput (Name)
|
|
466
|
+
2. TextInput (Email - type="email")
|
|
467
|
+
3. TextInput (Password - type="password")
|
|
468
|
+
4. TextInput (Phone - type="tel")
|
|
469
|
+
5. Textarea (Address)
|
|
470
|
+
6. Checkbox (Terms agreement)
|
|
471
|
+
7. Button (Submit - theme="primary")
|
|
472
|
+
|
|
473
|
+
[Uses `mcp__mozaic__generate_vue_component`]
|
|
474
|
+
|
|
475
|
+
Here's your complete registration form... [Generated code]
|
|
476
|
+
|
|
477
|
+
Would you like me to:
|
|
478
|
+
- Add validation rules?
|
|
479
|
+
- Include password confirmation field?
|
|
480
|
+
- Add installation instructions?
|
|
481
|
+
|
|
482
|
+
**User**: "Add installation instructions"
|
|
483
|
+
|
|
484
|
+
**Skill**:
|
|
485
|
+
[Uses `mcp__mozaic__get_install_info`]
|
|
486
|
+
|
|
487
|
+
Here's how to install and set up...
|
|
488
|
+
|
|
489
|
+
---
|
|
490
|
+
|
|
491
|
+
**Let's build amazing Vue 3 applications with Mozaic Design System!**
|