weapp-tailwindcss 5.0.0-next.16 → 5.0.0-next.18

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.
Files changed (44) hide show
  1. package/dist/{bundle-state-5CBF59C0.js → bundle-state-Cmi0kFpJ.js} +1 -1
  2. package/dist/{bundle-state-CUuNIG4-.mjs → bundle-state-DsgThPdW.mjs} +1 -1
  3. package/dist/bundlers/shared/css-cleanup/root-cleanups.d.ts +1 -0
  4. package/dist/bundlers/vite/source-candidates.d.ts +1 -0
  5. package/dist/cli.js +63 -61
  6. package/dist/cli.mjs +63 -61
  7. package/dist/core.js +1 -1
  8. package/dist/core.mjs +1 -1
  9. package/dist/{generator-BTf14-zB.js → generator-CQ8A3YVm.js} +1 -1
  10. package/dist/{generator-BjB20Esq.mjs → generator-CbjnpVed.mjs} +1 -1
  11. package/dist/generator.js +2 -2
  12. package/dist/generator.mjs +2 -2
  13. package/dist/gulp.js +5 -5
  14. package/dist/gulp.mjs +5 -5
  15. package/dist/{incremental-runtime-class-set-DtYQ57bs.js → incremental-runtime-class-set-BMo8s7do.js} +91 -27
  16. package/dist/{incremental-runtime-class-set-Dten3guT.mjs → incremental-runtime-class-set-Cwq1Wbo2.mjs} +89 -25
  17. package/dist/index.js +4 -4
  18. package/dist/index.mjs +4 -4
  19. package/dist/{postcss-CBUuHzjH.mjs → postcss-CLQ3yVXP.mjs} +3 -20
  20. package/dist/{postcss-CbrupBCk.js → postcss-CXJLLWRe.js} +3 -20
  21. package/dist/postcss.js +1 -1
  22. package/dist/postcss.mjs +1 -1
  23. package/dist/{precheck-CL0BmEi5.mjs → precheck-Bbcmh24Z.mjs} +2 -2
  24. package/dist/{precheck-CfyWVL3l.js → precheck-CTRQCNuH.js} +2 -2
  25. package/dist/presets.js +2 -2
  26. package/dist/presets.mjs +2 -2
  27. package/dist/{source-candidates-D9iHMeLE.mjs → source-candidates-B3NL91dO.mjs} +23 -73
  28. package/dist/{source-candidates-bTqXER8H.js → source-candidates-CVp7TQFL.js} +23 -75
  29. package/dist/tailwindcss/source-scan.d.ts +10 -0
  30. package/dist/tailwindcss/v4-engine/source.d.ts +2 -2
  31. package/dist/tailwindcss/v4-engine/types.d.ts +3 -0
  32. package/dist/{tailwindcss-CSdlV4y2.js → tailwindcss-DO30H8ux.js} +1 -1
  33. package/dist/{tailwindcss-CJ487R7-.mjs → tailwindcss-P0OQvEif.mjs} +1 -1
  34. package/dist/{v3-engine-BBvwlLWp.mjs → v3-engine-DHsPM4ye.mjs} +224 -152
  35. package/dist/{v3-engine-B1AJfKB1.js → v3-engine-DpaX1FqH.js} +256 -148
  36. package/dist/{vite-Br-D3jQe.js → vite-DglfodCp.js} +9 -9
  37. package/dist/{vite-CPhJAYeg.mjs → vite-oKeO_p82.mjs} +9 -9
  38. package/dist/vite.js +1 -1
  39. package/dist/vite.mjs +1 -1
  40. package/dist/{webpack-om3uHco-.mjs → webpack-BaqqyfEd.mjs} +5 -5
  41. package/dist/{webpack-DNcEK3jn.js → webpack-De6UzFP9.js} +5 -5
  42. package/dist/webpack.js +1 -1
  43. package/dist/webpack.mjs +1 -1
  44. package/package.json +5 -5
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-8l464Juk.js");
2
- const require_precheck = require("./precheck-CfyWVL3l.js");
2
+ const require_precheck = require("./precheck-CTRQCNuH.js");
3
3
  let node_module = require("node:module");
