@lando-labs/lando-ds-mcp 4.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/CHANGELOG.md +526 -0
- package/LICENSE +202 -0
- package/NOTICE +4 -0
- package/README.md +170 -0
- package/build/data/ds-meta.json +1 -0
- package/build/data/ds-meta.schema.json +282 -0
- package/build/data/ds-meta.verbose.json +1 -0
- package/build/data/icon-metadata.d.ts +64 -0
- package/build/data/icon-metadata.d.ts.map +1 -0
- package/build/data/icon-metadata.js +1128 -0
- package/build/data/icon-metadata.js.map +1 -0
- package/build/data/lucide-icon-names.d.ts +12 -0
- package/build/data/lucide-icon-names.d.ts.map +1 -0
- package/build/data/lucide-icon-names.js +1653 -0
- package/build/data/lucide-icon-names.js.map +1 -0
- package/build/data/lucide-icons.d.ts +41 -0
- package/build/data/lucide-icons.d.ts.map +1 -0
- package/build/data/lucide-icons.js +80 -0
- package/build/data/lucide-icons.js.map +1 -0
- package/build/data/rn-tokens-snapshot.d.ts +753 -0
- package/build/data/rn-tokens-snapshot.d.ts.map +1 -0
- package/build/data/rn-tokens-snapshot.js +286 -0
- package/build/data/rn-tokens-snapshot.js.map +1 -0
- package/build/index.d.ts +18 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +411 -0
- package/build/index.js.map +1 -0
- package/build/prompts/index.d.ts +16 -0
- package/build/prompts/index.d.ts.map +1 -0
- package/build/prompts/index.js +145 -0
- package/build/prompts/index.js.map +1 -0
- package/build/resources/code-examples.d.ts +6 -0
- package/build/resources/code-examples.d.ts.map +1 -0
- package/build/resources/code-examples.js +278 -0
- package/build/resources/code-examples.js.map +1 -0
- package/build/resources/design-tokens.d.ts +6 -0
- package/build/resources/design-tokens.d.ts.map +1 -0
- package/build/resources/design-tokens.js +128 -0
- package/build/resources/design-tokens.js.map +1 -0
- package/build/resources/index.d.ts +19 -0
- package/build/resources/index.d.ts.map +1 -0
- package/build/resources/index.js +80 -0
- package/build/resources/index.js.map +1 -0
- package/build/test.d.ts +12 -0
- package/build/test.d.ts.map +1 -0
- package/build/test.js +680 -0
- package/build/test.js.map +1 -0
- package/build/tools/compose-components.d.ts +40 -0
- package/build/tools/compose-components.d.ts.map +1 -0
- package/build/tools/compose-components.js +61 -0
- package/build/tools/compose-components.js.map +1 -0
- package/build/tools/get-animation-examples.d.ts +30 -0
- package/build/tools/get-animation-examples.d.ts.map +1 -0
- package/build/tools/get-animation-examples.js +484 -0
- package/build/tools/get-animation-examples.js.map +1 -0
- package/build/tools/get-component-capabilities.d.ts +43 -0
- package/build/tools/get-component-capabilities.d.ts.map +1 -0
- package/build/tools/get-component-capabilities.js +108 -0
- package/build/tools/get-component-capabilities.js.map +1 -0
- package/build/tools/get-component-props.d.ts +23 -0
- package/build/tools/get-component-props.d.ts.map +1 -0
- package/build/tools/get-component-props.js +46 -0
- package/build/tools/get-component-props.js.map +1 -0
- package/build/tools/get-component-reference.d.ts +25 -0
- package/build/tools/get-component-reference.d.ts.map +1 -0
- package/build/tools/get-component-reference.js +112 -0
- package/build/tools/get-component-reference.js.map +1 -0
- package/build/tools/get-component.d.ts +25 -0
- package/build/tools/get-component.d.ts.map +1 -0
- package/build/tools/get-component.js +60 -0
- package/build/tools/get-component.js.map +1 -0
- package/build/tools/get-composition-hints.d.ts +22 -0
- package/build/tools/get-composition-hints.d.ts.map +1 -0
- package/build/tools/get-composition-hints.js +39 -0
- package/build/tools/get-composition-hints.js.map +1 -0
- package/build/tools/get-design-tokens.d.ts +24 -0
- package/build/tools/get-design-tokens.d.ts.map +1 -0
- package/build/tools/get-design-tokens.js +96 -0
- package/build/tools/get-design-tokens.js.map +1 -0
- package/build/tools/get-ds-metadata.d.ts +16 -0
- package/build/tools/get-ds-metadata.d.ts.map +1 -0
- package/build/tools/get-ds-metadata.js +65 -0
- package/build/tools/get-ds-metadata.js.map +1 -0
- package/build/tools/get-hook.d.ts +19 -0
- package/build/tools/get-hook.d.ts.map +1 -0
- package/build/tools/get-hook.js +46 -0
- package/build/tools/get-hook.js.map +1 -0
- package/build/tools/get-theme-presets.d.ts +13 -0
- package/build/tools/get-theme-presets.d.ts.map +1 -0
- package/build/tools/get-theme-presets.js +41 -0
- package/build/tools/get-theme-presets.js.map +1 -0
- package/build/tools/list-components.d.ts +29 -0
- package/build/tools/list-components.d.ts.map +1 -0
- package/build/tools/list-components.js +88 -0
- package/build/tools/list-components.js.map +1 -0
- package/build/tools/list-hooks.d.ts +22 -0
- package/build/tools/list-hooks.d.ts.map +1 -0
- package/build/tools/list-hooks.js +80 -0
- package/build/tools/list-hooks.js.map +1 -0
- package/build/tools/list-icons.d.ts +28 -0
- package/build/tools/list-icons.d.ts.map +1 -0
- package/build/tools/list-icons.js +161 -0
- package/build/tools/list-icons.js.map +1 -0
- package/build/tools/platform-transform.d.ts +64 -0
- package/build/tools/platform-transform.d.ts.map +1 -0
- package/build/tools/platform-transform.js +117 -0
- package/build/tools/platform-transform.js.map +1 -0
- package/build/tools/platform.d.ts +76 -0
- package/build/tools/platform.d.ts.map +1 -0
- package/build/tools/platform.js +80 -0
- package/build/tools/platform.js.map +1 -0
- package/build/tools/search-icons.d.ts +28 -0
- package/build/tools/search-icons.d.ts.map +1 -0
- package/build/tools/search-icons.js +257 -0
- package/build/tools/search-icons.js.map +1 -0
- package/build/utils/error-envelope.d.ts +14 -0
- package/build/utils/error-envelope.d.ts.map +1 -0
- package/build/utils/error-envelope.js +35 -0
- package/build/utils/error-envelope.js.map +1 -0
- package/build/utils/icon-library.d.ts +17 -0
- package/build/utils/icon-library.d.ts.map +1 -0
- package/build/utils/icon-library.js +24 -0
- package/build/utils/icon-library.js.map +1 -0
- package/build/utils/jsx-safety.d.ts +47 -0
- package/build/utils/jsx-safety.d.ts.map +1 -0
- package/build/utils/jsx-safety.js +63 -0
- package/build/utils/jsx-safety.js.map +1 -0
- package/build/utils/meta-loader.d.ts +37 -0
- package/build/utils/meta-loader.d.ts.map +1 -0
- package/build/utils/meta-loader.js +114 -0
- package/build/utils/meta-loader.js.map +1 -0
- package/package.json +60 -0
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Code Examples Resource
|
|
3
|
+
* Provides complete code examples for common patterns
|
|
4
|
+
*/
|
|
5
|
+
export function codeExamples(pattern) {
|
|
6
|
+
const examples = {
|
|
7
|
+
'login-form': `import { Input, Button, Checkbox, Card, CardBody } from '@lando-labs/lando-ds'
|
|
8
|
+
import { useState } from 'react'
|
|
9
|
+
|
|
10
|
+
export function LoginForm() {
|
|
11
|
+
const [email, setEmail] = useState('')
|
|
12
|
+
const [password, setPassword] = useState('')
|
|
13
|
+
const [remember, setRemember] = useState(false)
|
|
14
|
+
const [loading, setLoading] = useState(false)
|
|
15
|
+
|
|
16
|
+
const handleSubmit = async (e: React.FormEvent) => {
|
|
17
|
+
e.preventDefault()
|
|
18
|
+
setLoading(true)
|
|
19
|
+
// Your login logic here
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<Card variant="elevated" style={{ maxWidth: '400px' }}>
|
|
24
|
+
<CardBody>
|
|
25
|
+
<h2>Sign In</h2>
|
|
26
|
+
<form onSubmit={handleSubmit}>
|
|
27
|
+
<Input
|
|
28
|
+
label="Email"
|
|
29
|
+
type="email"
|
|
30
|
+
value={email}
|
|
31
|
+
onChange={(e) => setEmail(e.target.value)}
|
|
32
|
+
required
|
|
33
|
+
placeholder="you@example.com"
|
|
34
|
+
/>
|
|
35
|
+
|
|
36
|
+
<Input
|
|
37
|
+
label="Password"
|
|
38
|
+
type="password"
|
|
39
|
+
value={password}
|
|
40
|
+
onChange={(e) => setPassword(e.target.value)}
|
|
41
|
+
required
|
|
42
|
+
placeholder="Enter your password"
|
|
43
|
+
/>
|
|
44
|
+
|
|
45
|
+
<Checkbox
|
|
46
|
+
checked={remember}
|
|
47
|
+
onChange={setRemember}
|
|
48
|
+
label="Remember me"
|
|
49
|
+
/>
|
|
50
|
+
|
|
51
|
+
<Button
|
|
52
|
+
type="submit"
|
|
53
|
+
variant="primary"
|
|
54
|
+
fullWidth
|
|
55
|
+
loading={loading}
|
|
56
|
+
>
|
|
57
|
+
Sign In
|
|
58
|
+
</Button>
|
|
59
|
+
</form>
|
|
60
|
+
</CardBody>
|
|
61
|
+
</Card>
|
|
62
|
+
)
|
|
63
|
+
}`,
|
|
64
|
+
'card-grid': `import { Card, CardHeader, CardBody, CardFooter, Button, Badge } from '@lando-labs/lando-ds'
|
|
65
|
+
|
|
66
|
+
interface Product {
|
|
67
|
+
id: string
|
|
68
|
+
title: string
|
|
69
|
+
description: string
|
|
70
|
+
price: number
|
|
71
|
+
status: 'new' | 'sale' | 'out-of-stock'
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function ProductGrid({ products }: { products: Product[] }) {
|
|
75
|
+
return (
|
|
76
|
+
<div style={{
|
|
77
|
+
display: 'grid',
|
|
78
|
+
gridTemplateColumns: 'repeat(auto-fill, minmax(300px, 1fr))',
|
|
79
|
+
gap: 'var(--spacing-4)'
|
|
80
|
+
}}>
|
|
81
|
+
{products.map(product => (
|
|
82
|
+
<Card key={product.id} variant="elevated">
|
|
83
|
+
<CardHeader>
|
|
84
|
+
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
|
85
|
+
<h3>{product.title}</h3>
|
|
86
|
+
{product.status === 'new' && <Badge variant="primary">New</Badge>}
|
|
87
|
+
{product.status === 'sale' && <Badge variant="success">Sale</Badge>}
|
|
88
|
+
{product.status === 'out-of-stock' && <Badge variant="danger">Out of Stock</Badge>}
|
|
89
|
+
</div>
|
|
90
|
+
</CardHeader>
|
|
91
|
+
|
|
92
|
+
<CardBody>
|
|
93
|
+
<p>{product.description}</p>
|
|
94
|
+
<p style={{ fontSize: 'var(--font-size-xl)', fontWeight: 'bold', marginTop: 'var(--spacing-4)' }}>
|
|
95
|
+
\${product.price}
|
|
96
|
+
</p>
|
|
97
|
+
</CardBody>
|
|
98
|
+
|
|
99
|
+
<CardFooter>
|
|
100
|
+
<Button variant="primary" fullWidth disabled={product.status === 'out-of-stock'}>
|
|
101
|
+
{product.status === 'out-of-stock' ? 'Out of Stock' : 'Add to Cart'}
|
|
102
|
+
</Button>
|
|
103
|
+
</CardFooter>
|
|
104
|
+
</Card>
|
|
105
|
+
))}
|
|
106
|
+
</div>
|
|
107
|
+
)
|
|
108
|
+
}`,
|
|
109
|
+
'user-profile': `import { Avatar, Card, CardBody, Badge, Button } from '@lando-labs/lando-ds'
|
|
110
|
+
|
|
111
|
+
interface User {
|
|
112
|
+
name: string
|
|
113
|
+
email: string
|
|
114
|
+
avatar?: string
|
|
115
|
+
role: string
|
|
116
|
+
status: 'online' | 'offline' | 'busy' | 'away'
|
|
117
|
+
bio: string
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function UserProfile({ user }: { user: User }) {
|
|
121
|
+
return (
|
|
122
|
+
<Card variant="elevated" style={{ maxWidth: '600px' }}>
|
|
123
|
+
<CardBody>
|
|
124
|
+
<div style={{ display: 'flex', gap: 'var(--spacing-4)', alignItems: 'start' }}>
|
|
125
|
+
<Avatar
|
|
126
|
+
src={user.avatar}
|
|
127
|
+
initials={user.name.split(' ').map(n => n[0]).join('')}
|
|
128
|
+
size="2xl"
|
|
129
|
+
status={user.status}
|
|
130
|
+
gradient
|
|
131
|
+
/>
|
|
132
|
+
|
|
133
|
+
<div style={{ flex: 1 }}>
|
|
134
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: 'var(--spacing-2)' }}>
|
|
135
|
+
<h2>{user.name}</h2>
|
|
136
|
+
<Badge variant="info">{user.role}</Badge>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
<p style={{ color: 'var(--color-text-secondary)' }}>{user.email}</p>
|
|
140
|
+
|
|
141
|
+
<p style={{ marginTop: 'var(--spacing-4)' }}>{user.bio}</p>
|
|
142
|
+
|
|
143
|
+
<div style={{ marginTop: 'var(--spacing-6)', display: 'flex', gap: 'var(--spacing-2)' }}>
|
|
144
|
+
<Button variant="primary">Edit Profile</Button>
|
|
145
|
+
<Button variant="outline">Message</Button>
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
</CardBody>
|
|
150
|
+
</Card>
|
|
151
|
+
)
|
|
152
|
+
}`,
|
|
153
|
+
'settings-page': `import { Switch, Input, Button, Card, CardBody, Alert } from '@lando-labs/lando-ds'
|
|
154
|
+
import { useState } from 'react'
|
|
155
|
+
|
|
156
|
+
export function SettingsPage() {
|
|
157
|
+
const [notifications, setNotifications] = useState(true)
|
|
158
|
+
const [darkMode, setDarkMode] = useState(false)
|
|
159
|
+
const [email, setEmail] = useState('')
|
|
160
|
+
const [saved, setSaved] = useState(false)
|
|
161
|
+
|
|
162
|
+
const handleSave = () => {
|
|
163
|
+
// Save settings
|
|
164
|
+
setSaved(true)
|
|
165
|
+
setTimeout(() => setSaved(false), 3000)
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return (
|
|
169
|
+
<div style={{ maxWidth: '800px', margin: '0 auto' }}>
|
|
170
|
+
<h1>Settings</h1>
|
|
171
|
+
|
|
172
|
+
{saved && (
|
|
173
|
+
<Alert variant="success" closable onClose={() => setSaved(false)}>
|
|
174
|
+
Your settings have been saved successfully
|
|
175
|
+
</Alert>
|
|
176
|
+
)}
|
|
177
|
+
|
|
178
|
+
<Card variant="outlined" style={{ marginTop: 'var(--spacing-6)' }}>
|
|
179
|
+
<CardBody>
|
|
180
|
+
<h2>Preferences</h2>
|
|
181
|
+
|
|
182
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 'var(--spacing-6)' }}>
|
|
183
|
+
<Switch
|
|
184
|
+
checked={notifications}
|
|
185
|
+
onChange={setNotifications}
|
|
186
|
+
label="Enable email notifications"
|
|
187
|
+
size="lg"
|
|
188
|
+
/>
|
|
189
|
+
|
|
190
|
+
<Switch
|
|
191
|
+
checked={darkMode}
|
|
192
|
+
onChange={setDarkMode}
|
|
193
|
+
label="Dark mode"
|
|
194
|
+
size="lg"
|
|
195
|
+
/>
|
|
196
|
+
|
|
197
|
+
<Input
|
|
198
|
+
label="Email"
|
|
199
|
+
type="email"
|
|
200
|
+
value={email}
|
|
201
|
+
onChange={(e) => setEmail(e.target.value)}
|
|
202
|
+
helperText="We'll never share your email"
|
|
203
|
+
/>
|
|
204
|
+
|
|
205
|
+
<Button variant="primary" onClick={handleSave}>
|
|
206
|
+
Save Settings
|
|
207
|
+
</Button>
|
|
208
|
+
</div>
|
|
209
|
+
</CardBody>
|
|
210
|
+
</Card>
|
|
211
|
+
</div>
|
|
212
|
+
)
|
|
213
|
+
}`,
|
|
214
|
+
'data-table': `import { Card, CardBody, Badge, Spinner } from '@lando-labs/lando-ds'
|
|
215
|
+
|
|
216
|
+
interface TableRow {
|
|
217
|
+
id: string
|
|
218
|
+
name: string
|
|
219
|
+
status: 'active' | 'inactive' | 'pending'
|
|
220
|
+
date: string
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export function DataTable({ data, loading }: { data: TableRow[], loading?: boolean }) {
|
|
224
|
+
if (loading) {
|
|
225
|
+
return (
|
|
226
|
+
<div style={{ display: 'flex', justifyContent: 'center', padding: 'var(--spacing-8)' }}>
|
|
227
|
+
<Spinner size="lg" label="Loading data..." />
|
|
228
|
+
</div>
|
|
229
|
+
)
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
return (
|
|
233
|
+
<Card variant="outlined">
|
|
234
|
+
<CardBody padding="none">
|
|
235
|
+
<table style={{ width: '100%', borderCollapse: 'collapse' }}>
|
|
236
|
+
<thead style={{
|
|
237
|
+
background: 'var(--color-neutral-50)',
|
|
238
|
+
borderBottom: '1px solid var(--color-border-default)'
|
|
239
|
+
}}>
|
|
240
|
+
<tr>
|
|
241
|
+
<th style={{ padding: 'var(--spacing-4)', textAlign: 'left' }}>Name</th>
|
|
242
|
+
<th style={{ padding: 'var(--spacing-4)', textAlign: 'left' }}>Status</th>
|
|
243
|
+
<th style={{ padding: 'var(--spacing-4)', textAlign: 'left' }}>Date</th>
|
|
244
|
+
</tr>
|
|
245
|
+
</thead>
|
|
246
|
+
<tbody>
|
|
247
|
+
{data.map(row => (
|
|
248
|
+
<tr
|
|
249
|
+
key={row.id}
|
|
250
|
+
style={{ borderBottom: '1px solid var(--color-border-subtle)' }}
|
|
251
|
+
>
|
|
252
|
+
<td style={{ padding: 'var(--spacing-4)' }}>{row.name}</td>
|
|
253
|
+
<td style={{ padding: 'var(--spacing-4)' }}>
|
|
254
|
+
<Badge
|
|
255
|
+
variant={
|
|
256
|
+
row.status === 'active' ? 'success' :
|
|
257
|
+
row.status === 'pending' ? 'warning' :
|
|
258
|
+
'default'
|
|
259
|
+
}
|
|
260
|
+
>
|
|
261
|
+
{row.status}
|
|
262
|
+
</Badge>
|
|
263
|
+
</td>
|
|
264
|
+
<td style={{ padding: 'var(--spacing-4)', color: 'var(--color-text-secondary)' }}>
|
|
265
|
+
{row.date}
|
|
266
|
+
</td>
|
|
267
|
+
</tr>
|
|
268
|
+
))}
|
|
269
|
+
</tbody>
|
|
270
|
+
</table>
|
|
271
|
+
</CardBody>
|
|
272
|
+
</Card>
|
|
273
|
+
)
|
|
274
|
+
}`
|
|
275
|
+
};
|
|
276
|
+
return examples[pattern] || `// Example pattern '${pattern}' not found\n// Available patterns: ${Object.keys(examples).join(', ')}`;
|
|
277
|
+
}
|
|
278
|
+
//# sourceMappingURL=code-examples.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-examples.js","sourceRoot":"","sources":["../../src/resources/code-examples.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,UAAU,YAAY,CAAC,OAAe;IAC1C,MAAM,QAAQ,GAA2B;QACvC,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwDhB;QAEE,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4Cf;QAEE,cAAc,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2ClB;QAEE,eAAe,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4DnB;QAEE,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4DhB;KACC,CAAA;IAED,OAAO,QAAQ,CAAC,OAAO,CAAC,IAAI,uBAAuB,OAAO,uCAAuC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAA;AACrI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"design-tokens.d.ts","sourceRoot":"","sources":["../../src/resources/design-tokens.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAgIrD"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Design Tokens Resource
|
|
3
|
+
* Provides CSS variable definitions from the design system
|
|
4
|
+
*/
|
|
5
|
+
export function designTokens(category) {
|
|
6
|
+
const tokens = {
|
|
7
|
+
colors: `/* Ocean Blues - Primary Brand */
|
|
8
|
+
--color-ocean-lightest: #E6F4F7
|
|
9
|
+
--color-ocean-lighter: #B3DDE8
|
|
10
|
+
--color-ocean-light: #66C2D9
|
|
11
|
+
--color-ocean-base: #2BA3D4
|
|
12
|
+
--color-ocean-medium: #1B7FA8 /* Primary brand color */
|
|
13
|
+
--color-ocean-dark: #136080
|
|
14
|
+
--color-ocean-darker: #0D4358
|
|
15
|
+
--color-ocean-darkest: #082A38
|
|
16
|
+
|
|
17
|
+
/* Teals & Aqua - Success */
|
|
18
|
+
--color-teal-lightest: #E6F7F7
|
|
19
|
+
--color-teal-lighter: #B3EBEB
|
|
20
|
+
--color-teal-light: #66D9D9
|
|
21
|
+
--color-teal-base: #2DBFBF
|
|
22
|
+
--color-teal-medium: #1A9999
|
|
23
|
+
--color-teal-dark: #127373
|
|
24
|
+
--color-teal-darker: #0C4D4D
|
|
25
|
+
--color-teal-darkest: #062929
|
|
26
|
+
|
|
27
|
+
/* Neutrals - Cool-tinted grays */
|
|
28
|
+
--color-neutral-white: #FFFFFF
|
|
29
|
+
--color-neutral-50: #F8FAFB
|
|
30
|
+
--color-neutral-100: #F1F5F7
|
|
31
|
+
--color-neutral-200: #E1E8ED
|
|
32
|
+
--color-neutral-300: #C7D3DB
|
|
33
|
+
--color-neutral-400: #B0BEC5
|
|
34
|
+
--color-neutral-500: #90A4AE
|
|
35
|
+
--color-neutral-600: #607D8B
|
|
36
|
+
--color-neutral-700: #455A64
|
|
37
|
+
--color-neutral-800: #37474F
|
|
38
|
+
--color-neutral-900: #263238
|
|
39
|
+
--color-neutral-black: #000000
|
|
40
|
+
|
|
41
|
+
/* Semantic Colors */
|
|
42
|
+
--color-success-base: #2DBFBF
|
|
43
|
+
--color-warning-base: #F59E0B
|
|
44
|
+
--color-error-base: #EF4444
|
|
45
|
+
--color-info-base: #2BA3D4
|
|
46
|
+
|
|
47
|
+
/* Contextual Colors */
|
|
48
|
+
--color-primary: var(--color-ocean-medium)
|
|
49
|
+
--color-background: var(--color-neutral-50)
|
|
50
|
+
--color-surface: var(--color-neutral-white)
|
|
51
|
+
--color-text-primary: var(--color-neutral-800)
|
|
52
|
+
--color-text-secondary: var(--color-neutral-600)
|
|
53
|
+
--color-border-default: var(--color-neutral-300)`,
|
|
54
|
+
typography: `/* Font Family */
|
|
55
|
+
--font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif
|
|
56
|
+
--font-family-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace
|
|
57
|
+
|
|
58
|
+
/* Font Sizes (1.250 - Major Third scale) */
|
|
59
|
+
--font-size-xs: 0.64rem /* 10.24px */
|
|
60
|
+
--font-size-sm: 0.8rem /* 12.8px */
|
|
61
|
+
--font-size-base: 1rem /* 16px */
|
|
62
|
+
--font-size-md: 1.25rem /* 20px */
|
|
63
|
+
--font-size-lg: 1.563rem /* 25px */
|
|
64
|
+
--font-size-xl: 1.953rem /* 31.25px */
|
|
65
|
+
--font-size-2xl: 2.441rem /* 39.06px */
|
|
66
|
+
--font-size-3xl: 3.052rem /* 48.83px */
|
|
67
|
+
--font-size-4xl: 3.815rem /* 61.04px */
|
|
68
|
+
|
|
69
|
+
/* Font Weights */
|
|
70
|
+
--font-weight-normal: 400
|
|
71
|
+
--font-weight-medium: 500
|
|
72
|
+
--font-weight-semibold: 600
|
|
73
|
+
--font-weight-bold: 700
|
|
74
|
+
--font-weight-extrabold: 800
|
|
75
|
+
|
|
76
|
+
/* Line Heights */
|
|
77
|
+
--line-height-tight: 1.25
|
|
78
|
+
--line-height-snug: 1.375
|
|
79
|
+
--line-height-normal: 1.5
|
|
80
|
+
--line-height-relaxed: 1.625
|
|
81
|
+
--line-height-loose: 2`,
|
|
82
|
+
spacing: `/* Base Unit: 16px */
|
|
83
|
+
--spacing-0: 0
|
|
84
|
+
--spacing-1: 0.25rem /* 4px */
|
|
85
|
+
--spacing-2: 0.5rem /* 8px */
|
|
86
|
+
--spacing-3: 0.75rem /* 12px */
|
|
87
|
+
--spacing-4: 1rem /* 16px - base */
|
|
88
|
+
--spacing-5: 1.25rem /* 20px */
|
|
89
|
+
--spacing-6: 1.5rem /* 24px */
|
|
90
|
+
--spacing-8: 2rem /* 32px */
|
|
91
|
+
--spacing-10: 2.5rem /* 40px */
|
|
92
|
+
--spacing-12: 3rem /* 48px */
|
|
93
|
+
--spacing-16: 4rem /* 64px */
|
|
94
|
+
--spacing-20: 5rem /* 80px */
|
|
95
|
+
--spacing-24: 6rem /* 96px */
|
|
96
|
+
--spacing-32: 8rem /* 128px */
|
|
97
|
+
|
|
98
|
+
/* Semantic Spacing */
|
|
99
|
+
--spacing-xs: var(--spacing-1)
|
|
100
|
+
--spacing-sm: var(--spacing-2)
|
|
101
|
+
--spacing-md: var(--spacing-4)
|
|
102
|
+
--spacing-lg: var(--spacing-6)
|
|
103
|
+
--spacing-xl: var(--spacing-8)
|
|
104
|
+
--spacing-2xl: var(--spacing-12)`,
|
|
105
|
+
shadows: `/* Ocean-tinted shadows */
|
|
106
|
+
--shadow-xs: 0 1px 2px 0 rgba(27, 127, 168, 0.05)
|
|
107
|
+
--shadow-sm: 0 1px 3px 0 rgba(27, 127, 168, 0.1), 0 1px 2px -1px rgba(27, 127, 168, 0.1)
|
|
108
|
+
--shadow-md: 0 4px 6px -1px rgba(27, 127, 168, 0.1), 0 2px 4px -2px rgba(27, 127, 168, 0.1)
|
|
109
|
+
--shadow-lg: 0 10px 15px -3px rgba(27, 127, 168, 0.1), 0 4px 6px -4px rgba(27, 127, 168, 0.1)
|
|
110
|
+
--shadow-xl: 0 20px 25px -5px rgba(27, 127, 168, 0.1), 0 8px 10px -6px rgba(27, 127, 168, 0.1)
|
|
111
|
+
--shadow-2xl: 0 25px 50px -12px rgba(27, 127, 168, 0.25)
|
|
112
|
+
|
|
113
|
+
/* Elevation Shadows */
|
|
114
|
+
--elevation-1: var(--shadow-sm)
|
|
115
|
+
--elevation-2: var(--shadow-md)
|
|
116
|
+
--elevation-3: var(--shadow-lg)
|
|
117
|
+
--elevation-4: var(--shadow-xl)
|
|
118
|
+
|
|
119
|
+
/* Focus Shadow */
|
|
120
|
+
--shadow-focus: 0 0 0 3px rgba(43, 163, 212, 0.3)`,
|
|
121
|
+
all: `All design tokens combined for quick reference`
|
|
122
|
+
};
|
|
123
|
+
if (category === 'all') {
|
|
124
|
+
return `${tokens.colors}\n\n${tokens.typography}\n\n${tokens.spacing}\n\n${tokens.shadows}`;
|
|
125
|
+
}
|
|
126
|
+
return tokens[category] || 'Unknown token category';
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=design-tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"design-tokens.js","sourceRoot":"","sources":["../../src/resources/design-tokens.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,UAAU,YAAY,CAAC,QAAgB;IAC3C,MAAM,MAAM,GAAG;QACb,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDA8CqC;QAE7C,UAAU,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;uBA2BO;QAEnB,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;iCAsBoB;QAE7B,OAAO,EAAE;;;;;;;;;;;;;;;kDAeqC;QAE9C,GAAG,EAAE,gDAAgD;KACtD,CAAA;IAED,IAAI,QAAQ,KAAK,KAAK,EAAE,CAAC;QACvB,OAAO,GAAG,MAAM,CAAC,MAAM,OAAO,MAAM,CAAC,UAAU,OAAO,MAAM,CAAC,OAAO,OAAO,MAAM,CAAC,OAAO,EAAE,CAAA;IAC7F,CAAC;IAED,OAAO,MAAM,CAAC,QAA+B,CAAC,IAAI,wBAAwB,CAAA;AAC5E,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Resources — meta-backed (v3.0.0).
|
|
3
|
+
*
|
|
4
|
+
* Component documentation resources are now sourced from DS meta
|
|
5
|
+
* (light + verbose). Token and code-example resources are unchanged.
|
|
6
|
+
*/
|
|
7
|
+
export interface ResourceContent {
|
|
8
|
+
uri: string;
|
|
9
|
+
mimeType: string;
|
|
10
|
+
text: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function getResource(uri: string): Promise<ResourceContent>;
|
|
13
|
+
export declare function listResources(): Array<{
|
|
14
|
+
uri: string;
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
mimeType: string;
|
|
18
|
+
}>;
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;CACb;AAED,wBAAsB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CA0DvE;AAED,wBAAgB,aAAa,IAAI,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAuB3G"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Resources — meta-backed (v3.0.0).
|
|
3
|
+
*
|
|
4
|
+
* Component documentation resources are now sourced from DS meta
|
|
5
|
+
* (light + verbose). Token and code-example resources are unchanged.
|
|
6
|
+
*/
|
|
7
|
+
import { codeExamples } from './code-examples.js';
|
|
8
|
+
import { getComponentNames, getVerboseComponent } from '../utils/meta-loader.js';
|
|
9
|
+
export async function getResource(uri) {
|
|
10
|
+
// Component documentation: lando-ds://components/{ComponentName}
|
|
11
|
+
if (uri.startsWith('lando-ds://components/')) {
|
|
12
|
+
const componentName = uri.replace('lando-ds://components/', '');
|
|
13
|
+
const cmp = getVerboseComponent(componentName);
|
|
14
|
+
if (!cmp) {
|
|
15
|
+
throw new Error(`Unknown component: ${componentName}`);
|
|
16
|
+
}
|
|
17
|
+
let text = `# ${componentName}\n\n`;
|
|
18
|
+
text += `${cmp.description || '_No description in meta._'}\n\n`;
|
|
19
|
+
text += `## Import\n\n\`\`\`tsx\nimport { ${componentName} } from '@lando-labs/lando-ds'\n\`\`\`\n\n`;
|
|
20
|
+
text += `## Category\n\n`;
|
|
21
|
+
text += `- **Category**: ${cmp.category}\n`;
|
|
22
|
+
text += `- **Subpath**: \`${cmp.subpath}\`\n\n`;
|
|
23
|
+
text += `## Props\n\n`;
|
|
24
|
+
const propNames = Object.keys(cmp.props).sort();
|
|
25
|
+
for (const name of propNames) {
|
|
26
|
+
const p = cmp.props[name];
|
|
27
|
+
const required = p.required ? '(required)' : '(optional)';
|
|
28
|
+
const defaultVal = p.default ? ` — default: \`${p.default}\`` : '';
|
|
29
|
+
text += `- **${name}** ${required}: \`${p.type}\`${defaultVal}\n`;
|
|
30
|
+
if (p.description)
|
|
31
|
+
text += ` - ${p.description}\n`;
|
|
32
|
+
}
|
|
33
|
+
text += '\n';
|
|
34
|
+
if (cmp.examples.length > 0) {
|
|
35
|
+
text += `## Examples\n\n`;
|
|
36
|
+
cmp.examples.forEach((ex) => {
|
|
37
|
+
text += `### ${ex.name}\n\n\`\`\`tsx\n${ex.code}\n\`\`\`\n\n`;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
if (cmp.composes && Object.keys(cmp.composes).length > 0) {
|
|
41
|
+
text += `## Composition\n\n`;
|
|
42
|
+
for (const [prop, hint] of Object.entries(cmp.composes)) {
|
|
43
|
+
text += `- \`${prop}\` accepts \`${hint.accepts}\` (as \`${hint.as}\`)\n`;
|
|
44
|
+
}
|
|
45
|
+
text += '\n';
|
|
46
|
+
}
|
|
47
|
+
if (cmp.deprecated) {
|
|
48
|
+
text += `## ⚠ Deprecated\n\n`;
|
|
49
|
+
text += `Deprecated since v${cmp.deprecated.since}. Use \`${cmp.deprecated.replacedBy}\`. Scheduled removal: v${cmp.deprecated.removeAt}.\n\n`;
|
|
50
|
+
}
|
|
51
|
+
return { uri, mimeType: 'text/markdown', text };
|
|
52
|
+
}
|
|
53
|
+
if (uri.startsWith('lando-ds://examples/')) {
|
|
54
|
+
const pattern = uri.replace('lando-ds://examples/', '');
|
|
55
|
+
return { uri, mimeType: 'text/plain', text: codeExamples(pattern) };
|
|
56
|
+
}
|
|
57
|
+
throw new Error(`Unknown resource URI: ${uri}`);
|
|
58
|
+
}
|
|
59
|
+
export function listResources() {
|
|
60
|
+
const resources = [];
|
|
61
|
+
for (const name of getComponentNames()) {
|
|
62
|
+
resources.push({
|
|
63
|
+
uri: `lando-ds://components/${name}`,
|
|
64
|
+
name: `${name} Component`,
|
|
65
|
+
description: `Complete documentation for the ${name} component`,
|
|
66
|
+
mimeType: 'text/markdown',
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
const examplePatterns = ['login-form', 'card-grid', 'user-profile', 'settings-page', 'data-table'];
|
|
70
|
+
examplePatterns.forEach((pattern) => {
|
|
71
|
+
resources.push({
|
|
72
|
+
uri: `lando-ds://examples/${pattern}`,
|
|
73
|
+
name: `Example: ${pattern}`,
|
|
74
|
+
description: `Complete code example for ${pattern.replace('-', ' ')}`,
|
|
75
|
+
mimeType: 'text/plain',
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
return resources;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAQhF,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,GAAW;IAC3C,iEAAiE;IACjE,IAAI,GAAG,CAAC,UAAU,CAAC,wBAAwB,CAAC,EAAE,CAAC;QAC7C,MAAM,aAAa,GAAG,GAAG,CAAC,OAAO,CAAC,wBAAwB,EAAE,EAAE,CAAC,CAAA;QAE/D,MAAM,GAAG,GAAG,mBAAmB,CAAC,aAAa,CAAC,CAAA;QAC9C,IAAI,CAAC,GAAG,EAAE,CAAC;YACT,MAAM,IAAI,KAAK,CAAC,sBAAsB,aAAa,EAAE,CAAC,CAAA;QACxD,CAAC;QAED,IAAI,IAAI,GAAG,KAAK,aAAa,MAAM,CAAA;QACnC,IAA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AAyB,IAAI,EAAE;YACpC,IAAI,EAAE,GAAG,IAAI,YAAY;YACzB,WAAW,EAAE,kCAAkC,IAAI,YAAY;YAC/D,QAAQ,EAAE,eAAe;SAC1B,CAAC,CAAA;IACJ,CAAC;IAED,MAAM,eAAe,GAAG,CAAC,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe,EAAE,YAAY,CAAC,CAAA;IAClG,eAAe,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAClC,SAAS,CAAC,IAAI,CAAC;YACb,GAAG,EAAE,uBAAuB,OAAO,EAAE;YACrC,IAAI,EAAE,YAAY,OAAO,EAAE;YAC3B,WAAW,EAAE,6BAA6B,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE;YACrE,QAAQ,EAAE,YAAY;SACvB,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,OAAO,SAAS,CAAA;AAClB,CAAC"}
|
package/build/test.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test Script for @lando-labs/lando-ds-mcp v4.0.0
|
|
3
|
+
*
|
|
4
|
+
* Coverage:
|
|
5
|
+
* - Meta loader (schema compat, accessors)
|
|
6
|
+
* - Each of the 15 tools: Zod schema validation + smoke test on output
|
|
7
|
+
* - JSX safety regressions (carried from v2.7.1)
|
|
8
|
+
* - Error envelope classification (carried from v2.7.1)
|
|
9
|
+
* - Icon library (Lucide catalog)
|
|
10
|
+
*/
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
|