@gpichot/spectacle-deck 1.2.10 → 1.2.11
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/colors.d.ts +1 -1
- package/index.cjs +4 -2
- package/index.mjs +4 -2
- package/package.json +1 -1
package/colors.d.ts
CHANGED
package/index.cjs
CHANGED
|
@@ -1331,12 +1331,14 @@ function extractColors(color) {
|
|
|
1331
1331
|
const b = parseInt(hex.substring(4, 6), 16);
|
|
1332
1332
|
return { r, g, b };
|
|
1333
1333
|
}
|
|
1334
|
-
|
|
1334
|
+
return null;
|
|
1335
1335
|
}
|
|
1336
1336
|
function createCssVariables(colors) {
|
|
1337
1337
|
const base = Object.entries(colors).map(([key, value]) => `--color-${key}: ${value};`).join("\n");
|
|
1338
1338
|
const rgbs = Object.entries(colors).map(([key, value]) => {
|
|
1339
|
-
const
|
|
1339
|
+
const color = extractColors(value);
|
|
1340
|
+
if (!color) return "";
|
|
1341
|
+
const { r, g, b } = color;
|
|
1340
1342
|
return `--color-${key}-rgb: ${r}, ${g}, ${b};`;
|
|
1341
1343
|
}).join("\n");
|
|
1342
1344
|
return `${base}
|
package/index.mjs
CHANGED
|
@@ -1284,12 +1284,14 @@ function extractColors(color) {
|
|
|
1284
1284
|
const b = parseInt(hex.substring(4, 6), 16);
|
|
1285
1285
|
return { r, g, b };
|
|
1286
1286
|
}
|
|
1287
|
-
|
|
1287
|
+
return null;
|
|
1288
1288
|
}
|
|
1289
1289
|
function createCssVariables(colors) {
|
|
1290
1290
|
const base = Object.entries(colors).map(([key, value]) => `--color-${key}: ${value};`).join("\n");
|
|
1291
1291
|
const rgbs = Object.entries(colors).map(([key, value]) => {
|
|
1292
|
-
const
|
|
1292
|
+
const color = extractColors(value);
|
|
1293
|
+
if (!color) return "";
|
|
1294
|
+
const { r, g, b } = color;
|
|
1293
1295
|
return `--color-${key}-rgb: ${r}, ${g}, ${b};`;
|
|
1294
1296
|
}).join("\n");
|
|
1295
1297
|
return `${base}
|