weapp-tailwindcss 4.9.7 → 4.9.8

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 (49) hide show
  1. package/dist/{chunk-FNFWO6S4.mjs → chunk-77PO4QLM.mjs} +7 -5
  2. package/dist/{chunk-NSZXONXA.js → chunk-BJWGT5OD.js} +3 -3
  3. package/dist/{chunk-SCAC7G77.mjs → chunk-CKEQFURT.mjs} +2 -2
  4. package/dist/{chunk-EPL2YCB5.js → chunk-EAD4D7DF.js} +7 -5
  5. package/dist/{chunk-FM2RNYJD.mjs → chunk-M27GDCY2.mjs} +1 -1
  6. package/dist/{chunk-TBOY7KA4.mjs → chunk-N75TUIFJ.mjs} +2 -2
  7. package/dist/{chunk-MOOFLCLC.js → chunk-OW5UKXZU.js} +3 -3
  8. package/dist/{chunk-LST5YX7P.mjs → chunk-RGMNU44M.mjs} +3 -3
  9. package/dist/{chunk-JW43IVZB.mjs → chunk-W3JRVMJD.mjs} +1 -1
  10. package/dist/{chunk-I5PM7RZP.js → chunk-WJVKUHYW.js} +7 -7
  11. package/dist/{chunk-RIUV5UO7.js → chunk-YJDEI6WM.js} +13 -13
  12. package/dist/{chunk-UE6PEJJM.js → chunk-Z545JGD6.js} +24 -24
  13. package/dist/cli.js +9 -9
  14. package/dist/cli.mjs +1 -1
  15. package/dist/core.d.mts +1 -1
  16. package/dist/core.d.ts +1 -1
  17. package/dist/core.js +8 -8
  18. package/dist/core.mjs +2 -2
  19. package/dist/defaults.d.mts +1 -1
  20. package/dist/defaults.d.ts +1 -1
  21. package/dist/gulp.d.mts +1 -1
  22. package/dist/gulp.d.ts +1 -1
  23. package/dist/gulp.js +4 -4
  24. package/dist/gulp.mjs +3 -3
  25. package/dist/{index-CPJD_vjs.d.mts → index-vGuAfNvT.d.mts} +10 -1
  26. package/dist/{index-CPJD_vjs.d.ts → index-vGuAfNvT.d.ts} +10 -1
  27. package/dist/index.d.mts +1 -1
  28. package/dist/index.d.ts +1 -1
  29. package/dist/index.js +7 -7
  30. package/dist/index.mjs +6 -6
  31. package/dist/presets.d.mts +2 -1
  32. package/dist/presets.d.ts +2 -1
  33. package/dist/presets.js +1 -0
  34. package/dist/presets.mjs +1 -0
  35. package/dist/types.d.mts +2 -2
  36. package/dist/types.d.ts +2 -2
  37. package/dist/vite.d.mts +1 -1
  38. package/dist/vite.d.ts +1 -1
  39. package/dist/vite.js +4 -4
  40. package/dist/vite.mjs +3 -3
  41. package/dist/webpack.d.mts +1 -1
  42. package/dist/webpack.d.ts +1 -1
  43. package/dist/webpack.js +5 -5
  44. package/dist/webpack.mjs +4 -4
  45. package/dist/webpack4.d.mts +1 -1
  46. package/dist/webpack4.d.ts +1 -1
  47. package/dist/webpack4.js +24 -24
  48. package/dist/webpack4.mjs +3 -3
  49. package/package.json +5 -5
