vite 3.0.0-beta.1 → 3.0.0-beta.10
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/LICENSE.md +2 -340
- package/dist/client/client.mjs +11 -1
- package/dist/client/client.mjs.map +1 -1
- package/dist/node/chunks/{dep-e8ca8d40.js → dep-07a79996.js} +121 -113
- package/dist/node/chunks/{dep-58d622b1.js → dep-41eb528c.js} +7 -7
- package/dist/node/chunks/{dep-077259ad.js → dep-7c75cb17.js} +33049 -32213
- package/dist/node/chunks/{dep-d0efd013.js → dep-af860ceb.js} +3119 -3119
- package/dist/node/chunks/dep-bc80f1d6.js +7545 -0
- package/dist/node/cli.js +13 -13
- package/dist/node/constants.js +23 -4
- package/dist/node/index.d.ts +134 -112
- package/dist/node/index.js +3 -3
- package/dist/node-cjs/publicUtils.cjs +1004 -963
- package/package.json +12 -13
- package/src/client/client.ts +16 -2
- package/src/client/tsconfig.json +0 -2
- package/dist/node/chunks/dep-35befe4f.js +0 -19615
- package/dist/node/chunks/dep-cd58a191.js +0 -7505
|
@@ -17,7 +17,7 @@ var colon = ":".charCodeAt(0);
|
|
|
17
17
|
var star = "*".charCodeAt(0);
|
|
18
18
|
var uLower = "u".charCodeAt(0);
|
|
19
19
|
var uUpper = "U".charCodeAt(0);
|
|
20
|
-
var plus
|
|
20
|
+
var plus = "+".charCodeAt(0);
|
|
21
21
|
var isUnicodeRange = /^[a-f0-9?-]+$/i;
|
|
22
22
|
|
|
23
23
|
var parse$1 = function(input) {
|
|
@@ -298,7 +298,7 @@ var parse$1 = function(input) {
|
|
|
298
298
|
name = token;
|
|
299
299
|
} else if (
|
|
300
300
|
(uLower === token.charCodeAt(0) || uUpper === token.charCodeAt(0)) &&
|
|
301
|
-
plus
|
|
301
|
+
plus === token.charCodeAt(1) &&
|
|
302
302
|
isUnicodeRange.test(token.slice(2))
|
|
303
303
|
) {
|
|
304
304
|
tokens.push({
|
|
@@ -400,127 +400,135 @@ function stringify$1(nodes, custom) {
|
|
|
400
400
|
|
|
401
401
|
var stringify_1 = stringify$1;
|
|
402
402
|
|
|
403
|
-
var
|
|
404
|
-
var
|
|
405
|
-
var dot = ".".charCodeAt(0);
|
|
406
|
-
var exp = "e".charCodeAt(0);
|
|
407
|
-
var EXP = "E".charCodeAt(0);
|
|
403
|
+
var unit;
|
|
404
|
+
var hasRequiredUnit;
|
|
408
405
|
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
406
|
+
function requireUnit () {
|
|
407
|
+
if (hasRequiredUnit) return unit;
|
|
408
|
+
hasRequiredUnit = 1;
|
|
409
|
+
var minus = "-".charCodeAt(0);
|
|
410
|
+
var plus = "+".charCodeAt(0);
|
|
411
|
+
var dot = ".".charCodeAt(0);
|
|
412
|
+
var exp = "e".charCodeAt(0);
|
|
413
|
+
var EXP = "E".charCodeAt(0);
|
|
414
414
|
|
|
415
|
-
|
|
416
|
-
|
|
415
|
+
// Check if three code points would start a number
|
|
416
|
+
// https://www.w3.org/TR/css-syntax-3/#starts-with-a-number
|
|
417
|
+
function likeNumber(value) {
|
|
418
|
+
var code = value.charCodeAt(0);
|
|
419
|
+
var nextCode;
|
|
417
420
|
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
}
|
|
421
|
+
if (code === plus || code === minus) {
|
|
422
|
+
nextCode = value.charCodeAt(1);
|
|
421
423
|
|
|
422
|
-
|
|
424
|
+
if (nextCode >= 48 && nextCode <= 57) {
|
|
425
|
+
return true;
|
|
426
|
+
}
|
|
423
427
|
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
428
|
+
var nextNextCode = value.charCodeAt(2);
|
|
429
|
+
|
|
430
|
+
if (nextCode === dot && nextNextCode >= 48 && nextNextCode <= 57) {
|
|
431
|
+
return true;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
return false;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
if (code === dot) {
|
|
438
|
+
nextCode = value.charCodeAt(1);
|
|
439
|
+
|
|
440
|
+
if (nextCode >= 48 && nextCode <= 57) {
|
|
441
|
+
return true;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
return false;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
if (code >= 48 && code <= 57) {
|
|
448
|
+
return true;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
return false;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
// Consume a number
|
|
455
|
+
// https://www.w3.org/TR/css-syntax-3/#consume-number
|
|
456
|
+
unit = function(value) {
|
|
457
|
+
var pos = 0;
|
|
458
|
+
var length = value.length;
|
|
459
|
+
var code;
|
|
460
|
+
var nextCode;
|
|
461
|
+
var nextNextCode;
|
|
462
|
+
|
|
463
|
+
if (length === 0 || !likeNumber(value)) {
|
|
464
|
+
return false;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
code = value.charCodeAt(pos);
|
|
468
|
+
|
|
469
|
+
if (code === plus || code === minus) {
|
|
470
|
+
pos++;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
while (pos < length) {
|
|
474
|
+
code = value.charCodeAt(pos);
|
|
475
|
+
|
|
476
|
+
if (code < 48 || code > 57) {
|
|
477
|
+
break;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
pos += 1;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
code = value.charCodeAt(pos);
|
|
484
|
+
nextCode = value.charCodeAt(pos + 1);
|
|
485
|
+
|
|
486
|
+
if (code === dot && nextCode >= 48 && nextCode <= 57) {
|
|
487
|
+
pos += 2;
|
|
488
|
+
|
|
489
|
+
while (pos < length) {
|
|
490
|
+
code = value.charCodeAt(pos);
|
|
491
|
+
|
|
492
|
+
if (code < 48 || code > 57) {
|
|
493
|
+
break;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
pos += 1;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
code = value.charCodeAt(pos);
|
|
501
|
+
nextCode = value.charCodeAt(pos + 1);
|
|
502
|
+
nextNextCode = value.charCodeAt(pos + 2);
|
|
503
|
+
|
|
504
|
+
if (
|
|
505
|
+
(code === exp || code === EXP) &&
|
|
506
|
+
((nextCode >= 48 && nextCode <= 57) ||
|
|
507
|
+
((nextCode === plus || nextCode === minus) &&
|
|
508
|
+
nextNextCode >= 48 &&
|
|
509
|
+
nextNextCode <= 57))
|
|
510
|
+
) {
|
|
511
|
+
pos += nextCode === plus || nextCode === minus ? 3 : 2;
|
|
427
512
|
|
|
428
|
-
|
|
429
|
-
|
|
513
|
+
while (pos < length) {
|
|
514
|
+
code = value.charCodeAt(pos);
|
|
430
515
|
|
|
431
|
-
|
|
432
|
-
|
|
516
|
+
if (code < 48 || code > 57) {
|
|
517
|
+
break;
|
|
518
|
+
}
|
|
433
519
|
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
520
|
+
pos += 1;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
437
523
|
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
return false;
|
|
524
|
+
return {
|
|
525
|
+
number: value.slice(0, pos),
|
|
526
|
+
unit: value.slice(pos)
|
|
527
|
+
};
|
|
528
|
+
};
|
|
529
|
+
return unit;
|
|
446
530
|
}
|
|
447
531
|
|
|
448
|
-
// Consume a number
|
|
449
|
-
// https://www.w3.org/TR/css-syntax-3/#consume-number
|
|
450
|
-
var unit = function(value) {
|
|
451
|
-
var pos = 0;
|
|
452
|
-
var length = value.length;
|
|
453
|
-
var code;
|
|
454
|
-
var nextCode;
|
|
455
|
-
var nextNextCode;
|
|
456
|
-
|
|
457
|
-
if (length === 0 || !likeNumber(value)) {
|
|
458
|
-
return false;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
code = value.charCodeAt(pos);
|
|
462
|
-
|
|
463
|
-
if (code === plus || code === minus) {
|
|
464
|
-
pos++;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
while (pos < length) {
|
|
468
|
-
code = value.charCodeAt(pos);
|
|
469
|
-
|
|
470
|
-
if (code < 48 || code > 57) {
|
|
471
|
-
break;
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
pos += 1;
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
code = value.charCodeAt(pos);
|
|
478
|
-
nextCode = value.charCodeAt(pos + 1);
|
|
479
|
-
|
|
480
|
-
if (code === dot && nextCode >= 48 && nextCode <= 57) {
|
|
481
|
-
pos += 2;
|
|
482
|
-
|
|
483
|
-
while (pos < length) {
|
|
484
|
-
code = value.charCodeAt(pos);
|
|
485
|
-
|
|
486
|
-
if (code < 48 || code > 57) {
|
|
487
|
-
break;
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
pos += 1;
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
code = value.charCodeAt(pos);
|
|
495
|
-
nextCode = value.charCodeAt(pos + 1);
|
|
496
|
-
nextNextCode = value.charCodeAt(pos + 2);
|
|
497
|
-
|
|
498
|
-
if (
|
|
499
|
-
(code === exp || code === EXP) &&
|
|
500
|
-
((nextCode >= 48 && nextCode <= 57) ||
|
|
501
|
-
((nextCode === plus || nextCode === minus) &&
|
|
502
|
-
nextNextCode >= 48 &&
|
|
503
|
-
nextNextCode <= 57))
|
|
504
|
-
) {
|
|
505
|
-
pos += nextCode === plus || nextCode === minus ? 3 : 2;
|
|
506
|
-
|
|
507
|
-
while (pos < length) {
|
|
508
|
-
code = value.charCodeAt(pos);
|
|
509
|
-
|
|
510
|
-
if (code < 48 || code > 57) {
|
|
511
|
-
break;
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
pos += 1;
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
return {
|
|
519
|
-
number: value.slice(0, pos),
|
|
520
|
-
unit: value.slice(pos)
|
|
521
|
-
};
|
|
522
|
-
};
|
|
523
|
-
|
|
524
532
|
var parse = parse$1;
|
|
525
533
|
var walk = walk$1;
|
|
526
534
|
var stringify = stringify_1;
|
|
@@ -542,7 +550,7 @@ ValueParser.prototype.walk = function(cb, bubble) {
|
|
|
542
550
|
return this;
|
|
543
551
|
};
|
|
544
552
|
|
|
545
|
-
ValueParser.unit =
|
|
553
|
+
ValueParser.unit = requireUnit();
|
|
546
554
|
|
|
547
555
|
ValueParser.walk = walk;
|
|
548
556
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import require$$0 from 'path';
|
|
2
|
+
import resolve$2 from 'resolve';
|
|
3
3
|
import require$$0__default from 'fs';
|
|
4
|
-
import { l as lib } from './dep-
|
|
4
|
+
import { l as lib } from './dep-07a79996.js';
|
|
5
5
|
|
|
6
6
|
import { fileURLToPath as __cjs_fileURLToPath } from 'node:url';
|
|
7
7
|
import { dirname as __cjs_dirname } from 'node:path';
|
|
@@ -48,7 +48,7 @@ var joinLayer$1 = function (parentLayer, childLayer) {
|
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
// external tooling
|
|
51
|
-
const resolve$1 =
|
|
51
|
+
const resolve$1 = resolve$2;
|
|
52
52
|
|
|
53
53
|
const moduleDirectories = ["web_modules", "node_modules"];
|
|
54
54
|
|
|
@@ -160,7 +160,7 @@ var pify$1 = pify$2.exports = function (obj, P, opts) {
|
|
|
160
160
|
pify$1.all = pify$1;
|
|
161
161
|
|
|
162
162
|
var fs = require$$0__default;
|
|
163
|
-
var path$2 =
|
|
163
|
+
var path$2 = require$$0;
|
|
164
164
|
var pify = pify$2.exports;
|
|
165
165
|
|
|
166
166
|
var stat = pify(fs.stat);
|
|
@@ -243,7 +243,7 @@ const readCache = readCache$1.exports;
|
|
|
243
243
|
var loadContent$1 = filename => readCache(filename, "utf-8");
|
|
244
244
|
|
|
245
245
|
// builtin tooling
|
|
246
|
-
const path$1 =
|
|
246
|
+
const path$1 = require$$0;
|
|
247
247
|
|
|
248
248
|
// placeholder tooling
|
|
249
249
|
let sugarss;
|
|
@@ -472,7 +472,7 @@ function parseImport(result, atRule) {
|
|
|
472
472
|
}
|
|
473
473
|
|
|
474
474
|
// builtin tooling
|
|
475
|
-
const path =
|
|
475
|
+
const path = require$$0;
|
|
476
476
|
|
|
477
477
|
// internal tooling
|
|
478
478
|
const joinMedia = joinMedia$1;
|