@atlaskit/ads-mcp 0.20.3 → 0.20.4
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 +6 -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.js +26 -0
- package/dist/cjs/entry-points/migration-guides.js +26 -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/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/{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 +1944 -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/get-available-migrations-description.js +25 -0
- 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/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.js +3 -0
- package/dist/es2019/entry-points/migration-guides.js +3 -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/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/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 +1938 -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/get-available-migrations-description.js +18 -0
- 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/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.js +3 -0
- package/dist/esm/entry-points/migration-guides.js +3 -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/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/{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 +1938 -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/get-available-migrations-description.js +20 -0
- 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/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.d.ts +3 -0
- package/dist/types/entry-points/migration-guides.d.ts +3 -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/{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/get-available-migrations-description.d.ts +13 -0
- 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/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.d.ts +3 -0
- package/dist/types-ts4.5/entry-points/migration-guides.d.ts +3 -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/{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/get-available-migrations-description.d.ts +13 -0
- 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/index.js +0 -2
- 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
|
@@ -1,147 +0,0 @@
|
|
|
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
|
-
import { searchComponentsTool } from '../search-components';
|
|
6
|
-
import { searchIconsTool } from '../search-icons';
|
|
7
|
-
import { searchTokensTool } from '../search-tokens';
|
|
8
|
-
export const planInputSchema = z.object({
|
|
9
|
-
tokens: z.array(z.string()).describe('Search terms for ADS design tokens (fuzzy by default). Use `[]` if you only need icons or components. Prefer **at least two** terms per non-empty list when you know what you need.'),
|
|
10
|
-
icons: z.array(z.string()).describe('Search terms for ADS icons. Use `[]` if you only need tokens or components. Prefer **at least two** terms per non-empty list when known.'),
|
|
11
|
-
components: z.array(z.string()).describe('Search terms for ADS components. Use `[]` if you only need tokens or icons. Prefer **at least two** terms per non-empty list when known.'),
|
|
12
|
-
limit: z.number().default(2).describe('Max matches **per term** for each non-empty list (default 2). Same limit applies to tokens, icons, and components searches.').optional()
|
|
13
|
-
});
|
|
14
|
-
export const listPlanTool = {
|
|
15
|
-
name: 'ads_plan',
|
|
16
|
-
description: `Runs **ads_search_tokens**, **ads_search_icons**, and **ads_search_components** in one call and returns a single JSON payload (each section only if that list was non-empty). Use this as the default way to discover ADS **tokens**, **icons**, and **components** for a UI task.
|
|
17
|
-
|
|
18
|
-
WHEN TO USE:
|
|
19
|
-
**Implementing or iterating on a UI**—new screen, feature, or polish—and you need candidate **token** names, **icon** imports, and **component** packages/props in one pass. Also use when exploring ADS building blocks before you write code.
|
|
20
|
-
|
|
21
|
-
At least one of \`tokens\`, \`icons\`, or \`components\` must contain search terms (use \`[]\` for lists you do not need).
|
|
22
|
-
|
|
23
|
-
Prefer supplying **multiple** terms per non-empty array when you know them—broader queries improve recall. Some queries return no rows where metadata is thin; try alternate wording.
|
|
24
|
-
|
|
25
|
-
This is equivalent to calling the individual search tools; there are no extra merge semantics beyond concatenating results.
|
|
26
|
-
|
|
27
|
-
Example request:
|
|
28
|
-
\`\`\`json
|
|
29
|
-
{
|
|
30
|
-
"tokens": ["spacing", "inverted text", "background primary", "animation"],
|
|
31
|
-
"icons": ["search", "folder", "user"],
|
|
32
|
-
"components": ["button", "input", "select", "heading"]
|
|
33
|
-
}
|
|
34
|
-
\`\`\`
|
|
35
|
-
|
|
36
|
-
Example token usage:
|
|
37
|
-
\`\`\`tsx
|
|
38
|
-
import { token } from '@atlaskit/tokens';
|
|
39
|
-
const styles = css({ color: token('color.text'), padding: token('space.100') });
|
|
40
|
-
\`\`\`
|
|
41
|
-
|
|
42
|
-
Example icon usage:
|
|
43
|
-
\`\`\`tsx
|
|
44
|
-
import AddIcon from '@atlaskit/icon/core/add';
|
|
45
|
-
<AddIcon label="Add work item" size="small" />
|
|
46
|
-
\`\`\``,
|
|
47
|
-
annotations: {
|
|
48
|
-
title: 'Search ADS tokens, icons, and components to plan what to build',
|
|
49
|
-
readOnlyHint: true,
|
|
50
|
-
destructiveHint: false,
|
|
51
|
-
idempotentHint: true,
|
|
52
|
-
openWorldHint: true
|
|
53
|
-
},
|
|
54
|
-
inputSchema: zodToJsonSchema(planInputSchema)
|
|
55
|
-
};
|
|
56
|
-
export const planTool = async ({
|
|
57
|
-
tokens: tokens_search,
|
|
58
|
-
icons: icons_search,
|
|
59
|
-
components: components_search,
|
|
60
|
-
limit
|
|
61
|
-
}) => {
|
|
62
|
-
// Validate that at least one search type is provided
|
|
63
|
-
if (!(tokens_search !== null && tokens_search !== void 0 && tokens_search.length) && !(icons_search !== null && icons_search !== void 0 && icons_search.length) && !(components_search !== null && components_search !== void 0 && components_search.length)) {
|
|
64
|
-
return {
|
|
65
|
-
isError: true,
|
|
66
|
-
content: [{
|
|
67
|
-
type: 'text',
|
|
68
|
-
text: 'Error: At least one search type (tokens_search, icons_search, or components_search) must be provided with search terms'
|
|
69
|
-
}]
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
const results = {};
|
|
73
|
-
|
|
74
|
-
// Execute searches in parallel
|
|
75
|
-
const searchPromises = [];
|
|
76
|
-
if (tokens_search !== null && tokens_search !== void 0 && tokens_search.length) {
|
|
77
|
-
searchPromises.push(searchTokensTool({
|
|
78
|
-
terms: tokens_search,
|
|
79
|
-
limit
|
|
80
|
-
}).then(result => {
|
|
81
|
-
results.tokens = result;
|
|
82
|
-
}));
|
|
83
|
-
}
|
|
84
|
-
if (icons_search !== null && icons_search !== void 0 && icons_search.length) {
|
|
85
|
-
searchPromises.push(searchIconsTool({
|
|
86
|
-
terms: icons_search,
|
|
87
|
-
limit
|
|
88
|
-
}).then(result => {
|
|
89
|
-
results.icons = result;
|
|
90
|
-
}));
|
|
91
|
-
}
|
|
92
|
-
if (components_search !== null && components_search !== void 0 && components_search.length) {
|
|
93
|
-
searchPromises.push(searchComponentsTool({
|
|
94
|
-
terms: components_search,
|
|
95
|
-
limit
|
|
96
|
-
}).then(result => {
|
|
97
|
-
results.components = result;
|
|
98
|
-
}));
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// Wait for all searches to complete
|
|
102
|
-
await Promise.all(searchPromises);
|
|
103
|
-
|
|
104
|
-
// Helper function to safely count results
|
|
105
|
-
const getResultCount = result => {
|
|
106
|
-
var _result$content;
|
|
107
|
-
if (!result || result.isError || !((_result$content = result.content) !== null && _result$content !== void 0 && _result$content[0])) {
|
|
108
|
-
return 0;
|
|
109
|
-
}
|
|
110
|
-
const firstContent = result.content[0];
|
|
111
|
-
if (firstContent.type !== 'text') {
|
|
112
|
-
return 0;
|
|
113
|
-
}
|
|
114
|
-
try {
|
|
115
|
-
const parsed = JSON.parse(firstContent.text);
|
|
116
|
-
return Array.isArray(parsed) ? parsed.length : 0;
|
|
117
|
-
} catch {
|
|
118
|
-
return 0;
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
// Format the consolidated results
|
|
123
|
-
const consolidatedResult = {
|
|
124
|
-
searchResults: {
|
|
125
|
-
...(results.tokens && {
|
|
126
|
-
tokens: results.tokens
|
|
127
|
-
}),
|
|
128
|
-
...(results.icons && {
|
|
129
|
-
icons: results.icons
|
|
130
|
-
}),
|
|
131
|
-
...(results.components && {
|
|
132
|
-
components: results.components
|
|
133
|
-
})
|
|
134
|
-
},
|
|
135
|
-
summary: {
|
|
136
|
-
tokensFound: getResultCount(results.tokens),
|
|
137
|
-
iconsFound: getResultCount(results.icons),
|
|
138
|
-
componentsFound: getResultCount(results.components)
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
return {
|
|
142
|
-
content: [{
|
|
143
|
-
type: 'text',
|
|
144
|
-
text: JSON.stringify(consolidatedResult, null, 2)
|
|
145
|
-
}]
|
|
146
|
-
};
|
|
147
|
-
};
|
|
@@ -1,478 +0,0 @@
|
|
|
1
|
-
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
|
-
import { AxePuppeteer } from '@axe-core/puppeteer';
|
|
8
|
-
/* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
|
|
9
|
-
|
|
10
|
-
import axe from 'axe-core';
|
|
11
|
-
import puppeteer from 'puppeteer';
|
|
12
|
-
import { z } from 'zod';
|
|
13
|
-
import { zodToJsonSchema } from '../../helpers';
|
|
14
|
-
export var analyzeA11yInputSchema = z.object({
|
|
15
|
-
code: z.string().describe('Source code of a React component or JSX snippet to analyze (string content only—no file path).'),
|
|
16
|
-
componentName: z.string().optional().describe('Optional label for the component under review (for summaries and reports).'),
|
|
17
|
-
context: z.string().optional().describe('Optional: how the component is used (e.g. in a form, modal) to improve suggestions.'),
|
|
18
|
-
includePatternAnalysis: z.boolean().default(true).describe('When true (default), runs regex-based heuristics on the code string (e.g. unlabeled buttons, missing alt) in addition to other analysis.').optional()
|
|
19
|
-
});
|
|
20
|
-
export var listAnalyzeA11yTool = {
|
|
21
|
-
name: 'ads_analyze_a11y',
|
|
22
|
-
description: "Analyzes a **string of React/JSX** code for likely accessibility issues (heuristics and/or axe-related paths) and returns hints that often **point to** `ads_suggest_a11y_fixes` or generic axe/WCAG-style context\u2014not every finding maps to a specific ADS component fix.\n\nWHEN TO USE:\nYou have component source as text and want automated checks or heuristics before or during a code review.\n\nLIMITATIONS:\n- Does not replace testing in a real browser with assistive technologies or full keyboard traversal.\n- For rendered UI, `ads_analyze_localhost_a11y` (live URL + axe) is preferable when available\u2014it is **only exposed when this MCP runs locally**, not in the remote MCP deployment.",
|
|
23
|
-
annotations: {
|
|
24
|
-
title: 'Analyze accessibility (code string)',
|
|
25
|
-
readOnlyHint: true,
|
|
26
|
-
destructiveHint: false,
|
|
27
|
-
idempotentHint: true,
|
|
28
|
-
openWorldHint: true
|
|
29
|
-
},
|
|
30
|
-
inputSchema: zodToJsonSchema(analyzeA11yInputSchema)
|
|
31
|
-
};
|
|
32
|
-
export var analyzeA11yLocalhostInputSchema = z.object({
|
|
33
|
-
url: z.string().describe('Fully qualified page URL to load (e.g. `http://localhost:9000` or a dev URL). Must be reachable from this MCP process.'),
|
|
34
|
-
componentName: z.string().optional().describe('Optional label for reporting (e.g. feature or component under test).'),
|
|
35
|
-
context: z.string().optional().describe('Optional: route, user flow, or feature context for the analyzed page.'),
|
|
36
|
-
selector: z.string().optional().describe('Optional CSS selector to scope axe analysis to a subtree (e.g. `#my-form`, `[data-testid="panel"]`). Omit to analyze the whole document.')
|
|
37
|
-
});
|
|
38
|
-
export var listAnalyzeLocalhostA11yTool = {
|
|
39
|
-
name: 'ads_analyze_localhost_a11y',
|
|
40
|
-
description: "Loads a **live URL** in a headless browser, runs **axe-core**, and returns violations with follow-up hints (often suggesting `ads_suggest_a11y_fixes`). Output is anchored in **axe** rule text; remediation may be generic or ADS-biased depending on the violation.\n\n**Availability:** This tool is only registered when the ADS MCP runs **on your machine** (local MCP). It is **not** available in the **remote** MCP offering\u2014use `ads_analyze_a11y` on source text there instead.\n\nWHEN TO USE:\nYou have a running app or storybook page and need automated accessibility results on **rendered** UI\u2014especially local or staging URLs.\n\nLIMITATIONS:\n- Does not replace manual testing with assistive technologies or keyboard-only navigation.\n- Requires network access to the URL from the environment running the MCP.",
|
|
41
|
-
annotations: {
|
|
42
|
-
title: 'Analyze accessibility (live URL)',
|
|
43
|
-
readOnlyHint: true,
|
|
44
|
-
destructiveHint: false,
|
|
45
|
-
idempotentHint: true,
|
|
46
|
-
openWorldHint: true
|
|
47
|
-
},
|
|
48
|
-
inputSchema: zodToJsonSchema(analyzeA11yLocalhostInputSchema)
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
// Common accessibility patterns to detect in code
|
|
52
|
-
var accessibilityPatterns = [{
|
|
53
|
-
pattern: /<button[^>]*>(?!.*aria-label|.*>.*<\/button>)/g,
|
|
54
|
-
violation: 'Button without accessible text',
|
|
55
|
-
severity: 'error',
|
|
56
|
-
suggestion: 'Use the ads_suggest_a11y_fixes tool for ADS Button solutions. Describe the issue as "button missing label", "empty button", or "button needs text".'
|
|
57
|
-
}, {
|
|
58
|
-
pattern: /<img[^>]*>(?!.*alt=)/g,
|
|
59
|
-
violation: 'Image without alt text',
|
|
60
|
-
severity: 'error',
|
|
61
|
-
suggestion: 'Use the ads_suggest_a11y_fixes tool for ADS Image solutions. Describe the issue as "image missing alt", "missing alt text", or "image accessibility".'
|
|
62
|
-
}, {
|
|
63
|
-
pattern: /<div[^>]*onClick[^>]*>/g,
|
|
64
|
-
violation: 'Clickable div without accessibility',
|
|
65
|
-
severity: 'warning',
|
|
66
|
-
suggestion: 'Use the ads_suggest_a11y_fixes tool for ADS solutions. Describe the issue as "clickable div", "interactive div", or "div with click handler".'
|
|
67
|
-
}, {
|
|
68
|
-
pattern: /color:\s*['"]#[0-9a-fA-F]{3,6}['"]/g,
|
|
69
|
-
violation: 'Hardcoded color values',
|
|
70
|
-
severity: 'warning',
|
|
71
|
-
suggestion: 'Use the ads_suggest_a11y_fixes tool for design token solutions. Describe the issue as "hardcoded colors", "hex colors", or "design tokens".'
|
|
72
|
-
}, {
|
|
73
|
-
pattern: /<input[^>]*>(?!.*id=)/g,
|
|
74
|
-
violation: 'Input without associated label',
|
|
75
|
-
severity: 'error',
|
|
76
|
-
suggestion: 'Use the ads_suggest_a11y_fixes tool for ADS form solutions. Describe the issue as "input missing label", "form field without label", or "unlabeled input".'
|
|
77
|
-
}, {
|
|
78
|
-
pattern: /<div[^>]*role="button"[^>]*>/g,
|
|
79
|
-
violation: 'Custom button without full accessibility',
|
|
80
|
-
severity: 'warning',
|
|
81
|
-
suggestion: 'Use the ads_suggest_a11y_fixes tool for ADS Button/Focusable solutions. Describe the issue as "custom button", "div with button role", or "interactive element".'
|
|
82
|
-
}, {
|
|
83
|
-
pattern: /style=\{[^}]*color[^}]*\}/g,
|
|
84
|
-
violation: 'Inline color styles',
|
|
85
|
-
severity: 'warning',
|
|
86
|
-
suggestion: 'Use the ads_suggest_a11y_fixes tool for design token solutions. Describe the issue as "inline styles", "hardcoded colors", or "color tokens".'
|
|
87
|
-
}];
|
|
88
|
-
|
|
89
|
-
// ADS accessibility guidelines reference
|
|
90
|
-
var adsGuidelines = {
|
|
91
|
-
buttons: {
|
|
92
|
-
title: 'Button Accessibility',
|
|
93
|
-
guidelines: ['Always provide accessible labels for buttons', 'Use Button component for standard interactions', 'Use Focusable component for custom interactive elements', 'Avoid disabled buttons with tooltips', 'Ensure focus indicators are visible']
|
|
94
|
-
},
|
|
95
|
-
forms: {
|
|
96
|
-
title: 'Form Accessibility',
|
|
97
|
-
guidelines: ['Use TextField component for consistent labeling', 'Associate labels with inputs using id and htmlFor', 'Provide clear error messages with aria-describedby', 'Use MessageWrapper for form validation announcements']
|
|
98
|
-
},
|
|
99
|
-
images: {
|
|
100
|
-
title: 'Image Accessibility',
|
|
101
|
-
guidelines: ['Use Image component with proper alt text', 'Keep alt text under 125 characters', 'Leave alt="" for decorative images', 'Describe the purpose, not just the content']
|
|
102
|
-
},
|
|
103
|
-
colors: {
|
|
104
|
-
title: 'Color and Contrast',
|
|
105
|
-
guidelines: ['Use design tokens for consistent contrast ratios', 'Never rely on color alone for information', 'Use color.text tokens for proper contrast', 'Test with high contrast mode']
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
// Helper function to map axe-core violations to ADS-specific fixes
|
|
110
|
-
function mapAxeViolationsToADSFixes(violations) {
|
|
111
|
-
return violations.map(function (violation) {
|
|
112
|
-
var adsFix = generateADSFixForViolation(violation);
|
|
113
|
-
return _objectSpread(_objectSpread({}, violation), {}, {
|
|
114
|
-
type: adsFix.title,
|
|
115
|
-
// Use the specific fix key that matches fixes.ts
|
|
116
|
-
adsFix: adsFix,
|
|
117
|
-
severity: violation.impact === 'critical' || violation.impact === 'serious' ? 'error' : 'warning'
|
|
118
|
-
});
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// Helper function to provide ADS-specific guidance for axe-core violations
|
|
123
|
-
function generateADSFixForViolation(violation) {
|
|
124
|
-
var id = violation.id,
|
|
125
|
-
description = violation.description,
|
|
126
|
-
help = violation.help,
|
|
127
|
-
tags = violation.tags;
|
|
128
|
-
|
|
129
|
-
// Provide general guidance without trying to map to specific fixes.ts keys
|
|
130
|
-
var adsFix = "Use the ads_suggest_a11y_fixes tool to get specific ADS component solutions. Describe the issue using the violation details: \"".concat(help, "\" or in your own words (e.g., \"button has no text\", \"missing alt text\", \"form field needs label\").");
|
|
131
|
-
return {
|
|
132
|
-
title: help,
|
|
133
|
-
// Use axe-core's human-readable description
|
|
134
|
-
description: description,
|
|
135
|
-
adsFix: adsFix,
|
|
136
|
-
example: 'The ads_suggest_a11y_fixes tool provides detailed code examples and ADS component solutions',
|
|
137
|
-
violationId: id,
|
|
138
|
-
axeHelp: help,
|
|
139
|
-
tags: tags,
|
|
140
|
-
wcagTags: tags.filter(function (tag) {
|
|
141
|
-
return tag.startsWith('wcag');
|
|
142
|
-
}),
|
|
143
|
-
// Extract WCAG compliance info
|
|
144
|
-
reference: "https://atlassian.design/llms-a11y.txt",
|
|
145
|
-
recommendations: ['Use ADS components for better accessibility out of the box', 'Reference the ads_suggest_a11y_fixes tool for specific solutions', 'Test with keyboard navigation and screen readers', 'Use automated accessibility testing tools']
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
export var analyzeA11yTool = /*#__PURE__*/function () {
|
|
149
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(params) {
|
|
150
|
-
var code, componentName, context, _params$includePatter, includePatternAnalysis, violations, suggestions, axeResults, _axeResults$violation, _axeResults$passes, _axeResults$incomplet, results, adsViolations, relevantGuidelines, summary;
|
|
151
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
152
|
-
while (1) switch (_context.prev = _context.next) {
|
|
153
|
-
case 0:
|
|
154
|
-
code = params.code, componentName = params.componentName, context = params.context, _params$includePatter = params.includePatternAnalysis, includePatternAnalysis = _params$includePatter === void 0 ? true : _params$includePatter;
|
|
155
|
-
violations = [];
|
|
156
|
-
suggestions = [];
|
|
157
|
-
axeResults = {};
|
|
158
|
-
_context.prev = 4;
|
|
159
|
-
_context.next = 7;
|
|
160
|
-
return axe.run({
|
|
161
|
-
fromFrames: ['iframe', 'html']
|
|
162
|
-
});
|
|
163
|
-
case 7:
|
|
164
|
-
results = _context.sent;
|
|
165
|
-
// Process axe-core results
|
|
166
|
-
if (results.violations && results.violations.length > 0) {
|
|
167
|
-
adsViolations = mapAxeViolationsToADSFixes(results.violations);
|
|
168
|
-
violations.push.apply(violations, _toConsumableArray(adsViolations));
|
|
169
|
-
axeResults.violations = results.violations;
|
|
170
|
-
axeResults.passes = results.passes;
|
|
171
|
-
axeResults.incomplete = results.incomplete;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
// Include pattern-based analysis if requested
|
|
175
|
-
if (includePatternAnalysis) {
|
|
176
|
-
accessibilityPatterns.forEach(function (pattern) {
|
|
177
|
-
var matches = code.match(pattern.pattern);
|
|
178
|
-
if (matches) {
|
|
179
|
-
violations.push({
|
|
180
|
-
type: pattern.violation,
|
|
181
|
-
severity: pattern.severity,
|
|
182
|
-
count: matches.length,
|
|
183
|
-
suggestion: pattern.suggestion,
|
|
184
|
-
adsFix: 'Use the ads_suggest_a11y_fixes tool for specific ADS component solutions',
|
|
185
|
-
example: 'The ads_suggest_a11y_fixes tool provides detailed code examples',
|
|
186
|
-
source: 'pattern-analysis'
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
// Generate ADS-specific suggestions
|
|
193
|
-
if (violations.length > 0) {
|
|
194
|
-
suggestions.push({
|
|
195
|
-
title: 'Accessibility Improvements Needed',
|
|
196
|
-
description: "Found ".concat(violations.length, " accessibility issues in your code."),
|
|
197
|
-
violations: violations,
|
|
198
|
-
nextSteps: ['Review each violation and apply the suggested fixes', 'Use ADS components instead of custom implementations', 'Test with screen readers and keyboard navigation', 'Run automated accessibility tests']
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
// Provide relevant ADS guidelines
|
|
203
|
-
relevantGuidelines = [];
|
|
204
|
-
if (code.includes('button') || code.includes('onClick')) {
|
|
205
|
-
relevantGuidelines.push(adsGuidelines.buttons);
|
|
206
|
-
}
|
|
207
|
-
if (code.includes('input') || code.includes('form')) {
|
|
208
|
-
relevantGuidelines.push(adsGuidelines.forms);
|
|
209
|
-
}
|
|
210
|
-
if (code.includes('img') || code.includes('image')) {
|
|
211
|
-
relevantGuidelines.push(adsGuidelines.images);
|
|
212
|
-
}
|
|
213
|
-
if (code.includes('color') || code.includes('style')) {
|
|
214
|
-
relevantGuidelines.push(adsGuidelines.colors);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
// Generate summary
|
|
218
|
-
summary = {
|
|
219
|
-
componentName: componentName || 'Unknown component',
|
|
220
|
-
totalViolations: violations.length,
|
|
221
|
-
severityBreakdown: {
|
|
222
|
-
error: violations.filter(function (v) {
|
|
223
|
-
return v.severity === 'error';
|
|
224
|
-
}).length,
|
|
225
|
-
warning: violations.filter(function (v) {
|
|
226
|
-
return v.severity === 'warning';
|
|
227
|
-
}).length
|
|
228
|
-
},
|
|
229
|
-
context: context || 'No additional context provided',
|
|
230
|
-
axeResults: {
|
|
231
|
-
violations: ((_axeResults$violation = axeResults.violations) === null || _axeResults$violation === void 0 ? void 0 : _axeResults$violation.length) || 0,
|
|
232
|
-
passes: ((_axeResults$passes = axeResults.passes) === null || _axeResults$passes === void 0 ? void 0 : _axeResults$passes.length) || 0,
|
|
233
|
-
incomplete: ((_axeResults$incomplet = axeResults.incomplete) === null || _axeResults$incomplet === void 0 ? void 0 : _axeResults$incomplet.length) || 0
|
|
234
|
-
}
|
|
235
|
-
};
|
|
236
|
-
return _context.abrupt("return", {
|
|
237
|
-
content: [{
|
|
238
|
-
type: 'text',
|
|
239
|
-
text: JSON.stringify({
|
|
240
|
-
summary: summary,
|
|
241
|
-
violations: violations,
|
|
242
|
-
suggestions: suggestions,
|
|
243
|
-
relevantGuidelines: relevantGuidelines,
|
|
244
|
-
axeResults: axeResults,
|
|
245
|
-
recommendations: ['Use ADS components for better accessibility out of the box', 'Reference https://atlassian.design/llms-a11y.txt for detailed guidelines', 'Test with keyboard navigation and screen readers', 'Use automated accessibility testing tools']
|
|
246
|
-
}, null, 2)
|
|
247
|
-
}]
|
|
248
|
-
});
|
|
249
|
-
case 20:
|
|
250
|
-
_context.prev = 20;
|
|
251
|
-
_context.t0 = _context["catch"](4);
|
|
252
|
-
// Fallback to pattern-based analysis if axe-core fails
|
|
253
|
-
// console.warn('Axe-core analysis failed, falling back to pattern analysis:', error);
|
|
254
|
-
|
|
255
|
-
// Run pattern analysis as fallback
|
|
256
|
-
accessibilityPatterns.forEach(function (pattern) {
|
|
257
|
-
var matches = code.match(pattern.pattern);
|
|
258
|
-
if (matches) {
|
|
259
|
-
violations.push({
|
|
260
|
-
type: pattern.violation,
|
|
261
|
-
severity: pattern.severity,
|
|
262
|
-
count: matches.length,
|
|
263
|
-
suggestion: pattern.suggestion,
|
|
264
|
-
adsFix: 'Use the ads_suggest_a11y_fixes tool for specific ADS component solutions',
|
|
265
|
-
example: 'The ads_suggest_a11y_fixes tool provides detailed code examples',
|
|
266
|
-
source: 'pattern-analysis-fallback'
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
});
|
|
270
|
-
return _context.abrupt("return", {
|
|
271
|
-
content: [{
|
|
272
|
-
type: 'text',
|
|
273
|
-
text: JSON.stringify({
|
|
274
|
-
summary: {
|
|
275
|
-
componentName: componentName || 'Unknown component',
|
|
276
|
-
totalViolations: violations.length,
|
|
277
|
-
severityBreakdown: {
|
|
278
|
-
error: violations.filter(function (v) {
|
|
279
|
-
return v.severity === 'error';
|
|
280
|
-
}).length,
|
|
281
|
-
warning: violations.filter(function (v) {
|
|
282
|
-
return v.severity === 'warning';
|
|
283
|
-
}).length
|
|
284
|
-
},
|
|
285
|
-
context: context || 'No additional context provided',
|
|
286
|
-
note: 'Analysis completed using pattern matching (axe-core analysis failed)'
|
|
287
|
-
},
|
|
288
|
-
violations: violations,
|
|
289
|
-
suggestions: violations.length > 0 ? [{
|
|
290
|
-
title: 'Accessibility Improvements Needed',
|
|
291
|
-
description: "Found ".concat(violations.length, " accessibility issues in your code."),
|
|
292
|
-
violations: violations,
|
|
293
|
-
nextSteps: ['Review each violation and apply the suggested fixes', 'Use ADS components instead of custom implementations', 'Test with screen readers and keyboard navigation', 'Run automated accessibility tests']
|
|
294
|
-
}] : [],
|
|
295
|
-
error: 'Axe-core analysis failed, used pattern-based analysis as fallback',
|
|
296
|
-
recommendations: ['Use ADS components for better accessibility out of the box', 'Reference https://atlassian.design/llms-a11y.txt for detailed guidelines', 'Test with keyboard navigation and screen readers', 'Use automated accessibility testing tools']
|
|
297
|
-
}, null, 2)
|
|
298
|
-
}]
|
|
299
|
-
});
|
|
300
|
-
case 24:
|
|
301
|
-
case "end":
|
|
302
|
-
return _context.stop();
|
|
303
|
-
}
|
|
304
|
-
}, _callee, null, [[4, 20]]);
|
|
305
|
-
}));
|
|
306
|
-
return function analyzeA11yTool(_x) {
|
|
307
|
-
return _ref.apply(this, arguments);
|
|
308
|
-
};
|
|
309
|
-
}();
|
|
310
|
-
export var analyzeLocalhostA11yTool = /*#__PURE__*/function () {
|
|
311
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(params) {
|
|
312
|
-
var url, componentName, context, selector, violations, suggestions, axeResults, browser, page, _axeResults$violation2, _axeResults$passes2, _axeResults$incomplet2, elementExists, availableElements, axePuppeteer, results, adsViolations, relevantGuidelines, summary;
|
|
313
|
-
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
314
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
315
|
-
case 0:
|
|
316
|
-
url = params.url, componentName = params.componentName, context = params.context, selector = params.selector;
|
|
317
|
-
violations = [];
|
|
318
|
-
suggestions = [];
|
|
319
|
-
axeResults = {};
|
|
320
|
-
_context2.next = 6;
|
|
321
|
-
return puppeteer.launch();
|
|
322
|
-
case 6:
|
|
323
|
-
browser = _context2.sent;
|
|
324
|
-
_context2.next = 9;
|
|
325
|
-
return browser.newPage();
|
|
326
|
-
case 9:
|
|
327
|
-
page = _context2.sent;
|
|
328
|
-
_context2.prev = 10;
|
|
329
|
-
_context2.next = 13;
|
|
330
|
-
return page.goto(url, {
|
|
331
|
-
waitUntil: 'networkidle0'
|
|
332
|
-
});
|
|
333
|
-
case 13:
|
|
334
|
-
if (!selector) {
|
|
335
|
-
_context2.next = 22;
|
|
336
|
-
break;
|
|
337
|
-
}
|
|
338
|
-
_context2.next = 16;
|
|
339
|
-
return page.$(selector);
|
|
340
|
-
case 16:
|
|
341
|
-
elementExists = _context2.sent;
|
|
342
|
-
if (elementExists) {
|
|
343
|
-
_context2.next = 22;
|
|
344
|
-
break;
|
|
345
|
-
}
|
|
346
|
-
_context2.next = 20;
|
|
347
|
-
return page.evaluate(function () {
|
|
348
|
-
var elements = Array.from(document.querySelectorAll('[id]'));
|
|
349
|
-
return elements.map(function (el) {
|
|
350
|
-
return "#".concat(el.id);
|
|
351
|
-
});
|
|
352
|
-
});
|
|
353
|
-
case 20:
|
|
354
|
-
availableElements = _context2.sent;
|
|
355
|
-
throw new Error("Element with selector \"".concat(selector, "\" not found on the page after waiting. Available elements: ").concat(availableElements.join(', ')));
|
|
356
|
-
case 22:
|
|
357
|
-
// Run axe-core accessibility analysis
|
|
358
|
-
axePuppeteer = new AxePuppeteer(page); // If selector is provided, analyze only that element
|
|
359
|
-
if (selector) {
|
|
360
|
-
axePuppeteer.include(selector);
|
|
361
|
-
}
|
|
362
|
-
_context2.next = 26;
|
|
363
|
-
return axePuppeteer.analyze();
|
|
364
|
-
case 26:
|
|
365
|
-
results = _context2.sent;
|
|
366
|
-
if (results.violations && results.violations.length > 0) {
|
|
367
|
-
adsViolations = mapAxeViolationsToADSFixes(results.violations);
|
|
368
|
-
violations.push.apply(violations, _toConsumableArray(adsViolations));
|
|
369
|
-
axeResults.violations = results.violations;
|
|
370
|
-
axeResults.passes = results.passes;
|
|
371
|
-
axeResults.incomplete = results.incomplete;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
// Generate ADS-specific suggestions
|
|
375
|
-
if (violations.length > 0) {
|
|
376
|
-
suggestions.push({
|
|
377
|
-
title: 'Accessibility Improvements Needed',
|
|
378
|
-
description: "Found ".concat(violations.length, " accessibility issues in your code."),
|
|
379
|
-
violations: violations,
|
|
380
|
-
nextSteps: ['Review each violation and apply the suggested fixes', 'Use ADS components instead of custom implementations', 'Test with screen readers and keyboard navigation', 'Run automated accessibility tests']
|
|
381
|
-
});
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
// Provide relevant ADS guidelines
|
|
385
|
-
relevantGuidelines = [];
|
|
386
|
-
if (url.includes('button') || url.includes('onClick')) {
|
|
387
|
-
relevantGuidelines.push(adsGuidelines.buttons);
|
|
388
|
-
}
|
|
389
|
-
if (url.includes('input') || url.includes('form')) {
|
|
390
|
-
relevantGuidelines.push(adsGuidelines.forms);
|
|
391
|
-
}
|
|
392
|
-
if (url.includes('img') || url.includes('image')) {
|
|
393
|
-
relevantGuidelines.push(adsGuidelines.images);
|
|
394
|
-
}
|
|
395
|
-
if (url.includes('color') || url.includes('style')) {
|
|
396
|
-
relevantGuidelines.push(adsGuidelines.colors);
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
// Generate summary
|
|
400
|
-
summary = {
|
|
401
|
-
url: url,
|
|
402
|
-
selector: selector || 'Entire page analyzed',
|
|
403
|
-
componentName: componentName || 'Unknown component',
|
|
404
|
-
totalViolations: violations.length,
|
|
405
|
-
severityBreakdown: {
|
|
406
|
-
error: violations.filter(function (v) {
|
|
407
|
-
return v.severity === 'error';
|
|
408
|
-
}).length,
|
|
409
|
-
warning: violations.filter(function (v) {
|
|
410
|
-
return v.severity === 'warning';
|
|
411
|
-
}).length
|
|
412
|
-
},
|
|
413
|
-
context: context || 'No additional context provided',
|
|
414
|
-
axeResults: {
|
|
415
|
-
violations: ((_axeResults$violation2 = axeResults.violations) === null || _axeResults$violation2 === void 0 ? void 0 : _axeResults$violation2.length) || 0,
|
|
416
|
-
passes: ((_axeResults$passes2 = axeResults.passes) === null || _axeResults$passes2 === void 0 ? void 0 : _axeResults$passes2.length) || 0,
|
|
417
|
-
incomplete: ((_axeResults$incomplet2 = axeResults.incomplete) === null || _axeResults$incomplet2 === void 0 ? void 0 : _axeResults$incomplet2.length) || 0
|
|
418
|
-
}
|
|
419
|
-
};
|
|
420
|
-
_context2.next = 37;
|
|
421
|
-
return browser.close();
|
|
422
|
-
case 37:
|
|
423
|
-
return _context2.abrupt("return", {
|
|
424
|
-
content: [{
|
|
425
|
-
type: 'text',
|
|
426
|
-
text: JSON.stringify({
|
|
427
|
-
summary: summary,
|
|
428
|
-
violations: violations,
|
|
429
|
-
suggestions: suggestions,
|
|
430
|
-
relevantGuidelines: relevantGuidelines,
|
|
431
|
-
axeResults: axeResults,
|
|
432
|
-
recommendations: ['Use ADS components for better accessibility out of the box', 'Reference https://atlassian.design/llms-a11y.txt for detailed guidelines', 'Test with keyboard navigation and screen readers', 'Use automated accessibility testing tools']
|
|
433
|
-
}, null, 2)
|
|
434
|
-
}]
|
|
435
|
-
});
|
|
436
|
-
case 40:
|
|
437
|
-
_context2.prev = 40;
|
|
438
|
-
_context2.t0 = _context2["catch"](10);
|
|
439
|
-
_context2.next = 44;
|
|
440
|
-
return browser.close();
|
|
441
|
-
case 44:
|
|
442
|
-
return _context2.abrupt("return", {
|
|
443
|
-
content: [{
|
|
444
|
-
type: 'text',
|
|
445
|
-
text: JSON.stringify({
|
|
446
|
-
summary: {
|
|
447
|
-
url: url,
|
|
448
|
-
selector: selector || 'Entire page analyzed',
|
|
449
|
-
componentName: componentName || 'Unknown component',
|
|
450
|
-
totalViolations: violations.length,
|
|
451
|
-
severityBreakdown: {
|
|
452
|
-
error: violations.filter(function (v) {
|
|
453
|
-
return v.severity === 'error';
|
|
454
|
-
}).length,
|
|
455
|
-
warning: violations.filter(function (v) {
|
|
456
|
-
return v.severity === 'warning';
|
|
457
|
-
}).length
|
|
458
|
-
},
|
|
459
|
-
context: context || 'No additional context provided',
|
|
460
|
-
note: 'Analysis failed to run on the provided URL'
|
|
461
|
-
},
|
|
462
|
-
violations: violations,
|
|
463
|
-
suggestions: [],
|
|
464
|
-
error: String(_context2.t0),
|
|
465
|
-
recommendations: ['Use ADS components for better accessibility out of the box', 'Reference https://atlassian.design/llms-a11y.txt for detailed guidelines', 'Test with keyboard navigation and screen readers', 'Use automated accessibility testing tools']
|
|
466
|
-
}, null, 2)
|
|
467
|
-
}]
|
|
468
|
-
});
|
|
469
|
-
case 45:
|
|
470
|
-
case "end":
|
|
471
|
-
return _context2.stop();
|
|
472
|
-
}
|
|
473
|
-
}, _callee2, null, [[10, 40]]);
|
|
474
|
-
}));
|
|
475
|
-
return function analyzeLocalhostA11yTool(_x2) {
|
|
476
|
-
return _ref2.apply(this, arguments);
|
|
477
|
-
};
|
|
478
|
-
}();
|