mirror of
https://github.com/Sevichecc/Urara-Blog.git
synced 2025-05-02 15:39:31 +08:00
16 lines
632 B
Text
16 lines
632 B
Text
"use strict";
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
Object.defineProperty(exports, "default", {
|
|
enumerable: true,
|
|
get: ()=>_default
|
|
});
|
|
const flattenColorPalette = (colors)=>Object.assign({}, ...Object.entries(colors !== null && colors !== void 0 ? colors : {}).flatMap(([color, values])=>typeof values == "object" ? Object.entries(flattenColorPalette(values)).map(([number, hex])=>({
|
|
[color + (number === "DEFAULT" ? "" : `-${number}`)]: hex
|
|
})) : [
|
|
{
|
|
[`${color}`]: values
|
|
}
|
|
]));
|
|
const _default = flattenColorPalette;
|