Skip to content

Commit f03f499

Browse files
committed
chore(vuetify0): sync composables and components with repo
- Add createNested, useLazy composables - Add Checkbox, Radio, Tabs components - Add subpath exports documentation (utilities, types, constants, date) - Add get_vuetify0_exports_list tool
1 parent 7a5b50a commit f03f499

2 files changed

Lines changed: 94 additions & 3 deletions

File tree

src/services/vuetify0.ts

Lines changed: 88 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ export const VUETIFY0_COMPOSABLES = {
2020
name: 'Registration',
2121
description: 'Manage collections and registries',
2222
composables: {
23-
createRegistry: 'Foundation for registration-based systems with automatic indexing',
23+
createNested: 'Manage nested/hierarchical context structures with parent-child relationships',
2424
createQueue: 'Registry queue management',
25+
createRegistry: 'Foundation for registration-based systems with automatic indexing',
2526
createTimeline: 'Bounded undo/redo system with fixed-size history',
2627
createTokens: 'Design token management system with aliases and resolution',
2728
useProxyRegistry: 'Proxy-based registry with automatic reactivity',
@@ -71,6 +72,7 @@ export const VUETIFY0_COMPOSABLES = {
7172
useDate: 'Date utilities and formatting',
7273
useFeatures: 'Feature flag management',
7374
useHydration: 'SSR hydration utilities',
75+
useLazy: 'Deferred/lazy evaluation of expensive computations',
7476
useLocale: 'Internationalization support',
7577
useLogger: 'Logging system',
7678
usePermissions: 'Permission management',
@@ -91,18 +93,80 @@ export const VUETIFY0_COMPOSABLES = {
9193
export const VUETIFY0_COMPONENTS = {
9294
Atom: 'Base element wrapper component',
9395
Avatar: 'Image loading with fallback system',
96+
Checkbox: 'Checkbox with tri-state and group support',
9497
Dialog: 'Modal dialog component',
9598
ExpansionPanel: 'Expandable panel component',
9699
Group: 'Component grouping/container',
97100
Pagination: 'Pagination controls with Root, Item, Ellipsis, First, Last, Next, Prev sub-components',
98101
Popover: 'Popover overlay component',
102+
Radio: 'Radio button component',
99103
Selection: 'Selection handling component',
100104
Single: 'Single item component',
101105
Step: 'Step/stepper component',
106+
Tabs: 'Tabbed interface component',
107+
} as const
108+
109+
export const VUETIFY0_EXPORTS = {
110+
utilities: {
111+
name: 'Utilities',
112+
path: '@vuetify/v0/utilities',
113+
description: 'Helper functions for type checking, object manipulation, and common transformations',
114+
exports: {
115+
isFunction: 'Check if a value is a function',
116+
isString: 'Check if a value is a string',
117+
isNumber: 'Check if a value is a number',
118+
isBoolean: 'Check if a value is a boolean',
119+
isObject: 'Check if a value is a plain object (excludes null and arrays)',
120+
isArray: 'Check if a value is an array',
121+
isNull: 'Check if a value is null',
122+
isUndefined: 'Check if a value is undefined',
123+
isNullOrUndefined: 'Check if a value is null or undefined',
124+
isPrimitive: 'Check if a value is a primitive (string, number, or boolean)',
125+
isSymbol: 'Check if a value is a symbol',
126+
isNaN: 'Check if a value is NaN',
127+
mergeDeep: 'Deeply merge source objects into a target object',
128+
useId: 'Generate unique IDs (SSR-safe with Vue\'s useId)',
129+
clamp: 'Clamp a value between a minimum and maximum',
130+
range: 'Create an array of sequential numbers',
131+
debounce: 'Debounce a function call by a specified delay',
132+
},
133+
},
134+
types: {
135+
name: 'Types',
136+
path: '@vuetify/v0/types',
137+
description: 'Shared TypeScript type definitions',
138+
exports: {
139+
DOMElement: 'Valid element types for Vue\'s h() render function',
140+
GenericObject: 'Generic object with string keys and any values',
141+
UnknownObject: 'Object with string keys and unknown values (safer alternative)',
142+
ID: 'Identifier type used throughout the registry system (string | number)',
143+
DeepPartial: 'Recursively makes all properties of T optional',
144+
MaybeArray: 'Union type that accepts either a single value or an array',
145+
MaybeRef: 'Value that may be wrapped in a Vue ref, readonly ref, shallow ref, or getter',
146+
},
147+
},
148+
constants: {
149+
name: 'Constants',
150+
path: '@vuetify/v0/constants',
151+
description: 'Shared constants and element references',
152+
exports: {
153+
htmlElements: 'HTML element tag names',
154+
globals: 'Global constants',
155+
},
156+
},
157+
date: {
158+
name: 'Date',
159+
path: '@vuetify/v0/date',
160+
description: 'Date adapter using the Temporal API',
161+
exports: {
162+
Vuetify0DateAdapter: 'Temporal API-based date adapter implementation',
163+
},
164+
},
102165
} as const
103166

104167
export type Vuetify0Category = keyof typeof VUETIFY0_COMPOSABLES
105168
export type Vuetify0Component = keyof typeof VUETIFY0_COMPONENTS
169+
export type Vuetify0Export = keyof typeof VUETIFY0_EXPORTS
106170

107171
export function createVuetify0Service () {
108172
return {
@@ -161,7 +225,7 @@ export function createVuetify0Service () {
161225
content: [
162226
{
163227
type: 'text',
164-
text: `# @vuetify/v0 Composables\n\nVuetify0 provides 37 tree-shakeable composables organized into 7 categories:\n\n${categories}\n\n**Note**: Vuetify0 is currently in Pre-Alpha. Features may not function as expected.\n\n**Documentation**: https://0.vuetifyjs.com/composables`,
228+
text: `# @vuetify/v0 Composables\n\nVuetify0 provides 39 tree-shakeable composables organized into 7 categories:\n\n${categories}\n\n**Note**: Vuetify0 is currently in Pre-Alpha. Features may not function as expected.\n\n**Documentation**: https://0.vuetifyjs.com/composables`,
165229
} as const,
166230
],
167231
}
@@ -176,7 +240,7 @@ export function createVuetify0Service () {
176240
content: [
177241
{
178242
type: 'text',
179-
text: `# @vuetify/v0 Components\n\nVuetify0 provides 10 headless components (unstyled, logic-only building blocks):\n\n${components}\n\n**Note**: These are headless components - they provide only logic and state without imposed styling.\n\n**Documentation**: https://0.vuetifyjs.com/components`,
243+
text: `# @vuetify/v0 Components\n\nVuetify0 provides 13 headless components (unstyled, logic-only building blocks):\n\n${components}\n\n**Note**: These are headless components - they provide only logic and state without imposed styling.\n\n**Documentation**: https://0.vuetifyjs.com/components`,
180244
} as const,
181245
],
182246
}
@@ -264,5 +328,26 @@ export function createVuetify0Service () {
264328
}
265329
}
266330
},
331+
332+
getExportsList: async () => {
333+
const exports = Object.entries(VUETIFY0_EXPORTS)
334+
.map(([_key, category]) => {
335+
const items = Object.entries(category.exports)
336+
.map(([name, description]) => ` - **${name}**: ${description}`)
337+
.join('\n')
338+
339+
return `## ${category.name}\n**Import**: \`${category.path}\`\n${category.description}\n\n${items}`
340+
})
341+
.join('\n\n')
342+
343+
return {
344+
content: [
345+
{
346+
type: 'text',
347+
text: `# @vuetify/v0 Subpath Exports\n\nVuetify0 provides additional subpath exports for utilities, types, constants, and date handling:\n\n${exports}\n\n**Documentation**: https://0.vuetifyjs.com/`,
348+
} as const,
349+
],
350+
}
351+
},
267352
}
268353
}

src/tools/documentation.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,10 @@ export async function registerDocumentationTools (server: McpServer) {
118118
},
119119
vuetify0.getComponentGuide,
120120
)
121+
122+
server.tool(
123+
'get_vuetify0_exports_list',
124+
'Get a list of all subpath exports available in @vuetify/v0 (utilities, types, constants, date adapter).',
125+
vuetify0.getExportsList,
126+
)
121127
}

0 commit comments

Comments
 (0)