weapp-tailwindcss 4.9.6 → 4.9.8-alpha.0

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-6HOJUSTX.mjs → chunk-2HORYQCB.mjs} +1 -1
  2. package/dist/{chunk-56QWZ2UM.js → chunk-35WZBSR2.js} +5 -5
  3. package/dist/{chunk-SPH6SCTM.mjs → chunk-47TVJCQM.mjs} +1 -1
  4. package/dist/{chunk-XD5AWWTB.mjs → chunk-5VEPZUTO.mjs} +4 -4
  5. package/dist/{chunk-W7ETGQW7.mjs → chunk-B76ICULV.mjs} +1 -1
  6. package/dist/{chunk-VPHA77FH.js → chunk-DOX3RXJ2.js} +2 -2
  7. package/dist/{chunk-HWF5U4CI.mjs → chunk-EGOFMIDI.mjs} +1 -1
  8. package/dist/{chunk-PUUBR36U.mjs → chunk-FY4CU2TB.mjs} +8 -6
  9. package/dist/{chunk-Y6F6NBA7.js → chunk-HAM3JEU2.js} +1 -1
  10. package/dist/{chunk-R3IC273Z.mjs → chunk-IPXH3S3C.mjs} +2 -2
  11. package/dist/{chunk-3J6TSML5.js → chunk-KBLYUEKE.js} +31 -31
  12. package/dist/{chunk-VI5WDH6L.js → chunk-KTUGHGKO.js} +7 -7
  13. package/dist/{chunk-COWTRJLM.js → chunk-KUFBWA2F.js} +15 -13
  14. package/dist/{chunk-GHWN5Y7Z.mjs → chunk-LACRPTD6.mjs} +2 -2
  15. package/dist/{chunk-FYYBY3VK.js → chunk-LBZCKOMT.js} +1 -1
  16. package/dist/{chunk-4RUFPPI6.js → chunk-PO3CCFU7.js} +4 -4
  17. package/dist/{chunk-FQUFI6M7.js → chunk-WRVALWQL.js} +23 -23
  18. package/dist/{chunk-F345SX2I.js → chunk-WVE6IP6G.js} +5 -5
  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-vGuAfNvT.d.mts} +12 -3
  38. package/dist/{index-D4tYbWC6.d.mts → index-vGuAfNvT.d.ts} +12 -3
  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 +2 -1
  46. package/dist/presets.d.ts +2 -1
  47. package/dist/presets.js +6 -5
  48. package/dist/presets.mjs +2 -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 +5 -5
package/dist/webpack4.js CHANGED
@@ -9,33 +9,33 @@
9
9
 
10
10
 
11
11
 
