@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.
Files changed (457) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/a11y-fixes/package.json +14 -0
  3. package/a11y-guidelines/package.json +14 -0
  4. package/dist/cjs/entry-points/a11y-fixes.js +12 -0
  5. package/dist/cjs/entry-points/a11y-guidelines.js +12 -0
  6. package/dist/cjs/entry-points/analyze-a11y.js +40 -0
  7. package/dist/cjs/entry-points/get-a11y-guidelines.js +26 -0
  8. package/dist/cjs/entry-points/get-all-components.js +19 -0
  9. package/dist/cjs/entry-points/get-all-icons.js +19 -0
  10. package/dist/cjs/entry-points/get-all-tokens.js +19 -0
  11. package/dist/cjs/entry-points/get-atlaskit-components.js +19 -0
  12. package/dist/cjs/entry-points/get-guidelines.js +26 -0
  13. package/dist/cjs/entry-points/get-lint-rules.js +26 -0
  14. package/dist/cjs/entry-points/i18n-conversion-guide.js +12 -0
  15. package/dist/cjs/entry-points/i18n-conversion.js +26 -0
  16. package/dist/cjs/entry-points/migration-guides.js +26 -0
  17. package/dist/cjs/entry-points/migration-registry.js +12 -0
  18. package/dist/cjs/entry-points/plan.js +26 -0
  19. package/dist/cjs/entry-points/search-atlaskit-components.js +26 -0
  20. package/dist/cjs/entry-points/search-components.js +26 -0
  21. package/dist/cjs/entry-points/search-icons.js +26 -0
  22. package/dist/cjs/entry-points/search-tokens.js +26 -0
  23. package/dist/cjs/entry-points/suggest-a11y-fixes.js +26 -0
  24. package/dist/cjs/helpers/agent.js +9 -0
  25. package/dist/cjs/helpers/analytics.js +1 -0
  26. package/dist/cjs/helpers/clean-query.js +10 -0
  27. package/dist/cjs/helpers/index.js +14 -11
  28. package/dist/cjs/helpers/send-operational-event.js +56 -0
  29. package/dist/cjs/helpers/validation.js +2 -2
  30. package/dist/cjs/helpers/zod-to-json-schema.js +12 -0
  31. package/dist/cjs/index.js +127 -85
  32. package/dist/cjs/tools/analyze-a11y/analyze-a11y-input-schema.js +13 -0
  33. package/dist/cjs/tools/analyze-a11y/analyze-a11y-localhost-input-schema.js +13 -0
  34. package/dist/cjs/tools/analyze-a11y/analyze-a11y-tool.js +242 -0
  35. package/dist/cjs/tools/analyze-a11y/analyze-localhost-a11y-tool.js +214 -0
  36. package/dist/cjs/tools/analyze-a11y/generate-ads-fix-for-violation.js +32 -0
  37. package/dist/cjs/tools/analyze-a11y/list-analyze-a11y-tool.js +20 -0
  38. package/dist/cjs/tools/analyze-a11y/list-analyze-localhost-a11y-tool.js +20 -0
  39. package/dist/cjs/tools/get-a11y-guidelines/get-a11y-guidelines-input-schema.js +14 -0
  40. package/dist/cjs/tools/get-a11y-guidelines/{index.js → get-a11y-guidelines-tool.js} +1 -18
  41. package/dist/cjs/tools/get-a11y-guidelines/list-get-a11y-guidelines-tool.js +22 -0
  42. package/dist/cjs/tools/get-all-components/components.codegen.js +3 -3
  43. package/dist/cjs/tools/get-all-components/{index.js → get-all-components-tool.js} +1 -15
  44. package/dist/cjs/tools/get-all-components/list-get-all-components-tool.js +22 -0
  45. package/dist/cjs/tools/get-all-icons/{index.js → get-all-icons-tool.js} +1 -15
  46. package/dist/cjs/tools/get-all-icons/list-get-all-icons-tool.js +22 -0
  47. package/dist/cjs/tools/get-all-tokens/{index.js → get-all-tokens-tool.js} +1 -18
  48. package/dist/cjs/tools/get-all-tokens/list-get-all-tokens-tool.js +23 -0
  49. package/dist/cjs/tools/get-atlaskit-components/atlaskit-components.codegen.js +1948 -0
  50. package/dist/cjs/tools/get-atlaskit-components/get-atlaskit-components-tool.js +40 -0
  51. package/dist/cjs/tools/get-atlaskit-components/list-get-atlaskit-components-tool.js +22 -0
  52. package/dist/cjs/tools/get-guidelines/get-guidelines-input-schema.js +11 -0
  53. package/dist/cjs/tools/get-guidelines/{index.js → get-guidelines-tool.js} +3 -20
  54. package/dist/cjs/tools/get-guidelines/list-get-guidelines-tool.js +22 -0
  55. package/dist/cjs/tools/get-lint-rules/get-lint-rules-input-schema.js +14 -0
  56. package/dist/cjs/tools/get-lint-rules/{index.js → get-lint-rules-tool.js} +3 -21
  57. package/dist/cjs/tools/get-lint-rules/list-get-lint-rules-tool.js +22 -0
  58. package/dist/cjs/tools/i18n-conversion/i18n-conversion-input-schema.js +12 -0
  59. package/dist/cjs/tools/i18n-conversion/i18n-conversion-tool.js +33 -0
  60. package/dist/cjs/tools/i18n-conversion/{index.js → list-i18n-conversion-tool.js} +5 -33
  61. package/dist/cjs/tools/migration-guides/get-available-migration-ids.js +22 -0
  62. package/dist/cjs/tools/migration-guides/{registry.js → get-available-migrations-description.js} +1 -14
  63. package/dist/cjs/tools/migration-guides/list-migration-guides-tool.js +23 -0
  64. package/dist/cjs/tools/migration-guides/migration-guides-input-schema.js +17 -0
  65. package/dist/cjs/tools/migration-guides/{index.js → migration-guides-tool.js} +3 -24
  66. package/dist/cjs/tools/migration-guides/migration-registry.js +5 -2
  67. package/dist/cjs/tools/migration-guides/migrations/onboarding-jira-spotlight.js +29 -0
  68. package/dist/cjs/tools/migration-guides/migrations/onboarding-multi-step.js +23 -0
  69. package/dist/cjs/tools/migration-guides/migrations/onboarding-single-step.js +23 -0
  70. package/dist/cjs/tools/migration-guides/migrations/onboarding-with-motion.js +23 -0
  71. package/dist/cjs/tools/plan/list-plan-tool.js +22 -0
  72. package/dist/cjs/tools/plan/plan-input-schema.js +16 -0
  73. package/dist/cjs/tools/plan/{index.js → plan-tool.js} +28 -36
  74. package/dist/cjs/tools/search-atlaskit-components/list-search-atlaskit-components-tool.js +22 -0
  75. package/dist/cjs/tools/search-atlaskit-components/search-atlaskit-components-input-schema.js +11 -0
  76. package/dist/cjs/tools/search-atlaskit-components/search-atlaskit-components-tool.js +114 -0
  77. package/dist/cjs/tools/search-components/list-search-components-tool.js +22 -0
  78. package/dist/cjs/tools/search-components/search-components-input-schema.js +13 -0
  79. package/dist/cjs/tools/search-components/{index.js → search-components-tool.js} +3 -19
  80. package/dist/cjs/tools/search-icons/list-search-icons-tool.js +22 -0
  81. package/dist/cjs/tools/search-icons/search-icons-input-schema.js +13 -0
  82. package/dist/cjs/tools/search-icons/{index.js → search-icons-tool.js} +3 -19
  83. package/dist/cjs/tools/search-tokens/list-search-tokens-tool.js +22 -0
  84. package/dist/cjs/tools/search-tokens/search-tokens-input-schema.js +13 -0
  85. package/dist/cjs/tools/search-tokens/{index.js → search-tokens-tool.js} +3 -19
  86. package/dist/cjs/tools/suggest-a11y-fixes/list-suggest-a11y-fixes-tool.js +22 -0
  87. package/dist/cjs/tools/suggest-a11y-fixes/suggest-a11y-fixes-input-schema.js +15 -0
  88. package/dist/cjs/tools/suggest-a11y-fixes/{index.js → suggest-a11y-fixes-tool.js} +1 -22
  89. package/dist/es2019/entry-points/a11y-fixes.js +1 -0
  90. package/dist/es2019/entry-points/a11y-guidelines.js +1 -0
  91. package/dist/es2019/entry-points/analyze-a11y.js +5 -0
  92. package/dist/es2019/entry-points/get-a11y-guidelines.js +3 -0
  93. package/dist/es2019/entry-points/get-all-components.js +2 -0
  94. package/dist/es2019/entry-points/get-all-icons.js +2 -0
  95. package/dist/es2019/entry-points/get-all-tokens.js +2 -0
  96. package/dist/es2019/entry-points/get-atlaskit-components.js +2 -0
  97. package/dist/es2019/entry-points/get-guidelines.js +3 -0
  98. package/dist/es2019/entry-points/get-lint-rules.js +3 -0
  99. package/dist/es2019/entry-points/i18n-conversion-guide.js +1 -0
  100. package/dist/es2019/entry-points/i18n-conversion.js +3 -0
  101. package/dist/es2019/entry-points/migration-guides.js +3 -0
  102. package/dist/es2019/entry-points/migration-registry.js +1 -0
  103. package/dist/es2019/entry-points/plan.js +3 -0
  104. package/dist/es2019/entry-points/search-atlaskit-components.js +3 -0
  105. package/dist/es2019/entry-points/search-components.js +3 -0
  106. package/dist/es2019/entry-points/search-icons.js +3 -0
  107. package/dist/es2019/entry-points/search-tokens.js +3 -0
  108. package/dist/es2019/entry-points/suggest-a11y-fixes.js +3 -0
  109. package/dist/es2019/helpers/agent.js +3 -0
  110. package/dist/es2019/helpers/analytics.js +1 -0
  111. package/dist/es2019/helpers/clean-query.js +2 -0
  112. package/dist/es2019/helpers/index.js +2 -7
  113. package/dist/es2019/helpers/send-operational-event.js +49 -0
  114. package/dist/es2019/helpers/validation.js +1 -1
  115. package/dist/es2019/helpers/zod-to-json-schema.js +6 -0
  116. package/dist/es2019/index.js +138 -92
  117. package/dist/es2019/tools/analyze-a11y/analyze-a11y-input-schema.js +7 -0
  118. package/dist/es2019/tools/analyze-a11y/analyze-a11y-localhost-input-schema.js +7 -0
  119. package/dist/es2019/tools/analyze-a11y/analyze-a11y-tool.js +212 -0
  120. package/dist/es2019/tools/analyze-a11y/analyze-localhost-a11y-tool.js +163 -0
  121. package/dist/es2019/tools/analyze-a11y/generate-ads-fix-for-violation.js +26 -0
  122. package/dist/es2019/tools/analyze-a11y/list-analyze-a11y-tool.js +21 -0
  123. package/dist/es2019/tools/analyze-a11y/list-analyze-localhost-a11y-tool.js +23 -0
  124. package/dist/es2019/tools/get-a11y-guidelines/get-a11y-guidelines-input-schema.js +7 -0
  125. package/dist/es2019/tools/get-a11y-guidelines/get-a11y-guidelines-tool.js +34 -0
  126. package/dist/es2019/tools/get-a11y-guidelines/list-get-a11y-guidelines-tool.js +23 -0
  127. package/dist/es2019/tools/get-all-components/components.codegen.js +3 -3
  128. package/dist/es2019/tools/get-all-components/get-all-components-tool.js +12 -0
  129. package/dist/es2019/tools/get-all-components/{index.js → list-get-all-components-tool.js} +1 -12
  130. package/dist/es2019/tools/get-all-icons/get-all-icons-tool.js +10 -0
  131. package/dist/es2019/tools/get-all-icons/{index.js → list-get-all-icons-tool.js} +2 -11
  132. package/dist/es2019/tools/get-all-tokens/get-all-tokens-tool.js +13 -0
  133. package/dist/es2019/tools/get-all-tokens/{index.js → list-get-all-tokens-tool.js} +2 -15
  134. package/dist/es2019/tools/get-atlaskit-components/atlaskit-components.codegen.js +1942 -0
  135. package/dist/es2019/tools/get-atlaskit-components/get-atlaskit-components-tool.js +14 -0
  136. package/dist/es2019/tools/get-atlaskit-components/list-get-atlaskit-components-tool.js +21 -0
  137. package/dist/es2019/tools/get-guidelines/get-guidelines-input-schema.js +5 -0
  138. package/dist/es2019/tools/get-guidelines/get-guidelines-tool.js +55 -0
  139. package/dist/es2019/tools/get-guidelines/{index.js → list-get-guidelines-tool.js} +2 -59
  140. package/dist/es2019/tools/get-lint-rules/get-lint-rules-input-schema.js +7 -0
  141. package/dist/es2019/tools/get-lint-rules/{index.js → get-lint-rules-tool.js} +1 -28
  142. package/dist/es2019/tools/get-lint-rules/list-get-lint-rules-tool.js +24 -0
  143. package/dist/es2019/tools/i18n-conversion/i18n-conversion-input-schema.js +5 -0
  144. package/dist/es2019/tools/i18n-conversion/i18n-conversion-tool.js +11 -0
  145. package/dist/es2019/tools/i18n-conversion/{index.js → list-i18n-conversion-tool.js} +2 -14
  146. package/dist/es2019/tools/migration-guides/get-available-migration-ids.js +17 -0
  147. package/dist/es2019/tools/migration-guides/{registry.js → get-available-migrations-description.js} +1 -8
  148. package/dist/es2019/tools/migration-guides/list-migration-guides-tool.js +25 -0
  149. package/dist/es2019/tools/migration-guides/migration-guides-input-schema.js +10 -0
  150. package/dist/es2019/tools/migration-guides/migration-guides-tool.js +39 -0
  151. package/dist/es2019/tools/migration-guides/migration-registry.js +4 -1
  152. package/dist/es2019/tools/migration-guides/migrations/onboarding-jira-spotlight.js +230 -0
  153. package/dist/es2019/tools/migration-guides/migrations/onboarding-multi-step.js +179 -0
  154. package/dist/es2019/tools/migration-guides/migrations/onboarding-single-step.js +120 -0
  155. package/dist/es2019/tools/migration-guides/migrations/onboarding-with-motion.js +120 -0
  156. package/dist/es2019/tools/plan/list-plan-tool.js +47 -0
  157. package/dist/es2019/tools/plan/plan-input-schema.js +9 -0
  158. package/dist/es2019/tools/plan/plan-tool.js +111 -0
  159. package/dist/es2019/tools/search-atlaskit-components/list-search-atlaskit-components-tool.js +19 -0
  160. package/dist/es2019/tools/search-atlaskit-components/search-atlaskit-components-input-schema.js +5 -0
  161. package/dist/es2019/tools/search-atlaskit-components/search-atlaskit-components-tool.js +84 -0
  162. package/dist/es2019/tools/search-components/list-search-components-tool.js +19 -0
  163. package/dist/es2019/tools/search-components/search-components-input-schema.js +6 -0
  164. package/dist/es2019/tools/search-components/{index.js → search-components-tool.js} +2 -21
  165. package/dist/es2019/tools/search-icons/list-search-icons-tool.js +25 -0
  166. package/dist/es2019/tools/search-icons/search-icons-input-schema.js +6 -0
  167. package/dist/es2019/tools/search-icons/{index.js → search-icons-tool.js} +2 -27
  168. package/dist/es2019/tools/search-tokens/list-search-tokens-tool.js +25 -0
  169. package/dist/es2019/tools/search-tokens/search-tokens-input-schema.js +6 -0
  170. package/dist/es2019/tools/search-tokens/{index.js → search-tokens-tool.js} +2 -27
  171. package/dist/es2019/tools/suggest-a11y-fixes/list-suggest-a11y-fixes-tool.js +25 -0
  172. package/dist/es2019/tools/suggest-a11y-fixes/suggest-a11y-fixes-input-schema.js +8 -0
  173. package/dist/es2019/tools/suggest-a11y-fixes/{index.js → suggest-a11y-fixes-tool.js} +0 -30
  174. package/dist/esm/entry-points/a11y-fixes.js +1 -0
  175. package/dist/esm/entry-points/a11y-guidelines.js +1 -0
  176. package/dist/esm/entry-points/analyze-a11y.js +5 -0
  177. package/dist/esm/entry-points/get-a11y-guidelines.js +3 -0
  178. package/dist/esm/entry-points/get-all-components.js +2 -0
  179. package/dist/esm/entry-points/get-all-icons.js +2 -0
  180. package/dist/esm/entry-points/get-all-tokens.js +2 -0
  181. package/dist/esm/entry-points/get-atlaskit-components.js +2 -0
  182. package/dist/esm/entry-points/get-guidelines.js +3 -0
  183. package/dist/esm/entry-points/get-lint-rules.js +3 -0
  184. package/dist/esm/entry-points/i18n-conversion-guide.js +1 -0
  185. package/dist/esm/entry-points/i18n-conversion.js +3 -0
  186. package/dist/esm/entry-points/migration-guides.js +3 -0
  187. package/dist/esm/entry-points/migration-registry.js +1 -0
  188. package/dist/esm/entry-points/plan.js +3 -0
  189. package/dist/esm/entry-points/search-atlaskit-components.js +3 -0
  190. package/dist/esm/entry-points/search-components.js +3 -0
  191. package/dist/esm/entry-points/search-icons.js +3 -0
  192. package/dist/esm/entry-points/search-tokens.js +3 -0
  193. package/dist/esm/entry-points/suggest-a11y-fixes.js +3 -0
  194. package/dist/esm/helpers/agent.js +3 -0
  195. package/dist/esm/helpers/analytics.js +1 -0
  196. package/dist/esm/helpers/clean-query.js +4 -0
  197. package/dist/esm/helpers/index.js +2 -9
  198. package/dist/esm/helpers/send-operational-event.js +52 -0
  199. package/dist/esm/helpers/validation.js +1 -1
  200. package/dist/esm/helpers/zod-to-json-schema.js +6 -0
  201. package/dist/esm/index.js +65 -23
  202. package/dist/esm/tools/analyze-a11y/analyze-a11y-input-schema.js +7 -0
  203. package/dist/esm/tools/analyze-a11y/analyze-a11y-localhost-input-schema.js +7 -0
  204. package/dist/esm/tools/analyze-a11y/analyze-a11y-tool.js +235 -0
  205. package/dist/esm/tools/analyze-a11y/analyze-localhost-a11y-tool.js +207 -0
  206. package/dist/esm/tools/analyze-a11y/generate-ads-fix-for-violation.js +26 -0
  207. package/dist/esm/tools/analyze-a11y/list-analyze-a11y-tool.js +14 -0
  208. package/dist/esm/tools/analyze-a11y/list-analyze-localhost-a11y-tool.js +14 -0
  209. package/dist/esm/tools/get-a11y-guidelines/get-a11y-guidelines-input-schema.js +7 -0
  210. package/dist/esm/tools/get-a11y-guidelines/{index.js → get-a11y-guidelines-tool.js} +0 -17
  211. package/dist/esm/tools/get-a11y-guidelines/list-get-a11y-guidelines-tool.js +16 -0
  212. package/dist/esm/tools/get-all-components/components.codegen.js +3 -3
  213. package/dist/esm/tools/get-all-components/{index.js → get-all-components-tool.js} +0 -15
  214. package/dist/esm/tools/get-all-components/list-get-all-components-tool.js +16 -0
  215. package/dist/esm/tools/get-all-icons/{index.js → get-all-icons-tool.js} +0 -15
  216. package/dist/esm/tools/get-all-icons/list-get-all-icons-tool.js +16 -0
  217. package/dist/esm/tools/get-all-tokens/{index.js → get-all-tokens-tool.js} +0 -17
  218. package/dist/esm/tools/get-all-tokens/list-get-all-tokens-tool.js +17 -0
  219. package/dist/esm/tools/get-atlaskit-components/atlaskit-components.codegen.js +1942 -0
  220. package/dist/esm/tools/get-atlaskit-components/get-atlaskit-components-tool.js +32 -0
  221. package/dist/esm/tools/get-atlaskit-components/list-get-atlaskit-components-tool.js +16 -0
  222. package/dist/esm/tools/get-guidelines/get-guidelines-input-schema.js +5 -0
  223. package/dist/esm/tools/get-guidelines/{index.js → get-guidelines-tool.js} +1 -19
  224. package/dist/esm/tools/get-guidelines/list-get-guidelines-tool.js +16 -0
  225. package/dist/esm/tools/get-lint-rules/get-lint-rules-input-schema.js +7 -0
  226. package/dist/esm/tools/get-lint-rules/{index.js → get-lint-rules-tool.js} +1 -19
  227. package/dist/esm/tools/get-lint-rules/list-get-lint-rules-tool.js +15 -0
  228. package/dist/esm/tools/i18n-conversion/i18n-conversion-input-schema.js +5 -0
  229. package/dist/esm/tools/i18n-conversion/i18n-conversion-tool.js +26 -0
  230. package/dist/esm/tools/i18n-conversion/{index.js → list-i18n-conversion-tool.js} +3 -30
  231. package/dist/esm/tools/migration-guides/get-available-migration-ids.js +17 -0
  232. package/dist/esm/tools/migration-guides/{registry.js → get-available-migrations-description.js} +1 -8
  233. package/dist/esm/tools/migration-guides/list-migration-guides-tool.js +17 -0
  234. package/dist/esm/tools/migration-guides/migration-guides-input-schema.js +10 -0
  235. package/dist/esm/tools/migration-guides/{index.js → migration-guides-tool.js} +1 -23
  236. package/dist/esm/tools/migration-guides/migration-registry.js +4 -1
  237. package/dist/esm/tools/migration-guides/migrations/onboarding-jira-spotlight.js +23 -0
  238. package/dist/esm/tools/migration-guides/migrations/onboarding-multi-step.js +17 -0
  239. package/dist/esm/tools/migration-guides/migrations/onboarding-single-step.js +17 -0
  240. package/dist/esm/tools/migration-guides/migrations/onboarding-with-motion.js +17 -0
  241. package/dist/esm/tools/plan/list-plan-tool.js +16 -0
  242. package/dist/esm/tools/plan/plan-input-schema.js +9 -0
  243. package/dist/esm/tools/plan/{index.js → plan-tool.js} +24 -32
  244. package/dist/esm/tools/search-atlaskit-components/list-search-atlaskit-components-tool.js +16 -0
  245. package/dist/esm/tools/search-atlaskit-components/search-atlaskit-components-input-schema.js +5 -0
  246. package/dist/esm/tools/search-atlaskit-components/search-atlaskit-components-tool.js +107 -0
  247. package/dist/esm/tools/search-components/list-search-components-tool.js +16 -0
  248. package/dist/esm/tools/search-components/search-components-input-schema.js +6 -0
  249. package/dist/esm/tools/search-components/{index.js → search-components-tool.js} +2 -18
  250. package/dist/esm/tools/search-icons/list-search-icons-tool.js +16 -0
  251. package/dist/esm/tools/search-icons/search-icons-input-schema.js +6 -0
  252. package/dist/esm/tools/search-icons/{index.js → search-icons-tool.js} +2 -18
  253. package/dist/esm/tools/search-tokens/list-search-tokens-tool.js +16 -0
  254. package/dist/esm/tools/search-tokens/search-tokens-input-schema.js +6 -0
  255. package/dist/esm/tools/search-tokens/{index.js → search-tokens-tool.js} +2 -18
  256. package/dist/esm/tools/suggest-a11y-fixes/list-suggest-a11y-fixes-tool.js +16 -0
  257. package/dist/esm/tools/suggest-a11y-fixes/suggest-a11y-fixes-input-schema.js +8 -0
  258. package/dist/esm/tools/suggest-a11y-fixes/{index.js → suggest-a11y-fixes-tool.js} +0 -21
  259. package/dist/types/entry-points/a11y-fixes.d.ts +1 -0
  260. package/dist/types/entry-points/a11y-guidelines.d.ts +1 -0
  261. package/dist/types/entry-points/analyze-a11y.d.ts +5 -0
  262. package/dist/types/entry-points/get-a11y-guidelines.d.ts +3 -0
  263. package/dist/types/entry-points/get-all-components.d.ts +2 -0
  264. package/dist/types/entry-points/get-all-icons.d.ts +2 -0
  265. package/dist/types/entry-points/get-all-tokens.d.ts +2 -0
  266. package/dist/types/entry-points/get-atlaskit-components.d.ts +2 -0
  267. package/dist/types/entry-points/get-guidelines.d.ts +3 -0
  268. package/dist/types/entry-points/get-lint-rules.d.ts +3 -0
  269. package/dist/types/entry-points/i18n-conversion-guide.d.ts +1 -0
  270. package/dist/types/entry-points/i18n-conversion.d.ts +3 -0
  271. package/dist/types/entry-points/migration-guides.d.ts +3 -0
  272. package/dist/types/entry-points/migration-registry.d.ts +1 -0
  273. package/dist/types/entry-points/plan.d.ts +3 -0
  274. package/dist/types/entry-points/search-atlaskit-components.d.ts +3 -0
  275. package/dist/types/entry-points/search-components.d.ts +3 -0
  276. package/dist/types/entry-points/search-icons.d.ts +3 -0
  277. package/dist/types/entry-points/search-tokens.d.ts +3 -0
  278. package/dist/types/entry-points/suggest-a11y-fixes.d.ts +3 -0
  279. package/dist/types/helpers/agent.d.ts +3 -0
  280. package/dist/types/helpers/clean-query.d.ts +1 -0
  281. package/dist/types/helpers/index.d.ts +2 -4
  282. package/dist/types/helpers/send-operational-event.d.ts +13 -0
  283. package/dist/types/helpers/zod-to-json-schema.d.ts +3 -0
  284. package/dist/types/tools/analyze-a11y/analyze-a11y-input-schema.d.ts +17 -0
  285. package/dist/types/tools/analyze-a11y/analyze-a11y-localhost-input-schema.d.ts +17 -0
  286. package/dist/types/tools/analyze-a11y/analyze-a11y-tool.d.ts +8 -0
  287. package/dist/types/tools/analyze-a11y/analyze-localhost-a11y-tool.d.ts +8 -0
  288. package/dist/types/tools/analyze-a11y/generate-ads-fix-for-violation.d.ts +1 -0
  289. package/dist/types/tools/analyze-a11y/list-analyze-a11y-tool.d.ts +2 -0
  290. package/dist/types/tools/analyze-a11y/list-analyze-localhost-a11y-tool.d.ts +2 -0
  291. package/dist/types/tools/get-a11y-guidelines/get-a11y-guidelines-input-schema.d.ts +8 -0
  292. package/dist/types/tools/get-a11y-guidelines/get-a11y-guidelines-tool.d.ts +8 -0
  293. package/dist/types/tools/get-a11y-guidelines/list-get-a11y-guidelines-tool.d.ts +2 -0
  294. package/dist/types/tools/get-all-components/components.codegen.d.ts +2 -2
  295. package/dist/types/tools/get-all-components/{index.d.ts → get-all-components-tool.d.ts} +0 -2
  296. package/dist/types/tools/get-all-components/list-get-all-components-tool.d.ts +2 -0
  297. 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
  298. package/dist/types/tools/get-all-icons/list-get-all-icons-tool.d.ts +2 -0
  299. package/dist/types/tools/get-all-tokens/{index.d.ts → get-all-tokens-tool.d.ts} +0 -2
  300. package/dist/types/tools/get-all-tokens/list-get-all-tokens-tool.d.ts +2 -0
  301. package/dist/types/tools/get-atlaskit-components/atlaskit-components.codegen.d.ts +10 -0
  302. package/dist/types/tools/get-atlaskit-components/get-atlaskit-components-tool.d.ts +6 -0
  303. package/dist/types/tools/get-atlaskit-components/list-get-atlaskit-components-tool.d.ts +2 -0
  304. package/dist/types/tools/get-guidelines/get-guidelines-input-schema.d.ts +5 -0
  305. package/dist/types/tools/get-guidelines/get-guidelines-tool.d.ts +8 -0
  306. package/dist/types/tools/get-guidelines/list-get-guidelines-tool.d.ts +2 -0
  307. package/dist/types/tools/get-lint-rules/get-lint-rules-input-schema.d.ts +6 -0
  308. package/dist/types/tools/get-lint-rules/get-lint-rules-tool.d.ts +4 -0
  309. package/dist/types/tools/get-lint-rules/{index.d.ts → list-get-lint-rules-tool.d.ts} +0 -8
  310. package/dist/types/tools/i18n-conversion/i18n-conversion-input-schema.d.ts +8 -0
  311. package/dist/types/tools/i18n-conversion/i18n-conversion-tool.d.ts +8 -0
  312. package/dist/types/tools/i18n-conversion/list-i18n-conversion-tool.d.ts +2 -0
  313. package/dist/types/tools/migration-guides/get-available-migration-ids.d.ts +12 -0
  314. package/dist/types/tools/migration-guides/{registry.d.ts → get-available-migrations-description.d.ts} +0 -5
  315. package/dist/types/tools/migration-guides/list-migration-guides-tool.d.ts +2 -0
  316. package/dist/types/tools/migration-guides/migration-guides-input-schema.d.ts +11 -0
  317. package/dist/types/tools/migration-guides/migration-guides-tool.d.ts +8 -0
  318. package/dist/types/tools/migration-guides/migrations/onboarding-jira-spotlight.d.ts +2 -0
  319. package/dist/types/tools/migration-guides/migrations/onboarding-multi-step.d.ts +2 -0
  320. package/dist/types/tools/migration-guides/migrations/onboarding-single-step.d.ts +2 -0
  321. package/dist/types/tools/migration-guides/migrations/onboarding-with-motion.d.ts +2 -0
  322. package/dist/types/tools/plan/list-plan-tool.d.ts +2 -0
  323. package/dist/types/tools/plan/{index.d.ts → plan-input-schema.d.ts} +3 -15
  324. package/dist/types/tools/plan/plan-tool.d.ts +15 -0
  325. package/dist/types/tools/search-atlaskit-components/list-search-atlaskit-components-tool.d.ts +2 -0
  326. package/dist/types/tools/search-atlaskit-components/search-atlaskit-components-input-schema.d.ts +11 -0
  327. package/dist/types/tools/search-atlaskit-components/search-atlaskit-components-tool.d.ts +4 -0
  328. package/dist/types/tools/search-components/list-search-components-tool.d.ts +2 -0
  329. package/dist/{types-ts4.5/tools/search-components/index.d.ts → types/tools/search-components/search-components-input-schema.d.ts} +0 -3
  330. package/dist/types/tools/search-components/search-components-tool.d.ts +4 -0
  331. package/dist/types/tools/search-icons/list-search-icons-tool.d.ts +2 -0
  332. package/dist/{types-ts4.5/tools/search-icons/index.d.ts → types/tools/search-icons/search-icons-input-schema.d.ts} +0 -3
  333. package/dist/types/tools/search-icons/search-icons-tool.d.ts +4 -0
  334. package/dist/types/tools/search-tokens/list-search-tokens-tool.d.ts +2 -0
  335. package/dist/types/tools/search-tokens/{index.d.ts → search-tokens-input-schema.d.ts} +0 -3
  336. package/dist/types/tools/search-tokens/search-tokens-tool.d.ts +4 -0
  337. package/dist/types/tools/suggest-a11y-fixes/list-suggest-a11y-fixes-tool.d.ts +2 -0
  338. package/dist/types/tools/suggest-a11y-fixes/{index.d.ts → suggest-a11y-fixes-input-schema.d.ts} +0 -8
  339. package/dist/types/tools/suggest-a11y-fixes/suggest-a11y-fixes-tool.d.ts +8 -0
  340. package/dist/types-ts4.5/entry-points/a11y-fixes.d.ts +1 -0
  341. package/dist/types-ts4.5/entry-points/a11y-guidelines.d.ts +1 -0
  342. package/dist/types-ts4.5/entry-points/analyze-a11y.d.ts +5 -0
  343. package/dist/types-ts4.5/entry-points/get-a11y-guidelines.d.ts +3 -0
  344. package/dist/types-ts4.5/entry-points/get-all-components.d.ts +2 -0
  345. package/dist/types-ts4.5/entry-points/get-all-icons.d.ts +2 -0
  346. package/dist/types-ts4.5/entry-points/get-all-tokens.d.ts +2 -0
  347. package/dist/types-ts4.5/entry-points/get-atlaskit-components.d.ts +2 -0
  348. package/dist/types-ts4.5/entry-points/get-guidelines.d.ts +3 -0
  349. package/dist/types-ts4.5/entry-points/get-lint-rules.d.ts +3 -0
  350. package/dist/types-ts4.5/entry-points/i18n-conversion-guide.d.ts +1 -0
  351. package/dist/types-ts4.5/entry-points/i18n-conversion.d.ts +3 -0
  352. package/dist/types-ts4.5/entry-points/migration-guides.d.ts +3 -0
  353. package/dist/types-ts4.5/entry-points/migration-registry.d.ts +1 -0
  354. package/dist/types-ts4.5/entry-points/plan.d.ts +3 -0
  355. package/dist/types-ts4.5/entry-points/search-atlaskit-components.d.ts +3 -0
  356. package/dist/types-ts4.5/entry-points/search-components.d.ts +3 -0
  357. package/dist/types-ts4.5/entry-points/search-icons.d.ts +3 -0
  358. package/dist/types-ts4.5/entry-points/search-tokens.d.ts +3 -0
  359. package/dist/types-ts4.5/entry-points/suggest-a11y-fixes.d.ts +3 -0
  360. package/dist/types-ts4.5/helpers/agent.d.ts +3 -0
  361. package/dist/types-ts4.5/helpers/clean-query.d.ts +1 -0
  362. package/dist/types-ts4.5/helpers/index.d.ts +2 -4
  363. package/dist/types-ts4.5/helpers/send-operational-event.d.ts +13 -0
  364. package/dist/types-ts4.5/helpers/zod-to-json-schema.d.ts +3 -0
  365. package/dist/types-ts4.5/tools/analyze-a11y/analyze-a11y-input-schema.d.ts +17 -0
  366. package/dist/types-ts4.5/tools/analyze-a11y/analyze-a11y-localhost-input-schema.d.ts +17 -0
  367. package/dist/types-ts4.5/tools/analyze-a11y/analyze-a11y-tool.d.ts +8 -0
  368. package/dist/types-ts4.5/tools/analyze-a11y/analyze-localhost-a11y-tool.d.ts +8 -0
  369. package/dist/types-ts4.5/tools/analyze-a11y/generate-ads-fix-for-violation.d.ts +1 -0
  370. package/dist/types-ts4.5/tools/analyze-a11y/list-analyze-a11y-tool.d.ts +2 -0
  371. package/dist/types-ts4.5/tools/analyze-a11y/list-analyze-localhost-a11y-tool.d.ts +2 -0
  372. package/dist/types-ts4.5/tools/get-a11y-guidelines/get-a11y-guidelines-input-schema.d.ts +8 -0
  373. package/dist/types-ts4.5/tools/get-a11y-guidelines/get-a11y-guidelines-tool.d.ts +8 -0
  374. package/dist/types-ts4.5/tools/get-a11y-guidelines/list-get-a11y-guidelines-tool.d.ts +2 -0
  375. package/dist/types-ts4.5/tools/get-all-components/components.codegen.d.ts +2 -2
  376. package/dist/types-ts4.5/tools/get-all-components/{index.d.ts → get-all-components-tool.d.ts} +0 -2
  377. package/dist/types-ts4.5/tools/get-all-components/list-get-all-components-tool.d.ts +2 -0
  378. 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
  379. package/dist/types-ts4.5/tools/get-all-icons/list-get-all-icons-tool.d.ts +2 -0
  380. package/dist/types-ts4.5/tools/get-all-tokens/{index.d.ts → get-all-tokens-tool.d.ts} +0 -2
  381. package/dist/types-ts4.5/tools/get-all-tokens/list-get-all-tokens-tool.d.ts +2 -0
  382. package/dist/types-ts4.5/tools/get-atlaskit-components/atlaskit-components.codegen.d.ts +10 -0
  383. package/dist/types-ts4.5/tools/get-atlaskit-components/get-atlaskit-components-tool.d.ts +6 -0
  384. package/dist/types-ts4.5/tools/get-atlaskit-components/list-get-atlaskit-components-tool.d.ts +2 -0
  385. package/dist/types-ts4.5/tools/get-guidelines/get-guidelines-input-schema.d.ts +5 -0
  386. package/dist/types-ts4.5/tools/get-guidelines/get-guidelines-tool.d.ts +8 -0
  387. package/dist/types-ts4.5/tools/get-guidelines/list-get-guidelines-tool.d.ts +2 -0
  388. package/dist/types-ts4.5/tools/get-lint-rules/get-lint-rules-input-schema.d.ts +6 -0
  389. package/dist/types-ts4.5/tools/get-lint-rules/get-lint-rules-tool.d.ts +4 -0
  390. package/dist/types-ts4.5/tools/get-lint-rules/{index.d.ts → list-get-lint-rules-tool.d.ts} +0 -8
  391. package/dist/types-ts4.5/tools/i18n-conversion/{index.d.ts → i18n-conversion-input-schema.d.ts} +0 -8
  392. package/dist/types-ts4.5/tools/i18n-conversion/i18n-conversion-tool.d.ts +8 -0
  393. package/dist/types-ts4.5/tools/i18n-conversion/list-i18n-conversion-tool.d.ts +2 -0
  394. package/dist/types-ts4.5/tools/migration-guides/get-available-migration-ids.d.ts +12 -0
  395. package/dist/types-ts4.5/tools/migration-guides/{registry.d.ts → get-available-migrations-description.d.ts} +0 -5
  396. package/dist/types-ts4.5/tools/migration-guides/list-migration-guides-tool.d.ts +2 -0
  397. package/dist/types-ts4.5/tools/migration-guides/{index.d.ts → migration-guides-input-schema.d.ts} +0 -8
  398. package/dist/types-ts4.5/tools/migration-guides/migration-guides-tool.d.ts +8 -0
  399. package/dist/types-ts4.5/tools/migration-guides/migrations/onboarding-jira-spotlight.d.ts +2 -0
  400. package/dist/types-ts4.5/tools/migration-guides/migrations/onboarding-multi-step.d.ts +2 -0
  401. package/dist/types-ts4.5/tools/migration-guides/migrations/onboarding-single-step.d.ts +2 -0
  402. package/dist/types-ts4.5/tools/migration-guides/migrations/onboarding-with-motion.d.ts +2 -0
  403. package/dist/types-ts4.5/tools/plan/list-plan-tool.d.ts +2 -0
  404. package/dist/types-ts4.5/tools/plan/{index.d.ts → plan-input-schema.d.ts} +3 -15
  405. package/dist/types-ts4.5/tools/plan/plan-tool.d.ts +15 -0
  406. package/dist/types-ts4.5/tools/search-atlaskit-components/list-search-atlaskit-components-tool.d.ts +2 -0
  407. package/dist/types-ts4.5/tools/search-atlaskit-components/search-atlaskit-components-input-schema.d.ts +11 -0
  408. package/dist/types-ts4.5/tools/search-atlaskit-components/search-atlaskit-components-tool.d.ts +4 -0
  409. package/dist/types-ts4.5/tools/search-components/list-search-components-tool.d.ts +2 -0
  410. package/dist/{types/tools/search-components/index.d.ts → types-ts4.5/tools/search-components/search-components-input-schema.d.ts} +0 -3
  411. package/dist/types-ts4.5/tools/search-components/search-components-tool.d.ts +4 -0
  412. package/dist/types-ts4.5/tools/search-icons/list-search-icons-tool.d.ts +2 -0
  413. package/dist/{types/tools/search-icons/index.d.ts → types-ts4.5/tools/search-icons/search-icons-input-schema.d.ts} +0 -3
  414. package/dist/types-ts4.5/tools/search-icons/search-icons-tool.d.ts +4 -0
  415. package/dist/types-ts4.5/tools/search-tokens/list-search-tokens-tool.d.ts +2 -0
  416. package/dist/types-ts4.5/tools/search-tokens/{index.d.ts → search-tokens-input-schema.d.ts} +0 -3
  417. package/dist/types-ts4.5/tools/search-tokens/search-tokens-tool.d.ts +4 -0
  418. package/dist/types-ts4.5/tools/suggest-a11y-fixes/list-suggest-a11y-fixes-tool.d.ts +2 -0
  419. package/dist/types-ts4.5/tools/suggest-a11y-fixes/{index.d.ts → suggest-a11y-fixes-input-schema.d.ts} +0 -8
  420. package/dist/types-ts4.5/tools/suggest-a11y-fixes/suggest-a11y-fixes-tool.d.ts +8 -0
  421. package/i18n-conversion-guide/package.json +14 -0
  422. package/index.js +0 -2
  423. package/migration-registry/package.json +14 -0
  424. package/package.json +4 -9
  425. package/tools/analyze-a11y/package.json +5 -5
  426. package/tools/get-a11y-guidelines/package.json +5 -5
  427. package/tools/get-all-components/package.json +5 -5
  428. package/tools/get-all-icons/package.json +5 -5
  429. package/tools/get-all-tokens/package.json +5 -5
  430. package/tools/get-guidelines/package.json +5 -5
  431. package/tools/get-lint-rules/package.json +5 -5
  432. package/tools/i18n-conversion/package.json +5 -5
  433. package/tools/migration-guides/package.json +5 -5
  434. package/tools/plan/package.json +5 -5
  435. package/tools/search-components/package.json +5 -5
  436. package/tools/search-icons/package.json +5 -5
  437. package/tools/search-tokens/package.json +5 -5
  438. package/tools/suggest-a11y-fixes/package.json +5 -5
  439. package/dist/cjs/tools/analyze-a11y/index.js +0 -483
  440. package/dist/cjs/tools/migration-guides/migrations/onboarding-to-spotlight.js +0 -77
  441. package/dist/es2019/tools/analyze-a11y/index.js +0 -432
  442. package/dist/es2019/tools/get-a11y-guidelines/index.js +0 -58
  443. package/dist/es2019/tools/migration-guides/index.js +0 -69
  444. package/dist/es2019/tools/migration-guides/migrations/onboarding-to-spotlight.js +0 -646
  445. package/dist/es2019/tools/plan/index.js +0 -147
  446. package/dist/esm/tools/analyze-a11y/index.js +0 -478
  447. package/dist/esm/tools/migration-guides/migrations/onboarding-to-spotlight.js +0 -71
  448. package/dist/types/tools/analyze-a11y/index.d.ts +0 -48
  449. package/dist/types/tools/get-a11y-guidelines/index.d.ts +0 -16
  450. package/dist/types/tools/get-guidelines/index.d.ts +0 -13
  451. package/dist/types/tools/i18n-conversion/index.d.ts +0 -16
  452. package/dist/types/tools/migration-guides/index.d.ts +0 -19
  453. package/dist/types/tools/migration-guides/migrations/onboarding-to-spotlight.d.ts +0 -5
  454. package/dist/types-ts4.5/tools/analyze-a11y/index.d.ts +0 -48
  455. package/dist/types-ts4.5/tools/get-a11y-guidelines/index.d.ts +0 -16
  456. package/dist/types-ts4.5/tools/get-guidelines/index.d.ts +0 -13
  457. package/dist/types-ts4.5/tools/migration-guides/migrations/onboarding-to-spotlight.d.ts +0 -5
