@atlaskit/ads-mcp 0.20.3 → 0.21.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/CHANGELOG.md +23 -0
- package/a11y-fixes/package.json +14 -0
- package/a11y-guidelines/package.json +14 -0
- package/dist/cjs/entry-points/a11y-fixes.js +12 -0
- package/dist/cjs/entry-points/a11y-guidelines.js +12 -0
- package/dist/cjs/entry-points/analyze-a11y.js +40 -0
- package/dist/cjs/entry-points/get-a11y-guidelines.js +26 -0
- package/dist/cjs/entry-points/get-all-components.js +19 -0
- package/dist/cjs/entry-points/get-all-icons.js +19 -0
- package/dist/cjs/entry-points/get-all-tokens.js +19 -0
- package/dist/cjs/entry-points/get-atlaskit-components.js +19 -0
- package/dist/cjs/entry-points/get-guidelines.js +26 -0
- package/dist/cjs/entry-points/get-lint-rules.js +26 -0
- package/dist/cjs/entry-points/i18n-conversion-guide.js +12 -0
- package/dist/cjs/entry-points/i18n-conversion.js +26 -0
- package/dist/cjs/entry-points/migration-guides.js +26 -0
- package/dist/cjs/entry-points/migration-registry.js +12 -0
- package/dist/cjs/entry-points/plan.js +26 -0
- package/dist/cjs/entry-points/search-atlaskit-components.js +26 -0
- package/dist/cjs/entry-points/search-components.js +26 -0
- package/dist/cjs/entry-points/search-icons.js +26 -0
- package/dist/cjs/entry-points/search-tokens.js +26 -0
- package/dist/cjs/entry-points/suggest-a11y-fixes.js +26 -0
- package/dist/cjs/helpers/agent.js +9 -0
- package/dist/cjs/helpers/analytics.js +1 -0
- package/dist/cjs/helpers/clean-query.js +10 -0
- package/dist/cjs/helpers/index.js +14 -11
- package/dist/cjs/helpers/send-operational-event.js +56 -0
- package/dist/cjs/helpers/validation.js +2 -2
- package/dist/cjs/helpers/zod-to-json-schema.js +12 -0
- package/dist/cjs/index.js +127 -85
- package/dist/cjs/tools/analyze-a11y/analyze-a11y-input-schema.js +13 -0
- package/dist/cjs/tools/analyze-a11y/analyze-a11y-localhost-input-schema.js +13 -0
- package/dist/cjs/tools/analyze-a11y/analyze-a11y-tool.js +242 -0
- package/dist/cjs/tools/analyze-a11y/analyze-localhost-a11y-tool.js +214 -0
- package/dist/cjs/tools/analyze-a11y/generate-ads-fix-for-violation.js +32 -0
- package/dist/cjs/tools/analyze-a11y/list-analyze-a11y-tool.js +20 -0
- package/dist/cjs/tools/analyze-a11y/list-analyze-localhost-a11y-tool.js +20 -0
- package/dist/cjs/tools/get-a11y-guidelines/get-a11y-guidelines-input-schema.js +14 -0
- package/dist/cjs/tools/get-a11y-guidelines/{index.js → get-a11y-guidelines-tool.js} +1 -18
- package/dist/cjs/tools/get-a11y-guidelines/list-get-a11y-guidelines-tool.js +22 -0
- package/dist/cjs/tools/get-all-components/components.codegen.js +3 -3
- package/dist/cjs/tools/get-all-components/{index.js → get-all-components-tool.js} +1 -15
- package/dist/cjs/tools/get-all-components/list-get-all-components-tool.js +22 -0
- package/dist/cjs/tools/get-all-icons/{index.js → get-all-icons-tool.js} +1 -15
- package/dist/cjs/tools/get-all-icons/list-get-all-icons-tool.js +22 -0
- package/dist/cjs/tools/get-all-tokens/{index.js → get-all-tokens-tool.js} +1 -18
- package/dist/cjs/tools/get-all-tokens/list-get-all-tokens-tool.js +23 -0
- package/dist/cjs/tools/get-atlaskit-components/atlaskit-components.codegen.js +1948 -0
- package/dist/cjs/tools/get-atlaskit-components/get-atlaskit-components-tool.js +40 -0
- package/dist/cjs/tools/get-atlaskit-components/list-get-atlaskit-components-tool.js +22 -0
- package/dist/cjs/tools/get-guidelines/get-guidelines-input-schema.js +11 -0
- package/dist/cjs/tools/get-guidelines/{index.js → get-guidelines-tool.js} +3 -20
- package/dist/cjs/tools/get-guidelines/list-get-guidelines-tool.js +22 -0
- package/dist/cjs/tools/get-lint-rules/get-lint-rules-input-schema.js +14 -0
- package/dist/cjs/tools/get-lint-rules/{index.js → get-lint-rules-tool.js} +3 -21
- package/dist/cjs/tools/get-lint-rules/list-get-lint-rules-tool.js +22 -0
- package/dist/cjs/tools/i18n-conversion/i18n-conversion-input-schema.js +12 -0
- package/dist/cjs/tools/i18n-conversion/i18n-conversion-tool.js +33 -0
- package/dist/cjs/tools/i18n-conversion/{index.js → list-i18n-conversion-tool.js} +5 -33
- package/dist/cjs/tools/migration-guides/get-available-migration-ids.js +22 -0
- package/dist/cjs/tools/migration-guides/{registry.js → get-available-migrations-description.js} +1 -14
- package/dist/cjs/tools/migration-guides/list-migration-guides-tool.js +23 -0
- package/dist/cjs/tools/migration-guides/migration-guides-input-schema.js +17 -0
- package/dist/cjs/tools/migration-guides/{index.js → migration-guides-tool.js} +3 -24
- package/dist/cjs/tools/migration-guides/migration-registry.js +5 -2
- package/dist/cjs/tools/migration-guides/migrations/onboarding-jira-spotlight.js +29 -0
- package/dist/cjs/tools/migration-guides/migrations/onboarding-multi-step.js +23 -0
- package/dist/cjs/tools/migration-guides/migrations/onboarding-single-step.js +23 -0
- package/dist/cjs/tools/migration-guides/migrations/onboarding-with-motion.js +23 -0
- package/dist/cjs/tools/plan/list-plan-tool.js +22 -0
- package/dist/cjs/tools/plan/plan-input-schema.js +16 -0
- package/dist/cjs/tools/plan/{index.js → plan-tool.js} +28 -36
- package/dist/cjs/tools/search-atlaskit-components/list-search-atlaskit-components-tool.js +22 -0
- package/dist/cjs/tools/search-atlaskit-components/search-atlaskit-components-input-schema.js +11 -0
- package/dist/cjs/tools/search-atlaskit-components/search-atlaskit-components-tool.js +114 -0
- package/dist/cjs/tools/search-components/list-search-components-tool.js +22 -0
- package/dist/cjs/tools/search-components/search-components-input-schema.js +13 -0
- package/dist/cjs/tools/search-components/{index.js → search-components-tool.js} +3 -19
- package/dist/cjs/tools/search-icons/list-search-icons-tool.js +22 -0
- package/dist/cjs/tools/search-icons/search-icons-input-schema.js +13 -0
- package/dist/cjs/tools/search-icons/{index.js → search-icons-tool.js} +3 -19
- package/dist/cjs/tools/search-tokens/list-search-tokens-tool.js +22 -0
- package/dist/cjs/tools/search-tokens/search-tokens-input-schema.js +13 -0
- package/dist/cjs/tools/search-tokens/{index.js → search-tokens-tool.js} +3 -19
- package/dist/cjs/tools/suggest-a11y-fixes/list-suggest-a11y-fixes-tool.js +22 -0
- package/dist/cjs/tools/suggest-a11y-fixes/suggest-a11y-fixes-input-schema.js +15 -0
- package/dist/cjs/tools/suggest-a11y-fixes/{index.js → suggest-a11y-fixes-tool.js} +1 -22
- package/dist/es2019/entry-points/a11y-fixes.js +1 -0
- package/dist/es2019/entry-points/a11y-guidelines.js +1 -0
- package/dist/es2019/entry-points/analyze-a11y.js +5 -0
- package/dist/es2019/entry-points/get-a11y-guidelines.js +3 -0
- package/dist/es2019/entry-points/get-all-components.js +2 -0
- package/dist/es2019/entry-points/get-all-icons.js +2 -0
- package/dist/es2019/entry-points/get-all-tokens.js +2 -0
- package/dist/es2019/entry-points/get-atlaskit-components.js +2 -0
- package/dist/es2019/entry-points/get-guidelines.js +3 -0
- package/dist/es2019/entry-points/get-lint-rules.js +3 -0
- package/dist/es2019/entry-points/i18n-conversion-guide.js +1 -0
- package/dist/es2019/entry-points/i18n-conversion.js +3 -0
- package/dist/es2019/entry-points/migration-guides.js +3 -0
- package/dist/es2019/entry-points/migration-registry.js +1 -0
- package/dist/es2019/entry-points/plan.js +3 -0
- package/dist/es2019/entry-points/search-atlaskit-components.js +3 -0
- package/dist/es2019/entry-points/search-components.js +3 -0
- package/dist/es2019/entry-points/search-icons.js +3 -0
- package/dist/es2019/entry-points/search-tokens.js +3 -0
- package/dist/es2019/entry-points/suggest-a11y-fixes.js +3 -0
- package/dist/es2019/helpers/agent.js +3 -0
- package/dist/es2019/helpers/analytics.js +1 -0
- package/dist/es2019/helpers/clean-query.js +2 -0
- package/dist/es2019/helpers/index.js +2 -7
- package/dist/es2019/helpers/send-operational-event.js +49 -0
- package/dist/es2019/helpers/validation.js +1 -1
- package/dist/es2019/helpers/zod-to-json-schema.js +6 -0
- package/dist/es2019/index.js +138 -92
- package/dist/es2019/tools/analyze-a11y/analyze-a11y-input-schema.js +7 -0
- package/dist/es2019/tools/analyze-a11y/analyze-a11y-localhost-input-schema.js +7 -0
- package/dist/es2019/tools/analyze-a11y/analyze-a11y-tool.js +212 -0
- package/dist/es2019/tools/analyze-a11y/analyze-localhost-a11y-tool.js +163 -0
- package/dist/es2019/tools/analyze-a11y/generate-ads-fix-for-violation.js +26 -0
- package/dist/es2019/tools/analyze-a11y/list-analyze-a11y-tool.js +21 -0
- package/dist/es2019/tools/analyze-a11y/list-analyze-localhost-a11y-tool.js +23 -0
- package/dist/es2019/tools/get-a11y-guidelines/get-a11y-guidelines-input-schema.js +7 -0
- package/dist/es2019/tools/get-a11y-guidelines/get-a11y-guidelines-tool.js +34 -0
- package/dist/es2019/tools/get-a11y-guidelines/list-get-a11y-guidelines-tool.js +23 -0
- package/dist/es2019/tools/get-all-components/components.codegen.js +3 -3
- package/dist/es2019/tools/get-all-components/get-all-components-tool.js +12 -0
- package/dist/es2019/tools/get-all-components/{index.js → list-get-all-components-tool.js} +1 -12
- package/dist/es2019/tools/get-all-icons/get-all-icons-tool.js +10 -0
- package/dist/es2019/tools/get-all-icons/{index.js → list-get-all-icons-tool.js} +2 -11
- package/dist/es2019/tools/get-all-tokens/get-all-tokens-tool.js +13 -0
- package/dist/es2019/tools/get-all-tokens/{index.js → list-get-all-tokens-tool.js} +2 -15
- package/dist/es2019/tools/get-atlaskit-components/atlaskit-components.codegen.js +1942 -0
- package/dist/es2019/tools/get-atlaskit-components/get-atlaskit-components-tool.js +14 -0
- package/dist/es2019/tools/get-atlaskit-components/list-get-atlaskit-components-tool.js +21 -0
- package/dist/es2019/tools/get-guidelines/get-guidelines-input-schema.js +5 -0
- package/dist/es2019/tools/get-guidelines/get-guidelines-tool.js +55 -0
- package/dist/es2019/tools/get-guidelines/{index.js → list-get-guidelines-tool.js} +2 -59
- package/dist/es2019/tools/get-lint-rules/get-lint-rules-input-schema.js +7 -0
- package/dist/es2019/tools/get-lint-rules/{index.js → get-lint-rules-tool.js} +1 -28
- package/dist/es2019/tools/get-lint-rules/list-get-lint-rules-tool.js +24 -0
- package/dist/es2019/tools/i18n-conversion/i18n-conversion-input-schema.js +5 -0
- package/dist/es2019/tools/i18n-conversion/i18n-conversion-tool.js +11 -0
- package/dist/es2019/tools/i18n-conversion/{index.js → list-i18n-conversion-tool.js} +2 -14
- package/dist/es2019/tools/migration-guides/get-available-migration-ids.js +17 -0
- package/dist/es2019/tools/migration-guides/{registry.js → get-available-migrations-description.js} +1 -8
- package/dist/es2019/tools/migration-guides/list-migration-guides-tool.js +25 -0
- package/dist/es2019/tools/migration-guides/migration-guides-input-schema.js +10 -0
- package/dist/es2019/tools/migration-guides/migration-guides-tool.js +39 -0
- package/dist/es2019/tools/migration-guides/migration-registry.js +4 -1
- package/dist/es2019/tools/migration-guides/migrations/onboarding-jira-spotlight.js +230 -0
- package/dist/es2019/tools/migration-guides/migrations/onboarding-multi-step.js +179 -0
- package/dist/es2019/tools/migration-guides/migrations/onboarding-single-step.js +120 -0
- package/dist/es2019/tools/migration-guides/migrations/onboarding-with-motion.js +120 -0
- package/dist/es2019/tools/plan/list-plan-tool.js +47 -0
- package/dist/es2019/tools/plan/plan-input-schema.js +9 -0
- package/dist/es2019/tools/plan/plan-tool.js +111 -0
- package/dist/es2019/tools/search-atlaskit-components/list-search-atlaskit-components-tool.js +19 -0
- package/dist/es2019/tools/search-atlaskit-components/search-atlaskit-components-input-schema.js +5 -0
- package/dist/es2019/tools/search-atlaskit-components/search-atlaskit-components-tool.js +84 -0
- package/dist/es2019/tools/search-components/list-search-components-tool.js +19 -0
- package/dist/es2019/tools/search-components/search-components-input-schema.js +6 -0
- package/dist/es2019/tools/search-components/{index.js → search-components-tool.js} +2 -21
- package/dist/es2019/tools/search-icons/list-search-icons-tool.js +25 -0
- package/dist/es2019/tools/search-icons/search-icons-input-schema.js +6 -0
- package/dist/es2019/tools/search-icons/{index.js → search-icons-tool.js} +2 -27
- package/dist/es2019/tools/search-tokens/list-search-tokens-tool.js +25 -0
- package/dist/es2019/tools/search-tokens/search-tokens-input-schema.js +6 -0
- package/dist/es2019/tools/search-tokens/{index.js → search-tokens-tool.js} +2 -27
- package/dist/es2019/tools/suggest-a11y-fixes/list-suggest-a11y-fixes-tool.js +25 -0
- package/dist/es2019/tools/suggest-a11y-fixes/suggest-a11y-fixes-input-schema.js +8 -0
- package/dist/es2019/tools/suggest-a11y-fixes/{index.js → suggest-a11y-fixes-tool.js} +0 -30
- package/dist/esm/entry-points/a11y-fixes.js +1 -0
- package/dist/esm/entry-points/a11y-guidelines.js +1 -0
- package/dist/esm/entry-points/analyze-a11y.js +5 -0
- package/dist/esm/entry-points/get-a11y-guidelines.js +3 -0
- package/dist/esm/entry-points/get-all-components.js +2 -0
- package/dist/esm/entry-points/get-all-icons.js +2 -0
- package/dist/esm/entry-points/get-all-tokens.js +2 -0
- package/dist/esm/entry-points/get-atlaskit-components.js +2 -0
- package/dist/esm/entry-points/get-guidelines.js +3 -0
- package/dist/esm/entry-points/get-lint-rules.js +3 -0
- package/dist/esm/entry-points/i18n-conversion-guide.js +1 -0
- package/dist/esm/entry-points/i18n-conversion.js +3 -0
- package/dist/esm/entry-points/migration-guides.js +3 -0
- package/dist/esm/entry-points/migration-registry.js +1 -0
- package/dist/esm/entry-points/plan.js +3 -0
- package/dist/esm/entry-points/search-atlaskit-components.js +3 -0
- package/dist/esm/entry-points/search-components.js +3 -0
- package/dist/esm/entry-points/search-icons.js +3 -0
- package/dist/esm/entry-points/search-tokens.js +3 -0
- package/dist/esm/entry-points/suggest-a11y-fixes.js +3 -0
- package/dist/esm/helpers/agent.js +3 -0
- package/dist/esm/helpers/analytics.js +1 -0
- package/dist/esm/helpers/clean-query.js +4 -0
- package/dist/esm/helpers/index.js +2 -9
- package/dist/esm/helpers/send-operational-event.js +52 -0
- package/dist/esm/helpers/validation.js +1 -1
- package/dist/esm/helpers/zod-to-json-schema.js +6 -0
- package/dist/esm/index.js +65 -23
- package/dist/esm/tools/analyze-a11y/analyze-a11y-input-schema.js +7 -0
- package/dist/esm/tools/analyze-a11y/analyze-a11y-localhost-input-schema.js +7 -0
- package/dist/esm/tools/analyze-a11y/analyze-a11y-tool.js +235 -0
- package/dist/esm/tools/analyze-a11y/analyze-localhost-a11y-tool.js +207 -0
- package/dist/esm/tools/analyze-a11y/generate-ads-fix-for-violation.js +26 -0
- package/dist/esm/tools/analyze-a11y/list-analyze-a11y-tool.js +14 -0
- package/dist/esm/tools/analyze-a11y/list-analyze-localhost-a11y-tool.js +14 -0
- package/dist/esm/tools/get-a11y-guidelines/get-a11y-guidelines-input-schema.js +7 -0
- package/dist/esm/tools/get-a11y-guidelines/{index.js → get-a11y-guidelines-tool.js} +0 -17
- package/dist/esm/tools/get-a11y-guidelines/list-get-a11y-guidelines-tool.js +16 -0
- package/dist/esm/tools/get-all-components/components.codegen.js +3 -3
- package/dist/esm/tools/get-all-components/{index.js → get-all-components-tool.js} +0 -15
- package/dist/esm/tools/get-all-components/list-get-all-components-tool.js +16 -0
- package/dist/esm/tools/get-all-icons/{index.js → get-all-icons-tool.js} +0 -15
- package/dist/esm/tools/get-all-icons/list-get-all-icons-tool.js +16 -0
- package/dist/esm/tools/get-all-tokens/{index.js → get-all-tokens-tool.js} +0 -17
- package/dist/esm/tools/get-all-tokens/list-get-all-tokens-tool.js +17 -0
- package/dist/esm/tools/get-atlaskit-components/atlaskit-components.codegen.js +1942 -0
- package/dist/esm/tools/get-atlaskit-components/get-atlaskit-components-tool.js +32 -0
- package/dist/esm/tools/get-atlaskit-components/list-get-atlaskit-components-tool.js +16 -0
- package/dist/esm/tools/get-guidelines/get-guidelines-input-schema.js +5 -0
- package/dist/esm/tools/get-guidelines/{index.js → get-guidelines-tool.js} +1 -19
- package/dist/esm/tools/get-guidelines/list-get-guidelines-tool.js +16 -0
- package/dist/esm/tools/get-lint-rules/get-lint-rules-input-schema.js +7 -0
- package/dist/esm/tools/get-lint-rules/{index.js → get-lint-rules-tool.js} +1 -19
- package/dist/esm/tools/get-lint-rules/list-get-lint-rules-tool.js +15 -0
- package/dist/esm/tools/i18n-conversion/i18n-conversion-input-schema.js +5 -0
- package/dist/esm/tools/i18n-conversion/i18n-conversion-tool.js +26 -0
- package/dist/esm/tools/i18n-conversion/{index.js → list-i18n-conversion-tool.js} +3 -30
- package/dist/esm/tools/migration-guides/get-available-migration-ids.js +17 -0
- package/dist/esm/tools/migration-guides/{registry.js → get-available-migrations-description.js} +1 -8
- package/dist/esm/tools/migration-guides/list-migration-guides-tool.js +17 -0
- package/dist/esm/tools/migration-guides/migration-guides-input-schema.js +10 -0
- package/dist/esm/tools/migration-guides/{index.js → migration-guides-tool.js} +1 -23
- package/dist/esm/tools/migration-guides/migration-registry.js +4 -1
- package/dist/esm/tools/migration-guides/migrations/onboarding-jira-spotlight.js +23 -0
- package/dist/esm/tools/migration-guides/migrations/onboarding-multi-step.js +17 -0
- package/dist/esm/tools/migration-guides/migrations/onboarding-single-step.js +17 -0
- package/dist/esm/tools/migration-guides/migrations/onboarding-with-motion.js +17 -0
- package/dist/esm/tools/plan/list-plan-tool.js +16 -0
- package/dist/esm/tools/plan/plan-input-schema.js +9 -0
- package/dist/esm/tools/plan/{index.js → plan-tool.js} +24 -32
- package/dist/esm/tools/search-atlaskit-components/list-search-atlaskit-components-tool.js +16 -0
- package/dist/esm/tools/search-atlaskit-components/search-atlaskit-components-input-schema.js +5 -0
- package/dist/esm/tools/search-atlaskit-components/search-atlaskit-components-tool.js +107 -0
- package/dist/esm/tools/search-components/list-search-components-tool.js +16 -0
- package/dist/esm/tools/search-components/search-components-input-schema.js +6 -0
- package/dist/esm/tools/search-components/{index.js → search-components-tool.js} +2 -18
- package/dist/esm/tools/search-icons/list-search-icons-tool.js +16 -0
- package/dist/esm/tools/search-icons/search-icons-input-schema.js +6 -0
- package/dist/esm/tools/search-icons/{index.js → search-icons-tool.js} +2 -18
- package/dist/esm/tools/search-tokens/list-search-tokens-tool.js +16 -0
- package/dist/esm/tools/search-tokens/search-tokens-input-schema.js +6 -0
- package/dist/esm/tools/search-tokens/{index.js → search-tokens-tool.js} +2 -18
- package/dist/esm/tools/suggest-a11y-fixes/list-suggest-a11y-fixes-tool.js +16 -0
- package/dist/esm/tools/suggest-a11y-fixes/suggest-a11y-fixes-input-schema.js +8 -0
- package/dist/esm/tools/suggest-a11y-fixes/{index.js → suggest-a11y-fixes-tool.js} +0 -21
- package/dist/types/entry-points/a11y-fixes.d.ts +1 -0
- package/dist/types/entry-points/a11y-guidelines.d.ts +1 -0
- package/dist/types/entry-points/analyze-a11y.d.ts +5 -0
- package/dist/types/entry-points/get-a11y-guidelines.d.ts +3 -0
- package/dist/types/entry-points/get-all-components.d.ts +2 -0
- package/dist/types/entry-points/get-all-icons.d.ts +2 -0
- package/dist/types/entry-points/get-all-tokens.d.ts +2 -0
- package/dist/types/entry-points/get-atlaskit-components.d.ts +2 -0
- package/dist/types/entry-points/get-guidelines.d.ts +3 -0
- package/dist/types/entry-points/get-lint-rules.d.ts +3 -0
- package/dist/types/entry-points/i18n-conversion-guide.d.ts +1 -0
- package/dist/types/entry-points/i18n-conversion.d.ts +3 -0
- package/dist/types/entry-points/migration-guides.d.ts +3 -0
- package/dist/types/entry-points/migration-registry.d.ts +1 -0
- package/dist/types/entry-points/plan.d.ts +3 -0
- package/dist/types/entry-points/search-atlaskit-components.d.ts +3 -0
- package/dist/types/entry-points/search-components.d.ts +3 -0
- package/dist/types/entry-points/search-icons.d.ts +3 -0
- package/dist/types/entry-points/search-tokens.d.ts +3 -0
- package/dist/types/entry-points/suggest-a11y-fixes.d.ts +3 -0
- package/dist/types/helpers/agent.d.ts +3 -0
- package/dist/types/helpers/clean-query.d.ts +1 -0
- package/dist/types/helpers/index.d.ts +2 -4
- package/dist/types/helpers/send-operational-event.d.ts +13 -0
- package/dist/types/helpers/zod-to-json-schema.d.ts +3 -0
- package/dist/types/tools/analyze-a11y/analyze-a11y-input-schema.d.ts +17 -0
- package/dist/types/tools/analyze-a11y/analyze-a11y-localhost-input-schema.d.ts +17 -0
- package/dist/types/tools/analyze-a11y/analyze-a11y-tool.d.ts +8 -0
- package/dist/types/tools/analyze-a11y/analyze-localhost-a11y-tool.d.ts +8 -0
- package/dist/types/tools/analyze-a11y/generate-ads-fix-for-violation.d.ts +1 -0
- package/dist/types/tools/analyze-a11y/list-analyze-a11y-tool.d.ts +2 -0
- package/dist/types/tools/analyze-a11y/list-analyze-localhost-a11y-tool.d.ts +2 -0
- package/dist/types/tools/get-a11y-guidelines/get-a11y-guidelines-input-schema.d.ts +8 -0
- package/dist/types/tools/get-a11y-guidelines/get-a11y-guidelines-tool.d.ts +8 -0
- package/dist/types/tools/get-a11y-guidelines/list-get-a11y-guidelines-tool.d.ts +2 -0
- package/dist/types/tools/get-all-components/components.codegen.d.ts +2 -2
- package/dist/types/tools/get-all-components/{index.d.ts → get-all-components-tool.d.ts} +0 -2
- package/dist/types/tools/get-all-components/list-get-all-components-tool.d.ts +2 -0
- package/dist/{types-ts4.5/tools/get-all-icons/index.d.ts → types/tools/get-all-icons/get-all-icons-tool.d.ts} +0 -2
- package/dist/types/tools/get-all-icons/list-get-all-icons-tool.d.ts +2 -0
- package/dist/types/tools/get-all-tokens/{index.d.ts → get-all-tokens-tool.d.ts} +0 -2
- package/dist/types/tools/get-all-tokens/list-get-all-tokens-tool.d.ts +2 -0
- package/dist/types/tools/get-atlaskit-components/atlaskit-components.codegen.d.ts +10 -0
- package/dist/types/tools/get-atlaskit-components/get-atlaskit-components-tool.d.ts +6 -0
- package/dist/types/tools/get-atlaskit-components/list-get-atlaskit-components-tool.d.ts +2 -0
- package/dist/types/tools/get-guidelines/get-guidelines-input-schema.d.ts +5 -0
- package/dist/types/tools/get-guidelines/get-guidelines-tool.d.ts +8 -0
- package/dist/types/tools/get-guidelines/list-get-guidelines-tool.d.ts +2 -0
- package/dist/types/tools/get-lint-rules/get-lint-rules-input-schema.d.ts +6 -0
- package/dist/types/tools/get-lint-rules/get-lint-rules-tool.d.ts +4 -0
- package/dist/types/tools/get-lint-rules/{index.d.ts → list-get-lint-rules-tool.d.ts} +0 -8
- package/dist/types/tools/i18n-conversion/i18n-conversion-input-schema.d.ts +8 -0
- package/dist/types/tools/i18n-conversion/i18n-conversion-tool.d.ts +8 -0
- package/dist/types/tools/i18n-conversion/list-i18n-conversion-tool.d.ts +2 -0
- package/dist/types/tools/migration-guides/get-available-migration-ids.d.ts +12 -0
- package/dist/types/tools/migration-guides/{registry.d.ts → get-available-migrations-description.d.ts} +0 -5
- package/dist/types/tools/migration-guides/list-migration-guides-tool.d.ts +2 -0
- package/dist/types/tools/migration-guides/migration-guides-input-schema.d.ts +11 -0
- package/dist/types/tools/migration-guides/migration-guides-tool.d.ts +8 -0
- package/dist/types/tools/migration-guides/migrations/onboarding-jira-spotlight.d.ts +2 -0
- package/dist/types/tools/migration-guides/migrations/onboarding-multi-step.d.ts +2 -0
- package/dist/types/tools/migration-guides/migrations/onboarding-single-step.d.ts +2 -0
- package/dist/types/tools/migration-guides/migrations/onboarding-with-motion.d.ts +2 -0
- package/dist/types/tools/plan/list-plan-tool.d.ts +2 -0
- package/dist/types/tools/plan/{index.d.ts → plan-input-schema.d.ts} +3 -15
- package/dist/types/tools/plan/plan-tool.d.ts +15 -0
- package/dist/types/tools/search-atlaskit-components/list-search-atlaskit-components-tool.d.ts +2 -0
- package/dist/types/tools/search-atlaskit-components/search-atlaskit-components-input-schema.d.ts +11 -0
- package/dist/types/tools/search-atlaskit-components/search-atlaskit-components-tool.d.ts +4 -0
- package/dist/types/tools/search-components/list-search-components-tool.d.ts +2 -0
- package/dist/{types-ts4.5/tools/search-components/index.d.ts → types/tools/search-components/search-components-input-schema.d.ts} +0 -3
- package/dist/types/tools/search-components/search-components-tool.d.ts +4 -0
- package/dist/types/tools/search-icons/list-search-icons-tool.d.ts +2 -0
- package/dist/{types-ts4.5/tools/search-icons/index.d.ts → types/tools/search-icons/search-icons-input-schema.d.ts} +0 -3
- package/dist/types/tools/search-icons/search-icons-tool.d.ts +4 -0
- package/dist/types/tools/search-tokens/list-search-tokens-tool.d.ts +2 -0
- package/dist/types/tools/search-tokens/{index.d.ts → search-tokens-input-schema.d.ts} +0 -3
- package/dist/types/tools/search-tokens/search-tokens-tool.d.ts +4 -0
- package/dist/types/tools/suggest-a11y-fixes/list-suggest-a11y-fixes-tool.d.ts +2 -0
- package/dist/types/tools/suggest-a11y-fixes/{index.d.ts → suggest-a11y-fixes-input-schema.d.ts} +0 -8
- package/dist/types/tools/suggest-a11y-fixes/suggest-a11y-fixes-tool.d.ts +8 -0
- package/dist/types-ts4.5/entry-points/a11y-fixes.d.ts +1 -0
- package/dist/types-ts4.5/entry-points/a11y-guidelines.d.ts +1 -0
- package/dist/types-ts4.5/entry-points/analyze-a11y.d.ts +5 -0
- package/dist/types-ts4.5/entry-points/get-a11y-guidelines.d.ts +3 -0
- package/dist/types-ts4.5/entry-points/get-all-components.d.ts +2 -0
- package/dist/types-ts4.5/entry-points/get-all-icons.d.ts +2 -0
- package/dist/types-ts4.5/entry-points/get-all-tokens.d.ts +2 -0
- package/dist/types-ts4.5/entry-points/get-atlaskit-components.d.ts +2 -0
- package/dist/types-ts4.5/entry-points/get-guidelines.d.ts +3 -0
- package/dist/types-ts4.5/entry-points/get-lint-rules.d.ts +3 -0
- package/dist/types-ts4.5/entry-points/i18n-conversion-guide.d.ts +1 -0
- package/dist/types-ts4.5/entry-points/i18n-conversion.d.ts +3 -0
- package/dist/types-ts4.5/entry-points/migration-guides.d.ts +3 -0
- package/dist/types-ts4.5/entry-points/migration-registry.d.ts +1 -0
- package/dist/types-ts4.5/entry-points/plan.d.ts +3 -0
- package/dist/types-ts4.5/entry-points/search-atlaskit-components.d.ts +3 -0
- package/dist/types-ts4.5/entry-points/search-components.d.ts +3 -0
- package/dist/types-ts4.5/entry-points/search-icons.d.ts +3 -0
- package/dist/types-ts4.5/entry-points/search-tokens.d.ts +3 -0
- package/dist/types-ts4.5/entry-points/suggest-a11y-fixes.d.ts +3 -0
- package/dist/types-ts4.5/helpers/agent.d.ts +3 -0
- package/dist/types-ts4.5/helpers/clean-query.d.ts +1 -0
- package/dist/types-ts4.5/helpers/index.d.ts +2 -4
- package/dist/types-ts4.5/helpers/send-operational-event.d.ts +13 -0
- package/dist/types-ts4.5/helpers/zod-to-json-schema.d.ts +3 -0
- package/dist/types-ts4.5/tools/analyze-a11y/analyze-a11y-input-schema.d.ts +17 -0
- package/dist/types-ts4.5/tools/analyze-a11y/analyze-a11y-localhost-input-schema.d.ts +17 -0
- package/dist/types-ts4.5/tools/analyze-a11y/analyze-a11y-tool.d.ts +8 -0
- package/dist/types-ts4.5/tools/analyze-a11y/analyze-localhost-a11y-tool.d.ts +8 -0
- package/dist/types-ts4.5/tools/analyze-a11y/generate-ads-fix-for-violation.d.ts +1 -0
- package/dist/types-ts4.5/tools/analyze-a11y/list-analyze-a11y-tool.d.ts +2 -0
- package/dist/types-ts4.5/tools/analyze-a11y/list-analyze-localhost-a11y-tool.d.ts +2 -0
- package/dist/types-ts4.5/tools/get-a11y-guidelines/get-a11y-guidelines-input-schema.d.ts +8 -0
- package/dist/types-ts4.5/tools/get-a11y-guidelines/get-a11y-guidelines-tool.d.ts +8 -0
- package/dist/types-ts4.5/tools/get-a11y-guidelines/list-get-a11y-guidelines-tool.d.ts +2 -0
- package/dist/types-ts4.5/tools/get-all-components/components.codegen.d.ts +2 -2
- package/dist/types-ts4.5/tools/get-all-components/{index.d.ts → get-all-components-tool.d.ts} +0 -2
- package/dist/types-ts4.5/tools/get-all-components/list-get-all-components-tool.d.ts +2 -0
- package/dist/{types/tools/get-all-icons/index.d.ts → types-ts4.5/tools/get-all-icons/get-all-icons-tool.d.ts} +0 -2
- package/dist/types-ts4.5/tools/get-all-icons/list-get-all-icons-tool.d.ts +2 -0
- package/dist/types-ts4.5/tools/get-all-tokens/{index.d.ts → get-all-tokens-tool.d.ts} +0 -2
- package/dist/types-ts4.5/tools/get-all-tokens/list-get-all-tokens-tool.d.ts +2 -0
- package/dist/types-ts4.5/tools/get-atlaskit-components/atlaskit-components.codegen.d.ts +10 -0
- package/dist/types-ts4.5/tools/get-atlaskit-components/get-atlaskit-components-tool.d.ts +6 -0
- package/dist/types-ts4.5/tools/get-atlaskit-components/list-get-atlaskit-components-tool.d.ts +2 -0
- package/dist/types-ts4.5/tools/get-guidelines/get-guidelines-input-schema.d.ts +5 -0
- package/dist/types-ts4.5/tools/get-guidelines/get-guidelines-tool.d.ts +8 -0
- package/dist/types-ts4.5/tools/get-guidelines/list-get-guidelines-tool.d.ts +2 -0
- package/dist/types-ts4.5/tools/get-lint-rules/get-lint-rules-input-schema.d.ts +6 -0
- package/dist/types-ts4.5/tools/get-lint-rules/get-lint-rules-tool.d.ts +4 -0
- package/dist/types-ts4.5/tools/get-lint-rules/{index.d.ts → list-get-lint-rules-tool.d.ts} +0 -8
- package/dist/types-ts4.5/tools/i18n-conversion/{index.d.ts → i18n-conversion-input-schema.d.ts} +0 -8
- package/dist/types-ts4.5/tools/i18n-conversion/i18n-conversion-tool.d.ts +8 -0
- package/dist/types-ts4.5/tools/i18n-conversion/list-i18n-conversion-tool.d.ts +2 -0
- package/dist/types-ts4.5/tools/migration-guides/get-available-migration-ids.d.ts +12 -0
- package/dist/types-ts4.5/tools/migration-guides/{registry.d.ts → get-available-migrations-description.d.ts} +0 -5
- package/dist/types-ts4.5/tools/migration-guides/list-migration-guides-tool.d.ts +2 -0
- package/dist/types-ts4.5/tools/migration-guides/{index.d.ts → migration-guides-input-schema.d.ts} +0 -8
- package/dist/types-ts4.5/tools/migration-guides/migration-guides-tool.d.ts +8 -0
- package/dist/types-ts4.5/tools/migration-guides/migrations/onboarding-jira-spotlight.d.ts +2 -0
- package/dist/types-ts4.5/tools/migration-guides/migrations/onboarding-multi-step.d.ts +2 -0
- package/dist/types-ts4.5/tools/migration-guides/migrations/onboarding-single-step.d.ts +2 -0
- package/dist/types-ts4.5/tools/migration-guides/migrations/onboarding-with-motion.d.ts +2 -0
- package/dist/types-ts4.5/tools/plan/list-plan-tool.d.ts +2 -0
- package/dist/types-ts4.5/tools/plan/{index.d.ts → plan-input-schema.d.ts} +3 -15
- package/dist/types-ts4.5/tools/plan/plan-tool.d.ts +15 -0
- package/dist/types-ts4.5/tools/search-atlaskit-components/list-search-atlaskit-components-tool.d.ts +2 -0
- package/dist/types-ts4.5/tools/search-atlaskit-components/search-atlaskit-components-input-schema.d.ts +11 -0
- package/dist/types-ts4.5/tools/search-atlaskit-components/search-atlaskit-components-tool.d.ts +4 -0
- package/dist/types-ts4.5/tools/search-components/list-search-components-tool.d.ts +2 -0
- package/dist/{types/tools/search-components/index.d.ts → types-ts4.5/tools/search-components/search-components-input-schema.d.ts} +0 -3
- package/dist/types-ts4.5/tools/search-components/search-components-tool.d.ts +4 -0
- package/dist/types-ts4.5/tools/search-icons/list-search-icons-tool.d.ts +2 -0
- package/dist/{types/tools/search-icons/index.d.ts → types-ts4.5/tools/search-icons/search-icons-input-schema.d.ts} +0 -3
- package/dist/types-ts4.5/tools/search-icons/search-icons-tool.d.ts +4 -0
- package/dist/types-ts4.5/tools/search-tokens/list-search-tokens-tool.d.ts +2 -0
- package/dist/types-ts4.5/tools/search-tokens/{index.d.ts → search-tokens-input-schema.d.ts} +0 -3
- package/dist/types-ts4.5/tools/search-tokens/search-tokens-tool.d.ts +4 -0
- package/dist/types-ts4.5/tools/suggest-a11y-fixes/list-suggest-a11y-fixes-tool.d.ts +2 -0
- package/dist/types-ts4.5/tools/suggest-a11y-fixes/{index.d.ts → suggest-a11y-fixes-input-schema.d.ts} +0 -8
- package/dist/types-ts4.5/tools/suggest-a11y-fixes/suggest-a11y-fixes-tool.d.ts +8 -0
- package/i18n-conversion-guide/package.json +14 -0
- package/index.js +0 -2
- package/migration-registry/package.json +14 -0
- package/package.json +4 -9
- package/tools/analyze-a11y/package.json +5 -5
- package/tools/get-a11y-guidelines/package.json +5 -5
- package/tools/get-all-components/package.json +5 -5
- package/tools/get-all-icons/package.json +5 -5
- package/tools/get-all-tokens/package.json +5 -5
- package/tools/get-guidelines/package.json +5 -5
- package/tools/get-lint-rules/package.json +5 -5
- package/tools/i18n-conversion/package.json +5 -5
- package/tools/migration-guides/package.json +5 -5
- package/tools/plan/package.json +5 -5
- package/tools/search-components/package.json +5 -5
- package/tools/search-icons/package.json +5 -5
- package/tools/search-tokens/package.json +5 -5
- package/tools/suggest-a11y-fixes/package.json +5 -5
- package/dist/cjs/tools/analyze-a11y/index.js +0 -483
- package/dist/cjs/tools/migration-guides/migrations/onboarding-to-spotlight.js +0 -77
- package/dist/es2019/tools/analyze-a11y/index.js +0 -432
- package/dist/es2019/tools/get-a11y-guidelines/index.js +0 -58
- package/dist/es2019/tools/migration-guides/index.js +0 -69
- package/dist/es2019/tools/migration-guides/migrations/onboarding-to-spotlight.js +0 -646
- package/dist/es2019/tools/plan/index.js +0 -147
- package/dist/esm/tools/analyze-a11y/index.js +0 -478
- package/dist/esm/tools/migration-guides/migrations/onboarding-to-spotlight.js +0 -71
- package/dist/types/tools/analyze-a11y/index.d.ts +0 -48
- package/dist/types/tools/get-a11y-guidelines/index.d.ts +0 -16
- package/dist/types/tools/get-guidelines/index.d.ts +0 -13
- package/dist/types/tools/i18n-conversion/index.d.ts +0 -16
- package/dist/types/tools/migration-guides/index.d.ts +0 -19
- package/dist/types/tools/migration-guides/migrations/onboarding-to-spotlight.d.ts +0 -5
- package/dist/types-ts4.5/tools/analyze-a11y/index.d.ts +0 -48
- package/dist/types-ts4.5/tools/get-a11y-guidelines/index.d.ts +0 -16
- package/dist/types-ts4.5/tools/get-guidelines/index.d.ts +0 -13
- package/dist/types-ts4.5/tools/migration-guides/migrations/onboarding-to-spotlight.d.ts +0 -5
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
|
|
2
|
+
import { atlaskitComponents } from './atlaskit-components.codegen';
|
|
3
|
+
export const getAtlaskitComponentsTool = async () => {
|
|
4
|
+
const components = atlaskitComponents.map(component => ({
|
|
5
|
+
name: component.name,
|
|
6
|
+
package: component.package
|
|
7
|
+
}));
|
|
8
|
+
return {
|
|
9
|
+
content: [{
|
|
10
|
+
type: 'text',
|
|
11
|
+
text: JSON.stringify(components, null, 2)
|
|
12
|
+
}]
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
|
|
2
|
+
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { zodToJsonSchema } from '../../helpers';
|
|
5
|
+
export const listGetAtlaskitComponentsTool = {
|
|
6
|
+
name: 'atlaskit_get_components',
|
|
7
|
+
description: `Returns the names and packages of all atlaskit components excluding components covered by the Atlassian Design System.
|
|
8
|
+
|
|
9
|
+
WHEN TO USE:
|
|
10
|
+
Use this when you want to see what components are available without the full metadata payload.
|
|
11
|
+
|
|
12
|
+
No parameters.`,
|
|
13
|
+
annotations: {
|
|
14
|
+
title: 'Get all Atlaskit components',
|
|
15
|
+
readOnlyHint: true,
|
|
16
|
+
destructiveHint: false,
|
|
17
|
+
idempotentHint: true,
|
|
18
|
+
openWorldHint: true
|
|
19
|
+
},
|
|
20
|
+
inputSchema: zodToJsonSchema(z.object({}))
|
|
21
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const getGuidelinesInputSchema = z.object({
|
|
3
|
+
terms: z.array(z.string()).default([]).describe('Search terms matched against guideline keywords and body (fuzzy). Examples: `["empty state", "voice tone"]`, `["color tokens", "spacing"]`, `["elevation", "grid"]`. Omit or use an empty array to return **all** guidelines as Markdown.').optional(),
|
|
4
|
+
limit: z.number().default(1).describe('Max matches **per term** when `terms` is non-empty (default 1). Ignored when returning all guidelines.').optional()
|
|
5
|
+
});
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
|
|
2
|
+
import Fuse from 'fuse.js';
|
|
3
|
+
import { cleanQuery } from '../../helpers/clean-query';
|
|
4
|
+
import { guidelinesStructuredContent } from './guidelines-structured-content.codegen';
|
|
5
|
+
export const getGuidelinesTool = async params => {
|
|
6
|
+
const {
|
|
7
|
+
terms = [],
|
|
8
|
+
limit = 1
|
|
9
|
+
} = params;
|
|
10
|
+
const searchTerms = terms.filter(Boolean).map(cleanQuery);
|
|
11
|
+
const guidelineDocs = guidelinesStructuredContent;
|
|
12
|
+
|
|
13
|
+
// If no search terms provided, return all guidelines formatted as Markdown
|
|
14
|
+
if (searchTerms.length === 0) {
|
|
15
|
+
const allGuidelinesMarkdown = guidelineDocs.map(guideline => guideline.content).join('\n\n');
|
|
16
|
+
return {
|
|
17
|
+
content: [{
|
|
18
|
+
type: 'text',
|
|
19
|
+
text: allGuidelinesMarkdown
|
|
20
|
+
}]
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Use Fuse.js to fuzzy-search by keywords and content
|
|
25
|
+
const fuse = new Fuse(guidelineDocs, {
|
|
26
|
+
keys: [{
|
|
27
|
+
name: 'keywords',
|
|
28
|
+
weight: 3
|
|
29
|
+
}, {
|
|
30
|
+
name: 'content',
|
|
31
|
+
weight: 1
|
|
32
|
+
}],
|
|
33
|
+
threshold: 0.4
|
|
34
|
+
});
|
|
35
|
+
const results = searchTerms.map(term => fuse.search(term).slice(0, limit)).flat();
|
|
36
|
+
|
|
37
|
+
// Remove duplicates by content (same guideline can match multiple terms)
|
|
38
|
+
const seen = new Set();
|
|
39
|
+
const uniqueResults = results.filter(result => {
|
|
40
|
+
const text = result.item.content;
|
|
41
|
+
if (seen.has(text)) {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
seen.add(text);
|
|
45
|
+
return true;
|
|
46
|
+
});
|
|
47
|
+
const matchedGuidelines = uniqueResults.map(result => result.item);
|
|
48
|
+
const formattedGuidelines = matchedGuidelines.map(guideline => guideline.content).join('\n\n');
|
|
49
|
+
return {
|
|
50
|
+
content: [{
|
|
51
|
+
type: 'text',
|
|
52
|
+
text: formattedGuidelines
|
|
53
|
+
}]
|
|
54
|
+
};
|
|
55
|
+
};
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
/* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { cleanQuery, zodToJsonSchema } from '../../helpers';
|
|
6
|
-
import { guidelinesStructuredContent } from './guidelines-structured-content.codegen';
|
|
7
|
-
export const getGuidelinesInputSchema = z.object({
|
|
8
|
-
terms: z.array(z.string()).default([]).describe('Search terms matched against guideline keywords and body (fuzzy). Examples: `["empty state", "voice tone"]`, `["color tokens", "spacing"]`, `["elevation", "grid"]`. Omit or use an empty array to return **all** guidelines as Markdown.').optional(),
|
|
9
|
-
limit: z.number().default(1).describe('Max matches **per term** when `terms` is non-empty (default 1). Ignored when returning all guidelines.').optional()
|
|
10
|
-
});
|
|
3
|
+
import { zodToJsonSchema } from '../../helpers/zod-to-json-schema';
|
|
4
|
+
import { getGuidelinesInputSchema } from './get-guidelines-input-schema';
|
|
11
5
|
export const listGetGuidelinesTool = {
|
|
12
6
|
name: 'ads_get_guidelines',
|
|
13
7
|
description: `Returns Atlassian Design System (ADS) **foundations** guidelines as Markdown: the bundled design-system-docs foundations set (not component API docs).
|
|
@@ -37,55 +31,4 @@ It is **not** for picking a component’s props or package (use \`ads_plan\` / \
|
|
|
37
31
|
openWorldHint: true
|
|
38
32
|
},
|
|
39
33
|
inputSchema: zodToJsonSchema(getGuidelinesInputSchema)
|
|
40
|
-
};
|
|
41
|
-
export const getGuidelinesTool = async params => {
|
|
42
|
-
const {
|
|
43
|
-
terms = [],
|
|
44
|
-
limit = 1
|
|
45
|
-
} = params;
|
|
46
|
-
const searchTerms = terms.filter(Boolean).map(cleanQuery);
|
|
47
|
-
const guidelineDocs = guidelinesStructuredContent;
|
|
48
|
-
|
|
49
|
-
// If no search terms provided, return all guidelines formatted as Markdown
|
|
50
|
-
if (searchTerms.length === 0) {
|
|
51
|
-
const allGuidelinesMarkdown = guidelineDocs.map(guideline => guideline.content).join('\n\n');
|
|
52
|
-
return {
|
|
53
|
-
content: [{
|
|
54
|
-
type: 'text',
|
|
55
|
-
text: allGuidelinesMarkdown
|
|
56
|
-
}]
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// Use Fuse.js to fuzzy-search by keywords and content
|
|
61
|
-
const fuse = new Fuse(guidelineDocs, {
|
|
62
|
-
keys: [{
|
|
63
|
-
name: 'keywords',
|
|
64
|
-
weight: 3
|
|
65
|
-
}, {
|
|
66
|
-
name: 'content',
|
|
67
|
-
weight: 1
|
|
68
|
-
}],
|
|
69
|
-
threshold: 0.4
|
|
70
|
-
});
|
|
71
|
-
const results = searchTerms.map(term => fuse.search(term).slice(0, limit)).flat();
|
|
72
|
-
|
|
73
|
-
// Remove duplicates by content (same guideline can match multiple terms)
|
|
74
|
-
const seen = new Set();
|
|
75
|
-
const uniqueResults = results.filter(result => {
|
|
76
|
-
const text = result.item.content;
|
|
77
|
-
if (seen.has(text)) {
|
|
78
|
-
return false;
|
|
79
|
-
}
|
|
80
|
-
seen.add(text);
|
|
81
|
-
return true;
|
|
82
|
-
});
|
|
83
|
-
const matchedGuidelines = uniqueResults.map(result => result.item);
|
|
84
|
-
const formattedGuidelines = matchedGuidelines.map(guideline => guideline.content).join('\n\n');
|
|
85
|
-
return {
|
|
86
|
-
content: [{
|
|
87
|
-
type: 'text',
|
|
88
|
-
text: formattedGuidelines
|
|
89
|
-
}]
|
|
90
|
-
};
|
|
91
34
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export const getLintRulesInputSchema = z.object({
|
|
4
|
+
terms: z.array(z.string()).default([]).describe('Search terms matched against rule name, description, and docs body (fuzzy unless \`exactName\` is true). Example: `["icon-label", "xcss", "design token"]`. Omit or empty: return **all** rules as JSON.').optional(),
|
|
5
|
+
limit: z.number().default(1).describe('Max matches **per term** when searching (default 1). Not used when returning all rules.').optional(),
|
|
6
|
+
exactName: z.boolean().default(false).describe('If true, resolve each term by **exact** ESLint rule name (case-insensitive). If false, fuzzy search across name, description, and content.').optional()
|
|
7
|
+
});
|
|
@@ -1,35 +1,8 @@
|
|
|
1
1
|
/* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
|
|
2
2
|
|
|
3
3
|
import Fuse from 'fuse.js';
|
|
4
|
-
import {
|
|
5
|
-
import { cleanQuery, zodToJsonSchema } from '../../helpers';
|
|
4
|
+
import { cleanQuery } from '../../helpers/clean-query';
|
|
6
5
|
import { lintRulesMcpStructuredContent } from './lint-rules-structured-content.codegen';
|
|
7
|
-
export const getLintRulesInputSchema = z.object({
|
|
8
|
-
terms: z.array(z.string()).default([]).describe('Search terms matched against rule name, description, and docs body (fuzzy unless \`exactName\` is true). Example: `["icon-label", "xcss", "design token"]`. Omit or empty: return **all** rules as JSON.').optional(),
|
|
9
|
-
limit: z.number().default(1).describe('Max matches **per term** when searching (default 1). Not used when returning all rules.').optional(),
|
|
10
|
-
exactName: z.boolean().default(false).describe('If true, resolve each term by **exact** ESLint rule name (case-insensitive). If false, fuzzy search across name, description, and content.').optional()
|
|
11
|
-
});
|
|
12
|
-
export const listGetLintRulesTool = {
|
|
13
|
-
name: 'ads_get_lint_rules',
|
|
14
|
-
description: `Returns documentation for **Constellation** (Atlassian Design System) ESLint rules shipped with this MCP—rule purpose, examples, and fixes where available.
|
|
15
|
-
|
|
16
|
-
WHAT YOU GET:
|
|
17
|
-
- No \`terms\`: JSON array of all rule payloads.
|
|
18
|
-
- With \`terms\`: fuzzy search (or exact rule name when \`exactName\` is true); JSON for one or more matching rules.
|
|
19
|
-
|
|
20
|
-
WHEN TO USE:
|
|
21
|
-
Explaining or fixing an ESLint message from ADS rules (e.g. \`icon-label\`, \`ensure-proper-xcss-usage\`, \`no-deprecated-apis\`), or browsing rule docs without opening the repo. Prefer this over guessing from rule id alone.
|
|
22
|
-
|
|
23
|
-
This tool does not run ESLint; it only returns bundled documentation.`,
|
|
24
|
-
annotations: {
|
|
25
|
-
title: 'Get ADS ESLint rule docs',
|
|
26
|
-
readOnlyHint: true,
|
|
27
|
-
destructiveHint: false,
|
|
28
|
-
idempotentHint: true,
|
|
29
|
-
openWorldHint: true
|
|
30
|
-
},
|
|
31
|
-
inputSchema: zodToJsonSchema(getLintRulesInputSchema)
|
|
32
|
-
};
|
|
33
6
|
export const getLintRulesTool = async params => {
|
|
34
7
|
const {
|
|
35
8
|
terms = [],
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
|
|
2
|
+
import { zodToJsonSchema } from '../../helpers/zod-to-json-schema';
|
|
3
|
+
import { getLintRulesInputSchema } from './get-lint-rules-input-schema';
|
|
4
|
+
export const listGetLintRulesTool = {
|
|
5
|
+
name: 'ads_get_lint_rules',
|
|
6
|
+
description: `Returns documentation for **Constellation** (Atlassian Design System) ESLint rules shipped with this MCP—rule purpose, examples, and fixes where available.
|
|
7
|
+
|
|
8
|
+
WHAT YOU GET:
|
|
9
|
+
- No \`terms\`: JSON array of all rule payloads.
|
|
10
|
+
- With \`terms\`: fuzzy search (or exact rule name when \`exactName\` is true); JSON for one or more matching rules.
|
|
11
|
+
|
|
12
|
+
WHEN TO USE:
|
|
13
|
+
Explaining or fixing an ESLint message from ADS rules (e.g. \`icon-label\`, \`ensure-proper-xcss-usage\`, \`no-deprecated-apis\`), or browsing rule docs without opening the repo. Prefer this over guessing from rule id alone.
|
|
14
|
+
|
|
15
|
+
This tool does not run ESLint; it only returns bundled documentation.`,
|
|
16
|
+
annotations: {
|
|
17
|
+
title: 'Get ADS ESLint rule docs',
|
|
18
|
+
readOnlyHint: true,
|
|
19
|
+
destructiveHint: false,
|
|
20
|
+
idempotentHint: true,
|
|
21
|
+
openWorldHint: true
|
|
22
|
+
},
|
|
23
|
+
inputSchema: zodToJsonSchema(getLintRulesInputSchema)
|
|
24
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export const i18nConversionInputSchema = z.object({
|
|
4
|
+
guide: z.enum(['hardcoded-string-to-formatmessage']).describe('Which bundled guide to return. Currently only `hardcoded-string-to-formatmessage` (JSX literals → `formatMessage` / intl patterns).')
|
|
5
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
|
|
2
|
+
|
|
3
|
+
import { i18nConversionGuide } from './guide';
|
|
4
|
+
export const i18nConversionTool = async _params => {
|
|
5
|
+
return {
|
|
6
|
+
content: [{
|
|
7
|
+
type: 'text',
|
|
8
|
+
text: JSON.stringify(i18nConversionGuide, null, 2)
|
|
9
|
+
}]
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
/* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { i18nConversionGuide } from './guide';
|
|
6
|
-
export const i18nConversionInputSchema = z.object({
|
|
7
|
-
guide: z.enum(['hardcoded-string-to-formatmessage']).describe('Which bundled guide to return. Currently only `hardcoded-string-to-formatmessage` (JSX literals → `formatMessage` / intl patterns).')
|
|
8
|
-
});
|
|
3
|
+
import { zodToJsonSchema } from '../../helpers/zod-to-json-schema';
|
|
4
|
+
import { i18nConversionInputSchema } from './i18n-conversion-input-schema';
|
|
9
5
|
export const listI18nConversionTool = {
|
|
10
6
|
name: 'ads_i18n_conversion_guide',
|
|
11
7
|
description: `Returns a **bundled** step-by-step guide for replacing hardcoded UI strings with \`formatMessage\` (and related patterns) using @atlassian/jira-intl or react-intl-next: message constants, placeholders, descriptions, and scope/limitations for systematic refactors.
|
|
@@ -26,12 +22,4 @@ WHEN TO USE / TYPICAL TRIGGERS:
|
|
|
26
22
|
openWorldHint: false
|
|
27
23
|
},
|
|
28
24
|
inputSchema: zodToJsonSchema(i18nConversionInputSchema)
|
|
29
|
-
};
|
|
30
|
-
export const i18nConversionTool = async _params => {
|
|
31
|
-
return {
|
|
32
|
-
content: [{
|
|
33
|
-
type: 'text',
|
|
34
|
-
text: JSON.stringify(i18nConversionGuide, null, 2)
|
|
35
|
-
}]
|
|
36
|
-
};
|
|
37
25
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
|
|
10
|
+
import { migrationRegistry } from './migration-registry';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Get all available migration IDs for use in the tool schema
|
|
14
|
+
*/
|
|
15
|
+
export const getAvailableMigrationIds = () => {
|
|
16
|
+
return Object.keys(migrationRegistry);
|
|
17
|
+
};
|
package/dist/es2019/tools/migration-guides/{registry.js → get-available-migrations-description.js}
RENAMED
|
@@ -8,12 +8,6 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { migrationRegistry } from './migration-registry';
|
|
11
|
-
/**
|
|
12
|
-
* Get all available migration IDs for use in the tool schema
|
|
13
|
-
*/
|
|
14
|
-
export const getAvailableMigrationIds = () => {
|
|
15
|
-
return Object.keys(migrationRegistry);
|
|
16
|
-
};
|
|
17
11
|
|
|
18
12
|
/**
|
|
19
13
|
* Get a formatted list of available migrations with descriptions
|
|
@@ -21,5 +15,4 @@ export const getAvailableMigrationIds = () => {
|
|
|
21
15
|
*/
|
|
22
16
|
export const getAvailableMigrationsDescription = () => {
|
|
23
17
|
return Object.values(migrationRegistry).map(m => `- "${m.id}": ${m.description}`);
|
|
24
|
-
};
|
|
25
|
-
export { migrationRegistry } from './migration-registry';
|
|
18
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
|
|
2
|
+
|
|
3
|
+
import { zodToJsonSchema } from '../../helpers/zod-to-json-schema';
|
|
4
|
+
import { getAvailableMigrationsDescription } from './get-available-migrations-description';
|
|
5
|
+
import { migrationGuidesInputSchema } from './migration-guides-input-schema';
|
|
6
|
+
export const listMigrationGuidesTool = {
|
|
7
|
+
name: 'ads_migration_guides',
|
|
8
|
+
description: `Returns a structured Atlassian Design System (ADS) **migration guide** for a known package or API migration (before/after examples, best practices, links).
|
|
9
|
+
|
|
10
|
+
WHEN TO USE:
|
|
11
|
+
You are upgrading or refactoring code between ADS packages or APIs and need the official migration pattern for a specific id listed below.
|
|
12
|
+
|
|
13
|
+
Pass **both** \`migration\` and \`description\` using a **matching pair** from the enum (schema enforces valid combinations).
|
|
14
|
+
|
|
15
|
+
Available migrations:
|
|
16
|
+
${getAvailableMigrationsDescription()}`,
|
|
17
|
+
annotations: {
|
|
18
|
+
title: 'ADS Migration Guides',
|
|
19
|
+
readOnlyHint: true,
|
|
20
|
+
destructiveHint: false,
|
|
21
|
+
idempotentHint: true,
|
|
22
|
+
openWorldHint: false
|
|
23
|
+
},
|
|
24
|
+
inputSchema: zodToJsonSchema(migrationGuidesInputSchema)
|
|
25
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { getAvailableMigrationIds } from './get-available-migration-ids';
|
|
4
|
+
import { getAvailableMigrationsDescription } from './get-available-migrations-description';
|
|
5
|
+
const migrationIds = getAvailableMigrationIds();
|
|
6
|
+
const migrationDescriptions = getAvailableMigrationsDescription();
|
|
7
|
+
export const migrationGuidesInputSchema = z.object({
|
|
8
|
+
migration: z.enum(migrationIds).describe('Migration id from the registry. Must match the guide you want (see tool description list).'),
|
|
9
|
+
description: z.enum(migrationDescriptions).describe('Human-readable migration label that pairs with `migration` in the schema—choose the entry that matches the selected id.')
|
|
10
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
|
|
2
|
+
|
|
3
|
+
import { getAvailableMigrationIds } from './get-available-migration-ids';
|
|
4
|
+
import { migrationRegistry } from './migration-registry';
|
|
5
|
+
export const migrationGuidesTool = async params => {
|
|
6
|
+
const {
|
|
7
|
+
migration
|
|
8
|
+
} = params;
|
|
9
|
+
const guide = migrationRegistry[migration];
|
|
10
|
+
if (!guide) {
|
|
11
|
+
// This shouldn't happen if the schema validation works, but handle gracefully
|
|
12
|
+
return {
|
|
13
|
+
content: [{
|
|
14
|
+
type: 'text',
|
|
15
|
+
text: JSON.stringify({
|
|
16
|
+
error: `Unknown migration: ${migration}`,
|
|
17
|
+
availableMigrations: getAvailableMigrationIds(),
|
|
18
|
+
suggestion: 'Please use one of the available migration IDs listed above.'
|
|
19
|
+
}, null, 2)
|
|
20
|
+
}]
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
content: [{
|
|
25
|
+
type: 'text',
|
|
26
|
+
text: JSON.stringify({
|
|
27
|
+
migration: guide.id,
|
|
28
|
+
title: guide.title,
|
|
29
|
+
description: guide.description,
|
|
30
|
+
fromPackage: guide.fromPackage,
|
|
31
|
+
toPackage: guide.toPackage,
|
|
32
|
+
examples: guide.examples,
|
|
33
|
+
bestPractices: guide.bestPractices,
|
|
34
|
+
additionalResources: guide.additionalResources,
|
|
35
|
+
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']
|
|
36
|
+
}, null, 2)
|
|
37
|
+
}]
|
|
38
|
+
};
|
|
39
|
+
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import { onboardingJiraSpotlight
|
|
1
|
+
import { onboardingJiraSpotlight } from './migrations/onboarding-jira-spotlight';
|
|
2
|
+
import { onboardingMultiStep } from './migrations/onboarding-multi-step';
|
|
3
|
+
import { onboardingSingleStep } from './migrations/onboarding-single-step';
|
|
4
|
+
import { onboardingWithMotion } from './migrations/onboarding-with-motion';
|
|
2
5
|
export const migrationRegistry = {
|
|
3
6
|
[onboardingJiraSpotlight.id]: onboardingJiraSpotlight,
|
|
4
7
|
[onboardingSingleStep.id]: onboardingSingleStep,
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
const additionalResources = 'Visit https://hello.atlassian.net/wiki/spaces/DST/pages/6069774593 or https://atlassian.design/components/spotlight for more context';
|
|
2
|
+
export const onboardingJiraSpotlight = {
|
|
3
|
+
id: 'jira-spotlight',
|
|
4
|
+
title: 'JiraSpotlight Migration',
|
|
5
|
+
description: 'Use when code contains `JiraSpotlight` import from `@atlassian/jira-spotlight`',
|
|
6
|
+
fromPackage: '@atlassian/jira-spotlight',
|
|
7
|
+
toPackage: '@atlaskit/spotlight',
|
|
8
|
+
examples: [{
|
|
9
|
+
title: 'Internal <JiraSpotlight /> migration',
|
|
10
|
+
description: 'Internal migrations are possible for JiraSpotlight usages which only pass simple/textual content to JiraSpotlight children',
|
|
11
|
+
before: `
|
|
12
|
+
// file1.tsx
|
|
13
|
+
import { JiraSpotlight } from '@atlassian/jira-spotlight/src/ui/jira-spotlight.tsx';
|
|
14
|
+
|
|
15
|
+
export const OnboardingSpotlightWrapper = () => {
|
|
16
|
+
const spotlightId = 'some-unique-identifier'
|
|
17
|
+
const { dark, light } = spotlightImageUrls[spotlightId];
|
|
18
|
+
const imageUrl = colorMode === 'dark' ? dark : light;
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<JiraSpotlight
|
|
22
|
+
image={imageUrl}
|
|
23
|
+
actions={[
|
|
24
|
+
{
|
|
25
|
+
onClick,
|
|
26
|
+
text: formatMessage(dismiss),
|
|
27
|
+
},
|
|
28
|
+
]}
|
|
29
|
+
heading={formatMessage(heading)}
|
|
30
|
+
target={spotlightId}
|
|
31
|
+
key={spotlightId}
|
|
32
|
+
targetRadius={3}
|
|
33
|
+
targetBgColor={token('elevation.surface')}
|
|
34
|
+
messageId={spotlightId}
|
|
35
|
+
messageType="transactional"
|
|
36
|
+
dialogWidth={275}
|
|
37
|
+
>
|
|
38
|
+
{formatMessage(body)}
|
|
39
|
+
</JiraSpotlight>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// file2.tsx
|
|
44
|
+
import { SpotlightTarget } from '@atlaskit/onboarding';
|
|
45
|
+
|
|
46
|
+
const spotlightId = 'some-unique-identifier'
|
|
47
|
+
|
|
48
|
+
export const SomeFeature = () => {
|
|
49
|
+
return (
|
|
50
|
+
<SpotlightTarget name={spotlightId}>
|
|
51
|
+
// Target code
|
|
52
|
+
</SpotlightTarget>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
`,
|
|
56
|
+
after: `
|
|
57
|
+
// file1.tsx
|
|
58
|
+
import { JiraSpotlight } from '@atlassian/jira-spotlight/src/ui/jira-spotlight.tsx';
|
|
59
|
+
|
|
60
|
+
export const OnboardingSpotlightWrapper = () => {
|
|
61
|
+
const spotlightId = 'some-unique-identifier'
|
|
62
|
+
const { dark, light } = spotlightImageUrls[spotlightId];
|
|
63
|
+
const imageUrl = colorMode === 'dark' ? dark : light;
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<JiraSpotlight
|
|
67
|
+
isMigrated // isMigrated prop passed
|
|
68
|
+
image={imageUrl}
|
|
69
|
+
actions={[
|
|
70
|
+
{
|
|
71
|
+
onClick,
|
|
72
|
+
text: formatMessage(dismiss),
|
|
73
|
+
},
|
|
74
|
+
]}
|
|
75
|
+
heading={formatMessage(heading)}
|
|
76
|
+
target={spotlightId}
|
|
77
|
+
key={spotlightId}
|
|
78
|
+
targetRadius={3}
|
|
79
|
+
targetBgColor={token('elevation.surface')}
|
|
80
|
+
messageId={spotlightId}
|
|
81
|
+
messageType="transactional"
|
|
82
|
+
dialogWidth={275}
|
|
83
|
+
>
|
|
84
|
+
{formatMessage(body)}
|
|
85
|
+
</JiraSpotlight>
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// file2.tsx
|
|
90
|
+
// Updated SpotlightTarget import statement
|
|
91
|
+
import { SpotlightTarget } from '@atlassian/jira-spotlight/src/ui/SpotlightTarget.tsx';
|
|
92
|
+
|
|
93
|
+
export const SomeFeature = () => {
|
|
94
|
+
const spotlightId = 'some-unique-identifier'
|
|
95
|
+
|
|
96
|
+
return (
|
|
97
|
+
<SpotlightTarget name={spotlightId}>
|
|
98
|
+
// Target code
|
|
99
|
+
</SpotlightTarget>
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
`,
|
|
103
|
+
explanation: `Key changes when migrating a JiraSpotlight:
|
|
104
|
+
- A JiraSpotlight and a SpotlightTarget are part of the same usage if they share a spotlightId value - Referenced in JiraSpotlight.target and SpotlightTarget.name props
|
|
105
|
+
- Pass isMigrated={true} to JiraSpotlight.
|
|
106
|
+
- Update SpotlightTarget import statment from '@atlaskit/onboarding' to '@atlassian/jira-spotlight/src/ui/SpotlightTarget.tsx';
|
|
107
|
+
- These changes allow switching the internal implementation to '@atlaskit/spotlight' via a feature flag.
|
|
108
|
+
- This internal migration is only possible for usages that don't rely too heavily on the 'children' prop, as complex values, like heading, images, etc passed to 'children' are difficult to parse.
|
|
109
|
+
`
|
|
110
|
+
}, {
|
|
111
|
+
title: 'Complex <JiraSpotlight /> migration',
|
|
112
|
+
description: 'Complex migrations are necessary for JiraSpotlight usages that make heavy use of the `children` prop to achieve customisation instead of relying on the `heading`, `body`, `image`, and/or `actions` props.',
|
|
113
|
+
before: `
|
|
114
|
+
// file1.tsx
|
|
115
|
+
import { JiraSpotlight } from '@atlassian/jira-spotlight/src/ui/jira-spotlight.tsx';
|
|
116
|
+
|
|
117
|
+
export const OnboardingSpotlightWrapper = () => {
|
|
118
|
+
const spotlightId = 'some-unique-identifier'
|
|
119
|
+
const { dark, light } = spotlightImageUrls[spotlightId];
|
|
120
|
+
const imageUrl = colorMode === 'dark' ? dark : light;
|
|
121
|
+
|
|
122
|
+
return (
|
|
123
|
+
<JiraSpotlight
|
|
124
|
+
target={spotlightId}
|
|
125
|
+
targetRadius={3}
|
|
126
|
+
dialogPlacement=''
|
|
127
|
+
targetBgColor={token('elevation.surface')}
|
|
128
|
+
messageId={spotlightId}
|
|
129
|
+
messageType="transactional"
|
|
130
|
+
dialogWidth={275}
|
|
131
|
+
>
|
|
132
|
+
<CustomSpotlightInner>
|
|
133
|
+
{imageUrl}
|
|
134
|
+
{formatMessage(heading)}
|
|
135
|
+
{formatMessage(body)}
|
|
136
|
+
<CustomSpotlightAction>
|
|
137
|
+
{formatMessage(dismiss)}
|
|
138
|
+
</CustomSpotlightAction>
|
|
139
|
+
</CustomSpotlightInner>
|
|
140
|
+
</JiraSpotlight>
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// file2.tsx
|
|
145
|
+
import { SpotlightTarget } from '@atlaskit/onboarding';
|
|
146
|
+
|
|
147
|
+
const spotlightId = 'some-unique-identifier'
|
|
148
|
+
|
|
149
|
+
export const SomeFeature = () => {
|
|
150
|
+
return (
|
|
151
|
+
<SpotlightTarget name={spotlightId}>
|
|
152
|
+
// Target code
|
|
153
|
+
</SpotlightTarget>
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
`,
|
|
157
|
+
after: `
|
|
158
|
+
// file2.tsx - Spotlight code has been co-located to the targeted element
|
|
159
|
+
import { Text } from '@atlaskit/primitives/compiled';
|
|
160
|
+
import {
|
|
161
|
+
PopoverContent,
|
|
162
|
+
PopoverProvider,
|
|
163
|
+
PopoverTarget,
|
|
164
|
+
SpotlightActions,
|
|
165
|
+
SpotlightBody,
|
|
166
|
+
SpotlightCard,
|
|
167
|
+
SpotlightControls,
|
|
168
|
+
SpotlightDismissControl,
|
|
169
|
+
SpotlightFooter,
|
|
170
|
+
SpotlightHeader,
|
|
171
|
+
SpotlightHeadline,
|
|
172
|
+
SpotlightPrimaryAction,
|
|
173
|
+
} from '@atlaskit/spotlight';
|
|
174
|
+
import Image from '@atlaskit/image';
|
|
175
|
+
import { ChoreographedComponent } from '@atlassian/jira-spotlight/src/ui/ChoreographedComponent.tsx';
|
|
176
|
+
|
|
177
|
+
export const SomeFeature = () => {
|
|
178
|
+
const { dark, light } = spotlightImageUrls[spotlightId];
|
|
179
|
+
|
|
180
|
+
const [isSpotlightVisible, actions] = useListViewOnboarding({
|
|
181
|
+
projectId: String(projectData.id),
|
|
182
|
+
id: spotlightId,
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
return (
|
|
186
|
+
<PopoverProvider>
|
|
187
|
+
<PopoverTarget>{renderTrigger(isSpotlightVisible)}</PopoverTarget>
|
|
188
|
+
<ChoreographedComponent messageId={spotlightId} messageType="transactional">
|
|
189
|
+
<PopoverContent isVisible={isSpotlightVisible} placement="bottom-start" dismiss={onClick}>
|
|
190
|
+
<SpotlightCard>
|
|
191
|
+
<SpotlightHeader>
|
|
192
|
+
<SpotlightHeadline>{formatMessage(heading)}</SpotlightHeadline>
|
|
193
|
+
<SpotlightControls>
|
|
194
|
+
<SpotlightDismissControl />
|
|
195
|
+
</SpotlightControls>
|
|
196
|
+
</SpotlightHeader>
|
|
197
|
+
<SpotlightMedia>
|
|
198
|
+
<Image src={light} srcDark={dark} alt="" />
|
|
199
|
+
</SpotlightMedia>
|
|
200
|
+
<SpotlightBody>
|
|
201
|
+
<Text>{formatMessage(body)}</Text>
|
|
202
|
+
</SpotlightBody>
|
|
203
|
+
<SpotlightFooter>
|
|
204
|
+
<SpotlightActions>
|
|
205
|
+
<SpotlightPrimaryAction onClick={onClick}>
|
|
206
|
+
{formatMessage(dismiss)}
|
|
207
|
+
</SpotlightPrimaryAction>
|
|
208
|
+
</SpotlightActions>
|
|
209
|
+
</SpotlightFooter>
|
|
210
|
+
</SpotlightCard>
|
|
211
|
+
</PopoverContent>
|
|
212
|
+
</ChoreographedComponent>
|
|
213
|
+
</PopoverProvider>
|
|
214
|
+
);
|
|
215
|
+
};`,
|
|
216
|
+
explanation: `Key changes when migrating a single step spotlight:
|
|
217
|
+
- Replace JiraSpotlight with ChoreographedComponent from '@atlassian/jira-spotlight'.
|
|
218
|
+
- PopoverProvider maintains internal Spotlight state.
|
|
219
|
+
- Replace SpotlightTarget with PopoverTarget - wraps the element to highlight
|
|
220
|
+
- Replace Spotlight with PopoverContent containing SpotlightCard - controls visibility and positioning
|
|
221
|
+
- 'heading' becomes SpotlightHeadline inside SpotlightHeader
|
|
222
|
+
- 'actions' becomes SpotlightActions with SpotlightPrimaryAction (and optionally SpotlightSecondaryAction)
|
|
223
|
+
- 'body' content moves into SpotlightBody wrapped with Text component
|
|
224
|
+
- Add SpotlightDismissControl inside SpotlightControls for the close button
|
|
225
|
+
- The 'target' and/or 'targetName' prop is replaced with PopoverTarget directly wrapping the target element
|
|
226
|
+
- 'dialogPlacement' prop becomes 'placement' on PopoverContent. Mapping: "top right" → "top-start", "top center" → "top", "top left" → "top-end", "right bottom" → "right-start", "right middle" → "right-start | right-end", "right top" → "right-end", "bottom left" → "bottom-end", "bottom center" → "bottom", "bottom right" → "bottom-start", "left top" → "left-end", "left middle" → "left-start | left-end", "left bottom" → "left-start"'`
|
|
227
|
+
}],
|
|
228
|
+
bestPractices: [],
|
|
229
|
+
additionalResources
|
|
230
|
+
};
|