@weapp-tailwindcss/postcss 3.1.5 → 3.1.7
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/branches/index.d.ts +1 -0
- package/dist/branches/mini-program/index.d.ts +3 -0
- package/dist/branches/style.d.ts +11 -0
- package/dist/branches/uni-app-x-css-uvue/index.d.ts +3 -0
- package/dist/branches/uni-app-x-css-webview/index.d.ts +3 -0
- package/dist/branches/web/index.d.ts +3 -0
- 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/frameworks/generic/index.d.ts +1 -0
- package/dist/frameworks/index.d.ts +5 -0
- package/dist/frameworks/kbone/index.d.ts +1 -0
- package/dist/frameworks/mpx/index.d.ts +1 -0
- package/dist/frameworks/native/index.d.ts +1 -0
- package/dist/frameworks/remax/index.d.ts +1 -0
- package/dist/frameworks/shared.d.ts +5 -0
- package/dist/frameworks/taro/index.d.ts +1 -0
- package/dist/frameworks/types.d.ts +18 -0
- package/dist/frameworks/uni-app/index.d.ts +1 -0
- package/dist/frameworks/uni-app-vite/index.d.ts +1 -0
- package/dist/frameworks/uni-app-x/index.d.ts +2 -0
- package/dist/frameworks/weapp-vite/index.d.ts +1 -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 +4 -1
- package/dist/index.js +48544 -48152
- package/dist/index.mjs +48535 -48149
- package/dist/pipeline.d.ts +4 -0
- package/dist/selectorParser/utils.d.ts +1 -1
- package/dist/style-targets/index.d.ts +1 -0
- package/dist/style-targets/style.d.ts +8 -0
- package/dist/types.d.ts +11 -1
- package/package.json +1 -1
package/dist/pipeline.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AcceptedPlugin } from 'postcss';
|
|
2
2
|
import type { FeatureSignal } from './content-probe';
|
|
3
3
|
import type { IStyleHandlerOptions } from './types';
|
|
4
|
+
import { resolvePostcssFrameworkProfile } from './frameworks';
|
|
4
5
|
export type PipelineStage = 'pre' | 'normal' | 'post';
|
|
5
6
|
export interface PipelineNodeCursor {
|
|
6
7
|
id: string;
|
|
@@ -38,6 +39,9 @@ export interface ResolvedPipelineNode extends PipelineNodeCursor {
|
|
|
38
39
|
context: PipelineNodeContext;
|
|
39
40
|
}
|
|
40
41
|
export interface StyleProcessingPipeline {
|
|
42
|
+
framework: ReturnType<typeof resolvePostcssFrameworkProfile>['framework'];
|
|
43
|
+
target: ReturnType<typeof resolvePostcssFrameworkProfile>['target'];
|
|
44
|
+
branch: ReturnType<typeof resolvePostcssFrameworkProfile>['branch'];
|
|
41
45
|
nodes: ResolvedPipelineNode[];
|
|
42
46
|
plugins: AcceptedPlugin[];
|
|
43
47
|
}
|
|
@@ -8,4 +8,4 @@ export type ParserTransformOptions = Partial<{
|
|
|
8
8
|
export declare function normalizeTransformOptions(options?: ParserTransformOptions): ParserTransformOptions;
|
|
9
9
|
export declare function mklist(node: Node): Node[];
|
|
10
10
|
export declare function composeIsPseudoAst(strs: string | string[]): Node[];
|
|
11
|
-
export declare function getCombinatorSelectorAst(options: IStyleHandlerOptions): (psp.Pseudo | psp.Selector | psp.String | psp.
|
|
11
|
+
export declare function getCombinatorSelectorAst(options: IStyleHandlerOptions): (psp.Pseudo | psp.Selector | psp.String | psp.Tag | psp.Root | psp.Nesting | psp.Identifier | psp.Comment | psp.Combinator | psp.ClassName | psp.Attribute | psp.Universal)[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createPostcssStyleTargetProfile, type PostcssStyleTarget, type PostcssStyleTargetProfile, } from './style';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Result } from 'postcss';
|
|
2
|
+
import type { IStyleHandlerOptions } from '../types';
|
|
3
|
+
export type PostcssStyleTarget = 'generic' | 'mini-program' | 'uni-app-x-css-uvue' | 'uni-app-x-css-webview' | 'web';
|
|
4
|
+
export interface PostcssStyleTargetProfile {
|
|
5
|
+
target: PostcssStyleTarget;
|
|
6
|
+
postprocess: (result: Result, options: IStyleHandlerOptions) => Result;
|
|
7
|
+
}
|
|
8
|
+
export declare function createPostcssStyleTargetProfile(target: PostcssStyleTarget): PostcssStyleTargetProfile;
|
package/dist/types.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ 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';
|
|
8
|
+
import type { PostcssAppType } from './branches';
|
|
8
9
|
import type { StyleProcessingPipeline } from './pipeline';
|
|
9
10
|
import type { IContext as PostcssContext } from './plugins/ctx';
|
|
10
11
|
import type { InjectPreflight } from './preflight';
|
|
@@ -63,6 +64,12 @@ export interface CssAtRules {
|
|
|
63
64
|
supports?: boolean | undefined;
|
|
64
65
|
media?: boolean | undefined;
|
|
65
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* Web 兼容预设。
|
|
69
|
+
*
|
|
70
|
+
* `legacy-web` 面向 Web Compact 输出,兼容基线为 Chrome/91.0.4472.114 与
|
|
71
|
+
* AppleWebKit/537.36;`off` 表示关闭降级。
|
|
72
|
+
*/
|
|
66
73
|
export type WebCssCompatPreset = 'off' | 'legacy-web';
|
|
67
74
|
/**
|
|
68
75
|
* Web 兼容降级的功能开关。
|
|
@@ -99,7 +106,7 @@ export interface WebCssCompatFeatures {
|
|
|
99
106
|
}
|
|
100
107
|
export interface WebCssCompatOptions {
|
|
101
108
|
/**
|
|
102
|
-
* 兼容预设。`legacy-web`
|
|
109
|
+
* 兼容预设。`legacy-web` 面向 Chrome 91 / AppleWebKit 537.36 WebView 基线,`off` 表示关闭降级。
|
|
103
110
|
*/
|
|
104
111
|
preset?: WebCssCompatPreset | undefined;
|
|
105
112
|
/**
|
|
@@ -131,6 +138,7 @@ export interface CssOptions {
|
|
|
131
138
|
tailwindcssV4GradientFallback?: boolean | undefined;
|
|
132
139
|
}
|
|
133
140
|
export type IStyleHandlerOptions = {
|
|
141
|
+
appType?: PostcssAppType | undefined;
|
|
134
142
|
ctx?: PostcssContext | undefined;
|
|
135
143
|
/**
|
|
136
144
|
* @deprecated 请使用 `cssOptions.platform`。
|
|
@@ -167,6 +175,7 @@ export type IStyleHandlerOptions = {
|
|
|
167
175
|
*/
|
|
168
176
|
cssCalc?: boolean | CssCalcOptions | (string | RegExp)[] | undefined;
|
|
169
177
|
uniAppX?: boolean | undefined;
|
|
178
|
+
/** uni-app x 的 CSS 输出目标;`uvue` 表示原生 uvue/nvue 样式链路,未设置时按 WebView CSS 处理。 */
|
|
170
179
|
uniAppXCssTarget?: UniAppXCssTarget | undefined;
|
|
171
180
|
uniAppXUnsupported?: UniAppXUnsupportedMode | undefined;
|
|
172
181
|
majorVersion?: 4 | undefined;
|
|
@@ -241,6 +250,7 @@ export interface UserDefinedPostcssOptions {
|
|
|
241
250
|
*/
|
|
242
251
|
tailwindcssV4GradientFallback?: boolean | undefined;
|
|
243
252
|
uniAppX?: boolean | undefined;
|
|
253
|
+
/** uni-app x 的 CSS 输出目标;`uvue` 表示原生 uvue/nvue 样式链路,未设置时按 WebView CSS 处理。 */
|
|
244
254
|
uniAppXCssTarget?: UniAppXCssTarget | undefined;
|
|
245
255
|
uniAppXUnsupported?: UniAppXUnsupportedMode | undefined;
|
|
246
256
|
}
|