weapp-tailwindcss 3.7.0 → 3.8.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 (149) hide show
  1. package/README.md +1 -23
  2. package/dist/chunk-35CYTBPM.js +26 -0
  3. package/dist/chunk-6FNC3XMI.js +45 -0
  4. package/dist/chunk-6Z776ZWK.js +43 -0
  5. package/dist/chunk-75EWCRQW.mjs +13 -0
  6. package/dist/chunk-7J6ZENMS.js +216 -0
  7. package/dist/chunk-A2EDVNQK.mjs +173 -0
  8. package/dist/chunk-AB467PG7.mjs +43 -0
  9. package/dist/chunk-AXBFBHS2.mjs +45 -0
  10. package/dist/chunk-C7DFN4K3.js +152 -0
  11. package/dist/chunk-FYOOMUKL.js +115 -0
  12. package/dist/chunk-HBQASQKY.js +13 -0
  13. package/dist/chunk-JVPRWRPJ.mjs +115 -0
  14. package/dist/chunk-K7CL4YBQ.mjs +216 -0
  15. package/dist/chunk-KE7J6XFD.mjs +537 -0
  16. package/dist/chunk-LQN2VTMU.js +537 -0
  17. package/dist/chunk-MUJ65IQ3.mjs +26 -0
  18. package/dist/chunk-QJPVKPQS.js +1003 -0
  19. package/dist/chunk-RFNUATFD.js +24 -0
  20. package/dist/chunk-T4A3DCFN.mjs +152 -0
  21. package/dist/chunk-U7O2XXYR.mjs +24 -0
  22. package/dist/chunk-VFCTLSC3.mjs +1003 -0
  23. package/dist/chunk-VKSQ6BRD.mjs +27 -0
  24. package/dist/chunk-WMQLIT4T.js +173 -0
  25. package/dist/chunk-XSZXPWWL.js +27 -0
  26. package/dist/cli.d.mts +2 -0
  27. package/dist/cli.d.ts +2 -1
  28. package/dist/cli.js +23 -3400
  29. package/dist/cli.mjs +28 -3392
  30. package/dist/core.d.mts +27 -0
  31. package/dist/core.d.ts +23 -4
  32. package/dist/core.js +34 -56
  33. package/dist/core.mjs +36 -54
  34. package/dist/css-macro/postcss.d.mts +7 -0
  35. package/dist/css-macro/postcss.d.ts +5 -3
  36. package/dist/css-macro/postcss.js +54 -45
  37. package/dist/css-macro/postcss.mjs +54 -45
  38. package/dist/css-macro.d.mts +18 -0
  39. package/dist/css-macro.d.ts +18 -0
  40. package/dist/css-macro.js +40 -0
  41. package/dist/css-macro.mjs +38 -0
  42. package/dist/defaults.d.mts +16 -0
  43. package/dist/defaults.d.ts +16 -2
  44. package/dist/defaults.js +5 -9
  45. package/dist/defaults.mjs +8 -4
  46. package/dist/escape.d.mts +19 -0
  47. package/dist/escape.d.ts +19 -4
  48. package/dist/escape.js +11 -0
  49. package/dist/escape.mjs +11 -0
  50. package/dist/gulp.d.mts +26 -0
  51. package/dist/gulp.d.ts +26 -1
  52. package/dist/gulp.js +11 -36
  53. package/dist/gulp.mjs +14 -31
  54. package/dist/index-g4epDIUu.d.mts +534 -0
  55. package/dist/index-g4epDIUu.d.ts +534 -0
  56. package/dist/index.d.mts +17 -0
  57. package/dist/index.d.ts +17 -4
  58. package/dist/index.js +22 -44
  59. package/dist/index.mjs +22 -34
  60. package/dist/postcss.d.mts +28 -0
  61. package/dist/postcss.d.ts +28 -1
  62. package/dist/postcss.js +9 -24
  63. package/dist/postcss.mjs +16 -8
  64. package/dist/replace.d.mts +22 -0
  65. package/dist/replace.d.ts +22 -3
  66. package/dist/replace.js +33 -50
  67. package/dist/replace.mjs +32 -25
  68. package/dist/shared-5ArEo9kL.d.mts +5 -0
  69. package/dist/shared-DI2Qz1ou.d.ts +5 -0
  70. package/dist/vite.d.mts +22 -0
  71. package/dist/vite.d.ts +22 -1
  72. package/dist/vite.js +11 -34
  73. package/dist/vite.mjs +14 -29
  74. package/dist/weapp-tw-runtime-loader.d.mts +7 -0
  75. package/dist/{bundlers/webpack/loaders/weapp-tw-runtime-loader.d.ts → weapp-tw-runtime-loader.d.ts} +4 -2
  76. package/dist/weapp-tw-runtime-loader.js +12 -12
  77. package/dist/weapp-tw-runtime-loader.mjs +12 -8
  78. package/dist/webpack.d.mts +26 -0
  79. package/dist/webpack.d.ts +26 -1
  80. package/dist/webpack.js +11 -35
  81. package/dist/webpack.mjs +14 -30
  82. package/dist/webpack4.d.mts +27 -0
  83. package/dist/webpack4.d.ts +27 -1
  84. package/dist/webpack4.js +204 -192
  85. package/dist/webpack4.mjs +210 -189
  86. package/package.json +26 -19
  87. package/dist/babel/index.d.ts +0 -5
  88. package/dist/bundlers/gulp/index.d.ts +0 -7
  89. package/dist/bundlers/vite/index.d.ts +0 -3
  90. package/dist/bundlers/webpack/BaseUnifiedPlugin/v4.d.ts +0 -8
  91. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5.d.ts +0 -8
  92. package/dist/bundlers/webpack/index.d.ts +0 -1
  93. package/dist/cache/index.d.ts +0 -31
  94. package/dist/constants-CFM1J-h1.js +0 -42
  95. package/dist/constants-Dy2Dd3Fz.mjs +0 -36
  96. package/dist/constants.d.ts +0 -7
  97. package/dist/css-macro/constants.d.ts +0 -14
  98. package/dist/css-macro/index.d.ts +0 -15
  99. package/dist/css-macro/index.js +0 -36
  100. package/dist/css-macro/index.mjs +0 -30
  101. package/dist/debug/index.d.ts +0 -2
  102. package/dist/defaults-5A8JI2hW.mjs +0 -139
  103. package/dist/defaults-CdqzSWsR.js +0 -145
  104. package/dist/defu-Cdz2PomB.js +0 -60
  105. package/dist/defu-n46TJT6t.mjs +0 -57
  106. package/dist/env.d.ts +0 -2
  107. package/dist/extractors/split.d.ts +0 -3
  108. package/dist/index-BEIjgKpF.mjs +0 -11
  109. package/dist/index-BF8k8rHr.mjs +0 -517
  110. package/dist/index-BTXkyxen.js +0 -136
  111. package/dist/index-C0QsyqD6.mjs +0 -134
  112. package/dist/index-ClSBbhnm.js +0 -130
  113. package/dist/index-DoMb0-xW.mjs +0 -124
  114. package/dist/index-HC-Qkn0i.js +0 -17
  115. package/dist/index-h2-ZMO3S.js +0 -530
  116. package/dist/init.d.ts +0 -34
  117. package/dist/js/ast-grep.d.ts +0 -1
  118. package/dist/js/babel.d.ts +0 -3
  119. package/dist/js/handlers.d.ts +0 -11
  120. package/dist/js/index.d.ts +0 -7
  121. package/dist/logger.d.ts +0 -1
  122. package/dist/mangle/index.d.ts +0 -8
  123. package/dist/npm.d.ts +0 -22
  124. package/dist/options-Bv-1GQJY.js +0 -891
  125. package/dist/options-yXyCFCtr.mjs +0 -858
  126. package/dist/options.d.ts +0 -2
  127. package/dist/postcss/cssVars.d.ts +0 -5
  128. package/dist/postcss/index.d.ts +0 -4
  129. package/dist/postcss/mp.d.ts +0 -8
  130. package/dist/postcss/plugins/ctx.d.ts +0 -6
  131. package/dist/postcss/plugins/index.d.ts +0 -7
  132. package/dist/postcss/plugins/post.d.ts +0 -5
  133. package/dist/postcss/plugins/pre.d.ts +0 -5
  134. package/dist/postcss/preflight.d.ts +0 -3
  135. package/dist/postcss/selectorParser.d.ts +0 -6
  136. package/dist/postcss/shared.d.ts +0 -3
  137. package/dist/postcss/symbols.d.ts +0 -1
  138. package/dist/reg.d.ts +0 -1
  139. package/dist/shared-COWjpokr.mjs +0 -25
  140. package/dist/shared-r_GpWheO.js +0 -28
  141. package/dist/tailwindcss/patcher.d.ts +0 -3
  142. package/dist/types.d.ts +0 -165
  143. package/dist/utils.d.ts +0 -18
  144. package/dist/v5-DwFXG7m_.js +0 -181
  145. package/dist/v5-N5BYJ5JY.mjs +0 -174
  146. package/dist/wxml/Tokenizer.d.ts +0 -31
  147. package/dist/wxml/index.d.ts +0 -2
  148. package/dist/wxml/shared.d.ts +0 -2
  149. package/dist/wxml/utils.d.ts +0 -10
