@atlaskit/tokens 13.0.4 → 13.1.1

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 (343) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/codemods/css-to-design-tokens/lib/colors.tsx +3 -8
  3. package/codemods/css-to-design-tokens/lib/declaration.tsx +3 -13
  4. package/codemods/css-to-design-tokens/lib/extract-between-parentheses.tsx +4 -0
  5. package/codemods/css-to-design-tokens/lib/extract-less-var-name.tsx +3 -0
  6. package/codemods/css-to-design-tokens/lib/get-css-var-meta.tsx +13 -0
  7. package/codemods/css-to-design-tokens/lib/get-named-color-meta.tsx +5 -0
  8. package/codemods/css-to-design-tokens/lib/get-raw-color-meta.tsx +11 -0
  9. package/codemods/css-to-design-tokens/lib/is-css-declaration.tsx +3 -0
  10. package/codemods/css-to-design-tokens/lib/is-known-css-variable.tsx +5 -0
  11. package/codemods/css-to-design-tokens/lib/known-named-colors.tsx +150 -0
  12. package/codemods/css-to-design-tokens/lib/known-raw-colors.tsx +17 -0
  13. package/codemods/css-to-design-tokens/lib/known-variables.tsx +167 -0
  14. package/codemods/css-to-design-tokens/lib/legacy-colors.tsx +3 -335
  15. package/codemods/css-to-design-tokens/lib/meta.tsx +3 -28
  16. package/codemods/css-to-design-tokens/lib/split-css-value.tsx +4 -0
  17. package/codemods/css-to-design-tokens/lib/value.tsx +6 -9
  18. package/codemods/css-to-design-tokens/transform.tsx +3 -1
  19. package/dist/cjs/artifacts/palettes-raw/palette.js +35 -1
  20. package/dist/cjs/artifacts/themes/atlassian-dark-increased-contrast.js +2 -2
  21. package/dist/cjs/artifacts/themes/atlassian-dark.js +2 -2
  22. package/dist/cjs/artifacts/themes/atlassian-light-increased-contrast.js +2 -2
  23. package/dist/cjs/artifacts/themes/atlassian-light.js +2 -2
  24. package/dist/cjs/artifacts/token-default-values.js +2 -2
  25. package/dist/cjs/artifacts/tokens-raw/atlassian-dark-increased-contrast.js +3 -3
  26. package/dist/cjs/artifacts/tokens-raw/atlassian-dark.js +3 -3
  27. package/dist/cjs/artifacts/tokens-raw/atlassian-light-increased-contrast.js +3 -3
  28. package/dist/cjs/artifacts/tokens-raw/atlassian-light.js +3 -3
  29. package/dist/cjs/constants.js +1 -0
  30. package/dist/cjs/entry-points/theme-state-transformer.js +4 -3
  31. package/dist/cjs/entry-points/token-metadata.codegen.js +2 -2
  32. package/dist/cjs/get-custom-theme-styles.js +7 -6
  33. package/dist/cjs/get-global-theme.js +2 -2
  34. package/dist/cjs/get-theme-html-attrs.js +2 -2
  35. package/dist/cjs/get-theme-styles.js +27 -27
  36. package/dist/cjs/index.js +4 -3
  37. package/dist/cjs/is-color-mode.js +9 -0
  38. package/dist/cjs/is-theme-ids.js +12 -0
  39. package/dist/cjs/is-theme-kind.js +12 -0
  40. package/dist/cjs/set-global-theme.js +32 -31
  41. package/dist/cjs/theme-config.js +9 -43
  42. package/dist/cjs/theme-object-to-string.js +42 -0
  43. package/dist/cjs/theme-options-schema.js +1 -0
  44. package/dist/cjs/theme-state-defaults.js +39 -0
  45. package/dist/cjs/theme-state.js +5 -0
  46. package/dist/cjs/theme-string-to-object.js +51 -0
  47. package/dist/cjs/utils/additional-contrast-checker.js +43 -0
  48. package/dist/cjs/utils/custom-theme-loading-utils.js +0 -20
  49. package/dist/cjs/utils/custom-theme-token-contrast-check.js +2 -38
  50. package/dist/cjs/utils/delta-e.js +26 -0
  51. package/dist/cjs/utils/generate-colors.js +47 -0
  52. package/dist/cjs/utils/generate-token-map-with-contrast-check.js +32 -0
  53. package/dist/cjs/utils/{generate-custom-color-ramp.js → generate-token-map.js} +6 -71
  54. package/dist/cjs/utils/get-closest-color-index.js +3 -2
  55. package/dist/cjs/utils/get-contrast-ratio.js +22 -0
  56. package/dist/cjs/utils/hct-color-utils/alpha-from-argb.js +12 -0
  57. package/dist/cjs/utils/hct-color-utils/argb-from-linrgb.js +17 -0
  58. package/dist/cjs/utils/hct-color-utils/argb-from-lstar.js +21 -0
  59. package/dist/cjs/utils/hct-color-utils/argb-from-rgba.js +24 -0
  60. package/dist/cjs/utils/hct-color-utils/argb-from-xyz.js +29 -0
  61. package/dist/cjs/utils/hct-color-utils/blue-from-argb.js +12 -0
  62. package/dist/cjs/utils/hct-color-utils/clamp-component.js +15 -0
  63. package/dist/cjs/utils/hct-color-utils/contrast.js +10 -11
  64. package/dist/cjs/utils/hct-color-utils/green-from-argb.js +12 -0
  65. package/dist/cjs/utils/hct-color-utils/hct.js +18 -12
  66. package/dist/cjs/utils/hct-color-utils/index.js +4 -3
  67. package/dist/cjs/utils/hct-color-utils/lab-f.js +15 -0
  68. package/dist/cjs/utils/hct-color-utils/lab-invf.js +16 -0
  69. package/dist/cjs/utils/hct-color-utils/lstar-from-argb.js +34 -0
  70. package/dist/cjs/utils/hct-color-utils/lstar-from-y.js +21 -0
  71. package/dist/cjs/utils/hct-color-utils/red-from-argb.js +12 -0
  72. package/dist/cjs/utils/hct-color-utils/rgba-from-argb.js +28 -0
  73. package/dist/cjs/utils/hct-color-utils/rgba.js +1 -0
  74. package/dist/cjs/utils/hct-color-utils/viewing-conditions.js +5 -4
  75. package/dist/cjs/utils/hct-color-utils/white-point-d65.js +14 -0
  76. package/dist/cjs/utils/hct-color-utils/y-from-lstar.js +21 -0
  77. package/dist/cjs/utils/hex-to-hsl.js +52 -0
  78. package/dist/cjs/utils/hex-to-rgb-a.js +20 -0
  79. package/dist/cjs/utils/hex-to-rgb.js +19 -0
  80. package/dist/cjs/utils/is-valid-hex.js +10 -0
  81. package/dist/cjs/utils/load-theme-css.js +4 -4
  82. package/dist/cjs/utils/reduce-token-map.js +18 -0
  83. package/dist/cjs/utils/rgb-to-lab.js +24 -0
  84. package/dist/cjs/utils/theme-loading.js +8 -8
  85. package/dist/es2019/artifacts/palettes-raw/palette.js +35 -1
  86. package/dist/es2019/artifacts/themes/atlassian-dark-increased-contrast.js +2 -2
  87. package/dist/es2019/artifacts/themes/atlassian-dark.js +2 -2
  88. package/dist/es2019/artifacts/themes/atlassian-light-increased-contrast.js +2 -2
  89. package/dist/es2019/artifacts/themes/atlassian-light.js +2 -2
  90. package/dist/es2019/artifacts/token-default-values.js +2 -2
  91. package/dist/es2019/artifacts/tokens-raw/atlassian-dark-increased-contrast.js +3 -3
  92. package/dist/es2019/artifacts/tokens-raw/atlassian-dark.js +3 -3
  93. package/dist/es2019/artifacts/tokens-raw/atlassian-light-increased-contrast.js +3 -3
  94. package/dist/es2019/artifacts/tokens-raw/atlassian-light.js +3 -3
  95. package/dist/es2019/constants.js +1 -0
  96. package/dist/es2019/entry-points/theme-state-transformer.js +2 -1
  97. package/dist/es2019/entry-points/token-metadata.codegen.js +2 -2
  98. package/dist/es2019/get-custom-theme-styles.js +3 -2
  99. package/dist/es2019/get-global-theme.js +1 -1
  100. package/dist/es2019/get-theme-html-attrs.js +1 -1
  101. package/dist/es2019/index.js +2 -1
  102. package/dist/es2019/is-color-mode.js +3 -0
  103. package/dist/es2019/is-theme-ids.js +4 -0
  104. package/dist/es2019/is-theme-kind.js +4 -0
  105. package/dist/es2019/theme-config.js +5 -44
  106. package/dist/es2019/theme-object-to-string.js +28 -0
  107. package/dist/es2019/theme-options-schema.js +0 -0
  108. package/dist/es2019/theme-state-defaults.js +34 -0
  109. package/dist/es2019/theme-state.js +1 -0
  110. package/dist/es2019/theme-string-to-object.js +38 -0
  111. package/dist/es2019/utils/additional-contrast-checker.js +39 -0
  112. package/dist/es2019/utils/custom-theme-loading-utils.js +1 -9
  113. package/dist/es2019/utils/custom-theme-token-contrast-check.js +1 -39
  114. package/dist/es2019/utils/delta-e.js +20 -0
  115. package/dist/es2019/utils/generate-colors.js +39 -0
  116. package/dist/es2019/utils/generate-token-map-with-contrast-check.js +21 -0
  117. package/dist/es2019/utils/{generate-custom-color-ramp.js → generate-token-map.js} +3 -59
  118. package/dist/es2019/utils/get-closest-color-index.js +2 -1
  119. package/dist/es2019/utils/get-contrast-ratio.js +16 -0
  120. package/dist/es2019/utils/hct-color-utils/alpha-from-argb.js +6 -0
  121. package/dist/es2019/utils/hct-color-utils/argb-from-linrgb.js +12 -0
  122. package/dist/es2019/utils/hct-color-utils/argb-from-lstar.js +16 -0
  123. package/dist/es2019/utils/hct-color-utils/argb-from-rgba.js +19 -0
  124. package/dist/es2019/utils/hct-color-utils/argb-from-xyz.js +24 -0
  125. package/dist/es2019/utils/hct-color-utils/blue-from-argb.js +6 -0
  126. package/dist/es2019/utils/hct-color-utils/clamp-component.js +9 -0
  127. package/dist/es2019/utils/hct-color-utils/contrast.js +10 -10
  128. package/dist/es2019/utils/hct-color-utils/green-from-argb.js +6 -0
  129. package/dist/es2019/utils/hct-color-utils/hct.js +19 -12
  130. package/dist/es2019/utils/hct-color-utils/index.js +2 -1
  131. package/dist/es2019/utils/hct-color-utils/lab-f.js +9 -0
  132. package/dist/es2019/utils/hct-color-utils/lab-invf.js +10 -0
  133. package/dist/es2019/utils/hct-color-utils/lstar-from-argb.js +28 -0
  134. package/dist/es2019/utils/hct-color-utils/lstar-from-y.js +16 -0
  135. package/dist/es2019/utils/hct-color-utils/red-from-argb.js +6 -0
  136. package/dist/es2019/utils/hct-color-utils/rgba-from-argb.js +22 -0
  137. package/dist/es2019/utils/hct-color-utils/rgba.js +0 -0
  138. package/dist/es2019/utils/hct-color-utils/viewing-conditions.js +4 -3
  139. package/dist/es2019/utils/hct-color-utils/white-point-d65.js +8 -0
  140. package/dist/es2019/utils/hct-color-utils/y-from-lstar.js +16 -0
  141. package/dist/es2019/utils/hex-to-hsl.js +46 -0
  142. package/dist/es2019/utils/hex-to-rgb-a.js +14 -0
  143. package/dist/es2019/utils/hex-to-rgb.js +13 -0
  144. package/dist/es2019/utils/is-valid-hex.js +2 -0
  145. package/dist/es2019/utils/reduce-token-map.js +7 -0
  146. package/dist/es2019/utils/rgb-to-lab.js +18 -0
  147. package/dist/esm/artifacts/palettes-raw/palette.js +35 -1
  148. package/dist/esm/artifacts/themes/atlassian-dark-increased-contrast.js +2 -2
  149. package/dist/esm/artifacts/themes/atlassian-dark.js +2 -2
  150. package/dist/esm/artifacts/themes/atlassian-light-increased-contrast.js +2 -2
  151. package/dist/esm/artifacts/themes/atlassian-light.js +2 -2
  152. package/dist/esm/artifacts/token-default-values.js +2 -2
  153. package/dist/esm/artifacts/tokens-raw/atlassian-dark-increased-contrast.js +3 -3
  154. package/dist/esm/artifacts/tokens-raw/atlassian-dark.js +3 -3
  155. package/dist/esm/artifacts/tokens-raw/atlassian-light-increased-contrast.js +3 -3
  156. package/dist/esm/artifacts/tokens-raw/atlassian-light.js +3 -3
  157. package/dist/esm/constants.js +1 -0
  158. package/dist/esm/entry-points/theme-state-transformer.js +2 -1
  159. package/dist/esm/entry-points/token-metadata.codegen.js +2 -2
  160. package/dist/esm/get-custom-theme-styles.js +3 -2
  161. package/dist/esm/get-global-theme.js +1 -1
  162. package/dist/esm/get-theme-html-attrs.js +1 -1
  163. package/dist/esm/get-theme-styles.js +26 -26
  164. package/dist/esm/index.js +2 -1
  165. package/dist/esm/is-color-mode.js +3 -0
  166. package/dist/esm/is-theme-ids.js +6 -0
  167. package/dist/esm/is-theme-kind.js +6 -0
  168. package/dist/esm/set-global-theme.js +31 -30
  169. package/dist/esm/theme-config.js +5 -44
  170. package/dist/esm/theme-object-to-string.js +35 -0
  171. package/dist/esm/theme-options-schema.js +0 -0
  172. package/dist/esm/theme-state-defaults.js +34 -0
  173. package/dist/esm/theme-state.js +1 -0
  174. package/dist/esm/theme-string-to-object.js +44 -0
  175. package/dist/esm/utils/additional-contrast-checker.js +36 -0
  176. package/dist/esm/utils/custom-theme-loading-utils.js +1 -13
  177. package/dist/esm/utils/custom-theme-token-contrast-check.js +1 -36
  178. package/dist/esm/utils/delta-e.js +20 -0
  179. package/dist/esm/utils/generate-colors.js +40 -0
  180. package/dist/esm/utils/generate-token-map-with-contrast-check.js +25 -0
  181. package/dist/esm/utils/{generate-custom-color-ramp.js → generate-token-map.js} +3 -63
  182. package/dist/esm/utils/get-closest-color-index.js +2 -1
  183. package/dist/esm/utils/get-contrast-ratio.js +16 -0
  184. package/dist/esm/utils/hct-color-utils/alpha-from-argb.js +6 -0
  185. package/dist/esm/utils/hct-color-utils/argb-from-linrgb.js +12 -0
  186. package/dist/esm/utils/hct-color-utils/argb-from-lstar.js +16 -0
  187. package/dist/esm/utils/hct-color-utils/argb-from-rgba.js +18 -0
  188. package/dist/esm/utils/hct-color-utils/argb-from-xyz.js +24 -0
  189. package/dist/esm/utils/hct-color-utils/blue-from-argb.js +6 -0
  190. package/dist/esm/utils/hct-color-utils/clamp-component.js +9 -0
  191. package/dist/esm/utils/hct-color-utils/contrast.js +10 -10
  192. package/dist/esm/utils/hct-color-utils/green-from-argb.js +6 -0
  193. package/dist/esm/utils/hct-color-utils/hct.js +19 -12
  194. package/dist/esm/utils/hct-color-utils/index.js +2 -1
  195. package/dist/esm/utils/hct-color-utils/lab-f.js +9 -0
  196. package/dist/esm/utils/hct-color-utils/lab-invf.js +10 -0
  197. package/dist/esm/utils/hct-color-utils/lstar-from-argb.js +28 -0
  198. package/dist/esm/utils/hct-color-utils/lstar-from-y.js +16 -0
  199. package/dist/esm/utils/hct-color-utils/red-from-argb.js +6 -0
  200. package/dist/esm/utils/hct-color-utils/rgba-from-argb.js +22 -0
  201. package/dist/esm/utils/hct-color-utils/rgba.js +0 -0
  202. package/dist/esm/utils/hct-color-utils/viewing-conditions.js +5 -4
  203. package/dist/esm/utils/hct-color-utils/white-point-d65.js +8 -0
  204. package/dist/esm/utils/hct-color-utils/y-from-lstar.js +16 -0
  205. package/dist/esm/utils/hex-to-hsl.js +46 -0
  206. package/dist/esm/utils/hex-to-rgb-a.js +14 -0
  207. package/dist/esm/utils/hex-to-rgb.js +13 -0
  208. package/dist/esm/utils/is-valid-hex.js +4 -0
  209. package/dist/esm/utils/load-theme-css.js +4 -4
  210. package/dist/esm/utils/reduce-token-map.js +11 -0
  211. package/dist/esm/utils/rgb-to-lab.js +18 -0
  212. package/dist/esm/utils/theme-loading.js +8 -8
  213. package/dist/types/artifacts/palettes-raw/palette.d.ts +1 -1
  214. package/dist/types/artifacts/themes/atlassian-dark-increased-contrast.d.ts +2 -2
  215. package/dist/types/artifacts/themes/atlassian-dark.d.ts +2 -2
  216. package/dist/types/artifacts/themes/atlassian-light-increased-contrast.d.ts +2 -2
  217. package/dist/types/artifacts/themes/atlassian-light.d.ts +2 -2
  218. package/dist/types/artifacts/token-default-values.d.ts +2 -2
  219. package/dist/types/artifacts/tokens-raw/atlassian-dark-increased-contrast.d.ts +1 -1
  220. package/dist/types/artifacts/tokens-raw/atlassian-dark.d.ts +1 -1
  221. package/dist/types/artifacts/tokens-raw/atlassian-light-increased-contrast.d.ts +1 -1
  222. package/dist/types/artifacts/tokens-raw/atlassian-light.d.ts +1 -1
  223. package/dist/types/entry-points/theme-state-transformer.d.ts +2 -1
  224. package/dist/types/entry-points/token-metadata.codegen.d.ts +1 -1
  225. package/dist/types/index.d.ts +2 -1
  226. package/dist/types/is-color-mode.d.ts +2 -0
  227. package/dist/types/is-theme-ids.d.ts +2 -0
  228. package/dist/types/is-theme-kind.d.ts +4 -0
  229. package/dist/types/theme-color-modes.d.ts +1 -0
  230. package/dist/types/theme-config.d.ts +8 -40
  231. package/dist/types/theme-ids.d.ts +1 -0
  232. package/dist/types/theme-object-to-string.d.ts +13 -0
  233. package/dist/types/theme-options-schema.d.ts +7 -0
  234. package/dist/types/theme-state-defaults.d.ts +14 -0
  235. package/dist/types/theme-state.d.ts +17 -0
  236. package/dist/types/{theme-state-transformer.d.ts → theme-string-to-object.d.ts} +0 -12
  237. package/dist/types/utils/additional-contrast-checker.d.ts +9 -0
  238. package/dist/types/utils/custom-theme-loading-utils.d.ts +1 -6
  239. package/dist/types/utils/custom-theme-token-contrast-check.d.ts +0 -9
  240. package/dist/types/utils/delta-e.d.ts +1 -0
  241. package/dist/types/utils/generate-colors.d.ts +5 -0
  242. package/dist/types/utils/{generate-custom-color-ramp.d.ts → generate-token-map-with-contrast-check.d.ts} +1 -6
  243. package/dist/types/utils/generate-token-map.d.ts +9 -0
  244. package/dist/types/utils/get-contrast-ratio.d.ts +1 -0
  245. package/dist/types/utils/hct-color-utils/alpha-from-argb.d.ts +4 -0
  246. package/dist/types/utils/hct-color-utils/argb-from-linrgb.d.ts +4 -0
  247. package/dist/types/utils/hct-color-utils/argb-from-lstar.d.ts +8 -0
  248. package/dist/types/utils/hct-color-utils/argb-from-rgba.d.ts +8 -0
  249. package/dist/types/utils/hct-color-utils/argb-from-xyz.d.ts +4 -0
  250. package/dist/types/utils/hct-color-utils/blue-from-argb.d.ts +4 -0
  251. package/dist/types/utils/hct-color-utils/clamp-component.d.ts +1 -0
  252. package/dist/types/utils/hct-color-utils/green-from-argb.d.ts +4 -0
  253. package/dist/types/utils/hct-color-utils/index.d.ts +2 -1
  254. package/dist/types/utils/hct-color-utils/lab-f.d.ts +1 -0
  255. package/dist/types/utils/hct-color-utils/lab-invf.d.ts +1 -0
  256. package/dist/types/utils/hct-color-utils/lstar-from-argb.d.ts +7 -0
  257. package/dist/types/utils/hct-color-utils/lstar-from-y.d.ts +12 -0
  258. package/dist/types/utils/hct-color-utils/red-from-argb.d.ts +4 -0
  259. package/dist/types/utils/hct-color-utils/rgba-from-argb.d.ts +8 -0
  260. package/dist/types/utils/hct-color-utils/rgba.d.ts +14 -0
  261. package/dist/types/utils/hct-color-utils/white-point-d65.d.ts +6 -0
  262. package/dist/types/utils/hct-color-utils/y-from-lstar.d.ts +12 -0
  263. package/dist/types/utils/hex-to-hsl.d.ts +1 -0
  264. package/dist/types/utils/hex-to-rgb-a.d.ts +1 -0
  265. package/dist/types/utils/hex-to-rgb.d.ts +1 -0
  266. package/dist/types/utils/is-valid-hex.d.ts +1 -0
  267. package/dist/types/utils/reduce-token-map.d.ts +6 -0
  268. package/dist/types/utils/rgb-to-lab.d.ts +1 -0
  269. package/dist/types-ts4.5/artifacts/palettes-raw/palette.d.ts +1 -1
  270. package/dist/types-ts4.5/artifacts/themes/atlassian-dark-increased-contrast.d.ts +2 -2
  271. package/dist/types-ts4.5/artifacts/themes/atlassian-dark.d.ts +2 -2
  272. package/dist/types-ts4.5/artifacts/themes/atlassian-light-increased-contrast.d.ts +2 -2
  273. package/dist/types-ts4.5/artifacts/themes/atlassian-light.d.ts +2 -2
  274. package/dist/types-ts4.5/artifacts/token-default-values.d.ts +2 -2
  275. package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-dark-increased-contrast.d.ts +1 -1
  276. package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-dark.d.ts +1 -1
  277. package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-light-increased-contrast.d.ts +1 -1
  278. package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-light.d.ts +1 -1
  279. package/dist/types-ts4.5/entry-points/theme-state-transformer.d.ts +2 -1
  280. package/dist/types-ts4.5/entry-points/token-metadata.codegen.d.ts +1 -1
  281. package/dist/types-ts4.5/index.d.ts +2 -1
  282. package/dist/types-ts4.5/is-color-mode.d.ts +2 -0
  283. package/dist/types-ts4.5/is-theme-ids.d.ts +2 -0
  284. package/dist/types-ts4.5/is-theme-kind.d.ts +11 -0
  285. package/dist/types-ts4.5/theme-color-modes.d.ts +1 -0
  286. package/dist/types-ts4.5/theme-config.d.ts +8 -40
  287. package/dist/types-ts4.5/theme-ids.d.ts +1 -0
  288. package/dist/types-ts4.5/theme-object-to-string.d.ts +13 -0
  289. package/dist/types-ts4.5/theme-options-schema.d.ts +7 -0
  290. package/dist/types-ts4.5/theme-state-defaults.d.ts +14 -0
  291. package/dist/types-ts4.5/theme-state.d.ts +17 -0
  292. package/dist/types-ts4.5/{theme-state-transformer.d.ts → theme-string-to-object.d.ts} +0 -12
  293. package/dist/types-ts4.5/utils/additional-contrast-checker.d.ts +9 -0
  294. package/dist/types-ts4.5/utils/custom-theme-loading-utils.d.ts +1 -6
  295. package/dist/types-ts4.5/utils/custom-theme-token-contrast-check.d.ts +0 -9
  296. package/dist/types-ts4.5/utils/delta-e.d.ts +1 -0
  297. package/dist/types-ts4.5/utils/generate-colors.d.ts +5 -0
  298. package/dist/types-ts4.5/utils/{generate-custom-color-ramp.d.ts → generate-token-map-with-contrast-check.d.ts} +1 -8
  299. package/dist/types-ts4.5/utils/generate-token-map.d.ts +11 -0
  300. package/dist/types-ts4.5/utils/get-contrast-ratio.d.ts +1 -0
  301. package/dist/types-ts4.5/utils/hct-color-utils/alpha-from-argb.d.ts +4 -0
  302. package/dist/types-ts4.5/utils/hct-color-utils/argb-from-linrgb.d.ts +4 -0
  303. package/dist/types-ts4.5/utils/hct-color-utils/argb-from-lstar.d.ts +8 -0
  304. package/dist/types-ts4.5/utils/hct-color-utils/argb-from-rgba.d.ts +8 -0
  305. package/dist/types-ts4.5/utils/hct-color-utils/argb-from-xyz.d.ts +4 -0
  306. package/dist/types-ts4.5/utils/hct-color-utils/blue-from-argb.d.ts +4 -0
  307. package/dist/types-ts4.5/utils/hct-color-utils/clamp-component.d.ts +1 -0
  308. package/dist/types-ts4.5/utils/hct-color-utils/green-from-argb.d.ts +4 -0
  309. package/dist/types-ts4.5/utils/hct-color-utils/index.d.ts +2 -1
  310. package/dist/types-ts4.5/utils/hct-color-utils/lab-f.d.ts +1 -0
  311. package/dist/types-ts4.5/utils/hct-color-utils/lab-invf.d.ts +1 -0
  312. package/dist/types-ts4.5/utils/hct-color-utils/lstar-from-argb.d.ts +7 -0
  313. package/dist/types-ts4.5/utils/hct-color-utils/lstar-from-y.d.ts +12 -0
  314. package/dist/types-ts4.5/utils/hct-color-utils/red-from-argb.d.ts +4 -0
  315. package/dist/types-ts4.5/utils/hct-color-utils/rgba-from-argb.d.ts +8 -0
  316. package/dist/types-ts4.5/utils/hct-color-utils/rgba.d.ts +14 -0
  317. package/dist/types-ts4.5/utils/hct-color-utils/white-point-d65.d.ts +6 -0
  318. package/dist/types-ts4.5/utils/hct-color-utils/y-from-lstar.d.ts +12 -0
  319. package/dist/types-ts4.5/utils/hex-to-hsl.d.ts +5 -0
  320. package/dist/types-ts4.5/utils/hex-to-rgb-a.d.ts +6 -0
  321. package/dist/types-ts4.5/utils/hex-to-rgb.d.ts +5 -0
  322. package/dist/types-ts4.5/utils/is-valid-hex.d.ts +1 -0
  323. package/dist/types-ts4.5/utils/reduce-token-map.d.ts +6 -0
  324. package/dist/types-ts4.5/utils/rgb-to-lab.d.ts +5 -0
  325. package/figma/atlassian-dark-increased-contrast.json +1 -1
  326. package/figma/atlassian-dark.json +1 -1
  327. package/figma/atlassian-light-increased-contrast.json +1 -1
  328. package/figma/atlassian-light.json +1 -1
  329. package/package.json +12 -12
  330. package/tokens.docs.tsx +48 -46
  331. package/dist/cjs/theme-state-transformer.js +0 -92
  332. package/dist/cjs/utils/color-utils.js +0 -168
  333. package/dist/cjs/utils/hct-color-utils/color-utils.js +0 -271
  334. package/dist/es2019/theme-state-transformer.js +0 -69
  335. package/dist/es2019/utils/color-utils.js +0 -128
  336. package/dist/es2019/utils/hct-color-utils/color-utils.js +0 -241
  337. package/dist/esm/theme-state-transformer.js +0 -85
  338. package/dist/esm/utils/color-utils.js +0 -130
  339. package/dist/esm/utils/hct-color-utils/color-utils.js +0 -240
  340. package/dist/types/utils/color-utils.d.ts +0 -10
  341. package/dist/types/utils/hct-color-utils/color-utils.d.ts +0 -88
  342. package/dist/types-ts4.5/utils/color-utils.d.ts +0 -23
  343. package/dist/types-ts4.5/utils/hct-color-utils/color-utils.d.ts +0 -88
