@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/dist/index.d.cts
CHANGED
|
@@ -319,7 +319,7 @@ interface GlazeColorToken {
|
|
|
319
319
|
/**
|
|
320
320
|
* Export as a tasty style-to-state binding (no color name key).
|
|
321
321
|
* Uses `#name` keys and state aliases (`''`, `@dark`, etc.).
|
|
322
|
-
* @see https://
|
|
322
|
+
* @see https://tasty.style/docs
|
|
323
323
|
*/
|
|
324
324
|
tasty(options?: GlazeTokenOptions): Record<string, string>;
|
|
325
325
|
/** Export as a flat JSON map (no color name key). */
|
|
@@ -363,7 +363,7 @@ interface GlazeTheme {
|
|
|
363
363
|
* Export as tasty style-to-state bindings.
|
|
364
364
|
* Uses `#name` color token keys and state aliases (`''`, `@dark`, etc.).
|
|
365
365
|
* Spread into component styles or register as a recipe via `configure({ recipes })`.
|
|
366
|
-
* @see https://
|
|
366
|
+
* @see https://tasty.style/docs
|
|
367
367
|
*/
|
|
368
368
|
tasty(options?: GlazeTokenOptions): Record<string, Record<string, string>>;
|
|
369
369
|
/** Export as plain JSON. */
|
|
@@ -457,7 +457,7 @@ interface GlazePalette {
|
|
|
457
457
|
* Export all themes as tasty style-to-state bindings.
|
|
458
458
|
* Uses `#name` color token keys and state aliases (`''`, `@dark`, etc.).
|
|
459
459
|
* Prefix defaults to `true`. Inherits the palette-level `primary`.
|
|
460
|
-
* @see https://
|
|
460
|
+
* @see https://tasty.style/docs
|
|
461
461
|
*/
|
|
462
462
|
tasty(options?: GlazeTokenOptions & GlazePaletteExportOptions): Record<string, Record<string, string>>;
|
|
463
463
|
/** Export all themes as plain JSON grouped by theme name. */
|
package/dist/index.d.mts
CHANGED
|
@@ -319,7 +319,7 @@ interface GlazeColorToken {
|
|
|
319
319
|
/**
|
|
320
320
|
* Export as a tasty style-to-state binding (no color name key).
|
|
321
321
|
* Uses `#name` keys and state aliases (`''`, `@dark`, etc.).
|
|
322
|
-
* @see https://
|
|
322
|
+
* @see https://tasty.style/docs
|
|
323
323
|
*/
|
|
324
324
|
tasty(options?: GlazeTokenOptions): Record<string, string>;
|
|
325
325
|
/** Export as a flat JSON map (no color name key). */
|
|
@@ -363,7 +363,7 @@ interface GlazeTheme {
|
|
|
363
363
|
* Export as tasty style-to-state bindings.
|
|
364
364
|
* Uses `#name` color token keys and state aliases (`''`, `@dark`, etc.).
|
|
365
365
|
* Spread into component styles or register as a recipe via `configure({ recipes })`.
|
|
366
|
-
* @see https://
|
|
366
|
+
* @see https://tasty.style/docs
|
|
367
367
|
*/
|
|
368
368
|
tasty(options?: GlazeTokenOptions): Record<string, Record<string, string>>;
|
|
369
369
|
/** Export as plain JSON. */
|
|
@@ -457,7 +457,7 @@ interface GlazePalette {
|
|
|
457
457
|
* Export all themes as tasty style-to-state bindings.
|
|
458
458
|
* Uses `#name` color token keys and state aliases (`''`, `@dark`, etc.).
|
|
459
459
|
* Prefix defaults to `true`. Inherits the palette-level `primary`.
|
|
460
|
-
* @see https://
|
|
460
|
+
* @see https://tasty.style/docs
|
|
461
461
|
*/
|
|
462
462
|
tasty(options?: GlazeTokenOptions & GlazePaletteExportOptions): Record<string, Record<string, string>>;
|
|
463
463
|
/** Export all themes as plain JSON grouped by theme name. */
|
package/dist/index.mjs
CHANGED
|
@@ -618,7 +618,7 @@ function coarseScan(h, s, lo, hi, yBase, target, epsilon, maxIter) {
|
|
|
618
618
|
function findLightnessForContrast(options) {
|
|
619
619
|
const { hue, saturation, preferredLightness, baseLinearRgb, contrast: contrastInput, lightnessRange = [0, 1], epsilon = 1e-4, maxIterations = 14 } = options;
|
|
620
620
|
const target = resolveMinContrast(contrastInput);
|
|
621
|
-
const searchTarget = target * 1.
|
|
621
|
+
const searchTarget = target * 1.01;
|
|
622
622
|
const yBase = gamutClampedLuminance(baseLinearRgb);
|
|
623
623
|
const crPref = contrastRatioFromLuminance(cachedLuminance(hue, saturation, preferredLightness), yBase);
|
|
624
624
|
if (crPref >= searchTarget) return {
|