package/dist/index.mjs CHANGED
@@ -1,34 +1,22 @@
1
- export { c as createPlugins } from './index-DoMb0-xW.mjs';
2
- export { U as UnifiedViteWeappTailwindcssPlugin } from './index-C0QsyqD6.mjs';
3
- export { U as UnifiedWebpackPluginV5 } from './v5-N5BYJ5JY.mjs';
4
- import './options-yXyCFCtr.mjs';
5
- import 'lru-cache';
6
- import 'md5';
7
- import './defaults-5A8JI2hW.mjs';
8
- import '@ast-core/escape';
9
- import '@weapp-core/escape';
10
- import './defu-n46TJT6t.mjs';
11
- import 'magic-string';
12
- import '@babel/generator';
13
- import '@babel/traverse';
14
- import '@babel/parser';
15
- import 'consola';
16
- import '@weapp-core/regex';
17
- import './replace.mjs';
18
- import './shared-COWjpokr.mjs';
19
- import '@tailwindcss-mangle/shared';
20
- import 'postcss';
21
- import './index-BF8k8rHr.mjs';
22
- import '@csstools/postcss-is-pseudo-class';
23
- import 'postcss-rem-to-responsive-pixel';
24
- import 'postcss-selector-parser';
25
- import 'node:path';
26
- import 'node:process';
27
- import 'tailwindcss-patch';
28
- import '@babel/types';
29
- import 'htmlparser2';
30
- import 'node:buffer';
31
- import 'node:stream';
32
- import './index-BEIjgKpF.mjs';
33
- import 'debug';
34
- import 'node:fs';
1
+ import {
2
+ UnifiedWebpackPluginV5
3
+ } from "./chunk-K7CL4YBQ.mjs";
4
+ import {
5
+ createPlugins
6
+ } from "./chunk-T4A3DCFN.mjs";
7
+ import {
8
+ UnifiedViteWeappTailwindcssPlugin
9
+ } from "./chunk-A2EDVNQK.mjs";
10
+ import "./chunk-75EWCRQW.mjs";
11
+ import "./chunk-VFCTLSC3.mjs";
12
+ import "./chunk-JVPRWRPJ.mjs";
13
+ import "./chunk-MUJ65IQ3.mjs";
14
+ import "./chunk-KE7J6XFD.mjs";
15
+ import "./chunk-U7O2XXYR.mjs";
16
+ import "./chunk-VKSQ6BRD.mjs";
17
+ import "./chunk-AXBFBHS2.mjs";
18
+ export {
19
+ UnifiedViteWeappTailwindcssPlugin,
20
+ UnifiedWebpackPluginV5,
21
+ createPlugins
22
+ };
@@ -0,0 +1,28 @@
1
+ import { PluginCreator, AcceptedPlugin } from 'postcss';
2
+ import { a as IStyleHandlerOptions } from './index-g4epDIUu.mjs';
3
+ export { default as postcssIsPseudoClass } from '@csstools/postcss-is-pseudo-class';
4
+ export { default as postcssRem2rpx } from 'postcss-rem-to-responsive-pixel';
5
+ import '@babel/generator';
6
+ import '@babel/parser';
7
+ import 'magic-string';
8
+ import 'tailwindcss-patch';
9
+ import 'node:buffer';
10
+ import 'webpack';
11
+ import 'lru-cache';
12
+ import '@tailwindcss-mangle/shared';
13
+ import 'postcss-load-config';
14
+
15
+ type PostcssWeappTailwindcssRenamePlugin$1 = PluginCreator<IStyleHandlerOptions>;
16
+ declare const postcssWeappTailwindcssPostPlugin: PostcssWeappTailwindcssRenamePlugin$1;
17
+
18
+ type PostcssWeappTailwindcssRenamePlugin = PluginCreator<IStyleHandlerOptions>;
19
+ declare const postcssWeappTailwindcssPrePlugin: PostcssWeappTailwindcssRenamePlugin;
20
+
21
+ /**
22
+ * 根据提供的选项生成一组 PostCSS 插件。
23
+ * @param options - 样式处理器选项,包含 PostCSS 插件和其他配置。
24
+ * @returns AcceptedPlugin[] - 生成的 PostCSS 插件数组。
25
+ */
26
+ declare function getPlugins(options: IStyleHandlerOptions): AcceptedPlugin[];
27
+
28
+ export { getPlugins, postcssWeappTailwindcssPostPlugin, postcssWeappTailwindcssPrePlugin };
package/dist/postcss.d.ts CHANGED
@@ -1 +1,28 @@
1
- export * from './postcss/plugins';
1
+ import { PluginCreator, AcceptedPlugin } from 'postcss';
2
+ import { a as IStyleHandlerOptions } from './index-g4epDIUu.js';
3
+ export { default as postcssIsPseudoClass } from '@csstools/postcss-is-pseudo-class';
4
+ export { default as postcssRem2rpx } from 'postcss-rem-to-responsive-pixel';
5
+ import '@babel/generator';
6
+ import '@babel/parser';
7
+ import 'magic-string';
8
+ import 'tailwindcss-patch';
9
+ import 'node:buffer';
10
+ import 'webpack';
11
+ import 'lru-cache';
12
+ import '@tailwindcss-mangle/shared';
13
+ import 'postcss-load-config';
14
+
15
+ type PostcssWeappTailwindcssRenamePlugin$1 = PluginCreator<IStyleHandlerOptions>;
16
+ declare const postcssWeappTailwindcssPostPlugin: PostcssWeappTailwindcssRenamePlugin$1;
17
+
18
+ type PostcssWeappTailwindcssRenamePlugin = PluginCreator<IStyleHandlerOptions>;
19
+ declare const postcssWeappTailwindcssPrePlugin: PostcssWeappTailwindcssRenamePlugin;
20
+
21
+ /**
22
+ * 根据提供的选项生成一组 PostCSS 插件。
23
+ * @param options - 样式处理器选项,包含 PostCSS 插件和其他配置。
24
+ * @returns AcceptedPlugin[] - 生成的 PostCSS 插件数组。
25
+ */
26
+ declare function getPlugins(options: IStyleHandlerOptions): AcceptedPlugin[];
27
+
28
+ export { getPlugins, postcssWeappTailwindcssPostPlugin, postcssWeappTailwindcssPrePlugin };
package/dist/postcss.js CHANGED
@@ -1,31 +1,16 @@
1
- 'use strict';
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
3
 
