@arbor-css/core 0.0.108 → 0.0.111

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 (184) hide show
  1. package/dist/cli/introspection.test.js +3 -3
  2. package/dist/cli/introspection.test.js.map +1 -1
  3. package/dist/cli/run.js +15 -6
  4. package/dist/cli/run.js.map +1 -1
  5. package/dist/cli/validate.test.js +3 -3
  6. package/dist/cli/validate.test.js.map +1 -1
  7. package/dist/getStructuredTokensMap.test.js +1 -1
  8. package/dist/getStructuredTokensMap.test.js.map +1 -1
  9. package/dist/index.d.ts +3 -2
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +3 -2
  12. package/dist/index.js.map +1 -1
  13. package/dist/presets/arborPreset/modeSchema/global.d.ts +119 -31
  14. package/dist/presets/arborPreset/modeSchema/global.d.ts.map +1 -1
  15. package/dist/presets/arborPreset/modeSchema/global.js +117 -31
  16. package/dist/presets/arborPreset/modeSchema/global.js.map +1 -1
  17. package/dist/presets/arborPreset/modeSchema/intents/action.d.ts +3 -3
  18. package/dist/presets/arborPreset/modeSchema/intents/common.d.ts +1 -1
  19. package/dist/presets/arborPreset/modeSchema/intents/common.js +1 -1
  20. package/dist/presets/arborPreset/modeSchema/intents/common.js.map +1 -1
  21. package/dist/presets/arborPreset/modeSchema/intents/control.d.ts +1 -1
  22. package/dist/presets/arborPreset/modeSchema/intents/surface.d.ts +3 -3
  23. package/dist/presets/arborPreset/modeSchema/modeSchema.d.ts +124 -38
  24. package/dist/presets/arborPreset/modeSchema/modeSchema.d.ts.map +1 -1
  25. package/dist/presets/arborPreset/modeValues/color/color.d.ts +15 -23
  26. package/dist/presets/arborPreset/modeValues/color/color.d.ts.map +1 -1
  27. package/dist/presets/arborPreset/modeValues/color/color.js +4 -12
  28. package/dist/presets/arborPreset/modeValues/color/color.js.map +1 -1
  29. package/dist/presets/arborPreset/modeValues/color/compile.d.ts +5 -9
  30. package/dist/presets/arborPreset/modeValues/color/compile.d.ts.map +1 -1
  31. package/dist/presets/arborPreset/modeValues/color/compile.js +4 -4
  32. package/dist/presets/arborPreset/modeValues/color/compile.js.map +1 -1
  33. package/dist/presets/arborPreset/modeValues/color/compile.test.js +43 -40
  34. package/dist/presets/arborPreset/modeValues/color/compile.test.js.map +1 -1
  35. package/dist/presets/arborPreset/modeValues/color/ranges.d.ts +12 -12
  36. package/dist/presets/arborPreset/modeValues/color/ranges.d.ts.map +1 -1
  37. package/dist/presets/arborPreset/modeValues/color/ranges.js +9 -7
  38. package/dist/presets/arborPreset/modeValues/color/ranges.js.map +1 -1
  39. package/dist/presets/arborPreset/modeValues/intents.d.ts +45 -45
  40. package/dist/presets/arborPreset/modeValues/intents.d.ts.map +1 -1
  41. package/dist/presets/arborPreset/modeValues/intents.js +7 -7
  42. package/dist/presets/arborPreset/modeValues/intents.js.map +1 -1
  43. package/dist/presets/arborPreset/modeValues/semantics.d.ts +57 -57
  44. package/dist/presets/arborPreset/modeValues/semantics.d.ts.map +1 -1
  45. package/dist/presets/arborPreset/modeValues/semantics.js +15 -15
  46. package/dist/presets/arborPreset/modeValues/semantics.js.map +1 -1
  47. package/dist/presets/arborPreset/modeValues/shadow/index.d.ts +9 -16
  48. package/dist/presets/arborPreset/modeValues/shadow/index.d.ts.map +1 -1
  49. package/dist/presets/arborPreset/modeValues/shadow/index.js +16 -23
  50. package/dist/presets/arborPreset/modeValues/shadow/index.js.map +1 -1
  51. package/dist/presets/arborPreset/modeValues/spacing/index.d.ts +5 -22
  52. package/dist/presets/arborPreset/modeValues/spacing/index.d.ts.map +1 -1
  53. package/dist/presets/arborPreset/modeValues/spacing/index.js +2 -2
  54. package/dist/presets/arborPreset/modeValues/spacing/index.js.map +1 -1
  55. package/dist/presets/arborPreset/modeValues/typography/index.d.ts +9 -41
  56. package/dist/presets/arborPreset/modeValues/typography/index.d.ts.map +1 -1
  57. package/dist/presets/arborPreset/modeValues/typography/index.js +10 -7
  58. package/dist/presets/arborPreset/modeValues/typography/index.js.map +1 -1
  59. package/dist/presets/arborPreset/preset.d.ts +218 -43
  60. package/dist/presets/arborPreset/preset.d.ts.map +1 -1
  61. package/dist/presets/arborPreset/preset.js +171 -156
  62. package/dist/presets/arborPreset/preset.js.map +1 -1
  63. package/dist/presets/arborPreset/preset.test.js +18 -4
  64. package/dist/presets/arborPreset/preset.test.js.map +1 -1
  65. package/dist/presets/basicPreset/commonFunctions.d.ts +9 -9
  66. package/dist/presets/basicPreset/commonFunctions.d.ts.map +1 -1
  67. package/dist/presets/basicPreset/commonFunctions.js +14 -14
  68. package/dist/presets/basicPreset/commonFunctions.js.map +1 -1
  69. package/dist/presets/basicPreset/functions.test.js +12 -10
  70. package/dist/presets/basicPreset/functions.test.js.map +1 -1
  71. package/dist/presets/basicPreset/mixins.d.ts +3 -3
  72. package/dist/presets/basicPreset/mixins.d.ts.map +1 -1
  73. package/dist/presets/basicPreset/mixins.js +40 -63
  74. package/dist/presets/basicPreset/mixins.js.map +1 -1
  75. package/dist/presets/basicPreset/preset.d.ts +1 -1
  76. package/dist/presets/basicPreset/preset.d.ts.map +1 -1
  77. package/dist/presets/basicPreset/preset.js +6 -6
  78. package/dist/presets/basicPreset/preset.js.map +1 -1
  79. package/dist/publicResolve.d.ts +5 -0
  80. package/dist/publicResolve.d.ts.map +1 -0
  81. package/dist/publicResolve.js +11 -0
  82. package/dist/publicResolve.js.map +1 -0
  83. package/dist/runtime/components/ColorSwatch.d.ts +2 -0
  84. package/dist/runtime/components/ColorSwatch.d.ts.map +1 -0
  85. package/dist/runtime/components/ColorSwatch.js +39 -0
  86. package/dist/runtime/components/ColorSwatch.js.map +1 -0
  87. package/dist/runtime/components/FunctionsList.js +1 -1
  88. package/dist/runtime/components/MixinsList.js +1 -1
  89. package/dist/runtime/components/ModeGraph.d.ts.map +1 -1
  90. package/dist/runtime/components/ModeGraph.js +93 -46
  91. package/dist/runtime/components/ModeGraph.js.map +1 -1
  92. package/dist/runtime/components/Outputs.d.ts.map +1 -1
  93. package/dist/runtime/components/Outputs.js +2 -1
  94. package/dist/runtime/components/Outputs.js.map +1 -1
  95. package/dist/runtime/components/SpacingScale.js +2 -2
  96. package/dist/runtime/components/SpacingScale.js.map +1 -1
  97. package/dist/runtime/components/SystemDemo.d.ts +2 -0
  98. package/dist/runtime/components/SystemDemo.d.ts.map +1 -0
  99. package/dist/runtime/components/SystemDemo.js +32 -0
  100. package/dist/runtime/components/SystemDemo.js.map +1 -0
  101. package/dist/runtime/components/index.d.ts.map +1 -1
  102. package/dist/runtime/components/index.js +4 -0
  103. package/dist/runtime/components/index.js.map +1 -1
  104. package/dist/runtime/registration.d.ts +5 -1
  105. package/dist/runtime/registration.d.ts.map +1 -1
  106. package/dist/runtime/registration.js +32 -1
  107. package/dist/runtime/registration.js.map +1 -1
  108. package/dist/runtime/tokenGroups.d.ts.map +1 -1
  109. package/dist/stylesheet/generateStylesheet.d.ts +3 -1
  110. package/dist/stylesheet/generateStylesheet.d.ts.map +1 -1
  111. package/dist/stylesheet/generateStylesheet.js +2 -2
  112. package/dist/stylesheet/generateStylesheet.js.map +1 -1
  113. package/dist/stylesheet/generateStylesheet.test.js +4 -4
  114. package/dist/stylesheet/generateStylesheet.test.js.map +1 -1
  115. package/dist/stylesheet/modeToCss.d.ts +2 -3
  116. package/dist/stylesheet/modeToCss.d.ts.map +1 -1
  117. package/dist/stylesheet/modeToCss.js +2 -4
  118. package/dist/stylesheet/modeToCss.js.map +1 -1
  119. package/dist/stylesheet/modeToCss.test.js +10 -9
  120. package/dist/stylesheet/modeToCss.test.js.map +1 -1
  121. package/dist/util/buildModeTokenGraph.d.ts +4 -1
  122. package/dist/util/buildModeTokenGraph.d.ts.map +1 -1
  123. package/dist/util/buildModeTokenGraph.js +16 -10
  124. package/dist/util/buildModeTokenGraph.js.map +1 -1
  125. package/dist/util/buildModeTokenGraph.test.js +9 -4
  126. package/dist/util/buildModeTokenGraph.test.js.map +1 -1
  127. package/dist/util/flattenAndApplyTokenValues.d.ts +2 -1
  128. package/dist/util/flattenAndApplyTokenValues.d.ts.map +1 -1
  129. package/dist/util/flattenAndApplyTokenValues.js.map +1 -1
  130. package/dist/util/resolveComputedTokenValue.d.ts +2 -4
  131. package/dist/util/resolveComputedTokenValue.d.ts.map +1 -1
  132. package/dist/util/resolveComputedTokenValue.js +11 -13
  133. package/dist/util/resolveComputedTokenValue.js.map +1 -1
  134. package/dist/util/resolveComputedTokenValue.test.js +20 -10
  135. package/dist/util/resolveComputedTokenValue.test.js.map +1 -1
  136. package/package.json +8 -8
  137. package/dist/runtime/componentsOld/BaseElement.d.ts +0 -8
  138. package/dist/runtime/componentsOld/BaseElement.d.ts.map +0 -1
  139. package/dist/runtime/componentsOld/BaseElement.js +0 -14
  140. package/dist/runtime/componentsOld/BaseElement.js.map +0 -1
  141. package/dist/runtime/componentsOld/ModeSelector.d.ts +0 -2
  142. package/dist/runtime/componentsOld/ModeSelector.d.ts.map +0 -1
  143. package/dist/runtime/componentsOld/ModeSelector.js +0 -36
  144. package/dist/runtime/componentsOld/ModeSelector.js.map +0 -1
  145. package/dist/runtime/componentsOld/SchemeSelector.d.ts +0 -2
  146. package/dist/runtime/componentsOld/SchemeSelector.d.ts.map +0 -1
  147. package/dist/runtime/componentsOld/SchemeSelector.js +0 -34
  148. package/dist/runtime/componentsOld/SchemeSelector.js.map +0 -1
  149. package/dist/runtime/componentsOld/SystemDemo.d.ts +0 -2
  150. package/dist/runtime/componentsOld/SystemDemo.d.ts.map +0 -1
  151. package/dist/runtime/componentsOld/SystemDemo.js +0 -45
  152. package/dist/runtime/componentsOld/SystemDemo.js.map +0 -1
  153. package/dist/runtime/componentsOld/TokenColorValuePreview.d.ts +0 -2
  154. package/dist/runtime/componentsOld/TokenColorValuePreview.d.ts.map +0 -1
  155. package/dist/runtime/componentsOld/TokenColorValuePreview.js +0 -12
  156. package/dist/runtime/componentsOld/TokenColorValuePreview.js.map +0 -1
  157. package/dist/runtime/componentsOld/TokenFontValuesPreview.d.ts +0 -2
  158. package/dist/runtime/componentsOld/TokenFontValuesPreview.d.ts.map +0 -1
  159. package/dist/runtime/componentsOld/TokenFontValuesPreview.js +0 -14
  160. package/dist/runtime/componentsOld/TokenFontValuesPreview.js.map +0 -1
  161. package/dist/runtime/componentsOld/TokenShadowValuePreview.d.ts +0 -2
  162. package/dist/runtime/componentsOld/TokenShadowValuePreview.d.ts.map +0 -1
  163. package/dist/runtime/componentsOld/TokenShadowValuePreview.js +0 -14
  164. package/dist/runtime/componentsOld/TokenShadowValuePreview.js.map +0 -1
  165. package/dist/runtime/componentsOld/TokenSizeValuePreview.d.ts +0 -2
  166. package/dist/runtime/componentsOld/TokenSizeValuePreview.d.ts.map +0 -1
  167. package/dist/runtime/componentsOld/TokenSizeValuePreview.js +0 -12
  168. package/dist/runtime/componentsOld/TokenSizeValuePreview.js.map +0 -1
  169. package/dist/runtime/componentsOld/TokenValuePreview.d.ts +0 -2
  170. package/dist/runtime/componentsOld/TokenValuePreview.d.ts.map +0 -1
  171. package/dist/runtime/componentsOld/TokenValuePreview.js +0 -25
  172. package/dist/runtime/componentsOld/TokenValuePreview.js.map +0 -1
  173. package/dist/runtime/componentsOld/TokenValues.d.ts +0 -2
  174. package/dist/runtime/componentsOld/TokenValues.d.ts.map +0 -1
  175. package/dist/runtime/componentsOld/TokenValues.js +0 -103
  176. package/dist/runtime/componentsOld/TokenValues.js.map +0 -1
  177. package/dist/runtime/componentsOld/index.d.ts +0 -11
  178. package/dist/runtime/componentsOld/index.d.ts.map +0 -1
  179. package/dist/runtime/componentsOld/index.js +0 -11
  180. package/dist/runtime/componentsOld/index.js.map +0 -1
  181. package/dist/util/printTokens.d.ts +0 -5
  182. package/dist/util/printTokens.d.ts.map +0 -1
  183. package/dist/util/printTokens.js +0 -6
  184. package/dist/util/printTokens.js.map +0 -1
