stylelint-browser-compat 1.0.0-beta.1
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/LICENSE +21 -0
- package/README.md +91 -0
- package/lib/at-rules/at_rules_name_set.js +16 -0
- package/lib/at-rules/collect_features.js +145 -0
- package/lib/at-rules/counter-style/collect_features.js +41 -0
- package/lib/at-rules/counter-style/descriptor_name_set.js +16 -0
- package/lib/at-rules/document/collect_features.js +46 -0
- package/lib/at-rules/document/regexp/collect_features.js +30 -0
- package/lib/at-rules/font-face/__font_type/collect_features.js +79 -0
- package/lib/at-rules/font-face/collect_features.js +67 -0
- package/lib/at-rules/font-face/descriptor_name_set.js +16 -0
- package/lib/at-rules/font-feature-values/at_rules_name_set.js +16 -0
- package/lib/at-rules/font-feature-values/collect_features.js +30 -0
- package/lib/at-rules/keyframes/collect_features.js +29 -0
- package/lib/at-rules/media/collect_features.js +118 -0
- package/lib/at-rules/media/media_feature_name_map.js +8 -0
- package/lib/at-rules/page/collect_features.js +82 -0
- package/lib/at-rules/page/descriptor_name_set.js +16 -0
- package/lib/at-rules/page/size/collect_features.js +55 -0
- package/lib/at-rules/property/collect_features.js +60 -0
- package/lib/at-rules/property/descriptor_name_set.js +16 -0
- package/lib/at-rules/scroll-timeline/collect_features.js +60 -0
- package/lib/at-rules/scroll-timeline/descriptor_name_set.js +16 -0
- package/lib/collect_features.js +69 -0
- package/lib/index.js +5 -0
- package/lib/is_supported.js +75 -0
- package/lib/options.js +20 -0
- package/lib/parse_browserslist_version.js +132 -0
- package/lib/properties/-moz-orient/collect_features.js +61 -0
- package/lib/properties/-moz-user-input/collect_features.js +71 -0
- package/lib/properties/animation-direction/collect_features.js +53 -0
- package/lib/properties/animation-timing-function/collect_features.js +51 -0
- package/lib/properties/appearance/collect_features.js +76 -0
- package/lib/properties/background/background-clip/collect_features.js +59 -0
- package/lib/properties/background/background-origin/collect_features.js +59 -0
- package/lib/properties/background/background-size/collect_features.js +106 -0
- package/lib/properties/background/collect_features.js +104 -0
- package/lib/properties/background/multiple_backgrounds/collect_features.js +39 -0
- package/lib/properties/background-attachment/collect_features.js +70 -0
- package/lib/properties/background-clip/collect_features.js +55 -0
- package/lib/properties/background-image/collect_features.js +133 -0
- package/lib/properties/background-image/svg_images/collect_features.js +58 -0
- package/lib/properties/background-origin/collect_features.js +42 -0
- package/lib/properties/background-position/collect_features.js +117 -0
- package/lib/properties/background-position-x/collect_features.js +36 -0
- package/lib/properties/background-position-y/collect_features.js +36 -0
- package/lib/properties/background-repeat/collect_features.js +102 -0
- package/lib/properties/background-repeat/round_space/collect_features.js +54 -0
- package/lib/properties/background-size/collect_features.js +38 -0
- package/lib/properties/block-size/collect_features.js +77 -0
- package/lib/properties/border-bottom-left-radius/border-bottom-right-radius/collect_features.js +57 -0
- package/lib/properties/border-bottom-left-radius/collect_features.js +57 -0
- package/lib/properties/border-bottom-right-radius/collect_features.js +57 -0
- package/lib/properties/border-radius/collect_features.js +61 -0
- package/lib/properties/border-top-left-radius/collect_features.js +57 -0
- package/lib/properties/border-top-right-radius/collect_features.js +57 -0
- package/lib/properties/box-shadow/collect_features.js +92 -0
- package/lib/properties/box-sizing/collect_features.js +39 -0
- package/lib/properties/caption-side/collect_features.js +38 -0
- package/lib/properties/clear/collect_features.js +38 -0
- package/lib/properties/clip-path/collect_features.js +65 -0
- package/lib/properties/collect_features.js +452 -0
- package/lib/properties/color-scheme/collect_features.js +52 -0
- package/lib/properties/property_name_set.js +16 -0
- package/lib/properties/transition/collect_features.js +33 -0
- package/lib/properties/transition-property/collect_features.js +38 -0
- package/lib/rule.js +125 -0
- package/lib/selectors/__attributes/collect_features.js +44 -0
- package/lib/selectors/__classes/collect_features.js +23 -0
- package/lib/selectors/__combinators/collect_features.js +91 -0
- package/lib/selectors/__ids/collect_features.js +23 -0
- package/lib/selectors/__pseudos/collect_features.js +228 -0
- package/lib/selectors/__pseudos/pseudo_selector_name_set.js +18 -0
- package/lib/selectors/__tags/collect_features.js +48 -0
- package/lib/selectors/__universal/collect_features.js +37 -0
- package/lib/selectors/active/non_a_elements/collect_features.js +38 -0
- package/lib/selectors/after/animation_and_transition_support/collect_features.js +43 -0
- package/lib/selectors/backdrop/dialog/collect_features.js +38 -0
- package/lib/selectors/before/animation_and_transition_support/collect_features.js +43 -0
- package/lib/selectors/collect_features.js +120 -0
- package/lib/selectors/cue/selector_argument/collect_features.js +26 -0
- package/lib/selectors/hostfunction/collect_features.js +26 -0
- package/lib/selectors/hover/collect_features.js +61 -0
- package/lib/selectors/invalid/collect_features.js +39 -0
- package/lib/selectors/marker/animation_and_transition_support/collect_features.js +43 -0
- package/lib/selectors/not/selector_list/collect_features.js +31 -0
- package/lib/selectors/nth-child/of_syntax/collect_features.js +32 -0
- package/lib/selectors/nth-last-child/of_syntax/collect_features.js +32 -0
- package/lib/selectors/valid/collect_features.js +39 -0
- package/lib/types/__function/collect_features.js +187 -0
- package/lib/types/attr/collect_features.js +69 -0
- package/lib/types/attr/type_unit_name_map.js +8 -0
- package/lib/types/calc/collect_features.js +70 -0
- package/lib/types/collect_features.js +139 -0
- package/lib/types/color/__alpha_parameter/collect_features.js +37 -0
- package/lib/types/color/__float_values/collect_features.js +44 -0
- package/lib/types/color/__space_separated_parameters/collect_features.js +37 -0
- package/lib/types/color/rgb_hexadecimal_notation/collect_features.js +42 -0
- package/lib/types/easing-function/steps/jump/collect_features.js +37 -0
- package/lib/types/function_name_map.js +8 -0
- package/lib/types/image/gradient/__linear-gradient/collect_features.js +77 -0
- package/lib/types/image/gradient/__linear-gradient/doubleposition/collect_features.js +43 -0
- package/lib/types/image/gradient/__linear-gradient/interpolation_hints/collect_features.js +42 -0
- package/lib/types/image/gradient/__linear-gradient/to/collect_features.js +39 -0
- package/lib/types/image/gradient/__linear-gradient/unitless_0_angle/collect_features.js +40 -0
- package/lib/types/image/gradient/__radial-gradient/at/collect_features.js +44 -0
- package/lib/types/image/gradient/__radial-gradient/collect_features.js +68 -0
- package/lib/types/image/gradient/__radial-gradient/doubleposition/collect_features.js +47 -0
- package/lib/types/image/gradient/__radial-gradient/interpolation_hints/collect_features.js +42 -0
- package/lib/types/image/gradient/conic-gradient/collect_features.js +48 -0
- package/lib/types/image/gradient/conic-gradient/doubleposition/collect_features.js +43 -0
- package/lib/types/number/scientific_notation/collect_features.js +31 -0
- package/lib/types/unit_name_map.js +8 -0
- package/lib/types/value_name_map.js +8 -0
- package/lib/types.js +5 -0
- package/package.json +75 -0
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.collectFeatures = collectFeatures;
|
|
7
|
+
|
|
8
|
+
var _property_name_set = require("./property_name_set");
|
|
9
|
+
|
|
10
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
|
+
|
|
12
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
|
+
|
|
14
|
+
async function collectFeatures({
|
|
15
|
+
node,
|
|
16
|
+
valueRoot
|
|
17
|
+
}) {
|
|
18
|
+
const promises = [];
|
|
19
|
+
const [vendorPrefix] = /^-(webkit|moz|ms|o)-/.exec(node.prop) ?? [];
|
|
20
|
+
|
|
21
|
+
if (_property_name_set.propertyNameSet.has(node.prop)) {
|
|
22
|
+
promises.push(Promise.resolve([{
|
|
23
|
+
endIndex: node.prop.length,
|
|
24
|
+
id: `properties.${node.prop}`,
|
|
25
|
+
index: 0,
|
|
26
|
+
name: `"${node.prop}" property`,
|
|
27
|
+
node
|
|
28
|
+
}]));
|
|
29
|
+
} else if (vendorPrefix != null) {
|
|
30
|
+
const prop = node.prop.replace(vendorPrefix, '');
|
|
31
|
+
|
|
32
|
+
if (_property_name_set.propertyNameSet.has(prop)) {
|
|
33
|
+
promises.push(Promise.resolve([{
|
|
34
|
+
endIndex: node.prop.length,
|
|
35
|
+
id: `properties.${prop}`,
|
|
36
|
+
index: 0,
|
|
37
|
+
name: `"${prop}" property`,
|
|
38
|
+
node: node,
|
|
39
|
+
prefix: vendorPrefix
|
|
40
|
+
}]));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const normalizedProps = _property_name_set.propertyNameSet.has(node.prop) ? node.prop : node.prop.replace(/^-(webkit|moz|ms|o)-/, '');
|
|
45
|
+
|
|
46
|
+
switch (normalizedProps) {
|
|
47
|
+
case '-moz-orient':
|
|
48
|
+
{
|
|
49
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./-moz-orient/collect_features"))).then(({
|
|
50
|
+
collectFeatures
|
|
51
|
+
}) => {
|
|
52
|
+
return collectFeatures({
|
|
53
|
+
nodes: valueRoot.nodes,
|
|
54
|
+
parent: node
|
|
55
|
+
});
|
|
56
|
+
}));
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
case '-moz-user-input':
|
|
61
|
+
{
|
|
62
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./-moz-user-input/collect_features"))).then(({
|
|
63
|
+
collectFeatures
|
|
64
|
+
}) => {
|
|
65
|
+
return collectFeatures({
|
|
66
|
+
nodes: valueRoot.nodes,
|
|
67
|
+
parent: node
|
|
68
|
+
});
|
|
69
|
+
}));
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
case 'animation':
|
|
74
|
+
{
|
|
75
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./animation-direction/collect_features"))).then(({
|
|
76
|
+
collectFeatures
|
|
77
|
+
}) => {
|
|
78
|
+
return collectFeatures({
|
|
79
|
+
nodes: valueRoot.nodes,
|
|
80
|
+
parent: node
|
|
81
|
+
});
|
|
82
|
+
}));
|
|
83
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./animation-timing-function/collect_features"))).then(({
|
|
84
|
+
collectFeatures
|
|
85
|
+
}) => {
|
|
86
|
+
return collectFeatures({
|
|
87
|
+
nodes: valueRoot.nodes,
|
|
88
|
+
parent: node
|
|
89
|
+
});
|
|
90
|
+
}));
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
case 'animation-direction':
|
|
95
|
+
{
|
|
96
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./animation-direction/collect_features"))).then(({
|
|
97
|
+
collectFeatures
|
|
98
|
+
}) => {
|
|
99
|
+
return collectFeatures({
|
|
100
|
+
nodes: valueRoot.nodes,
|
|
101
|
+
parent: node
|
|
102
|
+
});
|
|
103
|
+
}));
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
case 'animation-timing-function':
|
|
108
|
+
{
|
|
109
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./animation-timing-function/collect_features"))).then(({
|
|
110
|
+
collectFeatures
|
|
111
|
+
}) => {
|
|
112
|
+
return collectFeatures({
|
|
113
|
+
nodes: valueRoot.nodes,
|
|
114
|
+
parent: node
|
|
115
|
+
});
|
|
116
|
+
}));
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
case 'appearance':
|
|
121
|
+
{
|
|
122
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./appearance/collect_features"))).then(({
|
|
123
|
+
collectFeatures
|
|
124
|
+
}) => {
|
|
125
|
+
return collectFeatures({
|
|
126
|
+
nodes: valueRoot.nodes,
|
|
127
|
+
parent: node
|
|
128
|
+
});
|
|
129
|
+
}));
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
case 'background':
|
|
134
|
+
{
|
|
135
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./background/collect_features"))).then(({
|
|
136
|
+
collectFeatures
|
|
137
|
+
}) => {
|
|
138
|
+
return collectFeatures({
|
|
139
|
+
nodes: valueRoot.nodes,
|
|
140
|
+
parent: node
|
|
141
|
+
});
|
|
142
|
+
}));
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
case 'background-attachment':
|
|
147
|
+
{
|
|
148
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./background-attachment/collect_features"))).then(({
|
|
149
|
+
collectFeatures
|
|
150
|
+
}) => {
|
|
151
|
+
return collectFeatures({
|
|
152
|
+
nodes: valueRoot.nodes,
|
|
153
|
+
parent: node
|
|
154
|
+
});
|
|
155
|
+
}));
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
case 'background-clip':
|
|
160
|
+
{
|
|
161
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./background-clip/collect_features"))).then(({
|
|
162
|
+
collectFeatures
|
|
163
|
+
}) => {
|
|
164
|
+
return collectFeatures({
|
|
165
|
+
nodes: valueRoot.nodes,
|
|
166
|
+
parent: node
|
|
167
|
+
});
|
|
168
|
+
}));
|
|
169
|
+
break;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
case 'background-image':
|
|
173
|
+
{
|
|
174
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./background-image/collect_features"))).then(({
|
|
175
|
+
collectFeatures
|
|
176
|
+
}) => {
|
|
177
|
+
return collectFeatures({
|
|
178
|
+
nodes: valueRoot.nodes,
|
|
179
|
+
parent: node
|
|
180
|
+
});
|
|
181
|
+
}));
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
case 'background-origin':
|
|
186
|
+
{
|
|
187
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./background-origin/collect_features"))).then(({
|
|
188
|
+
collectFeatures
|
|
189
|
+
}) => {
|
|
190
|
+
return collectFeatures({
|
|
191
|
+
nodes: valueRoot.nodes,
|
|
192
|
+
parent: node
|
|
193
|
+
});
|
|
194
|
+
}));
|
|
195
|
+
break;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
case 'background-position':
|
|
199
|
+
{
|
|
200
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./background-position/collect_features"))).then(({
|
|
201
|
+
collectFeatures
|
|
202
|
+
}) => {
|
|
203
|
+
return collectFeatures({
|
|
204
|
+
nodes: valueRoot.nodes,
|
|
205
|
+
parent: node
|
|
206
|
+
});
|
|
207
|
+
}));
|
|
208
|
+
break;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
case 'background-position-x':
|
|
212
|
+
{
|
|
213
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./background-position-x/collect_features"))).then(({
|
|
214
|
+
collectFeatures
|
|
215
|
+
}) => {
|
|
216
|
+
return collectFeatures({
|
|
217
|
+
nodes: valueRoot.nodes,
|
|
218
|
+
parent: node
|
|
219
|
+
});
|
|
220
|
+
}));
|
|
221
|
+
break;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
case 'background-position-y':
|
|
225
|
+
{
|
|
226
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./background-position-y/collect_features"))).then(({
|
|
227
|
+
collectFeatures
|
|
228
|
+
}) => {
|
|
229
|
+
return collectFeatures({
|
|
230
|
+
nodes: valueRoot.nodes,
|
|
231
|
+
parent: node
|
|
232
|
+
});
|
|
233
|
+
}));
|
|
234
|
+
break;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
case 'background-repeat':
|
|
238
|
+
{
|
|
239
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./background-repeat/collect_features"))).then(({
|
|
240
|
+
collectFeatures
|
|
241
|
+
}) => {
|
|
242
|
+
return collectFeatures({
|
|
243
|
+
nodes: valueRoot.nodes,
|
|
244
|
+
parent: node
|
|
245
|
+
});
|
|
246
|
+
}));
|
|
247
|
+
break;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
case 'background-size':
|
|
251
|
+
{
|
|
252
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./background-size/collect_features"))).then(({
|
|
253
|
+
collectFeatures
|
|
254
|
+
}) => {
|
|
255
|
+
return collectFeatures({
|
|
256
|
+
nodes: valueRoot.nodes,
|
|
257
|
+
parent: node
|
|
258
|
+
});
|
|
259
|
+
}));
|
|
260
|
+
break;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
case 'block-size':
|
|
264
|
+
{
|
|
265
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./block-size/collect_features"))).then(({
|
|
266
|
+
collectFeatures
|
|
267
|
+
}) => {
|
|
268
|
+
return collectFeatures({
|
|
269
|
+
nodes: valueRoot.nodes,
|
|
270
|
+
parent: node
|
|
271
|
+
});
|
|
272
|
+
}));
|
|
273
|
+
break;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
case 'border-bottom-left-radius':
|
|
277
|
+
{
|
|
278
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./border-bottom-left-radius/collect_features"))).then(({
|
|
279
|
+
collectFeatures
|
|
280
|
+
}) => {
|
|
281
|
+
return collectFeatures({
|
|
282
|
+
nodes: valueRoot.nodes,
|
|
283
|
+
parent: node
|
|
284
|
+
});
|
|
285
|
+
}));
|
|
286
|
+
break;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
case 'border-bottom-right-radius':
|
|
290
|
+
{
|
|
291
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./border-bottom-right-radius/collect_features"))).then(({
|
|
292
|
+
collectFeatures
|
|
293
|
+
}) => {
|
|
294
|
+
return collectFeatures({
|
|
295
|
+
nodes: valueRoot.nodes,
|
|
296
|
+
parent: node
|
|
297
|
+
});
|
|
298
|
+
}));
|
|
299
|
+
break;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
case 'border-top-left-radius':
|
|
303
|
+
{
|
|
304
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./border-top-left-radius/collect_features"))).then(({
|
|
305
|
+
collectFeatures
|
|
306
|
+
}) => {
|
|
307
|
+
return collectFeatures({
|
|
308
|
+
nodes: valueRoot.nodes,
|
|
309
|
+
parent: node
|
|
310
|
+
});
|
|
311
|
+
}));
|
|
312
|
+
break;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
case 'border-top-right-radius':
|
|
316
|
+
{
|
|
317
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./border-top-right-radius/collect_features"))).then(({
|
|
318
|
+
collectFeatures
|
|
319
|
+
}) => {
|
|
320
|
+
return collectFeatures({
|
|
321
|
+
nodes: valueRoot.nodes,
|
|
322
|
+
parent: node
|
|
323
|
+
});
|
|
324
|
+
}));
|
|
325
|
+
break;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
case 'border-radius':
|
|
329
|
+
{
|
|
330
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./border-radius/collect_features"))).then(({
|
|
331
|
+
collectFeatures
|
|
332
|
+
}) => {
|
|
333
|
+
return collectFeatures({
|
|
334
|
+
nodes: valueRoot.nodes,
|
|
335
|
+
parent: node
|
|
336
|
+
});
|
|
337
|
+
}));
|
|
338
|
+
break;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
case 'box-shadow':
|
|
342
|
+
{
|
|
343
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./box-shadow/collect_features"))).then(({
|
|
344
|
+
collectFeatures
|
|
345
|
+
}) => {
|
|
346
|
+
return collectFeatures({
|
|
347
|
+
nodes: valueRoot.nodes,
|
|
348
|
+
parent: node
|
|
349
|
+
});
|
|
350
|
+
}));
|
|
351
|
+
break;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
case 'box-sizing':
|
|
355
|
+
{
|
|
356
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./box-sizing/collect_features"))).then(({
|
|
357
|
+
collectFeatures
|
|
358
|
+
}) => {
|
|
359
|
+
return collectFeatures({
|
|
360
|
+
nodes: valueRoot.nodes,
|
|
361
|
+
parent: node
|
|
362
|
+
});
|
|
363
|
+
}));
|
|
364
|
+
break;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
case 'caption-side':
|
|
368
|
+
{
|
|
369
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./caption-side/collect_features"))).then(({
|
|
370
|
+
collectFeatures
|
|
371
|
+
}) => {
|
|
372
|
+
return collectFeatures({
|
|
373
|
+
nodes: valueRoot.nodes,
|
|
374
|
+
parent: node
|
|
375
|
+
});
|
|
376
|
+
}));
|
|
377
|
+
break;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
case 'clear':
|
|
381
|
+
{
|
|
382
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./clear/collect_features"))).then(({
|
|
383
|
+
collectFeatures
|
|
384
|
+
}) => {
|
|
385
|
+
return collectFeatures({
|
|
386
|
+
nodes: valueRoot.nodes,
|
|
387
|
+
parent: node
|
|
388
|
+
});
|
|
389
|
+
}));
|
|
390
|
+
break;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
case 'clip-path':
|
|
394
|
+
{
|
|
395
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./clip-path/collect_features"))).then(({
|
|
396
|
+
collectFeatures
|
|
397
|
+
}) => {
|
|
398
|
+
return collectFeatures({
|
|
399
|
+
nodes: valueRoot.nodes,
|
|
400
|
+
parent: node
|
|
401
|
+
});
|
|
402
|
+
}));
|
|
403
|
+
break;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
case 'color-scheme':
|
|
407
|
+
{
|
|
408
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./color-scheme/collect_features"))).then(({
|
|
409
|
+
collectFeatures
|
|
410
|
+
}) => {
|
|
411
|
+
return collectFeatures({
|
|
412
|
+
nodes: valueRoot.nodes,
|
|
413
|
+
parent: node
|
|
414
|
+
});
|
|
415
|
+
}));
|
|
416
|
+
break;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
case 'transition':
|
|
420
|
+
{
|
|
421
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./transition/collect_features"))).then(({
|
|
422
|
+
collectFeatures
|
|
423
|
+
}) => {
|
|
424
|
+
return collectFeatures({
|
|
425
|
+
nodes: valueRoot.nodes,
|
|
426
|
+
parent: node
|
|
427
|
+
});
|
|
428
|
+
}));
|
|
429
|
+
break;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
case 'transition-property':
|
|
433
|
+
{
|
|
434
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./transition-property/collect_features"))).then(({
|
|
435
|
+
collectFeatures
|
|
436
|
+
}) => {
|
|
437
|
+
return collectFeatures({
|
|
438
|
+
nodes: valueRoot.nodes,
|
|
439
|
+
parent: node
|
|
440
|
+
});
|
|
441
|
+
}));
|
|
442
|
+
break;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
default:
|
|
446
|
+
{// TODO...
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
const features = (await Promise.all(promises)).flat();
|
|
451
|
+
return features;
|
|
452
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.collectFeatures = collectFeatures;
|
|
7
|
+
|
|
8
|
+
async function collectFeatures({
|
|
9
|
+
nodes,
|
|
10
|
+
parent
|
|
11
|
+
}) {
|
|
12
|
+
var _parent$raws$between;
|
|
13
|
+
|
|
14
|
+
const prop = parent.prop.replace(/^-(webkit|moz|ms|o)-/, '');
|
|
15
|
+
|
|
16
|
+
if (prop !== 'color-scheme') {
|
|
17
|
+
return [];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const features = [];
|
|
21
|
+
const offset = parent.prop.length + (((_parent$raws$between = parent.raws.between) === null || _parent$raws$between === void 0 ? void 0 : _parent$raws$between.length) ?? 0);
|
|
22
|
+
const first = nodes[0];
|
|
23
|
+
const second = nodes[2];
|
|
24
|
+
|
|
25
|
+
if ((first === null || first === void 0 ? void 0 : first.type) === 'word' && (second === null || second === void 0 ? void 0 : second.type) === 'word') {
|
|
26
|
+
if (first.value === 'only' && second.value === 'light') {
|
|
27
|
+
const index = offset + first.sourceIndex;
|
|
28
|
+
const endIndex = offset + second.sourceEndIndex;
|
|
29
|
+
features.push({
|
|
30
|
+
endIndex,
|
|
31
|
+
id: `properties.color-scheme.only_light`,
|
|
32
|
+
index,
|
|
33
|
+
name: `"only light" keyword specified as color-scheme`,
|
|
34
|
+
node: parent
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (first.value === 'only' && second.value === 'dark') {
|
|
39
|
+
const index = offset + first.sourceIndex;
|
|
40
|
+
const endIndex = offset + second.sourceEndIndex;
|
|
41
|
+
features.push({
|
|
42
|
+
endIndex,
|
|
43
|
+
id: `properties.color-scheme.only_dark`,
|
|
44
|
+
index,
|
|
45
|
+
name: `"only dark" keyword specified as color-scheme`,
|
|
46
|
+
node: parent
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return features;
|
|
52
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.propertyNameSet = void 0;
|
|
7
|
+
|
|
8
|
+
var _browserCompatData = _interopRequireDefault(require("@mdn/browser-compat-data"));
|
|
9
|
+
|
|
10
|
+
var _dotProp = _interopRequireDefault(require("dot-prop"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
const IGNORE_KEYS = new Set([]);
|
|
15
|
+
const propertyNameSet = new Set(Array.from(Object.keys(_dotProp.default.get(_browserCompatData.default.css, 'properties') ?? {})).filter(k => !IGNORE_KEYS.has(k)));
|
|
16
|
+
exports.propertyNameSet = propertyNameSet;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.collectFeatures = collectFeatures;
|
|
7
|
+
|
|
8
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
9
|
+
|
|
10
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
11
|
+
|
|
12
|
+
async function collectFeatures({
|
|
13
|
+
nodes,
|
|
14
|
+
parent
|
|
15
|
+
}) {
|
|
16
|
+
const prop = parent.prop.replace(/^-(webkit|moz|ms|o)-/, '');
|
|
17
|
+
|
|
18
|
+
if (prop !== 'transition') {
|
|
19
|
+
return [];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const promises = [];
|
|
23
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("../transition-property/collect_features"))).then(({
|
|
24
|
+
collectFeatures
|
|
25
|
+
}) => {
|
|
26
|
+
return collectFeatures({
|
|
27
|
+
nodes,
|
|
28
|
+
parent
|
|
29
|
+
});
|
|
30
|
+
}));
|
|
31
|
+
const features = (await Promise.all(promises)).flat();
|
|
32
|
+
return features;
|
|
33
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.collectFeatures = collectFeatures;
|
|
7
|
+
|
|
8
|
+
async function collectFeatures({
|
|
9
|
+
nodes,
|
|
10
|
+
parent
|
|
11
|
+
}) {
|
|
12
|
+
var _parent$raws$between;
|
|
13
|
+
|
|
14
|
+
const prop = parent.prop.replace(/^-(webkit|moz|ms|o)-/, '');
|
|
15
|
+
|
|
16
|
+
if (prop !== 'transition' && prop !== 'transition-property') {
|
|
17
|
+
return [];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const features = [];
|
|
21
|
+
const offset = parent.prop.length + (((_parent$raws$between = parent.raws.between) === null || _parent$raws$between === void 0 ? void 0 : _parent$raws$between.length) ?? 0);
|
|
22
|
+
|
|
23
|
+
for (const node of nodes) {
|
|
24
|
+
if (node.type === 'word' && node.value === 'clip-path') {
|
|
25
|
+
const index = offset + node.sourceIndex;
|
|
26
|
+
const endIndex = offset + node.sourceEndIndex;
|
|
27
|
+
features.push({
|
|
28
|
+
endIndex,
|
|
29
|
+
id: `properties.clip-path.animations`,
|
|
30
|
+
index,
|
|
31
|
+
name: `CSS transition for clip-path`,
|
|
32
|
+
node: parent
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return features;
|
|
38
|
+
}
|