weapp-tailwindcss 2.6.1 → 2.6.3
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/cli.js +6 -5
- package/dist/cli.mjs +6 -5
- package/dist/{defaults-0d9846f4.js → defaults-28cfeec8.js} +5 -8
- package/dist/{defaults-c7f00aae.mjs → defaults-702719e1.mjs} +5 -7
- package/dist/defaults.js +2 -2
- package/dist/defaults.mjs +2 -2
- package/dist/escape.d.ts +1 -3
- package/dist/gulp.js +8 -7
- package/dist/gulp.mjs +8 -7
- package/dist/index.js +6 -5
- package/dist/index.mjs +6 -5
- package/dist/{options-6a265426.js → options-43afee21.js} +89 -162
- package/dist/{options-800ea85a.mjs → options-d8cb9e14.mjs} +66 -139
- package/dist/postcss/shared.d.ts +0 -1
- package/dist/{postcss-cf8b998a.js → postcss-4e99a8e8.js} +35 -35
- package/dist/{postcss-53e2ad95.mjs → postcss-a551ddc0.mjs} +35 -35
- package/dist/postcss.js +3 -3
- package/dist/postcss.mjs +3 -3
- package/dist/reg.d.ts +1 -26
- package/dist/replace.d.ts +1 -1
- package/dist/replace.js +24 -9
- package/dist/replace.mjs +4 -5
- package/dist/shared-df9de23f.js +17 -0
- package/dist/shared-fd149084.mjs +15 -0
- package/dist/types.d.ts +4 -8
- package/dist/vite.js +8 -7
- package/dist/vite.mjs +8 -7
- package/dist/webpack.js +8 -7
- package/dist/webpack.mjs +8 -7
- package/dist/wxml/index.d.ts +1 -1
- package/dist/wxml/shared.d.ts +2 -2
- package/dist/wxml/utils.d.ts +6 -6
- package/package.json +20 -18
- package/dist/dic-05980807.js +0 -111
- package/dist/dic-3790a3a4.mjs +0 -105
- package/dist/dic.d.ts +0 -44
- package/dist/shared-4eed0e5c.js +0 -62
- package/dist/shared-686bfc32.mjs +0 -59
|
@@ -4,139 +4,18 @@ import generate from '@babel/generator';
|
|
|
4
4
|
import { parse, parseExpression } from '@babel/parser';
|
|
5
5
|
import traverse from '@babel/traverse';
|
|
6
6
|
import { replaceJs as replaceWxml } from './replace.mjs';
|
|
7
|
-
import {
|
|
7
|
+
import { escapeStringRegexp, makeCustomAttributes, tagWithEitherClassAndHoverClassRegexp, templateClassExactRegexp, wxsTagRegexp, variableRegExp } from '@weapp-core/regex';
|
|
8
|
+
import { n as noop, d as defaultOptions, i as isMap } from './defaults-702719e1.mjs';
|
|
8
9
|
import postcss from 'postcss';
|
|
9
|
-
import { p as postcssWeappTailwindcss } from './postcss-
|
|
10
|
+
import { p as postcssWeappTailwindcss } from './postcss-a551ddc0.mjs';
|
|
10
11
|
import postcssIsPseudoClass from '@csstools/postcss-is-pseudo-class';
|
|
11
|
-
import {
|
|
12
|
+
import { SimpleMappingChars2String, MappingChars2String } from '@weapp-core/escape';
|
|
12
13
|
import path from 'node:path';
|
|
13
14
|
import fs from 'node:fs';
|
|
14
15
|
import { gte } from 'semver';
|
|
15
16
|
import { monkeyPatchForExposingContext, requireResolve, TailwindcssPatcher } from 'tailwindcss-patch';
|
|
16
17
|
import { ClassGenerator, defaultMangleClassFilter } from 'tailwindcss-mangle-shared';
|
|
17
18
|
|
|
18
|
-
function isObject(value) {
|
|
19
|
-
return value !== null && typeof value === "object";
|
|
20
|
-
}
|
|
21
|
-
function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
22
|
-
if (!isObject(defaults)) {
|
|
23
|
-
return _defu(baseObject, {}, namespace, merger);
|
|
24
|
-
}
|
|
25
|
-
const object = Object.assign({}, defaults);
|
|
26
|
-
for (const key in baseObject) {
|
|
27
|
-
if (key === "__proto__" || key === "constructor") {
|
|
28
|
-
continue;
|
|
29
|
-
}
|
|
30
|
-
const value = baseObject[key];
|
|
31
|
-
if (value === null || value === void 0) {
|
|
32
|
-
continue;
|
|
33
|
-
}
|
|
34
|
-
if (merger && merger(object, key, value, namespace)) {
|
|
35
|
-
continue;
|
|
36
|
-
}
|
|
37
|
-
if (Array.isArray(value) && Array.isArray(object[key])) {
|
|
38
|
-
object[key] = [...value, ...object[key]];
|
|
39
|
-
} else if (isObject(value) && isObject(object[key])) {
|
|
40
|
-
object[key] = _defu(
|
|
41
|
-
value,
|
|
42
|
-
object[key],
|
|
43
|
-
(namespace ? `${namespace}.` : "") + key.toString(),
|
|
44
|
-
merger
|
|
45
|
-
);
|
|
46
|
-
} else {
|
|
47
|
-
object[key] = value;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return object;
|
|
51
|
-
}
|
|
52
|
-
function createDefu(merger) {
|
|
53
|
-
return (...arguments_) => (
|
|
54
|
-
// eslint-disable-next-line unicorn/no-array-reduce
|
|
55
|
-
arguments_.reduce((p, c) => _defu(p, c, "", merger), {})
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
const defu = createDefu();
|
|
59
|
-
|
|
60
|
-
function escapeStringRegexp(str) {
|
|
61
|
-
if (typeof str !== 'string') {
|
|
62
|
-
throw new TypeError('Expected a string');
|
|
63
|
-
}
|
|
64
|
-
return str.replaceAll(/[$()*+.?[\\\]^{|}]/g, '\\$&').replaceAll('-', '\\x2d');
|
|
65
|
-
}
|
|
66
|
-
const templateClassExactRegexp = /(?<=^|\s)(?:hover-)?class=(?:["']\W+\s*\w+\()?["']([^"]+)["']/gs;
|
|
67
|
-
const tagWithEitherClassAndHoverClassRegexp = /<[a-z][a-z-]*[a-z]*\s+[^>]*?(?:hover-)?clas{2}="[^"]*"[^>]*?\/?>/g;
|
|
68
|
-
function handleRegexp(reg) {
|
|
69
|
-
return `(?:${reg.source})`;
|
|
70
|
-
}
|
|
71
|
-
function getSourceString(input) {
|
|
72
|
-
let result;
|
|
73
|
-
if (typeof input === 'string') {
|
|
74
|
-
result = input;
|
|
75
|
-
}
|
|
76
|
-
else if (isRegexp(input)) {
|
|
77
|
-
result = input.source;
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
result = input.toString();
|
|
81
|
-
}
|
|
82
|
-
return result;
|
|
83
|
-
}
|
|
84
|
-
function makePattern(arr) {
|
|
85
|
-
let pattern = '';
|
|
86
|
-
if (Array.isArray(arr)) {
|
|
87
|
-
pattern = arr
|
|
88
|
-
.reduce((acc, cur) => {
|
|
89
|
-
if (typeof cur === 'string') {
|
|
90
|
-
acc.push(cur);
|
|
91
|
-
}
|
|
92
|
-
else if (isRegexp(cur)) {
|
|
93
|
-
acc.push(handleRegexp(cur));
|
|
94
|
-
}
|
|
95
|
-
return acc;
|
|
96
|
-
}, [])
|
|
97
|
-
.join('|');
|
|
98
|
-
}
|
|
99
|
-
else if (typeof arr === 'string') {
|
|
100
|
-
pattern = arr;
|
|
101
|
-
}
|
|
102
|
-
else if (isRegexp(arr)) {
|
|
103
|
-
pattern = handleRegexp(arr);
|
|
104
|
-
}
|
|
105
|
-
return pattern;
|
|
106
|
-
}
|
|
107
|
-
function createTempleteHandlerMatchRegexp(tag, attrs, options = {}) {
|
|
108
|
-
const { exact = true } = options;
|
|
109
|
-
const prefix = exact ? '(?<=^|\\s)' : '';
|
|
110
|
-
const pattern = makePattern(attrs);
|
|
111
|
-
let tagPattern = getSourceString(tag);
|
|
112
|
-
if (tagPattern === '*') {
|
|
113
|
-
tagPattern = '[a-z][-a-z]*[a-z]*';
|
|
114
|
-
}
|
|
115
|
-
const source = `<(${tagPattern})\\s+[^>]*?(?:${prefix}(${pattern})="(?:[^"]*)")[^>]*?\\/?>`;
|
|
116
|
-
return new RegExp(source, 'g');
|
|
117
|
-
}
|
|
118
|
-
function createTemplateClassRegexp(attrs, options = {}) {
|
|
119
|
-
const { exact = true } = options;
|
|
120
|
-
const prefix = exact ? '(?<=^|\\s)' : '';
|
|
121
|
-
const pattern = makePattern(attrs);
|
|
122
|
-
const source = `(?:${prefix}${pattern})=(?:["']\\W+\\s*(?:\\w+)\\()?["']([^"]+)['"]`;
|
|
123
|
-
return new RegExp(source, 'gs');
|
|
124
|
-
}
|
|
125
|
-
function makeCustomAttributes(entries) {
|
|
126
|
-
if (Array.isArray(entries)) {
|
|
127
|
-
return entries.map(([k, v]) => {
|
|
128
|
-
return {
|
|
129
|
-
tagRegexp: createTempleteHandlerMatchRegexp(k, v),
|
|
130
|
-
attrRegexp: createTemplateClassRegexp(v),
|
|
131
|
-
tag: getSourceString(k),
|
|
132
|
-
attrs: v
|
|
133
|
-
};
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
const variableRegExp = /{{(.*?)}}/gs;
|
|
138
|
-
const wxsTagRegexp = /<wxs\s*(?:[a-z][a-z-]*[a-z]*(?:\s*=\s*".*?")?)*\s*>(.*?)<\/wxs>/gs;
|
|
139
|
-
|
|
140
19
|
const validateFilterRE = /[\w%-?\u00A0-\uFFFF-]/;
|
|
141
20
|
function isValidSelector(selector = '') {
|
|
142
21
|
return validateFilterRE.test(selector);
|
|
@@ -225,6 +104,48 @@ function createjsHandler(options) {
|
|
|
225
104
|
};
|
|
226
105
|
}
|
|
227
106
|
|
|
107
|
+
function isObject(value) {
|
|
108
|
+
return value !== null && typeof value === "object";
|
|
109
|
+
}
|
|
110
|
+
function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
111
|
+
if (!isObject(defaults)) {
|
|
112
|
+
return _defu(baseObject, {}, namespace, merger);
|
|
113
|
+
}
|
|
114
|
+
const object = Object.assign({}, defaults);
|
|
115
|
+
for (const key in baseObject) {
|
|
116
|
+
if (key === "__proto__" || key === "constructor") {
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
const value = baseObject[key];
|
|
120
|
+
if (value === null || value === void 0) {
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
if (merger && merger(object, key, value, namespace)) {
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
if (Array.isArray(value) && Array.isArray(object[key])) {
|
|
127
|
+
object[key] = [...value, ...object[key]];
|
|
128
|
+
} else if (isObject(value) && isObject(object[key])) {
|
|
129
|
+
object[key] = _defu(
|
|
130
|
+
value,
|
|
131
|
+
object[key],
|
|
132
|
+
(namespace ? `${namespace}.` : "") + key.toString(),
|
|
133
|
+
merger
|
|
134
|
+
);
|
|
135
|
+
} else {
|
|
136
|
+
object[key] = value;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return object;
|
|
140
|
+
}
|
|
141
|
+
function createDefu(merger) {
|
|
142
|
+
return (...arguments_) => (
|
|
143
|
+
// eslint-disable-next-line unicorn/no-array-reduce
|
|
144
|
+
arguments_.reduce((p, c) => _defu(p, c, "", merger), {})
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
const defu = createDefu();
|
|
148
|
+
|
|
228
149
|
function generateCode(match, options = {}) {
|
|
229
150
|
const ast = parseExpression(match);
|
|
230
151
|
traverse(ast, {
|
|
@@ -268,7 +189,7 @@ function extract(original, reg) {
|
|
|
268
189
|
function extractSource(original) {
|
|
269
190
|
return extract(original, variableRegExp);
|
|
270
191
|
}
|
|
271
|
-
function
|
|
192
|
+
function templateReplacer(original, options = {}) {
|
|
272
193
|
const sources = extractSource(original);
|
|
273
194
|
if (sources.length > 0) {
|
|
274
195
|
const resultArray = [];
|
|
@@ -311,22 +232,25 @@ function templeteReplacer(original, options = {}) {
|
|
|
311
232
|
});
|
|
312
233
|
}
|
|
313
234
|
}
|
|
314
|
-
function
|
|
235
|
+
function templateHandler(rawSource, options = {}) {
|
|
236
|
+
if (options.disabledDefaultTemplateHandler) {
|
|
237
|
+
return rawSource;
|
|
238
|
+
}
|
|
315
239
|
return rawSource.replace(tagWithEitherClassAndHoverClassRegexp, (m0) => {
|
|
316
240
|
return m0.replace(templateClassExactRegexp, (m1, className) => {
|
|
317
|
-
return m1.replace(className,
|
|
241
|
+
return m1.replace(className, templateReplacer(className, options));
|
|
318
242
|
});
|
|
319
243
|
});
|
|
320
244
|
}
|
|
321
|
-
function
|
|
245
|
+
function customTemplateHandler(rawSource, options) {
|
|
322
246
|
const { customAttributesEntities, inlineWxs, runtimeSet, jsHandler } = options;
|
|
323
|
-
let source =
|
|
247
|
+
let source = templateHandler(rawSource, options);
|
|
324
248
|
const regexps = makeCustomAttributes(customAttributesEntities);
|
|
325
249
|
if (regexps && Array.isArray(regexps)) {
|
|
326
250
|
for (const regexp of regexps) {
|
|
327
251
|
source = source.replace(regexp.tagRegexp, (m0) => {
|
|
328
252
|
return m0.replace(regexp.attrRegexp, (m1, className) => {
|
|
329
|
-
return m1.replace(className,
|
|
253
|
+
return m1.replace(className, templateReplacer(className, options));
|
|
330
254
|
});
|
|
331
255
|
});
|
|
332
256
|
}
|
|
@@ -340,9 +264,9 @@ function customTempleteHandler(rawSource, options) {
|
|
|
340
264
|
}
|
|
341
265
|
return source;
|
|
342
266
|
}
|
|
343
|
-
function
|
|
267
|
+
function createTemplateHandler(options = {}) {
|
|
344
268
|
return (rawSource, opt = {}) => {
|
|
345
|
-
return
|
|
269
|
+
return customTemplateHandler(rawSource, defu(opt, options));
|
|
346
270
|
};
|
|
347
271
|
}
|
|
348
272
|
|
|
@@ -472,11 +396,13 @@ function internalPatch(pkgJsonPath, options, overwrite = true) {
|
|
|
472
396
|
if (pkgJsonPath) {
|
|
473
397
|
const pkgJson = require(pkgJsonPath);
|
|
474
398
|
const dangerousOptions = options.dangerousOptions;
|
|
475
|
-
|
|
399
|
+
const version = pkgJson.version;
|
|
400
|
+
if (gte(version, dangerousOptions.gteVersion)) {
|
|
476
401
|
const rootDir = path.dirname(pkgJsonPath);
|
|
477
402
|
const dataTypes = monkeyPatchForSupportingCustomUnit(rootDir, options);
|
|
478
403
|
const result = monkeyPatchForExposingContext(rootDir, {
|
|
479
|
-
overwrite
|
|
404
|
+
overwrite,
|
|
405
|
+
version
|
|
480
406
|
});
|
|
481
407
|
return Object.assign(Object.assign({}, result), { dataTypes });
|
|
482
408
|
}
|
|
@@ -582,7 +508,7 @@ function getOptions(options = {}) {
|
|
|
582
508
|
const result = defu(options, defaultOptions, {
|
|
583
509
|
minifiedJs: isProd()
|
|
584
510
|
});
|
|
585
|
-
const { cssPreflight, customRuleCallback, cssPreflightRange, replaceUniversalSelectorWith, customAttributes, customReplaceDictionary, supportCustomLengthUnitsPatch, arbitraryValues, cssChildCombinatorReplaceValue, inlineWxs, injectAdditionalCssVarScope, jsPreserveClass } = result;
|
|
511
|
+
const { cssPreflight, customRuleCallback, cssPreflightRange, replaceUniversalSelectorWith, customAttributes, customReplaceDictionary, supportCustomLengthUnitsPatch, arbitraryValues, cssChildCombinatorReplaceValue, inlineWxs, injectAdditionalCssVarScope, jsPreserveClass, disabledDefaultTemplateHandler } = result;
|
|
586
512
|
result.escapeMap = customReplaceDictionary;
|
|
587
513
|
const cssInjectPreflight = createInjectPreflight(cssPreflight);
|
|
588
514
|
const customAttributesEntities = isMap(options.customAttributes)
|
|
@@ -610,14 +536,15 @@ function getOptions(options = {}) {
|
|
|
610
536
|
jsPreserveClass
|
|
611
537
|
});
|
|
612
538
|
result.jsHandler = jsHandler;
|
|
613
|
-
const
|
|
539
|
+
const templateHandler = createTemplateHandler({
|
|
614
540
|
customAttributesEntities,
|
|
615
541
|
escapeMap,
|
|
616
542
|
mangleContext,
|
|
617
543
|
inlineWxs,
|
|
618
|
-
jsHandler
|
|
544
|
+
jsHandler,
|
|
545
|
+
disabledDefaultTemplateHandler
|
|
619
546
|
});
|
|
620
|
-
result.
|
|
547
|
+
result.templateHandler = templateHandler;
|
|
621
548
|
result.patch = createPatch(supportCustomLengthUnitsPatch);
|
|
622
549
|
result.setMangleRuntimeSet = setMangleRuntimeSet;
|
|
623
550
|
return result;
|
package/dist/postcss/shared.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var selectorParser = require('postcss-selector-parser');
|
|
4
|
-
var shared = require('./shared-
|
|
4
|
+
var shared = require('./shared-df9de23f.js');
|
|
5
5
|
var postcss = require('postcss');
|
|
6
6
|
require('@csstools/postcss-is-pseudo-class');
|
|
7
7
|
|
|
@@ -84,15 +84,15 @@ var cssVars = [
|
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
86
|
prop: '--tw-pan-x',
|
|
87
|
-
value: '
|
|
87
|
+
value: ' '
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
90
|
prop: '--tw-pan-y',
|
|
91
|
-
value: '
|
|
91
|
+
value: ' '
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
94
|
prop: '--tw-pinch-zoom',
|
|
95
|
-
value: '
|
|
95
|
+
value: ' '
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
98
|
prop: '--tw-scroll-snap-strictness',
|
|
@@ -100,43 +100,43 @@ var cssVars = [
|
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
102
|
prop: '--tw-gradient-from-position',
|
|
103
|
-
value: '
|
|
103
|
+
value: ' '
|
|
104
104
|
},
|
|
105
105
|
{
|
|
106
106
|
prop: '--tw-gradient-via-position',
|
|
107
|
-
value: '
|
|
107
|
+
value: ' '
|
|
108
108
|
},
|
|
109
109
|
{
|
|
110
110
|
prop: '--tw-gradient-to-position',
|
|
111
|
-
value: '
|
|
111
|
+
value: ' '
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
114
|
prop: '--tw-ordinal',
|
|
115
|
-
value: '
|
|
115
|
+
value: ' '
|
|
116
116
|
},
|
|
117
117
|
{
|
|
118
118
|
prop: '--tw-slashed-zero',
|
|
119
|
-
value: '
|
|
119
|
+
value: ' '
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
122
|
prop: '--tw-numeric-figure',
|
|
123
|
-
value: '
|
|
123
|
+
value: ' '
|
|
124
124
|
},
|
|
125
125
|
{
|
|
126
126
|
prop: '--tw-numeric-spacing',
|
|
127
|
-
value: '
|
|
127
|
+
value: ' '
|
|
128
128
|
},
|
|
129
129
|
{
|
|
130
130
|
prop: '--tw-numeric-fraction',
|
|
131
|
-
value: '
|
|
131
|
+
value: ' '
|
|
132
132
|
},
|
|
133
133
|
{
|
|
134
134
|
prop: '--tw-ring-inset',
|
|
135
|
-
value: '
|
|
135
|
+
value: ' '
|
|
136
136
|
},
|
|
137
137
|
{
|
|
138
138
|
prop: '--tw-ring-offset-width',
|
|
139
|
-
value: '
|
|
139
|
+
value: '0px'
|
|
140
140
|
},
|
|
141
141
|
{
|
|
142
142
|
prop: '--tw-ring-offset-color',
|
|
@@ -144,7 +144,7 @@ var cssVars = [
|
|
|
144
144
|
},
|
|
145
145
|
{
|
|
146
146
|
prop: '--tw-ring-color',
|
|
147
|
-
value: '
|
|
147
|
+
value: 'rgb(59 130 246 / 0.5)'
|
|
148
148
|
},
|
|
149
149
|
{
|
|
150
150
|
prop: '--tw-ring-offset-shadow',
|
|
@@ -164,75 +164,75 @@ var cssVars = [
|
|
|
164
164
|
},
|
|
165
165
|
{
|
|
166
166
|
prop: '--tw-blur',
|
|
167
|
-
value: '
|
|
167
|
+
value: ' '
|
|
168
168
|
},
|
|
169
169
|
{
|
|
170
170
|
prop: '--tw-brightness',
|
|
171
|
-
value: '
|
|
171
|
+
value: ' '
|
|
172
172
|
},
|
|
173
173
|
{
|
|
174
174
|
prop: '--tw-contrast',
|
|
175
|
-
value: '
|
|
175
|
+
value: ' '
|
|
176
176
|
},
|
|
177
177
|
{
|
|
178
178
|
prop: '--tw-grayscale',
|
|
179
|
-
value: '
|
|
179
|
+
value: ' '
|
|
180
180
|
},
|
|
181
181
|
{
|
|
182
182
|
prop: '--tw-hue-rotate',
|
|
183
|
-
value: '
|
|
183
|
+
value: ' '
|
|
184
184
|
},
|
|
185
185
|
{
|
|
186
186
|
prop: '--tw-invert',
|
|
187
|
-
value: '
|
|
187
|
+
value: ' '
|
|
188
188
|
},
|
|
189
189
|
{
|
|
190
190
|
prop: '--tw-saturate',
|
|
191
|
-
value: '
|
|
191
|
+
value: ' '
|
|
192
192
|
},
|
|
193
193
|
{
|
|
194
194
|
prop: '--tw-sepia',
|
|
195
|
-
value: '
|
|
195
|
+
value: ' '
|
|
196
196
|
},
|
|
197
197
|
{
|
|
198
198
|
prop: '--tw-drop-shadow',
|
|
199
|
-
value: '
|
|
199
|
+
value: ' '
|
|
200
200
|
},
|
|
201
201
|
{
|
|
202
202
|
prop: '--tw-backdrop-blur',
|
|
203
|
-
value: '
|
|
203
|
+
value: ' '
|
|
204
204
|
},
|
|
205
205
|
{
|
|
206
206
|
prop: '--tw-backdrop-brightness',
|
|
207
|
-
value: '
|
|
207
|
+
value: ' '
|
|
208
208
|
},
|
|
209
209
|
{
|
|
210
210
|
prop: '--tw-backdrop-contrast',
|
|
211
|
-
value: '
|
|
211
|
+
value: ' '
|
|
212
212
|
},
|
|
213
213
|
{
|
|
214
214
|
prop: '--tw-backdrop-grayscale',
|
|
215
|
-
value: '
|
|
215
|
+
value: ' '
|
|
216
216
|
},
|
|
217
217
|
{
|
|
218
218
|
prop: '--tw-backdrop-hue-rotate',
|
|
219
|
-
value: '
|
|
219
|
+
value: ' '
|
|
220
220
|
},
|
|
221
221
|
{
|
|
222
222
|
prop: '--tw-backdrop-invert',
|
|
223
|
-
value: '
|
|
223
|
+
value: ' '
|
|
224
224
|
},
|
|
225
225
|
{
|
|
226
226
|
prop: '--tw-backdrop-opacity',
|
|
227
|
-
value: '
|
|
227
|
+
value: ' '
|
|
228
228
|
},
|
|
229
229
|
{
|
|
230
230
|
prop: '--tw-backdrop-saturate',
|
|
231
|
-
value: '
|
|
231
|
+
value: ' '
|
|
232
232
|
},
|
|
233
233
|
{
|
|
234
234
|
prop: '--tw-backdrop-sepia',
|
|
235
|
-
value: '
|
|
235
|
+
value: ' '
|
|
236
236
|
}
|
|
237
237
|
];
|
|
238
238
|
|
|
@@ -340,14 +340,14 @@ const postcssWeappTailwindcss = (options = {
|
|
|
340
340
|
isMainChunk: true
|
|
341
341
|
}) => {
|
|
342
342
|
const { customRuleCallback, isMainChunk } = options;
|
|
343
|
-
const
|
|
343
|
+
const isCustomRuleCallbackFn = typeof customRuleCallback === 'function';
|
|
344
344
|
return {
|
|
345
345
|
postcssPlugin,
|
|
346
346
|
Once(css) {
|
|
347
347
|
css.walkRules((rule) => {
|
|
348
348
|
transformSync(rule, options);
|
|
349
349
|
isMainChunk && commonChunkPreflight(rule, options);
|
|
350
|
-
|
|
350
|
+
isCustomRuleCallbackFn && customRuleCallback(rule, options);
|
|
351
351
|
});
|
|
352
352
|
}
|
|
353
353
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import selectorParser from 'postcss-selector-parser';
|
|
2
|
-
import { i as internalCssSelectorReplacer } from './shared-
|
|
2
|
+
import { i as internalCssSelectorReplacer } from './shared-fd149084.mjs';
|
|
3
3
|
import { Declaration, Rule } from 'postcss';
|
|
4
4
|
import '@csstools/postcss-is-pseudo-class';
|
|
5
5
|
|
|
@@ -78,15 +78,15 @@ var cssVars = [
|
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
prop: '--tw-pan-x',
|
|
81
|
-
value: '
|
|
81
|
+
value: ' '
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
84
|
prop: '--tw-pan-y',
|
|
85
|
-
value: '
|
|
85
|
+
value: ' '
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
prop: '--tw-pinch-zoom',
|
|
89
|
-
value: '
|
|
89
|
+
value: ' '
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
92
|
prop: '--tw-scroll-snap-strictness',
|
|
@@ -94,43 +94,43 @@ var cssVars = [
|
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
96
|
prop: '--tw-gradient-from-position',
|
|
97
|
-
value: '
|
|
97
|
+
value: ' '
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
prop: '--tw-gradient-via-position',
|
|
101
|
-
value: '
|
|
101
|
+
value: ' '
|
|
102
102
|
},
|
|
103
103
|
{
|
|
104
104
|
prop: '--tw-gradient-to-position',
|
|
105
|
-
value: '
|
|
105
|
+
value: ' '
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
108
|
prop: '--tw-ordinal',
|
|
109
|
-
value: '
|
|
109
|
+
value: ' '
|
|
110
110
|
},
|
|
111
111
|
{
|
|
112
112
|
prop: '--tw-slashed-zero',
|
|
113
|
-
value: '
|
|
113
|
+
value: ' '
|
|
114
114
|
},
|
|
115
115
|
{
|
|
116
116
|
prop: '--tw-numeric-figure',
|
|
117
|
-
value: '
|
|
117
|
+
value: ' '
|
|
118
118
|
},
|
|
119
119
|
{
|
|
120
120
|
prop: '--tw-numeric-spacing',
|
|
121
|
-
value: '
|
|
121
|
+
value: ' '
|
|
122
122
|
},
|
|
123
123
|
{
|
|
124
124
|
prop: '--tw-numeric-fraction',
|
|
125
|
-
value: '
|
|
125
|
+
value: ' '
|
|
126
126
|
},
|
|
127
127
|
{
|
|
128
128
|
prop: '--tw-ring-inset',
|
|
129
|
-
value: '
|
|
129
|
+
value: ' '
|
|
130
130
|
},
|
|
131
131
|
{
|
|
132
132
|
prop: '--tw-ring-offset-width',
|
|
133
|
-
value: '
|
|
133
|
+
value: '0px'
|
|
134
134
|
},
|
|
135
135
|
{
|
|
136
136
|
prop: '--tw-ring-offset-color',
|
|
@@ -138,7 +138,7 @@ var cssVars = [
|
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
140
|
prop: '--tw-ring-color',
|
|
141
|
-
value: '
|
|
141
|
+
value: 'rgb(59 130 246 / 0.5)'
|
|
142
142
|
},
|
|
143
143
|
{
|
|
144
144
|
prop: '--tw-ring-offset-shadow',
|
|
@@ -158,75 +158,75 @@ var cssVars = [
|
|
|
158
158
|
},
|
|
159
159
|
{
|
|
160
160
|
prop: '--tw-blur',
|
|
161
|
-
value: '
|
|
161
|
+
value: ' '
|
|
162
162
|
},
|
|
163
163
|
{
|
|
164
164
|
prop: '--tw-brightness',
|
|
165
|
-
value: '
|
|
165
|
+
value: ' '
|
|
166
166
|
},
|
|
167
167
|
{
|
|
168
168
|
prop: '--tw-contrast',
|
|
169
|
-
value: '
|
|
169
|
+
value: ' '
|
|
170
170
|
},
|
|
171
171
|
{
|
|
172
172
|
prop: '--tw-grayscale',
|
|
173
|
-
value: '
|
|
173
|
+
value: ' '
|
|
174
174
|
},
|
|
175
175
|
{
|
|
176
176
|
prop: '--tw-hue-rotate',
|
|
177
|
-
value: '
|
|
177
|
+
value: ' '
|
|
178
178
|
},
|
|
179
179
|
{
|
|
180
180
|
prop: '--tw-invert',
|
|
181
|
-
value: '
|
|
181
|
+
value: ' '
|
|
182
182
|
},
|
|
183
183
|
{
|
|
184
184
|
prop: '--tw-saturate',
|
|
185
|
-
value: '
|
|
185
|
+
value: ' '
|
|
186
186
|
},
|
|
187
187
|
{
|
|
188
188
|
prop: '--tw-sepia',
|
|
189
|
-
value: '
|
|
189
|
+
value: ' '
|
|
190
190
|
},
|
|
191
191
|
{
|
|
192
192
|
prop: '--tw-drop-shadow',
|
|
193
|
-
value: '
|
|
193
|
+
value: ' '
|
|
194
194
|
},
|
|
195
195
|
{
|
|
196
196
|
prop: '--tw-backdrop-blur',
|
|
197
|
-
value: '
|
|
197
|
+
value: ' '
|
|
198
198
|
},
|
|
199
199
|
{
|
|
200
200
|
prop: '--tw-backdrop-brightness',
|
|
201
|
-
value: '
|
|
201
|
+
value: ' '
|
|
202
202
|
},
|
|
203
203
|
{
|
|
204
204
|
prop: '--tw-backdrop-contrast',
|
|
205
|
-
value: '
|
|
205
|
+
value: ' '
|
|
206
206
|
},
|
|
207
207
|
{
|
|
208
208
|
prop: '--tw-backdrop-grayscale',
|
|
209
|
-
value: '
|
|
209
|
+
value: ' '
|
|
210
210
|
},
|
|
211
211
|
{
|
|
212
212
|
prop: '--tw-backdrop-hue-rotate',
|
|
213
|
-
value: '
|
|
213
|
+
value: ' '
|
|
214
214
|
},
|
|
215
215
|
{
|
|
216
216
|
prop: '--tw-backdrop-invert',
|
|
217
|
-
value: '
|
|
217
|
+
value: ' '
|
|
218
218
|
},
|
|
219
219
|
{
|
|
220
220
|
prop: '--tw-backdrop-opacity',
|
|
221
|
-
value: '
|
|
221
|
+
value: ' '
|
|
222
222
|
},
|
|
223
223
|
{
|
|
224
224
|
prop: '--tw-backdrop-saturate',
|
|
225
|
-
value: '
|
|
225
|
+
value: ' '
|
|
226
226
|
},
|
|
227
227
|
{
|
|
228
228
|
prop: '--tw-backdrop-sepia',
|
|
229
|
-
value: '
|
|
229
|
+
value: ' '
|
|
230
230
|
}
|
|
231
231
|
];
|
|
232
232
|
|
|
@@ -334,14 +334,14 @@ const postcssWeappTailwindcss = (options = {
|
|
|
334
334
|
isMainChunk: true
|
|
335
335
|
}) => {
|
|
336
336
|
const { customRuleCallback, isMainChunk } = options;
|
|
337
|
-
const
|
|
337
|
+
const isCustomRuleCallbackFn = typeof customRuleCallback === 'function';
|
|
338
338
|
return {
|
|
339
339
|
postcssPlugin,
|
|
340
340
|
Once(css) {
|
|
341
341
|
css.walkRules((rule) => {
|
|
342
342
|
transformSync(rule, options);
|
|
343
343
|
isMainChunk && commonChunkPreflight(rule, options);
|
|
344
|
-
|
|
344
|
+
isCustomRuleCallbackFn && customRuleCallback(rule, options);
|
|
345
345
|
});
|
|
346
346
|
}
|
|
347
347
|
};
|