@atlaskit/ads-mcp 0.10.1 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/index.js +6 -1
  3. package/dist/cjs/tools/get-tokens/token-structured-content.codegen.js +101 -1
  4. package/dist/cjs/tools/migration-guides/index.js +78 -0
  5. package/dist/cjs/tools/migration-guides/migrations/onboarding-to-spotlight.js +55 -0
  6. package/dist/cjs/tools/migration-guides/registry.js +36 -0
  7. package/dist/cjs/tools/migration-guides/types.js +1 -0
  8. package/dist/es2019/index.js +6 -0
  9. package/dist/es2019/tools/get-tokens/token-structured-content.codegen.js +101 -1
  10. package/dist/es2019/tools/migration-guides/index.js +58 -0
  11. package/dist/es2019/tools/migration-guides/migrations/onboarding-to-spotlight.js +416 -0
  12. package/dist/es2019/tools/migration-guides/registry.js +30 -0
  13. package/dist/es2019/tools/migration-guides/types.js +0 -0
  14. package/dist/esm/index.js +6 -1
  15. package/dist/esm/tools/get-tokens/token-structured-content.codegen.js +101 -1
  16. package/dist/esm/tools/migration-guides/index.js +72 -0
  17. package/dist/esm/tools/migration-guides/migrations/onboarding-to-spotlight.js +49 -0
  18. package/dist/esm/tools/migration-guides/registry.js +29 -0
  19. package/dist/esm/tools/migration-guides/types.js +0 -0
  20. package/dist/types/tools/get-tokens/token-structured-content.codegen.d.ts +1 -1
  21. package/dist/types/tools/migration-guides/index.d.ts +16 -0
  22. package/dist/types/tools/migration-guides/migrations/onboarding-to-spotlight.d.ts +4 -0
  23. package/dist/types/tools/migration-guides/registry.d.ts +19 -0
  24. package/dist/types/tools/migration-guides/types.d.ts +23 -0
  25. package/dist/types-ts4.5/tools/get-tokens/token-structured-content.codegen.d.ts +1 -1
  26. package/dist/types-ts4.5/tools/migration-guides/index.d.ts +19 -0
  27. package/dist/types-ts4.5/tools/migration-guides/migrations/onboarding-to-spotlight.d.ts +4 -0
  28. package/dist/types-ts4.5/tools/migration-guides/registry.d.ts +19 -0
  29. package/dist/types-ts4.5/tools/migration-guides/types.d.ts +23 -0
  30. package/package.json +1 -1
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Structured content for tokens generated from token-metadata.
5
5
  *
6
- * @codegen <<SignedSource::41dd1fd7431557df57b792c2eb5e5f70>>
6
+ * @codegen <<SignedSource::71826c7e9b24620099bd0316f7a0a305>>
7
7
  * @codegenCommand yarn build structured-docs
8
8
  */
9
9
 
