@maltjoy/mcp-server 0.4.0 → 0.5.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.
Files changed (66) hide show
  1. package/README.md +49 -20
  2. package/dist/doc/VJoyAvatar/metadata.json +1 -1
  3. package/dist/doc/VJoyButton/metadata.json +1 -17
  4. package/dist/doc/VJoyCollapseItem/metadata.json +1 -1
  5. package/dist/doc/VJoyDropdownList/metadata.json +1 -1
  6. package/dist/doc/VJoyDropzone/metadata.json +36 -1
  7. package/dist/doc/VJoyFormError/metadata.json +0 -14
  8. package/dist/doc/VJoyHighlight/metadata.json +1 -1
  9. package/dist/doc/VJoyIcon/JoyIcon.types.ts +1 -1
  10. package/dist/doc/VJoyIcon/metadata.json +1 -2
  11. package/dist/doc/VJoyIconButton/metadata.json +2 -2
  12. package/dist/doc/VJoyInput/JoyInput.types.ts +1 -6
  13. package/dist/doc/VJoyInput/metadata.json +6 -15
  14. package/dist/doc/VJoyInputNumber/metadata.json +23 -18
  15. package/dist/doc/VJoyInputPassword/metadata.json +1 -15
  16. package/dist/doc/VJoyLink/metadata.json +1 -1
  17. package/dist/doc/VJoyListItem/metadata.json +1 -1
  18. package/dist/doc/VJoyMenu/metadata.json +33 -0
  19. package/dist/doc/VJoyMenuItem/metadata.json +2 -2
  20. package/dist/doc/VJoyPasswordRequirement/metadata.json +1 -1
  21. package/dist/doc/VJoyProductTour/JoyProductTour.types.ts +0 -1
  22. package/dist/doc/VJoyProductTour/metadata.json +2 -2
  23. package/dist/doc/VJoySelectableItem/metadata.json +1 -1
  24. package/dist/doc/VJoyText/metadata.json +1 -1
  25. package/dist/doc/VJoyUserCard/metadata.json +3 -17
  26. package/dist/doc/VJoyWalkthrough/metadata.json +1 -1
  27. package/dist/doc/VJoyWalkthroughTrigger/metadata.json +1 -1
  28. package/dist/doc/css-classes.json +1 -19
  29. package/dist/doc/design-tokens.json +2242 -150
  30. package/dist/doc/index.json +19 -29
  31. package/dist/index.js +71 -3
  32. package/dist/index.js.map +1 -1
  33. package/dist/tokens/build-catalog.d.ts +6 -0
  34. package/dist/tokens/build-catalog.d.ts.map +1 -0
  35. package/dist/tokens/build-catalog.js +141 -0
  36. package/dist/tokens/build-catalog.js.map +1 -0
  37. package/dist/tokens/query.d.ts +49 -0
  38. package/dist/tokens/query.d.ts.map +1 -0
  39. package/dist/tokens/query.js +290 -0
  40. package/dist/tokens/query.js.map +1 -0
  41. package/dist/tokens/types.d.ts +44 -0
  42. package/dist/tokens/types.d.ts.map +1 -0
  43. package/dist/tokens/types.js +23 -0
  44. package/dist/tokens/types.js.map +1 -0
  45. package/dist/tools/get-token-group.d.ts +26 -0
  46. package/dist/tools/get-token-group.d.ts.map +1 -0
  47. package/dist/tools/get-token-group.js +24 -0
  48. package/dist/tools/get-token-group.js.map +1 -0
  49. package/dist/tools/get-token-usage.d.ts +24 -0
  50. package/dist/tools/get-token-usage.d.ts.map +1 -0
  51. package/dist/tools/get-token-usage.js +22 -0
  52. package/dist/tools/get-token-usage.js.map +1 -0
  53. package/dist/tools/get-token.d.ts +18 -0
  54. package/dist/tools/get-token.d.ts.map +1 -0
  55. package/dist/tools/get-token.js +20 -0
  56. package/dist/tools/get-token.js.map +1 -0
  57. package/dist/tools/list-design-tokens.d.ts +21 -12
  58. package/dist/tools/list-design-tokens.d.ts.map +1 -1
  59. package/dist/tools/list-design-tokens.js +26 -12
  60. package/dist/tools/list-design-tokens.js.map +1 -1
  61. package/dist/tools/search-tokens.d.ts +38 -0
  62. package/dist/tools/search-tokens.d.ts.map +1 -0
  63. package/dist/tools/search-tokens.js +44 -0
  64. package/dist/tools/search-tokens.js.map +1 -0
  65. package/package.json +4 -3
  66. package/dist/doc/VJoyMultiCheckbox/metadata.json +0 -332