@@ -0,0 +1,5 @@
1
+ export declare function rgbToLab(rgb: number[]): [
2
+ number,
3
+ number,
4
+ number
5
+ ];
@@ -1874,7 +1874,7 @@
1874
1874
  }
1875
1875
  },
1876
1876
  "Dark increased-contrast/color.background.disabled": {
1877
- "value": "#BDBDBD0A",
1877
+ "value": "#E3E4F21F",
1878
1878
  "attributes": {
1879
1879
  "group": "paint",
1880
1880
  "state": "active",
@@ -1880,7 +1880,7 @@
1880
1880
  "introduced": "0.0.15",
1881
1881
  "description": "Use for backgrounds of elements in a disabled state."
1882
1882
  },
1883
- "value": "#BDBDBD0A"
1883
+ "value": "#E3E4F21F"
1884
1884
  },
1885
1885
  "Dark/color.background.input": {
1886
1886
  "attributes": {
@@ -1874,7 +1874,7 @@
1874
1874
  }
1875
1875
  },
1876
1876
  "Light increased-contrast/color.background.disabled": {
1877
- "value": "#17171708",
1877
+ "value": "#0515240F",
1878
1878
  "attributes": {
1879
1879
  "group": "paint",
1880
1880
  "state": "active",
@@ -1880,7 +1880,7 @@
1880
1880
  "introduced": "0.0.15",
1881
1881
  "description": "Use for backgrounds of elements in a disabled state."
1882
1882
  },
1883
- "value": "#17171708"
1883
+ "value": "#0515240F"
1884
1884
  },
