weapp-tailwindcss 4.9.5 → 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-DUNUSQPW.js → chunk-EPL2YCB5.js} +10 -10
  5. package/dist/{chunk-DCYV3N3T.mjs → chunk-FM2RNYJD.mjs} +1 -1
  6. package/dist/{chunk-2SD5C6P5.mjs → chunk-FNFWO6S4.mjs} +3 -3
  7. package/dist/{chunk-Y6F6NBA7.js → chunk-HAM3JEU2.js} +1 -1
  8. package/dist/{chunk-WNFPFNXO.js → chunk-I5PM7RZP.js} +7 -7
  9. package/dist/{chunk-SDVCC3VG.mjs → chunk-JW43IVZB.mjs} +1 -1
  10. package/dist/{chunk-FYYBY3VK.js → chunk-LBZCKOMT.js} +1 -1
  11. package/dist/{chunk-CCJHSRUV.mjs → chunk-LST5YX7P.mjs} +4 -4
  12. package/dist/{chunk-5PICNI6R.js → chunk-MOOFLCLC.js} +5 -5
  13. package/dist/{chunk-EHI5UUJ2.js → chunk-NSZXONXA.js} +5 -5
  14. package/dist/{chunk-4RUFPPI6.js → chunk-PO3CCFU7.js} +4 -4
  15. package/dist/{chunk-CQSMFX4I.js → chunk-RIUV5UO7.js} +23 -23
  16. package/dist/{chunk-H3FNFKOH.mjs → chunk-SCAC7G77.mjs} +2 -2
  17. package/dist/{chunk-3NHQQWE3.mjs → chunk-TBOY7KA4.mjs} +2 -2
  18. package/dist/{chunk-4H6IVC77.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.mts → index-CPJD_vjs.d.mts} +2 -2
  38. package/dist/{index-D4tYbWC6.d.ts → 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 +3 -3
@@ -1,4 +1,4 @@
1
- // ../../node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.55.2_@types+node@24.10.9__@swc+core@1.15.10_@swc+_ff0c9e72feaa13fcd6be33c9c3d4ff4d/node_modules/tsup/assets/esm_shims.js
1
+ // ../../node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.55.2_@types+node@24.10.9__@swc+core@1.15.11_@swc+_520f18ca95525f35cebc2ff127e63f14/node_modules/tsup/assets/esm_shims.js
2
2
  import path from "path";
3
3
  import { fileURLToPath } from "url";
4
4
  var getFilename = () => fileURLToPath(import.meta.url);
@@ -1,6 +1,6 @@
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 _chunkY6F6NBA7js = require('./chunk-Y6F6NBA7.js');
3
+ var _chunkHAM3JEU2js = require('./chunk-HAM3JEU2.js');
4
4
 
5
5
  // src/utils/disabled.ts
6
6
  function resolveDisabledOptions(disabled) {
@@ -19,7 +19,7 @@ function resolveDisabledOptions(disabled) {
19
19
  // src/utils/resolve-package.ts
20
20
  var _module = require('module');
21
21
  var _path = require('path'); var _path2 = _interopRequireDefault(_path);
22
- var require2 = _module.createRequire.call(void 0, _chunkY6F6NBA7js.importMetaUrl);
22
+ var require2 = _module.createRequire.call(void 0, _chunkHAM3JEU2js.importMetaUrl);
23
23
  function resolvePackageDir(name) {
24
24
  const pkgPath = require2.resolve(`${name}/package.json`);
25
25
  return _path2.default.dirname(pkgPath);
@@ -99,7 +99,7 @@ function getDefaultOptions() {
99
99
  },
100
100
  disabledDefaultTemplateHandler: false,
101
101
  cssSelectorReplacement: {
102
- root: ["page", ".tw-root"],
102
+ root: ["page", ".tw-root", "wx-root-portal-content"],
103
103
  universal: ["view", "text"]
104
104
  },
105
105
  babelParserOptions: {
@@ -3,10 +3,10 @@
3
3
 
4
4
 
5
5
 
6
- var _chunk4RUFPPI6js = require('./chunk-4RUFPPI6.js');
6
+ var _chunkPO3CCFU7js = require('./chunk-PO3CCFU7.js');
7
7
 
8
8
 
9
- var _chunkFYYBY3VKjs = require('./chunk-FYYBY3VK.js');
9
+ var _chunkLBZCKOMTjs = require('./chunk-LBZCKOMT.js');
10
10
 
11
11
 
12
12
 
@@ -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.5",
195
+ version: "4.9.7",
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",
@@ -386,7 +386,7 @@ var package_default = {
386
386
  "@tailwindcss-mangle/config": "^6.1.0",
387
387
  "@vue/compiler-dom": "catalog:vue3",
388
388
  "@vue/compiler-sfc": "catalog:vue3",
389
- "@weapp-core/escape": "~6.0.1",
389
+ "@weapp-core/escape": "~7.0.0",
390
390
  "@weapp-core/regex": "~1.0.1",
391
391
  "@weapp-tailwindcss/logger": "workspace:*",
392
392
  "@weapp-tailwindcss/postcss": "workspace:*",
@@ -549,7 +549,7 @@ function formatRelativeToBase(targetPath, baseDir) {
549
549
  }
550
550
  function resolveRecordLocation(baseDir) {
551
551
  const normalizedBase = _path2.default.normalize(baseDir);
552
- const packageRoot = _nullishCoalesce(_chunk4RUFPPI6js.findNearestPackageRoot.call(void 0, normalizedBase), () => ( normalizedBase));
552
+ const packageRoot = _nullishCoalesce(_chunkPO3CCFU7js.findNearestPackageRoot.call(void 0, normalizedBase), () => ( normalizedBase));
553
553
  const packageJsonPath = _path2.default.join(packageRoot, "package.json");
554
554
  const hasPackageJson = _fs.existsSync.call(void 0, packageJsonPath);
555
555
  const recordKeySource = hasPackageJson ? packageJsonPath : normalizedBase;
@@ -2848,20 +2848,20 @@ async function clearTailwindcssPatcherCache(patcher, options) {
2848
2848
  function createInternalCompilerContext(opts) {
2849
2849
  const ctx = _chunkDYLQ6UOIjs.defuOverrideArray.call(void 0,
2850
2850
  opts,
2851
- _chunkFYYBY3VKjs.getDefaultOptions.call(void 0, ),
2851
+ _chunkLBZCKOMTjs.getDefaultOptions.call(void 0, ),
2852
2852
  {}
2853
2853
  );
2854
2854
  ctx.escapeMap = ctx.customReplaceDictionary;
2855
2855
  applyLoggerLevel(ctx.logLevel);
2856
- const twPatcher = _chunk4RUFPPI6js.createTailwindcssPatcherFromContext.call(void 0, ctx);
2856
+ const twPatcher = _chunkPO3CCFU7js.createTailwindcssPatcherFromContext.call(void 0, ctx);
2857
2857
  logTailwindcssTarget("runtime", twPatcher, ctx.tailwindcssBasedir);
2858
2858
  if (_optionalChain([twPatcher, 'access', _95 => _95.packageInfo, 'optionalAccess', _96 => _96.version])) {
2859
2859
  _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)))}`);
2860
2860
  } else {
2861
2861
  _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`);
2862
2862
  }
2863
- _chunk4RUFPPI6js.warnMissingCssEntries.call(void 0, ctx, twPatcher);
2864
- const cssCalcOptions = _chunk4RUFPPI6js.applyV4CssCalcDefaults.call(void 0, ctx.cssCalc, twPatcher);
2863
+ _chunkPO3CCFU7js.warnMissingCssEntries.call(void 0, ctx, twPatcher);
2864
+ const cssCalcOptions = _chunkPO3CCFU7js.applyV4CssCalcDefaults.call(void 0, ctx.cssCalc, twPatcher);
2865
2865
  ctx.cssCalc = cssCalcOptions;
2866
2866
  const customAttributesEntities = toCustomAttributesEntities(ctx.customAttributes);
2867
2867
  const { styleHandler, jsHandler: jsHandler2, templateHandler } = createHandlersFromContext(
@@ -2880,7 +2880,7 @@ function createInternalCompilerContext(opts) {
2880
2880
  await clearTailwindcssPatcherCache(previousPatcher);
2881
2881
  }
2882
2882
  invalidateRuntimeClassSet(previousPatcher);
2883
- const nextPatcher = _chunk4RUFPPI6js.createTailwindcssPatcherFromContext.call(void 0, ctx);
2883
+ const nextPatcher = _chunkPO3CCFU7js.createTailwindcssPatcherFromContext.call(void 0, ctx);
2884
2884
  Object.assign(previousPatcher, nextPatcher);
2885
2885
  ctx.twPatcher = previousPatcher;
2886
2886
  return previousPatcher;
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-F2CKKG6Q.mjs";
4
4
  import {
5
5
  pluginName
6
- } from "./chunk-2SD5C6P5.mjs";
6
+ } from "./chunk-FNFWO6S4.mjs";
7
7
 
8
8
  // src/shared/mpx.ts
9
9
  import path2 from "path";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-7D27E7TU.mjs";
7
7
  import {
8
8
  getDefaultOptions
9
- } from "./chunk-HWF5U4CI.mjs";
9
+ } from "./chunk-EGOFMIDI.mjs";
10
10
  import {
11
11
  defuOverrideArray,
12
12
  isMap
@@ -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.5",
195
+ version: "4.9.7",
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",
@@ -386,7 +386,7 @@ var package_default = {
386
386
  "@tailwindcss-mangle/config": "^6.1.0",
387
387
  "@vue/compiler-dom": "catalog:vue3",
388
388
  "@vue/compiler-sfc": "catalog:vue3",
389
- "@weapp-core/escape": "~6.0.1",
389
+ "@weapp-core/escape": "~7.0.0",
390
390
  "@weapp-core/regex": "~1.0.1",
391
391
  "@weapp-tailwindcss/logger": "workspace:*",
392
392
  "@weapp-tailwindcss/postcss": "workspace:*",
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});// ../../node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.55.2_@types+node@24.10.9__@swc+core@1.15.10_@swc+_ff0c9e72feaa13fcd6be33c9c3d4ff4d/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.55.2_@types+node@24.10.9__@swc+core@1.15.11_@swc+_520f18ca95525f35cebc2ff127e63f14/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
 
@@ -3,13 +3,13 @@
3
3
  var _chunkLTJQUORKjs = require('./chunk-LTJQUORK.js');
4
4
 
5
5
 
6
- var _chunkEHI5UUJ2js = require('./chunk-EHI5UUJ2.js');
6
+ var _chunkNSZXONXAjs = require('./chunk-NSZXONXA.js');
7
7
 
8
8
 
9
9
 
10
10
 
11
11
 
12
- var _chunkDUNUSQPWjs = require('./chunk-DUNUSQPW.js');
12
+ var _chunkEPL2YCB5js = require('./chunk-EPL2YCB5.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 = _chunkDUNUSQPWjs.createDebug.call(void 0, );
20
+ var debug = _chunkEPL2YCB5js.createDebug.call(void 0, );
21
21
  var Transform = _stream2.default.Transform;
22
22
  function createPlugins(options = {}) {
23
- const opts = _chunkDUNUSQPWjs.getCompilerContext.call(void 0, options);
23
+ const opts = _chunkEPL2YCB5js.getCompilerContext.call(void 0, options);
24
24
  const { templateHandler, styleHandler, jsHandler, cache, twPatcher: initialTwPatcher, refreshTailwindcssPatcher } = opts;
25
- const patchRecorderState = _chunkEHI5UUJ2js.setupPatchRecorder.call(void 0, initialTwPatcher, opts.tailwindcssBasedir, {
25
+ const patchRecorderState = _chunkNSZXONXAjs.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 _chunkDUNUSQPWjs.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
39
+ await _chunkEPL2YCB5js.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 _chunkDUNUSQPWjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force, skipRefresh: force });
47
+ runtimeSet = await _chunkEPL2YCB5js.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force, skipRefresh: force });
48
48
  runtimeSetInitialized = true;
49
49
  return runtimeSet;
50
50
  }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createPatchTargetRecorder,
3
3
  createTailwindPatchPromise
4
- } from "./chunk-2SD5C6P5.mjs";
4
+ } from "./chunk-FNFWO6S4.mjs";
5
5
  import {
6
6
  logger
7
7
  } from "./chunk-7D27E7TU.mjs";
