weapp-tailwindcss 4.9.6 → 4.9.7

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 (67) hide show
  1. package/dist/{chunk-SPH6SCTM.mjs → chunk-47TVJCQM.mjs} +1 -1
  2. package/dist/{chunk-VPHA77FH.js → chunk-DOX3RXJ2.js} +2 -2
  3. package/dist/{chunk-HWF5U4CI.mjs → chunk-EGOFMIDI.mjs} +1 -1
  4. package/dist/{chunk-COWTRJLM.js → chunk-EPL2YCB5.js} +9 -9
  5. package/dist/{chunk-6HOJUSTX.mjs → chunk-FM2RNYJD.mjs} +1 -1
  6. package/dist/{chunk-PUUBR36U.mjs → chunk-FNFWO6S4.mjs} +2 -2
  7. package/dist/{chunk-Y6F6NBA7.js → chunk-HAM3JEU2.js} +1 -1
  8. package/dist/{chunk-VI5WDH6L.js → chunk-I5PM7RZP.js} +7 -7
  9. package/dist/{chunk-W7ETGQW7.mjs → chunk-JW43IVZB.mjs} +1 -1
  10. package/dist/{chunk-FYYBY3VK.js → chunk-LBZCKOMT.js} +1 -1
  11. package/dist/{chunk-XD5AWWTB.mjs → chunk-LST5YX7P.mjs} +4 -4
  12. package/dist/{chunk-56QWZ2UM.js → chunk-MOOFLCLC.js} +5 -5
  13. package/dist/{chunk-F345SX2I.js → chunk-NSZXONXA.js} +5 -5
  14. package/dist/{chunk-4RUFPPI6.js → chunk-PO3CCFU7.js} +4 -4
  15. package/dist/{chunk-FQUFI6M7.js → chunk-RIUV5UO7.js} +23 -23
  16. package/dist/{chunk-R3IC273Z.mjs → chunk-SCAC7G77.mjs} +2 -2
  17. package/dist/{chunk-GHWN5Y7Z.mjs → chunk-TBOY7KA4.mjs} +2 -2
  18. package/dist/{chunk-3J6TSML5.js → chunk-UE6PEJJM.js} +31 -31
  19. package/dist/cli.js +40 -40
  20. package/dist/cli.mjs +3 -3
  21. package/dist/core.d.mts +1 -1
  22. package/dist/core.d.ts +1 -1
  23. package/dist/core.js +11 -11
  24. package/dist/core.mjs +4 -4
  25. package/dist/css-macro/postcss.js +1 -1
  26. package/dist/css-macro/postcss.mjs +1 -1
  27. package/dist/css-macro.js +1 -1
  28. package/dist/css-macro.mjs +1 -1
  29. package/dist/defaults.d.mts +1 -1
  30. package/dist/defaults.d.ts +1 -1
  31. package/dist/defaults.js +3 -3
  32. package/dist/defaults.mjs +2 -2
  33. package/dist/gulp.d.mts +1 -1
  34. package/dist/gulp.d.ts +1 -1
  35. package/dist/gulp.js +7 -7
  36. package/dist/gulp.mjs +5 -5
  37. package/dist/{index-D4tYbWC6.d.ts → index-CPJD_vjs.d.mts} +2 -2
  38. package/dist/{index-D4tYbWC6.d.mts → index-CPJD_vjs.d.ts} +2 -2
  39. package/dist/index.d.mts +1 -1
  40. package/dist/index.d.ts +1 -1
  41. package/dist/index.js +11 -11
  42. package/dist/index.mjs +8 -8
  43. package/dist/postcss-html-transform.js +1 -1
  44. package/dist/postcss-html-transform.mjs +1 -1
  45. package/dist/presets.d.mts +1 -1
  46. package/dist/presets.d.ts +1 -1
  47. package/dist/presets.js +5 -5
  48. package/dist/presets.mjs +1 -1
  49. package/dist/reset.js +1 -1
  50. package/dist/reset.mjs +1 -1
  51. package/dist/types.d.mts +2 -2
  52. package/dist/types.d.ts +2 -2
  53. package/dist/types.js +1 -1
  54. package/dist/types.mjs +1 -1
  55. package/dist/vite.d.mts +1 -1
  56. package/dist/vite.d.ts +1 -1
  57. package/dist/vite.js +8 -8
  58. package/dist/vite.mjs +5 -5
  59. package/dist/webpack.d.mts +1 -1
  60. package/dist/webpack.d.ts +1 -1
  61. package/dist/webpack.js +9 -9
  62. package/dist/webpack.mjs +6 -6
  63. package/dist/webpack4.d.mts +1 -1
  64. package/dist/webpack4.d.ts +1 -1
  65. package/dist/webpack4.js +34 -34
  66. package/dist/webpack4.mjs +5 -5
  67. package/package.json +1 -1
@@ -9,27 +9,27 @@
9
9
 
10
10
 
11
11
 
12
- var _chunk56QWZ2UMjs = require('./chunk-56QWZ2UM.js');
12
+ var _chunkMOOFLCLCjs = require('./chunk-MOOFLCLC.js');
13
13
 
14
14
 
15
15
 
16
16
 
17
17
 
18
18
 
19
- var _chunkVPHA77FHjs = require('./chunk-VPHA77FH.js');
19
+ var _chunkDOX3RXJ2js = require('./chunk-DOX3RXJ2.js');
20
20
 
21
21
 
22
22
  var _chunkLTJQUORKjs = require('./chunk-LTJQUORK.js');
23
23
 
24
24
 
25
- var _chunkF345SX2Ijs = require('./chunk-F345SX2I.js');
25
+ var _chunkNSZXONXAjs = require('./chunk-NSZXONXA.js');
26
26
 
27
27
 
28
28
 
29
29
 
30
30
 
31
31
 
32
- var _chunkCOWTRJLMjs = require('./chunk-COWTRJLM.js');
32
+ var _chunkEPL2YCB5js = require('./chunk-EPL2YCB5.js');
33
33
 
