@weapp-tailwindcss/postcss 3.3.8 → 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.
@@ -1,4 +1,4 @@
1
- import { parseCssImportSpecifier, quoteCssImportSpecifier, tokenizer, u } from "./resolve-D-FbFBpF.js";
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.1/node_modules/@csstools/css-tokenizer/dist/index.mjs
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, C) {
267
- const l = n.css.valueOf(), f = n.unicodeRangesAllowed ?? !1;
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 = C?.onParseError ?? noop;
269
+ const p = l?.onParseError ?? noop;
270
270
  function consumeIdentSequence() {
271
271
  const e = m;
272
272
  for (;;) {
273
- const e = l.charCodeAt(m);
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 = l.codePointAt(m) ?? -1;
279
- if (0 === n || n >= 55296 && n <= 57343 || n === s && !isNewLine(l.codePointAt(m + 1) ?? -1)) break;
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 = l.codePointAt(m) ?? -1;
284
- if (0 !== n && !(n >= 55296 && n <= 57343) && (n !== s || isNewLine(l.codePointAt(m + 1) ?? -1))) return P = !0, k = m - 1, l.slice(e, m);
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 = l.codePointAt(m) ?? -1;
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 (l.codePointAt(m) !== s || isNewLine(l.codePointAt(m + 1) ?? -1)) return t;
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 = l.codePointAt(m);
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 = l.codePointAt(m)) && isHexDigitCodePoint(o) && e.length < 6;) e.push(o), m += 1, k = m - 1;
304
- isWhitespace(l.codePointAt(m) ?? -1) && (l.codePointAt(m) === t && l.codePointAt(m + 1) === r && (m += 1), m += 1, k = m - 1);
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 = l.codePointAt(m);
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(l.codePointAt(m + 1) ?? -1) ? (m += 1, k = m - 1) : (m += 1, k = m - 1, consumeEscapedCodePoint());
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 = l.codePointAt(m);
320
+ const n = C.codePointAt(m);
321
321
  if (void 0 === n) {
322
322
  const n = [
323
323
  u.Comment,
324
- l.slice(h, k + 1),
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 !== l.codePointAt(m) && 47 === l.codePointAt(m)) {
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
- l.slice(h, k + 1),
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 = l.codePointAt(m);
346
+ const o = C.codePointAt(m);
347
347
  for (m += 1, k = m - 1;;) {
348
- const i = l.charCodeAt(m);
349
- if (m >= l.length) {
348
+ const i = C.charCodeAt(m);
349
+ if (m >= C.length) {
350
350
  const t = [
351
351
  u.String,
352
- l.slice(h, k + 1),
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
- l.slice(h, k + 1),
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, l.codePointAt(m) === t && l.codePointAt(m + 1) === r ? k + 2 : k + 1, ["4.3.5. Consume a string token", "Unexpected newline"], n)), n;
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
- l.slice(h, k + 1),
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 = l.codePointAt(m - 1) ?? -1;
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 === l.codePointAt(m)) continue;
389
- if (isNewLine(l.codePointAt(m) ?? -1)) {
390
- l.codePointAt(m) === t && l.codePointAt(m + 1) === r && (m += 1), m += 1, k = m - 1;
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 = l.codePointAt(m)) && e.length < 6 && isHexDigitCodePoint(t);) e.push(t), m += 1, k = m - 1;
402
- for (; void 0 !== (t = l.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 && l.codePointAt(m) === o && isHexDigitCodePoint(l.codePointAt(m + 1) ?? -1)) for (m += 1, k = m - 1; void 0 !== (t = l.codePointAt(m)) && n.length < 6 && isHexDigitCodePoint(t);) n.push(t), m += 1, k = m - 1;
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
- l.slice(h, k + 1),
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
- l.slice(h, k + 1),
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(l.codePointAt(m) ?? -1);) m += 1, k = m - 1;
430
+ for (; isWhitespace(C.codePointAt(m) ?? -1);) m += 1, k = m - 1;
431
431
  let n = "";
432
432
  for (;;) {
433
- if (void 0 === l.codePointAt(m)) {
433
+ if (void 0 === C.codePointAt(m)) {
434
434
  const t = [
435
435
  u.URL,
436
- l.slice(h, k + 1),
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 === l.codePointAt(m)) return m += 1, k = m - 1, [
443
+ if (41 === C.codePointAt(m)) return m += 1, k = m - 1, [
444
444
  u.URL,
445
- l.slice(h, k + 1),
445
+ C.slice(h, k + 1),
446
446
  h,
447
447
  k,
448
448
  { value: n }
449
449
  ];
450
- if (isWhitespace(l.codePointAt(m) ?? -1)) {
451
- for (m += 1, k = m - 1; isWhitespace(l.codePointAt(m) ?? -1);) m += 1, k = m - 1;
452
- if (void 0 === l.codePointAt(m)) {
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
- l.slice(h, k + 1),
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 === l.codePointAt(m) ? (m += 1, k = m - 1, [
466
+ return 41 === C.codePointAt(m) ? (m += 1, k = m - 1, [
467
467
  u.URL,
468
- l.slice(h, k + 1),
468
+ C.slice(h, k + 1),
469
469
  h,
470
470
  k,
471
471
  { value: n }
472
472
  ]) : (consumeBadURL(), [
473
473
  u.BadURL,
474
- l.slice(h, k + 1),
474
+ C.slice(h, k + 1),
475
475
  h,
476
476
  k,
477
477
  void 0
478
478
  ]);
479
479
  }
480
- const t = l.codePointAt(m);
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
- l.slice(h, k + 1),
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(l.codePointAt(m + 1) ?? -1)) {
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
- l.slice(h, k + 1),
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 = l.charCodeAt(m);
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 = l.charCodeAt(m);
521
+ const t = C.charCodeAt(m);
522
522
  t !== i && t !== o || (m += 1);
523
- let r = l.charCodeAt(m);
524
- for (; r >= 48 && r <= 57;) m += 1, r = l.charCodeAt(m);
525
- if (46 === l.charCodeAt(m) && l.charCodeAt(m + 1) >= 48 && l.charCodeAt(m + 1) <= 57) for (m += 2, n = a.Number, r = l.charCodeAt(m); r >= 48 && r <= 57;) m += 1, r = l.charCodeAt(m);
526
- const c = l.charCodeAt(m);
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 = l.charCodeAt(m + 1);
529
- if (e >= 48 && e <= 57) for (m += 2, n = a.Number, r = l.charCodeAt(m); r >= 48 && r <= 57;) m += 1, r = l.charCodeAt(m);
530
- else if ((e === o || e === i) && l.charCodeAt(m + 2) >= 48 && l.charCodeAt(m + 2) <= 57) for (m += 3, n = a.Number, r = l.charCodeAt(m); r >= 48 && r <= 57;) m += 1, r = l.charCodeAt(m);
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(l.slice(h, k + 1));
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
- l.slice(h, k + 1),
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 === l.charCodeAt(m) ? (m += 1, k = m - 1, [
549
+ return 37 === C.charCodeAt(m) ? (m += 1, k = m - 1, [
550
550
  u.Percentage,
551
- l.slice(h, k + 1),
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
- l.slice(h, k + 1),
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 !== l.charCodeAt(m)) return [
572
+ if (40 !== C.charCodeAt(m)) return [
573
573
  u.Ident,
574
- P ? e : l.slice(h, k + 1),
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(l.charCodeAt(m));) n += 1, m += 1, k = m - 1;
583
- const t = l.charCodeAt(m);
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
- l.slice(h, k + 1),
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
- l.slice(h, k + 1),
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 = l.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(l.codePointAt(m + 1) ?? -1)) {
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
- l.slice(h, k + 1),
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
- l.slice(h, k + 1),
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 ? l.charCodeAt(m) : e;
662
- return n === o ? l.charCodeAt(m + 1) === o || !!isIdentStartCodePoint(l.charCodeAt(m + 1)) || l.charCodeAt(m + 1) === s && !isNewLine(l.charCodeAt(m + 2)) : !!isIdentStartCodePoint(n) || l.charCodeAt(m) === s && !isNewLine(l.charCodeAt(m + 1));
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 ? l.charCodeAt(m + 1) >= 48 && l.charCodeAt(m + 1) <= 57 || 46 === l.charCodeAt(m + 1) && l.charCodeAt(m + 2) >= 48 && l.charCodeAt(m + 2) <= 57 : 46 === e ? l.charCodeAt(m + 1) >= 48 && l.charCodeAt(m + 1) <= 57 : e >= 48 && e <= 57;
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 >= l.length) return [
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 = l.charCodeAt(m);
677
- if (47 === e && 42 === l.charCodeAt(m + 1)) return consumeComment();
678
- if (f && (117 === e || 85 === e) && l.codePointAt(m + 1) === i && (63 === l.codePointAt(m + 2) || isHexDigitCodePoint(l.codePointAt(m + 2) ?? -1))) return consumeUnicodeRangeToken();
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
- l[h],
751
+ C[h],
752
752
  h,
753
753
  k,
754
- { value: l[h] }
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 = l.charCodeAt(m);
763
- for (; 32 === e || e === r || 9 === e || e === t || 12 === e;) m += 1, e = l.charCodeAt(m);
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
- l.slice(h, k + 1),
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() : l.charCodeAt(m + 1) === o && 62 === l.charCodeAt(m + 2) ? (m += 3, k = m - 1, [
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 === l.charCodeAt(m + 1) && l.charCodeAt(m + 2) === o && l.charCodeAt(m + 3) === o ? (m += 4, k = m - 1, [
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(l.charCodeAt(m + 1)) ? consumeInvalidEscapeToken() : consumeIdentLikeToken();
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
- l[h],
803
+ C[h],
804
804
  h,
805
805
  k,
806
- { value: l[h] }
806
+ { value: C[h] }
807
807
  ];
808
808
  }
809
809
  var n;
810
810
  },
811
811
  endOfFile: function endOfFile() {
812
- return m >= l.length;
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-D-FbFBpF.js";
2
- import { createCssRuntimeAffectingSignature, hasCssLocationDependencies, isUniAppXStyleSourceEmpty, parseCssSource, parseScssSource, parseUniAppXStyleSource, rewriteCssImportSpecifiers, scss, stringifyScssSource } from "./rewrite-imports-Dk9TKKSF.js";
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 };
@@ -1,5 +1,5 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
2
- const require_resolve = require("./resolve-CA9NfMTt.cjs");
2
+ const require_resolve = require("./resolve-DcV8mpsu.cjs");
3
3
  const require_shared = require("./shared-CELzerNo.cjs");
4
4
  const require_postcss = require("./postcss-CfbYRXJi.cjs");
5
5
  const require_preflight = require("./preflight-BTZL2nvC.cjs");
@@ -8772,6 +8772,27 @@ function isWebpackTailwindGeneratedUtilitySelector(selector, includePrefix) {
8772
8772
  return WEBPACK_TAILWIND_UTILITY_RULE_MARKER_RE.test(selector) || includePrefix && WEBPACK_TAILWIND_UTILITY_PREFIX_RE.test(selector);
8773
8773
  }
8774
8774
  //#endregion
8775
+ //#region src/utils/deferred-css-source.ts
8776
+ const marker = /\/\*!?\s*weapp-tailwindcss deferred-source:([^\s*]+)\s*\*\//g;
8777
+ /** 为延后生成的入口保留来源身份,供构建器在合并后查询生命周期缓存。 */
8778
+ function createDeferredCssSourceMarker(file) {
8779
+ return `/*! weapp-tailwindcss deferred-source:${encodeURIComponent(file).replace(/\*/g, "%2A")} */`;
8780
+ }
8781
+ /** 按产物中的出现顺序读取来源,不把标记当作文件系统读取授权。 */
8782
+ function readDeferredCssSourceMarkers(css) {
8783
+ return [...new Set([...css.matchAll(marker)].flatMap((match) => {
8784
+ try {
8785
+ return [decodeURIComponent(match[1])];
8786
+ } catch {
8787
+ return [];
8788
+ }
8789
+ }))];
8790
+ }
8791
+ /** 最终产物不保留构建期来源标记。 */
8792
+ function stripDeferredCssSourceMarkers(css) {
8793
+ return css.replace(marker, "");
8794
+ }
8795
+ //#endregion
8775
8796
  //#region src/utils/generated-css-marker.ts
8776
8797
  const BUNDLER_GENERATED_CSS_MARKER_RE = /\/\*!?\s*weapp-tailwindcss (?:gulp|vite|webpack)-generated-css(?:\s*:\s*[^\s*]+)?\s*\*\/\s*/i;
8777
8798
  const BUNDLER_GENERATED_CSS_MARKER_GLOBAL_RE = /\/\*!?\s*weapp-tailwindcss (?:gulp|vite|webpack)-generated-css(?:\s*:\s*[^\s*]+)?\s*\*\/\s*/gi;
@@ -8788,7 +8809,7 @@ function hasBundlerGeneratedCssMarker(source) {
8788
8809
  return typeof source === "string" && BUNDLER_GENERATED_CSS_MARKER_RE.test(source);
8789
8810
  }
8790
8811
  function stripBundlerGeneratedCssMarkers(source) {
8791
- return source.replace(BUNDLER_GENERATED_CSS_MARKER_GLOBAL_RE, "").replace(BUNDLER_GENERATED_CSS_END_MARKER_GLOBAL_RE, "").replace(VITE_INTERNAL_CSS_MARKER_GLOBAL_RE, "");
8812
+ return stripDeferredCssSourceMarkers(source).replace(BUNDLER_GENERATED_CSS_MARKER_GLOBAL_RE, "").replace(BUNDLER_GENERATED_CSS_END_MARKER_GLOBAL_RE, "").replace(VITE_INTERNAL_CSS_MARKER_GLOBAL_RE, "");
8792
8813
  }
8793
8814
  function parseBundlerGeneratedCssMarkerBlocks(source) {
8794
8815
  const blocks = [];
@@ -9873,6 +9894,12 @@ Object.defineProperty(exports, "createCssSourceOrderAppend", {
9873
9894
  return createCssSourceOrderAppend;
9874
9895
  }
9875
9896
  });
9897
+ Object.defineProperty(exports, "createDeferredCssSourceMarker", {
9898
+ enumerable: true,
9899
+ get: function() {
9900
+ return createDeferredCssSourceMarker;
9901
+ }
9902
+ });
9876
9903
  Object.defineProperty(exports, "createFallbackPlaceholderReplacer", {
9877
9904
  enumerable: true,
9878
9905
  get: function() {
@@ -10617,6 +10644,12 @@ Object.defineProperty(exports, "pruneMiniProgramGeneratedCss", {
10617
10644
  return pruneMiniProgramGeneratedCss;
10618
10645
  }
10619
10646
  });
10647
+ Object.defineProperty(exports, "readDeferredCssSourceMarkers", {
10648
+ enumerable: true,
10649
+ get: function() {
10650
+ return readDeferredCssSourceMarkers;
10651
+ }
10652
+ });
10620
10653
  Object.defineProperty(exports, "removeBalancedAtRuleBlock", {
10621
10654
  enumerable: true,
10622
10655
  get: function() {
@@ -11019,6 +11052,12 @@ Object.defineProperty(exports, "stripBundlerGeneratedCssMarkers", {
11019
11052
  return stripBundlerGeneratedCssMarkers;
11020
11053
  }
11021
11054
  });
11055
+ Object.defineProperty(exports, "stripDeferredCssSourceMarkers", {
11056
+ enumerable: true,
11057
+ get: function() {
11058
+ return stripDeferredCssSourceMarkers;
11059
+ }
11060
+ });
11022
11061
  Object.defineProperty(exports, "stripGeneratorPlaceholderMarkers", {
11023
11062
  enumerable: true,
11024
11063
  get: function() {