weapp-tailwindcss 5.0.0-next.24 → 5.0.0-next.26
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/auto-CqyEtds4.js +115 -0
- package/dist/auto-CsWz6lsU.mjs +78 -0
- package/dist/{bundle-state-CP_BWXfx.mjs → bundle-state-CWcrb3mH.mjs} +1 -2
- package/dist/{bundle-state-DXFq2nEo.js → bundle-state-uCtqRm0p.js} +2 -3
- package/dist/bundlers/vite/serve-css-generation.d.ts +11 -0
- package/dist/cli.js +167 -6
- package/dist/cli.mjs +166 -5
- package/dist/context/runtime-package-replacements.d.ts +2 -0
- package/dist/context/style-options.d.ts +3 -0
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/css-macro/auto.d.ts +10 -0
- package/dist/css-macro/constants.d.ts +5 -2
- package/dist/css-macro/postcss.d.ts +1 -0
- package/dist/css-macro/postcss.js +7 -47
- package/dist/css-macro/postcss.mjs +2 -47
- package/dist/css-macro.js +15 -6
- package/dist/css-macro.mjs +15 -6
- package/dist/{defaults-C6sIKXgC.mjs → defaults-B-1EEhdL.mjs} +2 -1
- package/dist/{defaults-D3cFX6Cq.js → defaults-C10hYUch.js} +2 -1
- package/dist/defaults.js +1 -1
- package/dist/defaults.mjs +1 -1
- package/dist/{generator-BcH28HU-.js → generator-BH6a0xuB.js} +1 -1
- package/dist/{generator-DdEgn8nG.mjs → generator-iI_265gt.mjs} +1 -1
- package/dist/generator.js +2 -2
- package/dist/generator.mjs +2 -2
- package/dist/gulp.js +5 -5
- package/dist/gulp.mjs +5 -5
- package/dist/{incremental-runtime-class-set-Bux7viee.mjs → incremental-runtime-class-set-ECHyKwUL.mjs} +4 -16
- package/dist/{incremental-runtime-class-set-CWdfLHON.js → incremental-runtime-class-set-mY0v1k-Y.js} +4 -16
- package/dist/index.d.ts +1 -0
- package/dist/index.js +18 -4
- package/dist/index.mjs +6 -5
- package/dist/postcss-BwW8zO24.js +192 -0
- package/dist/postcss-BzaRjBL0.mjs +169 -0
- package/dist/{postcss-cD5PXmMU.js → postcss-DEEAZ8J5.js} +2 -2
- package/dist/{postcss-nk5bhdoV.mjs → postcss-DJoU--Z-.mjs} +2 -2
- package/dist/postcss.js +1 -1
- package/dist/postcss.mjs +1 -1
- package/dist/precheck-BI8oBeUg.mjs +4692 -0
- package/dist/{precheck-DtYqujIx.js → precheck-DLJg0_pu.js} +2070 -34
- package/dist/presets/index.d.ts +1 -0
- package/dist/presets/uni-app-x.d.ts +1 -0
- package/dist/presets.js +19 -5
- package/dist/presets.mjs +18 -6
- package/dist/{source-candidates-B7wmEa-G.mjs → source-candidates-DkScNh9A.mjs} +1 -1
- package/dist/{source-candidates-lHtAHLQq.js → source-candidates-mfvC9gMc.js} +1 -1
- package/dist/{tailwindcss-BtUBeOes.js → tailwindcss-Cm93idme.js} +17 -26
- package/dist/{tailwindcss-DO-VVR5k.mjs → tailwindcss-DFa5Yes8.mjs} +17 -26
- package/dist/types/index.d.ts +1 -1
- package/dist/types/shared.d.ts +3 -0
- package/dist/types/user-defined-options/general.d.ts +2 -1
- package/dist/types/user-defined-options/important.d.ts +3 -1
- package/dist/unocss/index.d.ts +2 -0
- package/dist/utils/options.d.ts +2 -0
- package/dist/utils/regex.d.ts +1 -0
- package/dist/{v3-engine-vHlppqaZ.js → v3-engine-CGsbY81C.js} +67 -19
- package/dist/{v3-engine-CXqgQZUc.mjs → v3-engine-CPJ9uGyr.mjs} +56 -20
- package/dist/{vite-BkNDGBZ2.js → vite-BM_ksf1q.js} +140 -21
- package/dist/{vite-BthAm8kt.mjs → vite-CqEF-Wx5.mjs} +140 -21
- package/dist/vite.js +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/weapp-tw-css-import-rewrite-loader.js +327 -73
- package/dist/weapp-tw-runtime-classset-loader.js +1 -4
- package/dist/{webpack-prCus5xn.js → webpack-CfcuDhQ8.js} +10 -7
- package/dist/{webpack-hPc8wUAi.mjs → webpack-D--XZMBB.mjs} +11 -8
- package/dist/webpack.js +1 -1
- package/dist/webpack.mjs +1 -1
- package/package.json +14 -14
- package/dist/constants-BG12WAKw.mjs +0 -44
- package/dist/constants-BeeyfJ9k.js +0 -73
- package/dist/precheck-DreRGvYH.mjs +0 -2668
- /package/dist/{logger-EVNB9z7i.js → logger-Cdzl3p8j.js} +0 -0
- /package/dist/{logger-CZUxvJJD.mjs → logger-Dr7IvyH2.mjs} +0 -0
- /package/dist/{utils-CGBVVNm6.mjs → utils-B2SJgA1L.mjs} +0 -0
- /package/dist/{utils-4ODFyoqD.js → utils-CSA174-I.js} +0 -0
package/dist/webpack.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as weappTailwindcssPackageDir, t as UnifiedWebpackPluginV5 } from "./webpack-
|
|
1
|
+
import { n as weappTailwindcssPackageDir, t as UnifiedWebpackPluginV5 } from "./webpack-D--XZMBB.mjs";
|
|
2
2
|
export { UnifiedWebpackPluginV5, UnifiedWebpackPluginV5 as WeappTailwindcss, UnifiedWebpackPluginV5 as weappTailwindcss, weappTailwindcssPackageDir };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weapp-tailwindcss",
|
|
3
|
-
"version": "5.0.0-next.
|
|
3
|
+
"version": "5.0.0-next.26",
|
|
4
4
|
"description": "把 tailwindcss 原子化样式思想,带给小程序开发者们! bring tailwindcss to miniprogram developers!",
|
|
5
5
|
"author": "ice breaker <1324318532@qq.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -172,28 +172,28 @@
|
|
|
172
172
|
"@babel/parser": "~7.29.7",
|
|
173
173
|
"@babel/traverse": "~7.29.7",
|
|
174
174
|
"@babel/types": "~7.29.7",
|
|
175
|
-
"@vue/compiler-dom": "^3.5.
|
|
176
|
-
"@vue/compiler-sfc": "^3.5.
|
|
177
|
-
"@weapp-core/escape": "~
|
|
178
|
-
"
|
|
179
|
-
"comment-json": "^4.6.2",
|
|
175
|
+
"@vue/compiler-dom": "^3.5.35",
|
|
176
|
+
"@vue/compiler-sfc": "^3.5.35",
|
|
177
|
+
"@weapp-core/escape": "~8.0.0",
|
|
178
|
+
"comment-json": "^5.0.0",
|
|
180
179
|
"debug": "~4.4.3",
|
|
181
180
|
"fast-glob": "^3.3.3",
|
|
182
|
-
"htmlparser2": "10.1.0",
|
|
183
|
-
"loader-utils": "2.0.4",
|
|
184
181
|
"local-pkg": "^1.2.1",
|
|
185
|
-
"lru-cache": "
|
|
182
|
+
"lru-cache": "11.5.0",
|
|
186
183
|
"magic-string": "0.30.21",
|
|
187
184
|
"micromatch": "^4.0.8",
|
|
188
185
|
"postcss-load-config": "^6.0.1",
|
|
189
186
|
"semver": "~7.8.1",
|
|
190
187
|
"tailwindcss-patch": "9.3.7",
|
|
191
188
|
"yaml": "^2.9.0",
|
|
192
|
-
"@weapp-tailwindcss/
|
|
193
|
-
"@weapp-tailwindcss/
|
|
194
|
-
"@weapp-tailwindcss/
|
|
195
|
-
"@weapp-tailwindcss/shared": "
|
|
196
|
-
"tailwindcss-config": "
|
|
189
|
+
"@weapp-tailwindcss/postcss": "3.0.0-next.8",
|
|
190
|
+
"@weapp-tailwindcss/reset": "0.1.1-next.1",
|
|
191
|
+
"@weapp-tailwindcss/logger": "2.0.0-next.0",
|
|
192
|
+
"@weapp-tailwindcss/shared": "2.0.0-next.0",
|
|
193
|
+
"tailwindcss-config": "2.0.0-next.2"
|
|
194
|
+
},
|
|
195
|
+
"devDependencies": {
|
|
196
|
+
"htmlparser2": "12.0.0"
|
|
197
197
|
},
|
|
198
198
|
"scripts": {
|
|
199
199
|
"dev": "tsdown --watch --sourcemap",
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
//#region src/css-macro/constants.ts
|
|
2
|
-
const queryKey = "weapp-tw-platform";
|
|
3
|
-
function createMediaQuery(value) {
|
|
4
|
-
return `@media (${queryKey}:"${value}"){&}`;
|
|
5
|
-
}
|
|
6
|
-
function createNegativeMediaQuery(value) {
|
|
7
|
-
return `@media not screen and (${queryKey}:"${value}"){&}`;
|
|
8
|
-
}
|
|
9
|
-
const UNESCAPED_UNDERSCORE_RE = /(?<!\\)_/g;
|
|
10
|
-
const WHITESPACE_RE = /\s+/g;
|
|
11
|
-
const LOGICAL_OPERATOR_RE = /\s*(\|\||&&)\s*/g;
|
|
12
|
-
function normalComment(text) {
|
|
13
|
-
if (typeof text === "string") {
|
|
14
|
-
const normalized = text.replaceAll(UNESCAPED_UNDERSCORE_RE, " ").replaceAll(WHITESPACE_RE, " ").trim();
|
|
15
|
-
if (normalized.includes("\\")) return normalized;
|
|
16
|
-
return normalized.replaceAll(LOGICAL_OPERATOR_RE, " $1 ").replaceAll(WHITESPACE_RE, " ").trim();
|
|
17
|
-
}
|
|
18
|
-
return text;
|
|
19
|
-
}
|
|
20
|
-
function ifdef(text) {
|
|
21
|
-
return {
|
|
22
|
-
start: `#ifdef ${normalComment(text)}`,
|
|
23
|
-
end: `#endif`
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
function ifndef(text) {
|
|
27
|
-
return {
|
|
28
|
-
start: `#ifndef ${normalComment(text)}`,
|
|
29
|
-
end: `#endif`
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
const QUERY_KEY_REGEX = new RegExp(`\\(\\s*${queryKey}\\s*:\\s*"([^)]*)"\\)`, "g");
|
|
33
|
-
function matchCustomPropertyFromValue(str, cb) {
|
|
34
|
-
let index = 0;
|
|
35
|
-
QUERY_KEY_REGEX.lastIndex = 0;
|
|
36
|
-
let arr = QUERY_KEY_REGEX.exec(str);
|
|
37
|
-
while (arr !== null) {
|
|
38
|
-
cb(arr, index);
|
|
39
|
-
index++;
|
|
40
|
-
arr = QUERY_KEY_REGEX.exec(str);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
//#endregion
|
|
44
|
-
export { matchCustomPropertyFromValue as a, ifndef as i, createNegativeMediaQuery as n, ifdef as r, createMediaQuery as t };
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
//#region src/css-macro/constants.ts
|
|
2
|
-
const queryKey = "weapp-tw-platform";
|
|
3
|
-
function createMediaQuery(value) {
|
|
4
|
-
return `@media (${queryKey}:"${value}"){&}`;
|
|
5
|
-
}
|
|
6
|
-
function createNegativeMediaQuery(value) {
|
|
7
|
-
return `@media not screen and (${queryKey}:"${value}"){&}`;
|
|
8
|
-
}
|
|
9
|
-
const UNESCAPED_UNDERSCORE_RE = /(?<!\\)_/g;
|
|
10
|
-
const WHITESPACE_RE = /\s+/g;
|
|
11
|
-
const LOGICAL_OPERATOR_RE = /\s*(\|\||&&)\s*/g;
|
|
12
|
-
function normalComment(text) {
|
|
13
|
-
if (typeof text === "string") {
|
|
14
|
-
const normalized = text.replaceAll(UNESCAPED_UNDERSCORE_RE, " ").replaceAll(WHITESPACE_RE, " ").trim();
|
|
15
|
-
if (normalized.includes("\\")) return normalized;
|
|
16
|
-
return normalized.replaceAll(LOGICAL_OPERATOR_RE, " $1 ").replaceAll(WHITESPACE_RE, " ").trim();
|
|
17
|
-
}
|
|
18
|
-
return text;
|
|
19
|
-
}
|
|
20
|
-
function ifdef(text) {
|
|
21
|
-
return {
|
|
22
|
-
start: `#ifdef ${normalComment(text)}`,
|
|
23
|
-
end: `#endif`
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
function ifndef(text) {
|
|
27
|
-
return {
|
|
28
|
-
start: `#ifndef ${normalComment(text)}`,
|
|
29
|
-
end: `#endif`
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
const QUERY_KEY_REGEX = new RegExp(`\\(\\s*${queryKey}\\s*:\\s*"([^)]*)"\\)`, "g");
|
|
33
|
-
function matchCustomPropertyFromValue(str, cb) {
|
|
34
|
-
let index = 0;
|
|
35
|
-
QUERY_KEY_REGEX.lastIndex = 0;
|
|
36
|
-
let arr = QUERY_KEY_REGEX.exec(str);
|
|
37
|
-
while (arr !== null) {
|
|
38
|
-
cb(arr, index);
|
|
39
|
-
index++;
|
|
40
|
-
arr = QUERY_KEY_REGEX.exec(str);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
//#endregion
|
|
44
|
-
Object.defineProperty(exports, "createMediaQuery", {
|
|
45
|
-
enumerable: true,
|
|
46
|
-
get: function() {
|
|
47
|
-
return createMediaQuery;
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
Object.defineProperty(exports, "createNegativeMediaQuery", {
|
|
51
|
-
enumerable: true,
|
|
52
|
-
get: function() {
|
|
53
|
-
return createNegativeMediaQuery;
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
Object.defineProperty(exports, "ifdef", {
|
|
57
|
-
enumerable: true,
|
|
58
|
-
get: function() {
|
|
59
|
-
return ifdef;
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
Object.defineProperty(exports, "ifndef", {
|
|
63
|
-
enumerable: true,
|
|
64
|
-
get: function() {
|
|
65
|
-
return ifndef;
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
Object.defineProperty(exports, "matchCustomPropertyFromValue", {
|
|
69
|
-
enumerable: true,
|
|
70
|
-
get: function() {
|
|
71
|
-
return matchCustomPropertyFromValue;
|
|
72
|
-
}
|
|
73
|
-
});
|