@@ -99,7 +99,7 @@ function getDefaultOptions() {
99
99
  },
100
100
  disabledDefaultTemplateHandler: false,
101
101
  cssSelectorReplacement: {
102
- root: ["page", ".tw-root"],
102
+ root: ["page", ".tw-root", "wx-root-portal-content"],
103
103
  universal: ["view", "text"]
104
104
  },
105
105
  babelParserOptions: {
@@ -9,7 +9,7 @@ import {
9
9
  isMpx,
10
10
  patchMpxLoaderResolve,
11
11
  setupMpxTailwindcssRedirect
12
- } from "./chunk-DCYV3N3T.mjs";
12
+ } from "./chunk-FM2RNYJD.mjs";
13
13
  import {
14
14
  pushConcurrentTaskFactories,
15
15
  resolveDisabledOptions,
@@ -22,20 +22,20 @@ import {
22
22
  } from "./chunk-RRHPTTCP.mjs";
23
23
  import {
24
24
  setupPatchRecorder
25
- } from "./chunk-SDVCC3VG.mjs";
25
+ } from "./chunk-JW43IVZB.mjs";
26
26
  import {
27
27
  collectRuntimeClassSet,
28
28
  createDebug,
29
29
  getCompilerContext,
30
30
  pluginName,
31
31
  refreshTailwindRuntimeState
32
- } from "./chunk-2SD5C6P5.mjs";
32
+ } from "./chunk-FNFWO6S4.mjs";
33
33
  import {
34
34
  getGroupedEntries
35
35
  } from "./chunk-OOHJLO5M.mjs";
