weapp-tailwindcss 4.10.2 → 4.11.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/{chunk-3XVUGMTY.mjs → chunk-2LH6PZH3.mjs} +8 -4
  2. package/dist/{chunk-3WUHHFLF.mjs → chunk-35EI5JMK.mjs} +4 -2
  3. package/dist/{chunk-HJVZ4TO3.js → chunk-7XQXBJL6.js} +10 -9
  4. package/dist/{chunk-5U24PLVV.js → chunk-ACTJYB33.js} +4 -2
  5. package/dist/{chunk-ACNOEKQI.mjs → chunk-CLNUBO3Q.mjs} +6 -5
  6. package/dist/{chunk-HT76VHOV.mjs → chunk-DOH7FULQ.mjs} +1 -1
  7. package/dist/{chunk-BZCCVPSU.mjs → chunk-EOK3NZVC.mjs} +2 -2
  8. package/dist/{chunk-3R7FDZJL.js → chunk-FKUPQQYX.js} +377 -215
  9. package/dist/{chunk-MPVAZKRB.mjs → chunk-FMWKBZWX.mjs} +835 -317
  10. package/dist/{chunk-NPZ5QQC7.js → chunk-FV4ZRTAK.js} +57 -17
  11. package/dist/{chunk-IIDSY4XZ.js → chunk-G3G437UE.js} +2 -2
  12. package/dist/{chunk-I35XJD75.js → chunk-I4EOMKX2.js} +900 -382
  13. package/dist/{chunk-N6JOG5K3.mjs → chunk-OIDFSOER.mjs} +52 -12
  14. package/dist/{chunk-DBAAU4LK.js → chunk-OV7FX6XR.js} +1 -1
  15. package/dist/{chunk-SR4GC2F4.js → chunk-OYSABARD.js} +8 -4
  16. package/dist/{chunk-M2ATX5ZS.js → chunk-PXZUQ7RR.js} +5 -5
  17. package/dist/{chunk-WJU62RPV.mjs → chunk-QX2A7SBB.mjs} +352 -190
  18. package/dist/{chunk-5APD2MNV.js → chunk-RXNSOSCT.js} +13 -9
  19. package/dist/{chunk-LHBUALTK.mjs → chunk-W3JO6LBC.mjs} +30 -16
  20. package/dist/{chunk-6VKE7EWV.js → chunk-WGFNCK5B.js} +60 -46
  21. package/dist/{chunk-QOTLDKI4.mjs → chunk-XGUD52TA.mjs} +9 -5
  22. package/dist/cli.js +45 -42
  23. package/dist/cli.mjs +9 -6
  24. package/dist/core.d.mts +4 -3
  25. package/dist/core.d.ts +4 -3
  26. package/dist/core.js +124 -30
  27. package/dist/core.mjs +119 -25
  28. package/dist/css-macro/postcss.js +6 -5
  29. package/dist/css-macro/postcss.mjs +4 -3
  30. package/dist/css-macro.js +5 -5
  31. package/dist/css-macro.mjs +2 -2
  32. package/dist/defaults.js +3 -3
  33. package/dist/defaults.mjs +2 -2
  34. package/dist/escape.js +2 -1
  35. package/dist/escape.mjs +2 -1
  36. package/dist/gulp.d.mts +1 -1
  37. package/dist/gulp.d.ts +1 -1
  38. package/dist/gulp.js +8 -7
  39. package/dist/gulp.mjs +8 -7
  40. package/dist/index.js +11 -11
  41. package/dist/index.mjs +9 -9
  42. package/dist/postcss-html-transform.js +1 -1
  43. package/dist/postcss-html-transform.mjs +1 -1
  44. package/dist/presets.js +5 -5
  45. package/dist/presets.mjs +2 -2
  46. package/dist/reset.js +1 -1
  47. package/dist/reset.mjs +1 -1
  48. package/dist/types.js +1 -1
  49. package/dist/types.mjs +1 -1
  50. package/dist/vite.d.mts +1 -1
  51. package/dist/vite.d.ts +1 -1
  52. package/dist/vite.js +9 -8
  53. package/dist/vite.mjs +8 -7
  54. package/dist/webpack.d.mts +1 -1
  55. package/dist/webpack.d.ts +1 -1
  56. package/dist/webpack.js +10 -9
  57. package/dist/webpack.mjs +8 -7
  58. package/dist/webpack4.d.mts +1 -1
  59. package/dist/webpack4.d.ts +1 -1
  60. package/dist/webpack4.js +64 -49
  61. package/dist/webpack4.mjs +33 -18
  62. package/package.json +7 -7
