@parcel/codeframe 2.4.1 → 2.5.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/lib/codeframe.js +26 -26
- package/lib/codeframe.js.map +1 -1
- package/package.json +2 -2
package/lib/codeframe.js
CHANGED
@@ -31874,7 +31874,7 @@ $7fbed568611944d2$var$convert.hwb.rgb = function(hwb) {
|
|
31874
31874
|
const i = Math.floor(6 * h);
|
31875
31875
|
const v = 1 - bl;
|
31876
31876
|
f = 6 * h - i;
|
31877
|
-
if ((i &
|
31877
|
+
if ((i & 0x01) !== 0) f = 1 - f;
|
31878
31878
|
const n = wh + f * (v - wh); // Linear interpolation
|
31879
31879
|
let r;
|
31880
31880
|
let g;
|
@@ -31942,11 +31942,11 @@ $7fbed568611944d2$var$convert.xyz.rgb = function(xyz) {
|
|
31942
31942
|
let b;
|
31943
31943
|
r = x * 3.2406 + y * -1.5372 + z * -0.4986;
|
31944
31944
|
g = x * -0.9689 + y * 1.8758 + z * 0.0415;
|
31945
|
-
b = x * 0.0557 + y * -0.204 + z * 1.
|
31945
|
+
b = x * 0.0557 + y * -0.204 + z * 1.0570;
|
31946
31946
|
// Assume sRGB
|
31947
|
-
r = r > 0.0031308 ? 1.055 * r ** (1 / 2.4) - 0.055 : r * 12.92;
|
31948
|
-
g = g > 0.0031308 ? 1.055 * g ** (1 / 2.4) - 0.055 : g * 12.92;
|
31949
|
-
b = b > 0.0031308 ? 1.055 * b ** (1 / 2.4) - 0.055 : b * 12.92;
|
31947
|
+
r = r > 0.0031308 ? 1.055 * r ** (1.0 / 2.4) - 0.055 : r * 12.92;
|
31948
|
+
g = g > 0.0031308 ? 1.055 * g ** (1.0 / 2.4) - 0.055 : g * 12.92;
|
31949
|
+
b = b > 0.0031308 ? 1.055 * b ** (1.0 / 2.4) - 0.055 : b * 12.92;
|
31950
31950
|
r = Math.min(Math.max(0, r), 1);
|
31951
31951
|
g = Math.min(Math.max(0, g), 1);
|
31952
31952
|
b = Math.min(Math.max(0, b), 1);
|
@@ -32100,7 +32100,7 @@ $7fbed568611944d2$var$convert.ansi256.rgb = function(args) {
|
|
32100
32100
|
];
|
32101
32101
|
};
|
32102
32102
|
$7fbed568611944d2$var$convert.rgb.hex = function(args) {
|
32103
|
-
const integer = ((Math.round(args[0]) &
|
32103
|
+
const integer = ((Math.round(args[0]) & 0xFF) << 16) + ((Math.round(args[1]) & 0xFF) << 8) + (Math.round(args[2]) & 0xFF);
|
32104
32104
|
const string = integer.toString(16).toUpperCase();
|
32105
32105
|
return '000000'.substring(string.length) + string;
|
32106
32106
|
};
|
@@ -32116,9 +32116,9 @@ $7fbed568611944d2$var$convert.hex.rgb = function(args) {
|
|
32116
32116
|
return char + char;
|
32117
32117
|
}).join('');
|
32118
32118
|
const integer = parseInt(colorString, 16);
|
32119
|
-
const r = integer >> 16 &
|
32120
|
-
const g = integer >> 8 &
|
32121
|
-
const b = integer &
|
32119
|
+
const r = integer >> 16 & 0xFF;
|
32120
|
+
const g = integer >> 8 & 0xFF;
|
32121
|
+
const b = integer & 0xFF;
|
32122
32122
|
return [
|
32123
32123
|
r,
|
32124
32124
|
g,
|
@@ -32151,9 +32151,9 @@ $7fbed568611944d2$var$convert.rgb.hcg = function(rgb) {
|
|
32151
32151
|
$7fbed568611944d2$var$convert.hsl.hcg = function(hsl) {
|
32152
32152
|
const s = hsl[1] / 100;
|
32153
32153
|
const l = hsl[2] / 100;
|
32154
|
-
const c = l < 0.5 ? 2 * s * l : 2 * s * (1 - l);
|
32154
|
+
const c = l < 0.5 ? 2.0 * s * l : 2.0 * s * (1.0 - l);
|
32155
32155
|
let f = 0;
|
32156
|
-
if (c < 1) f = (l - 0.5 * c) / (1 - c);
|
32156
|
+
if (c < 1.0) f = (l - 0.5 * c) / (1.0 - c);
|
32157
32157
|
return [
|
32158
32158
|
hsl[0],
|
32159
32159
|
c * 100,
|
@@ -32165,7 +32165,7 @@ $7fbed568611944d2$var$convert.hsv.hcg = function(hsv) {
|
|
32165
32165
|
const v = hsv[2] / 100;
|
32166
32166
|
const c = s * v;
|
32167
32167
|
let f = 0;
|
32168
|
-
if (c < 1) f = (v - c) / (1 - c);
|
32168
|
+
if (c < 1.0) f = (v - c) / (1 - c);
|
32169
32169
|
return [
|
32170
32170
|
hsv[0],
|
32171
32171
|
c * 100,
|
@@ -32176,7 +32176,7 @@ $7fbed568611944d2$var$convert.hcg.rgb = function(hcg) {
|
|
32176
32176
|
const h = hcg[0] / 360;
|
32177
32177
|
const c = hcg[1] / 100;
|
32178
32178
|
const g = hcg[2] / 100;
|
32179
|
-
if (c === 0) return [
|
32179
|
+
if (c === 0.0) return [
|
32180
32180
|
g * 255,
|
32181
32181
|
g * 255,
|
32182
32182
|
g * 255
|
@@ -32221,7 +32221,7 @@ $7fbed568611944d2$var$convert.hcg.rgb = function(hcg) {
|
|
32221
32221
|
pure[1] = 0;
|
32222
32222
|
pure[2] = w;
|
32223
32223
|
}
|
32224
|
-
/* eslint-enable max-statements-per-line */ mg = (1 - c) * g;
|
32224
|
+
/* eslint-enable max-statements-per-line */ mg = (1.0 - c) * g;
|
32225
32225
|
return [
|
32226
32226
|
(c * pure[0] + mg) * 255,
|
32227
32227
|
(c * pure[1] + mg) * 255,
|
@@ -32231,9 +32231,9 @@ $7fbed568611944d2$var$convert.hcg.rgb = function(hcg) {
|
|
32231
32231
|
$7fbed568611944d2$var$convert.hcg.hsv = function(hcg) {
|
32232
32232
|
const c = hcg[1] / 100;
|
32233
32233
|
const g = hcg[2] / 100;
|
32234
|
-
const v = c + g * (1 - c);
|
32234
|
+
const v = c + g * (1.0 - c);
|
32235
32235
|
let f = 0;
|
32236
|
-
if (v > 0) f = c / v;
|
32236
|
+
if (v > 0.0) f = c / v;
|
32237
32237
|
return [
|
32238
32238
|
hcg[0],
|
32239
32239
|
f * 100,
|
@@ -32243,10 +32243,10 @@ $7fbed568611944d2$var$convert.hcg.hsv = function(hcg) {
|
|
32243
32243
|
$7fbed568611944d2$var$convert.hcg.hsl = function(hcg) {
|
32244
32244
|
const c = hcg[1] / 100;
|
32245
32245
|
const g = hcg[2] / 100;
|
32246
|
-
const l = g * (1 - c) + 0.5 * c;
|
32246
|
+
const l = g * (1.0 - c) + 0.5 * c;
|
32247
32247
|
let s = 0;
|
32248
|
-
if (l > 0 && l < 0.5) s = c / (2 * l);
|
32249
|
-
else if (l >= 0.5 && l < 1) s = c / (2 * (1 - l));
|
32248
|
+
if (l > 0.0 && l < 0.5) s = c / (2 * l);
|
32249
|
+
else if (l >= 0.5 && l < 1.0) s = c / (2 * (1 - l));
|
32250
32250
|
return [
|
32251
32251
|
hcg[0],
|
32252
32252
|
s * 100,
|
@@ -32256,7 +32256,7 @@ $7fbed568611944d2$var$convert.hcg.hsl = function(hcg) {
|
|
32256
32256
|
$7fbed568611944d2$var$convert.hcg.hwb = function(hcg) {
|
32257
32257
|
const c = hcg[1] / 100;
|
32258
32258
|
const g = hcg[2] / 100;
|
32259
|
-
const v = c + g * (1 - c);
|
32259
|
+
const v = c + g * (1.0 - c);
|
32260
32260
|
return [
|
32261
32261
|
hcg[0],
|
32262
32262
|
(v - c) * 100,
|
@@ -32328,7 +32328,7 @@ $7fbed568611944d2$var$convert.gray.lab = function(gray) {
|
|
32328
32328
|
];
|
32329
32329
|
};
|
32330
32330
|
$7fbed568611944d2$var$convert.gray.hex = function(gray) {
|
32331
|
-
const val = Math.round(gray[0] / 100 * 255) &
|
32331
|
+
const val = Math.round(gray[0] / 100 * 255) & 0xFF;
|
32332
32332
|
const integer = (val << 16) + (val << 8) + val;
|
32333
32333
|
const string = integer.toString(16).toUpperCase();
|
32334
32334
|
return '000000'.substring(string.length) + string;
|
@@ -35801,7 +35801,7 @@ const $e19c725c5553b196$var$isFullwidthCodePoint = (codePoint)=>{
|
|
35801
35801
|
if (Number.isNaN(codePoint)) return false;
|
35802
35802
|
// Code points are derived from:
|
35803
35803
|
// http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt
|
35804
|
-
if (codePoint >=
|
35804
|
+
if (codePoint >= 0x1100 && (codePoint <= 0x115F || codePoint === 0x2329 || codePoint === 0x232A || 0x2E80 <= codePoint && codePoint <= 0x3247 && codePoint !== 0x303F || 0x3250 <= codePoint && codePoint <= 0x4DBF || 0x4E00 <= codePoint && codePoint <= 0xA4C6 || 0xA960 <= codePoint && codePoint <= 0xA97C || 0xAC00 <= codePoint && codePoint <= 0xD7A3 || 0xF900 <= codePoint && codePoint <= 0xFAFF || 0xFE10 <= codePoint && codePoint <= 0xFE19 || 0xFE30 <= codePoint && codePoint <= 0xFE6B || 0xFF01 <= codePoint && codePoint <= 0xFF60 || 0xFFE0 <= codePoint && codePoint <= 0xFFE6 || 0x1B000 <= codePoint && codePoint <= 0x1B001 || 0x1F200 <= codePoint && codePoint <= 0x1F251 || 0x20000 <= codePoint && codePoint <= 0x3FFFD)) return true;
|
35805
35805
|
return false;
|
35806
35806
|
};
|
35807
35807
|
$e19c725c5553b196$exports = $e19c725c5553b196$var$isFullwidthCodePoint;
|
@@ -35824,11 +35824,11 @@ const $ae1b0396e51a6d8c$var$stringWidth = (string)=>{
|
|
35824
35824
|
for(let i = 0; i < string.length; i++){
|
35825
35825
|
const code = string.codePointAt(i);
|
35826
35826
|
// Ignore control characters
|
35827
|
-
if (code <=
|
35827
|
+
if (code <= 0x1F || code >= 0x7F && code <= 0x9F) continue;
|
35828
35828
|
// Ignore combining characters
|
35829
|
-
if (code >=
|
35829
|
+
if (code >= 0x300 && code <= 0x36F) continue;
|
35830
35830
|
// Surrogates
|
35831
|
-
if (code >
|
35831
|
+
if (code > 0xFFFF) i++;
|
35832
35832
|
width += $e19c725c5553b196$exports(code) ? 2 : 1;
|
35833
35833
|
}
|
35834
35834
|
return width;
|
@@ -35846,7 +35846,7 @@ const $0926ce0154f25409$var$isFullwidthCodePoint = (codePoint)=>{
|
|
35846
35846
|
if (Number.isNaN(codePoint)) return false;
|
35847
35847
|
// Code points are derived from:
|
35848
35848
|
// http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt
|
35849
|
-
if (codePoint >=
|
35849
|
+
if (codePoint >= 0x1100 && (codePoint <= 0x115F || codePoint === 0x2329 || codePoint === 0x232A || 0x2E80 <= codePoint && codePoint <= 0x3247 && codePoint !== 0x303F || 0x3250 <= codePoint && codePoint <= 0x4DBF || 0x4E00 <= codePoint && codePoint <= 0xA4C6 || 0xA960 <= codePoint && codePoint <= 0xA97C || 0xAC00 <= codePoint && codePoint <= 0xD7A3 || 0xF900 <= codePoint && codePoint <= 0xFAFF || 0xFE10 <= codePoint && codePoint <= 0xFE19 || 0xFE30 <= codePoint && codePoint <= 0xFE6B || 0xFF01 <= codePoint && codePoint <= 0xFF60 || 0xFFE0 <= codePoint && codePoint <= 0xFFE6 || 0x1B000 <= codePoint && codePoint <= 0x1B001 || 0x1F200 <= codePoint && codePoint <= 0x1F251 || 0x20000 <= codePoint && codePoint <= 0x3FFFD)) return true;
|
35850
35850
|
return false;
|
35851
35851
|
};
|
35852
35852
|
$0926ce0154f25409$exports = $0926ce0154f25409$var$isFullwidthCodePoint;
|