@weapp-tailwindcss/postcss 3.1.4 → 3.1.5
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/index.js +923 -1195
- package/dist/index.mjs +918 -1190
- package/dist/types.d.ts +33 -2
- package/package.json +6 -6
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { PostCssCalcOptions } from '@weapp-tailwindcss/postcss-calc';
|
|
2
2
|
import type { Result as PostcssResult } from 'postcss';
|
|
3
3
|
import type { Result } from 'postcss-load-config';
|
|
4
|
-
import type
|
|
4
|
+
import type pxtrans from 'postcss-pxtrans';
|
|
5
5
|
import type { UserDefinedOptions as Rem2rpxOptions } from 'postcss-rem-to-responsive-pixel';
|
|
6
6
|
import type { GlobalUnitTransform, UserDefinedOptions as UnitConverterOptions, UnitMap } from 'postcss-rule-unit-converter';
|
|
7
7
|
import type { WeappAutoprefixerOptions } from './autoprefixer';
|
|
@@ -14,6 +14,7 @@ export interface IPropValue {
|
|
|
14
14
|
prop: string;
|
|
15
15
|
value: string;
|
|
16
16
|
}
|
|
17
|
+
export type Px2rpxOptions = NonNullable<Parameters<typeof pxtrans>[0]>;
|
|
17
18
|
export type UniAppXCssTarget = 'uvue';
|
|
18
19
|
export type UniAppXUnsupportedMode = 'error' | 'warn' | 'silent';
|
|
19
20
|
export type CssPreflightOptions = {
|
|
@@ -63,17 +64,47 @@ export interface CssAtRules {
|
|
|
63
64
|
media?: boolean | undefined;
|
|
64
65
|
}
|
|
65
66
|
export type WebCssCompatPreset = 'off' | 'legacy-web';
|
|
67
|
+
/**
|
|
68
|
+
* Web 兼容降级的功能开关。
|
|
69
|
+
*/
|
|
66
70
|
export interface WebCssCompatFeatures {
|
|
71
|
+
/**
|
|
72
|
+
* 降级 Tailwind CSS v4 `@theme` 变量规则。
|
|
73
|
+
*/
|
|
67
74
|
theme?: boolean | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* 移除或展平 `@layer`,避免旧 WebView 对层叠层支持不足。
|
|
77
|
+
*/
|
|
68
78
|
layer?: boolean | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* 移除 `@property`,避免旧 WebView 解析失败。
|
|
81
|
+
*/
|
|
69
82
|
property?: boolean | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* 展开 CSS nesting 语法。
|
|
85
|
+
*/
|
|
70
86
|
nesting?: boolean | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* 为 `oklch()` 颜色补充兼容声明。
|
|
89
|
+
*/
|
|
71
90
|
oklch?: boolean | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* 为现代颜色函数补充兼容声明。
|
|
93
|
+
*/
|
|
72
94
|
colorFunctions?: boolean | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* 处理 Tailwind CSS v4 生成的 `@supports` 包裹。
|
|
97
|
+
*/
|
|
73
98
|
supports?: boolean | undefined;
|
|
74
99
|
}
|
|
75
100
|
export interface WebCssCompatOptions {
|
|
101
|
+
/**
|
|
102
|
+
* 兼容预设。`legacy-web` 面向旧 Android/iOS WebView,`off` 表示关闭降级。
|
|
103
|
+
*/
|
|
76
104
|
preset?: WebCssCompatPreset | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* 按功能覆盖预设中的降级开关。
|
|
107
|
+
*/
|
|
77
108
|
features?: WebCssCompatFeatures | undefined;
|
|
78
109
|
}
|
|
79
110
|
export type WebCssCompatUserOptions = boolean | WebCssCompatOptions;
|
|
@@ -213,7 +244,7 @@ export interface UserDefinedPostcssOptions {
|
|
|
213
244
|
uniAppXCssTarget?: UniAppXCssTarget | undefined;
|
|
214
245
|
uniAppXUnsupported?: UniAppXUnsupportedMode | undefined;
|
|
215
246
|
}
|
|
216
|
-
export type { CssCalcOptions, PresetEnvOptions,
|
|
247
|
+
export type { CssCalcOptions, PresetEnvOptions, Rem2rpxOptions, WeappAutoprefixerOptions, };
|
|
217
248
|
export interface StyleHandler {
|
|
218
249
|
(rawSource: string, opt?: Partial<IStyleHandlerOptions>): Promise<PostcssResult>;
|
|
219
250
|
getPipeline: (opt?: Partial<IStyleHandlerOptions>) => StyleProcessingPipeline;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weapp-tailwindcss/postcss",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.5",
|
|
4
4
|
"description": "@weapp-tailwindcss/postcss",
|
|
5
5
|
"author": "ice breaker <1324318532@qq.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -64,12 +64,12 @@
|
|
|
64
64
|
"node": "^20.19.0 || >=22.12.0"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@tailwindcss-mangle/engine": "0.1.
|
|
67
|
+
"@tailwindcss-mangle/engine": "0.1.2",
|
|
68
68
|
"@weapp-core/escape": "~8.0.0",
|
|
69
69
|
"autoprefixer": "^10.5.2",
|
|
70
70
|
"lru-cache": "11.5.1",
|
|
71
71
|
"micromatch": "^4.0.8",
|
|
72
|
-
"postcss": "^8.5.
|
|
72
|
+
"postcss": "^8.5.16",
|
|
73
73
|
"postcss-load-config": "^6.0.1",
|
|
74
74
|
"postcss-pxtrans": "^1.0.4",
|
|
75
75
|
"postcss-rem-to-responsive-pixel": "^7.0.4",
|
|
@@ -77,8 +77,8 @@
|
|
|
77
77
|
"postcss-selector-parser": "~7.1.4",
|
|
78
78
|
"postcss-value-parser": "^4.2.0",
|
|
79
79
|
"@weapp-tailwindcss/postcss-calc": "^1.0.2",
|
|
80
|
-
"tailwindcss
|
|
81
|
-
"
|
|
80
|
+
"@weapp-tailwindcss/shared": "2.0.0",
|
|
81
|
+
"tailwindcss-config": "2.0.1"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@csstools/css-color-parser": "^4.1.9",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"fast-check": "^4.8.0",
|
|
89
89
|
"postcss-calc": "link:packages/postcss-calc",
|
|
90
90
|
"postcss-custom-properties": "^15.0.1",
|
|
91
|
-
"postcss-preset-env": "^11.3.
|
|
91
|
+
"postcss-preset-env": "^11.3.2"
|
|
92
92
|
},
|
|
93
93
|
"scripts": {
|
|
94
94
|
"dev": "tsdown --watch --sourcemap",
|