5
- var index = require('./index-h2-ZMO3S.js');
6
- var postcssIsPseudoClass = require('@csstools/postcss-is-pseudo-class');
7
- var postcssRem2rpx = require('postcss-rem-to-responsive-pixel');
8
- require('postcss-selector-parser');
9
- require('./shared-r_GpWheO.js');
10
- require('@ast-core/escape');
11
- require('@weapp-core/escape');
12
- require('postcss');
13
4
 
14
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
15
5
 
16
- var postcssIsPseudoClass__default = /*#__PURE__*/_interopDefaultCompat(postcssIsPseudoClass);
17
- var postcssRem2rpx__default = /*#__PURE__*/_interopDefaultCompat(postcssRem2rpx);
18
6
 
7
+ var _chunkLQN2VTMUjs = require('./chunk-LQN2VTMU.js'); var _chunkLQN2VTMUjs2 = _interopRequireDefault(_chunkLQN2VTMUjs);
8
+ require('./chunk-XSZXPWWL.js');
9
+ require('./chunk-6FNC3XMI.js');
19
10
 
20
11
 
21
- exports.getPlugins = index.getPlugins;
22
- exports.postcssWeappTailwindcssPostPlugin = index.postcssWeappTailwindcssPostPlugin;
23
- exports.postcssWeappTailwindcssPrePlugin = index.postcssWeappTailwindcssPrePlugin;
24
- Object.defineProperty(exports, "postcssIsPseudoClass", {
25
- enumerable: true,
26
- get: function () { return postcssIsPseudoClass__default["default"]; }
27
- });
28
- Object.defineProperty(exports, "postcssRem2rpx", {
29
- enumerable: true,
30
- get: function () { return postcssRem2rpx__default["default"]; }
31
- });
12
+
13
+
14
+
15
+
16
+ exports.getPlugins = _chunkLQN2VTMUjs.getPlugins; exports.postcssIsPseudoClass = _chunkLQN2VTMUjs2.default; exports.postcssRem2rpx = _chunkLQN2VTMUjs.default2; exports.postcssWeappTailwindcssPostPlugin = _chunkLQN2VTMUjs.postcssWeappTailwindcssPostPlugin; exports.postcssWeappTailwindcssPrePlugin = _chunkLQN2VTMUjs.postcssWeappTailwindcssPrePlugin;
package/dist/postcss.mjs CHANGED
@@ -1,8 +1,16 @@
1
- export { g as getPlugins, p as postcssWeappTailwindcssPostPlugin, a as postcssWeappTailwindcssPrePlugin } from './index-BF8k8rHr.mjs';
2
- export { default as postcssIsPseudoClass } from '@csstools/postcss-is-pseudo-class';
3
- export { default as postcssRem2rpx } from 'postcss-rem-to-responsive-pixel';
4
- import 'postcss-selector-parser';
5
- import './shared-COWjpokr.mjs';
6
- import '@ast-core/escape';
7
- import '@weapp-core/escape';
8
- import 'postcss';
1
+ import {
2
+ default as default2,
3
+ default2 as default3,
4
+ getPlugins,
5
+ postcssWeappTailwindcssPostPlugin,
6
+ postcssWeappTailwindcssPrePlugin
7
+ } from "./chunk-KE7J6XFD.mjs";
8
+ import "./chunk-VKSQ6BRD.mjs";
9
+ import "./chunk-AXBFBHS2.mjs";
10
+ export {
11
+ getPlugins,
12
+ default2 as postcssIsPseudoClass,
13
+ default3 as postcssRem2rpx,
14
+ postcssWeappTailwindcssPostPlugin,
15
+ postcssWeappTailwindcssPrePlugin
16
+ };
@@ -0,0 +1,22 @@
1
+ import { d as InternalCssSelectorReplacerOptions } from './index-g4epDIUu.mjs';
2
+ export { r as replaceJs } from './shared-5ArEo9kL.mjs';
3
+ export { MappingChars2String, MappingChars2StringEntries, MappingStringDictionary, SYMBOL_TABLE, SYMBOL_TABLE_TYPE, SYMBOL_TABLE_TYPE_VALUES, SimpleMappingChars2String, SimpleMappingChars2StringEntries } from '@weapp-core/escape';
4
+ import '@babel/generator';
5
+ import '@babel/parser';
6
+ import 'magic-string';
7
+ import 'postcss';
8
+ import 'tailwindcss-patch';
9
+ import 'node:buffer';
10
+ import 'webpack';
11
+ import 'lru-cache';
12
+ import '@tailwindcss-mangle/shared';
13
+ import 'postcss-load-config';
14
+ import 'postcss-rem-to-responsive-pixel';
15
+
16
+ declare function internalCssSelectorReplacer(selectors: string, options?: InternalCssSelectorReplacerOptions): string;
17
+
18
+ declare const weappTwIgnore: (template: {
19
+ raw: readonly string[] | ArrayLike<string>;
20
+ }, ...substitutions: any[]) => string;
21
+
22
+ export { internalCssSelectorReplacer as replaceCss, weappTwIgnore };
package/dist/replace.d.ts CHANGED
@@ -1,3 +1,22 @@
1
- export { MappingChars2String, MappingChars2StringEntries, MappingStringDictionary, SimpleMappingChars2String, SimpleMappingChars2StringEntries, SYMBOL_TABLE, SYMBOL_TABLE_TYPE, SYMBOL_TABLE_TYPE_VALUES, } from './escape';
2
- export { internalCssSelectorReplacer as replaceCss } from './postcss/shared';
3
- export { replaceWxml as replaceJs } from './wxml/shared';
1
+ import { d as InternalCssSelectorReplacerOptions } from './index-g4epDIUu.js';
2
+ export { r as replaceJs } from './shared-DI2Qz1ou.js';
3
+ export { MappingChars2String, MappingChars2StringEntries, MappingStringDictionary, SYMBOL_TABLE, SYMBOL_TABLE_TYPE, SYMBOL_TABLE_TYPE_VALUES, SimpleMappingChars2String, SimpleMappingChars2StringEntries } from '@weapp-core/escape';
4
+ import '@babel/generator';
5
+ import '@babel/parser';
6
+ import 'magic-string';
7
+ import 'postcss';
8
+ import 'tailwindcss-patch';
9
+ import 'node:buffer';
10
+ import 'webpack';
11
+ import 'lru-cache';
12
+ import '@tailwindcss-mangle/shared';
13
+ import 'postcss-load-config';
14
+ import 'postcss-rem-to-responsive-pixel';
15
+
16
+ declare function internalCssSelectorReplacer(selectors: string, options?: InternalCssSelectorReplacerOptions): string;
17
+
18
+ declare const weappTwIgnore: (template: {
19
+ raw: readonly string[] | ArrayLike<string>;
20
+ }, ...substitutions: any[]) => string;
21
+
22
+ export { internalCssSelectorReplacer as replaceCss, weappTwIgnore };
package/dist/replace.js CHANGED
@@ -1,50 +1,33 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- require('@ast-core/escape');
6
- var escape = require('@weapp-core/escape');
7
- var shared = require('./shared-r_GpWheO.js');
8
-
9
- function replaceWxml(original, options = {
10
- keepEOL: false,
11
- escapeMap: escape.SimpleMappingChars2String,
12
- }) {
13
- const { keepEOL, escapeMap, mangleContext, ignoreHead } = options;
14
- let res = original;
15
- if (!keepEOL) {
16
- res = res
17
- .replaceAll(/[\n\r]+/g, '');
18
- }
19
- if (mangleContext) {
20
- res = mangleContext.wxmlHandler(res);
21
- }
22
- res = escape.escape(res, {
23
- map: escapeMap,
24
- ignoreHead,
25
- });
26
- return res;
27
- }
28
-
29
- Object.defineProperty(exports, "MappingChars2String", {
30
- enumerable: true,
31
- get: function () { return escape.MappingChars2String; }
32
- });
33
- Object.defineProperty(exports, "MappingChars2StringEntries", {
34
- enumerable: true,
35
- get: function () { return escape.MappingChars2StringEntries; }
36
- });
37
- Object.defineProperty(exports, "SYMBOL_TABLE", {
38
- enumerable: true,
39
- get: function () { return escape.SYMBOL_TABLE; }
40
- });
41
- Object.defineProperty(exports, "SimpleMappingChars2String", {
42
- enumerable: true,
43
- get: function () { return escape.SimpleMappingChars2String; }
44
- });
45
- Object.defineProperty(exports, "SimpleMappingChars2StringEntries", {
46
- enumerable: true,
47
- get: function () { return escape.SimpleMappingChars2StringEntries; }
48
- });
49
- exports.replaceCss = shared.internalCssSelectorReplacer;
50
- exports.replaceJs = replaceWxml;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkRFNUATFDjs = require('./chunk-RFNUATFD.js');
4
+
5
+
6
+ var _chunkXSZXPWWLjs = require('./chunk-XSZXPWWL.js');
7
+ require('./chunk-6FNC3XMI.js');
8
+
9
+ // src/replace.ts
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+ var _escape = require('@weapp-core/escape');
20
+ var weappTwIgnore = String.raw;
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+ exports.MappingChars2String = _escape.MappingChars2String; exports.MappingChars2StringEntries = _escape.MappingChars2StringEntries; exports.MappingStringDictionary = _escape.MappingStringDictionary; exports.SYMBOL_TABLE = _escape.SYMBOL_TABLE; exports.SYMBOL_TABLE_TYPE = _escape.SYMBOL_TABLE_TYPE; exports.SYMBOL_TABLE_TYPE_VALUES = _escape.SYMBOL_TABLE_TYPE_VALUES; exports.SimpleMappingChars2String = _escape.SimpleMappingChars2String; exports.SimpleMappingChars2StringEntries = _escape.SimpleMappingChars2StringEntries; exports.replaceCss = _chunkXSZXPWWLjs.internalCssSelectorReplacer; exports.replaceJs = _chunkRFNUATFDjs.replaceWxml; exports.weappTwIgnore = weappTwIgnore;
package/dist/replace.mjs CHANGED
@@ -1,26 +1,33 @@
1
- import '@ast-core/escape';
2
- import { escape, SimpleMappingChars2String } from '@weapp-core/escape';
3
- export { MappingChars2String, MappingChars2StringEntries, SYMBOL_TABLE, SimpleMappingChars2String, SimpleMappingChars2StringEntries } from '@weapp-core/escape';
4
- export { i as replaceCss } from './shared-COWjpokr.mjs';
1
+ import {
2
+ replaceWxml
3
+ } from "./chunk-U7O2XXYR.mjs";
4
+ import {
5
+ internalCssSelectorReplacer
6
+ } from "./chunk-VKSQ6BRD.mjs";
7
+ import "./chunk-AXBFBHS2.mjs";
5
8
 