12
- var _chunk56QWZ2UMjs = require('./chunk-56QWZ2UM.js');
12
+ var _chunk35WZBSR2js = require('./chunk-35WZBSR2.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 _chunkWVE6IP6Gjs = require('./chunk-WVE6IP6G.js');
26
26
 
27
27
 
28
28
 
29
29
 
30
30
 
31
31
 
32
- var _chunkCOWTRJLMjs = require('./chunk-COWTRJLM.js');
33
- require('./chunk-4RUFPPI6.js');
34
- require('./chunk-FYYBY3VK.js');
32
+ var _chunkKUFBWA2Fjs = require('./chunk-KUFBWA2F.js');
33
+ require('./chunk-PO3CCFU7.js');
34
+ require('./chunk-LBZCKOMT.js');
35
35
 
36
36
 
37
37
  var _chunkDYLQ6UOIjs = require('./chunk-DYLQ6UOI.js');
38
- require('./chunk-Y6F6NBA7.js');
38
+ require('./chunk-HAM3JEU2.js');
39
39
 
40
40
  // src/bundlers/webpack/BaseUnifiedPlugin/v4.ts
41
41
  var _process = require('process'); var _process2 = _interopRequireDefault(_process);
@@ -53,7 +53,7 @@ function setupWebpackV4EmitHook(options) {
53
53
  refreshRuntimeState,
54
54
  debug: debug2
55
55
  } = options;
56
- compiler.hooks.emit.tapPromise(_chunkCOWTRJLMjs.pluginName, async (compilation) => {
56
+ compiler.hooks.emit.tapPromise(_chunkKUFBWA2Fjs.pluginName, async (compilation) => {
57
57
  await runtimeState.patchPromise;
58
58
  compilerOptions.onStart();
59
59
  debug2("start");
@@ -68,13 +68,13 @@ function setupWebpackV4EmitHook(options) {
68
68
  const jsAssets = /* @__PURE__ */ new Map();
69
69
  for (const [file] of entries) {
70
70
  if (compilerOptions.jsMatcher(file) || compilerOptions.wxsMatcher(file)) {
71
- const absolute = _chunkVPHA77FHjs.toAbsoluteOutputPath.call(void 0, file, outputDir);
71
+ const absolute = _chunkDOX3RXJ2js.toAbsoluteOutputPath.call(void 0, file, outputDir);
72
72
  jsAssets.set(absolute, file);
73
73
  }
74
74
  }
75
75
  const moduleGraphOptions = {
76
76
  resolve(specifier, importer) {
77
- return _chunkVPHA77FHjs.resolveOutputSpecifier.call(void 0, specifier, importer, outputDir, (candidate) => jsAssets.has(candidate));
77
+ return _chunkDOX3RXJ2js.resolveOutputSpecifier.call(void 0, specifier, importer, outputDir, (candidate) => jsAssets.has(candidate));
78
78
  },
79
79
  load: (id) => {
80
80
  const assetName = jsAssets.get(id);
@@ -119,7 +119,7 @@ function setupWebpackV4EmitHook(options) {
119
119
  const groupedEntries = _chunkDYLQ6UOIjs.getGroupedEntries.call(void 0, entries, compilerOptions);
120
120
  await refreshRuntimeState(true);
121
121
  await runtimeState.patchPromise;
122
- const runtimeSet = await _chunkCOWTRJLMjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
122
+ const runtimeSet = await _chunkKUFBWA2Fjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
123
123
  debug2("get runtimeSet, class count: %d", runtimeSet.size);
124
124
  const tasks = [];
125
125
  if (Array.isArray(groupedEntries.html)) {
@@ -156,14 +156,14 @@ function setupWebpackV4EmitHook(options) {
156
156
  const jsTaskFactories = [];
157
157
  if (Array.isArray(groupedEntries.js)) {
158
158
  for (const [file] of groupedEntries.js) {
159
- const cacheKey = _chunk56QWZ2UMjs.getCacheKey.call(void 0, file);
159
+ const cacheKey = _chunk35WZBSR2js.getCacheKey.call(void 0, file);
160
160
  const assetSource = compilation.assets[file];
161
161
  if (!assetSource) {
162
162
  continue;
163
163
  }
164
164
  const initialValue = assetSource.source();
165
165
  const initialRawSource = typeof initialValue === "string" ? initialValue : initialValue.toString();
166
- const absoluteFile = _chunkVPHA77FHjs.toAbsoluteOutputPath.call(void 0, file, outputDir);
166
+ const absoluteFile = _chunkDOX3RXJ2js.toAbsoluteOutputPath.call(void 0, file, outputDir);
167
167
  jsTaskFactories.push(async () => {
168
168
  await _chunkLTJQUORKjs.processCachedTask.call(void 0, {
169
169
  cache: compilerOptions.cache,
@@ -236,7 +236,7 @@ function setupWebpackV4EmitHook(options) {
236
236
  );
237
237
  }
238
238
  }
239
- _chunkVPHA77FHjs.pushConcurrentTaskFactories.call(void 0, tasks, jsTaskFactories);
239
+ _chunkDOX3RXJ2js.pushConcurrentTaskFactories.call(void 0, tasks, jsTaskFactories);
240
240
  await Promise.all(tasks);
241
241
  debug2("end");
242
242
  compilerOptions.onEnd();
@@ -259,9 +259,9 @@ function setupWebpackV4Loaders(options) {
259
259
  getClassSetInLoader,
260
260
  debug: debug2
261
261
  } = options;
262
- const isMpxApp = _chunk56QWZ2UMjs.isMpx.call(void 0, appType);
262
+ const isMpxApp = _chunk35WZBSR2js.isMpx.call(void 0, appType);
263
263
  if (shouldRewriteCssImports && isMpxApp) {
264
- _chunk56QWZ2UMjs.ensureMpxTailwindcssAliases.call(void 0, compiler, weappTailwindcssPackageDir2);
264
+ _chunk35WZBSR2js.ensureMpxTailwindcssAliases.call(void 0, compiler, weappTailwindcssPackageDir2);
265
265
  }
266
266
  const runtimeClassSetLoader = _nullishCoalesce(runtimeLoaderPath, () => ( _path2.default.resolve(__dirname, "./weapp-tw-runtime-classset-loader.js")));
267
267
  const runtimeCssImportRewriteLoader = shouldRewriteCssImports ? _nullishCoalesce(runtimeCssImportRewriteLoaderPath, () => ( _path2.default.resolve(__dirname, "./weapp-tw-css-import-rewrite-loader.js"))) : void 0;
@@ -274,12 +274,12 @@ function setupWebpackV4Loaders(options) {
274
274
  const classSetLoaderOptions = {
275
275
  getClassSet: getClassSetInLoader
276
276
  };
277
- const { findRewriteAnchor, findClassSetAnchor } = _chunk56QWZ2UMjs.createLoaderAnchorFinders.call(void 0, appType);
277
+ const { findRewriteAnchor, findClassSetAnchor } = _chunk35WZBSR2js.createLoaderAnchorFinders.call(void 0, appType);
278
278
  const cssImportRewriteLoaderOptions = runtimeLoaderRewriteOptions ? {
279
279
  rewriteCssImports: runtimeLoaderRewriteOptions
280
280
  } : void 0;
281
281
  if (runtimeCssImportRewriteLoader && shouldRewriteCssImports && cssImportRewriteLoaderOptions && isMpxApp) {
282
- _chunk56QWZ2UMjs.injectMpxCssRewritePreRules.call(void 0, compiler, runtimeCssImportRewriteLoader, cssImportRewriteLoaderOptions);
282
+ _chunk35WZBSR2js.injectMpxCssRewritePreRules.call(void 0, compiler, runtimeCssImportRewriteLoader, cssImportRewriteLoaderOptions);
283
283
  }
284
284
  const createRuntimeClassSetLoaderEntry = () => ({
285
285
  loader: runtimeClassSetLoader,
@@ -298,19 +298,19 @@ function setupWebpackV4Loaders(options) {
298
298
  type: null
299
299
  };
300
300
  };
301
- compiler.hooks.compilation.tap(_chunkCOWTRJLMjs.pluginName, (compilation) => {
302
- compilation.hooks.normalModuleLoader.tap(_chunkCOWTRJLMjs.pluginName, (_loaderContext, module) => {
301
+ compiler.hooks.compilation.tap(_chunkKUFBWA2Fjs.pluginName, (compilation) => {
302
+ compilation.hooks.normalModuleLoader.tap(_chunkKUFBWA2Fjs.pluginName, (_loaderContext, module) => {
303
303
  const hasRuntimeLoader = runtimeClassSetLoaderExists || runtimeCssImportRewriteLoaderExists;
304
304
  if (!hasRuntimeLoader) {
305
305
  return;
306
306
  }
307
- if (shouldRewriteCssImports && _chunk56QWZ2UMjs.isMpx.call(void 0, appType) && typeof _loaderContext.resolve === "function") {
308
- _chunk56QWZ2UMjs.patchMpxLoaderResolve.call(void 0, _loaderContext, weappTailwindcssPackageDir2, true);
307
+ if (shouldRewriteCssImports && _chunk35WZBSR2js.isMpx.call(void 0, appType) && typeof _loaderContext.resolve === "function") {
308
+ _chunk35WZBSR2js.patchMpxLoaderResolve.call(void 0, _loaderContext, weappTailwindcssPackageDir2, true);
309
309
  }
310
310
  const loaderEntries = module.loaders || [];
311
311
  let rewriteAnchorIdx = findRewriteAnchor(loaderEntries);
312
312
  const classSetAnchorIdx = findClassSetAnchor(loaderEntries);
313
- const isCssModule = _chunk56QWZ2UMjs.isCssLikeModuleResource.call(void 0, module.resource, compilerOptions.cssMatcher, appType);
313
+ const isCssModule = _chunk35WZBSR2js.isCssLikeModuleResource.call(void 0, module.resource, compilerOptions.cssMatcher, appType);
314
314
  if (_process2.default.env.WEAPP_TW_LOADER_DEBUG && isCssModule) {
315
315
  debug2("loader hook css module: %s loaders=%o anchors=%o", module.resource, loaderEntries.map((x) => x.loader), { rewriteAnchorIdx, classSetAnchorIdx });
316
316
  }
@@ -344,7 +344,7 @@ function setupWebpackV4Loaders(options) {
344
344
  rewriteAnchorIdx = findRewriteAnchor(loaderEntries);
345
345
  }
346
346
  }
347
- if (runtimeClassSetLoaderExists && !_chunk56QWZ2UMjs.hasLoaderEntry.call(void 0, loaderEntries, runtimeClassSetLoader)) {
347
+ if (runtimeClassSetLoaderExists && !_chunk35WZBSR2js.hasLoaderEntry.call(void 0, loaderEntries, runtimeClassSetLoader)) {
348
348
  const anchorIndex = findClassSetAnchor(loaderEntries);
349
349
  if (anchorIndex === -1) {
350
350
  anchorlessInsert(createRuntimeClassSetLoaderEntry(), "before");
@@ -358,11 +358,11 @@ function setupWebpackV4Loaders(options) {
358
358
  }
359
359
 
360
360
  // src/bundlers/webpack/BaseUnifiedPlugin/v4.ts
361
- var debug = _chunkCOWTRJLMjs.createDebug.call(void 0, );
362
- var weappTailwindcssPackageDir = _chunkVPHA77FHjs.resolvePackageDir.call(void 0, "weapp-tailwindcss");
361
+ var debug = _chunkKUFBWA2Fjs.createDebug.call(void 0, );
362
+ var weappTailwindcssPackageDir = _chunkDOX3RXJ2js.resolvePackageDir.call(void 0, "weapp-tailwindcss");
363
363
  var UnifiedWebpackPluginV4 = class {
364
364
  constructor(options = {}) {
365
- this.options = _chunkCOWTRJLMjs.getCompilerContext.call(void 0, options);
365
+ this.options = _chunkKUFBWA2Fjs.getCompilerContext.call(void 0, options);
366
366
  this.appType = this.options.appType;
367
367
  }
368
368
  apply(compiler) {
@@ -375,22 +375,22 @@ var UnifiedWebpackPluginV4 = class {
375
375
  twPatcher: initialTwPatcher,
376
376
  refreshTailwindcssPatcher
377
377
  } = this.options;
378
- const disabledOptions = _chunkVPHA77FHjs.resolveDisabledOptions.call(void 0, disabled);
378
+ const disabledOptions = _chunkDOX3RXJ2js.resolveDisabledOptions.call(void 0, disabled);
379
379
  const isTailwindcssV4 = (_nullishCoalesce(initialTwPatcher.majorVersion, () => ( 0))) >= 4;
380
380
  const shouldRewriteCssImports = isTailwindcssV4 && this.options.rewriteCssImports !== false && !disabledOptions.rewriteCssImports;
381
- const isMpxApp = _chunk56QWZ2UMjs.isMpx.call(void 0, this.appType);
381
+ const isMpxApp = _chunk35WZBSR2js.isMpx.call(void 0, this.appType);
382
382
  if (shouldRewriteCssImports) {
383
- _chunk56QWZ2UMjs.applyTailwindcssCssImportRewrite.call(void 0, compiler, {
383
+ _chunk35WZBSR2js.applyTailwindcssCssImportRewrite.call(void 0, compiler, {
384
384
  pkgDir: weappTailwindcssPackageDir,
385
385
  enabled: true,
386
386
  appType: this.appType
387
387
  });
388
- _chunk56QWZ2UMjs.setupMpxTailwindcssRedirect.call(void 0, weappTailwindcssPackageDir, isMpxApp);
388
+ _chunk35WZBSR2js.setupMpxTailwindcssRedirect.call(void 0, weappTailwindcssPackageDir, isMpxApp);
389
389
  }
390
390
  if (disabledOptions.plugin) {
391
391
  return;
392
392
  }
393
- const patchRecorderState = _chunkF345SX2Ijs.setupPatchRecorder.call(void 0, initialTwPatcher, this.options.tailwindcssBasedir, {
393
+ const patchRecorderState = _chunkWVE6IP6Gjs.setupPatchRecorder.call(void 0, initialTwPatcher, this.options.tailwindcssBasedir, {
394
394
  source: "runtime",
395
395
  cwd: _nullishCoalesce(this.options.tailwindcssBasedir, () => ( _process2.default.cwd()))
396
396
  });
@@ -401,12 +401,12 @@ var UnifiedWebpackPluginV4 = class {
401
401
  onPatchCompleted: patchRecorderState.onPatchCompleted
402
402
  };
403
403
  const refreshRuntimeState = async (force) => {
404
- await _chunkCOWTRJLMjs.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
404
+ await _chunkKUFBWA2Fjs.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
405
405
  };
406
406
  async function getClassSetInLoader() {
407
407
  await refreshRuntimeState(true);
408
408
  await runtimeState.patchPromise;
409
- await _chunkCOWTRJLMjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
409
+ await _chunkKUFBWA2Fjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
410
410
  }
411
411
  onLoad();
412
412
  setupWebpackV4Loaders({
package/dist/webpack4.mjs CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  isMpx,
10
10
  patchMpxLoaderResolve,
11
11
  setupMpxTailwindcssRedirect
12
- } from "./chunk-6HOJUSTX.mjs";
12
+ } from "./chunk-2HORYQCB.mjs";
13
13
  import {
14
14
  pushConcurrentTaskFactories,
15
15
  resolveDisabledOptions,
@@ -22,22 +22,22 @@ import {
22
22
  } from "./chunk-RRHPTTCP.mjs";
23
23
  import {
24
24
  setupPatchRecorder
25
- } from "./chunk-W7ETGQW7.mjs";
25
+ } from "./chunk-B76ICULV.mjs";
26
26
  import {
27
27
  collectRuntimeClassSet,
28
28
  createDebug,
29
29
  getCompilerContext,
30
30
  pluginName,
31
31
  refreshTailwindRuntimeState
32
- } from "./chunk-PUUBR36U.mjs";
32
+ } from "./chunk-FY4CU2TB.mjs";
33
33
  import "./chunk-7D27E7TU.mjs";
34
- import "./chunk-HWF5U4CI.mjs";
34
+ import "./chunk-EGOFMIDI.mjs";
35
35
  import {
36
36
  getGroupedEntries
37
37
  } from "./chunk-OOHJLO5M.mjs";
38
38
  import {
39
39
  __dirname
40
- } from "./chunk-SPH6SCTM.mjs";
40
+ } from "./chunk-47TVJCQM.mjs";
41
41
 
42
42
  // src/bundlers/webpack/BaseUnifiedPlugin/v4.ts
43
43
  import process3 from "process";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "weapp-tailwindcss",
3
- "version": "4.9.6",
3
+ "version": "4.9.8-alpha.0",
4
4
  "description": "把 tailwindcss 原子化样式思想,带给小程序开发者们! bring tailwindcss to miniprogram developers!",
5
5
  "author": "ice breaker <1324318532@qq.com>",
6
6
  "license": "MIT",
@@ -164,9 +164,9 @@
164
164
  },
165
165
  "dependencies": {
166
166
  "@ast-core/escape": "~1.0.1",
167
- "@babel/parser": "~7.28.6",
168
- "@babel/traverse": "~7.28.6",
169
- "@babel/types": "~7.28.6",
167
+ "@babel/parser": "~7.29.0",
168
+ "@babel/traverse": "~7.29.0",
169
+ "@babel/types": "~7.29.0",
170
170
  "@tailwindcss-mangle/config": "^6.1.0",
171
171
  "@vue/compiler-dom": "^3.5.27",
172
172
  "@vue/compiler-sfc": "^3.5.27",
@@ -185,7 +185,7 @@
185
185
  "webpack-sources": "3.3.3",
186
186
  "yaml": "^2.8.2",
187
187
  "@weapp-tailwindcss/logger": "1.1.0",
188
- "@weapp-tailwindcss/postcss": "2.1.3",
188
+ "@weapp-tailwindcss/postcss": "2.1.4-alpha.0",
189
189
  "@weapp-tailwindcss/shared": "1.1.2"
190
190
  },
191
191
  "scripts": {