@weapp-tailwindcss/postcss 1.3.4 → 2.0.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/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +589 -180
- package/dist/index.mjs +572 -163
- package/dist/{types-BuslrX7I.d.mts → types-SytH0h-o.d.mts} +49 -2
- package/dist/{types-BuslrX7I.d.ts → types-SytH0h-o.d.ts} +49 -2
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,52 @@
|
|
|
1
1
|
import { PostCssCalcOptions } from '@weapp-tailwindcss/postcss-calc';
|
|
2
|
-
import { Rule } from 'postcss';
|
|
2
|
+
import { AcceptedPlugin, Rule, Result as Result$1 } from 'postcss';
|
|
3
3
|
import { Result } from 'postcss-load-config';
|
|
4
4
|
import { pluginOptions } from 'postcss-preset-env';
|
|
5
5
|
import { PxtransformOptions } from 'postcss-pxtransform';
|
|
6
6
|
import { UserDefinedOptions } from 'postcss-rem-to-responsive-pixel';
|
|
7
7
|
|
|
8
|
+
type PipelineStage = 'pre' | 'normal' | 'post';
|
|
9
|
+
interface PipelineNodeCursor {
|
|
10
|
+
id: string;
|
|
11
|
+
stage: PipelineStage;
|
|
12
|
+
}
|
|
13
|
+
interface PipelineNodeContext {
|
|
14
|
+
stage: PipelineStage;
|
|
15
|
+
/**
|
|
16
|
+
* 整个流水线内的顺序索引(从 0 开始)
|
|
17
|
+
*/
|
|
18
|
+
index: number;
|
|
19
|
+
/**
|
|
20
|
+
* 当前流水线包含的节点总数
|
|
21
|
+
*/
|
|
22
|
+
size: number;
|
|
23
|
+
/**
|
|
24
|
+
* 所在阶段内的顺序索引(从 0 开始)
|
|
25
|
+
*/
|
|
26
|
+
stageIndex: number;
|
|
27
|
+
/**
|
|
28
|
+
* 所在阶段的节点数量
|
|
29
|
+
*/
|
|
30
|
+
stageSize: number;
|
|
31
|
+
/**
|
|
32
|
+
* 指向前一个节点的游标(若存在)
|
|
33
|
+
*/
|
|
34
|
+
previous?: PipelineNodeCursor;
|
|
35
|
+
/**
|
|
36
|
+
* 指向后一个节点的游标(若存在)
|
|
37
|
+
*/
|
|
38
|
+
next?: PipelineNodeCursor;
|
|
39
|
+
}
|
|
40
|
+
interface ResolvedPipelineNode extends PipelineNodeCursor {
|
|
41
|
+
plugin: AcceptedPlugin;
|
|
42
|
+
context: PipelineNodeContext;
|
|
43
|
+
}
|
|
44
|
+
interface StyleProcessingPipeline {
|
|
45
|
+
nodes: ResolvedPipelineNode[];
|
|
46
|
+
plugins: AcceptedPlugin[];
|
|
47
|
+
}
|
|
48
|
+
declare function createStylePipeline(options: IStyleHandlerOptions): StyleProcessingPipeline;
|
|
49
|
+
|
|
8
50
|
declare function createContext(): {
|
|
9
51
|
variablesScopeWeakMap: WeakMap<WeakKey, any>;
|
|
10
52
|
isVariablesScope: (rule: WeakKey) => boolean;
|
|
@@ -74,4 +116,9 @@ interface UserDefinedPostcssOptions {
|
|
|
74
116
|
uniAppX?: boolean;
|
|
75
117
|
}
|
|
76
118
|
|
|
77
|
-
|
|
119
|
+
interface StyleHandler {
|
|
120
|
+
(rawSource: string, opt?: Partial<IStyleHandlerOptions>): Promise<Result$1>;
|
|
121
|
+
getPipeline: (opt?: Partial<IStyleHandlerOptions>) => StyleProcessingPipeline;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export { type CssCalcOptions as C, type IStyleHandlerOptions as I, type LoadedPostcssOptions as L, type PipelineNodeContext as P, type ResolvedPipelineNode as R, type StyleHandler as S, type UserDefinedPostcssOptions as U, type InternalCssSelectorReplacerOptions as a, type PipelineNodeCursor as b, createStylePipeline as c, type PipelineStage as d, type StyleProcessingPipeline as e, createInjectPreflight as f, type CustomRuleCallback as g, type IPropValue as h, type CssPreflightOptions as i, type RequiredStyleHandlerOptions as j };
|
|
@@ -1,10 +1,52 @@
|
|
|
1
1
|
import { PostCssCalcOptions } from '@weapp-tailwindcss/postcss-calc';
|
|
2
|
-
import { Rule } from 'postcss';
|
|
2
|
+
import { AcceptedPlugin, Rule, Result as Result$1 } from 'postcss';
|
|
3
3
|
import { Result } from 'postcss-load-config';
|
|
4
4
|
import { pluginOptions } from 'postcss-preset-env';
|
|
5
5
|
import { PxtransformOptions } from 'postcss-pxtransform';
|
|
6
6
|
import { UserDefinedOptions } from 'postcss-rem-to-responsive-pixel';
|
|
7
7
|
|
|
8
|
+
type PipelineStage = 'pre' | 'normal' | 'post';
|
|
9
|
+
interface PipelineNodeCursor {
|
|
10
|
+
id: string;
|
|
11
|
+
stage: PipelineStage;
|
|
12
|
+
}
|
|
13
|
+
interface PipelineNodeContext {
|
|
14
|
+
stage: PipelineStage;
|
|
15
|
+
/**
|
|
16
|
+
* 整个流水线内的顺序索引(从 0 开始)
|
|
17
|
+
*/
|
|
18
|
+
index: number;
|
|
19
|
+
/**
|
|
20
|
+
* 当前流水线包含的节点总数
|
|
21
|
+
*/
|
|
22
|
+
size: number;
|
|
23
|
+
/**
|
|
24
|
+
* 所在阶段内的顺序索引(从 0 开始)
|
|
25
|
+
*/
|
|
26
|
+
stageIndex: number;
|
|
27
|
+
/**
|
|
28
|
+
* 所在阶段的节点数量
|
|
29
|
+
*/
|
|
30
|
+
stageSize: number;
|
|
31
|
+
/**
|
|
32
|
+
* 指向前一个节点的游标(若存在)
|
|
33
|
+
*/
|
|
34
|
+
previous?: PipelineNodeCursor;
|
|
35
|
+
/**
|
|
36
|
+
* 指向后一个节点的游标(若存在)
|
|
37
|
+
*/
|
|
38
|
+
next?: PipelineNodeCursor;
|
|
39
|
+
}
|
|
40
|
+
interface ResolvedPipelineNode extends PipelineNodeCursor {
|
|
41
|
+
plugin: AcceptedPlugin;
|
|
42
|
+
context: PipelineNodeContext;
|
|
43
|
+
}
|
|
44
|
+
interface StyleProcessingPipeline {
|
|
45
|
+
nodes: ResolvedPipelineNode[];
|
|
46
|
+
plugins: AcceptedPlugin[];
|
|
47
|
+
}
|
|
48
|
+
declare function createStylePipeline(options: IStyleHandlerOptions): StyleProcessingPipeline;
|
|
49
|
+
|
|
8
50
|
declare function createContext(): {
|
|
9
51
|
variablesScopeWeakMap: WeakMap<WeakKey, any>;
|
|
10
52
|
isVariablesScope: (rule: WeakKey) => boolean;
|
|
@@ -74,4 +116,9 @@ interface UserDefinedPostcssOptions {
|
|
|
74
116
|
uniAppX?: boolean;
|
|
75
117
|
}
|
|
76
118
|
|
|
77
|
-
|
|
119
|
+
interface StyleHandler {
|
|
120
|
+
(rawSource: string, opt?: Partial<IStyleHandlerOptions>): Promise<Result$1>;
|
|
121
|
+
getPipeline: (opt?: Partial<IStyleHandlerOptions>) => StyleProcessingPipeline;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export { type CssCalcOptions as C, type IStyleHandlerOptions as I, type LoadedPostcssOptions as L, type PipelineNodeContext as P, type ResolvedPipelineNode as R, type StyleHandler as S, type UserDefinedPostcssOptions as U, type InternalCssSelectorReplacerOptions as a, type PipelineNodeCursor as b, createStylePipeline as c, type PipelineStage as d, type StyleProcessingPipeline as e, createInjectPreflight as f, type CustomRuleCallback as g, type IPropValue as h, type CssPreflightOptions as i, type RequiredStyleHandlerOptions as j };
|
package/dist/types.d.mts
CHANGED
|
@@ -4,4 +4,4 @@ import 'postcss-load-config';
|
|
|
4
4
|
export { pluginOptions as PresetEnvOptions } from 'postcss-preset-env';
|
|
5
5
|
export { PxtransformOptions as Px2rpxOptions } from 'postcss-pxtransform';
|
|
6
6
|
export { UserDefinedOptions as Rem2rpxOptions } from 'postcss-rem-to-responsive-pixel';
|
|
7
|
-
export { C as CssCalcOptions,
|
|
7
|
+
export { C as CssCalcOptions, i as CssPreflightOptions, g as CustomRuleCallback, h as IPropValue, I as IStyleHandlerOptions, a as InternalCssSelectorReplacerOptions, L as LoadedPostcssOptions, j as RequiredStyleHandlerOptions, S as StyleHandler, U as UserDefinedPostcssOptions } from './types-SytH0h-o.mjs';
|
package/dist/types.d.ts
CHANGED
|
@@ -4,4 +4,4 @@ import 'postcss-load-config';
|
|
|
4
4
|
export { pluginOptions as PresetEnvOptions } from 'postcss-preset-env';
|
|
5
5
|
export { PxtransformOptions as Px2rpxOptions } from 'postcss-pxtransform';
|
|
6
6
|
export { UserDefinedOptions as Rem2rpxOptions } from 'postcss-rem-to-responsive-pixel';
|
|
7
|
-
export { C as CssCalcOptions,
|
|
7
|
+
export { C as CssCalcOptions, i as CssPreflightOptions, g as CustomRuleCallback, h as IPropValue, I as IStyleHandlerOptions, a as InternalCssSelectorReplacerOptions, L as LoadedPostcssOptions, j as RequiredStyleHandlerOptions, S as StyleHandler, U as UserDefinedPostcssOptions } from './types-SytH0h-o.js';
|