6
- function replaceWxml(original, options = {
7
- keepEOL: false,
8
- escapeMap: SimpleMappingChars2String,
9
- }) {
10
- const { keepEOL, escapeMap, mangleContext, ignoreHead } = options;
11
- let res = original;
12
- if (!keepEOL) {
13
- res = res
14
- .replaceAll(/[\n\r]+/g, '');
15
- }
16
- if (mangleContext) {
17
- res = mangleContext.wxmlHandler(res);
18
- }
19
- res = escape(res, {
20
- map: escapeMap,
21
- ignoreHead,
22
- });
23
- return res;
24
- }
25
-
26
- export { replaceWxml as replaceJs };
9
+ // src/replace.ts
10
+ import {
11
+ MappingChars2String,
12
+ MappingChars2StringEntries,
13
+ MappingStringDictionary,
14
+ SimpleMappingChars2String,
15
+ SimpleMappingChars2StringEntries,
16
+ SYMBOL_TABLE,
17
+ SYMBOL_TABLE_TYPE,
18
+ SYMBOL_TABLE_TYPE_VALUES
19
+ } from "@weapp-core/escape";
20
+ var weappTwIgnore = String.raw;
21
+ export {
22
+ MappingChars2String,
23
+ MappingChars2StringEntries,
24
+ MappingStringDictionary,
25
+ SYMBOL_TABLE,
26
+ SYMBOL_TABLE_TYPE,
27
+ SYMBOL_TABLE_TYPE_VALUES,
28
+ SimpleMappingChars2String,
29
+ SimpleMappingChars2StringEntries,
30
+ internalCssSelectorReplacer as replaceCss,
31
+ replaceWxml as replaceJs,
32
+ weappTwIgnore
33
+ };
@@ -0,0 +1,5 @@
1
+ import { l as ITemplateHandlerOptions } from './index-g4epDIUu.mjs';
2
+
3
+ declare function replaceWxml(original: string, options?: ITemplateHandlerOptions): string;
4
+
5
+ export { replaceWxml as r };
@@ -0,0 +1,5 @@
1
+ import { l as ITemplateHandlerOptions } from './index-g4epDIUu.js';
2
+
3
+ declare function replaceWxml(original: string, options?: ITemplateHandlerOptions): string;
4
+
5
+ export { replaceWxml as r };
@@ -0,0 +1,22 @@
1
+ import { Plugin } from 'vite';
2
+ import { U as UserDefinedOptions } from './index-g4epDIUu.mjs';
3
+ import '@babel/generator';
4
+ import '@babel/parser';
5
+ import 'magic-string';
6
+ import 'postcss';
7
+ import 'tailwindcss-patch';
8
+ import 'node:buffer';
9
+ import 'webpack';
10
+ import 'lru-cache';
11
+ import '@tailwindcss-mangle/shared';
12
+ import 'postcss-load-config';
13
+ import 'postcss-rem-to-responsive-pixel';
14
+
15
+ /**
16
+ * @name UnifiedViteWeappTailwindcssPlugin
17
+ * @description uni-app vite vue3 版本插件
18
+ * @link https://tw.icebreaker.top/docs/quick-start/frameworks/uni-app-vite
19
+ */
20
+ declare function UnifiedViteWeappTailwindcssPlugin(options?: UserDefinedOptions): Plugin | undefined;
21
+
22
+ export { UnifiedViteWeappTailwindcssPlugin };
package/dist/vite.d.ts CHANGED
@@ -1 +1,22 @@
1
- export * from './bundlers/vite/index';
1
+ import { Plugin } from 'vite';
2
+ import { U as UserDefinedOptions } from './index-g4epDIUu.js';
3
+ import '@babel/generator';
4
+ import '@babel/parser';
5
+ import 'magic-string';
6
+ import 'postcss';
7
+ import 'tailwindcss-patch';
8
+ import 'node:buffer';
9
+ import 'webpack';
10
+ import 'lru-cache';
11
+ import '@tailwindcss-mangle/shared';
12
+ import 'postcss-load-config';
13
+ import 'postcss-rem-to-responsive-pixel';
14
+
15
+ /**
16
+ * @name UnifiedViteWeappTailwindcssPlugin
17
+ * @description uni-app vite vue3 版本插件
18
+ * @link https://tw.icebreaker.top/docs/quick-start/frameworks/uni-app-vite
19
+ */
20
+ declare function UnifiedViteWeappTailwindcssPlugin(options?: UserDefinedOptions): Plugin | undefined;
21
+
22
+ export { UnifiedViteWeappTailwindcssPlugin };
package/dist/vite.js CHANGED
@@ -1,37 +1,14 @@
1
- 'use strict';
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
3
+ var _chunkWMQLIT4Tjs = require('./chunk-WMQLIT4T.js');
4
+ require('./chunk-HBQASQKY.js');
5
+ require('./chunk-QJPVKPQS.js');
6
+ require('./chunk-FYOOMUKL.js');
7
+ require('./chunk-35CYTBPM.js');
8
+ require('./chunk-LQN2VTMU.js');
9
+ require('./chunk-RFNUATFD.js');
10
+ require('./chunk-XSZXPWWL.js');
11
+ require('./chunk-6FNC3XMI.js');
4
12
 
