@tenphi/glaze 0.16.2 → 0.17.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.
- package/dist/index.cjs +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +7 -7
- package/dist/index.mjs.map +1 -1
- package/docs/api.md +14 -14
- package/docs/methodology.md +3 -3
- package/docs/migration.md +6 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1855,7 +1855,7 @@ function resolveDependentColor(name, def, ctx, isHighContrast, isDark, effective
|
|
|
1855
1855
|
if (!baseResolved) throw new Error(`glaze: base "${baseName}" not yet resolved for "${name}".`);
|
|
1856
1856
|
const mode = def.mode ?? "auto";
|
|
1857
1857
|
const satFactor = clamp(def.saturation ?? 1, 0, 1);
|
|
1858
|
-
const flip = def.
|
|
1858
|
+
const flip = def.autoFlip ?? ctx.config.autoFlip;
|
|
1859
1859
|
const pastel = effectivePastel;
|
|
1860
1860
|
const baseVariant = getSchemeVariant(baseResolved, isDark, isHighContrast);
|
|
1861
1861
|
const baseTone = baseVariant.t * 100;
|
|
@@ -2932,7 +2932,7 @@ function buildStandaloneValueDefs(main, options) {
|
|
|
2932
2932
|
tone: toneOption ?? seedTone,
|
|
2933
2933
|
contrast: options?.contrast,
|
|
2934
2934
|
mode: options?.mode ?? "auto",
|
|
2935
|
-
|
|
2935
|
+
autoFlip: options?.autoFlip,
|
|
2936
2936
|
opacity: options?.opacity,
|
|
2937
2937
|
pastel: options?.pastel,
|
|
2938
2938
|
role: options?.role,
|
|
@@ -3074,7 +3074,7 @@ function createColorToken(input, configOverride) {
|
|
|
3074
3074
|
tone: input.tone,
|
|
3075
3075
|
saturation: input.saturationFactor,
|
|
3076
3076
|
mode: input.mode ?? "auto",
|
|
3077
|
-
|
|
3077
|
+
autoFlip: input.autoFlip,
|
|
3078
3078
|
contrast: input.contrast,
|
|
3079
3079
|
opacity: input.opacity,
|
|
3080
3080
|
pastel: input.pastel,
|
|
@@ -3124,7 +3124,7 @@ function buildOverridesExport(options) {
|
|
|
3124
3124
|
if (options.tone !== void 0) out.tone = options.tone;
|
|
3125
3125
|
if (options.saturationFactor !== void 0) out.saturationFactor = options.saturationFactor;
|
|
3126
3126
|
if (options.mode !== void 0) out.mode = options.mode;
|
|
3127
|
-
if (options.
|
|
3127
|
+
if (options.autoFlip !== void 0) out.autoFlip = options.autoFlip;
|
|
3128
3128
|
if (options.contrast !== void 0) out.contrast = options.contrast;
|
|
3129
3129
|
if (options.opacity !== void 0) out.opacity = options.opacity;
|
|
3130
3130
|
if (options.name !== void 0) out.name = options.name;
|
|
@@ -3141,7 +3141,7 @@ function buildStructuredInputExport(input) {
|
|
|
3141
3141
|
};
|
|
3142
3142
|
if (input.saturationFactor !== void 0) out.saturationFactor = input.saturationFactor;
|
|
3143
3143
|
if (input.mode !== void 0) out.mode = input.mode;
|
|
3144
|
-
if (input.
|
|
3144
|
+
if (input.autoFlip !== void 0) out.autoFlip = input.autoFlip;
|
|
3145
3145
|
if (input.opacity !== void 0) out.opacity = input.opacity;
|
|
3146
3146
|
if (input.contrast !== void 0) out.contrast = input.contrast;
|
|
3147
3147
|
if (input.name !== void 0) out.name = input.name;
|
|
@@ -3163,7 +3163,7 @@ function rehydrateOverrides(data) {
|
|
|
3163
3163
|
if (data.tone !== void 0) out.tone = data.tone;
|
|
3164
3164
|
if (data.saturationFactor !== void 0) out.saturationFactor = data.saturationFactor;
|
|
3165
3165
|
if (data.mode !== void 0) out.mode = data.mode;
|
|
3166
|
-
if (data.
|
|
3166
|
+
if (data.autoFlip !== void 0) out.autoFlip = data.autoFlip;
|
|
3167
3167
|
if (data.contrast !== void 0) out.contrast = data.contrast;
|
|
3168
3168
|
if (data.opacity !== void 0) out.opacity = data.opacity;
|
|
3169
3169
|
if (data.name !== void 0) out.name = data.name;
|
|
@@ -3180,7 +3180,7 @@ function rehydrateStructuredInput(data) {
|
|
|
3180
3180
|
};
|
|
3181
3181
|
if (data.saturationFactor !== void 0) out.saturationFactor = data.saturationFactor;
|
|
3182
3182
|
if (data.mode !== void 0) out.mode = data.mode;
|
|
3183
|
-
if (data.
|
|
3183
|
+
if (data.autoFlip !== void 0) out.autoFlip = data.autoFlip;
|
|
3184
3184
|
if (data.opacity !== void 0) out.opacity = data.opacity;
|
|
3185
3185
|
if (data.contrast !== void 0) out.contrast = data.contrast;
|
|
3186
3186
|
if (data.name !== void 0) out.name = data.name;
|