34
34
 
35
35
  var _chunkDYLQ6UOIjs = require('./chunk-DYLQ6UOI.js');
@@ -51,10 +51,10 @@ function setupWebpackV5ProcessAssetsHook(options) {
51
51
  } = options;
52
52
  const { Compilation, sources } = compiler.webpack;
53
53
  const { ConcatSource } = sources;
54
- compiler.hooks.compilation.tap(_chunkCOWTRJLMjs.pluginName, (compilation) => {
54
+ compiler.hooks.compilation.tap(_chunkEPL2YCB5js.pluginName, (compilation) => {
55
55
  compilation.hooks.processAssets.tapPromise(
56
56
  {
57
- name: _chunkCOWTRJLMjs.pluginName,
57
+ name: _chunkEPL2YCB5js.pluginName,
58
58
  stage: Compilation.PROCESS_ASSETS_STAGE_SUMMARIZE
59
59
  },
60
60
  async (assets) => {
@@ -72,13 +72,13 @@ function setupWebpackV5ProcessAssetsHook(options) {
72
72
  const jsAssets = /* @__PURE__ */ new Map();
73
73
  for (const [file] of entries) {
74
74
  if (compilerOptions.jsMatcher(file) || compilerOptions.wxsMatcher(file)) {
75
- const absolute = _chunkVPHA77FHjs.toAbsoluteOutputPath.call(void 0, file, outputDir);
75
+ const absolute = _chunkDOX3RXJ2js.toAbsoluteOutputPath.call(void 0, file, outputDir);
76
76
  jsAssets.set(absolute, file);
77
77
  }
78
78
  }
79
79
  const moduleGraphOptions = {
80
80
  resolve(specifier, importer) {
81
- return _chunkVPHA77FHjs.resolveOutputSpecifier.call(void 0, specifier, importer, outputDir, (candidate) => jsAssets.has(candidate));
81
+ return _chunkDOX3RXJ2js.resolveOutputSpecifier.call(void 0, specifier, importer, outputDir, (candidate) => jsAssets.has(candidate));
82
82
  },
83
83
  load: (id) => {
84
84
  const assetName = jsAssets.get(id);
@@ -123,7 +123,7 @@ function setupWebpackV5ProcessAssetsHook(options) {
123
123
  const groupedEntries = _chunkDYLQ6UOIjs.getGroupedEntries.call(void 0, entries, compilerOptions);
124
124
  await refreshRuntimeState(true);
125
125
  await runtimeState.patchPromise;
126
- const runtimeSet = await _chunkCOWTRJLMjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
126
+ const runtimeSet = await _chunkEPL2YCB5js.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
127
127
  debug2("get runtimeSet, class count: %d", runtimeSet.size);
128
128
  const tasks = [];
129
129
  if (Array.isArray(groupedEntries.html)) {
@@ -160,12 +160,12 @@ function setupWebpackV5ProcessAssetsHook(options) {
160
160
  const jsTaskFactories = [];
161
161
  if (Array.isArray(groupedEntries.js)) {
162
162
  for (const [file] of groupedEntries.js) {
163
- const cacheKey = _chunk56QWZ2UMjs.getCacheKey.call(void 0, file);
163
+ const cacheKey = _chunkMOOFLCLCjs.getCacheKey.call(void 0, file);
164
164
  const asset = compilation.getAsset(file);
165
165
  if (!asset) {
166
166
  continue;
167
167
  }
168
- const absoluteFile = _chunkVPHA77FHjs.toAbsoluteOutputPath.call(void 0, file, outputDir);
168
+ const absoluteFile = _chunkDOX3RXJ2js.toAbsoluteOutputPath.call(void 0, file, outputDir);
169
169
  const initialSource = asset.source.source();
170
170
  const initialRawSource = typeof initialSource === "string" ? initialSource : initialSource.toString();
171
171
  jsTaskFactories.push(async () => {
@@ -240,7 +240,7 @@ function setupWebpackV5ProcessAssetsHook(options) {
240
240
  );
241
241
  }
242
242
  }
243
- _chunkVPHA77FHjs.pushConcurrentTaskFactories.call(void 0, tasks, jsTaskFactories);
243
+ _chunkDOX3RXJ2js.pushConcurrentTaskFactories.call(void 0, tasks, jsTaskFactories);
244
244
  await Promise.all(tasks);
245
245
  debug2("end");
246
246
  compilerOptions.onEnd();
@@ -265,9 +265,9 @@ function setupWebpackV5Loaders(options) {
265
265
  getClassSetInLoader,
266
266
  debug: debug2
267
267
  } = options;
268
- const isMpxApp = _chunk56QWZ2UMjs.isMpx.call(void 0, appType);
268
+ const isMpxApp = _chunkMOOFLCLCjs.isMpx.call(void 0, appType);
269
269
  if (shouldRewriteCssImports && isMpxApp) {
270
- _chunk56QWZ2UMjs.ensureMpxTailwindcssAliases.call(void 0, compiler, weappTailwindcssPackageDir2);
270
+ _chunkMOOFLCLCjs.ensureMpxTailwindcssAliases.call(void 0, compiler, weappTailwindcssPackageDir2);
271
271
  }
272
272
  const runtimeClassSetLoader = _nullishCoalesce(runtimeLoaderPath, () => ( _path2.default.resolve(__dirname, "./weapp-tw-runtime-classset-loader.js")));
273
273
  const runtimeCssImportRewriteLoader = shouldRewriteCssImports ? _nullishCoalesce(runtimeCssImportRewriteLoaderPath, () => ( _path2.default.resolve(__dirname, "./weapp-tw-css-import-rewrite-loader.js"))) : void 0;
@@ -280,12 +280,12 @@ function setupWebpackV5Loaders(options) {
280
280
  const classSetLoaderOptions = {
281
281
  getClassSet: getClassSetInLoader
282
282
  };
283
- const { findRewriteAnchor, findClassSetAnchor } = _chunk56QWZ2UMjs.createLoaderAnchorFinders.call(void 0, appType);
283
+ const { findRewriteAnchor, findClassSetAnchor } = _chunkMOOFLCLCjs.createLoaderAnchorFinders.call(void 0, appType);
284
284
  const cssImportRewriteLoaderOptions = runtimeLoaderRewriteOptions ? {
285
285
  rewriteCssImports: runtimeLoaderRewriteOptions
286
286
  } : void 0;
287
287
  if (runtimeCssImportRewriteLoader && shouldRewriteCssImports && cssImportRewriteLoaderOptions && isMpxApp) {
288
- _chunk56QWZ2UMjs.injectMpxCssRewritePreRules.call(void 0, compiler, runtimeCssImportRewriteLoader, cssImportRewriteLoaderOptions);
288
+ _chunkMOOFLCLCjs.injectMpxCssRewritePreRules.call(void 0, compiler, runtimeCssImportRewriteLoader, cssImportRewriteLoaderOptions);
289
289
  }
290
290
  const createRuntimeClassSetLoaderEntry = () => ({
291
291
  loader: runtimeClassSetLoader,
@@ -305,17 +305,17 @@ function setupWebpackV5Loaders(options) {
305
305
  };
306
306
  };
307
307
  const { NormalModule } = compiler.webpack;
308
- compiler.hooks.compilation.tap(_chunkCOWTRJLMjs.pluginName, (compilation) => {
309
- NormalModule.getCompilationHooks(compilation).loader.tap(_chunkCOWTRJLMjs.pluginName, (_loaderContext, module) => {
308
+ compiler.hooks.compilation.tap(_chunkEPL2YCB5js.pluginName, (compilation) => {
309
+ NormalModule.getCompilationHooks(compilation).loader.tap(_chunkEPL2YCB5js.pluginName, (_loaderContext, module) => {
310
310
  const hasRuntimeLoader = runtimeClassSetLoaderExists || runtimeCssImportRewriteLoaderExists;
311
311
  if (!hasRuntimeLoader) {
312
312
  return;
313
313
  }
314
- _chunk56QWZ2UMjs.patchMpxLoaderResolve.call(void 0, _loaderContext, weappTailwindcssPackageDir2, shouldRewriteCssImports && isMpxApp);
314
+ _chunkMOOFLCLCjs.patchMpxLoaderResolve.call(void 0, _loaderContext, weappTailwindcssPackageDir2, shouldRewriteCssImports && isMpxApp);
315
315
  const loaderEntries = module.loaders || [];
316
316
  let rewriteAnchorIdx = findRewriteAnchor(loaderEntries);
317
317
  const classSetAnchorIdx = findClassSetAnchor(loaderEntries);
318
- const isCssModule = _chunk56QWZ2UMjs.isCssLikeModuleResource.call(void 0, module.resource, compilerOptions.cssMatcher, appType);
318
+ const isCssModule = _chunkMOOFLCLCjs.isCssLikeModuleResource.call(void 0, module.resource, compilerOptions.cssMatcher, appType);
319
319
  if (_process2.default.env.WEAPP_TW_LOADER_DEBUG && isCssModule) {
320
320
  debug2("loader hook css module: %s loaders=%o anchors=%o", module.resource, loaderEntries.map((x) => x.loader), { rewriteAnchorIdx, classSetAnchorIdx });
321
321
  }
@@ -347,7 +347,7 @@ function setupWebpackV5Loaders(options) {
347
347
  rewriteAnchorIdx = findRewriteAnchor(loaderEntries);
348
348
  }
349
349
  }
350
- if (runtimeClassSetLoaderExists && !_chunk56QWZ2UMjs.hasLoaderEntry.call(void 0, loaderEntries, runtimeClassSetLoader)) {
350
+ if (runtimeClassSetLoaderExists && !_chunkMOOFLCLCjs.hasLoaderEntry.call(void 0, loaderEntries, runtimeClassSetLoader)) {
351
351
  const classSetLoaderEntry = createRuntimeClassSetLoaderEntry();
352
352
  const anchorIndex = findClassSetAnchor(loaderEntries);
353
353
  if (anchorIndex === -1) {
@@ -362,11 +362,11 @@ function setupWebpackV5Loaders(options) {
362
362
  }
363
363
 
364
364
  // src/bundlers/webpack/BaseUnifiedPlugin/v5.ts
365
- var debug = _chunkCOWTRJLMjs.createDebug.call(void 0, );
366
- var weappTailwindcssPackageDir = _chunkVPHA77FHjs.resolvePackageDir.call(void 0, "weapp-tailwindcss");
365
+ var debug = _chunkEPL2YCB5js.createDebug.call(void 0, );
366
+ var weappTailwindcssPackageDir = _chunkDOX3RXJ2js.resolvePackageDir.call(void 0, "weapp-tailwindcss");
367
367
  var UnifiedWebpackPluginV5 = class {
368
368
  constructor(options = {}) {
369
- this.options = _chunkCOWTRJLMjs.getCompilerContext.call(void 0, options);
369
+ this.options = _chunkEPL2YCB5js.getCompilerContext.call(void 0, options);
370
370
  this.appType = this.options.appType;
371
371
  }
372
372
  apply(compiler) {
@@ -379,22 +379,22 @@ var UnifiedWebpackPluginV5 = class {
379
379
  twPatcher: initialTwPatcher,
380
380
  refreshTailwindcssPatcher
381
381
  } = this.options;
382
- const disabledOptions = _chunkVPHA77FHjs.resolveDisabledOptions.call(void 0, disabled);
382
+ const disabledOptions = _chunkDOX3RXJ2js.resolveDisabledOptions.call(void 0, disabled);
383
383
  const isTailwindcssV4 = (_nullishCoalesce(initialTwPatcher.majorVersion, () => ( 0))) >= 4;
384
384
  const shouldRewriteCssImports = isTailwindcssV4 && this.options.rewriteCssImports !== false && !disabledOptions.rewriteCssImports;
385
- const isMpxApp = _chunk56QWZ2UMjs.isMpx.call(void 0, this.appType);
385
+ const isMpxApp = _chunkMOOFLCLCjs.isMpx.call(void 0, this.appType);
386
386
  if (shouldRewriteCssImports) {
387
- _chunk56QWZ2UMjs.applyTailwindcssCssImportRewrite.call(void 0, compiler, {
387
+ _chunkMOOFLCLCjs.applyTailwindcssCssImportRewrite.call(void 0, compiler, {
388
388
  pkgDir: weappTailwindcssPackageDir,
389
389
  enabled: true,
390
390
  appType: this.appType
391
391
  });
392
- _chunk56QWZ2UMjs.setupMpxTailwindcssRedirect.call(void 0, weappTailwindcssPackageDir, isMpxApp);
392
+ _chunkMOOFLCLCjs.setupMpxTailwindcssRedirect.call(void 0, weappTailwindcssPackageDir, isMpxApp);
393
393
  }
394
394
  if (disabledOptions.plugin) {
395
395
  return;
396
396
  }
397
- const patchRecorderState = _chunkF345SX2Ijs.setupPatchRecorder.call(void 0, initialTwPatcher, this.options.tailwindcssBasedir, {
397
+ const patchRecorderState = _chunkNSZXONXAjs.setupPatchRecorder.call(void 0, initialTwPatcher, this.options.tailwindcssBasedir, {
398
398
  source: "runtime",
399
399
  cwd: _nullishCoalesce(this.options.tailwindcssBasedir, () => ( _process2.default.cwd()))
400
400
  });
@@ -405,12 +405,12 @@ var UnifiedWebpackPluginV5 = class {
405
405
  onPatchCompleted: patchRecorderState.onPatchCompleted
406
406
  };
407
407
  const refreshRuntimeState = async (force) => {
408
- await _chunkCOWTRJLMjs.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
408
+ await _chunkEPL2YCB5js.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
409
409
  };
410
410
  async function getClassSetInLoader() {
411
411
  await refreshRuntimeState(true);
412
412
  await runtimeState.patchPromise;
413
- await _chunkCOWTRJLMjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
413
+ await _chunkEPL2YCB5js.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
414
414
  }
415
415
  onLoad();
416
416
  setupWebpackV5Loaders({
package/dist/cli.js CHANGED
@@ -3,14 +3,14 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkCOWTRJLMjs = require('./chunk-COWTRJLM.js');
6
+ var _chunkEPL2YCB5js = require('./chunk-EPL2YCB5.js');
7
7
 
8
8
 
9
9
 
10
- var _chunk4RUFPPI6js = require('./chunk-4RUFPPI6.js');
11
- require('./chunk-FYYBY3VK.js');
10
+ var _chunkPO3CCFU7js = require('./chunk-PO3CCFU7.js');
11
+ require('./chunk-LBZCKOMT.js');
12
12
  require('./chunk-DYLQ6UOI.js');
13
- require('./chunk-Y6F6NBA7.js');
13
+ require('./chunk-HAM3JEU2.js');
14
14
 
15
15
  // src/cli.ts
16
16
  var _process = require('process'); var _process2 = _interopRequireDefault(_process);
@@ -134,7 +134,7 @@ function resolvePatchDefaultCwd(currentCwd = _process2.default.cwd()) {
134
134
  if (explicitCwd) {
135
135
  return explicitCwd;
136
136
  }
137
- const workspaceRoot = _chunk4RUFPPI6js.findWorkspaceRoot.call(void 0, baseDir);
137
+ const workspaceRoot = _chunkPO3CCFU7js.findWorkspaceRoot.call(void 0, baseDir);
138
138
  const initCwd = normalizeCandidatePath(baseDir, _process2.default.env.INIT_CWD);
139
139
  const localPrefix = normalizeCandidatePath(baseDir, _process2.default.env.npm_config_local_prefix);
140
140
  const candidates = [
@@ -156,12 +156,12 @@ async function ensureDir(dir) {
156
156
  }
157
157
  function handleCliError(error) {
158
158
  if (error instanceof Error) {
159
- _chunk4RUFPPI6js.logger.error(error.message);
159
+ _chunkPO3CCFU7js.logger.error(error.message);
160
160
  if (error.stack && _process2.default.env.WEAPP_TW_DEBUG === "1") {
161
- _chunk4RUFPPI6js.logger.error(error.stack);
161
+ _chunkPO3CCFU7js.logger.error(error.stack);
162
162
  }
163
163
  } else {
164
- _chunk4RUFPPI6js.logger.error(String(error));
164
+ _chunkPO3CCFU7js.logger.error(String(error));
165
165
  }
166
166
  }
167
167
  function commandAction(handler) {
@@ -192,27 +192,27 @@ function logPatchStatusReport(report) {
192
192
  (entry) => entry.status === "skipped" || entry.status === "unsupported"
193
193
  );
194
194
  const packageLabel = `${_nullishCoalesce(report.package.name, () => ( "tailwindcss"))}@${_nullishCoalesce(report.package.version, () => ( "unknown"))}`;
195
- _chunk4RUFPPI6js.logger.info(`Patch status for ${packageLabel} (v${report.majorVersion})`);
195
+ _chunkPO3CCFU7js.logger.info(`Patch status for ${packageLabel} (v${report.majorVersion})`);
196
196
  if (applied.length) {
197
- _chunk4RUFPPI6js.logger.success("Applied:");
197
+ _chunkPO3CCFU7js.logger.success("Applied:");
198
198
  applied.forEach((entry) => {
199
- _chunk4RUFPPI6js.logger.success(` - ${entry.name}${formatStatusFilesHint(entry.files)}`);
199
+ _chunkPO3CCFU7js.logger.success(` - ${entry.name}${formatStatusFilesHint(entry.files)}`);
200
200
  });
201
201
  }
202
202
  if (pending.length) {
203
- _chunk4RUFPPI6js.logger.warn("Needs attention:");
203
+ _chunkPO3CCFU7js.logger.warn("Needs attention:");
204
204
  pending.forEach((entry) => {
205
205
  const details = entry.reason ? ` - ${entry.reason}` : "";
206
- _chunk4RUFPPI6js.logger.warn(` - ${entry.name}${formatStatusFilesHint(entry.files)}${details}`);
206
+ _chunkPO3CCFU7js.logger.warn(` - ${entry.name}${formatStatusFilesHint(entry.files)}${details}`);
207
207
  });
208
208
  } else {
209
- _chunk4RUFPPI6js.logger.success("All applicable patches are applied.");
209
+ _chunkPO3CCFU7js.logger.success("All applicable patches are applied.");
210
210
  }
211
211
  if (skipped.length) {
212
- _chunk4RUFPPI6js.logger.info("Skipped:");
212
+ _chunkPO3CCFU7js.logger.info("Skipped:");
213
213
  skipped.forEach((entry) => {
214
214
  const details = entry.reason ? ` - ${entry.reason}` : "";
215
- _chunk4RUFPPI6js.logger.info(` - ${entry.name}${details}`);
215
+ _chunkPO3CCFU7js.logger.info(` - ${entry.name}${details}`);
216
216
  });
217
217
  }
218
218
  }
@@ -377,7 +377,7 @@ function summarizeWorkspaceResults(results) {
377
377
  const patched = results.filter((result) => result.status === "patched").length;
378
378
  const skipped = results.filter((result) => result.status === "skipped").length;
379
379
  const failed = results.filter((result) => result.status === "failed").length;
380
- _chunk4RUFPPI6js.logger.info("[workspace] \u6C47\u603B\uFF1A\u5DF2\u8865\u4E01 %d\uFF0C\u8DF3\u8FC7 %d\uFF0C\u5931\u8D25 %d", patched, skipped, failed);
380
+ _chunkPO3CCFU7js.logger.info("[workspace] \u6C47\u603B\uFF1A\u5DF2\u8865\u4E01 %d\uFF0C\u8DF3\u8FC7 %d\uFF0C\u5931\u8D25 %d", patched, skipped, failed);
381
381
  }
382
382
 
383
383
  // src/cli/workspace/patch-package.ts
@@ -393,7 +393,7 @@ async function patchWorkspacePackage(workspaceRoot, dir, pkgName, options) {
393
393
  const displayName = formatDisplayName(workspaceRoot, dir, pkgName);
394
394
  const tailwindInfo = getTailwindcssPackageInfo({ paths: [dir] });
395
395
  if (!_optionalChain([tailwindInfo, 'optionalAccess', _11 => _11.rootPath])) {
396
- _chunk4RUFPPI6js.logger.info("[workspace] \u8DF3\u8FC7 %s\uFF08tailwindcss \u672A\u5B89\u88C5\uFF09\u3002", displayName);
396
+ _chunkPO3CCFU7js.logger.info("[workspace] \u8DF3\u8FC7 %s\uFF08tailwindcss \u672A\u5B89\u88C5\uFF09\u3002", displayName);
397
397
  return {
398
398
  dir,
399
399
  name: pkgName,
@@ -404,23 +404,23 @@ async function patchWorkspacePackage(workspaceRoot, dir, pkgName, options) {
404
404
  try {
405
405
  const patcher = createWorkspacePatcher(dir);
406
406
  if (options.clearCache) {
407
- await _chunkCOWTRJLMjs.clearTailwindcssPatcherCache.call(void 0, patcher, { removeDirectory: true });
407
+ await _chunkEPL2YCB5js.clearTailwindcssPatcherCache.call(void 0, patcher, { removeDirectory: true });
408
408
  }
409
- const recorder = _chunkCOWTRJLMjs.createPatchTargetRecorder.call(void 0, dir, patcher, {
409
+ const recorder = _chunkEPL2YCB5js.createPatchTargetRecorder.call(void 0, dir, patcher, {
410
410
  source: "cli",
411
411
  cwd: dir,
412
412
  recordTarget: options.recordTarget !== false,
413
413
  alwaysRecord: true
414
414
  });
415
415
  if (_optionalChain([recorder, 'optionalAccess', _12 => _12.message])) {
416
- _chunk4RUFPPI6js.logger.info("[workspace] %s %s", displayName, recorder.message);
416
+ _chunkPO3CCFU7js.logger.info("[workspace] %s %s", displayName, recorder.message);
417
417
  }
418
- _chunkCOWTRJLMjs.logTailwindcssTarget.call(void 0, "cli", patcher, dir);
418
+ _chunkEPL2YCB5js.logTailwindcssTarget.call(void 0, "cli", patcher, dir);
419
419
  await patcher.patch();
420
420
  if (_optionalChain([recorder, 'optionalAccess', _13 => _13.onPatched])) {
421
421
  await recorder.onPatched();
422
422
  }
423
- _chunk4RUFPPI6js.logger.success("[workspace] \u5DF2\u8865\u4E01 %s", displayName);
423
+ _chunkPO3CCFU7js.logger.success("[workspace] \u5DF2\u8865\u4E01 %s", displayName);
424
424
  return {
425
425
  dir,
426
426
  name: pkgName,
@@ -431,7 +431,7 @@ async function patchWorkspacePackage(workspaceRoot, dir, pkgName, options) {
431
431
  const reason = error instanceof Error ? error.message : String(error);
432
432
  const suggestion = `\u8BF7\u5728 ${dir} \u8FD0\u884C "weapp-tw patch --cwd ${dir}".`;
433
433
  const message = `${reason}\uFF0C${suggestion}`;
434
- _chunk4RUFPPI6js.logger.error("[workspace] \u8865\u4E01\u5931\u8D25 %s\uFF1A%s", displayName, message);
434
+ _chunkPO3CCFU7js.logger.error("[workspace] \u8865\u4E01\u5931\u8D25 %s\uFF1A%s", displayName, message);
435
435
  return {
436
436
  dir,
437
437
  name: pkgName,
@@ -444,10 +444,10 @@ async function patchWorkspacePackage(workspaceRoot, dir, pkgName, options) {
444
444
  // src/cli/workspace.ts
445
445
  async function patchWorkspace(options) {
446
446
  const cwd = _nullishCoalesce(options.cwd, () => ( _process2.default.cwd()));
447
- const workspaceRoot = _nullishCoalesce(_chunk4RUFPPI6js.findWorkspaceRoot.call(void 0, cwd), () => ( cwd));
447
+ const workspaceRoot = _nullishCoalesce(_chunkPO3CCFU7js.findWorkspaceRoot.call(void 0, cwd), () => ( cwd));
448
448
  const packageDirs = await resolveWorkspacePackageDirs(workspaceRoot);
449
449
  if (packageDirs.length === 0) {
450
- _chunk4RUFPPI6js.logger.warn("\u672A\u5728 %s \u68C0\u6D4B\u5230 workspace \u5305\uFF0C\u5DF2\u8DF3\u8FC7\u6279\u91CF patch\u3002", workspaceRoot);
450
+ _chunkPO3CCFU7js.logger.warn("\u672A\u5728 %s \u68C0\u6D4B\u5230 workspace \u5305\uFF0C\u5DF2\u8DF3\u8FC7\u6279\u91CF patch\u3002", workspaceRoot);
451
451
  return;
452
452
  }
453
453
  const results = [];
@@ -462,12 +462,12 @@ async function patchWorkspace(options) {
462
462
  // src/cli/mount-options.ts
463
463
  function handleCliError2(error) {
464
464
  if (error instanceof Error) {
465
- _chunk4RUFPPI6js.logger.error(error.message);
465
+ _chunkPO3CCFU7js.logger.error(error.message);
466
466
  if (error.stack && _process2.default.env.WEAPP_TW_DEBUG === "1") {
467
- _chunk4RUFPPI6js.logger.error(error.stack);
467
+ _chunkPO3CCFU7js.logger.error(error.stack);
468
468
  }
469
469
  } else {
470
- _chunk4RUFPPI6js.logger.error(String(error));
470
+ _chunkPO3CCFU7js.logger.error(String(error));
471
471
  }
472
472
  }
473
473
  function withCommandErrorHandling(handler) {
@@ -546,26 +546,26 @@ var mountOptions = {
546
546
  }
547
547
  const patcher = await createPatcherWithDefaultExtendLengthUnits(ctx);
548
548
  if (shouldClearCache) {
549
- await _chunkCOWTRJLMjs.clearTailwindcssPatcherCache.call(void 0, patcher, { removeDirectory: true });
549
+ await _chunkEPL2YCB5js.clearTailwindcssPatcherCache.call(void 0, patcher, { removeDirectory: true });
550
550
  }
551
- const recorder = _chunkCOWTRJLMjs.createPatchTargetRecorder.call(void 0, ctx.cwd, patcher, {
551
+ const recorder = _chunkEPL2YCB5js.createPatchTargetRecorder.call(void 0, ctx.cwd, patcher, {
552
552
  source: "cli",
553
553
  cwd: ctx.cwd,
554
554
  recordTarget: shouldRecordTarget,
555
555
  alwaysRecord: true
556
556
  });
557
557
  if (_optionalChain([recorder, 'optionalAccess', _15 => _15.message])) {
558
- _chunk4RUFPPI6js.logger.info(recorder.message);
558
+ _chunkPO3CCFU7js.logger.info(recorder.message);
559
559
  }
560
- _chunkCOWTRJLMjs.logTailwindcssTarget.call(void 0, "cli", patcher, ctx.cwd);
560
+ _chunkEPL2YCB5js.logTailwindcssTarget.call(void 0, "cli", patcher, ctx.cwd);
561
561
  await patcher.patch();
562
562
  if (_optionalChain([recorder, 'optionalAccess', _16 => _16.onPatched])) {
563
563
  const recordPath = await recorder.onPatched();
564
564
  if (recordPath) {
565
- _chunk4RUFPPI6js.logger.info(`\u8BB0\u5F55 weapp-tw patch \u76EE\u6807 -> ${formatOutputPath(recordPath, ctx.cwd)}`);
565
+ _chunkPO3CCFU7js.logger.info(`\u8BB0\u5F55 weapp-tw patch \u76EE\u6807 -> ${formatOutputPath(recordPath, ctx.cwd)}`);
566
566
  }
567
567
  }
568
- _chunk4RUFPPI6js.logger.success("Tailwind CSS \u8FD0\u884C\u65F6\u8865\u4E01\u5DF2\u5B8C\u6210\u3002");
568
+ _chunkPO3CCFU7js.logger.success("Tailwind CSS \u8FD0\u884C\u65F6\u8865\u4E01\u5DF2\u5B8C\u6210\u3002");
569
569
  }),
570
570
  extract: withCommandErrorHandling(async (_ctx, next) => next()),
571
571
  tokens: withCommandErrorHandling(async (_ctx, next) => next()),
@@ -574,7 +574,7 @@ var mountOptions = {
574
574
  const patcher = await createPatcherWithDefaultExtendLengthUnits(ctx);
575
575
  const report = await patcher.getPatchStatus();
576
576
  if (ctx.args.json) {
577
- _chunk4RUFPPI6js.logger.log(JSON.stringify(report, null, 2));
577
+ _chunkPO3CCFU7js.logger.log(JSON.stringify(report, null, 2));
578
578
  return report;
579
579
  }
580
580
  logPatchStatusReport(report);
@@ -705,9 +705,9 @@ async function generateVscodeIntellisenseEntry(options) {
705
705
 
706
706
  // src/cli.ts
707
707
  _process2.default.title = "node (weapp-tailwindcss)";
708
- if (_semver2.default.lt(_process2.default.versions.node, _chunkCOWTRJLMjs.WEAPP_TW_REQUIRED_NODE_VERSION)) {
709
- _chunk4RUFPPI6js.logger.warn(
710
- `You are using Node.js ${_process2.default.versions.node}. For weapp-tailwindcss, Node.js version >= v${_chunkCOWTRJLMjs.WEAPP_TW_REQUIRED_NODE_VERSION} is required.`
708
+ if (_semver2.default.lt(_process2.default.versions.node, _chunkEPL2YCB5js.WEAPP_TW_REQUIRED_NODE_VERSION)) {
709
+ _chunkPO3CCFU7js.logger.warn(
710
+ `You are using Node.js ${_process2.default.versions.node}. For weapp-tailwindcss, Node.js version >= v${_chunkEPL2YCB5js.WEAPP_TW_REQUIRED_NODE_VERSION} is required.`
711
711
  );
712
712
  }
713
713
  var cli = _tailwindcsspatch.createTailwindcssPatchCli.call(void 0, {
@@ -732,7 +732,7 @@ cli.command("vscode-entry", "Generate a VS Code helper CSS for Tailwind IntelliS
732
732
  sources,
733
733
  force
734
734
  });
735
- _chunk4RUFPPI6js.logger.success(
735
+ _chunkPO3CCFU7js.logger.success(
736
736
  `VS Code helper generated -> ${formatOutputPath(result.outputPath, resolvedCwd)}`
737
737
  );
738
738
  })
package/dist/cli.mjs CHANGED
@@ -3,14 +3,14 @@ import {
3
3
  clearTailwindcssPatcherCache,
4
4
  createPatchTargetRecorder,
5
5
  logTailwindcssTarget
6
- } from "./chunk-PUUBR36U.mjs";
6
+ } from "./chunk-FNFWO6S4.mjs";
7
7
  import {
8
8
  findWorkspaceRoot,
9
9
  logger
10
10
  } from "./chunk-7D27E7TU.mjs";
11
- import "./chunk-HWF5U4CI.mjs";
11
+ import "./chunk-EGOFMIDI.mjs";
12
12
  import "./chunk-OOHJLO5M.mjs";
13
- import "./chunk-SPH6SCTM.mjs";
13
+ import "./chunk-47TVJCQM.mjs";
14
14
 
15
15
  // src/cli.ts
16
16
  import process7 from "process";
package/dist/core.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ITemplateHandlerOptions, CreateJsHandlerOptions, JsHandlerResult } from './types.mjs';
2
2
  import * as postcss from 'postcss';
3
- import { U as UserDefinedOptions } from './index-D4tYbWC6.mjs';
3
+ import { U as UserDefinedOptions } from './index-CPJD_vjs.mjs';
4
4
  import { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss';
5
5
  import '@babel/parser';
6
6
  import 'magic-string';
package/dist/core.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ITemplateHandlerOptions, CreateJsHandlerOptions, JsHandlerResult } from './types.js';
2
2
  import * as postcss from 'postcss';
3
- import { U as UserDefinedOptions } from './index-D4tYbWC6.js';
3
+ import { U as UserDefinedOptions } from './index-CPJD_vjs.js';
4
4
  import { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss';
5
5
  import '@babel/parser';
6
6
  import 'magic-string';
package/dist/core.js CHANGED
@@ -1,23 +1,23 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } 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
- var _chunkF345SX2Ijs = require('./chunk-F345SX2I.js');
3
+ var _chunkNSZXONXAjs = require('./chunk-NSZXONXA.js');
4
4
 
5
5
 
6
6
 
7
7
 
8
- var _chunkCOWTRJLMjs = require('./chunk-COWTRJLM.js');
9
- require('./chunk-4RUFPPI6.js');
10
- require('./chunk-FYYBY3VK.js');
8
+ var _chunkEPL2YCB5js = require('./chunk-EPL2YCB5.js');
9
+ require('./chunk-PO3CCFU7.js');
10
+ require('./chunk-LBZCKOMT.js');
11
11
  require('./chunk-DYLQ6UOI.js');
12
- require('./chunk-Y6F6NBA7.js');
12
+ require('./chunk-HAM3JEU2.js');
13
13
 
14
14
  // src/core.ts
15
15
  var _process = require('process'); var _process2 = _interopRequireDefault(_process);
16
16
  var _shared = require('@weapp-tailwindcss/shared');
17
17
  function createContext(options = {}) {
18
- const opts = _chunkCOWTRJLMjs.getCompilerContext.call(void 0, options);
18
+ const opts = _chunkEPL2YCB5js.getCompilerContext.call(void 0, options);
19
19
  const { templateHandler, styleHandler, jsHandler, twPatcher: initialTwPatcher, refreshTailwindcssPatcher } = opts;
20
- const patchRecorderState = _chunkF345SX2Ijs.setupPatchRecorder.call(void 0, initialTwPatcher, opts.tailwindcssBasedir, {
20
+ const patchRecorderState = _chunkNSZXONXAjs.setupPatchRecorder.call(void 0, initialTwPatcher, opts.tailwindcssBasedir, {
21
21
  source: "runtime",
22
22
  cwd: _nullishCoalesce(opts.tailwindcssBasedir, () => ( _process2.default.cwd()))
23
23
  });
@@ -29,7 +29,7 @@ function createContext(options = {}) {
29
29
  onPatchCompleted: patchRecorderState.onPatchCompleted
30
30
  };
31
31
  async function refreshRuntimeState(force) {
32
- await _chunkCOWTRJLMjs.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
32
+ await _chunkEPL2YCB5js.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
33
33
  }
34
34
  async function transformWxss(rawCss, options2) {
35
35
  await runtimeState.patchPromise;
@@ -38,7 +38,7 @@ function createContext(options = {}) {
38
38
  }));
39
39
  await refreshRuntimeState(true);
40
40
  await runtimeState.patchPromise;
41
- runtimeSet = await _chunkCOWTRJLMjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
41
+ runtimeSet = await _chunkEPL2YCB5js.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
42
42
  return result;
43
43
  }
44
44
  async function transformJs(rawJs, options2 = {}) {
@@ -48,7 +48,7 @@ function createContext(options = {}) {
48
48
  } else {
49
49
  await refreshRuntimeState(true);
50
50
  await runtimeState.patchPromise;
51
- runtimeSet = await _chunkCOWTRJLMjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
51
+ runtimeSet = await _chunkEPL2YCB5js.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
52
52
  }
53
53
  return await jsHandler(rawJs, runtimeSet, options2);
54
54
  }
@@ -57,7 +57,7 @@ function createContext(options = {}) {
57
57
  if (!_optionalChain([options2, 'optionalAccess', _2 => _2.runtimeSet]) && runtimeSet.size === 0) {
58
58
  await refreshRuntimeState(true);
59
59
  await runtimeState.patchPromise;
60
- runtimeSet = await _chunkCOWTRJLMjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
60
+ runtimeSet = await _chunkEPL2YCB5js.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
61
61
  }
62
62
  return templateHandler(rawWxml, _shared.defuOverrideArray.call(void 0, options2, {
63
63
  runtimeSet
package/dist/core.mjs CHANGED
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  setupPatchRecorder
3
- } from "./chunk-W7ETGQW7.mjs";
3
+ } from "./chunk-JW43IVZB.mjs";
4
4
  import {
5
5
  collectRuntimeClassSet,
6
6
  getCompilerContext,
7
7
  refreshTailwindRuntimeState
8
- } from "./chunk-PUUBR36U.mjs";
8
+ } from "./chunk-FNFWO6S4.mjs";
9
9
  import "./chunk-7D27E7TU.mjs";
10
- import "./chunk-HWF5U4CI.mjs";
10
+ import "./chunk-EGOFMIDI.mjs";
11
11
  import "./chunk-OOHJLO5M.mjs";
12
- import "./chunk-SPH6SCTM.mjs";
12
+ import "./chunk-47TVJCQM.mjs";
13
13
 
14
14
  // src/core.ts
15
15
  import process from "process";
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
  var _chunkNS3NEDWDjs = require('../chunk-NS3NEDWD.js');
6
- require('../chunk-Y6F6NBA7.js');
6
+ require('../chunk-HAM3JEU2.js');
7
7
 
8
8
  // src/css-macro/postcss.ts
9
9
  var creator = () => {
@@ -3,7 +3,7 @@ import {
3
3
  ifndef,
4
4
  matchCustomPropertyFromValue
5
5
  } from "../chunk-RGXLY3HG.mjs";
6
- import "../chunk-SPH6SCTM.mjs";
6
+ import "../chunk-47TVJCQM.mjs";
7
7
 
8
8
  // src/css-macro/postcss.ts
9
9
  var creator = () => {
package/dist/css-macro.js CHANGED
@@ -5,7 +5,7 @@ var _chunkNS3NEDWDjs = require('./chunk-NS3NEDWD.js');
5
5
 
6
6
 
7
7
  var _chunkDYLQ6UOIjs = require('./chunk-DYLQ6UOI.js');
8
- require('./chunk-Y6F6NBA7.js');
8
+ require('./chunk-HAM3JEU2.js');
9
9
 
10
10
  // src/css-macro/index.ts
11
11
  var _plugin = require('tailwindcss/plugin'); var _plugin2 = _interopRequireDefault(_plugin);
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  defu
7
7
  } from "./chunk-OOHJLO5M.mjs";
8
- import "./chunk-SPH6SCTM.mjs";
8
+ import "./chunk-47TVJCQM.mjs";
9
9
 
10
10
  // src/css-macro/index.ts
11
11
  import plugin from "tailwindcss/plugin";
@@ -1,4 +1,4 @@
1
- import { U as UserDefinedOptions } from './index-D4tYbWC6.mjs';
1
+ import { U as UserDefinedOptions } from './index-CPJD_vjs.mjs';
2
2
  import '@babel/parser';
3
3
  import '@weapp-tailwindcss/postcss';
4
4
  import 'tailwindcss-patch';
@@ -1,4 +1,4 @@
1
- import { U as UserDefinedOptions } from './index-D4tYbWC6.js';
1
+ import { U as UserDefinedOptions } from './index-CPJD_vjs.js';
2
2
  import '@babel/parser';
3
3
  import '@weapp-tailwindcss/postcss';
4
4
  import 'tailwindcss-patch';
package/dist/defaults.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkFYYBY3VKjs = require('./chunk-FYYBY3VK.js');
3
+ var _chunkLBZCKOMTjs = require('./chunk-LBZCKOMT.js');
4
4
  require('./chunk-DYLQ6UOI.js');
5
- require('./chunk-Y6F6NBA7.js');
5
+ require('./chunk-HAM3JEU2.js');
6
6
 
7
7
 
8
- exports.getDefaultOptions = _chunkFYYBY3VKjs.getDefaultOptions;
8
+ exports.getDefaultOptions = _chunkLBZCKOMTjs.getDefaultOptions;
package/dist/defaults.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  getDefaultOptions
3
- } from "./chunk-HWF5U4CI.mjs";
3
+ } from "./chunk-EGOFMIDI.mjs";
4
4
  import "./chunk-OOHJLO5M.mjs";
5
- import "./chunk-SPH6SCTM.mjs";
5
+ import "./chunk-47TVJCQM.mjs";
6
6
  export {
7
7
  getDefaultOptions
8
8
  };
package/dist/gulp.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ITemplateHandlerOptions, CreateJsHandlerOptions } from './types.mjs';
2
2
  import stream from 'node:stream';
3
- import { U as UserDefinedOptions } from './index-D4tYbWC6.mjs';
3
+ import { U as UserDefinedOptions } from './index-CPJD_vjs.mjs';
4
4
  import { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss';
5
5
  import '@babel/parser';
6
6
  import 'magic-string';