@workday/canvas-kit-mcp 15.0.0-alpha.0064-next.0 → 15.0.0-alpha.0075-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/theming.md +7 -4
- 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 +13 -9
- package/dist/lib/upgrade-guides/15.0-UPGRADE-GUIDE.md +65 -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;;;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,eAAU,WAAW,IAAI,cAAY;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,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S;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;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/lib/theming.md
CHANGED
|
@@ -23,9 +23,12 @@ developer experience, and greater flexibility for theming applications.
|
|
|
23
23
|
> If your application renders within an environment that already imports these CSS variables, \*\*do
|
|
24
24
|
> not re-
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
```tsx
|
|
27
|
+
<CanvasProvider theme={{canvas: {palette: {primary: {main: 'purple'}}}}}>
|
|
28
|
+
{' '}
|
|
29
|
+
<App />{' '}
|
|
30
|
+
</CanvasProvider>
|
|
31
|
+
```
|
|
29
32
|
|
|
30
33
|
This would use `chroma.js` to generate a palette based on the `main` color provided.
|
|
31
34
|
|
|
@@ -57,7 +60,7 @@ precedence. Take the following example:
|
|
|
57
60
|
.my-app {
|
|
58
61
|
--cnvs-brand-primary-base: red;
|
|
59
62
|
}
|
|
60
|
-
|
|
63
|
+
```
|
|
61
64
|
|
|
62
65
|
In the case of the `CanvasProvider` prior to v14, all our brand tokens where defined within a class
|
|
63
66
|
and scoped to the `div` that the `CanvasProvider` created. This meant that anything set on `:root`
|
|
@@ -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
|
|
|
@@ -166,7 +166,7 @@ Follow these guides to migrate:
|
|
|
166
166
|
|
|
167
167
|
> 🤖 The `v14-tokens` codemod will automatically migrate your tokens, whether you're upgrading from
|
|
168
168
|
> 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)
|
|
169
|
+
> [the codemod instructions](https://workday.github.io/canvas-kit/?path=/docs/guides-tokens-migration-migration-codemod--docs)
|
|
170
170
|
|
|
171
171
|
## Caution Naming
|
|
172
172
|
|
|
@@ -328,7 +328,7 @@ specificity.
|
|
|
328
328
|
|
|
329
329
|
### useIsRTL
|
|
330
330
|
|
|
331
|
-
**PR:** [#
|
|
331
|
+
**PR:** [#3477](https://github.com/Workday/canvas-kit/pull/3477)
|
|
332
332
|
|
|
333
333
|
The `useIsRTL` hook has been deprecated. Please use
|
|
334
334
|
[CSS logical properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties)
|
|
@@ -648,8 +648,12 @@ instead.
|
|
|
648
648
|
|
|
649
649
|
### Modals and Dialogs
|
|
650
650
|
|
|
651
|
-
Previously, the `usePopupStack` hook created a CSS class name that was passed to our Popups. We
|
|
652
|
-
|
|
651
|
+
Previously, the `usePopupStack` hook created a CSS class name that was passed to our Popups. We
|
|
652
|
+
attached those theme styles to that class name. This allowed the theme to be available in our
|
|
653
|
+
Popups. But it also created a cascade barrier that blocked the global theme from being applied to
|
|
654
|
+
our Popup components. Because we now use global CSS variables, we no longer need this class name to
|
|
655
|
+
provide the global theme to Popups. But we have to remove this generated class name to allow the
|
|
656
|
+
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
657
|
|
|
654
658
|
If you want to have scoped theming where a part of your application needs different theming, you can
|
|
655
659
|
still do this via the `theme` prop.
|
|
@@ -856,7 +860,7 @@ import {BaseAvatar} from '@workday/canvas-kit-preview-react/avatar';
|
|
|
856
860
|
### Combobox (Labs)
|
|
857
861
|
|
|
858
862
|
The Combobox component in `@workday/canvas-kit-labs-react/combobox` has been deprecated. Please
|
|
859
|
-
migrate to the [Combobox](/get-started/for-developers/
|
|
863
|
+
migrate to the [Combobox](/get-started/for-developers/guides/combobox/) in
|
|
860
864
|
`@workday/canvas-kit-react`.
|
|
861
865
|
|
|
862
866
|
### Radio (Main)
|
|
@@ -870,7 +874,7 @@ and API consistency.
|
|
|
870
874
|
**PR:** [#3469](https://github.com/Workday/canvas-kit/pull/3469)
|
|
871
875
|
|
|
872
876
|
The `SearchForm` in `@workday/canvas-kit-labs-react/search-form` has been deprecated. Please migrate
|
|
873
|
-
to the [Combobox](/get-started/for-developers/
|
|
877
|
+
to the [Combobox](/get-started/for-developers/guides/combobox/) in `@workday/canvas-kit-react`.
|
|
874
878
|
|
|
875
879
|
### Segmented Control (Main)
|
|
876
880
|
|
|
@@ -899,7 +903,7 @@ replaced the removed component or utility.
|
|
|
899
903
|
|
|
900
904
|
### Deprecated Buttons
|
|
901
905
|
|
|
902
|
-
**PR:** [#
|
|
906
|
+
**PR:** [#3439](https://github.com/Workday/canvas-kit/pull/3439)
|
|
903
907
|
|
|
904
908
|
Long overdue, but a sign of moving forward, we've removed our `DeprecatedButton`. Our design system
|
|
905
909
|
supported this for quite some time, but with the advancement in theming, our components API and our
|
|
@@ -1081,7 +1085,7 @@ things you'll want to keep in mind.
|
|
|
1081
1085
|
dependencies on your own.
|
|
1082
1086
|
- We recommend upgrading dependencies before running the codemod.
|
|
1083
1087
|
- Always review your `package.json` files to make sure your dependency versions look correct.
|
|
1084
|
-
- The codemod will not handle every breaking change in
|
|
1088
|
+
- The codemod will not handle every breaking change in this upgrade. You will likely need to make some manual
|
|
1085
1089
|
changes to be compatible. Use our Upgrade Guide as a checklist.
|
|
1086
1090
|
- Codemods are not bulletproof.
|
|
1087
1091
|
- Conduct a thorough PR and QA review of all changes to ensure no regressions were introduced.
|
|
@@ -1111,7 +1115,7 @@ finished.
|
|
|
1111
1115
|
|
|
1112
1116
|
```sh
|
|
1113
1117
|
yarn add @workday/canvas-kit-codemod --dev
|
|
1114
|
-
yarn canvas-kit-codemod v${
|
|
1118
|
+
yarn canvas-kit-codemod v${canvasKitMajorVersionNumber} [path]
|
|
1115
1119
|
yarn remove @workday/canvas-kit-codemod
|
|
1116
1120
|
```
|
|
1117
1121
|
|
|
@@ -17,15 +17,30 @@ 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
|
+
- [Pill](#pill-)
|
|
20
21
|
- [Segmented Control](#segmented-control-)
|
|
21
22
|
- [Information Highlight](#information-highlight-)
|
|
23
|
+
- [Segmented Control ⚡️](#segmented-control-️)
|
|
24
|
+
- [API Differences](#api-differences)
|
|
25
|
+
- [Structure Changes](#structure-changes)
|
|
26
|
+
- [Prop Changes](#prop-changes)
|
|
27
|
+
- [Code Migration](#code-migration)
|
|
28
|
+
- [New Features](#new-features)
|
|
29
|
+
- [Information Highlight ⚡️](#information-highlight-️)
|
|
22
30
|
- [Component Updates](#component-updates)
|
|
23
31
|
- [Buttons](#buttons)
|
|
24
32
|
- [Removals](#removals)
|
|
25
33
|
- [Segmented Control (Deprecated)](#segmented-control-deprecated)
|
|
34
|
+
- [Search Form (Labs)](#search-form-labs)
|
|
35
|
+
- [Combobox (Labs)](#combobox-labs)
|
|
26
36
|
- [Glossary](#glossary)
|
|
27
37
|
- [Main](#main)
|
|
28
38
|
- [Preview](#preview)
|
|
39
|
+
- [Codemod Reference](#codemod-reference)
|
|
40
|
+
- [What is a Codemod?](#what-is-a-codemod)
|
|
41
|
+
- [Running a Codemod](#running-a-codemod)
|
|
42
|
+
- [Instructions](#instructions-1)
|
|
43
|
+
- [Codemod Transformations for v15](#codemod-transformations-for-v15)
|
|
29
44
|
|
|
30
45
|
## Codemod
|
|
31
46
|
|
|
@@ -87,6 +102,28 @@ yarn remove @workday/canvas-kit-codemod
|
|
|
87
102
|
|
|
88
103
|
## Component Promotions
|
|
89
104
|
|
|
105
|
+
### Pill ⚡️
|
|
106
|
+
|
|
107
|
+
**PR** [#3634](https://github.com/Workday/canvas-kit/pull/3634)
|
|
108
|
+
|
|
109
|
+
We've promoted `Pill` from [Preview](#preview) to [Main](#main). There are no changes to the
|
|
110
|
+
functionality or styling of the component. The only change required is updating the import
|
|
111
|
+
statement.
|
|
112
|
+
|
|
113
|
+
**Before in v14**
|
|
114
|
+
|
|
115
|
+
```tsx
|
|
116
|
+
import {Pill} from '@workday/canvas-kit-preview-react/pill';
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**After in v15**
|
|
120
|
+
|
|
121
|
+
```tsx
|
|
122
|
+
import {Pill} from '@workday/canvas-kit-react/pill';
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
> 🤖 The codemod will handle the change of imports as shown above.
|
|
126
|
+
|
|
90
127
|
### Segmented Control ⚡️
|
|
91
128
|
|
|
92
129
|
We've promoted `SegmentedControl` from [Preview](#preview) to [Main](#main). This replaces the deprecated `SegmentedControl` that was previously in Main.
|
|
@@ -228,6 +265,31 @@ Please migrate to the new `SegmentedControl` component (promoted from Preview) w
|
|
|
228
265
|
component pattern with `SegmentedControl.List` and `SegmentedControl.Item`. See the
|
|
229
266
|
[API Differences](#api-differences) section above for migration guidance.
|
|
230
267
|
|
|
268
|
+
### Search Form (Labs)
|
|
269
|
+
|
|
270
|
+
The deprecated `SearchForm` component has been removed from `@workday/canvas-kit-labs-react`.
|
|
271
|
+
|
|
272
|
+
The following exports are no longer available:
|
|
273
|
+
- `SearchForm`
|
|
274
|
+
- `SearchFormProps`
|
|
275
|
+
- `SearchFormState`
|
|
276
|
+
- `SearchTheme`
|
|
277
|
+
- `SearchThemeAttributes`
|
|
278
|
+
|
|
279
|
+
Please migrate to the [Combobox](/get-started/for-developers/guides/combobox/) in `@workday/canvas-kit-react`.
|
|
280
|
+
|
|
281
|
+
### Combobox (Labs)
|
|
282
|
+
|
|
283
|
+
The deprecated `Combobox` component has been removed from `@workday/canvas-kit-labs-react`.
|
|
284
|
+
|
|
285
|
+
The following exports are no longer available:
|
|
286
|
+
- `Combobox`
|
|
287
|
+
- `ComboboxProps`
|
|
288
|
+
- `AutocompleteList`
|
|
289
|
+
- `Status`
|
|
290
|
+
|
|
291
|
+
Please migrate to the [Combobox](/get-started/for-developers/guides/combobox/) in `@workday/canvas-kit-react`.
|
|
292
|
+
|
|
231
293
|
## Glossary
|
|
232
294
|
|
|
233
295
|
For an overview of the different packages we provide, please view our docs
|
|
@@ -264,7 +326,7 @@ things you'll want to keep in mind.
|
|
|
264
326
|
dependencies on your own.
|
|
265
327
|
- We recommend upgrading dependencies before running the codemod.
|
|
266
328
|
- Always review your `package.json` files to make sure your dependency versions look correct.
|
|
267
|
-
- The codemod will not handle every breaking change in
|
|
329
|
+
- The codemod will not handle every breaking change in this upgrade. You will likely need to make some manual
|
|
268
330
|
changes to be compatible. Use our Upgrade Guide as a checklist.
|
|
269
331
|
- Codemods are not bulletproof.
|
|
270
332
|
- Conduct a thorough PR and QA review of all changes to ensure no regressions were introduced.
|
|
@@ -294,7 +356,7 @@ finished.
|
|
|
294
356
|
|
|
295
357
|
```sh
|
|
296
358
|
yarn add @workday/canvas-kit-codemod --dev
|
|
297
|
-
yarn canvas-kit-codemod v${
|
|
359
|
+
yarn canvas-kit-codemod v${canvasKitMajorVersionNumber} [path]
|
|
298
360
|
yarn remove @workday/canvas-kit-codemod
|
|
299
361
|
```
|
|
300
362
|
|
|
@@ -308,6 +370,7 @@ yarn remove @workday/canvas-kit-codemod
|
|
|
308
370
|
The following automated transformations are available for upgrading to v15:
|
|
309
371
|
|
|
310
372
|
- **Promote Information Highlight**: promoteInformationHighlight
|
|
373
|
+
- **Promote Pill**: promotePill
|
|
311
374
|
- **Promote Segmented Control**: promoteSegmentedControl
|
|
312
375
|
|
|
313
376
|
Run the codemod with: `npx @workday/canvas-kit-codemod v15 [path]`
|
|
@@ -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.0075-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": "85c5dfa329d29263f96a49be74ef55f551990c7b"
|
|
57
57
|
}
|