weapp-tailwindcss 4.0.0-alpha.9 → 4.0.1

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-GHLS2DGY.js → chunk-3IIS4S3E.js} +3 -3
  2. package/dist/{chunk-GX4O2YZI.js → chunk-4P6YCUJT.js} +3 -3
  3. package/dist/{chunk-XW3PPBN2.mjs → chunk-AW2WTO5D.mjs} +2 -2
  4. package/dist/{chunk-UDT6MZJ7.js → chunk-GLN4NGPV.js} +17 -10
  5. package/dist/{chunk-KVKGWZDD.js → chunk-SAIWHQAY.js} +3 -3
  6. package/dist/{chunk-PCLP6Y32.mjs → chunk-T4LGP4UP.mjs} +18 -11
  7. package/dist/{chunk-F23L6ZME.mjs → chunk-XSU23YPZ.mjs} +2 -2
  8. package/dist/{chunk-CRIVJETU.mjs → chunk-Z4VQVB26.mjs} +2 -2
  9. package/dist/cli.js +3 -3
  10. package/dist/cli.mjs +1 -1
  11. package/dist/core.d.mts +2 -1
  12. package/dist/core.d.ts +2 -1
  13. package/dist/core.js +10 -6
  14. package/dist/core.mjs +9 -5
  15. package/dist/defaults.d.mts +1 -0
  16. package/dist/defaults.d.ts +1 -0
  17. package/dist/escape.d.mts +1 -0
  18. package/dist/escape.d.ts +1 -0
  19. package/dist/gulp.d.mts +1 -0
  20. package/dist/gulp.d.ts +1 -0
  21. package/dist/gulp.js +3 -3
  22. package/dist/gulp.mjs +2 -2
  23. package/dist/index.d.mts +1 -0
  24. package/dist/index.d.ts +1 -0
  25. package/dist/index.js +5 -5
  26. package/dist/index.mjs +4 -4
  27. package/dist/types.d.mts +277 -219
  28. package/dist/types.d.ts +277 -219
  29. package/dist/vite.d.mts +1 -0
  30. package/dist/vite.d.ts +1 -0
  31. package/dist/vite.js +3 -3
  32. package/dist/vite.mjs +2 -2
  33. package/dist/weapp-tw-runtime-loader.js +2 -4
  34. package/dist/webpack.d.mts +1 -0
  35. package/dist/webpack.d.ts +1 -0
  36. package/dist/webpack.js +3 -3
  37. package/dist/webpack.mjs +2 -2
  38. package/dist/webpack4.d.mts +1 -0
  39. package/dist/webpack4.d.ts +1 -0
  40. package/dist/webpack4.js +3 -3
  41. package/dist/webpack4.mjs +2 -2
  42. package/index.css +5 -0
  43. package/package.json +27 -12
  44. package/preflight.css +16 -0
  45. package/theme.css +450 -0
  46. package/utilities.css +1 -0
  47. package/dist/weapp-tw-runtime-loader.d.mts +0 -7
  48. package/dist/weapp-tw-runtime-loader.d.ts +0 -7
  49. package/dist/weapp-tw-runtime-loader.mjs +0 -14
@@ -6,7 +6,7 @@ var _chunkHBQASQKYjs = require('./chunk-HBQASQKY.js');
6
6
  var _chunkN62XM3T3js = require('./chunk-N62XM3T3.js');
7
7
 
8
8
 
9
- var _chunkUDT6MZJ7js = require('./chunk-UDT6MZJ7.js');
9
+ var _chunkGLN4NGPVjs = require('./chunk-GLN4NGPV.js');
10
10
 
11
11
 
12
12
  var _chunk35CYTBPMjs = require('./chunk-35CYTBPM.js');
@@ -17,7 +17,7 @@ var _chunk6FNC3XMIjs = require('./chunk-6FNC3XMI.js');
17
17
  // src/bundlers/vite/index.ts
18
18
  var debug = _chunkHBQASQKYjs.createDebug.call(void 0, );