5
- var index = require('./index-BTXkyxen.js');
6
- require('./options-Bv-1GQJY.js');
7
- require('lru-cache');
8
- require('md5');
9
- require('./defaults-CdqzSWsR.js');
10
- require('@ast-core/escape');
11
- require('@weapp-core/escape');
12
- require('./defu-Cdz2PomB.js');
13
- require('magic-string');
14
- require('@babel/generator');
15
- require('@babel/traverse');
16
- require('@babel/parser');
17
- require('consola');
18
- require('@weapp-core/regex');
19
- require('./replace.js');
20
- require('./shared-r_GpWheO.js');
21
- require('@tailwindcss-mangle/shared');
22
- require('postcss');
23
- require('./index-h2-ZMO3S.js');
24
- require('@csstools/postcss-is-pseudo-class');
25
- require('postcss-rem-to-responsive-pixel');
26
- require('postcss-selector-parser');
27
- require('node:path');
28
- require('node:process');
29
- require('tailwindcss-patch');
30
- require('@babel/types');
31
- require('htmlparser2');
32
- require('./index-HC-Qkn0i.js');
33
- require('debug');
34
13
 
35
-
36
-
37
- exports.UnifiedViteWeappTailwindcssPlugin = index.UnifiedViteWeappTailwindcssPlugin;
14
+ exports.UnifiedViteWeappTailwindcssPlugin = _chunkWMQLIT4Tjs.UnifiedViteWeappTailwindcssPlugin;
package/dist/vite.mjs CHANGED
@@ -1,29 +1,14 @@
1
- export { U as UnifiedViteWeappTailwindcssPlugin } from './index-C0QsyqD6.mjs';
2
- import './options-yXyCFCtr.mjs';
3
- import 'lru-cache';
4
- import 'md5';
5
- import './defaults-5A8JI2hW.mjs';
6
- import '@ast-core/escape';
7
- import '@weapp-core/escape';
8
- import './defu-n46TJT6t.mjs';
9
- import 'magic-string';
10
- import '@babel/generator';
11
- import '@babel/traverse';
12
- import '@babel/parser';
13
- import 'consola';
14
- import '@weapp-core/regex';
15
- import './replace.mjs';
16
- import './shared-COWjpokr.mjs';
17
- import '@tailwindcss-mangle/shared';
18
- import 'postcss';
19
- import './index-BF8k8rHr.mjs';
20
- import '@csstools/postcss-is-pseudo-class';
21
- import 'postcss-rem-to-responsive-pixel';
22
- import 'postcss-selector-parser';
23
- import 'node:path';
24
- import 'node:process';
25
- import 'tailwindcss-patch';
26
- import '@babel/types';
27
- import 'htmlparser2';
28
- import './index-BEIjgKpF.mjs';
29
- import 'debug';
1
+ import {
2
+ UnifiedViteWeappTailwindcssPlugin
3
+ } from "./chunk-A2EDVNQK.mjs";
4
+ import "./chunk-75EWCRQW.mjs";
5
+ import "./chunk-VFCTLSC3.mjs";
6
+ import "./chunk-JVPRWRPJ.mjs";
7
+ import "./chunk-MUJ65IQ3.mjs";
8
+ import "./chunk-KE7J6XFD.mjs";
9
+ import "./chunk-U7O2XXYR.mjs";
10
+ import "./chunk-VKSQ6BRD.mjs";
11
+ import "./chunk-AXBFBHS2.mjs";
12
+ export {
13
+ UnifiedViteWeappTailwindcssPlugin
14
+ };
@@ -0,0 +1,7 @@
1
+ import webpack from 'webpack';
2
+
3
+ declare const WeappTwRuntimeAopLoader: webpack.LoaderDefinitionFunction<{
4
+ getClassSet: () => void;
5
+ }>;
6
+
7
+ export { WeappTwRuntimeAopLoader as default };
@@ -1,5 +1,7 @@
1
- import type webpack from 'webpack';
1
+ import webpack from 'webpack';
2
+
2
3
  declare const WeappTwRuntimeAopLoader: webpack.LoaderDefinitionFunction<{
3
4
  getClassSet: () => void;
4
5
  }>;
