weapp-tailwindcss 4.8.12 → 4.8.13

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 (48) hide show
  1. package/dist/{chunk-WIET7TXZ.js → chunk-3S6VRBOM.js} +5 -5
  2. package/dist/{chunk-HHSKDU3Z.mjs → chunk-3VIPMWAG.mjs} +22 -24
  3. package/dist/{chunk-4H3RCNUP.mjs → chunk-4E2U7YIQ.mjs} +2 -2
  4. package/dist/{chunk-XSRP6OF5.mjs → chunk-7MREZHFO.mjs} +2 -2
  5. package/dist/{chunk-WILVISNS.js → chunk-B7643BFR.js} +28 -28
  6. package/dist/{chunk-243FNJFQ.js → chunk-BLTNVVBH.js} +7 -7
  7. package/dist/{chunk-AVUQQ4GH.mjs → chunk-CSDB62E5.mjs} +4 -4
  8. package/dist/{chunk-AVR4TFX3.js → chunk-G4UFQ3CK.js} +7 -7
  9. package/dist/{chunk-ZADOXTZC.js → chunk-J4MI4EJO.js} +16 -18
  10. package/dist/{chunk-HMFOJPZG.mjs → chunk-JSV4IYLL.mjs} +2 -2
  11. package/dist/{chunk-A5JYBYB2.js → chunk-MB4BR57E.js} +1 -1
  12. package/dist/{chunk-6LYLDH5F.mjs → chunk-OPA2EYQV.mjs} +1 -1
  13. package/dist/{chunk-MDZGOZZP.mjs → chunk-SM5V25IN.mjs} +1 -1
  14. package/dist/{chunk-ZSI6C3R4.js → chunk-U6O2TOS7.js} +22 -22
  15. package/dist/{chunk-K2Y3FXU7.mjs → chunk-WHELJMZL.mjs} +2 -2
  16. package/dist/{chunk-CGCWO2U6.js → chunk-XX7SUSE7.js} +6 -6
  17. package/dist/{chunk-3DQN7M5U.js → chunk-Z6E242OH.js} +2 -2
  18. package/dist/cli.js +39 -39
  19. package/dist/cli.mjs +3 -3
  20. package/dist/core.js +10 -10
  21. package/dist/core.mjs +4 -4
  22. package/dist/css-macro/postcss.js +1 -1
  23. package/dist/css-macro/postcss.mjs +1 -1
  24. package/dist/css-macro.js +1 -1
  25. package/dist/css-macro.mjs +1 -1
  26. package/dist/defaults.js +1 -1
  27. package/dist/defaults.mjs +1 -1
  28. package/dist/gulp.js +6 -6
  29. package/dist/gulp.mjs +5 -5
  30. package/dist/index.js +10 -10
  31. package/dist/index.mjs +8 -8
  32. package/dist/postcss-html-transform.js +1 -1
  33. package/dist/postcss-html-transform.mjs +1 -1
  34. package/dist/presets.d.mts +14 -10
  35. package/dist/presets.d.ts +14 -10
  36. package/dist/presets.js +68 -64
  37. package/dist/presets.mjs +69 -65
  38. package/dist/reset.js +1 -1
  39. package/dist/reset.mjs +1 -1
  40. package/dist/types.js +1 -1
  41. package/dist/types.mjs +1 -1
  42. package/dist/vite.js +7 -7
  43. package/dist/vite.mjs +5 -5
  44. package/dist/webpack.js +8 -8
  45. package/dist/webpack.mjs +6 -6
  46. package/dist/webpack4.js +31 -31
  47. package/dist/webpack4.mjs +5 -5
  48. package/package.json +5 -5
@@ -1,22 +1,22 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunk243FNJFQjs = require('./chunk-243FNJFQ.js');
4
+ var _chunkBLTNVVBHjs = require('./chunk-BLTNVVBH.js');
5
5
 
6
6
 
7
- var _chunkZADOXTZCjs = require('./chunk-ZADOXTZC.js');
7
+ var _chunkJ4MI4EJOjs = require('./chunk-J4MI4EJO.js');
8
8
 
9
9
  // src/tailwindcss/recorder.ts
