@master/css 2.0.0-rc.47 → 2.0.0-rc.48
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/common.cjs +1 -1
- package/dist/common.mjs +1 -1
- package/dist/config/functions.d.ts +1 -1
- package/dist/config/index.cjs +3 -3
- package/dist/config/index.d.ts +3 -48
- package/dist/config/index.mjs +3 -3
- package/dist/config/modes.d.ts +1 -1
- package/dist/config/{syntaxes.cjs → rules.cjs} +282 -282
- package/dist/config/rules.d.ts +282 -0
- package/dist/config/{syntaxes.mjs → rules.mjs} +282 -282
- package/dist/core.cjs +225 -607
- package/dist/core.d.ts +36 -67
- package/dist/core.mjs +225 -607
- package/dist/index.cjs +14 -6
- package/dist/index.d.ts +8 -4
- package/dist/index.mjs +7 -3
- package/dist/layer.cjs +107 -23
- package/dist/layer.d.ts +13 -27
- package/dist/layer.mjs +107 -23
- package/dist/non-layer.cjs +65 -0
- package/dist/non-layer.d.ts +12 -0
- package/dist/non-layer.mjs +63 -0
- package/dist/rule.cjs +8 -708
- package/dist/rule.d.ts +6 -147
- package/dist/rule.mjs +8 -708
- package/dist/shared/utils/find-native-css-rule-index.cjs +12 -0
- package/dist/shared/utils/find-native-css-rule-index.mjs +10 -0
- package/dist/syntax-layer.cjs +291 -0
- package/dist/syntax-layer.d.ts +17 -0
- package/dist/syntax-layer.mjs +289 -0
- package/dist/syntax-rule-type.cjs +27 -0
- package/dist/syntax-rule-type.d.ts +28 -0
- package/dist/syntax-rule-type.mjs +25 -0
- package/dist/syntax-rule.cjs +717 -0
- package/dist/syntax-rule.d.ts +47 -0
- package/dist/syntax-rule.mjs +715 -0
- package/dist/types/config.cjs +2 -0
- package/dist/types/config.d.ts +70 -0
- package/dist/types/config.mjs +1 -0
- package/dist/types/syntax.cjs +2 -0
- package/dist/types/syntax.d.ts +106 -0
- package/dist/types/syntax.mjs +1 -0
- package/dist/utils/are-rule-at-equal.cjs +7 -7
- package/dist/utils/are-rule-at-equal.d.ts +2 -2
- package/dist/utils/are-rule-at-equal.mjs +7 -7
- package/dist/utils/are-rule-modes-equal.cjs +2 -2
- package/dist/utils/are-rule-modes-equal.d.ts +2 -2
- package/dist/utils/are-rule-modes-equal.mjs +2 -2
- package/dist/utils/are-rule-selectors-equal.cjs +11 -11
- package/dist/utils/are-rule-selectors-equal.d.ts +2 -2
- package/dist/utils/are-rule-selectors-equal.mjs +11 -11
- package/dist/utils/are-rule-states-equal.cjs +2 -2
- package/dist/utils/are-rule-states-equal.d.ts +2 -2
- package/dist/utils/are-rule-states-equal.mjs +2 -2
- package/dist/utils/are-rules-duplicated.cjs +17 -0
- package/dist/utils/are-rules-duplicated.d.ts +2 -0
- package/dist/utils/are-rules-duplicated.mjs +15 -0
- package/dist/utils/autofill-solid-style.d.ts +2 -2
- package/dist/utils/extend-config.cjs +5 -5
- package/dist/utils/extend-config.d.ts +1 -1
- package/dist/utils/extend-config.mjs +5 -5
- package/dist/utils/generate-css.cjs +1 -1
- package/dist/utils/generate-css.mjs +1 -1
- package/dist/utils/is-core-rule.cjs +2 -2
- package/dist/utils/is-core-rule.mjs +2 -2
- package/dist/utils/reorder-for-readable-classes.cjs +11 -11
- package/dist/utils/reorder-for-readable-classes.mjs +11 -11
- package/package.json +1 -1
- package/dist/config/syntaxes.d.ts +0 -282
- package/dist/utils/are-syntaxes-duplicated.cjs +0 -17
- package/dist/utils/are-syntaxes-duplicated.d.ts +0 -2
- package/dist/utils/are-syntaxes-duplicated.mjs +0 -15
package/dist/rule.d.ts
CHANGED
|
@@ -1,152 +1,11 @@
|
|
|
1
|
-
import MasterCSS, { type Variable } from './core';
|
|
2
|
-
import Layer from './layer';
|
|
3
|
-
import { type PropertiesHyphen } from 'csstype';
|
|
4
1
|
export declare class Rule {
|
|
5
|
-
readonly
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
readonly priority: number;
|
|
10
|
-
readonly natives: NativeRule[];
|
|
11
|
-
readonly order: number;
|
|
12
|
-
readonly layer: Layer;
|
|
13
|
-
readonly declarations?: PropertiesHyphen;
|
|
14
|
-
animationNames?: string[];
|
|
15
|
-
variableNames?: string[];
|
|
16
|
-
constructor(className: string, RegisteredRule: RegisteredRule, css: MasterCSS);
|
|
17
|
-
resolveAtComponent(atComponent: AtComponent): string;
|
|
18
|
-
resolveValue: (valueComponents: ValueComponent[], unit: string, bypassVariableNames: string[], bypassParsing: boolean) => string;
|
|
2
|
+
readonly name: string;
|
|
3
|
+
nodes: RuleNode[];
|
|
4
|
+
constructor(name: string, nodes?: RuleNode[]);
|
|
5
|
+
get key(): string;
|
|
19
6
|
get text(): string;
|
|
20
|
-
parseValues: (currentValueComponents: ValueComponent[], i: number, value: string, unit: string, endSymbol: string, parentFunctionName?: string, bypassParsing?: boolean, bypassVariableNames?: string[]) => number;
|
|
21
|
-
parseValue(token: string | number, unit?: any): {
|
|
22
|
-
value: string;
|
|
23
|
-
type: 'string';
|
|
24
|
-
} | {
|
|
25
|
-
value: number;
|
|
26
|
-
unit: string;
|
|
27
|
-
type: 'number';
|
|
28
|
-
};
|
|
29
7
|
}
|
|
30
|
-
export
|
|
31
|
-
export interface AtArbitraryComponent {
|
|
32
|
-
type: 'arbitrary';
|
|
33
|
-
token?: string;
|
|
34
|
-
value: string;
|
|
35
|
-
}
|
|
36
|
-
export interface AtFeatureComponent {
|
|
37
|
-
type: 'feature';
|
|
38
|
-
token?: string;
|
|
39
|
-
name: string;
|
|
40
|
-
valueType: 'number' | 'string';
|
|
41
|
-
value: string | number;
|
|
42
|
-
unit?: string;
|
|
43
|
-
}
|
|
44
|
-
export interface AtOperatorComponent {
|
|
45
|
-
type: 'operator';
|
|
46
|
-
token: '&';
|
|
47
|
-
value: 'and';
|
|
48
|
-
}
|
|
49
|
-
export type ValueComponent = StringValueComponent | NumericValueComponent | FunctionValueComponent | VariableValueComponent | SeparatorValueComponent;
|
|
50
|
-
export interface StringValueComponent {
|
|
51
|
-
text?: string;
|
|
52
|
-
token: string;
|
|
53
|
-
type: 'string';
|
|
54
|
-
value: string;
|
|
55
|
-
}
|
|
56
|
-
export interface NumericValueComponent {
|
|
57
|
-
text?: string;
|
|
58
|
-
token: string;
|
|
59
|
-
type: 'number';
|
|
60
|
-
value: number;
|
|
61
|
-
unit?: string;
|
|
62
|
-
}
|
|
63
|
-
export interface FunctionValueComponent {
|
|
64
|
-
text?: string;
|
|
65
|
-
token: string;
|
|
66
|
-
type: 'function';
|
|
67
|
-
name: string;
|
|
68
|
-
symbol: string;
|
|
69
|
-
children: ValueComponent[];
|
|
70
|
-
bypassTransform?: boolean;
|
|
71
|
-
}
|
|
72
|
-
export interface VariableValueComponent {
|
|
73
|
-
text?: string;
|
|
74
|
-
token: string;
|
|
75
|
-
type: 'variable';
|
|
76
|
-
name: string;
|
|
77
|
-
alpha?: string;
|
|
78
|
-
fallback?: string;
|
|
79
|
-
variable?: Variable;
|
|
80
|
-
}
|
|
81
|
-
export interface SeparatorValueComponent {
|
|
82
|
-
text?: string;
|
|
83
|
-
token: string;
|
|
84
|
-
type: 'separator';
|
|
85
|
-
value: string;
|
|
86
|
-
}
|
|
87
|
-
export interface Rule extends RegisteredRule {
|
|
88
|
-
token: string;
|
|
89
|
-
vendorPrefixSelectors: Record<string, string[]>;
|
|
90
|
-
vendorSuffixSelectors: Record<string, string[]>;
|
|
91
|
-
important: boolean;
|
|
92
|
-
direction: string;
|
|
93
|
-
mode: string;
|
|
94
|
-
unitToken: string;
|
|
95
|
-
keyToken: string;
|
|
96
|
-
valueToken: string;
|
|
97
|
-
stateToken: string;
|
|
98
|
-
atToken: string;
|
|
99
|
-
hasWhere: boolean;
|
|
100
|
-
valueComponents: ValueComponent[];
|
|
101
|
-
}
|
|
102
|
-
export interface RegisteredRule {
|
|
103
|
-
id: string;
|
|
104
|
-
key?: string;
|
|
105
|
-
keys: string[];
|
|
106
|
-
matchers: {
|
|
107
|
-
key?: RegExp;
|
|
108
|
-
variable?: RegExp;
|
|
109
|
-
value?: RegExp;
|
|
110
|
-
arbitrary?: RegExp;
|
|
111
|
-
};
|
|
112
|
-
variables: Record<string, Variable>;
|
|
113
|
-
order: number;
|
|
114
|
-
definition: SyntaxDefinition;
|
|
115
|
-
}
|
|
116
|
-
export interface SyntaxDefinition {
|
|
117
|
-
layer?: Layer;
|
|
118
|
-
matcher?: RegExp;
|
|
119
|
-
sign?: string;
|
|
120
|
-
key?: string;
|
|
121
|
-
subkey?: string;
|
|
122
|
-
ambiguousKeys?: string[];
|
|
123
|
-
ambiguousValues?: (RegExp | string)[];
|
|
124
|
-
variables?: string[];
|
|
125
|
-
separators?: string[];
|
|
126
|
-
unit?: any;
|
|
127
|
-
declarations?: PropertiesHyphen;
|
|
128
|
-
includeAnimations?: boolean;
|
|
129
|
-
analyze?: (this: Rule, className: string) => [valueToken: string, prefixToken?: string];
|
|
130
|
-
transformValue?(this: Rule, value: string): string;
|
|
131
|
-
transformValueComponents?(this: Rule, valueComponents: ValueComponent[]): ValueComponent[];
|
|
132
|
-
declare?(this: Rule, value: string, valueComponents: ValueComponent[]): PropertiesHyphen;
|
|
133
|
-
delete?(this: Rule, className: string): void;
|
|
134
|
-
create?(this: Rule, className: string): void;
|
|
135
|
-
insert?(this: Rule): void;
|
|
136
|
-
}
|
|
137
|
-
export interface NativeRule {
|
|
8
|
+
export interface RuleNode {
|
|
138
9
|
text: string;
|
|
139
|
-
|
|
140
|
-
}
|
|
141
|
-
export interface MediaFeatureComponent {
|
|
142
|
-
type: string;
|
|
143
|
-
tokenType?: string;
|
|
144
|
-
operator?: string;
|
|
145
|
-
value: number;
|
|
146
|
-
unit: string;
|
|
147
|
-
}
|
|
148
|
-
export interface MediaQuery {
|
|
149
|
-
token: string;
|
|
150
|
-
features: Record<string, MediaFeatureComponent>;
|
|
151
|
-
type?: string;
|
|
10
|
+
native?: CSSRule;
|
|
152
11
|
}
|