weapp-tailwindcss 2.9.2 → 2.10.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.
- package/README.md +13 -9
- package/dist/cache/index.d.ts +5 -2
- package/dist/cli.js +5 -4
- package/dist/cli.mjs +5 -4
- package/dist/constants--OCCPvZ8.mjs +36 -0
- package/dist/constants-9jsALkux.js +42 -0
- package/dist/css-macro/constants.d.ts +14 -0
- package/dist/css-macro/index.d.ts +15 -0
- package/dist/css-macro/index.js +36 -0
- package/dist/css-macro/index.mjs +30 -0
- package/dist/css-macro/postcss.d.ts +5 -0
- package/dist/css-macro/postcss.js +35 -0
- package/dist/css-macro/postcss.mjs +33 -0
- package/dist/defaults.js +1 -1
- package/dist/defaults.mjs +1 -1
- package/dist/defu-R3SAEzGq.mjs +43 -0
- package/dist/defu-d2wgbAKv.js +45 -0
- package/dist/gulp.js +19 -14
- package/dist/gulp.mjs +19 -14
- package/dist/index.js +8 -7
- package/dist/index.mjs +8 -7
- package/dist/{options-e1a9fdd3.mjs → options-1ejnE5kK.mjs} +53 -56
- package/dist/{options-9dd8de2e.js → options-jeQuZCU1.js} +57 -59
- package/dist/postcss/index.d.ts +2 -2
- package/dist/{postcss-8d7f67b4.js → postcss-03jfy6ZA.js} +1 -1
- package/dist/{postcss-55ed4d42.mjs → postcss-GEOOjC-4.mjs} +1 -1
- package/dist/postcss.js +2 -2
- package/dist/postcss.mjs +2 -2
- package/dist/replace.js +1 -1
- package/dist/replace.mjs +1 -1
- package/dist/types.d.ts +2 -1
- package/dist/vite.js +115 -110
- package/dist/vite.mjs +115 -110
- package/dist/webpack.js +20 -17
- package/dist/webpack.mjs +20 -17
- package/package.json +51 -37
- /package/dist/{defaults-b7341550.js → defaults-0O-zKoXE.js} +0 -0
- /package/dist/{defaults-d2c66d23.mjs → defaults-dz6xGhOP.mjs} +0 -0
- /package/dist/{index-84c7aa87.mjs → index-06BoOZig.mjs} +0 -0
- /package/dist/{index-aede98ce.js → index-z25r_Htj.js} +0 -0
- /package/dist/{shared-283aac78.mjs → shared-S0v7ZvWs.mjs} +0 -0
- /package/dist/{shared-8b9be5f0.js → shared-nXoJWFdz.js} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
export { UnifiedWebpackPluginV5 } from './webpack.mjs';
|
|
2
2
|
export { UnifiedViteWeappTailwindcssPlugin } from './vite.mjs';
|
|
3
3
|
export { createPlugins } from './gulp.mjs';
|
|
4
|
-
import '
|
|
5
|
-
import 'node:fs';
|
|
6
|
-
import './options-e1a9fdd3.mjs';
|
|
4
|
+
import './options-1ejnE5kK.mjs';
|
|
7
5
|
import 'micromatch';
|
|
8
6
|
import 'magic-string';
|
|
9
7
|
import './replace.mjs';
|
|
10
8
|
import '@weapp-core/escape';
|
|
11
9
|
import '@ast-core/escape';
|
|
12
|
-
import './shared-
|
|
10
|
+
import './shared-S0v7ZvWs.mjs';
|
|
13
11
|
import '@weapp-core/regex';
|
|
14
12
|
import '@babel/generator';
|
|
15
13
|
import '@babel/parser';
|
|
16
14
|
import '@babel/traverse';
|
|
17
|
-
import './
|
|
15
|
+
import './defu-R3SAEzGq.mjs';
|
|
16
|
+
import './defaults-dz6xGhOP.mjs';
|
|
18
17
|
import '@babel/types';
|
|
19
18
|
import 'htmlparser2';
|
|
20
19
|
import 'postcss';
|
|
21
|
-
import './postcss-
|
|
20
|
+
import './postcss-GEOOjC-4.mjs';
|
|
22
21
|
import 'postcss-selector-parser';
|
|
23
22
|
import '@csstools/postcss-is-pseudo-class';
|
|
23
|
+
import 'node:path';
|
|
24
|
+
import 'node:fs';
|
|
24
25
|
import 'semver';
|
|
25
26
|
import 'tailwindcss-patch';
|
|
26
27
|
import '@tailwindcss-mangle/shared';
|
|
27
28
|
import 'lru-cache';
|
|
28
29
|
import 'md5';
|
|
29
|
-
import './index-
|
|
30
|
+
import './index-06BoOZig.mjs';
|
|
30
31
|
import 'debug';
|
|
31
32
|
import 'node:stream';
|
|
@@ -7,11 +7,12 @@ import { jsStringEscape } from '@ast-core/escape';
|
|
|
7
7
|
import generate from '@babel/generator';
|
|
8
8
|
import { parse, parseExpression } from '@babel/parser';
|
|
9
9
|
import traverse from '@babel/traverse';
|
|
10
|
-
import {
|
|
10
|
+
import { d as defu } from './defu-R3SAEzGq.mjs';
|
|
11
|
+
import { n as noop, d as defaultOptions, i as isMap } from './defaults-dz6xGhOP.mjs';
|
|
11
12
|
import * as t from '@babel/types';
|
|
12
13
|
import { Parser } from 'htmlparser2';
|
|
13
14
|
import postcss from 'postcss';
|
|
14
|
-
import { p as postcssWeappTailwindcss } from './postcss-
|
|
15
|
+
import { p as postcssWeappTailwindcss } from './postcss-GEOOjC-4.mjs';
|
|
15
16
|
import postcssIsPseudoClass from '@csstools/postcss-is-pseudo-class';
|
|
16
17
|
import path from 'node:path';
|
|
17
18
|
import fs from 'node:fs';
|
|
@@ -21,6 +22,38 @@ import { ClassGenerator, defaultMangleClassFilter } from '@tailwindcss-mangle/sh
|
|
|
21
22
|
import { LRUCache } from 'lru-cache';
|
|
22
23
|
import md5 from 'md5';
|
|
23
24
|
|
|
25
|
+
/******************************************************************************
|
|
26
|
+
Copyright (c) Microsoft Corporation.
|
|
27
|
+
|
|
28
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
29
|
+
purpose with or without fee is hereby granted.
|
|
30
|
+
|
|
31
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
32
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
33
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
34
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
35
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
36
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
37
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
38
|
+
***************************************************************************** */
|
|
39
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
43
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
44
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
45
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
46
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
47
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
48
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
53
|
+
var e = new Error(message);
|
|
54
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
55
|
+
};
|
|
56
|
+
|
|
24
57
|
const validateFilterRE = /[\w%-?\u00A0-\uFFFF-]/;
|
|
25
58
|
function isValidSelector(selector = '') {
|
|
26
59
|
return validateFilterRE.test(selector);
|
|
@@ -95,48 +128,6 @@ function replaceHandleValue(str, node, options, ms, offset = 0, needEscaped = fa
|
|
|
95
128
|
|
|
96
129
|
const isProd = () => process.env.NODE_ENV === 'production';
|
|
97
130
|
|
|
98
|
-
function isObject(value) {
|
|
99
|
-
return value !== null && typeof value === "object";
|
|
100
|
-
}
|
|
101
|
-
function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
102
|
-
if (!isObject(defaults)) {
|
|
103
|
-
return _defu(baseObject, {}, namespace, merger);
|
|
104
|
-
}
|
|
105
|
-
const object = Object.assign({}, defaults);
|
|
106
|
-
for (const key in baseObject) {
|
|
107
|
-
if (key === "__proto__" || key === "constructor") {
|
|
108
|
-
continue;
|
|
109
|
-
}
|
|
110
|
-
const value = baseObject[key];
|
|
111
|
-
if (value === null || value === void 0) {
|
|
112
|
-
continue;
|
|
113
|
-
}
|
|
114
|
-
if (merger && merger(object, key, value, namespace)) {
|
|
115
|
-
continue;
|
|
116
|
-
}
|
|
117
|
-
if (Array.isArray(value) && Array.isArray(object[key])) {
|
|
118
|
-
object[key] = [...value, ...object[key]];
|
|
119
|
-
} else if (isObject(value) && isObject(object[key])) {
|
|
120
|
-
object[key] = _defu(
|
|
121
|
-
value,
|
|
122
|
-
object[key],
|
|
123
|
-
(namespace ? `${namespace}.` : "") + key.toString(),
|
|
124
|
-
merger
|
|
125
|
-
);
|
|
126
|
-
} else {
|
|
127
|
-
object[key] = value;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
return object;
|
|
131
|
-
}
|
|
132
|
-
function createDefu(merger) {
|
|
133
|
-
return (...arguments_) => (
|
|
134
|
-
// eslint-disable-next-line unicorn/no-array-reduce
|
|
135
|
-
arguments_.reduce((p, c) => _defu(p, c, "", merger), {})
|
|
136
|
-
);
|
|
137
|
-
}
|
|
138
|
-
const defu = createDefu();
|
|
139
|
-
|
|
140
131
|
function isEvalPath(p) {
|
|
141
132
|
if (p.isCallExpression()) {
|
|
142
133
|
const calleePath = p.get('callee');
|
|
@@ -459,7 +450,11 @@ function createTemplateHandler(options = {}) {
|
|
|
459
450
|
}
|
|
460
451
|
|
|
461
452
|
function styleHandler(rawSource, options) {
|
|
462
|
-
return
|
|
453
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
454
|
+
return (yield postcss([postcssIsPseudoClass(), postcssWeappTailwindcss(options)])
|
|
455
|
+
.process(rawSource)
|
|
456
|
+
.async()).css;
|
|
457
|
+
});
|
|
463
458
|
}
|
|
464
459
|
function createStyleHandler(options) {
|
|
465
460
|
return (rawSource, opt) => {
|
|
@@ -716,17 +711,19 @@ function createCache() {
|
|
|
716
711
|
return instance.has(key);
|
|
717
712
|
},
|
|
718
713
|
process(key, callback, fallback) {
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
714
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
715
|
+
const hit = this.getHashValue(key);
|
|
716
|
+
if (hit && !hit.changed) {
|
|
717
|
+
const returnFlag = yield callback();
|
|
718
|
+
if (returnFlag !== false) {
|
|
719
|
+
return;
|
|
720
|
+
}
|
|
724
721
|
}
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
}
|
|
722
|
+
const res = yield fallback();
|
|
723
|
+
if (res) {
|
|
724
|
+
this.set(res.key, res.source);
|
|
725
|
+
}
|
|
726
|
+
});
|
|
730
727
|
}
|
|
731
728
|
};
|
|
732
729
|
}
|
|
@@ -805,4 +802,4 @@ function getOptions(options = {}) {
|
|
|
805
802
|
return result;
|
|
806
803
|
}
|
|
807
804
|
|
|
808
|
-
export { createTailwindcssPatcher as a, createPatch as c, getOptions as g };
|
|
805
|
+
export { __awaiter as _, createTailwindcssPatcher as a, createPatch as c, getOptions as g };
|
|
@@ -9,11 +9,12 @@ var escape = require('@ast-core/escape');
|
|
|
9
9
|
var generate = require('@babel/generator');
|
|
10
10
|
var parser = require('@babel/parser');
|
|
11
11
|
var traverse = require('@babel/traverse');
|
|
12
|
-
var
|
|
12
|
+
var defu = require('./defu-d2wgbAKv.js');
|
|
13
|
+
var defaults = require('./defaults-0O-zKoXE.js');
|
|
13
14
|
var t = require('@babel/types');
|
|
14
15
|
var htmlparser2 = require('htmlparser2');
|
|
15
16
|
var postcss = require('postcss');
|
|
16
|
-
var postcss$1 = require('./postcss-
|
|
17
|
+
var postcss$1 = require('./postcss-03jfy6ZA.js');
|
|
17
18
|
var postcssIsPseudoClass = require('@csstools/postcss-is-pseudo-class');
|
|
18
19
|
var path = require('node:path');
|
|
19
20
|
var fs = require('node:fs');
|
|
@@ -53,6 +54,38 @@ var path__default = /*#__PURE__*/_interopDefaultCompat(path);
|
|
|
53
54
|
var fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
|
|
54
55
|
var md5__default = /*#__PURE__*/_interopDefaultCompat(md5);
|
|
55
56
|
|
|
57
|
+
/******************************************************************************
|
|
58
|
+
Copyright (c) Microsoft Corporation.
|
|
59
|
+
|
|
60
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
61
|
+
purpose with or without fee is hereby granted.
|
|
62
|
+
|
|
63
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
64
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
65
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
66
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
67
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
68
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
69
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
70
|
+
***************************************************************************** */
|
|
71
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
75
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
76
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
77
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
78
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
79
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
80
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
85
|
+
var e = new Error(message);
|
|
86
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
87
|
+
};
|
|
88
|
+
|
|
56
89
|
const validateFilterRE = /[\w%-?\u00A0-\uFFFF-]/;
|
|
57
90
|
function isValidSelector(selector = '') {
|
|
58
91
|
return validateFilterRE.test(selector);
|
|
@@ -127,48 +160,6 @@ function replaceHandleValue(str, node, options, ms, offset = 0, needEscaped = fa
|
|
|
127
160
|
|
|
128
161
|
const isProd = () => process.env.NODE_ENV === 'production';
|
|
129
162
|
|
|
130
|
-
function isObject(value) {
|
|
131
|
-
return value !== null && typeof value === "object";
|
|
132
|
-
}
|
|
133
|
-
function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
134
|
-
if (!isObject(defaults)) {
|
|
135
|
-
return _defu(baseObject, {}, namespace, merger);
|
|
136
|
-
}
|
|
137
|
-
const object = Object.assign({}, defaults);
|
|
138
|
-
for (const key in baseObject) {
|
|
139
|
-
if (key === "__proto__" || key === "constructor") {
|
|
140
|
-
continue;
|
|
141
|
-
}
|
|
142
|
-
const value = baseObject[key];
|
|
143
|
-
if (value === null || value === void 0) {
|
|
144
|
-
continue;
|
|
145
|
-
}
|
|
146
|
-
if (merger && merger(object, key, value, namespace)) {
|
|
147
|
-
continue;
|
|
148
|
-
}
|
|
149
|
-
if (Array.isArray(value) && Array.isArray(object[key])) {
|
|
150
|
-
object[key] = [...value, ...object[key]];
|
|
151
|
-
} else if (isObject(value) && isObject(object[key])) {
|
|
152
|
-
object[key] = _defu(
|
|
153
|
-
value,
|
|
154
|
-
object[key],
|
|
155
|
-
(namespace ? `${namespace}.` : "") + key.toString(),
|
|
156
|
-
merger
|
|
157
|
-
);
|
|
158
|
-
} else {
|
|
159
|
-
object[key] = value;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
return object;
|
|
163
|
-
}
|
|
164
|
-
function createDefu(merger) {
|
|
165
|
-
return (...arguments_) => (
|
|
166
|
-
// eslint-disable-next-line unicorn/no-array-reduce
|
|
167
|
-
arguments_.reduce((p, c) => _defu(p, c, "", merger), {})
|
|
168
|
-
);
|
|
169
|
-
}
|
|
170
|
-
const defu = createDefu();
|
|
171
|
-
|
|
172
163
|
function isEvalPath(p) {
|
|
173
164
|
if (p.isCallExpression()) {
|
|
174
165
|
const calleePath = p.get('callee');
|
|
@@ -312,7 +303,7 @@ function jsHandler(rawSource, options) {
|
|
|
312
303
|
function createJsHandler(options) {
|
|
313
304
|
const { mangleContext, arbitraryValues, minifiedJs, escapeMap, jsPreserveClass, strategy, generateMap } = options;
|
|
314
305
|
return (rawSource, set, options) => {
|
|
315
|
-
const opts = defu(options, {
|
|
306
|
+
const opts = defu.defu(options, {
|
|
316
307
|
classNameSet: set,
|
|
317
308
|
minifiedJs,
|
|
318
309
|
escapeMap,
|
|
@@ -486,16 +477,20 @@ function customTemplateHandler(rawSource, options) {
|
|
|
486
477
|
}
|
|
487
478
|
function createTemplateHandler(options = {}) {
|
|
488
479
|
return (rawSource, opt = {}) => {
|
|
489
|
-
return customTemplateHandler(rawSource, defu(opt, options));
|
|
480
|
+
return customTemplateHandler(rawSource, defu.defu(opt, options));
|
|
490
481
|
};
|
|
491
482
|
}
|
|
492
483
|
|
|
493
484
|
function styleHandler(rawSource, options) {
|
|
494
|
-
return
|
|
485
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
486
|
+
return (yield postcss__default["default"]([postcssIsPseudoClass__default["default"](), postcss$1.postcssWeappTailwindcss(options)])
|
|
487
|
+
.process(rawSource)
|
|
488
|
+
.async()).css;
|
|
489
|
+
});
|
|
495
490
|
}
|
|
496
491
|
function createStyleHandler(options) {
|
|
497
492
|
return (rawSource, opt) => {
|
|
498
|
-
return styleHandler(rawSource, defu(opt, options));
|
|
493
|
+
return styleHandler(rawSource, defu.defu(opt, options));
|
|
499
494
|
};
|
|
500
495
|
}
|
|
501
496
|
|
|
@@ -748,17 +743,19 @@ function createCache() {
|
|
|
748
743
|
return instance.has(key);
|
|
749
744
|
},
|
|
750
745
|
process(key, callback, fallback) {
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
746
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
747
|
+
const hit = this.getHashValue(key);
|
|
748
|
+
if (hit && !hit.changed) {
|
|
749
|
+
const returnFlag = yield callback();
|
|
750
|
+
if (returnFlag !== false) {
|
|
751
|
+
return;
|
|
752
|
+
}
|
|
756
753
|
}
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
}
|
|
754
|
+
const res = yield fallback();
|
|
755
|
+
if (res) {
|
|
756
|
+
this.set(res.key, res.source);
|
|
757
|
+
}
|
|
758
|
+
});
|
|
762
759
|
}
|
|
763
760
|
};
|
|
764
761
|
}
|
|
@@ -788,7 +785,7 @@ function getOptions(options = {}) {
|
|
|
788
785
|
normalizeMatcher(options, 'jsMatcher');
|
|
789
786
|
normalizeMatcher(options, 'wxsMatcher');
|
|
790
787
|
normalizeMatcher(options, 'mainCssChunkMatcher');
|
|
791
|
-
const result = defu(options, defaults.defaultOptions, {
|
|
788
|
+
const result = defu.defu(options, defaults.defaultOptions, {
|
|
792
789
|
minifiedJs: isProd()
|
|
793
790
|
});
|
|
794
791
|
const { cssPreflight, customRuleCallback, cssPreflightRange, replaceUniversalSelectorWith, customAttributes, customReplaceDictionary, supportCustomLengthUnitsPatch, arbitraryValues, cssChildCombinatorReplaceValue, inlineWxs, injectAdditionalCssVarScope, jsPreserveClass, disabledDefaultTemplateHandler, jsEscapeStrategy, cssSelectorReplacement } = result;
|
|
@@ -837,6 +834,7 @@ function getOptions(options = {}) {
|
|
|
837
834
|
return result;
|
|
838
835
|
}
|
|
839
836
|
|
|
837
|
+
exports.__awaiter = __awaiter;
|
|
840
838
|
exports.createPatch = createPatch;
|
|
841
839
|
exports.createTailwindcssPatcher = createTailwindcssPatcher;
|
|
842
840
|
exports.getOptions = getOptions;
|
package/dist/postcss/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { IStyleHandlerOptions } from "../types";
|
|
2
|
-
export declare function styleHandler(rawSource: string, options: IStyleHandlerOptions): string
|
|
3
|
-
export declare function createStyleHandler(options: Partial<IStyleHandlerOptions>): (rawSource: string, opt?: Partial<IStyleHandlerOptions>) => string
|
|
2
|
+
export declare function styleHandler(rawSource: string, options: IStyleHandlerOptions): Promise<string>;
|
|
3
|
+
export declare function createStyleHandler(options: Partial<IStyleHandlerOptions>): (rawSource: string, opt?: Partial<IStyleHandlerOptions>) => Promise<string>;
|
|
@@ -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-S0v7ZvWs.mjs';
|
|
3
3
|
import { Declaration, Rule } from 'postcss';
|
|
4
4
|
import '@csstools/postcss-is-pseudo-class';
|
|
5
5
|
|
package/dist/postcss.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var postcss = require('./postcss-
|
|
5
|
+
var postcss = require('./postcss-03jfy6ZA.js');
|
|
6
6
|
var postcssIsPseudoClass = require('@csstools/postcss-is-pseudo-class');
|
|
7
7
|
require('postcss-selector-parser');
|
|
8
|
-
require('./shared-
|
|
8
|
+
require('./shared-nXoJWFdz.js');
|
|
9
9
|
require('@weapp-core/escape');
|
|
10
10
|
require('@ast-core/escape');
|
|
11
11
|
require('postcss');
|
package/dist/postcss.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { p as postcssWeappTailwindcss } from './postcss-
|
|
1
|
+
export { p as postcssWeappTailwindcss } from './postcss-GEOOjC-4.mjs';
|
|
2
2
|
export { default as postcssIsPseudoClass } from '@csstools/postcss-is-pseudo-class';
|
|
3
3
|
import 'postcss-selector-parser';
|
|
4
|
-
import './shared-
|
|
4
|
+
import './shared-S0v7ZvWs.mjs';
|
|
5
5
|
import '@weapp-core/escape';
|
|
6
6
|
import '@ast-core/escape';
|
|
7
7
|
import 'postcss';
|
package/dist/replace.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var escape = require('@weapp-core/escape');
|
|
6
6
|
require('@ast-core/escape');
|
|
7
|
-
var shared = require('./shared-
|
|
7
|
+
var shared = require('./shared-nXoJWFdz.js');
|
|
8
8
|
|
|
9
9
|
function replaceWxml(original, options = {
|
|
10
10
|
keepEOL: false,
|
package/dist/replace.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { escape, SimpleMappingChars2String } from '@weapp-core/escape';
|
|
2
2
|
export { MappingChars2String, MappingChars2StringEntries, SYMBOL_TABLE, SimpleMappingChars2String, SimpleMappingChars2StringEntries } from '@weapp-core/escape';
|
|
3
3
|
import '@ast-core/escape';
|
|
4
|
-
export { i as replaceCss } from './shared-
|
|
4
|
+
export { i as replaceCss } from './shared-S0v7ZvWs.mjs';
|
|
5
5
|
|
|
6
6
|
function replaceWxml(original, options = {
|
|
7
7
|
keepEOL: false,
|
package/dist/types.d.ts
CHANGED
|
@@ -106,6 +106,7 @@ export interface UserDefinedOptions {
|
|
|
106
106
|
root?: string | false;
|
|
107
107
|
universal?: string | false;
|
|
108
108
|
};
|
|
109
|
+
tailwindcssBasedir?: string;
|
|
109
110
|
}
|
|
110
111
|
export type JsHandler = (rawSource: string, set: Set<string>, options?: CreateJsHandlerOptions) => JsHandlerResult;
|
|
111
112
|
export interface IMangleScopeContext {
|
|
@@ -137,7 +138,7 @@ export type InternalUserDefinedOptions = Required<Omit<UserDefinedOptions, GlobO
|
|
|
137
138
|
} & {
|
|
138
139
|
supportCustomLengthUnitsPatch: ILengthUnitsPatchOptions | false;
|
|
139
140
|
templateHandler: (rawSource: string, options?: ITemplateHandlerOptions) => string;
|
|
140
|
-
styleHandler: (rawSource: string, options: IStyleHandlerOptions) => string
|
|
141
|
+
styleHandler: (rawSource: string, options: IStyleHandlerOptions) => Promise<string>;
|
|
141
142
|
jsHandler: JsHandler;
|
|
142
143
|
escapeMap: Record<string, string>;
|
|
143
144
|
patch: () => void;
|