@wordpress/theme 0.1.0 → 0.2.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 (168) hide show
  1. package/README.md +69 -9
  2. package/bin/generate-default-ramps/index.ts +49 -0
  3. package/bin/generate-primitive-tokens/index.ts +14 -9
  4. package/bin/terrazzo-plugin-ds-tokens-docs/index.ts +5 -24
  5. package/bin/terrazzo-plugin-figma-ds-token-manager/index.ts +11 -4
  6. package/bin/terrazzo-plugin-inline-alias-values/index.ts +84 -0
  7. package/bin/terrazzo-plugin-known-wpds-css-variables/index.ts +19 -39
  8. package/build/color-ramps/index.js +21 -39
  9. package/build/color-ramps/index.js.map +3 -3
  10. package/build/color-ramps/lib/color-utils.js +39 -0
  11. package/build/color-ramps/lib/color-utils.js.map +7 -0
  12. package/build/color-ramps/lib/constants.js +20 -27
  13. package/build/color-ramps/lib/constants.js.map +3 -3
  14. package/build/color-ramps/lib/default-ramps.js +220 -0
  15. package/build/color-ramps/lib/default-ramps.js.map +7 -0
  16. package/build/color-ramps/lib/find-color-with-constraints.js +60 -91
  17. package/build/color-ramps/lib/find-color-with-constraints.js.map +3 -3
  18. package/build/color-ramps/lib/index.js +77 -119
  19. package/build/color-ramps/lib/index.js.map +3 -3
  20. package/build/color-ramps/lib/ramp-configs.js +15 -14
  21. package/build/color-ramps/lib/ramp-configs.js.map +2 -2
  22. package/build/color-ramps/lib/register-color-spaces.js +7 -0
  23. package/build/color-ramps/lib/register-color-spaces.js.map +7 -0
  24. package/build/color-ramps/lib/taper-chroma.js +35 -27
  25. package/build/color-ramps/lib/taper-chroma.js.map +3 -3
  26. package/build/color-ramps/lib/types.js +2 -1
  27. package/build/color-ramps/lib/types.js.map +1 -1
  28. package/build/color-ramps/lib/utils.js +75 -11
  29. package/build/color-ramps/lib/utils.js.map +2 -2
  30. package/build/context.js +3 -2
  31. package/build/context.js.map +1 -1
  32. package/build/index.js +2 -1
  33. package/build/index.js.map +1 -1
  34. package/build/lock-unlock.js +3 -2
  35. package/build/lock-unlock.js.map +1 -1
  36. package/build/prebuilt/js/design-tokens.js +19 -11
  37. package/build/prebuilt/js/design-tokens.js.map +2 -2
  38. package/build/prebuilt/json/figma.json +165 -783
  39. package/build/prebuilt/ts/color-tokens.js +137 -0
  40. package/build/prebuilt/ts/color-tokens.js.map +7 -0
  41. package/build/private-apis.js +3 -2
  42. package/build/private-apis.js.map +1 -1
  43. package/build/theme-provider.js +19 -17
  44. package/build/theme-provider.js.map +4 -4
  45. package/build/token-id.js +30 -0
  46. package/build/token-id.js.map +7 -0
  47. package/build/types/css-modules.d.js +0 -1
  48. package/build/types.js +2 -1
  49. package/build/types.js.map +1 -1
  50. package/build/use-theme-provider-styles.js +67 -62
  51. package/build/use-theme-provider-styles.js.map +3 -3
  52. package/build-module/color-ramps/index.js +20 -28
  53. package/build-module/color-ramps/index.js.map +2 -2
  54. package/build-module/color-ramps/lib/color-utils.js +19 -0
  55. package/build-module/color-ramps/lib/color-utils.js.map +7 -0
  56. package/build-module/color-ramps/lib/constants.js +14 -11
  57. package/build-module/color-ramps/lib/constants.js.map +2 -2
  58. package/build-module/color-ramps/lib/default-ramps.js +196 -0
  59. package/build-module/color-ramps/lib/default-ramps.js.map +7 -0
  60. package/build-module/color-ramps/lib/find-color-with-constraints.js +61 -87
  61. package/build-module/color-ramps/lib/find-color-with-constraints.js.map +2 -2
  62. package/build-module/color-ramps/lib/index.js +85 -109
  63. package/build-module/color-ramps/lib/index.js.map +3 -3
  64. package/build-module/color-ramps/lib/ramp-configs.js +14 -13
  65. package/build-module/color-ramps/lib/ramp-configs.js.map +2 -2
  66. package/build-module/color-ramps/lib/register-color-spaces.js +7 -0
  67. package/build-module/color-ramps/lib/register-color-spaces.js.map +7 -0
  68. package/build-module/color-ramps/lib/taper-chroma.js +40 -16
  69. package/build-module/color-ramps/lib/taper-chroma.js.map +2 -2
  70. package/build-module/color-ramps/lib/utils.js +70 -6
  71. package/build-module/color-ramps/lib/utils.js.map +2 -2
  72. package/build-module/context.js +2 -1
  73. package/build-module/context.js.map +1 -1
  74. package/build-module/index.js +1 -0
  75. package/build-module/index.js.map +1 -1
  76. package/build-module/lock-unlock.js +2 -1
  77. package/build-module/lock-unlock.js.map +1 -1
  78. package/build-module/prebuilt/js/design-tokens.js +18 -10
  79. package/build-module/prebuilt/js/design-tokens.js.map +2 -2
  80. package/build-module/prebuilt/json/figma.json +165 -783
  81. package/build-module/prebuilt/ts/color-tokens.js +117 -0
  82. package/build-module/prebuilt/ts/color-tokens.js.map +7 -0
  83. package/build-module/private-apis.js +2 -1
  84. package/build-module/private-apis.js.map +1 -1
  85. package/build-module/theme-provider.js +18 -6
  86. package/build-module/theme-provider.js.map +3 -3
  87. package/build-module/token-id.js +6 -0
  88. package/build-module/token-id.js.map +7 -0
  89. package/build-module/use-theme-provider-styles.js +69 -57
  90. package/build-module/use-theme-provider-styles.js.map +2 -2
  91. package/build-types/color-ramps/index.d.ts +9 -16
  92. package/build-types/color-ramps/index.d.ts.map +1 -1
  93. package/build-types/color-ramps/lib/color-utils.d.ts +22 -0
  94. package/build-types/color-ramps/lib/color-utils.d.ts.map +1 -0
  95. package/build-types/color-ramps/lib/constants.d.ts +7 -9
  96. package/build-types/color-ramps/lib/constants.d.ts.map +1 -1
  97. package/build-types/color-ramps/lib/default-ramps.d.ts +7 -0
  98. package/build-types/color-ramps/lib/default-ramps.d.ts.map +1 -0
  99. package/build-types/color-ramps/lib/find-color-with-constraints.d.ts +8 -7
  100. package/build-types/color-ramps/lib/find-color-with-constraints.d.ts.map +1 -1
  101. package/build-types/color-ramps/lib/index.d.ts +5 -2
  102. package/build-types/color-ramps/lib/index.d.ts.map +1 -1
  103. package/build-types/color-ramps/lib/register-color-spaces.d.ts +2 -0
  104. package/build-types/color-ramps/lib/register-color-spaces.d.ts.map +1 -0
  105. package/build-types/color-ramps/lib/taper-chroma.d.ts +7 -3
  106. package/build-types/color-ramps/lib/taper-chroma.d.ts.map +1 -1
  107. package/build-types/color-ramps/lib/utils.d.ts +28 -5
  108. package/build-types/color-ramps/lib/utils.d.ts.map +1 -1
  109. package/build-types/color-ramps/stories/index.story.d.ts.map +1 -1
  110. package/build-types/prebuilt/ts/color-tokens.d.ts +7 -0
  111. package/build-types/prebuilt/ts/color-tokens.d.ts.map +1 -0
  112. package/build-types/stories/index.story.d.ts.map +1 -1
  113. package/build-types/theme-provider.d.ts.map +1 -1
  114. package/build-types/token-id.d.ts +9 -0
  115. package/build-types/token-id.d.ts.map +1 -0
  116. package/build-types/use-theme-provider-styles.d.ts +4 -0
  117. package/build-types/use-theme-provider-styles.d.ts.map +1 -1
  118. package/docs/ds-tokens.md +22 -156
  119. package/package.json +19 -9
  120. package/src/color-ramps/index.ts +24 -41
  121. package/src/color-ramps/lib/color-utils.ts +34 -0
  122. package/src/color-ramps/lib/constants.ts +13 -9
  123. package/src/color-ramps/lib/default-ramps.ts +200 -0
  124. package/src/color-ramps/lib/find-color-with-constraints.ts +83 -116
  125. package/src/color-ramps/lib/index.ts +107 -145
  126. package/src/color-ramps/lib/ramp-configs.ts +3 -3
  127. package/src/color-ramps/lib/register-color-spaces.ts +13 -0
  128. package/src/color-ramps/lib/taper-chroma.ts +47 -19
  129. package/src/color-ramps/lib/utils.ts +117 -14
  130. package/src/color-ramps/stories/index.story.tsx +16 -22
  131. package/src/color-ramps/test/__snapshots__/index.test.ts.snap +45722 -376
  132. package/src/color-ramps/test/index.test.ts +68 -29
  133. package/src/prebuilt/css/design-tokens.css +88 -355
  134. package/src/prebuilt/js/design-tokens.js +17 -10
  135. package/src/prebuilt/json/figma.json +165 -783
  136. package/src/prebuilt/ts/color-tokens.ts +117 -0
  137. package/src/stories/index.story.tsx +4 -18
  138. package/src/test/token-id.test.ts +12 -0
  139. package/src/token-id.ts +9 -0
  140. package/src/use-theme-provider-styles.ts +67 -60
  141. package/terrazzo.config.ts +15 -12
  142. package/tokens/color.json +221 -69
  143. package/tokens/dimension.json +75 -0
  144. package/tsconfig.bin.json +13 -0
  145. package/tsconfig.bin.tsbuildinfo +1 -0
  146. package/tsconfig.json +6 -4
  147. package/tsconfig.src.json +9 -0
  148. package/tsconfig.src.tsbuildinfo +1 -0
  149. package/bin/build-tokens.js +0 -83
  150. package/build/color-ramps/lib/cache-utils.js +0 -57
  151. package/build/color-ramps/lib/cache-utils.js.map +0 -7
  152. package/build/prebuilt/ts/design-tokens.js +0 -354
  153. package/build/prebuilt/ts/design-tokens.js.map +0 -7
  154. package/build/style.module.css.js +0 -2
  155. package/build-module/color-ramps/lib/cache-utils.js +0 -31
  156. package/build-module/color-ramps/lib/cache-utils.js.map +0 -7
  157. package/build-module/prebuilt/ts/design-tokens.js +0 -334
  158. package/build-module/prebuilt/ts/design-tokens.js.map +0 -7
  159. package/build-module/style.module.css.js +0 -1
  160. package/build-style/style.css +0 -3
  161. package/build-types/color-ramps/lib/cache-utils.d.ts +0 -22
  162. package/build-types/color-ramps/lib/cache-utils.d.ts.map +0 -1
  163. package/build-types/prebuilt/ts/design-tokens.d.ts +0 -7
  164. package/build-types/prebuilt/ts/design-tokens.d.ts.map +0 -1
  165. package/src/color-ramps/lib/cache-utils.ts +0 -56
  166. package/src/prebuilt/ts/design-tokens.ts +0 -335
  167. package/tokens/spacing.json +0 -45
  168. package/tsconfig.tsbuildinfo +0 -1