@@ -192,7 +192,7 @@ async function collectRuntimeClassSet(twPatcher, options = {}) {
192
192
  // package.json
193
193
  var package_default = {
194
194
  name: "weapp-tailwindcss",
195
- version: "4.9.7",
195
+ version: "4.9.8",
196
196
  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!",
197
197
  author: "ice breaker <1324318532@qq.com>",
198
198
  license: "MIT",
@@ -380,9 +380,9 @@ var package_default = {
380
380
  },
381
381
  dependencies: {
382
382
  "@ast-core/escape": "~1.0.1",
383
- "@babel/parser": "~7.28.6",
384
- "@babel/traverse": "~7.28.6",
385
- "@babel/types": "~7.28.6",
383
+ "@babel/parser": "~7.29.0",
384
+ "@babel/traverse": "~7.29.0",
385
+ "@babel/types": "~7.29.0",
386
386
  "@tailwindcss-mangle/config": "^6.1.0",
387
387
  "@vue/compiler-dom": "catalog:vue3",
388
388
  "@vue/compiler-sfc": "catalog:vue3",
@@ -2746,6 +2746,7 @@ function createHandlersFromContext(ctx, customAttributesEntities, cssCalcOptions
2746
2746
  cssPresetEnv,
2747
2747
  uniAppX,
2748
2748
  px2rpx,
2749
+ unitsToPx,
2749
2750
  arbitraryValues,
2750
2751
  jsPreserveClass,
2751
2752
  babelParserOptions,
@@ -2770,7 +2771,8 @@ function createHandlersFromContext(ctx, customAttributesEntities, cssCalcOptions
2770
2771
  cssPresetEnv,
2771
2772
  uniAppX,
2772
2773
  cssCalc: cssCalcOptions,
2773
- px2rpx
2774
+ px2rpx,
2775
+ unitsToPx
2774
2776
  });
2775
2777
  const jsHandler2 = createJsHandler({
2776
2778
  escapeMap,
@@ -1,14 +1,14 @@
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 _chunkEPL2YCB5js = require('./chunk-EPL2YCB5.js');
4
+ var _chunkEAD4D7DFjs = require('./chunk-EAD4D7DF.js');
5
5
 
6
6
 
7
7
  var _chunkPO3CCFU7js = require('./chunk-PO3CCFU7.js');
8
8
 
9
9
  // src/tailwindcss/recorder.ts
10
10
  function setupPatchRecorder(patcher, baseDir, options) {
11
- const recorder = _chunkEPL2YCB5js.createPatchTargetRecorder.call(void 0, baseDir, patcher, options);
11
+ const recorder = _chunkEAD4D7DFjs.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
14
  _chunkPO3CCFU7js.logger.info("%s%s", prefix, recorder.message);
@@ -16,7 +16,7 @@ function setupPatchRecorder(patcher, baseDir, options) {
16
16
  const onPatchCompleted = _optionalChain([recorder, 'optionalAccess', _4 => _4.onPatched]) ? async () => {
17
17
  await recorder.onPatched();
18
18
  } : void 0;
19
- const patchPromise = patcher ? _chunkEPL2YCB5js.createTailwindPatchPromise.call(void 0, patcher, onPatchCompleted) : Promise.resolve();
19
+ const patchPromise = patcher ? _chunkEAD4D7DFjs.createTailwindPatchPromise.call(void 0, patcher, onPatchCompleted) : Promise.resolve();
20
20
  return {
21
21
  recorder,
22
22
  patchPromise,
@@ -3,13 +3,13 @@ import {
3
3
  } from "./chunk-RRHPTTCP.mjs";
4
4
  import {
5
5
  setupPatchRecorder
6
- } from "./chunk-JW43IVZB.mjs";
6
+ } from "./chunk-W3JRVMJD.mjs";
7
7
  import {
8
8
  collectRuntimeClassSet,
9
9
  createDebug,
10
10
  getCompilerContext,
11
11
  refreshTailwindRuntimeState
12
- } from "./chunk-FNFWO6S4.mjs";
12
+ } from "./chunk-77PO4QLM.mjs";
13
13
 
14
14
  // src/bundlers/gulp/index.ts
15
15
  import { Buffer } from "buffer";
@@ -192,7 +192,7 @@ async function collectRuntimeClassSet(twPatcher, options = {}) {
192
192
  // package.json
193
193
  var package_default = {
194
194
  name: "weapp-tailwindcss",
195
- version: "4.9.7",
195
+ version: "4.9.8",
196
196
  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!",
197
197
  author: "ice breaker <1324318532@qq.com>",
198
198
  license: "MIT",
@@ -380,9 +380,9 @@ var package_default = {
380
380
  },
381
381
  dependencies: {
382
382
  "@ast-core/escape": "~1.0.1",
383
- "@babel/parser": "~7.28.6",
384
- "@babel/traverse": "~7.28.6",
385
- "@babel/types": "~7.28.6",
383
+ "@babel/parser": "~7.29.0",
384
+ "@babel/traverse": "~7.29.0",
385
+ "@babel/types": "~7.29.0",
386
386
  "@tailwindcss-mangle/config": "^6.1.0",
387
387
  "@vue/compiler-dom": "catalog:vue3",
388
388
  "@vue/compiler-sfc": "catalog:vue3",
@@ -2746,6 +2746,7 @@ function createHandlersFromContext(ctx, customAttributesEntities, cssCalcOptions
2746
2746
  cssPresetEnv,
2747
2747
  uniAppX,
2748
2748
  px2rpx,
2749
+ unitsToPx,
2749
2750
  arbitraryValues,
2750
2751
  jsPreserveClass,
2751
2752
  babelParserOptions,
@@ -2770,7 +2771,8 @@ function createHandlersFromContext(ctx, customAttributesEntities, cssCalcOptions
2770
2771
  cssPresetEnv,
2771
2772
  uniAppX,
2772
2773
  cssCalc: cssCalcOptions,
2773
- px2rpx
2774
+ px2rpx,
2775
+ unitsToPx
2774
2776
  });
2775
2777
  const jsHandler2 = createJsHandler({
2776
2778
  escapeMap,
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-F2CKKG6Q.mjs";
4
4
  import {
5
5
  pluginName
6
- } from "./chunk-FNFWO6S4.mjs";
6
+ } from "./chunk-77PO4QLM.mjs";
7
7
 
8
8
  // src/shared/mpx.ts
9
9
  import path2 from "path";
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-RRHPTTCP.mjs";
13
13
  import {
14
14
  setupPatchRecorder
15
- } from "./chunk-JW43IVZB.mjs";
15
+ } from "./chunk-W3JRVMJD.mjs";
16
16
  import {
17
17
  collectRuntimeClassSet,
18
18
  createAttributeMatcher,
@@ -23,7 +23,7 @@ import {
23
23
  replaceWxml,
24
24
  toCustomAttributesEntities,
25
25
  vitePluginName
26
- } from "./chunk-FNFWO6S4.mjs";
26
+ } from "./chunk-77PO4QLM.mjs";
27
27
  import {
28
28
  getGroupedEntries,
29
29
  resolveUniUtsPlatform
@@ -3,7 +3,7 @@
3
3
  var _chunkDOX3RXJ2js = require('./chunk-DOX3RXJ2.js');
4
4
 
5
5
 
6
- var _chunkEPL2YCB5js = require('./chunk-EPL2YCB5.js');
6
+ var _chunkEAD4D7DFjs = require('./chunk-EAD4D7DF.js');
7
7
 
8
8
  // src/shared/mpx.ts
9
9
  var _path = require('path'); var _path2 = _interopRequireDefault(_path);
@@ -154,8 +154,8 @@ function applyTailwindcssCssImportRewrite(compiler, options) {
154
154
  if (!options.enabled) {
155
155
  return;
156
156
  }
157
- compiler.hooks.normalModuleFactory.tap(_chunkEPL2YCB5js.pluginName, (factory) => {
158
- factory.hooks.beforeResolve.tap(_chunkEPL2YCB5js.pluginName, (data) => {
157
+ compiler.hooks.normalModuleFactory.tap(_chunkEAD4D7DFjs.pluginName, (factory) => {
158
+ factory.hooks.beforeResolve.tap(_chunkEAD4D7DFjs.pluginName, (data) => {
159
159
  rewriteTailwindcssRequestForCss(data, options.pkgDir, options.appType);
160
160
  });
161
161
  });
@@ -9,7 +9,7 @@ import {
9
9
  isMpx,
10
10
  patchMpxLoaderResolve,
11
11
  setupMpxTailwindcssRedirect
12
- } from "./chunk-FM2RNYJD.mjs";
12
+ } from "./chunk-M27GDCY2.mjs";
13
13
  import {
14
14
  pushConcurrentTaskFactories,
15
15
  resolveDisabledOptions,
@@ -22,14 +22,14 @@ import {
22
22
  } from "./chunk-RRHPTTCP.mjs";
23
23
  import {
24
24
  setupPatchRecorder
25
- } from "./chunk-JW43IVZB.mjs";
25
+ } from "./chunk-W3JRVMJD.mjs";
26
26
  import {
27
27
  collectRuntimeClassSet,
28
28
  createDebug,
29
29
  getCompilerContext,
30
30
  pluginName,
31
31
  refreshTailwindRuntimeState
32
- } from "./chunk-FNFWO6S4.mjs";
32
+ } from "./chunk-77PO4QLM.mjs";
33
33
  import {
34
34
  getGroupedEntries
35
35
  } from "./chunk-OOHJLO5M.mjs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createPatchTargetRecorder,
3
3
  createTailwindPatchPromise
4
- } from "./chunk-FNFWO6S4.mjs";
4
+ } from "./chunk-77PO4QLM.mjs";
5
5
  import {
6
6
  logger
7
7
  } from "./chunk-7D27E7TU.mjs";
@@ -3,13 +3,13 @@
3
3
  var _chunkLTJQUORKjs = require('./chunk-LTJQUORK.js');
4
4
 
5
5
 
6
- var _chunkNSZXONXAjs = require('./chunk-NSZXONXA.js');
6
+ var _chunkBJWGT5ODjs = require('./chunk-BJWGT5OD.js');
7
7
 
8
8
 
9
9
 
10
10
 
11
11
 
12
- var _chunkEPL2YCB5js = require('./chunk-EPL2YCB5.js');
12
+ var _chunkEAD4D7DFjs = require('./chunk-EAD4D7DF.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 = _chunkEPL2YCB5js.createDebug.call(void 0, );
20
+ var debug = _chunkEAD4D7DFjs.createDebug.call(void 0, );
21
21
  var Transform = _stream2.default.Transform;
22
22
  function createPlugins(options = {}) {
23
- const opts = _chunkEPL2YCB5js.getCompilerContext.call(void 0, options);
23
+ const opts = _chunkEAD4D7DFjs.getCompilerContext.call(void 0, options);
24
24
  const { templateHandler, styleHandler, jsHandler, cache, twPatcher: initialTwPatcher, refreshTailwindcssPatcher } = opts;
25
- const patchRecorderState = _chunkNSZXONXAjs.setupPatchRecorder.call(void 0, initialTwPatcher, opts.tailwindcssBasedir, {
25
+ const patchRecorderState = _chunkBJWGT5ODjs.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 _chunkEPL2YCB5js.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
39
+ await _chunkEAD4D7DFjs.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 _chunkEPL2YCB5js.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force, skipRefresh: force });
47
+ runtimeSet = await _chunkEAD4D7DFjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force, skipRefresh: force });
48
48
  runtimeSetInitialized = true;
49
49
  return runtimeSet;
50
50
  }
@@ -12,7 +12,7 @@ var _chunkDOX3RXJ2js = require('./chunk-DOX3RXJ2.js');
12
12
  var _chunkLTJQUORKjs = require('./chunk-LTJQUORK.js');
13
13
 
14
14
 
15
- var _chunkNSZXONXAjs = require('./chunk-NSZXONXA.js');
15
+ var _chunkBJWGT5ODjs = require('./chunk-BJWGT5OD.js');
16
16
 
17
17
 
18
18
 
@@ -23,7 +23,7 @@ var _chunkNSZXONXAjs = require('./chunk-NSZXONXA.js');
23
23
 
24
24
 
25
25
 
26
- var _chunkEPL2YCB5js = require('./chunk-EPL2YCB5.js');
26
+ var _chunkEAD4D7DFjs = require('./chunk-EAD4D7DF.js');
27
27
 
28
28
 
29
29
 
@@ -54,7 +54,7 @@ function updateStaticAttribute(ms, prop) {
54
54
  const start = prop.value.loc.start.offset + 1;
55
55
  const end = prop.value.loc.end.offset - 1;
56
56
  if (start < end) {
57
- ms.update(start, end, _chunkEPL2YCB5js.replaceWxml.call(void 0, prop.value.content));
57
+ ms.update(start, end, _chunkEAD4D7DFjs.replaceWxml.call(void 0, prop.value.content));
58
58
  }
59
59
  }
60
60
  function updateDirectiveExpression(ms, prop, jsHandler, runtimeSet) {
@@ -66,7 +66,7 @@ function updateDirectiveExpression(ms, prop, jsHandler, runtimeSet) {
66
66
  if (start >= end) {
67
67
  return;
68
68
  }
69
- const generated = _chunkEPL2YCB5js.generateCode.call(void 0, prop.exp.content, {
69
+ const generated = _chunkEAD4D7DFjs.generateCode.call(void 0, prop.exp.content, {
70
70
  jsHandler,
71
71
  runtimeSet,
72
72
  wrapExpression: true
@@ -95,7 +95,7 @@ function transformUVue(code, id, jsHandler, runtimeSet, options = {}) {
95
95
  return;
96
96
  }
97
97
  const { customAttributesEntities, disabledDefaultTemplateHandler = false } = options;
98
- const matchCustomAttribute = _chunkEPL2YCB5js.createAttributeMatcher.call(void 0, customAttributesEntities);
98
+ const matchCustomAttribute = _chunkEAD4D7DFjs.createAttributeMatcher.call(void 0, customAttributesEntities);
99
99
  const ms = new (0, _magicstring2.default)(code);
100
100
  const { descriptor, errors } = _compilersfc.parse.call(void 0, code);
101
101
  if (errors.length === 0) {
@@ -677,7 +677,7 @@ function createRewriteCssImportsPlugins(options) {
677
677
  const { appType, weappTailwindcssDirPosix: weappTailwindcssDirPosix2 } = options;
678
678
  return [
679
679
  {
680
- name: `${_chunkEPL2YCB5js.vitePluginName}:rewrite-css-imports`,
680
+ name: `${_chunkEAD4D7DFjs.vitePluginName}:rewrite-css-imports`,
681
681
  enforce: "pre",
682
682
  resolveId: {
683
683
  order: "pre",
@@ -719,12 +719,12 @@ function createRewriteCssImportsPlugins(options) {
719
719
  }
720
720
 
721
721
  // src/bundlers/vite/index.ts
722
- var debug = _chunkEPL2YCB5js.createDebug.call(void 0, );
722
+ var debug = _chunkEAD4D7DFjs.createDebug.call(void 0, );
723
723
  var weappTailwindcssPackageDir = _chunkDOX3RXJ2js.resolvePackageDir.call(void 0, "weapp-tailwindcss");
724
724
  var weappTailwindcssDirPosix = slash(weappTailwindcssPackageDir);
725
725
  function UnifiedViteWeappTailwindcssPlugin(options = {}) {
726
726
  const rewriteCssImportsSpecified = Object.prototype.hasOwnProperty.call(options, "rewriteCssImports");
727
- const opts = _chunkEPL2YCB5js.getCompilerContext.call(void 0, options);
727
+ const opts = _chunkEAD4D7DFjs.getCompilerContext.call(void 0, options);
728
728
  const {
729
729
  disabled,
730
730
  customAttributes,
@@ -749,8 +749,8 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
749
749
  if (disabledOptions.plugin) {
750
750
  return rewritePlugins.length ? rewritePlugins : void 0;
751
751
  }
752
- const customAttributesEntities = _chunkEPL2YCB5js.toCustomAttributesEntities.call(void 0, customAttributes);
753
- const patchRecorderState = _chunkNSZXONXAjs.setupPatchRecorder.call(void 0, initialTwPatcher, opts.tailwindcssBasedir, {
752
+ const customAttributesEntities = _chunkEAD4D7DFjs.toCustomAttributesEntities.call(void 0, customAttributes);
753
+ const patchRecorderState = _chunkBJWGT5ODjs.setupPatchRecorder.call(void 0, initialTwPatcher, opts.tailwindcssBasedir, {
754
754
  source: "runtime",
755
755
  cwd: _nullishCoalesce(opts.tailwindcssBasedir, () => ( _process2.default.cwd()))
756
756
  });
@@ -764,7 +764,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
764
764
  let runtimeSetPromise;
765
765
  let resolvedConfig;
766
766
  async function refreshRuntimeState(force) {
767
- const refreshed = await _chunkEPL2YCB5js.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
767
+ const refreshed = await _chunkEAD4D7DFjs.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
768
768
  if (refreshed) {
769
769
  runtimeSet = void 0;
770
770
  runtimeSetPromise = void 0;
@@ -777,7 +777,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
777
777
  return runtimeSet;
778
778
  }
779
779
  if (force || !runtimeSetPromise) {
780
- const task2 = _chunkEPL2YCB5js.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, {
780
+ const task2 = _chunkEAD4D7DFjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, {
781
781
  force: force || !runtimeSet,
782
782
  skipRefresh: force
783
783
  });
@@ -812,7 +812,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
812
812
  const plugins = [
813
813
  ...rewritePlugins,
814
814
  {
815
- name: `${_chunkEPL2YCB5js.vitePluginName}:post`,
815
+ name: `${_chunkEAD4D7DFjs.vitePluginName}:post`,
816
816
  enforce: "post",
817
817
  configResolved(config) {
818
818
  resolvedConfig = config;
@@ -9,7 +9,7 @@
9
9
 
10
10
 
11
11
 
12
- var _chunkMOOFLCLCjs = require('./chunk-MOOFLCLC.js');
12
+ var _chunkOW5UKXZUjs = require('./chunk-OW5UKXZU.js');
13
13
 
14
14
 
15
15
 
@@ -22,14 +22,14 @@ var _chunkDOX3RXJ2js = require('./chunk-DOX3RXJ2.js');
22
22
  var _chunkLTJQUORKjs = require('./chunk-LTJQUORK.js');
23
23
 
24
24
 
25
- var _chunkNSZXONXAjs = require('./chunk-NSZXONXA.js');
25
+ var _chunkBJWGT5ODjs = require('./chunk-BJWGT5OD.js');
26
26
 
27
27
 
28
28
 
29
29
 
30
30
 
31
31
 
32
- var _chunkEPL2YCB5js = require('./chunk-EPL2YCB5.js');
32
+ var _chunkEAD4D7DFjs = require('./chunk-EAD4D7DF.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(_chunkEPL2YCB5js.pluginName, (compilation) => {
54
+ compiler.hooks.compilation.tap(_chunkEAD4D7DFjs.pluginName, (compilation) => {
55
55
  compilation.hooks.processAssets.tapPromise(
56
56
  {
57
- name: _chunkEPL2YCB5js.pluginName,
57
+ name: _chunkEAD4D7DFjs.pluginName,
58
58
  stage: Compilation.PROCESS_ASSETS_STAGE_SUMMARIZE
59
59
  },
60
60
  async (assets) => {
@@ -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 _chunkEPL2YCB5js.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
126
+ const runtimeSet = await _chunkEAD4D7DFjs.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,7 +160,7 @@ 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 = _chunkMOOFLCLCjs.getCacheKey.call(void 0, file);
163
+ const cacheKey = _chunkOW5UKXZUjs.getCacheKey.call(void 0, file);
164
164
  const asset = compilation.getAsset(file);
165
165
  if (!asset) {
166
166
  continue;
@@ -265,9 +265,9 @@ function setupWebpackV5Loaders(options) {
265
265
  getClassSetInLoader,
266
266
  debug: debug2
267
267
  } = options;
268
- const isMpxApp = _chunkMOOFLCLCjs.isMpx.call(void 0, appType);
268
+ const isMpxApp = _chunkOW5UKXZUjs.isMpx.call(void 0, appType);
269
269
  if (shouldRewriteCssImports && isMpxApp) {
270
- _chunkMOOFLCLCjs.ensureMpxTailwindcssAliases.call(void 0, compiler, weappTailwindcssPackageDir2);
270
+ _chunkOW5UKXZUjs.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 } = _chunkMOOFLCLCjs.createLoaderAnchorFinders.call(void 0, appType);
283
+ const { findRewriteAnchor, findClassSetAnchor } = _chunkOW5UKXZUjs.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
- _chunkMOOFLCLCjs.injectMpxCssRewritePreRules.call(void 0, compiler, runtimeCssImportRewriteLoader, cssImportRewriteLoaderOptions);
288
+ _chunkOW5UKXZUjs.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(_chunkEPL2YCB5js.pluginName, (compilation) => {
309
- NormalModule.getCompilationHooks(compilation).loader.tap(_chunkEPL2YCB5js.pluginName, (_loaderContext, module) => {
308
+ compiler.hooks.compilation.tap(_chunkEAD4D7DFjs.pluginName, (compilation) => {
309
+ NormalModule.getCompilationHooks(compilation).loader.tap(_chunkEAD4D7DFjs.pluginName, (_loaderContext, module) => {
310
310
  const hasRuntimeLoader = runtimeClassSetLoaderExists || runtimeCssImportRewriteLoaderExists;
311
311
  if (!hasRuntimeLoader) {
312
312
  return;
313
313
  }
314
- _chunkMOOFLCLCjs.patchMpxLoaderResolve.call(void 0, _loaderContext, weappTailwindcssPackageDir2, shouldRewriteCssImports && isMpxApp);
314
+ _chunkOW5UKXZUjs.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 = _chunkMOOFLCLCjs.isCssLikeModuleResource.call(void 0, module.resource, compilerOptions.cssMatcher, appType);
318
+ const isCssModule = _chunkOW5UKXZUjs.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 && !_chunkMOOFLCLCjs.hasLoaderEntry.call(void 0, loaderEntries, runtimeClassSetLoader)) {
350
+ if (runtimeClassSetLoaderExists && !_chunkOW5UKXZUjs.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 = _chunkEPL2YCB5js.createDebug.call(void 0, );
365
+ var debug = _chunkEAD4D7DFjs.createDebug.call(void 0, );
366
366
  var weappTailwindcssPackageDir = _chunkDOX3RXJ2js.resolvePackageDir.call(void 0, "weapp-tailwindcss");
367
367
  var UnifiedWebpackPluginV5 = class {
368
368
  constructor(options = {}) {
369
- this.options = _chunkEPL2YCB5js.getCompilerContext.call(void 0, options);
369
+ this.options = _chunkEAD4D7DFjs.getCompilerContext.call(void 0, options);
370
370
  this.appType = this.options.appType;
371
371
  }
372
372
  apply(compiler) {
@@ -382,19 +382,19 @@ var UnifiedWebpackPluginV5 = class {
382
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 = _chunkMOOFLCLCjs.isMpx.call(void 0, this.appType);
385
+ const isMpxApp = _chunkOW5UKXZUjs.isMpx.call(void 0, this.appType);
386
386
  if (shouldRewriteCssImports) {
387
- _chunkMOOFLCLCjs.applyTailwindcssCssImportRewrite.call(void 0, compiler, {
387
+ _chunkOW5UKXZUjs.applyTailwindcssCssImportRewrite.call(void 0, compiler, {
388
388
  pkgDir: weappTailwindcssPackageDir,
389
389
  enabled: true,
390
390
  appType: this.appType
391
391
  });
392
- _chunkMOOFLCLCjs.setupMpxTailwindcssRedirect.call(void 0, weappTailwindcssPackageDir, isMpxApp);
392
+ _chunkOW5UKXZUjs.setupMpxTailwindcssRedirect.call(void 0, weappTailwindcssPackageDir, isMpxApp);
393
393
  }
394
394
  if (disabledOptions.plugin) {
395
395
  return;
396
396
  }
397
- const patchRecorderState = _chunkNSZXONXAjs.setupPatchRecorder.call(void 0, initialTwPatcher, this.options.tailwindcssBasedir, {
397
+ const patchRecorderState = _chunkBJWGT5ODjs.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 _chunkEPL2YCB5js.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
408
+ await _chunkEAD4D7DFjs.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 _chunkEPL2YCB5js.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
413
+ await _chunkEAD4D7DFjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force: true, skipRefresh: true });
414
414
  }
415
415
  onLoad();
416
416
  setupWebpackV5Loaders({
package/dist/cli.js CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkEPL2YCB5js = require('./chunk-EPL2YCB5.js');
6
+ var _chunkEAD4D7DFjs = require('./chunk-EAD4D7DF.js');
7
7
 
8
8
 
9
9
 
@@ -404,9 +404,9 @@ async function patchWorkspacePackage(workspaceRoot, dir, pkgName, options) {
404
404
  try {
405
405
  const patcher = createWorkspacePatcher(dir);
406
406
  if (options.clearCache) {
407
- await _chunkEPL2YCB5js.clearTailwindcssPatcherCache.call(void 0, patcher, { removeDirectory: true });
407
+ await _chunkEAD4D7DFjs.clearTailwindcssPatcherCache.call(void 0, patcher, { removeDirectory: true });
408
408
  }
409
- const recorder = _chunkEPL2YCB5js.createPatchTargetRecorder.call(void 0, dir, patcher, {
409
+ const recorder = _chunkEAD4D7DFjs.createPatchTargetRecorder.call(void 0, dir, patcher, {
410
410
  source: "cli",
411
411
  cwd: dir,
412
412
  recordTarget: options.recordTarget !== false,
@@ -415,7 +415,7 @@ async function patchWorkspacePackage(workspaceRoot, dir, pkgName, options) {
415
415
  if (_optionalChain([recorder, 'optionalAccess', _12 => _12.message])) {
416
416
  _chunkPO3CCFU7js.logger.info("[workspace] %s %s", displayName, recorder.message);
417
417
  }
418
- _chunkEPL2YCB5js.logTailwindcssTarget.call(void 0, "cli", patcher, dir);
418
+ _chunkEAD4D7DFjs.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();
@@ -546,9 +546,9 @@ var mountOptions = {
546
546
  }
547
547
  const patcher = await createPatcherWithDefaultExtendLengthUnits(ctx);
548
548
  if (shouldClearCache) {
549
- await _chunkEPL2YCB5js.clearTailwindcssPatcherCache.call(void 0, patcher, { removeDirectory: true });
549
+ await _chunkEAD4D7DFjs.clearTailwindcssPatcherCache.call(void 0, patcher, { removeDirectory: true });
550
550
  }
551
- const recorder = _chunkEPL2YCB5js.createPatchTargetRecorder.call(void 0, ctx.cwd, patcher, {
551
+ const recorder = _chunkEAD4D7DFjs.createPatchTargetRecorder.call(void 0, ctx.cwd, patcher, {
552
552
  source: "cli",
553
553
  cwd: ctx.cwd,
554
554
  recordTarget: shouldRecordTarget,
@@ -557,7 +557,7 @@ var mountOptions = {
557
557
  if (_optionalChain([recorder, 'optionalAccess', _15 => _15.message])) {
558
558
  _chunkPO3CCFU7js.logger.info(recorder.message);
559
559
  }
560
- _chunkEPL2YCB5js.logTailwindcssTarget.call(void 0, "cli", patcher, ctx.cwd);
560
+ _chunkEAD4D7DFjs.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();
@@ -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, _chunkEPL2YCB5js.WEAPP_TW_REQUIRED_NODE_VERSION)) {
708
+ if (_semver2.default.lt(_process2.default.versions.node, _chunkEAD4D7DFjs.WEAPP_TW_REQUIRED_NODE_VERSION)) {
709
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.`
710
+ `You are using Node.js ${_process2.default.versions.node}. For weapp-tailwindcss, Node.js version >= v${_chunkEAD4D7DFjs.WEAPP_TW_REQUIRED_NODE_VERSION} is required.`
711
711
  );
712
712
  }
713
713
  var cli = _tailwindcsspatch.createTailwindcssPatchCli.call(void 0, {
package/dist/cli.mjs CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  clearTailwindcssPatcherCache,
4
4
  createPatchTargetRecorder,
5
5
  logTailwindcssTarget
6
- } from "./chunk-FNFWO6S4.mjs";
6
+ } from "./chunk-77PO4QLM.mjs";
7
7
  import {
8
8
  findWorkspaceRoot,
9
9
  logger
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-CPJD_vjs.mjs';
3
+ import { U as UserDefinedOptions } from './index-vGuAfNvT.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-CPJD_vjs.js';
3
+ import { U as UserDefinedOptions } from './index-vGuAfNvT.js';
4
4
  import { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss';
5
5
  import '@babel/parser';
6
6
  import 'magic-string';