@shopify/shop-minis-react 0.13.1 → 0.14.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/_virtual/index2.js +4 -4
- package/dist/_virtual/index3.js +2 -5
- package/dist/_virtual/index3.js.map +1 -1
- package/dist/_virtual/index4.js +2 -2
- package/dist/_virtual/index5.js +3 -2
- package/dist/_virtual/index5.js.map +1 -1
- package/dist/_virtual/index6.js +2 -2
- package/dist/_virtual/index7.js +2 -3
- package/dist/_virtual/index7.js.map +1 -1
- package/dist/_virtual/index8.js +2 -2
- package/dist/components/atoms/list.js.map +1 -1
- package/dist/components/commerce/product-link.js.map +1 -1
- package/dist/components/commerce/search.js.map +1 -1
- package/dist/components/navigation/transition-link.js.map +1 -1
- package/dist/internal/components/product-review-stars.js.map +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/@radix-ui_react-use-is-hydrated@0.1.0_@types_react@19.1.6_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/@videojs_xhr@2.7.0/node_modules/@videojs/xhr/lib/index.js +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/@xmldom_xmldom@0.8.10/node_modules/@xmldom/xmldom/lib/index.js +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/color-convert@3.1.3/node_modules/color-convert/conversions.js +422 -0
- package/dist/shop-minis-react/node_modules/.pnpm/color-convert@3.1.3/node_modules/color-convert/conversions.js.map +1 -0
- package/dist/shop-minis-react/node_modules/.pnpm/color-convert@3.1.3/node_modules/color-convert/index.js +36 -0
- package/dist/shop-minis-react/node_modules/.pnpm/color-convert@3.1.3/node_modules/color-convert/index.js.map +1 -0
- package/dist/shop-minis-react/node_modules/.pnpm/color-convert@3.1.3/node_modules/color-convert/route.js +47 -0
- package/dist/shop-minis-react/node_modules/.pnpm/color-convert@3.1.3/node_modules/color-convert/route.js.map +1 -0
- package/dist/shop-minis-react/node_modules/.pnpm/color-name@2.1.0/node_modules/color-name/index.js +156 -0
- package/dist/shop-minis-react/node_modules/.pnpm/color-name@2.1.0/node_modules/color-name/index.js.map +1 -0
- package/dist/shop-minis-react/node_modules/.pnpm/color-string@2.1.4/node_modules/color-string/index.js +106 -0
- package/dist/shop-minis-react/node_modules/.pnpm/color-string@2.1.4/node_modules/color-string/index.js.map +1 -0
- package/dist/shop-minis-react/node_modules/.pnpm/color@5.0.3/node_modules/color/index.js +263 -0
- package/dist/shop-minis-react/node_modules/.pnpm/color@5.0.3/node_modules/color/index.js.map +1 -0
- package/dist/shop-minis-react/node_modules/.pnpm/mpd-parser@1.3.1/node_modules/mpd-parser/dist/mpd-parser.es.js +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/querystringify@2.2.0/node_modules/querystringify/index.js +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.1.0/node_modules/use-sync-external-store/shim/index.js +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/video.js@8.23.3/node_modules/video.js/dist/video.es.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/package.json +2 -3
- package/src/components/atoms/list.tsx +4 -5
- package/src/components/commerce/product-link.tsx +2 -1
- package/src/components/commerce/search.tsx +6 -3
- package/src/components/navigation/transition-link.tsx +1 -2
- package/src/internal/components/product-review-stars.tsx +1 -2
- package/dist/_virtual/index10.js +0 -5
- package/dist/_virtual/index10.js.map +0 -1
- package/dist/_virtual/index11.js +0 -5
- package/dist/_virtual/index11.js.map +0 -1
- package/dist/_virtual/index9.js +0 -5
- package/dist/_virtual/index9.js.map +0 -1
- package/dist/shop-minis-react/node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js +0 -308
- package/dist/shop-minis-react/node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js.map +0 -1
- package/dist/shop-minis-react/node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js +0 -41
- package/dist/shop-minis-react/node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js.map +0 -1
- package/dist/shop-minis-react/node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js +0 -53
- package/dist/shop-minis-react/node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js.map +0 -1
- package/dist/shop-minis-react/node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js +0 -157
- package/dist/shop-minis-react/node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js.map +0 -1
- package/dist/shop-minis-react/node_modules/.pnpm/color-string@1.9.1/node_modules/color-string/index.js +0 -103
- package/dist/shop-minis-react/node_modules/.pnpm/color-string@1.9.1/node_modules/color-string/index.js.map +0 -1
- package/dist/shop-minis-react/node_modules/.pnpm/color@4.2.3/node_modules/color/index.js +0 -269
- package/dist/shop-minis-react/node_modules/.pnpm/color@4.2.3/node_modules/color/index.js.map +0 -1
- package/dist/shop-minis-react/node_modules/.pnpm/is-arrayish@0.3.2/node_modules/is-arrayish/index.js +0 -10
- package/dist/shop-minis-react/node_modules/.pnpm/is-arrayish@0.3.2/node_modules/is-arrayish/index.js.map +0 -1
- package/dist/shop-minis-react/node_modules/.pnpm/simple-swizzle@0.2.2/node_modules/simple-swizzle/index.js +0 -23
- package/dist/shop-minis-react/node_modules/.pnpm/simple-swizzle@0.2.2/node_modules/simple-swizzle/index.js.map +0 -1
package/dist/shop-minis-react/node_modules/.pnpm/color-name@2.1.0/node_modules/color-name/index.js
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
aliceblue: [240, 248, 255],
|
|
3
|
+
antiquewhite: [250, 235, 215],
|
|
4
|
+
aqua: [0, 255, 255],
|
|
5
|
+
aquamarine: [127, 255, 212],
|
|
6
|
+
azure: [240, 255, 255],
|
|
7
|
+
beige: [245, 245, 220],
|
|
8
|
+
bisque: [255, 228, 196],
|
|
9
|
+
black: [0, 0, 0],
|
|
10
|
+
blanchedalmond: [255, 235, 205],
|
|
11
|
+
blue: [0, 0, 255],
|
|
12
|
+
blueviolet: [138, 43, 226],
|
|
13
|
+
brown: [165, 42, 42],
|
|
14
|
+
burlywood: [222, 184, 135],
|
|
15
|
+
cadetblue: [95, 158, 160],
|
|
16
|
+
chartreuse: [127, 255, 0],
|
|
17
|
+
chocolate: [210, 105, 30],
|
|
18
|
+
coral: [255, 127, 80],
|
|
19
|
+
cornflowerblue: [100, 149, 237],
|
|
20
|
+
cornsilk: [255, 248, 220],
|
|
21
|
+
crimson: [220, 20, 60],
|
|
22
|
+
cyan: [0, 255, 255],
|
|
23
|
+
darkblue: [0, 0, 139],
|
|
24
|
+
darkcyan: [0, 139, 139],
|
|
25
|
+
darkgoldenrod: [184, 134, 11],
|
|
26
|
+
darkgray: [169, 169, 169],
|
|
27
|
+
darkgreen: [0, 100, 0],
|
|
28
|
+
darkgrey: [169, 169, 169],
|
|
29
|
+
darkkhaki: [189, 183, 107],
|
|
30
|
+
darkmagenta: [139, 0, 139],
|
|
31
|
+
darkolivegreen: [85, 107, 47],
|
|
32
|
+
darkorange: [255, 140, 0],
|
|
33
|
+
darkorchid: [153, 50, 204],
|
|
34
|
+
darkred: [139, 0, 0],
|
|
35
|
+
darksalmon: [233, 150, 122],
|
|
36
|
+
darkseagreen: [143, 188, 143],
|
|
37
|
+
darkslateblue: [72, 61, 139],
|
|
38
|
+
darkslategray: [47, 79, 79],
|
|
39
|
+
darkslategrey: [47, 79, 79],
|
|
40
|
+
darkturquoise: [0, 206, 209],
|
|
41
|
+
darkviolet: [148, 0, 211],
|
|
42
|
+
deeppink: [255, 20, 147],
|
|
43
|
+
deepskyblue: [0, 191, 255],
|
|
44
|
+
dimgray: [105, 105, 105],
|
|
45
|
+
dimgrey: [105, 105, 105],
|
|
46
|
+
dodgerblue: [30, 144, 255],
|
|
47
|
+
firebrick: [178, 34, 34],
|
|
48
|
+
floralwhite: [255, 250, 240],
|
|
49
|
+
forestgreen: [34, 139, 34],
|
|
50
|
+
fuchsia: [255, 0, 255],
|
|
51
|
+
gainsboro: [220, 220, 220],
|
|
52
|
+
ghostwhite: [248, 248, 255],
|
|
53
|
+
gold: [255, 215, 0],
|
|
54
|
+
goldenrod: [218, 165, 32],
|
|
55
|
+
gray: [128, 128, 128],
|
|
56
|
+
green: [0, 128, 0],
|
|
57
|
+
greenyellow: [173, 255, 47],
|
|
58
|
+
grey: [128, 128, 128],
|
|
59
|
+
honeydew: [240, 255, 240],
|
|
60
|
+
hotpink: [255, 105, 180],
|
|
61
|
+
indianred: [205, 92, 92],
|
|
62
|
+
indigo: [75, 0, 130],
|
|
63
|
+
ivory: [255, 255, 240],
|
|
64
|
+
khaki: [240, 230, 140],
|
|
65
|
+
lavender: [230, 230, 250],
|
|
66
|
+
lavenderblush: [255, 240, 245],
|
|
67
|
+
lawngreen: [124, 252, 0],
|
|
68
|
+
lemonchiffon: [255, 250, 205],
|
|
69
|
+
lightblue: [173, 216, 230],
|
|
70
|
+
lightcoral: [240, 128, 128],
|
|
71
|
+
lightcyan: [224, 255, 255],
|
|
72
|
+
lightgoldenrodyellow: [250, 250, 210],
|
|
73
|
+
lightgray: [211, 211, 211],
|
|
74
|
+
lightgreen: [144, 238, 144],
|
|
75
|
+
lightgrey: [211, 211, 211],
|
|
76
|
+
lightpink: [255, 182, 193],
|
|
77
|
+
lightsalmon: [255, 160, 122],
|
|
78
|
+
lightseagreen: [32, 178, 170],
|
|
79
|
+
lightskyblue: [135, 206, 250],
|
|
80
|
+
lightslategray: [119, 136, 153],
|
|
81
|
+
lightslategrey: [119, 136, 153],
|
|
82
|
+
lightsteelblue: [176, 196, 222],
|
|
83
|
+
lightyellow: [255, 255, 224],
|
|
84
|
+
lime: [0, 255, 0],
|
|
85
|
+
limegreen: [50, 205, 50],
|
|
86
|
+
linen: [250, 240, 230],
|
|
87
|
+
magenta: [255, 0, 255],
|
|
88
|
+
maroon: [128, 0, 0],
|
|
89
|
+
mediumaquamarine: [102, 205, 170],
|
|
90
|
+
mediumblue: [0, 0, 205],
|
|
91
|
+
mediumorchid: [186, 85, 211],
|
|
92
|
+
mediumpurple: [147, 112, 219],
|
|
93
|
+
mediumseagreen: [60, 179, 113],
|
|
94
|
+
mediumslateblue: [123, 104, 238],
|
|
95
|
+
mediumspringgreen: [0, 250, 154],
|
|
96
|
+
mediumturquoise: [72, 209, 204],
|
|
97
|
+
mediumvioletred: [199, 21, 133],
|
|
98
|
+
midnightblue: [25, 25, 112],
|
|
99
|
+
mintcream: [245, 255, 250],
|
|
100
|
+
mistyrose: [255, 228, 225],
|
|
101
|
+
moccasin: [255, 228, 181],
|
|
102
|
+
navajowhite: [255, 222, 173],
|
|
103
|
+
navy: [0, 0, 128],
|
|
104
|
+
oldlace: [253, 245, 230],
|
|
105
|
+
olive: [128, 128, 0],
|
|
106
|
+
olivedrab: [107, 142, 35],
|
|
107
|
+
orange: [255, 165, 0],
|
|
108
|
+
orangered: [255, 69, 0],
|
|
109
|
+
orchid: [218, 112, 214],
|
|
110
|
+
palegoldenrod: [238, 232, 170],
|
|
111
|
+
palegreen: [152, 251, 152],
|
|
112
|
+
paleturquoise: [175, 238, 238],
|
|
113
|
+
palevioletred: [219, 112, 147],
|
|
114
|
+
papayawhip: [255, 239, 213],
|
|
115
|
+
peachpuff: [255, 218, 185],
|
|
116
|
+
peru: [205, 133, 63],
|
|
117
|
+
pink: [255, 192, 203],
|
|
118
|
+
plum: [221, 160, 221],
|
|
119
|
+
powderblue: [176, 224, 230],
|
|
120
|
+
purple: [128, 0, 128],
|
|
121
|
+
rebeccapurple: [102, 51, 153],
|
|
122
|
+
red: [255, 0, 0],
|
|
123
|
+
rosybrown: [188, 143, 143],
|
|
124
|
+
royalblue: [65, 105, 225],
|
|
125
|
+
saddlebrown: [139, 69, 19],
|
|
126
|
+
salmon: [250, 128, 114],
|
|
127
|
+
sandybrown: [244, 164, 96],
|
|
128
|
+
seagreen: [46, 139, 87],
|
|
129
|
+
seashell: [255, 245, 238],
|
|
130
|
+
sienna: [160, 82, 45],
|
|
131
|
+
silver: [192, 192, 192],
|
|
132
|
+
skyblue: [135, 206, 235],
|
|
133
|
+
slateblue: [106, 90, 205],
|
|
134
|
+
slategray: [112, 128, 144],
|
|
135
|
+
slategrey: [112, 128, 144],
|
|
136
|
+
snow: [255, 250, 250],
|
|
137
|
+
springgreen: [0, 255, 127],
|
|
138
|
+
steelblue: [70, 130, 180],
|
|
139
|
+
tan: [210, 180, 140],
|
|
140
|
+
teal: [0, 128, 128],
|
|
141
|
+
thistle: [216, 191, 216],
|
|
142
|
+
tomato: [255, 99, 71],
|
|
143
|
+
turquoise: [64, 224, 208],
|
|
144
|
+
violet: [238, 130, 238],
|
|
145
|
+
wheat: [245, 222, 179],
|
|
146
|
+
white: [255, 255, 255],
|
|
147
|
+
whitesmoke: [245, 245, 245],
|
|
148
|
+
yellow: [255, 255, 0],
|
|
149
|
+
yellowgreen: [154, 205, 50]
|
|
150
|
+
};
|
|
151
|
+
for (const r in e) Object.freeze(e[r]);
|
|
152
|
+
const l = Object.freeze(e);
|
|
153
|
+
export {
|
|
154
|
+
l as default
|
|
155
|
+
};
|
|
156
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../node_modules/.pnpm/color-name@2.1.0/node_modules/color-name/index.js"],"sourcesContent":["const colors = {\n\taliceblue: [240, 248, 255],\n\tantiquewhite: [250, 235, 215],\n\taqua: [0, 255, 255],\n\taquamarine: [127, 255, 212],\n\tazure: [240, 255, 255],\n\tbeige: [245, 245, 220],\n\tbisque: [255, 228, 196],\n\tblack: [0, 0, 0],\n\tblanchedalmond: [255, 235, 205],\n\tblue: [0, 0, 255],\n\tblueviolet: [138, 43, 226],\n\tbrown: [165, 42, 42],\n\tburlywood: [222, 184, 135],\n\tcadetblue: [95, 158, 160],\n\tchartreuse: [127, 255, 0],\n\tchocolate: [210, 105, 30],\n\tcoral: [255, 127, 80],\n\tcornflowerblue: [100, 149, 237],\n\tcornsilk: [255, 248, 220],\n\tcrimson: [220, 20, 60],\n\tcyan: [0, 255, 255],\n\tdarkblue: [0, 0, 139],\n\tdarkcyan: [0, 139, 139],\n\tdarkgoldenrod: [184, 134, 11],\n\tdarkgray: [169, 169, 169],\n\tdarkgreen: [0, 100, 0],\n\tdarkgrey: [169, 169, 169],\n\tdarkkhaki: [189, 183, 107],\n\tdarkmagenta: [139, 0, 139],\n\tdarkolivegreen: [85, 107, 47],\n\tdarkorange: [255, 140, 0],\n\tdarkorchid: [153, 50, 204],\n\tdarkred: [139, 0, 0],\n\tdarksalmon: [233, 150, 122],\n\tdarkseagreen: [143, 188, 143],\n\tdarkslateblue: [72, 61, 139],\n\tdarkslategray: [47, 79, 79],\n\tdarkslategrey: [47, 79, 79],\n\tdarkturquoise: [0, 206, 209],\n\tdarkviolet: [148, 0, 211],\n\tdeeppink: [255, 20, 147],\n\tdeepskyblue: [0, 191, 255],\n\tdimgray: [105, 105, 105],\n\tdimgrey: [105, 105, 105],\n\tdodgerblue: [30, 144, 255],\n\tfirebrick: [178, 34, 34],\n\tfloralwhite: [255, 250, 240],\n\tforestgreen: [34, 139, 34],\n\tfuchsia: [255, 0, 255],\n\tgainsboro: [220, 220, 220],\n\tghostwhite: [248, 248, 255],\n\tgold: [255, 215, 0],\n\tgoldenrod: [218, 165, 32],\n\tgray: [128, 128, 128],\n\tgreen: [0, 128, 0],\n\tgreenyellow: [173, 255, 47],\n\tgrey: [128, 128, 128],\n\thoneydew: [240, 255, 240],\n\thotpink: [255, 105, 180],\n\tindianred: [205, 92, 92],\n\tindigo: [75, 0, 130],\n\tivory: [255, 255, 240],\n\tkhaki: [240, 230, 140],\n\tlavender: [230, 230, 250],\n\tlavenderblush: [255, 240, 245],\n\tlawngreen: [124, 252, 0],\n\tlemonchiffon: [255, 250, 205],\n\tlightblue: [173, 216, 230],\n\tlightcoral: [240, 128, 128],\n\tlightcyan: [224, 255, 255],\n\tlightgoldenrodyellow: [250, 250, 210],\n\tlightgray: [211, 211, 211],\n\tlightgreen: [144, 238, 144],\n\tlightgrey: [211, 211, 211],\n\tlightpink: [255, 182, 193],\n\tlightsalmon: [255, 160, 122],\n\tlightseagreen: [32, 178, 170],\n\tlightskyblue: [135, 206, 250],\n\tlightslategray: [119, 136, 153],\n\tlightslategrey: [119, 136, 153],\n\tlightsteelblue: [176, 196, 222],\n\tlightyellow: [255, 255, 224],\n\tlime: [0, 255, 0],\n\tlimegreen: [50, 205, 50],\n\tlinen: [250, 240, 230],\n\tmagenta: [255, 0, 255],\n\tmaroon: [128, 0, 0],\n\tmediumaquamarine: [102, 205, 170],\n\tmediumblue: [0, 0, 205],\n\tmediumorchid: [186, 85, 211],\n\tmediumpurple: [147, 112, 219],\n\tmediumseagreen: [60, 179, 113],\n\tmediumslateblue: [123, 104, 238],\n\tmediumspringgreen: [0, 250, 154],\n\tmediumturquoise: [72, 209, 204],\n\tmediumvioletred: [199, 21, 133],\n\tmidnightblue: [25, 25, 112],\n\tmintcream: [245, 255, 250],\n\tmistyrose: [255, 228, 225],\n\tmoccasin: [255, 228, 181],\n\tnavajowhite: [255, 222, 173],\n\tnavy: [0, 0, 128],\n\toldlace: [253, 245, 230],\n\tolive: [128, 128, 0],\n\tolivedrab: [107, 142, 35],\n\torange: [255, 165, 0],\n\torangered: [255, 69, 0],\n\torchid: [218, 112, 214],\n\tpalegoldenrod: [238, 232, 170],\n\tpalegreen: [152, 251, 152],\n\tpaleturquoise: [175, 238, 238],\n\tpalevioletred: [219, 112, 147],\n\tpapayawhip: [255, 239, 213],\n\tpeachpuff: [255, 218, 185],\n\tperu: [205, 133, 63],\n\tpink: [255, 192, 203],\n\tplum: [221, 160, 221],\n\tpowderblue: [176, 224, 230],\n\tpurple: [128, 0, 128],\n\trebeccapurple: [102, 51, 153],\n\tred: [255, 0, 0],\n\trosybrown: [188, 143, 143],\n\troyalblue: [65, 105, 225],\n\tsaddlebrown: [139, 69, 19],\n\tsalmon: [250, 128, 114],\n\tsandybrown: [244, 164, 96],\n\tseagreen: [46, 139, 87],\n\tseashell: [255, 245, 238],\n\tsienna: [160, 82, 45],\n\tsilver: [192, 192, 192],\n\tskyblue: [135, 206, 235],\n\tslateblue: [106, 90, 205],\n\tslategray: [112, 128, 144],\n\tslategrey: [112, 128, 144],\n\tsnow: [255, 250, 250],\n\tspringgreen: [0, 255, 127],\n\tsteelblue: [70, 130, 180],\n\ttan: [210, 180, 140],\n\tteal: [0, 128, 128],\n\tthistle: [216, 191, 216],\n\ttomato: [255, 99, 71],\n\tturquoise: [64, 224, 208],\n\tviolet: [238, 130, 238],\n\twheat: [245, 222, 179],\n\twhite: [255, 255, 255],\n\twhitesmoke: [245, 245, 245],\n\tyellow: [255, 255, 0],\n\tyellowgreen: [154, 205, 50],\n}\n\nfor (const key in colors) Object.freeze(colors[key]);\nexport default Object.freeze(colors);"],"names":["colors","key","cssKeywords"],"mappings":"AAAA,MAAMA,IAAS;AAAA,EACd,WAAW,CAAC,KAAK,KAAK,GAAG;AAAA,EACzB,cAAc,CAAC,KAAK,KAAK,GAAG;AAAA,EAC5B,MAAM,CAAC,GAAG,KAAK,GAAG;AAAA,EAClB,YAAY,CAAC,KAAK,KAAK,GAAG;AAAA,EAC1B,OAAO,CAAC,KAAK,KAAK,GAAG;AAAA,EACrB,OAAO,CAAC,KAAK,KAAK,GAAG;AAAA,EACrB,QAAQ,CAAC,KAAK,KAAK,GAAG;AAAA,EACtB,OAAO,CAAC,GAAG,GAAG,CAAC;AAAA,EACf,gBAAgB,CAAC,KAAK,KAAK,GAAG;AAAA,EAC9B,MAAM,CAAC,GAAG,GAAG,GAAG;AAAA,EAChB,YAAY,CAAC,KAAK,IAAI,GAAG;AAAA,EACzB,OAAO,CAAC,KAAK,IAAI,EAAE;AAAA,EACnB,WAAW,CAAC,KAAK,KAAK,GAAG;AAAA,EACzB,WAAW,CAAC,IAAI,KAAK,GAAG;AAAA,EACxB,YAAY,CAAC,KAAK,KAAK,CAAC;AAAA,EACxB,WAAW,CAAC,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AK,KAAK,GAAG;AAAA,EACvB,WAAW,CAAC,KAAK,IAAI,GAAG;AAAA,EACxB,WAAW,CAAC,KAAK,KAAK,GAAG;AAAA,EACzB,WAAW,CAAC,KAAK,KAAK,GAAG;AAAA,EACzB,MAAM,CAAC,KAAK,KAAK,GAAG;AAAA,EACpB,aAAa,CAAC,GAAG,KAAK,GAAG;AAAA,EACzB,WAAW,CAAC,IAAI,KAAK,GAAG;AAAA,EACxB,KAAK,CAAC,KAAK,KAAK,GAAG;AAAA,EACnB,MAAM,CAAC,GAAG,KAAK,GAAG;AAAA,EAClB,SAAS,CAAC,KAAK,KAAK,GAAG;AAAA,EACvB,QAAQ,CAAC,KAAK,IAAI,EAAE;AAAA,EACpB,WAAW,CAAC,IAAI,KAAK,GAAG;AAAA,EACxB,QAAQ,CAAC,KAAK,KAAK,GAAG;AAAA,EACtB,OAAO,CAAC,KAAK,KAAK,GAAG;AAAA,EACrB,OAAO,CAAC,KAAK,KAAK,GAAG;AAAA,EACrB,YAAY,CAAC,KAAK,KAAK,GAAG;AAAA,EAC1B,QAAQ,CAAC,KAAK,KAAK,CAAC;AAAA,EACpB,aAAa,CAAC,KAAK,KAAK,EAAE;AAC3B;AAEA,WAAWC,KAAOD,EAAQ,QAAO,OAAOA,EAAOC,CAAG,CAAC;AACnD,MAAAC,IAAe,OAAO,OAAOF,CAAM;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import f from "../../../color-name@2.1.0/node_modules/color-name/index.js";
|
|
2
|
+
const b = /* @__PURE__ */ Object.create(null);
|
|
3
|
+
for (const e in f)
|
|
4
|
+
Object.hasOwn(f, e) && (b[f[e]] = e);
|
|
5
|
+
const a = {
|
|
6
|
+
to: {},
|
|
7
|
+
get: {}
|
|
8
|
+
};
|
|
9
|
+
a.get = function(e) {
|
|
10
|
+
const o = e.slice(0, 3).toLowerCase();
|
|
11
|
+
let s, u;
|
|
12
|
+
switch (o) {
|
|
13
|
+
case "hsl": {
|
|
14
|
+
s = a.get.hsl(e), u = "hsl";
|
|
15
|
+
break;
|
|
16
|
+
}
|
|
17
|
+
case "hwb": {
|
|
18
|
+
s = a.get.hwb(e), u = "hwb";
|
|
19
|
+
break;
|
|
20
|
+
}
|
|
21
|
+
default: {
|
|
22
|
+
s = a.get.rgb(e), u = "rgb";
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return s ? { model: u, value: s } : null;
|
|
27
|
+
};
|
|
28
|
+
a.get.rgb = function(e) {
|
|
29
|
+
if (!e)
|
|
30
|
+
return null;
|
|
31
|
+
const o = /^#([a-f\d]{3,4})$/i, s = /^#([a-f\d]{6})([a-f\d]{2})?$/i, u = /^rgba?\(\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)\s*(?:[\s,|/]\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(%?)\s*)?\)$/i, d = /^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/i, h = /^(\w+)$/;
|
|
32
|
+
let n = [0, 0, 0, 1], t, r, l;
|
|
33
|
+
if (t = e.match(s)) {
|
|
34
|
+
for (l = t[2], t = t[1], r = 0; r < 3; r++) {
|
|
35
|
+
const m = r * 2;
|
|
36
|
+
n[r] = Number.parseInt(t.slice(m, m + 2), 16);
|
|
37
|
+
}
|
|
38
|
+
l && (n[3] = Number.parseInt(l, 16) / 255);
|
|
39
|
+
} else if (t = e.match(o)) {
|
|
40
|
+
for (t = t[1], l = t[3], r = 0; r < 3; r++)
|
|
41
|
+
n[r] = Number.parseInt(t[r] + t[r], 16);
|
|
42
|
+
l && (n[3] = Number.parseInt(l + l, 16) / 255);
|
|
43
|
+
} else if (t = e.match(u)) {
|
|
44
|
+
for (r = 0; r < 3; r++)
|
|
45
|
+
n[r] = Number.parseFloat(t[r + 1]);
|
|
46
|
+
t[4] && (n[3] = t[5] ? Number.parseFloat(t[4]) * 0.01 : Number.parseFloat(t[4]));
|
|
47
|
+
} else if (t = e.match(d)) {
|
|
48
|
+
for (r = 0; r < 3; r++)
|
|
49
|
+
n[r] = Math.round(Number.parseFloat(t[r + 1]) * 2.55);
|
|
50
|
+
t[4] && (n[3] = t[5] ? Number.parseFloat(t[4]) * 0.01 : Number.parseFloat(t[4]));
|
|
51
|
+
} else return (t = e.toLowerCase().match(h)) ? t[1] === "transparent" ? [0, 0, 0, 0] : Object.hasOwn(f, t[1]) ? (n = f[t[1]].slice(), n[3] = 1, n) : null : null;
|
|
52
|
+
for (r = 0; r < 3; r++)
|
|
53
|
+
n[r] = c(n[r], 0, 255);
|
|
54
|
+
return n[3] = c(n[3], 0, 1), n;
|
|
55
|
+
};
|
|
56
|
+
a.get.hsl = function(e) {
|
|
57
|
+
if (!e)
|
|
58
|
+
return null;
|
|
59
|
+
const o = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i, s = e.match(o);
|
|
60
|
+
if (s) {
|
|
61
|
+
const u = Number.parseFloat(s[4]), d = (Number.parseFloat(s[1]) % 360 + 360) % 360, h = c(Number.parseFloat(s[2]), 0, 100), n = c(Number.parseFloat(s[3]), 0, 100), t = c(Number.isNaN(u) ? 1 : u, 0, 1);
|
|
62
|
+
return [d, h, n, t];
|
|
63
|
+
}
|
|
64
|
+
return null;
|
|
65
|
+
};
|
|
66
|
+
a.get.hwb = function(e) {
|
|
67
|
+
if (!e)
|
|
68
|
+
return null;
|
|
69
|
+
const o = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i, s = e.match(o);
|
|
70
|
+
if (s) {
|
|
71
|
+
const u = Number.parseFloat(s[4]), d = (Number.parseFloat(s[1]) % 360 + 360) % 360, h = c(Number.parseFloat(s[2]), 0, 100), n = c(Number.parseFloat(s[3]), 0, 100), t = c(Number.isNaN(u) ? 1 : u, 0, 1);
|
|
72
|
+
return [d, h, n, t];
|
|
73
|
+
}
|
|
74
|
+
return null;
|
|
75
|
+
};
|
|
76
|
+
a.to.hex = function(...e) {
|
|
77
|
+
return "#" + i(e[0]) + i(e[1]) + i(e[2]) + (e[3] < 1 ? i(Math.round(e[3] * 255)) : "");
|
|
78
|
+
};
|
|
79
|
+
a.to.rgb = function(...e) {
|
|
80
|
+
return e.length < 4 || e[3] === 1 ? "rgb(" + Math.round(e[0]) + ", " + Math.round(e[1]) + ", " + Math.round(e[2]) + ")" : "rgba(" + Math.round(e[0]) + ", " + Math.round(e[1]) + ", " + Math.round(e[2]) + ", " + e[3] + ")";
|
|
81
|
+
};
|
|
82
|
+
a.to.rgb.percent = function(...e) {
|
|
83
|
+
const o = Math.round(e[0] / 255 * 100), s = Math.round(e[1] / 255 * 100), u = Math.round(e[2] / 255 * 100);
|
|
84
|
+
return e.length < 4 || e[3] === 1 ? "rgb(" + o + "%, " + s + "%, " + u + "%)" : "rgba(" + o + "%, " + s + "%, " + u + "%, " + e[3] + ")";
|
|
85
|
+
};
|
|
86
|
+
a.to.hsl = function(...e) {
|
|
87
|
+
return e.length < 4 || e[3] === 1 ? "hsl(" + e[0] + ", " + e[1] + "%, " + e[2] + "%)" : "hsla(" + e[0] + ", " + e[1] + "%, " + e[2] + "%, " + e[3] + ")";
|
|
88
|
+
};
|
|
89
|
+
a.to.hwb = function(...e) {
|
|
90
|
+
let o = "";
|
|
91
|
+
return e.length >= 4 && e[3] !== 1 && (o = ", " + e[3]), "hwb(" + e[0] + ", " + e[1] + "%, " + e[2] + "%" + o + ")";
|
|
92
|
+
};
|
|
93
|
+
a.to.keyword = function(...e) {
|
|
94
|
+
return b[e.slice(0, 3)];
|
|
95
|
+
};
|
|
96
|
+
function c(e, o, s) {
|
|
97
|
+
return Math.min(Math.max(o, e), s);
|
|
98
|
+
}
|
|
99
|
+
function i(e) {
|
|
100
|
+
const o = Math.round(e).toString(16).toUpperCase();
|
|
101
|
+
return o.length < 2 ? "0" + o : o;
|
|
102
|
+
}
|
|
103
|
+
export {
|
|
104
|
+
a as default
|
|
105
|
+
};
|
|
106
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../node_modules/.pnpm/color-string@2.1.4/node_modules/color-string/index.js"],"sourcesContent":["import colorNames from 'color-name';\n\nconst reverseNames = Object.create(null);\n\n// Create a list of reverse color names\nfor (const name in colorNames) {\n\tif (Object.hasOwn(colorNames, name)) {\n\t\treverseNames[colorNames[name]] = name;\n\t}\n}\n\nconst cs = {\n\tto: {},\n\tget: {},\n};\n\ncs.get = function (string) {\n\tconst prefix = string.slice(0, 3).toLowerCase();\n\tlet value;\n\tlet model;\n\tswitch (prefix) {\n\t\tcase 'hsl': {\n\t\t\tvalue = cs.get.hsl(string);\n\t\t\tmodel = 'hsl';\n\t\t\tbreak;\n\t\t}\n\n\t\tcase 'hwb': {\n\t\t\tvalue = cs.get.hwb(string);\n\t\t\tmodel = 'hwb';\n\t\t\tbreak;\n\t\t}\n\n\t\tdefault: {\n\t\t\tvalue = cs.get.rgb(string);\n\t\t\tmodel = 'rgb';\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif (!value) {\n\t\treturn null;\n\t}\n\n\treturn {model, value};\n};\n\ncs.get.rgb = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tconst abbr = /^#([a-f\\d]{3,4})$/i;\n\tconst hex = /^#([a-f\\d]{6})([a-f\\d]{2})?$/i;\n\tconst rgba = /^rgba?\\(\\s*([+-]?(?:\\d*\\.)?\\d+(?:e\\d+)?)(?=[\\s,])\\s*(?:,\\s*)?([+-]?(?:\\d*\\.)?\\d+(?:e\\d+)?)(?=[\\s,])\\s*(?:,\\s*)?([+-]?(?:\\d*\\.)?\\d+(?:e\\d+)?)\\s*(?:[\\s,|/]\\s*([+-]?(?:\\d*\\.)?\\d+(?:e\\d+)?)(%?)\\s*)?\\)$/i;\n\tconst per = /^rgba?\\(\\s*([+-]?[\\d.]+)%\\s*,?\\s*([+-]?[\\d.]+)%\\s*,?\\s*([+-]?[\\d.]+)%\\s*(?:[\\s,|/]\\s*([+-]?[\\d.]+)(%?)\\s*)?\\)$/i;\n\tconst keyword = /^(\\w+)$/;\n\n\tlet rgb = [0, 0, 0, 1];\n\tlet match;\n\tlet i;\n\tlet hexAlpha;\n\n\tif (match = string.match(hex)) {\n\t\thexAlpha = match[2];\n\t\tmatch = match[1];\n\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\t// https://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/19\n\t\t\tconst i2 = i * 2;\n\t\t\trgb[i] = Number.parseInt(match.slice(i2, i2 + 2), 16);\n\t\t}\n\n\t\tif (hexAlpha) {\n\t\t\trgb[3] = Number.parseInt(hexAlpha, 16) / 255;\n\t\t}\n\t} else if (match = string.match(abbr)) {\n\t\tmatch = match[1];\n\t\thexAlpha = match[3];\n\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = Number.parseInt(match[i] + match[i], 16);\n\t\t}\n\n\t\tif (hexAlpha) {\n\t\t\trgb[3] = Number.parseInt(hexAlpha + hexAlpha, 16) / 255;\n\t\t}\n\t} else if (match = string.match(rgba)) {\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = Number.parseFloat(match[i + 1]);\n\t\t}\n\n\t\tif (match[4]) {\n\t\t\trgb[3] = match[5] ? Number.parseFloat(match[4]) * 0.01 : Number.parseFloat(match[4]);\n\t\t}\n\t} else if (match = string.match(per)) {\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = Math.round(Number.parseFloat(match[i + 1]) * 2.55);\n\t\t}\n\n\t\tif (match[4]) {\n\t\t\trgb[3] = match[5] ? Number.parseFloat(match[4]) * 0.01 : Number.parseFloat(match[4]);\n\t\t}\n\t} else if (match = string.toLowerCase().match(keyword)) {\n\t\tif (match[1] === 'transparent') {\n\t\t\treturn [0, 0, 0, 0];\n\t\t}\n\n\t\tif (!Object.hasOwn(colorNames, match[1])) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// eslint-disable-next-line unicorn/prefer-spread\n\t\trgb = colorNames[match[1]].slice();\n\t\trgb[3] = 1;\n\n\t\treturn rgb;\n\t} else {\n\t\treturn null;\n\t}\n\n\tfor (i = 0; i < 3; i++) {\n\t\trgb[i] = clamp(rgb[i], 0, 255);\n\t}\n\n\trgb[3] = clamp(rgb[3], 0, 1);\n\n\treturn rgb;\n};\n\ncs.get.hsl = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tconst hsl = /^hsla?\\(\\s*([+-]?(?:\\d{0,3}\\.)?\\d+)(?:deg)?\\s*,?\\s*([+-]?[\\d.]+)%\\s*,?\\s*([+-]?[\\d.]+)%\\s*(?:[,|/]\\s*([+-]?(?=\\.\\d|\\d)(?:0|[1-9]\\d*)?(?:\\.\\d*)?(?:e[+-]?\\d+)?)\\s*)?\\)$/i;\n\tconst match = string.match(hsl);\n\n\tif (match) {\n\t\tconst alpha = Number.parseFloat(match[4]);\n\t\tconst h = ((Number.parseFloat(match[1]) % 360) + 360) % 360;\n\t\tconst s = clamp(Number.parseFloat(match[2]), 0, 100);\n\t\tconst l = clamp(Number.parseFloat(match[3]), 0, 100);\n\t\tconst a = clamp(Number.isNaN(alpha) ? 1 : alpha, 0, 1);\n\n\t\treturn [h, s, l, a];\n\t}\n\n\treturn null;\n};\n\ncs.get.hwb = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tconst hwb = /^hwb\\(\\s*([+-]?\\d{0,3}(?:\\.\\d+)?)(?:deg)?\\s*[\\s,]\\s*([+-]?[\\d.]+)%\\s*[\\s,]\\s*([+-]?[\\d.]+)%\\s*(?:[\\s,]\\s*([+-]?(?=\\.\\d|\\d)(?:0|[1-9]\\d*)?(?:\\.\\d*)?(?:e[+-]?\\d+)?)\\s*)?\\)$/i;\n\tconst match = string.match(hwb);\n\n\tif (match) {\n\t\tconst alpha = Number.parseFloat(match[4]);\n\t\tconst h = ((Number.parseFloat(match[1]) % 360) + 360) % 360;\n\t\tconst w = clamp(Number.parseFloat(match[2]), 0, 100);\n\t\tconst b = clamp(Number.parseFloat(match[3]), 0, 100);\n\t\tconst a = clamp(Number.isNaN(alpha) ? 1 : alpha, 0, 1);\n\t\treturn [h, w, b, a];\n\t}\n\n\treturn null;\n};\n\ncs.to.hex = function (...rgba) {\n\treturn (\n\t\t'#' +\n\t\thexDouble(rgba[0]) +\n\t\thexDouble(rgba[1]) +\n\t\thexDouble(rgba[2]) +\n\t\t(rgba[3] < 1\n\t\t\t? (hexDouble(Math.round(rgba[3] * 255)))\n\t\t\t: '')\n\t);\n};\n\ncs.to.rgb = function (...rgba) {\n\treturn rgba.length < 4 || rgba[3] === 1\n\t\t? 'rgb(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ')'\n\t\t: 'rgba(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ', ' + rgba[3] + ')';\n};\n\ncs.to.rgb.percent = function (...rgba) {\n\tconst r = Math.round(rgba[0] / 255 * 100);\n\tconst g = Math.round(rgba[1] / 255 * 100);\n\tconst b = Math.round(rgba[2] / 255 * 100);\n\n\treturn rgba.length < 4 || rgba[3] === 1\n\t\t? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)'\n\t\t: 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + rgba[3] + ')';\n};\n\ncs.to.hsl = function (...hsla) {\n\treturn hsla.length < 4 || hsla[3] === 1\n\t\t? 'hsl(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%)'\n\t\t: 'hsla(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%, ' + hsla[3] + ')';\n};\n\n// Hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax\n// (hwb have alpha optional & 1 is default value)\ncs.to.hwb = function (...hwba) {\n\tlet a = '';\n\tif (hwba.length >= 4 && hwba[3] !== 1) {\n\t\ta = ', ' + hwba[3];\n\t}\n\n\treturn 'hwb(' + hwba[0] + ', ' + hwba[1] + '%, ' + hwba[2] + '%' + a + ')';\n};\n\ncs.to.keyword = function (...rgb) {\n\treturn reverseNames[rgb.slice(0, 3)];\n};\n\n// Helpers\nfunction clamp(number_, min, max) {\n\treturn Math.min(Math.max(min, number_), max);\n}\n\nfunction hexDouble(number_) {\n\tconst string_ = Math.round(number_).toString(16).toUpperCase();\n\treturn (string_.length < 2) ? '0' + string_ : string_;\n}\n\nexport default cs;\n"],"names":["reverseNames","name","colorNames","cs","string","prefix","value","model","abbr","hex","rgba","per","keyword","rgb","match","i","hexAlpha","i2","clamp","hsl","alpha","h","s","l","a","hwb","w","b","hexDouble","r","g","hsla","hwba","number_","min","max","string_"],"mappings":";AAEA,MAAMA,IAAe,uBAAO,OAAO,IAAI;AAGvC,WAAWC,KAAQC;AAClB,EAAI,OAAO,OAAOA,GAAYD,CAAI,MACjCD,EAAaE,EAAWD,CAAI,CAAC,IAAIA;AAI9B,MAACE,IAAK;AAAA,EACV,IAAI,CAAE;AAAA,EACN,KAAK,CAAE;AACR;AAEAA,EAAG,MAAM,SAAUC,GAAQ;AAC1B,QAAMC,IAASD,EAAO,MAAM,GAAG,CAAC,EAAE,YAAa;AAC/C,MAAIE,GACAC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X,SAASA,EAAK,CAAC,IAAI,OAAOA,EAAK,CAAC,IAAI,QAAQA,EAAK,CAAC,IAAI,MAAMR,IAAI;AACxE;AAEArB,EAAG,GAAG,UAAU,YAAaU,GAAK;AACjC,SAAOb,EAAaa,EAAI,MAAM,GAAG,CAAC,CAAC;AACpC;AAGA,SAASK,EAAMe,GAASC,GAAKC,GAAK;AACjC,SAAO,KAAK,IAAI,KAAK,IAAID,GAAKD,CAAO,GAAGE,CAAG;AAC5C;AAEA,SAASP,EAAUK,GAAS;AAC3B,QAAMG,IAAU,KAAK,MAAMH,CAAO,EAAE,SAAS,EAAE,EAAE,YAAa;AAC9D,SAAQG,EAAQ,SAAS,IAAK,MAAMA,IAAUA;AAC/C;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import f from "../../../color-string@2.1.4/node_modules/color-string/index.js";
|
|
2
|
+
import l from "../../../color-convert@3.1.3/node_modules/color-convert/index.js";
|
|
3
|
+
const m = [
|
|
4
|
+
// To be honest, I don't really feel like keyword belongs in color convert, but eh.
|
|
5
|
+
"keyword",
|
|
6
|
+
// Gray conflicts with some method names, and has its own method defined.
|
|
7
|
+
"gray",
|
|
8
|
+
// Shouldn't really be in color-convert either...
|
|
9
|
+
"hex"
|
|
10
|
+
], g = {};
|
|
11
|
+
for (const t of Object.keys(l))
|
|
12
|
+
g[[...l[t].labels].sort().join("")] = t;
|
|
13
|
+
const b = {};
|
|
14
|
+
function i(t, r) {
|
|
15
|
+
if (!(this instanceof i))
|
|
16
|
+
return new i(t, r);
|
|
17
|
+
if (r && r in m && (r = null), r && !(r in l))
|
|
18
|
+
throw new Error("Unknown model: " + r);
|
|
19
|
+
let o, n;
|
|
20
|
+
if (t == null)
|
|
21
|
+
this.model = "rgb", this.color = [0, 0, 0], this.valpha = 1;
|
|
22
|
+
else if (t instanceof i)
|
|
23
|
+
this.model = t.model, this.color = [...t.color], this.valpha = t.valpha;
|
|
24
|
+
else if (typeof t == "string") {
|
|
25
|
+
const s = f.get(t);
|
|
26
|
+
if (s === null)
|
|
27
|
+
throw new Error("Unable to parse color from string: " + t);
|
|
28
|
+
this.model = s.model, n = l[this.model].channels, this.color = s.value.slice(0, n), this.valpha = typeof s.value[n] == "number" ? s.value[n] : 1;
|
|
29
|
+
} else if (t.length > 0) {
|
|
30
|
+
this.model = r || "rgb", n = l[this.model].channels;
|
|
31
|
+
const s = Array.prototype.slice.call(t, 0, n);
|
|
32
|
+
this.color = y(s, n), this.valpha = typeof t[n] == "number" ? t[n] : 1;
|
|
33
|
+
} else if (typeof t == "number")
|
|
34
|
+
this.model = "rgb", this.color = [
|
|
35
|
+
t >> 16 & 255,
|
|
36
|
+
t >> 8 & 255,
|
|
37
|
+
t & 255
|
|
38
|
+
], this.valpha = 1;
|
|
39
|
+
else {
|
|
40
|
+
this.valpha = 1;
|
|
41
|
+
const s = Object.keys(t);
|
|
42
|
+
"alpha" in t && (s.splice(s.indexOf("alpha"), 1), this.valpha = typeof t.alpha == "number" ? t.alpha : 0);
|
|
43
|
+
const a = s.sort().join("");
|
|
44
|
+
if (!(a in g))
|
|
45
|
+
throw new Error("Unable to parse color from object: " + JSON.stringify(t));
|
|
46
|
+
this.model = g[a];
|
|
47
|
+
const { labels: u } = l[this.model], c = [];
|
|
48
|
+
for (o = 0; o < u.length; o++)
|
|
49
|
+
c.push(t[u[o]]);
|
|
50
|
+
this.color = y(c);
|
|
51
|
+
}
|
|
52
|
+
if (b[this.model])
|
|
53
|
+
for (n = l[this.model].channels, o = 0; o < n; o++) {
|
|
54
|
+
const s = b[this.model][o];
|
|
55
|
+
s && (this.color[o] = s(this.color[o]));
|
|
56
|
+
}
|
|
57
|
+
this.valpha = Math.max(0, Math.min(1, this.valpha)), Object.freeze && Object.freeze(this);
|
|
58
|
+
}
|
|
59
|
+
i.prototype = {
|
|
60
|
+
toString() {
|
|
61
|
+
return this.string();
|
|
62
|
+
},
|
|
63
|
+
toJSON() {
|
|
64
|
+
return this[this.model]();
|
|
65
|
+
},
|
|
66
|
+
string(t) {
|
|
67
|
+
let r = this.model in f.to ? this : this.rgb();
|
|
68
|
+
r = r.round(typeof t == "number" ? t : 1);
|
|
69
|
+
const o = r.valpha === 1 ? r.color : [...r.color, this.valpha];
|
|
70
|
+
return f.to[r.model](...o);
|
|
71
|
+
},
|
|
72
|
+
percentString(t) {
|
|
73
|
+
const r = this.rgb().round(typeof t == "number" ? t : 1), o = r.valpha === 1 ? r.color : [...r.color, this.valpha];
|
|
74
|
+
return f.to.rgb.percent(...o);
|
|
75
|
+
},
|
|
76
|
+
array() {
|
|
77
|
+
return this.valpha === 1 ? [...this.color] : [...this.color, this.valpha];
|
|
78
|
+
},
|
|
79
|
+
object() {
|
|
80
|
+
const t = {}, { channels: r } = l[this.model], { labels: o } = l[this.model];
|
|
81
|
+
for (let n = 0; n < r; n++)
|
|
82
|
+
t[o[n]] = this.color[n];
|
|
83
|
+
return this.valpha !== 1 && (t.alpha = this.valpha), t;
|
|
84
|
+
},
|
|
85
|
+
unitArray() {
|
|
86
|
+
const t = this.rgb().color;
|
|
87
|
+
return t[0] /= 255, t[1] /= 255, t[2] /= 255, this.valpha !== 1 && t.push(this.valpha), t;
|
|
88
|
+
},
|
|
89
|
+
unitObject() {
|
|
90
|
+
const t = this.rgb().object();
|
|
91
|
+
return t.r /= 255, t.g /= 255, t.b /= 255, this.valpha !== 1 && (t.alpha = this.valpha), t;
|
|
92
|
+
},
|
|
93
|
+
round(t) {
|
|
94
|
+
return t = Math.max(t || 0, 0), new i([...this.color.map(w(t)), this.valpha], this.model);
|
|
95
|
+
},
|
|
96
|
+
alpha(t) {
|
|
97
|
+
return t !== void 0 ? new i([...this.color, Math.max(0, Math.min(1, t))], this.model) : this.valpha;
|
|
98
|
+
},
|
|
99
|
+
// Rgb
|
|
100
|
+
red: e("rgb", 0, h(255)),
|
|
101
|
+
green: e("rgb", 1, h(255)),
|
|
102
|
+
blue: e("rgb", 2, h(255)),
|
|
103
|
+
hue: e(["hsl", "hsv", "hsl", "hwb", "hcg"], 0, (t) => (t % 360 + 360) % 360),
|
|
104
|
+
saturationl: e("hsl", 1, h(100)),
|
|
105
|
+
lightness: e("hsl", 2, h(100)),
|
|
106
|
+
saturationv: e("hsv", 1, h(100)),
|
|
107
|
+
value: e("hsv", 2, h(100)),
|
|
108
|
+
chroma: e("hcg", 1, h(100)),
|
|
109
|
+
gray: e("hcg", 2, h(100)),
|
|
110
|
+
white: e("hwb", 1, h(100)),
|
|
111
|
+
wblack: e("hwb", 2, h(100)),
|
|
112
|
+
cyan: e("cmyk", 0, h(100)),
|
|
113
|
+
magenta: e("cmyk", 1, h(100)),
|
|
114
|
+
yellow: e("cmyk", 2, h(100)),
|
|
115
|
+
black: e("cmyk", 3, h(100)),
|
|
116
|
+
x: e("xyz", 0, h(95.047)),
|
|
117
|
+
y: e("xyz", 1, h(100)),
|
|
118
|
+
z: e("xyz", 2, h(108.833)),
|
|
119
|
+
l: e("lab", 0, h(100)),
|
|
120
|
+
a: e("lab", 1),
|
|
121
|
+
b: e("lab", 2),
|
|
122
|
+
keyword(t) {
|
|
123
|
+
return t !== void 0 ? new i(t) : l[this.model].keyword(this.color);
|
|
124
|
+
},
|
|
125
|
+
hex(t) {
|
|
126
|
+
return t !== void 0 ? new i(t) : f.to.hex(...this.rgb().round().color);
|
|
127
|
+
},
|
|
128
|
+
hexa(t) {
|
|
129
|
+
if (t !== void 0)
|
|
130
|
+
return new i(t);
|
|
131
|
+
const r = this.rgb().round().color;
|
|
132
|
+
let o = Math.round(this.valpha * 255).toString(16).toUpperCase();
|
|
133
|
+
return o.length === 1 && (o = "0" + o), f.to.hex(...r) + o;
|
|
134
|
+
},
|
|
135
|
+
rgbNumber() {
|
|
136
|
+
const t = this.rgb().color;
|
|
137
|
+
return (t[0] & 255) << 16 | (t[1] & 255) << 8 | t[2] & 255;
|
|
138
|
+
},
|
|
139
|
+
luminosity() {
|
|
140
|
+
const t = this.rgb().color, r = [];
|
|
141
|
+
for (const [o, n] of t.entries()) {
|
|
142
|
+
const s = n / 255;
|
|
143
|
+
r[o] = s <= 0.04045 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4;
|
|
144
|
+
}
|
|
145
|
+
return 0.2126 * r[0] + 0.7152 * r[1] + 0.0722 * r[2];
|
|
146
|
+
},
|
|
147
|
+
contrast(t) {
|
|
148
|
+
const r = this.luminosity(), o = t.luminosity();
|
|
149
|
+
return r > o ? (r + 0.05) / (o + 0.05) : (o + 0.05) / (r + 0.05);
|
|
150
|
+
},
|
|
151
|
+
level(t) {
|
|
152
|
+
const r = this.contrast(t);
|
|
153
|
+
return r >= 7 ? "AAA" : r >= 4.5 ? "AA" : "";
|
|
154
|
+
},
|
|
155
|
+
isDark() {
|
|
156
|
+
const t = this.rgb().color;
|
|
157
|
+
return (t[0] * 2126 + t[1] * 7152 + t[2] * 722) / 1e4 < 128;
|
|
158
|
+
},
|
|
159
|
+
isLight() {
|
|
160
|
+
return !this.isDark();
|
|
161
|
+
},
|
|
162
|
+
negate() {
|
|
163
|
+
const t = this.rgb();
|
|
164
|
+
for (let r = 0; r < 3; r++)
|
|
165
|
+
t.color[r] = 255 - t.color[r];
|
|
166
|
+
return t;
|
|
167
|
+
},
|
|
168
|
+
lighten(t) {
|
|
169
|
+
const r = this.hsl();
|
|
170
|
+
return r.color[2] += r.color[2] * t, r;
|
|
171
|
+
},
|
|
172
|
+
darken(t) {
|
|
173
|
+
const r = this.hsl();
|
|
174
|
+
return r.color[2] -= r.color[2] * t, r;
|
|
175
|
+
},
|
|
176
|
+
saturate(t) {
|
|
177
|
+
const r = this.hsl();
|
|
178
|
+
return r.color[1] += r.color[1] * t, r;
|
|
179
|
+
},
|
|
180
|
+
desaturate(t) {
|
|
181
|
+
const r = this.hsl();
|
|
182
|
+
return r.color[1] -= r.color[1] * t, r;
|
|
183
|
+
},
|
|
184
|
+
whiten(t) {
|
|
185
|
+
const r = this.hwb();
|
|
186
|
+
return r.color[1] += r.color[1] * t, r;
|
|
187
|
+
},
|
|
188
|
+
blacken(t) {
|
|
189
|
+
const r = this.hwb();
|
|
190
|
+
return r.color[2] += r.color[2] * t, r;
|
|
191
|
+
},
|
|
192
|
+
grayscale() {
|
|
193
|
+
const t = this.rgb().color, r = t[0] * 0.3 + t[1] * 0.59 + t[2] * 0.11;
|
|
194
|
+
return i.rgb(r, r, r);
|
|
195
|
+
},
|
|
196
|
+
fade(t) {
|
|
197
|
+
return this.alpha(this.valpha - this.valpha * t);
|
|
198
|
+
},
|
|
199
|
+
opaquer(t) {
|
|
200
|
+
return this.alpha(this.valpha + this.valpha * t);
|
|
201
|
+
},
|
|
202
|
+
rotate(t) {
|
|
203
|
+
const r = this.hsl();
|
|
204
|
+
let o = r.color[0];
|
|
205
|
+
return o = (o + t) % 360, o = o < 0 ? 360 + o : o, r.color[0] = o, r;
|
|
206
|
+
},
|
|
207
|
+
mix(t, r) {
|
|
208
|
+
if (!t || !t.rgb)
|
|
209
|
+
throw new Error('Argument to "mix" was not a Color instance, but rather an instance of ' + typeof t);
|
|
210
|
+
const o = t.rgb(), n = this.rgb(), s = r === void 0 ? 0.5 : r, a = 2 * s - 1, u = o.alpha() - n.alpha(), c = ((a * u === -1 ? a : (a + u) / (1 + a * u)) + 1) / 2, p = 1 - c;
|
|
211
|
+
return i.rgb(
|
|
212
|
+
c * o.red() + p * n.red(),
|
|
213
|
+
c * o.green() + p * n.green(),
|
|
214
|
+
c * o.blue() + p * n.blue(),
|
|
215
|
+
o.alpha() * s + n.alpha() * (1 - s)
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
for (const t of Object.keys(l)) {
|
|
220
|
+
if (m.includes(t))
|
|
221
|
+
continue;
|
|
222
|
+
const { channels: r } = l[t];
|
|
223
|
+
i.prototype[t] = function(...o) {
|
|
224
|
+
return this.model === t ? new i(this) : o.length > 0 ? new i(o, t) : new i([...v(l[this.model][t].raw(this.color)), this.valpha], t);
|
|
225
|
+
}, i[t] = function(...o) {
|
|
226
|
+
let n = o[0];
|
|
227
|
+
return typeof n == "number" && (n = y(o, r)), new i(n, t);
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
function d(t, r) {
|
|
231
|
+
return Number(t.toFixed(r));
|
|
232
|
+
}
|
|
233
|
+
function w(t) {
|
|
234
|
+
return function(r) {
|
|
235
|
+
return d(r, t);
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
function e(t, r, o) {
|
|
239
|
+
t = Array.isArray(t) ? t : [t];
|
|
240
|
+
for (const n of t)
|
|
241
|
+
(b[n] ||= [])[r] = o;
|
|
242
|
+
return t = t[0], function(n) {
|
|
243
|
+
let s;
|
|
244
|
+
return n !== void 0 ? (o && (n = o(n)), s = this[t](), s.color[r] = n, s) : (s = this[t]().color[r], o && (s = o(s)), s);
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
function h(t) {
|
|
248
|
+
return function(r) {
|
|
249
|
+
return Math.max(0, Math.min(t, r));
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
function v(t) {
|
|
253
|
+
return Array.isArray(t) ? t : [t];
|
|
254
|
+
}
|
|
255
|
+
function y(t, r) {
|
|
256
|
+
for (let o = 0; o < r; o++)
|
|
257
|
+
typeof t[o] != "number" && (t[o] = 0);
|
|
258
|
+
return t;
|
|
259
|
+
}
|
|
260
|
+
export {
|
|
261
|
+
i as default
|
|
262
|
+
};
|
|
263
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../node_modules/.pnpm/color@5.0.3/node_modules/color/index.js"],"sourcesContent":["import colorString from 'color-string';\nimport convert from 'color-convert';\n\nconst skippedModels = [\n\t// To be honest, I don't really feel like keyword belongs in color convert, but eh.\n\t'keyword',\n\n\t// Gray conflicts with some method names, and has its own method defined.\n\t'gray',\n\n\t// Shouldn't really be in color-convert either...\n\t'hex',\n];\n\nconst hashedModelKeys = {};\nfor (const model of Object.keys(convert)) {\n\thashedModelKeys[[...convert[model].labels].sort().join('')] = model;\n}\n\nconst limiters = {};\n\nfunction Color(object, model) {\n\tif (!(this instanceof Color)) {\n\t\treturn new Color(object, model);\n\t}\n\n\tif (model && model in skippedModels) {\n\t\tmodel = null;\n\t}\n\n\tif (model && !(model in convert)) {\n\t\tthrow new Error('Unknown model: ' + model);\n\t}\n\n\tlet i;\n\tlet channels;\n\n\tif (object == null) { // eslint-disable-line no-eq-null,eqeqeq\n\t\tthis.model = 'rgb';\n\t\tthis.color = [0, 0, 0];\n\t\tthis.valpha = 1;\n\t} else if (object instanceof Color) {\n\t\tthis.model = object.model;\n\t\tthis.color = [...object.color];\n\t\tthis.valpha = object.valpha;\n\t} else if (typeof object === 'string') {\n\t\tconst result = colorString.get(object);\n\t\tif (result === null) {\n\t\t\tthrow new Error('Unable to parse color from string: ' + object);\n\t\t}\n\n\t\tthis.model = result.model;\n\t\tchannels = convert[this.model].channels;\n\t\tthis.color = result.value.slice(0, channels);\n\t\tthis.valpha = typeof result.value[channels] === 'number' ? result.value[channels] : 1;\n\t} else if (object.length > 0) {\n\t\tthis.model = model || 'rgb';\n\t\tchannels = convert[this.model].channels;\n\t\tconst newArray = Array.prototype.slice.call(object, 0, channels);\n\t\tthis.color = zeroArray(newArray, channels);\n\t\tthis.valpha = typeof object[channels] === 'number' ? object[channels] : 1;\n\t} else if (typeof object === 'number') {\n\t\t// This is always RGB - can be converted later on.\n\t\tthis.model = 'rgb';\n\t\tthis.color = [\n\t\t\t(object >> 16) & 0xFF,\n\t\t\t(object >> 8) & 0xFF,\n\t\t\tobject & 0xFF,\n\t\t];\n\t\tthis.valpha = 1;\n\t} else {\n\t\tthis.valpha = 1;\n\n\t\tconst keys = Object.keys(object);\n\t\tif ('alpha' in object) {\n\t\t\tkeys.splice(keys.indexOf('alpha'), 1);\n\t\t\tthis.valpha = typeof object.alpha === 'number' ? object.alpha : 0;\n\t\t}\n\n\t\tconst hashedKeys = keys.sort().join('');\n\t\tif (!(hashedKeys in hashedModelKeys)) {\n\t\t\tthrow new Error('Unable to parse color from object: ' + JSON.stringify(object));\n\t\t}\n\n\t\tthis.model = hashedModelKeys[hashedKeys];\n\n\t\tconst {labels} = convert[this.model];\n\t\tconst color = [];\n\t\tfor (i = 0; i < labels.length; i++) {\n\t\t\tcolor.push(object[labels[i]]);\n\t\t}\n\n\t\tthis.color = zeroArray(color);\n\t}\n\n\t// Perform limitations (clamping, etc.)\n\tif (limiters[this.model]) {\n\t\tchannels = convert[this.model].channels;\n\t\tfor (i = 0; i < channels; i++) {\n\t\t\tconst limit = limiters[this.model][i];\n\t\t\tif (limit) {\n\t\t\t\tthis.color[i] = limit(this.color[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\tthis.valpha = Math.max(0, Math.min(1, this.valpha));\n\n\tif (Object.freeze) {\n\t\tObject.freeze(this);\n\t}\n}\n\nColor.prototype = {\n\ttoString() {\n\t\treturn this.string();\n\t},\n\n\ttoJSON() {\n\t\treturn this[this.model]();\n\t},\n\n\tstring(places) {\n\t\tlet self = this.model in colorString.to ? this : this.rgb();\n\t\tself = self.round(typeof places === 'number' ? places : 1);\n\t\tconst arguments_ = self.valpha === 1 ? self.color : [...self.color, this.valpha];\n\t\treturn colorString.to[self.model](...arguments_);\n\t},\n\n\tpercentString(places) {\n\t\tconst self = this.rgb().round(typeof places === 'number' ? places : 1);\n\t\tconst arguments_ = self.valpha === 1 ? self.color : [...self.color, this.valpha];\n\t\treturn colorString.to.rgb.percent(...arguments_);\n\t},\n\n\tarray() {\n\t\treturn this.valpha === 1 ? [...this.color] : [...this.color, this.valpha];\n\t},\n\n\tobject() {\n\t\tconst result = {};\n\t\tconst {channels} = convert[this.model];\n\t\tconst {labels} = convert[this.model];\n\n\t\tfor (let i = 0; i < channels; i++) {\n\t\t\tresult[labels[i]] = this.color[i];\n\t\t}\n\n\t\tif (this.valpha !== 1) {\n\t\t\tresult.alpha = this.valpha;\n\t\t}\n\n\t\treturn result;\n\t},\n\n\tunitArray() {\n\t\tconst rgb = this.rgb().color;\n\t\trgb[0] /= 255;\n\t\trgb[1] /= 255;\n\t\trgb[2] /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.push(this.valpha);\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tunitObject() {\n\t\tconst rgb = this.rgb().object();\n\t\trgb.r /= 255;\n\t\trgb.g /= 255;\n\t\trgb.b /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.alpha = this.valpha;\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tround(places) {\n\t\tplaces = Math.max(places || 0, 0);\n\t\treturn new Color([...this.color.map(roundToPlace(places)), this.valpha], this.model);\n\t},\n\n\talpha(value) {\n\t\tif (value !== undefined) {\n\t\t\treturn new Color([...this.color, Math.max(0, Math.min(1, value))], this.model);\n\t\t}\n\n\t\treturn this.valpha;\n\t},\n\n\t// Rgb\n\tred: getset('rgb', 0, maxfn(255)),\n\tgreen: getset('rgb', 1, maxfn(255)),\n\tblue: getset('rgb', 2, maxfn(255)),\n\n\thue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, value => ((value % 360) + 360) % 360),\n\n\tsaturationl: getset('hsl', 1, maxfn(100)),\n\tlightness: getset('hsl', 2, maxfn(100)),\n\n\tsaturationv: getset('hsv', 1, maxfn(100)),\n\tvalue: getset('hsv', 2, maxfn(100)),\n\n\tchroma: getset('hcg', 1, maxfn(100)),\n\tgray: getset('hcg', 2, maxfn(100)),\n\n\twhite: getset('hwb', 1, maxfn(100)),\n\twblack: getset('hwb', 2, maxfn(100)),\n\n\tcyan: getset('cmyk', 0, maxfn(100)),\n\tmagenta: getset('cmyk', 1, maxfn(100)),\n\tyellow: getset('cmyk', 2, maxfn(100)),\n\tblack: getset('cmyk', 3, maxfn(100)),\n\n\tx: getset('xyz', 0, maxfn(95.047)),\n\ty: getset('xyz', 1, maxfn(100)),\n\tz: getset('xyz', 2, maxfn(108.833)),\n\n\tl: getset('lab', 0, maxfn(100)),\n\ta: getset('lab', 1),\n\tb: getset('lab', 2),\n\n\tkeyword(value) {\n\t\tif (value !== undefined) {\n\t\t\treturn new Color(value);\n\t\t}\n\n\t\treturn convert[this.model].keyword(this.color);\n\t},\n\n\thex(value) {\n\t\tif (value !== undefined) {\n\t\t\treturn new Color(value);\n\t\t}\n\n\t\treturn colorString.to.hex(...this.rgb().round().color);\n\t},\n\n\thexa(value) {\n\t\tif (value !== undefined) {\n\t\t\treturn new Color(value);\n\t\t}\n\n\t\tconst rgbArray = this.rgb().round().color;\n\n\t\tlet alphaHex = Math.round(this.valpha * 255).toString(16).toUpperCase();\n\t\tif (alphaHex.length === 1) {\n\t\t\talphaHex = '0' + alphaHex;\n\t\t}\n\n\t\treturn colorString.to.hex(...rgbArray) + alphaHex;\n\t},\n\n\trgbNumber() {\n\t\tconst rgb = this.rgb().color;\n\t\treturn ((rgb[0] & 0xFF) << 16) | ((rgb[1] & 0xFF) << 8) | (rgb[2] & 0xFF);\n\t},\n\n\tluminosity() {\n\t\t// http://www.w3.org/TR/WCAG20/#relativeluminancedef\n\t\tconst rgb = this.rgb().color;\n\n\t\tconst lum = [];\n\t\tfor (const [i, element] of rgb.entries()) {\n\t\t\tconst chan = element / 255;\n\t\t\tlum[i] = (chan <= 0.04045) ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4;\n\t\t}\n\n\t\treturn 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];\n\t},\n\n\tcontrast(color2) {\n\t\t// http://www.w3.org/TR/WCAG20/#contrast-ratiodef\n\t\tconst lum1 = this.luminosity();\n\t\tconst lum2 = color2.luminosity();\n\n\t\tif (lum1 > lum2) {\n\t\t\treturn (lum1 + 0.05) / (lum2 + 0.05);\n\t\t}\n\n\t\treturn (lum2 + 0.05) / (lum1 + 0.05);\n\t},\n\n\tlevel(color2) {\n\t\t// https://www.w3.org/TR/WCAG/#contrast-enhanced\n\t\tconst contrastRatio = this.contrast(color2);\n\t\tif (contrastRatio >= 7) {\n\t\t\treturn 'AAA';\n\t\t}\n\n\t\treturn (contrastRatio >= 4.5) ? 'AA' : '';\n\t},\n\n\tisDark() {\n\t\t// YIQ equation from http://24ways.org/2010/calculating-color-contrast\n\t\tconst rgb = this.rgb().color;\n\t\tconst yiq = (rgb[0] * 2126 + rgb[1] * 7152 + rgb[2] * 722) / 10000;\n\t\treturn yiq < 128;\n\t},\n\n\tisLight() {\n\t\treturn !this.isDark();\n\t},\n\n\tnegate() {\n\t\tconst rgb = this.rgb();\n\t\tfor (let i = 0; i < 3; i++) {\n\t\t\trgb.color[i] = 255 - rgb.color[i];\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tlighten(ratio) {\n\t\tconst hsl = this.hsl();\n\t\thsl.color[2] += hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdarken(ratio) {\n\t\tconst hsl = this.hsl();\n\t\thsl.color[2] -= hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tsaturate(ratio) {\n\t\tconst hsl = this.hsl();\n\t\thsl.color[1] += hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdesaturate(ratio) {\n\t\tconst hsl = this.hsl();\n\t\thsl.color[1] -= hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\twhiten(ratio) {\n\t\tconst hwb = this.hwb();\n\t\thwb.color[1] += hwb.color[1] * ratio;\n\t\treturn hwb;\n\t},\n\n\tblacken(ratio) {\n\t\tconst hwb = this.hwb();\n\t\thwb.color[2] += hwb.color[2] * ratio;\n\t\treturn hwb;\n\t},\n\n\tgrayscale() {\n\t\t// http://en.wikipedia.org/wiki/Grayscale#Converting_colour_to_grayscale\n\t\tconst rgb = this.rgb().color;\n\t\tconst value = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;\n\t\treturn Color.rgb(value, value, value);\n\t},\n\n\tfade(ratio) {\n\t\treturn this.alpha(this.valpha - (this.valpha * ratio));\n\t},\n\n\topaquer(ratio) {\n\t\treturn this.alpha(this.valpha + (this.valpha * ratio));\n\t},\n\n\trotate(degrees) {\n\t\tconst hsl = this.hsl();\n\t\tlet hue = hsl.color[0];\n\t\thue = (hue + degrees) % 360;\n\t\thue = hue < 0 ? 360 + hue : hue;\n\t\thsl.color[0] = hue;\n\t\treturn hsl;\n\t},\n\n\tmix(mixinColor, weight) {\n\t\t// Ported from sass implementation in C\n\t\t// https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209\n\t\tif (!mixinColor || !mixinColor.rgb) {\n\t\t\tthrow new Error('Argument to \"mix\" was not a Color instance, but rather an instance of ' + typeof mixinColor);\n\t\t}\n\n\t\tconst color1 = mixinColor.rgb();\n\t\tconst color2 = this.rgb();\n\t\tconst p = weight === undefined ? 0.5 : weight;\n\n\t\tconst w = 2 * p - 1;\n\t\tconst a = color1.alpha() - color2.alpha();\n\n\t\tconst w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2;\n\t\tconst w2 = 1 - w1;\n\n\t\treturn Color.rgb(\n\t\t\tw1 * color1.red() + w2 * color2.red(),\n\t\t\tw1 * color1.green() + w2 * color2.green(),\n\t\t\tw1 * color1.blue() + w2 * color2.blue(),\n\t\t\tcolor1.alpha() * p + color2.alpha() * (1 - p));\n\t},\n};\n\n// Model conversion methods and static constructors\nfor (const model of Object.keys(convert)) {\n\tif (skippedModels.includes(model)) {\n\t\tcontinue;\n\t}\n\n\tconst {channels} = convert[model];\n\n\t// Conversion methods\n\tColor.prototype[model] = function (...arguments_) {\n\t\tif (this.model === model) {\n\t\t\treturn new Color(this);\n\t\t}\n\n\t\tif (arguments_.length > 0) {\n\t\t\treturn new Color(arguments_, model);\n\t\t}\n\n\t\treturn new Color([...assertArray(convert[this.model][model].raw(this.color)), this.valpha], model);\n\t};\n\n\t// 'static' construction methods\n\tColor[model] = function (...arguments_) {\n\t\tlet color = arguments_[0];\n\t\tif (typeof color === 'number') {\n\t\t\tcolor = zeroArray(arguments_, channels);\n\t\t}\n\n\t\treturn new Color(color, model);\n\t};\n}\n\nfunction roundTo(number, places) {\n\treturn Number(number.toFixed(places));\n}\n\nfunction roundToPlace(places) {\n\treturn function (number) {\n\t\treturn roundTo(number, places);\n\t};\n}\n\nfunction getset(model, channel, modifier) {\n\tmodel = Array.isArray(model) ? model : [model];\n\n\tfor (const m of model) {\n\t\t(limiters[m] ||= [])[channel] = modifier;\n\t}\n\n\tmodel = model[0];\n\n\treturn function (value) {\n\t\tlet result;\n\n\t\tif (value !== undefined) {\n\t\t\tif (modifier) {\n\t\t\t\tvalue = modifier(value);\n\t\t\t}\n\n\t\t\tresult = this[model]();\n\t\t\tresult.color[channel] = value;\n\t\t\treturn result;\n\t\t}\n\n\t\tresult = this[model]().color[channel];\n\t\tif (modifier) {\n\t\t\tresult = modifier(result);\n\t\t}\n\n\t\treturn result;\n\t};\n}\n\nfunction maxfn(max) {\n\treturn function (v) {\n\t\treturn Math.max(0, Math.min(max, v));\n\t};\n}\n\nfunction assertArray(value) {\n\treturn Array.isArray(value) ? value : [value];\n}\n\nfunction zeroArray(array, length) {\n\tfor (let i = 0; i < length; i++) {\n\t\tif (typeof array[i] !== 'number') {\n\t\t\tarray[i] = 0;\n\t\t}\n\t}\n\n\treturn array;\n}\n\nexport default Color;\n"],"names":["skippedModels","hashedModelKeys","model","convert","limiters","Color","object","i","channels","result","colorString","newArray","zeroArray","keys","hashedKeys","labels","color","limit","places","self","arguments_","rgb","roundToPlace","value","getset","maxfn","rgbArray","alphaHex","lum","element","chan","color2","lum1","lum2","contrastRatio","ratio","hsl","hwb","degrees","hue","mixinColor","weight","color1","p","w","a","w1","w2","assertArray","roundTo","number","channel","modifier","m","max","v","array","length"],"mappings":";;AAGA,MAAMA,IAAgB;AAAA;AAAA,EAErB;AAAA;AAAA,EAGA;AAAA;AAAA,EAGA;AACD,GAEMC,IAAkB,CAAE;AAC1B,WAAWC,KAAS,OAAO,KAAKC,CAAO;AACtC,EAAAF,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,EAAMjD,CAAC,IAAI;AAIb,SAAOiD;AACR;","x_google_ignoreList":[0]}
|
|
@@ -2,7 +2,7 @@ import L from "../../../../@videojs_vhs-utils@4.1.1/node_modules/@videojs/vhs-ut
|
|
|
2
2
|
import T from "../../../../../../../_virtual/window.js";
|
|
3
3
|
import { forEachMediaGroup as Z } from "../../../../@videojs_vhs-utils@4.1.1/node_modules/@videojs/vhs-utils/es/media-groups.js";
|
|
4
4
|
import J from "../../../../@videojs_vhs-utils@4.1.1/node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js";
|
|
5
|
-
import { l as Q } from "../../../../../../../_virtual/
|
|
5
|
+
import { l as Q } from "../../../../../../../_virtual/index5.js";
|
|
6
6
|
/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */
|
|
7
7
|
const w = (e) => !!e && typeof e == "object", E = (...e) => e.reduce((n, t) => (typeof t != "object" || Object.keys(t).forEach((r) => {
|
|
8
8
|
Array.isArray(n[r]) && Array.isArray(t[r]) ? n[r] = n[r].concat(t[r]) : w(n[r]) && w(t[r]) ? n[r] = E(n[r], t[r]) : n[r] = t[r];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as r } from "../../../../../../../_virtual/
|
|
1
|
+
import { __module as r } from "../../../../../../../_virtual/index8.js";
|
|
2
2
|
import { __require as o } from "../cjs/use-sync-external-store-shim.production.js";
|
|
3
3
|
import { __require as i } from "../cjs/use-sync-external-store-shim.development.js";
|
|
4
4
|
var e;
|