weapp-tailwindcss 4.11.0-alpha.4 → 4.11.0-alpha.5

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-ZPGT5C7G.mjs → chunk-2XQBUQD5.mjs} +1 -1
  2. package/dist/{chunk-6R2OVCLW.mjs → chunk-CT6WGPBO.mjs} +3 -3
  3. package/dist/{chunk-VO2ZPNCW.js → chunk-CYFQZA2W.js} +23 -17
  4. package/dist/{chunk-N3RT3VZH.js → chunk-K7KC54RI.js} +364 -74
  5. package/dist/{chunk-GCZ7ZE7V.js → chunk-OA2DYJBA.js} +31 -31
  6. package/dist/{chunk-3V52XTPJ.mjs → chunk-OMARW5NC.mjs} +50 -0
  7. package/dist/{chunk-NYZTRTBM.mjs → chunk-OPRKM2BI.mjs} +331 -41
  8. package/dist/{chunk-JKK5KZCN.js → chunk-PKGY4XBS.js} +3 -3
  9. package/dist/{chunk-FI75TLOQ.js → chunk-QK6VNNNL.js} +51 -1
  10. package/dist/{chunk-JOT24YET.mjs → chunk-TMAPWOYW.mjs} +10 -4
  11. package/dist/{chunk-TDHY27WS.mjs → chunk-VXN2LD4U.mjs} +1 -1
  12. package/dist/{chunk-VHUV7ZDB.js → chunk-YQJFFKIW.js} +6 -6
  13. package/dist/cli.js +2 -1
  14. package/dist/cli.mjs +2 -1
  15. package/dist/core.d.mts +1 -1
  16. package/dist/core.d.ts +1 -1
  17. package/dist/core.js +7 -7
  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-BMwzhITq.d.mts → index-D8E0GGqB.d.mts} +28 -2
  26. package/dist/{index-BMwzhITq.d.ts → index-D8E0GGqB.d.ts} +28 -2
  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 +36 -1
  32. package/dist/presets.d.ts +36 -1
  33. package/dist/presets.js +14 -5
  34. package/dist/presets.mjs +12 -3
  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 +26 -26
  48. package/dist/webpack4.mjs +3 -3
  49. package/package.json +3 -2
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-F2CKKG6Q.mjs";
4
4
  import {
5
5
  pluginName
6
- } from "./chunk-JOT24YET.mjs";
6
+ } from "./chunk-TMAPWOYW.mjs";
7
7
 
8
8
  // src/shared/mpx.ts
9
9
  import path2 from "path";
@@ -11,7 +11,7 @@ import {
11
11
  isMpx,
12
12
  patchMpxLoaderResolve,
13
13
  setupMpxTailwindcssRedirect
14
- } from "./chunk-ZPGT5C7G.mjs";
14
+ } from "./chunk-2XQBUQD5.mjs";
15
15
  import {
16
16
  pushConcurrentTaskFactories,
17
17
  resolveDisabledOptions,
@@ -28,11 +28,11 @@ import {
28
28
  getCompilerContext,
29
29
  pluginName,
30
30
  setupPatchRecorder
31
- } from "./chunk-JOT24YET.mjs";
31
+ } from "./chunk-TMAPWOYW.mjs";
32
32
  import {
33
33
  getRuntimeClassSetSignature,
34
34
  resolveTailwindcssOptions
35
- } from "./chunk-3V52XTPJ.mjs";
35
+ } from "./chunk-OMARW5NC.mjs";
36
36
  import {
37
37
  getGroupedEntries
38
38
  } from "./chunk-OOHJLO5M.mjs";
@@ -7,7 +7,8 @@
7
7
 
8
8
 
9
9
 
10
- var _chunkFI75TLOQjs = require('./chunk-FI75TLOQ.js');
10
+
11
+ var _chunkQK6VNNNLjs = require('./chunk-QK6VNNNL.js');
11
12
 
12
13
 
