@rogieking/figui3 11.6.0 → 11.6.2
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/.cursor/skills/fig-editor/components.md +10 -5
- package/.cursor/skills/fig-editor/reference.md +10 -4
- package/.cursor/skills/figui3/reference.md +8 -0
- package/CHANGELOG.md +32 -0
- package/README.md +32 -8
- package/components.css +3 -1
- package/dist/components.css +1 -1
- package/dist/fig-color.js +1 -0
- package/dist/fig-editor.css +1 -1
- package/dist/fig-editor.js +3 -3
- package/dist/fig-property.css +1 -1
- package/dist/fig.css +1 -1
- package/dist/fig.js +6 -6
- package/fig-color.js +406 -0
- package/fig-editor.css +1 -16
- package/fig-editor.js +39 -594
- package/fig-gradient-editor.css +6 -1
- package/fig-gradient-editor.js +566 -237
- package/fig-palette-editor.css +20 -0
- package/fig-palette-editor.js +745 -0
- package/fig-popup-gradient.js +9 -1
- package/fig-popup-palette.js +13 -2
- package/fig-property.css +4 -0
- package/fig.js +164 -177
- package/package.json +7 -2
package/fig-color.js
ADDED
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
/* Copyright (c) 2026 Rogie King. PolyForm Shield 1.0.0. See LICENSE. */
|
|
2
|
+
|
|
3
|
+
const COLOR_SPACES = new Set(["srgb", "display-p3"]);
|
|
4
|
+
const EPSILON = 1e-7;
|
|
5
|
+
|
|
6
|
+
const RGB_TO_XYZ = {
|
|
7
|
+
srgb: [
|
|
8
|
+
[0.4123907992659595, 0.35758433938387796, 0.1804807884018343],
|
|
9
|
+
[0.21263900587151036, 0.7151686787677559, 0.07219231536073371],
|
|
10
|
+
[0.01933081871559185, 0.11919477979462599, 0.9505321522496607],
|
|
11
|
+
],
|
|
12
|
+
"display-p3": [
|
|
13
|
+
[0.4865709486482162, 0.26566769316909306, 0.1982172852343625],
|
|
14
|
+
[0.2289745640697488, 0.6917385218365064, 0.079286914093745],
|
|
15
|
+
[0, 0.04511338185890264, 1.043944368900976],
|
|
16
|
+
],
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const XYZ_TO_RGB = {
|
|
20
|
+
srgb: [
|
|
21
|
+
[3.2409699419045226, -1.537383177570094, -0.4986107602930034],
|
|
22
|
+
[-0.9692436362808796, 1.8759675015077202, 0.04155505740717559],
|
|
23
|
+
[0.05563007969699366, -0.20397695888897652, 1.0569715142428786],
|
|
24
|
+
],
|
|
25
|
+
"display-p3": [
|
|
26
|
+
[2.493496911941425, -0.9313836179191239, -0.40271078445071684],
|
|
27
|
+
[-0.8294889695615747, 1.7626640603183465, 0.023624685841943577],
|
|
28
|
+
[0.03584583024378447, -0.07617238926804182, 0.9568845240076872],
|
|
29
|
+
],
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
function colorSpace(value) {
|
|
33
|
+
return COLOR_SPACES.has(value) ? value : "srgb";
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function clamp(value, min, max) {
|
|
37
|
+
return Math.max(min, Math.min(max, Number(value) || 0));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function multiplyMatrix(matrix, vector) {
|
|
41
|
+
return matrix.map(
|
|
42
|
+
(row) =>
|
|
43
|
+
row[0] * vector[0] + row[1] * vector[1] + row[2] * vector[2],
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function encodedToLinear(value) {
|
|
48
|
+
const channel = value / 255;
|
|
49
|
+
return channel <= 0.04045
|
|
50
|
+
? channel / 12.92
|
|
51
|
+
: ((channel + 0.055) / 1.055) ** 2.4;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function linearToEncoded(value) {
|
|
55
|
+
return value <= 0.0031308
|
|
56
|
+
? 12.92 * value
|
|
57
|
+
: 1.055 * Math.max(value, 0) ** (1 / 2.4) - 0.055;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function rgbToLinearChannels(r, g, b) {
|
|
61
|
+
return [encodedToLinear(r), encodedToLinear(g), encodedToLinear(b)];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function linearChannelsToRgb(channels, { clip = true } = {}) {
|
|
65
|
+
const encoded = channels.map((channel) => linearToEncoded(channel) * 255);
|
|
66
|
+
const values = clip
|
|
67
|
+
? encoded.map((channel) => clamp(channel, 0, 255))
|
|
68
|
+
: encoded;
|
|
69
|
+
return {
|
|
70
|
+
r: Math.round(values[0]),
|
|
71
|
+
g: Math.round(values[1]),
|
|
72
|
+
b: Math.round(values[2]),
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function rgbToXyz(r, g, b, space) {
|
|
77
|
+
return multiplyMatrix(
|
|
78
|
+
RGB_TO_XYZ[colorSpace(space)],
|
|
79
|
+
rgbToLinearChannels(r, g, b),
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function xyzToLinearRgb(xyz, space) {
|
|
84
|
+
return multiplyMatrix(XYZ_TO_RGB[colorSpace(space)], xyz);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function linearSrgbToOklab(r, g, b) {
|
|
88
|
+
const l = Math.cbrt(
|
|
89
|
+
0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b,
|
|
90
|
+
);
|
|
91
|
+
const m = Math.cbrt(
|
|
92
|
+
0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b,
|
|
93
|
+
);
|
|
94
|
+
const s = Math.cbrt(
|
|
95
|
+
0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b,
|
|
96
|
+
);
|
|
97
|
+
return {
|
|
98
|
+
l: 0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s,
|
|
99
|
+
a: 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s,
|
|
100
|
+
b: 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function oklabToLinearSrgb(l, a, b) {
|
|
105
|
+
const lRoot = l + 0.3963377774 * a + 0.2158037573 * b;
|
|
106
|
+
const mRoot = l - 0.1055613458 * a - 0.0638541728 * b;
|
|
107
|
+
const sRoot = l - 0.0894841775 * a - 1.291485548 * b;
|
|
108
|
+
const lValue = lRoot ** 3;
|
|
109
|
+
const mValue = mRoot ** 3;
|
|
110
|
+
const sValue = sRoot ** 3;
|
|
111
|
+
return [
|
|
112
|
+
+4.0767416621 * lValue - 3.3077115913 * mValue + 0.2309699292 * sValue,
|
|
113
|
+
-1.2684380046 * lValue + 2.6097574011 * mValue - 0.3413193965 * sValue,
|
|
114
|
+
-0.0041960863 * lValue - 0.7034186147 * mValue + 1.707614701 * sValue,
|
|
115
|
+
];
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function oklabToLinearRgb(l, a, b, space) {
|
|
119
|
+
const linearSrgb = oklabToLinearSrgb(l, a, b);
|
|
120
|
+
if (colorSpace(space) === "srgb") return linearSrgb;
|
|
121
|
+
const xyz = multiplyMatrix(RGB_TO_XYZ.srgb, linearSrgb);
|
|
122
|
+
return xyzToLinearRgb(xyz, space);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function channelsInGamut(channels) {
|
|
126
|
+
return channels.every(
|
|
127
|
+
(channel) => channel >= -EPSILON && channel <= 1 + EPSILON,
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export function figNormalizeHue(hue) {
|
|
132
|
+
const value = Number(hue);
|
|
133
|
+
if (!Number.isFinite(value)) return 0;
|
|
134
|
+
return ((value % 360) + 360) % 360;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export function figHexToRGB(hex) {
|
|
138
|
+
let value = String(hex ?? "").trim().replace(/^#/, "");
|
|
139
|
+
if (value.length === 3 || value.length === 4) {
|
|
140
|
+
value = [...value].map((character) => character.repeat(2)).join("");
|
|
141
|
+
}
|
|
142
|
+
if (!/^[0-9a-f]{6}([0-9a-f]{2})?$/i.test(value)) {
|
|
143
|
+
throw new TypeError(`Invalid hex color: ${hex}`);
|
|
144
|
+
}
|
|
145
|
+
return {
|
|
146
|
+
r: parseInt(value.slice(0, 2), 16),
|
|
147
|
+
g: parseInt(value.slice(2, 4), 16),
|
|
148
|
+
b: parseInt(value.slice(4, 6), 16),
|
|
149
|
+
a: value.length === 8 ? parseInt(value.slice(6, 8), 16) / 255 : 1,
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export function figRGBToHex(r, g, b, alpha = 1) {
|
|
154
|
+
const channels = [r, g, b].map((channel) =>
|
|
155
|
+
Math.round(clamp(channel, 0, 255)).toString(16).padStart(2, "0"),
|
|
156
|
+
);
|
|
157
|
+
const normalizedAlpha = clamp(alpha, 0, 1);
|
|
158
|
+
if (normalizedAlpha < 1) {
|
|
159
|
+
channels.push(
|
|
160
|
+
Math.round(normalizedAlpha * 255).toString(16).padStart(2, "0"),
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
return `#${channels.join("").toUpperCase()}`;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export function figRGBToLinear(channel) {
|
|
167
|
+
return encodedToLinear(clamp(channel, 0, 255));
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export function figLinearToSRGB(channel) {
|
|
171
|
+
return Math.round(clamp(linearToEncoded(Number(channel)), 0, 1) * 255);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export function figConvertRGB(
|
|
175
|
+
r,
|
|
176
|
+
g,
|
|
177
|
+
b,
|
|
178
|
+
{ from = "srgb", to = "srgb", clip = true } = {},
|
|
179
|
+
) {
|
|
180
|
+
const source = colorSpace(from);
|
|
181
|
+
const target = colorSpace(to);
|
|
182
|
+
if (source === target) {
|
|
183
|
+
const values = clip
|
|
184
|
+
? [r, g, b].map((channel) => clamp(channel, 0, 255))
|
|
185
|
+
: [Number(r), Number(g), Number(b)];
|
|
186
|
+
return { r: values[0], g: values[1], b: values[2] };
|
|
187
|
+
}
|
|
188
|
+
const xyz = rgbToXyz(r, g, b, source);
|
|
189
|
+
return linearChannelsToRgb(xyzToLinearRgb(xyz, target), { clip });
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export function figRGBToOklab(
|
|
193
|
+
r,
|
|
194
|
+
g,
|
|
195
|
+
b,
|
|
196
|
+
{ colorSpace: space = "srgb" } = {},
|
|
197
|
+
) {
|
|
198
|
+
let linear = rgbToLinearChannels(r, g, b);
|
|
199
|
+
if (colorSpace(space) === "display-p3") {
|
|
200
|
+
const xyz = multiplyMatrix(RGB_TO_XYZ["display-p3"], linear);
|
|
201
|
+
linear = xyzToLinearRgb(xyz, "srgb");
|
|
202
|
+
}
|
|
203
|
+
return linearSrgbToOklab(...linear);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export function figOklabToRGB(
|
|
207
|
+
l,
|
|
208
|
+
a,
|
|
209
|
+
b,
|
|
210
|
+
{ colorSpace: space = "srgb", clip = true } = {},
|
|
211
|
+
) {
|
|
212
|
+
return linearChannelsToRgb(oklabToLinearRgb(l, a, b, space), { clip });
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export function figOklabToOklch(l, a, b) {
|
|
216
|
+
const c = Math.sqrt(a * a + b * b);
|
|
217
|
+
return {
|
|
218
|
+
l,
|
|
219
|
+
c,
|
|
220
|
+
h: c < EPSILON ? 0 : figNormalizeHue((Math.atan2(b, a) * 180) / Math.PI),
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export function figOklchToOklab(l, c, h) {
|
|
225
|
+
const radians = (figNormalizeHue(h) * Math.PI) / 180;
|
|
226
|
+
return {
|
|
227
|
+
l: Number(l),
|
|
228
|
+
a: Number(c) * Math.cos(radians),
|
|
229
|
+
b: Number(c) * Math.sin(radians),
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export function figRGBToOklch(r, g, b, options) {
|
|
234
|
+
const lab = figRGBToOklab(r, g, b, options);
|
|
235
|
+
return figOklabToOklch(lab.l, lab.a, lab.b);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export function figOklchToRGB(l, c, h, options = {}) {
|
|
239
|
+
const mapped =
|
|
240
|
+
options.gamutMap === true
|
|
241
|
+
? figMapOklchToGamut(l, c, h, options)
|
|
242
|
+
: { l, c, h };
|
|
243
|
+
const lab = figOklchToOklab(mapped.l, mapped.c, mapped.h);
|
|
244
|
+
return figOklabToRGB(lab.l, lab.a, lab.b, options);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export function figHexToOklch(hex) {
|
|
248
|
+
const { r, g, b } = figHexToRGB(hex);
|
|
249
|
+
return figRGBToOklch(r, g, b);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export function figOklchToHex(l, c, h, options = {}) {
|
|
253
|
+
const { r, g, b } = figOklchToRGB(l, c, h, {
|
|
254
|
+
...options,
|
|
255
|
+
gamutMap: options.gamutMap !== false,
|
|
256
|
+
});
|
|
257
|
+
return figRGBToHex(r, g, b);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export function figRGBToHsl(r, g, b) {
|
|
261
|
+
const red = clamp(r, 0, 255) / 255;
|
|
262
|
+
const green = clamp(g, 0, 255) / 255;
|
|
263
|
+
const blue = clamp(b, 0, 255) / 255;
|
|
264
|
+
const max = Math.max(red, green, blue);
|
|
265
|
+
const min = Math.min(red, green, blue);
|
|
266
|
+
const delta = max - min;
|
|
267
|
+
let h = 0;
|
|
268
|
+
if (delta !== 0) {
|
|
269
|
+
if (max === red) h = 60 * (((green - blue) / delta) % 6);
|
|
270
|
+
else if (max === green) h = 60 * ((blue - red) / delta + 2);
|
|
271
|
+
else h = 60 * ((red - green) / delta + 4);
|
|
272
|
+
}
|
|
273
|
+
const l = (max + min) / 2;
|
|
274
|
+
const s = delta === 0 ? 0 : delta / (1 - Math.abs(2 * l - 1));
|
|
275
|
+
return { h: figNormalizeHue(h), s: s * 100, l: l * 100 };
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export function figHslToRGB(h, s, l) {
|
|
279
|
+
const hue = figNormalizeHue(h);
|
|
280
|
+
const saturation = clamp(s, 0, 100) / 100;
|
|
281
|
+
const lightness = clamp(l, 0, 100) / 100;
|
|
282
|
+
const chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;
|
|
283
|
+
const section = hue / 60;
|
|
284
|
+
const x = chroma * (1 - Math.abs((section % 2) - 1));
|
|
285
|
+
let channels;
|
|
286
|
+
if (section < 1) channels = [chroma, x, 0];
|
|
287
|
+
else if (section < 2) channels = [x, chroma, 0];
|
|
288
|
+
else if (section < 3) channels = [0, chroma, x];
|
|
289
|
+
else if (section < 4) channels = [0, x, chroma];
|
|
290
|
+
else if (section < 5) channels = [x, 0, chroma];
|
|
291
|
+
else channels = [chroma, 0, x];
|
|
292
|
+
const offset = lightness - chroma / 2;
|
|
293
|
+
return {
|
|
294
|
+
r: Math.round((channels[0] + offset) * 255),
|
|
295
|
+
g: Math.round((channels[1] + offset) * 255),
|
|
296
|
+
b: Math.round((channels[2] + offset) * 255),
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
export function figRGBToHsv(r, g, b) {
|
|
301
|
+
const red = clamp(r, 0, 255) / 255;
|
|
302
|
+
const green = clamp(g, 0, 255) / 255;
|
|
303
|
+
const blue = clamp(b, 0, 255) / 255;
|
|
304
|
+
const max = Math.max(red, green, blue);
|
|
305
|
+
const min = Math.min(red, green, blue);
|
|
306
|
+
const delta = max - min;
|
|
307
|
+
let h = 0;
|
|
308
|
+
if (delta !== 0) {
|
|
309
|
+
if (max === red) h = 60 * (((green - blue) / delta) % 6);
|
|
310
|
+
else if (max === green) h = 60 * ((blue - red) / delta + 2);
|
|
311
|
+
else h = 60 * ((red - green) / delta + 4);
|
|
312
|
+
}
|
|
313
|
+
return {
|
|
314
|
+
h: figNormalizeHue(h),
|
|
315
|
+
s: max === 0 ? 0 : (delta / max) * 100,
|
|
316
|
+
v: max * 100,
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
export function figHsvToRGB(h, s, v) {
|
|
321
|
+
const hue = figNormalizeHue(h);
|
|
322
|
+
const saturation = clamp(s, 0, 100) / 100;
|
|
323
|
+
const value = clamp(v, 0, 100) / 100;
|
|
324
|
+
const chroma = value * saturation;
|
|
325
|
+
const section = hue / 60;
|
|
326
|
+
const x = chroma * (1 - Math.abs((section % 2) - 1));
|
|
327
|
+
let channels;
|
|
328
|
+
if (section < 1) channels = [chroma, x, 0];
|
|
329
|
+
else if (section < 2) channels = [x, chroma, 0];
|
|
330
|
+
else if (section < 3) channels = [0, chroma, x];
|
|
331
|
+
else if (section < 4) channels = [0, x, chroma];
|
|
332
|
+
else if (section < 5) channels = [x, 0, chroma];
|
|
333
|
+
else channels = [chroma, 0, x];
|
|
334
|
+
const offset = value - chroma;
|
|
335
|
+
return {
|
|
336
|
+
r: Math.round((channels[0] + offset) * 255),
|
|
337
|
+
g: Math.round((channels[1] + offset) * 255),
|
|
338
|
+
b: Math.round((channels[2] + offset) * 255),
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export function figInterpolateHue(h1, h2, amount, mode = "shorter") {
|
|
343
|
+
const start = figNormalizeHue(h1);
|
|
344
|
+
const end = figNormalizeHue(h2);
|
|
345
|
+
let difference = end - start;
|
|
346
|
+
switch (mode) {
|
|
347
|
+
case "longer":
|
|
348
|
+
if (difference > 0 && difference < 180) difference -= 360;
|
|
349
|
+
else if (difference < 0 && difference > -180) difference += 360;
|
|
350
|
+
break;
|
|
351
|
+
case "increasing":
|
|
352
|
+
if (difference < 0) difference += 360;
|
|
353
|
+
break;
|
|
354
|
+
case "decreasing":
|
|
355
|
+
if (difference > 0) difference -= 360;
|
|
356
|
+
break;
|
|
357
|
+
default:
|
|
358
|
+
if (difference > 180) difference -= 360;
|
|
359
|
+
else if (difference < -180) difference += 360;
|
|
360
|
+
break;
|
|
361
|
+
}
|
|
362
|
+
return figNormalizeHue(start + difference * Number(amount));
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
export function figOklabDistance(first, second) {
|
|
366
|
+
return Math.sqrt(
|
|
367
|
+
(Number(first?.l) - Number(second?.l)) ** 2 +
|
|
368
|
+
(Number(first?.a) - Number(second?.a)) ** 2 +
|
|
369
|
+
(Number(first?.b) - Number(second?.b)) ** 2,
|
|
370
|
+
);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
export function figIsOklchInGamut(
|
|
374
|
+
l,
|
|
375
|
+
c,
|
|
376
|
+
h,
|
|
377
|
+
{ colorSpace: space = "srgb" } = {},
|
|
378
|
+
) {
|
|
379
|
+
const lab = figOklchToOklab(l, c, h);
|
|
380
|
+
return channelsInGamut(oklabToLinearRgb(lab.l, lab.a, lab.b, space));
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
export function figMapOklchToGamut(
|
|
384
|
+
l,
|
|
385
|
+
c,
|
|
386
|
+
h,
|
|
387
|
+
{ colorSpace: space = "srgb" } = {},
|
|
388
|
+
) {
|
|
389
|
+
const lightness = clamp(l, 0, 1);
|
|
390
|
+
const chroma = Math.max(0, Number(c) || 0);
|
|
391
|
+
const hue = figNormalizeHue(h);
|
|
392
|
+
if (figIsOklchInGamut(lightness, chroma, hue, { colorSpace: space })) {
|
|
393
|
+
return { l: lightness, c: chroma, h: hue };
|
|
394
|
+
}
|
|
395
|
+
let low = 0;
|
|
396
|
+
let high = chroma;
|
|
397
|
+
for (let iteration = 0; iteration < 24; iteration += 1) {
|
|
398
|
+
const middle = (low + high) / 2;
|
|
399
|
+
if (figIsOklchInGamut(lightness, middle, hue, { colorSpace: space })) {
|
|
400
|
+
low = middle;
|
|
401
|
+
} else {
|
|
402
|
+
high = middle;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
return { l: lightness, c: low, h: hue };
|
|
406
|
+
}
|
package/fig-editor.css
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
@import url("fig-layer.css");
|
|
3
3
|
@import url("fig-property.css");
|
|
4
4
|
@import url("fig-gradient-editor.css");
|
|
5
|
+
@import url("fig-palette-editor.css");
|
|
5
6
|
@import url("fig-popup-easing.css");
|
|
6
7
|
@import url("fig-popup-gradient.css");
|
|
7
8
|
@import url("fig-popup-palette.css");
|
|
@@ -162,22 +163,6 @@ dialog[is="fig-toast"] {
|
|
|
162
163
|
}
|
|
163
164
|
}
|
|
164
165
|
|
|
165
|
-
/* Palette Editor */
|
|
166
|
-
fig-palette-editor {
|
|
167
|
-
display: flex;
|
|
168
|
-
flex-direction: column;
|
|
169
|
-
width: 100%;
|
|
170
|
-
min-width: 0;
|
|
171
|
-
|
|
172
|
-
> fig-reorder {
|
|
173
|
-
display: contents;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.fig-palette-editor-add {
|
|
177
|
-
width: 100%;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
166
|
/* Fill Picker */
|
|
182
167
|
fig-fill-picker {
|
|
183
168
|
display: contents;
|