5
- export default WeappTwRuntimeAopLoader;
6
+
7
+ export = WeappTwRuntimeAopLoader;
@@ -1,16 +1,16 @@
1
- 'use strict';
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }require('./chunk-6FNC3XMI.js');
2
2
 
3
- var loaderUtils = require('loader-utils');
4
-
5
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
3
+ // src/bundlers/webpack/loaders/weapp-tw-runtime-loader.ts
4
+ var _loaderutils = require('loader-utils'); var _loaderutils2 = _interopRequireDefault(_loaderutils);
5
+ var WeappTwRuntimeAopLoader = function(source) {
6
+ var _a;
7
+ const opt = _loaderutils2.default.getOptions(this);
8
+ (_a = opt == null ? void 0 : opt.getClassSet) == null ? void 0 : _a.call(opt);
9
+ return source;
10
+ };
11
+ var weapp_tw_runtime_loader_default = WeappTwRuntimeAopLoader;
6
12
 
7
- var loaderUtils__default = /*#__PURE__*/_interopDefaultCompat(loaderUtils);
8
13
 
9
- const WeappTwRuntimeAopLoader = function (source) {
10
- var _a;
11
- const opt = loaderUtils__default["default"].getOptions(this);
12
- (_a = opt === null || opt === void 0 ? void 0 : opt.getClassSet) === null || _a === void 0 ? void 0 : _a.call(opt);
13
- return source;
14
- };
14
+ exports.default = weapp_tw_runtime_loader_default;
15
15
 