19
19
  function UnifiedViteWeappTailwindcssPlugin(options = {}) {
20
- const opts = _chunkUDT6MZJ7js.getCompilerContext.call(void 0, options);
20
+ const opts = _chunkGLN4NGPVjs.getCompilerContext.call(void 0, options);
21
21
  const {
22
22
  disabled,
23
23
  onEnd,
@@ -47,7 +47,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
47
47
  onStart();
48
48
  const entries = Object.entries(bundle);
49
49
  const groupedEntries = _chunk35CYTBPMjs.getGroupedEntries.call(void 0, entries, opts);
50
- const runtimeSet = twPatcher.getClassSet();
50
+ const runtimeSet = yield twPatcher.getClassSet();
51
51
  setMangleRuntimeSet(runtimeSet);
52
52
  debug("get runtimeSet, class count: %d", runtimeSet.size);
53
53
  if (Array.isArray(groupedEntries.html)) {
@@ -3,7 +3,7 @@
3
3
  var _chunkHBQASQKYjs = require('./chunk-HBQASQKY.js');
4
4
 
5
5
 
6
- var _chunkUDT6MZJ7js = require('./chunk-UDT6MZJ7.js');
6
+ var _chunkGLN4NGPVjs = require('./chunk-GLN4NGPV.js');
7
7
 
8
8
 
9
9
 
@@ -15,7 +15,7 @@ var _stream = require('stream'); var _stream2 = _interopRequireDefault(_stream);
15
15
  var debug = _chunkHBQASQKYjs.createDebug.call(void 0, );
16
16
  var Transform = _stream2.default.Transform;
17
17
  function createPlugins(options = {}) {
18
- const opts = _chunkUDT6MZJ7js.getCompilerContext.call(void 0, options);
18
+ const opts = _chunkGLN4NGPVjs.getCompilerContext.call(void 0, options);
19
19
  const { templateHandler, styleHandler, jsHandler, setMangleRuntimeSet, cache, twPatcher } = opts;
20
20
  let runtimeSet = /* @__PURE__ */ new Set();
21
21
  twPatcher.patch();
@@ -24,7 +24,7 @@ function createPlugins(options = {}) {
24
24
  objectMode: true,
25
25
  transform(file, _encoding, callback) {
26
26
  return _chunk6FNC3XMIjs.__async.call(void 0, this, null, function* () {
27
- runtimeSet = twPatcher.getClassSet();
27
+ runtimeSet = yield twPatcher.getClassSet();
28
28
  setMangleRuntimeSet(runtimeSet);
29
29
  const error = null;
30
30
  if (file.contents) {
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-HL6Y5PYZ.mjs";
7
7
  import {
8
8
  getCompilerContext
9
- } from "./chunk-PCLP6Y32.mjs";
9
+ } from "./chunk-T4LGP4UP.mjs";
10
10
  import {
11
11
  getGroupedEntries
12
12
  } from "./chunk-MUJ65IQ3.mjs";
@@ -47,7 +47,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
47
47
  onStart();
48
48
  const entries = Object.entries(bundle);
49
49
  const groupedEntries = getGroupedEntries(entries, opts);
50
- const runtimeSet = twPatcher.getClassSet();
50
+ const runtimeSet = yield twPatcher.getClassSet();
51
51
  setMangleRuntimeSet(runtimeSet);
52
52
  debug("get runtimeSet, class count: %d", runtimeSet.size);
53
53
  if (Array.isArray(groupedEntries.html)) {
@@ -14,7 +14,7 @@ var _chunk35CYTBPMjs = require('./chunk-35CYTBPM.js');
14
14
 
15
15
  var _chunk6FNC3XMIjs = require('./chunk-6FNC3XMI.js');
16
16
 
17
- // src/logger.ts
17
+ // src/logger/index.ts
18
18
  var _logger = require('@weapp-tailwindcss/logger');
19
19
 
20
20
  // src/cache/index.ts
@@ -473,7 +473,8 @@ var _localpkg = require('local-pkg');
473
473
  var _path = require('path'); var _path2 = _interopRequireDefault(_path);
474
474
  var _process = require('process'); var _process2 = _interopRequireDefault(_process);
475
475
  var _tailwindcsspatch = require('tailwindcss-patch');
476
- function createTailwindcssPatcher(basedir, cacheDir, supportCustomLengthUnitsPatch) {
476
+ function createTailwindcssPatcher(options) {
477
+ const { basedir, cacheDir, supportCustomLengthUnitsPatch, tailwindcss } = options || {};
477
478
  const cache = {};
478
479
  if (cacheDir) {
479
480
  if (_path2.default.isAbsolute(cacheDir)) {
@@ -491,7 +492,8 @@ function createTailwindcssPatcher(basedir, cacheDir, supportCustomLengthUnitsPat
491
492
  applyPatches: {
492
493
  exportContext: true,
493
494
  extendLengthUnits: supportCustomLengthUnitsPatch
494
- }
495
+ },
496
+ tailwindcss
495
497
  }
496
498
  });
497
499
  }
@@ -837,14 +839,15 @@ function getCompilerContext(opts) {
837
839
  tailwindcssBasedir,
838
840
  appType,
839
841
  ignoreCallExpressionIdentifiers,
840
- ignoreTaggedTemplateExpressionIdentifiers
842
+ ignoreTaggedTemplateExpressionIdentifiers,
843
+ cssPresetEnv,
844
+ tailwindcss
841
845
  } = ctx;
842
- const cssInjectPreflight = _postcss.createInjectPreflight.call(void 0, cssPreflight);
843
846
  const customAttributesEntities = _chunk35CYTBPMjs.isMap.call(void 0, customAttributes) ? [...customAttributes.entries()] : Object.entries(customAttributes);
844
847
  const { initMangle, mangleContext, setMangleRuntimeSet } = _mangle.useMangleStore.call(void 0, );
845
848
  initMangle(mangle);
846
849
  const styleHandler = _postcss.createStyleHandler.call(void 0, {
847
- cssInjectPreflight,
850
+ cssPreflight,
848
851
  customRuleCallback,
849
852
  cssPreflightRange,
850
853
  escapeMap,
@@ -854,7 +857,8 @@ function getCompilerContext(opts) {
854
857
  cssSelectorReplacement,
855
858
  rem2rpx,
856
859
  postcssOptions,
857
- cssRemoveHoverPseudoClass
860
+ cssRemoveHoverPseudoClass,
861
+ cssPresetEnv
858
862
  });
859
863
  const jsHandler2 = createJsHandler({
860
864
  escapeMap,
@@ -879,9 +883,12 @@ function getCompilerContext(opts) {
879
883
  ctx.jsHandler = jsHandler2;
880
884
  ctx.templateHandler = templateHandler;
881
885
  const twPatcher = createTailwindcssPatcher(
882
- tailwindcssBasedir,
883
- appType === "mpx" ? "node_modules/tailwindcss-patch/.cache" : void 0,
884
- supportCustomLengthUnitsPatch != null ? supportCustomLengthUnitsPatch : true
886
+ {
887
+ basedir: tailwindcssBasedir,
888
+ cacheDir: appType === "mpx" ? "node_modules/tailwindcss-patch/.cache" : void 0,
889
+ supportCustomLengthUnitsPatch: supportCustomLengthUnitsPatch != null ? supportCustomLengthUnitsPatch : true,
890
+ tailwindcss
891
+ }
885
892
  );
886
893
  ctx.setMangleRuntimeSet = setMangleRuntimeSet;
887
894
  ctx.cache = initializeCache(cache);
@@ -6,7 +6,7 @@ var _chunkHBQASQKYjs = require('./chunk-HBQASQKY.js');
6
6
  var _chunkN62XM3T3js = require('./chunk-N62XM3T3.js');
7
7
 
8
8
 
9
- var _chunkUDT6MZJ7js = require('./chunk-UDT6MZJ7.js');
9
+ var _chunkGLN4NGPVjs = require('./chunk-GLN4NGPV.js');
10
10
 
11
11
 
12
12
 
@@ -21,7 +21,7 @@ var _path = require('path'); var _path2 = _interopRequireDefault(_path);
21
21
  var debug = _chunkHBQASQKYjs.createDebug.call(void 0, );
22
22
  var UnifiedWebpackPluginV5 = class {
23
23
  constructor(options = {}) {
24
- this.options = _chunkUDT6MZJ7js.getCompilerContext.call(void 0, options);
24
+ this.options = _chunkGLN4NGPVjs.getCompilerContext.call(void 0, options);
25
25
  this.appType = this.options.appType;
26
26
  }
27
27
  apply(compiler) {
@@ -84,7 +84,7 @@ var UnifiedWebpackPluginV5 = class {
84
84
  }
85
85
  const entries = Object.entries(assets);
86
86
  const groupedEntries = _chunk35CYTBPMjs.getGroupedEntries.call(void 0, entries, this.options);
87
- const runtimeSet = getClassSet();
87
+ const runtimeSet = yield getClassSet();
88
88
  setMangleRuntimeSet(runtimeSet);
89
89
  debug("get runtimeSet, class count: %d", runtimeSet.size);
90
90
  if (Array.isArray(groupedEntries.html)) {
@@ -14,7 +14,7 @@ import {
14
14
  __spreadValues
15
15
  } from "./chunk-AXBFBHS2.mjs";
16
16
 
17
- // src/logger.ts
17
+ // src/logger/index.ts
18
18
  import { logger } from "@weapp-tailwindcss/logger";
19
19
 
20
20
  // src/cache/index.ts
@@ -473,7 +473,8 @@ import { getPackageInfoSync } from "local-pkg";
473
473
  import path from "node:path";
474
474
  import process from "node:process";
475
475
  import { TailwindcssPatcher } from "tailwindcss-patch";
476
- function createTailwindcssPatcher(basedir, cacheDir, supportCustomLengthUnitsPatch) {
476
+ function createTailwindcssPatcher(options) {
477
+ const { basedir, cacheDir, supportCustomLengthUnitsPatch, tailwindcss } = options || {};
477
478
  const cache = {};
478
479
  if (cacheDir) {
479
480
  if (path.isAbsolute(cacheDir)) {
@@ -491,7 +492,8 @@ function createTailwindcssPatcher(basedir, cacheDir, supportCustomLengthUnitsPat
491
492
  applyPatches: {
492
493
  exportContext: true,
493
494
  extendLengthUnits: supportCustomLengthUnitsPatch
494
- }
495
+ },
496
+ tailwindcss
495
497
  }
496
498
  });
497
499
  }
@@ -805,7 +807,7 @@ function createTemplateHandler(options = {}) {
805
807
 
806
808
  // src/context/index.ts
807
809
  import { useMangleStore } from "@weapp-tailwindcss/mangle";
808
- import { createInjectPreflight, createStyleHandler } from "@weapp-tailwindcss/postcss";
810
+ import { createStyleHandler } from "@weapp-tailwindcss/postcss";
809
811
  function getCompilerContext(opts) {
810
812
  const ctx = defuOverrideArray(
811
813
  opts,
@@ -837,14 +839,15 @@ function getCompilerContext(opts) {
837
839
  tailwindcssBasedir,
838
840
  appType,
839
841
  ignoreCallExpressionIdentifiers,
840
- ignoreTaggedTemplateExpressionIdentifiers
842
+ ignoreTaggedTemplateExpressionIdentifiers,
843
+ cssPresetEnv,
844
+ tailwindcss
841
845
  } = ctx;
842
- const cssInjectPreflight = createInjectPreflight(cssPreflight);
843
846
  const customAttributesEntities = isMap(customAttributes) ? [...customAttributes.entries()] : Object.entries(customAttributes);
844
847
  const { initMangle, mangleContext, setMangleRuntimeSet } = useMangleStore();
845
848
  initMangle(mangle);
846
849
  const styleHandler = createStyleHandler({
847
- cssInjectPreflight,
850
+ cssPreflight,
848
851
  customRuleCallback,
849
852
  cssPreflightRange,
850
853
  escapeMap,
@@ -854,7 +857,8 @@ function getCompilerContext(opts) {
854
857
  cssSelectorReplacement,
855
858
  rem2rpx,
856
859
  postcssOptions,
857
- cssRemoveHoverPseudoClass
860
+ cssRemoveHoverPseudoClass,
861
+ cssPresetEnv
858
862
  });
859
863
  const jsHandler2 = createJsHandler({
860
864
  escapeMap,
@@ -879,9 +883,12 @@ function getCompilerContext(opts) {
879
883
  ctx.jsHandler = jsHandler2;
880
884
  ctx.templateHandler = templateHandler;
881
885
  const twPatcher = createTailwindcssPatcher(
882
- tailwindcssBasedir,
883
- appType === "mpx" ? "node_modules/tailwindcss-patch/.cache" : void 0,
884
- supportCustomLengthUnitsPatch != null ? supportCustomLengthUnitsPatch : true
886
+ {
887
+ basedir: tailwindcssBasedir,
888
+ cacheDir: appType === "mpx" ? "node_modules/tailwindcss-patch/.cache" : void 0,
889
+ supportCustomLengthUnitsPatch: supportCustomLengthUnitsPatch != null ? supportCustomLengthUnitsPatch : true,
890
+ tailwindcss
891
+ }
885
892
  );
886
893
  ctx.setMangleRuntimeSet = setMangleRuntimeSet;
887
894
  ctx.cache = initializeCache(cache);
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-75EWCRQW.mjs";
4
4
  import {
5
5
  getCompilerContext
6
- } from "./chunk-PCLP6Y32.mjs";
6
+ } from "./chunk-T4LGP4UP.mjs";
7
7
  import {
8
8
  __async,
9
9
  __spreadValues
@@ -24,7 +24,7 @@ function createPlugins(options = {}) {
24
24
  objectMode: true,
25
25
  transform(file, _encoding, callback) {
26
26
  return __async(this, null, function* () {
27
- runtimeSet = twPatcher.getClassSet();
27
+ runtimeSet = yield twPatcher.getClassSet();
28
28
  setMangleRuntimeSet(runtimeSet);
29
29
  const error = null;
30
30
  if (file.contents) {
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-HL6Y5PYZ.mjs";
7
7
  import {
8
8
  getCompilerContext
9
- } from "./chunk-PCLP6Y32.mjs";
9
+ } from "./chunk-T4LGP4UP.mjs";
10
10
  import {
11
11
  getGroupedEntries,
12
12
  removeExt
@@ -84,7 +84,7 @@ var UnifiedWebpackPluginV5 = class {
84
84
  }
85
85
  const entries = Object.entries(assets);
86
86
  const groupedEntries = getGroupedEntries(entries, this.options);
87
- const runtimeSet = getClassSet();
87
+ const runtimeSet = yield getClassSet();
88
88
  setMangleRuntimeSet(runtimeSet);
89
89
  debug("get runtimeSet, class count: %d", runtimeSet.size);
90
90
  if (Array.isArray(groupedEntries.html)) {
package/dist/cli.js CHANGED
@@ -4,7 +4,7 @@ var _chunkN62XM3T3js = require('./chunk-N62XM3T3.js');
4
4
 
5
5
 
6
6
 
7
- var _chunkUDT6MZJ7js = require('./chunk-UDT6MZJ7.js');
7
+ var _chunkGLN4NGPVjs = require('./chunk-GLN4NGPV.js');
8
8
  require('./chunk-WGQLZ5K4.js');
9
9
  require('./chunk-YUXG2EJF.js');
10
10
  require('./chunk-35CYTBPM.js');
@@ -17,13 +17,13 @@ var _semver = require('semver'); var _semver2 = _interopRequireDefault(_semver);
17
17
  _process2.default.title = "node (weapp-tailwindcss)";
18
18
  var args = _process2.default.argv.slice(2);
19
19
  if (_semver2.default.lt(_process2.default.versions.node, _chunkN62XM3T3js.WEAPP_TW_REQUIRED_NODE_VERSION)) {
20
- _chunkUDT6MZJ7js.logger.warn(
20
+ _chunkGLN4NGPVjs.logger.warn(
21
21
  `You are using Node.js ${_process2.default.versions.node}. For weapp-tailwindcss, Node.js version >= v${_chunkN62XM3T3js.WEAPP_TW_REQUIRED_NODE_VERSION} is required.`
22
22
  );
23
23
  }
24
24
  var command = args[0];
25
25
  if (command === "patch") {
26
- const ctx = _chunkUDT6MZJ7js.getCompilerContext.call(void 0, );
26
+ const ctx = _chunkGLN4NGPVjs.getCompilerContext.call(void 0, );
27
27
  ctx.twPatcher.patch();
28
28
  } else if (command === "init") {
29
29
  _init.init.call(void 0, );
package/dist/cli.mjs CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  getCompilerContext,
6
6
  logger
7
- } from "./chunk-PCLP6Y32.mjs";
7
+ } from "./chunk-T4LGP4UP.mjs";
8
8
  import "./chunk-PCBSAFQF.mjs";
9
9
  import "./chunk-RHTRRSP3.mjs";
10
10
  import "./chunk-MUJ65IQ3.mjs";
package/dist/core.d.mts CHANGED
@@ -8,6 +8,7 @@ import 'tailwindcss-patch';
8
8
  import 'node:buffer';
9
9
  import 'webpack';
10
10
  import 'lru-cache';
11
+ import 'postcss-preset-env';
11
12
 
12
13
  /**
13
14
  * 创建一个上下文对象,用于处理小程序的模板、样式和脚本转换。
@@ -19,7 +20,7 @@ declare function createContext(options?: UserDefinedOptions): {
19
20
  transformWxml: (rawWxml: string, options?: ITemplateHandlerOptions) => Promise<string>;
20
21
  transformJs: (rawJs: string, options?: {
21
22
  runtimeSet?: Set<string>;
22
- } & CreateJsHandlerOptions) => JsHandlerResult | Promise<JsHandlerResult>;
23
+ } & CreateJsHandlerOptions) => Promise<JsHandlerResult>;
23
24
  };
24
25
 
25
26
  export { createContext };
package/dist/core.d.ts CHANGED
@@ -8,6 +8,7 @@ import 'tailwindcss-patch';
8
8
  import 'node:buffer';
9
9
  import 'webpack';
10
10
  import 'lru-cache';
11
+ import 'postcss-preset-env';
11
12
 
12
13
  /**
13
14
  * 创建一个上下文对象,用于处理小程序的模板、样式和脚本转换。
@@ -19,7 +20,7 @@ declare function createContext(options?: UserDefinedOptions): {
19
20
  transformWxml: (rawWxml: string, options?: ITemplateHandlerOptions) => Promise<string>;
20
21
  transformJs: (rawJs: string, options?: {
21
22
  runtimeSet?: Set<string>;
22
- } & CreateJsHandlerOptions) => JsHandlerResult | Promise<JsHandlerResult>;
23
+ } & CreateJsHandlerOptions) => Promise<JsHandlerResult>;
23
24
  };
24
25
 
25
26
  export { createContext };
package/dist/core.js CHANGED
@@ -1,15 +1,17 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkUDT6MZJ7js = require('./chunk-UDT6MZJ7.js');
3
+ var _chunkGLN4NGPVjs = require('./chunk-GLN4NGPV.js');
4
4
  require('./chunk-WGQLZ5K4.js');
5
5
  require('./chunk-YUXG2EJF.js');
6
6
  require('./chunk-35CYTBPM.js');
7
- require('./chunk-6FNC3XMI.js');
7
+
8
+
9
+ var _chunk6FNC3XMIjs = require('./chunk-6FNC3XMI.js');
8
10
 
9
11
  // src/core.ts
10
12
  var _shared = require('@weapp-tailwindcss/shared');
11
13
  function createContext(options = {}) {
12
- const opts = _chunkUDT6MZJ7js.getCompilerContext.call(void 0, options);
14
+ const opts = _chunkGLN4NGPVjs.getCompilerContext.call(void 0, options);
13
15
  const { templateHandler, styleHandler, jsHandler, twPatcher } = opts;
14
16
  let runtimeSet = /* @__PURE__ */ new Set();
15
17
  twPatcher.patch();
@@ -18,9 +20,11 @@ function createContext(options = {}) {
18
20
  isMainChunk: true
19
21
  }));
20
22
  }
21
- function transformJs(rawJs, options2 = {}) {
22
- runtimeSet = options2 && options2.runtimeSet ? options2.runtimeSet : twPatcher.getClassSet();
23
- return jsHandler(rawJs, runtimeSet, options2);
23
+ function transformJs(_0) {
24
+ return _chunk6FNC3XMIjs.__async.call(void 0, this, arguments, function* (rawJs, options2 = {}) {
25
+ runtimeSet = options2 && options2.runtimeSet ? options2.runtimeSet : yield twPatcher.getClassSet();
26
+ return yield jsHandler(rawJs, runtimeSet, options2);
27
+ });
24
28
  }
25
29
  function transformWxml(rawWxml, options2) {
26
30
  return templateHandler(rawWxml, _shared.defuOverrideArray.call(void 0, options2, {
package/dist/core.mjs CHANGED
@@ -1,10 +1,12 @@
1
1
  import {
2
2
  getCompilerContext
3
- } from "./chunk-PCLP6Y32.mjs";
3
+ } from "./chunk-T4LGP4UP.mjs";
4
4
  import "./chunk-PCBSAFQF.mjs";
5
5
  import "./chunk-RHTRRSP3.mjs";
6
6
  import "./chunk-MUJ65IQ3.mjs";
7
- import "./chunk-AXBFBHS2.mjs";
7
+ import {
8
+ __async
9
+ } from "./chunk-AXBFBHS2.mjs";
8
10
 
9
11
  // src/core.ts
10
12
  import { defuOverrideArray } from "@weapp-tailwindcss/shared";
@@ -18,9 +20,11 @@ function createContext(options = {}) {
18
20
  isMainChunk: true
19
21
  }));
20
22
  }
21
- function transformJs(rawJs, options2 = {}) {
22
- runtimeSet = options2 && options2.runtimeSet ? options2.runtimeSet : twPatcher.getClassSet();
23
- return jsHandler(rawJs, runtimeSet, options2);
23
+ function transformJs(_0) {
24
+ return __async(this, arguments, function* (rawJs, options2 = {}) {
25
+ runtimeSet = options2 && options2.runtimeSet ? options2.runtimeSet : yield twPatcher.getClassSet();
26
+ return yield jsHandler(rawJs, runtimeSet, options2);
27
+ });
24
28
  }
25
29
  function transformWxml(rawWxml, options2) {
26
30
  return templateHandler(rawWxml, defuOverrideArray(options2, {
@@ -8,6 +8,7 @@ import 'tailwindcss-patch';
8
8
  import 'node:buffer';
9
9
  import 'webpack';
10
10
  import 'lru-cache';
11
+ import 'postcss-preset-env';
11
12
 
12
13
  declare function getDefaultOptions(): UserDefinedOptions;
13
14
 
@@ -8,6 +8,7 @@ import 'tailwindcss-patch';
8
8
  import 'node:buffer';
9
9
  import 'webpack';
10
10
  import 'lru-cache';
11
+ import 'postcss-preset-env';
11
12
 
12
13
  declare function getDefaultOptions(): UserDefinedOptions;
13
14
 
package/dist/escape.d.mts CHANGED
@@ -8,6 +8,7 @@ import 'tailwindcss-patch';
8
8
  import 'node:buffer';
9
9
  import 'webpack';
10
10
  import 'lru-cache';
11
+ import 'postcss-preset-env';
11
12
 
12
13
  declare function replaceWxml(original: string, options?: ITemplateHandlerOptions): string;
13
14
 
package/dist/escape.d.ts CHANGED
@@ -8,6 +8,7 @@ import 'tailwindcss-patch';
8
8
  import 'node:buffer';
9
9
  import 'webpack';
10
10
  import 'lru-cache';
11
+ import 'postcss-preset-env';
11
12
 
12
13
  declare function replaceWxml(original: string, options?: ITemplateHandlerOptions): string;
13
14
 
package/dist/gulp.d.mts CHANGED
@@ -9,6 +9,7 @@ import 'tailwindcss-patch';
9
9
  import 'node:buffer';
10
10
  import 'webpack';
11
11
  import 'lru-cache';
12
+ import 'postcss-preset-env';
12
13
 
13
14
  /**
14
15
  * @name weapp-tw-gulp
package/dist/gulp.d.ts CHANGED
@@ -9,6 +9,7 @@ import 'tailwindcss-patch';
9
9
  import 'node:buffer';
10
10
  import 'webpack';
11
11
  import 'lru-cache';
12
+ import 'postcss-preset-env';
12
13
 
13
14
  /**
14
15
  * @name weapp-tw-gulp
package/dist/gulp.js CHANGED
@@ -1,12 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkGX4O2YZIjs = require('./chunk-GX4O2YZI.js');
3
+ var _chunk4P6YCUJTjs = require('./chunk-4P6YCUJT.js');
4
4
  require('./chunk-HBQASQKY.js');
5
- require('./chunk-UDT6MZJ7.js');
5
+ require('./chunk-GLN4NGPV.js');
6
6
  require('./chunk-WGQLZ5K4.js');
7
7
  require('./chunk-YUXG2EJF.js');
8
8
  require('./chunk-35CYTBPM.js');
9
9
  require('./chunk-6FNC3XMI.js');
10
10
 
11
11
 
12
- exports.createPlugins = _chunkGX4O2YZIjs.createPlugins;
12
+ exports.createPlugins = _chunk4P6YCUJTjs.createPlugins;
package/dist/gulp.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  createPlugins
3
- } from "./chunk-F23L6ZME.mjs";
3
+ } from "./chunk-XSU23YPZ.mjs";
4
4
  import "./chunk-75EWCRQW.mjs";
5
- import "./chunk-PCLP6Y32.mjs";
5
+ import "./chunk-T4LGP4UP.mjs";
6
6
  import "./chunk-PCBSAFQF.mjs";
7
7
  import "./chunk-RHTRRSP3.mjs";
8
8
  import "./chunk-MUJ65IQ3.mjs";
package/dist/index.d.mts CHANGED
@@ -12,4 +12,5 @@ import 'tailwindcss-patch';
12
12
  import 'node:buffer';
13
13
  import 'webpack';
14
14
  import 'lru-cache';
15
+ import 'postcss-preset-env';
15
16
  import 'vite';
package/dist/index.d.ts CHANGED
@@ -12,4 +12,5 @@ import 'tailwindcss-patch';
12
12
  import 'node:buffer';
13
13
  import 'webpack';
14
14
  import 'lru-cache';
15
+ import 'postcss-preset-env';
15
16
  import 'vite';
package/dist/index.js CHANGED
@@ -1,16 +1,16 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-FXPGR372.js');
2
2
 
3
3
 
4
- var _chunkKVKGWZDDjs = require('./chunk-KVKGWZDD.js');
4
+ var _chunkSAIWHQAYjs = require('./chunk-SAIWHQAY.js');
5
5
 
6
6
 
7
- var _chunkGX4O2YZIjs = require('./chunk-GX4O2YZI.js');
7
+ var _chunk4P6YCUJTjs = require('./chunk-4P6YCUJT.js');
8
8
 
9
9
 
10
- var _chunkGHLS2DGYjs = require('./chunk-GHLS2DGY.js');
10
+ var _chunk3IIS4S3Ejs = require('./chunk-3IIS4S3E.js');
11
11
  require('./chunk-HBQASQKY.js');
12
12
  require('./chunk-N62XM3T3.js');
13
- require('./chunk-UDT6MZJ7.js');
13
+ require('./chunk-GLN4NGPV.js');
14
14
  require('./chunk-WGQLZ5K4.js');
15
15
  require('./chunk-YUXG2EJF.js');
16
16
  require('./chunk-35CYTBPM.js');
@@ -19,4 +19,4 @@ require('./chunk-6FNC3XMI.js');
19
19
 
20
20
 
21
21
 
22
- exports.UnifiedViteWeappTailwindcssPlugin = _chunkGHLS2DGYjs.UnifiedViteWeappTailwindcssPlugin; exports.UnifiedWebpackPluginV5 = _chunkKVKGWZDDjs.UnifiedWebpackPluginV5; exports.createPlugins = _chunkGX4O2YZIjs.createPlugins;
22
+ exports.UnifiedViteWeappTailwindcssPlugin = _chunk3IIS4S3Ejs.UnifiedViteWeappTailwindcssPlugin; exports.UnifiedWebpackPluginV5 = _chunkSAIWHQAYjs.UnifiedWebpackPluginV5; exports.createPlugins = _chunk4P6YCUJTjs.createPlugins;
package/dist/index.mjs CHANGED
@@ -1,16 +1,16 @@
1
1
  import "./chunk-LOLJLZCX.mjs";
2
2
  import {
3
3
  UnifiedWebpackPluginV5
4
- } from "./chunk-CRIVJETU.mjs";
4
+ } from "./chunk-Z4VQVB26.mjs";
5
5
  import {
6
6
  createPlugins
7
- } from "./chunk-F23L6ZME.mjs";
7
+ } from "./chunk-XSU23YPZ.mjs";
8
8
  import {
9
9
  UnifiedViteWeappTailwindcssPlugin
10
- } from "./chunk-XW3PPBN2.mjs";
10
+ } from "./chunk-AW2WTO5D.mjs";
11
11
  import "./chunk-75EWCRQW.mjs";
12
12
  import "./chunk-HL6Y5PYZ.mjs";
13
- import "./chunk-PCLP6Y32.mjs";
13
+ import "./chunk-T4LGP4UP.mjs";
14
14
  import "./chunk-PCBSAFQF.mjs";
15
15
  import "./chunk-RHTRRSP3.mjs";
16
16
  import "./chunk-MUJ65IQ3.mjs";