@a_ng_d/utils-ui-color-palette 1.6.2 → 1.6.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.
@@ -1,53 +1,53 @@
1
1
  var E = Object.defineProperty;
2
- var N = (c, h, a) => h in c ? E(c, h, { enumerable: !0, configurable: !0, writable: !0, value: a }) : c[h] = a;
3
- var b = (c, h, a) => N(c, typeof h != "symbol" ? h + "" : h, a);
2
+ var w = (i, h, a) => h in i ? E(i, h, { enumerable: !0, configurable: !0, writable: !0, value: a }) : i[h] = a;
3
+ var b = (i, h, a) => w(i, typeof h != "symbol" ? h + "" : h, a);
4
4
  import { c as k } from "../../index-Beb8qoyd.js";
5
- const w = (c) => {
6
- const h = c.themes.filter((o) => o.type === "custom theme").length === 0 ? c.themes.filter((o) => o.type === "default theme") : c.themes.filter((o) => o.type === "custom theme"), a = {}, n = (o) => (isNaN(o.hsl[0]) && (o.hsl[0] = 0), isNaN(o.lch[2]) && (o.lch[2] = 0), isNaN(o.oklch[2]) && (o.oklch[2] = 0), {
5
+ const N = (i) => {
6
+ const h = i.themes.filter((t) => t.type === "custom theme").length === 0 ? i.themes.filter((t) => t.type === "default theme") : i.themes.filter((t) => t.type === "custom theme"), a = {}, l = (t) => (isNaN(t.hsl[0]) && (t.hsl[0] = 0), isNaN(t.lch[2]) && (t.lch[2] = 0), isNaN(t.oklch[2]) && (t.oklch[2] = 0), {
7
7
  rgb: {
8
- r: Math.floor(o.rgb[0]),
9
- g: Math.floor(o.rgb[1]),
10
- b: Math.floor(o.rgb[2])
8
+ r: Math.floor(t.rgb[0]),
9
+ g: Math.floor(t.rgb[1]),
10
+ b: Math.floor(t.rgb[2])
11
11
  },
12
12
  gl: {
13
- r: parseFloat(o.gl[0].toFixed(3)),
14
- g: parseFloat(o.gl[1].toFixed(3)),
15
- b: parseFloat(o.gl[2].toFixed(3))
13
+ r: parseFloat(t.gl[0].toFixed(3)),
14
+ g: parseFloat(t.gl[1].toFixed(3)),
15
+ b: parseFloat(t.gl[2].toFixed(3))
16
16
  },
17
17
  lch: {
18
- l: Math.floor(o.lch[0]),
19
- c: Math.floor(o.lch[1]),
20
- h: Math.floor(o.lch[2])
18
+ l: Math.floor(t.lch[0]),
19
+ c: Math.floor(t.lch[1]),
20
+ h: Math.floor(t.lch[2])
21
21
  },
22
22
  oklch: {
23
- l: parseFloat(o.oklch[0].toFixed(3)),
24
- c: parseFloat(o.oklch[1].toFixed(3)),
25
- h: Math.floor(o.oklch[2])
23
+ l: parseFloat(t.oklch[0].toFixed(3)),
24
+ c: parseFloat(t.oklch[1].toFixed(3)),
25
+ h: Math.floor(t.oklch[2])
26
26
  },
27
27
  lab: {
28
- l: Math.floor(o.lab[0]),
29
- a: Math.floor(o.lab[1]),
30
- b: Math.floor(o.lab[2])
28
+ l: Math.floor(t.lab[0]),
29
+ a: Math.floor(t.lab[1]),
30
+ b: Math.floor(t.lab[2])
31
31
  },
32
32
  oklab: {
33
- l: parseFloat(o.oklab[0].toFixed(3)),
34
- a: parseFloat(o.oklab[1].toFixed(3)),
35
- b: parseFloat(o.oklab[2].toFixed(3))
33
+ l: parseFloat(t.oklab[0].toFixed(3)),
34
+ a: parseFloat(t.oklab[1].toFixed(3)),
35
+ b: parseFloat(t.oklab[2].toFixed(3))
36
36
  },
37
37
  hsl: {
38
- h: Math.floor(o.hsl[0]),
39
- s: Math.floor(o.hsl[1] * 100),
40
- l: Math.floor(o.hsl[2] * 100)
38
+ h: Math.floor(t.hsl[0]),
39
+ s: Math.floor(t.hsl[1] * 100),
40
+ l: Math.floor(t.hsl[2] * 100)
41
41
  },
42
42
  hsluv: {
43
- h: Math.floor(o.hsluv[0]),
44
- s: Math.floor(o.hsluv[1]),
45
- l: Math.floor(o.hsluv[2])
43
+ h: Math.floor(t.hsluv[0]),
44
+ s: Math.floor(t.hsluv[1]),
45
+ l: Math.floor(t.hsluv[2])
46
46
  },
47
- hex: o.hex,
48
- description: o.description,
47
+ hex: t.hex,
48
+ description: t.description,
49
49
  type: "color shade/tint"
50
- }), s = (o, e) => ({
50
+ }), s = (t, e) => ({
51
51
  rgb: {
52
52
  r: Math.floor(e.rgb[0]),
53
53
  g: Math.floor(e.rgb[1]),
@@ -89,58 +89,58 @@ const w = (c) => {
89
89
  l: Math.floor(e.hsluv[2])
90
90
  },
91
91
  hex: e.hex,
92
- alpha: o.alpha,
93
- description: o.description,
92
+ alpha: t.alpha,
93
+ description: t.description,
94
94
  type: "color shade/tint"
95
95
  });
96
- return h[0].type === "custom theme" ? h.forEach((o) => {
97
- a[o.name] = {}, o.colors.forEach((e) => {
98
- const t = e.shades.find(
99
- (i) => i.type === "source color"
96
+ return h[0].type === "custom theme" ? h.forEach((t) => {
97
+ a[t.name] = {}, t.colors.forEach((e) => {
98
+ const o = e.shades.find(
99
+ (c) => c.type === "source color"
100
100
  );
101
- a[o.name][e.name] = {}, e.shades.forEach((i) => {
102
- i && t && (a[o.name][e.name][i.name] = i.isTransparent ? s(i, t) : n(i));
103
- }), a[o.name][e.name].description = e.description, a[o.name][e.name].type = "color";
104
- }), a[o.name].description = o.description, a[o.name].type = "color mode";
105
- }) : h.forEach((o) => {
106
- o.colors.forEach((e) => {
107
- const t = e.shades.find(
108
- (i) => i.type === "source color"
101
+ a[t.name][e.name] = {}, e.shades.forEach((c) => {
102
+ c && o && (a[t.name][e.name][c.name] = c.isTransparent ? s(c, o) : l(c));
103
+ }), a[t.name][e.name].description = e.description, a[t.name][e.name].type = "color";
104
+ }), a[t.name].description = t.description, a[t.name].type = "color mode";
105
+ }) : h.forEach((t) => {
106
+ t.colors.forEach((e) => {
107
+ const o = e.shades.find(
108
+ (c) => c.type === "source color"
109
109
  );
110
- a[e.name] = {}, e.shades.forEach((i) => {
111
- i && t && (a[e.name][i.name] = i.isTransparent ? s(i, t) : n(i));
110
+ a[e.name] = {}, e.shades.forEach((c) => {
111
+ c && o && (a[e.name][c.name] = c.isTransparent ? s(c, o) : l(c));
112
112
  }), a[e.name].description = e.description, a[e.name].type = "color";
113
113
  });
114
- }), a.description = c.description, a.type = "color palette", JSON.stringify(a, null, " ");
114
+ }), a.description = i.description, a.type = "color palette", JSON.stringify(a, null, " ");
115
115
  };
116
- var T = Object.defineProperty, d = (c, h, a) => h in c ? T(c, h, { enumerable: !0, configurable: !0, writable: !0, value: a }) : c[h] = a, C = (c, h, a) => d(c, typeof h != "symbol" ? h + "" : h, a);
116
+ var T = Object.defineProperty, d = (i, h, a) => h in i ? T(i, h, { enumerable: !0, configurable: !0, writable: !0, value: a }) : i[h] = a, C = (i, h, a) => d(i, typeof h != "symbol" ? h + "" : h, a);
117
117
  class $ {
118
118
  constructor(h) {
119
119
  C(this, "string"), C(this, "doSnakeCase", () => this.string.toLowerCase().split(" ").join("_").replace(/[@/$^%#&!?.,;:+=<>(){}"«»]/g, "")), C(this, "doPascalCase", () => this.string.charAt(0).toUpperCase() + this.string.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g, (a) => a.toUpperCase()).replace(/[@/$^%#&!?.,;:+=<>(){}"«» ]/g, "").slice(1)), C(this, "doKebabCase", () => this.string.toLowerCase().split(" ").join("-").replace(/[@/$^%#&!?.,;:+=<>(){}"«»]/g, "")), C(this, "doCamelCase", () => this.string.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g, (a) => a.toUpperCase()).replace(/[@/$^%#&!?.,;:+=<>(){}"«» ]/g, "")), this.string = h;
120
120
  }
121
121
  }
122
- const v = (c) => {
123
- const h = c.themes.filter((n) => n.type === "custom theme").length === 0 ? c.themes.filter((n) => n.type === "default theme") : c.themes.filter((n) => n.type === "custom theme"), a = [];
124
- return h.forEach((n) => {
122
+ const v = (i) => {
123
+ const h = i.themes.filter((l) => l.type === "custom theme").length === 0 ? i.themes.filter((l) => l.type === "default theme") : i.themes.filter((l) => l.type === "custom theme"), a = [];
124
+ return h.forEach((l) => {
125
125
  const s = [];
126
- n.colors.forEach((o) => {
127
- const e = o.shades.find((t) => t.type === "source color");
128
- s.push(`// ${o.name}`), o.shades.reverse().forEach((t) => {
126
+ l.colors.forEach((t) => {
127
+ const e = t.shades.find((o) => o.type === "source color");
128
+ s.push(`// ${t.name}`), t.shades.reverse().forEach((o) => {
129
129
  s.push(
130
- t.isTransparent ? `static let ${new $(o.name).doPascalCase()}${t.name === "source" ? "Source" : t.name} = UIColor(red: ${e == null ? void 0 : e.gl[0].toFixed(
130
+ o.isTransparent ? `static let ${new $(t.name).doPascalCase()}${o.name === "source" ? "Source" : o.name} = UIColor(red: ${e == null ? void 0 : e.gl[0].toFixed(
131
131
  3
132
132
  )}, green: ${e == null ? void 0 : e.gl[1].toFixed(3)}, blue: ${e == null ? void 0 : e.gl[2].toFixed(
133
133
  3
134
- )}, alpha: ${t.alpha ?? 1})` : `static let ${new $(o.name).doPascalCase()}${t.name === "source" ? "Source" : t.name} = UIColor(red: ${t.gl[0].toFixed(
134
+ )}, alpha: ${o.alpha ?? 1})` : `static let ${new $(t.name).doPascalCase()}${o.name === "source" ? "Source" : o.name} = UIColor(red: ${o.gl[0].toFixed(
135
135
  3
136
- )}, green: ${t.gl[1].toFixed(3)}, blue: ${t.gl[2].toFixed(
136
+ )}, green: ${o.gl[1].toFixed(3)}, blue: ${o.gl[2].toFixed(
137
137
  3
138
138
  )})`
139
139
  );
140
140
  }), s.push("");
141
141
  }), s.pop(), h[0].type === "custom theme" ? a.push(
142
- `// ${n.name}
143
- struct ${new $(n.name).doPascalCase()} {
142
+ `// ${l.name}
143
+ struct ${new $(l.name).doPascalCase()} {
144
144
  ${s.join(
145
145
  `
146
146
  `
@@ -155,95 +155,95 @@ struct Color {
155
155
 
156
156
  `)}
157
157
  }`;
158
- }, K = (c) => {
159
- const h = c.themes.filter((n) => n.type === "custom theme").length === 0 ? c.themes.filter((n) => n.type === "default theme") : c.themes.filter((n) => n.type === "custom theme");
158
+ }, S = (i) => {
159
+ const h = i.themes.filter((l) => l.type === "custom theme").length === 0 ? i.themes.filter((l) => l.type === "default theme") : i.themes.filter((l) => l.type === "custom theme");
160
160
  let a = `@import "tailwindcss";
161
161
 
162
162
  @theme {
163
163
  --color-*: initial;
164
164
 
165
165
  `;
166
- return h[0].type !== "custom theme" ? h.forEach((n) => {
167
- n.colors.forEach((s) => {
168
- const o = s.shades.find(
169
- (l) => l.type === "source color"
166
+ return h[0].type !== "custom theme" ? h.forEach((l) => {
167
+ l.colors.forEach((s) => {
168
+ const t = s.shades.find(
169
+ (n) => n.type === "source color"
170
170
  ), e = new $(s.name).doKebabCase();
171
171
  a += ` /* ${s.name} */
172
- `, s.shades.sort().forEach((l) => {
173
- const m = l.isTransparent ? k((o == null ? void 0 : o.hex) ?? "#000000").alpha(l.alpha ?? 1).hex() : l.hex, r = new $(l.name).doKebabCase();
172
+ `, s.shades.sort().forEach((n) => {
173
+ const m = n.isTransparent ? k((t == null ? void 0 : t.hex) ?? "#000000").alpha(n.alpha ?? 1).hex() : n.hex, r = new $(n.name).doKebabCase();
174
174
  a += ` --color-${e}-${r}: ${m};
175
175
  `;
176
176
  });
177
- const t = s === n.colors[n.colors.length - 1], i = n === h[h.length - 1];
178
- t && i || (a += `
177
+ const o = s === l.colors[l.colors.length - 1], c = l === h[h.length - 1];
178
+ o && c || (a += `
179
179
  `);
180
180
  });
181
- }) : h.forEach((n) => {
182
- const s = new $(n.name).doKebabCase();
183
- n.colors.forEach((o) => {
184
- const e = o.shades.find(
181
+ }) : h.forEach((l) => {
182
+ const s = new $(l.name).doKebabCase();
183
+ l.colors.forEach((t) => {
184
+ const e = t.shades.find(
185
185
  (m) => m.type === "source color"
186
- ), t = new $(o.name).doKebabCase();
187
- a += ` /* ${n.name} - ${o.name} */
188
- `, o.shades.forEach((m) => {
186
+ ), o = new $(t.name).doKebabCase();
187
+ a += ` /* ${l.name} - ${t.name} */
188
+ `, t.shades.forEach((m) => {
189
189
  const r = m.isTransparent ? k((e == null ? void 0 : e.hex) ?? "#000000").alpha(m.alpha ?? 1).hex() : m.hex, p = new $(m.name).doKebabCase();
190
- a += ` --color-${s}-${t}-${p}: ${r};
190
+ a += ` --color-${s}-${o}-${p}: ${r};
191
191
  `;
192
192
  });
193
- const i = o === n.colors[n.colors.length - 1], l = n === h[h.length - 1];
194
- i && l || (a += `
193
+ const c = t === l.colors[l.colors.length - 1], n = l === h[h.length - 1];
194
+ c && n || (a += `
195
195
  `);
196
196
  });
197
197
  }), a += `}
198
198
  `, a;
199
- }, S = (c) => {
200
- const h = c.themes.filter((n) => n.type === "custom theme").length === 0 ? c.themes.filter((n) => n.type === "default theme") : c.themes.filter((n) => n.type === "custom theme"), a = {
199
+ }, K = (i) => {
200
+ const h = i.themes.filter((l) => l.type === "custom theme").length === 0 ? i.themes.filter((l) => l.type === "default theme") : i.themes.filter((l) => l.type === "custom theme"), a = {
201
201
  theme: {
202
202
  colors: {}
203
203
  }
204
204
  };
205
- return c.themes[0].colors.forEach((n) => {
206
- a.theme.colors[new $(n.name).doKebabCase()] = {};
207
- }), h[0].type === "custom theme" ? h.forEach((n) => {
208
- n.colors.forEach((s) => {
209
- const o = s.shades.find(
205
+ return i.themes[0].colors.forEach((l) => {
206
+ a.theme.colors[new $(l.name).doKebabCase()] = {};
207
+ }), h[0].type === "custom theme" ? h.forEach((l) => {
208
+ l.colors.forEach((s) => {
209
+ const t = s.shades.find(
210
210
  (e) => e.type === "source color"
211
211
  );
212
- a.theme.colors[new $(s.name).doKebabCase()][new $(n.name).doKebabCase()] = {}, s.shades.forEach((e) => {
213
- a.theme.colors[new $(s.name).doKebabCase()][new $(n.name).doKebabCase()][new $(e.name).doKebabCase()] = e.isTransparent ? k((o == null ? void 0 : o.hex) ?? "#000000").alpha(e.alpha ?? 1).hex() : e.hex;
212
+ a.theme.colors[new $(s.name).doKebabCase()][new $(l.name).doKebabCase()] = {}, s.shades.forEach((e) => {
213
+ a.theme.colors[new $(s.name).doKebabCase()][new $(l.name).doKebabCase()][new $(e.name).doKebabCase()] = e.isTransparent ? k((t == null ? void 0 : t.hex) ?? "#000000").alpha(e.alpha ?? 1).hex() : e.hex;
214
214
  });
215
215
  });
216
- }) : h.forEach((n) => {
217
- n.colors.forEach((s) => {
218
- const o = s.shades.find(
216
+ }) : h.forEach((l) => {
217
+ l.colors.forEach((s) => {
218
+ const t = s.shades.find(
219
219
  (e) => e.type === "source color"
220
220
  );
221
221
  a.theme.colors[new $(s.name).doKebabCase()] = {}, s.shades.sort().forEach((e) => {
222
- a.theme.colors[new $(s.name).doKebabCase()][new $(e.name).doKebabCase()] = e.isTransparent ? k((o == null ? void 0 : o.hex) ?? "#000000").alpha(e.alpha ?? 1).hex() : e.hex;
222
+ a.theme.colors[new $(s.name).doKebabCase()][new $(e.name).doKebabCase()] = e.isTransparent ? k((t == null ? void 0 : t.hex) ?? "#000000").alpha(e.alpha ?? 1).hex() : e.hex;
223
223
  });
224
224
  });
225
225
  }), `/** @type {import('tailwindcss').Config} */
226
226
  module.exports = ${JSON.stringify(a, null, " ")}`;
227
- }, L = (c) => {
228
- const h = c.themes.filter((n) => n.type === "custom theme").length === 0 ? c.themes.filter((n) => n.type === "default theme") : c.themes.filter((n) => n.type === "custom theme"), a = [];
229
- return h.forEach((n) => {
230
- n.colors.forEach((s) => {
231
- const o = s.shades.find((t) => t.type === "source color"), e = [];
227
+ }, L = (i) => {
228
+ const h = i.themes.filter((l) => l.type === "custom theme").length === 0 ? i.themes.filter((l) => l.type === "default theme") : i.themes.filter((l) => l.type === "custom theme"), a = [];
229
+ return h.forEach((l) => {
230
+ l.colors.forEach((s) => {
231
+ const t = s.shades.find((o) => o.type === "source color"), e = [];
232
232
  e.push(
233
- `// ${h[0].type === "custom theme" ? n.name + " - " : ""}${s.name}`
234
- ), s.shades.reverse().forEach((t) => {
233
+ `// ${h[0].type === "custom theme" ? l.name + " - " : ""}${s.name}`
234
+ ), s.shades.reverse().forEach((o) => {
235
235
  e.push(
236
- t.isTransparent ? `public let ${h[0].type === "custom theme" ? new $(n.name + " " + s.name).doPascalCase() : new $(s.name).doPascalCase()}${t.name === "source" ? "Source" : t.name} = Color(red: ${o == null ? void 0 : o.gl[0].toFixed(
236
+ o.isTransparent ? `public let ${h[0].type === "custom theme" ? new $(l.name + " " + s.name).doPascalCase() : new $(s.name).doPascalCase()}${o.name === "source" ? "Source" : o.name} = Color(red: ${t == null ? void 0 : t.gl[0].toFixed(
237
237
  3
238
- )}, green: ${o == null ? void 0 : o.gl[1].toFixed(3)}, blue: ${t.gl[2].toFixed(
238
+ )}, green: ${t == null ? void 0 : t.gl[1].toFixed(3)}, blue: ${o.gl[2].toFixed(
239
239
  3
240
- )}).opacity(${t.alpha ?? 1})` : `public let ${h[0].type === "custom theme" ? new $(n.name + " " + s.name).doPascalCase() : new $(s.name).doPascalCase()}${t.name === "source" ? "Source" : t.name} = Color(red: ${t.gl[0].toFixed(
240
+ )}).opacity(${o.alpha ?? 1})` : `public let ${h[0].type === "custom theme" ? new $(l.name + " " + s.name).doPascalCase() : new $(s.name).doPascalCase()}${o.name === "source" ? "Source" : o.name} = Color(red: ${o.gl[0].toFixed(
241
241
  3
242
- )}, green: ${t.gl[1].toFixed(3)}, blue: ${t.gl[2].toFixed(
242
+ )}, green: ${o.gl[1].toFixed(3)}, blue: ${o.gl[2].toFixed(
243
243
  3
244
244
  )})`
245
245
  );
246
- }), e.push(""), e.forEach((t) => a.push(t));
246
+ }), e.push(""), e.forEach((o) => a.push(o));
247
247
  });
248
248
  }), a.pop(), `import SwiftUI
249
249
 
@@ -256,41 +256,41 @@ public extension Color {
256
256
  )}
257
257
  }
258
258
  }`;
259
- }, j = (c) => {
260
- const h = c.themes.filter((s) => s.type === "custom theme").length === 0 ? c.themes.filter((s) => s.type === "default theme") : c.themes.filter((s) => s.type === "custom theme"), a = {
259
+ }, j = (i) => {
260
+ const h = i.themes.filter((s) => s.type === "custom theme").length === 0 ? i.themes.filter((s) => s.type === "default theme") : i.themes.filter((s) => s.type === "custom theme"), a = {
261
261
  color: {}
262
- }, n = (s, o, e) => ({
262
+ }, l = (s, t, e) => ({
263
263
  type: "color",
264
- value: o.isTransparent ? k(e.hex).alpha(o.alpha ?? 1).hex() : o.hex,
265
- comment: s.description !== "" ? s.description + " - " + o.description : o.description
264
+ value: t.isTransparent ? k(e.hex).alpha(t.alpha ?? 1).hex() : t.hex,
265
+ comment: s.description !== "" ? s.description + " - " + t.description : t.description
266
266
  });
267
- return c.themes[0].colors.forEach((s) => {
267
+ return i.themes[0].colors.forEach((s) => {
268
268
  a.color[s.name] = {};
269
269
  }), h[0].type === "custom theme" ? h.forEach((s) => {
270
- s.colors.forEach((o) => {
271
- const e = o.shades.find(
272
- (t) => t.type === "source color"
270
+ s.colors.forEach((t) => {
271
+ const e = t.shades.find(
272
+ (o) => o.type === "source color"
273
273
  );
274
- a.color[o.name][s.name] = {}, o.shades.forEach((t) => {
275
- t && e && (a.color[o.name][s.name][t.name] = n(
276
- o,
274
+ a.color[t.name][s.name] = {}, t.shades.forEach((o) => {
275
+ o && e && (a.color[t.name][s.name][o.name] = l(
277
276
  t,
277
+ o,
278
278
  e
279
279
  ));
280
280
  });
281
281
  });
282
282
  }) : h.forEach((s) => {
283
- s.colors.forEach((o) => {
284
- const e = o.shades.find(
285
- (t) => t.type === "source color"
283
+ s.colors.forEach((t) => {
284
+ const e = t.shades.find(
285
+ (o) => o.type === "source color"
286
286
  );
287
- a.color[o.name] = {}, o.shades.forEach((t) => {
288
- t && e && (a.color[o.name][t.name] = n(o, t, e));
287
+ a.color[t.name] = {}, t.shades.forEach((o) => {
288
+ o && e && (a.color[t.name][o.name] = l(t, o, e));
289
289
  });
290
290
  });
291
291
  }), JSON.stringify(a, null, " ");
292
- }, H = (c, h) => {
293
- const a = c.themes.filter((r) => r.type === "custom theme").length === 0 ? c.themes.filter((r) => r.type === "default theme") : c.themes.filter((r) => r.type === "custom theme"), n = [], s = [], o = (r) => {
292
+ }, H = (i, h) => {
293
+ const a = i.themes.filter((r) => r.type === "custom theme").length === 0 ? i.themes.filter((r) => r.type === "default theme") : i.themes.filter((r) => r.type === "custom theme"), l = [], s = [], t = (r) => {
294
294
  var f;
295
295
  isNaN(r.hsl[0]) && (r.hsl[0] = 0), isNaN(r.lch[2]) && (r.lch[2] = 0), isNaN(r.oklch[2]) && (r.oklch[2] = 0);
296
296
  const p = {
@@ -336,20 +336,20 @@ public extension Color {
336
336
  }
337
337
  };
338
338
  return (g = f[h ?? "RGB"]) == null ? void 0 : g.call(f);
339
- }, t = a.find(
339
+ }, o = a.find(
340
340
  (r) => r.type === "default theme"
341
341
  );
342
- if (t) {
342
+ if (o) {
343
343
  const r = [];
344
- return t.colors.forEach((p, f) => {
344
+ return o.colors.forEach((p, f) => {
345
345
  f > 0 && r.push(""), r.push(`// ${p.name}`), p.shades.reverse().forEach((g) => {
346
346
  const u = p.shades.find((y) => y.type === "source color"), x = `$${new $(p.name).doKebabCase()}-${g.name}`;
347
347
  u && r.push(
348
- `${x}: ${g.isTransparent ? e(g, u) : o(g)};`
348
+ `${x}: ${g.isTransparent ? e(g, u) : t(g)};`
349
349
  );
350
350
  });
351
- }), n.push(r.join(`
352
- `)), n.join(`
351
+ }), l.push(r.join(`
352
+ `)), l.join(`
353
353
  `);
354
354
  }
355
355
  a.forEach((r) => {
@@ -358,25 +358,25 @@ public extension Color {
358
358
  u > 0 && f.push(""), f.push(` // ${g.name}`), g.shades.reverse().forEach((x) => {
359
359
  const y = g.shades.find((F) => F.type === "source color"), M = `--${new $(g.name).doKebabCase()}-${x.name}`;
360
360
  y && f.push(
361
- ` ${M}: ${x.isTransparent ? e(x, y) : o(x)};`
361
+ ` ${M}: ${x.isTransparent ? e(x, y) : t(x)};`
362
362
  );
363
363
  });
364
- }), f.push("}"), n.push(f.join(`
364
+ }), f.push("}"), l.push(f.join(`
365
365
  `));
366
366
  });
367
- const i = /* @__PURE__ */ new Set();
367
+ const c = /* @__PURE__ */ new Set();
368
368
  if (a.forEach((r) => {
369
369
  r.colors.forEach((p) => {
370
370
  p.shades.forEach((f) => {
371
371
  if (p.shades.find((u) => u.type === "source color")) {
372
372
  const x = `--${new $(p.name).doKebabCase()}-${f.name}`;
373
- i.add(x);
373
+ c.add(x);
374
374
  }
375
375
  });
376
376
  });
377
- }), i.size > 0) {
377
+ }), c.size > 0) {
378
378
  const r = /* @__PURE__ */ new Map();
379
- i.forEach((p) => {
379
+ c.forEach((p) => {
380
380
  const f = p.match(/--([a-zA-Z0-9-]+)-([a-zA-Z0-9-]+)/);
381
381
  if (f) {
382
382
  const g = f[1];
@@ -388,16 +388,16 @@ public extension Color {
388
388
  s.push(
389
389
  `// ${f.charAt(0).toUpperCase() + f.slice(1)}`
390
390
  ), s.push(...p), s.push("");
391
- }), s.length > 0 && s[s.length - 1] === "" && s.pop(), n.push(s.join(`
391
+ }), s.length > 0 && s[s.length - 1] === "" && s.pop(), l.push(s.join(`
392
392
  `));
393
393
  }
394
- const l = [":root {"];
394
+ const n = [":root {"];
395
395
  a.forEach((r, p) => {
396
396
  const f = new $(r.name).doKebabCase();
397
- l.push(` &[data-theme="${f}"] {
397
+ n.push(` &[data-theme="${f}"] {
398
398
  @include ${f};
399
- }`), p !== a.length - 1 && l.push("");
400
- }), l.push("}"), n.push(l.join(`
399
+ }`), p !== a.length - 1 && n.push("");
400
+ }), n.push("}"), l.push(n.join(`
401
401
  `));
402
402
  const m = [];
403
403
  return a.forEach((r) => {
@@ -405,23 +405,23 @@ public extension Color {
405
405
  m.push(`.${p} {
406
406
  @include ${p};
407
407
  }`);
408
- }), n.push(m.join(`
408
+ }), l.push(m.join(`
409
409
 
410
- `)), n.join(`
410
+ `)), l.join(`
411
411
 
412
412
  `);
413
- }, V = (c) => {
414
- const h = c.themes.filter((n) => n.type === "custom theme").length === 0 ? c.themes.filter((n) => n.type === "default theme") : c.themes.filter((n) => n.type === "custom theme"), a = [];
415
- return h.forEach((n) => {
416
- n.colors.forEach((s) => {
417
- const o = s.shades.find((t) => t.type === "source color"), e = [];
413
+ }, V = (i) => {
414
+ const h = i.themes.filter((l) => l.type === "custom theme").length === 0 ? i.themes.filter((l) => l.type === "default theme") : i.themes.filter((l) => l.type === "custom theme"), a = [];
415
+ return h.forEach((l) => {
416
+ l.colors.forEach((s) => {
417
+ const t = s.shades.find((o) => o.type === "source color"), e = [];
418
418
  e.push(
419
- `<!--${h[0].type === "custom theme" ? `${n.name} - ${s.name}-->` : `${s.name}-->`}`
420
- ), s.shades.reverse().forEach((t) => {
419
+ `<!--${h[0].type === "custom theme" ? `${l.name} - ${s.name}-->` : `${s.name}-->`}`
420
+ ), s.shades.reverse().forEach((o) => {
421
421
  e.push(
422
- `<color name="${h[0].type === "custom theme" ? new $(n.name + " " + s.name).doSnakeCase() : new $(s.name).doSnakeCase()}_${t.name}">${t.isTransparent ? k((o == null ? void 0 : o.hex) ?? "#000000").alpha(t.alpha ?? 1).hex() : t.hex}</color>`
422
+ `<color name="${h[0].type === "custom theme" ? new $(l.name + " " + s.name).doSnakeCase() : new $(s.name).doSnakeCase()}_${o.name}">${o.isTransparent ? k((t == null ? void 0 : t.hex) ?? "#000000").alpha(o.alpha ?? 1).hex() : o.hex}</color>`
423
423
  );
424
- }), e.push(""), e.forEach((t) => a.push(t));
424
+ }), e.push(""), e.forEach((o) => a.push(o));
425
425
  });
426
426
  }), a.pop(), `<?xml version="1.0" encoding="utf-8"?>
427
427
  <resources>
@@ -430,145 +430,146 @@ public extension Color {
430
430
  `
431
431
  )}
432
432
  </resources>`;
433
- }, B = (c) => {
434
- const h = c.themes.filter((o) => o.type === "custom theme").length === 0 ? c.themes.filter((o) => o.type === "default theme") : c.themes.filter((o) => o.type === "custom theme"), a = {
435
- $themes: [],
433
+ }, B = (i) => {
434
+ const h = i.name, a = (e, o, c) => ({
435
+ $type: "color",
436
+ $value: o.isTransparent ? k(c.hex).alpha(o.alpha ?? 1).hex() : o.hex,
437
+ $description: e.description !== "" ? e.description + " - " + o.description : o.description
438
+ }), l = (e, o) => ({
439
+ name: e,
440
+ group: "Modes",
441
+ description: o,
442
+ selectedTokenSets: {
443
+ [`${h}/${e}`]: "enabled"
444
+ }
445
+ }), s = i.themes.filter((e) => e.type === "custom theme").length === 0 ? i.themes.filter((e) => e.type === "default theme") : i.themes.filter((e) => e.type === "custom theme"), t = {
446
+ $themes: s.filter((e) => e.type === "custom theme").map((e) => l(e.name, e.description)),
436
447
  $metadata: {
437
448
  activeThemes: [],
438
- tokenSetOrder: [],
449
+ tokenSetOrder: s.filter((e) => e.type === "custom theme").map(
450
+ (e) => `${new $(h).doSnakeCase()}/${new $(e.name).doSnakeCase()}`
451
+ ),
439
452
  activeSets: []
440
453
  }
441
- }, n = c.name, s = (o, e, t) => ({
442
- $type: "color",
443
- $value: e.isTransparent ? k(t.hex).alpha(e.alpha ?? 1).hex() : e.hex,
444
- $description: o.description !== "" ? o.description + " - " + e.description : e.description
445
- });
446
- return h[0].type === "custom theme" ? h.forEach((o) => {
447
- o.colors.forEach((e) => {
448
- const t = e.shades.find(
449
- (i) => i.type === "source color"
454
+ };
455
+ return s[0].type === "custom theme" ? s.forEach((e) => {
456
+ t[`${h}/${e.name}`] = {}, e.colors.forEach((o) => {
457
+ const c = o.shades.find(
458
+ (n) => n.type === "source color"
450
459
  );
451
- a[`${o.name}/${e.name}`] = {}, e.shades.forEach((i) => {
452
- i && t && (a[`${o.name}/${e.name}`][i.name] = s(
453
- e,
454
- i,
455
- t
456
- ));
460
+ o.shades.forEach((n) => {
461
+ n && c && (t[`${h}/${e.name}`][`${new $(o.name).doSnakeCase()}.${n.name}`] = a(o, n, c));
457
462
  });
458
463
  });
459
- }) : h.forEach((o) => {
460
- o.colors.forEach((e) => {
461
- const t = e.shades.find(
462
- (i) => i.type === "source color"
464
+ }) : s.forEach((e) => {
465
+ t[h] = {}, e.colors.forEach((o) => {
466
+ const c = o.shades.find(
467
+ (n) => n.type === "source color"
463
468
  );
464
- a[`${n}/${e.name}`] = {}, e.shades.forEach((i) => {
465
- i && t && (a[`${n}/${e.name}`][i.name] = s(
466
- e,
467
- i,
468
- t
469
- ));
469
+ o.shades.forEach((n) => {
470
+ n && c && (t[h][`${new $(o.name).doSnakeCase()}.${n.name}`] = a(o, n, c));
470
471
  });
471
472
  });
472
- }), JSON.stringify(a, null, " ");
473
- }, R = (c, h) => {
474
- const a = c.themes.filter((l) => l.type === "custom theme").length === 0 ? c.themes.filter((l) => l.type === "default theme") : c.themes.filter((l) => l.type === "custom theme"), n = [], s = (l) => {
473
+ }), JSON.stringify(t, null, " ");
474
+ }, R = (i, h) => {
475
+ const a = i.themes.filter((n) => n.type === "custom theme").length === 0 ? i.themes.filter((n) => n.type === "default theme") : i.themes.filter((n) => n.type === "custom theme"), l = [], s = (n) => {
475
476
  var r;
476
- isNaN(l.hsl[0]) && (l.hsl[0] = 0), isNaN(l.lch[2]) && (l.lch[2] = 0), isNaN(l.oklch[2]) && (l.oklch[2] = 0);
477
+ isNaN(n.hsl[0]) && (n.hsl[0] = 0), isNaN(n.lch[2]) && (n.lch[2] = 0), isNaN(n.oklch[2]) && (n.oklch[2] = 0);
477
478
  const m = {
478
- RGB: () => `rgb(${Math.floor(l.rgb[0])}, ${Math.floor(
479
- l.rgb[1]
480
- )}, ${Math.floor(l.rgb[2])})`,
481
- HEX: () => l.hex,
482
- HSL: () => `hsl(${Math.floor(l.hsl[0])} ${Math.floor(
483
- l.hsl[1] * 100
484
- )}% ${Math.floor(l.hsl[2] * 100)}%)`,
485
- LCH: () => `lch(${Math.floor(l.lch[0])}% ${Math.floor(
486
- l.lch[1]
487
- )} ${Math.floor(l.lch[2])})`,
488
- OKLCH: () => `oklch(${Math.floor(l.oklch[0] * 100)}% ${l.oklch[1].toFixed(3)} ${Math.floor(l.oklch[2])})`
479
+ RGB: () => `rgb(${Math.floor(n.rgb[0])}, ${Math.floor(
480
+ n.rgb[1]
481
+ )}, ${Math.floor(n.rgb[2])})`,
482
+ HEX: () => n.hex,
483
+ HSL: () => `hsl(${Math.floor(n.hsl[0])} ${Math.floor(
484
+ n.hsl[1] * 100
485
+ )}% ${Math.floor(n.hsl[2] * 100)}%)`,
486
+ LCH: () => `lch(${Math.floor(n.lch[0])}% ${Math.floor(
487
+ n.lch[1]
488
+ )} ${Math.floor(n.lch[2])})`,
489
+ OKLCH: () => `oklch(${Math.floor(n.oklch[0] * 100)}% ${n.oklch[1].toFixed(3)} ${Math.floor(n.oklch[2])})`
489
490
  };
490
491
  return (r = m[h ?? "RGB"]) == null ? void 0 : r.call(m);
491
- }, o = (l, m) => {
492
+ }, t = (n, m) => {
492
493
  var p;
493
- isNaN(l.hsl[0]) && (l.hsl[0] = 0), isNaN(l.lch[2]) && (l.lch[2] = 0), isNaN(l.oklch[2]) && (l.oklch[2] = 0);
494
+ isNaN(n.hsl[0]) && (n.hsl[0] = 0), isNaN(n.lch[2]) && (n.lch[2] = 0), isNaN(n.oklch[2]) && (n.oklch[2] = 0);
494
495
  const r = {
495
496
  RGB: () => {
496
497
  var f;
497
498
  return `rgba(${Math.floor(m.rgb[0])}, ${Math.floor(
498
499
  m.rgb[1]
499
- )}, ${Math.floor(m.rgb[2])}, ${((f = l.alpha) == null ? void 0 : f.toFixed(2)) ?? 1})`;
500
+ )}, ${Math.floor(m.rgb[2])}, ${((f = n.alpha) == null ? void 0 : f.toFixed(2)) ?? 1})`;
500
501
  },
501
- HEX: () => k(m.hex).alpha(l.alpha ?? 1).hex(),
502
+ HEX: () => k(m.hex).alpha(n.alpha ?? 1).hex(),
502
503
  HSL: () => {
503
504
  var f;
504
505
  return `hsla(${Math.floor(m.hsl[0])}, ${Math.floor(
505
506
  m.hsl[1] * 100
506
- )}% ${Math.floor(m.hsl[2] * 100)}% ${((f = l.alpha) == null ? void 0 : f.toFixed(2)) ?? 1})`;
507
+ )}% ${Math.floor(m.hsl[2] * 100)}% ${((f = n.alpha) == null ? void 0 : f.toFixed(2)) ?? 1})`;
507
508
  },
508
509
  LCH: () => {
509
510
  var f;
510
511
  return `lch(${Math.floor(m.lch[0])}% ${Math.floor(
511
512
  m.lch[1]
512
- )} ${Math.floor(m.lch[2])} / ${((f = l.alpha) == null ? void 0 : f.toFixed(2)) ?? 1})`;
513
+ )} ${Math.floor(m.lch[2])} / ${((f = n.alpha) == null ? void 0 : f.toFixed(2)) ?? 1})`;
513
514
  },
514
515
  OKLCH: () => {
515
516
  var f;
516
- return `oklch(${Math.floor(m.oklch[0] * 100)}% ${m.oklch[1].toFixed(3)} ${Math.floor(m.oklch[2])} / ${((f = l.alpha) == null ? void 0 : f.toFixed(2)) ?? 1})`;
517
+ return `oklch(${Math.floor(m.oklch[0] * 100)}% ${m.oklch[1].toFixed(3)} ${Math.floor(m.oklch[2])} / ${((f = n.alpha) == null ? void 0 : f.toFixed(2)) ?? 1})`;
517
518
  }
518
519
  };
519
520
  return (p = r[h ?? "RGB"]) == null ? void 0 : p.call(r);
520
521
  }, e = a.find(
521
- (l) => l.type === "default theme"
522
+ (n) => n.type === "default theme"
522
523
  );
523
524
  if (e) {
524
- const l = [];
525
+ const n = [];
525
526
  return e.colors.forEach((m, r) => {
526
- r > 0 && l.push(""), l.push(`// ${m.name}`), m.shades.reverse().forEach((p) => {
527
+ r > 0 && n.push(""), n.push(`// ${m.name}`), m.shades.reverse().forEach((p) => {
527
528
  const f = m.shades.find((u) => u.type === "source color"), g = `@${new $(m.name).doKebabCase()}-${p.name}`;
528
- f && l.push(
529
- `${g}: ${p.isTransparent ? o(p, f) : s(p)};`
529
+ f && n.push(
530
+ `${g}: ${p.isTransparent ? t(p, f) : s(p)};`
530
531
  );
531
532
  });
532
- }), n.push(l.join(`
533
- `)), n.join(`
533
+ }), l.push(n.join(`
534
+ `)), l.join(`
534
535
  `);
535
536
  }
536
- a.forEach((l) => {
537
- const m = new $(l.name).doKebabCase(), r = [];
538
- r.push(`// ${l.name}`), r.push(`.${m}() {`), l.colors.forEach((p, f) => {
537
+ a.forEach((n) => {
538
+ const m = new $(n.name).doKebabCase(), r = [];
539
+ r.push(`// ${n.name}`), r.push(`.${m}() {`), n.colors.forEach((p, f) => {
539
540
  f > 0 && r.push(""), r.push(` // ${p.name}`), p.shades.reverse().forEach((g) => {
540
541
  const u = p.shades.find((y) => y.type === "source color"), x = `@${new $(p.name).doKebabCase()}-${g.name}`;
541
542
  u && r.push(
542
- ` ${x}: ${g.isTransparent ? o(g, u) : s(g)};`
543
+ ` ${x}: ${g.isTransparent ? t(g, u) : s(g)};`
543
544
  );
544
545
  });
545
- }), r.push("}"), n.push(r.join(`
546
+ }), r.push("}"), l.push(r.join(`
546
547
  `));
547
548
  });
548
- const t = [":root {"];
549
- a.forEach((l, m) => {
550
- const r = new $(l.name).doKebabCase();
551
- t.push(` &[data-theme="${r}"] {
549
+ const o = [":root {"];
550
+ a.forEach((n, m) => {
551
+ const r = new $(n.name).doKebabCase();
552
+ o.push(` &[data-theme="${r}"] {
552
553
  .${r}();
553
- }`), m !== a.length - 1 && t.push("");
554
- }), t.push("}"), n.push(t.join(`
554
+ }`), m !== a.length - 1 && o.push("");
555
+ }), o.push("}"), l.push(o.join(`
555
556
  `));
556
- const i = [];
557
- return a.forEach((l) => {
558
- const m = new $(l.name).doKebabCase();
559
- i.push(`.${m} {
557
+ const c = [];
558
+ return a.forEach((n) => {
559
+ const m = new $(n.name).doKebabCase();
560
+ c.push(`.${m} {
560
561
  .${m}();
561
562
  }`);
562
- }), n.push(i.join(`
563
+ }), l.push(c.join(`
563
564
 
564
- `)), n.join(`
565
+ `)), l.join(`
565
566
 
566
567
  `);
567
- }, G = (c, h) => {
568
- const a = c.themes.filter((e) => e.type === "custom theme").length === 0 ? c.themes.filter((e) => e.type === "default theme") : c.themes.filter((e) => e.type === "custom theme"), n = {}, s = (e) => {
569
- var i;
568
+ }, G = (i, h) => {
569
+ const a = i.themes.filter((e) => e.type === "custom theme").length === 0 ? i.themes.filter((e) => e.type === "default theme") : i.themes.filter((e) => e.type === "custom theme"), l = {}, s = (e) => {
570
+ var c;
570
571
  isNaN(e.oklch[2]) && (e.oklch[2] = 0);
571
- const t = {
572
+ const o = {
572
573
  RGB: () => ({
573
574
  colorSpace: "srgb",
574
575
  components: [
@@ -588,11 +589,11 @@ public extension Color {
588
589
  hex: e.hex
589
590
  })
590
591
  };
591
- return (i = t[h ?? "RGB"]) == null ? void 0 : i.call(t);
592
- }, o = (e, t) => {
593
- var l;
594
- isNaN(t.oklch[2]) && (t.oklch[2] = 0);
595
- const i = {
592
+ return (c = o[h ?? "RGB"]) == null ? void 0 : c.call(o);
593
+ }, t = (e, o) => {
594
+ var n;
595
+ isNaN(o.oklch[2]) && (o.oklch[2] = 0);
596
+ const c = {
596
597
  RGB: () => ({
597
598
  colorSpace: "srgb",
598
599
  components: [
@@ -601,7 +602,7 @@ public extension Color {
601
602
  parseFloat(e.gl[2].toFixed(3))
602
603
  ],
603
604
  hex: e.hex,
604
- alpha: t.alpha
605
+ alpha: o.alpha
605
606
  }),
606
607
  OKLCH: () => ({
607
608
  colorSpace: "oklch",
@@ -611,66 +612,66 @@ public extension Color {
611
612
  parseFloat(e.oklch[2].toFixed(0))
612
613
  ],
613
614
  hex: e.hex,
614
- alpha: t.alpha
615
+ alpha: o.alpha
615
616
  })
616
617
  };
617
- return (l = i[h ?? "RGB"]) == null ? void 0 : l.call(i);
618
+ return (n = c[h ?? "RGB"]) == null ? void 0 : n.call(c);
618
619
  };
619
620
  return a[0].type === "custom theme" ? a.forEach((e) => {
620
- e.colors.forEach((t) => {
621
- const i = t.shades.find(
622
- (l) => l.type === "source color"
621
+ e.colors.forEach((o) => {
622
+ const c = o.shades.find(
623
+ (n) => n.type === "source color"
623
624
  );
624
- n[t.name] || (n[t.name] = {
625
+ l[o.name] || (l[o.name] = {
625
626
  $type: "color"
626
- }), t.shades.forEach((l) => {
627
- !n[t.name][l.name] && i && (n[t.name][l.name] = {
627
+ }), o.shades.forEach((n) => {
628
+ !l[o.name][n.name] && c && (l[o.name][n.name] = {
628
629
  $type: "color",
629
- $value: l.isTransparent ? o(i, l) : s(l),
630
- $description: t.description !== "" ? t.description + " - " + l.description : l.description,
630
+ $value: n.isTransparent ? t(c, n) : s(n),
631
+ $description: o.description !== "" ? o.description + " - " + n.description : n.description,
631
632
  $extensions: {
632
633
  mode: {}
633
634
  }
634
- }), i && (n[t.name][l.name].$extensions.mode[e.name] = l.isTransparent ? o(i, l) : s(l));
635
+ }), c && (l[o.name][n.name].$extensions.mode[e.name] = n.isTransparent ? t(c, n) : s(n));
635
636
  });
636
637
  });
637
638
  }) : a.forEach((e) => {
638
- e.colors.forEach((t) => {
639
- const i = t.shades.find(
640
- (l) => l.type === "source color"
639
+ e.colors.forEach((o) => {
640
+ const c = o.shades.find(
641
+ (n) => n.type === "source color"
641
642
  );
642
- n[t.name] = {}, t.shades.forEach((l) => {
643
- l && i && (n[t.name][l.name] = {
643
+ l[o.name] = {}, o.shades.forEach((n) => {
644
+ n && c && (l[o.name][n.name] = {
644
645
  $type: "color",
645
- $value: l.isTransparent ? o(i, l) : s(l),
646
- $description: t.description !== "" ? t.description + " - " + l.description : l.description
646
+ $value: n.isTransparent ? t(c, n) : s(n),
647
+ $description: o.description !== "" ? o.description + " - " + n.description : n.description
647
648
  });
648
649
  });
649
650
  });
650
- }), JSON.stringify(n, null, " ");
651
- }, A = (c) => {
652
- const h = c.themes.filter((i) => i.type === "custom theme").length === 0 ? c.themes.filter((i) => i.type === "default theme") : c.themes.filter((i) => i.type === "custom theme"), a = [], n = [], s = [], o = [], e = [], t = [];
653
- return h.forEach((i) => {
654
- i.colors.forEach((l) => {
655
- l.shades.forEach((m) => {
656
- s.push(m.name), o.push(Math.floor(m.lch[0])), e.push(Math.floor(m.lch[1])), t.push(Math.floor(m.lch[2]));
651
+ }), JSON.stringify(l, null, " ");
652
+ }, A = (i) => {
653
+ const h = i.themes.filter((c) => c.type === "custom theme").length === 0 ? i.themes.filter((c) => c.type === "default theme") : i.themes.filter((c) => c.type === "custom theme"), a = [], l = [], s = [], t = [], e = [], o = [];
654
+ return h.forEach((c) => {
655
+ c.colors.forEach((n) => {
656
+ n.shades.forEach((m) => {
657
+ s.push(m.name), t.push(Math.floor(m.lch[0])), e.push(Math.floor(m.lch[1])), o.push(Math.floor(m.lch[2]));
657
658
  }), a.push({
658
- name: l.name,
659
- csv: `${l.name},Lightness,Chroma,Hue
660
- ${s.map((m, r) => `${m},${o[r]},${e[r]},${t[r]}`).join(`
659
+ name: n.name,
660
+ csv: `${n.name},Lightness,Chroma,Hue
661
+ ${s.map((m, r) => `${m},${t[r]},${e[r]},${o[r]}`).join(`
661
662
  `)}`
662
- }), s.splice(0, s.length), o.splice(0, o.length), e.splice(0, e.length), t.splice(0, t.length);
663
- }), n.push({
664
- name: i.name,
665
- colors: a.map((l) => l),
666
- type: i.type
663
+ }), s.splice(0, s.length), t.splice(0, t.length), e.splice(0, e.length), o.splice(0, o.length);
664
+ }), l.push({
665
+ name: c.name,
666
+ colors: a.map((n) => n),
667
+ type: c.type
667
668
  }), a.splice(0, a.length);
668
- }), n;
669
- }, U = (c, h) => {
670
- const a = c.themes.filter((e) => e.type === "custom theme").length === 0 ? c.themes.filter((e) => e.type === "default theme") : c.themes.filter((e) => e.type === "custom theme"), n = [], s = (e) => {
671
- var i;
669
+ }), l;
670
+ }, U = (i, h) => {
671
+ const a = i.themes.filter((e) => e.type === "custom theme").length === 0 ? i.themes.filter((e) => e.type === "default theme") : i.themes.filter((e) => e.type === "custom theme"), l = [], s = (e) => {
672
+ var c;
672
673
  isNaN(e.hsl[0]) && (e.hsl[0] = 0), isNaN(e.lch[2]) && (e.lch[2] = 0), isNaN(e.oklch[2]) && (e.oklch[2] = 0);
673
- const t = {
674
+ const o = {
674
675
  RGB: () => `rgb(${Math.floor(e.rgb[0])}, ${Math.floor(
675
676
  e.rgb[1]
676
677
  )}, ${Math.floor(e.rgb[2])})`,
@@ -686,74 +687,74 @@ ${s.map((m, r) => `${m},${o[r]},${e[r]},${t[r]}`).join(`
686
687
  3
687
688
  )} ${e.gl[2].toFixed(3)})`
688
689
  };
689
- return (i = t[h ?? "RGB"]) == null ? void 0 : i.call(t);
690
- }, o = (e, t) => {
691
- var l;
690
+ return (c = o[h ?? "RGB"]) == null ? void 0 : c.call(o);
691
+ }, t = (e, o) => {
692
+ var n;
692
693
  isNaN(e.hsl[0]) && (e.hsl[0] = 0), isNaN(e.lch[2]) && (e.lch[2] = 0), isNaN(e.oklch[2]) && (e.oklch[2] = 0);
693
- const i = {
694
+ const c = {
694
695
  RGB: () => {
695
696
  var m;
696
- return `rgb(${Math.floor(t.rgb[0])}, ${Math.floor(
697
- t.rgb[1]
698
- )}, ${Math.floor(t.rgb[2])} / ${((m = e.alpha) == null ? void 0 : m.toFixed(2)) ?? 1})`;
697
+ return `rgb(${Math.floor(o.rgb[0])}, ${Math.floor(
698
+ o.rgb[1]
699
+ )}, ${Math.floor(o.rgb[2])} / ${((m = e.alpha) == null ? void 0 : m.toFixed(2)) ?? 1})`;
699
700
  },
700
- HEX: () => k(t.hex).alpha(e.alpha ?? 1).hex(),
701
+ HEX: () => k(o.hex).alpha(e.alpha ?? 1).hex(),
701
702
  HSL: () => {
702
703
  var m;
703
- return `hsl(${Math.floor(t.hsl[0])} ${Math.floor(
704
- t.hsl[1] * 100
705
- )}% ${Math.floor(t.hsl[2] * 100)}% / ${((m = e.alpha) == null ? void 0 : m.toFixed(2)) ?? 1})`;
704
+ return `hsl(${Math.floor(o.hsl[0])} ${Math.floor(
705
+ o.hsl[1] * 100
706
+ )}% ${Math.floor(o.hsl[2] * 100)}% / ${((m = e.alpha) == null ? void 0 : m.toFixed(2)) ?? 1})`;
706
707
  },
707
708
  LCH: () => {
708
709
  var m;
709
- return `lch(${Math.floor(t.lch[0])}% ${Math.floor(
710
- t.lch[1]
711
- )} ${Math.floor(t.lch[2])} / ${((m = e.alpha) == null ? void 0 : m.toFixed(2)) ?? 1})`;
710
+ return `lch(${Math.floor(o.lch[0])}% ${Math.floor(
711
+ o.lch[1]
712
+ )} ${Math.floor(o.lch[2])} / ${((m = e.alpha) == null ? void 0 : m.toFixed(2)) ?? 1})`;
712
713
  },
713
714
  OKLCH: () => {
714
715
  var m;
715
- return `oklch(${Math.floor(t.oklch[0 * 100])}% ${t.oklch[1].toFixed(3)} ${Math.floor(t.oklch[2])} / ${((m = e.alpha) == null ? void 0 : m.toFixed(2)) ?? 1})`;
716
+ return `oklch(${Math.floor(o.oklch[0 * 100])}% ${o.oklch[1].toFixed(3)} ${Math.floor(o.oklch[2])} / ${((m = e.alpha) == null ? void 0 : m.toFixed(2)) ?? 1})`;
716
717
  },
717
718
  P3: () => {
718
719
  var m;
719
- return `color(display-p3 ${t.gl[0].toFixed(3)} ${t.gl[1].toFixed(
720
+ return `color(display-p3 ${o.gl[0].toFixed(3)} ${o.gl[1].toFixed(
720
721
  3
721
- )} ${t.gl[2].toFixed(3)} / ${((m = e.alpha) == null ? void 0 : m.toFixed(2)) ?? 1})`;
722
+ )} ${o.gl[2].toFixed(3)} / ${((m = e.alpha) == null ? void 0 : m.toFixed(2)) ?? 1})`;
722
723
  }
723
724
  };
724
- return (l = i[h ?? "RGB"]) == null ? void 0 : l.call(i);
725
+ return (n = c[h ?? "RGB"]) == null ? void 0 : n.call(c);
725
726
  };
726
727
  return a.forEach((e) => {
727
- const t = [];
728
- e.colors.forEach((i) => {
729
- t.push(`/* ${i.name} */`), i.shades.reverse().forEach((l) => {
730
- const m = i.shades.find((r) => r.type === "source color");
731
- m && t.push(
732
- `--${new $(i.name).doKebabCase()}-${l.name}: ${l.isTransparent ? o(l, m) : s(l)};`
728
+ const o = [];
729
+ e.colors.forEach((c) => {
730
+ o.push(`/* ${c.name} */`), c.shades.reverse().forEach((n) => {
731
+ const m = c.shades.find((r) => r.type === "source color");
732
+ m && o.push(
733
+ `--${new $(c.name).doKebabCase()}-${n.name}: ${n.isTransparent ? t(n, m) : s(n)};`
733
734
  );
734
- }), t.push("");
735
- }), t.pop(), n.push(
735
+ }), o.push("");
736
+ }), o.pop(), l.push(
736
737
  `${e.type === "custom theme" ? `/* ${e.name} */
737
738
  ` : ""}:root${e.type === "custom theme" ? `[data-theme='${new $(e.name).doKebabCase()}']` : ""} {
738
- ${t.join(`
739
+ ${o.join(`
739
740
  `)}
740
741
  }`
741
742
  );
742
- }), n.join(`
743
+ }), l.join(`
743
744
 
744
745
  `);
745
- }, O = (c) => {
746
- const h = c.themes.filter((n) => n.type === "custom theme").length === 0 ? c.themes.filter((n) => n.type === "default theme") : c.themes.filter((n) => n.type === "custom theme"), a = [];
747
- return h.forEach((n) => {
748
- n.colors.forEach((s) => {
749
- const o = s.shades.find((t) => t.type === "source color"), e = [];
746
+ }, O = (i) => {
747
+ const h = i.themes.filter((l) => l.type === "custom theme").length === 0 ? i.themes.filter((l) => l.type === "default theme") : i.themes.filter((l) => l.type === "custom theme"), a = [];
748
+ return h.forEach((l) => {
749
+ l.colors.forEach((s) => {
750
+ const t = s.shades.find((o) => o.type === "source color"), e = [];
750
751
  e.push(
751
- `// ${h[0].type === "custom theme" ? n.name + " - " : ""}${s.name}`
752
- ), s.shades.reverse().forEach((t) => {
752
+ `// ${h[0].type === "custom theme" ? l.name + " - " : ""}${s.name}`
753
+ ), s.shades.reverse().forEach((o) => {
753
754
  e.push(
754
- `val ${h[0].type === "custom theme" ? new $(n.name + " " + s.name).doSnakeCase() : new $(s.name).doSnakeCase()}_${t.name} = Color(${t.isTransparent ? k((o == null ? void 0 : o.hex) ?? "#000000").alpha(t.alpha ?? 1).hex().replace("#", "0xFF").toUpperCase() : t.hex.replace("#", "0xFF").toUpperCase()})`
755
+ `val ${h[0].type === "custom theme" ? new $(l.name + " " + s.name).doSnakeCase() : new $(s.name).doSnakeCase()}_${o.name} = Color(${o.isTransparent ? k((t == null ? void 0 : t.hex) ?? "#000000").alpha(o.alpha ?? 1).hex().replace("#", "0xFF").toUpperCase() : o.hex.replace("#", "0xFF").toUpperCase()})`
755
756
  );
756
- }), e.push(""), e.forEach((t) => a.push(t));
757
+ }), e.push(""), e.forEach((o) => a.push(o));
757
758
  });
758
759
  }), a.pop(), `import androidx.compose.ui.graphics.Color
759
760
 
@@ -766,12 +767,12 @@ class X {
766
767
  b(this, "makeNativeTokens", () => B(this.paletteData));
767
768
  b(this, "makeDtcgTokens", (h = "RGB") => G(this.paletteData, h));
768
769
  b(this, "makeStyleDictionaryV3Tokens", () => j(this.paletteData));
769
- b(this, "makeUniversalJson", () => w(this.paletteData));
770
+ b(this, "makeUniversalJson", () => N(this.paletteData));
770
771
  b(this, "makeCssCustomProps", (h = "RGB") => U(this.paletteData, h));
771
772
  b(this, "makeScssVariables", (h = "RGB") => H(this.paletteData, h));
772
773
  b(this, "makeLessVariables", (h = "RGB") => R(this.paletteData, h));
773
- b(this, "makeTailwindV3Config", () => S(this.paletteData));
774
- b(this, "makeTailwindV4Config", () => K(this.paletteData));
774
+ b(this, "makeTailwindV3Config", () => K(this.paletteData));
775
+ b(this, "makeTailwindV4Config", () => S(this.paletteData));
775
776
  b(this, "makeSwiftUI", () => L(this.paletteData));
776
777
  b(this, "makeUIKit", () => v(this.paletteData));
777
778
  b(this, "makeCompose", () => O(this.paletteData));