36
36
  import {
37
37
  __dirname
38
- } from "./chunk-SPH6SCTM.mjs";
38
+ } from "./chunk-47TVJCQM.mjs";
39
39
 
40
40
  // src/bundlers/webpack/BaseUnifiedPlugin/v5.ts
41
41
  import process3 from "process";
@@ -1,9 +1,9 @@
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 _chunkVPHA77FHjs = require('./chunk-VPHA77FH.js');
3
+ var _chunkDOX3RXJ2js = require('./chunk-DOX3RXJ2.js');
4
4
 
5
5
 
6
- var _chunkDUNUSQPWjs = require('./chunk-DUNUSQPW.js');
6
+ var _chunkEPL2YCB5js = require('./chunk-EPL2YCB5.js');
7
7
 
8
8
  // src/shared/mpx.ts
9
9
  var _path = require('path'); var _path2 = _interopRequireDefault(_path);
@@ -144,7 +144,7 @@ function rewriteTailwindcssRequestForCss(data, pkgDir, appType) {
144
144
  if (!CSS_EXT_RE.test(normalizedIssuer)) {
145
145
  return;
146
146
  }
147
- const resolved = _chunkVPHA77FHjs.resolveTailwindcssImport.call(void 0, request, pkgDir, { appType });
147
+ const resolved = _chunkDOX3RXJ2js.resolveTailwindcssImport.call(void 0, request, pkgDir, { appType });
148
148
  if (!resolved) {
149
149
  return;
150
150
  }
@@ -154,8 +154,8 @@ function applyTailwindcssCssImportRewrite(compiler, options) {
154
154
  if (!options.enabled) {
155
155
  return;
156
156
  }
157
- compiler.hooks.normalModuleFactory.tap(_chunkDUNUSQPWjs.pluginName, (factory) => {
158
- factory.hooks.beforeResolve.tap(_chunkDUNUSQPWjs.pluginName, (data) => {
157
+ compiler.hooks.normalModuleFactory.tap(_chunkEPL2YCB5js.pluginName, (factory) => {
158
+ factory.hooks.beforeResolve.tap(_chunkEPL2YCB5js.pluginName, (data) => {
159
159
  rewriteTailwindcssRequestForCss(data, options.pkgDir, options.appType);
160
160
  });
161
161
  });
@@ -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 _chunkDUNUSQPWjs = require('./chunk-DUNUSQPW.js');
4
+ var _chunkEPL2YCB5js = require('./chunk-EPL2YCB5.js');
5
5
 
6
6
 
7
- var _chunk4RUFPPI6js = require('./chunk-4RUFPPI6.js');
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 = _chunkDUNUSQPWjs.createPatchTargetRecorder.call(void 0, baseDir, patcher, options);
11
+ const recorder = _chunkEPL2YCB5js.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
- _chunk4RUFPPI6js.logger.info("%s%s", prefix, recorder.message);
14
+ _chunkPO3CCFU7js.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 ? _chunkDUNUSQPWjs.createTailwindPatchPromise.call(void 0, patcher, onPatchCompleted) : Promise.resolve();
19
+ const patchPromise = patcher ? _chunkEPL2YCB5js.createTailwindPatchPromise.call(void 0, patcher, onPatchCompleted) : Promise.resolve();
20
20
  return {
21
21
  recorder,
22
22
  patchPromise,
@@ -3,7 +3,7 @@
3
3
  var _chunkDYLQ6UOIjs = require('./chunk-DYLQ6UOI.js');
4
4
 
5
5
 
6
- var _chunkY6F6NBA7js = require('./chunk-Y6F6NBA7.js');
6
+ var _chunkHAM3JEU2js = require('./chunk-HAM3JEU2.js');
7
7
 
8
8
  // src/logger/index.ts
9
9
  var _logger = require('@weapp-tailwindcss/logger');
@@ -318,7 +318,7 @@ function resolveModuleFromPaths(specifier, paths) {
318
318
  return void 0;
319
319
  }
320
320
  try {
321
- const req = _module.createRequire.call(void 0, _chunkY6F6NBA7js.importMetaUrl);
321
+ const req = _module.createRequire.call(void 0, _chunkHAM3JEU2js.importMetaUrl);
322
322
  return req.resolve(specifier, { paths });
323
323
  } catch (e3) {
324
324
  return void 0;
@@ -373,11 +373,11 @@ function createDefaultResolvePaths(basedir) {
373
373
  const cwd = _process2.default.cwd();
374
374
  appendNodeModules(paths, cwd);
375
375
  try {
376
- const modulePath = _url.fileURLToPath.call(void 0, _chunkY6F6NBA7js.importMetaUrl);
376
+ const modulePath = _url.fileURLToPath.call(void 0, _chunkHAM3JEU2js.importMetaUrl);
377
377
  const candidate = _fs.existsSync.call(void 0, modulePath) && !_path2.default.extname(modulePath) ? modulePath : _path2.default.dirname(modulePath);
378
378
  paths.add(candidate);
379
379
  } catch (e4) {
380
- paths.add(_chunkY6F6NBA7js.importMetaUrl);
380
+ paths.add(_chunkHAM3JEU2js.importMetaUrl);
381
381
  }
382
382
  if (paths.size === 0) {
383
383
  fallbackCandidates = fallbackCandidates.filter(Boolean);
@@ -6,13 +6,13 @@
6
6
 
7
7
 
8
8
 
9
- var _chunkVPHA77FHjs = require('./chunk-VPHA77FH.js');
9
+ var _chunkDOX3RXJ2js = require('./chunk-DOX3RXJ2.js');
10
10
 
11
11
 
12
12
  var _chunkLTJQUORKjs = require('./chunk-LTJQUORK.js');
13
13
 
14
14
 
15
- var _chunkEHI5UUJ2js = require('./chunk-EHI5UUJ2.js');
15
+ var _chunkNSZXONXAjs = require('./chunk-NSZXONXA.js');
16
16
 
17
17
 
18
18
 
@@ -23,7 +23,7 @@ var _chunkEHI5UUJ2js = require('./chunk-EHI5UUJ2.js');
23
23
 
24
24
 
25
25
 
26
- var _chunkDUNUSQPWjs = require('./chunk-DUNUSQPW.js');
26
+ var _chunkEPL2YCB5js = require('./chunk-EPL2YCB5.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, _chunkDUNUSQPWjs.replaceWxml.call(void 0, prop.value.content));
57
+ ms.update(start, end, _chunkEPL2YCB5js.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 = _chunkDUNUSQPWjs.generateCode.call(void 0, prop.exp.content, {
69
+ const generated = _chunkEPL2YCB5js.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 = _chunkDUNUSQPWjs.createAttributeMatcher.call(void 0, customAttributesEntities);
98
+ const matchCustomAttribute = _chunkEPL2YCB5js.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) {
@@ -359,7 +359,7 @@ function createUniAppXAssetTask(file, originalSource, outDir, options) {
359
359
  runtimeSet,
360
360
  applyLinkedResults: applyLinkedResults2
361
361
  } = options;
362
- const absoluteFile = _chunkVPHA77FHjs.toAbsoluteOutputPath.call(void 0, file, outDir);
362
+ const absoluteFile = _chunkDOX3RXJ2js.toAbsoluteOutputPath.call(void 0, file, outDir);
363
363
  const rawSource = originalSource.source.toString();
364
364
  await _chunkLTJQUORKjs.processCachedTask.call(void 0, {
365
365
  cache,
@@ -428,7 +428,7 @@ function isJavaScriptEntry(entry) {
428
428
  function createBundleModuleGraphOptions(outputDir, entries) {
429
429
  return {
430
430
  resolve(specifier, importer) {
431
- return _chunkVPHA77FHjs.resolveOutputSpecifier.call(void 0, specifier, importer, outputDir, (candidate) => entries.has(candidate));
431
+ return _chunkDOX3RXJ2js.resolveOutputSpecifier.call(void 0, specifier, importer, outputDir, (candidate) => entries.has(candidate));
432
432
  },
433
433
  load(id) {
434
434
  const entry = entries.get(id);
@@ -498,7 +498,7 @@ function createGenerateBundleHook(context) {
498
498
  for (const [fileName, output] of entries) {
499
499
  const entry = { fileName, output };
500
500
  if (isJavaScriptEntry(entry)) {
501
- const absolute = _chunkVPHA77FHjs.toAbsoluteOutputPath.call(void 0, fileName, outDir);
501
+ const absolute = _chunkDOX3RXJ2js.toAbsoluteOutputPath.call(void 0, fileName, outDir);
502
502
  jsEntries.set(absolute, entry);
503
503
  }
504
504
  }
@@ -565,7 +565,7 @@ function createGenerateBundleHook(context) {
565
565
  if (Array.isArray(groupedEntries.js)) {
566
566
  for (const [file, originalSource] of groupedEntries.js) {
567
567
  if (originalSource.type === "chunk") {
568
- const absoluteFile = _chunkVPHA77FHjs.toAbsoluteOutputPath.call(void 0, file, outDir);
568
+ const absoluteFile = _chunkDOX3RXJ2js.toAbsoluteOutputPath.call(void 0, file, outDir);
569
569
  const initialRawSource = originalSource.code;
570
570
  jsTaskFactories.push(async () => {
571
571
  await _chunkLTJQUORKjs.processCachedTask.call(void 0, {
@@ -646,7 +646,7 @@ function createGenerateBundleHook(context) {
646
646
  );
647
647
  }
648
648
  }
649
- _chunkVPHA77FHjs.pushConcurrentTaskFactories.call(void 0, tasks, jsTaskFactories);
649
+ _chunkDOX3RXJ2js.pushConcurrentTaskFactories.call(void 0, tasks, jsTaskFactories);
650
650
  await Promise.all(tasks);
651
651
  for (const apply of pendingLinkedUpdates) {
652
652
  apply();
@@ -677,12 +677,12 @@ function createRewriteCssImportsPlugins(options) {
677
677
  const { appType, weappTailwindcssDirPosix: weappTailwindcssDirPosix2 } = options;
678
678
  return [
679
679
  {
680
- name: `${_chunkDUNUSQPWjs.vitePluginName}:rewrite-css-imports`,
680
+ name: `${_chunkEPL2YCB5js.vitePluginName}:rewrite-css-imports`,
681
681
  enforce: "pre",
682
682
  resolveId: {
683
683
  order: "pre",
684
684
  handler(id, importer) {
685
- const replacement = _chunkVPHA77FHjs.resolveTailwindcssImport.call(void 0, id, weappTailwindcssDirPosix2, {
685
+ const replacement = _chunkDOX3RXJ2js.resolveTailwindcssImport.call(void 0, id, weappTailwindcssDirPosix2, {
686
686
  join: joinPosixPath,
687
687
  appType
688
688
  });
@@ -701,7 +701,7 @@ function createRewriteCssImportsPlugins(options) {
701
701
  if (!isCSSRequest(id)) {
702
702
  return null;
703
703
  }
704
- const rewritten = _chunkVPHA77FHjs.rewriteTailwindcssImportsInCode.call(void 0, code, weappTailwindcssDirPosix2, {
704
+ const rewritten = _chunkDOX3RXJ2js.rewriteTailwindcssImportsInCode.call(void 0, code, weappTailwindcssDirPosix2, {
705
705
  join: joinPosixPath,
706
706
  appType
707
707
  });
@@ -719,12 +719,12 @@ function createRewriteCssImportsPlugins(options) {
719
719
  }
720
720
 
721
721
  // src/bundlers/vite/index.ts
722
- var debug = _chunkDUNUSQPWjs.createDebug.call(void 0, );
723
- var weappTailwindcssPackageDir = _chunkVPHA77FHjs.resolvePackageDir.call(void 0, "weapp-tailwindcss");
722
+ var debug = _chunkEPL2YCB5js.createDebug.call(void 0, );
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 = _chunkDUNUSQPWjs.getCompilerContext.call(void 0, options);
727
+ const opts = _chunkEPL2YCB5js.getCompilerContext.call(void 0, options);
728
728
  const {
729
729
  disabled,
730
730
  customAttributes,
@@ -738,7 +738,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
738
738
  uniAppX,
739
739
  disabledDefaultTemplateHandler
740
740
  } = opts;
741
- const disabledOptions = _chunkVPHA77FHjs.resolveDisabledOptions.call(void 0, disabled);
741
+ const disabledOptions = _chunkDOX3RXJ2js.resolveDisabledOptions.call(void 0, disabled);
742
742
  const tailwindcssMajorVersion = _nullishCoalesce(initialTwPatcher.majorVersion, () => ( 0));
743
743
  const shouldRewriteCssImports = opts.rewriteCssImports !== false && !disabledOptions.rewriteCssImports && (rewriteCssImportsSpecified || tailwindcssMajorVersion >= 4);
744
744
  const rewritePlugins = createRewriteCssImportsPlugins({
@@ -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 = _chunkDUNUSQPWjs.toCustomAttributesEntities.call(void 0, customAttributes);
753
- const patchRecorderState = _chunkEHI5UUJ2js.setupPatchRecorder.call(void 0, initialTwPatcher, opts.tailwindcssBasedir, {
752
+ const customAttributesEntities = _chunkEPL2YCB5js.toCustomAttributesEntities.call(void 0, customAttributes);
753
+ const patchRecorderState = _chunkNSZXONXAjs.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 _chunkDUNUSQPWjs.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
767
+ const refreshed = await _chunkEPL2YCB5js.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 = _chunkDUNUSQPWjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, {
780
+ const task2 = _chunkEPL2YCB5js.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: `${_chunkDUNUSQPWjs.vitePluginName}:post`,
815
+ name: `${_chunkEPL2YCB5js.vitePluginName}:post`,
816
816
  enforce: "post",
817
817
  configResolved(config) {
818
818
  resolvedConfig = config;
@@ -3,13 +3,13 @@ import {
3
3
  } from "./chunk-RRHPTTCP.mjs";
4
4
  import {
5
5
  setupPatchRecorder
6
- } from "./chunk-SDVCC3VG.mjs";
6
+ } from "./chunk-JW43IVZB.mjs";
7
7
  import {
8
8
  collectRuntimeClassSet,
9
9
  createDebug,
10
10
  getCompilerContext,
11
11
  refreshTailwindRuntimeState
12
- } from "./chunk-2SD5C6P5.mjs";
12
+ } from "./chunk-FNFWO6S4.mjs";
13
13
 
14
14
  // src/bundlers/gulp/index.ts
15
15
  import { Buffer } from "buffer";
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-RRHPTTCP.mjs";
13
13
  import {
14
14
  setupPatchRecorder
15
- } from "./chunk-SDVCC3VG.mjs";
15
+ } from "./chunk-JW43IVZB.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-2SD5C6P5.mjs";
26
+ } from "./chunk-FNFWO6S4.mjs";
27
27
  import {
28
28
  getGroupedEntries,
29
29
  resolveUniUtsPlatform