@weapp-tailwindcss/postcss 3.1.4 → 3.1.6
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/compat/color-mix/constants.d.ts +1 -0
- package/dist/compat/color-mix/modern.d.ts +1 -0
- package/dist/compat/tailwindcss-v4.d.ts +2 -0
- package/dist/compat/web-css.d.ts +3 -0
- package/dist/generator-plugin/local-imports.d.ts +4 -1
- package/dist/generator-plugin/types.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1114 -1242
- package/dist/index.mjs +1109 -1238
- package/dist/types.d.ts +39 -2
- package/package.json +5 -5
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 = {
|
|
@@ -62,18 +63,54 @@ export interface CssAtRules {
|
|
|
62
63
|
supports?: boolean | undefined;
|
|
63
64
|
media?: boolean | undefined;
|
|
64
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Web 兼容预设。
|
|
68
|
+
*
|
|
69
|
+
* `legacy-web` 面向 Web Compact 输出,兼容基线为 Chrome/91.0.4472.114 与
|
|
70
|
+
* AppleWebKit/537.36;`off` 表示关闭降级。
|
|
71
|
+
*/
|
|
65
72
|
export type WebCssCompatPreset = 'off' | 'legacy-web';
|
|
73
|
+
/**
|
|
74
|
+
* Web 兼容降级的功能开关。
|
|
75
|
+
*/
|
|
66
76
|
export interface WebCssCompatFeatures {
|
|
77
|
+
/**
|
|
78
|
+
* 降级 Tailwind CSS v4 `@theme` 变量规则。
|
|
79
|
+
*/
|
|
67
80
|
theme?: boolean | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* 移除或展平 `@layer`,避免旧 WebView 对层叠层支持不足。
|
|
83
|
+
*/
|
|
68
84
|
layer?: boolean | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* 移除 `@property`,避免旧 WebView 解析失败。
|
|
87
|
+
*/
|
|
69
88
|
property?: boolean | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* 展开 CSS nesting 语法。
|
|
91
|
+
*/
|
|
70
92
|
nesting?: boolean | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* 为 `oklch()` 颜色补充兼容声明。
|
|
95
|
+
*/
|
|
71
96
|
oklch?: boolean | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* 为现代颜色函数补充兼容声明。
|
|
99
|
+
*/
|
|
72
100
|
colorFunctions?: boolean | undefined;
|
|
101
|
+
/**
|
|
102
|
+
* 处理 Tailwind CSS v4 生成的 `@supports` 包裹。
|
|
103
|
+
*/
|
|
73
104
|
supports?: boolean | undefined;
|
|
74
105
|
}
|
|
75
106
|
export interface WebCssCompatOptions {
|
|
107
|
+
/**
|
|
108
|
+
* 兼容预设。`legacy-web` 面向 Chrome 91 / AppleWebKit 537.36 WebView 基线,`off` 表示关闭降级。
|
|
109
|
+
*/
|
|
76
110
|
preset?: WebCssCompatPreset | undefined;
|
|
111
|
+
/**
|
|
112
|
+
* 按功能覆盖预设中的降级开关。
|
|
113
|
+
*/
|
|
77
114
|
features?: WebCssCompatFeatures | undefined;
|
|
78
115
|
}
|
|
79
116
|
export type WebCssCompatUserOptions = boolean | WebCssCompatOptions;
|
|
@@ -213,7 +250,7 @@ export interface UserDefinedPostcssOptions {
|
|
|
213
250
|
uniAppXCssTarget?: UniAppXCssTarget | undefined;
|
|
214
251
|
uniAppXUnsupported?: UniAppXUnsupportedMode | undefined;
|
|
215
252
|
}
|
|
216
|
-
export type { CssCalcOptions, PresetEnvOptions,
|
|
253
|
+
export type { CssCalcOptions, PresetEnvOptions, Rem2rpxOptions, WeappAutoprefixerOptions, };
|
|
217
254
|
export interface StyleHandler {
|
|
218
255
|
(rawSource: string, opt?: Partial<IStyleHandlerOptions>): Promise<PostcssResult>;
|
|
219
256
|
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.6",
|
|
4
4
|
"description": "@weapp-tailwindcss/postcss",
|
|
5
5
|
"author": "ice breaker <1324318532@qq.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -64,20 +64,20 @@
|
|
|
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",
|
|
76
76
|
"postcss-rule-unit-converter": "^0.2.2",
|
|
77
77
|
"postcss-selector-parser": "~7.1.4",
|
|
78
78
|
"postcss-value-parser": "^4.2.0",
|
|
79
|
-
"@weapp-tailwindcss/postcss-calc": "^1.0.2",
|
|
80
79
|
"tailwindcss-config": "2.0.1",
|
|
80
|
+
"@weapp-tailwindcss/postcss-calc": "^1.0.2",
|
|
81
81
|
"@weapp-tailwindcss/shared": "2.0.0"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
@@ -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",
|