@@ -1,45 +1,37 @@
1
- import Color from "colorjs.io";
1
+ // packages/theme/src/color-ramps/index.ts
2
+ import { get, OKLCH, parse, serialize } from "colorjs.io/fn";
3
+ import "./lib/register-color-spaces";
2
4
  import { buildRamp } from "./lib/index";
3
5
  import { clampAccentScaleReferenceLightness } from "./lib/utils";
4
6
  import { BG_RAMP_CONFIG, ACCENT_RAMP_CONFIG } from "./lib/ramp-configs";
5
- import { getCachedContrast } from "./lib/cache-utils";
7
+ import { getContrast } from "./lib/color-utils";
6
8
  import { CONTRAST_COMBINATIONS } from "./lib/constants";
7
9
  import { DEFAULT_SEED_COLORS } from "./lib/constants";
8
- function buildBgRamp({
9
- seed,
10
- debug
11
- }) {
10
+ function buildBgRamp(seed) {
12
11
  if (typeof seed !== "string" || seed.trim() === "") {
13
12
  throw new Error("Seed color must be a non-empty string");
14
13
  }
15
- return buildRamp(seed, BG_RAMP_CONFIG, { debug });
14
+ return buildRamp(seed, BG_RAMP_CONFIG);
16
15
  }
17
- const STEP_TO_PIN = "surface2";
16
+ var STEP_TO_PIN = "surface2";
18
17
  function getBgRampInfo(ramp) {
19
18
  return {
20
19
  mainDirection: ramp.direction,
21
20
  pinLightness: {
22
21
  stepName: STEP_TO_PIN,
23
22
  value: clampAccentScaleReferenceLightness(
24
- new Color(ramp.ramp[STEP_TO_PIN].color).oklch.l,
23
+ get(parse(ramp.ramp[STEP_TO_PIN].color), [OKLCH, "l"]),
25
24
  ramp.direction
26
25
  )
27
26
  }
28
27
  };
29
28
  }
30
- function buildAccentRamp({
31
- seed,
32
- bgRamp,
33
- debug
34
- }) {
29
+ function buildAccentRamp(seed, bgRamp) {
35
30
  if (typeof seed !== "string" || seed.trim() === "") {
36
31
  throw new Error("Seed color must be a non-empty string");
37
32
  }
38
33
  const bgRampInfo = bgRamp ? getBgRampInfo(bgRamp) : void 0;
39
- return buildRamp(seed, ACCENT_RAMP_CONFIG, {
40
- ...bgRampInfo,
41
- debug
42
- });
34
+ return buildRamp(seed, ACCENT_RAMP_CONFIG, bgRampInfo);
43
35
  }
44
36
  function checkAccessibleCombinations({
45
37
  bgRamp,
@@ -50,14 +42,14 @@ function checkAccessibleCombinations({
50
42
  CONTRAST_COMBINATIONS.forEach(({ bgs, fgs, target }) => {
51
43
  for (const bg of bgs) {
52
44
  for (const fg of fgs) {
53
- const bgColor = new Color(ramp.ramp[bg].color);
54
- const fgColor = new Color(ramp.ramp[fg].color);
55
- if (getCachedContrast(bgColor, fgColor) < target) {
45
+ const bgColor = parse(ramp.ramp[bg].color);
46
+ const fgColor = parse(ramp.ramp[fg].color);
47
+ if (getContrast(bgColor, fgColor) < target) {
56
48
  unmetTargets.push({
57
49
  bgName: bg,
58
- bgColor: bgColor.toString(),
50
+ bgColor: serialize(bgColor),
59
51
  fgName: fg,
60
- fgColor: fgColor.toString(),
52
+ fgColor: serialize(fgColor),
61
53
  unmetContrast: target
62
54
  });
63
55
  }
@@ -69,14 +61,14 @@ function checkAccessibleCombinations({
69
61
  CONTRAST_COMBINATIONS.forEach(({ bgs, fgs, target }) => {
70
62
  for (const bg of bgs) {
71
63
  for (const fg of fgs) {
72
- const bgColor = new Color(bgRamp.ramp[bg].color);
73
- const fgColor = new Color(ramp.ramp[fg].color);
74
- if (getCachedContrast(bgColor, fgColor) < target) {
64
+ const bgColor = parse(bgRamp.ramp[bg].color);
65
+ const fgColor = parse(ramp.ramp[fg].color);
66
+ if (getContrast(bgColor, fgColor) < target) {
75
67
  unmetTargets.push({
76
68
  bgName: bg,
77
- bgColor: bgColor.toString(),
69
+ bgColor: serialize(bgColor),
78
70
  fgName: fg,
79
- fgColor: fgColor.toString(),
71
+ fgColor: serialize(fgColor),
80
72
  unmetContrast: target
81
73
  });
82
74
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/color-ramps/index.ts"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport Color from 'colorjs.io';\n\n/**\n * Internal dependencies\n */\nimport { buildRamp } from './lib/index';\nimport { clampAccentScaleReferenceLightness } from './lib/utils';\nimport { BG_RAMP_CONFIG, ACCENT_RAMP_CONFIG } from './lib/ramp-configs';\nimport type {\n\tRampResult as InternalRampResult,\n\tRampDirection,\n\tRamp,\n} from './lib/types';\nimport { getCachedContrast } from './lib/cache-utils';\nimport { CONTRAST_COMBINATIONS } from './lib/constants';\nexport { DEFAULT_SEED_COLORS } from './lib/constants';\n\n/**\n * Creates a background ramp.\n * @param params\n * @param params.seed\n * @param params.debug\n */\nexport function buildBgRamp( {\n\tseed,\n\tdebug,\n}: {\n\tseed: string;\n\tdebug?: boolean;\n} ): InternalRampResult {\n\tif ( typeof seed !== 'string' || seed.trim() === '' ) {\n\t\tthrow new Error( 'Seed color must be a non-empty string' );\n\t}\n\n\treturn buildRamp( seed, BG_RAMP_CONFIG, { debug } );\n}\n\nconst STEP_TO_PIN = 'surface2';\nfunction getBgRampInfo( ramp: InternalRampResult ): {\n\tmainDirection: RampDirection;\n\tpinLightness: {\n\t\tstepName: keyof Ramp;\n\t\tvalue: number;\n\t};\n} {\n\treturn {\n\t\tmainDirection: ramp.direction,\n\t\tpinLightness: {\n\t\t\tstepName: STEP_TO_PIN,\n\t\t\tvalue: clampAccentScaleReferenceLightness(\n\t\t\t\tnew Color( ramp.ramp[ STEP_TO_PIN ].color ).oklch.l,\n\t\t\t\tramp.direction\n\t\t\t),\n\t\t},\n\t};\n}\n\n/**\n * Creates an accent ramp (ie used by primary, success, info, warning and error\n * ramps).\n * @param params\n * @param params.seed\n * @param params.bgRamp\n * @param params.debug\n */\nexport function buildAccentRamp( {\n\tseed,\n\tbgRamp,\n\tdebug,\n}: {\n\tseed: string;\n\tbgRamp?: InternalRampResult;\n\tdebug?: boolean;\n} ): InternalRampResult {\n\tif ( typeof seed !== 'string' || seed.trim() === '' ) {\n\t\tthrow new Error( 'Seed color must be a non-empty string' );\n\t}\n\n\tconst bgRampInfo = bgRamp ? getBgRampInfo( bgRamp ) : undefined;\n\treturn buildRamp( seed, ACCENT_RAMP_CONFIG, {\n\t\t...bgRampInfo,\n\t\tdebug,\n\t} );\n}\n\n/**\n * Checks that all bg/fg combinations generated by the ramps meet contrast\n * targets.\n * @param params\n * @param params.bgRamp\n * @param params.accentRamps\n */\nexport function checkAccessibleCombinations( {\n\tbgRamp,\n\taccentRamps = [],\n}: {\n\tbgRamp: InternalRampResult;\n\taccentRamps?: InternalRampResult[];\n} ) {\n\tconst unmetTargets: {\n\t\tbgName: keyof Ramp;\n\t\tbgColor: string;\n\t\tfgName: keyof Ramp;\n\t\tfgColor: string;\n\t\tunmetContrast: number;\n\t}[] = [];\n\n\t// Assess combinations within each ramp\n\t[ bgRamp, ...accentRamps ].forEach( ( ramp ) => {\n\t\tCONTRAST_COMBINATIONS.forEach( ( { bgs, fgs, target } ) => {\n\t\t\tfor ( const bg of bgs ) {\n\t\t\t\tfor ( const fg of fgs ) {\n\t\t\t\t\tconst bgColor = new Color( ramp.ramp[ bg ].color );\n\t\t\t\t\tconst fgColor = new Color( ramp.ramp[ fg ].color );\n\t\t\t\t\tif ( getCachedContrast( bgColor, fgColor ) < target ) {\n\t\t\t\t\t\tunmetTargets.push( {\n\t\t\t\t\t\t\tbgName: bg,\n\t\t\t\t\t\t\tbgColor: bgColor.toString(),\n\t\t\t\t\t\t\tfgName: fg,\n\t\t\t\t\t\t\tfgColor: fgColor.toString(),\n\t\t\t\t\t\t\tunmetContrast: target,\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t} );\n\t// Assess each accent ramp's fg color against bg ramp\n\taccentRamps.forEach( ( ramp ) => {\n\t\tCONTRAST_COMBINATIONS.forEach( ( { bgs, fgs, target } ) => {\n\t\t\tfor ( const bg of bgs ) {\n\t\t\t\tfor ( const fg of fgs ) {\n\t\t\t\t\tconst bgColor = new Color( bgRamp.ramp[ bg ].color );\n\t\t\t\t\tconst fgColor = new Color( ramp.ramp[ fg ].color );\n\t\t\t\t\tif ( getCachedContrast( bgColor, fgColor ) < target ) {\n\t\t\t\t\t\tunmetTargets.push( {\n\t\t\t\t\t\t\tbgName: bg,\n\t\t\t\t\t\t\tbgColor: bgColor.toString(),\n\t\t\t\t\t\t\tfgName: fg,\n\t\t\t\t\t\t\tfgColor: fgColor.toString(),\n\t\t\t\t\t\t\tunmetContrast: target,\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t} );\n\n\treturn unmetTargets;\n}\n\nexport type RampResult = InternalRampResult;\n"],
5
- "mappings": "AAGA,OAAO,WAAW;AAKlB,SAAS,iBAAiB;AAC1B,SAAS,0CAA0C;AACnD,SAA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B,SAAS,OAAQ,IAAI,QAAS;AACrD,yBAAa,KAAM;AAAA,cAClB,QAAQ;AAAA,cACR,SAAS,QAAQ,SAAS;AAAA,cAC1B,QAAQ;AAAA,cACR,SAAS,QAAQ,SAAS;AAAA,cAC1B,eAAe;AAAA,YAChB,CAAE;AAAA,UACH;AAAA,QACD;AAAA,MACD;AAAA,IACD,CAAE;AAAA,EACH,CAAE;AAEF,cAAY,QAAS,CAAE,SAAU;AAChC,0BAAsB,QAAS,CAAE,EAAE,KAAK,KAAK,OAAO,MAAO;AAC1D,iBAAY,MAAM,KAAM;AACvB,mBAAY,MAAM,KAAM;AACvB,gBAAM,UAAU,IAAI,MAAO,OAAO,KAAM,EAAG,EAAE,KAAM;AACnD,gBAAM,UAAU,IAAI,MAAO,KAAK,KAAM,EAAG,EAAE,KAAM;AACjD,cAAK,kBAAmB,SAAS,OAAQ,IAAI,QAAS;AACrD,yBAAa,KAAM;AAAA,cAClB,QAAQ;AAAA,cACR,SAAS,QAAQ,SAAS;AAAA,cAC1B,QAAQ;AAAA,cACR,SAAS,QAAQ,SAAS;AAAA,cAC1B,eAAe;AAAA,YAChB,CAAE;AAAA,UACH;AAAA,QACD;AAAA,MACD;AAAA,IACD,CAAE;AAAA,EACH,CAAE;AAEF,SAAO;AACR;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport { get, OKLCH, parse, serialize } from 'colorjs.io/fn';\n\n/**\n * Internal dependencies\n */\nimport './lib/register-color-spaces';\nimport { buildRamp } from './lib/index';\nimport { clampAccentScaleReferenceLightness } from './lib/utils';\nimport { BG_RAMP_CONFIG, ACCENT_RAMP_CONFIG } from './lib/ramp-configs';\nimport type {\n\tRampResult as InternalRampResult,\n\tRampDirection,\n\tRamp,\n} from './lib/types';\nimport { getContrast } from './lib/color-utils';\nimport { CONTRAST_COMBINATIONS } from './lib/constants';\nexport { DEFAULT_SEED_COLORS } from './lib/constants';\n\n/**\n * Creates a background ramp.\n * @param seed The seed color for the background ramp.\n */\nexport function buildBgRamp( seed: string ) {\n\tif ( typeof seed !== 'string' || seed.trim() === '' ) {\n\t\tthrow new Error( 'Seed color must be a non-empty string' );\n\t}\n\n\treturn buildRamp( seed, BG_RAMP_CONFIG );\n}\n\nconst STEP_TO_PIN = 'surface2';\nfunction getBgRampInfo( ramp: InternalRampResult ): {\n\tmainDirection: RampDirection;\n\tpinLightness: {\n\t\tstepName: keyof Ramp;\n\t\tvalue: number;\n\t};\n} {\n\treturn {\n\t\tmainDirection: ramp.direction,\n\t\tpinLightness: {\n\t\t\tstepName: STEP_TO_PIN,\n\t\t\tvalue: clampAccentScaleReferenceLightness(\n\t\t\t\tget( parse( ramp.ramp[ STEP_TO_PIN ].color ), [ OKLCH, 'l' ] ),\n\t\t\t\tramp.direction\n\t\t\t),\n\t\t},\n\t};\n}\n\n/**\n * Creates an accent ramp (ie used by primary, success, info, warning and error\n * ramps).\n * @param seed The seed color for the accent ramp.\n * @param bgRamp The ramp of the background on which the accent is shown.\n */\nexport function buildAccentRamp(\n\tseed: string,\n\tbgRamp?: InternalRampResult\n): InternalRampResult {\n\tif ( typeof seed !== 'string' || seed.trim() === '' ) {\n\t\tthrow new Error( 'Seed color must be a non-empty string' );\n\t}\n\n\tconst bgRampInfo = bgRamp ? getBgRampInfo( bgRamp ) : undefined;\n\treturn buildRamp( seed, ACCENT_RAMP_CONFIG, bgRampInfo );\n}\n\n/**\n * Checks that all bg/fg combinations generated by the ramps meet contrast\n * targets.\n * @param params\n * @param params.bgRamp\n * @param params.accentRamps\n */\nexport function checkAccessibleCombinations( {\n\tbgRamp,\n\taccentRamps = [],\n}: {\n\tbgRamp: InternalRampResult;\n\taccentRamps?: InternalRampResult[];\n} ) {\n\tconst unmetTargets: {\n\t\tbgName: keyof Ramp;\n\t\tbgColor: string;\n\t\tfgName: keyof Ramp;\n\t\tfgColor: string;\n\t\tunmetContrast: number;\n\t}[] = [];\n\n\t// Assess combinations within each ramp\n\t[ bgRamp, ...accentRamps ].forEach( ( ramp ) => {\n\t\tCONTRAST_COMBINATIONS.forEach( ( { bgs, fgs, target } ) => {\n\t\t\tfor ( const bg of bgs ) {\n\t\t\t\tfor ( const fg of fgs ) {\n\t\t\t\t\tconst bgColor = parse( ramp.ramp[ bg ].color );\n\t\t\t\t\tconst fgColor = parse( ramp.ramp[ fg ].color );\n\t\t\t\t\tif ( getContrast( bgColor, fgColor ) < target ) {\n\t\t\t\t\t\tunmetTargets.push( {\n\t\t\t\t\t\t\tbgName: bg,\n\t\t\t\t\t\t\tbgColor: serialize( bgColor ),\n\t\t\t\t\t\t\tfgName: fg,\n\t\t\t\t\t\t\tfgColor: serialize( fgColor ),\n\t\t\t\t\t\t\tunmetContrast: target,\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t} );\n\t// Assess each accent ramp's fg color against bg ramp\n\taccentRamps.forEach( ( ramp ) => {\n\t\tCONTRAST_COMBINATIONS.forEach( ( { bgs, fgs, target } ) => {\n\t\t\tfor ( const bg of bgs ) {\n\t\t\t\tfor ( const fg of fgs ) {\n\t\t\t\t\tconst bgColor = parse( bgRamp.ramp[ bg ].color );\n\t\t\t\t\tconst fgColor = parse( ramp.ramp[ fg ].color );\n\t\t\t\t\tif ( getContrast( bgColor, fgColor ) < target ) {\n\t\t\t\t\t\tunmetTargets.push( {\n\t\t\t\t\t\t\tbgName: bg,\n\t\t\t\t\t\t\tbgColor: serialize( bgColor ),\n\t\t\t\t\t\t\tfgName: fg,\n\t\t\t\t\t\t\tfgColor: serialize( fgColor ),\n\t\t\t\t\t\t\tunmetContrast: target,\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t} );\n\n\treturn unmetTargets;\n}\n\nexport type RampResult = InternalRampResult;\n"],
5
+ "mappings": ";AAGA,SAAS,KAAK,OAAO,OAAO,iBAAiB;AAK7C,OAAO;AACP,SAAS,iBAAiB;AAC1B,SAAS,0CAA0C;AACnD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Q;AAAA,cACR,SAAS,UAAW,OAAQ;AAAA,cAC5B,eAAe;AAAA,YAChB,CAAE;AAAA,UACH;AAAA,QACD;AAAA,MACD;AAAA,IACD,CAAE;AAAA,EACH,CAAE;AAEF,cAAY,QAAS,CAAE,SAAU;AAChC,0BAAsB,QAAS,CAAE,EAAE,KAAK,KAAK,OAAO,MAAO;AAC1D,iBAAY,MAAM,KAAM;AACvB,mBAAY,MAAM,KAAM;AACvB,gBAAM,UAAU,MAAO,OAAO,KAAM,EAAG,EAAE,KAAM;AAC/C,gBAAM,UAAU,MAAO,KAAK,KAAM,EAAG,EAAE,KAAM;AAC7C,cAAK,YAAa,SAAS,OAAQ,IAAI,QAAS;AAC/C,yBAAa,KAAM;AAAA,cAClB,QAAQ;AAAA,cACR,SAAS,UAAW,OAAQ;AAAA,cAC5B,QAAQ;AAAA,cACR,SAAS,UAAW,OAAQ;AAAA,cAC5B,eAAe;AAAA,YAChB,CAAE;AAAA,UACH;AAAA,QACD;AAAA,MACD;AAAA,IACD,CAAE;AAAA,EACH,CAAE;AAEF,SAAO;AACR;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,19 @@
1
+ // packages/theme/src/color-ramps/lib/color-utils.ts
2
+ import {
3
+ to,
4
+ serialize,
5
+ contrastWCAG21,
6
+ sRGB
7
+ } from "colorjs.io/fn";
8
+ import "./register-color-spaces";
9
+ function getColorString(color) {
10
+ return serialize(to(color, sRGB), { format: "hex", inGamut: true });
11
+ }
12
+ function getContrast(colorA, colorB) {
13
+ return contrastWCAG21(colorA, colorB);
14
+ }
15
+ export {
16
+ getColorString,
17
+ getContrast
18
+ };
19
+ //# sourceMappingURL=color-utils.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/color-ramps/lib/color-utils.ts"],
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport {\n\tto,\n\tserialize,\n\tcontrastWCAG21,\n\tsRGB,\n\ttype ColorTypes,\n} from 'colorjs.io/fn';\n\n/**\n * Internal dependencies\n */\nimport './register-color-spaces';\n\n/**\n * Get string representation of a color\n * @param color Color object to stringify\n * @return String representation\n */\nexport function getColorString( color: ColorTypes ): string {\n\treturn serialize( to( color, sRGB ), { format: 'hex', inGamut: true } );\n}\n\n/**\n * Get contrast value between two colors\n * @param colorA First color\n * @param colorB Second color\n * @return WCAG 2.1 contrast ratio\n */\nexport function getContrast( colorA: ColorTypes, colorB: ColorTypes ): number {\n\treturn contrastWCAG21( colorA, colorB );\n}\n"],
5
+ "mappings": ";AAGA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEM;AAKP,OAAO;AAOA,SAAS,eAAgB,OAA4B;AAC3D,SAAO,UAAW,GAAI,OAAO,IAAK,GAAG,EAAE,QAAQ,OAAO,SAAS,KAAK,CAAE;AACvE;AAQO,SAAS,YAAa,QAAoB,QAA6B;AAC7E,SAAO,eAAgB,QAAQ,MAAO;AACvC;",
6
+ "names": []
7
+ }
@@ -1,15 +1,17 @@
1
- import Color from "colorjs.io";
2
- const WHITE = new Color("#fff").to("oklch");
3
- const BLACK = new Color("#000").to("oklch");
4
- const UNIVERSAL_CONTRAST_TOPUP = 0.05;
5
- const WHITE_TEXT_CONTRAST_MARGIN = 3.1;
6
- const ACCENT_SCALE_BASE_LIGHTNESS_THRESHOLDS = {
1
+ // packages/theme/src/color-ramps/lib/constants.ts
2
+ import { to, OKLCH } from "colorjs.io/fn";
3
+ import "./register-color-spaces";
4
+ var WHITE = to("white", OKLCH);
5
+ var BLACK = to("black", OKLCH);
6
+ var UNIVERSAL_CONTRAST_TOPUP = 0.012;
7
+ var WHITE_TEXT_CONTRAST_MARGIN = 3.1;
8
+ var ACCENT_SCALE_BASE_LIGHTNESS_THRESHOLDS = {
7
9
  lighter: { min: 0.2, max: 0.4 },
8
10
  darker: { min: 0.75, max: 0.98 }
9
11
  };
10
- const LIGHTNESS_EPSILON = 1e-3;
11
- const MAX_BISECTION_ITERATIONS = 25;
12
- const CONTRAST_COMBINATIONS = [
12
+ var CONTRAST_EPSILON = 4e-3;
13
+ var MAX_BISECTION_ITERATIONS = 10;
14
+ var CONTRAST_COMBINATIONS = [
13
15
  {
14
16
  bgs: ["surface1", "surface2", "surface3"],
15
17
  fgs: ["fgSurface3", "fgSurface4"],
@@ -41,11 +43,12 @@ const CONTRAST_COMBINATIONS = [
41
43
  target: 3
42
44
  }
43
45
  ];
44
- const DEFAULT_SEED_COLORS = {
46
+ var DEFAULT_SEED_COLORS = {
45
47
  bg: "#f8f8f8",
46
48
  primary: "#3858e9",
47
49
  info: "#0090ff",
48
50
  success: "#4ab866",
51
+ caution: "#f0d149",
49
52
  warning: "#f0b849",
50
53
  error: "#cc1818"
51
54
  };
@@ -53,8 +56,8 @@ export {
53
56
  ACCENT_SCALE_BASE_LIGHTNESS_THRESHOLDS,
54
57
  BLACK,
55
58
  CONTRAST_COMBINATIONS,
59
+ CONTRAST_EPSILON,
56
60
  DEFAULT_SEED_COLORS,
57
- LIGHTNESS_EPSILON,
58
61
  MAX_BISECTION_ITERATIONS,
59
62
  UNIVERSAL_CONTRAST_TOPUP,
60
63
  WHITE,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/color-ramps/lib/constants.ts"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport Color from 'colorjs.io';\n\n/**\n * Internal dependencies\n */\nimport type { Ramp } from './types';\n\nexport const WHITE = new Color( '#fff' ).to( 'oklch' );\nexport const BLACK = new Color( '#000' ).to( 'oklch' );\n\n// Margin added to target contrasts to counter for algorithm approximations\n// and rounding errors.\nexport const UNIVERSAL_CONTRAST_TOPUP = 0.05;\n\n// When enabling \"lighter direction\" bias, this is the amount by which\n// black text contrast needs to be greater than white text contrast.\n// The higher the value, the stronger the preference for white text.\n// The current value has been determined empirically as the highest value\n// that won't cause the algo not to be able to correctly solve all contrasts.\nexport const WHITE_TEXT_CONTRAST_MARGIN = 3.1;\n\n// These values are used as thresholds when trying to match the background\n// ramp's lightness while calculating an accent ramp. They prevent the accent\n// scale from being pinned to lightness values in the middle of the range,\n// which would cause the algorithm to struggle to satisfy the accent scale\n// constraints and therefore produce unexpected results.\nexport const ACCENT_SCALE_BASE_LIGHTNESS_THRESHOLDS = {\n\tlighter: { min: 0.2, max: 0.4 },\n\tdarker: { min: 0.75, max: 0.98 },\n} as const;\n\n// Minimum lightness difference noticed by the algorithm.\nexport const LIGHTNESS_EPSILON = 1e-3;\n\nexport const MAX_BISECTION_ITERATIONS = 25;\n\nexport const CONTRAST_COMBINATIONS: {\n\tbgs: ( keyof Ramp )[];\n\tfgs: ( keyof Ramp )[];\n\ttarget: number;\n}[] = [\n\t{\n\t\tbgs: [ 'surface1', 'surface2', 'surface3' ],\n\t\tfgs: [ 'fgSurface3', 'fgSurface4' ],\n\t\ttarget: 4.5,\n\t},\n\t{\n\t\tbgs: [ 'surface4', 'surface5' ],\n\t\tfgs: [ 'fgSurface4' ],\n\t\ttarget: 4.5,\n\t},\n\t{\n\t\tbgs: [ 'bgFill1' ],\n\t\tfgs: [ 'fgFill' ],\n\t\ttarget: 4.5,\n\t},\n\t{\n\t\tbgs: [ 'bgFillInverted1' ],\n\t\tfgs: [ 'fgFillInverted' ],\n\t\ttarget: 4.5,\n\t},\n\t{\n\t\tbgs: [ 'bgFillInverted1' ],\n\t\tfgs: [ 'fgFillInverted' ],\n\t\ttarget: 4.5,\n\t},\n\t{\n\t\tbgs: [ 'surface1', 'surface2', 'surface3' ],\n\t\tfgs: [ 'stroke3' ],\n\t\ttarget: 3,\n\t},\n];\n\n// Used when generating the DTCG tokens and the static color ramps.\nexport const DEFAULT_SEED_COLORS = {\n\tbg: '#f8f8f8',\n\tprimary: '#3858e9',\n\tinfo: '#0090ff',\n\tsuccess: '#4ab866',\n\twarning: '#f0b849',\n\terror: '#cc1818',\n};\n"],
5
- "mappings": "AAGA,OAAO,WAAW;AAOX,MAAM,QAAQ,IAAI,MAAO,MAAO,EAAE,GAAI,OAAQ;AAC9C,MAAM,QAAQ,IAAI,MAAO,MAAO,EAAE,GAAI,OAAQ;AAI9C,MAAM,2BAA2B;AAOjC,MAAM,6BAA6B;AAOnC,MAAM,yCAAyC;AAAA,EACrD,SAAS,EAAE,KAAK,KAAK,KAAK,IAAI;AAAA,EAC9B,QAAQ,EAAE,KAAK,MAAM,KAAK,KAAK;AAChC;AAGO,MAAM,oBAAoB;AAE1B,MAAM,2BAA2B;AAEjC,MAAM,wBAIP;AAAA,EACL;AAAA,IACC,KAAK,CAAE,YAAY,YAAY,UAAW;AAAA,IAC1C,KAAK,CAAE,cAAc,YAAa;AAAA,IAClC,QAAQ;AAAA,EACT;AAAA,EACA;AAAA,IACC,KAAK,CAAE,YAAY,UAAW;AAAA,IAC9B,KAAK,CAAE,YAAa;AAAA,IACpB,QAAQ;AAAA,EACT;AAAA,EACA;AAAA,IACC,KAAK,CAAE,SAAU;AAAA,IACjB,KAAK,CAAE,QAAS;AAAA,IAChB,QAAQ;AAAA,EACT;AAAA,EACA;AAAA,IACC,KAAK,CAAE,iBAAkB;AAAA,IACzB,KAAK,CAAE,gBAAiB;AAAA,IACxB,QAAQ;AAAA,EACT;AAAA,EACA;AAAA,IACC,KAAK,CAAE,iBAAkB;AAAA,IACzB,KAAK,CAAE,gBAAiB;AAAA,IACxB,QAAQ;AAAA,EACT;AAAA,EACA;AAAA,IACC,KAAK,CAAE,YAAY,YAAY,UAAW;AAAA,IAC1C,KAAK,CAAE,SAAU;AAAA,IACjB,QAAQ;AAAA,EACT;AACD;AAGO,MAAM,sBAAsB;AAAA,EAClC,IAAI;AAAA,EACJ,SAAS;AAAA,EACT,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AACR;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport { to, OKLCH } from 'colorjs.io/fn';\n\n/**\n * Internal dependencies\n */\nimport './register-color-spaces';\nimport type { Ramp } from './types';\n\nexport const WHITE = to( 'white', OKLCH );\nexport const BLACK = to( 'black', OKLCH );\n\n// Margin added to target contrasts to counter for algorithm approximations and rounding errors.\n// - the `CONTRAST_EPSILON` value is 0.004, so the real contrast can be lower by this amount.\n// - the max contrast between adjacent RGB values is 1.016, so half of the difference (0.008) can be rounding error.\n// - the sum is 0.012: the margin we add to ensure that the target contrast is met after all the rounding.\nexport const UNIVERSAL_CONTRAST_TOPUP = 0.012;\n\n// When enabling \"lighter direction\" bias, this is the amount by which\n// black text contrast needs to be greater than white text contrast.\n// The higher the value, the stronger the preference for white text.\n// The current value has been determined empirically as the highest value\n// that won't cause the algo not to be able to correctly solve all contrasts.\nexport const WHITE_TEXT_CONTRAST_MARGIN = 3.1;\n\n// These values are used as thresholds when trying to match the background\n// ramp's lightness while calculating an accent ramp. They prevent the accent\n// scale from being pinned to lightness values in the middle of the range,\n// which would cause the algorithm to struggle to satisfy the accent scale\n// constraints and therefore produce unexpected results.\nexport const ACCENT_SCALE_BASE_LIGHTNESS_THRESHOLDS = {\n\tlighter: { min: 0.2, max: 0.4 },\n\tdarker: { min: 0.75, max: 0.98 },\n} as const;\n\n// Contrast precision we aim for. Approximately 1/256, resolution of an 8-bit number.\nexport const CONTRAST_EPSILON = 4e-3;\n\nexport const MAX_BISECTION_ITERATIONS = 10;\n\nexport const CONTRAST_COMBINATIONS: {\n\tbgs: ( keyof Ramp )[];\n\tfgs: ( keyof Ramp )[];\n\ttarget: number;\n}[] = [\n\t{\n\t\tbgs: [ 'surface1', 'surface2', 'surface3' ],\n\t\tfgs: [ 'fgSurface3', 'fgSurface4' ],\n\t\ttarget: 4.5,\n\t},\n\t{\n\t\tbgs: [ 'surface4', 'surface5' ],\n\t\tfgs: [ 'fgSurface4' ],\n\t\ttarget: 4.5,\n\t},\n\t{\n\t\tbgs: [ 'bgFill1' ],\n\t\tfgs: [ 'fgFill' ],\n\t\ttarget: 4.5,\n\t},\n\t{\n\t\tbgs: [ 'bgFillInverted1' ],\n\t\tfgs: [ 'fgFillInverted' ],\n\t\ttarget: 4.5,\n\t},\n\t{\n\t\tbgs: [ 'bgFillInverted1' ],\n\t\tfgs: [ 'fgFillInverted' ],\n\t\ttarget: 4.5,\n\t},\n\t{\n\t\tbgs: [ 'surface1', 'surface2', 'surface3' ],\n\t\tfgs: [ 'stroke3' ],\n\t\ttarget: 3,\n\t},\n];\n\n// Used when generating the DTCG tokens and the static color ramps.\nexport const DEFAULT_SEED_COLORS = {\n\tbg: '#f8f8f8',\n\tprimary: '#3858e9',\n\tinfo: '#0090ff',\n\tsuccess: '#4ab866',\n\tcaution: '#f0d149',\n\twarning: '#f0b849',\n\terror: '#cc1818',\n};\n"],
5
+ "mappings": ";AAGA,SAAS,IAAI,aAAa;AAK1B,OAAO;AAGA,IAAM,QAAQ,GAAI,SAAS,KAAM;AACjC,IAAM,QAAQ,GAAI,SAAS,KAAM;AAMjC,IAAM,2BAA2B;AAOjC,IAAM,6BAA6B;AAOnC,IAAM,yCAAyC;AAAA,EACrD,SAAS,EAAE,KAAK,KAAK,KAAK,IAAI;AAAA,EAC9B,QAAQ,EAAE,KAAK,MAAM,KAAK,KAAK;AAChC;AAGO,IAAM,mBAAmB;AAEzB,IAAM,2BAA2B;AAEjC,IAAM,wBAIP;AAAA,EACL;AAAA,IACC,KAAK,CAAE,YAAY,YAAY,UAAW;AAAA,IAC1C,KAAK,CAAE,cAAc,YAAa;AAAA,IAClC,QAAQ;AAAA,EACT;AAAA,EACA;AAAA,IACC,KAAK,CAAE,YAAY,UAAW;AAAA,IAC9B,KAAK,CAAE,YAAa;AAAA,IACpB,QAAQ;AAAA,EACT;AAAA,EACA;AAAA,IACC,KAAK,CAAE,SAAU;AAAA,IACjB,KAAK,CAAE,QAAS;AAAA,IAChB,QAAQ;AAAA,EACT;AAAA,EACA;AAAA,IACC,KAAK,CAAE,iBAAkB;AAAA,IACzB,KAAK,CAAE,gBAAiB;AAAA,IACxB,QAAQ;AAAA,EACT;AAAA,EACA;AAAA,IACC,KAAK,CAAE,iBAAkB;AAAA,IACzB,KAAK,CAAE,gBAAiB;AAAA,IACxB,QAAQ;AAAA,EACT;AAAA,EACA;AAAA,IACC,KAAK,CAAE,YAAY,YAAY,UAAW;AAAA,IAC1C,KAAK,CAAE,SAAU;AAAA,IACjB,QAAQ;AAAA,EACT;AACD;AAGO,IAAM,sBAAsB;AAAA,EAClC,IAAI;AAAA,EACJ,SAAS;AAAA,EACT,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AACR;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,196 @@
1
+ // packages/theme/src/color-ramps/lib/default-ramps.ts
2
+ var DEFAULT_RAMPS = {
3
+ bg: {
4
+ ramp: {
5
+ surface2: { color: "#f8f8f8", warning: false },
6
+ bgFill1: { color: "#555", warning: false },
7
+ fgFill: { color: "#f0f0f0", warning: false },
8
+ bgFill2: { color: "#494949", warning: false },
9
+ surface6: { color: "#d3d3d3", warning: false },
10
+ surface5: { color: "#e3e3e3", warning: false },
11
+ surface4: { color: "#eaeaea", warning: false },
12
+ surface3: { color: "#fff", warning: false },
13
+ fgSurface4: { color: "#1e1e1e", warning: false },
14
+ fgSurface3: { color: "#6e6e6e", warning: false },
15
+ fgSurface2: { color: "#8b8b8b", warning: false },
16
+ fgSurface1: { color: "#ababab", warning: false },
17
+ stroke3: { color: "#8b8b8b", warning: false },
18
+ stroke4: { color: "#6d6d6d", warning: false },
19
+ stroke2: { color: "#adadad", warning: false },
20
+ stroke1: { color: "#cfcfcf", warning: false },
21
+ bgFillDark: { color: "#1e1e1e", warning: false },
22
+ fgFillDark: { color: "#f0f0f0", warning: false },
23
+ bgFillInverted2: { color: "#1e1e1e", warning: false },
24
+ bgFillInverted1: { color: "#2d2d2d", warning: false },
25
+ fgFillInverted: { color: "#f0f0f0", warning: false },
26
+ surface1: { color: "#f0f0f0", warning: false }
27
+ },
28
+ direction: "darker"
29
+ },
30
+ primary: {
31
+ ramp: {
32
+ bgFill1: { color: "#3858e9", warning: false },
33
+ fgFill: { color: "#eff0f2", warning: false },
34
+ bgFill2: { color: "#2e49da", warning: false },
35
+ surface2: { color: "#f6f8fc", warning: false },
36
+ surface6: { color: "#c7d3ef", warning: false },
37
+ surface5: { color: "#dce3f5", warning: false },
38
+ surface4: { color: "#e5ebf7", warning: false },
39
+ surface3: { color: "#fff", warning: false },
40
+ fgSurface4: { color: "#080071", warning: false },
41
+ fgSurface3: { color: "#3858e9", warning: false },
42
+ fgSurface2: { color: "#5881ff", warning: false },
43
+ fgSurface1: { color: "#84a9ff", warning: false },
44
+ stroke3: { color: "#3858e9", warning: false },
45
+ stroke4: { color: "#2337c8", warning: false },
46
+ stroke2: { color: "#6d83bf", warning: false },
47
+ stroke1: { color: "#91a2cf", warning: false },
48
+ bgFillDark: { color: "#1b1e26", warning: false },
49
+ fgFillDark: { color: "#eff0f2", warning: false },
50
+ bgFillInverted2: { color: "#1b1e26", warning: false },
51
+ bgFillInverted1: { color: "#12009f", warning: false },
52
+ fgFillInverted: { color: "#eff0f2", warning: false },
53
+ surface1: { color: "#edf0fa", warning: false }
54
+ },
55
+ direction: "darker"
56
+ },
57
+ info: {
58
+ ramp: {
59
+ bgFill1: { color: "#0090ff", warning: false },
60
+ fgFill: { color: "#1b1e23", warning: false },
61
+ bgFill2: { color: "#0081ef", warning: false },
62
+ surface2: { color: "#f5f9fd", warning: false },
63
+ surface6: { color: "#bed6f1", warning: false },
64
+ surface5: { color: "#d5e5f6", warning: false },
65
+ surface4: { color: "#e0ebf8", warning: false },
66
+ surface3: { color: "#fff", warning: false },
67
+ fgSurface4: { color: "#001758", warning: false },
68
+ fgSurface3: { color: "#006dd9", warning: false },
69
+ fgSurface2: { color: "#008cfb", warning: false },
70
+ fgSurface1: { color: "#53b1ff", warning: false },
71
+ stroke3: { color: "#006dd9", warning: false },
72
+ stroke4: { color: "#004eb8", warning: false },
73
+ stroke2: { color: "#5d8fc6", warning: false },
74
+ stroke1: { color: "#8aaed6", warning: false },
75
+ bgFillDark: { color: "#1b1e23", warning: false },
76
+ fgFillDark: { color: "#eff0f2", warning: false },
77
+ bgFillInverted2: { color: "#1b1e23", warning: false },
78
+ bgFillInverted1: { color: "#002675", warning: false },
79
+ fgFillInverted: { color: "#eff0f2", warning: false },
80
+ surface1: { color: "#eaf1fa", warning: false }
81
+ },
82
+ direction: "darker"
83
+ },
84
+ success: {
85
+ ramp: {
86
+ bgFill1: { color: "#4ab866", warning: false },
87
+ fgFill: { color: "#1b1f1c", warning: false },
88
+ bgFill2: { color: "#37a857", warning: false },
89
+ surface2: { color: "#f0fcf2", warning: false },
90
+ surface6: { color: "#7eea95", warning: false },
91
+ surface5: { color: "#b7f2c1", warning: false },
92
+ surface4: { color: "#cdf5d3", warning: false },
93
+ surface3: { color: "#fff", warning: false },
94
+ fgSurface4: { color: "#002b00", warning: false },
95
+ fgSurface3: { color: "#008031", warning: false },
96
+ fgSurface2: { color: "#2c9f4e", warning: false },
97
+ fgSurface1: { color: "#54c16f", warning: false },
98
+ stroke3: { color: "#008031", warning: false },
99
+ stroke4: { color: "#006314", warning: false },
100
+ stroke2: { color: "#61986b", warning: false },
101
+ stroke1: { color: "#77ba84", warning: false },
102
+ bgFillDark: { color: "#1b1f1c", warning: false },
103
+ fgFillDark: { color: "#edf2ed", warning: false },
104
+ bgFillInverted2: { color: "#1b1f1c", warning: false },
105
+ bgFillInverted1: { color: "#003800", warning: false },
106
+ fgFillInverted: { color: "#edf2ed", warning: false },
107
+ surface1: { color: "#ddf8e1", warning: false }
108
+ },
109
+ direction: "darker"
110
+ },
111
+ caution: {
112
+ ramp: {
113
+ bgFill1: { color: "#f0d149", warning: false },
114
+ fgFill: { color: "#1f1e1b", warning: false },
115
+ bgFill2: { color: "#ddbe30", warning: false },
116
+ surface2: { color: "#fdf9e7", warning: false },
117
+ surface6: { color: "#ecd367", warning: false },
118
+ surface5: { color: "#f5e399", warning: false },
119
+ surface4: { color: "#f8ebb5", warning: false },
120
+ surface3: { color: "#fff", warning: false },
121
+ fgSurface4: { color: "#291d00", warning: false },
122
+ fgSurface3: { color: "#876b00", warning: false },
123
+ fgSurface2: { color: "#a78900", warning: false },
124
+ fgSurface1: { color: "#c9aa00", warning: false },
125
+ stroke3: { color: "#876b00", warning: false },
126
+ stroke4: { color: "#675000", warning: false },
127
+ stroke2: { color: "#978c60", warning: false },
128
+ stroke1: { color: "#b8ab75", warning: false },
129
+ bgFillDark: { color: "#1f1e1b", warning: false },
130
+ fgFillDark: { color: "#f6f1da", warning: false },
131
+ bgFillInverted2: { color: "#1f1e1b", warning: false },
132
+ bgFillInverted1: { color: "#3a2b00", warning: false },
133
+ fgFillInverted: { color: "#f6f1da", warning: false },
134
+ surface1: { color: "#faf1cd", warning: false }
135
+ },
136
+ direction: "darker"
137
+ },
138
+ warning: {
139
+ ramp: {
140
+ bgFill1: { color: "#f0b849", warning: false },
141
+ fgFill: { color: "#1f1e1b", warning: false },
142
+ bgFill2: { color: "#dea633", warning: false },
143
+ surface2: { color: "#fdf7ee", warning: false },
144
+ surface6: { color: "#f1ce90", warning: false },
145
+ surface5: { color: "#f6e0bb", warning: false },
146
+ surface4: { color: "#f8e9cd", warning: false },
147
+ surface3: { color: "#fff", warning: false },
148
+ fgSurface4: { color: "#2f1800", warning: false },
149
+ fgSurface3: { color: "#976300", warning: false },
150
+ fgSurface2: { color: "#b78100", warning: false },
151
+ fgSurface1: { color: "#d9a22e", warning: false },
152
+ stroke3: { color: "#976300", warning: false },
153
+ stroke4: { color: "#754900", warning: false },
154
+ stroke2: { color: "#9f8860", warning: false },
155
+ stroke1: { color: "#c2a776", warning: false },
156
+ bgFillDark: { color: "#1f1e1b", warning: false },
157
+ fgFillDark: { color: "#f3f0e9", warning: false },
158
+ bgFillInverted2: { color: "#1f1e1b", warning: false },
159
+ bgFillInverted1: { color: "#432600", warning: false },
160
+ fgFillInverted: { color: "#f3f0e9", warning: false },
161
+ surface1: { color: "#faefdc", warning: false }
162
+ },
163
+ direction: "darker"
164
+ },
165
+ error: {
166
+ ramp: {
167
+ bgFill1: { color: "#cc1818", warning: false },
168
+ fgFill: { color: "#f2efef", warning: false },
169
+ bgFill2: { color: "#bc0001", warning: false },
170
+ surface2: { color: "#fdf6f5", warning: false },
171
+ surface6: { color: "#f5c9c2", warning: false },
172
+ surface5: { color: "#f9dcd8", warning: false },
173
+ surface4: { color: "#fae5e2", warning: false },
174
+ surface3: { color: "#fff", warning: false },
175
+ fgSurface4: { color: "#4a0000", warning: false },
176
+ fgSurface3: { color: "#cc1818", warning: false },
177
+ fgSurface2: { color: "#f84d41", warning: false },
178
+ fgSurface1: { color: "#ff8373", warning: false },
179
+ stroke3: { color: "#cc1818", warning: false },
180
+ stroke4: { color: "#a70000", warning: false },
181
+ stroke2: { color: "#ca675c", warning: false },
182
+ stroke1: { color: "#dc8e83", warning: false },
183
+ bgFillDark: { color: "#231c1b", warning: false },
184
+ fgFillDark: { color: "#f2efef", warning: false },
185
+ bgFillInverted2: { color: "#231c1b", warning: false },
186
+ bgFillInverted1: { color: "#680000", warning: false },
187
+ fgFillInverted: { color: "#f2efef", warning: false },
188
+ surface1: { color: "#fcedea", warning: false }
189
+ },
190
+ direction: "darker"
191
+ }
192
+ };
193
+ export {
194
+ DEFAULT_RAMPS
195
+ };
196
+ //# sourceMappingURL=default-ramps.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/color-ramps/lib/default-ramps.ts"],
4
+ "sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { RampResult } from './types';\nimport type { DEFAULT_SEED_COLORS } from './constants';\n\nexport const DEFAULT_RAMPS: Record<\n\tkeyof typeof DEFAULT_SEED_COLORS,\n\tRampResult\n> = {\n\tbg: {\n\t\tramp: {\n\t\t\tsurface2: { color: '#f8f8f8', warning: false },\n\t\t\tbgFill1: { color: '#555', warning: false },\n\t\t\tfgFill: { color: '#f0f0f0', warning: false },\n\t\t\tbgFill2: { color: '#494949', warning: false },\n\t\t\tsurface6: { color: '#d3d3d3', warning: false },\n\t\t\tsurface5: { color: '#e3e3e3', warning: false },\n\t\t\tsurface4: { color: '#eaeaea', warning: false },\n\t\t\tsurface3: { color: '#fff', warning: false },\n\t\t\tfgSurface4: { color: '#1e1e1e', warning: false },\n\t\t\tfgSurface3: { color: '#6e6e6e', warning: false },\n\t\t\tfgSurface2: { color: '#8b8b8b', warning: false },\n\t\t\tfgSurface1: { color: '#ababab', warning: false },\n\t\t\tstroke3: { color: '#8b8b8b', warning: false },\n\t\t\tstroke4: { color: '#6d6d6d', warning: false },\n\t\t\tstroke2: { color: '#adadad', warning: false },\n\t\t\tstroke1: { color: '#cfcfcf', warning: false },\n\t\t\tbgFillDark: { color: '#1e1e1e', warning: false },\n\t\t\tfgFillDark: { color: '#f0f0f0', warning: false },\n\t\t\tbgFillInverted2: { color: '#1e1e1e', warning: false },\n\t\t\tbgFillInverted1: { color: '#2d2d2d', warning: false },\n\t\t\tfgFillInverted: { color: '#f0f0f0', warning: false },\n\t\t\tsurface1: { color: '#f0f0f0', warning: false },\n\t\t},\n\t\tdirection: 'darker',\n\t},\n\tprimary: {\n\t\tramp: {\n\t\t\tbgFill1: { color: '#3858e9', warning: false },\n\t\t\tfgFill: { color: '#eff0f2', warning: false },\n\t\t\tbgFill2: { color: '#2e49da', warning: false },\n\t\t\tsurface2: { color: '#f6f8fc', warning: false },\n\t\t\tsurface6: { color: '#c7d3ef', warning: false },\n\t\t\tsurface5: { color: '#dce3f5', warning: false },\n\t\t\tsurface4: { color: '#e5ebf7', warning: false },\n\t\t\tsurface3: { color: '#fff', warning: false },\n\t\t\tfgSurface4: { color: '#080071', warning: false },\n\t\t\tfgSurface3: { color: '#3858e9', warning: false },\n\t\t\tfgSurface2: { color: '#5881ff', warning: false },\n\t\t\tfgSurface1: { color: '#84a9ff', warning: false },\n\t\t\tstroke3: { color: '#3858e9', warning: false },\n\t\t\tstroke4: { color: '#2337c8', warning: false },\n\t\t\tstroke2: { color: '#6d83bf', warning: false },\n\t\t\tstroke1: { color: '#91a2cf', warning: false },\n\t\t\tbgFillDark: { color: '#1b1e26', warning: false },\n\t\t\tfgFillDark: { color: '#eff0f2', warning: false },\n\t\t\tbgFillInverted2: { color: '#1b1e26', warning: false },\n\t\t\tbgFillInverted1: { color: '#12009f', warning: false },\n\t\t\tfgFillInverted: { color: '#eff0f2', warning: false },\n\t\t\tsurface1: { color: '#edf0fa', warning: false },\n\t\t},\n\t\tdirection: 'darker',\n\t},\n\tinfo: {\n\t\tramp: {\n\t\t\tbgFill1: { color: '#0090ff', warning: false },\n\t\t\tfgFill: { color: '#1b1e23', warning: false },\n\t\t\tbgFill2: { color: '#0081ef', warning: false },\n\t\t\tsurface2: { color: '#f5f9fd', warning: false },\n\t\t\tsurface6: { color: '#bed6f1', warning: false },\n\t\t\tsurface5: { color: '#d5e5f6', warning: false },\n\t\t\tsurface4: { color: '#e0ebf8', warning: false },\n\t\t\tsurface3: { color: '#fff', warning: false },\n\t\t\tfgSurface4: { color: '#001758', warning: false },\n\t\t\tfgSurface3: { color: '#006dd9', warning: false },\n\t\t\tfgSurface2: { color: '#008cfb', warning: false },\n\t\t\tfgSurface1: { color: '#53b1ff', warning: false },\n\t\t\tstroke3: { color: '#006dd9', warning: false },\n\t\t\tstroke4: { color: '#004eb8', warning: false },\n\t\t\tstroke2: { color: '#5d8fc6', warning: false },\n\t\t\tstroke1: { color: '#8aaed6', warning: false },\n\t\t\tbgFillDark: { color: '#1b1e23', warning: false },\n\t\t\tfgFillDark: { color: '#eff0f2', warning: false },\n\t\t\tbgFillInverted2: { color: '#1b1e23', warning: false },\n\t\t\tbgFillInverted1: { color: '#002675', warning: false },\n\t\t\tfgFillInverted: { color: '#eff0f2', warning: false },\n\t\t\tsurface1: { color: '#eaf1fa', warning: false },\n\t\t},\n\t\tdirection: 'darker',\n\t},\n\tsuccess: {\n\t\tramp: {\n\t\t\tbgFill1: { color: '#4ab866', warning: false },\n\t\t\tfgFill: { color: '#1b1f1c', warning: false },\n\t\t\tbgFill2: { color: '#37a857', warning: false },\n\t\t\tsurface2: { color: '#f0fcf2', warning: false },\n\t\t\tsurface6: { color: '#7eea95', warning: false },\n\t\t\tsurface5: { color: '#b7f2c1', warning: false },\n\t\t\tsurface4: { color: '#cdf5d3', warning: false },\n\t\t\tsurface3: { color: '#fff', warning: false },\n\t\t\tfgSurface4: { color: '#002b00', warning: false },\n\t\t\tfgSurface3: { color: '#008031', warning: false },\n\t\t\tfgSurface2: { color: '#2c9f4e', warning: false },\n\t\t\tfgSurface1: { color: '#54c16f', warning: false },\n\t\t\tstroke3: { color: '#008031', warning: false },\n\t\t\tstroke4: { color: '#006314', warning: false },\n\t\t\tstroke2: { color: '#61986b', warning: false },\n\t\t\tstroke1: { color: '#77ba84', warning: false },\n\t\t\tbgFillDark: { color: '#1b1f1c', warning: false },\n\t\t\tfgFillDark: { color: '#edf2ed', warning: false },\n\t\t\tbgFillInverted2: { color: '#1b1f1c', warning: false },\n\t\t\tbgFillInverted1: { color: '#003800', warning: false },\n\t\t\tfgFillInverted: { color: '#edf2ed', warning: false },\n\t\t\tsurface1: { color: '#ddf8e1', warning: false },\n\t\t},\n\t\tdirection: 'darker',\n\t},\n\tcaution: {\n\t\tramp: {\n\t\t\tbgFill1: { color: '#f0d149', warning: false },\n\t\t\tfgFill: { color: '#1f1e1b', warning: false },\n\t\t\tbgFill2: { color: '#ddbe30', warning: false },\n\t\t\tsurface2: { color: '#fdf9e7', warning: false },\n\t\t\tsurface6: { color: '#ecd367', warning: false },\n\t\t\tsurface5: { color: '#f5e399', warning: false },\n\t\t\tsurface4: { color: '#f8ebb5', warning: false },\n\t\t\tsurface3: { color: '#fff', warning: false },\n\t\t\tfgSurface4: { color: '#291d00', warning: false },\n\t\t\tfgSurface3: { color: '#876b00', warning: false },\n\t\t\tfgSurface2: { color: '#a78900', warning: false },\n\t\t\tfgSurface1: { color: '#c9aa00', warning: false },\n\t\t\tstroke3: { color: '#876b00', warning: false },\n\t\t\tstroke4: { color: '#675000', warning: false },\n\t\t\tstroke2: { color: '#978c60', warning: false },\n\t\t\tstroke1: { color: '#b8ab75', warning: false },\n\t\t\tbgFillDark: { color: '#1f1e1b', warning: false },\n\t\t\tfgFillDark: { color: '#f6f1da', warning: false },\n\t\t\tbgFillInverted2: { color: '#1f1e1b', warning: false },\n\t\t\tbgFillInverted1: { color: '#3a2b00', warning: false },\n\t\t\tfgFillInverted: { color: '#f6f1da', warning: false },\n\t\t\tsurface1: { color: '#faf1cd', warning: false },\n\t\t},\n\t\tdirection: 'darker',\n\t},\n\twarning: {\n\t\tramp: {\n\t\t\tbgFill1: { color: '#f0b849', warning: false },\n\t\t\tfgFill: { color: '#1f1e1b', warning: false },\n\t\t\tbgFill2: { color: '#dea633', warning: false },\n\t\t\tsurface2: { color: '#fdf7ee', warning: false },\n\t\t\tsurface6: { color: '#f1ce90', warning: false },\n\t\t\tsurface5: { color: '#f6e0bb', warning: false },\n\t\t\tsurface4: { color: '#f8e9cd', warning: false },\n\t\t\tsurface3: { color: '#fff', warning: false },\n\t\t\tfgSurface4: { color: '#2f1800', warning: false },\n\t\t\tfgSurface3: { color: '#976300', warning: false },\n\t\t\tfgSurface2: { color: '#b78100', warning: false },\n\t\t\tfgSurface1: { color: '#d9a22e', warning: false },\n\t\t\tstroke3: { color: '#976300', warning: false },\n\t\t\tstroke4: { color: '#754900', warning: false },\n\t\t\tstroke2: { color: '#9f8860', warning: false },\n\t\t\tstroke1: { color: '#c2a776', warning: false },\n\t\t\tbgFillDark: { color: '#1f1e1b', warning: false },\n\t\t\tfgFillDark: { color: '#f3f0e9', warning: false },\n\t\t\tbgFillInverted2: { color: '#1f1e1b', warning: false },\n\t\t\tbgFillInverted1: { color: '#432600', warning: false },\n\t\t\tfgFillInverted: { color: '#f3f0e9', warning: false },\n\t\t\tsurface1: { color: '#faefdc', warning: false },\n\t\t},\n\t\tdirection: 'darker',\n\t},\n\terror: {\n\t\tramp: {\n\t\t\tbgFill1: { color: '#cc1818', warning: false },\n\t\t\tfgFill: { color: '#f2efef', warning: false },\n\t\t\tbgFill2: { color: '#bc0001', warning: false },\n\t\t\tsurface2: { color: '#fdf6f5', warning: false },\n\t\t\tsurface6: { color: '#f5c9c2', warning: false },\n\t\t\tsurface5: { color: '#f9dcd8', warning: false },\n\t\t\tsurface4: { color: '#fae5e2', warning: false },\n\t\t\tsurface3: { color: '#fff', warning: false },\n\t\t\tfgSurface4: { color: '#4a0000', warning: false },\n\t\t\tfgSurface3: { color: '#cc1818', warning: false },\n\t\t\tfgSurface2: { color: '#f84d41', warning: false },\n\t\t\tfgSurface1: { color: '#ff8373', warning: false },\n\t\t\tstroke3: { color: '#cc1818', warning: false },\n\t\t\tstroke4: { color: '#a70000', warning: false },\n\t\t\tstroke2: { color: '#ca675c', warning: false },\n\t\t\tstroke1: { color: '#dc8e83', warning: false },\n\t\t\tbgFillDark: { color: '#231c1b', warning: false },\n\t\t\tfgFillDark: { color: '#f2efef', warning: false },\n\t\t\tbgFillInverted2: { color: '#231c1b', warning: false },\n\t\t\tbgFillInverted1: { color: '#680000', warning: false },\n\t\t\tfgFillInverted: { color: '#f2efef', warning: false },\n\t\t\tsurface1: { color: '#fcedea', warning: false },\n\t\t},\n\t\tdirection: 'darker',\n\t},\n};\n"],
5
+ "mappings": ";AAMO,IAAM,gBAGT;AAAA,EACH,IAAI;AAAA,IACH,MAAM;AAAA,MACL,UAAU,EAAE,OAAO,WAAW,SAAS,MAAM;AAAA,MAC7C,SAAS,EAAE,OAAO,QAAQ,SAAS,MAAM;AAAA,MACzC,QAAQ,EAAE,OAAO,WAAW,SAAS,MAAM;AAAA,MAC3C,SAAS,EAAE,OAAO,WAAW,SAAS,MAAM;AAAA,MAC5C,UAAU,EAAE,OAAO,WAAW,SAAS,MAAM;AAAA,MAC7C,UAAU,EAAE,OAAO,WAAW,SAAS,MAAM;AAAA,MAC7C,UAAU,EAAE,OAAO,WAAW,SAAS,MAAM;AAAA,MAC7C,UAAU,EAAE,OAAO,QAAQ,SAAS,MAAM;AAAA,MAC1C,Y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