@workday/canvas-kit-mcp 15.0.0-alpha.0056-next.0 → 15.0.0-alpha.0064-next.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/README.md +6 -0
- package/dist/cli.js +272 -7
- package/dist/cli.js.map +2 -2
- package/dist/index.js +272 -7
- package/dist/index.js.map +2 -2
- package/dist/lib/{llm-txt/llm-style-props-migration.txt → llm-style-props-migration.txt} +1 -1
- package/dist/lib/theming.md +649 -0
- package/dist/lib/tokens/color-contrast.md +116 -0
- package/dist/lib/tokens/color-palette.md +141 -0
- package/dist/lib/tokens/color-roles.md +520 -0
- package/dist/lib/tokens/color-scale.md +277 -0
- package/dist/lib/tokens/color-tokens.md +130 -0
- package/dist/lib/tokens/token-migration.md +234 -0
- package/dist/lib/upgrade-guides/10.0-UPGRADE-GUIDE.md +346 -0
- package/dist/lib/upgrade-guides/11.0-UPGRADE-GUIDE.md +960 -0
- package/dist/lib/upgrade-guides/14.0-UPGRADE-GUIDE.md +1 -1
- package/dist/lib/upgrade-guides/9.0-UPGRADE-GUIDE.md +498 -0
- package/dist/types/lib/index.d.ts.map +1 -1
- package/package.json +2 -2
- /package/dist/lib/{llm-txt/llm-token-migration-14.txt → llm-token-migration-14.txt} +0 -0
package/README.md
CHANGED
|
@@ -34,6 +34,12 @@ You will need to check how to install MCP servers, but the config will look some
|
|
|
34
34
|
}
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
+
## Integrate MCP with Claude Code
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
claude mcp add --scope project --transport stdio canvas-kit -- npx -y @workday/canvas-kit-mcp
|
|
41
|
+
```
|
|
42
|
+
|
|
37
43
|
## Contributing
|
|
38
44
|
|
|
39
45
|
Canvas Kit MCP is has two exports.
|
package/dist/cli.js
CHANGED
|
@@ -11,7 +11,7 @@ import { fileURLToPath } from "node:url";
|
|
|
11
11
|
// package.json
|
|
12
12
|
var package_default = {
|
|
13
13
|
name: "@workday/canvas-kit-mcp",
|
|
14
|
-
version: "14.
|
|
14
|
+
version: "14.2.0",
|
|
15
15
|
description: "MCP package for Canvas Kit",
|
|
16
16
|
author: "Workday, Inc. (https://www.workday.com)",
|
|
17
17
|
license: "Apache-2.0",
|
|
@@ -69,12 +69,26 @@ var package_default = {
|
|
|
69
69
|
// lib/config.json
|
|
70
70
|
var config_default = {
|
|
71
71
|
upgradeGuideFiles: [
|
|
72
|
+
"upgrade-guides/9.0-UPGRADE-GUIDE.md",
|
|
73
|
+
"upgrade-guides/10.0-UPGRADE-GUIDE.md",
|
|
74
|
+
"upgrade-guides/11.0-UPGRADE-GUIDE.md",
|
|
72
75
|
"upgrade-guides/12.0-UPGRADE-GUIDE.md",
|
|
73
76
|
"upgrade-guides/13.0-UPGRADE-GUIDE.md",
|
|
74
77
|
"upgrade-guides/14.0-UPGRADE-GUIDE.md",
|
|
75
78
|
"upgrade-guides/15.0-UPGRADE-GUIDE.md",
|
|
76
|
-
"llm-
|
|
77
|
-
"llm-
|
|
79
|
+
"llm-token-migration-14.txt",
|
|
80
|
+
"llm-style-props-migration.txt",
|
|
81
|
+
"theming.md"
|
|
82
|
+
],
|
|
83
|
+
tokenFiles: [
|
|
84
|
+
"tokens/token-migration.md",
|
|
85
|
+
"tokens/color-palette.md",
|
|
86
|
+
"tokens/color-tokens.md",
|
|
87
|
+
"tokens/color-contrast.md",
|
|
88
|
+
"tokens/color-roles.md",
|
|
89
|
+
"tokens/color-scale.md",
|
|
90
|
+
"llm-token-migration-14.txt",
|
|
91
|
+
"llm-style-props-migration.txt"
|
|
78
92
|
]
|
|
79
93
|
};
|
|
80
94
|
|
|
@@ -99,6 +113,54 @@ function getServer() {
|
|
|
99
113
|
);
|
|
100
114
|
function getUpgradeGuideResource(fileName) {
|
|
101
115
|
switch (fileName) {
|
|
116
|
+
case "upgrade-guides/9.0-UPGRADE-GUIDE.md":
|
|
117
|
+
return {
|
|
118
|
+
title: "Canvas Kit 9.0 Upgrade Guide",
|
|
119
|
+
description: `# Canvas Kit 9.0 Upgrade Guide
|
|
120
|
+
This guide contains an overview of the changes in Canvas Kit v9.
|
|
121
|
+
|
|
122
|
+
In this release, we:
|
|
123
|
+
- introduced new Table component
|
|
124
|
+
- removed Drawer, Layout, Column, Stack, HStack, and VStack components
|
|
125
|
+
- removed focusRing and composeModelHooks utilities
|
|
126
|
+
- updated Button, Toast, and Collection components
|
|
127
|
+
- added depth token updates`,
|
|
128
|
+
mimeType: "text/markdown",
|
|
129
|
+
uri: "docs://upgrade-guides/9.0-UPGRADE-GUIDE",
|
|
130
|
+
contents: fs.readFileSync(path.resolve(__dirname, "lib", fileName), "utf8")
|
|
131
|
+
};
|
|
132
|
+
case "upgrade-guides/10.0-UPGRADE-GUIDE.md":
|
|
133
|
+
return {
|
|
134
|
+
title: "Canvas Kit 10.0 Upgrade Guide",
|
|
135
|
+
description: `# Canvas Kit 10.0 Upgrade Guide
|
|
136
|
+
This guide contains an overview of the changes in Canvas Kit v10.
|
|
137
|
+
|
|
138
|
+
In this release, we:
|
|
139
|
+
- introduced new styling package @workday/canvas-kit-styling
|
|
140
|
+
- removed CSS packages and useBanner
|
|
141
|
+
- deprecated Input Icon Container, Select Preview, Space Numbers, and Table
|
|
142
|
+
- updated space and depth tokens
|
|
143
|
+
- updated Button, Popups, and Select components`,
|
|
144
|
+
mimeType: "text/markdown",
|
|
145
|
+
uri: "docs://upgrade-guides/10.0-UPGRADE-GUIDE",
|
|
146
|
+
contents: fs.readFileSync(path.resolve(__dirname, "lib", fileName), "utf8")
|
|
147
|
+
};
|
|
148
|
+
case "upgrade-guides/11.0-UPGRADE-GUIDE.md":
|
|
149
|
+
return {
|
|
150
|
+
title: "Canvas Kit 11.0 Upgrade Guide",
|
|
151
|
+
description: `# Canvas Kit 11.0 Upgrade Guide
|
|
152
|
+
This guide contains an overview of the changes in Canvas Kit v11.
|
|
153
|
+
|
|
154
|
+
In this release, we:
|
|
155
|
+
- transitioned to new CSS variable-based styling approach
|
|
156
|
+
- introduced Canvas Tokens Web package for semantic tokens
|
|
157
|
+
- introduced new styling API for component styling
|
|
158
|
+
- deprecated Form Field Main, Label Text, Text Area Preview, Text Input Preview
|
|
159
|
+
- updated components to use CSS tokens`,
|
|
160
|
+
mimeType: "text/markdown",
|
|
161
|
+
uri: "docs://upgrade-guides/11.0-UPGRADE-GUIDE",
|
|
162
|
+
contents: fs.readFileSync(path.resolve(__dirname, "lib", fileName), "utf8")
|
|
163
|
+
};
|
|
102
164
|
case "upgrade-guides/12.0-UPGRADE-GUIDE.md":
|
|
103
165
|
return {
|
|
104
166
|
title: "Canvas Kit 12.0 Upgrade Guide",
|
|
@@ -125,24 +187,24 @@ In this release, we:
|
|
|
125
187
|
uri: "docs://upgrade-guides/13.0-UPGRADE-GUIDE",
|
|
126
188
|
contents: fs.readFileSync(path.resolve(__dirname, "lib", fileName), "utf8")
|
|
127
189
|
};
|
|
128
|
-
case "llm-
|
|
190
|
+
case "llm-token-migration-14.txt":
|
|
129
191
|
return {
|
|
130
192
|
title: "Canvas Kit Token Migration Guide",
|
|
131
193
|
description: `# Canvas Kit Token Migration Guide
|
|
132
194
|
Guide for migrating from @workday/canvas-kit-react/tokens to @workday/canvas-tokens-web.
|
|
133
195
|
This migration enables better theming capabilities, improved performance, and a more standardized approach to styling.`,
|
|
134
196
|
mimeType: "text/plain",
|
|
135
|
-
uri: "docs://llm-
|
|
197
|
+
uri: "docs://llm-token-migration-14",
|
|
136
198
|
contents: fs.readFileSync(path.resolve(__dirname, "lib", fileName), "utf8")
|
|
137
199
|
};
|
|
138
|
-
case "llm-
|
|
200
|
+
case "llm-style-props-migration.txt":
|
|
139
201
|
return {
|
|
140
202
|
title: "Canvas Kit Style Props Migration Guide",
|
|
141
203
|
description: `# Canvas Kit Style Props Migration Guide
|
|
142
204
|
Guide for migrating from Emotion's style props to @workday/canvas-kit-styling.
|
|
143
205
|
This migration improves performance, consistency, and maintainability by moving away from runtime styling to static CSS compilation.`,
|
|
144
206
|
mimeType: "text/plain",
|
|
145
|
-
uri: "docs://llm-
|
|
207
|
+
uri: "docs://llm-style-props-migration",
|
|
146
208
|
contents: fs.readFileSync(path.resolve(__dirname, "lib", fileName), "utf8")
|
|
147
209
|
};
|
|
148
210
|
case "upgrade-guides/14.0-UPGRADE-GUIDE.md":
|
|
@@ -159,6 +221,25 @@ In this release, we:
|
|
|
159
221
|
uri: "docs://upgrade-guides/14.0-UPGRADE-GUIDE",
|
|
160
222
|
contents: fs.readFileSync(path.resolve(__dirname, "lib", fileName), "utf8")
|
|
161
223
|
};
|
|
224
|
+
case "theming.md":
|
|
225
|
+
return {
|
|
226
|
+
title: "Canvas Kit Theming Guide",
|
|
227
|
+
description: `# Canvas Kit Theming Guide
|
|
228
|
+
Comprehensive guide for theming Canvas Kit applications in v14.
|
|
229
|
+
|
|
230
|
+
Covers:
|
|
231
|
+
- Global theming with CSS variables at :root level (recommended approach)
|
|
232
|
+
- Scoped theming with CanvasProvider for specific sections
|
|
233
|
+
- CSS token structure: base tokens, brand tokens, and system tokens
|
|
234
|
+
- Dark mode implementation
|
|
235
|
+
- RTL support with CSS logical properties
|
|
236
|
+
- Migration from JavaScript theme objects to CSS variables
|
|
237
|
+
- Theming modals, dialogs, and popups
|
|
238
|
+
- Best practices for semantic token usage and accessibility`,
|
|
239
|
+
mimeType: "text/markdown",
|
|
240
|
+
uri: "docs://theming",
|
|
241
|
+
contents: fs.readFileSync(path.resolve(__dirname, "lib", fileName), "utf8")
|
|
242
|
+
};
|
|
162
243
|
default:
|
|
163
244
|
throw new Error(`${fileName} is not a valid resource`);
|
|
164
245
|
}
|
|
@@ -233,6 +314,190 @@ In this release, we:
|
|
|
233
314
|
};
|
|
234
315
|
}
|
|
235
316
|
);
|
|
317
|
+
function getTokenResource(fileName) {
|
|
318
|
+
switch (fileName) {
|
|
319
|
+
case "tokens/token-migration.md":
|
|
320
|
+
return {
|
|
321
|
+
title: "Canvas Kit Token Migration v2 to v3",
|
|
322
|
+
description: `# Design Token Migration: v2 to v3
|
|
323
|
+
Comprehensive mapping of deprecated tokens to new values. Includes:
|
|
324
|
+
- Old fruit-named palette tokens (cinnamon, cantaloupe, blueberry, etc.) mapped to new color family names (red, amber, blue, etc.)
|
|
325
|
+
- System token replacements for semantic color usage (sys.color.bg.*, sys.color.fg.*, sys.color.border.*)
|
|
326
|
+
- Migration phases: Assessment, Replacement, Testing, Documentation
|
|
327
|
+
- Accessibility considerations for OKLCH color space changes`,
|
|
328
|
+
mimeType: "text/markdown",
|
|
329
|
+
uri: "docs://tokens/token-migration",
|
|
330
|
+
contents: fs.readFileSync(path.resolve(__dirname, "lib", fileName), "utf8")
|
|
331
|
+
};
|
|
332
|
+
case "tokens/color-palette.md":
|
|
333
|
+
return {
|
|
334
|
+
title: "Canvas Kit Color Palette",
|
|
335
|
+
description: `# Canvas Kit Color Palette
|
|
336
|
+
Overview of Workday's shared color palette. Includes:
|
|
337
|
+
- Global palette with 11 colors and 2 neutrals (Slate, Neutral), each with 13 shades
|
|
338
|
+
- OKLCH color space for perceptual balance
|
|
339
|
+
- Accent colors, neutral colors, and alpha colors guidance
|
|
340
|
+
- Token hierarchy: Base tokens (raw values), Brand tokens (tenant theming), System tokens (semantic roles)
|
|
341
|
+
- Color roles mapping (primary, positive, caution, critical, etc.)`,
|
|
342
|
+
mimeType: "text/markdown",
|
|
343
|
+
uri: "docs://tokens/color-palette",
|
|
344
|
+
contents: fs.readFileSync(path.resolve(__dirname, "lib", fileName), "utf8")
|
|
345
|
+
};
|
|
346
|
+
case "tokens/color-tokens.md":
|
|
347
|
+
return {
|
|
348
|
+
title: "Canvas Kit Color Tokens",
|
|
349
|
+
description: `# Canvas Kit Color Tokens
|
|
350
|
+
Design tokens naming system and usage guide. Includes:
|
|
351
|
+
- Token naming pattern: [property].[role].[modifier]
|
|
352
|
+
- Properties: bg, fg, text, border, icon, shadow, static
|
|
353
|
+
- Roles: default, primary, positive, critical, caution, info, alt, muted, contrast, ai, focus, disabled, inverse, hint, input, container, divider, transparent, translucent, overlay
|
|
354
|
+
- Modifiers: softest, softer, soft, default, strong, stronger, strongest
|
|
355
|
+
- Theming and platform adaptation guidance`,
|
|
356
|
+
mimeType: "text/markdown",
|
|
357
|
+
uri: "docs://tokens/color-tokens",
|
|
358
|
+
contents: fs.readFileSync(path.resolve(__dirname, "lib", fileName), "utf8")
|
|
359
|
+
};
|
|
360
|
+
case "tokens/color-contrast.md":
|
|
361
|
+
return {
|
|
362
|
+
title: "Canvas Kit Color Contrast",
|
|
363
|
+
description: `# Canvas Kit Color Contrast
|
|
364
|
+
Accessibility contrast guidelines for color pairings. Includes:
|
|
365
|
+
- WCAG 2.1 compliance requirements (4.5:1 for text, 3:1 for non-text, 7:1 for AAA)
|
|
366
|
+
- Step difference framework: 500+ for AA text, 400+ for AA non-text, 700+ for AAA
|
|
367
|
+
- Practical contrast tables for background/foreground combinations
|
|
368
|
+
- High contrast (7:1+) guidelines for low vision support`,
|
|
369
|
+
mimeType: "text/markdown",
|
|
370
|
+
uri: "docs://tokens/color-contrast",
|
|
371
|
+
contents: fs.readFileSync(path.resolve(__dirname, "lib", fileName), "utf8")
|
|
372
|
+
};
|
|
373
|
+
case "tokens/color-roles.md":
|
|
374
|
+
return {
|
|
375
|
+
title: "Canvas Kit Color Roles",
|
|
376
|
+
description: `# Canvas Kit Color Roles
|
|
377
|
+
Semantic color role system for consistent UI styling. Includes:
|
|
378
|
+
- Role categories: Interactive (primary, focus), Status (positive, caution, critical), Hierarchy (alt, muted, contrast), Functional (disabled, translucent, overlay)
|
|
379
|
+
- Property types: bg, fg, text, icon, border, shadow, static, brand
|
|
380
|
+
- Usage guidance with Do's and Don'ts for each role
|
|
381
|
+
- Modifier scale: softest \u2192 softer \u2192 soft \u2192 default \u2192 strong \u2192 stronger \u2192 strongest`,
|
|
382
|
+
mimeType: "text/markdown",
|
|
383
|
+
uri: "docs://tokens/color-roles",
|
|
384
|
+
contents: fs.readFileSync(path.resolve(__dirname, "lib", fileName), "utf8")
|
|
385
|
+
};
|
|
386
|
+
case "tokens/color-scale.md":
|
|
387
|
+
return {
|
|
388
|
+
title: "Canvas Kit Color Scale",
|
|
389
|
+
description: `# Canvas Kit Color Scale
|
|
390
|
+
Tonal scale system from 0 (lightest) to 1000 (darkest). Includes:
|
|
391
|
+
- Step guidelines: 0 (page bg), 50-100 (subtle bg), 200-300 (borders), 400-500 (interactive), 600-700 (accents), 800-950 (text), 975-1000 (dark mode)
|
|
392
|
+
- Perceptual uniformity across color families using OKLCH
|
|
393
|
+
- Amber exception: chroma peaks at 300-400 instead of 500
|
|
394
|
+
- Practical examples for each step range`,
|
|
395
|
+
mimeType: "text/markdown",
|
|
396
|
+
uri: "docs://tokens/color-scale",
|
|
397
|
+
contents: fs.readFileSync(path.resolve(__dirname, "lib", fileName), "utf8")
|
|
398
|
+
};
|
|
399
|
+
case "llm-token-migration-14.txt":
|
|
400
|
+
return {
|
|
401
|
+
title: "Canvas Kit v14 Token Migration Guide",
|
|
402
|
+
description: `# Canvas Kit v14 Token Migration Guide
|
|
403
|
+
Complete migration guide from @workday/canvas-kit-react/tokens to @workday/canvas-tokens-web. Includes:
|
|
404
|
+
- Installation and CSS variable imports setup
|
|
405
|
+
- Color token mapping tables (old fruit names \u2192 new base tokens \u2192 system tokens)
|
|
406
|
+
- Brand color migration from Emotion theme to CSS variables
|
|
407
|
+
- Spacing tokens (space.s \u2192 system.space.x4), shape tokens (borderRadius \u2192 system.shape)
|
|
408
|
+
- Typography tokens (type.levels \u2192 system.type), depth tokens (depth \u2192 system.depth)
|
|
409
|
+
- Complete before/after code examples for cards, forms, and buttons
|
|
410
|
+
- Best practices and common pitfalls`,
|
|
411
|
+
mimeType: "text/plain",
|
|
412
|
+
uri: "docs://llm-token-migration-14",
|
|
413
|
+
contents: fs.readFileSync(path.resolve(__dirname, "lib", fileName), "utf8")
|
|
414
|
+
};
|
|
415
|
+
default:
|
|
416
|
+
throw new Error(`${fileName} is not a valid token resource`);
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
config_default.tokenFiles.forEach((fileName) => {
|
|
420
|
+
const resource = getTokenResource(fileName);
|
|
421
|
+
if (!resource || !resource.contents) {
|
|
422
|
+
throw new Error(`Resource ${fileName} not found`);
|
|
423
|
+
}
|
|
424
|
+
server.registerResource(
|
|
425
|
+
resource.title,
|
|
426
|
+
resource.uri,
|
|
427
|
+
{
|
|
428
|
+
title: resource.title,
|
|
429
|
+
description: resource.description,
|
|
430
|
+
mimeType: resource.mimeType
|
|
431
|
+
},
|
|
432
|
+
async (uri) => ({
|
|
433
|
+
contents: [
|
|
434
|
+
{
|
|
435
|
+
uri: uri.href,
|
|
436
|
+
text: resource.contents
|
|
437
|
+
}
|
|
438
|
+
]
|
|
439
|
+
})
|
|
440
|
+
);
|
|
441
|
+
});
|
|
442
|
+
server.registerTool(
|
|
443
|
+
"get-canvas-kit-tokens",
|
|
444
|
+
{
|
|
445
|
+
title: "Get Canvas Kit Tokens",
|
|
446
|
+
description: `Retrieve Canvas Kit design token documentation for migrating from old tokens to the new @workday/canvas-tokens-web system.
|
|
447
|
+
|
|
448
|
+
Use this tool when:
|
|
449
|
+
- Migrating from @workday/canvas-kit-react/tokens to @workday/canvas-tokens-web
|
|
450
|
+
- Converting old fruit-named colors (cinnamon, blueberry, cantaloupe) to new token system
|
|
451
|
+
- Understanding the token hierarchy: base tokens, system tokens, and brand tokens
|
|
452
|
+
- Finding the correct system token replacement (sys.color.bg.*, sys.color.fg.*, sys.color.border.*)
|
|
453
|
+
- Learning the token naming pattern: [property].[role].[modifier]
|
|
454
|
+
- Understanding color roles (primary, positive, caution, critical, muted, etc.)
|
|
455
|
+
- Migrating spacing (space.s \u2192 system.space.x4), shape, typography, or depth tokens
|
|
456
|
+
- Ensuring WCAG accessibility compliance with color contrast requirements
|
|
457
|
+
|
|
458
|
+
Returns links to token documentation resources including migration guides, color palettes, color roles, contrast guidelines, and complete v14 migration examples.`,
|
|
459
|
+
annotations: {
|
|
460
|
+
readOnlyHint: true
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
async () => {
|
|
464
|
+
const output = {
|
|
465
|
+
count: config_default.tokenFiles.length,
|
|
466
|
+
files: config_default.tokenFiles.map((fileName) => {
|
|
467
|
+
const resource = getTokenResource(fileName);
|
|
468
|
+
if (!resource) {
|
|
469
|
+
throw new Error(`Resource ${fileName} not found`);
|
|
470
|
+
}
|
|
471
|
+
return {
|
|
472
|
+
name: resource.title,
|
|
473
|
+
uri: resource.uri
|
|
474
|
+
};
|
|
475
|
+
})
|
|
476
|
+
};
|
|
477
|
+
return {
|
|
478
|
+
content: [
|
|
479
|
+
{ type: "text", text: JSON.stringify(output) },
|
|
480
|
+
...config_default.tokenFiles.map((fileName) => {
|
|
481
|
+
const resource = getTokenResource(fileName);
|
|
482
|
+
if (!resource) {
|
|
483
|
+
throw new Error(`Resource ${fileName} not found`);
|
|
484
|
+
}
|
|
485
|
+
return {
|
|
486
|
+
type: "resource_link",
|
|
487
|
+
uri: resource.uri,
|
|
488
|
+
name: resource.title,
|
|
489
|
+
mimeType: resource.mimeType,
|
|
490
|
+
description: resource.description,
|
|
491
|
+
annotations: {
|
|
492
|
+
audience: ["user", "assistant"]
|
|
493
|
+
}
|
|
494
|
+
};
|
|
495
|
+
})
|
|
496
|
+
],
|
|
497
|
+
structuredContent: output
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
);
|
|
236
501
|
return server;
|
|
237
502
|
}
|
|
238
503
|
|
package/dist/cli.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../lib/cli.ts", "../lib/index.ts", "../package.json", "../lib/config.json"],
|
|
4
|
-
"sourcesContent": ["#!/usr/bin/env node\n\nimport {StdioServerTransport} from '@modelcontextprotocol/sdk/server/stdio.js';\nimport {getServer} from './index.js';\n\nexport async function main() {\n const transport = new StdioServerTransport();\n await getServer().connect(transport);\n}\n\nmain().catch((error: unknown) => {\n console.error('Fatal error in main():', error);\n process.exit(1);\n});\n", "// @ts-nocheck\nimport * as fs from 'node:fs';\nimport * as path from 'node:path';\nimport {fileURLToPath} from 'node:url';\n\nimport packageJson from '../package.json';\nimport fileNames from './config.json';\nimport {McpServer} from '@modelcontextprotocol/sdk/server/mcp.js';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\nexport function getServer() {\n const mcpVersion = packageJson.version;\n const mcpName = packageJson.name;\n\n const server = new McpServer(\n {\n name: mcpName,\n version: mcpVersion,\n },\n {\n capabilities: {\n tools: {},\n resources: {},\n },\n }\n );\n\n /**\n * Metadata for agents about the resource files.\n */\n function getUpgradeGuideResource(fileName: string) {\n switch (fileName) {\n case 'upgrade-guides/12.0-UPGRADE-GUIDE.md':\n return {\n title: 'Canvas Kit 12.0 Upgrade Guide',\n description: `# Canvas Kit 12.0 Upgrade Guide\nCanvas Kit is transitioning into a new way of styling.\nTheming and building an in sync Canvas Kit CSS has been at the top of our minds.\nWe've started using our new Canvas Tokens Web package to take advantage of CSS variables and provide semantic tokens that can translate to theming components.`,\n mimeType: 'text/markdown',\n uri: 'docs://upgrade-guides/12.0-UPGRADE-GUIDE',\n contents: fs.readFileSync(path.resolve(__dirname, 'lib', fileName), 'utf8'),\n };\n case 'upgrade-guides/13.0-UPGRADE-GUIDE.md':\n return {\n title: 'Canvas Kit 13.0 Upgrade Guide',\n description: `# Canvas Kit 13.0 Upgrade Guide\nThis guide contains an overview of the changes in Canvas Kit v13.\n\nIn this release, we:\n- refactored components to use our Canvas tokens and styling API\n- made several accessibility improvements\n- updated our brand logos\n- improved our infrastructure`,\n mimeType: 'text/markdown',\n uri: 'docs://upgrade-guides/13.0-UPGRADE-GUIDE',\n contents: fs.readFileSync(path.resolve(__dirname, 'lib', fileName), 'utf8'),\n };\n case 'llm-txt/llm-token-migration-14.txt':\n return {\n title: 'Canvas Kit Token Migration Guide',\n description: `# Canvas Kit Token Migration Guide\nGuide for migrating from @workday/canvas-kit-react/tokens to @workday/canvas-tokens-web.\nThis migration enables better theming capabilities, improved performance, and a more standardized approach to styling.`,\n mimeType: 'text/plain',\n uri: 'docs://llm-txt/llm-token-migration-14',\n contents: fs.readFileSync(path.resolve(__dirname, 'lib', fileName), 'utf8'),\n };\n case 'llm-txt/llm-style-props-migration.txt':\n return {\n title: 'Canvas Kit Style Props Migration Guide',\n description: `# Canvas Kit Style Props Migration Guide\nGuide for migrating from Emotion's style props to @workday/canvas-kit-styling.\nThis migration improves performance, consistency, and maintainability by moving away from runtime styling to static CSS compilation.`,\n mimeType: 'text/plain',\n uri: 'docs://llm-txt/llm-style-props-migration',\n contents: fs.readFileSync(path.resolve(__dirname, 'lib', fileName), 'utf8'),\n };\n case 'upgrade-guides/14.0-UPGRADE-GUIDE.md':\n return {\n title: 'Canvas Kit 14.0 Upgrade Guide',\n description: `# Canvas Kit 14.0 Upgrade Guide\nThis guide contains an overview of the changes in Canvas Kit v14.\n\nIn this release, we:\n- introduced Workday's new brand direction with a new color palette\n- made styling updates to our components\n- improved token system and theming capabilities`,\n mimeType: 'text/markdown',\n uri: 'docs://upgrade-guides/14.0-UPGRADE-GUIDE',\n contents: fs.readFileSync(path.resolve(__dirname, 'lib', fileName), 'utf8'),\n };\n default:\n throw new Error(`${fileName} is not a valid resource`);\n }\n }\n\n fileNames.upgradeGuideFiles.forEach(fileName => {\n const resource = getUpgradeGuideResource(fileName);\n if (!resource || !resource.contents) {\n throw new Error(`Resource ${fileName} not found`);\n }\n server.registerResource(\n resource.title,\n resource.uri,\n {\n title: resource.title,\n description: resource.description,\n mimeType: resource.mimeType,\n },\n async (uri: URL) => ({\n contents: [\n {\n uri: uri.href,\n text: resource.contents,\n },\n ],\n })\n );\n });\n\n server.registerTool(\n 'get-canvas-kit-upgrade-guides',\n {\n title: 'Get Canvas Kit Upgrade Guides',\n description: 'Retrieve the Canvas Kit Upgrade Guide documentation.',\n annotations: {\n readOnlyHint: true,\n },\n },\n async () => {\n const output = {\n count: fileNames.upgradeGuideFiles.length,\n files: fileNames.upgradeGuideFiles.map(fileName => {\n const resource = getUpgradeGuideResource(fileName);\n if (!resource) {\n throw new Error(`Resource ${fileName} not found`);\n }\n return {\n name: resource.title,\n uri: resource.uri,\n };\n }),\n };\n return {\n content: [\n {type: 'text', text: JSON.stringify(output)},\n ...fileNames.upgradeGuideFiles.map(fileName => {\n const resource = getUpgradeGuideResource(fileName);\n if (!resource) {\n throw new Error(`Resource ${fileName} not found`);\n }\n return {\n type: 'resource_link' as const,\n uri: resource.uri,\n name: resource.title,\n mimeType: resource.mimeType,\n description: resource.description,\n annotations: {\n audience: ['user', 'assistant'] as ('user' | 'assistant')[],\n },\n };\n }),\n ],\n structuredContent: output,\n };\n }\n );\n return server;\n}\n", "{\n \"name\": \"@workday/canvas-kit-mcp\",\n \"version\": \"14.1.27\",\n \"description\": \"MCP package for Canvas Kit\",\n \"author\": \"Workday, Inc. (https://www.workday.com)\",\n \"license\": \"Apache-2.0\",\n \"type\": \"module\",\n \"sideEffects\": false,\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/Workday/canvas-kit.git\",\n \"directory\": \"modules/mcp\"\n },\n \"bin\": {\n \"canvas-kit-mcp\": \"./dist/cli.js\"\n },\n \"exports\": {\n \".\": {\n \"types\": \"./dist/types/index.d.ts\",\n \"default\": \"./dist/index.js\"\n },\n \"./lib\": {\n \"types\": \"./dist/types/index.d.ts\",\n \"default\": \"./dist/index.js\"\n }\n },\n \"main\": \"./dist/index.js\",\n \"types\": \"./dist/types/index.d.ts\",\n \"files\": [\n \"dist\"\n ],\n \"scripts\": {\n \"build:copy\": \"tsx ./build/index.ts\",\n \"build:types\": \"tsc --project tsconfig.build.json -d true --declarationDir dist/types --emitDeclarationOnly --pretty\",\n \"build:mcp\": \"esbuild lib/index.ts --bundle --platform=node --packages=external --outfile=dist/index.js --format=esm --sourcemap && esbuild lib/cli.ts --bundle --platform=node --packages=external --outfile=dist/cli.js --format=esm --sourcemap\",\n \"build\": \"npm-run-all build:copy build:types build:mcp\",\n \"clean\": \"rimraf dist && rimraf .build-info && mkdirp dist\"\n },\n \"keywords\": [\n \"canvas\",\n \"canvas-kit\",\n \"workday\",\n \"mcp\"\n ],\n \"dependencies\": {\n \"@modelcontextprotocol/sdk\": \"^1.20.2\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^22.0.0\",\n \"esbuild\": \"^0.25.11\",\n \"mkdirp\": \"^1.0.3\",\n \"rimraf\": \"^5.0.0\",\n \"tsx\": \"^4.7.0\",\n \"typescript\": \"5.0\"\n }\n}\n", "{\n \"upgradeGuideFiles\": [\n \"upgrade-guides/12.0-UPGRADE-GUIDE.md\",\n \"upgrade-guides/13.0-UPGRADE-GUIDE.md\",\n \"upgrade-guides/14.0-UPGRADE-GUIDE.md\",\n \"upgrade-guides/15.0-UPGRADE-GUIDE.md\",\n \"llm-txt/llm-token-migration-14.txt\",\n \"llm-txt/llm-style-props-migration.txt\"\n ]\n}\n"],
|
|
5
|
-
"mappings": ";;;AAEA,SAAQ,4BAA2B;;;ACDnC,YAAY,QAAQ;AACpB,YAAY,UAAU;AACtB,SAAQ,qBAAoB;;;ACH5B;AAAA,EACE,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,aAAe;AAAA,EACf,QAAU;AAAA,EACV,SAAW;AAAA,EACX,MAAQ;AAAA,EACR,aAAe;AAAA,EACf,YAAc;AAAA,IACZ,MAAQ;AAAA,IACR,KAAO;AAAA,IACP,WAAa;AAAA,EACf;AAAA,EACA,KAAO;AAAA,IACL,kBAAkB;AAAA,EACpB;AAAA,EACA,SAAW;AAAA,IACT,KAAK;AAAA,MACH,OAAS;AAAA,MACT,SAAW;AAAA,IACb;AAAA,IACA,SAAS;AAAA,MACP,OAAS;AAAA,MACT,SAAW;AAAA,IACb;AAAA,EACF;AAAA,EACA,MAAQ;AAAA,EACR,OAAS;AAAA,EACT,OAAS;AAAA,IACP;AAAA,EACF;AAAA,EACA,SAAW;AAAA,IACT,cAAc;AAAA,IACd,eAAe;AAAA,IACf,aAAa;AAAA,IACb,OAAS;AAAA,IACT,OAAS;AAAA,EACX;AAAA,EACA,UAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,cAAgB;AAAA,IACd,6BAA6B;AAAA,EAC/B;AAAA,EACA,iBAAmB;AAAA,IACjB,eAAe;AAAA,IACf,SAAW;AAAA,IACX,QAAU;AAAA,IACV,QAAU;AAAA,IACV,KAAO;AAAA,IACP,YAAc;AAAA,EAChB;AACF;;;ACvDA;AAAA,EACE,mBAAqB;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;;;
|
|
4
|
+
"sourcesContent": ["#!/usr/bin/env node\n\nimport {StdioServerTransport} from '@modelcontextprotocol/sdk/server/stdio.js';\nimport {getServer} from './index.js';\n\nexport async function main() {\n const transport = new StdioServerTransport();\n await getServer().connect(transport);\n}\n\nmain().catch((error: unknown) => {\n console.error('Fatal error in main():', error);\n process.exit(1);\n});\n", "// @ts-nocheck\nimport * as fs from 'node:fs';\nimport * as path from 'node:path';\nimport {fileURLToPath} from 'node:url';\n\nimport packageJson from '../package.json';\nimport fileNames from './config.json';\nimport {McpServer} from '@modelcontextprotocol/sdk/server/mcp.js';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\nexport function getServer() {\n const mcpVersion = packageJson.version;\n const mcpName = packageJson.name;\n\n const server = new McpServer(\n {\n name: mcpName,\n version: mcpVersion,\n },\n {\n capabilities: {\n tools: {},\n resources: {},\n },\n }\n );\n\n /**\n * Metadata for agents about the resource files.\n */\n function getUpgradeGuideResource(fileName: string) {\n switch (fileName) {\n case 'upgrade-guides/9.0-UPGRADE-GUIDE.md':\n return {\n title: 'Canvas Kit 9.0 Upgrade Guide',\n description: `# Canvas Kit 9.0 Upgrade Guide\nThis guide contains an overview of the changes in Canvas Kit v9.\n\nIn this release, we:\n- introduced new Table component\n- removed Drawer, Layout, Column, Stack, HStack, and VStack components\n- removed focusRing and composeModelHooks utilities\n- updated Button, Toast, and Collection components\n- added depth token updates`,\n mimeType: 'text/markdown',\n uri: 'docs://upgrade-guides/9.0-UPGRADE-GUIDE',\n contents: fs.readFileSync(path.resolve(__dirname, 'lib', fileName), 'utf8'),\n };\n case 'upgrade-guides/10.0-UPGRADE-GUIDE.md':\n return {\n title: 'Canvas Kit 10.0 Upgrade Guide',\n description: `# Canvas Kit 10.0 Upgrade Guide\nThis guide contains an overview of the changes in Canvas Kit v10.\n\nIn this release, we:\n- introduced new styling package @workday/canvas-kit-styling\n- removed CSS packages and useBanner\n- deprecated Input Icon Container, Select Preview, Space Numbers, and Table\n- updated space and depth tokens\n- updated Button, Popups, and Select components`,\n mimeType: 'text/markdown',\n uri: 'docs://upgrade-guides/10.0-UPGRADE-GUIDE',\n contents: fs.readFileSync(path.resolve(__dirname, 'lib', fileName), 'utf8'),\n };\n case 'upgrade-guides/11.0-UPGRADE-GUIDE.md':\n return {\n title: 'Canvas Kit 11.0 Upgrade Guide',\n description: `# Canvas Kit 11.0 Upgrade Guide\nThis guide contains an overview of the changes in Canvas Kit v11.\n\nIn this release, we:\n- transitioned to new CSS variable-based styling approach\n- introduced Canvas Tokens Web package for semantic tokens\n- introduced new styling API for component styling\n- deprecated Form Field Main, Label Text, Text Area Preview, Text Input Preview\n- updated components to use CSS tokens`,\n mimeType: 'text/markdown',\n uri: 'docs://upgrade-guides/11.0-UPGRADE-GUIDE',\n contents: fs.readFileSync(path.resolve(__dirname, 'lib', fileName), 'utf8'),\n };\n case 'upgrade-guides/12.0-UPGRADE-GUIDE.md':\n return {\n title: 'Canvas Kit 12.0 Upgrade Guide',\n description: `# Canvas Kit 12.0 Upgrade Guide\nCanvas Kit is transitioning into a new way of styling.\nTheming and building an in sync Canvas Kit CSS has been at the top of our minds.\nWe've started using our new Canvas Tokens Web package to take advantage of CSS variables and provide semantic tokens that can translate to theming components.`,\n mimeType: 'text/markdown',\n uri: 'docs://upgrade-guides/12.0-UPGRADE-GUIDE',\n contents: fs.readFileSync(path.resolve(__dirname, 'lib', fileName), 'utf8'),\n };\n case 'upgrade-guides/13.0-UPGRADE-GUIDE.md':\n return {\n title: 'Canvas Kit 13.0 Upgrade Guide',\n description: `# Canvas Kit 13.0 Upgrade Guide\nThis guide contains an overview of the changes in Canvas Kit v13.\n\nIn this release, we:\n- refactored components to use our Canvas tokens and styling API\n- made several accessibility improvements\n- updated our brand logos\n- improved our infrastructure`,\n mimeType: 'text/markdown',\n uri: 'docs://upgrade-guides/13.0-UPGRADE-GUIDE',\n contents: fs.readFileSync(path.resolve(__dirname, 'lib', fileName), 'utf8'),\n };\n case 'llm-token-migration-14.txt':\n return {\n title: 'Canvas Kit Token Migration Guide',\n description: `# Canvas Kit Token Migration Guide\nGuide for migrating from @workday/canvas-kit-react/tokens to @workday/canvas-tokens-web.\nThis migration enables better theming capabilities, improved performance, and a more standardized approach to styling.`,\n mimeType: 'text/plain',\n uri: 'docs://llm-token-migration-14',\n contents: fs.readFileSync(path.resolve(__dirname, 'lib', fileName), 'utf8'),\n };\n case 'llm-style-props-migration.txt':\n return {\n title: 'Canvas Kit Style Props Migration Guide',\n description: `# Canvas Kit Style Props Migration Guide\nGuide for migrating from Emotion's style props to @workday/canvas-kit-styling.\nThis migration improves performance, consistency, and maintainability by moving away from runtime styling to static CSS compilation.`,\n mimeType: 'text/plain',\n uri: 'docs://llm-style-props-migration',\n contents: fs.readFileSync(path.resolve(__dirname, 'lib', fileName), 'utf8'),\n };\n case 'upgrade-guides/14.0-UPGRADE-GUIDE.md':\n return {\n title: 'Canvas Kit 14.0 Upgrade Guide',\n description: `# Canvas Kit 14.0 Upgrade Guide\nThis guide contains an overview of the changes in Canvas Kit v14.\n\nIn this release, we:\n- introduced Workday's new brand direction with a new color palette\n- made styling updates to our components\n- improved token system and theming capabilities`,\n mimeType: 'text/markdown',\n uri: 'docs://upgrade-guides/14.0-UPGRADE-GUIDE',\n contents: fs.readFileSync(path.resolve(__dirname, 'lib', fileName), 'utf8'),\n };\n case 'theming.md':\n return {\n title: 'Canvas Kit Theming Guide',\n description: `# Canvas Kit Theming Guide\nComprehensive guide for theming Canvas Kit applications in v14.\n\nCovers:\n- Global theming with CSS variables at :root level (recommended approach)\n- Scoped theming with CanvasProvider for specific sections\n- CSS token structure: base tokens, brand tokens, and system tokens\n- Dark mode implementation\n- RTL support with CSS logical properties\n- Migration from JavaScript theme objects to CSS variables\n- Theming modals, dialogs, and popups\n- Best practices for semantic token usage and accessibility`,\n mimeType: 'text/markdown',\n uri: 'docs://theming',\n contents: fs.readFileSync(path.resolve(__dirname, 'lib', fileName), 'utf8'),\n };\n default:\n throw new Error(`${fileName} is not a valid resource`);\n }\n }\n\n fileNames.upgradeGuideFiles.forEach(fileName => {\n const resource = getUpgradeGuideResource(fileName);\n if (!resource || !resource.contents) {\n throw new Error(`Resource ${fileName} not found`);\n }\n server.registerResource(\n resource.title,\n resource.uri,\n {\n title: resource.title,\n description: resource.description,\n mimeType: resource.mimeType,\n },\n async (uri: URL) => ({\n contents: [\n {\n uri: uri.href,\n text: resource.contents,\n },\n ],\n })\n );\n });\n\n server.registerTool(\n 'get-canvas-kit-upgrade-guides',\n {\n title: 'Get Canvas Kit Upgrade Guides',\n description: 'Retrieve the Canvas Kit Upgrade Guide documentation.',\n annotations: {\n readOnlyHint: true,\n },\n },\n async () => {\n const output = {\n count: fileNames.upgradeGuideFiles.length,\n files: fileNames.upgradeGuideFiles.map(fileName => {\n const resource = getUpgradeGuideResource(fileName);\n if (!resource) {\n throw new Error(`Resource ${fileName} not found`);\n }\n return {\n name: resource.title,\n uri: resource.uri,\n };\n }),\n };\n return {\n content: [\n {type: 'text', text: JSON.stringify(output)},\n ...fileNames.upgradeGuideFiles.map(fileName => {\n const resource = getUpgradeGuideResource(fileName);\n if (!resource) {\n throw new Error(`Resource ${fileName} not found`);\n }\n return {\n type: 'resource_link' as const,\n uri: resource.uri,\n name: resource.title,\n mimeType: resource.mimeType,\n description: resource.description,\n annotations: {\n audience: ['user', 'assistant'] as ('user' | 'assistant')[],\n },\n };\n }),\n ],\n structuredContent: output,\n };\n }\n );\n /**\n * Metadata for agents about the token documentation files.\n */\n function getTokenResource(fileName: string) {\n switch (fileName) {\n case 'tokens/token-migration.md':\n return {\n title: 'Canvas Kit Token Migration v2 to v3',\n description: `# Design Token Migration: v2 to v3\nComprehensive mapping of deprecated tokens to new values. Includes:\n- Old fruit-named palette tokens (cinnamon, cantaloupe, blueberry, etc.) mapped to new color family names (red, amber, blue, etc.)\n- System token replacements for semantic color usage (sys.color.bg.*, sys.color.fg.*, sys.color.border.*)\n- Migration phases: Assessment, Replacement, Testing, Documentation\n- Accessibility considerations for OKLCH color space changes`,\n mimeType: 'text/markdown',\n uri: 'docs://tokens/token-migration',\n contents: fs.readFileSync(path.resolve(__dirname, 'lib', fileName), 'utf8'),\n };\n case 'tokens/color-palette.md':\n return {\n title: 'Canvas Kit Color Palette',\n description: `# Canvas Kit Color Palette\nOverview of Workday's shared color palette. Includes:\n- Global palette with 11 colors and 2 neutrals (Slate, Neutral), each with 13 shades\n- OKLCH color space for perceptual balance\n- Accent colors, neutral colors, and alpha colors guidance\n- Token hierarchy: Base tokens (raw values), Brand tokens (tenant theming), System tokens (semantic roles)\n- Color roles mapping (primary, positive, caution, critical, etc.)`,\n mimeType: 'text/markdown',\n uri: 'docs://tokens/color-palette',\n contents: fs.readFileSync(path.resolve(__dirname, 'lib', fileName), 'utf8'),\n };\n case 'tokens/color-tokens.md':\n return {\n title: 'Canvas Kit Color Tokens',\n description: `# Canvas Kit Color Tokens\nDesign tokens naming system and usage guide. Includes:\n- Token naming pattern: [property].[role].[modifier]\n- Properties: bg, fg, text, border, icon, shadow, static\n- Roles: default, primary, positive, critical, caution, info, alt, muted, contrast, ai, focus, disabled, inverse, hint, input, container, divider, transparent, translucent, overlay\n- Modifiers: softest, softer, soft, default, strong, stronger, strongest\n- Theming and platform adaptation guidance`,\n mimeType: 'text/markdown',\n uri: 'docs://tokens/color-tokens',\n contents: fs.readFileSync(path.resolve(__dirname, 'lib', fileName), 'utf8'),\n };\n case 'tokens/color-contrast.md':\n return {\n title: 'Canvas Kit Color Contrast',\n description: `# Canvas Kit Color Contrast\nAccessibility contrast guidelines for color pairings. Includes:\n- WCAG 2.1 compliance requirements (4.5:1 for text, 3:1 for non-text, 7:1 for AAA)\n- Step difference framework: 500+ for AA text, 400+ for AA non-text, 700+ for AAA\n- Practical contrast tables for background/foreground combinations\n- High contrast (7:1+) guidelines for low vision support`,\n mimeType: 'text/markdown',\n uri: 'docs://tokens/color-contrast',\n contents: fs.readFileSync(path.resolve(__dirname, 'lib', fileName), 'utf8'),\n };\n case 'tokens/color-roles.md':\n return {\n title: 'Canvas Kit Color Roles',\n description: `# Canvas Kit Color Roles\nSemantic color role system for consistent UI styling. Includes:\n- Role categories: Interactive (primary, focus), Status (positive, caution, critical), Hierarchy (alt, muted, contrast), Functional (disabled, translucent, overlay)\n- Property types: bg, fg, text, icon, border, shadow, static, brand\n- Usage guidance with Do's and Don'ts for each role\n- Modifier scale: softest \u2192 softer \u2192 soft \u2192 default \u2192 strong \u2192 stronger \u2192 strongest`,\n mimeType: 'text/markdown',\n uri: 'docs://tokens/color-roles',\n contents: fs.readFileSync(path.resolve(__dirname, 'lib', fileName), 'utf8'),\n };\n case 'tokens/color-scale.md':\n return {\n title: 'Canvas Kit Color Scale',\n description: `# Canvas Kit Color Scale\nTonal scale system from 0 (lightest) to 1000 (darkest). Includes:\n- Step guidelines: 0 (page bg), 50-100 (subtle bg), 200-300 (borders), 400-500 (interactive), 600-700 (accents), 800-950 (text), 975-1000 (dark mode)\n- Perceptual uniformity across color families using OKLCH\n- Amber exception: chroma peaks at 300-400 instead of 500\n- Practical examples for each step range`,\n mimeType: 'text/markdown',\n uri: 'docs://tokens/color-scale',\n contents: fs.readFileSync(path.resolve(__dirname, 'lib', fileName), 'utf8'),\n };\n case 'llm-token-migration-14.txt':\n return {\n title: 'Canvas Kit v14 Token Migration Guide',\n description: `# Canvas Kit v14 Token Migration Guide\nComplete migration guide from @workday/canvas-kit-react/tokens to @workday/canvas-tokens-web. Includes:\n- Installation and CSS variable imports setup\n- Color token mapping tables (old fruit names \u2192 new base tokens \u2192 system tokens)\n- Brand color migration from Emotion theme to CSS variables\n- Spacing tokens (space.s \u2192 system.space.x4), shape tokens (borderRadius \u2192 system.shape)\n- Typography tokens (type.levels \u2192 system.type), depth tokens (depth \u2192 system.depth)\n- Complete before/after code examples for cards, forms, and buttons\n- Best practices and common pitfalls`,\n mimeType: 'text/plain',\n uri: 'docs://llm-token-migration-14',\n contents: fs.readFileSync(path.resolve(__dirname, 'lib', fileName), 'utf8'),\n };\n default:\n throw new Error(`${fileName} is not a valid token resource`);\n }\n }\n\n fileNames.tokenFiles.forEach(fileName => {\n const resource = getTokenResource(fileName);\n if (!resource || !resource.contents) {\n throw new Error(`Resource ${fileName} not found`);\n }\n server.registerResource(\n resource.title,\n resource.uri,\n {\n title: resource.title,\n description: resource.description,\n mimeType: resource.mimeType,\n },\n async (uri: URL) => ({\n contents: [\n {\n uri: uri.href,\n text: resource.contents,\n },\n ],\n })\n );\n });\n\n server.registerTool(\n 'get-canvas-kit-tokens',\n {\n title: 'Get Canvas Kit Tokens',\n description: `Retrieve Canvas Kit design token documentation for migrating from old tokens to the new @workday/canvas-tokens-web system.\n\nUse this tool when:\n- Migrating from @workday/canvas-kit-react/tokens to @workday/canvas-tokens-web\n- Converting old fruit-named colors (cinnamon, blueberry, cantaloupe) to new token system\n- Understanding the token hierarchy: base tokens, system tokens, and brand tokens\n- Finding the correct system token replacement (sys.color.bg.*, sys.color.fg.*, sys.color.border.*)\n- Learning the token naming pattern: [property].[role].[modifier]\n- Understanding color roles (primary, positive, caution, critical, muted, etc.)\n- Migrating spacing (space.s \u2192 system.space.x4), shape, typography, or depth tokens\n- Ensuring WCAG accessibility compliance with color contrast requirements\n\nReturns links to token documentation resources including migration guides, color palettes, color roles, contrast guidelines, and complete v14 migration examples.`,\n annotations: {\n readOnlyHint: true,\n },\n },\n async () => {\n const output = {\n count: fileNames.tokenFiles.length,\n files: fileNames.tokenFiles.map(fileName => {\n const resource = getTokenResource(fileName);\n if (!resource) {\n throw new Error(`Resource ${fileName} not found`);\n }\n return {\n name: resource.title,\n uri: resource.uri,\n };\n }),\n };\n return {\n content: [\n {type: 'text', text: JSON.stringify(output)},\n ...fileNames.tokenFiles.map(fileName => {\n const resource = getTokenResource(fileName);\n if (!resource) {\n throw new Error(`Resource ${fileName} not found`);\n }\n return {\n type: 'resource_link' as const,\n uri: resource.uri,\n name: resource.title,\n mimeType: resource.mimeType,\n description: resource.description,\n annotations: {\n audience: ['user', 'assistant'],\n },\n };\n }),\n ],\n structuredContent: output,\n };\n }\n );\n return server;\n}\n", "{\n \"name\": \"@workday/canvas-kit-mcp\",\n \"version\": \"14.2.0\",\n \"description\": \"MCP package for Canvas Kit\",\n \"author\": \"Workday, Inc. (https://www.workday.com)\",\n \"license\": \"Apache-2.0\",\n \"type\": \"module\",\n \"sideEffects\": false,\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/Workday/canvas-kit.git\",\n \"directory\": \"modules/mcp\"\n },\n \"bin\": {\n \"canvas-kit-mcp\": \"./dist/cli.js\"\n },\n \"exports\": {\n \".\": {\n \"types\": \"./dist/types/index.d.ts\",\n \"default\": \"./dist/index.js\"\n },\n \"./lib\": {\n \"types\": \"./dist/types/index.d.ts\",\n \"default\": \"./dist/index.js\"\n }\n },\n \"main\": \"./dist/index.js\",\n \"types\": \"./dist/types/index.d.ts\",\n \"files\": [\n \"dist\"\n ],\n \"scripts\": {\n \"build:copy\": \"tsx ./build/index.ts\",\n \"build:types\": \"tsc --project tsconfig.build.json -d true --declarationDir dist/types --emitDeclarationOnly --pretty\",\n \"build:mcp\": \"esbuild lib/index.ts --bundle --platform=node --packages=external --outfile=dist/index.js --format=esm --sourcemap && esbuild lib/cli.ts --bundle --platform=node --packages=external --outfile=dist/cli.js --format=esm --sourcemap\",\n \"build\": \"npm-run-all build:copy build:types build:mcp\",\n \"clean\": \"rimraf dist && rimraf .build-info && mkdirp dist\"\n },\n \"keywords\": [\n \"canvas\",\n \"canvas-kit\",\n \"workday\",\n \"mcp\"\n ],\n \"dependencies\": {\n \"@modelcontextprotocol/sdk\": \"^1.20.2\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^22.0.0\",\n \"esbuild\": \"^0.25.11\",\n \"mkdirp\": \"^1.0.3\",\n \"rimraf\": \"^5.0.0\",\n \"tsx\": \"^4.7.0\",\n \"typescript\": \"5.0\"\n }\n}\n", "{\n \"upgradeGuideFiles\": [\n \"upgrade-guides/9.0-UPGRADE-GUIDE.md\",\n \"upgrade-guides/10.0-UPGRADE-GUIDE.md\",\n \"upgrade-guides/11.0-UPGRADE-GUIDE.md\",\n \"upgrade-guides/12.0-UPGRADE-GUIDE.md\",\n \"upgrade-guides/13.0-UPGRADE-GUIDE.md\",\n \"upgrade-guides/14.0-UPGRADE-GUIDE.md\",\n \"upgrade-guides/15.0-UPGRADE-GUIDE.md\",\n \"llm-token-migration-14.txt\",\n \"llm-style-props-migration.txt\",\n \"theming.md\"\n ],\n \"tokenFiles\": [\n \"tokens/token-migration.md\",\n \"tokens/color-palette.md\",\n \"tokens/color-tokens.md\",\n \"tokens/color-contrast.md\",\n \"tokens/color-roles.md\",\n \"tokens/color-scale.md\",\n \"llm-token-migration-14.txt\",\n \"llm-style-props-migration.txt\"\n ]\n}\n"],
|
|
5
|
+
"mappings": ";;;AAEA,SAAQ,4BAA2B;;;ACDnC,YAAY,QAAQ;AACpB,YAAY,UAAU;AACtB,SAAQ,qBAAoB;;;ACH5B;AAAA,EACE,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,aAAe;AAAA,EACf,QAAU;AAAA,EACV,SAAW;AAAA,EACX,MAAQ;AAAA,EACR,aAAe;AAAA,EACf,YAAc;AAAA,IACZ,MAAQ;AAAA,IACR,KAAO;AAAA,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