@@ -1,483 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.listAnalyzeLocalhostA11yTool = exports.listAnalyzeA11yTool = exports.analyzeLocalhostA11yTool = exports.analyzeA11yTool = exports.analyzeA11yLocalhostInputSchema = exports.analyzeA11yInputSchema = void 0;
8
- var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
- var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
10
- var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
11
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
12
- var _puppeteer = require("@axe-core/puppeteer");
13
- var _axeCore = _interopRequireDefault(require("axe-core"));
14
- var _puppeteer2 = _interopRequireDefault(require("puppeteer"));
15
- var _zod = require("zod");
16
- var _helpers = require("../../helpers");
17
- 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; }
18
- 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) { (0, _defineProperty2.default)(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; } /* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
19
- var analyzeA11yInputSchema = exports.analyzeA11yInputSchema = _zod.z.object({
20
- code: _zod.z.string().describe('Source code of a React component or JSX snippet to analyze (string content only—no file path).'),
21
- componentName: _zod.z.string().optional().describe('Optional label for the component under review (for summaries and reports).'),
22
- context: _zod.z.string().optional().describe('Optional: how the component is used (e.g. in a form, modal) to improve suggestions.'),
23
- includePatternAnalysis: _zod.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()
24
- });
25
- var listAnalyzeA11yTool = exports.listAnalyzeA11yTool = {
26
- name: 'ads_analyze_a11y',
27
- 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.",
28
- annotations: {
29
- title: 'Analyze accessibility (code string)',
30
- readOnlyHint: true,
31
- destructiveHint: false,
32
- idempotentHint: true,
33
- openWorldHint: true
34
- },
35
- inputSchema: (0, _helpers.zodToJsonSchema)(analyzeA11yInputSchema)
36
- };
37
- var analyzeA11yLocalhostInputSchema = exports.analyzeA11yLocalhostInputSchema = _zod.z.object({
38
- url: _zod.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.'),
39
- componentName: _zod.z.string().optional().describe('Optional label for reporting (e.g. feature or component under test).'),
40
- context: _zod.z.string().optional().describe('Optional: route, user flow, or feature context for the analyzed page.'),
41
- selector: _zod.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.')
42
- });
43
- var listAnalyzeLocalhostA11yTool = exports.listAnalyzeLocalhostA11yTool = {
44
- name: 'ads_analyze_localhost_a11y',
45
- 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.",
46
- annotations: {
47
- title: 'Analyze accessibility (live URL)',
48
- readOnlyHint: true,
49
- destructiveHint: false,
50
- idempotentHint: true,
51
- openWorldHint: true
52
- },
53
- inputSchema: (0, _helpers.zodToJsonSchema)(analyzeA11yLocalhostInputSchema)
54
- };
55
-
56
- // Common accessibility patterns to detect in code
57
- var accessibilityPatterns = [{
58
- pattern: /<button[^>]*>(?!.*aria-label|.*>.*<\/button>)/g,
59
- violation: 'Button without accessible text',
60
- severity: 'error',
61
- 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".'
62
- }, {
63
- pattern: /<img[^>]*>(?!.*alt=)/g,
64
- violation: 'Image without alt text',
65
- severity: 'error',
66
- 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".'
67
- }, {
68
- pattern: /<div[^>]*onClick[^>]*>/g,
69
- violation: 'Clickable div without accessibility',
70
- severity: 'warning',
71
- suggestion: 'Use the ads_suggest_a11y_fixes tool for ADS solutions. Describe the issue as "clickable div", "interactive div", or "div with click handler".'
72
- }, {
73
- pattern: /color:\s*['"]#[0-9a-fA-F]{3,6}['"]/g,
74
- violation: 'Hardcoded color values',
75
- severity: 'warning',
76
- suggestion: 'Use the ads_suggest_a11y_fixes tool for design token solutions. Describe the issue as "hardcoded colors", "hex colors", or "design tokens".'
77
- }, {
78
- pattern: /<input[^>]*>(?!.*id=)/g,
79
- violation: 'Input without associated label',
80
- severity: 'error',
81
- 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".'
82
- }, {
83
- pattern: /<div[^>]*role="button"[^>]*>/g,
84
- violation: 'Custom button without full accessibility',
85
- severity: 'warning',
86
- 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".'
87
- }, {
88
- pattern: /style=\{[^}]*color[^}]*\}/g,
89
- violation: 'Inline color styles',
90
- severity: 'warning',
91
- suggestion: 'Use the ads_suggest_a11y_fixes tool for design token solutions. Describe the issue as "inline styles", "hardcoded colors", or "color tokens".'
92
- }];
93
-
94
- // ADS accessibility guidelines reference
95
- var adsGuidelines = {
96
- buttons: {
97
- title: 'Button Accessibility',
98
- 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']
99
- },
100
- forms: {
101
- title: 'Form Accessibility',
102
- 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']
103
- },
104
- images: {
105
- title: 'Image Accessibility',
106
- 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']
107
- },
108
- colors: {
109
- title: 'Color and Contrast',
110
- 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']
111
- }
112
- };
113
-
114
- // Helper function to map axe-core violations to ADS-specific fixes
115
- function mapAxeViolationsToADSFixes(violations) {
116
- return violations.map(function (violation) {
117
- var adsFix = generateADSFixForViolation(violation);
118
- return _objectSpread(_objectSpread({}, violation), {}, {
119
- type: adsFix.title,
120
- // Use the specific fix key that matches fixes.ts
121
- adsFix: adsFix,
122
- severity: violation.impact === 'critical' || violation.impact === 'serious' ? 'error' : 'warning'
123
- });
124
- });
125
- }
126
-
127
- // Helper function to provide ADS-specific guidance for axe-core violations
128
- function generateADSFixForViolation(violation) {
129
- var id = violation.id,
130
- description = violation.description,
131
- help = violation.help,
132
- tags = violation.tags;
133
-
134
- // Provide general guidance without trying to map to specific fixes.ts keys
135
- 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\").");
136
- return {
137
- title: help,
138
- // Use axe-core's human-readable description
139
- description: description,
140
- adsFix: adsFix,
141
- example: 'The ads_suggest_a11y_fixes tool provides detailed code examples and ADS component solutions',
142
- violationId: id,
143
- axeHelp: help,
144
- tags: tags,
145
- wcagTags: tags.filter(function (tag) {
146
- return tag.startsWith('wcag');
147
- }),
148
- // Extract WCAG compliance info
149
- reference: "https://atlassian.design/llms-a11y.txt",
150
- 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']
151
- };
152
- }
153
- var analyzeA11yTool = exports.analyzeA11yTool = /*#__PURE__*/function () {
154
- var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(params) {
155
- var code, componentName, context, _params$includePatter, includePatternAnalysis, violations, suggestions, axeResults, _axeResults$violation, _axeResults$passes, _axeResults$incomplet, results, adsViolations, relevantGuidelines, summary;
156
- return _regenerator.default.wrap(function _callee$(_context) {
157
- while (1) switch (_context.prev = _context.next) {
158
- case 0:
159
- code = params.code, componentName = params.componentName, context = params.context, _params$includePatter = params.includePatternAnalysis, includePatternAnalysis = _params$includePatter === void 0 ? true : _params$includePatter;
160
- violations = [];
161
- suggestions = [];
162
- axeResults = {};
163
- _context.prev = 4;
164
- _context.next = 7;
165
- return _axeCore.default.run({
166
- fromFrames: ['iframe', 'html']
167
- });
168
- case 7:
169
- results = _context.sent;
170
- // Process axe-core results
171
- if (results.violations && results.violations.length > 0) {
172
- adsViolations = mapAxeViolationsToADSFixes(results.violations);
173
- violations.push.apply(violations, (0, _toConsumableArray2.default)(adsViolations));
174
- axeResults.violations = results.violations;
175
- axeResults.passes = results.passes;
176
- axeResults.incomplete = results.incomplete;
177
- }
178
-
179
- // Include pattern-based analysis if requested
180
- if (includePatternAnalysis) {
181
- accessibilityPatterns.forEach(function (pattern) {
182
- var matches = code.match(pattern.pattern);
183
- if (matches) {
184
- violations.push({
185
- type: pattern.violation,
186
- severity: pattern.severity,
187
- count: matches.length,
188
- suggestion: pattern.suggestion,
189
- adsFix: 'Use the ads_suggest_a11y_fixes tool for specific ADS component solutions',
190
- example: 'The ads_suggest_a11y_fixes tool provides detailed code examples',
191
- source: 'pattern-analysis'
192
- });
193
- }
194
- });
195
- }
196
-
197
- // Generate ADS-specific suggestions
198
- if (violations.length > 0) {
199
- suggestions.push({
200
- title: 'Accessibility Improvements Needed',
201
- description: "Found ".concat(violations.length, " accessibility issues in your code."),
202
- violations: violations,
203
- 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']
204
- });
205
- }
206
-
207
- // Provide relevant ADS guidelines
208
- relevantGuidelines = [];
209
- if (code.includes('button') || code.includes('onClick')) {
210
- relevantGuidelines.push(adsGuidelines.buttons);
211
- }
212
- if (code.includes('input') || code.includes('form')) {
213
- relevantGuidelines.push(adsGuidelines.forms);
214
- }
215
- if (code.includes('img') || code.includes('image')) {
216
- relevantGuidelines.push(adsGuidelines.images);
217
- }
218
- if (code.includes('color') || code.includes('style')) {
219
- relevantGuidelines.push(adsGuidelines.colors);
220
- }
221
-
222
- // Generate summary
223
- summary = {
224
- componentName: componentName || 'Unknown component',
225
- totalViolations: violations.length,
226
- severityBreakdown: {
227
- error: violations.filter(function (v) {
228
- return v.severity === 'error';
229
- }).length,
230
- warning: violations.filter(function (v) {
231
- return v.severity === 'warning';
232
- }).length
233
- },
234
- context: context || 'No additional context provided',
235
- axeResults: {
236
- violations: ((_axeResults$violation = axeResults.violations) === null || _axeResults$violation === void 0 ? void 0 : _axeResults$violation.length) || 0,
237
- passes: ((_axeResults$passes = axeResults.passes) === null || _axeResults$passes === void 0 ? void 0 : _axeResults$passes.length) || 0,
238
- incomplete: ((_axeResults$incomplet = axeResults.incomplete) === null || _axeResults$incomplet === void 0 ? void 0 : _axeResults$incomplet.length) || 0
239
- }
240
- };
241
- return _context.abrupt("return", {
242
- content: [{
243
- type: 'text',
244
- text: JSON.stringify({
245
- summary: summary,
246
- violations: violations,
247
- suggestions: suggestions,
248
- relevantGuidelines: relevantGuidelines,
249
- axeResults: axeResults,
250
- 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']
251
- }, null, 2)
252
- }]
253
- });
254
- case 20:
255
- _context.prev = 20;
256
- _context.t0 = _context["catch"](4);
257
- // Fallback to pattern-based analysis if axe-core fails
258
- // console.warn('Axe-core analysis failed, falling back to pattern analysis:', error);
259
-
260
- // Run pattern analysis as fallback
261
- accessibilityPatterns.forEach(function (pattern) {
262
- var matches = code.match(pattern.pattern);
263
- if (matches) {
264
- violations.push({
265
- type: pattern.violation,
266
- severity: pattern.severity,
267
- count: matches.length,
268
- suggestion: pattern.suggestion,
269
- adsFix: 'Use the ads_suggest_a11y_fixes tool for specific ADS component solutions',
270
- example: 'The ads_suggest_a11y_fixes tool provides detailed code examples',
271
- source: 'pattern-analysis-fallback'
272
- });
273
- }
274
- });
275
- return _context.abrupt("return", {
276
- content: [{
277
- type: 'text',
278
- text: JSON.stringify({
279
- summary: {
280
- componentName: componentName || 'Unknown component',
281
- totalViolations: violations.length,
282
- severityBreakdown: {
283
- error: violations.filter(function (v) {
284
- return v.severity === 'error';
285
- }).length,
286
- warning: violations.filter(function (v) {
287
- return v.severity === 'warning';
288
- }).length
289
- },
290
- context: context || 'No additional context provided',
291
- note: 'Analysis completed using pattern matching (axe-core analysis failed)'
292
- },
293
- violations: violations,
294
- suggestions: violations.length > 0 ? [{
295
- title: 'Accessibility Improvements Needed',
296
- description: "Found ".concat(violations.length, " accessibility issues in your code."),
297
- violations: violations,
298
- 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']
299
- }] : [],
300
- error: 'Axe-core analysis failed, used pattern-based analysis as fallback',
301
- 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']
302
- }, null, 2)
303
- }]
304
- });
305
- case 24:
306
- case "end":
307
- return _context.stop();
308
- }
309
- }, _callee, null, [[4, 20]]);
310
- }));
311
- return function analyzeA11yTool(_x) {
312
- return _ref.apply(this, arguments);
313
- };
314
- }();
315
- var analyzeLocalhostA11yTool = exports.analyzeLocalhostA11yTool = /*#__PURE__*/function () {
316
- var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(params) {
317
- var url, componentName, context, selector, violations, suggestions, axeResults, browser, page, _axeResults$violation2, _axeResults$passes2, _axeResults$incomplet2, elementExists, availableElements, axePuppeteer, results, adsViolations, relevantGuidelines, summary;
318
- return _regenerator.default.wrap(function _callee2$(_context2) {
319
- while (1) switch (_context2.prev = _context2.next) {
320
- case 0:
321
- url = params.url, componentName = params.componentName, context = params.context, selector = params.selector;
322
- violations = [];
323
- suggestions = [];
324
- axeResults = {};
325
- _context2.next = 6;
326
- return _puppeteer2.default.launch();
327
- case 6:
328
- browser = _context2.sent;
329
- _context2.next = 9;
330
- return browser.newPage();
331
- case 9:
332
- page = _context2.sent;
333
- _context2.prev = 10;
334
- _context2.next = 13;
335
- return page.goto(url, {
336
- waitUntil: 'networkidle0'
337
- });
338
- case 13:
339
- if (!selector) {
340
- _context2.next = 22;
341
- break;
342
- }
343
- _context2.next = 16;
344
- return page.$(selector);
345
- case 16:
346
- elementExists = _context2.sent;
347
- if (elementExists) {
348
- _context2.next = 22;
349
- break;
350
- }
351
- _context2.next = 20;
352
- return page.evaluate(function () {
353
- var elements = Array.from(document.querySelectorAll('[id]'));
354
- return elements.map(function (el) {
355
- return "#".concat(el.id);
356
- });
357
- });
358
- case 20:
359
- availableElements = _context2.sent;
360
- throw new Error("Element with selector \"".concat(selector, "\" not found on the page after waiting. Available elements: ").concat(availableElements.join(', ')));
361
- case 22:
362
- // Run axe-core accessibility analysis
363
- axePuppeteer = new _puppeteer.AxePuppeteer(page); // If selector is provided, analyze only that element
364
- if (selector) {
365
- axePuppeteer.include(selector);
366
- }
367
- _context2.next = 26;
368
- return axePuppeteer.analyze();
369
- case 26:
370
- results = _context2.sent;
371
- if (results.violations && results.violations.length > 0) {
372
- adsViolations = mapAxeViolationsToADSFixes(results.violations);
373
- violations.push.apply(violations, (0, _toConsumableArray2.default)(adsViolations));
374
- axeResults.violations = results.violations;
375
- axeResults.passes = results.passes;
376
- axeResults.incomplete = results.incomplete;
377
- }
378
-
379
- // Generate ADS-specific suggestions
380
- if (violations.length > 0) {
381
- suggestions.push({
382
- title: 'Accessibility Improvements Needed',
383
- description: "Found ".concat(violations.length, " accessibility issues in your code."),
384
- violations: violations,
385
- 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']
386
- });
387
- }
388
-
389
- // Provide relevant ADS guidelines
390
- relevantGuidelines = [];
391
- if (url.includes('button') || url.includes('onClick')) {
392
- relevantGuidelines.push(adsGuidelines.buttons);
393
- }
394
- if (url.includes('input') || url.includes('form')) {
395
- relevantGuidelines.push(adsGuidelines.forms);
396
- }
397
- if (url.includes('img') || url.includes('image')) {
398
- relevantGuidelines.push(adsGuidelines.images);
399
- }
400
- if (url.includes('color') || url.includes('style')) {
401
- relevantGuidelines.push(adsGuidelines.colors);
402
- }
403
-
404
- // Generate summary
405
- summary = {
406
- url: url,
407
- selector: selector || 'Entire page analyzed',
408
- componentName: componentName || 'Unknown component',
409
- totalViolations: violations.length,
410
- severityBreakdown: {
411
- error: violations.filter(function (v) {
412
- return v.severity === 'error';
413
- }).length,
414
- warning: violations.filter(function (v) {
415
- return v.severity === 'warning';
416
- }).length
417
- },
418
- context: context || 'No additional context provided',
419
- axeResults: {
420
- violations: ((_axeResults$violation2 = axeResults.violations) === null || _axeResults$violation2 === void 0 ? void 0 : _axeResults$violation2.length) || 0,
421
- passes: ((_axeResults$passes2 = axeResults.passes) === null || _axeResults$passes2 === void 0 ? void 0 : _axeResults$passes2.length) || 0,
422
- incomplete: ((_axeResults$incomplet2 = axeResults.incomplete) === null || _axeResults$incomplet2 === void 0 ? void 0 : _axeResults$incomplet2.length) || 0
423
- }
424
- };
425
- _context2.next = 37;
426
- return browser.close();
427
- case 37:
428
- return _context2.abrupt("return", {
429
- content: [{
430
- type: 'text',
431
- text: JSON.stringify({
432
- summary: summary,
433
- violations: violations,
434
- suggestions: suggestions,
435
- relevantGuidelines: relevantGuidelines,
436
- axeResults: axeResults,
437
- 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']
438
- }, null, 2)
439
- }]
440
- });
441
- case 40:
442
- _context2.prev = 40;
443
- _context2.t0 = _context2["catch"](10);
444
- _context2.next = 44;
445
- return browser.close();
446
- case 44:
447
- return _context2.abrupt("return", {
448
- content: [{
449
- type: 'text',
450
- text: JSON.stringify({
451
- summary: {
452
- url: url,
453
- selector: selector || 'Entire page analyzed',
454
- componentName: componentName || 'Unknown component',
455
- totalViolations: violations.length,
456
- severityBreakdown: {
457
- error: violations.filter(function (v) {
458
- return v.severity === 'error';
459
- }).length,
460
- warning: violations.filter(function (v) {
461
- return v.severity === 'warning';
462
- }).length
463
- },
464
- context: context || 'No additional context provided',
465
- note: 'Analysis failed to run on the provided URL'
466
- },
467
- violations: violations,
468
- suggestions: [],
469
- error: String(_context2.t0),
470
- 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']
471
- }, null, 2)
472
- }]
473
- });
474
- case 45:
475
- case "end":
476
- return _context2.stop();
477
- }
478
- }, _callee2, null, [[10, 40]]);
479
- }));
480
- return function analyzeLocalhostA11yTool(_x2) {
481
- return _ref2.apply(this, arguments);
482
- };
483
- }();
@@ -1,77 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.onboardingWithMotion = exports.onboardingSingleStep = exports.onboardingMultiStep = exports.onboardingJiraSpotlight = void 0;
7
- var additionalResources = 'Visit https://hello.atlassian.net/wiki/spaces/DST/pages/6069774593 or https://atlassian.design/components/spotlight for more context';
8
- var onboardingSingleStep = exports.onboardingSingleStep = {
9
- id: 'single-step',
10
- title: 'Single Step Spotlight Migration',
11
- description: 'Use when code ONLY has `Spotlight` from `@atlaskit/onboarding` (no JiraSpotlight)',
12
- fromPackage: '@atlaskit/onboarding',
13
- toPackage: '@atlaskit/spotlight',
14
- examples: [{
15
- title: 'Migrate single step spotlight',
16
- description: 'Replace SpotlightTarget, and Spotlight with the new compositional @atlaskit/spotlight components',
17
- before: "\n// file1.tsx\nimport React, { useState } from 'react';\nimport Button from '@atlaskit/button/new';\nimport { Spotlight } from '@atlaskit/onboarding';\n\nconst OnboardingSpotlight = () => {\n const [isSpotlightActive, setIsSpotlightActive] = useState(true);\n const start = () => setIsSpotlightActive(true);\n const end = () => setIsSpotlightActive(false);\n\n return (\n\t\t{isSpotlightActive && (\n\t\t\t<Spotlight\n\t\t\t\tdialogPlacement='bottom right'\n\t\t\t\tactions={[\n\t\t\t\t\t{\n\t\t\t\t\t\tonClick: end,\n\t\t\t\t\t\ttext: 'Got it',\n\t\t\t\t\t},\n\t\t\t\t]}\n\t\t\t\theading=\"Feature Heading\"\n\t\t\t\ttarget=\"my-target\"\n\t\t\t>\n\t\t\t\tThis is the spotlight body content describing the feature.\n\t\t\t</Spotlight>\n\t\t)}\n );\n};\n\n// file2.tsx\nimport React from 'react';\nimport Button from '@atlaskit/button/new';\nimport { Spotlight } from '@atlaskit/onboarding';\n\nconst SomeFeature = () => {\n\n return (\n\t\t<SpotlightTarget name=\"my-target\">\n\t\t\t<Button>Target Element</Button>\n\t\t</SpotlightTarget>\n );\n};\n",
18
- after: "\n// file2.tsx -- the Spotlight has been co-located to the targeted element.\nimport React, { useState } from 'react';\nimport Button from '@atlaskit/button/new';\nimport { Text } from '@atlaskit/primitives/compiled';\nimport {\n PopoverContent,\n PopoverProvider,\n PopoverTarget,\n SpotlightActions,\n SpotlightBody,\n SpotlightCard,\n SpotlightControls,\n SpotlightDismissControl,\n SpotlightFooter,\n SpotlightHeader,\n SpotlightHeadline,\n SpotlightPrimaryAction,\n} from '@atlaskit/spotlight';\n\nconst Spotlight = () => {\n const [isVisible, setIsVisible] = useState(false);\n const dismiss = () => setIsVisible(false);\n const done = () => setIsVisible(false);\n\n return (\n <PopoverProvider>\n <PopoverTarget>\n <Button onClick={() => setIsVisible(true)}>Target Element</Button>\n </PopoverTarget>\n <PopoverContent dismiss={dismiss} placement=\"bottom-start\" isVisible={isVisible}>\n <SpotlightCard>\n <SpotlightHeader>\n <SpotlightHeadline>Feature Heading</SpotlightHeadline>\n <SpotlightControls>\n <SpotlightDismissControl />\n </SpotlightControls>\n </SpotlightHeader>\n <SpotlightBody>\n <Text>This is the spotlight body content describing the feature.</Text>\n </SpotlightBody>\n <SpotlightFooter>\n <SpotlightActions>\n <SpotlightPrimaryAction onClick={done}>Got it</SpotlightPrimaryAction>\n </SpotlightActions>\n </SpotlightFooter>\n </SpotlightCard>\n </PopoverContent>\n </PopoverProvider>\n );\n};",
19
- explanation: "Key changes when migrating a single step spotlight:\n- Do not use this migration guide for JiraSpotlight. Use 'jira-spotlight' instead.\n- PopoverProvider maintains internal Spotlight state. SpotlightManager coordinated multiple @atlaskit/onboarding usages and is no longer needed.\n- Replace SpotlightTarget with PopoverTarget - wraps the element to highlight\n- Replace Spotlight with PopoverContent containing SpotlightCard - controls visibility and positioning\n- The 'heading' prop becomes SpotlightHeadline inside SpotlightHeader\n- The 'actions' array becomes SpotlightActions with SpotlightPrimaryAction (and optionally SpotlightSecondaryAction)\n- The children content moves into SpotlightBody wrapped with Text component\n- Add SpotlightDismissControl inside SpotlightControls for the close button\n- The 'target' and/or 'targetName' prop is replaced with PopoverTarget directly wrapping the target element\n- The 'dialogPlacement' prop becomes 'placement' on PopoverContent. Mapping: \"top right\" \u2192 \"top-start\", \"top center\" \u2192 \"top\", \"top left\" \u2192 \"top-end\", \"right bottom\" \u2192 \"right-start\", \"right middle\" \u2192 \"right-start | right-end\", \"right top\" \u2192 \"right-end\", \"bottom left\" \u2192 \"bottom-end\", \"bottom center\" \u2192 \"bottom\", \"bottom right\" \u2192 \"bottom-start\", \"left top\" \u2192 \"left-end\", \"left middle\" \u2192 \"left-start | left-end\", \"left bottom\" \u2192 \"left-start\"'"
20
- }],
21
- 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'],
22
- additionalResources: additionalResources
23
- };
24
- var onboardingJiraSpotlight = exports.onboardingJiraSpotlight = {
25
- id: 'jira-spotlight',
26
- title: 'JiraSpotlight Migration',
27
- description: 'Use when code contains `JiraSpotlight` import from `@atlassian/jira-spotlight`',
28
- fromPackage: '@atlassian/jira-spotlight',
29
- toPackage: '@atlaskit/spotlight',
30
- examples: [{
31
- title: 'Internal <JiraSpotlight /> migration',
32
- description: 'Internal migrations are possible for JiraSpotlight usages which only pass simple/textual content to JiraSpotlight children',
33
- before: "\n// file1.tsx\nimport { JiraSpotlight } from '@atlassian/jira-spotlight/src/ui/jira-spotlight.tsx';\n\nexport const OnboardingSpotlightWrapper = () => {\n\tconst spotlightId = 'some-unique-identifier'\n\tconst { dark, light } = spotlightImageUrls[spotlightId];\n\tconst imageUrl = colorMode === 'dark' ? dark : light;\n\n\treturn (\n\t\t<JiraSpotlight\n\t\t\timage={imageUrl}\n\t\t\tactions={[\n\t\t\t\t{\n\t\t\t\t\tonClick,\n\t\t\t\t\ttext: formatMessage(dismiss),\n\t\t\t\t},\n\t\t\t]}\n\t\t\theading={formatMessage(heading)}\n\t\t\ttarget={spotlightId}\n\t\t\tkey={spotlightId}\n\t\t\ttargetRadius={3}\n\t\t\ttargetBgColor={token('elevation.surface')}\n\t\t\tmessageId={spotlightId}\n\t\t\tmessageType=\"transactional\"\n\t\t\tdialogWidth={275}\n\t\t>\n\t\t\t{formatMessage(body)}\n\t\t</JiraSpotlight>\n\t);\n}\n\n// file2.tsx\nimport { SpotlightTarget } from '@atlaskit/onboarding';\n\nconst spotlightId = 'some-unique-identifier'\n\nexport const SomeFeature = () => {\n\treturn (\n\t\t<SpotlightTarget name={spotlightId}>\n\t\t\t// Target code\n\t\t</SpotlightTarget>\n\t);\n}\n",
34
- after: "\n// file1.tsx\nimport { JiraSpotlight } from '@atlassian/jira-spotlight/src/ui/jira-spotlight.tsx';\n\nexport const OnboardingSpotlightWrapper = () => {\n\tconst spotlightId = 'some-unique-identifier'\n\tconst { dark, light } = spotlightImageUrls[spotlightId];\n\tconst imageUrl = colorMode === 'dark' ? dark : light;\n\n\treturn (\n\t\t<JiraSpotlight\n\t\t\tisMigrated // isMigrated prop passed\n\t\t\timage={imageUrl}\n\t\t\tactions={[\n\t\t\t\t{\n\t\t\t\t\tonClick,\n\t\t\t\t\ttext: formatMessage(dismiss),\n\t\t\t\t},\n\t\t\t]}\n\t\t\theading={formatMessage(heading)}\n\t\t\ttarget={spotlightId}\n\t\t\tkey={spotlightId}\n\t\t\ttargetRadius={3}\n\t\t\ttargetBgColor={token('elevation.surface')}\n\t\t\tmessageId={spotlightId}\n\t\t\tmessageType=\"transactional\"\n\t\t\tdialogWidth={275}\n\t\t>\n\t\t\t{formatMessage(body)}\n\t\t</JiraSpotlight>\n\t);\n}\n\n// file2.tsx\n// Updated SpotlightTarget import statement\nimport { SpotlightTarget } from '@atlassian/jira-spotlight/src/ui/SpotlightTarget.tsx';\n\nexport const SomeFeature = () => {\n\tconst spotlightId = 'some-unique-identifier'\n\n\treturn (\n\t\t<SpotlightTarget name={spotlightId}>\n\t\t\t// Target code\n\t\t</SpotlightTarget>\n\t);\n}\n\t\t\t",
35
- explanation: "Key changes when migrating a JiraSpotlight:\n- 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\n- Pass isMigrated={true} to JiraSpotlight.\n- Update SpotlightTarget import statment from '@atlaskit/onboarding' to '@atlassian/jira-spotlight/src/ui/SpotlightTarget.tsx';\n- These changes allow switching the internal implementation to '@atlaskit/spotlight' via a feature flag.\n- 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.\n"
36
- }, {
37
- title: 'Complex <JiraSpotlight /> migration',
38
- 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.',
39
- before: "\n// file1.tsx\nimport { JiraSpotlight } from '@atlassian/jira-spotlight/src/ui/jira-spotlight.tsx';\n\nexport const OnboardingSpotlightWrapper = () => {\n\tconst spotlightId = 'some-unique-identifier'\n\tconst { dark, light } = spotlightImageUrls[spotlightId];\n\tconst imageUrl = colorMode === 'dark' ? dark : light;\n\n\treturn (\n\t\t<JiraSpotlight\n\t\t\ttarget={spotlightId}\n\t\t\ttargetRadius={3}\n\t\t\tdialogPlacement=''\n\t\t\ttargetBgColor={token('elevation.surface')}\n\t\t\tmessageId={spotlightId}\n\t\t\tmessageType=\"transactional\"\n\t\t\tdialogWidth={275}\n\t\t>\n\t\t\t<CustomSpotlightInner>\n\t\t\t\t{imageUrl}\n\t\t\t\t{formatMessage(heading)}\n\t\t\t\t{formatMessage(body)}\n\t\t\t\t<CustomSpotlightAction>\n\t\t\t\t\t{formatMessage(dismiss)}\n\t\t\t\t</CustomSpotlightAction>\n\t\t\t</CustomSpotlightInner>\n\t\t</JiraSpotlight>\n\t);\n}\n\n// file2.tsx\nimport { SpotlightTarget } from '@atlaskit/onboarding';\n\nconst spotlightId = 'some-unique-identifier'\n\nexport const SomeFeature = () => {\n\treturn (\n\t\t<SpotlightTarget name={spotlightId}>\n\t\t\t// Target code\n\t\t</SpotlightTarget>\n\t);\n}\n",
40
- after: "\n// file2.tsx - Spotlight code has been co-located to the targeted element\nimport { Text } from '@atlaskit/primitives/compiled';\nimport {\n PopoverContent,\n PopoverProvider,\n PopoverTarget,\n SpotlightActions,\n SpotlightBody,\n SpotlightCard,\n SpotlightControls,\n SpotlightDismissControl,\n SpotlightFooter,\n SpotlightHeader,\n SpotlightHeadline,\n SpotlightPrimaryAction,\n} from '@atlaskit/spotlight';\nimport Image from '@atlaskit/image';\nimport { ChoreographedComponent } from '@atlassian/jira-spotlight/src/ui/ChoreographedComponent.tsx';\n\nexport const SomeFeature = () => {\n\tconst { dark, light } = spotlightImageUrls[spotlightId];\n\n\tconst [isSpotlightVisible, actions] = useListViewOnboarding({\n\t\tprojectId: String(projectData.id),\n\t\tid: spotlightId,\n\t});\n\n\treturn (\n\t\t<PopoverProvider>\n\t\t\t<PopoverTarget>{renderTrigger(isSpotlightVisible)}</PopoverTarget>\n\t\t\t<ChoreographedComponent messageId={spotlightId} messageType=\"transactional\">\n\t\t\t\t<PopoverContent isVisible={isSpotlightVisible} placement=\"bottom-start\" dismiss={onClick}>\n\t\t\t\t\t<SpotlightCard>\n\t\t\t\t\t\t<SpotlightHeader>\n\t\t\t\t\t\t\t<SpotlightHeadline>{formatMessage(heading)}</SpotlightHeadline>\n\t\t\t\t\t\t\t<SpotlightControls>\n\t\t\t\t\t\t\t\t<SpotlightDismissControl />\n\t\t\t\t\t\t\t</SpotlightControls>\n\t\t\t\t\t\t</SpotlightHeader>\n\t\t\t\t\t\t<SpotlightMedia>\n\t\t\t\t\t\t\t<Image src={light} srcDark={dark} alt=\"\" />\n\t\t\t\t\t\t</SpotlightMedia>\n\t\t\t\t\t\t<SpotlightBody>\n\t\t\t\t\t\t\t<Text>{formatMessage(body)}</Text>\n\t\t\t\t\t\t</SpotlightBody>\n\t\t\t\t\t\t<SpotlightFooter>\n\t\t\t\t\t\t\t<SpotlightActions>\n\t\t\t\t\t\t\t\t<SpotlightPrimaryAction onClick={onClick}>\n\t\t\t\t\t\t\t\t\t{formatMessage(dismiss)}\n\t\t\t\t\t\t\t\t</SpotlightPrimaryAction>\n\t\t\t\t\t\t\t</SpotlightActions>\n\t\t\t\t\t\t</SpotlightFooter>\n\t\t\t\t\t</SpotlightCard>\n\t\t\t\t</PopoverContent>\n\t\t\t</ChoreographedComponent>\n\t\t</PopoverProvider>\n\t);\n};",
41
- explanation: "Key changes when migrating a single step spotlight:\n- Replace JiraSpotlight with ChoreographedComponent from '@atlassian/jira-spotlight'.\n- PopoverProvider maintains internal Spotlight state.\n- Replace SpotlightTarget with PopoverTarget - wraps the element to highlight\n- Replace Spotlight with PopoverContent containing SpotlightCard - controls visibility and positioning\n- 'heading' becomes SpotlightHeadline inside SpotlightHeader\n- 'actions' becomes SpotlightActions with SpotlightPrimaryAction (and optionally SpotlightSecondaryAction)\n- 'body' content moves into SpotlightBody wrapped with Text component\n- Add SpotlightDismissControl inside SpotlightControls for the close button\n- The 'target' and/or 'targetName' prop is replaced with PopoverTarget directly wrapping the target element\n- 'dialogPlacement' prop becomes 'placement' on PopoverContent. Mapping: \"top right\" \u2192 \"top-start\", \"top center\" \u2192 \"top\", \"top left\" \u2192 \"top-end\", \"right bottom\" \u2192 \"right-start\", \"right middle\" \u2192 \"right-start | right-end\", \"right top\" \u2192 \"right-end\", \"bottom left\" \u2192 \"bottom-end\", \"bottom center\" \u2192 \"bottom\", \"bottom right\" \u2192 \"bottom-start\", \"left top\" \u2192 \"left-end\", \"left middle\" \u2192 \"left-start | left-end\", \"left bottom\" \u2192 \"left-start\"'"
42
- }],
43
- bestPractices: [],
44
- additionalResources: additionalResources
45
- };
46
- var onboardingMultiStep = exports.onboardingMultiStep = {
47
- id: 'multi-step',
48
- title: 'Multi Step Spotlight Tour Migration',
49
- description: 'Migrate a multi-step spotlight tour from @atlaskit/onboarding to @atlaskit/spotlight',
50
- fromPackage: '@atlaskit/onboarding',
51
- toPackage: '@atlaskit/spotlight',
52
- examples: [{
53
- title: 'Migrate multi step spotlight tour',
54
- description: 'Replace the single SpotlightManager pattern with multiple PopoverProvider instances, one for each target in the tour',
55
- before: "import React, { useState } from 'react';\nimport Button, { IconButton } from '@atlaskit/button/new';\nimport CommentAddIcon from '@atlaskit/icon/core/comment-add';\nimport CopyIcon from '@atlaskit/icon/core/copy';\nimport {\n Spotlight,\n SpotlightManager,\n SpotlightTarget,\n SpotlightTransition,\n} from '@atlaskit/onboarding';\n\nconst OnboardingTour = () => {\n const [activeSpotlight, setActiveSpotlight] = useState<null | number>(null);\n const start = () => setActiveSpotlight(0);\n const next = () => setActiveSpotlight((activeSpotlight || 0) + 1);\n const back = () => setActiveSpotlight((activeSpotlight || 1) - 1);\n const end = () => setActiveSpotlight(null);\n\n const renderActiveSpotlight = () => {\n const spotlights = [\n <Spotlight\n actions={[\n { onClick: () => next(), text: 'Next' },\n { onClick: () => end(), text: 'Dismiss', appearance: 'subtle' },\n ]}\n heading=\"Add a comment\"\n target=\"comment\"\n key=\"comment\"\n >\n Quickly add a comment to the work item.\n </Spotlight>,\n <Spotlight\n actions={[\n { onClick: () => end(), text: 'Done' },\n { onClick: () => back(), text: 'Back', appearance: 'subtle' },\n ]}\n heading=\"Copy code\"\n target=\"copy\"\n key=\"copy\"\n >\n Click to copy the example code to your clipboard.\n </Spotlight>,\n ];\n\n if (activeSpotlight === null) {\n return null;\n }\n return spotlights[activeSpotlight];\n };\n\n return (\n <SpotlightManager>\n <SpotlightTarget name=\"comment\">\n <IconButton icon={CommentAddIcon} label=\"comment\" />\n </SpotlightTarget>\n <SpotlightTarget name=\"copy\">\n <IconButton icon={CopyIcon} label=\"Copy\" />\n </SpotlightTarget>\n <Button appearance=\"primary\" onClick={start}>\n Start tour\n </Button>\n <SpotlightTransition>{renderActiveSpotlight()}</SpotlightTransition>\n </SpotlightManager>\n );\n};",
56
- after: "import React, { useState } from 'react';\nimport Button, { IconButton } from '@atlaskit/button/new';\nimport CommentAddIcon from '@atlaskit/icon/core/comment-add';\nimport CopyIcon from '@atlaskit/icon/core/copy';\nimport { Text } from '@atlaskit/primitives/compiled';\nimport {\n PopoverContent,\n PopoverProvider,\n PopoverTarget,\n SpotlightActions,\n SpotlightBody,\n SpotlightCard,\n SpotlightControls,\n SpotlightDismissControl,\n SpotlightFooter,\n SpotlightHeader,\n SpotlightHeadline,\n SpotlightPrimaryAction,\n SpotlightSecondaryAction,\n SpotlightStepCount,\n} from '@atlaskit/spotlight';\n\nconst SpotlightTour = () => {\n const [currentStep, setCurrentStep] = useState<number>(0);\n\n const dismiss = () => setCurrentStep(0);\n const back = () => setCurrentStep(Math.max(currentStep - 1, 1));\n const next = () => setCurrentStep(Math.min(currentStep + 1, 2));\n const done = () => setCurrentStep(0);\n\n return (\n <>\n <PopoverProvider>\n <PopoverTarget>\n <IconButton icon={CommentAddIcon} label=\"comment\" />\n </PopoverTarget>\n <PopoverContent dismiss={dismiss} placement=\"bottom-start\" isVisible={currentStep === 1}>\n <SpotlightCard>\n <SpotlightHeader>\n <SpotlightHeadline>Add a comment</SpotlightHeadline>\n <SpotlightControls>\n <SpotlightDismissControl onClick={dismiss} />\n </SpotlightControls>\n </SpotlightHeader>\n <SpotlightBody>\n <Text>Quickly add a comment to the work item.</Text>\n </SpotlightBody>\n <SpotlightFooter>\n <SpotlightStepCount>1 of 2</SpotlightStepCount>\n <SpotlightActions>\n <SpotlightPrimaryAction onClick={next}>Next</SpotlightPrimaryAction>\n </SpotlightActions>\n </SpotlightFooter>\n </SpotlightCard>\n </PopoverContent>\n </PopoverProvider>\n\n <PopoverProvider>\n <PopoverTarget>\n <IconButton icon={CopyIcon} label=\"Copy\" />\n </PopoverTarget>\n <PopoverContent dismiss={dismiss} placement=\"bottom-start\" isVisible={currentStep === 2}>\n <SpotlightCard>\n <SpotlightHeader>\n <SpotlightHeadline>Copy code</SpotlightHeadline>\n <SpotlightControls>\n <SpotlightDismissControl onClick={dismiss} />\n </SpotlightControls>\n </SpotlightHeader>\n <SpotlightBody>\n <Text>Click to copy the example code to your clipboard.</Text>\n </SpotlightBody>\n <SpotlightFooter>\n <SpotlightStepCount>2 of 2</SpotlightStepCount>\n <SpotlightActions>\n <SpotlightSecondaryAction onClick={back}>Back</SpotlightSecondaryAction>\n <SpotlightPrimaryAction onClick={done}>Done</SpotlightPrimaryAction>\n </SpotlightActions>\n </SpotlightFooter>\n </SpotlightCard>\n </PopoverContent>\n </PopoverProvider>\n\n <Button appearance=\"primary\" onClick={() => setCurrentStep(1)}>\n Start tour\n </Button>\n </>\n );\n};",
57
- explanation: "Key changes when migrating a multi-step spotlight tour:\n- SpotlightManager coordinated multiple spotlights in a tour. PopoverProvider manages internal state for a single spotlight.\n- Each target gets its own PopoverProvider > PopoverTarget > PopoverContent structure\n- The spotlight array pattern is replaced with individual SpotlightCard components per target\n- Control visibility with isVisible={currentStep === n} on each PopoverContent\n- Add SpotlightStepCount component in SpotlightFooter to show progress (e.g., \"1 of 3\")\n- Use SpotlightSecondaryAction for \"Back\" buttons instead of appearance: 'subtle' in the actions array\n- Use SpotlightPrimaryAction for \"Next\" and \"Done\" buttons\n- The renderActiveSpotlight pattern is no longer needed - visibility is controlled declaratively\n- Navigation functions use Math.max/Math.min to bound the step range safely\n- All other migration changes from single step spotlight migration guide apply."
58
- }],
59
- 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.'],
60
- additionalResources: additionalResources
61
- };
62
- var onboardingWithMotion = exports.onboardingWithMotion = {
63
- id: 'motion',
64
- title: 'Single Step Spotlight with Motion Migration',
65
- description: 'Migrate a single step spotlight with entrance animation from @atlaskit/onboarding to @atlaskit/spotlight using @atlaskit/motion',
66
- fromPackage: '@atlaskit/onboarding',
67
- toPackage: '@atlaskit/spotlight',
68
- examples: [{
69
- title: 'Migrate spotlight with transition animation',
70
- description: 'Replace SpotlightTransition with FadeIn from @atlaskit/motion wrapped around the SpotlightCard',
71
- before: "import React, { useState } from 'react';\nimport Button from '@atlaskit/button/new';\nimport {\n Spotlight,\n SpotlightManager,\n SpotlightTarget,\n SpotlightTransition,\n} from '@atlaskit/onboarding';\n\nconst OnboardingSpotlightWithTransition = () => {\n const [isSpotlightActive, setIsSpotlightActive] = useState(false);\n const start = () => setIsSpotlightActive(true);\n const end = () => setIsSpotlightActive(false);\n\n return (\n <SpotlightManager>\n <SpotlightTarget name=\"my-target\">\n <Button>Target Element</Button>\n </SpotlightTarget>\n <div>\n <Button appearance=\"primary\" onClick={start}>\n Show spotlight\n </Button>\n </div>\n <SpotlightTransition>\n {isSpotlightActive && (\n <Spotlight\n actions={[\n {\n onClick: end,\n text: 'Got it',\n },\n ]}\n heading=\"Feature Heading\"\n target=\"my-target\"\n key=\"my-target\"\n >\n This is the spotlight body content describing the feature.\n </Spotlight>\n )}\n </SpotlightTransition>\n </SpotlightManager>\n );\n};",
72
- after: "import React, { useState } from 'react';\nimport Button from '@atlaskit/button/new';\nimport { FadeIn } from '@atlaskit/motion';\nimport { Text } from '@atlaskit/primitives/compiled';\nimport {\n PopoverContent,\n PopoverProvider,\n PopoverTarget,\n SpotlightActions,\n SpotlightBody,\n SpotlightCard,\n SpotlightControls,\n SpotlightDismissControl,\n SpotlightFooter,\n SpotlightHeader,\n SpotlightHeadline,\n SpotlightPrimaryAction,\n} from '@atlaskit/spotlight';\n\nconst SpotlightWithMotion = () => {\n const [isVisible, setIsVisible] = useState(false);\n const dismiss = () => setIsVisible(false);\n const done = () => setIsVisible(false);\n\n return (\n <PopoverProvider>\n <PopoverTarget>\n <Button onClick={() => setIsVisible(true)}>Target Element</Button>\n </PopoverTarget>\n <PopoverContent done={done} dismiss={dismiss} placement=\"bottom-start\" isVisible={isVisible}>\n <FadeIn entranceDirection=\"left\">\n {(props) => (\n <div {...props}>\n <SpotlightCard>\n <SpotlightHeader>\n <SpotlightHeadline>Feature Heading</SpotlightHeadline>\n <SpotlightControls>\n <SpotlightDismissControl />\n </SpotlightControls>\n </SpotlightHeader>\n <SpotlightBody>\n <Text>This is the spotlight body content describing the feature.</Text>\n </SpotlightBody>\n <SpotlightFooter>\n <SpotlightActions>\n <SpotlightPrimaryAction onClick={done}>Got it</SpotlightPrimaryAction>\n </SpotlightActions>\n </SpotlightFooter>\n </SpotlightCard>\n </div>\n )}\n </FadeIn>\n </PopoverContent>\n </PopoverProvider>\n );\n};",
73
- explanation: "Key changes when migrating a spotlight with transition animation:\n- Replace SpotlightTransition with FadeIn from @atlaskit/motion\n- Import FadeIn from '@atlaskit/motion' instead of SpotlightTransition from '@atlaskit/onboarding'\n- FadeIn uses a render props pattern - wrap content in {(props) => <div {...props}>...</div>}\n- The entranceDirection prop controls animation direction: 'left', 'right', 'top', or 'bottom'\n- All other migration changes from single step spotlight apply (PopoverProvider, compositional components, etc.)"
74
- }],
75
- 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'],
76
- additionalResources: additionalResources
77
- };