@qy_better_lib/pc 0.0.9 → 0.1.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/@qy_better_lib/pc.min.js +42 -1
- package/lib/node_modules/@ctrl/tinycolor/dist/module/conversion.js +115 -0
- package/lib/node_modules/@ctrl/tinycolor/dist/module/css-color-names.js +153 -0
- package/lib/node_modules/@ctrl/tinycolor/dist/module/format-input.js +68 -0
- package/lib/node_modules/@ctrl/tinycolor/dist/module/index.js +183 -0
- package/lib/node_modules/@ctrl/tinycolor/dist/module/util.js +32 -0
- package/lib/node_modules/@element-plus/icons-vue/dist/index.js +167 -0
- package/lib/node_modules/@intlify/core-base/dist/core-base.js +1104 -0
- package/lib/node_modules/@intlify/message-compiler/dist/message-compiler.esm-browser.js +1004 -0
- package/lib/node_modules/@intlify/shared/dist/shared.js +142 -0
- package/lib/node_modules/@qy_better_lib/core/lib/directives/click-outside.js +40 -0
- package/lib/node_modules/@qy_better_lib/core/lib/utils/is.js +8 -0
- package/lib/node_modules/@vue/shared/dist/shared.esm-bundler.js +22 -0
- package/lib/node_modules/@vueuse/core/index.js +112 -0
- package/lib/node_modules/@vueuse/shared/index.js +68 -0
- package/lib/node_modules/element-plus/es/_virtual/plugin-vue_export-helper.js +9 -0
- package/lib/node_modules/element-plus/es/components/badge/index.js +7 -0
- package/lib/node_modules/element-plus/es/components/button/index.js +11 -0
- package/lib/node_modules/element-plus/es/components/icon/index.js +7 -0
- package/lib/node_modules/element-plus/es/components/input/index.js +7 -0
- package/lib/node_modules/element-plus/es/components/message/index.js +7 -0
- package/lib/node_modules/element-plus/es/components/message-box/index.js +10 -0
- package/lib/node_modules/element-plus/es/components/notification/index.js +7 -0
- package/lib/node_modules/element-plus/es/components/overlay/index.js +9 -0
- package/lib/node_modules/element-plus/es/constants/aria.js +20 -0
- package/lib/node_modules/element-plus/es/constants/event.js +4 -0
- package/lib/node_modules/element-plus/es/constants/size.js +4 -0
- package/lib/node_modules/element-plus/es/directives/trap-focus/index.js +36 -0
- package/lib/node_modules/element-plus/es/hooks/use-aria/index.js +14 -0
- package/lib/node_modules/element-plus/es/hooks/use-attrs/index.js +13 -0
- package/lib/node_modules/element-plus/es/hooks/use-composition/index.js +29 -0
- package/lib/node_modules/element-plus/es/hooks/use-cursor/index.js +39 -0
- package/lib/node_modules/element-plus/es/hooks/use-deprecated/index.js +14 -0
- package/lib/node_modules/element-plus/es/hooks/use-draggable/index.js +41 -0
- package/lib/node_modules/element-plus/es/hooks/use-empty-values/index.js +15 -0
- package/lib/node_modules/element-plus/es/hooks/use-escape-keydown/index.js +16 -0
- package/lib/node_modules/element-plus/es/hooks/use-focus-controller/index.js +34 -0
- package/lib/node_modules/element-plus/es/hooks/use-id/index.js +22 -0
- package/lib/node_modules/element-plus/es/hooks/use-locale/index.js +24 -0
- package/lib/node_modules/element-plus/es/hooks/use-lockscreen/index.js +30 -0
- package/lib/node_modules/element-plus/es/hooks/use-namespace/index.js +44 -0
- package/lib/node_modules/element-plus/es/hooks/use-prop/index.js +11 -0
- package/lib/node_modules/element-plus/es/hooks/use-same-target/index.js +16 -0
- package/lib/node_modules/element-plus/es/hooks/use-size/index.js +16 -0
- package/lib/node_modules/element-plus/es/hooks/use-z-index/index.js +24 -0
- package/lib/node_modules/element-plus/es/locale/lang/en.js +182 -0
- package/lib/node_modules/element-plus/es/utils/browser.js +6 -0
- package/lib/node_modules/element-plus/es/utils/dom/aria.js +23 -0
- package/lib/node_modules/element-plus/es/utils/dom/scroll.js +20 -0
- package/lib/node_modules/element-plus/es/utils/dom/style.js +47 -0
- package/lib/node_modules/element-plus/es/utils/error.js +19 -0
- package/lib/node_modules/element-plus/es/utils/i18n.js +4 -0
- package/lib/node_modules/element-plus/es/utils/objects.js +4 -0
- package/lib/node_modules/element-plus/es/utils/types.js +13 -0
- package/lib/node_modules/element-plus/es/utils/typescript.js +4 -0
- package/lib/node_modules/element-plus/es/utils/vue/icon.js +31 -0
- package/lib/node_modules/element-plus/es/utils/vue/install.js +17 -0
- package/lib/node_modules/element-plus/es/utils/vue/props/runtime.js +31 -0
- package/lib/node_modules/element-plus/es/utils/vue/validator.js +5 -0
- package/lib/node_modules/element-plus/es/utils/vue/vnode.js +5 -0
- package/lib/node_modules/lodash-es/_Hash.js +20 -0
- package/lib/node_modules/lodash-es/_ListCache.js +20 -0
- package/lib/node_modules/lodash-es/_Map.js +6 -0
- package/lib/node_modules/lodash-es/_MapCache.js +20 -0
- package/lib/node_modules/lodash-es/_Symbol.js +5 -0
- package/lib/node_modules/lodash-es/_apply.js +16 -0
- package/lib/node_modules/lodash-es/_arrayMap.js +8 -0
- package/lib/node_modules/lodash-es/_arrayPush.js +8 -0
- package/lib/node_modules/lodash-es/_assignValue.js +10 -0
- package/lib/node_modules/lodash-es/_assocIndexOf.js +10 -0
- package/lib/node_modules/lodash-es/_baseAssignValue.js +12 -0
- package/lib/node_modules/lodash-es/_baseFlatten.js +13 -0
- package/lib/node_modules/lodash-es/_baseGet.js +11 -0
- package/lib/node_modules/lodash-es/_baseGetTag.js +10 -0
- package/lib/node_modules/lodash-es/_baseHasIn.js +6 -0
- package/lib/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/lib/node_modules/lodash-es/_baseIsNative.js +16 -0
- package/lib/node_modules/lodash-es/_basePick.js +10 -0
- package/lib/node_modules/lodash-es/_basePickBy.js +13 -0
- package/lib/node_modules/lodash-es/_baseSet.js +24 -0
- package/lib/node_modules/lodash-es/_baseSetToString.js +14 -0
- package/lib/node_modules/lodash-es/_baseToString.js +18 -0
- package/lib/node_modules/lodash-es/_castPath.js +10 -0
- package/lib/node_modules/lodash-es/_coreJsData.js +5 -0
- package/lib/node_modules/lodash-es/_defineProperty.js +11 -0
- package/lib/node_modules/lodash-es/_flatRest.js +9 -0
- package/lib/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/lib/node_modules/lodash-es/_getMapData.js +8 -0
- package/lib/node_modules/lodash-es/_getNative.js +9 -0
- package/lib/node_modules/lodash-es/_getRawTag.js +15 -0
- package/lib/node_modules/lodash-es/_getValue.js +6 -0
- package/lib/node_modules/lodash-es/_hasPath.js +19 -0
- package/lib/node_modules/lodash-es/_hashClear.js +7 -0
- package/lib/node_modules/lodash-es/_hashDelete.js +7 -0
- package/lib/node_modules/lodash-es/_hashGet.js +13 -0
- package/lib/node_modules/lodash-es/_hashHas.js +9 -0
- package/lib/node_modules/lodash-es/_hashSet.js +9 -0
- package/lib/node_modules/lodash-es/_isFlattenable.js +10 -0
- package/lib/node_modules/lodash-es/_isIndex.js +8 -0
- package/lib/node_modules/lodash-es/_isKey.js +12 -0
- package/lib/node_modules/lodash-es/_isKeyable.js +7 -0
- package/lib/node_modules/lodash-es/_isMasked.js +11 -0
- package/lib/node_modules/lodash-es/_listCacheClear.js +6 -0
- package/lib/node_modules/lodash-es/_listCacheDelete.js +12 -0
- package/lib/node_modules/lodash-es/_listCacheGet.js +8 -0
- package/lib/node_modules/lodash-es/_listCacheHas.js +7 -0
- package/lib/node_modules/lodash-es/_listCacheSet.js +8 -0
- package/lib/node_modules/lodash-es/_mapCacheClear.js +13 -0
- package/lib/node_modules/lodash-es/_mapCacheDelete.js +8 -0
- package/lib/node_modules/lodash-es/_mapCacheGet.js +7 -0
- package/lib/node_modules/lodash-es/_mapCacheHas.js +7 -0
- package/lib/node_modules/lodash-es/_mapCacheSet.js +8 -0
- package/lib/node_modules/lodash-es/_memoizeCapped.js +11 -0
- package/lib/node_modules/lodash-es/_nativeCreate.js +5 -0
- package/lib/node_modules/lodash-es/_objectToString.js +7 -0
- package/lib/node_modules/lodash-es/_overRest.js +15 -0
- package/lib/node_modules/lodash-es/_root.js +5 -0
- package/lib/node_modules/lodash-es/_setToString.js +6 -0
- package/lib/node_modules/lodash-es/_shortOut.js +16 -0
- package/lib/node_modules/lodash-es/_stringToPath.js +10 -0
- package/lib/node_modules/lodash-es/_toKey.js +10 -0
- package/lib/node_modules/lodash-es/_toSource.js +17 -0
- package/lib/node_modules/lodash-es/constant.js +8 -0
- package/lib/node_modules/lodash-es/eq.js +6 -0
- package/lib/node_modules/lodash-es/flatten.js +8 -0
- package/lib/node_modules/lodash-es/fromPairs.js +10 -0
- package/lib/node_modules/lodash-es/get.js +8 -0
- package/lib/node_modules/lodash-es/hasIn.js +8 -0
- package/lib/node_modules/lodash-es/identity.js +6 -0
- package/lib/node_modules/lodash-es/isArguments.js +10 -0
- package/lib/node_modules/lodash-es/isArray.js +4 -0
- package/lib/node_modules/lodash-es/isFunction.js +12 -0
- package/lib/node_modules/lodash-es/isLength.js +7 -0
- package/lib/node_modules/lodash-es/isNil.js +6 -0
- package/lib/node_modules/lodash-es/isObject.js +7 -0
- package/lib/node_modules/lodash-es/isObjectLike.js +6 -0
- package/lib/node_modules/lodash-es/isSymbol.js +9 -0
- package/lib/node_modules/lodash-es/memoize.js +18 -0
- package/lib/node_modules/lodash-es/pick.js +8 -0
- package/lib/node_modules/lodash-es/toString.js +7 -0
- package/lib/node_modules/vue-i18n/dist/vue-i18n.js +864 -0
- package/package.json +3 -3
- package/lib/contextMenu/index.js +0 -7
- package/lib/index.js +0 -24
- package/lib/tableExtend/index.js +0 -7
- package/lib/tableExtend/props.js +0 -50
- package/lib/tableExtend/type.js +0 -4
- package/lib/tableExtend/useTable.js +0 -72
- package/lib/textButton/index.js +0 -7
- package/lib/utils/index.js +0 -79
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { bound01 as u, pad2 as f } from "./util.js";
|
|
2
|
+
function T(t, a, r) {
|
|
3
|
+
return {
|
|
4
|
+
r: u(t, 255) * 255,
|
|
5
|
+
g: u(a, 255) * 255,
|
|
6
|
+
b: u(r, 255) * 255
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
function g(t, a, r) {
|
|
10
|
+
t = u(t, 255), a = u(a, 255), r = u(r, 255);
|
|
11
|
+
var i = Math.max(t, a, r), e = Math.min(t, a, r), n = 0, c = 0, o = (i + e) / 2;
|
|
12
|
+
if (i === e)
|
|
13
|
+
c = 0, n = 0;
|
|
14
|
+
else {
|
|
15
|
+
var h = i - e;
|
|
16
|
+
switch (c = o > 0.5 ? h / (2 - i - e) : h / (i + e), i) {
|
|
17
|
+
case t:
|
|
18
|
+
n = (a - r) / h + (a < r ? 6 : 0);
|
|
19
|
+
break;
|
|
20
|
+
case a:
|
|
21
|
+
n = (r - t) / h + 2;
|
|
22
|
+
break;
|
|
23
|
+
case r:
|
|
24
|
+
n = (t - a) / h + 4;
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
n /= 6;
|
|
28
|
+
}
|
|
29
|
+
return { h: n, s: c, l: o };
|
|
30
|
+
}
|
|
31
|
+
function s(t, a, r) {
|
|
32
|
+
return r < 0 && (r += 1), r > 1 && (r -= 1), r < 1 / 6 ? t + (a - t) * (6 * r) : r < 1 / 2 ? a : r < 2 / 3 ? t + (a - t) * (2 / 3 - r) * 6 : t;
|
|
33
|
+
}
|
|
34
|
+
function d(t, a, r) {
|
|
35
|
+
var i, e, n;
|
|
36
|
+
if (t = u(t, 360), a = u(a, 100), r = u(r, 100), a === 0)
|
|
37
|
+
e = r, n = r, i = r;
|
|
38
|
+
else {
|
|
39
|
+
var c = r < 0.5 ? r * (1 + a) : r + a - r * a, o = 2 * r - c;
|
|
40
|
+
i = s(o, c, t + 1 / 3), e = s(o, c, t), n = s(o, c, t - 1 / 3);
|
|
41
|
+
}
|
|
42
|
+
return { r: i * 255, g: e * 255, b: n * 255 };
|
|
43
|
+
}
|
|
44
|
+
function H(t, a, r) {
|
|
45
|
+
t = u(t, 255), a = u(a, 255), r = u(r, 255);
|
|
46
|
+
var i = Math.max(t, a, r), e = Math.min(t, a, r), n = 0, c = i, o = i - e, h = i === 0 ? 0 : o / i;
|
|
47
|
+
if (i === e)
|
|
48
|
+
n = 0;
|
|
49
|
+
else {
|
|
50
|
+
switch (i) {
|
|
51
|
+
case t:
|
|
52
|
+
n = (a - r) / o + (a < r ? 6 : 0);
|
|
53
|
+
break;
|
|
54
|
+
case a:
|
|
55
|
+
n = (r - t) / o + 2;
|
|
56
|
+
break;
|
|
57
|
+
case r:
|
|
58
|
+
n = (t - a) / o + 4;
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
n /= 6;
|
|
62
|
+
}
|
|
63
|
+
return { h: n, s: h, v: c };
|
|
64
|
+
}
|
|
65
|
+
function S(t, a, r) {
|
|
66
|
+
t = u(t, 360) * 6, a = u(a, 100), r = u(r, 100);
|
|
67
|
+
var i = Math.floor(t), e = t - i, n = r * (1 - a), c = r * (1 - e * a), o = r * (1 - (1 - e) * a), h = i % 6, v = [r, c, n, n, o, r][h], m = [o, r, r, c, n, n][h], x = [n, n, o, r, r, c][h];
|
|
68
|
+
return { r: v * 255, g: m * 255, b: x * 255 };
|
|
69
|
+
}
|
|
70
|
+
function W(t, a, r, i) {
|
|
71
|
+
var e = [
|
|
72
|
+
f(Math.round(t).toString(16)),
|
|
73
|
+
f(Math.round(a).toString(16)),
|
|
74
|
+
f(Math.round(r).toString(16))
|
|
75
|
+
];
|
|
76
|
+
return i && e[0].startsWith(e[0].charAt(1)) && e[1].startsWith(e[1].charAt(1)) && e[2].startsWith(e[2].charAt(1)) ? e[0].charAt(0) + e[1].charAt(0) + e[2].charAt(0) : e.join("");
|
|
77
|
+
}
|
|
78
|
+
function k(t, a, r, i, e) {
|
|
79
|
+
var n = [
|
|
80
|
+
f(Math.round(t).toString(16)),
|
|
81
|
+
f(Math.round(a).toString(16)),
|
|
82
|
+
f(Math.round(r).toString(16)),
|
|
83
|
+
f(A(i))
|
|
84
|
+
];
|
|
85
|
+
return e && n[0].startsWith(n[0].charAt(1)) && n[1].startsWith(n[1].charAt(1)) && n[2].startsWith(n[2].charAt(1)) && n[3].startsWith(n[3].charAt(1)) ? n[0].charAt(0) + n[1].charAt(0) + n[2].charAt(0) + n[3].charAt(0) : n.join("");
|
|
86
|
+
}
|
|
87
|
+
function A(t) {
|
|
88
|
+
return Math.round(parseFloat(t) * 255).toString(16);
|
|
89
|
+
}
|
|
90
|
+
function j(t) {
|
|
91
|
+
return M(t) / 255;
|
|
92
|
+
}
|
|
93
|
+
function M(t) {
|
|
94
|
+
return parseInt(t, 16);
|
|
95
|
+
}
|
|
96
|
+
function I(t) {
|
|
97
|
+
return {
|
|
98
|
+
r: t >> 16,
|
|
99
|
+
g: (t & 65280) >> 8,
|
|
100
|
+
b: t & 255
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
export {
|
|
104
|
+
A as convertDecimalToHex,
|
|
105
|
+
j as convertHexToDecimal,
|
|
106
|
+
d as hslToRgb,
|
|
107
|
+
S as hsvToRgb,
|
|
108
|
+
I as numberInputToObject,
|
|
109
|
+
M as parseIntFromHex,
|
|
110
|
+
W as rgbToHex,
|
|
111
|
+
g as rgbToHsl,
|
|
112
|
+
H as rgbToHsv,
|
|
113
|
+
T as rgbToRgb,
|
|
114
|
+
k as rgbaToHex
|
|
115
|
+
};
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
var e = {
|
|
2
|
+
aliceblue: "#f0f8ff",
|
|
3
|
+
antiquewhite: "#faebd7",
|
|
4
|
+
aqua: "#00ffff",
|
|
5
|
+
aquamarine: "#7fffd4",
|
|
6
|
+
azure: "#f0ffff",
|
|
7
|
+
beige: "#f5f5dc",
|
|
8
|
+
bisque: "#ffe4c4",
|
|
9
|
+
black: "#000000",
|
|
10
|
+
blanchedalmond: "#ffebcd",
|
|
11
|
+
blue: "#0000ff",
|
|
12
|
+
blueviolet: "#8a2be2",
|
|
13
|
+
brown: "#a52a2a",
|
|
14
|
+
burlywood: "#deb887",
|
|
15
|
+
cadetblue: "#5f9ea0",
|
|
16
|
+
chartreuse: "#7fff00",
|
|
17
|
+
chocolate: "#d2691e",
|
|
18
|
+
coral: "#ff7f50",
|
|
19
|
+
cornflowerblue: "#6495ed",
|
|
20
|
+
cornsilk: "#fff8dc",
|
|
21
|
+
crimson: "#dc143c",
|
|
22
|
+
cyan: "#00ffff",
|
|
23
|
+
darkblue: "#00008b",
|
|
24
|
+
darkcyan: "#008b8b",
|
|
25
|
+
darkgoldenrod: "#b8860b",
|
|
26
|
+
darkgray: "#a9a9a9",
|
|
27
|
+
darkgreen: "#006400",
|
|
28
|
+
darkgrey: "#a9a9a9",
|
|
29
|
+
darkkhaki: "#bdb76b",
|
|
30
|
+
darkmagenta: "#8b008b",
|
|
31
|
+
darkolivegreen: "#556b2f",
|
|
32
|
+
darkorange: "#ff8c00",
|
|
33
|
+
darkorchid: "#9932cc",
|
|
34
|
+
darkred: "#8b0000",
|
|
35
|
+
darksalmon: "#e9967a",
|
|
36
|
+
darkseagreen: "#8fbc8f",
|
|
37
|
+
darkslateblue: "#483d8b",
|
|
38
|
+
darkslategray: "#2f4f4f",
|
|
39
|
+
darkslategrey: "#2f4f4f",
|
|
40
|
+
darkturquoise: "#00ced1",
|
|
41
|
+
darkviolet: "#9400d3",
|
|
42
|
+
deeppink: "#ff1493",
|
|
43
|
+
deepskyblue: "#00bfff",
|
|
44
|
+
dimgray: "#696969",
|
|
45
|
+
dimgrey: "#696969",
|
|
46
|
+
dodgerblue: "#1e90ff",
|
|
47
|
+
firebrick: "#b22222",
|
|
48
|
+
floralwhite: "#fffaf0",
|
|
49
|
+
forestgreen: "#228b22",
|
|
50
|
+
fuchsia: "#ff00ff",
|
|
51
|
+
gainsboro: "#dcdcdc",
|
|
52
|
+
ghostwhite: "#f8f8ff",
|
|
53
|
+
goldenrod: "#daa520",
|
|
54
|
+
gold: "#ffd700",
|
|
55
|
+
gray: "#808080",
|
|
56
|
+
green: "#008000",
|
|
57
|
+
greenyellow: "#adff2f",
|
|
58
|
+
grey: "#808080",
|
|
59
|
+
honeydew: "#f0fff0",
|
|
60
|
+
hotpink: "#ff69b4",
|
|
61
|
+
indianred: "#cd5c5c",
|
|
62
|
+
indigo: "#4b0082",
|
|
63
|
+
ivory: "#fffff0",
|
|
64
|
+
khaki: "#f0e68c",
|
|
65
|
+
lavenderblush: "#fff0f5",
|
|
66
|
+
lavender: "#e6e6fa",
|
|
67
|
+
lawngreen: "#7cfc00",
|
|
68
|
+
lemonchiffon: "#fffacd",
|
|
69
|
+
lightblue: "#add8e6",
|
|
70
|
+
lightcoral: "#f08080",
|
|
71
|
+
lightcyan: "#e0ffff",
|
|
72
|
+
lightgoldenrodyellow: "#fafad2",
|
|
73
|
+
lightgray: "#d3d3d3",
|
|
74
|
+
lightgreen: "#90ee90",
|
|
75
|
+
lightgrey: "#d3d3d3",
|
|
76
|
+
lightpink: "#ffb6c1",
|
|
77
|
+
lightsalmon: "#ffa07a",
|
|
78
|
+
lightseagreen: "#20b2aa",
|
|
79
|
+
lightskyblue: "#87cefa",
|
|
80
|
+
lightslategray: "#778899",
|
|
81
|
+
lightslategrey: "#778899",
|
|
82
|
+
lightsteelblue: "#b0c4de",
|
|
83
|
+
lightyellow: "#ffffe0",
|
|
84
|
+
lime: "#00ff00",
|
|
85
|
+
limegreen: "#32cd32",
|
|
86
|
+
linen: "#faf0e6",
|
|
87
|
+
magenta: "#ff00ff",
|
|
88
|
+
maroon: "#800000",
|
|
89
|
+
mediumaquamarine: "#66cdaa",
|
|
90
|
+
mediumblue: "#0000cd",
|
|
91
|
+
mediumorchid: "#ba55d3",
|
|
92
|
+
mediumpurple: "#9370db",
|
|
93
|
+
mediumseagreen: "#3cb371",
|
|
94
|
+
mediumslateblue: "#7b68ee",
|
|
95
|
+
mediumspringgreen: "#00fa9a",
|
|
96
|
+
mediumturquoise: "#48d1cc",
|
|
97
|
+
mediumvioletred: "#c71585",
|
|
98
|
+
midnightblue: "#191970",
|
|
99
|
+
mintcream: "#f5fffa",
|
|
100
|
+
mistyrose: "#ffe4e1",
|
|
101
|
+
moccasin: "#ffe4b5",
|
|
102
|
+
navajowhite: "#ffdead",
|
|
103
|
+
navy: "#000080",
|
|
104
|
+
oldlace: "#fdf5e6",
|
|
105
|
+
olive: "#808000",
|
|
106
|
+
olivedrab: "#6b8e23",
|
|
107
|
+
orange: "#ffa500",
|
|
108
|
+
orangered: "#ff4500",
|
|
109
|
+
orchid: "#da70d6",
|
|
110
|
+
palegoldenrod: "#eee8aa",
|
|
111
|
+
palegreen: "#98fb98",
|
|
112
|
+
paleturquoise: "#afeeee",
|
|
113
|
+
palevioletred: "#db7093",
|
|
114
|
+
papayawhip: "#ffefd5",
|
|
115
|
+
peachpuff: "#ffdab9",
|
|
116
|
+
peru: "#cd853f",
|
|
117
|
+
pink: "#ffc0cb",
|
|
118
|
+
plum: "#dda0dd",
|
|
119
|
+
powderblue: "#b0e0e6",
|
|
120
|
+
purple: "#800080",
|
|
121
|
+
rebeccapurple: "#663399",
|
|
122
|
+
red: "#ff0000",
|
|
123
|
+
rosybrown: "#bc8f8f",
|
|
124
|
+
royalblue: "#4169e1",
|
|
125
|
+
saddlebrown: "#8b4513",
|
|
126
|
+
salmon: "#fa8072",
|
|
127
|
+
sandybrown: "#f4a460",
|
|
128
|
+
seagreen: "#2e8b57",
|
|
129
|
+
seashell: "#fff5ee",
|
|
130
|
+
sienna: "#a0522d",
|
|
131
|
+
silver: "#c0c0c0",
|
|
132
|
+
skyblue: "#87ceeb",
|
|
133
|
+
slateblue: "#6a5acd",
|
|
134
|
+
slategray: "#708090",
|
|
135
|
+
slategrey: "#708090",
|
|
136
|
+
snow: "#fffafa",
|
|
137
|
+
springgreen: "#00ff7f",
|
|
138
|
+
steelblue: "#4682b4",
|
|
139
|
+
tan: "#d2b48c",
|
|
140
|
+
teal: "#008080",
|
|
141
|
+
thistle: "#d8bfd8",
|
|
142
|
+
tomato: "#ff6347",
|
|
143
|
+
turquoise: "#40e0d0",
|
|
144
|
+
violet: "#ee82ee",
|
|
145
|
+
wheat: "#f5deb3",
|
|
146
|
+
white: "#ffffff",
|
|
147
|
+
whitesmoke: "#f5f5f5",
|
|
148
|
+
yellow: "#ffff00",
|
|
149
|
+
yellowgreen: "#9acd32"
|
|
150
|
+
};
|
|
151
|
+
export {
|
|
152
|
+
e as names
|
|
153
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { rgbToRgb as A, hsvToRgb as F, hslToRgb as R, parseIntFromHex as n, convertHexToDecimal as p } from "./conversion.js";
|
|
2
|
+
import { names as S } from "./css-color-names.js";
|
|
3
|
+
import { convertToPercentage as x, boundAlpha as E } from "./util.js";
|
|
4
|
+
function d(a) {
|
|
5
|
+
var t = { r: 0, g: 0, b: 0 }, e = 1, h = null, v = null, u = null, g = !1, i = !1;
|
|
6
|
+
return typeof a == "string" && (a = I(a)), typeof a == "object" && (f(a.r) && f(a.g) && f(a.b) ? (t = A(a.r, a.g, a.b), g = !0, i = String(a.r).substr(-1) === "%" ? "prgb" : "rgb") : f(a.h) && f(a.s) && f(a.v) ? (h = x(a.s), v = x(a.v), t = F(a.h, h, v), g = !0, i = "hsv") : f(a.h) && f(a.s) && f(a.l) && (h = x(a.s), u = x(a.l), t = R(a.h, h, u), g = !0, i = "hsl"), Object.prototype.hasOwnProperty.call(a, "a") && (e = a.a)), e = E(e), {
|
|
7
|
+
ok: g,
|
|
8
|
+
format: a.format || i,
|
|
9
|
+
r: Math.min(255, Math.max(t.r, 0)),
|
|
10
|
+
g: Math.min(255, Math.max(t.g, 0)),
|
|
11
|
+
b: Math.min(255, Math.max(t.b, 0)),
|
|
12
|
+
a: e
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
var T = "[-\\+]?\\d+%?", M = "[-\\+]?\\d*\\.\\d+%?", s = "(?:".concat(M, ")|(?:").concat(T, ")"), m = "[\\s|\\(]+(".concat(s, ")[,|\\s]+(").concat(s, ")[,|\\s]+(").concat(s, ")\\s*\\)?"), b = "[\\s|\\(]+(".concat(s, ")[,|\\s]+(").concat(s, ")[,|\\s]+(").concat(s, ")[,|\\s]+(").concat(s, ")\\s*\\)?"), r = {
|
|
16
|
+
CSS_UNIT: new RegExp(s),
|
|
17
|
+
rgb: new RegExp("rgb" + m),
|
|
18
|
+
rgba: new RegExp("rgba" + b),
|
|
19
|
+
hsl: new RegExp("hsl" + m),
|
|
20
|
+
hsla: new RegExp("hsla" + b),
|
|
21
|
+
hsv: new RegExp("hsv" + m),
|
|
22
|
+
hsva: new RegExp("hsva" + b),
|
|
23
|
+
hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
24
|
+
hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
|
|
25
|
+
hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
26
|
+
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
|
|
27
|
+
};
|
|
28
|
+
function I(a) {
|
|
29
|
+
if (a = a.trim().toLowerCase(), a.length === 0)
|
|
30
|
+
return !1;
|
|
31
|
+
var t = !1;
|
|
32
|
+
if (S[a])
|
|
33
|
+
a = S[a], t = !0;
|
|
34
|
+
else if (a === "transparent")
|
|
35
|
+
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
|
|
36
|
+
var e = r.rgb.exec(a);
|
|
37
|
+
return e ? { r: e[1], g: e[2], b: e[3] } : (e = r.rgba.exec(a), e ? { r: e[1], g: e[2], b: e[3], a: e[4] } : (e = r.hsl.exec(a), e ? { h: e[1], s: e[2], l: e[3] } : (e = r.hsla.exec(a), e ? { h: e[1], s: e[2], l: e[3], a: e[4] } : (e = r.hsv.exec(a), e ? { h: e[1], s: e[2], v: e[3] } : (e = r.hsva.exec(a), e ? { h: e[1], s: e[2], v: e[3], a: e[4] } : (e = r.hex8.exec(a), e ? {
|
|
38
|
+
r: n(e[1]),
|
|
39
|
+
g: n(e[2]),
|
|
40
|
+
b: n(e[3]),
|
|
41
|
+
a: p(e[4]),
|
|
42
|
+
format: t ? "name" : "hex8"
|
|
43
|
+
} : (e = r.hex6.exec(a), e ? {
|
|
44
|
+
r: n(e[1]),
|
|
45
|
+
g: n(e[2]),
|
|
46
|
+
b: n(e[3]),
|
|
47
|
+
format: t ? "name" : "hex"
|
|
48
|
+
} : (e = r.hex4.exec(a), e ? {
|
|
49
|
+
r: n(e[1] + e[1]),
|
|
50
|
+
g: n(e[2] + e[2]),
|
|
51
|
+
b: n(e[3] + e[3]),
|
|
52
|
+
a: p(e[4] + e[4]),
|
|
53
|
+
format: t ? "name" : "hex8"
|
|
54
|
+
} : (e = r.hex3.exec(a), e ? {
|
|
55
|
+
r: n(e[1] + e[1]),
|
|
56
|
+
g: n(e[2] + e[2]),
|
|
57
|
+
b: n(e[3] + e[3]),
|
|
58
|
+
format: t ? "name" : "hex"
|
|
59
|
+
} : !1)))))))));
|
|
60
|
+
}
|
|
61
|
+
function f(a) {
|
|
62
|
+
return !!r.CSS_UNIT.exec(String(a));
|
|
63
|
+
}
|
|
64
|
+
export {
|
|
65
|
+
d as inputToRGB,
|
|
66
|
+
f as isValidCSSUnit,
|
|
67
|
+
I as stringInputToObject
|
|
68
|
+
};
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { rgbToHsv as u, rgbToHsl as p, rgbToHex as f, rgbaToHex as g, numberInputToObject as d } from "./conversion.js";
|
|
2
|
+
import { names as v } from "./css-color-names.js";
|
|
3
|
+
import { inputToRGB as b } from "./format-input.js";
|
|
4
|
+
import { boundAlpha as y, clamp01 as a, bound01 as c } from "./util.js";
|
|
5
|
+
var S = (
|
|
6
|
+
/** @class */
|
|
7
|
+
function() {
|
|
8
|
+
function n(t, r) {
|
|
9
|
+
t === void 0 && (t = ""), r === void 0 && (r = {});
|
|
10
|
+
var i;
|
|
11
|
+
if (t instanceof n)
|
|
12
|
+
return t;
|
|
13
|
+
typeof t == "number" && (t = d(t)), this.originalInput = t;
|
|
14
|
+
var e = b(t);
|
|
15
|
+
this.originalInput = t, this.r = e.r, this.g = e.g, this.b = e.b, this.a = e.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (i = r.format) !== null && i !== void 0 ? i : e.format, this.gradientType = r.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = e.ok;
|
|
16
|
+
}
|
|
17
|
+
return n.prototype.isDark = function() {
|
|
18
|
+
return this.getBrightness() < 128;
|
|
19
|
+
}, n.prototype.isLight = function() {
|
|
20
|
+
return !this.isDark();
|
|
21
|
+
}, n.prototype.getBrightness = function() {
|
|
22
|
+
var t = this.toRgb();
|
|
23
|
+
return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3;
|
|
24
|
+
}, n.prototype.getLuminance = function() {
|
|
25
|
+
var t = this.toRgb(), r, i, e, o = t.r / 255, h = t.g / 255, s = t.b / 255;
|
|
26
|
+
return o <= 0.03928 ? r = o / 12.92 : r = Math.pow((o + 0.055) / 1.055, 2.4), h <= 0.03928 ? i = h / 12.92 : i = Math.pow((h + 0.055) / 1.055, 2.4), s <= 0.03928 ? e = s / 12.92 : e = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * r + 0.7152 * i + 0.0722 * e;
|
|
27
|
+
}, n.prototype.getAlpha = function() {
|
|
28
|
+
return this.a;
|
|
29
|
+
}, n.prototype.setAlpha = function(t) {
|
|
30
|
+
return this.a = y(t), this.roundA = Math.round(100 * this.a) / 100, this;
|
|
31
|
+
}, n.prototype.isMonochrome = function() {
|
|
32
|
+
var t = this.toHsl().s;
|
|
33
|
+
return t === 0;
|
|
34
|
+
}, n.prototype.toHsv = function() {
|
|
35
|
+
var t = u(this.r, this.g, this.b);
|
|
36
|
+
return { h: t.h * 360, s: t.s, v: t.v, a: this.a };
|
|
37
|
+
}, n.prototype.toHsvString = function() {
|
|
38
|
+
var t = u(this.r, this.g, this.b), r = Math.round(t.h * 360), i = Math.round(t.s * 100), e = Math.round(t.v * 100);
|
|
39
|
+
return this.a === 1 ? "hsv(".concat(r, ", ").concat(i, "%, ").concat(e, "%)") : "hsva(".concat(r, ", ").concat(i, "%, ").concat(e, "%, ").concat(this.roundA, ")");
|
|
40
|
+
}, n.prototype.toHsl = function() {
|
|
41
|
+
var t = p(this.r, this.g, this.b);
|
|
42
|
+
return { h: t.h * 360, s: t.s, l: t.l, a: this.a };
|
|
43
|
+
}, n.prototype.toHslString = function() {
|
|
44
|
+
var t = p(this.r, this.g, this.b), r = Math.round(t.h * 360), i = Math.round(t.s * 100), e = Math.round(t.l * 100);
|
|
45
|
+
return this.a === 1 ? "hsl(".concat(r, ", ").concat(i, "%, ").concat(e, "%)") : "hsla(".concat(r, ", ").concat(i, "%, ").concat(e, "%, ").concat(this.roundA, ")");
|
|
46
|
+
}, n.prototype.toHex = function(t) {
|
|
47
|
+
return t === void 0 && (t = !1), f(this.r, this.g, this.b, t);
|
|
48
|
+
}, n.prototype.toHexString = function(t) {
|
|
49
|
+
return t === void 0 && (t = !1), "#" + this.toHex(t);
|
|
50
|
+
}, n.prototype.toHex8 = function(t) {
|
|
51
|
+
return t === void 0 && (t = !1), g(this.r, this.g, this.b, this.a, t);
|
|
52
|
+
}, n.prototype.toHex8String = function(t) {
|
|
53
|
+
return t === void 0 && (t = !1), "#" + this.toHex8(t);
|
|
54
|
+
}, n.prototype.toHexShortString = function(t) {
|
|
55
|
+
return t === void 0 && (t = !1), this.a === 1 ? this.toHexString(t) : this.toHex8String(t);
|
|
56
|
+
}, n.prototype.toRgb = function() {
|
|
57
|
+
return {
|
|
58
|
+
r: Math.round(this.r),
|
|
59
|
+
g: Math.round(this.g),
|
|
60
|
+
b: Math.round(this.b),
|
|
61
|
+
a: this.a
|
|
62
|
+
};
|
|
63
|
+
}, n.prototype.toRgbString = function() {
|
|
64
|
+
var t = Math.round(this.r), r = Math.round(this.g), i = Math.round(this.b);
|
|
65
|
+
return this.a === 1 ? "rgb(".concat(t, ", ").concat(r, ", ").concat(i, ")") : "rgba(".concat(t, ", ").concat(r, ", ").concat(i, ", ").concat(this.roundA, ")");
|
|
66
|
+
}, n.prototype.toPercentageRgb = function() {
|
|
67
|
+
var t = function(r) {
|
|
68
|
+
return "".concat(Math.round(c(r, 255) * 100), "%");
|
|
69
|
+
};
|
|
70
|
+
return {
|
|
71
|
+
r: t(this.r),
|
|
72
|
+
g: t(this.g),
|
|
73
|
+
b: t(this.b),
|
|
74
|
+
a: this.a
|
|
75
|
+
};
|
|
76
|
+
}, n.prototype.toPercentageRgbString = function() {
|
|
77
|
+
var t = function(r) {
|
|
78
|
+
return Math.round(c(r, 255) * 100);
|
|
79
|
+
};
|
|
80
|
+
return this.a === 1 ? "rgb(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%)") : "rgba(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%, ").concat(this.roundA, ")");
|
|
81
|
+
}, n.prototype.toName = function() {
|
|
82
|
+
if (this.a === 0)
|
|
83
|
+
return "transparent";
|
|
84
|
+
if (this.a < 1)
|
|
85
|
+
return !1;
|
|
86
|
+
for (var t = "#" + f(this.r, this.g, this.b, !1), r = 0, i = Object.entries(v); r < i.length; r++) {
|
|
87
|
+
var e = i[r], o = e[0], h = e[1];
|
|
88
|
+
if (t === h)
|
|
89
|
+
return o;
|
|
90
|
+
}
|
|
91
|
+
return !1;
|
|
92
|
+
}, n.prototype.toString = function(t) {
|
|
93
|
+
var r = !!t;
|
|
94
|
+
t = t ?? this.format;
|
|
95
|
+
var i = !1, e = this.a < 1 && this.a >= 0, o = !r && e && (t.startsWith("hex") || t === "name");
|
|
96
|
+
return o ? t === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (i = this.toRgbString()), t === "prgb" && (i = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (i = this.toHexString()), t === "hex3" && (i = this.toHexString(!0)), t === "hex4" && (i = this.toHex8String(!0)), t === "hex8" && (i = this.toHex8String()), t === "name" && (i = this.toName()), t === "hsl" && (i = this.toHslString()), t === "hsv" && (i = this.toHsvString()), i || this.toHexString());
|
|
97
|
+
}, n.prototype.toNumber = function() {
|
|
98
|
+
return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
|
|
99
|
+
}, n.prototype.clone = function() {
|
|
100
|
+
return new n(this.toString());
|
|
101
|
+
}, n.prototype.lighten = function(t) {
|
|
102
|
+
t === void 0 && (t = 10);
|
|
103
|
+
var r = this.toHsl();
|
|
104
|
+
return r.l += t / 100, r.l = a(r.l), new n(r);
|
|
105
|
+
}, n.prototype.brighten = function(t) {
|
|
106
|
+
t === void 0 && (t = 10);
|
|
107
|
+
var r = this.toRgb();
|
|
108
|
+
return r.r = Math.max(0, Math.min(255, r.r - Math.round(255 * -(t / 100)))), r.g = Math.max(0, Math.min(255, r.g - Math.round(255 * -(t / 100)))), r.b = Math.max(0, Math.min(255, r.b - Math.round(255 * -(t / 100)))), new n(r);
|
|
109
|
+
}, n.prototype.darken = function(t) {
|
|
110
|
+
t === void 0 && (t = 10);
|
|
111
|
+
var r = this.toHsl();
|
|
112
|
+
return r.l -= t / 100, r.l = a(r.l), new n(r);
|
|
113
|
+
}, n.prototype.tint = function(t) {
|
|
114
|
+
return t === void 0 && (t = 10), this.mix("white", t);
|
|
115
|
+
}, n.prototype.shade = function(t) {
|
|
116
|
+
return t === void 0 && (t = 10), this.mix("black", t);
|
|
117
|
+
}, n.prototype.desaturate = function(t) {
|
|
118
|
+
t === void 0 && (t = 10);
|
|
119
|
+
var r = this.toHsl();
|
|
120
|
+
return r.s -= t / 100, r.s = a(r.s), new n(r);
|
|
121
|
+
}, n.prototype.saturate = function(t) {
|
|
122
|
+
t === void 0 && (t = 10);
|
|
123
|
+
var r = this.toHsl();
|
|
124
|
+
return r.s += t / 100, r.s = a(r.s), new n(r);
|
|
125
|
+
}, n.prototype.greyscale = function() {
|
|
126
|
+
return this.desaturate(100);
|
|
127
|
+
}, n.prototype.spin = function(t) {
|
|
128
|
+
var r = this.toHsl(), i = (r.h + t) % 360;
|
|
129
|
+
return r.h = i < 0 ? 360 + i : i, new n(r);
|
|
130
|
+
}, n.prototype.mix = function(t, r) {
|
|
131
|
+
r === void 0 && (r = 50);
|
|
132
|
+
var i = this.toRgb(), e = new n(t).toRgb(), o = r / 100, h = {
|
|
133
|
+
r: (e.r - i.r) * o + i.r,
|
|
134
|
+
g: (e.g - i.g) * o + i.g,
|
|
135
|
+
b: (e.b - i.b) * o + i.b,
|
|
136
|
+
a: (e.a - i.a) * o + i.a
|
|
137
|
+
};
|
|
138
|
+
return new n(h);
|
|
139
|
+
}, n.prototype.analogous = function(t, r) {
|
|
140
|
+
t === void 0 && (t = 6), r === void 0 && (r = 30);
|
|
141
|
+
var i = this.toHsl(), e = 360 / r, o = [this];
|
|
142
|
+
for (i.h = (i.h - (e * t >> 1) + 720) % 360; --t; )
|
|
143
|
+
i.h = (i.h + e) % 360, o.push(new n(i));
|
|
144
|
+
return o;
|
|
145
|
+
}, n.prototype.complement = function() {
|
|
146
|
+
var t = this.toHsl();
|
|
147
|
+
return t.h = (t.h + 180) % 360, new n(t);
|
|
148
|
+
}, n.prototype.monochromatic = function(t) {
|
|
149
|
+
t === void 0 && (t = 6);
|
|
150
|
+
for (var r = this.toHsv(), i = r.h, e = r.s, o = r.v, h = [], s = 1 / t; t--; )
|
|
151
|
+
h.push(new n({ h: i, s: e, v: o })), o = (o + s) % 1;
|
|
152
|
+
return h;
|
|
153
|
+
}, n.prototype.splitcomplement = function() {
|
|
154
|
+
var t = this.toHsl(), r = t.h;
|
|
155
|
+
return [
|
|
156
|
+
this,
|
|
157
|
+
new n({ h: (r + 72) % 360, s: t.s, l: t.l }),
|
|
158
|
+
new n({ h: (r + 216) % 360, s: t.s, l: t.l })
|
|
159
|
+
];
|
|
160
|
+
}, n.prototype.onBackground = function(t) {
|
|
161
|
+
var r = this.toRgb(), i = new n(t).toRgb(), e = r.a + i.a * (1 - r.a);
|
|
162
|
+
return new n({
|
|
163
|
+
r: (r.r * r.a + i.r * i.a * (1 - r.a)) / e,
|
|
164
|
+
g: (r.g * r.a + i.g * i.a * (1 - r.a)) / e,
|
|
165
|
+
b: (r.b * r.a + i.b * i.a * (1 - r.a)) / e,
|
|
166
|
+
a: e
|
|
167
|
+
});
|
|
168
|
+
}, n.prototype.triad = function() {
|
|
169
|
+
return this.polyad(3);
|
|
170
|
+
}, n.prototype.tetrad = function() {
|
|
171
|
+
return this.polyad(4);
|
|
172
|
+
}, n.prototype.polyad = function(t) {
|
|
173
|
+
for (var r = this.toHsl(), i = r.h, e = [this], o = 360 / t, h = 1; h < t; h++)
|
|
174
|
+
e.push(new n({ h: (i + h * o) % 360, s: r.s, l: r.l }));
|
|
175
|
+
return e;
|
|
176
|
+
}, n.prototype.equals = function(t) {
|
|
177
|
+
return this.toRgbString() === new n(t).toRgbString();
|
|
178
|
+
}, n;
|
|
179
|
+
}()
|
|
180
|
+
);
|
|
181
|
+
export {
|
|
182
|
+
S as TinyColor
|
|
183
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
function o(t, r) {
|
|
2
|
+
i(t) && (t = "100%");
|
|
3
|
+
var e = n(t);
|
|
4
|
+
return t = r === 360 ? t : Math.min(r, Math.max(0, parseFloat(t))), e && (t = parseInt(String(t * r), 10) / 100), Math.abs(t - r) < 1e-6 ? 1 : (r === 360 ? t = (t < 0 ? t % r + r : t % r) / parseFloat(String(r)) : t = t % r / parseFloat(String(r)), t);
|
|
5
|
+
}
|
|
6
|
+
function u(t) {
|
|
7
|
+
return Math.min(1, Math.max(0, t));
|
|
8
|
+
}
|
|
9
|
+
function i(t) {
|
|
10
|
+
return typeof t == "string" && t.indexOf(".") !== -1 && parseFloat(t) === 1;
|
|
11
|
+
}
|
|
12
|
+
function n(t) {
|
|
13
|
+
return typeof t == "string" && t.indexOf("%") !== -1;
|
|
14
|
+
}
|
|
15
|
+
function f(t) {
|
|
16
|
+
return t = parseFloat(t), (isNaN(t) || t < 0 || t > 1) && (t = 1), t;
|
|
17
|
+
}
|
|
18
|
+
function s(t) {
|
|
19
|
+
return t <= 1 ? "".concat(Number(t) * 100, "%") : t;
|
|
20
|
+
}
|
|
21
|
+
function c(t) {
|
|
22
|
+
return t.length === 1 ? "0" + t : String(t);
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
o as bound01,
|
|
26
|
+
f as boundAlpha,
|
|
27
|
+
u as clamp01,
|
|
28
|
+
s as convertToPercentage,
|
|
29
|
+
i as isOnePointZero,
|
|
30
|
+
n as isPercentage,
|
|
31
|
+
c as pad2
|
|
32
|
+
};
|