weapp-tailwindcss 2.6.2 → 2.7.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 +3 -2
- package/dist/cli.js +10 -8
- package/dist/cli.mjs +10 -8
- package/dist/{defaults-c397b5f9.mjs → defaults-0743f523.mjs} +5 -7
- package/dist/{defaults-d79e9245.js → defaults-344ba6d9.js} +5 -8
- package/dist/defaults.js +2 -2
- package/dist/defaults.mjs +2 -2
- package/dist/escape.d.ts +1 -3
- package/dist/gulp.js +10 -8
- package/dist/gulp.mjs +10 -8
- package/dist/index.js +10 -8
- package/dist/index.mjs +10 -8
- package/dist/js/handlers.d.ts +5 -0
- package/dist/js/index.d.ts +6 -4
- package/dist/{options-244dcceb.mjs → options-5a3070c1.mjs} +165 -161
- package/dist/{options-c5e1d1b4.js → options-7a4ffa6a.js} +195 -190
- package/dist/{postcss-4c88cd6d.js → postcss-4e99a8e8.js} +1 -1
- package/dist/{postcss-99efb521.mjs → postcss-a551ddc0.mjs} +1 -1
- package/dist/postcss.js +3 -3
- package/dist/postcss.mjs +3 -3
- package/dist/reg.d.ts +1 -16
- 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 +9 -10
- package/dist/vite.js +10 -8
- package/dist/vite.mjs +10 -8
- package/dist/webpack.js +10 -8
- package/dist/webpack.mjs +10 -8
- package/package.json +37 -31
- 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
package/dist/shared-4eed0e5c.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var dic = require('./dic-05980807.js');
|
|
4
|
-
|
|
5
|
-
const MAX_ASCII_CHAR_CODE = 127;
|
|
6
|
-
function isAsciiNumber(code) {
|
|
7
|
-
return code >= 48 && code <= 57;
|
|
8
|
-
}
|
|
9
|
-
function escape(selectors, options = {
|
|
10
|
-
map: dic.SimpleMappingChars2String
|
|
11
|
-
}) {
|
|
12
|
-
const { map = dic.SimpleMappingChars2String } = options;
|
|
13
|
-
const sb = [...selectors];
|
|
14
|
-
for (let i = 0; i < sb.length; i++) {
|
|
15
|
-
const char = sb[i];
|
|
16
|
-
const code = char.codePointAt(0);
|
|
17
|
-
const isCodeExisted = code !== undefined;
|
|
18
|
-
const hit = map[char];
|
|
19
|
-
if (isCodeExisted) {
|
|
20
|
-
if (code > MAX_ASCII_CHAR_CODE) {
|
|
21
|
-
sb[i] = 'u' + Number(code).toString(16);
|
|
22
|
-
}
|
|
23
|
-
else if (hit) {
|
|
24
|
-
sb[i] = hit;
|
|
25
|
-
}
|
|
26
|
-
else if (i === 0) {
|
|
27
|
-
if (isAsciiNumber(code)) {
|
|
28
|
-
sb[i] = '_' + char;
|
|
29
|
-
}
|
|
30
|
-
else if (char === '-') {
|
|
31
|
-
const nextChar = sb[i + 1];
|
|
32
|
-
if (nextChar) {
|
|
33
|
-
const nextCharCode = nextChar.codePointAt(0);
|
|
34
|
-
if (nextCharCode && isAsciiNumber(nextCharCode)) {
|
|
35
|
-
sb[i] = '_' + char;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
else if (nextChar === undefined) {
|
|
39
|
-
sb[i] = '_' + char;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
const res = sb.join('');
|
|
46
|
-
return res;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function internalCssSelectorReplacer(selectors, options = {
|
|
50
|
-
escapeMap: dic.SimpleMappingChars2String
|
|
51
|
-
}) {
|
|
52
|
-
const { mangleContext, escapeMap } = options;
|
|
53
|
-
if (mangleContext) {
|
|
54
|
-
selectors = mangleContext.cssHandler(selectors);
|
|
55
|
-
}
|
|
56
|
-
return escape(selectors, {
|
|
57
|
-
map: escapeMap
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
exports.escape = escape;
|
|
62
|
-
exports.internalCssSelectorReplacer = internalCssSelectorReplacer;
|
package/dist/shared-686bfc32.mjs
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { S as SimpleMappingChars2String } from './dic-3790a3a4.mjs';
|
|
2
|
-
|
|
3
|
-
const MAX_ASCII_CHAR_CODE = 127;
|
|
4
|
-
function isAsciiNumber(code) {
|
|
5
|
-
return code >= 48 && code <= 57;
|
|
6
|
-
}
|
|
7
|
-
function escape(selectors, options = {
|
|
8
|
-
map: SimpleMappingChars2String
|
|
9
|
-
}) {
|
|
10
|
-
const { map = SimpleMappingChars2String } = options;
|
|
11
|
-
const sb = [...selectors];
|
|
12
|
-
for (let i = 0; i < sb.length; i++) {
|
|
13
|
-
const char = sb[i];
|
|
14
|
-
const code = char.codePointAt(0);
|
|
15
|
-
const isCodeExisted = code !== undefined;
|
|
16
|
-
const hit = map[char];
|
|
17
|
-
if (isCodeExisted) {
|
|
18
|
-
if (code > MAX_ASCII_CHAR_CODE) {
|
|
19
|
-
sb[i] = 'u' + Number(code).toString(16);
|
|
20
|
-
}
|
|
21
|
-
else if (hit) {
|
|
22
|
-
sb[i] = hit;
|
|
23
|
-
}
|
|
24
|
-
else if (i === 0) {
|
|
25
|
-
if (isAsciiNumber(code)) {
|
|
26
|
-
sb[i] = '_' + char;
|
|
27
|
-
}
|
|
28
|
-
else if (char === '-') {
|
|
29
|
-
const nextChar = sb[i + 1];
|
|
30
|
-
if (nextChar) {
|
|
31
|
-
const nextCharCode = nextChar.codePointAt(0);
|
|
32
|
-
if (nextCharCode && isAsciiNumber(nextCharCode)) {
|
|
33
|
-
sb[i] = '_' + char;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
else if (nextChar === undefined) {
|
|
37
|
-
sb[i] = '_' + char;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
const res = sb.join('');
|
|
44
|
-
return res;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function internalCssSelectorReplacer(selectors, options = {
|
|
48
|
-
escapeMap: SimpleMappingChars2String
|
|
49
|
-
}) {
|
|
50
|
-
const { mangleContext, escapeMap } = options;
|
|
51
|
-
if (mangleContext) {
|
|
52
|
-
selectors = mangleContext.cssHandler(selectors);
|
|
53
|
-
}
|
|
54
|
-
return escape(selectors, {
|
|
55
|
-
map: escapeMap
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export { escape as e, internalCssSelectorReplacer as i };
|