1885
1885
  "Light/color.background.input": {
1886
1886
  "attributes": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/tokens",
3
- "version": "13.0.4",
3
+ "version": "13.1.1",
4
4
  "description": "Design tokens are the single source of truth to name and store design decisions.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -50,31 +50,31 @@
50
50
  "devDependencies": {
51
51
  "@af/formatting": "workspace:^",
52
52
  "@af/visual-regression": "workspace:^",
53
- "@atlaskit/avatar": "^25.14.0",
53
+ "@atlaskit/avatar": "^25.15.0",
54
54
  "@atlaskit/button": "^23.11.0",
55
55
  "@atlaskit/calendar": "^17.2.0",
56
56
  "@atlaskit/checkbox": "^17.3.0",
57
57
  "@atlaskit/code": "^17.5.0",
58
58
  "@atlaskit/css": "^0.19.0",
59
59
  "@atlaskit/docs": "^11.8.0",
60
- "@atlaskit/dropdown-menu": "^16.8.0",
60
+ "@atlaskit/dropdown-menu": "^16.10.0",
61
61
  "@atlaskit/dynamic-table": "^18.4.0",
62
62
  "@atlaskit/form": "^15.5.0",
63
63
  "@atlaskit/heading": "^5.4.0",
64
- "@atlaskit/icon": "^34.4.0",
64
+ "@atlaskit/icon": "^35.3.0",
65
65
  "@atlaskit/inline-message": "^15.6.0",
66
66
  "@atlaskit/link": "^3.4.0",
67
67
  "@atlaskit/lozenge": "^13.8.0",
68
- "@atlaskit/popup": "^4.17.0",
68
+ "@atlaskit/popup": "^4.23.0",
69
69
  "@atlaskit/primitives": "^19.0.0",
70
70
  "@atlaskit/radio": "^8.6.0",
71
- "@atlaskit/section-message": "^8.12.0",
72
- "@atlaskit/select": "^21.10.0",
73
- "@atlaskit/tag": "^14.13.0",
71
+ "@atlaskit/section-message": "^8.13.0",
72
+ "@atlaskit/select": "^21.12.0",
73
+ "@atlaskit/tag": "^14.14.0",
74
74
  "@atlaskit/textarea": "^8.3.0",
75
75
  "@atlaskit/textfield": "^8.3.0",
76
- "@atlaskit/theme": "^23.2.0",
77
- "@atlaskit/tooltip": "^22.0.0",
76
+ "@atlaskit/theme": "^25.0.0",
77
+ "@atlaskit/tooltip": "^22.5.0",
78
78
  "@atlassian/codegen": "^0.2.0",
79
79
  "@atlassian/feature-flags-test-utils": "^1.1.0",
80
80
  "@atlassian/react-compiler-gating": "workspace:^",
@@ -86,13 +86,13 @@
86
86
  "@testing-library/react": "^16.3.0",
87
87
  "color-blend": "^4.0.0",
88
88
  "echarts": "^5.4.1",
89
- "echarts-for-react": "^3.0.2",
89
+ "echarts-for-react": "3.0.6",
90
90
  "jscodeshift": "^17.0.0",
91
91
  "json5": "^2.2.2",
92
92
  "lodash": "^4.17.21",
93
93
  "postcss": "^8.4.7",
94
94
  "postcss-less": "^6.0.0",
95
- "react": "^18.2.0",
95
+ "react": "^19.0.0",
96
96
  "react-window": "^1.8.8",
97
97
  "style-dictionary": "^3.8.0"
98
98
  },
package/tokens.docs.tsx CHANGED
@@ -1,53 +1,55 @@
1
1
  import path from 'path';
2
2
 
3
- import type { ComponentStructuredContentSource } from '@atlassian/structured-docs-types';
3
+ import type { StructuredContentSource } from '@atlassian/structured-docs-types/types';
4
4
 
5
- const documentation: ComponentStructuredContentSource[] = [
6
- {
7
- name: 'token',
8
- description:
9
- 'Design tokens provide consistent, semantic values for colors, spacing, typography, motion, and other design properties across the Atlassian Design System. Use tokens instead of hardcoded values to ensure consistency and proper theming.',
10
- status: 'general-availability',
11
- import: {
5
+ const documentation: StructuredContentSource = {
6
+ components: [
7
+ {
12
8
  name: 'token',
13
- package: '@atlaskit/tokens',
14
- type: 'named',
15
- packagePath: path.resolve(__dirname),
16
- packageJson: require('./package.json'),
17
- },
18
- usageGuidelines: [
19
- 'AVOID hardcoding any CSS values where a token exists for that type; in many cases you may be forced to use a token',
20
- 'Use the `token()` function with CSS-in-JS',
21
- 'Use semantic token names for better maintainability',
22
- ],
23
- accessibilityGuidelines: [
24
- 'Use color tokens to ensure proper contrast ratios',
25
- 'Test color combinations for accessibility compliance',
26
- 'Use semantic color names (success, warning, danger) for better meaning',
27
- ],
28
- examples: [
29
- {
30
- name: 'Basic',
31
- description: 'Basic example',
32
- source: path.resolve(__dirname, './examples/ai/basic.tsx'),
9
+ description:
10
+ 'Design tokens provide consistent, semantic values for colors, spacing, typography, motion, and other design properties across the Atlassian Design System. Use tokens instead of hardcoded values to ensure consistency and proper theming.',
11
+ status: 'general-availability',
12
+ import: {
13
+ name: 'token',
14
+ package: '@atlaskit/tokens',
15
+ type: 'named',
16
+ packagePath: path.resolve(__dirname),
17
+ packageJson: require('./package.json'),
33
18
  },
34
- ],
35
- keywords: [
36
- 'token',
37
- 'design',
38
- 'system',
39
- 'color',
40
- 'motion',
41
- 'spacing',
42
- 'typography',
43
- 'radius',
44
- 'theme',
45
- 'css',
46
- 'style',
47
- 'variable',
48
- ],
49
- categories: ['tokens'],
50
- },
51
- ];
19
+ usageGuidelines: [
20
+ 'AVOID hardcoding any CSS values where a token exists for that type; in many cases you may be forced to use a token',
21
+ 'Use the `token()` function with CSS-in-JS',
22
+ 'Use semantic token names for better maintainability',
23
+ ],
24
+ accessibilityGuidelines: [
25
+ 'Use color tokens to ensure proper contrast ratios',
26
+ 'Test color combinations for accessibility compliance',
27
+ 'Use semantic color names (success, warning, danger) for better meaning',
28
+ ],
29
+ examples: [
30
+ {
31
+ name: 'Basic',
32
+ description: 'Basic example',
33
+ source: path.resolve(__dirname, './examples/ai/basic.tsx'),
34
+ },
35
+ ],
36
+ keywords: [
37
+ 'token',
38
+ 'design',
39
+ 'system',
40
+ 'color',
41
+ 'motion',
42
+ 'spacing',
43
+ 'typography',
44
+ 'radius',
45
+ 'theme',
46
+ 'css',
47
+ 'style',
48
+ 'variable',
49
+ ],
50
+ categories: ['tokens'],
51
+ },
52
+ ],
53
+ };
52
54
 
53
55
  export default documentation;
@@ -1,92 +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.themeStringToObject = exports.themeObjectToString = void 0;
8
- var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
9
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
- var _themeIds = require("./theme-ids");
11
- var themeKinds = ['light', 'dark', 'spacing', 'typography', 'shape', 'motion'];
12
- var customThemeOptions = 'UNSAFE_themeOptions';
13
- var isThemeKind = function isThemeKind(themeKind) {
14
- return themeKinds.find(function (kind) {
15
- return kind === themeKind;
16
- }) !== undefined;
17
- };
18
- var isThemeIds = function isThemeIds(themeId) {
19
- return _themeIds.themeIds.find(function (id) {
20
- return id === themeId;
21
- }) !== undefined;
22
- };
23
- var isColorMode = function isColorMode(modeId) {
24
- return ['light', 'dark', 'auto'].includes(modeId);
25
- };
26
- /**
27
- * Converts a string that is formatted for the `data-theme` HTML attribute
28
- * to an object that can be passed to `setGlobalTheme`.
29
- *
30
- * @param {string} themes The themes that should be applied.
31
- *
32
- * @example
33
- * ```
34
- * themeStringToObject('dark:dark light:light spacing:spacing');
35
- * // returns { dark: 'dark', light: 'light', spacing: 'spacing' }
36
- * ```
37
- */
38
- var themeStringToObject = exports.themeStringToObject = function themeStringToObject(themeState) {
39
- return themeState.split(' ')
40
- // @ts-ignore - TS1501 TypeScript 5.9.2 upgrade
41
- .map(function (theme) {
42
- return theme.split(/:([^]*)/);
43
- }).reduce(function (themeObject, _ref) {
44
- var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
45
- kind = _ref2[0],
46
- id = _ref2[1];
47
- if (kind === 'colorMode' && isColorMode(id)) {
48
- themeObject[kind] = id;
49
- }
50
- if (isThemeKind(kind) && isThemeIds(id)) {
51
- // @ts-expect-error FIXME - this is a valid ts error
52
- themeObject[kind] = id;
53
- }
54
- if (kind === customThemeOptions) {
55
- try {
56
- themeObject[customThemeOptions] = JSON.parse(id);
57
- } catch (_unused) {
58
- new Error('Invalid custom theme string');
59
- }
60
- }
61
- return themeObject;
62
- }, {});
63
- };
64
-
65
- /**
66
- * Converts a theme object to a string formatted for the `data-theme` HTML attribute.
67
- *
68
- * @param {object} themes The themes that should be applied.
69
- *
70
- * @example
71
- * ```
72
- * themeObjectToString({ dark: 'dark', light: 'light', spacing: 'spacing' });
73
- * // returns 'dark:dark light:light spacing:spacing'
74
- * ```
75
- */
76
- var themeObjectToString = exports.themeObjectToString = function themeObjectToString(themeState) {
77
- return Object.entries(themeState).reduce(function (themeString, _ref3) {
78
- var _ref4 = (0, _slicedToArray2.default)(_ref3, 2),
79
- kind = _ref4[0],
80
- id = _ref4[1];
81
- if (
82
- // colorMode theme state
83
- kind === 'colorMode' && typeof id === 'string' && isColorMode(id) ||
84
- // custom theme state
85
- kind === customThemeOptions && (0, _typeof2.default)(id) === 'object' ||
86
- // other theme states
87
- isThemeKind(kind) && typeof id === 'string' && isThemeIds(id)) {
88
- return themeString + "".concat(themeString ? ' ' : '') + "".concat(kind, ":").concat((0, _typeof2.default)(id) === 'object' ? JSON.stringify(id) : id);
89
- }
90
- return themeString;
91
- }, '');
92
- };
@@ -1,168 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "HSLToRGB", {
7
- enumerable: true,
8
- get: function get() {
9
- return _hslToRgb.HSLToRGB;
10
- }
11
- });
12
- exports.deltaE = deltaE;
13
- Object.defineProperty(exports, "getAlpha", {
14
- enumerable: true,
15
- get: function get() {
16
- return _getAlpha.getAlpha;
17
- }
18
- });
19
- exports.getContrastRatio = getContrastRatio;
20
- exports.hexToHSL = hexToHSL;
21
- exports.hexToRgb = hexToRgb;
22
- exports.hexToRgbA = hexToRgbA;
23
- Object.defineProperty(exports, "isValidBrandHex", {
24
- enumerable: true,
25
- get: function get() {
26
- return _isValidBrandHex.isValidBrandHex;
27
- }
28
- });
29
- Object.defineProperty(exports, "relativeLuminanceW3C", {
30
- enumerable: true,
31
- get: function get() {
32
- return _relativeLuminanceW3C.relativeLuminanceW3C;
33
- }
34
- });
35
- Object.defineProperty(exports, "rgbToHex", {
36
- enumerable: true,
37
- get: function get() {
38
- return _rgbToHex.rgbToHex;
39
- }
40
- });
41
- var _getAlpha = require("./get-alpha");
42
- var _relativeLuminanceW3C = require("./relative-luminance-w3-c");
43
- var _isValidBrandHex = require("./is-valid-brand-hex");
44
- var _rgbToHex = require("./rgb-to-hex");
45
- var _hslToRgb = require("./hsl-to-rgb");
46
- // valid hex color with 4, 6 or 8 digits
47
- var isValidHex = function isValidHex(hex) {
48
- return /^#([A-Fa-f0-9]{3,4}){1,2}$/.test(hex);
49
- };
50
- function hexToRgbA(hex) {
51
- if (!isValidHex(hex)) {
52
- throw new Error('Invalid HEX');
53
- }
54
- var c;
55
- c = hex.substring(1).split('');
56
- if (c.length === 3) {
57
- c = [c[0], c[0], c[1], c[1], c[2], c[2]];
58
- }
59
- c = '0x' + c.join('');
60
- return [c >> 16 & 255, c >> 8 & 255, c & 255, (0, _getAlpha.getAlpha)(hex)];
61
- }
62
- function hexToRgb(hex) {
63
- if (!isValidHex(hex)) {
64
- throw new Error('Invalid HEX');
65
- }
66
- var c;
67
- c = hex.substring(1).split('');
68
- if (c.length === 3) {
69
- c = [c[0], c[0], c[1], c[1], c[2], c[2]];
70
- }
71
- c = '0x' + c.join('');
72
- return [c >> 16 & 255, c >> 8 & 255, c & 255];
73
- }
74
- function hexToHSL(hex) {
75
- if (!isValidHex(hex)) {
76
- throw new Error('Invalid HEX');
77
- }
78
- var r = 0,
79
- g = 0,
80
- b = 0;
81
- if (hex.length === 4) {
82
- r = '0x' + hex[1] + hex[1];
83
- g = '0x' + hex[2] + hex[2];
84
- b = '0x' + hex[3] + hex[3];
85
- } else if (hex.length === 7) {
86
- r = '0x' + hex[1] + hex[2];
87
- g = '0x' + hex[3] + hex[4];
88
- b = '0x' + hex[5] + hex[6];
89
- }
90
- // Then to HSL
91
- r /= 255;
92
- g /= 255;
93
- b /= 255;
94
- var cmin = Math.min(r, g, b),
95
- cmax = Math.max(r, g, b),
96
- delta = cmax - cmin,
97
- h = 0,
98
- s = 0,
99
- l = 0;
100
- if (delta === 0) {
101
- h = 0;
102
- } else if (cmax === r) {
103
- h = (g - b) / delta % 6;
104
- } else if (cmax === g) {
105
- h = (b - r) / delta + 2;
106
- } else {
107
- h = (r - g) / delta + 4;
108
- }
109
- h = Math.round(h * 60);
110
- if (h < 0) {
111
- h += 360;
112
- }
113
- l = (cmax + cmin) / 2;
114
- s = delta === 0 ? 0 : delta / (1 - Math.abs(2 * l - 1));
115
- s = +(s * 100).toFixed(1);
116
- l = +(l * 100).toFixed(1);
117
- return [h, s, l];
118
- }
119
- function getContrastRatio(foreground, background) {
120
- if (!isValidHex(foreground) || !isValidHex(background)) {
121
- throw new Error('Invalid HEX');
122
- }
123
- var foregroundRgb = hexToRgb(foreground);
124
- var backgroundRgb = hexToRgb(background);
125
- var foregroundLuminance = (0, _relativeLuminanceW3C.relativeLuminanceW3C)(foregroundRgb[0], foregroundRgb[1], foregroundRgb[2]);
126
- var backgroundLuminance = (0, _relativeLuminanceW3C.relativeLuminanceW3C)(backgroundRgb[0], backgroundRgb[1], backgroundRgb[2]);
127
- // calculate the color contrast ratio
128
- var brightest = Math.max(foregroundLuminance, backgroundLuminance);
129
- var darkest = Math.min(foregroundLuminance, backgroundLuminance);
130
- return (brightest + 0.05) / (darkest + 0.05);
131
- }
132
- function deltaE(rgbA, rgbB) {
133
- var labA = rgbToLab(rgbA);
134
- var labB = rgbToLab(rgbB);
135
- var deltaL = labA[0] - labB[0];
136
- var deltaA = labA[1] - labB[1];
137
- var deltaB = labA[2] - labB[2];
138
- var c1 = Math.sqrt(labA[1] * labA[1] + labA[2] * labA[2]);
139
- var c2 = Math.sqrt(labB[1] * labB[1] + labB[2] * labB[2]);
140
- var deltaC = c1 - c2;
141
- var deltaH = deltaA * deltaA + deltaB * deltaB - deltaC * deltaC;
142
- deltaH = deltaH < 0 ? 0 : Math.sqrt(deltaH);
143
- var sc = 1.0 + 0.045 * c1;
144
- var sh = 1.0 + 0.015 * c1;
145
- var deltaLKlsl = deltaL / 1.0;
146
- var deltaCkcsc = deltaC / sc;
147
- var deltaHkhsh = deltaH / sh;
148
- var i = deltaLKlsl * deltaLKlsl + deltaCkcsc * deltaCkcsc + deltaHkhsh * deltaHkhsh;
149
- return i < 0 ? 0 : Math.sqrt(i);
150
- }
151
- function rgbToLab(rgb) {
152
- var r = rgb[0] / 255,
153
- g = rgb[1] / 255,
154
- b = rgb[2] / 255,
155
- x,
156
- y,
157
- z;
158
- r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92;
159
- g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92;
160
- b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92;
161
- x = (r * 0.4124 + g * 0.3576 + b * 0.1805) / 0.95047;
162
- y = (r * 0.2126 + g * 0.7152 + b * 0.0722) / 1.0;
163
- z = (r * 0.0193 + g * 0.1192 + b * 0.9505) / 1.08883;
164
- x = x > 0.008856 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
165
- y = y > 0.008856 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
166
- z = z > 0.008856 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
167
- return [116 * y - 16, 500 * (x - y), 200 * (y - z)];
168
- }