10
10
  function setupPatchRecorder(patcher, baseDir, options) {
11
- const recorder = _chunk243FNJFQjs.createPatchTargetRecorder.call(void 0, baseDir, patcher, options);
11
+ const recorder = _chunkBLTNVVBHjs.createPatchTargetRecorder.call(void 0, baseDir, patcher, options);
12
12
  if (_optionalChain([recorder, 'optionalAccess', _ => _.message]) && _optionalChain([options, 'optionalAccess', _2 => _2.logMessage]) !== false) {
13
13
  const prefix = _optionalChain([options, 'optionalAccess', _3 => _3.messagePrefix]) ? `${options.messagePrefix} ` : "";
14
- _chunkZADOXTZCjs.logger.info("%s%s", prefix, recorder.message);
14
+ _chunkJ4MI4EJOjs.logger.info("%s%s", prefix, recorder.message);
15
15
  }
16
16
  const onPatchCompleted = _optionalChain([recorder, 'optionalAccess', _4 => _4.onPatched]) ? async () => {
17
17
  await recorder.onPatched();
18
18
  } : void 0;
19
- const patchPromise = patcher ? _chunk243FNJFQjs.createTailwindPatchPromise.call(void 0, patcher, onPatchCompleted) : Promise.resolve();
19
+ const patchPromise = patcher ? _chunkBLTNVVBHjs.createTailwindPatchPromise.call(void 0, patcher, onPatchCompleted) : Promise.resolve();
20
20
  return {
21
21
  recorder,
22
22
  patchPromise,
@@ -2,13 +2,8 @@ import {
2
2
  defuOverrideArray
3
3
  } from "./chunk-ZNKIYZRQ.mjs";
4
4
 
5
- // src/context/tailwindcss.ts
6
- import { existsSync as existsSync3, readFileSync as readFileSync2 } from "fs";
7
- import { createRequire as createRequire2 } from "module";
8
- import path4 from "path";
9
- import process2 from "process";
10
- import { fileURLToPath as fileURLToPath2 } from "url";
11
- import { logger as logger4 } from "@weapp-tailwindcss/logger";
5
+ // src/logger/index.ts
6
+ import { logger } from "@weapp-tailwindcss/logger";
12
7
 
13
8
  // src/context/workspace.ts
14
9
  import { existsSync, readdirSync, readFileSync } from "fs";
@@ -95,7 +90,7 @@ function findWorkspacePackageDir(rootDir, packageName) {
95
90
  }
96
91
 
97
92
  // src/tailwindcss/v4/config.ts
98
- import { logger } from "@weapp-tailwindcss/logger";
93
+ import { logger as logger2 } from "@weapp-tailwindcss/logger";
99
94
  var DEFAULT_CSS_CALC_CUSTOM_PROPERTIES = [];
100
95
  function includesToken(list, token) {
101
96
  return list.some((candidate) => {
@@ -189,7 +184,7 @@ function warnMissingCssEntries(ctx, patcher) {
189
184
  return;
190
185
  }
191
186
  hasWarnedMissingCssEntries = true;
192
- logger.warn(
187
+ logger2.warn(
193
188
  '[tailwindcss@4] \u672A\u68C0\u6D4B\u5230 cssEntries \u914D\u7F6E\u3002\u8BF7\u4F20\u5165\u5305\u542B tailwindcss \u5F15\u7528\u7684 CSS \u7EDD\u5BF9\u8DEF\u5F84\uFF0C\u4F8B\u5982 cssEntries: ["/absolute/path/to/src/app.css"]\uFF0C\u5426\u5219 tailwindcss \u751F\u6210\u7684\u7C7B\u540D\u4E0D\u4F1A\u53C2\u4E0E\u8F6C\u8BD1\u3002'
194
189
  );
195
190
  }
@@ -203,7 +198,7 @@ function applyV4CssCalcDefaults(cssCalc, patcher) {
203
198
 
204
199
  // src/tailwindcss/v4/patcher.ts
205
200
  import path3 from "path";
206
- import { logger as logger3 } from "@weapp-tailwindcss/logger";
201
+ import { logger as logger4 } from "@weapp-tailwindcss/logger";
207
202
 
208
203
  // src/tailwindcss/patcher.ts
209
204
  import { existsSync as existsSync2 } from "fs";
@@ -211,7 +206,7 @@ import { createRequire } from "module";
211
206
  import path2 from "path";
212
207
  import process from "process";
213
208
  import { fileURLToPath } from "url";
214
- import { logger as logger2 } from "@weapp-tailwindcss/logger";
209
+ import { logger as logger3 } from "@weapp-tailwindcss/logger";
215
210
  import { defuOverrideArray as defuOverrideArray2 } from "@weapp-tailwindcss/shared";
216
211
  import { TailwindcssPatcher } from "tailwindcss-patch";
217
212
  var GENERIC_RELATIVE_SPECIFIERS = [".", ".."];
@@ -495,7 +490,7 @@ function createTailwindcssPatcher(options) {
495
490
  ...existingResolve,
496
491
  paths: Array.from(new Set(sourcePaths))
497
492
  };
498
- logger2.debug("Tailwind resolve config %O", {
493
+ logger3.debug("Tailwind resolve config %O", {
499
494
  packageName: resolvedOptions.tailwind.packageName,
500
495
  version: resolvedOptions.tailwind.version,
501
496
  resolve: resolvedOptions.tailwind.resolve,
@@ -542,13 +537,13 @@ function createTailwindcssPatcher(options) {
542
537
  const searchPaths = resolvedOptions.tailwind?.resolve?.paths;
543
538
  if (error instanceof Error && /tailwindcss not found/i.test(error.message)) {
544
539
  if (!hasLoggedMissingTailwind) {
545
- logger2.warn("Tailwind CSS \u672A\u5B89\u88C5\uFF0C\u5DF2\u8DF3\u8FC7 Tailwind \u76F8\u5173\u8865\u4E01\u3002\u82E5\u9700\u4F7F\u7528 Tailwind \u80FD\u529B\uFF0C\u8BF7\u5B89\u88C5 tailwindcss\u3002");
540
+ logger3.warn("Tailwind CSS \u672A\u5B89\u88C5\uFF0C\u5DF2\u8DF3\u8FC7 Tailwind \u76F8\u5173\u8865\u4E01\u3002\u82E5\u9700\u4F7F\u7528 Tailwind \u80FD\u529B\uFF0C\u8BF7\u5B89\u88C5 tailwindcss\u3002");
546
541
  hasLoggedMissingTailwind = true;
547
542
  }
548
543
  return createFallbackTailwindcssPatcher();
549
544
  }
550
545
  if (error instanceof Error && /unable to locate tailwind css package/i.test(error.message)) {
551
- logger2.error('\u65E0\u6CD5\u5B9A\u4F4D Tailwind CSS \u5305 "%s"\uFF0C\u5DF2\u5C1D\u8BD5\u8DEF\u5F84: %O', resolvedOptions.tailwind?.packageName, searchPaths);
546
+ logger3.error('\u65E0\u6CD5\u5B9A\u4F4D Tailwind CSS \u5305 "%s"\uFF0C\u5DF2\u5C1D\u8BD5\u8DEF\u5F84: %O', resolvedOptions.tailwind?.packageName, searchPaths);
552
547
  }
553
548
  throw error;
554
549
  }
@@ -849,7 +844,7 @@ function tryCreateMultiTailwindcssPatcher(groups, options) {
849
844
  if (groups.size <= 1) {
850
845
  return void 0;
851
846
  }
852
- logger3.debug("detected multiple Tailwind CSS entry bases: %O", [...groups.keys()]);
847
+ logger4.debug("detected multiple Tailwind CSS entry bases: %O", [...groups.keys()]);
853
848
  const patchers = [];
854
849
  for (const [baseDir, entries] of groups) {
855
850
  patchers.push(createPatcherForBase(baseDir, entries, options));
@@ -858,6 +853,12 @@ function tryCreateMultiTailwindcssPatcher(groups, options) {
858
853
  }
859
854
 
860
855
  // src/context/tailwindcss.ts
856
+ import { existsSync as existsSync3, readFileSync as readFileSync2 } from "fs";
857
+ import { createRequire as createRequire2 } from "module";
858
+ import path4 from "path";
859
+ import process2 from "process";
860
+ import { fileURLToPath as fileURLToPath2 } from "url";
861
+ import { logger as logger5 } from "@weapp-tailwindcss/logger";
861
862
  var ENV_BASEDIR_KEYS = [
862
863
  "WEAPP_TAILWINDCSS_BASEDIR",
863
864
  "WEAPP_TAILWINDCSS_BASE_DIR",
@@ -900,7 +901,7 @@ function detectCallerBasedir() {
900
901
  return void 0;
901
902
  }
902
903
  if (process2.env.WEAPP_TW_DEBUG_STACK === "1") {
903
- logger4.debug("caller stack: %s", stack);
904
+ logger5.debug("caller stack: %s", stack);
904
905
  }
905
906
  const lines = stack.split("\n");
906
907
  for (const line of lines) {
@@ -945,7 +946,7 @@ function resolveTailwindcssBasedir(basedir, fallback) {
945
946
  const anchor = envBasedir ?? packageEnvBasedir ?? fallback ?? callerBasedir ?? cwd;
946
947
  const resolveRelative = (value) => path4.isAbsolute(value) ? path4.normalize(value) : path4.normalize(path4.resolve(anchor, value));
947
948
  if (process2.env.WEAPP_TW_DEBUG_STACK === "1") {
948
- logger4.debug("resolveTailwindcssBasedir anchor %O", {
949
+ logger5.debug("resolveTailwindcssBasedir anchor %O", {
949
950
  basedir,
950
951
  envBasedir,
951
952
  envBasedirKey,
@@ -983,12 +984,12 @@ function resolveTailwindcssBasedir(basedir, fallback) {
983
984
  const anchorRequire = createRequire2(path4.join(anchor, "__resolve_tailwindcss_basedir__.cjs"));
984
985
  const packageJsonPath = anchorRequire.resolve(`${packageName}/package.json`);
985
986
  if (process2.env.WEAPP_TW_DEBUG_STACK === "1") {
986
- logger4.debug("package basedir resolved from PNPM_PACKAGE_NAME: %s", packageJsonPath);
987
+ logger5.debug("package basedir resolved from PNPM_PACKAGE_NAME: %s", packageJsonPath);
987
988
  }
988
989
  return path4.normalize(path4.dirname(packageJsonPath));
989
990
  } catch {
990
991
  if (process2.env.WEAPP_TW_DEBUG_STACK === "1") {
991
- logger4.debug("failed to resolve package json for %s", packageName);
992
+ logger5.debug("failed to resolve package json for %s", packageName);
992
993
  }
993
994
  const workspaceRoot = findWorkspaceRoot(anchor);
994
995
  if (workspaceRoot) {
@@ -1076,7 +1077,7 @@ function createTailwindcssPatcherFromContext(ctx) {
1076
1077
  const absoluteCssEntryBasedir = guessBasedirFromEntries(rawCssEntries);
1077
1078
  const resolvedTailwindcssBasedir = resolveTailwindcssBasedir(tailwindcssBasedir, absoluteCssEntryBasedir);
1078
1079
  ctx.tailwindcssBasedir = resolvedTailwindcssBasedir;
1079
- logger4.debug("tailwindcss basedir resolved: %s", resolvedTailwindcssBasedir);
1080
+ logger5.debug("tailwindcss basedir resolved: %s", resolvedTailwindcssBasedir);
1080
1081
  let normalizedCssEntries = normalizeCssEntries(rawCssEntries, resolvedTailwindcssBasedir);
1081
1082
  if (!normalizedCssEntries) {
1082
1083
  normalizedCssEntries = detectImplicitCssEntries(ctx.appType, resolvedTailwindcssBasedir);
@@ -1114,9 +1115,6 @@ function createTailwindcssPatcherFromContext(ctx) {
1114
1115
  );
1115
1116
  }
1116
1117
 
1117
- // src/logger/index.ts
1118
- import { logger as logger5 } from "@weapp-tailwindcss/logger";
1119
-
1120
1118
  export {
1121
1119
  findWorkspaceRoot,
1122
1120
  findNearestPackageRoot,
@@ -1124,5 +1122,5 @@ export {
1124
1122
  applyV4CssCalcDefaults,
1125
1123
  resolveTailwindcssBasedir,
1126
1124
  createTailwindcssPatcherFromContext,
1127
- logger5 as logger
1125
+ logger
1128
1126
  };
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-RRHPTTCP.mjs";
12
12
  import {
13
13
  setupPatchRecorder
14
- } from "./chunk-XSRP6OF5.mjs";
14
+ } from "./chunk-7MREZHFO.mjs";
15
15
  import {
16
16
  collectRuntimeClassSet,
17
17
  createAttributeMatcher,
@@ -22,7 +22,7 @@ import {
22
22
  replaceWxml,
23
23
  toCustomAttributesEntities,
24
24
  vitePluginName
25
- } from "./chunk-K2Y3FXU7.mjs";
25
+ } from "./chunk-WHELJMZL.mjs";
26
26
  import {
27
27
  getGroupedEntries
28
28
  } from "./chunk-ZNKIYZRQ.mjs";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createPatchTargetRecorder,
3
3
  createTailwindPatchPromise
4
- } from "./chunk-K2Y3FXU7.mjs";
4
+ } from "./chunk-WHELJMZL.mjs";
5
5
  import {
6
6
  logger
7
- } from "./chunk-HHSKDU3Z.mjs";
7
+ } from "./chunk-3VIPMWAG.mjs";
8
8
 
9
9
  // src/tailwindcss/recorder.ts
10
10
  function setupPatchRecorder(patcher, baseDir, options) {
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkCGCWO2U6js = require('./chunk-CGCWO2U6.js');
7
+ var _chunkXX7SUSE7js = require('./chunk-XX7SUSE7.js');
8
8
 
9
9
 
10
10
 
@@ -15,20 +15,20 @@ var _chunkCGCWO2U6js = require('./chunk-CGCWO2U6.js');
15
15
 
16
16
 
17
17
 
18
- var _chunk3DQN7M5Ujs = require('./chunk-3DQN7M5U.js');
18
+ var _chunkZ6E242OHjs = require('./chunk-Z6E242OH.js');
19
19
 
20
20
 
21
21
  var _chunkLTJQUORKjs = require('./chunk-LTJQUORK.js');
22
22
 
23
23
 
24
- var _chunkWIET7TXZjs = require('./chunk-WIET7TXZ.js');
24
+ var _chunk3S6VRBOMjs = require('./chunk-3S6VRBOM.js');
25
25
 
26
26
 
27
27
 
28
28
 
29
29
 
30
30
 
31
- var _chunk243FNJFQjs = require('./chunk-243FNJFQ.js');
31
+ var _chunkBLTNVVBHjs = require('./chunk-BLTNVVBH.js');
32
32
 
33
33
 
34
34
  var _chunkUW3WHSZ5js = require('./chunk-UW3WHSZ5.js');
@@ -37,11 +37,11 @@ var _chunkUW3WHSZ5js = require('./chunk-UW3WHSZ5.js');
37
37
  var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
38
38
  var _path = require('path'); var _path2 = _interopRequireDefault(_path);
39
39
  var _process = require('process'); var _process2 = _interopRequireDefault(_process);
40
- var debug = _chunk243FNJFQjs.createDebug.call(void 0, );
41
- var weappTailwindcssPackageDir = _chunk3DQN7M5Ujs.resolvePackageDir.call(void 0, "weapp-tailwindcss");
40
+ var debug = _chunkBLTNVVBHjs.createDebug.call(void 0, );
41
+ var weappTailwindcssPackageDir = _chunkZ6E242OHjs.resolvePackageDir.call(void 0, "weapp-tailwindcss");
42
42
  var UnifiedWebpackPluginV5 = class {
43
43
  constructor(options = {}) {
44
- this.options = _chunk243FNJFQjs.getCompilerContext.call(void 0, options);
44
+ this.options = _chunkBLTNVVBHjs.getCompilerContext.call(void 0, options);
45
45
  this.appType = this.options.appType;
46
46
  }
47
47
  apply(compiler) {
@@ -67,16 +67,16 @@ var UnifiedWebpackPluginV5 = class {
67
67
  }
68
68
  const isTailwindcssV4 = (_nullishCoalesce(initialTwPatcher.majorVersion, () => ( 0))) >= 4;
69
69
  const shouldRewriteCssImports = isTailwindcssV4 && this.options.rewriteCssImports !== false;
70
- const isMpxApp = _chunk3DQN7M5Ujs.isMpx.call(void 0, this.appType);
70
+ const isMpxApp = _chunkZ6E242OHjs.isMpx.call(void 0, this.appType);
71
71
  if (shouldRewriteCssImports) {
72
- _chunkCGCWO2U6js.applyTailwindcssCssImportRewrite.call(void 0, compiler, {
72
+ _chunkXX7SUSE7js.applyTailwindcssCssImportRewrite.call(void 0, compiler, {
73
73
  pkgDir: weappTailwindcssPackageDir,
74
74
  enabled: true,
75
75
  appType: this.appType
76
76
  });
77
- _chunk3DQN7M5Ujs.setupMpxTailwindcssRedirect.call(void 0, weappTailwindcssPackageDir, isMpxApp);
77
+ _chunkZ6E242OHjs.setupMpxTailwindcssRedirect.call(void 0, weappTailwindcssPackageDir, isMpxApp);
78
78
  }
79
- const patchRecorderState = _chunkWIET7TXZjs.setupPatchRecorder.call(void 0, initialTwPatcher, this.options.tailwindcssBasedir, {
79
+ const patchRecorderState = _chunk3S6VRBOMjs.setupPatchRecorder.call(void 0, initialTwPatcher, this.options.tailwindcssBasedir, {
80
80
  source: "runtime",
81
81
  cwd: _nullishCoalesce(this.options.tailwindcssBasedir, () => ( _process2.default.cwd()))
82
82
  });
@@ -87,14 +87,14 @@ var UnifiedWebpackPluginV5 = class {
87
87
  onPatchCompleted: patchRecorderState.onPatchCompleted
88
88
  };
89
89
  const refreshRuntimeState = async (force) => {
90
- await _chunk243FNJFQjs.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
90
+ await _chunkBLTNVVBHjs.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
91
91
  };
92
92
  const { Compilation, sources, NormalModule } = compiler.webpack;
93
93
  const { ConcatSource } = sources;
94
94
  async function getClassSetInLoader() {
95
95
  await refreshRuntimeState(true);
96
96
  await runtimeState.patchPromise;
97
- await _chunk243FNJFQjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
97
+ await _chunkBLTNVVBHjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
98
98
  }
99
99
  const runtimeClassSetLoader = _nullishCoalesce(runtimeLoaderPath, () => ( _path2.default.resolve(__dirname, "./weapp-tw-runtime-classset-loader.js")));
100
100
  const runtimeCssImportRewriteLoader = shouldRewriteCssImports ? _nullishCoalesce(runtimeCssImportRewriteLoaderPath, () => ( _path2.default.resolve(__dirname, "./weapp-tw-css-import-rewrite-loader.js"))) : void 0;
@@ -107,16 +107,16 @@ var UnifiedWebpackPluginV5 = class {
107
107
  const classSetLoaderOptions = {
108
108
  getClassSet: getClassSetInLoader
109
109
  };
110
- const { findRewriteAnchor, findClassSetAnchor } = _chunkCGCWO2U6js.createLoaderAnchorFinders.call(void 0, this.appType);
110
+ const { findRewriteAnchor, findClassSetAnchor } = _chunkXX7SUSE7js.createLoaderAnchorFinders.call(void 0, this.appType);
111
111
  const cssImportRewriteLoaderOptions = runtimeLoaderRewriteOptions ? {
112
112
  rewriteCssImports: runtimeLoaderRewriteOptions
113
113
  } : void 0;
114
114
  onLoad();
115
115
  if (shouldRewriteCssImports && isMpxApp) {
116
- _chunk3DQN7M5Ujs.ensureMpxTailwindcssAliases.call(void 0, compiler, weappTailwindcssPackageDir);
116
+ _chunkZ6E242OHjs.ensureMpxTailwindcssAliases.call(void 0, compiler, weappTailwindcssPackageDir);
117
117
  }
118
118
  if (runtimeCssImportRewriteLoader && shouldRewriteCssImports && cssImportRewriteLoaderOptions && isMpxApp) {
119
- _chunk3DQN7M5Ujs.injectMpxCssRewritePreRules.call(void 0, compiler, runtimeCssImportRewriteLoader, cssImportRewriteLoaderOptions);
119
+ _chunkZ6E242OHjs.injectMpxCssRewritePreRules.call(void 0, compiler, runtimeCssImportRewriteLoader, cssImportRewriteLoaderOptions);
120
120
  }
121
121
  const createRuntimeClassSetLoaderEntry = () => ({
122
122
  loader: runtimeClassSetLoader,
@@ -135,17 +135,17 @@ var UnifiedWebpackPluginV5 = class {
135
135
  type: null
136
136
  };
137
137
  };
138
- compiler.hooks.compilation.tap(_chunk243FNJFQjs.pluginName, (compilation) => {
139
- NormalModule.getCompilationHooks(compilation).loader.tap(_chunk243FNJFQjs.pluginName, (_loaderContext, module) => {
138
+ compiler.hooks.compilation.tap(_chunkBLTNVVBHjs.pluginName, (compilation) => {
139
+ NormalModule.getCompilationHooks(compilation).loader.tap(_chunkBLTNVVBHjs.pluginName, (_loaderContext, module) => {
140
140
  const hasRuntimeLoader = runtimeClassSetLoaderExists || runtimeCssImportRewriteLoaderExists;
141
141
  if (!hasRuntimeLoader) {
142
142
  return;
143
143
  }
144
- _chunk3DQN7M5Ujs.patchMpxLoaderResolve.call(void 0, _loaderContext, weappTailwindcssPackageDir, shouldRewriteCssImports && isMpxApp);
144
+ _chunkZ6E242OHjs.patchMpxLoaderResolve.call(void 0, _loaderContext, weappTailwindcssPackageDir, shouldRewriteCssImports && isMpxApp);
145
145
  const loaderEntries = module.loaders || [];
146
146
  let rewriteAnchorIdx = findRewriteAnchor(loaderEntries);
147
147
  const classSetAnchorIdx = findClassSetAnchor(loaderEntries);
148
- const isCssModule = _chunkCGCWO2U6js.isCssLikeModuleResource.call(void 0, module.resource, this.options.cssMatcher, this.appType);
148
+ const isCssModule = _chunkXX7SUSE7js.isCssLikeModuleResource.call(void 0, module.resource, this.options.cssMatcher, this.appType);
149
149
  if (_process2.default.env.WEAPP_TW_LOADER_DEBUG && isCssModule) {
150
150
  debug("loader hook css module: %s loaders=%o anchors=%o", module.resource, loaderEntries.map((x) => x.loader), { rewriteAnchorIdx, classSetAnchorIdx });
151
151
  }
@@ -177,7 +177,7 @@ var UnifiedWebpackPluginV5 = class {
177
177
  rewriteAnchorIdx = findRewriteAnchor(loaderEntries);
178
178
  }
179
179
  }
180
- if (runtimeClassSetLoaderExists && !_chunkCGCWO2U6js.hasLoaderEntry.call(void 0, loaderEntries, runtimeClassSetLoader)) {
180
+ if (runtimeClassSetLoaderExists && !_chunkXX7SUSE7js.hasLoaderEntry.call(void 0, loaderEntries, runtimeClassSetLoader)) {
181
181
  const classSetLoaderEntry = createRuntimeClassSetLoaderEntry();
182
182
  const anchorIndex = findClassSetAnchor(loaderEntries);
183
183
  if (anchorIndex === -1) {
@@ -190,7 +190,7 @@ var UnifiedWebpackPluginV5 = class {
190
190
  });
191
191
  compilation.hooks.processAssets.tapPromise(
192
192
  {
193
- name: _chunk243FNJFQjs.pluginName,
193
+ name: _chunkBLTNVVBHjs.pluginName,
194
194
  stage: Compilation.PROCESS_ASSETS_STAGE_SUMMARIZE
195
195
  },
196
196
  async (assets) => {
@@ -208,13 +208,13 @@ var UnifiedWebpackPluginV5 = class {
208
208
  const jsAssets = /* @__PURE__ */ new Map();
209
209
  for (const [file] of entries) {
210
210
  if (this.options.jsMatcher(file) || this.options.wxsMatcher(file)) {
211
- const absolute = _chunk3DQN7M5Ujs.toAbsoluteOutputPath.call(void 0, file, outputDir);
211
+ const absolute = _chunkZ6E242OHjs.toAbsoluteOutputPath.call(void 0, file, outputDir);
212
212
  jsAssets.set(absolute, file);
213
213
  }
214
214
  }
215
215
  const moduleGraphOptions = {
216
216
  resolve(specifier, importer) {
217
- return _chunk3DQN7M5Ujs.resolveOutputSpecifier.call(void 0, specifier, importer, outputDir, (candidate) => jsAssets.has(candidate));
217
+ return _chunkZ6E242OHjs.resolveOutputSpecifier.call(void 0, specifier, importer, outputDir, (candidate) => jsAssets.has(candidate));
218
218
  },
219
219
  load: (id) => {
220
220
  const assetName = jsAssets.get(id);
@@ -259,7 +259,7 @@ var UnifiedWebpackPluginV5 = class {
259
259
  const groupedEntries = _chunkUW3WHSZ5js.getGroupedEntries.call(void 0, entries, this.options);
260
260
  await refreshRuntimeState(true);
261
261
  await runtimeState.patchPromise;
262
- const runtimeSet = await _chunk243FNJFQjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
262
+ const runtimeSet = await _chunkBLTNVVBHjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
263
263
  debug("get runtimeSet, class count: %d", runtimeSet.size);
264
264
  const tasks = [];
265
265
  if (Array.isArray(groupedEntries.html)) {
@@ -296,12 +296,12 @@ var UnifiedWebpackPluginV5 = class {
296
296
  const jsTaskFactories = [];
297
297
  if (Array.isArray(groupedEntries.js)) {
298
298
  for (const [file] of groupedEntries.js) {
299
- const cacheKey = _chunkCGCWO2U6js.getCacheKey.call(void 0, file);
299
+ const cacheKey = _chunkXX7SUSE7js.getCacheKey.call(void 0, file);
300
300
  const asset = compilation.getAsset(file);
301
301
  if (!asset) {
302
302
  continue;
303
303
  }
304
- const absoluteFile = _chunk3DQN7M5Ujs.toAbsoluteOutputPath.call(void 0, file, outputDir);
304
+ const absoluteFile = _chunkZ6E242OHjs.toAbsoluteOutputPath.call(void 0, file, outputDir);
305
305
  const initialSource = asset.source.source();
306
306
  const initialRawSource = typeof initialSource === "string" ? initialSource : initialSource.toString();
307
307
  jsTaskFactories.push(async () => {
@@ -376,7 +376,7 @@ var UnifiedWebpackPluginV5 = class {
376
376
  );
377
377
  }
378
378
  }
379
- _chunk3DQN7M5Ujs.pushConcurrentTaskFactories.call(void 0, tasks, jsTaskFactories);
379
+ _chunkZ6E242OHjs.pushConcurrentTaskFactories.call(void 0, tasks, jsTaskFactories);
380
380
  await Promise.all(tasks);
381
381
  debug("end");
382
382
  onEnd();
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkZADOXTZCjs = require('./chunk-ZADOXTZC.js');
6
+ var _chunkJ4MI4EJOjs = require('./chunk-J4MI4EJO.js');
7
7
 
8
8
 
9
9
  var _chunk3URI7W6Xjs = require('./chunk-3URI7W6X.js');
@@ -187,7 +187,7 @@ async function collectRuntimeClassSet(twPatcher, options = {}) {
187
187
  // package.json
188
188
  var package_default = {
189
189
  name: "weapp-tailwindcss",
190
- version: "4.8.12",
190
+ version: "4.8.13",
191
191
  description: "\u628A tailwindcss \u539F\u5B50\u5316\u6837\u5F0F\u601D\u60F3\uFF0C\u5E26\u7ED9\u5C0F\u7A0B\u5E8F\u5F00\u53D1\u8005\u4EEC! bring tailwindcss to miniprogram developers!",
192
192
  author: "ice breaker <1324318532@qq.com>",
193
193
  license: "MIT",
@@ -543,7 +543,7 @@ function formatRelativeToBase(targetPath, baseDir) {
543
543
  }
544
544
  function resolveRecordLocation(baseDir) {
545
545
  const normalizedBase = _path2.default.normalize(baseDir);
546
- const packageRoot = _nullishCoalesce(_chunkZADOXTZCjs.findNearestPackageRoot.call(void 0, normalizedBase), () => ( normalizedBase));
546
+ const packageRoot = _nullishCoalesce(_chunkJ4MI4EJOjs.findNearestPackageRoot.call(void 0, normalizedBase), () => ( normalizedBase));
547
547
  const packageJsonPath = _path2.default.join(packageRoot, "package.json");
548
548
  const hasPackageJson = _fs.existsSync.call(void 0, packageJsonPath);
549
549
  const recordKeySource = hasPackageJson ? packageJsonPath : normalizedBase;
@@ -2771,15 +2771,15 @@ function createInternalCompilerContext(opts) {
2771
2771
  );
2772
2772
  ctx.escapeMap = ctx.customReplaceDictionary;
2773
2773
  applyLoggerLevel(ctx.logLevel);
2774
- const twPatcher = _chunkZADOXTZCjs.createTailwindcssPatcherFromContext.call(void 0, ctx);
2774
+ const twPatcher = _chunkJ4MI4EJOjs.createTailwindcssPatcherFromContext.call(void 0, ctx);
2775
2775
  logTailwindcssTarget("runtime", twPatcher, ctx.tailwindcssBasedir);
2776
2776
  if (_optionalChain([twPatcher, 'access', _95 => _95.packageInfo, 'optionalAccess', _96 => _96.version])) {
2777
2777
  _logger.logger.success(`\u5F53\u524D\u4F7F\u7528 ${_logger.pc.cyanBright("Tailwind CSS")} \u7248\u672C\u4E3A: ${_logger.pc.underline(_logger.pc.bold(_logger.pc.green(twPatcher.packageInfo.version)))}`);
2778
2778
  } else {
2779
2779
  _logger.logger.warn(`${_logger.pc.cyanBright("Tailwind CSS")} \u672A\u5B89\u88C5\uFF0C\u5DF2\u8DF3\u8FC7\u7248\u672C\u68C0\u6D4B\u4E0E\u8865\u4E01\u5E94\u7528\u3002`);
2780
2780
  }
2781
- _chunkZADOXTZCjs.warnMissingCssEntries.call(void 0, ctx, twPatcher);
2782
- const cssCalcOptions = _chunkZADOXTZCjs.applyV4CssCalcDefaults.call(void 0, ctx.cssCalc, twPatcher);
2781
+ _chunkJ4MI4EJOjs.warnMissingCssEntries.call(void 0, ctx, twPatcher);
2782
+ const cssCalcOptions = _chunkJ4MI4EJOjs.applyV4CssCalcDefaults.call(void 0, ctx.cssCalc, twPatcher);
2783
2783
  ctx.cssCalc = cssCalcOptions;
2784
2784
  const customAttributesEntities = toCustomAttributesEntities(ctx.customAttributes);
2785
2785
  const { styleHandler, jsHandler: jsHandler2, templateHandler } = createHandlersFromContext(
@@ -2798,7 +2798,7 @@ function createInternalCompilerContext(opts) {
2798
2798
  await clearTailwindcssPatcherCache(previousPatcher);
2799
2799
  }
2800
2800
  invalidateRuntimeClassSet(previousPatcher);
2801
- const nextPatcher = _chunkZADOXTZCjs.createTailwindcssPatcherFromContext.call(void 0, ctx);
2801
+ const nextPatcher = _chunkJ4MI4EJOjs.createTailwindcssPatcherFromContext.call(void 0, ctx);
2802
2802
  Object.assign(previousPatcher, nextPatcher);
2803
2803
  ctx.twPatcher = previousPatcher;
2804
2804
  return previousPatcher;
@@ -4,7 +4,7 @@ import {
4
4
  getCacheKey,
5
5
  hasLoaderEntry,
6
6
  isCssLikeModuleResource
7
- } from "./chunk-6LYLDH5F.mjs";
7
+ } from "./chunk-OPA2EYQV.mjs";
8
8
  import {
9
9
  ensureMpxTailwindcssAliases,
10
10
  injectMpxCssRewritePreRules,
@@ -21,20 +21,20 @@ import {
21
21
  } from "./chunk-RRHPTTCP.mjs";
22
22
  import {
23
23
  setupPatchRecorder
24
- } from "./chunk-XSRP6OF5.mjs";
24
+ } from "./chunk-7MREZHFO.mjs";
25
25
  import {
26
26
  collectRuntimeClassSet,
27
27
  createDebug,
28
28
  getCompilerContext,
29
29
  pluginName,
30
30
  refreshTailwindRuntimeState
31
- } from "./chunk-K2Y3FXU7.mjs";
31
+ } from "./chunk-WHELJMZL.mjs";
32
32
  import {
33
33
  getGroupedEntries
34
34
  } from "./chunk-ZNKIYZRQ.mjs";
35
35
  import {
36
36
  __dirname
37
- } from "./chunk-MDZGOZZP.mjs";
37
+ } from "./chunk-SM5V25IN.mjs";
38
38
 
39
39
  // src/bundlers/webpack/BaseUnifiedPlugin/v5.ts
40
40
  import fs from "fs";
@@ -3,13 +3,13 @@
3
3
  var _chunkLTJQUORKjs = require('./chunk-LTJQUORK.js');
4
4
 
5
5
 
6
- var _chunkWIET7TXZjs = require('./chunk-WIET7TXZ.js');
6
+ var _chunk3S6VRBOMjs = require('./chunk-3S6VRBOM.js');
7
7
 
8
8
 
9
9
 
10
10
 
11
11
 
12
- var _chunk243FNJFQjs = require('./chunk-243FNJFQ.js');
12
+ var _chunkBLTNVVBHjs = require('./chunk-BLTNVVBH.js');
13
13
 
14
14
  // src/bundlers/gulp/index.ts
15
15
  var _buffer = require('buffer');
@@ -17,12 +17,12 @@ var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
17
17
  var _path = require('path'); var _path2 = _interopRequireDefault(_path);
18
18
  var _process = require('process'); var _process2 = _interopRequireDefault(_process);
19
19
  var _stream = require('stream'); var _stream2 = _interopRequireDefault(_stream);
20
- var debug = _chunk243FNJFQjs.createDebug.call(void 0, );
20
+ var debug = _chunkBLTNVVBHjs.createDebug.call(void 0, );
21
21
  var Transform = _stream2.default.Transform;
22
22
  function createPlugins(options = {}) {
23
- const opts = _chunk243FNJFQjs.getCompilerContext.call(void 0, options);
23
+ const opts = _chunkBLTNVVBHjs.getCompilerContext.call(void 0, options);
24
24
  const { templateHandler, styleHandler, jsHandler, cache, twPatcher: initialTwPatcher, refreshTailwindcssPatcher } = opts;
25
- const patchRecorderState = _chunkWIET7TXZjs.setupPatchRecorder.call(void 0, initialTwPatcher, opts.tailwindcssBasedir, {
25
+ const patchRecorderState = _chunk3S6VRBOMjs.setupPatchRecorder.call(void 0, initialTwPatcher, opts.tailwindcssBasedir, {
26
26
  source: "runtime",
27
27
  cwd: _nullishCoalesce(opts.tailwindcssBasedir, () => ( _process2.default.cwd()))
28
28
  });
@@ -36,7 +36,7 @@ function createPlugins(options = {}) {
36
36
  const MODULE_EXTENSIONS = [".js", ".mjs", ".cjs", ".ts", ".tsx", ".jsx"];
37
37
  let runtimeSetInitialized = false;
38
38
  async function refreshRuntimeState(force) {
39
- await _chunk243FNJFQjs.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
39
+ await _chunkBLTNVVBHjs.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
40
40
  }
41
41
  async function refreshRuntimeSet(force = false) {
42
42
  await refreshRuntimeState(force);
@@ -44,7 +44,7 @@ function createPlugins(options = {}) {
44
44
  if (!force && runtimeSetInitialized && runtimeSet.size > 0) {
45
45
  return runtimeSet;
46
46
  }
47
- runtimeSet = await _chunk243FNJFQjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force, skipRefresh: force });
47
+ runtimeSet = await _chunkBLTNVVBHjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force, skipRefresh: force });
48
48
  runtimeSetInitialized = true;
49
49
  return runtimeSet;
50
50
  }
@@ -3,19 +3,14 @@
3
3
  var _chunkUW3WHSZ5js = require('./chunk-UW3WHSZ5.js');
4
4
 
5
5
 
6
- var _chunkA5JYBYB2js = require('./chunk-A5JYBYB2.js');
6
+ var _chunkMB4BR57Ejs = require('./chunk-MB4BR57E.js');
7
7
 
8
- // src/context/tailwindcss.ts
9
- var _fs = require('fs');
10
- var _module = require('module');
11
- var _path = require('path'); var _path2 = _interopRequireDefault(_path);
12
- var _process = require('process'); var _process2 = _interopRequireDefault(_process);
13
- var _url = require('url');
8
+ // src/logger/index.ts
14
9
  var _logger = require('@weapp-tailwindcss/logger');
15
10
 
16
11
  // src/context/workspace.ts
17
-
18
-
12
+ var _fs = require('fs');
13
+ var _path = require('path'); var _path2 = _interopRequireDefault(_path);
19
14
  var IGNORED_WORKSPACE_DIRS = /* @__PURE__ */ new Set([
20
15
  "node_modules",
21
16
  ".git",
@@ -210,10 +205,10 @@ function applyV4CssCalcDefaults(cssCalc, patcher) {
210
205
 
211
206
  // src/tailwindcss/patcher.ts
212
207
 
208
+ var _module = require('module');
213
209
 
214
-
215
-
216
-
210
+ var _process = require('process'); var _process2 = _interopRequireDefault(_process);
211
+ var _url = require('url');
217
212
 
218
213
  var _shared = require('@weapp-tailwindcss/shared');
219
214
  var _tailwindcsspatch = require('tailwindcss-patch');
@@ -239,7 +234,7 @@ function resolveModuleFromPaths(specifier, paths) {
239
234
  return void 0;
240
235
  }
241
236
  try {
242
- const req = _module.createRequire.call(void 0, _chunkA5JYBYB2js.importMetaUrl);
237
+ const req = _module.createRequire.call(void 0, _chunkMB4BR57Ejs.importMetaUrl);
243
238
  return req.resolve(specifier, { paths });
244
239
  } catch (e3) {
245
240
  return void 0;
@@ -339,11 +334,11 @@ function createDefaultResolvePaths(basedir) {
339
334
  const cwd = _process2.default.cwd();
340
335
  appendNodeModules(paths, cwd);
341
336
  try {
342
- const modulePath = _url.fileURLToPath.call(void 0, _chunkA5JYBYB2js.importMetaUrl);
337
+ const modulePath = _url.fileURLToPath.call(void 0, _chunkMB4BR57Ejs.importMetaUrl);
343
338
  const candidate = _fs.existsSync.call(void 0, modulePath) && !_path2.default.extname(modulePath) ? modulePath : _path2.default.dirname(modulePath);
344
339
  paths.add(candidate);
345
340
  } catch (e4) {
346
- paths.add(_chunkA5JYBYB2js.importMetaUrl);
341
+ paths.add(_chunkMB4BR57Ejs.importMetaUrl);
347
342
  }
348
343
  if (paths.size === 0) {
349
344
  fallbackCandidates = fallbackCandidates.filter(Boolean);
@@ -861,6 +856,12 @@ function tryCreateMultiTailwindcssPatcher(groups, options) {
861
856
  }
862
857
 
863
858
  // src/context/tailwindcss.ts
859
+
860
+
861
+
862
+
863
+
864
+
864
865
  var ENV_BASEDIR_KEYS = [
865
866
  "WEAPP_TAILWINDCSS_BASEDIR",
866
867
  "WEAPP_TAILWINDCSS_BASE_DIR",
@@ -1117,9 +1118,6 @@ function createTailwindcssPatcherFromContext(ctx) {
1117
1118
  );
1118
1119
  }
1119
1120
 
1120
- // src/logger/index.ts
1121
-
1122
-
1123
1121
 
1124
1122
 
1125
1123
 
@@ -3,13 +3,13 @@ import {
3
3
  } from "./chunk-RRHPTTCP.mjs";
4
4
  import {
5
5
  setupPatchRecorder
6
- } from "./chunk-XSRP6OF5.mjs";
6
+ } from "./chunk-7MREZHFO.mjs";
7
7
  import {
8
8
  collectRuntimeClassSet,
9
9
  createDebug,
10
10
  getCompilerContext,
11
11
  refreshTailwindRuntimeState
12
- } from "./chunk-K2Y3FXU7.mjs";
12
+ } from "./chunk-WHELJMZL.mjs";
13
13
 
14
14
  // src/bundlers/gulp/index.ts
15
15
  import { Buffer } from "buffer";
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});// ../../node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.53.1_@types+node@24.10.3__@swc+core@1.15.3_@swc+h_c395c5c1ebaf3130b03087671664b901/node_modules/tsup/assets/cjs_shims.js
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// ../../node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.53.1_@types+node@24.10.4__@swc+core@1.15.7_@swc+h_167688d692077c8a2d82cc2e420b5ebb/node_modules/tsup/assets/cjs_shims.js
2
2
  var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.tagName.toUpperCase() === "SCRIPT" ? document.currentScript.src : new URL("main.js", document.baseURI).href;
3
3
  var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
4
4