inferred-types 0.53.1 → 0.53.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.
- package/modules/inferred-types/dist/index.cjs +26 -4
- package/modules/inferred-types/dist/index.cjs.map +1 -1
- package/modules/inferred-types/dist/index.d.mts +36181 -0
- package/modules/inferred-types/dist/index.d.ts +36181 -0
- package/modules/inferred-types/dist/index.js +26 -4
- package/modules/inferred-types/dist/index.js.map +1 -1
- package/modules/runtime/dist/index.cjs +26 -4
- package/modules/runtime/dist/index.cjs.map +1 -1
- package/modules/runtime/dist/index.d.mts +14387 -0
- package/modules/runtime/dist/index.d.ts +14387 -0
- package/modules/runtime/dist/index.js +26 -4
- package/modules/runtime/dist/index.js.map +1 -1
- package/modules/types/dist/index.d.mts +17712 -0
- package/modules/types/dist/index.d.ts +17712 -0
- package/package.json +5 -8
|
@@ -3774,6 +3774,17 @@ var TW_LUMINOSITY2 = {
|
|
|
3774
3774
|
900: 32,
|
|
3775
3775
|
950: 23.78
|
|
3776
3776
|
};
|
|
3777
|
+
TW_LUMINOSITY2["50"];
|
|
3778
|
+
TW_LUMINOSITY2["100"];
|
|
3779
|
+
TW_LUMINOSITY2["200"];
|
|
3780
|
+
TW_LUMINOSITY2["300"];
|
|
3781
|
+
TW_LUMINOSITY2["400"];
|
|
3782
|
+
TW_LUMINOSITY2["500"];
|
|
3783
|
+
TW_LUMINOSITY2["600"];
|
|
3784
|
+
TW_LUMINOSITY2["700"];
|
|
3785
|
+
TW_LUMINOSITY2["800"];
|
|
3786
|
+
TW_LUMINOSITY2["900"];
|
|
3787
|
+
TW_LUMINOSITY2["950"];
|
|
3777
3788
|
var TW_CHROMA2 = {
|
|
3778
3789
|
50: 0.0108,
|
|
3779
3790
|
100: 0.0321,
|
|
@@ -3787,6 +3798,17 @@ var TW_CHROMA2 = {
|
|
|
3787
3798
|
900: 0.0726,
|
|
3788
3799
|
950: 0.054
|
|
3789
3800
|
};
|
|
3801
|
+
TW_CHROMA2["50"];
|
|
3802
|
+
TW_CHROMA2["100"];
|
|
3803
|
+
TW_CHROMA2["200"];
|
|
3804
|
+
TW_CHROMA2["300"];
|
|
3805
|
+
TW_CHROMA2["400"];
|
|
3806
|
+
TW_CHROMA2["500"];
|
|
3807
|
+
TW_CHROMA2["600"];
|
|
3808
|
+
TW_CHROMA2["700"];
|
|
3809
|
+
TW_CHROMA2["800"];
|
|
3810
|
+
TW_CHROMA2["900"];
|
|
3811
|
+
TW_CHROMA2["950"];
|
|
3790
3812
|
var TW_COLOR_TARGETS2 = [
|
|
3791
3813
|
"bg",
|
|
3792
3814
|
"text",
|
|
@@ -4538,8 +4560,8 @@ function cssColor(color, v1, v2, v3, opacity) {
|
|
|
4538
4560
|
return `color(${color} ${v1} ${v2} ${v3}${opacity ? ` / ${opacity}` : ""}`;
|
|
4539
4561
|
}
|
|
4540
4562
|
function twColor(color, luminosity) {
|
|
4541
|
-
const lum = TW_LUMINOSITY2[luminosity];
|
|
4542
|
-
const chroma = TW_CHROMA2[luminosity];
|
|
4563
|
+
const lum = luminosity in TW_LUMINOSITY2 ? TW_LUMINOSITY2[luminosity] : 0;
|
|
4564
|
+
const chroma = luminosity in TW_CHROMA2 ? TW_CHROMA2[luminosity] : 0;
|
|
4543
4565
|
const hue = TW_HUE2[color];
|
|
4544
4566
|
return `oklch(${lum} ${chroma} ${hue})`;
|
|
4545
4567
|
}
|
|
@@ -5046,8 +5068,8 @@ function isFalse(i) {
|
|
|
5046
5068
|
function isFalsy(val) {
|
|
5047
5069
|
return FALSY_VALUES2.includes(val);
|
|
5048
5070
|
}
|
|
5049
|
-
function isFnWithParams(input) {
|
|
5050
|
-
return typeof input === "function" &&
|
|
5071
|
+
function isFnWithParams(input, ...params) {
|
|
5072
|
+
return params.length === 0 ? typeof input === "function" && input?.length > 0 : typeof input === "function" && input?.length === params.length;
|
|
5051
5073
|
}
|
|
5052
5074
|
function isHexadecimal(val) {
|
|
5053
5075
|
return isString(val) && asChars(val).every((i) => isNumericString(i) || ["a", "b", "c", "d", "e", "f"].includes(i.toLowerCase()));
|