@gryt/theme 0.1.0 → 0.3.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/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +189 -104
- package/dist/index.js.map +1 -1
- package/dist/motion.d.ts +99 -0
- package/dist/motion.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
function G(r) {
|
|
2
2
|
return r <= 0.04045 ? r / 12.92 : ((r + 0.055) / 1.055) ** 2.4;
|
|
3
3
|
}
|
|
4
|
-
function
|
|
4
|
+
function v(r) {
|
|
5
5
|
return r <= 31308e-7 ? 12.92 * r : 1.055 * r ** (1 / 2.4) - 0.055;
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function L(r) {
|
|
8
8
|
return Math.min(1, Math.max(0, r));
|
|
9
9
|
}
|
|
10
10
|
function x(r) {
|
|
@@ -16,17 +16,17 @@ function x(r) {
|
|
|
16
16
|
];
|
|
17
17
|
}
|
|
18
18
|
function N([r, a, t]) {
|
|
19
|
-
const e = (
|
|
19
|
+
const e = (o) => Math.round(L(o) * 255).toString(16).padStart(2, "0");
|
|
20
20
|
return `#${e(r)}${e(a)}${e(t)}`;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
const [a, t, e] = x(r).map(G),
|
|
22
|
+
function S(r) {
|
|
23
|
+
const [a, t, e] = x(r).map(G), o = Math.cbrt(
|
|
24
24
|
0.4122214708 * a + 0.5363325363 * t + 0.0514459929 * e
|
|
25
25
|
), c = Math.cbrt(
|
|
26
26
|
0.2119034982 * a + 0.6806995451 * t + 0.1073969566 * e
|
|
27
27
|
), n = Math.cbrt(
|
|
28
28
|
0.0883024619 * a + 0.2817188376 * t + 0.6299787005 * e
|
|
29
|
-
), f = 0.2104542553 *
|
|
29
|
+
), f = 0.2104542553 * o + 0.793617785 * c - 0.0040720468 * n, d = 1.9779984951 * o - 2.428592205 * c + 0.4505937099 * n, g = 0.0259040371 * o + 0.7827717662 * c - 0.808675766 * n;
|
|
30
30
|
return {
|
|
31
31
|
l: f,
|
|
32
32
|
c: Math.hypot(d, g),
|
|
@@ -34,21 +34,21 @@ function R(r) {
|
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
function y({ l: r, c: a, h: t }) {
|
|
37
|
-
const e = a * Math.cos(t * Math.PI / 180),
|
|
37
|
+
const e = a * Math.cos(t * Math.PI / 180), o = a * Math.sin(t * Math.PI / 180), c = (r + 0.3963377774 * e + 0.2158037573 * o) ** 3, n = (r - 0.1055613458 * e - 0.0638541728 * o) ** 3, f = (r - 0.0894841775 * e - 1.291485548 * o) ** 3;
|
|
38
38
|
return N([
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
v(L(4.0767416621 * c - 3.3077115913 * n + 0.2309699292 * f)),
|
|
40
|
+
v(L(-1.2684380046 * c + 2.6097574011 * n - 0.3413193965 * f)),
|
|
41
|
+
v(L(-0.0041960863 * c - 0.7034186147 * n + 1.707614701 * f))
|
|
42
42
|
]);
|
|
43
43
|
}
|
|
44
|
-
const
|
|
44
|
+
const B = [0.195, 0.24, 0.27, 0.3, 0.33, 0.37, 0.43, 0.52], F = [0.014, 0.026, 0.04, 0.052, 0.062, 0.072, 0.084, 0.1];
|
|
45
45
|
function h(r, a) {
|
|
46
|
-
const { h: t } =
|
|
46
|
+
const { h: t } = S(r), e = B.map((f, d) => y({ l: f, c: F[d], h: t }));
|
|
47
47
|
e.push(r, a);
|
|
48
|
-
const
|
|
48
|
+
const o = S(a).l, c = Math.min(0.95, Math.max(0.84, o + 0.04)), n = Math.min(0.98, Math.max(c + 0.06, 0.93));
|
|
49
49
|
return e.push(y({ l: c, c: 0.11, h: t })), e.push(y({ l: n, c: 0.055, h: t })), e;
|
|
50
50
|
}
|
|
51
|
-
const
|
|
51
|
+
const W = [
|
|
52
52
|
0.187,
|
|
53
53
|
0.231,
|
|
54
54
|
0.245,
|
|
@@ -83,23 +83,23 @@ function I(r) {
|
|
|
83
83
|
5: r.border,
|
|
84
84
|
10: r.muted,
|
|
85
85
|
11: r.text
|
|
86
|
-
}, t =
|
|
87
|
-
return
|
|
88
|
-
(e,
|
|
86
|
+
}, t = S(r.border).h;
|
|
87
|
+
return W.map(
|
|
88
|
+
(e, o) => a[o] ?? y({ l: e, c: K[o], h: t })
|
|
89
89
|
);
|
|
90
90
|
}
|
|
91
91
|
function w(r, a) {
|
|
92
92
|
const t = x(a);
|
|
93
93
|
return r.map((e) => {
|
|
94
|
-
const
|
|
94
|
+
const o = x(e);
|
|
95
95
|
let c = 0;
|
|
96
96
|
for (let u = 0; u < 3; u++) {
|
|
97
|
-
const i =
|
|
97
|
+
const i = o[u], m = t[u];
|
|
98
98
|
i > m ? c = Math.max(c, m < 1 ? (i - m) / (1 - m) : 0) : i < m && (c = Math.max(c, m > 0 ? (m - i) / m : 0));
|
|
99
99
|
}
|
|
100
100
|
if (c < 1e-6) return "transparent";
|
|
101
101
|
const n = N(
|
|
102
|
-
|
|
102
|
+
o.map((u, i) => L(t[i] + (u - t[i]) / c))
|
|
103
103
|
), [f, d, g] = x(n).map((u) => Math.round(u * 255));
|
|
104
104
|
return `rgb(${f} ${d} ${g} / ${(c * 100).toFixed(1)}%)`;
|
|
105
105
|
});
|
|
@@ -139,16 +139,16 @@ function U(r) {
|
|
|
139
139
|
5: r.border,
|
|
140
140
|
10: r.muted,
|
|
141
141
|
11: r.text
|
|
142
|
-
}, t =
|
|
142
|
+
}, t = S(r.border).h;
|
|
143
143
|
return q.map(
|
|
144
|
-
(e,
|
|
144
|
+
(e, o) => a[o] ?? y({ l: e, c: J[o], h: t })
|
|
145
145
|
);
|
|
146
146
|
}
|
|
147
147
|
function b(r) {
|
|
148
|
-
const { l: a, c: t, h: e } =
|
|
148
|
+
const { l: a, c: t, h: e } = S(r), o = X.map(
|
|
149
149
|
(c, n) => y({ l: c, c: Q[n], h: e })
|
|
150
150
|
);
|
|
151
|
-
return
|
|
151
|
+
return o.push(r), o.push(y({ l: Math.max(0, a - 0.07), c: t, h: e })), o.push(y({ l: 0.46, c: 0.15, h: e })), o.push(y({ l: 0.33, c: 0.1, h: e })), o;
|
|
152
152
|
}
|
|
153
153
|
function E(r) {
|
|
154
154
|
const [a, t, e] = x(r).map(G);
|
|
@@ -158,7 +158,7 @@ function oe(r, a) {
|
|
|
158
158
|
const t = E(r), e = E(a);
|
|
159
159
|
return (Math.max(t, e) + 0.05) / (Math.min(t, e) + 0.05);
|
|
160
160
|
}
|
|
161
|
-
const
|
|
161
|
+
const s = {
|
|
162
162
|
color: {
|
|
163
163
|
bg: "#111318",
|
|
164
164
|
surface: "#1a1d24",
|
|
@@ -198,41 +198,41 @@ const o = {
|
|
|
198
198
|
text: "#1f2129"
|
|
199
199
|
}, _ = {
|
|
200
200
|
neutral: I({
|
|
201
|
-
bg:
|
|
202
|
-
surface:
|
|
203
|
-
surfaceRaised:
|
|
204
|
-
border:
|
|
205
|
-
muted:
|
|
206
|
-
text:
|
|
201
|
+
bg: s.color.bg,
|
|
202
|
+
surface: s.color.surface,
|
|
203
|
+
surfaceRaised: s.color.surfaceRaised,
|
|
204
|
+
border: s.color.border,
|
|
205
|
+
muted: s.color.muted,
|
|
206
|
+
text: s.color.text
|
|
207
207
|
}),
|
|
208
|
-
accent: h(
|
|
208
|
+
accent: h(s.color.accent, s.color.accentLight),
|
|
209
209
|
secondary: h(
|
|
210
|
-
|
|
211
|
-
|
|
210
|
+
s.color.secondary,
|
|
211
|
+
s.color.secondaryLight
|
|
212
212
|
),
|
|
213
|
-
success: h(
|
|
214
|
-
danger: h(
|
|
215
|
-
warning: h(
|
|
213
|
+
success: h(s.color.success, s.color.success),
|
|
214
|
+
danger: h(s.color.danger, s.color.dangerLight),
|
|
215
|
+
warning: h(s.color.warning, s.color.warning)
|
|
216
216
|
}, T = {
|
|
217
217
|
neutral: U(l),
|
|
218
|
-
accent: b(
|
|
219
|
-
secondary: b(
|
|
220
|
-
success: b(
|
|
221
|
-
danger: b(
|
|
222
|
-
warning: b(
|
|
218
|
+
accent: b(s.color.accent),
|
|
219
|
+
secondary: b(s.color.secondary),
|
|
220
|
+
success: b(s.color.success),
|
|
221
|
+
danger: b(s.color.danger),
|
|
222
|
+
warning: b(s.color.warning)
|
|
223
223
|
}, C = T.neutral[3], se = {
|
|
224
|
-
neutral: w(_.neutral,
|
|
225
|
-
accent: w(_.accent,
|
|
224
|
+
neutral: w(_.neutral, s.color.bg),
|
|
225
|
+
accent: w(_.accent, s.color.bg)
|
|
226
226
|
}, fe = {
|
|
227
227
|
neutral: w(T.neutral, l.bg),
|
|
228
228
|
accent: w(T.accent, l.bg)
|
|
229
229
|
};
|
|
230
230
|
function de(r = {}) {
|
|
231
231
|
const a = r.appearance === "light", e = { ...a ? {
|
|
232
|
-
...
|
|
232
|
+
...s.color,
|
|
233
233
|
...l,
|
|
234
234
|
surfaceHover: C
|
|
235
|
-
} :
|
|
235
|
+
} : s.color, ...r.color }, o = { ...s.radius, ...r.radius }, c = {
|
|
236
236
|
bg: e.bg,
|
|
237
237
|
surface: e.surface,
|
|
238
238
|
surfaceRaised: e.surfaceRaised,
|
|
@@ -303,14 +303,14 @@ function de(r = {}) {
|
|
|
303
303
|
"--color-gryt-on-accent": e.onAccent,
|
|
304
304
|
"--color-gryt-on-secondary": e.onSecondary,
|
|
305
305
|
"--color-gryt-on-danger": e.onDanger,
|
|
306
|
-
"--gryt-radius-sm": `${
|
|
307
|
-
"--gryt-radius-md": `${
|
|
308
|
-
"--gryt-radius-lg": `${
|
|
309
|
-
"--gryt-radius-xl": `${
|
|
310
|
-
"--gryt-radius-full": `${
|
|
306
|
+
"--gryt-radius-sm": `${o.sm}px`,
|
|
307
|
+
"--gryt-radius-md": `${o.md}px`,
|
|
308
|
+
"--gryt-radius-lg": `${o.lg}px`,
|
|
309
|
+
"--gryt-radius-xl": `${o.xl}px`,
|
|
310
|
+
"--gryt-radius-full": `${o.full}px`
|
|
311
311
|
};
|
|
312
312
|
}
|
|
313
|
-
const
|
|
313
|
+
const R = [
|
|
314
314
|
"accent",
|
|
315
315
|
"accentLight",
|
|
316
316
|
"secondary",
|
|
@@ -334,29 +334,29 @@ const S = [
|
|
|
334
334
|
function $(r) {
|
|
335
335
|
return r.replace(/\s+/g, " ").trim().slice(0, V);
|
|
336
336
|
}
|
|
337
|
-
const
|
|
337
|
+
const p = {
|
|
338
338
|
hue: {
|
|
339
|
-
accent:
|
|
340
|
-
accentLight:
|
|
341
|
-
secondary:
|
|
342
|
-
secondaryLight:
|
|
343
|
-
success:
|
|
344
|
-
danger:
|
|
345
|
-
dangerLight:
|
|
346
|
-
warning:
|
|
347
|
-
onAccent:
|
|
348
|
-
onSecondary:
|
|
349
|
-
onDanger:
|
|
339
|
+
accent: s.color.accent,
|
|
340
|
+
accentLight: s.color.accentLight,
|
|
341
|
+
secondary: s.color.secondary,
|
|
342
|
+
secondaryLight: s.color.secondaryLight,
|
|
343
|
+
success: s.color.success,
|
|
344
|
+
danger: s.color.danger,
|
|
345
|
+
dangerLight: s.color.dangerLight,
|
|
346
|
+
warning: s.color.warning,
|
|
347
|
+
onAccent: s.color.onAccent,
|
|
348
|
+
onSecondary: s.color.onSecondary,
|
|
349
|
+
onDanger: s.color.onDanger
|
|
350
350
|
},
|
|
351
351
|
lightHue: null,
|
|
352
352
|
dark: {
|
|
353
|
-
bg:
|
|
354
|
-
surface:
|
|
355
|
-
surfaceRaised:
|
|
356
|
-
surfaceHover:
|
|
357
|
-
border:
|
|
358
|
-
muted:
|
|
359
|
-
text:
|
|
353
|
+
bg: s.color.bg,
|
|
354
|
+
surface: s.color.surface,
|
|
355
|
+
surfaceRaised: s.color.surfaceRaised,
|
|
356
|
+
surfaceHover: s.color.surfaceHover,
|
|
357
|
+
border: s.color.border,
|
|
358
|
+
muted: s.color.muted,
|
|
359
|
+
text: s.color.text
|
|
360
360
|
},
|
|
361
361
|
light: {
|
|
362
362
|
bg: l.bg,
|
|
@@ -367,7 +367,7 @@ const L = {
|
|
|
367
367
|
muted: l.muted,
|
|
368
368
|
text: l.text
|
|
369
369
|
},
|
|
370
|
-
radius: { ...
|
|
370
|
+
radius: { ...s.radius }
|
|
371
371
|
};
|
|
372
372
|
function j(r) {
|
|
373
373
|
return {
|
|
@@ -418,20 +418,20 @@ function D(r) {
|
|
|
418
418
|
return a.length === 4 ? `#${a[1]}${a[1]}${a[2]}${a[2]}${a[3]}${a[3]}` : a;
|
|
419
419
|
}
|
|
420
420
|
function ge(r, a) {
|
|
421
|
-
const t = new URLSearchParams(), e = (c) => D(c).slice(1),
|
|
422
|
-
|
|
423
|
-
for (const c of
|
|
424
|
-
r.hue[c] !==
|
|
421
|
+
const t = new URLSearchParams(), e = (c) => D(c).slice(1), o = $(r.name ?? "");
|
|
422
|
+
o !== "" && t.set("name", o);
|
|
423
|
+
for (const c of R)
|
|
424
|
+
r.hue[c] !== p.hue[c] && t.set(H[c], e(r.hue[c]));
|
|
425
425
|
if (r.lightHue !== null)
|
|
426
|
-
for (const c of
|
|
426
|
+
for (const c of R)
|
|
427
427
|
t.set(`lh-${H[c]}`, e(r.lightHue[c]));
|
|
428
428
|
for (const c of ["dark", "light"]) {
|
|
429
429
|
const n = c === "dark" ? "d" : "l";
|
|
430
430
|
for (const f of O)
|
|
431
|
-
r[c][f] !==
|
|
431
|
+
r[c][f] !== p[c][f] && t.set(`${n}-${Y[f]}`, e(r[c][f]));
|
|
432
432
|
}
|
|
433
433
|
for (const c of M)
|
|
434
|
-
r.radius[c] !==
|
|
434
|
+
r.radius[c] !== p.radius[c] && t.set(`r-${c}`, String(r.radius[c]));
|
|
435
435
|
return a === "light" && t.set("mode", "light"), t;
|
|
436
436
|
}
|
|
437
437
|
function ie(r) {
|
|
@@ -442,22 +442,22 @@ function ie(r) {
|
|
|
442
442
|
return re(new URLSearchParams(t));
|
|
443
443
|
}
|
|
444
444
|
function re(r) {
|
|
445
|
-
const a = j(
|
|
445
|
+
const a = j(p);
|
|
446
446
|
let t = !1;
|
|
447
447
|
const e = (c) => {
|
|
448
448
|
const n = r.get(c);
|
|
449
449
|
if (n === null) return null;
|
|
450
450
|
const f = n.startsWith("#") ? n : `#${n}`;
|
|
451
451
|
return z(f) ? (t = !0, D(f)) : null;
|
|
452
|
-
},
|
|
453
|
-
|
|
454
|
-
for (const c of
|
|
452
|
+
}, o = $(r.get("name") ?? "");
|
|
453
|
+
o !== "" && (a.name = o, t = !0);
|
|
454
|
+
for (const c of R) {
|
|
455
455
|
const n = e(H[c]);
|
|
456
456
|
n !== null && (a.hue[c] = n);
|
|
457
457
|
}
|
|
458
458
|
if (r.has(`lh-${H.accent}`)) {
|
|
459
459
|
const c = { ...a.hue };
|
|
460
|
-
for (const n of
|
|
460
|
+
for (const n of R) {
|
|
461
461
|
const f = e(`lh-${H[n]}`);
|
|
462
462
|
f !== null && (c[n] = f);
|
|
463
463
|
}
|
|
@@ -487,16 +487,16 @@ function ae(r) {
|
|
|
487
487
|
return null;
|
|
488
488
|
}
|
|
489
489
|
if (typeof a != "object" || a === null) return null;
|
|
490
|
-
const t = a, e = j(
|
|
491
|
-
let
|
|
490
|
+
const t = a, e = j(p);
|
|
491
|
+
let o = !1;
|
|
492
492
|
const c = (n, f) => {
|
|
493
493
|
if (!(typeof n != "object" || n === null))
|
|
494
494
|
for (const [d, g] of Object.entries(n))
|
|
495
|
-
typeof g == "string" && z(g) && d in f && (f[d] = D(g),
|
|
495
|
+
typeof g == "string" && z(g) && d in f && (f[d] = D(g), o = !0);
|
|
496
496
|
};
|
|
497
497
|
if (typeof t.name == "string") {
|
|
498
498
|
const n = $(t.name);
|
|
499
|
-
n !== "" && (e.name = n,
|
|
499
|
+
n !== "" && (e.name = n, o = !0);
|
|
500
500
|
}
|
|
501
501
|
if (c(t.hue, e.hue), c(t.dark, e.dark), c(t.light, e.light), typeof t.lightHue == "object" && t.lightHue !== null) {
|
|
502
502
|
const n = { ...e.hue };
|
|
@@ -507,18 +507,18 @@ function ae(r) {
|
|
|
507
507
|
t.radius
|
|
508
508
|
)) {
|
|
509
509
|
const d = Number(f);
|
|
510
|
-
M.includes(n) && Number.isFinite(d) && d >= 0 && d <= 999 && (e.radius[n] = Math.round(d),
|
|
510
|
+
M.includes(n) && Number.isFinite(d) && d >= 0 && d <= 999 && (e.radius[n] = Math.round(d), o = !0);
|
|
511
511
|
}
|
|
512
|
-
return
|
|
512
|
+
return o ? { theme: e, appearance: "dark" } : null;
|
|
513
513
|
}
|
|
514
|
-
const
|
|
514
|
+
const k = { sm: 8, md: 12, lg: 20, xl: 28, full: 999 }, A = { sm: 6, md: 8, lg: 14, xl: 18, full: 999 }, ce = { sm: 4, md: 6, lg: 10, xl: 14, full: 6 }, te = { sm: 6, md: 8, lg: 10, xl: 14, full: 10 }, P = { sm: 2, md: 4, lg: 6, xl: 8, full: 4 }, ne = [
|
|
515
515
|
{
|
|
516
516
|
id: "gryt",
|
|
517
517
|
name: "Gryt",
|
|
518
518
|
note: "What the library ships, from the Gryt code-theme.",
|
|
519
519
|
group: "Gryt",
|
|
520
520
|
source: "github.com/Gryt-chat/code-theme",
|
|
521
|
-
theme:
|
|
521
|
+
theme: p
|
|
522
522
|
},
|
|
523
523
|
{
|
|
524
524
|
id: "ember",
|
|
@@ -559,7 +559,7 @@ const A = { sm: 8, md: 12, lg: 20, xl: 28, full: 999 }, v = { sm: 6, md: 8, lg:
|
|
|
559
559
|
muted: "#6b5b50",
|
|
560
560
|
text: "#241a14"
|
|
561
561
|
},
|
|
562
|
-
radius:
|
|
562
|
+
radius: k
|
|
563
563
|
}
|
|
564
564
|
},
|
|
565
565
|
{
|
|
@@ -601,7 +601,7 @@ const A = { sm: 8, md: 12, lg: 20, xl: 28, full: 999 }, v = { sm: 6, md: 8, lg:
|
|
|
601
601
|
muted: "#5b5b63",
|
|
602
602
|
text: "#17171a"
|
|
603
603
|
},
|
|
604
|
-
radius:
|
|
604
|
+
radius: A
|
|
605
605
|
}
|
|
606
606
|
},
|
|
607
607
|
{
|
|
@@ -702,7 +702,7 @@ const A = { sm: 8, md: 12, lg: 20, xl: 28, full: 999 }, v = { sm: 6, md: 8, lg:
|
|
|
702
702
|
muted: "#6c664b",
|
|
703
703
|
text: "#1f1f1f"
|
|
704
704
|
},
|
|
705
|
-
radius:
|
|
705
|
+
radius: A
|
|
706
706
|
}
|
|
707
707
|
},
|
|
708
708
|
{
|
|
@@ -760,7 +760,7 @@ const A = { sm: 8, md: 12, lg: 20, xl: 28, full: 999 }, v = { sm: 6, md: 8, lg:
|
|
|
760
760
|
muted: "#4c566a",
|
|
761
761
|
text: "#2e3440"
|
|
762
762
|
},
|
|
763
|
-
radius:
|
|
763
|
+
radius: A
|
|
764
764
|
}
|
|
765
765
|
},
|
|
766
766
|
{
|
|
@@ -819,7 +819,7 @@ const A = { sm: 8, md: 12, lg: 20, xl: 28, full: 999 }, v = { sm: 6, md: 8, lg:
|
|
|
819
819
|
muted: "#6c6f85",
|
|
820
820
|
text: "#4c4f69"
|
|
821
821
|
},
|
|
822
|
-
radius:
|
|
822
|
+
radius: k
|
|
823
823
|
}
|
|
824
824
|
},
|
|
825
825
|
{
|
|
@@ -927,7 +927,7 @@ const A = { sm: 8, md: 12, lg: 20, xl: 28, full: 999 }, v = { sm: 6, md: 8, lg:
|
|
|
927
927
|
muted: "#87867f",
|
|
928
928
|
text: "#141413"
|
|
929
929
|
},
|
|
930
|
-
radius:
|
|
930
|
+
radius: k
|
|
931
931
|
}
|
|
932
932
|
},
|
|
933
933
|
{
|
|
@@ -1040,9 +1040,88 @@ const A = { sm: 8, md: 12, lg: 20, xl: 28, full: 999 }, v = { sm: 6, md: 8, lg:
|
|
|
1040
1040
|
}
|
|
1041
1041
|
], le = new Map(
|
|
1042
1042
|
ne.map((r) => [r.id, r])
|
|
1043
|
-
)
|
|
1043
|
+
), he = [
|
|
1044
|
+
0,
|
|
1045
|
+
0.1217,
|
|
1046
|
+
0.3812,
|
|
1047
|
+
0.6579,
|
|
1048
|
+
0.883,
|
|
1049
|
+
1.0304,
|
|
1050
|
+
1.1034,
|
|
1051
|
+
1.12,
|
|
1052
|
+
1.1025,
|
|
1053
|
+
1.0705,
|
|
1054
|
+
1.0376,
|
|
1055
|
+
1.0115,
|
|
1056
|
+
0.9949,
|
|
1057
|
+
0.987,
|
|
1058
|
+
0.9857,
|
|
1059
|
+
0.9881,
|
|
1060
|
+
0.992,
|
|
1061
|
+
0.9959,
|
|
1062
|
+
0.9989,
|
|
1063
|
+
1.0008,
|
|
1064
|
+
1.0016,
|
|
1065
|
+
1.0017,
|
|
1066
|
+
1.0014,
|
|
1067
|
+
1.0009,
|
|
1068
|
+
1.0004,
|
|
1069
|
+
1.0001,
|
|
1070
|
+
1
|
|
1071
|
+
], be = [
|
|
1072
|
+
0,
|
|
1073
|
+
0.0496,
|
|
1074
|
+
0.1585,
|
|
1075
|
+
0.2869,
|
|
1076
|
+
0.4135,
|
|
1077
|
+
0.5279,
|
|
1078
|
+
0.6263,
|
|
1079
|
+
0.7079,
|
|
1080
|
+
0.7741,
|
|
1081
|
+
0.8268,
|
|
1082
|
+
0.8681,
|
|
1083
|
+
0.9002,
|
|
1084
|
+
0.9249,
|
|
1085
|
+
0.9437,
|
|
1086
|
+
0.958,
|
|
1087
|
+
0.9688,
|
|
1088
|
+
0.9768,
|
|
1089
|
+
0.9829,
|
|
1090
|
+
0.9874,
|
|
1091
|
+
0.9907,
|
|
1092
|
+
0.9932,
|
|
1093
|
+
0.995,
|
|
1094
|
+
0.9963,
|
|
1095
|
+
0.9973,
|
|
1096
|
+
0.9981,
|
|
1097
|
+
0.9986,
|
|
1098
|
+
1
|
|
1099
|
+
], ye = {
|
|
1100
|
+
/** Most interactions. */
|
|
1101
|
+
spring: 500,
|
|
1102
|
+
/** Drawer, where the travel is the width of a panel. */
|
|
1103
|
+
springSoft: 700,
|
|
1104
|
+
/** Colour changes, which should not feel sprung. */
|
|
1105
|
+
fast: 150
|
|
1106
|
+
}, me = {
|
|
1107
|
+
button: { hover: 1.03, press: 0.96 },
|
|
1108
|
+
iconButton: { hover: 1.06, press: 0.94 },
|
|
1109
|
+
checkbox: { hover: 1.08, press: 0.92 },
|
|
1110
|
+
radio: { hover: 1.08, press: 0.92 },
|
|
1111
|
+
switch: { hover: 1.05, press: 0.95 },
|
|
1112
|
+
toggle: { hover: 1.06, press: 0.94 },
|
|
1113
|
+
toast: { hover: 1.04, press: 0.96 },
|
|
1114
|
+
sliderThumb: { hover: 1.12, press: 0.94 }
|
|
1115
|
+
}, pe = 64;
|
|
1116
|
+
function Le(r, a) {
|
|
1117
|
+
if (r.length === 0) return a;
|
|
1118
|
+
if (a <= 0) return r[0];
|
|
1119
|
+
if (a >= 1) return r[r.length - 1];
|
|
1120
|
+
const t = (r.length - 1) * a, e = Math.floor(t), o = t - e, c = r[e], n = r[e + 1] ?? c;
|
|
1121
|
+
return c + (n - c) * o;
|
|
1122
|
+
}
|
|
1044
1123
|
export {
|
|
1045
|
-
|
|
1124
|
+
R as GRYT_HUE_KEYS,
|
|
1046
1125
|
O as GRYT_NEUTRAL_KEYS,
|
|
1047
1126
|
M as GRYT_RADIUS_KEYS,
|
|
1048
1127
|
V as GRYT_THEME_NAME_MAX,
|
|
@@ -1054,16 +1133,19 @@ export {
|
|
|
1054
1133
|
ge as encodeGrytTheme,
|
|
1055
1134
|
se as grytAlphaScales,
|
|
1056
1135
|
fe as grytAlphaScalesLight,
|
|
1136
|
+
pe as grytDrawerBleed,
|
|
1137
|
+
ye as grytDurations,
|
|
1057
1138
|
l as grytLightTokens,
|
|
1058
1139
|
ne as grytPresets,
|
|
1059
1140
|
le as grytPresetsById,
|
|
1141
|
+
me as grytScaleSteps,
|
|
1060
1142
|
_ as grytScales,
|
|
1061
1143
|
T as grytScalesLight,
|
|
1062
|
-
|
|
1144
|
+
p as grytTheme,
|
|
1063
1145
|
Z as grytThemeHues,
|
|
1064
1146
|
ue as grytThemeToOptions,
|
|
1065
|
-
|
|
1066
|
-
|
|
1147
|
+
s as grytTokens,
|
|
1148
|
+
S as hexToOklch,
|
|
1067
1149
|
x as hexToRgb,
|
|
1068
1150
|
h as hueScale,
|
|
1069
1151
|
b as hueScaleLight,
|
|
@@ -1073,6 +1155,9 @@ export {
|
|
|
1073
1155
|
D as normalizeHexColor,
|
|
1074
1156
|
$ as normalizeThemeName,
|
|
1075
1157
|
y as oklchToHex,
|
|
1076
|
-
N as rgbToHex
|
|
1158
|
+
N as rgbToHex,
|
|
1159
|
+
Le as sampleCurve,
|
|
1160
|
+
he as springSamples,
|
|
1161
|
+
be as springTightSamples
|
|
1077
1162
|
};
|
|
1078
1163
|
//# sourceMappingURL=index.js.map
|