@workday/canvas-kit-mcp 15.0.0-alpha.0064-next.0 → 15.0.0-alpha.0074-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/dist/cli.js +1 -12
- package/dist/cli.js.map +2 -2
- package/dist/index.js +1 -12
- package/dist/index.js.map +2 -2
- package/dist/lib/upgrade-guides/12.0-UPGRADE-GUIDE.md +2 -2
- package/dist/lib/upgrade-guides/13.0-UPGRADE-GUIDE.md +2 -2
- package/dist/lib/upgrade-guides/14.0-UPGRADE-GUIDE.md +69 -49
- package/dist/lib/upgrade-guides/15.0-UPGRADE-GUIDE.md +39 -2
- package/dist/types/lib/index.d.ts.map +1 -1
- package/package.json +2 -2
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.2.
|
|
14
|
+
version: "14.2.2",
|
|
15
15
|
description: "MCP package for Canvas Kit",
|
|
16
16
|
author: "Workday, Inc. (https://www.workday.com)",
|
|
17
17
|
license: "Apache-2.0",
|
|
@@ -76,7 +76,6 @@ var config_default = {
|
|
|
76
76
|
"upgrade-guides/13.0-UPGRADE-GUIDE.md",
|
|
77
77
|
"upgrade-guides/14.0-UPGRADE-GUIDE.md",
|
|
78
78
|
"upgrade-guides/15.0-UPGRADE-GUIDE.md",
|
|
79
|
-
"llm-token-migration-14.txt",
|
|
80
79
|
"llm-style-props-migration.txt",
|
|
81
80
|
"theming.md"
|
|
82
81
|
],
|
|
@@ -187,16 +186,6 @@ In this release, we:
|
|
|
187
186
|
uri: "docs://upgrade-guides/13.0-UPGRADE-GUIDE",
|
|
188
187
|
contents: fs.readFileSync(path.resolve(__dirname, "lib", fileName), "utf8")
|
|
189
188
|
};
|
|
190
|
-
case "llm-token-migration-14.txt":
|
|
191
|
-
return {
|
|
192
|
-
title: "Canvas Kit Token Migration Guide",
|
|
193
|
-
description: `# Canvas Kit Token Migration Guide
|
|
194
|
-
Guide for migrating from @workday/canvas-kit-react/tokens to @workday/canvas-tokens-web.
|
|
195
|
-
This migration enables better theming capabilities, improved performance, and a more standardized approach to styling.`,
|
|
196
|
-
mimeType: "text/plain",
|
|
197
|
-
uri: "docs://llm-token-migration-14",
|
|
198
|
-
contents: fs.readFileSync(path.resolve(__dirname, "lib", fileName), "utf8")
|
|
199
|
-
};
|
|
200
189
|
case "llm-style-props-migration.txt":
|
|
201
190
|
return {
|
|
202
191
|
title: "Canvas Kit Style Props Migration Guide",
|
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/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,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,IACA;AAAA,IACA;AAAA,IACA;AAAA,
|
|
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-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.2\",\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-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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Y;AACtC,kBAAM,WAAW,iBAAiB,QAAQ;AAC1C,gBAAI,CAAC,UAAU;AACb,oBAAM,IAAI,MAAM,YAAY,QAAQ,YAAY;AAAA,YAClD;AACA,mBAAO;AAAA,cACL,MAAM;AAAA,cACN,KAAK,SAAS;AAAA,cACd,MAAM,SAAS;AAAA,cACf,UAAU,SAAS;AAAA,cACnB,aAAa,SAAS;AAAA,cACtB,aAAa;AAAA,gBACX,UAAU,CAAC,QAAQ,WAAW;AAAA,cAChC;AAAA,YACF;AAAA,UACF,CAAC;AAAA,QACH;AAAA,QACA,mBAAmB;AAAA,MACrB;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;;;AD5ZA,eAAsB,OAAO;AAC3B,QAAM,YAAY,IAAI,qBAAqB;AAC3C,QAAM,UAAU,EAAE,QAAQ,SAAS;AACrC;AAEA,KAAK,EAAE,MAAM,CAAC,UAAmB;AAC/B,UAAQ,MAAM,0BAA0B,KAAK;AAC7C,UAAQ,KAAK,CAAC;AAChB,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { fileURLToPath } from "node:url";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@workday/canvas-kit-mcp",
|
|
9
|
-
version: "14.2.
|
|
9
|
+
version: "14.2.2",
|
|
10
10
|
description: "MCP package for Canvas Kit",
|
|
11
11
|
author: "Workday, Inc. (https://www.workday.com)",
|
|
12
12
|
license: "Apache-2.0",
|
|
@@ -71,7 +71,6 @@ var config_default = {
|
|
|
71
71
|
"upgrade-guides/13.0-UPGRADE-GUIDE.md",
|
|
72
72
|
"upgrade-guides/14.0-UPGRADE-GUIDE.md",
|
|
73
73
|
"upgrade-guides/15.0-UPGRADE-GUIDE.md",
|
|
74
|
-
"llm-token-migration-14.txt",
|
|
75
74
|
"llm-style-props-migration.txt",
|
|
76
75
|
"theming.md"
|
|
77
76
|
],
|
|
@@ -182,16 +181,6 @@ In this release, we:
|
|
|
182
181
|
uri: "docs://upgrade-guides/13.0-UPGRADE-GUIDE",
|
|
183
182
|
contents: fs.readFileSync(path.resolve(__dirname, "lib", fileName), "utf8")
|
|
184
183
|
};
|
|
185
|
-
case "llm-token-migration-14.txt":
|
|
186
|
-
return {
|
|
187
|
-
title: "Canvas Kit Token Migration Guide",
|
|
188
|
-
description: `# Canvas Kit Token Migration Guide
|
|
189
|
-
Guide for migrating from @workday/canvas-kit-react/tokens to @workday/canvas-tokens-web.
|
|
190
|
-
This migration enables better theming capabilities, improved performance, and a more standardized approach to styling.`,
|
|
191
|
-
mimeType: "text/plain",
|
|
192
|
-
uri: "docs://llm-token-migration-14",
|
|
193
|
-
contents: fs.readFileSync(path.resolve(__dirname, "lib", fileName), "utf8")
|
|
194
|
-
};
|
|
195
184
|
case "llm-style-props-migration.txt":
|
|
196
185
|
return {
|
|
197
186
|
title: "Canvas Kit Style Props Migration Guide",
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../lib/index.ts", "../package.json", "../lib/config.json"],
|
|
4
|
-
"sourcesContent": ["// @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": ";AACA,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,IACA;AAAA,IACA;AAAA,IACA;AAAA,
|
|
4
|
+
"sourcesContent": ["// @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-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.2\",\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-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": ";AACA,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,K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AA,gBACX,UAAU,CAAC,QAAQ,WAAW;AAAA,cAChC;AAAA,YACF;AAAA,UACF,CAAC;AAAA,QACH;AAAA,QACA,mBAAmB;AAAA,MACrB;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -784,7 +784,7 @@ things you'll want to keep in mind.
|
|
|
784
784
|
dependencies on your own.
|
|
785
785
|
- We recommend upgrading dependencies before running the codemod.
|
|
786
786
|
- Always review your `package.json` files to make sure your dependency versions look correct.
|
|
787
|
-
- The codemod will not handle every breaking change in
|
|
787
|
+
- The codemod will not handle every breaking change in this upgrade. You will likely need to make some manual
|
|
788
788
|
changes to be compatible. Use our Upgrade Guide as a checklist.
|
|
789
789
|
- Codemods are not bulletproof.
|
|
790
790
|
- Conduct a thorough PR and QA review of all changes to ensure no regressions were introduced.
|
|
@@ -814,7 +814,7 @@ finished.
|
|
|
814
814
|
|
|
815
815
|
```sh
|
|
816
816
|
yarn add @workday/canvas-kit-codemod --dev
|
|
817
|
-
yarn canvas-kit-codemod v${
|
|
817
|
+
yarn canvas-kit-codemod v${canvasKitMajorVersionNumber} [path]
|
|
818
818
|
yarn remove @workday/canvas-kit-codemod
|
|
819
819
|
```
|
|
820
820
|
|
|
@@ -465,7 +465,7 @@ things you'll want to keep in mind.
|
|
|
465
465
|
dependencies on your own.
|
|
466
466
|
- We recommend upgrading dependencies before running the codemod.
|
|
467
467
|
- Always review your `package.json` files to make sure your dependency versions look correct.
|
|
468
|
-
- The codemod will not handle every breaking change in
|
|
468
|
+
- The codemod will not handle every breaking change in this upgrade. You will likely need to make some manual
|
|
469
469
|
changes to be compatible. Use our Upgrade Guide as a checklist.
|
|
470
470
|
- Codemods are not bulletproof.
|
|
471
471
|
- Conduct a thorough PR and QA review of all changes to ensure no regressions were introduced.
|
|
@@ -495,7 +495,7 @@ finished.
|
|
|
495
495
|
|
|
496
496
|
```sh
|
|
497
497
|
yarn add @workday/canvas-kit-codemod --dev
|
|
498
|
-
yarn canvas-kit-codemod v${
|
|
498
|
+
yarn canvas-kit-codemod v${canvasKitMajorVersionNumber} [path]
|
|
499
499
|
yarn remove @workday/canvas-kit-codemod
|
|
500
500
|
```
|
|
501
501
|
|
|
@@ -18,49 +18,65 @@ visual reference of what's changed.**
|
|
|
18
18
|
|
|
19
19
|
## Table of Contents
|
|
20
20
|
|
|
21
|
-
- [
|
|
22
|
-
- [
|
|
23
|
-
- [
|
|
24
|
-
- [
|
|
25
|
-
- [
|
|
26
|
-
- [
|
|
27
|
-
- [New Documentation](#new-documentation)
|
|
28
|
-
- [Canvas Provider](#canvas-provider-)
|
|
29
|
-
- [Component Updates](#component-updates)
|
|
30
|
-
- [Avatar (Preview)](#avatar-preview)
|
|
31
|
-
- [Branding Changes](#branding-changes-)
|
|
32
|
-
- [Buttons](#buttons)
|
|
33
|
-
- [Card](#card-)
|
|
34
|
-
- [Count Badge](#count-badge)
|
|
35
|
-
- [Expandable](#expandable)
|
|
36
|
-
- [Hyperlink and External Hyperlink](#hyperlink-and-external-hyperlink)
|
|
37
|
-
- [Loading Dots](#loading-dots)
|
|
38
|
-
- [Modals and Dialogs](#modals-and-dialogs)
|
|
39
|
-
- [Pill (Preview)](#pill-preview)
|
|
40
|
-
- [Search Form (Labs)](#search-form-labs-)
|
|
41
|
-
- [Status Indicator (Preview)](#status-indicator-preview-)
|
|
42
|
-
- [Icons](#icons)
|
|
43
|
-
- [Deprecations](#deprecations)
|
|
44
|
-
- [Avatar (Main)](#avatar-in-main)
|
|
45
|
-
- [Combobox (Labs)](#combobox-labs)
|
|
46
|
-
- [Radio (Main)](#radio-main)
|
|
47
|
-
- [Search Form (Labs)](#searchform-labs)
|
|
48
|
-
- [Segmented Control (Main)](#segmented-control-main)
|
|
49
|
-
- [Side Panel (Main)](#side-panel-main)
|
|
21
|
+
- [Canvas Kit 14.0 Upgrade Guide](#canvas-kit-140-upgrade-guide)
|
|
22
|
+
- [Why You Should Upgrade](#why-you-should-upgrade)
|
|
23
|
+
- [Table of Contents](#table-of-contents)
|
|
24
|
+
- [LLM Assisted Migration ](#llm-assisted-migration-)
|
|
25
|
+
- [Codemod](#codemod)
|
|
26
|
+
- [Instructions](#instructions)
|
|
50
27
|
- [Tokens](#tokens)
|
|
51
|
-
- [
|
|
52
|
-
- [
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
- [
|
|
58
|
-
|
|
59
|
-
- [
|
|
60
|
-
- [
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
28
|
+
- [Caution Naming](#caution-naming)
|
|
29
|
+
- [Theming](#theming)
|
|
30
|
+
- [New Documentation](#new-documentation)
|
|
31
|
+
- [Canvas Provider 🚨](#canvas-provider-)
|
|
32
|
+
- [Breaking Changes](#breaking-changes)
|
|
33
|
+
- [useIsRTL](#useisrtl)
|
|
34
|
+
- [Component Updates](#component-updates)
|
|
35
|
+
- [Avatar (Preview)](#avatar-preview)
|
|
36
|
+
- [API Changes from Avatar (Main)](#api-changes-from-avatar-main)
|
|
37
|
+
- [Branding Changes 💅](#branding-changes-)
|
|
38
|
+
- [Buttons](#buttons)
|
|
39
|
+
- [Tertiary Button 🚨](#tertiary-button-)
|
|
40
|
+
- [Card 🚨](#card-)
|
|
41
|
+
- [Removed Box Shadow](#removed-box-shadow)
|
|
42
|
+
- [New Card Variants](#new-card-variants)
|
|
43
|
+
- [Replaced Margins with Gap](#replaced-margins-with-gap)
|
|
44
|
+
- [Count Badge](#count-badge)
|
|
45
|
+
- [Expandable](#expandable)
|
|
46
|
+
- [Hyperlink and External Hyperlink](#hyperlink-and-external-hyperlink)
|
|
47
|
+
- [Loading Dots](#loading-dots)
|
|
48
|
+
- [Pill (Preview)](#pill-preview)
|
|
49
|
+
- [Modals and Dialogs](#modals-and-dialogs)
|
|
50
|
+
- [Scoped Theming vs Global Theming](#scoped-theming-vs-global-theming)
|
|
51
|
+
- [Search Form (Labs) 🚨](#search-form-labs-)
|
|
52
|
+
- [Status Indicator (Preview) 🚨](#status-indicator-preview-)
|
|
53
|
+
- [Icons](#icons)
|
|
54
|
+
- [Deprecations](#deprecations)
|
|
55
|
+
- [Avatar in Main](#avatar-in-main)
|
|
56
|
+
- [Combobox (Labs)](#combobox-labs)
|
|
57
|
+
- [Radio (Main)](#radio-main)
|
|
58
|
+
- [SearchForm (Labs)](#searchform-labs)
|
|
59
|
+
- [Segmented Control (Main)](#segmented-control-main)
|
|
60
|
+
- [Side Panel (Main)](#side-panel-main)
|
|
61
|
+
- [Tokens](#tokens-1)
|
|
62
|
+
- [Removals](#removals)
|
|
63
|
+
- [Deprecated Buttons](#deprecated-buttons)
|
|
64
|
+
- [Input Provider](#input-provider)
|
|
65
|
+
- [Menu (Preview)](#menu-preview)
|
|
66
|
+
- [readOnlyPillStencil and removeablePillStencil](#readonlypillstencil-and-removeablepillstencil)
|
|
67
|
+
- [Text Area (Preview)](#text-area-preview)
|
|
68
|
+
- [Text Input (Preview)](#text-input-preview)
|
|
69
|
+
- [Troubleshooting](#troubleshooting)
|
|
70
|
+
- [Common Issues](#common-issues)
|
|
71
|
+
- [Glossary](#glossary)
|
|
72
|
+
- [Main](#main)
|
|
73
|
+
- [Preview](#preview)
|
|
74
|
+
- [Labs](#labs)
|
|
75
|
+
- [Codemod Reference](#codemod-reference)
|
|
76
|
+
- [What is a Codemod?](#what-is-a-codemod)
|
|
77
|
+
- [Running a Codemod](#running-a-codemod)
|
|
78
|
+
- [Instructions](#instructions-1)
|
|
79
|
+
- [Codemod Transformations for v14](#codemod-transformations-for-v14)
|
|
64
80
|
|
|
65
81
|
## LLM Assisted Migration <StorybookStatusIndicator type="ai" />
|
|
66
82
|
|
|
@@ -166,7 +182,7 @@ Follow these guides to migrate:
|
|
|
166
182
|
|
|
167
183
|
> 🤖 The `v14-tokens` codemod will automatically migrate your tokens, whether you're upgrading from
|
|
168
184
|
> old tokens or from v2 to v3. Read
|
|
169
|
-
> [the codemod instructions](https://workday.github.io/canvas-kit/?path=/docs/guides-tokens-migration-codemod--docs)
|
|
185
|
+
> [the codemod instructions](https://workday.github.io/canvas-kit/?path=/docs/guides-tokens-migration-migration-codemod--docs)
|
|
170
186
|
|
|
171
187
|
## Caution Naming
|
|
172
188
|
|
|
@@ -648,8 +664,12 @@ instead.
|
|
|
648
664
|
|
|
649
665
|
### Modals and Dialogs
|
|
650
666
|
|
|
651
|
-
Previously, the `usePopupStack` hook created a CSS class name that was passed to our Popups. We
|
|
652
|
-
|
|
667
|
+
Previously, the `usePopupStack` hook created a CSS class name that was passed to our Popups. We
|
|
668
|
+
attached those theme styles to that class name. This allowed the theme to be available in our
|
|
669
|
+
Popups. But it also created a cascade barrier that blocked the global theme from being applied to
|
|
670
|
+
our Popup components. Because we now use global CSS variables, we no longer need this class name to
|
|
671
|
+
provide the global theme to Popups. But we have to remove this generated class name to allow the
|
|
672
|
+
global theme to be applied to Popups. Instead, only the defined theme properties from the `theme` prop from the `CanvasProvider` will be applied to Popups and Modals.
|
|
653
673
|
|
|
654
674
|
If you want to have scoped theming where a part of your application needs different theming, you can
|
|
655
675
|
still do this via the `theme` prop.
|
|
@@ -856,7 +876,7 @@ import {BaseAvatar} from '@workday/canvas-kit-preview-react/avatar';
|
|
|
856
876
|
### Combobox (Labs)
|
|
857
877
|
|
|
858
878
|
The Combobox component in `@workday/canvas-kit-labs-react/combobox` has been deprecated. Please
|
|
859
|
-
migrate to the [Combobox](/get-started/for-developers/
|
|
879
|
+
migrate to the [Combobox](/get-started/for-developers/guides/combobox/) in
|
|
860
880
|
`@workday/canvas-kit-react`.
|
|
861
881
|
|
|
862
882
|
### Radio (Main)
|
|
@@ -870,7 +890,7 @@ and API consistency.
|
|
|
870
890
|
**PR:** [#3469](https://github.com/Workday/canvas-kit/pull/3469)
|
|
871
891
|
|
|
872
892
|
The `SearchForm` in `@workday/canvas-kit-labs-react/search-form` has been deprecated. Please migrate
|
|
873
|
-
to the [Combobox](/get-started/for-developers/
|
|
893
|
+
to the [Combobox](/get-started/for-developers/guides/combobox/) in `@workday/canvas-kit-react`.
|
|
874
894
|
|
|
875
895
|
### Segmented Control (Main)
|
|
876
896
|
|
|
@@ -1081,7 +1101,7 @@ things you'll want to keep in mind.
|
|
|
1081
1101
|
dependencies on your own.
|
|
1082
1102
|
- We recommend upgrading dependencies before running the codemod.
|
|
1083
1103
|
- Always review your `package.json` files to make sure your dependency versions look correct.
|
|
1084
|
-
- The codemod will not handle every breaking change in
|
|
1104
|
+
- The codemod will not handle every breaking change in this upgrade. You will likely need to make some manual
|
|
1085
1105
|
changes to be compatible. Use our Upgrade Guide as a checklist.
|
|
1086
1106
|
- Codemods are not bulletproof.
|
|
1087
1107
|
- Conduct a thorough PR and QA review of all changes to ensure no regressions were introduced.
|
|
@@ -1111,7 +1131,7 @@ finished.
|
|
|
1111
1131
|
|
|
1112
1132
|
```sh
|
|
1113
1133
|
yarn add @workday/canvas-kit-codemod --dev
|
|
1114
|
-
yarn canvas-kit-codemod v${
|
|
1134
|
+
yarn canvas-kit-codemod v${canvasKitMajorVersionNumber} [path]
|
|
1115
1135
|
yarn remove @workday/canvas-kit-codemod
|
|
1116
1136
|
```
|
|
1117
1137
|
|
|
@@ -17,15 +17,27 @@ space tokens, the new tokens aim to add more semantic meaning to allow for bette
|
|
|
17
17
|
- [Codemod](#codemod)
|
|
18
18
|
- [Instructions](#instructions)
|
|
19
19
|
- [Component Promotions](#component-promotions)
|
|
20
|
-
- [Segmented Control](#segmented-control
|
|
21
|
-
|
|
20
|
+
- [Segmented Control ⚡️](#segmented-control-️)
|
|
21
|
+
- [API Differences](#api-differences)
|
|
22
|
+
- [Structure Changes](#structure-changes)
|
|
23
|
+
- [Prop Changes](#prop-changes)
|
|
24
|
+
- [Code Migration](#code-migration)
|
|
25
|
+
- [New Features](#new-features)
|
|
26
|
+
- [Information Highlight ⚡️](#information-highlight-️)
|
|
22
27
|
- [Component Updates](#component-updates)
|
|
23
28
|
- [Buttons](#buttons)
|
|
24
29
|
- [Removals](#removals)
|
|
25
30
|
- [Segmented Control (Deprecated)](#segmented-control-deprecated)
|
|
31
|
+
- [Search Form (Labs)](#search-form-labs)
|
|
32
|
+
- [Combobox (Labs)](#combobox-labs)
|
|
26
33
|
- [Glossary](#glossary)
|
|
27
34
|
- [Main](#main)
|
|
28
35
|
- [Preview](#preview)
|
|
36
|
+
- [Codemod Reference](#codemod-reference)
|
|
37
|
+
- [What is a Codemod?](#what-is-a-codemod)
|
|
38
|
+
- [Running a Codemod](#running-a-codemod)
|
|
39
|
+
- [Instructions](#instructions-1)
|
|
40
|
+
- [Codemod Transformations for v15](#codemod-transformations-for-v15)
|
|
29
41
|
|
|
30
42
|
## Codemod
|
|
31
43
|
|
|
@@ -228,6 +240,31 @@ Please migrate to the new `SegmentedControl` component (promoted from Preview) w
|
|
|
228
240
|
component pattern with `SegmentedControl.List` and `SegmentedControl.Item`. See the
|
|
229
241
|
[API Differences](#api-differences) section above for migration guidance.
|
|
230
242
|
|
|
243
|
+
### Search Form (Labs)
|
|
244
|
+
|
|
245
|
+
The deprecated `SearchForm` component has been removed from `@workday/canvas-kit-labs-react`.
|
|
246
|
+
|
|
247
|
+
The following exports are no longer available:
|
|
248
|
+
- `SearchForm`
|
|
249
|
+
- `SearchFormProps`
|
|
250
|
+
- `SearchFormState`
|
|
251
|
+
- `SearchTheme`
|
|
252
|
+
- `SearchThemeAttributes`
|
|
253
|
+
|
|
254
|
+
Please migrate to the [Combobox](/get-started/for-developers/guides/combobox/) in `@workday/canvas-kit-react`.
|
|
255
|
+
|
|
256
|
+
### Combobox (Labs)
|
|
257
|
+
|
|
258
|
+
The deprecated `Combobox` component has been removed from `@workday/canvas-kit-labs-react`.
|
|
259
|
+
|
|
260
|
+
The following exports are no longer available:
|
|
261
|
+
- `Combobox`
|
|
262
|
+
- `ComboboxProps`
|
|
263
|
+
- `AutocompleteList`
|
|
264
|
+
- `Status`
|
|
265
|
+
|
|
266
|
+
Please migrate to the [Combobox](/get-started/for-developers/guides/combobox/) in `@workday/canvas-kit-react`.
|
|
267
|
+
|
|
231
268
|
## Glossary
|
|
232
269
|
|
|
233
270
|
For an overview of the different packages we provide, please view our docs
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,SAAS,EAAC,MAAM,yCAAyC,CAAC;AAKlE,wBAAgB,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,SAAS,EAAC,MAAM,yCAAyC,CAAC;AAKlE,wBAAgB,SAAS,cAqZxB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-mcp",
|
|
3
|
-
"version": "15.0.0-alpha.
|
|
3
|
+
"version": "15.0.0-alpha.0074-next.0",
|
|
4
4
|
"description": "MCP package for Canvas Kit",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"tsx": "^4.7.0",
|
|
54
54
|
"typescript": "5.0"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "3fbdd82f3f92e4c6aaebd87c84fcdcd6b39f87cc"
|
|
57
57
|
}
|