weapp-tailwindcss 4.10.0 → 4.10.2
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.
- package/dist/{chunk-VZX2RV6M.js → chunk-3R7FDZJL.js} +31 -38
- package/dist/{chunk-JA6PNN27.js → chunk-6VKE7EWV.js} +28 -27
- package/dist/{chunk-6QU7CMAG.mjs → chunk-ACNOEKQI.mjs} +1 -1
- package/dist/{chunk-F6VHIO5B.mjs → chunk-BZCCVPSU.mjs} +1 -1
- package/dist/{chunk-PDP4OIKN.js → chunk-HJVZ4TO3.js} +3 -3
- package/dist/{chunk-VTIOEDOK.js → chunk-I35XJD75.js} +223 -97
- package/dist/{chunk-TNAPEHNW.mjs → chunk-LHBUALTK.mjs} +4 -3
- package/dist/{chunk-HFXMZGPW.js → chunk-M2ATX5ZS.js} +3 -3
- package/dist/{chunk-Q5IGGG5W.mjs → chunk-MPVAZKRB.mjs} +189 -63
- package/dist/{chunk-ZP6TLVZX.mjs → chunk-N6JOG5K3.mjs} +3 -2
- package/dist/{chunk-DA2K4ZIE.js → chunk-NPZ5QQC7.js} +8 -7
- package/dist/{chunk-D67CTJV5.mjs → chunk-WJU62RPV.mjs} +13 -20
- package/dist/cli.js +9 -9
- package/dist/cli.mjs +1 -1
- package/dist/core.d.mts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +22 -17
- package/dist/core.mjs +17 -12
- package/dist/defaults.d.mts +1 -1
- package/dist/defaults.d.ts +1 -1
- package/dist/gulp.d.mts +1 -1
- package/dist/gulp.d.ts +1 -1
- package/dist/gulp.js +4 -4
- package/dist/gulp.mjs +3 -3
- package/dist/{index-B6U7MoOM.d.ts → index-t_VBjwYm.d.mts} +13 -6
- package/dist/{index-B6U7MoOM.d.mts → index-t_VBjwYm.d.ts} +13 -6
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7 -7
- package/dist/index.mjs +6 -6
- package/dist/presets.d.mts +1 -1
- package/dist/presets.d.ts +1 -1
- package/dist/types.d.mts +17 -4
- package/dist/types.d.ts +17 -4
- package/dist/vite.d.mts +1 -1
- package/dist/vite.d.ts +1 -1
- package/dist/vite.js +4 -4
- package/dist/vite.mjs +3 -3
- package/dist/webpack.d.mts +1 -1
- package/dist/webpack.d.ts +1 -1
- package/dist/webpack.js +5 -5
- package/dist/webpack.mjs +4 -4
- package/dist/webpack4.d.mts +1 -1
- package/dist/webpack4.d.ts +1 -1
- package/dist/webpack4.js +27 -26
- package/dist/webpack4.mjs +4 -3
- package/package.json +4 -4
package/dist/core.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkM2ATX5ZSjs = require('./chunk-M2ATX5ZS.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkI35XJD75js = require('./chunk-I35XJD75.js');
|
|
8
8
|
require('./chunk-5APD2MNV.js');
|
|
9
9
|
require('./chunk-5U24PLVV.js');
|
|
10
10
|
require('./chunk-DYLQ6UOI.js');
|
|
@@ -14,9 +14,9 @@ require('./chunk-DBAAU4LK.js');
|
|
|
14
14
|
var _process = require('process'); var _process2 = _interopRequireDefault(_process);
|
|
15
15
|
var _shared = require('@weapp-tailwindcss/shared');
|
|
16
16
|
function createContext(options = {}) {
|
|
17
|
-
const opts =
|
|
17
|
+
const opts = _chunkI35XJD75js.getCompilerContext.call(void 0, options);
|
|
18
18
|
const { templateHandler, styleHandler, jsHandler, twPatcher: initialTwPatcher, refreshTailwindcssPatcher } = opts;
|
|
19
|
-
const patchRecorderState =
|
|
19
|
+
const patchRecorderState = _chunkM2ATX5ZSjs.setupPatchRecorder.call(void 0, initialTwPatcher, opts.tailwindcssBasedir, {
|
|
20
20
|
source: "runtime",
|
|
21
21
|
cwd: _nullishCoalesce(opts.tailwindcssBasedir, () => ( _process2.default.cwd()))
|
|
22
22
|
});
|
|
@@ -27,12 +27,25 @@ function createContext(options = {}) {
|
|
|
27
27
|
refreshTailwindcssPatcher,
|
|
28
28
|
onPatchCompleted: patchRecorderState.onPatchCompleted
|
|
29
29
|
};
|
|
30
|
+
function withRuntimeTailwindMajorVersion(options2) {
|
|
31
|
+
const resolvedOptions = {
|
|
32
|
+
..._nullishCoalesce(options2, () => ( {}))
|
|
33
|
+
};
|
|
34
|
+
if (typeof resolvedOptions.tailwindcssMajorVersion === "number") {
|
|
35
|
+
return resolvedOptions;
|
|
36
|
+
}
|
|
37
|
+
const majorVersion = runtimeState.twPatcher.majorVersion;
|
|
38
|
+
if (typeof majorVersion === "number") {
|
|
39
|
+
resolvedOptions.tailwindcssMajorVersion = majorVersion;
|
|
40
|
+
}
|
|
41
|
+
return resolvedOptions;
|
|
42
|
+
}
|
|
30
43
|
async function transformWxss(rawCss, options2) {
|
|
31
44
|
await runtimeState.patchPromise;
|
|
32
45
|
const result = await styleHandler(rawCss, _shared.defuOverrideArray.call(void 0, options2, {
|
|
33
46
|
isMainChunk: true
|
|
34
47
|
}));
|
|
35
|
-
runtimeSet = await
|
|
48
|
+
runtimeSet = await _chunkI35XJD75js.ensureRuntimeClassSet.call(void 0, runtimeState, {
|
|
36
49
|
forceRefresh: true,
|
|
37
50
|
forceCollect: true
|
|
38
51
|
});
|
|
@@ -40,24 +53,19 @@ function createContext(options = {}) {
|
|
|
40
53
|
}
|
|
41
54
|
async function transformJs(rawJs, options2 = {}) {
|
|
42
55
|
await runtimeState.patchPromise;
|
|
43
|
-
const hasRuntimeSetOption = Object.prototype.hasOwnProperty.call(options2, "runtimeSet");
|
|
44
56
|
if (_optionalChain([options2, 'optionalAccess', _ => _.runtimeSet])) {
|
|
45
57
|
runtimeSet = options2.runtimeSet;
|
|
46
58
|
} else if (runtimeSet.size === 0) {
|
|
47
|
-
runtimeSet = await
|
|
59
|
+
runtimeSet = await _chunkI35XJD75js.ensureRuntimeClassSet.call(void 0, runtimeState, {
|
|
48
60
|
forceCollect: true
|
|
49
61
|
});
|
|
50
62
|
}
|
|
51
|
-
|
|
52
|
-
return await jsHandler(rawJs, runtimeSet, {
|
|
53
|
-
staleClassNameFallback: useStaleClassNameFallback,
|
|
54
|
-
...options2
|
|
55
|
-
});
|
|
63
|
+
return await jsHandler(rawJs, runtimeSet, withRuntimeTailwindMajorVersion(options2));
|
|
56
64
|
}
|
|
57
65
|
async function transformWxml(rawWxml, options2) {
|
|
58
66
|
await runtimeState.patchPromise;
|
|
59
67
|
if (!_optionalChain([options2, 'optionalAccess', _2 => _2.runtimeSet]) && runtimeSet.size === 0) {
|
|
60
|
-
runtimeSet = await
|
|
68
|
+
runtimeSet = await _chunkI35XJD75js.ensureRuntimeClassSet.call(void 0, runtimeState, {
|
|
61
69
|
forceCollect: true
|
|
62
70
|
});
|
|
63
71
|
}
|
|
@@ -65,10 +73,7 @@ function createContext(options = {}) {
|
|
|
65
73
|
return templateHandler(rawWxml, _shared.defuOverrideArray.call(void 0, options2, {
|
|
66
74
|
runtimeSet,
|
|
67
75
|
jsHandler: (source, runtime, handlerOptions) => {
|
|
68
|
-
return runtimeJsHandler(source, runtime,
|
|
69
|
-
staleClassNameFallback: true,
|
|
70
|
-
...handlerOptions
|
|
71
|
-
});
|
|
76
|
+
return runtimeJsHandler(source, runtime, withRuntimeTailwindMajorVersion(handlerOptions));
|
|
72
77
|
}
|
|
73
78
|
}));
|
|
74
79
|
}
|
package/dist/core.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
setupPatchRecorder
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BZCCVPSU.mjs";
|
|
4
4
|
import {
|
|
5
5
|
ensureRuntimeClassSet,
|
|
6
6
|
getCompilerContext
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MPVAZKRB.mjs";
|
|
8
8
|
import "./chunk-QOTLDKI4.mjs";
|
|
9
9
|
import "./chunk-3WUHHFLF.mjs";
|
|
10
10
|
import "./chunk-OOHJLO5M.mjs";
|
|
@@ -27,6 +27,19 @@ function createContext(options = {}) {
|
|
|
27
27
|
refreshTailwindcssPatcher,
|
|
28
28
|
onPatchCompleted: patchRecorderState.onPatchCompleted
|
|
29
29
|
};
|
|
30
|
+
function withRuntimeTailwindMajorVersion(options2) {
|
|
31
|
+
const resolvedOptions = {
|
|
32
|
+
...options2 ?? {}
|
|
33
|
+
};
|
|
34
|
+
if (typeof resolvedOptions.tailwindcssMajorVersion === "number") {
|
|
35
|
+
return resolvedOptions;
|
|
36
|
+
}
|
|
37
|
+
const majorVersion = runtimeState.twPatcher.majorVersion;
|
|
38
|
+
if (typeof majorVersion === "number") {
|
|
39
|
+
resolvedOptions.tailwindcssMajorVersion = majorVersion;
|
|
40
|
+
}
|
|
41
|
+
return resolvedOptions;
|
|
42
|
+
}
|
|
30
43
|
async function transformWxss(rawCss, options2) {
|
|
31
44
|
await runtimeState.patchPromise;
|
|
32
45
|
const result = await styleHandler(rawCss, defuOverrideArray(options2, {
|
|
@@ -40,7 +53,6 @@ function createContext(options = {}) {
|
|
|
40
53
|
}
|
|
41
54
|
async function transformJs(rawJs, options2 = {}) {
|
|
42
55
|
await runtimeState.patchPromise;
|
|
43
|
-
const hasRuntimeSetOption = Object.prototype.hasOwnProperty.call(options2, "runtimeSet");
|
|
44
56
|
if (options2?.runtimeSet) {
|
|
45
57
|
runtimeSet = options2.runtimeSet;
|
|
46
58
|
} else if (runtimeSet.size === 0) {
|
|
@@ -48,11 +60,7 @@ function createContext(options = {}) {
|
|
|
48
60
|
forceCollect: true
|
|
49
61
|
});
|
|
50
62
|
}
|
|
51
|
-
|
|
52
|
-
return await jsHandler(rawJs, runtimeSet, {
|
|
53
|
-
staleClassNameFallback: useStaleClassNameFallback,
|
|
54
|
-
...options2
|
|
55
|
-
});
|
|
63
|
+
return await jsHandler(rawJs, runtimeSet, withRuntimeTailwindMajorVersion(options2));
|
|
56
64
|
}
|
|
57
65
|
async function transformWxml(rawWxml, options2) {
|
|
58
66
|
await runtimeState.patchPromise;
|
|
@@ -65,10 +73,7 @@ function createContext(options = {}) {
|
|
|
65
73
|
return templateHandler(rawWxml, defuOverrideArray(options2, {
|
|
66
74
|
runtimeSet,
|
|
67
75
|
jsHandler: (source, runtime, handlerOptions) => {
|
|
68
|
-
return runtimeJsHandler(source, runtime,
|
|
69
|
-
staleClassNameFallback: true,
|
|
70
|
-
...handlerOptions
|
|
71
|
-
});
|
|
76
|
+
return runtimeJsHandler(source, runtime, withRuntimeTailwindMajorVersion(handlerOptions));
|
|
72
77
|
}
|
|
73
78
|
}));
|
|
74
79
|
}
|
package/dist/defaults.d.mts
CHANGED
package/dist/defaults.d.ts
CHANGED
package/dist/gulp.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ITemplateHandlerOptions, CreateJsHandlerOptions } from './types.mjs';
|
|
2
2
|
import stream from 'node:stream';
|
|
3
|
-
import { U as UserDefinedOptions } from './index-
|
|
3
|
+
import { U as UserDefinedOptions } from './index-t_VBjwYm.mjs';
|
|
4
4
|
import { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss';
|
|
5
5
|
import '@babel/parser';
|
|
6
6
|
import 'magic-string';
|
package/dist/gulp.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ITemplateHandlerOptions, CreateJsHandlerOptions } from './types.js';
|
|
2
2
|
import stream from 'node:stream';
|
|
3
|
-
import { U as UserDefinedOptions } from './index-
|
|
3
|
+
import { U as UserDefinedOptions } from './index-t_VBjwYm.js';
|
|
4
4
|
import { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss';
|
|
5
5
|
import '@babel/parser';
|
|
6
6
|
import 'magic-string';
|
package/dist/gulp.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkNPZ5QQC7js = require('./chunk-NPZ5QQC7.js');
|
|
4
4
|
require('./chunk-LTJQUORK.js');
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
5
|
+
require('./chunk-M2ATX5ZS.js');
|
|
6
|
+
require('./chunk-I35XJD75.js');
|
|
7
7
|
require('./chunk-5APD2MNV.js');
|
|
8
8
|
require('./chunk-5U24PLVV.js');
|
|
9
9
|
require('./chunk-DYLQ6UOI.js');
|
|
10
10
|
require('./chunk-DBAAU4LK.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
exports.createPlugins =
|
|
13
|
+
exports.createPlugins = _chunkNPZ5QQC7js.createPlugins;
|
package/dist/gulp.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createPlugins
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-N6JOG5K3.mjs";
|
|
4
4
|
import "./chunk-RRHPTTCP.mjs";
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-BZCCVPSU.mjs";
|
|
6
|
+
import "./chunk-MPVAZKRB.mjs";
|
|
7
7
|
import "./chunk-QOTLDKI4.mjs";
|
|
8
8
|
import "./chunk-3WUHHFLF.mjs";
|
|
9
9
|
import "./chunk-OOHJLO5M.mjs";
|
|
@@ -123,17 +123,24 @@ interface UserDefinedOptionsGeneralPart {
|
|
|
123
123
|
*/
|
|
124
124
|
jsPreserveClass?: (keyword: string) => boolean | undefined;
|
|
125
125
|
/**
|
|
126
|
-
*
|
|
126
|
+
* 兼容字段:不再参与 JS 候选判定。
|
|
127
127
|
*
|
|
128
128
|
* @group 3.一般配置
|
|
129
129
|
* @remarks
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
* - `true`: 始终启用兜底转义(正确性优先,建议配合 `jsPreserveClass` 避免误伤)
|
|
133
|
-
* - `false`: 仅转换命中 `classNameSet` 的候选类名
|
|
134
|
-
* - 未配置:Vite `serve` / `build --watch` 默认启用,其它模式默认关闭
|
|
130
|
+
* JS 转译统一采用 `classNameSet` 精确匹配策略,仅转换 tailwindcss-patch 提供的类名集合。
|
|
135
131
|
*/
|
|
136
132
|
staleClassNameFallback?: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* 控制 JS 任意值类名在 classNameSet 异常时的受控兜底策略。
|
|
135
|
+
*
|
|
136
|
+
* @group 3.一般配置
|
|
137
|
+
* @remarks
|
|
138
|
+
* 为避免误伤业务字符串,兜底仅在 class 语义上下文生效。
|
|
139
|
+
* - `false`:关闭兜底;
|
|
140
|
+
* - `true`:始终开启受控兜底;
|
|
141
|
+
* - `'auto'`:仅 TailwindCSS v4 且 classNameSet 为空时启用。
|
|
142
|
+
*/
|
|
143
|
+
jsArbitraryValueFallback?: boolean | 'auto';
|
|
137
144
|
/**
|
|
138
145
|
* 是否替换运行时依赖包名。
|
|
139
146
|
*
|
|
@@ -123,17 +123,24 @@ interface UserDefinedOptionsGeneralPart {
|
|
|
123
123
|
*/
|
|
124
124
|
jsPreserveClass?: (keyword: string) => boolean | undefined;
|
|
125
125
|
/**
|
|
126
|
-
*
|
|
126
|
+
* 兼容字段:不再参与 JS 候选判定。
|
|
127
127
|
*
|
|
128
128
|
* @group 3.一般配置
|
|
129
129
|
* @remarks
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
* - `true`: 始终启用兜底转义(正确性优先,建议配合 `jsPreserveClass` 避免误伤)
|
|
133
|
-
* - `false`: 仅转换命中 `classNameSet` 的候选类名
|
|
134
|
-
* - 未配置:Vite `serve` / `build --watch` 默认启用,其它模式默认关闭
|
|
130
|
+
* JS 转译统一采用 `classNameSet` 精确匹配策略,仅转换 tailwindcss-patch 提供的类名集合。
|
|
135
131
|
*/
|
|
136
132
|
staleClassNameFallback?: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* 控制 JS 任意值类名在 classNameSet 异常时的受控兜底策略。
|
|
135
|
+
*
|
|
136
|
+
* @group 3.一般配置
|
|
137
|
+
* @remarks
|
|
138
|
+
* 为避免误伤业务字符串,兜底仅在 class 语义上下文生效。
|
|
139
|
+
* - `false`:关闭兜底;
|
|
140
|
+
* - `true`:始终开启受控兜底;
|
|
141
|
+
* - `'auto'`:仅 TailwindCSS v4 且 classNameSet 为空时启用。
|
|
142
|
+
*/
|
|
143
|
+
jsArbitraryValueFallback?: boolean | 'auto';
|
|
137
144
|
/**
|
|
138
145
|
* 是否替换运行时依赖包名。
|
|
139
146
|
*
|
package/dist/index.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ export { createPlugins } from './gulp.mjs';
|
|
|
2
2
|
export { CreateJsHandlerOptions, IBaseWebpackPlugin, ICommonReplaceOptions, IJsHandlerOptions, ITemplateHandlerOptions, InternalPatchResult, InternalPostcssOptions, InternalUserDefinedOptions, JsHandler, JsHandlerResult, JsModuleGraphOptions, LinkedJsModuleResult, RefreshTailwindcssPatcherOptions, TailwindcssPatcherLike } from './types.mjs';
|
|
3
3
|
export { UnifiedViteWeappTailwindcssPlugin } from './vite.mjs';
|
|
4
4
|
export { UnifiedWebpackPluginV5, weappTailwindcssPackageDir } from './webpack.mjs';
|
|
5
|
-
export { A as AppType, D as DisabledOptions, I as IArbitraryValues, a as ICustomAttributes, b as ICustomAttributesEntities, c as ItemOrItemArray, U as UserDefinedOptions } from './index-
|
|
5
|
+
export { A as AppType, D as DisabledOptions, I as IArbitraryValues, a as ICustomAttributes, b as ICustomAttributesEntities, c as ItemOrItemArray, U as UserDefinedOptions } from './index-t_VBjwYm.mjs';
|
|
6
6
|
export { CssPreflightOptions, IStyleHandlerOptions } from '@weapp-tailwindcss/postcss';
|
|
7
7
|
import 'node:stream';
|
|
8
8
|
import '@babel/parser';
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { createPlugins } from './gulp.js';
|
|
|
2
2
|
export { CreateJsHandlerOptions, IBaseWebpackPlugin, ICommonReplaceOptions, IJsHandlerOptions, ITemplateHandlerOptions, InternalPatchResult, InternalPostcssOptions, InternalUserDefinedOptions, JsHandler, JsHandlerResult, JsModuleGraphOptions, LinkedJsModuleResult, RefreshTailwindcssPatcherOptions, TailwindcssPatcherLike } from './types.js';
|
|
3
3
|
export { UnifiedViteWeappTailwindcssPlugin } from './vite.js';
|
|
4
4
|
export { UnifiedWebpackPluginV5, weappTailwindcssPackageDir } from './webpack.js';
|
|
5
|
-
export { A as AppType, D as DisabledOptions, I as IArbitraryValues, a as ICustomAttributes, b as ICustomAttributesEntities, c as ItemOrItemArray, U as UserDefinedOptions } from './index-
|
|
5
|
+
export { A as AppType, D as DisabledOptions, I as IArbitraryValues, a as ICustomAttributes, b as ICustomAttributesEntities, c as ItemOrItemArray, U as UserDefinedOptions } from './index-t_VBjwYm.js';
|
|
6
6
|
export { CssPreflightOptions, IStyleHandlerOptions } from '@weapp-tailwindcss/postcss';
|
|
7
7
|
import 'node:stream';
|
|
8
8
|
import '@babel/parser';
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var _chunk6VKE7EWVjs = require('./chunk-6VKE7EWV.js');
|
|
5
|
+
require('./chunk-HJVZ4TO3.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkNPZ5QQC7js = require('./chunk-NPZ5QQC7.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunk3R7FDZJLjs = require('./chunk-3R7FDZJL.js');
|
|
12
12
|
require('./chunk-IIDSY4XZ.js');
|
|
13
13
|
require('./chunk-LTJQUORK.js');
|
|
14
|
-
require('./chunk-
|
|
15
|
-
require('./chunk-
|
|
14
|
+
require('./chunk-M2ATX5ZS.js');
|
|
15
|
+
require('./chunk-I35XJD75.js');
|
|
16
16
|
require('./chunk-5APD2MNV.js');
|
|
17
17
|
require('./chunk-5U24PLVV.js');
|
|
18
18
|
require('./chunk-DYLQ6UOI.js');
|
|
@@ -22,4 +22,4 @@ require('./chunk-DBAAU4LK.js');
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
exports.UnifiedViteWeappTailwindcssPlugin =
|
|
25
|
+
exports.UnifiedViteWeappTailwindcssPlugin = _chunk3R7FDZJLjs.UnifiedViteWeappTailwindcssPlugin; exports.UnifiedWebpackPluginV5 = _chunk6VKE7EWVjs.UnifiedWebpackPluginV5; exports.createPlugins = _chunkNPZ5QQC7js.createPlugins; exports.weappTailwindcssPackageDir = _chunk6VKE7EWVjs.weappTailwindcssPackageDir;
|
package/dist/index.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UnifiedWebpackPluginV5,
|
|
3
3
|
weappTailwindcssPackageDir
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-LHBUALTK.mjs";
|
|
5
|
+
import "./chunk-ACNOEKQI.mjs";
|
|
6
6
|
import {
|
|
7
7
|
createPlugins
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-N6JOG5K3.mjs";
|
|
9
9
|
import {
|
|
10
10
|
UnifiedViteWeappTailwindcssPlugin
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-WJU62RPV.mjs";
|
|
12
12
|
import "./chunk-F2CKKG6Q.mjs";
|
|
13
13
|
import "./chunk-RRHPTTCP.mjs";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-BZCCVPSU.mjs";
|
|
15
|
+
import "./chunk-MPVAZKRB.mjs";
|
|
16
16
|
import "./chunk-QOTLDKI4.mjs";
|
|
17
17
|
import "./chunk-3WUHHFLF.mjs";
|
|
18
18
|
import "./chunk-OOHJLO5M.mjs";
|
package/dist/presets.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PackageResolvingOptions } from 'local-pkg';
|
|
2
|
-
import { U as UserDefinedOptions } from './index-
|
|
2
|
+
import { U as UserDefinedOptions } from './index-t_VBjwYm.mjs';
|
|
3
3
|
import '@babel/parser';
|
|
4
4
|
import '@weapp-tailwindcss/postcss';
|
|
5
5
|
import 'tailwindcss-patch';
|
package/dist/presets.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PackageResolvingOptions } from 'local-pkg';
|
|
2
|
-
import { U as UserDefinedOptions } from './index-
|
|
2
|
+
import { U as UserDefinedOptions } from './index-t_VBjwYm.js';
|
|
3
3
|
import '@babel/parser';
|
|
4
4
|
import '@weapp-tailwindcss/postcss';
|
|
5
5
|
import 'tailwindcss-patch';
|
package/dist/types.d.mts
CHANGED
|
@@ -4,8 +4,8 @@ export { CssPreflightOptions, IStyleHandlerOptions } from '@weapp-tailwindcss/po
|
|
|
4
4
|
import { SourceMap } from 'magic-string';
|
|
5
5
|
import { Result, Root, Document } from 'postcss';
|
|
6
6
|
import { ILengthUnitsPatchOptions, TailwindcssPatcher } from 'tailwindcss-patch';
|
|
7
|
-
import { I as IArbitraryValues, U as UserDefinedOptions, b as ICustomAttributesEntities, d as ICreateCacheReturnType, A as AppType } from './index-
|
|
8
|
-
export { D as DisabledOptions, a as ICustomAttributes, c as ItemOrItemArray } from './index-
|
|
7
|
+
import { I as IArbitraryValues, U as UserDefinedOptions, b as ICustomAttributesEntities, d as ICreateCacheReturnType, A as AppType } from './index-t_VBjwYm.mjs';
|
|
8
|
+
export { D as DisabledOptions, a as ICustomAttributes, c as ItemOrItemArray } from './index-t_VBjwYm.mjs';
|
|
9
9
|
import 'node:buffer';
|
|
10
10
|
import 'webpack';
|
|
11
11
|
import 'lru-cache';
|
|
@@ -41,10 +41,23 @@ interface IJsHandlerOptions {
|
|
|
41
41
|
escapeMap?: Record<string, string>;
|
|
42
42
|
classNameSet?: Set<string>;
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
45
|
-
*
|
|
44
|
+
* 兼容字段:不再参与 JS 候选判定。
|
|
45
|
+
*
|
|
46
|
+
* JS 转译统一遵循 `classNameSet` 精确命中策略,仅转换 tailwindcss-patch 提供的类名集合。
|
|
46
47
|
*/
|
|
47
48
|
staleClassNameFallback?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* 控制在 classNameSet 异常时的任意值兜底策略。
|
|
51
|
+
*
|
|
52
|
+
* - `false`:关闭兜底。
|
|
53
|
+
* - `true`:在 class 语义上下文中允许任意值兜底。
|
|
54
|
+
* - `'auto'`:仅在 TailwindCSS v4 且 classNameSet 为空时启用。
|
|
55
|
+
*/
|
|
56
|
+
jsArbitraryValueFallback?: boolean | 'auto';
|
|
57
|
+
/**
|
|
58
|
+
* 当前 TailwindCSS 主版本号,用于自动兜底判定。
|
|
59
|
+
*/
|
|
60
|
+
tailwindcssMajorVersion?: number;
|
|
48
61
|
arbitraryValues?: IArbitraryValues;
|
|
49
62
|
jsPreserveClass?: (keyword: string) => boolean | undefined;
|
|
50
63
|
needEscaped?: boolean;
|
package/dist/types.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ export { CssPreflightOptions, IStyleHandlerOptions } from '@weapp-tailwindcss/po
|
|
|
4
4
|
import { SourceMap } from 'magic-string';
|
|
5
5
|
import { Result, Root, Document } from 'postcss';
|
|
6
6
|
import { ILengthUnitsPatchOptions, TailwindcssPatcher } from 'tailwindcss-patch';
|
|
7
|
-
import { I as IArbitraryValues, U as UserDefinedOptions, b as ICustomAttributesEntities, d as ICreateCacheReturnType, A as AppType } from './index-
|
|
8
|
-
export { D as DisabledOptions, a as ICustomAttributes, c as ItemOrItemArray } from './index-
|
|
7
|
+
import { I as IArbitraryValues, U as UserDefinedOptions, b as ICustomAttributesEntities, d as ICreateCacheReturnType, A as AppType } from './index-t_VBjwYm.js';
|
|
8
|
+
export { D as DisabledOptions, a as ICustomAttributes, c as ItemOrItemArray } from './index-t_VBjwYm.js';
|
|
9
9
|
import 'node:buffer';
|
|
10
10
|
import 'webpack';
|
|
11
11
|
import 'lru-cache';
|
|
@@ -41,10 +41,23 @@ interface IJsHandlerOptions {
|
|
|
41
41
|
escapeMap?: Record<string, string>;
|
|
42
42
|
classNameSet?: Set<string>;
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
45
|
-
*
|
|
44
|
+
* 兼容字段:不再参与 JS 候选判定。
|
|
45
|
+
*
|
|
46
|
+
* JS 转译统一遵循 `classNameSet` 精确命中策略,仅转换 tailwindcss-patch 提供的类名集合。
|
|
46
47
|
*/
|
|
47
48
|
staleClassNameFallback?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* 控制在 classNameSet 异常时的任意值兜底策略。
|
|
51
|
+
*
|
|
52
|
+
* - `false`:关闭兜底。
|
|
53
|
+
* - `true`:在 class 语义上下文中允许任意值兜底。
|
|
54
|
+
* - `'auto'`:仅在 TailwindCSS v4 且 classNameSet 为空时启用。
|
|
55
|
+
*/
|
|
56
|
+
jsArbitraryValueFallback?: boolean | 'auto';
|
|
57
|
+
/**
|
|
58
|
+
* 当前 TailwindCSS 主版本号,用于自动兜底判定。
|
|
59
|
+
*/
|
|
60
|
+
tailwindcssMajorVersion?: number;
|
|
48
61
|
arbitraryValues?: IArbitraryValues;
|
|
49
62
|
jsPreserveClass?: (keyword: string) => boolean | undefined;
|
|
50
63
|
needEscaped?: boolean;
|
package/dist/vite.d.mts
CHANGED
package/dist/vite.d.ts
CHANGED
package/dist/vite.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk3R7FDZJLjs = require('./chunk-3R7FDZJL.js');
|
|
4
4
|
require('./chunk-IIDSY4XZ.js');
|
|
5
5
|
require('./chunk-LTJQUORK.js');
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
6
|
+
require('./chunk-M2ATX5ZS.js');
|
|
7
|
+
require('./chunk-I35XJD75.js');
|
|
8
8
|
require('./chunk-5APD2MNV.js');
|
|
9
9
|
require('./chunk-5U24PLVV.js');
|
|
10
10
|
require('./chunk-DYLQ6UOI.js');
|
|
11
11
|
require('./chunk-DBAAU4LK.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
exports.UnifiedViteWeappTailwindcssPlugin =
|
|
14
|
+
exports.UnifiedViteWeappTailwindcssPlugin = _chunk3R7FDZJLjs.UnifiedViteWeappTailwindcssPlugin;
|
package/dist/vite.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UnifiedViteWeappTailwindcssPlugin
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WJU62RPV.mjs";
|
|
4
4
|
import "./chunk-F2CKKG6Q.mjs";
|
|
5
5
|
import "./chunk-RRHPTTCP.mjs";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-BZCCVPSU.mjs";
|
|
7
|
+
import "./chunk-MPVAZKRB.mjs";
|
|
8
8
|
import "./chunk-QOTLDKI4.mjs";
|
|
9
9
|
import "./chunk-3WUHHFLF.mjs";
|
|
10
10
|
import "./chunk-OOHJLO5M.mjs";
|
package/dist/webpack.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Compiler } from 'webpack';
|
|
2
2
|
import { IBaseWebpackPlugin, InternalUserDefinedOptions } from './types.mjs';
|
|
3
|
-
import { A as AppType, U as UserDefinedOptions } from './index-
|
|
3
|
+
import { A as AppType, U as UserDefinedOptions } from './index-t_VBjwYm.mjs';
|
|
4
4
|
import '@babel/parser';
|
|
5
5
|
import '@weapp-tailwindcss/postcss';
|
|
6
6
|
import 'magic-string';
|
package/dist/webpack.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Compiler } from 'webpack';
|
|
2
2
|
import { IBaseWebpackPlugin, InternalUserDefinedOptions } from './types.js';
|
|
3
|
-
import { A as AppType, U as UserDefinedOptions } from './index-
|
|
3
|
+
import { A as AppType, U as UserDefinedOptions } from './index-t_VBjwYm.js';
|
|
4
4
|
import '@babel/parser';
|
|
5
5
|
import '@weapp-tailwindcss/postcss';
|
|
6
6
|
import 'magic-string';
|
package/dist/webpack.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var _chunk6VKE7EWVjs = require('./chunk-6VKE7EWV.js');
|
|
5
|
+
require('./chunk-HJVZ4TO3.js');
|
|
6
6
|
require('./chunk-IIDSY4XZ.js');
|
|
7
7
|
require('./chunk-LTJQUORK.js');
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
8
|
+
require('./chunk-M2ATX5ZS.js');
|
|
9
|
+
require('./chunk-I35XJD75.js');
|
|
10
10
|
require('./chunk-5APD2MNV.js');
|
|
11
11
|
require('./chunk-5U24PLVV.js');
|
|
12
12
|
require('./chunk-DYLQ6UOI.js');
|
|
@@ -14,4 +14,4 @@ require('./chunk-DBAAU4LK.js');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
exports.UnifiedWebpackPluginV5 =
|
|
17
|
+
exports.UnifiedWebpackPluginV5 = _chunk6VKE7EWVjs.UnifiedWebpackPluginV5; exports.weappTailwindcssPackageDir = _chunk6VKE7EWVjs.weappTailwindcssPackageDir;
|
package/dist/webpack.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UnifiedWebpackPluginV5,
|
|
3
3
|
weappTailwindcssPackageDir
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-LHBUALTK.mjs";
|
|
5
|
+
import "./chunk-ACNOEKQI.mjs";
|
|
6
6
|
import "./chunk-F2CKKG6Q.mjs";
|
|
7
7
|
import "./chunk-RRHPTTCP.mjs";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-BZCCVPSU.mjs";
|
|
9
|
+
import "./chunk-MPVAZKRB.mjs";
|
|
10
10
|
import "./chunk-QOTLDKI4.mjs";
|
|
11
11
|
import "./chunk-3WUHHFLF.mjs";
|
|
12
12
|
import "./chunk-OOHJLO5M.mjs";
|
package/dist/webpack4.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Compiler } from 'webpack4';
|
|
2
2
|
import { IBaseWebpackPlugin, InternalUserDefinedOptions } from './types.mjs';
|
|
3
|
-
import { A as AppType, U as UserDefinedOptions } from './index-
|
|
3
|
+
import { A as AppType, U as UserDefinedOptions } from './index-t_VBjwYm.mjs';
|
|
4
4
|
import '@babel/parser';
|
|
5
5
|
import '@weapp-tailwindcss/postcss';
|
|
6
6
|
import 'magic-string';
|
package/dist/webpack4.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Compiler } from 'webpack4';
|
|
2
2
|
import { IBaseWebpackPlugin, InternalUserDefinedOptions } from './types.js';
|
|
3
|
-
import { A as AppType, U as UserDefinedOptions } from './index-
|
|
3
|
+
import { A as AppType, U as UserDefinedOptions } from './index-t_VBjwYm.js';
|
|
4
4
|
import '@babel/parser';
|
|
5
5
|
import '@weapp-tailwindcss/postcss';
|
|
6
6
|
import 'magic-string';
|