@diskette/palette 0.16.0 → 0.18.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/cli/commands/generate.js +1 -1
- package/dist/css.js +0 -6
- package/dist/index.d.ts +3754 -3722
- package/dist/index.js +3 -2
- package/package.json +1 -3
|
@@ -56,7 +56,7 @@ export const generate = command({
|
|
|
56
56
|
const outputPath = resolve(process.cwd(), argv.flags.output);
|
|
57
57
|
mkdirSync(outputPath, { recursive: true });
|
|
58
58
|
for (const name of selectedColors) {
|
|
59
|
-
const palette = colors
|
|
59
|
+
const palette = colors[name];
|
|
60
60
|
writeFileSync(`${outputPath}/${name}.css`, css.palette(name, palette, { schemes: ['light'], alpha: true }));
|
|
61
61
|
writeFileSync(`${outputPath}/${name}-dark.css`, css.palette(name, palette, { schemes: ['dark'], alpha: true }));
|
|
62
62
|
console.log(` ${name}.css, ${name}-dark.css`);
|
package/dist/css.js
CHANGED
|
@@ -15,10 +15,6 @@ function palette(name, config, options = {}) {
|
|
|
15
15
|
const selector = schemeSelector(scheme);
|
|
16
16
|
const srgbScale = isLight ? config.srgb.light : config.srgb.dark;
|
|
17
17
|
const p3Scale = isLight ? config.p3.light : config.p3.dark;
|
|
18
|
-
const srgbSurface = isLight
|
|
19
|
-
? config.surface.srgb.light
|
|
20
|
-
: config.surface.srgb.dark;
|
|
21
|
-
const p3Surface = isLight ? config.surface.p3.light : config.surface.p3.dark;
|
|
22
18
|
const srgb = [];
|
|
23
19
|
const p3 = [];
|
|
24
20
|
for (const n of steps) {
|
|
@@ -31,8 +27,6 @@ function palette(name, config, options = {}) {
|
|
|
31
27
|
p3.push(`--${name}-a${n}: ${p3Scale[`${name}A${n}`]}`);
|
|
32
28
|
}
|
|
33
29
|
}
|
|
34
|
-
srgb.push(`--${name}-surface: ${srgbSurface}`);
|
|
35
|
-
p3.push(`--${name}-surface: ${p3Surface}`);
|
|
36
30
|
output.push(formatRule(selector, srgb));
|
|
37
31
|
output.push(formatP3(selector, p3));
|
|
38
32
|
}
|