@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
|
@@ -1,646 +0,0 @@
|
|
|
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 onboardingSingleStep = {
|
|
3
|
-
id: 'single-step',
|
|
4
|
-
title: 'Single Step Spotlight Migration',
|
|
5
|
-
description: 'Use when code ONLY has `Spotlight` from `@atlaskit/onboarding` (no JiraSpotlight)',
|
|
6
|
-
fromPackage: '@atlaskit/onboarding',
|
|
7
|
-
toPackage: '@atlaskit/spotlight',
|
|
8
|
-
examples: [{
|
|
9
|
-
title: 'Migrate single step spotlight',
|
|
10
|
-
description: 'Replace SpotlightTarget, and Spotlight with the new compositional @atlaskit/spotlight components',
|
|
11
|
-
before: `
|
|
12
|
-
// file1.tsx
|
|
13
|
-
import React, { useState } from 'react';
|
|
14
|
-
import Button from '@atlaskit/button/new';
|
|
15
|
-
import { Spotlight } from '@atlaskit/onboarding';
|
|
16
|
-
|
|
17
|
-
const OnboardingSpotlight = () => {
|
|
18
|
-
const [isSpotlightActive, setIsSpotlightActive] = useState(true);
|
|
19
|
-
const start = () => setIsSpotlightActive(true);
|
|
20
|
-
const end = () => setIsSpotlightActive(false);
|
|
21
|
-
|
|
22
|
-
return (
|
|
23
|
-
{isSpotlightActive && (
|
|
24
|
-
<Spotlight
|
|
25
|
-
dialogPlacement='bottom right'
|
|
26
|
-
actions={[
|
|
27
|
-
{
|
|
28
|
-
onClick: end,
|
|
29
|
-
text: 'Got it',
|
|
30
|
-
},
|
|
31
|
-
]}
|
|
32
|
-
heading="Feature Heading"
|
|
33
|
-
target="my-target"
|
|
34
|
-
>
|
|
35
|
-
This is the spotlight body content describing the feature.
|
|
36
|
-
</Spotlight>
|
|
37
|
-
)}
|
|
38
|
-
);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
// file2.tsx
|
|
42
|
-
import React from 'react';
|
|
43
|
-
import Button from '@atlaskit/button/new';
|
|
44
|
-
import { Spotlight } from '@atlaskit/onboarding';
|
|
45
|
-
|
|
46
|
-
const SomeFeature = () => {
|
|
47
|
-
|
|
48
|
-
return (
|
|
49
|
-
<SpotlightTarget name="my-target">
|
|
50
|
-
<Button>Target Element</Button>
|
|
51
|
-
</SpotlightTarget>
|
|
52
|
-
);
|
|
53
|
-
};
|
|
54
|
-
`,
|
|
55
|
-
after: `
|
|
56
|
-
// file2.tsx -- the Spotlight has been co-located to the targeted element.
|
|
57
|
-
import React, { useState } from 'react';
|
|
58
|
-
import Button from '@atlaskit/button/new';
|
|
59
|
-
import { Text } from '@atlaskit/primitives/compiled';
|
|
60
|
-
import {
|
|
61
|
-
PopoverContent,
|
|
62
|
-
PopoverProvider,
|
|
63
|
-
PopoverTarget,
|
|
64
|
-
SpotlightActions,
|
|
65
|
-
SpotlightBody,
|
|
66
|
-
SpotlightCard,
|
|
67
|
-
SpotlightControls,
|
|
68
|
-
SpotlightDismissControl,
|
|
69
|
-
SpotlightFooter,
|
|
70
|
-
SpotlightHeader,
|
|
71
|
-
SpotlightHeadline,
|
|
72
|
-
SpotlightPrimaryAction,
|
|
73
|
-
} from '@atlaskit/spotlight';
|
|
74
|
-
|
|
75
|
-
const Spotlight = () => {
|
|
76
|
-
const [isVisible, setIsVisible] = useState(false);
|
|
77
|
-
const dismiss = () => setIsVisible(false);
|
|
78
|
-
const done = () => setIsVisible(false);
|
|
79
|
-
|
|
80
|
-
return (
|
|
81
|
-
<PopoverProvider>
|
|
82
|
-
<PopoverTarget>
|
|
83
|
-
<Button onClick={() => setIsVisible(true)}>Target Element</Button>
|
|
84
|
-
</PopoverTarget>
|
|
85
|
-
<PopoverContent dismiss={dismiss} placement="bottom-start" isVisible={isVisible}>
|
|
86
|
-
<SpotlightCard>
|
|
87
|
-
<SpotlightHeader>
|
|
88
|
-
<SpotlightHeadline>Feature Heading</SpotlightHeadline>
|
|
89
|
-
<SpotlightControls>
|
|
90
|
-
<SpotlightDismissControl />
|
|
91
|
-
</SpotlightControls>
|
|
92
|
-
</SpotlightHeader>
|
|
93
|
-
<SpotlightBody>
|
|
94
|
-
<Text>This is the spotlight body content describing the feature.</Text>
|
|
95
|
-
</SpotlightBody>
|
|
96
|
-
<SpotlightFooter>
|
|
97
|
-
<SpotlightActions>
|
|
98
|
-
<SpotlightPrimaryAction onClick={done}>Got it</SpotlightPrimaryAction>
|
|
99
|
-
</SpotlightActions>
|
|
100
|
-
</SpotlightFooter>
|
|
101
|
-
</SpotlightCard>
|
|
102
|
-
</PopoverContent>
|
|
103
|
-
</PopoverProvider>
|
|
104
|
-
);
|
|
105
|
-
};`,
|
|
106
|
-
explanation: `Key changes when migrating a single step spotlight:
|
|
107
|
-
- Do not use this migration guide for JiraSpotlight. Use 'jira-spotlight' instead.
|
|
108
|
-
- PopoverProvider maintains internal Spotlight state. SpotlightManager coordinated multiple @atlaskit/onboarding usages and is no longer needed.
|
|
109
|
-
- Replace SpotlightTarget with PopoverTarget - wraps the element to highlight
|
|
110
|
-
- Replace Spotlight with PopoverContent containing SpotlightCard - controls visibility and positioning
|
|
111
|
-
- The 'heading' prop becomes SpotlightHeadline inside SpotlightHeader
|
|
112
|
-
- The 'actions' array becomes SpotlightActions with SpotlightPrimaryAction (and optionally SpotlightSecondaryAction)
|
|
113
|
-
- The children content moves into SpotlightBody wrapped with Text component
|
|
114
|
-
- Add SpotlightDismissControl inside SpotlightControls for the close button
|
|
115
|
-
- The 'target' and/or 'targetName' prop is replaced with PopoverTarget directly wrapping the target element
|
|
116
|
-
- The '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"'`
|
|
117
|
-
}],
|
|
118
|
-
bestPractices: ['PopoverTarget should wrap exactly one child element that will be highlighted', 'Always include SpotlightDismissControl for accessibility - allows users to dismiss via close button', 'SpotlightPrimaryAction is required and wraps the main CTA button', 'Wrap body text content in the Text component from @atlaskit/primitives/compiled'],
|
|
119
|
-
additionalResources
|
|
120
|
-
};
|
|
121
|
-
export const onboardingJiraSpotlight = {
|
|
122
|
-
id: 'jira-spotlight',
|
|
123
|
-
title: 'JiraSpotlight Migration',
|
|
124
|
-
description: 'Use when code contains `JiraSpotlight` import from `@atlassian/jira-spotlight`',
|
|
125
|
-
fromPackage: '@atlassian/jira-spotlight',
|
|
126
|
-
toPackage: '@atlaskit/spotlight',
|
|
127
|
-
examples: [{
|
|
128
|
-
title: 'Internal <JiraSpotlight /> migration',
|
|
129
|
-
description: 'Internal migrations are possible for JiraSpotlight usages which only pass simple/textual content to JiraSpotlight children',
|
|
130
|
-
before: `
|
|
131
|
-
// file1.tsx
|
|
132
|
-
import { JiraSpotlight } from '@atlassian/jira-spotlight/src/ui/jira-spotlight.tsx';
|
|
133
|
-
|
|
134
|
-
export const OnboardingSpotlightWrapper = () => {
|
|
135
|
-
const spotlightId = 'some-unique-identifier'
|
|
136
|
-
const { dark, light } = spotlightImageUrls[spotlightId];
|
|
137
|
-
const imageUrl = colorMode === 'dark' ? dark : light;
|
|
138
|
-
|
|
139
|
-
return (
|
|
140
|
-
<JiraSpotlight
|
|
141
|
-
image={imageUrl}
|
|
142
|
-
actions={[
|
|
143
|
-
{
|
|
144
|
-
onClick,
|
|
145
|
-
text: formatMessage(dismiss),
|
|
146
|
-
},
|
|
147
|
-
]}
|
|
148
|
-
heading={formatMessage(heading)}
|
|
149
|
-
target={spotlightId}
|
|
150
|
-
key={spotlightId}
|
|
151
|
-
targetRadius={3}
|
|
152
|
-
targetBgColor={token('elevation.surface')}
|
|
153
|
-
messageId={spotlightId}
|
|
154
|
-
messageType="transactional"
|
|
155
|
-
dialogWidth={275}
|
|
156
|
-
>
|
|
157
|
-
{formatMessage(body)}
|
|
158
|
-
</JiraSpotlight>
|
|
159
|
-
);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
// file2.tsx
|
|
163
|
-
import { SpotlightTarget } from '@atlaskit/onboarding';
|
|
164
|
-
|
|
165
|
-
const spotlightId = 'some-unique-identifier'
|
|
166
|
-
|
|
167
|
-
export const SomeFeature = () => {
|
|
168
|
-
return (
|
|
169
|
-
<SpotlightTarget name={spotlightId}>
|
|
170
|
-
// Target code
|
|
171
|
-
</SpotlightTarget>
|
|
172
|
-
);
|
|
173
|
-
}
|
|
174
|
-
`,
|
|
175
|
-
after: `
|
|
176
|
-
// file1.tsx
|
|
177
|
-
import { JiraSpotlight } from '@atlassian/jira-spotlight/src/ui/jira-spotlight.tsx';
|
|
178
|
-
|
|
179
|
-
export const OnboardingSpotlightWrapper = () => {
|
|
180
|
-
const spotlightId = 'some-unique-identifier'
|
|
181
|
-
const { dark, light } = spotlightImageUrls[spotlightId];
|
|
182
|
-
const imageUrl = colorMode === 'dark' ? dark : light;
|
|
183
|
-
|
|
184
|
-
return (
|
|
185
|
-
<JiraSpotlight
|
|
186
|
-
isMigrated // isMigrated prop passed
|
|
187
|
-
image={imageUrl}
|
|
188
|
-
actions={[
|
|
189
|
-
{
|
|
190
|
-
onClick,
|
|
191
|
-
text: formatMessage(dismiss),
|
|
192
|
-
},
|
|
193
|
-
]}
|
|
194
|
-
heading={formatMessage(heading)}
|
|
195
|
-
target={spotlightId}
|
|
196
|
-
key={spotlightId}
|
|
197
|
-
targetRadius={3}
|
|
198
|
-
targetBgColor={token('elevation.surface')}
|
|
199
|
-
messageId={spotlightId}
|
|
200
|
-
messageType="transactional"
|
|
201
|
-
dialogWidth={275}
|
|
202
|
-
>
|
|
203
|
-
{formatMessage(body)}
|
|
204
|
-
</JiraSpotlight>
|
|
205
|
-
);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
// file2.tsx
|
|
209
|
-
// Updated SpotlightTarget import statement
|
|
210
|
-
import { SpotlightTarget } from '@atlassian/jira-spotlight/src/ui/SpotlightTarget.tsx';
|
|
211
|
-
|
|
212
|
-
export const SomeFeature = () => {
|
|
213
|
-
const spotlightId = 'some-unique-identifier'
|
|
214
|
-
|
|
215
|
-
return (
|
|
216
|
-
<SpotlightTarget name={spotlightId}>
|
|
217
|
-
// Target code
|
|
218
|
-
</SpotlightTarget>
|
|
219
|
-
);
|
|
220
|
-
}
|
|
221
|
-
`,
|
|
222
|
-
explanation: `Key changes when migrating a JiraSpotlight:
|
|
223
|
-
- 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
|
|
224
|
-
- Pass isMigrated={true} to JiraSpotlight.
|
|
225
|
-
- Update SpotlightTarget import statment from '@atlaskit/onboarding' to '@atlassian/jira-spotlight/src/ui/SpotlightTarget.tsx';
|
|
226
|
-
- These changes allow switching the internal implementation to '@atlaskit/spotlight' via a feature flag.
|
|
227
|
-
- 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.
|
|
228
|
-
`
|
|
229
|
-
}, {
|
|
230
|
-
title: 'Complex <JiraSpotlight /> migration',
|
|
231
|
-
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.',
|
|
232
|
-
before: `
|
|
233
|
-
// file1.tsx
|
|
234
|
-
import { JiraSpotlight } from '@atlassian/jira-spotlight/src/ui/jira-spotlight.tsx';
|
|
235
|
-
|
|
236
|
-
export const OnboardingSpotlightWrapper = () => {
|
|
237
|
-
const spotlightId = 'some-unique-identifier'
|
|
238
|
-
const { dark, light } = spotlightImageUrls[spotlightId];
|
|
239
|
-
const imageUrl = colorMode === 'dark' ? dark : light;
|
|
240
|
-
|
|
241
|
-
return (
|
|
242
|
-
<JiraSpotlight
|
|
243
|
-
target={spotlightId}
|
|
244
|
-
targetRadius={3}
|
|
245
|
-
dialogPlacement=''
|
|
246
|
-
targetBgColor={token('elevation.surface')}
|
|
247
|
-
messageId={spotlightId}
|
|
248
|
-
messageType="transactional"
|
|
249
|
-
dialogWidth={275}
|
|
250
|
-
>
|
|
251
|
-
<CustomSpotlightInner>
|
|
252
|
-
{imageUrl}
|
|
253
|
-
{formatMessage(heading)}
|
|
254
|
-
{formatMessage(body)}
|
|
255
|
-
<CustomSpotlightAction>
|
|
256
|
-
{formatMessage(dismiss)}
|
|
257
|
-
</CustomSpotlightAction>
|
|
258
|
-
</CustomSpotlightInner>
|
|
259
|
-
</JiraSpotlight>
|
|
260
|
-
);
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
// file2.tsx
|
|
264
|
-
import { SpotlightTarget } from '@atlaskit/onboarding';
|
|
265
|
-
|
|
266
|
-
const spotlightId = 'some-unique-identifier'
|
|
267
|
-
|
|
268
|
-
export const SomeFeature = () => {
|
|
269
|
-
return (
|
|
270
|
-
<SpotlightTarget name={spotlightId}>
|
|
271
|
-
// Target code
|
|
272
|
-
</SpotlightTarget>
|
|
273
|
-
);
|
|
274
|
-
}
|
|
275
|
-
`,
|
|
276
|
-
after: `
|
|
277
|
-
// file2.tsx - Spotlight code has been co-located to the targeted element
|
|
278
|
-
import { Text } from '@atlaskit/primitives/compiled';
|
|
279
|
-
import {
|
|
280
|
-
PopoverContent,
|
|
281
|
-
PopoverProvider,
|
|
282
|
-
PopoverTarget,
|
|
283
|
-
SpotlightActions,
|
|
284
|
-
SpotlightBody,
|
|
285
|
-
SpotlightCard,
|
|
286
|
-
SpotlightControls,
|
|
287
|
-
SpotlightDismissControl,
|
|
288
|
-
SpotlightFooter,
|
|
289
|
-
SpotlightHeader,
|
|
290
|
-
SpotlightHeadline,
|
|
291
|
-
SpotlightPrimaryAction,
|
|
292
|
-
} from '@atlaskit/spotlight';
|
|
293
|
-
import Image from '@atlaskit/image';
|
|
294
|
-
import { ChoreographedComponent } from '@atlassian/jira-spotlight/src/ui/ChoreographedComponent.tsx';
|
|
295
|
-
|
|
296
|
-
export const SomeFeature = () => {
|
|
297
|
-
const { dark, light } = spotlightImageUrls[spotlightId];
|
|
298
|
-
|
|
299
|
-
const [isSpotlightVisible, actions] = useListViewOnboarding({
|
|
300
|
-
projectId: String(projectData.id),
|
|
301
|
-
id: spotlightId,
|
|
302
|
-
});
|
|
303
|
-
|
|
304
|
-
return (
|
|
305
|
-
<PopoverProvider>
|
|
306
|
-
<PopoverTarget>{renderTrigger(isSpotlightVisible)}</PopoverTarget>
|
|
307
|
-
<ChoreographedComponent messageId={spotlightId} messageType="transactional">
|
|
308
|
-
<PopoverContent isVisible={isSpotlightVisible} placement="bottom-start" dismiss={onClick}>
|
|
309
|
-
<SpotlightCard>
|
|
310
|
-
<SpotlightHeader>
|
|
311
|
-
<SpotlightHeadline>{formatMessage(heading)}</SpotlightHeadline>
|
|
312
|
-
<SpotlightControls>
|
|
313
|
-
<SpotlightDismissControl />
|
|
314
|
-
</SpotlightControls>
|
|
315
|
-
</SpotlightHeader>
|
|
316
|
-
<SpotlightMedia>
|
|
317
|
-
<Image src={light} srcDark={dark} alt="" />
|
|
318
|
-
</SpotlightMedia>
|
|
319
|
-
<SpotlightBody>
|
|
320
|
-
<Text>{formatMessage(body)}</Text>
|
|
321
|
-
</SpotlightBody>
|
|
322
|
-
<SpotlightFooter>
|
|
323
|
-
<SpotlightActions>
|
|
324
|
-
<SpotlightPrimaryAction onClick={onClick}>
|
|
325
|
-
{formatMessage(dismiss)}
|
|
326
|
-
</SpotlightPrimaryAction>
|
|
327
|
-
</SpotlightActions>
|
|
328
|
-
</SpotlightFooter>
|
|
329
|
-
</SpotlightCard>
|
|
330
|
-
</PopoverContent>
|
|
331
|
-
</ChoreographedComponent>
|
|
332
|
-
</PopoverProvider>
|
|
333
|
-
);
|
|
334
|
-
};`,
|
|
335
|
-
explanation: `Key changes when migrating a single step spotlight:
|
|
336
|
-
- Replace JiraSpotlight with ChoreographedComponent from '@atlassian/jira-spotlight'.
|
|
337
|
-
- PopoverProvider maintains internal Spotlight state.
|
|
338
|
-
- Replace SpotlightTarget with PopoverTarget - wraps the element to highlight
|
|
339
|
-
- Replace Spotlight with PopoverContent containing SpotlightCard - controls visibility and positioning
|
|
340
|
-
- 'heading' becomes SpotlightHeadline inside SpotlightHeader
|
|
341
|
-
- 'actions' becomes SpotlightActions with SpotlightPrimaryAction (and optionally SpotlightSecondaryAction)
|
|
342
|
-
- 'body' content moves into SpotlightBody wrapped with Text component
|
|
343
|
-
- Add SpotlightDismissControl inside SpotlightControls for the close button
|
|
344
|
-
- The 'target' and/or 'targetName' prop is replaced with PopoverTarget directly wrapping the target element
|
|
345
|
-
- '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"'`
|
|
346
|
-
}],
|
|
347
|
-
bestPractices: [],
|
|
348
|
-
additionalResources
|
|
349
|
-
};
|
|
350
|
-
export const onboardingMultiStep = {
|
|
351
|
-
id: 'multi-step',
|
|
352
|
-
title: 'Multi Step Spotlight Tour Migration',
|
|
353
|
-
description: 'Migrate a multi-step spotlight tour from @atlaskit/onboarding to @atlaskit/spotlight',
|
|
354
|
-
fromPackage: '@atlaskit/onboarding',
|
|
355
|
-
toPackage: '@atlaskit/spotlight',
|
|
356
|
-
examples: [{
|
|
357
|
-
title: 'Migrate multi step spotlight tour',
|
|
358
|
-
description: 'Replace the single SpotlightManager pattern with multiple PopoverProvider instances, one for each target in the tour',
|
|
359
|
-
before: `import React, { useState } from 'react';
|
|
360
|
-
import Button, { IconButton } from '@atlaskit/button/new';
|
|
361
|
-
import CommentAddIcon from '@atlaskit/icon/core/comment-add';
|
|
362
|
-
import CopyIcon from '@atlaskit/icon/core/copy';
|
|
363
|
-
import {
|
|
364
|
-
Spotlight,
|
|
365
|
-
SpotlightManager,
|
|
366
|
-
SpotlightTarget,
|
|
367
|
-
SpotlightTransition,
|
|
368
|
-
} from '@atlaskit/onboarding';
|
|
369
|
-
|
|
370
|
-
const OnboardingTour = () => {
|
|
371
|
-
const [activeSpotlight, setActiveSpotlight] = useState<null | number>(null);
|
|
372
|
-
const start = () => setActiveSpotlight(0);
|
|
373
|
-
const next = () => setActiveSpotlight((activeSpotlight || 0) + 1);
|
|
374
|
-
const back = () => setActiveSpotlight((activeSpotlight || 1) - 1);
|
|
375
|
-
const end = () => setActiveSpotlight(null);
|
|
376
|
-
|
|
377
|
-
const renderActiveSpotlight = () => {
|
|
378
|
-
const spotlights = [
|
|
379
|
-
<Spotlight
|
|
380
|
-
actions={[
|
|
381
|
-
{ onClick: () => next(), text: 'Next' },
|
|
382
|
-
{ onClick: () => end(), text: 'Dismiss', appearance: 'subtle' },
|
|
383
|
-
]}
|
|
384
|
-
heading="Add a comment"
|
|
385
|
-
target="comment"
|
|
386
|
-
key="comment"
|
|
387
|
-
>
|
|
388
|
-
Quickly add a comment to the work item.
|
|
389
|
-
</Spotlight>,
|
|
390
|
-
<Spotlight
|
|
391
|
-
actions={[
|
|
392
|
-
{ onClick: () => end(), text: 'Done' },
|
|
393
|
-
{ onClick: () => back(), text: 'Back', appearance: 'subtle' },
|
|
394
|
-
]}
|
|
395
|
-
heading="Copy code"
|
|
396
|
-
target="copy"
|
|
397
|
-
key="copy"
|
|
398
|
-
>
|
|
399
|
-
Click to copy the example code to your clipboard.
|
|
400
|
-
</Spotlight>,
|
|
401
|
-
];
|
|
402
|
-
|
|
403
|
-
if (activeSpotlight === null) {
|
|
404
|
-
return null;
|
|
405
|
-
}
|
|
406
|
-
return spotlights[activeSpotlight];
|
|
407
|
-
};
|
|
408
|
-
|
|
409
|
-
return (
|
|
410
|
-
<SpotlightManager>
|
|
411
|
-
<SpotlightTarget name="comment">
|
|
412
|
-
<IconButton icon={CommentAddIcon} label="comment" />
|
|
413
|
-
</SpotlightTarget>
|
|
414
|
-
<SpotlightTarget name="copy">
|
|
415
|
-
<IconButton icon={CopyIcon} label="Copy" />
|
|
416
|
-
</SpotlightTarget>
|
|
417
|
-
<Button appearance="primary" onClick={start}>
|
|
418
|
-
Start tour
|
|
419
|
-
</Button>
|
|
420
|
-
<SpotlightTransition>{renderActiveSpotlight()}</SpotlightTransition>
|
|
421
|
-
</SpotlightManager>
|
|
422
|
-
);
|
|
423
|
-
};`,
|
|
424
|
-
after: `import React, { useState } from 'react';
|
|
425
|
-
import Button, { IconButton } from '@atlaskit/button/new';
|
|
426
|
-
import CommentAddIcon from '@atlaskit/icon/core/comment-add';
|
|
427
|
-
import CopyIcon from '@atlaskit/icon/core/copy';
|
|
428
|
-
import { Text } from '@atlaskit/primitives/compiled';
|
|
429
|
-
import {
|
|
430
|
-
PopoverContent,
|
|
431
|
-
PopoverProvider,
|
|
432
|
-
PopoverTarget,
|
|
433
|
-
SpotlightActions,
|
|
434
|
-
SpotlightBody,
|
|
435
|
-
SpotlightCard,
|
|
436
|
-
SpotlightControls,
|
|
437
|
-
SpotlightDismissControl,
|
|
438
|
-
SpotlightFooter,
|
|
439
|
-
SpotlightHeader,
|
|
440
|
-
SpotlightHeadline,
|
|
441
|
-
SpotlightPrimaryAction,
|
|
442
|
-
SpotlightSecondaryAction,
|
|
443
|
-
SpotlightStepCount,
|
|
444
|
-
} from '@atlaskit/spotlight';
|
|
445
|
-
|
|
446
|
-
const SpotlightTour = () => {
|
|
447
|
-
const [currentStep, setCurrentStep] = useState<number>(0);
|
|
448
|
-
|
|
449
|
-
const dismiss = () => setCurrentStep(0);
|
|
450
|
-
const back = () => setCurrentStep(Math.max(currentStep - 1, 1));
|
|
451
|
-
const next = () => setCurrentStep(Math.min(currentStep + 1, 2));
|
|
452
|
-
const done = () => setCurrentStep(0);
|
|
453
|
-
|
|
454
|
-
return (
|
|
455
|
-
<>
|
|
456
|
-
<PopoverProvider>
|
|
457
|
-
<PopoverTarget>
|
|
458
|
-
<IconButton icon={CommentAddIcon} label="comment" />
|
|
459
|
-
</PopoverTarget>
|
|
460
|
-
<PopoverContent dismiss={dismiss} placement="bottom-start" isVisible={currentStep === 1}>
|
|
461
|
-
<SpotlightCard>
|
|
462
|
-
<SpotlightHeader>
|
|
463
|
-
<SpotlightHeadline>Add a comment</SpotlightHeadline>
|
|
464
|
-
<SpotlightControls>
|
|
465
|
-
<SpotlightDismissControl onClick={dismiss} />
|
|
466
|
-
</SpotlightControls>
|
|
467
|
-
</SpotlightHeader>
|
|
468
|
-
<SpotlightBody>
|
|
469
|
-
<Text>Quickly add a comment to the work item.</Text>
|
|
470
|
-
</SpotlightBody>
|
|
471
|
-
<SpotlightFooter>
|
|
472
|
-
<SpotlightStepCount>1 of 2</SpotlightStepCount>
|
|
473
|
-
<SpotlightActions>
|
|
474
|
-
<SpotlightPrimaryAction onClick={next}>Next</SpotlightPrimaryAction>
|
|
475
|
-
</SpotlightActions>
|
|
476
|
-
</SpotlightFooter>
|
|
477
|
-
</SpotlightCard>
|
|
478
|
-
</PopoverContent>
|
|
479
|
-
</PopoverProvider>
|
|
480
|
-
|
|
481
|
-
<PopoverProvider>
|
|
482
|
-
<PopoverTarget>
|
|
483
|
-
<IconButton icon={CopyIcon} label="Copy" />
|
|
484
|
-
</PopoverTarget>
|
|
485
|
-
<PopoverContent dismiss={dismiss} placement="bottom-start" isVisible={currentStep === 2}>
|
|
486
|
-
<SpotlightCard>
|
|
487
|
-
<SpotlightHeader>
|
|
488
|
-
<SpotlightHeadline>Copy code</SpotlightHeadline>
|
|
489
|
-
<SpotlightControls>
|
|
490
|
-
<SpotlightDismissControl onClick={dismiss} />
|
|
491
|
-
</SpotlightControls>
|
|
492
|
-
</SpotlightHeader>
|
|
493
|
-
<SpotlightBody>
|
|
494
|
-
<Text>Click to copy the example code to your clipboard.</Text>
|
|
495
|
-
</SpotlightBody>
|
|
496
|
-
<SpotlightFooter>
|
|
497
|
-
<SpotlightStepCount>2 of 2</SpotlightStepCount>
|
|
498
|
-
<SpotlightActions>
|
|
499
|
-
<SpotlightSecondaryAction onClick={back}>Back</SpotlightSecondaryAction>
|
|
500
|
-
<SpotlightPrimaryAction onClick={done}>Done</SpotlightPrimaryAction>
|
|
501
|
-
</SpotlightActions>
|
|
502
|
-
</SpotlightFooter>
|
|
503
|
-
</SpotlightCard>
|
|
504
|
-
</PopoverContent>
|
|
505
|
-
</PopoverProvider>
|
|
506
|
-
|
|
507
|
-
<Button appearance="primary" onClick={() => setCurrentStep(1)}>
|
|
508
|
-
Start tour
|
|
509
|
-
</Button>
|
|
510
|
-
</>
|
|
511
|
-
);
|
|
512
|
-
};`,
|
|
513
|
-
explanation: `Key changes when migrating a multi-step spotlight tour:
|
|
514
|
-
- SpotlightManager coordinated multiple spotlights in a tour. PopoverProvider manages internal state for a single spotlight.
|
|
515
|
-
- Each target gets its own PopoverProvider > PopoverTarget > PopoverContent structure
|
|
516
|
-
- The spotlight array pattern is replaced with individual SpotlightCard components per target
|
|
517
|
-
- Control visibility with isVisible={currentStep === n} on each PopoverContent
|
|
518
|
-
- Add SpotlightStepCount component in SpotlightFooter to show progress (e.g., "1 of 3")
|
|
519
|
-
- Use SpotlightSecondaryAction for "Back" buttons instead of appearance: 'subtle' in the actions array
|
|
520
|
-
- Use SpotlightPrimaryAction for "Next" and "Done" buttons
|
|
521
|
-
- The renderActiveSpotlight pattern is no longer needed - visibility is controlled declaratively
|
|
522
|
-
- Navigation functions use Math.max/Math.min to bound the step range safely
|
|
523
|
-
- All other migration changes from single step spotlight migration guide apply.`
|
|
524
|
-
}],
|
|
525
|
-
bestPractices: ['Use a numeric currentStep state where 0 = hidden, 1+ = active step number', 'Always include SpotlightStepCount in multi-step tours for user orientation', 'First step should only have "Next" action, middle steps have "Back" and "Next", last step has "Back" and "Done"', 'Use SpotlightSecondaryAction for back/dismiss actions and SpotlightPrimaryAction for next/done', 'Include SpotlightDismissControl with onClick={dismiss} so users can exit the tour at any point', 'Bound navigation functions with Math.max/Math.min to prevent invalid step values', 'Preference duplicating Spotlight code instead of trying to have a single `@atlaskit/spotlight` instance that conditionally renders content based on step.'],
|
|
526
|
-
additionalResources
|
|
527
|
-
};
|
|
528
|
-
export const onboardingWithMotion = {
|
|
529
|
-
id: 'motion',
|
|
530
|
-
title: 'Single Step Spotlight with Motion Migration',
|
|
531
|
-
description: 'Migrate a single step spotlight with entrance animation from @atlaskit/onboarding to @atlaskit/spotlight using @atlaskit/motion',
|
|
532
|
-
fromPackage: '@atlaskit/onboarding',
|
|
533
|
-
toPackage: '@atlaskit/spotlight',
|
|
534
|
-
examples: [{
|
|
535
|
-
title: 'Migrate spotlight with transition animation',
|
|
536
|
-
description: 'Replace SpotlightTransition with FadeIn from @atlaskit/motion wrapped around the SpotlightCard',
|
|
537
|
-
before: `import React, { useState } from 'react';
|
|
538
|
-
import Button from '@atlaskit/button/new';
|
|
539
|
-
import {
|
|
540
|
-
Spotlight,
|
|
541
|
-
SpotlightManager,
|
|
542
|
-
SpotlightTarget,
|
|
543
|
-
SpotlightTransition,
|
|
544
|
-
} from '@atlaskit/onboarding';
|
|
545
|
-
|
|
546
|
-
const OnboardingSpotlightWithTransition = () => {
|
|
547
|
-
const [isSpotlightActive, setIsSpotlightActive] = useState(false);
|
|
548
|
-
const start = () => setIsSpotlightActive(true);
|
|
549
|
-
const end = () => setIsSpotlightActive(false);
|
|
550
|
-
|
|
551
|
-
return (
|
|
552
|
-
<SpotlightManager>
|
|
553
|
-
<SpotlightTarget name="my-target">
|
|
554
|
-
<Button>Target Element</Button>
|
|
555
|
-
</SpotlightTarget>
|
|
556
|
-
<div>
|
|
557
|
-
<Button appearance="primary" onClick={start}>
|
|
558
|
-
Show spotlight
|
|
559
|
-
</Button>
|
|
560
|
-
</div>
|
|
561
|
-
<SpotlightTransition>
|
|
562
|
-
{isSpotlightActive && (
|
|
563
|
-
<Spotlight
|
|
564
|
-
actions={[
|
|
565
|
-
{
|
|
566
|
-
onClick: end,
|
|
567
|
-
text: 'Got it',
|
|
568
|
-
},
|
|
569
|
-
]}
|
|
570
|
-
heading="Feature Heading"
|
|
571
|
-
target="my-target"
|
|
572
|
-
key="my-target"
|
|
573
|
-
>
|
|
574
|
-
This is the spotlight body content describing the feature.
|
|
575
|
-
</Spotlight>
|
|
576
|
-
)}
|
|
577
|
-
</SpotlightTransition>
|
|
578
|
-
</SpotlightManager>
|
|
579
|
-
);
|
|
580
|
-
};`,
|
|
581
|
-
after: `import React, { useState } from 'react';
|
|
582
|
-
import Button from '@atlaskit/button/new';
|
|
583
|
-
import { FadeIn } from '@atlaskit/motion';
|
|
584
|
-
import { Text } from '@atlaskit/primitives/compiled';
|
|
585
|
-
import {
|
|
586
|
-
PopoverContent,
|
|
587
|
-
PopoverProvider,
|
|
588
|
-
PopoverTarget,
|
|
589
|
-
SpotlightActions,
|
|
590
|
-
SpotlightBody,
|
|
591
|
-
SpotlightCard,
|
|
592
|
-
SpotlightControls,
|
|
593
|
-
SpotlightDismissControl,
|
|
594
|
-
SpotlightFooter,
|
|
595
|
-
SpotlightHeader,
|
|
596
|
-
SpotlightHeadline,
|
|
597
|
-
SpotlightPrimaryAction,
|
|
598
|
-
} from '@atlaskit/spotlight';
|
|
599
|
-
|
|
600
|
-
const SpotlightWithMotion = () => {
|
|
601
|
-
const [isVisible, setIsVisible] = useState(false);
|
|
602
|
-
const dismiss = () => setIsVisible(false);
|
|
603
|
-
const done = () => setIsVisible(false);
|
|
604
|
-
|
|
605
|
-
return (
|
|
606
|
-
<PopoverProvider>
|
|
607
|
-
<PopoverTarget>
|
|
608
|
-
<Button onClick={() => setIsVisible(true)}>Target Element</Button>
|
|
609
|
-
</PopoverTarget>
|
|
610
|
-
<PopoverContent done={done} dismiss={dismiss} placement="bottom-start" isVisible={isVisible}>
|
|
611
|
-
<FadeIn entranceDirection="left">
|
|
612
|
-
{(props) => (
|
|
613
|
-
<div {...props}>
|
|
614
|
-
<SpotlightCard>
|
|
615
|
-
<SpotlightHeader>
|
|
616
|
-
<SpotlightHeadline>Feature Heading</SpotlightHeadline>
|
|
617
|
-
<SpotlightControls>
|
|
618
|
-
<SpotlightDismissControl />
|
|
619
|
-
</SpotlightControls>
|
|
620
|
-
</SpotlightHeader>
|
|
621
|
-
<SpotlightBody>
|
|
622
|
-
<Text>This is the spotlight body content describing the feature.</Text>
|
|
623
|
-
</SpotlightBody>
|
|
624
|
-
<SpotlightFooter>
|
|
625
|
-
<SpotlightActions>
|
|
626
|
-
<SpotlightPrimaryAction onClick={done}>Got it</SpotlightPrimaryAction>
|
|
627
|
-
</SpotlightActions>
|
|
628
|
-
</SpotlightFooter>
|
|
629
|
-
</SpotlightCard>
|
|
630
|
-
</div>
|
|
631
|
-
)}
|
|
632
|
-
</FadeIn>
|
|
633
|
-
</PopoverContent>
|
|
634
|
-
</PopoverProvider>
|
|
635
|
-
);
|
|
636
|
-
};`,
|
|
637
|
-
explanation: `Key changes when migrating a spotlight with transition animation:
|
|
638
|
-
- Replace SpotlightTransition with FadeIn from @atlaskit/motion
|
|
639
|
-
- Import FadeIn from '@atlaskit/motion' instead of SpotlightTransition from '@atlaskit/onboarding'
|
|
640
|
-
- FadeIn uses a render props pattern - wrap content in {(props) => <div {...props}>...</div>}
|
|
641
|
-
- The entranceDirection prop controls animation direction: 'left', 'right', 'top', or 'bottom'
|
|
642
|
-
- All other migration changes from single step spotlight apply (PopoverProvider, compositional components, etc.)`
|
|
643
|
-
}],
|
|
644
|
-
bestPractices: ['Choose entranceDirection based on spotlight placement (e.g., "left" for right-placed spotlights)', 'Motion is optional - only add if the original onboarding spotlight used SpotlightTransition for entrance effects'],
|
|
645
|
-
additionalResources
|
|
646
|
-
};
|