package/dist/core.mjs CHANGED
@@ -1,18 +1,30 @@
1
1
  import {
2
2
  setupPatchRecorder
3
- } from "./chunk-BZCCVPSU.mjs";
3
+ } from "./chunk-EOK3NZVC.mjs";
4
4
  import {
5
5
  ensureRuntimeClassSet,
6
6
  getCompilerContext
7
- } from "./chunk-MPVAZKRB.mjs";
8
- import "./chunk-QOTLDKI4.mjs";
9
- import "./chunk-3WUHHFLF.mjs";
7
+ } from "./chunk-FMWKBZWX.mjs";
8
+ import "./chunk-XGUD52TA.mjs";
9
+ import "./chunk-35EI5JMK.mjs";
10
10
  import "./chunk-OOHJLO5M.mjs";
11
- import "./chunk-HT76VHOV.mjs";
11
+ import "./chunk-DOH7FULQ.mjs";
12
12
 
13
13
  // src/core.ts
14
14
  import process from "process";
15
15
  import { defuOverrideArray } from "@weapp-tailwindcss/shared";
16
+ var DEFAULT_MAIN_CHUNK_STYLE_OPTIONS = Object.freeze({
17
+ isMainChunk: true
18
+ });
19
+ function resolveTransformWxssOptions(options) {
20
+ if (!options) {
21
+ return DEFAULT_MAIN_CHUNK_STYLE_OPTIONS;
22
+ }
23
+ if (options.isMainChunk === true) {
24
+ return options;
25
+ }
26
+ return defuOverrideArray(options, DEFAULT_MAIN_CHUNK_STYLE_OPTIONS);
27
+ }
16
28
  function createContext(options = {}) {
17
29
  const opts = getCompilerContext(options);
18
30
  const { templateHandler, styleHandler, jsHandler, twPatcher: initialTwPatcher, refreshTailwindcssPatcher } = opts;
@@ -27,31 +39,119 @@ function createContext(options = {}) {
27
39
  refreshTailwindcssPatcher,
28
40
  onPatchCompleted: patchRecorderState.onPatchCompleted
29
41
  };
42
+ const defaultJsHandlerOptionsCache = /* @__PURE__ */ new Map();
43
+ function getDefaultJsHandlerOptions(majorVersion = runtimeState.twPatcher.majorVersion) {
44
+ if (typeof majorVersion !== "number") {
45
+ return void 0;
46
+ }
47
+ let cached = defaultJsHandlerOptionsCache.get(majorVersion);
48
+ if (!cached) {
49
+ cached = {
50
+ tailwindcssMajorVersion: majorVersion
51
+ };
52
+ defaultJsHandlerOptionsCache.set(majorVersion, cached);
53
+ }
54
+ return cached;
55
+ }
30
56
  function withRuntimeTailwindMajorVersion(options2) {
31
- const resolvedOptions = {
32
- ...options2 ?? {}
33
- };
34
- if (typeof resolvedOptions.tailwindcssMajorVersion === "number") {
35
- return resolvedOptions;
57
+ if (!options2) {
58
+ return getDefaultJsHandlerOptions();
59
+ }
60
+ if (typeof options2.tailwindcssMajorVersion === "number") {
61
+ return options2;
36
62
  }
37
63
  const majorVersion = runtimeState.twPatcher.majorVersion;
38
- if (typeof majorVersion === "number") {
39
- resolvedOptions.tailwindcssMajorVersion = majorVersion;
64
+ if (typeof majorVersion !== "number") {
65
+ return options2;
66
+ }
67
+ return {
68
+ ...options2,
69
+ tailwindcssMajorVersion: majorVersion
70
+ };
71
+ }
72
+ function resolveTransformJsOptions(options2) {
73
+ if (!options2) {
74
+ return getDefaultJsHandlerOptions();
75
+ }
76
+ let hasHandlerOption = false;
77
+ let runtimeSetProvided = false;
78
+ for (const key in options2) {
79
+ if (key === "runtimeSet") {
80
+ runtimeSetProvided = true;
81
+ continue;
82
+ }
83
+ hasHandlerOption = true;
84
+ break;
85
+ }
86
+ if (!hasHandlerOption) {
87
+ return getDefaultJsHandlerOptions();
88
+ }
89
+ if (!runtimeSetProvided && typeof options2.tailwindcssMajorVersion === "number") {
90
+ return options2;
40
91
  }
41
- return resolvedOptions;
92
+ if (runtimeSetProvided) {
93
+ const { runtimeSet: _runtimeSet, ...handlerOptions } = options2;
94
+ return withRuntimeTailwindMajorVersion(handlerOptions);
95
+ }
96
+ return withRuntimeTailwindMajorVersion(options2);
97
+ }
98
+ const runtimeAwareTemplateJsHandler = (source, runtime, handlerOptions) => {
99
+ return jsHandler(source, runtime, withRuntimeTailwindMajorVersion(handlerOptions));
100
+ };
101
+ let cachedDefaultTemplateHandlerOptions;
102
+ let cachedDefaultTemplateRuntimeSet;
103
+ let cachedRuntimeOnlyTemplateHandlerOptions;
104
+ let cachedRuntimeOnlyTemplateRuntimeSet;
105
+ function getDefaultTemplateHandlerOptions() {
106
+ if (cachedDefaultTemplateRuntimeSet !== runtimeSet || !cachedDefaultTemplateHandlerOptions) {
107
+ cachedDefaultTemplateRuntimeSet = runtimeSet;
108
+ cachedDefaultTemplateHandlerOptions = {
109
+ runtimeSet,
110
+ jsHandler: runtimeAwareTemplateJsHandler
111
+ };
112
+ }
113
+ return cachedDefaultTemplateHandlerOptions;
114
+ }
115
+ function resolveTransformWxmlOptions(options2) {
116
+ if (!options2) {
117
+ return getDefaultTemplateHandlerOptions();
118
+ }
119
+ let hasOverride = false;
120
+ for (const key in options2) {
121
+ if (key !== "runtimeSet") {
122
+ hasOverride = true;
123
+ break;
124
+ }
125
+ }
126
+ if (!hasOverride) {
127
+ const runtimeOverride = options2.runtimeSet;
128
+ if (runtimeOverride === void 0 || runtimeOverride === runtimeSet) {
129
+ return getDefaultTemplateHandlerOptions();
130
+ }
131
+ if (cachedRuntimeOnlyTemplateRuntimeSet !== runtimeOverride || !cachedRuntimeOnlyTemplateHandlerOptions) {
132
+ cachedRuntimeOnlyTemplateRuntimeSet = runtimeOverride;
133
+ cachedRuntimeOnlyTemplateHandlerOptions = {
134
+ runtimeSet: runtimeOverride,
135
+ jsHandler: runtimeAwareTemplateJsHandler
136
+ };
137
+ }
138
+ return cachedRuntimeOnlyTemplateHandlerOptions;
139
+ }
140
+ return defuOverrideArray(options2, {
141
+ runtimeSet,
142
+ jsHandler: runtimeAwareTemplateJsHandler
143
+ });
42
144
  }
43
145
  async function transformWxss(rawCss, options2) {
44
146
  await runtimeState.patchPromise;
45
- const result = await styleHandler(rawCss, defuOverrideArray(options2, {
46
- isMainChunk: true
47
- }));
147
+ const result = await styleHandler(rawCss, resolveTransformWxssOptions(options2));
48
148
  runtimeSet = await ensureRuntimeClassSet(runtimeState, {
49
149
  forceRefresh: true,
50
150
  forceCollect: true
51
151
  });
52
152
  return result;
53
153
  }
54
- async function transformJs(rawJs, options2 = {}) {
154
+ async function transformJs(rawJs, options2) {
55
155
  await runtimeState.patchPromise;
56
156
  if (options2?.runtimeSet) {
57
157
  runtimeSet = options2.runtimeSet;
@@ -60,7 +160,7 @@ function createContext(options = {}) {
60
160
  forceCollect: true
61
161
  });
62
162
  }
63
- return await jsHandler(rawJs, runtimeSet, withRuntimeTailwindMajorVersion(options2));
163
+ return await jsHandler(rawJs, runtimeSet, resolveTransformJsOptions(options2));
64
164
  }
65
165
  async function transformWxml(rawWxml, options2) {
66
166
  await runtimeState.patchPromise;
@@ -69,13 +169,7 @@ function createContext(options = {}) {
69
169
  forceCollect: true
70
170
  });
71
171
  }
72
- const runtimeJsHandler = jsHandler;
73
- return templateHandler(rawWxml, defuOverrideArray(options2, {
74
- runtimeSet,
75
- jsHandler: (source, runtime, handlerOptions) => {
76
- return runtimeJsHandler(source, runtime, withRuntimeTailwindMajorVersion(handlerOptions));
77
- }
78
- }));
172
+ return templateHandler(rawWxml, resolveTransformWxmlOptions(options2));
79
173
  }
80
174
  return {
81
175
  transformWxss,
@@ -2,10 +2,11 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkSR4GC2F4js = require('../chunk-SR4GC2F4.js');
6
- require('../chunk-DBAAU4LK.js');
5
+ var _chunkOYSABARDjs = require('../chunk-OYSABARD.js');
6
+ require('../chunk-OV7FX6XR.js');
7
7
 
8
8
  // src/css-macro/postcss.ts
9
+ var IFDEF_ENDIF_RE = /#(?:ifn?def|endif)/;
9
10
  var creator = () => {
10
11
  return {
11
12
  postcssPlugin: "postcss-weapp-tw-css-macro-plugin",
@@ -14,13 +15,13 @@ var creator = () => {
14
15
  AtRule(atRule, helper) {
15
16
  if (atRule.name === "media") {
16
17
  const values = [];
17
- _chunkSR4GC2F4js.matchCustomPropertyFromValue.call(void 0, atRule.params, (arr) => {
18
+ _chunkOYSABARDjs.matchCustomPropertyFromValue.call(void 0, atRule.params, (arr) => {
18
19
  values.push(arr[1]);
19
20
  });
20
21
  if (values.length > 0) {
21
22
  const isNegative = atRule.params.includes("not");
22
23
  const text = values.join(" ");
23
- const comment = isNegative ? _chunkSR4GC2F4js.ifndef.call(void 0, text) : _chunkSR4GC2F4js.ifdef.call(void 0, text);
24
+ const comment = isNegative ? _chunkOYSABARDjs.ifndef.call(void 0, text) : _chunkOYSABARDjs.ifdef.call(void 0, text);
24
25
  const nextNodes = [
25
26
  helper.comment({
26
27
  raws: {
@@ -41,7 +42,7 @@ var creator = () => {
41
42
  }
42
43
  },
43
44
  CommentExit(comment) {
44
- if (/#(?:ifn?def|endif)/.test(comment.text)) {
45
+ if (IFDEF_ENDIF_RE.test(comment.text)) {
45
46
  comment.raws.left = " ";
46
47
  comment.raws.right = " ";
47
48
  }
@@ -2,10 +2,11 @@ import {
2
2
  ifdef,
3
3
  ifndef,
4
4
  matchCustomPropertyFromValue
5
- } from "../chunk-3XVUGMTY.mjs";
6
- import "../chunk-HT76VHOV.mjs";
5
+ } from "../chunk-2LH6PZH3.mjs";
6
+ import "../chunk-DOH7FULQ.mjs";
7
7
 
8
8
  // src/css-macro/postcss.ts
9
+ var IFDEF_ENDIF_RE = /#(?:ifn?def|endif)/;
9
10
  var creator = () => {
10
11
  return {
11
12
  postcssPlugin: "postcss-weapp-tw-css-macro-plugin",
@@ -41,7 +42,7 @@ var creator = () => {
41
42
  }
42
43
  },
43
44
  CommentExit(comment) {
44
- if (/#(?:ifn?def|endif)/.test(comment.text)) {
45
+ if (IFDEF_ENDIF_RE.test(comment.text)) {
45
46
  comment.raws.left = " ";
46
47
  comment.raws.right = " ";
47
48
  }
package/dist/css-macro.js CHANGED
@@ -1,11 +1,11 @@
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(); } }
2
2
 
3
3
 
4
- var _chunkSR4GC2F4js = require('./chunk-SR4GC2F4.js');
4
+ var _chunkOYSABARDjs = require('./chunk-OYSABARD.js');
5
5
 
6
6
 
7
7
  var _chunkDYLQ6UOIjs = require('./chunk-DYLQ6UOI.js');
8
- require('./chunk-DBAAU4LK.js');
8
+ require('./chunk-OV7FX6XR.js');
9
9
 
10
10
  // src/css-macro/index.ts
11
11
  var _plugin = require('tailwindcss/plugin'); var _plugin2 = _interopRequireDefault(_plugin);
@@ -33,12 +33,12 @@ var cssMacro = _plugin2.default.withOptions((options) => {
33
33
  const { matchVariant, addVariant } = api;
34
34
  const supportsDynamic = typeof matchVariant === "function";
35
35
  if (dynamic && supportsDynamic) {
36
- matchVariant("ifdef", (value) => _chunkSR4GC2F4js.createMediaQuery.call(void 0, value));
37
- matchVariant("ifndef", (value) => _chunkSR4GC2F4js.createNegativeMediaQuery.call(void 0, value));
36
+ matchVariant("ifdef", (value) => _chunkOYSABARDjs.createMediaQuery.call(void 0, value));
37
+ matchVariant("ifndef", (value) => _chunkOYSABARDjs.createNegativeMediaQuery.call(void 0, value));
38
38
  }
39
39
  if (typeof addVariant === "function") {
40
40
  for (const variant of staticVariants) {
41
- const query = variant.negative ? _chunkSR4GC2F4js.createNegativeMediaQuery.call(void 0, variant.value) : _chunkSR4GC2F4js.createMediaQuery.call(void 0, variant.value);
41
+ const query = variant.negative ? _chunkOYSABARDjs.createNegativeMediaQuery.call(void 0, variant.value) : _chunkOYSABARDjs.createMediaQuery.call(void 0, variant.value);
42
42
  addVariant(variant.name, query);
43
43
  }
44
44
  }
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  createMediaQuery,
3
3
  createNegativeMediaQuery
4
- } from "./chunk-3XVUGMTY.mjs";
4
+ } from "./chunk-2LH6PZH3.mjs";
5
5
  import {
6
6
  defu
7
7
  } from "./chunk-OOHJLO5M.mjs";
8
- import "./chunk-HT76VHOV.mjs";
8
+ import "./chunk-DOH7FULQ.mjs";
9
9
 
10
10
  // src/css-macro/index.ts
11
11
  import plugin from "tailwindcss/plugin";
package/dist/defaults.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk5U24PLVVjs = require('./chunk-5U24PLVV.js');
3
+ var _chunkACTJYB33js = require('./chunk-ACTJYB33.js');
4
4
  require('./chunk-DYLQ6UOI.js');
5
- require('./chunk-DBAAU4LK.js');
5
+ require('./chunk-OV7FX6XR.js');
6
6
 
7
7
 
8
- exports.getDefaultOptions = _chunk5U24PLVVjs.getDefaultOptions;
8
+ exports.getDefaultOptions = _chunkACTJYB33js.getDefaultOptions;
package/dist/defaults.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  getDefaultOptions
3
- } from "./chunk-3WUHHFLF.mjs";
3
+ } from "./chunk-35EI5JMK.mjs";
4
4
  import "./chunk-OOHJLO5M.mjs";
5
- import "./chunk-HT76VHOV.mjs";
5
+ import "./chunk-DOH7FULQ.mjs";
6
6
  export {
7
7
  getDefaultOptions
8
8
  };
package/dist/escape.js CHANGED
@@ -29,6 +29,7 @@ module.exports = __toCommonJS(escape_exports);
29
29
 
30
30
  // src/wxml/shared.ts
31
31
  var import_escape = require("@weapp-core/escape");
32
+ var NEWLINE_RE = /[\n\r]+/g;
32
33
  function replaceWxml(original, options = {
33
34
  keepEOL: false,
34
35
  escapeMap: import_escape.MappingChars2String
@@ -36,7 +37,7 @@ function replaceWxml(original, options = {
36
37
  const { keepEOL, escapeMap, ignoreHead } = options;
37
38
  let res = original;
38
39
  if (!keepEOL) {
39
- res = res.replaceAll(/[\n\r]+/g, "");
40
+ res = res.replaceAll(NEWLINE_RE, "");
40
41
  }
41
42
  res = (0, import_escape.escape)(res, {
42
43
  map: escapeMap,
package/dist/escape.mjs CHANGED
@@ -1,5 +1,6 @@
1
1
  // src/wxml/shared.ts
2
2
  import { escape, MappingChars2String } from "@weapp-core/escape";
3
+ var NEWLINE_RE = /[\n\r]+/g;
3
4
  function replaceWxml(original, options = {
4
5
  keepEOL: false,
5
6
  escapeMap: MappingChars2String
@@ -7,7 +8,7 @@ function replaceWxml(original, options = {
7
8
  const { keepEOL, escapeMap, ignoreHead } = options;
8
9
  let res = original;
9
10
  if (!keepEOL) {
10
- res = res.replaceAll(/[\n\r]+/g, "");
11
+ res = res.replaceAll(NEWLINE_RE, "");
11
12
  }
12
13
  res = escape(res, {
13
14
  map: escapeMap,
package/dist/gulp.d.mts CHANGED
@@ -21,4 +21,4 @@ declare function createPlugins(options?: UserDefinedOptions): {
21
21
  transformJs: (options?: Partial<CreateJsHandlerOptions>) => stream.Transform;
22
22
  };
23
23
 
24
- export { UserDefinedOptions, createPlugins };
24
+ export { UserDefinedOptions, createPlugins, createPlugins as weappTailwindcss };
package/dist/gulp.d.ts CHANGED
@@ -21,4 +21,4 @@ declare function createPlugins(options?: UserDefinedOptions): {
21
21
  transformJs: (options?: Partial<CreateJsHandlerOptions>) => stream.Transform;
22
22
  };
23
23
 
24
- export { UserDefinedOptions, createPlugins };
24
+ export { UserDefinedOptions, createPlugins, createPlugins as weappTailwindcss };
package/dist/gulp.js CHANGED
@@ -1,13 +1,14 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkNPZ5QQC7js = require('./chunk-NPZ5QQC7.js');
3
+ var _chunkFV4ZRTAKjs = require('./chunk-FV4ZRTAK.js');
4
4
  require('./chunk-LTJQUORK.js');
5
- require('./chunk-M2ATX5ZS.js');
6
- require('./chunk-I35XJD75.js');
7
- require('./chunk-5APD2MNV.js');
8
- require('./chunk-5U24PLVV.js');
5
+ require('./chunk-PXZUQ7RR.js');
6
+ require('./chunk-I4EOMKX2.js');
7
+ require('./chunk-RXNSOSCT.js');
8
+ require('./chunk-ACTJYB33.js');
9
9
  require('./chunk-DYLQ6UOI.js');
10
- require('./chunk-DBAAU4LK.js');
10
+ require('./chunk-OV7FX6XR.js');
11
11
 
12
12
 
13
- exports.createPlugins = _chunkNPZ5QQC7js.createPlugins;
13
+
14
+ exports.createPlugins = _chunkFV4ZRTAKjs.createPlugins; exports.weappTailwindcss = _chunkFV4ZRTAKjs.createPlugins;
package/dist/gulp.mjs CHANGED
@@ -1,13 +1,14 @@
1
1
  import {
2
2
  createPlugins
3
- } from "./chunk-N6JOG5K3.mjs";
3
+ } from "./chunk-OIDFSOER.mjs";
4
4
  import "./chunk-RRHPTTCP.mjs";
5
- import "./chunk-BZCCVPSU.mjs";
6
- import "./chunk-MPVAZKRB.mjs";
7
- import "./chunk-QOTLDKI4.mjs";
8
- import "./chunk-3WUHHFLF.mjs";
5
+ import "./chunk-EOK3NZVC.mjs";
6
+ import "./chunk-FMWKBZWX.mjs";
7
+ import "./chunk-XGUD52TA.mjs";
8
+ import "./chunk-35EI5JMK.mjs";
9
9
  import "./chunk-OOHJLO5M.mjs";
10
- import "./chunk-HT76VHOV.mjs";
10
+ import "./chunk-DOH7FULQ.mjs";
11
11
  export {
12
- createPlugins
12
+ createPlugins,
13
+ createPlugins as weappTailwindcss
13
14
  };
package/dist/index.js CHANGED
@@ -1,25 +1,25 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunk6VKE7EWVjs = require('./chunk-6VKE7EWV.js');
5
- require('./chunk-HJVZ4TO3.js');
4
+ var _chunkWGFNCK5Bjs = require('./chunk-WGFNCK5B.js');
5
+ require('./chunk-7XQXBJL6.js');
6
6
 
7
7
 
8
- var _chunkNPZ5QQC7js = require('./chunk-NPZ5QQC7.js');
8
+ var _chunkFV4ZRTAKjs = require('./chunk-FV4ZRTAK.js');
9
9
 
10
10
 
11
- var _chunk3R7FDZJLjs = require('./chunk-3R7FDZJL.js');
12
- require('./chunk-IIDSY4XZ.js');
11
+ var _chunkFKUPQQYXjs = require('./chunk-FKUPQQYX.js');
12
+ require('./chunk-G3G437UE.js');
13
13
  require('./chunk-LTJQUORK.js');
14
- require('./chunk-M2ATX5ZS.js');
15
- require('./chunk-I35XJD75.js');
16
- require('./chunk-5APD2MNV.js');
17
- require('./chunk-5U24PLVV.js');
14
+ require('./chunk-PXZUQ7RR.js');
15
+ require('./chunk-I4EOMKX2.js');
16
+ require('./chunk-RXNSOSCT.js');
17
+ require('./chunk-ACTJYB33.js');
18
18
  require('./chunk-DYLQ6UOI.js');
19
- require('./chunk-DBAAU4LK.js');
19
+ require('./chunk-OV7FX6XR.js');
20
20
 
21
21
 
22
22
 
23
23
 
24
24
 
25
- exports.UnifiedViteWeappTailwindcssPlugin = _chunk3R7FDZJLjs.UnifiedViteWeappTailwindcssPlugin; exports.UnifiedWebpackPluginV5 = _chunk6VKE7EWVjs.UnifiedWebpackPluginV5; exports.createPlugins = _chunkNPZ5QQC7js.createPlugins; exports.weappTailwindcssPackageDir = _chunk6VKE7EWVjs.weappTailwindcssPackageDir;
25
+ exports.UnifiedViteWeappTailwindcssPlugin = _chunkFKUPQQYXjs.UnifiedViteWeappTailwindcssPlugin; exports.UnifiedWebpackPluginV5 = _chunkWGFNCK5Bjs.UnifiedWebpackPluginV5; exports.createPlugins = _chunkFV4ZRTAKjs.createPlugins; exports.weappTailwindcssPackageDir = _chunkWGFNCK5Bjs.weappTailwindcssPackageDir;
package/dist/index.mjs CHANGED
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  UnifiedWebpackPluginV5,
3
3
  weappTailwindcssPackageDir
4
- } from "./chunk-LHBUALTK.mjs";
5
- import "./chunk-ACNOEKQI.mjs";
4
+ } from "./chunk-W3JO6LBC.mjs";
5
+ import "./chunk-CLNUBO3Q.mjs";
6
6
  import {
7
7
  createPlugins
8
- } from "./chunk-N6JOG5K3.mjs";
8
+ } from "./chunk-OIDFSOER.mjs";
9
9
  import {
10
10
  UnifiedViteWeappTailwindcssPlugin
11
- } from "./chunk-WJU62RPV.mjs";
11
+ } from "./chunk-QX2A7SBB.mjs";
12
12
  import "./chunk-F2CKKG6Q.mjs";
13
13
  import "./chunk-RRHPTTCP.mjs";
14
- import "./chunk-BZCCVPSU.mjs";
15
- import "./chunk-MPVAZKRB.mjs";
16
- import "./chunk-QOTLDKI4.mjs";
17
- import "./chunk-3WUHHFLF.mjs";
14
+ import "./chunk-EOK3NZVC.mjs";
15
+ import "./chunk-FMWKBZWX.mjs";
16
+ import "./chunk-XGUD52TA.mjs";
17
+ import "./chunk-35EI5JMK.mjs";
18
18
  import "./chunk-OOHJLO5M.mjs";
19
- import "./chunk-HT76VHOV.mjs";
19
+ import "./chunk-DOH7FULQ.mjs";
20
20
  export {
21
21
  UnifiedViteWeappTailwindcssPlugin,
22
22
  UnifiedWebpackPluginV5,
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }require('./chunk-DBAAU4LK.js');
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }require('./chunk-OV7FX6XR.js');
2
2
 
3
3
  // src/postcss-html-transform.ts
4
4
  var _htmltransform = require('@weapp-tailwindcss/postcss/html-transform'); var _htmltransform2 = _interopRequireDefault(_htmltransform);
@@ -1,4 +1,4 @@
1
- import "./chunk-HT76VHOV.mjs";
1
+ import "./chunk-DOH7FULQ.mjs";
2
2
 
3
3
  // src/postcss-html-transform.ts
4
4
  import postcssHtmlTransform from "@weapp-tailwindcss/postcss/html-transform";
package/dist/presets.js CHANGED
@@ -1,12 +1,12 @@
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(); } }
2
2
 
3
3
 
4
- var _chunk5APD2MNVjs = require('./chunk-5APD2MNV.js');
4
+ var _chunkRXNSOSCTjs = require('./chunk-RXNSOSCT.js');
5
5
 
6
6
 
7
7
 
8
8
  var _chunkDYLQ6UOIjs = require('./chunk-DYLQ6UOI.js');
9
- require('./chunk-DBAAU4LK.js');
9
+ require('./chunk-OV7FX6XR.js');
10
10
 
11
11
  // src/presets/shared.ts
12
12
  function normalizeCssEntries(entries) {
@@ -24,7 +24,7 @@ function createBasePreset(options = {}) {
24
24
  rawOptions,
25
25
  ...userOptions
26
26
  } = options;
27
- const baseDir = _chunk5APD2MNVjs.resolveTailwindcssBasedir.call(void 0, base);
27
+ const baseDir = _chunkRXNSOSCTjs.resolveTailwindcssBasedir.call(void 0, base);
28
28
  const normalizedCssEntries = normalizeCssEntries(cssEntries);
29
29
  const tailwindConfig = {
30
30
  v2: { cwd: baseDir },
@@ -70,10 +70,10 @@ function uniApp(options = {}) {
70
70
  // src/presets/uni-app-x.ts
71
71
 
72
72
  function uniAppX(options) {
73
- _chunk5APD2MNVjs.logger.info(`UNI_PLATFORM: ${_process2.default.env.UNI_PLATFORM}`);
73
+ _chunkRXNSOSCTjs.logger.info(`UNI_PLATFORM: ${_process2.default.env.UNI_PLATFORM}`);
74
74
  const utsPlatform = _chunkDYLQ6UOIjs.resolveUniUtsPlatform.call(void 0, );
75
75
  const uniPlatform = _chunkDYLQ6UOIjs.resolveUniUtsPlatform.call(void 0, _process2.default.env.UNI_PLATFORM);
76
- _chunk5APD2MNVjs.logger.info(`UNI_UTS_PLATFORM: ${_nullishCoalesce(utsPlatform.raw, () => ( "undefined"))}`);
76
+ _chunkRXNSOSCTjs.logger.info(`UNI_UTS_PLATFORM: ${_nullishCoalesce(utsPlatform.raw, () => ( "undefined"))}`);
77
77
  const isApp = utsPlatform.isApp || uniPlatform.isApp;
78
78
  const cssEntries = normalizeCssEntries(options.cssEntries);
79
79
  return _chunkDYLQ6UOIjs.defuOverrideArray.call(void 0,
package/dist/presets.mjs CHANGED
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  logger,
3
3
  resolveTailwindcssBasedir
4
- } from "./chunk-QOTLDKI4.mjs";
4
+ } from "./chunk-XGUD52TA.mjs";
5
5
  import {
6
6
  defuOverrideArray,
7
7
  resolveUniUtsPlatform
8
8
  } from "./chunk-OOHJLO5M.mjs";
9
- import "./chunk-HT76VHOV.mjs";
9
+ import "./chunk-DOH7FULQ.mjs";
10
10
 
11
11
  // src/presets/shared.ts
12
12
  function normalizeCssEntries(entries) {
package/dist/reset.js CHANGED
@@ -1,4 +1,4 @@
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; }require('./chunk-DBAAU4LK.js');
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; }require('./chunk-OV7FX6XR.js');
2
2
 
3
3
  // src/reset/index.ts
4
4
  var _plugin = require('tailwindcss/plugin'); var _plugin2 = _interopRequireDefault(_plugin);
package/dist/reset.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import "./chunk-HT76VHOV.mjs";
1
+ import "./chunk-DOH7FULQ.mjs";
2
2
 
3
3
  // src/reset/index.ts
4
4
  import plugin from "tailwindcss/plugin";
package/dist/types.js CHANGED
@@ -1 +1 @@
1
- "use strict";require('./chunk-DBAAU4LK.js');
1
+ "use strict";require('./chunk-OV7FX6XR.js');
package/dist/types.mjs CHANGED
@@ -1 +1 @@
1
- import "./chunk-HT76VHOV.mjs";
1
+ import "./chunk-DOH7FULQ.mjs";
package/dist/vite.d.mts CHANGED
@@ -14,4 +14,4 @@ import 'lru-cache';
14
14
  */
15
15
  declare function UnifiedViteWeappTailwindcssPlugin(options?: UserDefinedOptions): Plugin[] | undefined;
16
16
 
17
- export { UnifiedViteWeappTailwindcssPlugin, UserDefinedOptions };
17
+ export { UnifiedViteWeappTailwindcssPlugin, UserDefinedOptions, UnifiedViteWeappTailwindcssPlugin as weappTailwindcss };
package/dist/vite.d.ts CHANGED
@@ -14,4 +14,4 @@ import 'lru-cache';
14
14
  */
15
15
  declare function UnifiedViteWeappTailwindcssPlugin(options?: UserDefinedOptions): Plugin[] | undefined;
16
16
 
17
- export { UnifiedViteWeappTailwindcssPlugin, UserDefinedOptions };
17
+ export { UnifiedViteWeappTailwindcssPlugin, UserDefinedOptions, UnifiedViteWeappTailwindcssPlugin as weappTailwindcss };
package/dist/vite.js CHANGED
@@ -1,14 +1,15 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk3R7FDZJLjs = require('./chunk-3R7FDZJL.js');
4
- require('./chunk-IIDSY4XZ.js');
3
+ var _chunkFKUPQQYXjs = require('./chunk-FKUPQQYX.js');
4
+ require('./chunk-G3G437UE.js');
5
5
  require('./chunk-LTJQUORK.js');
6
- require('./chunk-M2ATX5ZS.js');
7
- require('./chunk-I35XJD75.js');
8
- require('./chunk-5APD2MNV.js');
9
- require('./chunk-5U24PLVV.js');
6
+ require('./chunk-PXZUQ7RR.js');
7
+ require('./chunk-I4EOMKX2.js');
8
+ require('./chunk-RXNSOSCT.js');
9
+ require('./chunk-ACTJYB33.js');
10
10
  require('./chunk-DYLQ6UOI.js');
11
- require('./chunk-DBAAU4LK.js');
11
+ require('./chunk-OV7FX6XR.js');
12
12
 
13
13
 
14
- exports.UnifiedViteWeappTailwindcssPlugin = _chunk3R7FDZJLjs.UnifiedViteWeappTailwindcssPlugin;
14
+
15
+ exports.UnifiedViteWeappTailwindcssPlugin = _chunkFKUPQQYXjs.UnifiedViteWeappTailwindcssPlugin; exports.weappTailwindcss = _chunkFKUPQQYXjs.UnifiedViteWeappTailwindcssPlugin;
package/dist/vite.mjs CHANGED
@@ -1,14 +1,15 @@
1
1
  import {
2
2
  UnifiedViteWeappTailwindcssPlugin
3
- } from "./chunk-WJU62RPV.mjs";
3
+ } from "./chunk-QX2A7SBB.mjs";
4
4
  import "./chunk-F2CKKG6Q.mjs";
5
5
  import "./chunk-RRHPTTCP.mjs";
6
- import "./chunk-BZCCVPSU.mjs";
7
- import "./chunk-MPVAZKRB.mjs";
8
- import "./chunk-QOTLDKI4.mjs";
9
- import "./chunk-3WUHHFLF.mjs";
6
+ import "./chunk-EOK3NZVC.mjs";
7
+ import "./chunk-FMWKBZWX.mjs";
8
+ import "./chunk-XGUD52TA.mjs";
9
+ import "./chunk-35EI5JMK.mjs";
10
10
  import "./chunk-OOHJLO5M.mjs";
11
- import "./chunk-HT76VHOV.mjs";
11
+ import "./chunk-DOH7FULQ.mjs";
12
12
  export {
13
- UnifiedViteWeappTailwindcssPlugin
13
+ UnifiedViteWeappTailwindcssPlugin,
14
+ UnifiedViteWeappTailwindcssPlugin as weappTailwindcss
14
15
  };