@master/css 2.0.0-rc.60 → 2.0.0-rc.62
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/animation-rule.cjs +24 -0
- package/dist/animation-rule.d.ts +11 -0
- package/dist/animation-rule.mjs +22 -0
- package/dist/common.cjs +50 -1
- package/dist/common.d.ts +14 -0
- package/dist/common.mjs +45 -2
- package/dist/config/at.cjs +13 -10
- package/dist/config/at.d.ts +4 -1
- package/dist/config/at.mjs +13 -10
- package/dist/config/index.cjs +3 -0
- package/dist/config/index.d.ts +2 -1
- package/dist/config/index.mjs +3 -1
- package/dist/config/modes.d.ts +4 -2
- package/dist/config/rules.cjs +28 -46
- package/dist/config/rules.d.ts +4 -2
- package/dist/config/rules.mjs +28 -46
- package/dist/config/screens.cjs +17 -0
- package/dist/config/screens.d.ts +14 -0
- package/dist/config/screens.mjs +15 -0
- package/dist/config/selectors.cjs +11 -15
- package/dist/config/selectors.d.ts +10 -8
- package/dist/config/selectors.mjs +11 -15
- package/dist/config/utilities.cjs +3 -0
- package/dist/config/utilities.d.ts +3 -0
- package/dist/config/utilities.mjs +3 -0
- package/dist/config/variables.cjs +0 -13
- package/dist/config/variables.d.ts +0 -13
- package/dist/config/variables.mjs +0 -13
- package/dist/core.cjs +438 -476
- package/dist/core.d.ts +14 -6
- package/dist/core.mjs +438 -476
- package/dist/factories/with-syntax-layer.cjs +37 -260
- package/dist/factories/with-syntax-layer.mjs +37 -260
- package/dist/index.cjs +38 -12
- package/dist/index.d.ts +19 -7
- package/dist/index.mjs +17 -7
- package/dist/layer.cjs +11 -7
- package/dist/layer.d.ts +4 -3
- package/dist/layer.mjs +11 -7
- package/dist/non-layer.cjs +10 -17
- package/dist/non-layer.d.ts +1 -1
- package/dist/non-layer.mjs +10 -17
- package/dist/rule.cjs +4 -6
- package/dist/rule.d.ts +3 -10
- package/dist/rule.mjs +4 -6
- package/dist/syntax-rule-type.cjs +7 -8
- package/dist/syntax-rule-type.d.ts +7 -7
- package/dist/syntax-rule-type.mjs +7 -8
- package/dist/syntax-rule.cjs +125 -315
- package/dist/syntax-rule.d.ts +18 -21
- package/dist/syntax-rule.mjs +126 -316
- package/dist/types/common.d.ts +2 -0
- package/dist/types/config.d.ts +12 -7
- package/dist/types/syntax.d.ts +5 -24
- package/dist/utils/compare-rule-priority.cjs +143 -0
- package/dist/utils/compare-rule-priority.d.ts +7 -0
- package/dist/utils/compare-rule-priority.mjs +138 -0
- package/dist/utils/equal-at-rules.cjs +22 -0
- package/dist/utils/equal-at-rules.d.ts +2 -0
- package/dist/utils/equal-at-rules.mjs +20 -0
- package/dist/utils/equal-declarations.cjs +10 -0
- package/dist/utils/equal-declarations.d.ts +2 -0
- package/dist/utils/equal-declarations.mjs +8 -0
- package/dist/utils/equal-selectors.cjs +70 -0
- package/dist/utils/equal-selectors.d.ts +2 -0
- package/dist/utils/equal-selectors.mjs +68 -0
- package/dist/utils/equal-variants.cjs +10 -0
- package/dist/utils/equal-variants.d.ts +2 -0
- package/dist/utils/equal-variants.mjs +8 -0
- package/dist/utils/extend-config.cjs +0 -1
- package/dist/utils/extend-config.mjs +0 -1
- package/dist/utils/generate-at.cjs +30 -0
- package/dist/utils/generate-at.d.ts +2 -0
- package/dist/utils/generate-at.mjs +28 -0
- package/dist/utils/generate-selector.cjs +49 -0
- package/dist/utils/generate-selector.d.ts +2 -0
- package/dist/utils/generate-selector.mjs +47 -0
- package/dist/utils/get-single-at-number-rule-node.cjs +9 -0
- package/dist/utils/get-single-at-number-rule-node.d.ts +2 -0
- package/dist/utils/get-single-at-number-rule-node.mjs +7 -0
- package/dist/utils/parse-at.cjs +157 -0
- package/dist/utils/parse-at.d.ts +39 -0
- package/dist/utils/parse-at.mjs +155 -0
- package/dist/utils/parse-pair.cjs +51 -0
- package/dist/utils/parse-pair.d.ts +8 -0
- package/dist/utils/parse-pair.mjs +49 -0
- package/dist/utils/parse-selector.cjs +112 -0
- package/dist/utils/parse-selector.d.ts +19 -0
- package/dist/utils/parse-selector.mjs +110 -0
- package/dist/utils/parse-value.cjs +39 -0
- package/dist/utils/parse-value.d.ts +2 -0
- package/dist/utils/parse-value.mjs +37 -0
- package/dist/utils/replace-char-outside-quotes.cjs +21 -0
- package/dist/utils/replace-char-outside-quotes.d.ts +1 -0
- package/dist/utils/replace-char-outside-quotes.mjs +19 -0
- package/dist/utils/sort-readable-classes.cjs +74 -0
- package/dist/utils/{reorder-for-readable-classes.d.ts → sort-readable-classes.d.ts} +1 -1
- package/dist/utils/sort-readable-classes.mjs +72 -0
- package/dist/utils/split-char-outside-quotes.cjs +29 -0
- package/dist/utils/split-char-outside-quotes.d.ts +1 -0
- package/dist/utils/split-char-outside-quotes.mjs +27 -0
- package/dist/variable-rule.cjs +86 -0
- package/dist/variable-rule.d.ts +23 -0
- package/dist/variable-rule.mjs +81 -0
- package/package.json +1 -1
- package/dist/utils/are-rule-at-equal.cjs +0 -22
- package/dist/utils/are-rule-at-equal.d.ts +0 -2
- package/dist/utils/are-rule-at-equal.mjs +0 -20
- package/dist/utils/are-rule-modes-equal.cjs +0 -7
- package/dist/utils/are-rule-modes-equal.d.ts +0 -2
- package/dist/utils/are-rule-modes-equal.mjs +0 -5
- package/dist/utils/are-rule-selectors-equal.cjs +0 -29
- package/dist/utils/are-rule-selectors-equal.d.ts +0 -2
- package/dist/utils/are-rule-selectors-equal.mjs +0 -27
- package/dist/utils/are-rule-states-equal.cjs +0 -11
- package/dist/utils/are-rule-states-equal.d.ts +0 -2
- package/dist/utils/are-rule-states-equal.mjs +0 -9
- package/dist/utils/are-rules-duplicated.cjs +0 -17
- package/dist/utils/are-rules-duplicated.d.ts +0 -2
- package/dist/utils/are-rules-duplicated.mjs +0 -15
- package/dist/utils/reorder-for-readable-classes.cjs +0 -62
- package/dist/utils/reorder-for-readable-classes.mjs +0 -60
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
class AnimationRule {
|
|
4
|
+
name;
|
|
5
|
+
keyframes;
|
|
6
|
+
css;
|
|
7
|
+
native;
|
|
8
|
+
constructor(name, keyframes, css){
|
|
9
|
+
this.name = name;
|
|
10
|
+
this.keyframes = keyframes;
|
|
11
|
+
this.css = css;
|
|
12
|
+
}
|
|
13
|
+
get key() {
|
|
14
|
+
return this.name;
|
|
15
|
+
}
|
|
16
|
+
get text() {
|
|
17
|
+
return `@keyframes ${this.name}{` + Object.entries(this.keyframes).reduce((acc, [key, variables])=>{
|
|
18
|
+
const variableText = Object.entries(variables).map(([name, value])=>`${name}:${value}`).join(';');
|
|
19
|
+
return acc + `${key}{${variableText}}`;
|
|
20
|
+
}, '') + '}';
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
module.exports = AnimationRule;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import MasterCSS from './core';
|
|
2
|
+
import { AnimationDefinitions } from './types/config';
|
|
3
|
+
export default class AnimationRule {
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly keyframes: AnimationDefinitions;
|
|
6
|
+
readonly css: MasterCSS;
|
|
7
|
+
native?: CSSKeyframeRule;
|
|
8
|
+
constructor(name: string, keyframes: AnimationDefinitions, css: MasterCSS);
|
|
9
|
+
get key(): string;
|
|
10
|
+
get text(): string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
class AnimationRule {
|
|
2
|
+
name;
|
|
3
|
+
keyframes;
|
|
4
|
+
css;
|
|
5
|
+
native;
|
|
6
|
+
constructor(name, keyframes, css){
|
|
7
|
+
this.name = name;
|
|
8
|
+
this.keyframes = keyframes;
|
|
9
|
+
this.css = css;
|
|
10
|
+
}
|
|
11
|
+
get key() {
|
|
12
|
+
return this.name;
|
|
13
|
+
}
|
|
14
|
+
get text() {
|
|
15
|
+
return `@keyframes ${this.name}{` + Object.entries(this.keyframes).reduce((acc, [key, variables])=>{
|
|
16
|
+
const variableText = Object.entries(variables).map(([name, value])=>`${name}:${value}`).join(';');
|
|
17
|
+
return acc + `${key}{${variableText}}`;
|
|
18
|
+
}, '') + '}';
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { AnimationRule as default };
|
package/dist/common.cjs
CHANGED
|
@@ -17,6 +17,12 @@ const SELECTOR_SIGNS = [
|
|
|
17
17
|
'+',
|
|
18
18
|
'~'
|
|
19
19
|
];
|
|
20
|
+
const SELECTOR_COMBINATORS = [
|
|
21
|
+
'_',
|
|
22
|
+
'>',
|
|
23
|
+
'+',
|
|
24
|
+
'~'
|
|
25
|
+
];
|
|
20
26
|
const QUERY_COMPARISON_OPERATORS = [
|
|
21
27
|
'>',
|
|
22
28
|
'<',
|
|
@@ -99,7 +105,7 @@ const VALUE_UNITS = [
|
|
|
99
105
|
'db',
|
|
100
106
|
'st'
|
|
101
107
|
];
|
|
102
|
-
const UNIT_REGEX = /^([+-.]?\d+(
|
|
108
|
+
const UNIT_REGEX = /^([+-.]?\d+(?:\.?\d+)?)(%|cm|mm|q|in|pt|pc|px|em|rem|ex|rex|cap|rcap|ch|rch|ic|ric|lh|rlh|vw|svw|lvw|dvw|vh|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax|cqw|cqh|cqi|cqb|cqmin|cqmax|deg|grad|rad|turn|s|ms|hz|khz|dpi|dpcm|dppx|x|fr|db|st)?$/;
|
|
103
109
|
const IMAGE_VALUE_REGEX = /(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\(.*\)/;
|
|
104
110
|
const COLOR_VALUE_REGEX = /(?:#|(?:color|color-contrast|color-mix|hwb|lab|lch|oklab|oklch|rgb|rgba|hsl|hsla|light-dark)\(.*\)|(?:\$colors)(?![a-zA-Z0-9-]))/;
|
|
105
111
|
const NUMBER_VALUE_REGEX = /(?:[\d.]|(?:max|min|calc|clamp)\([^|]*\))/;
|
|
@@ -135,8 +141,49 @@ const BORDER_STYLE_VALUES = [
|
|
|
135
141
|
'inset',
|
|
136
142
|
'outset'
|
|
137
143
|
];
|
|
144
|
+
const AT_COMPARISON_OPERATORS = [
|
|
145
|
+
'>=',
|
|
146
|
+
'<=',
|
|
147
|
+
'>',
|
|
148
|
+
'<',
|
|
149
|
+
'='
|
|
150
|
+
];
|
|
151
|
+
const AT_LOGICAL_OPERATORS = {
|
|
152
|
+
'&': 'and',
|
|
153
|
+
'!': 'not',
|
|
154
|
+
// native
|
|
155
|
+
'not': 'not',
|
|
156
|
+
'and': 'and',
|
|
157
|
+
'or': 'or',
|
|
158
|
+
'only': 'only',
|
|
159
|
+
',': 'or'
|
|
160
|
+
};
|
|
161
|
+
// the order is intentional and should not be changed
|
|
162
|
+
const AT_IDENTIFIERS = [
|
|
163
|
+
'container',
|
|
164
|
+
'starting-style',
|
|
165
|
+
'supports',
|
|
166
|
+
'media',
|
|
167
|
+
'layer'
|
|
168
|
+
];
|
|
169
|
+
const COMPARISION_OPERATORS = [
|
|
170
|
+
'>=',
|
|
171
|
+
'<=',
|
|
172
|
+
'>',
|
|
173
|
+
'<',
|
|
174
|
+
'='
|
|
175
|
+
];
|
|
176
|
+
const AT_COMPARABLE_FEATURES = [
|
|
177
|
+
'width',
|
|
178
|
+
'height',
|
|
179
|
+
'resolution'
|
|
180
|
+
];
|
|
138
181
|
|
|
139
182
|
exports.ANIMATION_SIGN = ANIMATION_SIGN;
|
|
183
|
+
exports.AT_COMPARABLE_FEATURES = AT_COMPARABLE_FEATURES;
|
|
184
|
+
exports.AT_COMPARISON_OPERATORS = AT_COMPARISON_OPERATORS;
|
|
185
|
+
exports.AT_IDENTIFIERS = AT_IDENTIFIERS;
|
|
186
|
+
exports.AT_LOGICAL_OPERATORS = AT_LOGICAL_OPERATORS;
|
|
140
187
|
exports.AT_SIGN = AT_SIGN;
|
|
141
188
|
exports.BASE_UNIT_REGEX = BASE_UNIT_REGEX;
|
|
142
189
|
exports.BORDER_STYLE_VALUES = BORDER_STYLE_VALUES;
|
|
@@ -144,12 +191,14 @@ exports.CLASS_ATTRIBUTES = CLASS_ATTRIBUTES;
|
|
|
144
191
|
exports.CLASS_DECLARATIONS = CLASS_DECLARATIONS;
|
|
145
192
|
exports.CLASS_FUNCTIONS = CLASS_FUNCTIONS;
|
|
146
193
|
exports.COLOR_VALUE_REGEX = COLOR_VALUE_REGEX;
|
|
194
|
+
exports.COMPARISION_OPERATORS = COMPARISION_OPERATORS;
|
|
147
195
|
exports.DELIMITER_SIGN = DELIMITER_SIGN;
|
|
148
196
|
exports.IMAGE_VALUE_REGEX = IMAGE_VALUE_REGEX;
|
|
149
197
|
exports.NUMBER_VALUE_REGEX = NUMBER_VALUE_REGEX;
|
|
150
198
|
exports.OFFICIAL_URL = OFFICIAL_URL;
|
|
151
199
|
exports.QUERY_COMPARISON_OPERATORS = QUERY_COMPARISON_OPERATORS;
|
|
152
200
|
exports.QUERY_LOGICAL_OPERATORS = QUERY_LOGICAL_OPERATORS;
|
|
201
|
+
exports.SELECTOR_COMBINATORS = SELECTOR_COMBINATORS;
|
|
153
202
|
exports.SELECTOR_SIGNS = SELECTOR_SIGNS;
|
|
154
203
|
exports.SEPARATOR_SIGN = SEPARATOR_SIGN;
|
|
155
204
|
exports.SEPARATOR_SIGNS = SEPARATOR_SIGNS;
|
package/dist/common.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export declare const BASE_UNIT_REGEX: RegExp;
|
|
|
8
8
|
export declare const TRANSITION_SIGN = "~";
|
|
9
9
|
export declare const ANIMATION_SIGN = "@";
|
|
10
10
|
export declare const SELECTOR_SIGNS: string[];
|
|
11
|
+
export declare const SELECTOR_COMBINATORS: string[];
|
|
11
12
|
export declare const QUERY_COMPARISON_OPERATORS: string[];
|
|
12
13
|
export declare const QUERY_LOGICAL_OPERATORS: string[];
|
|
13
14
|
export declare const SEPARATOR_SIGNS: string[];
|
|
@@ -24,3 +25,16 @@ export declare const CLASS_ATTRIBUTES: string[];
|
|
|
24
25
|
export declare const CLASS_DECLARATIONS: string[];
|
|
25
26
|
export declare const CLASS_FUNCTIONS: string[];
|
|
26
27
|
export declare const BORDER_STYLE_VALUES: string[];
|
|
28
|
+
export declare const AT_COMPARISON_OPERATORS: string[];
|
|
29
|
+
export declare const AT_LOGICAL_OPERATORS: {
|
|
30
|
+
'&': string;
|
|
31
|
+
'!': string;
|
|
32
|
+
not: string;
|
|
33
|
+
and: string;
|
|
34
|
+
or: string;
|
|
35
|
+
only: string;
|
|
36
|
+
',': string;
|
|
37
|
+
};
|
|
38
|
+
export declare const AT_IDENTIFIERS: string[];
|
|
39
|
+
export declare const COMPARISION_OPERATORS: string[];
|
|
40
|
+
export declare const AT_COMPARABLE_FEATURES: string[];
|
package/dist/common.mjs
CHANGED
|
@@ -15,6 +15,12 @@ const SELECTOR_SIGNS = [
|
|
|
15
15
|
'+',
|
|
16
16
|
'~'
|
|
17
17
|
];
|
|
18
|
+
const SELECTOR_COMBINATORS = [
|
|
19
|
+
'_',
|
|
20
|
+
'>',
|
|
21
|
+
'+',
|
|
22
|
+
'~'
|
|
23
|
+
];
|
|
18
24
|
const QUERY_COMPARISON_OPERATORS = [
|
|
19
25
|
'>',
|
|
20
26
|
'<',
|
|
@@ -97,7 +103,7 @@ const VALUE_UNITS = [
|
|
|
97
103
|
'db',
|
|
98
104
|
'st'
|
|
99
105
|
];
|
|
100
|
-
const UNIT_REGEX = /^([+-.]?\d+(
|
|
106
|
+
const UNIT_REGEX = /^([+-.]?\d+(?:\.?\d+)?)(%|cm|mm|q|in|pt|pc|px|em|rem|ex|rex|cap|rcap|ch|rch|ic|ric|lh|rlh|vw|svw|lvw|dvw|vh|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax|cqw|cqh|cqi|cqb|cqmin|cqmax|deg|grad|rad|turn|s|ms|hz|khz|dpi|dpcm|dppx|x|fr|db|st)?$/;
|
|
101
107
|
const IMAGE_VALUE_REGEX = /(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\(.*\)/;
|
|
102
108
|
const COLOR_VALUE_REGEX = /(?:#|(?:color|color-contrast|color-mix|hwb|lab|lch|oklab|oklch|rgb|rgba|hsl|hsla|light-dark)\(.*\)|(?:\$colors)(?![a-zA-Z0-9-]))/;
|
|
103
109
|
const NUMBER_VALUE_REGEX = /(?:[\d.]|(?:max|min|calc|clamp)\([^|]*\))/;
|
|
@@ -133,5 +139,42 @@ const BORDER_STYLE_VALUES = [
|
|
|
133
139
|
'inset',
|
|
134
140
|
'outset'
|
|
135
141
|
];
|
|
142
|
+
const AT_COMPARISON_OPERATORS = [
|
|
143
|
+
'>=',
|
|
144
|
+
'<=',
|
|
145
|
+
'>',
|
|
146
|
+
'<',
|
|
147
|
+
'='
|
|
148
|
+
];
|
|
149
|
+
const AT_LOGICAL_OPERATORS = {
|
|
150
|
+
'&': 'and',
|
|
151
|
+
'!': 'not',
|
|
152
|
+
// native
|
|
153
|
+
'not': 'not',
|
|
154
|
+
'and': 'and',
|
|
155
|
+
'or': 'or',
|
|
156
|
+
'only': 'only',
|
|
157
|
+
',': 'or'
|
|
158
|
+
};
|
|
159
|
+
// the order is intentional and should not be changed
|
|
160
|
+
const AT_IDENTIFIERS = [
|
|
161
|
+
'container',
|
|
162
|
+
'starting-style',
|
|
163
|
+
'supports',
|
|
164
|
+
'media',
|
|
165
|
+
'layer'
|
|
166
|
+
];
|
|
167
|
+
const COMPARISION_OPERATORS = [
|
|
168
|
+
'>=',
|
|
169
|
+
'<=',
|
|
170
|
+
'>',
|
|
171
|
+
'<',
|
|
172
|
+
'='
|
|
173
|
+
];
|
|
174
|
+
const AT_COMPARABLE_FEATURES = [
|
|
175
|
+
'width',
|
|
176
|
+
'height',
|
|
177
|
+
'resolution'
|
|
178
|
+
];
|
|
136
179
|
|
|
137
|
-
export { ANIMATION_SIGN, AT_SIGN, BASE_UNIT_REGEX, BORDER_STYLE_VALUES, CLASS_ATTRIBUTES, CLASS_DECLARATIONS, CLASS_FUNCTIONS, COLOR_VALUE_REGEX, DELIMITER_SIGN, IMAGE_VALUE_REGEX, NUMBER_VALUE_REGEX, OFFICIAL_URL, QUERY_COMPARISON_OPERATORS, QUERY_LOGICAL_OPERATORS, SELECTOR_SIGNS, SEPARATOR_SIGN, SEPARATOR_SIGNS, TRANSITION_SIGN, UNIT_REGEX, VALUE_DELIMITERS, VALUE_UNITS };
|
|
180
|
+
export { ANIMATION_SIGN, AT_COMPARABLE_FEATURES, AT_COMPARISON_OPERATORS, AT_IDENTIFIERS, AT_LOGICAL_OPERATORS, AT_SIGN, BASE_UNIT_REGEX, BORDER_STYLE_VALUES, CLASS_ATTRIBUTES, CLASS_DECLARATIONS, CLASS_FUNCTIONS, COLOR_VALUE_REGEX, COMPARISION_OPERATORS, DELIMITER_SIGN, IMAGE_VALUE_REGEX, NUMBER_VALUE_REGEX, OFFICIAL_URL, QUERY_COMPARISON_OPERATORS, QUERY_LOGICAL_OPERATORS, SELECTOR_COMBINATORS, SELECTOR_SIGNS, SEPARATOR_SIGN, SEPARATOR_SIGNS, TRANSITION_SIGN, UNIT_REGEX, VALUE_DELIMITERS, VALUE_UNITS };
|
package/dist/config/at.cjs
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const at = {
|
|
4
|
-
all: 'media
|
|
5
|
-
print: 'media
|
|
6
|
-
screen: 'media
|
|
7
|
-
speech: 'media
|
|
8
|
-
landscape: 'media
|
|
9
|
-
portrait: 'media
|
|
10
|
-
motion: 'media
|
|
11
|
-
'
|
|
12
|
-
base: 'layer
|
|
13
|
-
preset: 'layer
|
|
4
|
+
all: 'media(all)',
|
|
5
|
+
print: 'media(print)',
|
|
6
|
+
screen: 'media(screen)',
|
|
7
|
+
speech: 'media(speech)',
|
|
8
|
+
landscape: 'media(orientation:landscape)',
|
|
9
|
+
portrait: 'media(orientation:portrait)',
|
|
10
|
+
motion: 'media(prefers-reduced-motion:no-preference)',
|
|
11
|
+
'reduce-motion': 'media(prefers-reduced-motion:reduce)',
|
|
12
|
+
base: 'layer(base)',
|
|
13
|
+
preset: 'layer(preset)',
|
|
14
|
+
start: 'starting-style',
|
|
15
|
+
w: 'width',
|
|
16
|
+
h: 'height'
|
|
14
17
|
};
|
|
15
18
|
|
|
16
19
|
module.exports = at;
|
package/dist/config/at.d.ts
CHANGED
package/dist/config/at.mjs
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
const at = {
|
|
2
|
-
all: 'media
|
|
3
|
-
print: 'media
|
|
4
|
-
screen: 'media
|
|
5
|
-
speech: 'media
|
|
6
|
-
landscape: 'media
|
|
7
|
-
portrait: 'media
|
|
8
|
-
motion: 'media
|
|
9
|
-
'
|
|
10
|
-
base: 'layer
|
|
11
|
-
preset: 'layer
|
|
2
|
+
all: 'media(all)',
|
|
3
|
+
print: 'media(print)',
|
|
4
|
+
screen: 'media(screen)',
|
|
5
|
+
speech: 'media(speech)',
|
|
6
|
+
landscape: 'media(orientation:landscape)',
|
|
7
|
+
portrait: 'media(orientation:portrait)',
|
|
8
|
+
motion: 'media(prefers-reduced-motion:no-preference)',
|
|
9
|
+
'reduce-motion': 'media(prefers-reduced-motion:reduce)',
|
|
10
|
+
base: 'layer(base)',
|
|
11
|
+
preset: 'layer(preset)',
|
|
12
|
+
start: 'starting-style',
|
|
13
|
+
w: 'width',
|
|
14
|
+
h: 'height'
|
|
12
15
|
};
|
|
13
16
|
|
|
14
17
|
export { at as default };
|
package/dist/config/index.cjs
CHANGED
|
@@ -8,6 +8,7 @@ var variables = require('./variables.cjs');
|
|
|
8
8
|
var rules = require('./rules.cjs');
|
|
9
9
|
var modes = require('./modes.cjs');
|
|
10
10
|
var functions = require('./functions.cjs');
|
|
11
|
+
var screens = require('./screens.cjs');
|
|
11
12
|
|
|
12
13
|
const config = {
|
|
13
14
|
at,
|
|
@@ -18,6 +19,7 @@ const config = {
|
|
|
18
19
|
animations,
|
|
19
20
|
variables,
|
|
20
21
|
modes,
|
|
22
|
+
screens,
|
|
21
23
|
scope: '',
|
|
22
24
|
rootSize: 16,
|
|
23
25
|
baseUnit: 4,
|
|
@@ -34,4 +36,5 @@ exports.variables = variables;
|
|
|
34
36
|
exports.rules = rules;
|
|
35
37
|
exports.modes = modes;
|
|
36
38
|
exports.functions = functions;
|
|
39
|
+
exports.screens = screens;
|
|
37
40
|
exports.config = config;
|
package/dist/config/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import variables from './variables';
|
|
|
6
6
|
import rules from './rules';
|
|
7
7
|
import modes from './modes';
|
|
8
8
|
import functions from './functions';
|
|
9
|
+
import screens from './screens';
|
|
9
10
|
import { Config } from '../types/config';
|
|
10
11
|
declare const config: Config;
|
|
11
|
-
export { config, at, selectors, utilities, rules, functions, animations, variables, modes };
|
|
12
|
+
export { config, at, selectors, utilities, rules, functions, animations, variables, modes, screens };
|
package/dist/config/index.mjs
CHANGED
|
@@ -6,6 +6,7 @@ import variables from './variables.mjs';
|
|
|
6
6
|
import rules from './rules.mjs';
|
|
7
7
|
import modes from './modes.mjs';
|
|
8
8
|
import functions from './functions.mjs';
|
|
9
|
+
import screens from './screens.mjs';
|
|
9
10
|
|
|
10
11
|
const config = {
|
|
11
12
|
at,
|
|
@@ -16,6 +17,7 @@ const config = {
|
|
|
16
17
|
animations,
|
|
17
18
|
variables,
|
|
18
19
|
modes,
|
|
20
|
+
screens,
|
|
19
21
|
scope: '',
|
|
20
22
|
rootSize: 16,
|
|
21
23
|
baseUnit: 4,
|
|
@@ -24,4 +26,4 @@ const config = {
|
|
|
24
26
|
defaultMode: 'light'
|
|
25
27
|
};
|
|
26
28
|
|
|
27
|
-
export { animations, at, config, functions, modes, rules, selectors, utilities, variables };
|
|
29
|
+
export { animations, at, config, functions, modes, rules, screens, selectors, utilities, variables };
|
package/dist/config/modes.d.ts
CHANGED
package/dist/config/rules.cjs
CHANGED
|
@@ -37,29 +37,24 @@ const rules = {
|
|
|
37
37
|
addProp(eachCssProperty);
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
|
-
|
|
41
|
-
addProps(eachNative.text);
|
|
42
|
-
}
|
|
40
|
+
addProps(rule.text);
|
|
43
41
|
// animation
|
|
44
42
|
if (rule.animationNames) {
|
|
45
43
|
if (!this.animationNames) {
|
|
46
|
-
this.animationNames =
|
|
44
|
+
this.animationNames = new Set();
|
|
47
45
|
}
|
|
48
46
|
for (const eachKeyframeName of rule.animationNames){
|
|
49
|
-
|
|
50
|
-
this.animationNames.push(eachKeyframeName);
|
|
51
|
-
}
|
|
47
|
+
this.animationNames.add(eachKeyframeName);
|
|
52
48
|
}
|
|
53
49
|
}
|
|
54
50
|
// variable
|
|
55
51
|
if (rule.variableNames) {
|
|
56
|
-
if (
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
for (const eachVariableName of rule.variableNames){
|
|
60
|
-
if (!this.variableNames.includes(eachVariableName)) {
|
|
61
|
-
this.variableNames.push(eachVariableName);
|
|
52
|
+
if (this.variableNames) {
|
|
53
|
+
for (const eachVariableName of rule.variableNames){
|
|
54
|
+
this.variableNames.add(eachVariableName);
|
|
62
55
|
}
|
|
56
|
+
} else {
|
|
57
|
+
this.variableNames = new Set(rule.variableNames);
|
|
63
58
|
}
|
|
64
59
|
}
|
|
65
60
|
};
|
|
@@ -551,6 +546,23 @@ const rules = {
|
|
|
551
546
|
};
|
|
552
547
|
}
|
|
553
548
|
},
|
|
549
|
+
container: {
|
|
550
|
+
type: syntaxRuleType.NativeShorthand
|
|
551
|
+
},
|
|
552
|
+
'container-name': {
|
|
553
|
+
type: syntaxRuleType.Native
|
|
554
|
+
},
|
|
555
|
+
'container-type': {
|
|
556
|
+
type: syntaxRuleType.Native,
|
|
557
|
+
ambiguousKeys: [
|
|
558
|
+
'container'
|
|
559
|
+
],
|
|
560
|
+
ambiguousValues: [
|
|
561
|
+
'size',
|
|
562
|
+
'inline-size',
|
|
563
|
+
'scroll-state'
|
|
564
|
+
]
|
|
565
|
+
},
|
|
554
566
|
contain: {
|
|
555
567
|
type: syntaxRuleType.Native
|
|
556
568
|
},
|
|
@@ -846,43 +858,13 @@ const rules = {
|
|
|
846
858
|
type: syntaxRuleType.Native
|
|
847
859
|
},
|
|
848
860
|
'overflow-x': {
|
|
849
|
-
type: syntaxRuleType.Native
|
|
850
|
-
declare (value) {
|
|
851
|
-
return value === 'overlay' ? {
|
|
852
|
-
'overflow-x': [
|
|
853
|
-
'auto',
|
|
854
|
-
value
|
|
855
|
-
]
|
|
856
|
-
} : {
|
|
857
|
-
'overflow-x': value
|
|
858
|
-
};
|
|
859
|
-
}
|
|
861
|
+
type: syntaxRuleType.Native
|
|
860
862
|
},
|
|
861
863
|
'overflow-y': {
|
|
862
|
-
type: syntaxRuleType.Native
|
|
863
|
-
declare (value) {
|
|
864
|
-
return value === 'overlay' ? {
|
|
865
|
-
'overflow-y': [
|
|
866
|
-
'auto',
|
|
867
|
-
value
|
|
868
|
-
]
|
|
869
|
-
} : {
|
|
870
|
-
'overflow-y': value
|
|
871
|
-
};
|
|
872
|
-
}
|
|
864
|
+
type: syntaxRuleType.Native
|
|
873
865
|
},
|
|
874
866
|
overflow: {
|
|
875
|
-
type: syntaxRuleType.NativeShorthand
|
|
876
|
-
declare (value) {
|
|
877
|
-
return value === 'overlay' ? {
|
|
878
|
-
overflow: [
|
|
879
|
-
'auto',
|
|
880
|
-
value
|
|
881
|
-
]
|
|
882
|
-
} : {
|
|
883
|
-
overflow: value
|
|
884
|
-
};
|
|
885
|
-
}
|
|
867
|
+
type: syntaxRuleType.NativeShorthand
|
|
886
868
|
},
|
|
887
869
|
'overscroll-behavior-x': {
|
|
888
870
|
type: syntaxRuleType.Native
|
package/dist/config/rules.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import SyntaxRuleType from '../syntax-rule-type';
|
|
2
1
|
import { SyntaxRuleDefinition } from '../types/config';
|
|
3
2
|
declare const rules: {
|
|
4
3
|
group: SyntaxRuleDefinition;
|
|
@@ -11,7 +10,7 @@ declare const rules: {
|
|
|
11
10
|
'font-variant-numeric': SyntaxRuleDefinition;
|
|
12
11
|
'font-variant': {
|
|
13
12
|
ambiguousKeys: string[];
|
|
14
|
-
type:
|
|
13
|
+
type: -3;
|
|
15
14
|
};
|
|
16
15
|
font: SyntaxRuleDefinition;
|
|
17
16
|
'font-feature-settings': SyntaxRuleDefinition;
|
|
@@ -52,6 +51,9 @@ declare const rules: {
|
|
|
52
51
|
'max-size': SyntaxRuleDefinition;
|
|
53
52
|
'box-sizing': SyntaxRuleDefinition;
|
|
54
53
|
'box-decoration-break': SyntaxRuleDefinition;
|
|
54
|
+
container: SyntaxRuleDefinition;
|
|
55
|
+
'container-name': SyntaxRuleDefinition;
|
|
56
|
+
'container-type': SyntaxRuleDefinition;
|
|
55
57
|
contain: SyntaxRuleDefinition;
|
|
56
58
|
content: SyntaxRuleDefinition;
|
|
57
59
|
'counter-increment': SyntaxRuleDefinition;
|
package/dist/config/rules.mjs
CHANGED
|
@@ -35,29 +35,24 @@ const rules = {
|
|
|
35
35
|
addProp(eachCssProperty);
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
-
|
|
39
|
-
addProps(eachNative.text);
|
|
40
|
-
}
|
|
38
|
+
addProps(rule.text);
|
|
41
39
|
// animation
|
|
42
40
|
if (rule.animationNames) {
|
|
43
41
|
if (!this.animationNames) {
|
|
44
|
-
this.animationNames =
|
|
42
|
+
this.animationNames = new Set();
|
|
45
43
|
}
|
|
46
44
|
for (const eachKeyframeName of rule.animationNames){
|
|
47
|
-
|
|
48
|
-
this.animationNames.push(eachKeyframeName);
|
|
49
|
-
}
|
|
45
|
+
this.animationNames.add(eachKeyframeName);
|
|
50
46
|
}
|
|
51
47
|
}
|
|
52
48
|
// variable
|
|
53
49
|
if (rule.variableNames) {
|
|
54
|
-
if (
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
for (const eachVariableName of rule.variableNames){
|
|
58
|
-
if (!this.variableNames.includes(eachVariableName)) {
|
|
59
|
-
this.variableNames.push(eachVariableName);
|
|
50
|
+
if (this.variableNames) {
|
|
51
|
+
for (const eachVariableName of rule.variableNames){
|
|
52
|
+
this.variableNames.add(eachVariableName);
|
|
60
53
|
}
|
|
54
|
+
} else {
|
|
55
|
+
this.variableNames = new Set(rule.variableNames);
|
|
61
56
|
}
|
|
62
57
|
}
|
|
63
58
|
};
|
|
@@ -549,6 +544,23 @@ const rules = {
|
|
|
549
544
|
};
|
|
550
545
|
}
|
|
551
546
|
},
|
|
547
|
+
container: {
|
|
548
|
+
type: SyntaxRuleType.NativeShorthand
|
|
549
|
+
},
|
|
550
|
+
'container-name': {
|
|
551
|
+
type: SyntaxRuleType.Native
|
|
552
|
+
},
|
|
553
|
+
'container-type': {
|
|
554
|
+
type: SyntaxRuleType.Native,
|
|
555
|
+
ambiguousKeys: [
|
|
556
|
+
'container'
|
|
557
|
+
],
|
|
558
|
+
ambiguousValues: [
|
|
559
|
+
'size',
|
|
560
|
+
'inline-size',
|
|
561
|
+
'scroll-state'
|
|
562
|
+
]
|
|
563
|
+
},
|
|
552
564
|
contain: {
|
|
553
565
|
type: SyntaxRuleType.Native
|
|
554
566
|
},
|
|
@@ -844,43 +856,13 @@ const rules = {
|
|
|
844
856
|
type: SyntaxRuleType.Native
|
|
845
857
|
},
|
|
846
858
|
'overflow-x': {
|
|
847
|
-
type: SyntaxRuleType.Native
|
|
848
|
-
declare (value) {
|
|
849
|
-
return value === 'overlay' ? {
|
|
850
|
-
'overflow-x': [
|
|
851
|
-
'auto',
|
|
852
|
-
value
|
|
853
|
-
]
|
|
854
|
-
} : {
|
|
855
|
-
'overflow-x': value
|
|
856
|
-
};
|
|
857
|
-
}
|
|
859
|
+
type: SyntaxRuleType.Native
|
|
858
860
|
},
|
|
859
861
|
'overflow-y': {
|
|
860
|
-
type: SyntaxRuleType.Native
|
|
861
|
-
declare (value) {
|
|
862
|
-
return value === 'overlay' ? {
|
|
863
|
-
'overflow-y': [
|
|
864
|
-
'auto',
|
|
865
|
-
value
|
|
866
|
-
]
|
|
867
|
-
} : {
|
|
868
|
-
'overflow-y': value
|
|
869
|
-
};
|
|
870
|
-
}
|
|
862
|
+
type: SyntaxRuleType.Native
|
|
871
863
|
},
|
|
872
864
|
overflow: {
|
|
873
|
-
type: SyntaxRuleType.NativeShorthand
|
|
874
|
-
declare (value) {
|
|
875
|
-
return value === 'overlay' ? {
|
|
876
|
-
overflow: [
|
|
877
|
-
'auto',
|
|
878
|
-
value
|
|
879
|
-
]
|
|
880
|
-
} : {
|
|
881
|
-
overflow: value
|
|
882
|
-
};
|
|
883
|
-
}
|
|
865
|
+
type: SyntaxRuleType.NativeShorthand
|
|
884
866
|
},
|
|
885
867
|
'overscroll-behavior-x': {
|
|
886
868
|
type: SyntaxRuleType.Native
|