@@ -1 +1 @@
1
- {"version":3,"file":"list-design-tokens.js","sourceRoot":"","sources":["../../src/tools/list-design-tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CA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,OAAO,EAAE,OAAO,CAAC;aACtG;YACD,iBAAiB,EAAE;gBACjB,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,gDAAgD;aAC9D;SACF;QACD,QAAQ,EAAE,EAAE;KACb;CACF,CAAC;AAEF,MAAM,UAAU,sBAAsB,CAAC,OAA8B,EAAE;IACrE,OAAO,gBAAgB,CAAC;QACtB,KAAK,EAAE,IAAI,CAAC,KAAuC;QACnD,MAAM,EAAE,IAAI,CAAC,MAAiC;QAC9C,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;KAC1C,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { type SearchTokensInput } from '../tokens/query.js';
2
+ export declare const searchTokensTool: {
3
+ name: string;
4
+ description: string;
5
+ inputSchema: {
6
+ type: string;
7
+ properties: {
8
+ query: {
9
+ type: string;
10
+ description: string;
11
+ };
12
+ layer: {
13
+ type: string;
14
+ enum: string[];
15
+ description: string;
16
+ };
17
+ domain: {
18
+ type: string;
19
+ enum: string[];
20
+ };
21
+ includeDeprecated: {
22
+ type: string;
23
+ description: string;
24
+ };
25
+ limit: {
26
+ type: string;
27
+ description: string;
28
+ };
29
+ };
30
+ required: string[];
31
+ };
32
+ };
33
+ export declare function handleSearchTokens(args: SearchTokensInput): {
34
+ query: string;
35
+ count: number;
36
+ tokens: import("../tokens/types.js").TokenHit[];
37
+ };
38
+ //# sourceMappingURL=search-tokens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-tokens.d.ts","sourceRoot":"","sources":["../../src/tools/search-tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAG1E,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiC5B,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,iBAAiB;;;;EAQzD"}
@@ -0,0 +1,44 @@
1
+ import { searchTokens } from '../tokens/query.js';
2
+ export const searchTokensTool = {
3
+ name: 'joy_search_tokens',
4
+ description: 'Find Joy design tokens by intent or name (e.g. "page title", "disabled fill", "color.text.heading"). ' +
5
+ 'Prefer this over listing all tokens. Semantic tokens rank first. ' +
6
+ 'Use joy_get_token for full usage docs on one result.',
7
+ inputSchema: {
8
+ type: 'object',
9
+ properties: {
10
+ query: {
11
+ type: 'string',
12
+ description: 'Intent, token path, CSS name, or partial name',
13
+ },
14
+ layer: {
15
+ type: 'string',
16
+ enum: ['semantic', 'primitive', 'all'],
17
+ description: 'Defaults to semantic, then falls back to all if nothing matches',
18
+ },
19
+ domain: {
20
+ type: 'string',
21
+ enum: ['color', 'spacing', 'radius', 'elevation', 'zIndex', 'typography', 'motion', 'forms', 'links'],
22
+ },
23
+ includeDeprecated: {
24
+ type: 'boolean',
25
+ description: 'Include deprecated aliases. Defaults to false.',
26
+ },
27
+ limit: {
28
+ type: 'number',
29
+ description: 'Max hits (default 8, max 25)',
30
+ },
31
+ },
32
+ required: ['query'],
33
+ },
34
+ };
35
+ export function handleSearchTokens(args) {
36
+ return searchTokens({
37
+ query: args.query,
38
+ layer: args.layer,
39
+ domain: args.domain,
40
+ includeDeprecated: args.includeDeprecated,
41
+ limit: args.limit,
42
+ });
43
+ }
44
+ //# sourceMappingURL=search-tokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-tokens.js","sourceRoot":"","sources":["../../src/tools/search-tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA0B,MAAM,oBAAoB,CAAC;AAG1E,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,mBAAmB;IACzB,WAAW,EACT,uGAAuG;QACvG,mEAAmE;QACnE,sDAAsD;IACxD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+CAA+C;aAC7D;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,KAAK,CAAC;gBACtC,WAAW,EAAE,iEAAiE;aAC/E;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC;aACtG;YACD,iBAAiB,EAAE;gBACjB,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,gDAAgD;aAC9D;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,8BAA8B;aAC5C;SACF;QACD,QAAQ,EAAE,CAAC,OAAO,CAAC;KACpB;CACF,CAAC;AAEF,MAAM,UAAU,kBAAkB,CAAC,IAAuB;IACxD,OAAO,YAAY,CAAC;QAClB,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,KAAK,EAAE,IAAI,CAAC,KAAuC;QACnD,MAAM,EAAE,IAAI,CAAC,MAAiC;QAC9C,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;QACzC,KAAK,EAAE,IAAI,CAAC,KAAK;KAClB,CAAC,CAAC;AACL,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maltjoy/mcp-server",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "MCP server for Joy Design System - exposes Vue3 components information",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -15,7 +15,8 @@
15
15
  "dev": "tsc --watch",
16
16
  "start": "node dist/index.js",
17
17
  "generate:components-docs:json": "tsx src/json-metadata-generator.mjs",
18
- "inspector": "pnpx @modelcontextprotocol/inspector node ./dist/index.js"
18
+ "inspector": "pnpx @modelcontextprotocol/inspector node ./dist/index.js",
19
+ "test": "tsx --test tests/*.test.ts"
19
20
  },
20
21
  "keywords": [
21
22
  "mcp",
@@ -30,7 +31,7 @@
30
31
  "@modelcontextprotocol/sdk": "1.25.2"
31
32
  },
32
33
  "devDependencies": {
33
- "@types/node": "20.14.2",
34
+ "@types/node": "24.12.0",
34
35
  "tsx": "^4.21.0",
35
36
  "typescript": "5.3.3",
36
37
  "vue-component-meta": "3.1.5"
@@ -1,332 +0,0 @@
1
- {
2
- "name": "JoyMultiCheckbox",
3
- "displayName": "VJoyMultiCheckbox",
4
- "description": "A multi-selection checkbox group component for handling arrays of selected values.\nSimplifies multi-selection scenarios by managing checkbox states and array manipulation automatically.\nFeatures integrated labeling, fieldset structure for accessibility, and customizable checkbox content through slots.\nPerfect for filtering interfaces and bulk selection operations.",
5
- "category": "Forms",
6
- "props": [
7
- {
8
- "name": "options",
9
- "type": "Option[] | undefined",
10
- "required": false,
11
- "description": "",
12
- "possibleValues": [
13
- {
14
- "kind": "array",
15
- "type": "Option[]",
16
- "schema": [
17
- {
18
- "kind": "object",
19
- "type": "Option",
20
- "schema": {
21
- "id": {
22
- "name": "id",
23
- "global": false,
24
- "description": "",
25
- "tags": [],
26
- "required": true,
27
- "type": "string",
28
- "declarations": [
29
- {
30
- "file": "/home/kevincarnaille/dev/design-system/packages/core-vue/src/components/JoyCheckboxGroup/VJoyCheckboxGroup.vue",
31
- "range": [
32
- 1310,
33
- 1321
34
- ]
35
- }
36
- ],
37
- "schema": "string"
38
- },
39
- "name": {
40
- "name": "name",
41
- "global": false,
42
- "description": "",
43
- "tags": [],
44
- "required": false,
45
- "type": "string | undefined",
46
- "declarations": [
47
- {
48
- "file": "/home/kevincarnaille/dev/design-system/packages/core-vue/src/components/JoyCheckboxGroup/VJoyCheckboxGroup.vue",
49
- "range": [
50
- 1330,
51
- 1344
52
- ]
53
- }
54
- ],
55
- "schema": {
56
- "kind": "enum",
57
- "type": "string | undefined",
58
- "schema": [
59
- "undefined",
60
- "string"
61
- ]
62
- }
63
- },
64
- "value": {
65
- "name": "value",
66
- "global": false,
67
- "description": "",
68
- "tags": [],
69
- "required": true,
70
- "type": "string",
71
- "declarations": [
72
- {
73
- "file": "/home/kevincarnaille/dev/design-system/packages/core-vue/src/components/JoyCheckboxGroup/VJoyCheckboxGroup.vue",
74
- "range": [
75
- 1353,
76
- 1367
77
- ]
78
- }
79
- ],
80
- "schema": "string"
81
- },
82
- "label": {
83
- "name": "label",
84
- "global": false,
85
- "description": "",
86
- "tags": [],
87
- "required": true,
88
- "type": "string",
89
- "declarations": [
90
- {
91
- "file": "/home/kevincarnaille/dev/design-system/packages/core-vue/src/components/JoyCheckboxGroup/VJoyCheckboxGroup.vue",
92
- "range": [
93
- 1376,
94
- 1390
95
- ]
96
- }
97
- ],
98
- "schema": "string"
99
- },
100
- "subLabel": {
101
- "name": "subLabel",
102
- "global": false,
103
- "description": "",
104
- "tags": [],
105
- "required": false,
106
- "type": "string | undefined",
107
- "declarations": [
108
- {
109
- "file": "/home/kevincarnaille/dev/design-system/packages/core-vue/src/components/JoyCheckboxGroup/VJoyCheckboxGroup.vue",
110
- "range": [
111
- 1399,
112
- 1417
113
- ]
114
- }
115
- ],
116
- "schema": "string | undefined"
117
- },
118
- "disabled": {
119
- "name": "disabled",
120
- "global": false,
121
- "description": "",
122
- "tags": [
123
- {
124
- "name": "default",
125
- "text": "false"
126
- }
127
- ],
128
- "required": false,
129
- "type": "boolean | undefined",
130
- "declarations": [
131
- {
132
- "file": "/home/kevincarnaille/dev/design-system/packages/core-vue/src/components/JoyCheckboxGroup/VJoyCheckboxGroup.vue",
133
- "range": [
134
- 1476,
135
- 1495
136
- ]
137
- }
138
- ],
139
- "schema": {
140
- "kind": "enum",
141
- "type": "boolean | undefined",
142
- "schema": [
143
- "undefined",
144
- "false",
145
- "true"
146
- ]
147
- }
148
- },
149
- "required": {
150
- "name": "required",
151
- "global": false,
152
- "description": "",
153
- "tags": [
154
- {
155
- "name": "default",
156
- "text": "false"
157
- }
158
- ],
159
- "required": false,
160
- "type": "boolean | undefined",
161
- "declarations": [
162
- {
163
- "file": "/home/kevincarnaille/dev/design-system/packages/core-vue/src/components/JoyCheckboxGroup/VJoyCheckboxGroup.vue",
164
- "range": [
165
- 1554,
166
- 1573
167
- ]
168
- }
169
- ],
170
- "schema": "boolean | undefined"
171
- }
172
- }
173
- }
174
- ]
175
- }
176
- ]
177
- },
178
- {
179
- "name": "id",
180
- "type": "string | undefined",
181
- "required": false,
182
- "description": "",
183
- "possibleValues": [
184
- "string"
185
- ]
186
- },
187
- {
188
- "name": "value",
189
- "type": "any[] | undefined",
190
- "required": false,
191
- "description": "TODO: better typings",
192
- "possibleValues": [
193
- {
194
- "kind": "array",
195
- "type": "any[]",
196
- "schema": [
197
- "any"
198
- ]
199
- }
200
- ]
201
- },
202
- {
203
- "name": "direction",
204
- "type": "CheckboxGroupDirection | undefined",
205
- "required": false,
206
- "description": "Switch checkboxes layout direction.",
207
- "possibleValues": [
208
- "vertical",
209
- "horizontal"
210
- ]
211
- },
212
- {
213
- "name": "required",
214
- "type": "boolean | undefined",
215
- "required": false,
216
- "description": "",
217
- "possibleValues": [
218
- "false",
219
- "true"
220
- ]
221
- },
222
- {
223
- "name": "label",
224
- "type": "string | undefined",
225
- "required": false,
226
- "description": "Use VJoyLabel if you need to customize the label HTML.",
227
- "possibleValues": [
228
- "string"
229
- ]
230
- },
231
- {
232
- "name": "labelSize",
233
- "type": "TJoyLabelSizes | undefined",
234
- "required": false,
235
- "description": "",
236
- "possibleValues": [
237
- "medium",
238
- "large",
239
- "small"
240
- ]
241
- },
242
- {
243
- "name": "optionalLabel",
244
- "type": "string | undefined",
245
- "required": false,
246
- "description": "",
247
- "possibleValues": [
248
- "string"
249
- ]
250
- },
251
- {
252
- "name": "requiredMark",
253
- "type": "boolean | undefined",
254
- "required": false,
255
- "description": "",
256
- "possibleValues": [
257
- "false",
258
- "true"
259
- ]
260
- }
261
- ],
262
- "events": [
263
- {
264
- "name": "update:value",
265
- "description": "",
266
- "signature": "(event: \"update:value\", value: any[]): void"
267
- }
268
- ],
269
- "slots": [
270
- {
271
- "name": "default",
272
- "description": "Allows explicit declaration of VJoyCheckbox / VJoyCheckboxCard children in the group.\n\n**Important**: v-model has to be handled by consumer."
273
- },
274
- {
275
- "name": "checkbox",
276
- "description": "Customize the inner content of each checkboxes"
277
- }
278
- ],
279
- "exposed": [
280
- {
281
- "name": "required",
282
- "type": "boolean",
283
- "isMethod": false
284
- },
285
- {
286
- "name": "value",
287
- "type": "any[]",
288
- "isMethod": false
289
- },
290
- {
291
- "name": "options",
292
- "type": "Option[]",
293
- "isMethod": false
294
- },
295
- {
296
- "name": "direction",
297
- "type": "CheckboxGroupDirection",
298
- "isMethod": false
299
- },
300
- {
301
- "name": "labelSize",
302
- "type": "TJoyLabelSizes",
303
- "isMethod": false
304
- },
305
- {
306
- "name": "requiredMark",
307
- "type": "boolean",
308
- "isMethod": false
309
- },
310
- {
311
- "name": "label",
312
- "type": "string | undefined",
313
- "isMethod": false
314
- },
315
- {
316
- "name": "id",
317
- "type": "string | undefined",
318
- "isMethod": false
319
- },
320
- {
321
- "name": "optionalLabel",
322
- "type": "string | undefined",
323
- "isMethod": false
324
- },
325
- {
326
- "name": "onUpdate:value",
327
- "type": "((value: any[]) => any) | undefined",
328
- "isMethod": true
329
- }
330
- ],
331
- "hasVModel": true
332
- }