16
- module.exports = WeappTwRuntimeAopLoader;
16
+ module.exports = exports.default;
@@ -1,10 +1,14 @@
1
- import loaderUtils from 'loader-utils';
1
+ import "./chunk-AXBFBHS2.mjs";
2
2
 
3
- const WeappTwRuntimeAopLoader = function (source) {
4
- var _a;
5
- const opt = loaderUtils.getOptions(this);
6
- (_a = opt === null || opt === void 0 ? void 0 : opt.getClassSet) === null || _a === void 0 ? void 0 : _a.call(opt);
7
- return source;
3
+ // src/bundlers/webpack/loaders/weapp-tw-runtime-loader.ts
4
+ import loaderUtils from "loader-utils";
5
+ var WeappTwRuntimeAopLoader = function(source) {
6
+ var _a;
7
+ const opt = loaderUtils.getOptions(this);
8
+ (_a = opt == null ? void 0 : opt.getClassSet) == null ? void 0 : _a.call(opt);
9
+ return source;
10
+ };
11
+ var weapp_tw_runtime_loader_default = WeappTwRuntimeAopLoader;
12
+ export {
13
+ weapp_tw_runtime_loader_default as default
8
14
  };
9
-
10
- export { WeappTwRuntimeAopLoader as default };
@@ -0,0 +1,26 @@
1
+ import { Compiler } from 'webpack';
2
+ import { o as IBaseWebpackPlugin, m as InternalUserDefinedOptions, A as AppType, U as UserDefinedOptions } from './index-g4epDIUu.mjs';
3
+ import '@babel/generator';
4
+ import '@babel/parser';
5
+ import 'magic-string';
6
+ import 'postcss';
7
+ import 'tailwindcss-patch';
8
+ import 'node:buffer';
9
+ import 'lru-cache';
10
+ import '@tailwindcss-mangle/shared';
11
+ import 'postcss-load-config';
12
+ import 'postcss-rem-to-responsive-pixel';
13
+
14
+ /**
15
+ * @name UnifiedWebpackPluginV5
16
+ * @description webpack5 核心转义插件
17
+ * @link https://tw.icebreaker.top/docs/intro
18
+ */
19
+ declare class UnifiedWebpackPluginV5 implements IBaseWebpackPlugin {
20
+ options: InternalUserDefinedOptions;
21
+ appType?: AppType;
22
+ constructor(options?: UserDefinedOptions);
23
+ apply(compiler: Compiler): void;
24
+ }
25
+
26
+ export { UnifiedWebpackPluginV5 };