@@ -27,7 +27,7 @@ export declare const actionIntents: {
27
27
  description: "Foreground color";
28
28
  };
29
29
  bg: {
30
- purpose: "other";
30
+ purpose: "background";
31
31
  description: "Background - can be a color or a more complex value like a gradient or image";
32
32
  };
33
33
  borderColor: {
@@ -50,7 +50,7 @@ export declare const actionIntents: {
50
50
  description: "Foreground color";
51
51
  };
52
52
  bg: {
53
- purpose: "other";
53
+ purpose: "background";
54
54
  description: "Background - can be a color or a more complex value like a gradient or image";
55
55
  };
56
56
  borderColor: {
@@ -73,7 +73,7 @@ export declare const actionIntents: {
73
73
  description: "Foreground color";
74
74
  };
75
75
  bg: {
76
- purpose: "other";
76
+ purpose: "background";
77
77
  description: "Background - can be a color or a more complex value like a gradient or image";
78
78
  };
79
79
  borderColor: {
@@ -4,7 +4,7 @@ export declare const visualIntents: {
4
4
  description: "Foreground color";
5
5
  };
6
6
  bg: {
7
- purpose: "other";
7
+ purpose: "background";
8
8
  description: "Background - can be a color or a more complex value like a gradient or image";
9
9
  };
10
10
  borderColor: {
@@ -5,7 +5,7 @@ export const visualIntents = createModeSchema({
5
5
  description: 'Foreground color',
6
6
  },
7
7
  bg: {
8
- purpose: 'other',
8
+ purpose: 'background',
9
9
  description: 'Background - can be a color or a more complex value like a gradient or image',
10
10
  },
11
11
  borderColor: {
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../../src/presets/arborPreset/modeSchema/intents/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,CAAC,MAAM,aAAa,GAAG,gBAAgB,CAAC;IAC7C,EAAE,EAAE;QACH,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE,kBAAkB;KAC/B;IACD,EAAE,EAAE;QACH,OAAO,EAAE,OAAO;QAChB,WAAW,EACV,8EAA8E;KAC/E;IACD,WAAW,EAAE;QACZ,OAAO,EAAE,OAAO;KAChB;IACD,WAAW,EAAE;QACZ,OAAO,EAAE,cAAc;KACvB;IACD,WAAW,EAAE;QACZ,OAAO,EAAE,cAAc;KACvB;IACD,MAAM,EAAE;QACP,OAAO,EAAE,QAAQ;QACjB,WAAW,EACV,kGAAkG;KACnG;CACD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,CAAC;IAC1C,KAAK,EAAE;QACN,OAAO,EAAE,OAAO;QAChB,WAAW,EACV,wEAAwE;KACzE;IACD,MAAM,EAAE;QACP,OAAO,EAAE,SAAS;QAClB,WAAW,EAAE,sCAAsC;KACnD;IACD,KAAK,EAAE;QACN,OAAO,EAAE,SAAS;QAClB,WAAW,EAAE,mCAAmC;KAChD;CACD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,gBAAgB,CAAC;IAClD,IAAI,EAAE,WAAW;IACjB,MAAM,EAAE,aAAa;IACrB,UAAU,EAAE,aAAa;IACzB,IAAI,EAAE,aAAa;IACnB,aAAa,EAAE,gBAAgB;CAC/B,CAAC,CAAC"}
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../../src/presets/arborPreset/modeSchema/intents/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,CAAC,MAAM,aAAa,GAAG,gBAAgB,CAAC;IAC7C,EAAE,EAAE;QACH,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE,kBAAkB;KAC/B;IACD,EAAE,EAAE;QACH,OAAO,EAAE,YAAY;QACrB,WAAW,EACV,8EAA8E;KAC/E;IACD,WAAW,EAAE;QACZ,OAAO,EAAE,OAAO;KAChB;IACD,WAAW,EAAE;QACZ,OAAO,EAAE,cAAc;KACvB;IACD,WAAW,EAAE;QACZ,OAAO,EAAE,cAAc;KACvB;IACD,MAAM,EAAE;QACP,OAAO,EAAE,QAAQ;QACjB,WAAW,EACV,kGAAkG;KACnG;CACD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,CAAC;IAC1C,KAAK,EAAE;QACN,OAAO,EAAE,OAAO;QAChB,WAAW,EACV,wEAAwE;KACzE;IACD,MAAM,EAAE;QACP,OAAO,EAAE,SAAS;QAClB,WAAW,EAAE,sCAAsC;KACnD;IACD,KAAK,EAAE;QACN,OAAO,EAAE,SAAS;QAClB,WAAW,EAAE,mCAAmC;KAChD;CACD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,gBAAgB,CAAC;IAClD,IAAI,EAAE,WAAW;IACjB,MAAM,EAAE,aAAa;IACrB,UAAU,EAAE,aAAa;IACzB,IAAI,EAAE,aAAa;IACnB,aAAa,EAAE,gBAAgB;CAC/B,CAAC,CAAC"}
@@ -4,7 +4,7 @@ export declare const controlIntents: {
4
4
  description: "Foreground color";
5
5
  };
6
6
  bg: {
7
- purpose: "other";
7
+ purpose: "background";
8
8
  description: "Background - can be a color or a more complex value like a gradient or image";
9
9
  };
10
10
  borderColor: {
@@ -27,7 +27,7 @@ export declare const surfaceIntents: {
27
27
  description: "Foreground color";
28
28
  };
29
29
  bg: {
30
- purpose: "other";
30
+ purpose: "background";
31
31
  description: "Background - can be a color or a more complex value like a gradient or image";
32
32
  };
33
33
  borderColor: {
@@ -50,7 +50,7 @@ export declare const surfaceIntents: {
50
50
  description: "Foreground color";
51
51
  };
52
52
  bg: {
53
- purpose: "other";
53
+ purpose: "background";
54
54
  description: "Background - can be a color or a more complex value like a gradient or image";
55
55
  };
56
56
  borderColor: {
@@ -73,7 +73,7 @@ export declare const surfaceIntents: {
73
73
  description: "Foreground color";
74
74
  };
75
75
  bg: {
76
- purpose: "other";
76
+ purpose: "background";
77
77
  description: "Background - can be a color or a more complex value like a gradient or image";
78
78
  };
79
79
  borderColor: {
@@ -3,41 +3,127 @@ export interface ArborModeSchemaOptions<TColorName extends PropertyKey> {
3
3
  }
4
4
  export declare function createArborModeSchema<TColorName extends string>(options: ArborModeSchemaOptions<TColorName>): {
5
5
  global: {
6
- density: {
7
- purpose: "scalar";
8
- description: "A scaling factor for density. Higher density means smaller, tighter spacing and size";
9
- };
10
- saturation: {
11
- purpose: "scalar";
12
- description: "Applies global saturation adjustments to all colors";
13
- };
14
- roundness: {
15
- purpose: "scalar";
16
- description: "Controls the roundness of corners. Larger roundness values also may affect padding.";
17
- };
18
- shadowSpread: {
19
- purpose: "scalar";
20
- description: "Controls the spread size of all shadows.";
21
- };
22
- shadowBlur: {
23
- purpose: "scalar";
24
- description: "Controls the blur scaling of all shadows.";
6
+ color: {
7
+ saturation: {
8
+ purpose: "scalar";
9
+ description: "Applies global saturation adjustments to all colors";
10
+ };
25
11
  };
26
- lineWidth: {
27
- purpose: "scalar";
28
- description: "Controls the width of lines used for borders, etc.";
12
+ spacing: {
13
+ density: {
14
+ purpose: "scalar";
15
+ description: "A scaling factor for density. Higher density means smaller, tighter spacing and size";
16
+ };
17
+ baseSize: {
18
+ purpose: "spacing";
19
+ description: "Defines the base spacing unit used to derive spacing and layout tokens.";
20
+ };
21
+ scaleBase: {
22
+ purpose: "scalar";
23
+ description: "The \"base\" number of the scale equation - a linear scalar multiplier. Set this to scale by some linear factor if scaleExponent is \"1\"";
24
+ };
25
+ scaleExponentStep: {
26
+ purpose: "scalar";
27
+ description: "The exponent of the scale equation - the rate of exponential growth. `scaleBase` is raised to this exponent before being multiplied by the base spacing size. Set this to \"1\" to scale linearly by the `scaleBase` factor, or set it to a value greater than \"1\" to have exponential growth.";
28
+ };
29
29
  };
30
- baseFontSize: {
31
- purpose: "font-size";
32
- description: "Defines the root font size used to derive typography tokens.";
30
+ shape: {
31
+ roundness: {
32
+ purpose: "scalar";
33
+ description: "Controls the roundness of corners. Larger roundness values also may affect padding.";
34
+ };
35
+ lineWidth: {
36
+ purpose: "scalar";
37
+ description: "Controls the width of lines used for borders, etc.";
38
+ };
33
39
  };
34
- baseSpacingSize: {
35
- purpose: "spacing";
36
- description: "Defines the base spacing unit used to derive spacing and layout tokens.";
40
+ shadow: {
41
+ spread: {
42
+ purpose: "scalar";
43
+ description: "Controls the spread size of all shadows.";
44
+ };
45
+ blur: {
46
+ purpose: "scalar";
47
+ description: "Controls the blur scaling of all shadows.";
48
+ };
49
+ color: {
50
+ purpose: "color";
51
+ description: "Provides the default shadow color used when a shadow token does not supply its own color.";
52
+ };
37
53
  };
38
- defaultShadowColor: {
39
- purpose: "color";
40
- description: "Provides the default shadow color used when a shadow token does not supply its own color.";
54
+ typography: {
55
+ baseFontSize: {
56
+ purpose: "font-size";
57
+ description: "Defines the root font size used to derive typography tokens.";
58
+ };
59
+ weightStep: {
60
+ purpose: "scalar";
61
+ description: "The amount of font weight change between each typography level. This is multiplied by the level index to determine how much to adjust font weight at each level.";
62
+ };
63
+ minWeight: {
64
+ purpose: "scalar";
65
+ description: "The minimum font weight to use in the typography scale.";
66
+ };
67
+ maxWeight: {
68
+ purpose: "scalar";
69
+ description: "The maximum font weight to use in the typography scale.";
70
+ };
71
+ baseWeight: {
72
+ purpose: "scalar";
73
+ description: "The base font weight from which to calculate typography levels. This is typically the \"normal\" font weight (e.g. 400), and level adjustments are applied as positive or negative offsets from this base.";
74
+ };
75
+ lineHeightStep: {
76
+ purpose: "scalar";
77
+ description: "The amount of line height change between each typography level. This is multiplied by the level index to determine how much to adjust line height at each level.";
78
+ };
79
+ minLineHeight: {
80
+ purpose: "scalar";
81
+ description: "The minimum line height to use in the typography scale.";
82
+ };
83
+ maxLineHeight: {
84
+ purpose: "scalar";
85
+ description: "The maximum line height to use in the typography scale.";
86
+ };
87
+ baseLineHeight: {
88
+ purpose: "scalar";
89
+ description: "The base line height from which to calculate typography levels. This is typically the line height used at the default typography level, and level adjustments are applied as positive or negative offsets from this base.";
90
+ };
91
+ minFontSize: {
92
+ purpose: "font-size";
93
+ description: "The minimum font size to use in the typography scale.";
94
+ };
95
+ maxFontSize: {
96
+ purpose: "font-size";
97
+ description: "The maximum font size to use in the typography scale.";
98
+ };
99
+ fontSizeScaleBase: {
100
+ purpose: "scalar";
101
+ description: "The \"base\" number of the font size scale equation - a linear scalar multiplier. Set this to scale by some linear factor if sizeExponent is \"1\"";
102
+ };
103
+ fontSizeScaleExponentStep: {
104
+ purpose: "scalar";
105
+ description: "The exponent of the font size scale equation - the rate of exponential growth. `fontSizeScaleBase` is raised to this exponent before being multiplied by the base font size. Set this to \"1\" to scale linearly by the `fontSizeScaleBase` factor, or set it to a value greater than \"1\" to have exponential growth.";
106
+ };
107
+ letterSpacingStep: {
108
+ purpose: "scalar";
109
+ description: "The amount of letter spacing change between each typography level. This is multiplied by the level index to determine how much to adjust letter spacing at each level.";
110
+ };
111
+ minLetterSpacing: {
112
+ purpose: "spacing";
113
+ description: "The minimum letter spacing to use in the typography scale.";
114
+ };
115
+ maxLetterSpacing: {
116
+ purpose: "spacing";
117
+ description: "The maximum letter spacing to use in the typography scale.";
118
+ };
119
+ baseLetterSpacing: {
120
+ purpose: "spacing";
121
+ description: "The base letter spacing from which to calculate typography levels. This is typically the letter spacing used at the default typography level, and level adjustments are applied as positive or negative offsets from this base.";
122
+ };
123
+ darkModeWeightAdjustment: {
124
+ purpose: "scalar";
125
+ description: "An adjustment applied to font weight when in dark mode to compensate for the irradiation illusion. This is typically a negative value to reduce font weight in dark mode, but it can be positive if your theme has very light text and you want to increase weight in dark mode.";
126
+ };
41
127
  };
42
128
  };
43
129
  primitive: {
@@ -470,7 +556,7 @@ export declare function createArborModeSchema<TColorName extends string>(options
470
556
  description: "Foreground color";
471
557
  };
472
558
  bg: {
473
- purpose: "other";
559
+ purpose: "background";
474
560
  description: "Background - can be a color or a more complex value like a gradient or image";
475
561
  };
476
562
  borderColor: {
@@ -493,7 +579,7 @@ export declare function createArborModeSchema<TColorName extends string>(options
493
579
  description: "Foreground color";
494
580
  };
495
581
  bg: {
496
- purpose: "other";
582
+ purpose: "background";
497
583
  description: "Background - can be a color or a more complex value like a gradient or image";
498
584
  };
499
585
  borderColor: {
@@ -516,7 +602,7 @@ export declare function createArborModeSchema<TColorName extends string>(options
516
602
  description: "Foreground color";
517
603
  };
518
604
  bg: {
519
- purpose: "other";
605
+ purpose: "background";
520
606
  description: "Background - can be a color or a more complex value like a gradient or image";
521
607
  };
522
608
  borderColor: {
@@ -540,7 +626,7 @@ export declare function createArborModeSchema<TColorName extends string>(options
540
626
  description: "Foreground color";
541
627
  };
542
628
  bg: {
543
- purpose: "other";
629
+ purpose: "background";
544
630
  description: "Background - can be a color or a more complex value like a gradient or image";
545
631
  };
546
632
  borderColor: {
@@ -608,7 +694,7 @@ export declare function createArborModeSchema<TColorName extends string>(options
608
694
  description: "Foreground color";
609
695
  };
610
696
  bg: {
611
- purpose: "other";
697
+ purpose: "background";
612
698
  description: "Background - can be a color or a more complex value like a gradient or image";
613
699
  };
614
700
  borderColor: {
@@ -631,7 +717,7 @@ export declare function createArborModeSchema<TColorName extends string>(options
631
717
  description: "Foreground color";
632
718
  };
633
719
  bg: {
634
- purpose: "other";
720
+ purpose: "background";
635
721
  description: "Background - can be a color or a more complex value like a gradient or image";
636
722
  };
637
723
  borderColor: {
@@ -654,7 +740,7 @@ export declare function createArborModeSchema<TColorName extends string>(options
654
740
  description: "Foreground color";
655
741
  };
656
742
  bg: {
657
- purpose: "other";
743
+ purpose: "background";
658
744
  description: "Background - can be a color or a more complex value like a gradient or image";
659
745
  };
660
746
  borderColor: {
@@ -1 +1 @@
1
- {"version":3,"file":"modeSchema.d.ts","sourceRoot":"","sources":["../../../../src/presets/arborPreset/modeSchema/modeSchema.ts"],"names":[],"mappings":"AAoBA,MAAM,WAAW,sBAAsB,CAAC,UAAU,SAAS,WAAW;IACrE,UAAU,EAAE,UAAU,EAAE,CAAC;CACzB;AAED,wBAAgB,qBAAqB,CAAC,UAAU,SAAS,MAAM,EAC9D,OAAO,EAAE,sBAAsB,CAAC,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+B3C;AAED,MAAM,MAAM,eAAe,CAAC,UAAU,SAAS,MAAM,GAAG,MAAM,IAAI,UAAU,CAC3E,OAAO,qBAAqB,CAAC,UAAU,CAAC,CACxC,CAAC"}
@@ -1,33 +1,25 @@
1
- import { CalcEvaluationContext, CalcOperations, ComputationResult, Equation } from '@arbor-css/calc';
2
- export interface OklchColorEquation {
3
- l: Equation;
4
- c: Equation;
5
- h: Equation;
6
- from?: Equation;
7
- compiled: Equation;
1
+ import { Css, CssResolutionContext } from '@arbor-css/css-eval';
2
+ export interface OklchCssRepresentation {
3
+ l: Css;
4
+ c: Css;
5
+ h: Css;
6
+ from?: Css;
7
+ compiled: Css;
8
8
  /**
9
9
  * Prints the CSS value of the color equation, including all
10
10
  * calculations and variable references - fully dynamic.
11
11
  */
12
- printDynamic(context: CalcEvaluationContext): string;
12
+ printDynamic(context: CssResolutionContext): string;
13
13
  /**
14
14
  * Uses the equation and provided context to compute a static
15
15
  * OKLCH color string with calculations and references resolved.
16
16
  */
17
- printComputed(context: CalcEvaluationContext): string;
18
- /**
19
- * Returns the raw computed L, C, H values as numbers with units.
20
- */
21
- computeParts(ctx: CalcEvaluationContext): {
22
- l: ComputationResult;
23
- c: ComputationResult;
24
- h: ComputationResult;
25
- };
17
+ printComputed(context: CssResolutionContext): string;
26
18
  }
27
- export declare function oklchBuilder(impl: ($: CalcOperations) => {
28
- from?: Equation;
29
- l: Equation;
30
- c: Equation;
31
- h: Equation;
32
- }): OklchColorEquation;
19
+ export declare function oklchBuilder(impl: () => {
20
+ from?: Css;
21
+ l: Css;
22
+ c: Css;
23
+ h: Css;
24
+ }): OklchCssRepresentation;
33
25
  //# sourceMappingURL=color.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../../../src/presets/arborPreset/modeValues/color/color.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EACjB,QAAQ,EAKR,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,kBAAkB;IAClC,CAAC,EAAE,QAAQ,CAAC;IACZ,CAAC,EAAE,QAAQ,CAAC;IACZ,CAAC,EAAE,QAAQ,CAAC;IACZ,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,QAAQ,EAAE,QAAQ,CAAC;IAEnB;;;OAGG;IACH,YAAY,CAAC,OAAO,EAAE,qBAAqB,GAAG,MAAM,CAAC;IACrD;;;OAGG;IACH,aAAa,CAAC,OAAO,EAAE,qBAAqB,GAAG,MAAM,CAAC;IACtD;;OAEG;IACH,YAAY,CAAC,GAAG,EAAE,qBAAqB,GAAG;QACzC,CAAC,EAAE,iBAAiB,CAAC;QACrB,CAAC,EAAE,iBAAiB,CAAC;QACrB,CAAC,EAAE,iBAAiB,CAAC;KACrB,CAAC;CACF;AAED,wBAAgB,YAAY,CAC3B,IAAI,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK;IAC5B,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,CAAC,EAAE,QAAQ,CAAC;IACZ,CAAC,EAAE,QAAQ,CAAC;IACZ,CAAC,EAAE,QAAQ,CAAC;CACZ,GACC,kBAAkB,CA6BpB"}
1
+ {"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../../../src/presets/arborPreset/modeValues/color/color.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,GAAG,EACH,oBAAoB,EAGpB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,WAAW,sBAAsB;IACtC,CAAC,EAAE,GAAG,CAAC;IACP,CAAC,EAAE,GAAG,CAAC;IACP,CAAC,EAAE,GAAG,CAAC;IACP,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,QAAQ,EAAE,GAAG,CAAC;IAEd;;;OAGG;IACH,YAAY,CAAC,OAAO,EAAE,oBAAoB,GAAG,MAAM,CAAC;IACpD;;;OAGG;IACH,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,MAAM,CAAC;CACrD;AAED,wBAAgB,YAAY,CAC3B,IAAI,EAAE,MAAM;IACX,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,CAAC,EAAE,GAAG,CAAC;IACP,CAAC,EAAE,GAAG,CAAC;IACP,CAAC,EAAE,GAAG,CAAC;CACP,GACC,sBAAsB,CAmBxB"}
@@ -1,24 +1,16 @@
1
- import { $, computeEquation, css, printComputationResult, printEquation, } from '@arbor-css/calc';
1
+ import { css, printCss, resolveCss, } from '@arbor-css/css-eval';
2
2
  export function oklchBuilder(impl) {
3
- const equations = impl($);
4
- function compute(context) {
5
- const l = computeEquation(equations.l, context);
6
- const c = computeEquation(equations.c, context);
7
- const h = computeEquation(equations.h, context);
8
- const from = equations.from ? computeEquation(equations.from, context) : undefined;
9
- return { l, c, h, from };
10
- }
3
+ const equations = impl();
11
4
  const compiled = css `oklch(${equations.from ? `from ${equations.from} ` : ''}calc(${equations.l}) calc(${equations.c}) calc(${equations.h}))`;
12
5
  return {
13
6
  ...equations,
14
7
  compiled: css `oklch(${equations.from ? `from ${equations.from} ` : ''}calc(${equations.l}) calc(${equations.c}) calc(${equations.h}))`,
15
8
  printDynamic() {
16
- return printEquation(compiled);
9
+ return printCss(compiled);
17
10
  },
18
11
  printComputed(context) {
19
- return printComputationResult(computeEquation(compiled, context));
12
+ return resolveCss(compiled, context);
20
13
  },
21
- computeParts: compute,
22
14
  };
23
15
  }
24
16
  //# sourceMappingURL=color.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"color.js","sourceRoot":"","sources":["../../../../../src/presets/arborPreset/modeValues/color/color.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,CAAC,EAKD,eAAe,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,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;QACnE,CAAC;QACD,YAAY,EAAE,OAAO;KACrB,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"color.js","sourceRoot":"","sources":["../../../../../src/presets/arborPreset/modeValues/color/color.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,GAAG,EAGH,QAAQ,EACR,UAAU,GACV,MAAM,qBAAqB,CAAC;AAqB7B,MAAM,UAAU,YAAY,CAC3B,IAKC;IAED,MAAM,SAAS,GAAG,IAAI,EAAE,CAAC;IAEzB,MAAM,QAAQ,GAAG,GAAG,CAAA,SACnB,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,SAAS,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,EAC9C,QAAQ,SAAS,CAAC,CAAC,UAAU,SAAS,CAAC,CAAC,UAAU,SAAS,CAAC,CAAC,IAAI,CAAC;IAElE,OAAO;QACN,GAAG,SAAS;QACZ,QAAQ,EAAE,GAAG,CAAA,SACZ,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,SAAS,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,EAC9C,QAAQ,SAAS,CAAC,CAAC,UAAU,SAAS,CAAC,CAAC,UAAU,SAAS,CAAC,CAAC,IAAI;QACjE,YAAY;YACX,OAAO,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAC3B,CAAC;QACD,aAAa,CAAC,OAA6B;YAC1C,OAAO,UAAU,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QACtC,CAAC;KACD,CAAC;AACH,CAAC"}
@@ -1,5 +1,5 @@
1
- import { Equation } from '@arbor-css/calc';
2
- import { Token } from '@arbor-css/tokens';
1
+ import { CssInterpolation } from '@arbor-css/css-eval';
2
+ import { ArborModeGlobalTokens } from '../../modeSchema/global.js';
3
3
  import { ColorRangeConfig, CompiledColorRange, DefaultRangeName } from './ranges.js';
4
4
  import { SchemeDefinition } from './schemes.js';
5
5
  export type CompiledColorRangeWithNeutral<TRangeStepNames extends string = DefaultRangeName> = CompiledColorRange<TRangeStepNames> & {
@@ -14,7 +14,7 @@ export type CompiledColorRanges<TRangeNames extends string, TRangeStepNames exte
14
14
  };
15
15
  export type CompiledColors<TRangeNames extends string, TRangeStepNames extends string = DefaultRangeName> = CompiledColorRanges<TRangeNames, TRangeStepNames>;
16
16
  export type CompiledColorRangeConfig<TRangeStepNames extends string> = ColorRangeConfig<TRangeStepNames> & {
17
- neutralSaturation?: number | string | Equation | Token;
17
+ neutralSaturation?: CssInterpolation;
18
18
  };
19
19
  export interface CompileColorsOptions<TRangeNames extends string, TRangeStepNames extends string = DefaultRangeName> {
20
20
  ranges: Record<TRangeNames, CompiledColorRangeConfig<TRangeStepNames>>;
@@ -24,16 +24,13 @@ export interface CompileColorsOptions<TRangeNames extends string, TRangeStepName
24
24
  };
25
25
  invertLightDark?: boolean;
26
26
  }
27
- type RequiredTokens = {
28
- saturation: Token;
29
- };
30
27
  /**
31
28
  * Given an input set of color range configurations (hue, saturation)
32
29
  * and, optionally, specific calculations to handle light/dark schemes,
33
30
  * produces a single set of compiled color ranges which incorporates
34
31
  * light-dark logic to select the appropriate color in each scheme
35
32
  */
36
- export declare function compileColors<TRangeNames extends string, TRangeStepNames extends string = DefaultRangeName>({ ranges, schemes: userSchemes, invertLightDark, }: CompileColorsOptions<TRangeNames, TRangeStepNames>, $: RequiredTokens): CompiledColors<TRangeNames, TRangeStepNames>;
33
+ export declare function compileColors<TRangeNames extends string, TRangeStepNames extends string = DefaultRangeName>({ ranges, schemes: userSchemes, invertLightDark, }: CompileColorsOptions<TRangeNames, TRangeStepNames>, $: ArborModeGlobalTokens): CompiledColors<TRangeNames, TRangeStepNames>;
37
34
  /**
38
35
  * Compile a single color range.
39
36
  */
@@ -48,6 +45,5 @@ export declare function compileSingleColor(
48
45
  * saturation: 'var(--my-saturation)',
49
46
  * }
50
47
  */
51
- range: CompiledColorRangeConfig<string>, tokens: RequiredTokens): CompiledColorRangeWithNeutral<string>;
52
- export {};
48
+ range: CompiledColorRangeConfig<string>, tokens: ArborModeGlobalTokens): CompiledColorRangeWithNeutral<string>;
53
49
  //# sourceMappingURL=compile.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../../../../src/presets/arborPreset/modeValues/color/compile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EACN,gBAAgB,EAChB,kBAAkB,EAElB,gBAAgB,EAEhB,MAAM,aAAa,CAAC;AACrB,OAAO,EAGN,gBAAgB,EAChB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,6BAA6B,CACxC,eAAe,SAAS,MAAM,GAAG,gBAAgB,IAC9C,kBAAkB,CAAC,eAAe,CAAC,GAAG;IACzC;;;OAGG;IACH,QAAQ,EAAE,kBAAkB,CAAC,eAAe,CAAC,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,mBAAmB,CAC9B,WAAW,SAAS,MAAM,EAC1B,eAAe,SAAS,MAAM,GAAG,gBAAgB,IAC9C;KACF,CAAC,IAAI,WAAW,GAAG,6BAA6B,CAAC,eAAe,CAAC;CAClE,CAAC;AAEF,MAAM,MAAM,cAAc,CACzB,WAAW,SAAS,MAAM,EAC1B,eAAe,SAAS,MAAM,GAAG,gBAAgB,IAC9C,mBAAmB,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;AAEtD,MAAM,MAAM,wBAAwB,CAAC,eAAe,SAAS,MAAM,IAClE,gBAAgB,CAAC,eAAe,CAAC,GAAG;IACnC,iBAAiB,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;CACvD,CAAC;AAEH,MAAM,WAAW,oBAAoB,CACpC,WAAW,SAAS,MAAM,EAC1B,eAAe,SAAS,MAAM,GAAG,gBAAgB;IAEjD,MAAM,EAAE,MAAM,CAAC,WAAW,EAAE,wBAAwB,CAAC,eAAe,CAAC,CAAC,CAAC;IACvE,OAAO,CAAC,EAAE;QACT,KAAK,CAAC,EAAE,gBAAgB,CACvB,gBAAgB,CAAC,eAAe,CAAC,EACjC,eAAe,CACf,CAAC;QACF,IAAI,CAAC,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,eAAe,CAAC,EAAE,eAAe,CAAC,CAAC;KAC5E,CAAC;IACF,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,KAAK,cAAc,GAAG;IACrB,UAAU,EAAE,KAAK,CAAC;CAClB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,aAAa,CAC5B,WAAW,SAAS,MAAM,EAC1B,eAAe,SAAS,MAAM,GAAG,gBAAgB,EAEjD,EACC,MAAM,EACN,OAAO,EAAE,WAAW,EACpB,eAAuB,GACvB,EAAE,oBAAoB,CAAC,WAAW,EAAE,eAAe,CAAC,EACrD,CAAC,EAAE,cAAc,GACf,cAAc,CAAC,WAAW,EAAE,eAAe,CAAC,CAkC9C;AAmCD;;GAEG;AACH,wBAAgB,kBAAkB;AACjC;;;;;;;;;GASG;AACH,KAAK,EAAE,wBAAwB,CAAC,MAAM,CAAC,EACvC,MAAM,EAAE,cAAc,yCAUtB"}
1
+ {"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../../../../src/presets/arborPreset/modeValues/color/compile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EACN,gBAAgB,EAChB,kBAAkB,EAElB,gBAAgB,EAEhB,MAAM,aAAa,CAAC;AACrB,OAAO,EAGN,gBAAgB,EAChB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,6BAA6B,CACxC,eAAe,SAAS,MAAM,GAAG,gBAAgB,IAC9C,kBAAkB,CAAC,eAAe,CAAC,GAAG;I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;AAmCD;;GAEG;AACH,wBAAgB,kBAAkB;AACjC;;;;;;;;;GASG;AACH,KAAK,EAAE,wBAAwB,CAAC,MAAM,CAAC,EACvC,MAAM,EAAE,qBAAqB,yCAU7B"}
@@ -1,4 +1,4 @@
1
- import { css } from '@arbor-css/calc';
1
+ import { css } from '@arbor-css/css-eval';
2
2
  import { createNeutralDerivedRange, } from './ranges.js';
3
3
  import { defaultDarkScheme, defaultLightScheme, } from './schemes.js';
4
4
  /**
@@ -16,9 +16,9 @@ export function compileColors({ ranges, schemes: userSchemes, invertLightDark =
16
16
  };
17
17
  const colors = Object.keys(ranges).reduce((colorsAcc, rangeName) => {
18
18
  const rangeConfig = ranges[rangeName];
19
- const uncompiledLight = schemes.light.getColorRange(rangeConfig, $);
20
- const uncompiledDark = schemes.dark.getColorRange(rangeConfig, $);
21
- const combined = toLightDarkCompiled(invertLightDark ? uncompiledDark : uncompiledLight, invertLightDark ? uncompiledLight : uncompiledDark, $, { neutralSaturation: rangeConfig.neutralSaturation });
19
+ const uncompiledLight = schemes.light.getColorRange(rangeConfig, $.color);
20
+ const uncompiledDark = schemes.dark.getColorRange(rangeConfig, $.color);
21
+ const combined = toLightDarkCompiled(invertLightDark ? uncompiledDark : uncompiledLight, invertLightDark ? uncompiledLight : uncompiledDark, $.color, { neutralSaturation: rangeConfig.neutralSaturation });
22
22
  colorsAcc[rangeName] = combined;
23
23
  return colorsAcc;
24
24
  }, {});
@@ -1 +1 @@
1
- {"version":3,"file":"compile.js","sourceRoot":"","sources":["../../../../../src/presets/arborPreset/modeValues/color/compile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAY,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAGN,yBAAyB,GAGzB,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,iBAAiB,EACjB,kBAAkB,GAElB,MAAM,cAAc,CAAC;AAgDtB;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAI5B,EACC,MAAM,EACN,OAAO,EA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A,cAAc,UAAU,CAAC,QAAQ,CAAC,QAAQ,KAAK,SAAS,CAAC,QAAQ,CAAC,QAAQ,GAAG,CAAC;IACnF,CAAC;IAED,MAAM,YAAY,GAAG,yBAAyB,CAAC,KAAK,EAAE,CAAC,EAAE;QACxD,gBAAgB,EAAE,OAAO,CAAC,iBAAiB,IAAI,IAAI;KACnD,CAAC,CAAC;IACH,MAAM,WAAW,GAAG,yBAAyB,CAAC,IAAI,EAAE,CAAC,EAAE;QACtD,gBAAgB,EAAE,OAAO,CAAC,iBAAiB,IAAI,IAAI;KACnD,CAAC,CAAC;IAEH,MAAM,aAAa,GAAG,EAAS,CAAC;IAChC,KAAK,MAAM,GAAG,IAAI,YAAY,EAAE,CAAC;QAChC,MAAM,UAAU,GAAG,YAAY,CAAC,GAAgC,CAAC,CAAC;QAClE,MAAM,SAAS,GAAG,WAAW,CAAC,GAA+B,CAAC,CAAC;QAC/D,aAAa,CAAC,GAAU,CAAC;YACxB,GAAG,CAAA,cAAc,UAAU,CAAC,QAAQ,CAAC,QAAQ,KAAK,SAAS,CAAC,QAAQ,CAAC,QAAQ,GAAG,CAAC;IACnF,CAAC;IAED,MAAM,CAAC,QAAQ,GAAG,aAAa,CAAC;IAChC,OAAO,MAAM,CAAC;AACf,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB;AACjC;;;;;;;;;GASG;AACH,KAAuC,EACvC,MAAsB;IAEtB,OAAO,aAAa,CACnB;QACC,MAAM,EAAE;YACP,OAAO,EAAE,KAAK;SACd;KACD,EACD,MAAM,CACN,CAAC,OAAO,CAAC;AACX,CAAC"}
1
+ {"version":3,"file":"compile.js","sourceRoot":"","sources":["../../../../../src/presets/arborPreset/modeValues/color/compile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAoB,MAAM,qBAAqB,CAAC;AAG5D,OAAO,EAGN,yBAAyB,GAGzB,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,iBAAiB,EACjB,kBAAkB,GAElB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