4
4
  let node_path = require("node:path");
5
5
  node_path = require_chunk.__toESM(node_path);
@@ -1,4 +1,4 @@
1
- import { d as traverse, u as babelParse } from "./precheck-CL0BmEi5.mjs";
1
+ import { d as traverse, u as babelParse } from "./precheck-Bbcmh24Z.mjs";
2
2
  import { createRequire } from "node:module";
3
3
  import path from "node:path";
4
4
  import { Buffer } from "node:buffer";
@@ -2,3 +2,4 @@ import type postcss from 'postcss';
2
2
  export declare function removeSpecificityPlaceholders(root: postcss.Root): void;
3
3
  export declare function removeUnsupportedBrowserSelectors(root: postcss.Root): void;
4
4
  export declare function removeDisplayP3Declarations(root: postcss.Root): void;
5
+ export declare function removeUnsupportedModernColorDeclarations(root: postcss.Root): void;
@@ -3,6 +3,7 @@ export interface SourceCandidateCollector {
3
3
  sync: (id: string, source: string) => Promise<void>;
4
4
  merge: (id: string, source: string) => Promise<void>;
5
5
  syncFile: (id: string) => Promise<void>;
6
+ syncCurrentFile: (id: string) => Promise<void>;
6
7
  scanRoot: (options: ScanSourceCandidateRootOptions) => Promise<void>;
7
8
  syncInline: (inlineCandidates: TailwindInlineSourceCandidates | undefined) => void;
8
9
  remove: (id: string) => void;
package/dist/cli.js CHANGED
@@ -38,10 +38,10 @@ debug = __toESM(debug);
38
38
  let node_fs = require("node:fs");
39
39
  node_fs = __toESM(node_fs);
40
40
  require("postcss");
41
+ require("micromatch");
41
42
  let _weapp_tailwindcss_postcss = require("@weapp-tailwindcss/postcss");
42
43
  let node_module = require("node:module");
43
44
  require("fast-glob");
44
- require("micromatch");
45
45
  require("tailwindcss-config");
46
46
  let _babel_traverse = require("@babel/traverse");
47
47
  _babel_traverse = __toESM(_babel_traverse);
@@ -73,6 +73,68 @@ function createDebug(prefix) {
73
73
  return debug$4;
74
74
  }
75
75
  //#endregion
76
+ //#region src/tailwindcss/source-scan.ts
77
+ const DEFAULT_SOURCE_SCAN_EXTENSIONS = [
78
+ "html",
79
+ "wxml",
80
+ "axml",
81
+ "jxml",
82
+ "ksml",
83
+ "ttml",
84
+ "qml",
85
+ "tyml",
86
+ "xhsml",
87
+ "swan",
88
+ "vue",
89
+ "mpx",
90
+ "js",
91
+ "jsx",
92
+ "ts",
93
+ "tsx"
94
+ ];
95
+ const FULL_SOURCE_SCAN_EXTENSIONS = [
96
+ "js",
97
+ "jsx",
98
+ "mjs",
99
+ "cjs",
100
+ "ts",
101
+ "tsx",
102
+ "mts",
103
+ "cts",
104
+ "vue",
105
+ "uvue",
106
+ "nvue",
107
+ "svelte",
108
+ "mpx",
109
+ "html",
110
+ "wxml",
111
+ "axml",
112
+ "jxml",
113
+ "ksml",
114
+ "ttml",
115
+ "qml",
116
+ "tyml",
117
+ "xhsml",
118
+ "swan",
119
+ "css",
120
+ "wxss",
121
+ "acss",
122
+ "jxss",
123
+ "ttss",
124
+ "qss",
125
+ "tyss",
126
+ "scss",
127
+ "sass",
128
+ "less",
129
+ "styl",
130
+ "stylus"
131
+ ];
132
+ function createSourceScanPattern(extensions = DEFAULT_SOURCE_SCAN_EXTENSIONS) {
133
+ return `**/*.{${extensions.join(",")}}`;
134
+ }
135
+ createSourceScanPattern(FULL_SOURCE_SCAN_EXTENSIONS);
136
+ new RegExp(`\\.(?:${FULL_SOURCE_SCAN_EXTENSIONS.map((extension) => extension.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|")})$`);
137
+ //#endregion
76
138
  //#region src/utils/object.ts
77
139
  function definedEntries(value) {
78
140
  return Object.entries(value).filter(([, item]) => item !== void 0);
@@ -448,29 +510,6 @@ function createTailwindV3DefaultColorThemeCss() {
448
510
  " margin: auto;",
449
511
  "}"
450
512
  ].join("\n");
451
- //#endregion
452
- //#region src/tailwindcss/source-scan.ts
453
- const DEFAULT_SOURCE_SCAN_EXTENSIONS = [
454
- "html",
455
- "wxml",
456
- "axml",
457
- "jxml",
458
- "ksml",
459
- "ttml",
460
- "qml",
461
- "tyml",
462
- "xhsml",
463
- "swan",
464
- "vue",
465
- "mpx",
466
- "js",
467
- "jsx",
468
- "ts",
469
- "tsx"
470
- ];
471
- function createSourceScanPattern(extensions = DEFAULT_SOURCE_SCAN_EXTENSIONS) {
472
- return `**/*.{${extensions.join(",")}}`;
473
- }
474
513
  (0, _weapp_tailwindcss_postcss.createStyleHandler)({
475
514
  cssChildCombinatorReplaceValue: ["view", "text"],
476
515
  cssRemoveHoverPseudoClass: true,
@@ -482,43 +521,6 @@ function createSourceScanPattern(extensions = DEFAULT_SOURCE_SCAN_EXTENSIONS) {
482
521
  "@tailwind components;",
483
522
  "@tailwind utilities;"
484
523
  ].join("\n");
485
- createSourceScanPattern([
486
- "js",
487
- "jsx",
488
- "mjs",
489
- "cjs",
490
- "ts",
491
- "tsx",
492
- "mts",
493
- "cts",
494
- "vue",
495
- "uvue",
496
- "nvue",
497
- "svelte",
498
- "mpx",
499
- "html",
500
- "wxml",
501
- "axml",
502
- "jxml",
503
- "ksml",
504
- "ttml",
505
- "qml",
506
- "tyml",
507
- "xhsml",
508
- "swan",
509
- "css",
510
- "wxss",
511
- "acss",
512
- "jxss",
513
- "ttss",
514
- "qss",
515
- "tyss",
516
- "scss",
517
- "sass",
518
- "less",
519
- "styl",
520
- "stylus"
521
- ]);
522
524
  createDebug("[tailwindcss:runtime-patch] ");
523
525
  (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href);
524
526
  createDebug("[tailwindcss:runtime] ");
package/dist/cli.mjs CHANGED
@@ -12,9 +12,9 @@ import "@weapp-tailwindcss/shared";
12
12
  import _createDebug from "debug";
13
13
  import { constants, existsSync, readFileSync } from "node:fs";
14
14
  import "postcss";
15
+ import "micromatch";
15
16
  import { createStyleHandler } from "@weapp-tailwindcss/postcss";
16
17
  import "fast-glob";
17
- import "micromatch";
18
18
  import "tailwindcss-config";
19
19
  import _babelTraverse from "@babel/traverse";
20
20
  import { parse } from "@babel/parser";
@@ -44,6 +44,68 @@ function createDebug(prefix) {
44
44
  return debug;
45
45
  }
46
46
  //#endregion
47
+ //#region src/tailwindcss/source-scan.ts
48
+ const DEFAULT_SOURCE_SCAN_EXTENSIONS = [
49
+ "html",
50
+ "wxml",
51
+ "axml",
52
+ "jxml",
53
+ "ksml",
54
+ "ttml",
55
+ "qml",
56
+ "tyml",
57
+ "xhsml",
58
+ "swan",
59
+ "vue",
60
+ "mpx",
61
+ "js",
62
+ "jsx",
63
+ "ts",
64
+ "tsx"
65
+ ];
66
+ const FULL_SOURCE_SCAN_EXTENSIONS = [
67
+ "js",
68
+ "jsx",
69
+ "mjs",
70
+ "cjs",
71
+ "ts",
72
+ "tsx",
73
+ "mts",
74
+ "cts",
75
+ "vue",
76
+ "uvue",
77
+ "nvue",
78
+ "svelte",
79
+ "mpx",
80
+ "html",
81
+ "wxml",
82
+ "axml",
83
+ "jxml",
84
+ "ksml",
85
+ "ttml",
86
+ "qml",
87
+ "tyml",
88
+ "xhsml",
89
+ "swan",
90
+ "css",
91
+ "wxss",
92
+ "acss",
93
+ "jxss",
94
+ "ttss",
95
+ "qss",
96
+ "tyss",
97
+ "scss",
98
+ "sass",
99
+ "less",
100
+ "styl",
101
+ "stylus"
102
+ ];
103
+ function createSourceScanPattern(extensions = DEFAULT_SOURCE_SCAN_EXTENSIONS) {
104
+ return `**/*.{${extensions.join(",")}}`;
105
+ }
106
+ createSourceScanPattern(FULL_SOURCE_SCAN_EXTENSIONS);
107
+ new RegExp(`\\.(?:${FULL_SOURCE_SCAN_EXTENSIONS.map((extension) => extension.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|")})$`);
108
+ //#endregion
47
109
  //#region src/utils/object.ts
48
110
  function definedEntries(value) {
49
111
  return Object.entries(value).filter(([, item]) => item !== void 0);
@@ -419,29 +481,6 @@ function createTailwindV3DefaultColorThemeCss() {
419
481
  " margin: auto;",
420
482
  "}"
421
483
  ].join("\n");
422
- //#endregion
423
- //#region src/tailwindcss/source-scan.ts
424
- const DEFAULT_SOURCE_SCAN_EXTENSIONS = [
425
- "html",
426
- "wxml",
427
- "axml",
428
- "jxml",
429
- "ksml",
430
- "ttml",
431
- "qml",
432
- "tyml",
433
- "xhsml",
434
- "swan",
435
- "vue",
436
- "mpx",
437
- "js",
438
- "jsx",
439
- "ts",
440
- "tsx"
441
- ];
442
- function createSourceScanPattern(extensions = DEFAULT_SOURCE_SCAN_EXTENSIONS) {
443
- return `**/*.{${extensions.join(",")}}`;
444
- }
445
484
  createStyleHandler({
446
485
  cssChildCombinatorReplaceValue: ["view", "text"],
447
486
  cssRemoveHoverPseudoClass: true,
@@ -453,43 +492,6 @@ createStyleHandler({
453
492
  "@tailwind components;",
454
493
  "@tailwind utilities;"
455
494
  ].join("\n");
456
- createSourceScanPattern([
457
- "js",
458
- "jsx",
459
- "mjs",
460
- "cjs",
461
- "ts",
462
- "tsx",
463
- "mts",
464
- "cts",
465
- "vue",
466
- "uvue",
467
- "nvue",
468
- "svelte",
469
- "mpx",
470
- "html",
471
- "wxml",
472
- "axml",
473
- "jxml",
474
- "ksml",
475
- "ttml",
476
- "qml",
477
- "tyml",
478
- "xhsml",
479
- "swan",
480
- "css",
481
- "wxss",
482
- "acss",
483
- "jxss",
484
- "ttss",
485
- "qss",
486
- "tyss",
487
- "scss",
488
- "sass",
489
- "less",
490
- "styl",
491
- "stylus"
492
- ]);
493
495
  createDebug("[tailwindcss:runtime-patch] ");
494
496
  createRequire(import.meta.url);
495
497
  createDebug("[tailwindcss:runtime] ");
package/dist/core.js CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("./chunk-8l464Juk.js");
3
- const require_precheck = require("./precheck-CfyWVL3l.js");
3
+ const require_precheck = require("./precheck-CTRQCNuH.js");
4
4
  let _weapp_tailwindcss_shared = require("@weapp-tailwindcss/shared");
5
5
  //#region src/core.ts
6
6
  const DEFAULT_MAIN_CHUNK_STYLE_OPTIONS = Object.freeze({ isMainChunk: true });
package/dist/core.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as ensureRuntimeClassSet, g as createTailwindRuntimeReadyPromise, n as getCompilerContext, t as shouldSkipJsTransform } from "./precheck-CL0BmEi5.mjs";
1
+ import { _ as ensureRuntimeClassSet, g as createTailwindRuntimeReadyPromise, n as getCompilerContext, t as shouldSkipJsTransform } from "./precheck-Bbcmh24Z.mjs";
2
2
  import { defuOverrideArray } from "@weapp-tailwindcss/shared";
3
3
  //#region src/core.ts
4
4
  const DEFAULT_MAIN_CHUNK_STYLE_OPTIONS = Object.freeze({ isMainChunk: true });
@@ -1,4 +1,4 @@
1
- const require_v3_engine = require("./v3-engine-B1AJfKB1.js");
1
+ const require_v3_engine = require("./v3-engine-DpaX1FqH.js");
2
2
  //#region src/generator/options.ts
3
3
  function normalizeWeappTailwindcssGeneratorOptions(options) {
4
4
  if (options == null) return {
@@ -1,4 +1,4 @@
1
- import { C as createTailwindV4Engine, i as createTailwindV3Engine, n as resolveTailwindV3SourceFromPatcher, x as resolveTailwindV4SourceFromPatcher } from "./v3-engine-BBvwlLWp.mjs";
1
+ import { C as createTailwindV4Engine, i as createTailwindV3Engine, n as resolveTailwindV3SourceFromPatcher, x as resolveTailwindV4SourceFromPatcher } from "./v3-engine-DHsPM4ye.mjs";
2
2
  //#region src/generator/options.ts
3
3
  function normalizeWeappTailwindcssGeneratorOptions(options) {
4
4
  if (options == null) return {
package/dist/generator.js CHANGED
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("./chunk-8l464Juk.js");
3
- const require_v3_engine = require("./v3-engine-B1AJfKB1.js");
4
- const require_generator = require("./generator-BTf14-zB.js");
3
+ const require_v3_engine = require("./v3-engine-DpaX1FqH.js");
4
+ const require_generator = require("./generator-CQ8A3YVm.js");
5
5
  let tailwindcss_patch = require("tailwindcss-patch");
6
6
  exports.createWeappTailwindcssGenerator = require_generator.createWeappTailwindcssGenerator;
7
7
  exports.createWeappTailwindcssGeneratorFromPatcher = require_generator.createWeappTailwindcssGeneratorFromPatcher;
@@ -1,3 +1,3 @@
1
- import { S as resolveTailwindV4SourceOptionsFromPatcher, T as transformTailwindV4CssToWeapp, a as transformTailwindV3CssByTarget, b as resolveTailwindV4SourceFromPatchOptions, n as resolveTailwindV3SourceFromPatcher, o as transformTailwindV3CssToWeapp, r as resolveTailwindV3SourceOptionsFromPatcher, t as resolveTailwindV3Source, w as transformTailwindV4CssByTarget, x as resolveTailwindV4SourceFromPatcher, y as resolveTailwindV4Source } from "./v3-engine-BBvwlLWp.mjs";
2
- import { i as normalizeWeappTailwindcssGeneratorOptions, n as createWeappTailwindcssGeneratorFromPatcher, r as resolveTailwindSourceFromPatcher, t as createWeappTailwindcssGenerator } from "./generator-BjB20Esq.mjs";
1
+ import { S as resolveTailwindV4SourceOptionsFromPatcher, T as transformTailwindV4CssToWeapp, a as transformTailwindV3CssByTarget, b as resolveTailwindV4SourceFromPatchOptions, n as resolveTailwindV3SourceFromPatcher, o as transformTailwindV3CssToWeapp, r as resolveTailwindV3SourceOptionsFromPatcher, t as resolveTailwindV3Source, w as transformTailwindV4CssByTarget, x as resolveTailwindV4SourceFromPatcher, y as resolveTailwindV4Source } from "./v3-engine-DHsPM4ye.mjs";
2
+ import { i as normalizeWeappTailwindcssGeneratorOptions, n as createWeappTailwindcssGeneratorFromPatcher, r as resolveTailwindSourceFromPatcher, t as createWeappTailwindcssGenerator } from "./generator-CbjnpVed.mjs";
3
3
  export { createWeappTailwindcssGenerator, createWeappTailwindcssGeneratorFromPatcher, normalizeWeappTailwindcssGeneratorOptions, resolveTailwindSourceFromPatcher, resolveTailwindV3Source, resolveTailwindV3SourceFromPatcher, resolveTailwindV3SourceOptionsFromPatcher, resolveTailwindV4Source, resolveTailwindV4SourceFromPatchOptions, resolveTailwindV4SourceFromPatcher, resolveTailwindV4SourceOptionsFromPatcher, transformTailwindV3CssByTarget, transformTailwindV3CssToWeapp, transformTailwindV4CssByTarget, transformTailwindV4CssToWeapp };
package/dist/gulp.js CHANGED
@@ -1,10 +1,10 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("./chunk-8l464Juk.js");
3
- const require_v3_engine = require("./v3-engine-B1AJfKB1.js");
4
- const require_incremental_runtime_class_set = require("./incremental-runtime-class-set-DtYQ57bs.js");
5
- const require_precheck = require("./precheck-CfyWVL3l.js");
6
- const require_tailwindcss = require("./tailwindcss-CSdlV4y2.js");
7
- const require_source_candidates = require("./source-candidates-bTqXER8H.js");
3
+ const require_v3_engine = require("./v3-engine-DpaX1FqH.js");
4
+ const require_incremental_runtime_class_set = require("./incremental-runtime-class-set-BMo8s7do.js");
5
+ const require_precheck = require("./precheck-CTRQCNuH.js");
6
+ const require_tailwindcss = require("./tailwindcss-DO30H8ux.js");
7
+ const require_source_candidates = require("./source-candidates-CVp7TQFL.js");
8
8
  let node_fs = require("node:fs");
9
9
  node_fs = require_chunk.__toESM(node_fs);
10
10
  let node_path = require("node:path");
package/dist/gulp.mjs CHANGED
@@ -1,8 +1,8 @@
1
- import { F as createDebug, _ as resolveViteSourceScanEntries, l as getRuntimeClassSetSignature } from "./v3-engine-BBvwlLWp.mjs";
2
- import { i as generateCssByGenerator, l as normalizeTailwindSourceForGenerator, o as processCachedTask, r as emitHmrTiming, s as hasTailwindRootDirectives, t as createBundleRuntimeClassSetManager } from "./incremental-runtime-class-set-Dten3guT.mjs";
3
- import { _ as ensureRuntimeClassSet, g as createTailwindRuntimeReadyPromise, n as getCompilerContext, t as shouldSkipJsTransform } from "./precheck-CL0BmEi5.mjs";
4
- import { c as upsertTailwindV4CssSource, s as hasConfiguredTailwindV4CssRoots } from "./tailwindcss-CJ487R7-.mjs";
5
- import { t as createSourceCandidateCollector } from "./source-candidates-D9iHMeLE.mjs";
1
+ import { V as createDebug, _ as resolveViteSourceScanEntries, l as getRuntimeClassSetSignature } from "./v3-engine-DHsPM4ye.mjs";
2
+ import { i as generateCssByGenerator, l as normalizeTailwindSourceForGenerator, o as processCachedTask, r as emitHmrTiming, s as hasTailwindRootDirectives, t as createBundleRuntimeClassSetManager } from "./incremental-runtime-class-set-Cwq1Wbo2.mjs";
3
+ import { _ as ensureRuntimeClassSet, g as createTailwindRuntimeReadyPromise, n as getCompilerContext, t as shouldSkipJsTransform } from "./precheck-Bbcmh24Z.mjs";
4
+ import { c as upsertTailwindV4CssSource, s as hasConfiguredTailwindV4CssRoots } from "./tailwindcss-P0OQvEif.mjs";
5
+ import { t as createSourceCandidateCollector } from "./source-candidates-B3NL91dO.mjs";
6
6
  import fs from "node:fs";
7
7
  import path from "node:path";
8
8
  import process from "node:process";