svelora 2.2.0 → 3.0.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/README.md +2 -2
- package/dist/CodeBlock/CodeBlock.svelte +83 -0
- package/dist/CodeBlock/CodeBlock.svelte.d.ts +5 -0
- package/dist/CodeBlock/code-block.types.d.ts +15 -0
- package/dist/CodeBlock/code-block.types.js +1 -0
- package/dist/CodeBlock/code-block.variants.d.ts +288 -0
- package/dist/CodeBlock/code-block.variants.js +69 -0
- package/dist/CodeBlock/index.d.ts +2 -0
- package/dist/CodeBlock/index.js +1 -0
- package/dist/Drawer/Drawer.svelte +13 -3
- package/dist/Editor/Editor.svelte +3 -0
- package/dist/Fonts/Fonts.svelte +54 -0
- package/dist/Fonts/Fonts.svelte.d.ts +5 -0
- package/dist/Fonts/fonts.d.ts +12 -0
- package/dist/Fonts/fonts.js +128 -0
- package/dist/Fonts/fonts.types.d.ts +40 -0
- package/dist/Fonts/fonts.types.js +1 -0
- package/dist/Fonts/index.d.ts +3 -0
- package/dist/Fonts/index.js +2 -0
- package/dist/config.d.ts +12 -1
- package/dist/config.js +9 -0
- package/dist/docs/code-block.d.ts +13 -0
- package/dist/docs/code-block.js +214 -0
- package/dist/docs/navigation.d.ts +27 -0
- package/dist/docs/navigation.js +491 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/mcp/cursor.mcp.json +12 -0
- package/dist/mcp/install-template.mjs +55 -0
- package/dist/mcp/server.mjs +338 -0
- package/dist/mcp/svelora-docs.data.json +138 -0
- package/dist/theme.css +20 -1
- package/package.json +30 -9
|
@@ -0,0 +1,491 @@
|
|
|
1
|
+
import packageJson from '../../../package.json' with { type: 'json' };
|
|
2
|
+
export const docsMeta = {
|
|
3
|
+
name: 'Svelora',
|
|
4
|
+
version: `v${packageJson.version}`,
|
|
5
|
+
npmCommand: 'npm install svelora',
|
|
6
|
+
githubHref: 'https://github.com/asphum/svelora'
|
|
7
|
+
};
|
|
8
|
+
export const docsIntroItems = [
|
|
9
|
+
{
|
|
10
|
+
title: 'Introduction',
|
|
11
|
+
href: '/docs',
|
|
12
|
+
legacyHref: '/getting-started',
|
|
13
|
+
icon: 'lucide:book-open',
|
|
14
|
+
description: 'Overview, quick start, and ecosystem highlights.'
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
title: 'Installation',
|
|
18
|
+
href: '/docs/installation',
|
|
19
|
+
legacyHref: '/getting-started/installation',
|
|
20
|
+
icon: 'lucide:download',
|
|
21
|
+
description: 'Install the package and set up the required styles.'
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
title: 'Theming',
|
|
25
|
+
href: '/docs/theming',
|
|
26
|
+
legacyHref: '/getting-started/theming',
|
|
27
|
+
icon: 'lucide:palette',
|
|
28
|
+
description: 'Customize OKLCH tokens and component appearance.'
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
title: 'Dark Mode',
|
|
32
|
+
href: '/docs/dark-mode',
|
|
33
|
+
legacyHref: '/getting-started/dark-mode',
|
|
34
|
+
icon: 'lucide:moon-star',
|
|
35
|
+
description: 'Enable light, dark, and system theme support.'
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
title: 'MCP',
|
|
39
|
+
href: '/docs/mcp',
|
|
40
|
+
legacyHref: '/mcp',
|
|
41
|
+
icon: 'lucide:plug',
|
|
42
|
+
description: 'Connect Svelora docs helpers to Cursor IDE via MCP.'
|
|
43
|
+
}
|
|
44
|
+
];
|
|
45
|
+
export const docsThemeItems = [
|
|
46
|
+
{
|
|
47
|
+
title: 'Customization',
|
|
48
|
+
href: '/docs/customization',
|
|
49
|
+
legacyHref: '/customization',
|
|
50
|
+
icon: 'lucide:sliders-horizontal',
|
|
51
|
+
description: 'Configure global defaults, icons, and component slots.'
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
title: 'Colors',
|
|
55
|
+
href: '/docs/colors',
|
|
56
|
+
legacyHref: '/colors',
|
|
57
|
+
icon: 'lucide:swatch-book',
|
|
58
|
+
description: 'Explore semantic color tokens and the surface system.'
|
|
59
|
+
}
|
|
60
|
+
];
|
|
61
|
+
export const docsComponentGroups = [
|
|
62
|
+
{
|
|
63
|
+
title: 'General',
|
|
64
|
+
items: [
|
|
65
|
+
{
|
|
66
|
+
title: 'Button',
|
|
67
|
+
href: '/docs/components/button',
|
|
68
|
+
legacyHref: '/button',
|
|
69
|
+
icon: 'lucide:mouse-pointer-click'
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
title: 'CodeBlock',
|
|
73
|
+
href: '/docs/components/code-block',
|
|
74
|
+
legacyHref: '/code-block',
|
|
75
|
+
icon: 'lucide:code'
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
title: 'FieldGroup',
|
|
79
|
+
href: '/docs/components/field-group',
|
|
80
|
+
legacyHref: '/field-group',
|
|
81
|
+
icon: 'lucide:group'
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
title: 'Fonts',
|
|
85
|
+
href: '/docs/components/fonts',
|
|
86
|
+
legacyHref: '/google-fonts',
|
|
87
|
+
icon: 'lucide:font'
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
title: 'Icon',
|
|
91
|
+
href: '/docs/components/icon',
|
|
92
|
+
legacyHref: '/icon',
|
|
93
|
+
icon: 'lucide:shapes'
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
title: 'Link',
|
|
97
|
+
href: '/docs/components/link',
|
|
98
|
+
legacyHref: '/link',
|
|
99
|
+
icon: 'lucide:link'
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
title: 'Kbd',
|
|
103
|
+
href: '/docs/components/kbd',
|
|
104
|
+
legacyHref: '/kbd',
|
|
105
|
+
icon: 'lucide:keyboard'
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
title: 'ThemeModeButton',
|
|
109
|
+
href: '/docs/components/theme-mode-button',
|
|
110
|
+
legacyHref: '/theme-mode-button',
|
|
111
|
+
icon: 'lucide:sun-moon'
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
title: 'Layout',
|
|
117
|
+
items: [
|
|
118
|
+
{
|
|
119
|
+
title: 'Card',
|
|
120
|
+
href: '/docs/components/card',
|
|
121
|
+
legacyHref: '/card',
|
|
122
|
+
icon: 'lucide:square'
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
title: 'Container',
|
|
126
|
+
href: '/docs/components/container',
|
|
127
|
+
legacyHref: '/container',
|
|
128
|
+
icon: 'lucide:box'
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
title: 'Separator',
|
|
132
|
+
href: '/docs/components/separator',
|
|
133
|
+
legacyHref: '/separator',
|
|
134
|
+
icon: 'lucide:minus'
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
title: 'Data Display',
|
|
140
|
+
items: [
|
|
141
|
+
{
|
|
142
|
+
title: 'Accordion',
|
|
143
|
+
href: '/docs/components/accordion',
|
|
144
|
+
legacyHref: '/accordion',
|
|
145
|
+
icon: 'lucide:chevrons-down-up'
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
title: 'Avatar',
|
|
149
|
+
href: '/docs/components/avatar',
|
|
150
|
+
legacyHref: '/avatar',
|
|
151
|
+
icon: 'lucide:circle-user'
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
title: 'AvatarGroup',
|
|
155
|
+
href: '/docs/components/avatar-group',
|
|
156
|
+
legacyHref: '/avatar-group',
|
|
157
|
+
icon: 'lucide:users'
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
title: 'Badge',
|
|
161
|
+
href: '/docs/components/badge',
|
|
162
|
+
legacyHref: '/badge',
|
|
163
|
+
icon: 'lucide:tag'
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
title: 'Carousel',
|
|
167
|
+
href: '/docs/components/carousel',
|
|
168
|
+
legacyHref: '/carousel',
|
|
169
|
+
icon: 'lucide:gallery-horizontal'
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
title: 'Chip',
|
|
173
|
+
href: '/docs/components/chip',
|
|
174
|
+
legacyHref: '/chip',
|
|
175
|
+
icon: 'lucide:circle-dot'
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
title: 'Empty',
|
|
179
|
+
href: '/docs/components/empty',
|
|
180
|
+
legacyHref: '/empty',
|
|
181
|
+
icon: 'lucide:inbox'
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
title: 'Skeleton',
|
|
185
|
+
href: '/docs/components/skeleton',
|
|
186
|
+
legacyHref: '/skeleton',
|
|
187
|
+
icon: 'lucide:loader-circle'
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
title: 'Timeline',
|
|
191
|
+
href: '/docs/components/timeline',
|
|
192
|
+
legacyHref: '/timeline',
|
|
193
|
+
icon: 'lucide:git-commit-horizontal'
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
title: 'User',
|
|
197
|
+
href: '/docs/components/user',
|
|
198
|
+
legacyHref: '/user',
|
|
199
|
+
icon: 'lucide:user'
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
title: 'Table',
|
|
203
|
+
href: '/docs/components/table',
|
|
204
|
+
legacyHref: '/table',
|
|
205
|
+
icon: 'lucide:table'
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
title: 'Forms',
|
|
211
|
+
items: [
|
|
212
|
+
{
|
|
213
|
+
title: 'Checkbox',
|
|
214
|
+
href: '/docs/components/checkbox',
|
|
215
|
+
legacyHref: '/checkbox',
|
|
216
|
+
icon: 'lucide:square-check'
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
title: 'CheckboxGroup',
|
|
220
|
+
href: '/docs/components/checkbox-group',
|
|
221
|
+
legacyHref: '/checkbox-group',
|
|
222
|
+
icon: 'lucide:list-checks'
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
title: 'Editor',
|
|
226
|
+
href: '/docs/components/editor',
|
|
227
|
+
legacyHref: '/editor',
|
|
228
|
+
icon: 'lucide:pen-line'
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
title: 'Input',
|
|
232
|
+
href: '/docs/components/input',
|
|
233
|
+
legacyHref: '/input',
|
|
234
|
+
icon: 'lucide:text-cursor-input'
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
title: 'RadioGroup',
|
|
238
|
+
href: '/docs/components/radio-group',
|
|
239
|
+
legacyHref: '/radio-group',
|
|
240
|
+
icon: 'lucide:circle-dot'
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
title: 'Select',
|
|
244
|
+
href: '/docs/components/select',
|
|
245
|
+
legacyHref: '/select',
|
|
246
|
+
icon: 'lucide:chevrons-up-down'
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
title: 'SelectMenu',
|
|
250
|
+
href: '/docs/components/select-menu',
|
|
251
|
+
legacyHref: '/select-menu',
|
|
252
|
+
icon: 'lucide:list-filter'
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
title: 'Slider',
|
|
256
|
+
href: '/docs/components/slider',
|
|
257
|
+
legacyHref: '/slider',
|
|
258
|
+
icon: 'lucide:sliders-horizontal'
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
title: 'Switch',
|
|
262
|
+
href: '/docs/components/switch',
|
|
263
|
+
legacyHref: '/switch',
|
|
264
|
+
icon: 'lucide:toggle-left'
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
title: 'Textarea',
|
|
268
|
+
href: '/docs/components/textarea',
|
|
269
|
+
legacyHref: '/textarea',
|
|
270
|
+
icon: 'lucide:text'
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
title: 'FileUpload',
|
|
274
|
+
href: '/docs/components/file-upload',
|
|
275
|
+
legacyHref: '/file-upload',
|
|
276
|
+
icon: 'lucide:upload'
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
title: 'PinInput',
|
|
280
|
+
href: '/docs/components/pin-input',
|
|
281
|
+
legacyHref: '/pin-input',
|
|
282
|
+
icon: 'lucide:square-asterisk'
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
title: 'FormField',
|
|
286
|
+
href: '/docs/components/form-field',
|
|
287
|
+
legacyHref: '/form-field',
|
|
288
|
+
icon: 'lucide:text-cursor-input'
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
title: 'Form',
|
|
292
|
+
href: '/docs/components/form',
|
|
293
|
+
legacyHref: '/form',
|
|
294
|
+
icon: 'lucide:clipboard-list'
|
|
295
|
+
}
|
|
296
|
+
]
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
title: 'Feedback',
|
|
300
|
+
items: [
|
|
301
|
+
{
|
|
302
|
+
title: 'Alert',
|
|
303
|
+
href: '/docs/components/alert',
|
|
304
|
+
legacyHref: '/alert',
|
|
305
|
+
icon: 'lucide:bell'
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
title: 'Banner',
|
|
309
|
+
href: '/docs/components/banner',
|
|
310
|
+
legacyHref: '/banner',
|
|
311
|
+
icon: 'lucide:megaphone'
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
title: 'Progress',
|
|
315
|
+
href: '/docs/components/progress',
|
|
316
|
+
legacyHref: '/progress',
|
|
317
|
+
icon: 'lucide:loader'
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
title: 'Toast',
|
|
321
|
+
href: '/docs/components/toast',
|
|
322
|
+
legacyHref: '/toast',
|
|
323
|
+
icon: 'lucide:message-square-warning'
|
|
324
|
+
}
|
|
325
|
+
]
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
title: 'Navigation',
|
|
329
|
+
items: [
|
|
330
|
+
{
|
|
331
|
+
title: 'Breadcrumb',
|
|
332
|
+
href: '/docs/components/breadcrumb',
|
|
333
|
+
legacyHref: '/breadcrumb',
|
|
334
|
+
icon: 'lucide:chevron-right'
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
title: 'Pagination',
|
|
338
|
+
href: '/docs/components/pagination',
|
|
339
|
+
legacyHref: '/pagination',
|
|
340
|
+
icon: 'lucide:ellipsis'
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
title: 'Stepper',
|
|
344
|
+
href: '/docs/components/stepper',
|
|
345
|
+
legacyHref: '/stepper',
|
|
346
|
+
icon: 'lucide:list-ordered'
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
title: 'Tabs',
|
|
350
|
+
href: '/docs/components/tabs',
|
|
351
|
+
legacyHref: '/tabs',
|
|
352
|
+
icon: 'lucide:panel-top'
|
|
353
|
+
}
|
|
354
|
+
]
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
title: 'Overlay',
|
|
358
|
+
items: [
|
|
359
|
+
{
|
|
360
|
+
title: 'Collapsible',
|
|
361
|
+
href: '/docs/components/collapsible',
|
|
362
|
+
legacyHref: '/collapsible',
|
|
363
|
+
icon: 'lucide:chevrons-up-down'
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
title: 'Command',
|
|
367
|
+
href: '/docs/components/command',
|
|
368
|
+
legacyHref: '/command',
|
|
369
|
+
icon: 'lucide:square-terminal'
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
title: 'ContextMenu',
|
|
373
|
+
href: '/docs/components/context-menu',
|
|
374
|
+
legacyHref: '/context-menu',
|
|
375
|
+
icon: 'lucide:mouse-pointer-square'
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
title: 'Modal',
|
|
379
|
+
href: '/docs/components/modal',
|
|
380
|
+
legacyHref: '/modal',
|
|
381
|
+
icon: 'lucide:square-stack'
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
title: 'Drawer',
|
|
385
|
+
href: '/docs/components/drawer',
|
|
386
|
+
legacyHref: '/drawer',
|
|
387
|
+
icon: 'lucide:panel-bottom'
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
title: 'DropdownMenu',
|
|
391
|
+
href: '/docs/components/dropdown-menu',
|
|
392
|
+
legacyHref: '/dropdown-menu',
|
|
393
|
+
icon: 'lucide:menu'
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
title: 'Popover',
|
|
397
|
+
href: '/docs/components/popover',
|
|
398
|
+
legacyHref: '/popover',
|
|
399
|
+
icon: 'lucide:messages-square'
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
title: 'Slideover',
|
|
403
|
+
href: '/docs/components/slideover',
|
|
404
|
+
legacyHref: '/slideover',
|
|
405
|
+
icon: 'lucide:panel-right'
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
title: 'Tooltip',
|
|
409
|
+
href: '/docs/components/tooltip',
|
|
410
|
+
legacyHref: '/tooltip',
|
|
411
|
+
icon: 'lucide:message-square'
|
|
412
|
+
}
|
|
413
|
+
]
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
title: 'Date & Time',
|
|
417
|
+
items: [
|
|
418
|
+
{
|
|
419
|
+
title: 'Calendar',
|
|
420
|
+
href: '/docs/components/calendar',
|
|
421
|
+
legacyHref: '/calendar',
|
|
422
|
+
icon: 'lucide:calendar'
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
title: 'RangeCalendar',
|
|
426
|
+
href: '/docs/components/range-calendar',
|
|
427
|
+
legacyHref: '/range-calendar',
|
|
428
|
+
icon: 'lucide:calendar-range'
|
|
429
|
+
}
|
|
430
|
+
]
|
|
431
|
+
}
|
|
432
|
+
];
|
|
433
|
+
export const docsHookItems = [
|
|
434
|
+
{
|
|
435
|
+
title: 'useMediaQuery',
|
|
436
|
+
href: '/docs/hooks/use-media-query',
|
|
437
|
+
legacyHref: '/use-media-query',
|
|
438
|
+
icon: 'lucide:monitor-smartphone'
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
title: 'useClipboard',
|
|
442
|
+
href: '/docs/hooks/use-clipboard',
|
|
443
|
+
legacyHref: '/use-clipboard',
|
|
444
|
+
icon: 'lucide:clipboard'
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
title: 'useFormField',
|
|
448
|
+
href: '/docs/hooks/use-form-field',
|
|
449
|
+
legacyHref: '/use-form-field',
|
|
450
|
+
icon: 'lucide:text-cursor-input'
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
title: 'useClickOutside',
|
|
454
|
+
href: '/docs/hooks/use-click-outside',
|
|
455
|
+
legacyHref: '/use-click-outside',
|
|
456
|
+
icon: 'lucide:pointer'
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
title: 'useInfiniteScroll',
|
|
460
|
+
href: '/docs/hooks/use-infinite-scroll',
|
|
461
|
+
legacyHref: '/use-infinite-scroll',
|
|
462
|
+
icon: 'lucide:arrow-down-to-line'
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
title: 'useEscapeKeydown',
|
|
466
|
+
href: '/docs/hooks/use-escape-keydown',
|
|
467
|
+
legacyHref: '/use-escape-keydown',
|
|
468
|
+
icon: 'lucide:keyboard'
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
title: 'useDebounce',
|
|
472
|
+
href: '/docs/hooks/use-debounce',
|
|
473
|
+
legacyHref: '/use-debounce',
|
|
474
|
+
icon: 'lucide:timer'
|
|
475
|
+
}
|
|
476
|
+
];
|
|
477
|
+
export const docsTopNav = [
|
|
478
|
+
{ title: 'Docs', href: '/docs', icon: 'lucide:book-open' },
|
|
479
|
+
{ title: 'Components', href: '/docs/components/button', icon: 'lucide:blocks' },
|
|
480
|
+
{ title: 'Hooks', href: '/docs/hooks/use-debounce', icon: 'lucide:hook' }
|
|
481
|
+
];
|
|
482
|
+
export const allComponentItems = docsComponentGroups.flatMap((group) => group.items);
|
|
483
|
+
export const allDocsItems = [
|
|
484
|
+
...docsIntroItems,
|
|
485
|
+
...docsThemeItems,
|
|
486
|
+
...allComponentItems,
|
|
487
|
+
...docsHookItems
|
|
488
|
+
];
|
|
489
|
+
export const totalComponents = allComponentItems.length;
|
|
490
|
+
export const totalHooks = docsHookItems.length;
|
|
491
|
+
export const docsPathAliases = new Map(allDocsItems.flatMap((item) => (item.legacyHref ? [[item.legacyHref, item.href]] : [])));
|
package/dist/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export * from './Checkbox/index.js';
|
|
|
15
15
|
export * from './CheckboxGroup/index.js';
|
|
16
16
|
export * from './Chip/index.js';
|
|
17
17
|
export * from './Collapsible/index.js';
|
|
18
|
+
export * from './CodeBlock/index.js';
|
|
18
19
|
export * from './Command/index.js';
|
|
19
20
|
export * from './Container/index.js';
|
|
20
21
|
export * from './ContextMenu/index.js';
|
|
@@ -27,6 +28,7 @@ export * from './FieldGroup/index.js';
|
|
|
27
28
|
export * from './FileUpload/index.js';
|
|
28
29
|
export * from './Form/index.js';
|
|
29
30
|
export * from './FormField/index.js';
|
|
31
|
+
export * from './Fonts/index.js';
|
|
30
32
|
export * from './hooks/index.js';
|
|
31
33
|
export * from './Icon/index.js';
|
|
32
34
|
export * from './Input/index.js';
|
package/dist/index.js
CHANGED
|
@@ -15,6 +15,7 @@ export * from './Checkbox/index.js';
|
|
|
15
15
|
export * from './CheckboxGroup/index.js';
|
|
16
16
|
export * from './Chip/index.js';
|
|
17
17
|
export * from './Collapsible/index.js';
|
|
18
|
+
export * from './CodeBlock/index.js';
|
|
18
19
|
export * from './Command/index.js';
|
|
19
20
|
export * from './Container/index.js';
|
|
20
21
|
export * from './ContextMenu/index.js';
|
|
@@ -27,6 +28,7 @@ export * from './FieldGroup/index.js';
|
|
|
27
28
|
export * from './FileUpload/index.js';
|
|
28
29
|
export * from './Form/index.js';
|
|
29
30
|
export * from './FormField/index.js';
|
|
31
|
+
export * from './Fonts/index.js';
|
|
30
32
|
// Composables
|
|
31
33
|
export * from './hooks/index.js';
|
|
32
34
|
export * from './Icon/index.js';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { access, copyFile, mkdir } from 'node:fs/promises'
|
|
4
|
+
import path from 'node:path'
|
|
5
|
+
import { fileURLToPath } from 'node:url'
|
|
6
|
+
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url)
|
|
8
|
+
const __dirname = path.dirname(__filename)
|
|
9
|
+
|
|
10
|
+
const args = new Set(process.argv.slice(2))
|
|
11
|
+
const force = args.has('--force')
|
|
12
|
+
const cwd = process.cwd()
|
|
13
|
+
const targetDir = path.join(cwd, '.cursor')
|
|
14
|
+
const targetPath = path.join(targetDir, 'mcp.json')
|
|
15
|
+
|
|
16
|
+
async function resolveTemplatePath() {
|
|
17
|
+
const candidates = [
|
|
18
|
+
path.join(__dirname, 'cursor.mcp.json'),
|
|
19
|
+
path.resolve(__dirname, '../../dist/mcp/cursor.mcp.json')
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
for (const candidate of candidates) {
|
|
23
|
+
try {
|
|
24
|
+
await access(candidate)
|
|
25
|
+
return candidate
|
|
26
|
+
} catch {
|
|
27
|
+
// Try next candidate.
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
throw new Error('Could not find cursor.mcp.json template for Svelora MCP.')
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
async function main() {
|
|
35
|
+
const templatePath = await resolveTemplatePath()
|
|
36
|
+
|
|
37
|
+
try {
|
|
38
|
+
await access(targetPath)
|
|
39
|
+
if (!force) {
|
|
40
|
+
console.error(`Refusing to overwrite existing file: ${targetPath}`)
|
|
41
|
+
console.error('Run again with --force if you want to replace it.')
|
|
42
|
+
process.exitCode = 1
|
|
43
|
+
return
|
|
44
|
+
}
|
|
45
|
+
} catch {
|
|
46
|
+
// Continue and attempt to create the file.
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
await mkdir(targetDir, { recursive: true })
|
|
50
|
+
await copyFile(templatePath, targetPath)
|
|
51
|
+
|
|
52
|
+
console.log(`Installed Svelora MCP template at ${targetPath}`)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
await main()
|