@@ -137,6 +137,11 @@ export var tokenStructuredContent = [{
137
137
  name: 'color.text.danger',
138
138
  description: 'Use for critical text, such as input field error messaging.',
139
139
  exampleValue: '#AE2E24'
140
+ }, {
141
+ content: '# color.text.danger.bolder\n\nUse for text on top of danger semantic labels to ensure accessibility and desired visual appearance.\n\nExample Value: `#5D1F1A`\n',
142
+ name: 'color.text.danger.bolder',
143
+ description: 'Use for text on top of danger semantic labels to ensure accessibility and desired visual appearance.',
144
+ exampleValue: '#5D1F1A'
140
145
  }, {
141
146
  content: '# color.text.warning\n\nUse for text to emphasize caution, such as in moved lozenges.\n\nExample Value: `#9E4C00`\n',
142
147
  name: 'color.text.warning',
@@ -147,21 +152,41 @@ export var tokenStructuredContent = [{
147
152
  name: 'color.text.warning.inverse',
148
153
  description: 'Use for text when on bold warning backgrounds.',
149
154
  exampleValue: '#292A2E'
155
+ }, {
156
+ content: '# color.text.warning.bolder\n\nUse for text on top of warning semantic labels to ensure accessibility and desired visual appearance.\n\nExample Value: `#693200`\n',
157
+ name: 'color.text.warning.bolder',
158
+ description: 'Use for text on top of warning semantic labels to ensure accessibility and desired visual appearance.',
159
+ exampleValue: '#693200'
150
160
  }, {
151
161
  content: '# color.text.success\n\nUse for text to communicate a favorable outcome, such as input field success messaging.\n\nExample Value: `#4C6B1F`\n',
152
162
  name: 'color.text.success',
153
163
  description: 'Use for text to communicate a favorable outcome, such as input field success messaging.',
154
164
  exampleValue: '#4C6B1F'
165
+ }, {
166
+ content: '# color.text.success.bolder\n\nUse for text on top of success semantic labels to ensure accessibility and desired visual appearance.\n\nExample Value: `#37471F`\n',
167
+ name: 'color.text.success.bolder',
168
+ description: 'Use for text on top of success semantic labels to ensure accessibility and desired visual appearance.',
169
+ exampleValue: '#37471F'
155
170
  }, {
156
171
  content: '# color.text.discovery\n\nUse for text to emphasize change or something new, such as in new lozenges.\n\nExample Value: `#803FA5`\n',
157
172
  name: 'color.text.discovery',
158
173
  description: 'Use for text to emphasize change or something new, such as in new lozenges.',
159
174
  exampleValue: '#803FA5'
175
+ }, {
176
+ content: '# color.text.discovery.bolder\n\nUse for text on top of discovery semantic labels to ensure accessibility and desired visual appearance.\n\nExample Value: `#48245D`\n',
177
+ name: 'color.text.discovery.bolder',
178
+ description: 'Use for text on top of discovery semantic labels to ensure accessibility and desired visual appearance.',
179
+ exampleValue: '#48245D'
160
180
  }, {
161
181
  content: '# color.text.information\n\nUse for informative text or to communicate something is in progress, such as in-progress lozenges.\n\nExample Value: `#1558BC`\n',
162
182
  name: 'color.text.information',
163
183
  description: 'Use for informative text or to communicate something is in progress, such as in-progress lozenges.',
164
184
  exampleValue: '#1558BC'
185
+ }, {
186
+ content: '# color.text.information.bolder\n\nUse for text on top of information semantic labels to ensure accessibility and desired visual appearance.\n\nExample Value: `#123263`\n',
187
+ name: 'color.text.information.bolder',
188
+ description: 'Use for text on top of information semantic labels to ensure accessibility and desired visual appearance.',
189
+ exampleValue: '#123263'
165
190
  }, {
166
191
  content: '# color.text.subtlest\n\nUse for tertiary text, such as meta-data, breadcrumbs, input field placeholder and helper text.\n\nExample Value: `#6B6E76`\n',
167
192
  name: 'color.text.subtlest',
@@ -1192,6 +1217,21 @@ export var tokenStructuredContent = [{
1192
1217
  name: 'color.background.danger.pressed',
1193
1218
  description: 'Pressed state for color.background.danger',
1194
1219
  exampleValue: '#FFB8B2'
1220
+ }, {
1221
+ content: '# color.background.danger.subtler\n\nUse for backgrounds of danger lozenges and badges to ensure accessibility and desired visual appearance.\n\nExample Value: `#FFD5D2`\n',
1222
+ name: 'color.background.danger.subtler',
1223
+ description: 'Use for backgrounds of danger lozenges and badges to ensure accessibility and desired visual appearance.',
1224
+ exampleValue: '#FFD5D2'
1225
+ }, {
1226
+ content: '# color.background.danger.subtler.hovered\n\nHovered state of color.background.danger.subtler\n\nExample Value: `#FFB8B2`\n',
1227
+ name: 'color.background.danger.subtler.hovered',
1228
+ description: 'Hovered state of color.background.danger.subtler',
1229
+ exampleValue: '#FFB8B2'
1230
+ }, {
1231
+ content: '# color.background.danger.subtler.pressed\n\nPressed state of color.background.danger.subtler\n\nExample Value: `#FD9891`\n',
1232
+ name: 'color.background.danger.subtler.pressed',
1233
+ description: 'Pressed state of color.background.danger.subtler',
1234
+ exampleValue: '#FD9891'
1195
1235
  }, {
1196
1236
  content: '# color.background.danger.bold\n\nA vibrant background option for communicating critical information, such as in danger buttons and error banners.\n\nExample Value: `#C9372C`\n',
1197
1237
  name: 'color.background.danger.bold',
@@ -1222,6 +1262,21 @@ export var tokenStructuredContent = [{
1222
1262
  name: 'color.background.warning.pressed',
1223
1263
  description: 'Pressed state for color.background.warning',
1224
1264
  exampleValue: '#FBD779'
1265
+ }, {
1266
+ content: '# color.background.warning.subtler\n\nUse for backgrounds of warning lozenges and badges to ensure accessibility and desired visual appearance.\n\nExample Value: `#FCE4A6`\n',
1267
+ name: 'color.background.warning.subtler',
1268
+ description: 'Use for backgrounds of warning lozenges and badges to ensure accessibility and desired visual appearance.',
1269
+ exampleValue: '#FCE4A6'
1270
+ }, {
1271
+ content: '# color.background.warning.subtler.hovered\n\nHovered state of color.background.warning.subtler\n\nExample Value: `#FBD779`\n',
1272
+ name: 'color.background.warning.subtler.hovered',
1273
+ description: 'Hovered state of color.background.warning.subtler',
1274
+ exampleValue: '#FBD779'
1275
+ }, {
1276
+ content: '# color.background.warning.subtler.pressed\n\nPressed state of color.background.warning.subtler\n\nExample Value: `#FBC828`\n',
1277
+ name: 'color.background.warning.subtler.pressed',
1278
+ description: 'Pressed state of color.background.warning.subtler',
1279
+ exampleValue: '#FBC828'
1225
1280
  }, {
1226
1281
  content: '# color.background.warning.bold\n\nA vibrant background option for communicating caution, such as in warning buttons and warning banners.\n\nExample Value: `#FBC828`\n',
1227
1282
  name: 'color.background.warning.bold',
@@ -1252,6 +1307,21 @@ export var tokenStructuredContent = [{
1252
1307
  name: 'color.background.success.pressed',
1253
1308
  description: 'Pressed state for color.background.success',
1254
1309
  exampleValue: '#BDE97C'
1310
+ }, {
1311
+ content: '# color.background.success.subtler\n\nUse for backgrounds of success lozenges and badges to ensure accessibility and desired visual appearance.\n\nExample Value: `#D3F1A7`\n',
1312
+ name: 'color.background.success.subtler',
1313
+ description: 'Use for backgrounds of success lozenges and badges to ensure accessibility and desired visual appearance.',
1314
+ exampleValue: '#D3F1A7'
1315
+ }, {
1316
+ content: '# color.background.success.subtler.hovered\n\nHovered state of color.background.success.subtler\n\nExample Value: `#BDE97C`\n',
1317
+ name: 'color.background.success.subtler.hovered',
1318
+ description: 'Hovered state of color.background.success.subtler',
1319
+ exampleValue: '#BDE97C'
1320
+ }, {
1321
+ content: '# color.background.success.subtler.pressed\n\nPressed state of color.background.success.subtler\n\nExample Value: `#B3DF72`\n',
1322
+ name: 'color.background.success.subtler.pressed',
1323
+ description: 'Pressed state of color.background.success.subtler',
1324
+ exampleValue: '#B3DF72'
1255
1325
  }, {
1256
1326
  content: '# color.background.success.bold\n\nA vibrant background option for communicating a favorable outcome, such as in checked toggles.\n\nExample Value: `#5B7F24`\n',
1257
1327
  name: 'color.background.success.bold',
@@ -1282,6 +1352,21 @@ export var tokenStructuredContent = [{
1282
1352
  name: 'color.background.discovery.pressed',
1283
1353
  description: 'Pressed state for color.background.discovery',
1284
1354
  exampleValue: '#E3BDFA'
1355
+ }, {
1356
+ content: '# color.background.discovery.subtler\n\nUse for backgrounds of discovery lozenges and badges to ensure accessibility and desired visual appearance.\n\nExample Value: `#EED7FC`\n',
1357
+ name: 'color.background.discovery.subtler',
1358
+ description: 'Use for backgrounds of discovery lozenges and badges to ensure accessibility and desired visual appearance.',
1359
+ exampleValue: '#EED7FC'
1360
+ }, {
1361
+ content: '# color.background.discovery.subtler.hovered\n\nHovered state of color.background.discovery.subtler\n\nExample Value: `#E3BDFA`\n',
1362
+ name: 'color.background.discovery.subtler.hovered',
1363
+ description: 'Hovered state of color.background.discovery.subtler',
1364
+ exampleValue: '#E3BDFA'
1365
+ }, {
1366
+ content: '# color.background.discovery.subtler.pressed\n\nPressed state of color.background.discovery.subtler\n\nExample Value: `#D8A0F7`\n',
1367
+ name: 'color.background.discovery.subtler.pressed',
1368
+ description: 'Pressed state of color.background.discovery.subtler',
1369
+ exampleValue: '#D8A0F7'
1285
1370
  }, {
1286
1371
  content: '# color.background.discovery.bold\n\nA vibrant background option communicating change or something new, such as in onboarding spotlights.\n\nExample Value: `#964AC0`\n',
1287
1372
  name: 'color.background.discovery.bold',
@@ -1312,6 +1397,21 @@ export var tokenStructuredContent = [{
1312
1397
  name: 'color.background.information.pressed',
1313
1398
  description: 'Pressed state of color.background.information',
1314
1399
  exampleValue: '#ADCBFB'
1400
+ }, {
1401
+ content: '# color.background.information.subtler\n\nUse for backgrounds of information lozenges and badges to ensure accessibility and desired visual appearance.\n\nExample Value: `#CFE1FD`\n',
1402
+ name: 'color.background.information.subtler',
1403
+ description: 'Use for backgrounds of information lozenges and badges to ensure accessibility and desired visual appearance.',
1404
+ exampleValue: '#CFE1FD'
1405
+ }, {
1406
+ content: '# color.background.information.subtler.hovered\n\nHovered state of color.background.information.subtler\n\nExample Value: `#ADCBFB`\n',
1407
+ name: 'color.background.information.subtler.hovered',
1408
+ description: 'Hovered state of color.background.information.subtler',
1409
+ exampleValue: '#ADCBFB'
1410
+ }, {
1411
+ content: '# color.background.information.subtler.pressed\n\nPressed state of color.background.information.subtler\n\nExample Value: `#8FB8F6`\n',
1412
+ name: 'color.background.information.subtler.pressed',
1413
+ description: 'Pressed state of color.background.information.subtler',
1414
+ exampleValue: '#8FB8F6'
1315
1415
  }, {
1316
1416
  content: '# color.background.information.bold\n\nA vibrant background option for communicating information or something in-progress.\n\nExample Value: `#1868DB`\n',
1317
1417
  name: 'color.background.information.bold',
@@ -0,0 +1,72 @@
1
+ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
3
+ import { z } from 'zod';
4
+ import { zodToJsonSchema } from '../../helpers';
5
+ import { getAvailableMigrationIds, getAvailableMigrationsDescription, migrationRegistry } from './registry';
6
+
7
+ // Build the enum dynamically from the registry
8
+ var migrationIds = getAvailableMigrationIds();
9
+ export var migrationGuidesInputSchema = z.object({
10
+ migration: z.enum(migrationIds).describe("The specific migration to perform.\n")
11
+ });
12
+ export var listMigrationGuidesTool = {
13
+ name: 'ads_migration_guides',
14
+ description: "Provides migration guides for deprecated Atlassian Design System components. Returns before/after examples, best practices, and step-by-step migration instructions.\n\nAvailable migrations:\n".concat(getAvailableMigrationsDescription()),
15
+ annotations: {
16
+ title: 'ADS Migration Guides',
17
+ readOnlyHint: true,
18
+ destructiveHint: false,
19
+ idempotentHint: true,
20
+ openWorldHint: false
21
+ },
22
+ inputSchema: zodToJsonSchema(migrationGuidesInputSchema)
23
+ };
24
+ export var migrationGuidesTool = /*#__PURE__*/function () {
25
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(params) {
26
+ var migration, guide;
27
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
28
+ while (1) switch (_context.prev = _context.next) {
29
+ case 0:
30
+ migration = params.migration;
31
+ guide = migrationRegistry[migration];
32
+ if (guide) {
33
+ _context.next = 4;
34
+ break;
35
+ }
36
+ return _context.abrupt("return", {
37
+ content: [{
38
+ type: 'text',
39
+ text: JSON.stringify({
40
+ error: "Unknown migration: ".concat(migration),
41
+ availableMigrations: getAvailableMigrationIds(),
42
+ suggestion: 'Please use one of the available migration IDs listed above.'
43
+ }, null, 2)
44
+ }]
45
+ });
46
+ case 4:
47
+ return _context.abrupt("return", {
48
+ content: [{
49
+ type: 'text',
50
+ text: JSON.stringify({
51
+ migration: guide.id,
52
+ title: guide.title,
53
+ description: guide.description,
54
+ fromPackage: guide.fromPackage,
55
+ toPackage: guide.toPackage,
56
+ examples: guide.examples,
57
+ bestPractices: guide.bestPractices,
58
+ additionalResources: guide.additionalResources,
59
+ nextSteps: ['Review the before/after examples to understand the migration pattern', 'Apply the migration pattern', 'Follow the best practices listed above', 'Test the migrated code thoroughly']
60
+ }, null, 2)
61
+ }]
62
+ });
63
+ case 5:
64
+ case "end":
65
+ return _context.stop();
66
+ }
67
+ }, _callee);
68
+ }));
69
+ return function migrationGuidesTool(_x) {
70
+ return _ref.apply(this, arguments);
71
+ };
72
+ }();
@@ -0,0 +1,49 @@
1
+ var additionalResources = "Visit https://hello.atlassian.net/wiki/spaces/DST/pages/6069774593 or https://atlassian.design/components/spotlight for more context";
2
+ export var onboardingSingleStep = {
3
+ id: 'onboarding-single-step',
4
+ title: 'Single Step Spotlight Migration',
5
+ description: 'Migrate a single step spotlight from @atlaskit/onboarding to @atlaskit/spotlight',
6
+ fromPackage: '@atlaskit/onboarding',
7
+ toPackage: '@atlaskit/spotlight',
8
+ examples: [{
9
+ title: 'Migrate single step spotlight',
10
+ description: 'Replace SpotlightManager, SpotlightTarget, SpotlightTransition, and Spotlight with the new compositional @atlaskit/spotlight components',
11
+ before: "import React, { useState } from 'react';\nimport Button from '@atlaskit/button/new';\nimport {\n Spotlight,\n SpotlightManager,\n SpotlightTarget,\n SpotlightTransition,\n} from '@atlaskit/onboarding';\n\nconst OnboardingSpotlight = () => {\n const [isSpotlightActive, setIsSpotlightActive] = useState(false);\n const start = () => setIsSpotlightActive(true);\n const end = () => setIsSpotlightActive(false);\n\n return (\n <SpotlightManager>\n <SpotlightTarget name=\"my-target\">\n <Button>Target Element</Button>\n </SpotlightTarget>\n <div>\n <Button appearance=\"primary\" onClick={start}>\n Show spotlight\n </Button>\n </div>\n <SpotlightTransition>\n {isSpotlightActive && (\n <Spotlight\n actions={[\n {\n onClick: end,\n text: 'Got it',\n },\n ]}\n heading=\"Feature Heading\"\n target=\"my-target\"\n key=\"my-target\"\n >\n This is the spotlight body content describing the feature.\n </Spotlight>\n )}\n </SpotlightTransition>\n </SpotlightManager>\n );\n};",
12
+ after: "import React, { useState } from 'react';\nimport Button from '@atlaskit/button/new';\nimport { Text } from '@atlaskit/primitives/compiled';\nimport {\n PopoverContent,\n PopoverProvider,\n PopoverTarget,\n SpotlightActions,\n SpotlightBody,\n SpotlightCard,\n SpotlightControls,\n SpotlightDismissControl,\n SpotlightFooter,\n SpotlightHeader,\n SpotlightHeadline,\n SpotlightPrimaryAction,\n} from '@atlaskit/spotlight';\n\nconst Spotlight = () => {\n const [isVisible, setIsVisible] = useState(false);\n const dismiss = () => setIsVisible(false);\n const done = () => setIsVisible(false);\n\n return (\n <PopoverProvider>\n <PopoverTarget>\n <Button onClick={() => setIsVisible(true)}>Target Element</Button>\n </PopoverTarget>\n <PopoverContent dismiss={dismiss} placement=\"bottom-start\" isVisible={isVisible}>\n <SpotlightCard>\n <SpotlightHeader>\n <SpotlightHeadline>Feature Heading</SpotlightHeadline>\n <SpotlightControls>\n <SpotlightDismissControl />\n </SpotlightControls>\n </SpotlightHeader>\n <SpotlightBody>\n <Text>This is the spotlight body content describing the feature.</Text>\n </SpotlightBody>\n <SpotlightFooter>\n <SpotlightActions>\n <SpotlightPrimaryAction onClick={done}>Got it</SpotlightPrimaryAction>\n </SpotlightActions>\n </SpotlightFooter>\n </SpotlightCard>\n </PopoverContent>\n </PopoverProvider>\n );\n};",
13
+ explanation: "Key changes when migrating a single step spotlight:\n1. Replace SpotlightManager with PopoverProvider - the new context provider\n2. Replace SpotlightTarget with PopoverTarget - wraps the element to highlight\n3. Replace SpotlightTransition and Spotlight with PopoverContent containing SpotlightCard - controls visibility and positioning\n4. The 'heading' prop becomes SpotlightHeadline inside SpotlightHeader\n5. The 'actions' array becomes SpotlightActions with SpotlightPrimaryAction (and optionally SpotlightSecondaryAction)\n6. The children content moves into SpotlightBody wrapped with Text component\n7. Add SpotlightDismissControl inside SpotlightControls for the close button\n8. The 'target' prop is no longer needed - PopoverTarget automatically handles this\n9. The 'dialogPlacement' prop becomes 'placement' on PopoverContent (e.g., 'bottom left' \u2192 'bottom-start')"
14
+ }],
15
+ bestPractices: ['Use PopoverProvider as the root wrapper for spotlight functionality', 'PopoverTarget should wrap exactly one child element that will be highlighted', 'Always include SpotlightDismissControl for accessibility - allows users to dismiss via close button', 'Use SpotlightPrimaryAction for the main call-to-action button', 'Wrap body text content in the Text component from @atlaskit/primitives/compiled', 'Map old dialogPlacement values: "bottom left" → "bottom-start", "bottom center" → "bottom", "bottom right" → "bottom-end"'],
16
+ additionalResources: additionalResources
17
+ };
18
+ export var onboardingMultiStep = {
19
+ id: 'onboarding-multi-step',
20
+ title: 'Multi Step Spotlight Tour Migration',
21
+ description: 'Migrate a multi-step spotlight tour from @atlaskit/onboarding to @atlaskit/spotlight',
22
+ fromPackage: '@atlaskit/onboarding',
23
+ toPackage: '@atlaskit/spotlight',
24
+ examples: [{
25
+ title: 'Migrate multi step spotlight tour',
26
+ description: 'Replace the single SpotlightManager pattern with multiple PopoverProvider instances, one for each target in the tour',
27
+ before: "import React, { useState } from 'react';\nimport Button, { IconButton } from '@atlaskit/button/new';\nimport CommentAddIcon from '@atlaskit/icon/core/comment-add';\nimport CopyIcon from '@atlaskit/icon/core/copy';\nimport {\n Spotlight,\n SpotlightManager,\n SpotlightTarget,\n SpotlightTransition,\n} from '@atlaskit/onboarding';\n\nconst OnboardingTour = () => {\n const [activeSpotlight, setActiveSpotlight] = useState<null | number>(null);\n const start = () => setActiveSpotlight(0);\n const next = () => setActiveSpotlight((activeSpotlight || 0) + 1);\n const back = () => setActiveSpotlight((activeSpotlight || 1) - 1);\n const end = () => setActiveSpotlight(null);\n\n const renderActiveSpotlight = () => {\n const spotlights = [\n <Spotlight\n actions={[\n { onClick: () => next(), text: 'Next' },\n { onClick: () => end(), text: 'Dismiss', appearance: 'subtle' },\n ]}\n heading=\"Add a comment\"\n target=\"comment\"\n key=\"comment\"\n >\n Quickly add a comment to the work item.\n </Spotlight>,\n <Spotlight\n actions={[\n { onClick: () => end(), text: 'Done' },\n { onClick: () => back(), text: 'Back', appearance: 'subtle' },\n ]}\n heading=\"Copy code\"\n target=\"copy\"\n key=\"copy\"\n >\n Click to copy the example code to your clipboard.\n </Spotlight>,\n ];\n\n if (activeSpotlight === null) {\n return null;\n }\n return spotlights[activeSpotlight];\n };\n\n return (\n <SpotlightManager>\n <SpotlightTarget name=\"comment\">\n <IconButton icon={CommentAddIcon} label=\"comment\" />\n </SpotlightTarget>\n <SpotlightTarget name=\"copy\">\n <IconButton icon={CopyIcon} label=\"Copy\" />\n </SpotlightTarget>\n <Button appearance=\"primary\" onClick={start}>\n Start tour\n </Button>\n <SpotlightTransition>{renderActiveSpotlight()}</SpotlightTransition>\n </SpotlightManager>\n );\n};",
28
+ after: "import React, { useState } from 'react';\nimport Button, { IconButton } from '@atlaskit/button/new';\nimport CommentAddIcon from '@atlaskit/icon/core/comment-add';\nimport CopyIcon from '@atlaskit/icon/core/copy';\nimport { Text } from '@atlaskit/primitives/compiled';\nimport {\n PopoverContent,\n PopoverProvider,\n PopoverTarget,\n SpotlightActions,\n SpotlightBody,\n SpotlightCard,\n SpotlightControls,\n SpotlightDismissControl,\n SpotlightFooter,\n SpotlightHeader,\n SpotlightHeadline,\n SpotlightPrimaryAction,\n SpotlightSecondaryAction,\n SpotlightStepCount,\n} from '@atlaskit/spotlight';\n\nconst SpotlightTour = () => {\n const [currentStep, setCurrentStep] = useState<number>(0);\n\n const dismiss = () => setCurrentStep(0);\n const back = () => setCurrentStep(Math.max(currentStep - 1, 1));\n const next = () => setCurrentStep(Math.min(currentStep + 1, 2));\n const done = () => setCurrentStep(0);\n\n return (\n <>\n <PopoverProvider>\n <PopoverTarget>\n <IconButton icon={CommentAddIcon} label=\"comment\" />\n </PopoverTarget>\n <PopoverContent dismiss={dismiss} placement=\"bottom-start\" isVisible={currentStep === 1}>\n <SpotlightCard>\n <SpotlightHeader>\n <SpotlightHeadline>Add a comment</SpotlightHeadline>\n <SpotlightControls>\n <SpotlightDismissControl onClick={dismiss} />\n </SpotlightControls>\n </SpotlightHeader>\n <SpotlightBody>\n <Text>Quickly add a comment to the work item.</Text>\n </SpotlightBody>\n <SpotlightFooter>\n <SpotlightStepCount>1 of 2</SpotlightStepCount>\n <SpotlightActions>\n <SpotlightPrimaryAction onClick={next}>Next</SpotlightPrimaryAction>\n </SpotlightActions>\n </SpotlightFooter>\n </SpotlightCard>\n </PopoverContent>\n </PopoverProvider>\n\n <PopoverProvider>\n <PopoverTarget>\n <IconButton icon={CopyIcon} label=\"Copy\" />\n </PopoverTarget>\n <PopoverContent dismiss={dismiss} placement=\"bottom-start\" isVisible={currentStep === 2}>\n <SpotlightCard>\n <SpotlightHeader>\n <SpotlightHeadline>Copy code</SpotlightHeadline>\n <SpotlightControls>\n <SpotlightDismissControl onClick={dismiss} />\n </SpotlightControls>\n </SpotlightHeader>\n <SpotlightBody>\n <Text>Click to copy the example code to your clipboard.</Text>\n </SpotlightBody>\n <SpotlightFooter>\n <SpotlightStepCount>2 of 2</SpotlightStepCount>\n <SpotlightActions>\n <SpotlightSecondaryAction onClick={back}>Back</SpotlightSecondaryAction>\n <SpotlightPrimaryAction onClick={done}>Done</SpotlightPrimaryAction>\n </SpotlightActions>\n </SpotlightFooter>\n </SpotlightCard>\n </PopoverContent>\n </PopoverProvider>\n\n <Button appearance=\"primary\" onClick={() => setCurrentStep(1)}>\n Start tour\n </Button>\n </>\n );\n};",
29
+ explanation: "Key changes when migrating a multi-step spotlight tour:\n1. Replace the single SpotlightManager with multiple PopoverProvider instances - one for each target element\n2. Each target gets its own PopoverProvider > PopoverTarget > PopoverContent structure\n3. The spotlight array pattern is replaced with individual SpotlightCard components per target\n4. Use a single currentStep state (starting at 0 for hidden, 1+ for active steps) instead of null/index\n5. Control visibility with isVisible={currentStep === n} on each PopoverContent\n6. Add SpotlightStepCount component in SpotlightFooter to show progress (e.g., \"1 of 3\")\n7. Use SpotlightSecondaryAction for \"Back\" buttons instead of appearance: 'subtle' in the actions array\n8. Use SpotlightPrimaryAction for \"Next\" and \"Done\" buttons\n9. The renderActiveSpotlight pattern is no longer needed - visibility is controlled declaratively\n10. Navigation functions use Math.max/Math.min to bound the step range safely"
30
+ }],
31
+ bestPractices: ['Each target element in a tour needs its own PopoverProvider wrapper', 'Use a numeric currentStep state where 0 = hidden, 1+ = active step number', 'Always include SpotlightStepCount in multi-step tours for user orientation', 'First step should only have "Next" action, middle steps have "Back" and "Next", last step has "Back" and "Done"', 'Use SpotlightSecondaryAction for back/dismiss actions and SpotlightPrimaryAction for next/done', 'Include SpotlightDismissControl with onClick={dismiss} so users can exit the tour at any point', 'Bound navigation functions with Math.max/Math.min to prevent invalid step values', 'Preference duplicating Spotlight code instead of trying to have a single `@atlaskit/spotlight` instance that conditionally renders content based on step.'],
32
+ additionalResources: additionalResources
33
+ };
34
+ export var onboardingWithMotion = {
35
+ id: 'onboarding-with-motion',
36
+ title: 'Single Step Spotlight with Motion Migration',
37
+ description: 'Migrate a single step spotlight with entrance animation from @atlaskit/onboarding to @atlaskit/spotlight using @atlaskit/motion',
38
+ fromPackage: '@atlaskit/onboarding',
39
+ toPackage: '@atlaskit/spotlight',
40
+ examples: [{
41
+ title: 'Migrate spotlight with transition animation',
42
+ description: 'Replace SpotlightTransition with FadeIn from @atlaskit/motion wrapped around the SpotlightCard',
43
+ before: "import React, { useState } from 'react';\nimport Button from '@atlaskit/button/new';\nimport {\n Spotlight,\n SpotlightManager,\n SpotlightTarget,\n SpotlightTransition,\n} from '@atlaskit/onboarding';\n\nconst OnboardingSpotlightWithTransition = () => {\n const [isSpotlightActive, setIsSpotlightActive] = useState(false);\n const start = () => setIsSpotlightActive(true);\n const end = () => setIsSpotlightActive(false);\n\n return (\n <SpotlightManager>\n <SpotlightTarget name=\"my-target\">\n <Button>Target Element</Button>\n </SpotlightTarget>\n <div>\n <Button appearance=\"primary\" onClick={start}>\n Show spotlight\n </Button>\n </div>\n <SpotlightTransition>\n {isSpotlightActive && (\n <Spotlight\n actions={[\n {\n onClick: end,\n text: 'Got it',\n },\n ]}\n heading=\"Feature Heading\"\n target=\"my-target\"\n key=\"my-target\"\n >\n This is the spotlight body content describing the feature.\n </Spotlight>\n )}\n </SpotlightTransition>\n </SpotlightManager>\n );\n};",
44
+ after: "import React, { useState } from 'react';\nimport Button from '@atlaskit/button/new';\nimport { FadeIn } from '@atlaskit/motion';\nimport { Text } from '@atlaskit/primitives/compiled';\nimport {\n PopoverContent,\n PopoverProvider,\n PopoverTarget,\n SpotlightActions,\n SpotlightBody,\n SpotlightCard,\n SpotlightControls,\n SpotlightDismissControl,\n SpotlightFooter,\n SpotlightHeader,\n SpotlightHeadline,\n SpotlightPrimaryAction,\n} from '@atlaskit/spotlight';\n\nconst SpotlightWithMotion = () => {\n const [isVisible, setIsVisible] = useState(false);\n const dismiss = () => setIsVisible(false);\n const done = () => setIsVisible(false);\n\n return (\n <PopoverProvider>\n <PopoverTarget>\n <Button onClick={() => setIsVisible(true)}>Target Element</Button>\n </PopoverTarget>\n <PopoverContent done={done} dismiss={dismiss} placement=\"bottom-start\" isVisible={isVisible}>\n <FadeIn entranceDirection=\"left\">\n {(props) => (\n <div {...props}>\n <SpotlightCard>\n <SpotlightHeader>\n <SpotlightHeadline>Feature Heading</SpotlightHeadline>\n <SpotlightControls>\n <SpotlightDismissControl />\n </SpotlightControls>\n </SpotlightHeader>\n <SpotlightBody>\n <Text>This is the spotlight body content describing the feature.</Text>\n </SpotlightBody>\n <SpotlightFooter>\n <SpotlightActions>\n <SpotlightPrimaryAction onClick={done}>Got it</SpotlightPrimaryAction>\n </SpotlightActions>\n </SpotlightFooter>\n </SpotlightCard>\n </div>\n )}\n </FadeIn>\n </PopoverContent>\n </PopoverProvider>\n );\n};",
45
+ explanation: "Key changes when migrating a spotlight with transition animation:\n1. Replace SpotlightTransition with FadeIn from @atlaskit/motion\n2. Import FadeIn from '@atlaskit/motion' instead of SpotlightTransition from '@atlaskit/onboarding'\n3. FadeIn uses a render props pattern - wrap content in {(props) => <div {...props}>...</div>}\n4. The entranceDirection prop controls animation direction: 'left', 'right', 'top', or 'bottom'\n5. SpotlightCard must be wrapped in a div that receives the animation props\n6. PopoverContent now accepts a 'done' prop in addition to 'dismiss' for completed actions\n7. All other migration changes from single step spotlight apply (PopoverProvider, compositional components, etc.)"
46
+ }],
47
+ bestPractices: ['Use FadeIn from @atlaskit/motion to add entrance animations to spotlights', 'Choose entranceDirection based on spotlight placement (e.g., "left" for right-placed spotlights)', 'Always wrap SpotlightCard in a div that receives the animation props from FadeIn', 'FadeIn uses render props pattern: {(props) => <div {...props}>content</div>}', 'Pass both done and dismiss props to PopoverContent when using motion', 'Motion is optional - only add if the original onboarding spotlight used SpotlightTransition for entrance effects'],
48
+ additionalResources: additionalResources
49
+ };
@@ -0,0 +1,29 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ /**
3
+ * Migration registry - central place to register all available migrations
4
+ *
5
+ * To add a new migration:
6
+ * 1. Create a new file in ./migrations/ with your MigrationGuide(s)
7
+ * 2. Import and add to the registry below
8
+ * 3. The tool will automatically include it in the available options
9
+ */
10
+
11
+ import { onboardingMultiStep, onboardingSingleStep, onboardingWithMotion } from './migrations/onboarding-to-spotlight';
12
+ export var migrationRegistry = _defineProperty(_defineProperty(_defineProperty({}, onboardingSingleStep.id, onboardingSingleStep), onboardingMultiStep.id, onboardingMultiStep), onboardingWithMotion.id, onboardingWithMotion);
13
+
14
+ /**
15
+ * Get all available migration IDs for use in the tool schema
16
+ */
17
+ export var getAvailableMigrationIds = function getAvailableMigrationIds() {
18
+ return Object.keys(migrationRegistry);
19
+ };
20
+
21
+ /**
22
+ * Get a formatted list of available migrations with descriptions
23
+ * Useful for tool descriptions and help text
24
+ */
25
+ export var getAvailableMigrationsDescription = function getAvailableMigrationsDescription() {
26
+ return Object.values(migrationRegistry).map(function (m) {
27
+ return "- \"".concat(m.id, "\": ").concat(m.description);
28
+ }).join('\n');
29
+ };
File without changes
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Structured content for tokens generated from token-metadata.
5
5
  *
6
- * @codegen <<SignedSource::41dd1fd7431557df57b792c2eb5e5f70>>
6
+ * @codegen <<SignedSource::71826c7e9b24620099bd0316f7a0a305>>
7
7
  * @codegenCommand yarn build structured-docs
8
8
  */
9
9
  export interface TokenStructuredContent {
@@ -0,0 +1,16 @@
1
+ import type { Tool } from '@modelcontextprotocol/sdk/types';
2
+ import { z } from 'zod';
3
+ export declare const migrationGuidesInputSchema: z.ZodObject<{
4
+ migration: z.ZodEnum<[string, ...string[]]>;
5
+ }, "strip", z.ZodTypeAny, {
6
+ migration: string;
7
+ }, {
8
+ migration: string;
9
+ }>;
10
+ export declare const listMigrationGuidesTool: Tool;
11
+ export declare const migrationGuidesTool: (params: z.infer<typeof migrationGuidesInputSchema>) => Promise<{
12
+ content: {
13
+ type: string;
14
+ text: string;
15
+ }[];
16
+ }>;
@@ -0,0 +1,4 @@
1
+ import type { MigrationGuide } from '../types';
2
+ export declare const onboardingSingleStep: MigrationGuide;
3
+ export declare const onboardingMultiStep: MigrationGuide;
4
+ export declare const onboardingWithMotion: MigrationGuide;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Migration registry - central place to register all available migrations
3
+ *
4
+ * To add a new migration:
5
+ * 1. Create a new file in ./migrations/ with your MigrationGuide(s)
6
+ * 2. Import and add to the registry below
7
+ * 3. The tool will automatically include it in the available options
8
+ */
9
+ import type { MigrationRegistry } from './types';
10
+ export declare const migrationRegistry: MigrationRegistry;
11
+ /**
12
+ * Get all available migration IDs for use in the tool schema
13
+ */
14
+ export declare const getAvailableMigrationIds: () => string[];
15
+ /**
16
+ * Get a formatted list of available migrations with descriptions
17
+ * Useful for tool descriptions and help text
18
+ */
19
+ export declare const getAvailableMigrationsDescription: () => string;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Types for the migration guides tool
3
+ */
4
+ export interface MigrationExample {
5
+ title: string;
6
+ description: string;
7
+ before: string;
8
+ after: string;
9
+ explanation: string;
10
+ }
11
+ export interface MigrationGuide {
12
+ id: string;
13
+ title: string;
14
+ description: string;
15
+ fromPackage: string;
16
+ toPackage: string;
17
+ examples: MigrationExample[];
18
+ bestPractices: string[];
19
+ additionalResources: string;
20
+ }
21
+ export interface MigrationRegistry {
22
+ [key: string]: MigrationGuide;
23
+ }
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Structured content for tokens generated from token-metadata.
5
5
  *
6
- * @codegen <<SignedSource::41dd1fd7431557df57b792c2eb5e5f70>>
6
+ * @codegen <<SignedSource::71826c7e9b24620099bd0316f7a0a305>>
7
7
  * @codegenCommand yarn build structured-docs
8
8
  */
9
9
  export interface TokenStructuredContent {
@@ -0,0 +1,19 @@
1
+ import type { Tool } from '@modelcontextprotocol/sdk/types';
2
+ import { z } from 'zod';
3
+ export declare const migrationGuidesInputSchema: z.ZodObject<{
4
+ migration: z.ZodEnum<[
5
+ string,
6
+ ...string[]
7
+ ]>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ migration: string;
10
+ }, {
11
+ migration: string;
12
+ }>;
13
+ export declare const listMigrationGuidesTool: Tool;
14
+ export declare const migrationGuidesTool: (params: z.infer<typeof migrationGuidesInputSchema>) => Promise<{
15
+ content: {
16
+ type: string;
17
+ text: string;
18
+ }[];
19
+ }>;
@@ -0,0 +1,4 @@
1
+ import type { MigrationGuide } from '../types';
2
+ export declare const onboardingSingleStep: MigrationGuide;
3
+ export declare const onboardingMultiStep: MigrationGuide;
4
+ export declare const onboardingWithMotion: MigrationGuide;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Migration registry - central place to register all available migrations
3
+ *
4
+ * To add a new migration:
5
+ * 1. Create a new file in ./migrations/ with your MigrationGuide(s)
6
+ * 2. Import and add to the registry below
7
+ * 3. The tool will automatically include it in the available options
8
+ */
9
+ import type { MigrationRegistry } from './types';
10
+ export declare const migrationRegistry: MigrationRegistry;
11
+ /**
12
+ * Get all available migration IDs for use in the tool schema
13
+ */
14
+ export declare const getAvailableMigrationIds: () => string[];
15
+ /**
16
+ * Get a formatted list of available migrations with descriptions
17
+ * Useful for tool descriptions and help text
18
+ */
19
+ export declare const getAvailableMigrationsDescription: () => string;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Types for the migration guides tool
3
+ */
4
+ export interface MigrationExample {
5
+ title: string;
6
+ description: string;
7
+ before: string;
8
+ after: string;
9
+ explanation: string;
10
+ }
11
+ export interface MigrationGuide {
12
+ id: string;
13
+ title: string;
14
+ description: string;
15
+ fromPackage: string;
16
+ toPackage: string;
17
+ examples: MigrationExample[];
18
+ bestPractices: string[];
19
+ additionalResources: string;
20
+ }
21
+ export interface MigrationRegistry {
22
+ [key: string]: MigrationGuide;
23
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/ads-mcp",
3
- "version": "0.10.1",
3
+ "version": "0.11.0",
4
4
  "description": "The official Atlassian Design System MCP server to develop apps and user interfaces matching the Atlassian style.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",