@tenphi/glaze 0.9.2 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -776,9 +776,9 @@ palette.tokens({ prefix: { primary: 'p-', danger: 'd-' } });
|
|
|
776
776
|
|
|
777
777
|
An error is thrown if the primary name doesn't match any theme in the palette.
|
|
778
778
|
|
|
779
|
-
### Tasty Export (for [Tasty](https://
|
|
779
|
+
### Tasty Export (for [Tasty](https://tasty.style) style system)
|
|
780
780
|
|
|
781
|
-
The `tasty()` method exports tokens in the [Tasty](https://
|
|
781
|
+
The `tasty()` method exports tokens in the [Tasty](https://tasty.style/docs) style-to-state binding format — `#name` color token keys with state aliases (`''`, `@dark`, etc.). See the [Playground](https://tasty.style/playground) for live examples of Glaze integration:
|
|
782
782
|
|
|
783
783
|
```ts
|
|
784
784
|
const palette = glaze.palette(
|
|
@@ -1146,7 +1146,7 @@ brand.colors({ surface: { lightness: 97 }, text: { base: 'surface', lightness: '
|
|
|
1146
1146
|
| `theme.extend(options)` | Create a child theme |
|
|
1147
1147
|
| `theme.resolve()` | Resolve all colors |
|
|
1148
1148
|
| `theme.tokens(options?)` | Export as flat token map grouped by variant |
|
|
1149
|
-
| `theme.tasty(options?)` | Export as [Tasty](https://
|
|
1149
|
+
| `theme.tasty(options?)` | Export as [Tasty](https://tasty.style/docs) style-to-state bindings |
|
|
1150
1150
|
| `theme.json(options?)` | Export as plain JSON |
|
|
1151
1151
|
| `theme.css(options?)` | Export as CSS custom property declarations |
|
|
1152
1152
|
|
package/dist/index.cjs
CHANGED
|
@@ -620,7 +620,7 @@ function coarseScan(h, s, lo, hi, yBase, target, epsilon, maxIter) {
|
|
|
620
620
|
function findLightnessForContrast(options) {
|
|
621
621
|
const { hue, saturation, preferredLightness, baseLinearRgb, contrast: contrastInput, lightnessRange = [0, 1], epsilon = 1e-4, maxIterations = 14 } = options;
|
|
622
622
|
const target = resolveMinContrast(contrastInput);
|
|
623
|
-
const searchTarget = target * 1.
|
|
623
|
+
const searchTarget = target * 1.01;
|
|
624
624
|
const yBase = gamutClampedLuminance(baseLinearRgb);
|
|
625
625
|
const crPref = contrastRatioFromLuminance(cachedLuminance(hue, saturation, preferredLightness), yBase);
|
|
626
626
|
if (crPref >= searchTarget) return {
|