weapp-tailwindcss 4.11.0-alpha.1 → 4.11.0-alpha.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-35EI5JMK.mjs → chunk-23K4XDKF.mjs} +3 -1
- package/dist/{chunk-W2EMGF7H.js → chunk-2W24MRCQ.js} +10 -12
- package/dist/chunk-4AFQP74Z.js +24 -0
- package/dist/{chunk-SQG2MOFQ.js → chunk-4TTPYMVM.js} +12 -8
- package/dist/{chunk-4LPOQMFS.js → chunk-5KSBT6GU.js} +396 -219
- package/dist/{chunk-LD7LZ4IK.mjs → chunk-66E76FQE.mjs} +91 -50
- package/dist/{chunk-GWDHNCL2.js → chunk-6O7HJU2F.js} +123 -42
- package/dist/{chunk-RRHPTTCP.mjs → chunk-76S2EME4.mjs} +2 -0
- package/dist/{chunk-G3G437UE.js → chunk-7LKMJZD2.js} +2 -2
- package/dist/{chunk-OV7FX6XR.js → chunk-CRDOWYG4.js} +1 -1
- package/dist/{chunk-DOH7FULQ.mjs → chunk-EFBQ4SQR.mjs} +1 -1
- package/dist/{chunk-IEZ5RBMG.mjs → chunk-EW2K6CO5.mjs} +365 -188
- package/dist/{chunk-FZNYV7VH.mjs → chunk-HADJCWHU.mjs} +212 -258
- package/dist/{chunk-CZLXTEHN.js → chunk-K7CZXT46.js} +132 -91
- package/dist/{chunk-ACTJYB33.js → chunk-LL3QUKJI.js} +3 -1
- package/dist/{chunk-G5NLM3AL.js → chunk-LYGLQCWI.js} +278 -324
- package/dist/{chunk-LTJQUORK.js → chunk-OF6MFURR.js} +2 -0
- package/dist/{chunk-KKT2DKMW.mjs → chunk-RED7Y22U.mjs} +91 -10
- package/dist/{chunk-R6KEYO3F.mjs → chunk-SJ3SG6DU.mjs} +5 -1
- package/dist/{chunk-JBM3HGHP.mjs → chunk-UCUAXK7F.mjs} +4 -6
- package/dist/cli.js +1006 -147
- package/dist/cli.mjs +942 -107
- package/dist/core.d.mts +2 -2
- package/dist/core.d.ts +2 -2
- package/dist/core.js +9 -11
- package/dist/core.mjs +6 -8
- package/dist/css-macro/postcss.js +1 -1
- package/dist/css-macro/postcss.mjs +1 -1
- package/dist/css-macro.js +3 -3
- package/dist/css-macro.mjs +4 -4
- package/dist/defaults.d.mts +2 -2
- package/dist/defaults.d.ts +2 -2
- package/dist/defaults.js +3 -3
- package/dist/defaults.mjs +2 -2
- package/dist/gulp.d.mts +2 -2
- package/dist/gulp.d.ts +2 -2
- package/dist/gulp.js +7 -8
- package/dist/gulp.mjs +6 -7
- package/dist/{index-t_VBjwYm.d.ts → index-BMwzhITq.d.mts} +6 -6
- package/dist/{index-t_VBjwYm.d.mts → index-BMwzhITq.d.ts} +6 -6
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +11 -12
- package/dist/index.mjs +9 -10
- package/dist/postcss-html-transform.js +1 -1
- package/dist/postcss-html-transform.mjs +1 -1
- package/dist/presets.d.mts +2 -2
- package/dist/presets.d.ts +2 -2
- package/dist/presets.js +5 -5
- package/dist/presets.mjs +2 -2
- package/dist/reset.js +1 -1
- package/dist/reset.mjs +1 -1
- package/dist/types.d.mts +4 -4
- package/dist/types.d.ts +4 -4
- package/dist/types.js +1 -1
- package/dist/types.mjs +1 -1
- package/dist/vite.d.mts +2 -2
- package/dist/vite.d.ts +2 -2
- package/dist/vite.js +8 -9
- package/dist/vite.mjs +6 -7
- package/dist/weapp-tw-css-import-rewrite-loader.js +3 -1
- package/dist/weapp-tw-runtime-classset-loader.js +29 -2
- package/dist/webpack.d.mts +2 -2
- package/dist/webpack.d.ts +2 -2
- package/dist/webpack.js +9 -10
- package/dist/webpack.mjs +7 -8
- package/dist/webpack4.d.mts +2 -2
- package/dist/webpack4.d.ts +2 -2
- package/dist/webpack4.js +41 -41
- package/dist/webpack4.mjs +12 -12
- package/package.json +8 -8
- package/dist/chunk-NOKJXG3W.js +0 -29
- package/dist/chunk-QYZCRG7F.mjs +0 -29
package/dist/core.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ITemplateHandlerOptions, CreateJsHandlerOptions, JsHandlerResult } from './types.mjs';
|
|
2
2
|
import * as postcss from 'postcss';
|
|
3
|
-
import { U as UserDefinedOptions } from './index-
|
|
4
|
-
import { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss';
|
|
3
|
+
import { U as UserDefinedOptions } from './index-BMwzhITq.mjs';
|
|
4
|
+
import { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
5
5
|
import '@babel/parser';
|
|
6
6
|
import 'magic-string';
|
|
7
7
|
import 'tailwindcss-patch';
|
package/dist/core.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ITemplateHandlerOptions, CreateJsHandlerOptions, JsHandlerResult } from './types.js';
|
|
2
2
|
import * as postcss from 'postcss';
|
|
3
|
-
import { U as UserDefinedOptions } from './index-
|
|
4
|
-
import { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss';
|
|
3
|
+
import { U as UserDefinedOptions } from './index-BMwzhITq.js';
|
|
4
|
+
import { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
5
5
|
import '@babel/parser';
|
|
6
6
|
import 'magic-string';
|
|
7
7
|
import 'tailwindcss-patch';
|
package/dist/core.js
CHANGED
|
@@ -1,14 +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(); } } 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 _chunkNOKJXG3Wjs = require('./chunk-NOKJXG3W.js');
|
|
4
3
|
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-ACTJYB33.js');
|
|
5
|
+
var _chunkLYGLQCWIjs = require('./chunk-LYGLQCWI.js');
|
|
6
|
+
require('./chunk-5KSBT6GU.js');
|
|
7
|
+
require('./chunk-LL3QUKJI.js');
|
|
10
8
|
require('./chunk-DYLQ6UOI.js');
|
|
11
|
-
require('./chunk-
|
|
9
|
+
require('./chunk-CRDOWYG4.js');
|
|
12
10
|
|
|
13
11
|
// src/core.ts
|
|
14
12
|
var _process = require('process'); var _process2 = _interopRequireDefault(_process);
|
|
@@ -26,9 +24,9 @@ function resolveTransformWxssOptions(options) {
|
|
|
26
24
|
return _shared.defuOverrideArray.call(void 0, options, DEFAULT_MAIN_CHUNK_STYLE_OPTIONS);
|
|
27
25
|
}
|
|
28
26
|
function createContext(options = {}) {
|
|
29
|
-
const opts =
|
|
27
|
+
const opts = _chunkLYGLQCWIjs.getCompilerContext.call(void 0, options);
|
|
30
28
|
const { templateHandler, styleHandler, jsHandler, twPatcher: initialTwPatcher, refreshTailwindcssPatcher } = opts;
|
|
31
|
-
const patchRecorderState =
|
|
29
|
+
const patchRecorderState = _chunkLYGLQCWIjs.setupPatchRecorder.call(void 0, initialTwPatcher, opts.tailwindcssBasedir, {
|
|
32
30
|
source: "runtime",
|
|
33
31
|
cwd: _nullishCoalesce(opts.tailwindcssBasedir, () => ( _process2.default.cwd()))
|
|
34
32
|
});
|
|
@@ -145,7 +143,7 @@ function createContext(options = {}) {
|
|
|
145
143
|
async function transformWxss(rawCss, options2) {
|
|
146
144
|
await runtimeState.patchPromise;
|
|
147
145
|
const result = await styleHandler(rawCss, resolveTransformWxssOptions(options2));
|
|
148
|
-
runtimeSet = await
|
|
146
|
+
runtimeSet = await _chunkLYGLQCWIjs.ensureRuntimeClassSet.call(void 0, runtimeState, {
|
|
149
147
|
forceRefresh: true,
|
|
150
148
|
forceCollect: true
|
|
151
149
|
});
|
|
@@ -156,7 +154,7 @@ function createContext(options = {}) {
|
|
|
156
154
|
if (_optionalChain([options2, 'optionalAccess', _ => _.runtimeSet])) {
|
|
157
155
|
runtimeSet = options2.runtimeSet;
|
|
158
156
|
} else if (runtimeSet.size === 0) {
|
|
159
|
-
runtimeSet = await
|
|
157
|
+
runtimeSet = await _chunkLYGLQCWIjs.ensureRuntimeClassSet.call(void 0, runtimeState, {
|
|
160
158
|
forceCollect: true
|
|
161
159
|
});
|
|
162
160
|
}
|
|
@@ -165,7 +163,7 @@ function createContext(options = {}) {
|
|
|
165
163
|
async function transformWxml(rawWxml, options2) {
|
|
166
164
|
await runtimeState.patchPromise;
|
|
167
165
|
if (!_optionalChain([options2, 'optionalAccess', _2 => _2.runtimeSet]) && runtimeSet.size === 0) {
|
|
168
|
-
runtimeSet = await
|
|
166
|
+
runtimeSet = await _chunkLYGLQCWIjs.ensureRuntimeClassSet.call(void 0, runtimeState, {
|
|
169
167
|
forceCollect: true
|
|
170
168
|
});
|
|
171
169
|
}
|
package/dist/core.mjs
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
setupPatchRecorder
|
|
3
|
-
} from "./chunk-QYZCRG7F.mjs";
|
|
4
1
|
import {
|
|
5
2
|
ensureRuntimeClassSet,
|
|
6
|
-
getCompilerContext
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import "./chunk-
|
|
3
|
+
getCompilerContext,
|
|
4
|
+
setupPatchRecorder
|
|
5
|
+
} from "./chunk-HADJCWHU.mjs";
|
|
6
|
+
import "./chunk-EW2K6CO5.mjs";
|
|
7
|
+
import "./chunk-23K4XDKF.mjs";
|
|
10
8
|
import "./chunk-OOHJLO5M.mjs";
|
|
11
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-EFBQ4SQR.mjs";
|
|
12
10
|
|
|
13
11
|
// src/core.ts
|
|
14
12
|
import process from "process";
|
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
|
+
var _chunkDYLQ6UOIjs = require('./chunk-DYLQ6UOI.js');
|
|
3
4
|
|
|
4
|
-
var _chunkOYSABARDjs = require('./chunk-OYSABARD.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('./chunk-
|
|
7
|
+
var _chunkOYSABARDjs = require('./chunk-OYSABARD.js');
|
|
8
|
+
require('./chunk-CRDOWYG4.js');
|
|
9
9
|
|
|
10
10
|
// src/css-macro/index.ts
|
|
11
11
|
var _plugin = require('tailwindcss/plugin'); var _plugin2 = _interopRequireDefault(_plugin);
|
package/dist/css-macro.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defu
|
|
3
|
+
} from "./chunk-OOHJLO5M.mjs";
|
|
1
4
|
import {
|
|
2
5
|
createMediaQuery,
|
|
3
6
|
createNegativeMediaQuery
|
|
4
7
|
} from "./chunk-2LH6PZH3.mjs";
|
|
5
|
-
import
|
|
6
|
-
defu
|
|
7
|
-
} from "./chunk-OOHJLO5M.mjs";
|
|
8
|
-
import "./chunk-DOH7FULQ.mjs";
|
|
8
|
+
import "./chunk-EFBQ4SQR.mjs";
|
|
9
9
|
|
|
10
10
|
// src/css-macro/index.ts
|
|
11
11
|
import plugin from "tailwindcss/plugin";
|
package/dist/defaults.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { U as UserDefinedOptions } from './index-
|
|
1
|
+
import { U as UserDefinedOptions } from './index-BMwzhITq.mjs';
|
|
2
2
|
import '@babel/parser';
|
|
3
|
-
import '@weapp-tailwindcss/postcss';
|
|
3
|
+
import '@weapp-tailwindcss/postcss/types';
|
|
4
4
|
import 'tailwindcss-patch';
|
|
5
5
|
import 'node:buffer';
|
|
6
6
|
import 'webpack';
|
package/dist/defaults.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { U as UserDefinedOptions } from './index-
|
|
1
|
+
import { U as UserDefinedOptions } from './index-BMwzhITq.js';
|
|
2
2
|
import '@babel/parser';
|
|
3
|
-
import '@weapp-tailwindcss/postcss';
|
|
3
|
+
import '@weapp-tailwindcss/postcss/types';
|
|
4
4
|
import 'tailwindcss-patch';
|
|
5
5
|
import 'node:buffer';
|
|
6
6
|
import 'webpack';
|
package/dist/defaults.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkLL3QUKJIjs = require('./chunk-LL3QUKJI.js');
|
|
4
4
|
require('./chunk-DYLQ6UOI.js');
|
|
5
|
-
require('./chunk-
|
|
5
|
+
require('./chunk-CRDOWYG4.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.getDefaultOptions =
|
|
8
|
+
exports.getDefaultOptions = _chunkLL3QUKJIjs.getDefaultOptions;
|
package/dist/defaults.mjs
CHANGED
package/dist/gulp.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ITemplateHandlerOptions, CreateJsHandlerOptions } from './types.mjs';
|
|
2
2
|
import stream from 'node:stream';
|
|
3
|
-
import { U as UserDefinedOptions } from './index-
|
|
4
|
-
import { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss';
|
|
3
|
+
import { U as UserDefinedOptions } from './index-BMwzhITq.mjs';
|
|
4
|
+
import { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
5
5
|
import '@babel/parser';
|
|
6
6
|
import 'magic-string';
|
|
7
7
|
import 'postcss';
|
package/dist/gulp.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ITemplateHandlerOptions, CreateJsHandlerOptions } from './types.js';
|
|
2
2
|
import stream from 'node:stream';
|
|
3
|
-
import { U as UserDefinedOptions } from './index-
|
|
4
|
-
import { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss';
|
|
3
|
+
import { U as UserDefinedOptions } from './index-BMwzhITq.js';
|
|
4
|
+
import { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
5
5
|
import '@babel/parser';
|
|
6
6
|
import 'magic-string';
|
|
7
7
|
import 'postcss';
|
package/dist/gulp.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-ACTJYB33.js');
|
|
3
|
+
var _chunk2W24MRCQjs = require('./chunk-2W24MRCQ.js');
|
|
4
|
+
require('./chunk-OF6MFURR.js');
|
|
5
|
+
require('./chunk-LYGLQCWI.js');
|
|
6
|
+
require('./chunk-5KSBT6GU.js');
|
|
7
|
+
require('./chunk-LL3QUKJI.js');
|
|
9
8
|
require('./chunk-DYLQ6UOI.js');
|
|
10
|
-
require('./chunk-
|
|
9
|
+
require('./chunk-CRDOWYG4.js');
|
|
11
10
|
|
|
12
11
|
|
|
13
12
|
|
|
14
|
-
exports.createPlugins =
|
|
13
|
+
exports.createPlugins = _chunk2W24MRCQjs.createPlugins; exports.weappTailwindcss = _chunk2W24MRCQjs.createPlugins;
|
package/dist/gulp.mjs
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createPlugins
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-35EI5JMK.mjs";
|
|
3
|
+
} from "./chunk-UCUAXK7F.mjs";
|
|
4
|
+
import "./chunk-76S2EME4.mjs";
|
|
5
|
+
import "./chunk-HADJCWHU.mjs";
|
|
6
|
+
import "./chunk-EW2K6CO5.mjs";
|
|
7
|
+
import "./chunk-23K4XDKF.mjs";
|
|
9
8
|
import "./chunk-OOHJLO5M.mjs";
|
|
10
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-EFBQ4SQR.mjs";
|
|
11
10
|
export {
|
|
12
11
|
createPlugins,
|
|
13
12
|
createPlugins as weappTailwindcss
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ParserOptions } from '@babel/parser';
|
|
2
|
-
import { LoadedPostcssOptions, CssPreflightOptions, CssCalcOptions, Rem2rpxOptions, Px2rpxOptions, UnitsToPxOptions, PresetEnvOptions } from '@weapp-tailwindcss/postcss';
|
|
3
|
-
import { ILengthUnitsPatchOptions,
|
|
2
|
+
import { LoadedPostcssOptions, CssPreflightOptions, CssCalcOptions, Rem2rpxOptions, Px2rpxOptions, UnitsToPxOptions, PresetEnvOptions } from '@weapp-tailwindcss/postcss/types';
|
|
3
|
+
import { ILengthUnitsPatchOptions, TailwindCssPatchOptions } from 'tailwindcss-patch';
|
|
4
4
|
import { Buffer } from 'node:buffer';
|
|
5
5
|
import { sources } from 'webpack';
|
|
6
6
|
import { LRUCache } from 'lru-cache';
|
|
@@ -165,7 +165,7 @@ interface UserDefinedOptionsGeneralPart {
|
|
|
165
165
|
* @group 3.一般配置
|
|
166
166
|
* @since ^2.6.2
|
|
167
167
|
* @remarks
|
|
168
|
-
* 启用后模板匹配完全交由 [`customAttributes`](/docs/api/
|
|
168
|
+
* 启用后模板匹配完全交由 [`customAttributes`](/docs/api/options/important#customattributes) 管理,需要自行覆盖默认的 `class` / `hover-class` 等匹配规则。
|
|
169
169
|
* @default false
|
|
170
170
|
*/
|
|
171
171
|
disabledDefaultTemplateHandler?: boolean;
|
|
@@ -258,7 +258,7 @@ interface UserDefinedOptionsGeneralPart {
|
|
|
258
258
|
*
|
|
259
259
|
* @group 3.一般配置
|
|
260
260
|
*/
|
|
261
|
-
tailwindcssPatcherOptions?:
|
|
261
|
+
tailwindcssPatcherOptions?: TailwindCssPatchOptions;
|
|
262
262
|
/**
|
|
263
263
|
* 控制命令行日志输出级别。
|
|
264
264
|
*
|
|
@@ -302,7 +302,7 @@ interface UserDefinedOptionsImportantPart {
|
|
|
302
302
|
* - 使用 `'*'` 作为键可为所有标签追加通用规则。
|
|
303
303
|
* - 支持传入 `Map<string | RegExp, (string | RegExp)[]>` 以满足复杂匹配需求。
|
|
304
304
|
* - 常见场景包括通过组件 `prop` 传递类名,或对三方组件的自定义属性做匹配,更多讨论见 [issue#129](https://github.com/sonofmagic/weapp-tailwindcss/issues/129#issuecomment-1340914688) 与 [issue#134](https://github.com/sonofmagic/weapp-tailwindcss/issues/134#issuecomment-1351288238)。
|
|
305
|
-
* 如果自定义规则已经覆盖默认的 `class`/`hover-class`,可开启 [`disabledDefaultTemplateHandler`](/docs/api/
|
|
305
|
+
* 如果自定义规则已经覆盖默认的 `class`/`hover-class`,可开启 [`disabledDefaultTemplateHandler`](/docs/api/options/general#disableddefaulttemplatehandler) 以关闭内置模板处理器。
|
|
306
306
|
* @example
|
|
307
307
|
* ```js
|
|
308
308
|
* const customAttributes = {
|
|
@@ -502,7 +502,7 @@ interface UserDefinedOptionsImportantPart {
|
|
|
502
502
|
* @since ^4.0.0
|
|
503
503
|
* @group 0.重要配置
|
|
504
504
|
*/
|
|
505
|
-
tailwindcss?:
|
|
505
|
+
tailwindcss?: TailwindCssPatchOptions['tailwindcss'];
|
|
506
506
|
/**
|
|
507
507
|
* 指定 tailwindcss@4 的入口 CSS。
|
|
508
508
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ParserOptions } from '@babel/parser';
|
|
2
|
-
import { LoadedPostcssOptions, CssPreflightOptions, CssCalcOptions, Rem2rpxOptions, Px2rpxOptions, UnitsToPxOptions, PresetEnvOptions } from '@weapp-tailwindcss/postcss';
|
|
3
|
-
import { ILengthUnitsPatchOptions,
|
|
2
|
+
import { LoadedPostcssOptions, CssPreflightOptions, CssCalcOptions, Rem2rpxOptions, Px2rpxOptions, UnitsToPxOptions, PresetEnvOptions } from '@weapp-tailwindcss/postcss/types';
|
|
3
|
+
import { ILengthUnitsPatchOptions, TailwindCssPatchOptions } from 'tailwindcss-patch';
|
|
4
4
|
import { Buffer } from 'node:buffer';
|
|
5
5
|
import { sources } from 'webpack';
|
|
6
6
|
import { LRUCache } from 'lru-cache';
|
|
@@ -165,7 +165,7 @@ interface UserDefinedOptionsGeneralPart {
|
|
|
165
165
|
* @group 3.一般配置
|
|
166
166
|
* @since ^2.6.2
|
|
167
167
|
* @remarks
|
|
168
|
-
* 启用后模板匹配完全交由 [`customAttributes`](/docs/api/
|
|
168
|
+
* 启用后模板匹配完全交由 [`customAttributes`](/docs/api/options/important#customattributes) 管理,需要自行覆盖默认的 `class` / `hover-class` 等匹配规则。
|
|
169
169
|
* @default false
|
|
170
170
|
*/
|
|
171
171
|
disabledDefaultTemplateHandler?: boolean;
|
|
@@ -258,7 +258,7 @@ interface UserDefinedOptionsGeneralPart {
|
|
|
258
258
|
*
|
|
259
259
|
* @group 3.一般配置
|
|
260
260
|
*/
|
|
261
|
-
tailwindcssPatcherOptions?:
|
|
261
|
+
tailwindcssPatcherOptions?: TailwindCssPatchOptions;
|
|
262
262
|
/**
|
|
263
263
|
* 控制命令行日志输出级别。
|
|
264
264
|
*
|
|
@@ -302,7 +302,7 @@ interface UserDefinedOptionsImportantPart {
|
|
|
302
302
|
* - 使用 `'*'` 作为键可为所有标签追加通用规则。
|
|
303
303
|
* - 支持传入 `Map<string | RegExp, (string | RegExp)[]>` 以满足复杂匹配需求。
|
|
304
304
|
* - 常见场景包括通过组件 `prop` 传递类名,或对三方组件的自定义属性做匹配,更多讨论见 [issue#129](https://github.com/sonofmagic/weapp-tailwindcss/issues/129#issuecomment-1340914688) 与 [issue#134](https://github.com/sonofmagic/weapp-tailwindcss/issues/134#issuecomment-1351288238)。
|
|
305
|
-
* 如果自定义规则已经覆盖默认的 `class`/`hover-class`,可开启 [`disabledDefaultTemplateHandler`](/docs/api/
|
|
305
|
+
* 如果自定义规则已经覆盖默认的 `class`/`hover-class`,可开启 [`disabledDefaultTemplateHandler`](/docs/api/options/general#disableddefaulttemplatehandler) 以关闭内置模板处理器。
|
|
306
306
|
* @example
|
|
307
307
|
* ```js
|
|
308
308
|
* const customAttributes = {
|
|
@@ -502,7 +502,7 @@ interface UserDefinedOptionsImportantPart {
|
|
|
502
502
|
* @since ^4.0.0
|
|
503
503
|
* @group 0.重要配置
|
|
504
504
|
*/
|
|
505
|
-
tailwindcss?:
|
|
505
|
+
tailwindcss?: TailwindCssPatchOptions['tailwindcss'];
|
|
506
506
|
/**
|
|
507
507
|
* 指定 tailwindcss@4 的入口 CSS。
|
|
508
508
|
*
|
package/dist/index.d.mts
CHANGED
|
@@ -2,8 +2,8 @@ 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-
|
|
6
|
-
export { CssPreflightOptions, IStyleHandlerOptions } from '@weapp-tailwindcss/postcss';
|
|
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-BMwzhITq.mjs';
|
|
6
|
+
export { CssPreflightOptions, IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
7
7
|
import 'node:stream';
|
|
8
8
|
import '@babel/parser';
|
|
9
9
|
import 'magic-string';
|
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ 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-
|
|
6
|
-
export { CssPreflightOptions, IStyleHandlerOptions } from '@weapp-tailwindcss/postcss';
|
|
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-BMwzhITq.js';
|
|
6
|
+
export { CssPreflightOptions, IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
7
7
|
import 'node:stream';
|
|
8
8
|
import '@babel/parser';
|
|
9
9
|
import 'magic-string';
|
package/dist/index.js
CHANGED
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var _chunk6O7HJU2Fjs = require('./chunk-6O7HJU2F.js');
|
|
5
|
+
require('./chunk-4TTPYMVM.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunk2W24MRCQjs = require('./chunk-2W24MRCQ.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
12
|
-
require('./chunk-
|
|
13
|
-
require('./chunk-
|
|
14
|
-
require('./chunk-
|
|
15
|
-
require('./chunk-
|
|
16
|
-
require('./chunk-
|
|
17
|
-
require('./chunk-ACTJYB33.js');
|
|
11
|
+
var _chunkK7CZXT46js = require('./chunk-K7CZXT46.js');
|
|
12
|
+
require('./chunk-7LKMJZD2.js');
|
|
13
|
+
require('./chunk-OF6MFURR.js');
|
|
14
|
+
require('./chunk-LYGLQCWI.js');
|
|
15
|
+
require('./chunk-5KSBT6GU.js');
|
|
16
|
+
require('./chunk-LL3QUKJI.js');
|
|
18
17
|
require('./chunk-DYLQ6UOI.js');
|
|
19
|
-
require('./chunk-
|
|
18
|
+
require('./chunk-CRDOWYG4.js');
|
|
20
19
|
|
|
21
20
|
|
|
22
21
|
|
|
23
22
|
|
|
24
23
|
|
|
25
|
-
exports.UnifiedViteWeappTailwindcssPlugin =
|
|
24
|
+
exports.UnifiedViteWeappTailwindcssPlugin = _chunkK7CZXT46js.UnifiedViteWeappTailwindcssPlugin; exports.UnifiedWebpackPluginV5 = _chunk6O7HJU2Fjs.UnifiedWebpackPluginV5; exports.createPlugins = _chunk2W24MRCQjs.createPlugins; exports.weappTailwindcssPackageDir = _chunk6O7HJU2Fjs.weappTailwindcssPackageDir;
|
package/dist/index.mjs
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UnifiedWebpackPluginV5,
|
|
3
3
|
weappTailwindcssPackageDir
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-RED7Y22U.mjs";
|
|
5
|
+
import "./chunk-SJ3SG6DU.mjs";
|
|
6
6
|
import {
|
|
7
7
|
createPlugins
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-UCUAXK7F.mjs";
|
|
9
9
|
import {
|
|
10
10
|
UnifiedViteWeappTailwindcssPlugin
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-66E76FQE.mjs";
|
|
12
12
|
import "./chunk-F2CKKG6Q.mjs";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-35EI5JMK.mjs";
|
|
13
|
+
import "./chunk-76S2EME4.mjs";
|
|
14
|
+
import "./chunk-HADJCWHU.mjs";
|
|
15
|
+
import "./chunk-EW2K6CO5.mjs";
|
|
16
|
+
import "./chunk-23K4XDKF.mjs";
|
|
18
17
|
import "./chunk-OOHJLO5M.mjs";
|
|
19
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-EFBQ4SQR.mjs";
|
|
20
19
|
export {
|
|
21
20
|
UnifiedViteWeappTailwindcssPlugin,
|
|
22
21
|
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-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }require('./chunk-CRDOWYG4.js');
|
|
2
2
|
|
|
3
3
|
// src/postcss-html-transform.ts
|
|
4
4
|
var _htmltransform = require('@weapp-tailwindcss/postcss/html-transform'); var _htmltransform2 = _interopRequireDefault(_htmltransform);
|
package/dist/presets.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PackageResolvingOptions } from 'local-pkg';
|
|
2
|
-
import { U as UserDefinedOptions } from './index-
|
|
2
|
+
import { U as UserDefinedOptions } from './index-BMwzhITq.mjs';
|
|
3
3
|
import '@babel/parser';
|
|
4
|
-
import '@weapp-tailwindcss/postcss';
|
|
4
|
+
import '@weapp-tailwindcss/postcss/types';
|
|
5
5
|
import 'tailwindcss-patch';
|
|
6
6
|
import 'node:buffer';
|
|
7
7
|
import 'webpack';
|
package/dist/presets.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PackageResolvingOptions } from 'local-pkg';
|
|
2
|
-
import { U as UserDefinedOptions } from './index-
|
|
2
|
+
import { U as UserDefinedOptions } from './index-BMwzhITq.js';
|
|
3
3
|
import '@babel/parser';
|
|
4
|
-
import '@weapp-tailwindcss/postcss';
|
|
4
|
+
import '@weapp-tailwindcss/postcss/types';
|
|
5
5
|
import 'tailwindcss-patch';
|
|
6
6
|
import 'node:buffer';
|
|
7
7
|
import 'webpack';
|
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
|
|
4
|
+
var _chunk5KSBT6GUjs = require('./chunk-5KSBT6GU.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
var _chunkDYLQ6UOIjs = require('./chunk-DYLQ6UOI.js');
|
|
9
|
-
require('./chunk-
|
|
9
|
+
require('./chunk-CRDOWYG4.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 =
|
|
27
|
+
const baseDir = _chunk5KSBT6GUjs.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
|
-
|
|
73
|
+
_chunk5KSBT6GUjs.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
|
-
|
|
76
|
+
_chunk5KSBT6GUjs.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-
|
|
4
|
+
} from "./chunk-EW2K6CO5.mjs";
|
|
5
5
|
import {
|
|
6
6
|
defuOverrideArray,
|
|
7
7
|
resolveUniUtsPlatform
|
|
8
8
|
} from "./chunk-OOHJLO5M.mjs";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-EFBQ4SQR.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-
|
|
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-CRDOWYG4.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
package/dist/types.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ParserOptions, ParseError } from '@babel/parser';
|
|
2
|
-
import { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss';
|
|
3
|
-
export { CssPreflightOptions, IStyleHandlerOptions } from '@weapp-tailwindcss/postcss';
|
|
2
|
+
import { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
3
|
+
export { CssPreflightOptions, IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
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-BMwzhITq.mjs';
|
|
8
|
+
export { D as DisabledOptions, a as ICustomAttributes, c as ItemOrItemArray } from './index-BMwzhITq.mjs';
|
|
9
9
|
import 'node:buffer';
|
|
10
10
|
import 'webpack';
|
|
11
11
|
import 'lru-cache';
|
package/dist/types.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ParserOptions, ParseError } from '@babel/parser';
|
|
2
|
-
import { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss';
|
|
3
|
-
export { CssPreflightOptions, IStyleHandlerOptions } from '@weapp-tailwindcss/postcss';
|
|
2
|
+
import { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
3
|
+
export { CssPreflightOptions, IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
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-BMwzhITq.js';
|
|
8
|
+
export { D as DisabledOptions, a as ICustomAttributes, c as ItemOrItemArray } from './index-BMwzhITq.js';
|
|
9
9
|
import 'node:buffer';
|
|
10
10
|
import 'webpack';
|
|
11
11
|
import 'lru-cache';
|
package/dist/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('./chunk-
|
|
1
|
+
"use strict";require('./chunk-CRDOWYG4.js');
|
package/dist/types.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-EFBQ4SQR.mjs";
|
package/dist/vite.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Plugin } from 'vite';
|
|
2
|
-
import { U as UserDefinedOptions } from './index-
|
|
2
|
+
import { U as UserDefinedOptions } from './index-BMwzhITq.mjs';
|
|
3
3
|
import '@babel/parser';
|
|
4
|
-
import '@weapp-tailwindcss/postcss';
|
|
4
|
+
import '@weapp-tailwindcss/postcss/types';
|
|
5
5
|
import 'tailwindcss-patch';
|
|
6
6
|
import 'node:buffer';
|
|
7
7
|
import 'webpack';
|