@weapp-tailwindcss/postcss 3.3.7 → 3.3.9
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/compat/mini-program-css/prune-generated.d.ts +3 -2
- package/dist/compat/uni-app-x-uvue.d.ts +1 -1
- package/dist/{directives-C7XTve1w.js → directives-DMB7AQE_.js} +616 -572
- package/dist/fingerprint.d.ts +3 -0
- package/dist/index.cjs +9 -3
- package/dist/index.js +7 -7
- package/dist/mp.d.ts +5 -1
- package/dist/{plugin-CRzZbcEf.js → plugin-BxhTytFU.js} +2 -2
- package/dist/{plugin-DwoAGHyN.cjs → plugin-CfrVcQt8.cjs} +1 -1
- package/dist/plugin.cjs +1 -1
- package/dist/plugin.js +1 -1
- package/dist/plugins/applyConfiguredCssCalc.d.ts +1 -1
- package/dist/plugins/applyConfiguredCssUnits.d.ts +4 -0
- package/dist/plugins/user-plugin-stage.d.ts +3 -0
- package/dist/processor-cache.d.ts +0 -1
- package/dist/{resolve-D-FbFBpF.js → resolve-Cb3XkcFk.js} +102 -99
- package/dist/{resolve-BFphwPip.cjs → resolve-DcV8mpsu.cjs} +727 -668
- package/dist/{rewrite-imports-Dk9TKKSF.js → rewrite-imports-Cx1wGYaN.js} +1 -1
- package/dist/syntax.cjs +94 -94
- package/dist/syntax.js +2 -2
- package/dist/{transform-DpFypcaN.cjs → transform-CmPPSR36.cjs} +384 -172
- package/dist/{transform-BGYgGeQj.js → transform-DhUndykm.js} +352 -176
- package/dist/transform.cjs +8 -2
- package/dist/transform.d.ts +4 -0
- package/dist/transform.js +6 -6
- package/dist/types.d.ts +10 -0
- package/dist/utils/css-calc-context.d.ts +12 -0
- package/dist/utils/css-custom-property.d.ts +14 -0
- package/dist/utils/deferred-css-source.d.ts +6 -0
- package/package.json +9 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { parseCssImportSpecifier, quoteCssImportSpecifier, tokenizer, u } from "./resolve-
|
|
1
|
+
import { parseCssImportSpecifier, quoteCssImportSpecifier, tokenizer, u } from "./resolve-Cb3XkcFk.js";
|
|
2
2
|
import { postcss as postcss$1 } from "./postcss-runtime-i5rHe_mj.js";
|
|
3
3
|
import postcss from "postcss";
|
|
4
4
|
import scss, { default as scssSyntax } from "postcss-scss";
|
package/dist/syntax.cjs
CHANGED
|
@@ -202,7 +202,7 @@ async function expandTailwindSourceEntries(entries, options = {}) {
|
|
|
202
202
|
}));
|
|
203
203
|
}
|
|
204
204
|
//#endregion
|
|
205
|
-
//#region ../../node_modules/.pnpm/@csstools+css-tokenizer@4.0.
|
|
205
|
+
//#region ../../node_modules/.pnpm/@csstools+css-tokenizer@4.0.2/node_modules/@csstools/css-tokenizer/dist/index.mjs
|
|
206
206
|
var ParseError = class extends Error {
|
|
207
207
|
sourceStart;
|
|
208
208
|
sourceEnd;
|
|
@@ -263,45 +263,45 @@ function tokenize(e, n) {
|
|
|
263
263
|
for (; !t.endOfFile();) o.push(t.nextToken());
|
|
264
264
|
return o.push(t.nextToken()), o;
|
|
265
265
|
}
|
|
266
|
-
function tokenizer(n,
|
|
267
|
-
const
|
|
266
|
+
function tokenizer(n, l) {
|
|
267
|
+
const C = n.css.valueOf(), f = n.unicodeRangesAllowed ?? !1;
|
|
268
268
|
let m = 0, h = 0, k = -1, P = !1;
|
|
269
|
-
const p =
|
|
269
|
+
const p = l?.onParseError ?? noop;
|
|
270
270
|
function consumeIdentSequence() {
|
|
271
271
|
const e = m;
|
|
272
272
|
for (;;) {
|
|
273
|
-
const e =
|
|
273
|
+
const e = C.charCodeAt(m);
|
|
274
274
|
if (e >= 65 && e <= 90 || e >= 97 && e <= 122 || e >= 48 && e <= 57 || e === o || 95 === e) {
|
|
275
275
|
m += 1;
|
|
276
276
|
continue;
|
|
277
277
|
}
|
|
278
|
-
const n =
|
|
279
|
-
if (0 === n || n >= 55296 && n <= 57343 || n === s && !isNewLine(
|
|
278
|
+
const n = C.codePointAt(m) ?? -1;
|
|
279
|
+
if (0 === n || n >= 55296 && n <= 57343 || n === s && !isNewLine(C.codePointAt(m + 1) ?? -1)) break;
|
|
280
280
|
if (!isNonASCII_IdentCodePoint(n)) break;
|
|
281
281
|
m += +(n > 65535) + 1;
|
|
282
282
|
}
|
|
283
|
-
const n =
|
|
284
|
-
if (0 !== n && !(n >= 55296 && n <= 57343) && (n !== s || isNewLine(
|
|
283
|
+
const n = C.codePointAt(m) ?? -1;
|
|
284
|
+
if (0 !== n && !(n >= 55296 && n <= 57343) && (n !== s || isNewLine(C.codePointAt(m + 1) ?? -1))) return P = !0, k = m - 1, C.slice(e, m);
|
|
285
285
|
P = !1, m = e, k = -1;
|
|
286
286
|
let t = "";
|
|
287
287
|
for (;;) {
|
|
288
|
-
const e =
|
|
288
|
+
const e = C.codePointAt(m) ?? -1;
|
|
289
289
|
if (0 === e || isSurrogate(e)) t += String.fromCharCode(c), m += +(e > 65535) + 1, k = m - 1;
|
|
290
290
|
else if (e >= 65 && e <= 90 || e >= 97 && e <= 122 || e >= 48 && e <= 57 || e === o || 95 === e || isNonASCII_IdentCodePoint(e)) t += e > 65535 ? String.fromCodePoint(e) : String.fromCharCode(e), m += +(e > 65535) + 1, k = m - 1;
|
|
291
291
|
else {
|
|
292
|
-
if (
|
|
292
|
+
if (C.codePointAt(m) !== s || isNewLine(C.codePointAt(m + 1) ?? -1)) return t;
|
|
293
293
|
m += 1, k = m - 1, t += String.fromCodePoint(consumeEscapedCodePoint());
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
297
|
function consumeEscapedCodePoint() {
|
|
298
|
-
const n =
|
|
298
|
+
const n = C.codePointAt(m);
|
|
299
299
|
if (void 0 === n) return p(new ParseError(e.UnexpectedEOFInEscapedCodePoint, h, k, ["4.3.7. Consume an escaped code point", "Unexpected EOF"])), c;
|
|
300
300
|
if (m += +(n > 65535) + 1, k = m - 1, isHexDigitCodePoint(n)) {
|
|
301
301
|
const e = [n];
|
|
302
302
|
let o;
|
|
303
|
-
for (; void 0 !== (o =
|
|
304
|
-
isWhitespace(
|
|
303
|
+
for (; void 0 !== (o = C.codePointAt(m)) && isHexDigitCodePoint(o) && e.length < 6;) e.push(o), m += 1, k = m - 1;
|
|
304
|
+
isWhitespace(C.codePointAt(m) ?? -1) && (C.codePointAt(m) === t && C.codePointAt(m + 1) === r && (m += 1), m += 1, k = m - 1);
|
|
305
305
|
const i = parseInt(String.fromCodePoint(...e), 16);
|
|
306
306
|
return 0 === i || isSurrogate(i) || i > 1114111 ? c : i;
|
|
307
307
|
}
|
|
@@ -309,33 +309,33 @@ function tokenizer(n, C) {
|
|
|
309
309
|
}
|
|
310
310
|
function consumeBadURL() {
|
|
311
311
|
for (;;) {
|
|
312
|
-
const e =
|
|
312
|
+
const e = C.codePointAt(m);
|
|
313
313
|
if (void 0 === e) return;
|
|
314
314
|
if (41 === e) return m += 1, void (k = m - 1);
|
|
315
|
-
e !== s || isNewLine(
|
|
315
|
+
e !== s || isNewLine(C.codePointAt(m + 1) ?? -1) ? (m += 1, k = m - 1) : (m += 1, k = m - 1, consumeEscapedCodePoint());
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
function consumeComment() {
|
|
319
319
|
for (m += 2, k = m - 1;;) {
|
|
320
|
-
const n =
|
|
320
|
+
const n = C.codePointAt(m);
|
|
321
321
|
if (void 0 === n) {
|
|
322
322
|
const n = [
|
|
323
323
|
u.Comment,
|
|
324
|
-
|
|
324
|
+
C.slice(h, k + 1),
|
|
325
325
|
h,
|
|
326
326
|
k,
|
|
327
327
|
void 0
|
|
328
328
|
];
|
|
329
329
|
return p(new ParseErrorWithToken(e.UnexpectedEOFInComment, h, k, ["4.3.2. Consume comments", "Unexpected EOF"], n)), n;
|
|
330
330
|
}
|
|
331
|
-
if (m += 1, k = m - 1, 42 === n && void 0 !==
|
|
331
|
+
if (m += 1, k = m - 1, 42 === n && void 0 !== C.codePointAt(m) && 47 === C.codePointAt(m)) {
|
|
332
332
|
m += 1, k = m - 1;
|
|
333
333
|
break;
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
336
|
return [
|
|
337
337
|
u.Comment,
|
|
338
|
-
|
|
338
|
+
C.slice(h, k + 1),
|
|
339
339
|
h,
|
|
340
340
|
k,
|
|
341
341
|
void 0
|
|
@@ -343,13 +343,13 @@ function tokenizer(n, C) {
|
|
|
343
343
|
}
|
|
344
344
|
function consumeStringToken() {
|
|
345
345
|
let n = "";
|
|
346
|
-
const o =
|
|
346
|
+
const o = C.codePointAt(m);
|
|
347
347
|
for (m += 1, k = m - 1;;) {
|
|
348
|
-
const i =
|
|
349
|
-
if (m >=
|
|
348
|
+
const i = C.charCodeAt(m);
|
|
349
|
+
if (m >= C.length) {
|
|
350
350
|
const t = [
|
|
351
351
|
u.String,
|
|
352
|
-
|
|
352
|
+
C.slice(h, k + 1),
|
|
353
353
|
h,
|
|
354
354
|
k,
|
|
355
355
|
{ value: n }
|
|
@@ -360,16 +360,16 @@ function tokenizer(n, C) {
|
|
|
360
360
|
m -= 1, k = m - 1;
|
|
361
361
|
const n = [
|
|
362
362
|
u.BadString,
|
|
363
|
-
|
|
363
|
+
C.slice(h, k + 1),
|
|
364
364
|
h,
|
|
365
365
|
k,
|
|
366
366
|
void 0
|
|
367
367
|
];
|
|
368
|
-
return p(new ParseErrorWithToken(e.UnexpectedNewLineInString, h,
|
|
368
|
+
return p(new ParseErrorWithToken(e.UnexpectedNewLineInString, h, C.codePointAt(m) === t && C.codePointAt(m + 1) === r ? k + 2 : k + 1, ["4.3.5. Consume a string token", "Unexpected newline"], n)), n;
|
|
369
369
|
}
|
|
370
370
|
if (i === o) return [
|
|
371
371
|
u.String,
|
|
372
|
-
|
|
372
|
+
C.slice(h, k + 1),
|
|
373
373
|
h,
|
|
374
374
|
k,
|
|
375
375
|
{ value: n }
|
|
@@ -377,7 +377,7 @@ function tokenizer(n, C) {
|
|
|
377
377
|
if (i !== s) if (0 !== i) if (i < 128) n += String.fromCharCode(i);
|
|
378
378
|
else {
|
|
379
379
|
if (i >= 55296 && i <= 57343) {
|
|
380
|
-
const e =
|
|
380
|
+
const e = C.codePointAt(m - 1) ?? -1;
|
|
381
381
|
e >= 65536 ? (n += String.fromCodePoint(e), m += 1, k = m - 1) : n += String.fromCharCode(c);
|
|
382
382
|
continue;
|
|
383
383
|
}
|
|
@@ -385,9 +385,9 @@ function tokenizer(n, C) {
|
|
|
385
385
|
}
|
|
386
386
|
else n += String.fromCharCode(c);
|
|
387
387
|
else {
|
|
388
|
-
if (void 0 ===
|
|
389
|
-
if (isNewLine(
|
|
390
|
-
|
|
388
|
+
if (void 0 === C.codePointAt(m)) continue;
|
|
389
|
+
if (isNewLine(C.codePointAt(m) ?? -1)) {
|
|
390
|
+
C.codePointAt(m) === t && C.codePointAt(m + 1) === r && (m += 1), m += 1, k = m - 1;
|
|
391
391
|
continue;
|
|
392
392
|
}
|
|
393
393
|
n += String.fromCodePoint(consumeEscapedCodePoint());
|
|
@@ -398,14 +398,14 @@ function tokenizer(n, C) {
|
|
|
398
398
|
m += 2, k = m - 1;
|
|
399
399
|
const e = [], n = [];
|
|
400
400
|
let t;
|
|
401
|
-
for (; void 0 !== (t =
|
|
402
|
-
for (; void 0 !== (t =
|
|
403
|
-
if (!n.length &&
|
|
401
|
+
for (; void 0 !== (t = C.codePointAt(m)) && e.length < 6 && isHexDigitCodePoint(t);) e.push(t), m += 1, k = m - 1;
|
|
402
|
+
for (; void 0 !== (t = C.codePointAt(m)) && e.length < 6 && 63 === t;) 0 === n.length && n.push(...e), e.push(48), n.push(70), m += 1, k = m - 1;
|
|
403
|
+
if (!n.length && C.codePointAt(m) === o && isHexDigitCodePoint(C.codePointAt(m + 1) ?? -1)) for (m += 1, k = m - 1; void 0 !== (t = C.codePointAt(m)) && n.length < 6 && isHexDigitCodePoint(t);) n.push(t), m += 1, k = m - 1;
|
|
404
404
|
if (!n.length) {
|
|
405
405
|
const n = parseInt(String.fromCodePoint(...e), 16);
|
|
406
406
|
return [
|
|
407
407
|
u.UnicodeRange,
|
|
408
|
-
|
|
408
|
+
C.slice(h, k + 1),
|
|
409
409
|
h,
|
|
410
410
|
k,
|
|
411
411
|
{
|
|
@@ -417,7 +417,7 @@ function tokenizer(n, C) {
|
|
|
417
417
|
const r = parseInt(String.fromCodePoint(...e), 16), i = parseInt(String.fromCodePoint(...n), 16);
|
|
418
418
|
return [
|
|
419
419
|
u.UnicodeRange,
|
|
420
|
-
|
|
420
|
+
C.slice(h, k + 1),
|
|
421
421
|
h,
|
|
422
422
|
k,
|
|
423
423
|
{
|
|
@@ -427,32 +427,32 @@ function tokenizer(n, C) {
|
|
|
427
427
|
];
|
|
428
428
|
}
|
|
429
429
|
function consumeUrlToken() {
|
|
430
|
-
for (; isWhitespace(
|
|
430
|
+
for (; isWhitespace(C.codePointAt(m) ?? -1);) m += 1, k = m - 1;
|
|
431
431
|
let n = "";
|
|
432
432
|
for (;;) {
|
|
433
|
-
if (void 0 ===
|
|
433
|
+
if (void 0 === C.codePointAt(m)) {
|
|
434
434
|
const t = [
|
|
435
435
|
u.URL,
|
|
436
|
-
|
|
436
|
+
C.slice(h, k + 1),
|
|
437
437
|
h,
|
|
438
438
|
k,
|
|
439
439
|
{ value: n }
|
|
440
440
|
];
|
|
441
441
|
return p(new ParseErrorWithToken(e.UnexpectedEOFInURL, h, k, ["4.3.6. Consume a url token", "Unexpected EOF"], t)), t;
|
|
442
442
|
}
|
|
443
|
-
if (41 ===
|
|
443
|
+
if (41 === C.codePointAt(m)) return m += 1, k = m - 1, [
|
|
444
444
|
u.URL,
|
|
445
|
-
|
|
445
|
+
C.slice(h, k + 1),
|
|
446
446
|
h,
|
|
447
447
|
k,
|
|
448
448
|
{ value: n }
|
|
449
449
|
];
|
|
450
|
-
if (isWhitespace(
|
|
451
|
-
for (m += 1, k = m - 1; isWhitespace(
|
|
452
|
-
if (void 0 ===
|
|
450
|
+
if (isWhitespace(C.codePointAt(m) ?? -1)) {
|
|
451
|
+
for (m += 1, k = m - 1; isWhitespace(C.codePointAt(m) ?? -1);) m += 1, k = m - 1;
|
|
452
|
+
if (void 0 === C.codePointAt(m)) {
|
|
453
453
|
const t = [
|
|
454
454
|
u.URL,
|
|
455
|
-
|
|
455
|
+
C.slice(h, k + 1),
|
|
456
456
|
h,
|
|
457
457
|
k,
|
|
458
458
|
{ value: n }
|
|
@@ -463,26 +463,26 @@ function tokenizer(n, C) {
|
|
|
463
463
|
"Unexpected EOF"
|
|
464
464
|
], t)), t;
|
|
465
465
|
}
|
|
466
|
-
return 41 ===
|
|
466
|
+
return 41 === C.codePointAt(m) ? (m += 1, k = m - 1, [
|
|
467
467
|
u.URL,
|
|
468
|
-
|
|
468
|
+
C.slice(h, k + 1),
|
|
469
469
|
h,
|
|
470
470
|
k,
|
|
471
471
|
{ value: n }
|
|
472
472
|
]) : (consumeBadURL(), [
|
|
473
473
|
u.BadURL,
|
|
474
|
-
|
|
474
|
+
C.slice(h, k + 1),
|
|
475
475
|
h,
|
|
476
476
|
k,
|
|
477
477
|
void 0
|
|
478
478
|
]);
|
|
479
479
|
}
|
|
480
|
-
const t =
|
|
480
|
+
const t = C.codePointAt(m);
|
|
481
481
|
if (34 === t || 39 === t || 40 === t || isNonPrintableCodePoint(t ?? -1)) {
|
|
482
482
|
consumeBadURL();
|
|
483
483
|
const n = [
|
|
484
484
|
u.BadURL,
|
|
485
|
-
|
|
485
|
+
C.slice(h, k + 1),
|
|
486
486
|
h,
|
|
487
487
|
k,
|
|
488
488
|
void 0
|
|
@@ -490,14 +490,14 @@ function tokenizer(n, C) {
|
|
|
490
490
|
return p(new ParseErrorWithToken(e.UnexpectedCharacterInURL, h, k, ["4.3.6. Consume a url token", "Unexpected U+0022 QUOTATION MARK (\"), U+0027 APOSTROPHE ('), U+0028 LEFT PARENTHESIS (() or non-printable code point"], n)), n;
|
|
491
491
|
}
|
|
492
492
|
if (t === s) {
|
|
493
|
-
if (t === s && !isNewLine(
|
|
493
|
+
if (t === s && !isNewLine(C.codePointAt(m + 1) ?? -1)) {
|
|
494
494
|
m += 1, k = m - 1, n += String.fromCodePoint(consumeEscapedCodePoint());
|
|
495
495
|
continue;
|
|
496
496
|
}
|
|
497
497
|
consumeBadURL();
|
|
498
498
|
const o = [
|
|
499
499
|
u.BadURL,
|
|
500
|
-
|
|
500
|
+
C.slice(h, k + 1),
|
|
501
501
|
h,
|
|
502
502
|
k,
|
|
503
503
|
void 0
|
|
@@ -514,28 +514,28 @@ function tokenizer(n, C) {
|
|
|
514
514
|
function consumeNumericToken() {
|
|
515
515
|
let e;
|
|
516
516
|
{
|
|
517
|
-
const n =
|
|
517
|
+
const n = C.charCodeAt(m);
|
|
518
518
|
n === o ? e = "-" : n === i && (e = "+");
|
|
519
519
|
}
|
|
520
520
|
let n = a.Integer;
|
|
521
|
-
const t =
|
|
521
|
+
const t = C.charCodeAt(m);
|
|
522
522
|
t !== i && t !== o || (m += 1);
|
|
523
|
-
let r =
|
|
524
|
-
for (; r >= 48 && r <= 57;) m += 1, r =
|
|
525
|
-
if (46 ===
|
|
526
|
-
const c =
|
|
523
|
+
let r = C.charCodeAt(m);
|
|
524
|
+
for (; r >= 48 && r <= 57;) m += 1, r = C.charCodeAt(m);
|
|
525
|
+
if (46 === C.charCodeAt(m) && C.charCodeAt(m + 1) >= 48 && C.charCodeAt(m + 1) <= 57) for (m += 2, n = a.Number, r = C.charCodeAt(m); r >= 48 && r <= 57;) m += 1, r = C.charCodeAt(m);
|
|
526
|
+
const c = C.charCodeAt(m);
|
|
527
527
|
if (101 === c || 69 === c) {
|
|
528
|
-
const e =
|
|
529
|
-
if (e >= 48 && e <= 57) for (m += 2, n = a.Number, r =
|
|
530
|
-
else if ((e === o || e === i) &&
|
|
528
|
+
const e = C.charCodeAt(m + 1);
|
|
529
|
+
if (e >= 48 && e <= 57) for (m += 2, n = a.Number, r = C.charCodeAt(m); r >= 48 && r <= 57;) m += 1, r = C.charCodeAt(m);
|
|
530
|
+
else if ((e === o || e === i) && C.charCodeAt(m + 2) >= 48 && C.charCodeAt(m + 2) <= 57) for (m += 3, n = a.Number, r = C.charCodeAt(m); r >= 48 && r <= 57;) m += 1, r = C.charCodeAt(m);
|
|
531
531
|
}
|
|
532
532
|
k = m - 1;
|
|
533
|
-
const s = parseFloat(
|
|
533
|
+
const s = parseFloat(C.slice(h, k + 1));
|
|
534
534
|
if (checkIfThreeCodePointsWouldStartAnIdentSequence()) {
|
|
535
535
|
const t = consumeIdentSequence();
|
|
536
536
|
return [
|
|
537
537
|
u.Dimension,
|
|
538
|
-
|
|
538
|
+
C.slice(h, k + 1),
|
|
539
539
|
h,
|
|
540
540
|
k,
|
|
541
541
|
{
|
|
@@ -546,9 +546,9 @@ function tokenizer(n, C) {
|
|
|
546
546
|
}
|
|
547
547
|
];
|
|
548
548
|
}
|
|
549
|
-
return 37 ===
|
|
549
|
+
return 37 === C.charCodeAt(m) ? (m += 1, k = m - 1, [
|
|
550
550
|
u.Percentage,
|
|
551
|
-
|
|
551
|
+
C.slice(h, k + 1),
|
|
552
552
|
h,
|
|
553
553
|
k,
|
|
554
554
|
{
|
|
@@ -557,7 +557,7 @@ function tokenizer(n, C) {
|
|
|
557
557
|
}
|
|
558
558
|
]) : [
|
|
559
559
|
u.Number,
|
|
560
|
-
|
|
560
|
+
C.slice(h, k + 1),
|
|
561
561
|
h,
|
|
562
562
|
k,
|
|
563
563
|
{
|
|
@@ -569,9 +569,9 @@ function tokenizer(n, C) {
|
|
|
569
569
|
}
|
|
570
570
|
function consumeIdentLikeToken() {
|
|
571
571
|
const e = consumeIdentSequence();
|
|
572
|
-
if (40 !==
|
|
572
|
+
if (40 !== C.charCodeAt(m)) return [
|
|
573
573
|
u.Ident,
|
|
574
|
-
P ? e :
|
|
574
|
+
P ? e : C.slice(h, k + 1),
|
|
575
575
|
h,
|
|
576
576
|
k,
|
|
577
577
|
{ value: e }
|
|
@@ -579,11 +579,11 @@ function tokenizer(n, C) {
|
|
|
579
579
|
if (!(3 !== e.length || 117 !== e.charCodeAt(0) && 85 !== e.charCodeAt(0) || 114 !== e.charCodeAt(1) && 82 !== e.charCodeAt(1) || 108 !== e.charCodeAt(2) && 76 !== e.charCodeAt(2))) {
|
|
580
580
|
m += 1, k = m - 1;
|
|
581
581
|
let n = 0;
|
|
582
|
-
for (; isWhitespace(
|
|
583
|
-
const t =
|
|
582
|
+
for (; isWhitespace(C.charCodeAt(m));) n += 1, m += 1, k = m - 1;
|
|
583
|
+
const t = C.charCodeAt(m);
|
|
584
584
|
return 34 === t || 39 === t ? (n > 0 && (m -= n, k = m - 1), [
|
|
585
585
|
u.Function,
|
|
586
|
-
|
|
586
|
+
C.slice(h, k + 1),
|
|
587
587
|
h,
|
|
588
588
|
k,
|
|
589
589
|
{ value: e }
|
|
@@ -591,7 +591,7 @@ function tokenizer(n, C) {
|
|
|
591
591
|
}
|
|
592
592
|
return m += 1, k = m - 1, [
|
|
593
593
|
u.Function,
|
|
594
|
-
|
|
594
|
+
C.slice(h, k + 1),
|
|
595
595
|
h,
|
|
596
596
|
k,
|
|
597
597
|
{ value: e }
|
|
@@ -599,14 +599,14 @@ function tokenizer(n, C) {
|
|
|
599
599
|
}
|
|
600
600
|
function consumeHashToken() {
|
|
601
601
|
m += 1, k = m - 1;
|
|
602
|
-
const e =
|
|
603
|
-
if (e >= 65 && e <= 90 || e >= 97 && e <= 122 || e >= 48 && e <= 57 || e === o || 95 === e || isNonASCII_IdentCodePoint(e) || e === s && !isNewLine(
|
|
602
|
+
const e = C.charCodeAt(m);
|
|
603
|
+
if (e >= 65 && e <= 90 || e >= 97 && e <= 122 || e >= 48 && e <= 57 || e === o || 95 === e || isNonASCII_IdentCodePoint(e) || e === s && !isNewLine(C.codePointAt(m + 1) ?? -1)) {
|
|
604
604
|
let e = d.Unrestricted;
|
|
605
605
|
checkIfThreeCodePointsWouldStartAnIdentSequence() && (e = d.ID);
|
|
606
606
|
const n = consumeIdentSequence();
|
|
607
607
|
return [
|
|
608
608
|
u.Hash,
|
|
609
|
-
|
|
609
|
+
C.slice(h, k + 1),
|
|
610
610
|
h,
|
|
611
611
|
k,
|
|
612
612
|
{
|
|
@@ -628,7 +628,7 @@ function tokenizer(n, C) {
|
|
|
628
628
|
const e = consumeIdentSequence();
|
|
629
629
|
return [
|
|
630
630
|
u.AtKeyword,
|
|
631
|
-
|
|
631
|
+
C.slice(h, k + 1),
|
|
632
632
|
h,
|
|
633
633
|
k,
|
|
634
634
|
{ value: e }
|
|
@@ -658,24 +658,24 @@ function tokenizer(n, C) {
|
|
|
658
658
|
], n)), n;
|
|
659
659
|
}
|
|
660
660
|
function checkIfThreeCodePointsWouldStartAnIdentSequence(e) {
|
|
661
|
-
const n = void 0 === e ?
|
|
662
|
-
return n === o ?
|
|
661
|
+
const n = void 0 === e ? C.charCodeAt(m) : e;
|
|
662
|
+
return n === o ? C.charCodeAt(m + 1) === o || !!isIdentStartCodePoint(C.charCodeAt(m + 1)) || C.charCodeAt(m + 1) === s && !isNewLine(C.charCodeAt(m + 2)) : !!isIdentStartCodePoint(n) || C.charCodeAt(m) === s && !isNewLine(C.charCodeAt(m + 1));
|
|
663
663
|
}
|
|
664
664
|
function checkIfThreeCodePointsWouldStartANumber(e) {
|
|
665
|
-
return e === i || e === o ?
|
|
665
|
+
return e === i || e === o ? C.charCodeAt(m + 1) >= 48 && C.charCodeAt(m + 1) <= 57 || 46 === C.charCodeAt(m + 1) && C.charCodeAt(m + 2) >= 48 && C.charCodeAt(m + 2) <= 57 : 46 === e ? C.charCodeAt(m + 1) >= 48 && C.charCodeAt(m + 1) <= 57 : e >= 48 && e <= 57;
|
|
666
666
|
}
|
|
667
667
|
return {
|
|
668
668
|
nextToken: function nextToken() {
|
|
669
|
-
if (h = m, k = -1, m >=
|
|
669
|
+
if (h = m, k = -1, m >= C.length) return [
|
|
670
670
|
u.EOF,
|
|
671
671
|
"",
|
|
672
672
|
-1,
|
|
673
673
|
-1,
|
|
674
674
|
void 0
|
|
675
675
|
];
|
|
676
|
-
const e =
|
|
677
|
-
if (47 === e && 42 ===
|
|
678
|
-
if (f && (117 === e || 85 === e) &&
|
|
676
|
+
const e = C.charCodeAt(m);
|
|
677
|
+
if (47 === e && 42 === C.charCodeAt(m + 1)) return consumeComment();
|
|
678
|
+
if (f && (117 === e || 85 === e) && C.codePointAt(m + 1) === i && (63 === C.codePointAt(m + 2) || isHexDigitCodePoint(C.codePointAt(m + 2) ?? -1))) return consumeUnicodeRangeToken();
|
|
679
679
|
if (isIdentStartCodePoint(e)) return consumeIdentLikeToken();
|
|
680
680
|
if ((n = e) >= 48 && n <= 57) return consumeNumericToken();
|
|
681
681
|
switch (e) {
|
|
@@ -748,10 +748,10 @@ function tokenizer(n, C) {
|
|
|
748
748
|
case i:
|
|
749
749
|
case 46: return checkIfThreeCodePointsWouldStartANumber(e) ? consumeNumericToken() : (m += 1, k = m - 1, [
|
|
750
750
|
u.Delim,
|
|
751
|
-
|
|
751
|
+
C[h],
|
|
752
752
|
h,
|
|
753
753
|
k,
|
|
754
|
-
{ value:
|
|
754
|
+
{ value: C[h] }
|
|
755
755
|
]);
|
|
756
756
|
case r:
|
|
757
757
|
case t:
|
|
@@ -759,18 +759,18 @@ function tokenizer(n, C) {
|
|
|
759
759
|
case 9:
|
|
760
760
|
case 32:
|
|
761
761
|
{
|
|
762
|
-
let e =
|
|
763
|
-
for (; 32 === e || e === r || 9 === e || e === t || 12 === e;) m += 1, e =
|
|
762
|
+
let e = C.charCodeAt(m);
|
|
763
|
+
for (; 32 === e || e === r || 9 === e || e === t || 12 === e;) m += 1, e = C.charCodeAt(m);
|
|
764
764
|
k = m - 1;
|
|
765
765
|
}
|
|
766
766
|
return [
|
|
767
767
|
u.Whitespace,
|
|
768
|
-
|
|
768
|
+
C.slice(h, k + 1),
|
|
769
769
|
h,
|
|
770
770
|
k,
|
|
771
771
|
void 0
|
|
772
772
|
];
|
|
773
|
-
case o: return checkIfThreeCodePointsWouldStartANumber(e) ? consumeNumericToken() :
|
|
773
|
+
case o: return checkIfThreeCodePointsWouldStartANumber(e) ? consumeNumericToken() : C.charCodeAt(m + 1) === o && 62 === C.charCodeAt(m + 2) ? (m += 3, k = m - 1, [
|
|
774
774
|
u.CDC,
|
|
775
775
|
"-->",
|
|
776
776
|
h,
|
|
@@ -783,7 +783,7 @@ function tokenizer(n, C) {
|
|
|
783
783
|
k,
|
|
784
784
|
{ value: "-" }
|
|
785
785
|
]);
|
|
786
|
-
case 60: return 33 ===
|
|
786
|
+
case 60: return 33 === C.charCodeAt(m + 1) && C.charCodeAt(m + 2) === o && C.charCodeAt(m + 3) === o ? (m += 4, k = m - 1, [
|
|
787
787
|
u.CDO,
|
|
788
788
|
"<!--",
|
|
789
789
|
h,
|
|
@@ -797,19 +797,19 @@ function tokenizer(n, C) {
|
|
|
797
797
|
{ value: "<" }
|
|
798
798
|
]);
|
|
799
799
|
case 64: return consumeAtKeywordToken();
|
|
800
|
-
case s: return e !== s || isNewLine(
|
|
800
|
+
case s: return e !== s || isNewLine(C.charCodeAt(m + 1)) ? consumeInvalidEscapeToken() : consumeIdentLikeToken();
|
|
801
801
|
default: return m += 1, k = m - 1, [
|
|
802
802
|
u.Delim,
|
|
803
|
-
|
|
803
|
+
C[h],
|
|
804
804
|
h,
|
|
805
805
|
k,
|
|
806
|
-
{ value:
|
|
806
|
+
{ value: C[h] }
|
|
807
807
|
];
|
|
808
808
|
}
|
|
809
809
|
var n;
|
|
810
810
|
},
|
|
811
811
|
endOfFile: function endOfFile() {
|
|
812
|
-
return m >=
|
|
812
|
+
return m >= C.length;
|
|
813
813
|
}
|
|
814
814
|
};
|
|
815
815
|
}
|
package/dist/syntax.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { collectCssInlineSourceCandidates, describeCssSources, expandInlineSourceCandidatePattern, expandTailwindSourceEntries, isTailwindCssImport, parseConfigParam, parseCssImportSpecifier, parseImportSourceParam, parseSourceFileParam, quoteCssImportSpecifier, resolveCssScanSources, resolveCssSourceEntries } from "./resolve-
|
|
2
|
-
import { createCssRuntimeAffectingSignature, hasCssLocationDependencies, isUniAppXStyleSourceEmpty, parseCssSource, parseScssSource, parseUniAppXStyleSource, rewriteCssImportSpecifiers, scss, stringifyScssSource } from "./rewrite-imports-
|
|
1
|
+
import { collectCssInlineSourceCandidates, describeCssSources, expandInlineSourceCandidatePattern, expandTailwindSourceEntries, isTailwindCssImport, parseConfigParam, parseCssImportSpecifier, parseImportSourceParam, parseSourceFileParam, quoteCssImportSpecifier, resolveCssScanSources, resolveCssSourceEntries } from "./resolve-Cb3XkcFk.js";
|
|
2
|
+
import { createCssRuntimeAffectingSignature, hasCssLocationDependencies, isUniAppXStyleSourceEmpty, parseCssSource, parseScssSource, parseUniAppXStyleSource, rewriteCssImportSpecifiers, scss, stringifyScssSource } from "./rewrite-imports-Cx1wGYaN.js";
|
|
3
3
|
export { collectCssInlineSourceCandidates, createCssRuntimeAffectingSignature, describeCssSources, expandInlineSourceCandidatePattern, expandTailwindSourceEntries, hasCssLocationDependencies, isTailwindCssImport, isUniAppXStyleSourceEmpty, parseConfigParam, parseCssImportSpecifier, parseCssSource, parseImportSourceParam, parseScssSource, parseSourceFileParam, parseUniAppXStyleSource, quoteCssImportSpecifier, resolveCssScanSources, resolveCssSourceEntries, rewriteCssImportSpecifiers, scss, stringifyScssSource };
|