13
14
  var _chunkLL3QUKJIjs = require('./chunk-LL3QUKJI.js');
@@ -38,7 +39,7 @@ var debug = createDebug("[tailwindcss:runtime] ");
38
39
  var refreshTailwindcssPatcherSymbol = /* @__PURE__ */ Symbol.for("weapp-tailwindcss.refreshTailwindcssPatcher");
39
40
  function createTailwindPatchPromise(twPatcher, onPatched) {
40
41
  return Promise.resolve(twPatcher.patch()).then(async () => {
41
- _chunkFI75TLOQjs.invalidateRuntimeClassSet.call(void 0, twPatcher);
42
+ _chunkQK6VNNNLjs.invalidateRuntimeClassSet.call(void 0, twPatcher);
42
43
  if (onPatched) {
43
44
  try {
44
45
  await onPatched();
@@ -93,7 +94,7 @@ async function ensureRuntimeClassSet(state, options = {}) {
93
94
  }
94
95
  await state.patchPromise;
95
96
  const entry = getRuntimeClassSetStateEntry(state);
96
- const signature = _chunkFI75TLOQjs.getRuntimeClassSetSignature.call(void 0, state.twPatcher);
97
+ const signature = _chunkQK6VNNNLjs.getRuntimeClassSetSignature.call(void 0, state.twPatcher);
97
98
  const signatureChanged = entry.signature !== signature;
98
99
  const shouldForceCollect = forceCollect || forceRefresh || signatureChanged;
99
100
  if (!shouldForceCollect) {
@@ -128,7 +129,7 @@ async function ensureRuntimeClassSet(state, options = {}) {
128
129
  try {
129
130
  const runtimeSet = await task;
130
131
  entry.value = runtimeSet;
131
- entry.signature = _chunkFI75TLOQjs.getRuntimeClassSetSignature.call(void 0, state.twPatcher);
132
+ entry.signature = _chunkQK6VNNNLjs.getRuntimeClassSetSignature.call(void 0, state.twPatcher);
132
133
  return runtimeSet;
133
134
  } finally {
134
135
  if (entry.promise === task) {
@@ -185,8 +186,8 @@ async function collectRuntimeClassSet(twPatcher, options = {}) {
185
186
  }
186
187
  }
187
188
  }
188
- const entry = _chunkFI75TLOQjs.getRuntimeClassSetCacheEntry.call(void 0, activePatcher);
189
- const signature = _chunkFI75TLOQjs.getRuntimeClassSetSignature.call(void 0, activePatcher);
189
+ const entry = _chunkQK6VNNNLjs.getRuntimeClassSetCacheEntry.call(void 0, activePatcher);
190
+ const signature = _chunkQK6VNNNLjs.getRuntimeClassSetSignature.call(void 0, activePatcher);
190
191
  if (!options.force) {
191
192
  if (entry.value && entry.signature === signature) {
192
193
  return entry.value;
@@ -385,7 +386,7 @@ function formatRelativeToBase(targetPath, baseDir) {
385
386
  }
386
387
  function resolveRecordLocation(baseDir) {
387
388
  const normalizedBase = _path2.default.normalize(baseDir);
388
- const packageRoot = _nullishCoalesce(_chunkFI75TLOQjs.findNearestPackageRoot.call(void 0, normalizedBase), () => ( normalizedBase));
389
+ const packageRoot = _nullishCoalesce(_chunkQK6VNNNLjs.findNearestPackageRoot.call(void 0, normalizedBase), () => ( normalizedBase));
389
390
  const packageJsonPath = _path2.default.join(packageRoot, "package.json");
390
391
  const hasPackageJson = _fs.existsSync.call(void 0, packageJsonPath);
391
392
  const recordKeySource = hasPackageJson ? packageJsonPath : normalizedBase;
@@ -422,7 +423,7 @@ function getRecordFileCandidates(baseDir) {
422
423
  // package.json
423
424
  var package_default = {
424
425
  name: "weapp-tailwindcss",
425
- version: "4.11.0-alpha.4",
426
+ version: "4.11.0-alpha.5",
426
427
  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!",
427
428
  author: "ice breaker <1324318532@qq.com>",
428
429
  license: "MIT",
@@ -626,6 +627,7 @@ var package_default = {
626
627
  "@weapp-tailwindcss/postcss": "workspace:*",
627
628
  "@weapp-tailwindcss/shared": "workspace:*",
628
629
  cac: "6.7.14",
630
+ "comment-json": "^4.6.2",
629
631
  debug: "~4.4.3",
630
632
  "fast-glob": "^3.3.3",
631
633
  htmlparser2: "10.1.0",
@@ -3603,6 +3605,7 @@ function createHandlersFromContext(ctx, customAttributesEntities, cssCalcOptions
3603
3605
  disabledDefaultTemplateHandler,
3604
3606
  replaceRuntimePackages
3605
3607
  } = ctx;
3608
+ const uniAppXEnabled = _chunkQK6VNNNLjs.isUniAppXEnabled.call(void 0, uniAppX);
3606
3609
  const moduleSpecifierReplacements = resolveRuntimePackageReplacements(replaceRuntimePackages);
3607
3610
  const styleHandler = _postcss.createStyleHandler.call(void 0, {
3608
3611
  cssPreflight,
@@ -3616,7 +3619,7 @@ function createHandlersFromContext(ctx, customAttributesEntities, cssCalcOptions
3616
3619
  cssRemoveProperty,
3617
3620
  cssRemoveHoverPseudoClass,
3618
3621
  cssPresetEnv,
3619
- uniAppX,
3622
+ uniAppX: uniAppXEnabled,
3620
3623
  cssCalc: cssCalcOptions,
3621
3624
  px2rpx,
3622
3625
  unitsToPx
@@ -3632,7 +3635,7 @@ function createHandlersFromContext(ctx, customAttributesEntities, cssCalcOptions
3632
3635
  babelParserOptions,
3633
3636
  ignoreCallExpressionIdentifiers,
3634
3637
  ignoreTaggedTemplateExpressionIdentifiers,
3635
- uniAppX,
3638
+ uniAppX: uniAppXEnabled,
3636
3639
  moduleSpecifierReplacements
3637
3640
  });
3638
3641
  const templateHandler = createTemplateHandler({
@@ -3715,15 +3718,15 @@ function createInternalCompilerContext(opts) {
3715
3718
  );
3716
3719
  ctx.escapeMap = ctx.customReplaceDictionary;
3717
3720
  applyLoggerLevel(ctx.logLevel);
3718
- const twPatcher = _chunkFI75TLOQjs.createTailwindcssPatcherFromContext.call(void 0, ctx);
3721
+ const twPatcher = _chunkQK6VNNNLjs.createTailwindcssPatcherFromContext.call(void 0, ctx);
3719
3722
  logTailwindcssTarget("runtime", twPatcher, ctx.tailwindcssBasedir);
3720
3723
  if (_optionalChain([twPatcher, 'access', _119 => _119.packageInfo, 'optionalAccess', _120 => _120.version])) {
3721
3724
  _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)))}`);
3722
3725
  } else {
3723
3726
  _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`);
3724
3727
  }
3725
- _chunkFI75TLOQjs.warnMissingCssEntries.call(void 0, ctx, twPatcher);
3726
- const cssCalcOptions = _chunkFI75TLOQjs.applyV4CssCalcDefaults.call(void 0, ctx.cssCalc, twPatcher);
3728
+ _chunkQK6VNNNLjs.warnMissingCssEntries.call(void 0, ctx, twPatcher);
3729
+ const cssCalcOptions = _chunkQK6VNNNLjs.applyV4CssCalcDefaults.call(void 0, ctx.cssCalc, twPatcher);
3727
3730
  ctx.cssCalc = cssCalcOptions;
3728
3731
  const customAttributesEntities = toCustomAttributesEntities(ctx.customAttributes);
3729
3732
  const { styleHandler, jsHandler: jsHandler2, templateHandler } = createHandlersFromContext(
@@ -3742,8 +3745,8 @@ function createInternalCompilerContext(opts) {
3742
3745
  if (_optionalChain([options, 'optionalAccess', _121 => _121.clearCache]) !== false) {
3743
3746
  await clearTailwindcssPatcherCache(previousPatcher);
3744
3747
  }
3745
- _chunkFI75TLOQjs.invalidateRuntimeClassSet.call(void 0, previousPatcher);
3746
- const nextPatcher = _chunkFI75TLOQjs.createTailwindcssPatcherFromContext.call(void 0, ctx);
3748
+ _chunkQK6VNNNLjs.invalidateRuntimeClassSet.call(void 0, previousPatcher);
3749
+ const nextPatcher = _chunkQK6VNNNLjs.createTailwindcssPatcherFromContext.call(void 0, ctx);
3747
3750
  Object.assign(previousPatcher, nextPatcher);
3748
3751
  ctx.twPatcher = previousPatcher;
3749
3752
  return previousPatcher;
@@ -3764,7 +3767,7 @@ function setupPatchRecorder(patcher, baseDir, options) {
3764
3767
  const recorder = createPatchTargetRecorder(baseDir, patcher, options);
3765
3768
  if (_optionalChain([recorder, 'optionalAccess', _122 => _122.message]) && _optionalChain([options, 'optionalAccess', _123 => _123.logMessage]) !== false) {
3766
3769
  const prefix = _optionalChain([options, 'optionalAccess', _124 => _124.messagePrefix]) ? `${options.messagePrefix} ` : "";
3767
- _chunkFI75TLOQjs.logger.info("%s%s", prefix, recorder.message);
3770
+ _chunkQK6VNNNLjs.logger.info("%s%s", prefix, recorder.message);
3768
3771
  }
3769
3772
  const onPatchCompleted = _optionalChain([recorder, 'optionalAccess', _125 => _125.onPatched]) ? async () => {
3770
3773
  await recorder.onPatched();
@@ -3792,4 +3795,7 @@ function setupPatchRecorder(patcher, baseDir, options) {
3792
3795
 
3793
3796
 
3794
3797
 
3795
- exports.createDebug = createDebug; exports.refreshTailwindRuntimeState = refreshTailwindRuntimeState; exports.ensureRuntimeClassSet = ensureRuntimeClassSet; exports.collectRuntimeClassSet = collectRuntimeClassSet; exports.pluginName = pluginName; exports.vitePluginName = vitePluginName; exports.toCustomAttributesEntities = toCustomAttributesEntities; exports.traverse = traverse; exports.babelParse = babelParse; exports.replaceWxml = replaceWxml; exports.createAttributeMatcher = createAttributeMatcher; exports.generateCode = generateCode; exports.getCompilerContext = getCompilerContext; exports.setupPatchRecorder = setupPatchRecorder;
3798
+
3799
+
3800
+
3801
+ exports.createDebug = createDebug; exports.refreshTailwindRuntimeState = refreshTailwindRuntimeState; exports.ensureRuntimeClassSet = ensureRuntimeClassSet; exports.collectRuntimeClassSet = collectRuntimeClassSet; exports.pluginName = pluginName; exports.vitePluginName = vitePluginName; exports.toCustomAttributesEntities = toCustomAttributesEntities; exports.traverse = traverse; exports.babelParse = babelParse; exports.replaceWxml = replaceWxml; exports.isClassContextLiteralPath = isClassContextLiteralPath; exports.JsTokenUpdater = JsTokenUpdater; exports.analyzeSource = analyzeSource; exports.createAttributeMatcher = createAttributeMatcher; exports.generateCode = generateCode; exports.getCompilerContext = getCompilerContext; exports.setupPatchRecorder = setupPatchRecorder;