@projectwallace/css-parser 0.5.0 → 0.6.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.
@@ -1,467 +0,0 @@
1
- import { L as Lexer, q as TOKEN_COMMA, T as TOKEN_IDENT, t as TOKEN_LEFT_PAREN, u as TOKEN_RIGHT_PAREN, l as TOKEN_WHITESPACE, f as TOKEN_URL, a as TOKEN_FUNCTION, d as TOKEN_STRING, y as TOKEN_EOF } from './lexer-DXablYMZ.js';
2
- import { R as str_equals, E as NODE_PRELUDE_OPERATOR, y as NODE_PRELUDE_MEDIA_TYPE, w as NODE_PRELUDE_MEDIA_QUERY, x as NODE_PRELUDE_MEDIA_FEATURE, Q as trim_boundaries, D as NODE_PRELUDE_IDENTIFIER, z as NODE_PRELUDE_CONTAINER_QUERY, A as NODE_PRELUDE_SUPPORTS_QUERY, B as NODE_PRELUDE_LAYER_NAME, F as NODE_PRELUDE_IMPORT_URL, G as NODE_PRELUDE_IMPORT_LAYER, H as NODE_PRELUDE_IMPORT_SUPPORTS, S as CHAR_SPACE, T as CHAR_TAB, U as CHAR_NEWLINE, V as CHAR_CARRIAGE_RETURN, W as CHAR_FORM_FEED } from './string-utils-tMt2O9RW.js';
3
-
4
- class AtRulePreludeParser {
5
- lexer;
6
- arena;
7
- source;
8
- prelude_end;
9
- constructor(arena, source) {
10
- this.arena = arena;
11
- this.source = source;
12
- this.lexer = new Lexer(source, false);
13
- this.prelude_end = 0;
14
- }
15
- // Parse an at-rule prelude into nodes based on the at-rule type
16
- parse_prelude(at_rule_name, start, end, line = 1, column = 1) {
17
- this.prelude_end = end;
18
- this.lexer.pos = start;
19
- this.lexer.line = line;
20
- this.lexer.column = column;
21
- if (str_equals("media", at_rule_name)) {
22
- return this.parse_media_query_list();
23
- } else if (str_equals("container", at_rule_name)) {
24
- return this.parse_container_query();
25
- } else if (str_equals("supports", at_rule_name)) {
26
- return this.parse_supports_query();
27
- } else if (str_equals("layer", at_rule_name)) {
28
- return this.parse_layer_names();
29
- } else if (str_equals("keyframes", at_rule_name)) {
30
- return this.parse_identifier();
31
- } else if (str_equals("property", at_rule_name)) {
32
- return this.parse_identifier();
33
- } else if (str_equals("import", at_rule_name)) {
34
- return this.parse_import_prelude();
35
- }
36
- return [];
37
- }
38
- // Parse media query list: screen, (min-width: 768px), ...
39
- parse_media_query_list() {
40
- let nodes = [];
41
- while (this.lexer.pos < this.prelude_end) {
42
- this.skip_whitespace();
43
- if (this.lexer.pos >= this.prelude_end) break;
44
- let query = this.parse_single_media_query();
45
- if (query !== null) {
46
- nodes.push(query);
47
- }
48
- this.skip_whitespace();
49
- if (this.peek_token_type() === TOKEN_COMMA) {
50
- this.next_token();
51
- }
52
- }
53
- return nodes;
54
- }
55
- is_and_or_not(str) {
56
- if (str.length > 3 || str.length < 2) return false;
57
- return str_equals("and", str) || str_equals("or", str) || str_equals("not", str);
58
- }
59
- // Parse a single media query: screen and (min-width: 768px)
60
- parse_single_media_query() {
61
- let query_start = this.lexer.pos;
62
- let query_line = this.lexer.line;
63
- this.lexer.column;
64
- this.skip_whitespace();
65
- if (this.lexer.pos >= this.prelude_end) return null;
66
- let token_start = this.lexer.pos;
67
- this.next_token();
68
- if (this.lexer.token_type === TOKEN_IDENT) {
69
- let text = this.source.substring(this.lexer.token_start, this.lexer.token_end);
70
- if (!str_equals("only", text) && !str_equals("not", text)) {
71
- this.lexer.pos = token_start;
72
- }
73
- } else {
74
- this.lexer.pos = token_start;
75
- }
76
- let components = [];
77
- while (this.lexer.pos < this.prelude_end) {
78
- this.skip_whitespace();
79
- if (this.lexer.pos >= this.prelude_end) break;
80
- if (this.peek_token_type() === TOKEN_COMMA) break;
81
- this.next_token();
82
- let token_type = this.lexer.token_type;
83
- if (token_type === TOKEN_LEFT_PAREN) {
84
- let feature = this.parse_media_feature();
85
- if (feature !== null) {
86
- components.push(feature);
87
- }
88
- } else if (token_type === TOKEN_IDENT) {
89
- let text = this.source.substring(this.lexer.token_start, this.lexer.token_end);
90
- if (this.is_and_or_not(text)) {
91
- let op = this.arena.create_node();
92
- this.arena.set_type(op, NODE_PRELUDE_OPERATOR);
93
- this.arena.set_start_offset(op, this.lexer.token_start);
94
- this.arena.set_length(op, this.lexer.token_end - this.lexer.token_start);
95
- this.arena.set_start_line(op, this.lexer.token_line);
96
- components.push(op);
97
- } else {
98
- let media_type = this.arena.create_node();
99
- this.arena.set_type(media_type, NODE_PRELUDE_MEDIA_TYPE);
100
- this.arena.set_start_offset(media_type, this.lexer.token_start);
101
- this.arena.set_length(media_type, this.lexer.token_end - this.lexer.token_start);
102
- this.arena.set_start_line(media_type, this.lexer.token_line);
103
- this.arena.set_start_column(media_type, this.lexer.token_column);
104
- components.push(media_type);
105
- }
106
- } else {
107
- break;
108
- }
109
- }
110
- if (components.length === 0) return null;
111
- let query_node = this.arena.create_node();
112
- this.arena.set_type(query_node, NODE_PRELUDE_MEDIA_QUERY);
113
- this.arena.set_start_offset(query_node, query_start);
114
- this.arena.set_length(query_node, this.lexer.pos - query_start);
115
- this.arena.set_start_line(query_node, query_line);
116
- for (let component of components) {
117
- this.arena.append_child(query_node, component);
118
- }
119
- return query_node;
120
- }
121
- // Parse media feature: (min-width: 768px)
122
- parse_media_feature() {
123
- let feature_start = this.lexer.token_start;
124
- let feature_line = this.lexer.token_line;
125
- let depth = 1;
126
- let content_start = this.lexer.pos;
127
- while (this.lexer.pos < this.prelude_end && depth > 0) {
128
- this.next_token();
129
- let token_type = this.lexer.token_type;
130
- if (token_type === TOKEN_LEFT_PAREN) {
131
- depth++;
132
- } else if (token_type === TOKEN_RIGHT_PAREN) {
133
- depth--;
134
- }
135
- }
136
- if (depth !== 0) return null;
137
- let content_end = this.lexer.token_start;
138
- let feature_end = this.lexer.token_end;
139
- let feature = this.arena.create_node();
140
- this.arena.set_type(feature, NODE_PRELUDE_MEDIA_FEATURE);
141
- this.arena.set_start_offset(feature, feature_start);
142
- this.arena.set_length(feature, feature_end - feature_start);
143
- this.arena.set_start_line(feature, feature_line);
144
- let trimmed = trim_boundaries(this.source, content_start, content_end);
145
- if (trimmed) {
146
- this.arena.set_value_start(feature, trimmed[0]);
147
- this.arena.set_value_length(feature, trimmed[1] - trimmed[0]);
148
- }
149
- return feature;
150
- }
151
- // Parse container query: [name] and (min-width: 400px)
152
- parse_container_query() {
153
- let nodes = [];
154
- let query_start = this.lexer.pos;
155
- let query_line = this.lexer.line;
156
- let components = [];
157
- while (this.lexer.pos < this.prelude_end) {
158
- this.skip_whitespace();
159
- if (this.lexer.pos >= this.prelude_end) break;
160
- this.next_token();
161
- let token_type = this.lexer.token_type;
162
- if (token_type === TOKEN_LEFT_PAREN) {
163
- let feature = this.parse_media_feature();
164
- if (feature !== null) {
165
- components.push(feature);
166
- }
167
- } else if (token_type === TOKEN_IDENT) {
168
- let text = this.source.substring(this.lexer.token_start, this.lexer.token_end);
169
- if (this.is_and_or_not(text)) {
170
- let op = this.arena.create_node();
171
- this.arena.set_type(op, NODE_PRELUDE_OPERATOR);
172
- this.arena.set_start_offset(op, this.lexer.token_start);
173
- this.arena.set_length(op, this.lexer.token_end - this.lexer.token_start);
174
- this.arena.set_start_line(op, this.lexer.token_line);
175
- components.push(op);
176
- } else {
177
- let name = this.arena.create_node();
178
- this.arena.set_type(name, NODE_PRELUDE_IDENTIFIER);
179
- this.arena.set_start_offset(name, this.lexer.token_start);
180
- this.arena.set_length(name, this.lexer.token_end - this.lexer.token_start);
181
- this.arena.set_start_line(name, this.lexer.token_line);
182
- components.push(name);
183
- }
184
- }
185
- }
186
- if (components.length === 0) return [];
187
- let query_node = this.arena.create_node();
188
- this.arena.set_type(query_node, NODE_PRELUDE_CONTAINER_QUERY);
189
- this.arena.set_start_offset(query_node, query_start);
190
- this.arena.set_length(query_node, this.lexer.pos - query_start);
191
- this.arena.set_start_line(query_node, query_line);
192
- for (let component of components) {
193
- this.arena.append_child(query_node, component);
194
- }
195
- nodes.push(query_node);
196
- return nodes;
197
- }
198
- // Parse supports query: (display: flex) and (gap: 1rem)
199
- parse_supports_query() {
200
- let nodes = [];
201
- while (this.lexer.pos < this.prelude_end) {
202
- this.skip_whitespace();
203
- if (this.lexer.pos >= this.prelude_end) break;
204
- this.next_token();
205
- let token_type = this.lexer.token_type;
206
- if (token_type === TOKEN_LEFT_PAREN) {
207
- let feature_start = this.lexer.token_start;
208
- let feature_line = this.lexer.token_line;
209
- let depth = 1;
210
- let content_start = this.lexer.pos;
211
- while (this.lexer.pos < this.prelude_end && depth > 0) {
212
- this.next_token();
213
- let inner_token_type = this.lexer.token_type;
214
- if (inner_token_type === TOKEN_LEFT_PAREN) {
215
- depth++;
216
- } else if (inner_token_type === TOKEN_RIGHT_PAREN) {
217
- depth--;
218
- }
219
- }
220
- if (depth === 0) {
221
- let content_end = this.lexer.token_start;
222
- let feature_end = this.lexer.token_end;
223
- let query = this.arena.create_node();
224
- this.arena.set_type(query, NODE_PRELUDE_SUPPORTS_QUERY);
225
- this.arena.set_start_offset(query, feature_start);
226
- this.arena.set_length(query, feature_end - feature_start);
227
- this.arena.set_start_line(query, feature_line);
228
- let trimmed = trim_boundaries(this.source, content_start, content_end);
229
- if (trimmed) {
230
- this.arena.set_value_start(query, trimmed[0]);
231
- this.arena.set_value_length(query, trimmed[1] - trimmed[0]);
232
- }
233
- nodes.push(query);
234
- }
235
- } else if (token_type === TOKEN_IDENT) {
236
- let text = this.source.substring(this.lexer.token_start, this.lexer.token_end);
237
- if (this.is_and_or_not(text)) {
238
- let op = this.arena.create_node();
239
- this.arena.set_type(op, NODE_PRELUDE_OPERATOR);
240
- this.arena.set_start_offset(op, this.lexer.token_start);
241
- this.arena.set_length(op, this.lexer.token_end - this.lexer.token_start);
242
- this.arena.set_start_line(op, this.lexer.token_line);
243
- nodes.push(op);
244
- }
245
- }
246
- }
247
- return nodes;
248
- }
249
- // Parse layer names: base, components, utilities
250
- parse_layer_names() {
251
- let nodes = [];
252
- while (this.lexer.pos < this.prelude_end) {
253
- this.skip_whitespace();
254
- if (this.lexer.pos >= this.prelude_end) break;
255
- this.next_token();
256
- let token_type = this.lexer.token_type;
257
- if (token_type === TOKEN_IDENT) {
258
- let layer = this.arena.create_node();
259
- this.arena.set_type(layer, NODE_PRELUDE_LAYER_NAME);
260
- this.arena.set_start_offset(layer, this.lexer.token_start);
261
- this.arena.set_length(layer, this.lexer.token_end - this.lexer.token_start);
262
- this.arena.set_start_line(layer, this.lexer.token_line);
263
- nodes.push(layer);
264
- } else if (token_type === TOKEN_COMMA) {
265
- continue;
266
- } else if (token_type === TOKEN_WHITESPACE) {
267
- continue;
268
- }
269
- }
270
- return nodes;
271
- }
272
- // Parse single identifier: keyframe name, property name
273
- parse_identifier() {
274
- this.skip_whitespace();
275
- if (this.lexer.pos >= this.prelude_end) return [];
276
- this.next_token();
277
- if (this.lexer.token_type !== TOKEN_IDENT) return [];
278
- let ident = this.arena.create_node();
279
- this.arena.set_type(ident, NODE_PRELUDE_IDENTIFIER);
280
- this.arena.set_start_offset(ident, this.lexer.token_start);
281
- this.arena.set_length(ident, this.lexer.token_end - this.lexer.token_start);
282
- this.arena.set_start_line(ident, this.lexer.token_line);
283
- return [ident];
284
- }
285
- // Parse @import prelude: url() [layer] [supports()] [media-query-list]
286
- // @import url("styles.css") layer(base) supports(display: grid) screen and (min-width: 768px);
287
- parse_import_prelude() {
288
- let nodes = [];
289
- this.skip_whitespace();
290
- if (this.lexer.pos >= this.prelude_end) return [];
291
- let url_node = this.parse_import_url();
292
- if (url_node !== null) {
293
- nodes.push(url_node);
294
- } else {
295
- return [];
296
- }
297
- this.skip_whitespace();
298
- if (this.lexer.pos >= this.prelude_end) return nodes;
299
- let layer_node = this.parse_import_layer();
300
- if (layer_node !== null) {
301
- nodes.push(layer_node);
302
- }
303
- this.skip_whitespace();
304
- if (this.lexer.pos >= this.prelude_end) return nodes;
305
- let supports_node = this.parse_import_supports();
306
- if (supports_node !== null) {
307
- nodes.push(supports_node);
308
- }
309
- this.skip_whitespace();
310
- if (this.lexer.pos >= this.prelude_end) return nodes;
311
- let media_nodes = this.parse_media_query_list();
312
- nodes.push(...media_nodes);
313
- return nodes;
314
- }
315
- // Parse import URL: url("file.css") or "file.css"
316
- parse_import_url() {
317
- this.next_token();
318
- if (this.lexer.token_type !== TOKEN_URL && this.lexer.token_type !== TOKEN_FUNCTION && this.lexer.token_type !== TOKEN_STRING) {
319
- return null;
320
- }
321
- let url_start = this.lexer.token_start;
322
- let url_end = this.lexer.token_end;
323
- let url_line = this.lexer.token_line;
324
- if (this.lexer.token_type === TOKEN_FUNCTION) {
325
- let paren_depth = 1;
326
- while (this.lexer.pos < this.prelude_end && paren_depth > 0) {
327
- let tokenType = this.next_token();
328
- if (tokenType === TOKEN_LEFT_PAREN) {
329
- paren_depth++;
330
- } else if (tokenType === TOKEN_RIGHT_PAREN) {
331
- paren_depth--;
332
- if (paren_depth === 0) {
333
- url_end = this.lexer.token_end;
334
- }
335
- } else if (tokenType === TOKEN_EOF) {
336
- break;
337
- }
338
- }
339
- }
340
- let url_node = this.arena.create_node();
341
- this.arena.set_type(url_node, NODE_PRELUDE_IMPORT_URL);
342
- this.arena.set_start_offset(url_node, url_start);
343
- this.arena.set_length(url_node, url_end - url_start);
344
- this.arena.set_start_line(url_node, url_line);
345
- return url_node;
346
- }
347
- // Parse import layer: layer or layer(name)
348
- parse_import_layer() {
349
- let saved_pos = this.lexer.pos;
350
- let saved_line = this.lexer.line;
351
- this.next_token();
352
- if (this.lexer.token_type === TOKEN_IDENT || this.lexer.token_type === TOKEN_FUNCTION) {
353
- let text = this.source.substring(this.lexer.token_start, this.lexer.token_end);
354
- if (this.lexer.token_type === TOKEN_FUNCTION && text.endsWith("(")) {
355
- text = text.slice(0, -1);
356
- }
357
- if (str_equals("layer", text)) {
358
- let layer_start = this.lexer.token_start;
359
- let layer_end = this.lexer.token_end;
360
- let layer_line = this.lexer.token_line;
361
- let content_start = 0;
362
- let content_length = 0;
363
- if (this.lexer.token_type === TOKEN_FUNCTION) {
364
- content_start = this.lexer.pos;
365
- let paren_depth = 1;
366
- while (this.lexer.pos < this.prelude_end && paren_depth > 0) {
367
- let tokenType = this.next_token();
368
- if (tokenType === TOKEN_LEFT_PAREN) {
369
- paren_depth++;
370
- } else if (tokenType === TOKEN_RIGHT_PAREN) {
371
- paren_depth--;
372
- if (paren_depth === 0) {
373
- content_length = this.lexer.token_start - content_start;
374
- layer_end = this.lexer.token_end;
375
- }
376
- } else if (tokenType === TOKEN_EOF) {
377
- break;
378
- }
379
- }
380
- }
381
- let layer_node = this.arena.create_node();
382
- this.arena.set_type(layer_node, NODE_PRELUDE_IMPORT_LAYER);
383
- this.arena.set_start_offset(layer_node, layer_start);
384
- this.arena.set_length(layer_node, layer_end - layer_start);
385
- this.arena.set_start_line(layer_node, layer_line);
386
- if (content_length > 0) {
387
- let trimmed = trim_boundaries(this.source, content_start, content_start + content_length);
388
- if (trimmed) {
389
- this.arena.set_content_start(layer_node, trimmed[0]);
390
- this.arena.set_content_length(layer_node, trimmed[1] - trimmed[0]);
391
- }
392
- }
393
- return layer_node;
394
- }
395
- }
396
- this.lexer.pos = saved_pos;
397
- this.lexer.line = saved_line;
398
- return null;
399
- }
400
- // Parse import supports: supports(condition)
401
- parse_import_supports() {
402
- let saved_pos = this.lexer.pos;
403
- let saved_line = this.lexer.line;
404
- this.next_token();
405
- if (this.lexer.token_type === TOKEN_FUNCTION) {
406
- let text = this.source.substring(this.lexer.token_start, this.lexer.token_end - 1);
407
- if (str_equals("supports", text)) {
408
- let supports_start = this.lexer.token_start;
409
- let supports_line = this.lexer.token_line;
410
- let paren_depth = 1;
411
- let supports_end = this.lexer.token_end;
412
- while (this.lexer.pos < this.prelude_end && paren_depth > 0) {
413
- let tokenType = this.next_token();
414
- if (tokenType === TOKEN_LEFT_PAREN) {
415
- paren_depth++;
416
- } else if (tokenType === TOKEN_RIGHT_PAREN) {
417
- paren_depth--;
418
- if (paren_depth === 0) {
419
- supports_end = this.lexer.token_end;
420
- }
421
- } else if (tokenType === TOKEN_EOF) {
422
- break;
423
- }
424
- }
425
- let supports_node = this.arena.create_node();
426
- this.arena.set_type(supports_node, NODE_PRELUDE_IMPORT_SUPPORTS);
427
- this.arena.set_start_offset(supports_node, supports_start);
428
- this.arena.set_length(supports_node, supports_end - supports_start);
429
- this.arena.set_start_line(supports_node, supports_line);
430
- return supports_node;
431
- }
432
- }
433
- this.lexer.pos = saved_pos;
434
- this.lexer.line = saved_line;
435
- return null;
436
- }
437
- // Helper: Skip whitespace
438
- skip_whitespace() {
439
- while (this.lexer.pos < this.prelude_end) {
440
- let ch = this.source.charCodeAt(this.lexer.pos);
441
- if (ch !== CHAR_SPACE && ch !== CHAR_TAB && ch !== CHAR_NEWLINE && ch !== CHAR_CARRIAGE_RETURN && ch !== CHAR_FORM_FEED) {
442
- break;
443
- }
444
- this.lexer.pos++;
445
- }
446
- }
447
- // Helper: Peek at next token type without consuming
448
- peek_token_type() {
449
- let saved_pos = this.lexer.pos;
450
- let saved_line = this.lexer.line;
451
- this.next_token();
452
- let type = this.lexer.token_type;
453
- this.lexer.pos = saved_pos;
454
- this.lexer.line = saved_line;
455
- return type;
456
- }
457
- // Helper: Get next token
458
- next_token() {
459
- if (this.lexer.pos >= this.prelude_end) {
460
- this.lexer.token_type = TOKEN_EOF;
461
- return TOKEN_EOF;
462
- }
463
- return this.lexer.next_token_fast(false);
464
- }
465
- }
466
-
467
- export { AtRulePreludeParser as A };
@@ -1,24 +0,0 @@
1
- import type { CSSDataArena } from './arena';
2
- export declare class AtRulePreludeParser {
3
- private lexer;
4
- private arena;
5
- private source;
6
- private prelude_end;
7
- constructor(arena: CSSDataArena, source: string);
8
- parse_prelude(at_rule_name: string, start: number, end: number, line?: number, column?: number): number[];
9
- private parse_media_query_list;
10
- private is_and_or_not;
11
- private parse_single_media_query;
12
- private parse_media_feature;
13
- private parse_container_query;
14
- private parse_supports_query;
15
- private parse_layer_names;
16
- private parse_identifier;
17
- private parse_import_prelude;
18
- private parse_import_url;
19
- private parse_import_layer;
20
- private parse_import_supports;
21
- private skip_whitespace;
22
- private peek_token_type;
23
- private next_token;
24
- }
package/dist/parser.d.ts DELETED
@@ -1,34 +0,0 @@
1
- import { CSSDataArena } from './arena';
2
- import { CSSNode } from './css-node';
3
- export interface ParserOptions {
4
- skip_comments?: boolean;
5
- parse_values?: boolean;
6
- parse_selectors?: boolean;
7
- parse_atrule_preludes?: boolean;
8
- }
9
- export declare class Parser {
10
- private source;
11
- private lexer;
12
- private arena;
13
- private value_parser;
14
- private selector_parser;
15
- private prelude_parser;
16
- private parse_values_enabled;
17
- private parse_selectors_enabled;
18
- private parse_atrule_preludes_enabled;
19
- constructor(source: string, options?: ParserOptions);
20
- get_arena(): CSSDataArena;
21
- get_source(): string;
22
- private next_token;
23
- private peek_type;
24
- private is_eof;
25
- parse(): CSSNode;
26
- private parse_rule;
27
- private parse_style_rule;
28
- private parse_selector;
29
- private parse_declaration;
30
- private parse_atrule;
31
- private atrule_has_declarations;
32
- private atrule_is_conditional;
33
- }
34
- export { NODE_STYLESHEET, NODE_STYLE_RULE, NODE_AT_RULE, NODE_DECLARATION, NODE_SELECTOR, NODE_COMMENT, NODE_VALUE_KEYWORD, NODE_VALUE_NUMBER, NODE_VALUE_DIMENSION, NODE_VALUE_STRING, NODE_VALUE_COLOR, NODE_VALUE_FUNCTION, NODE_VALUE_OPERATOR, NODE_SELECTOR_LIST, NODE_SELECTOR_TYPE, NODE_SELECTOR_CLASS, NODE_SELECTOR_ID, NODE_SELECTOR_ATTRIBUTE, NODE_SELECTOR_PSEUDO_CLASS, NODE_SELECTOR_PSEUDO_ELEMENT, NODE_SELECTOR_COMBINATOR, NODE_SELECTOR_UNIVERSAL, NODE_SELECTOR_NESTING, NODE_PRELUDE_MEDIA_QUERY, NODE_PRELUDE_MEDIA_FEATURE, NODE_PRELUDE_MEDIA_TYPE, NODE_PRELUDE_CONTAINER_QUERY, NODE_PRELUDE_SUPPORTS_QUERY, NODE_PRELUDE_LAYER_NAME, NODE_PRELUDE_IDENTIFIER, NODE_PRELUDE_OPERATOR, NODE_PRELUDE_IMPORT_URL, NODE_PRELUDE_IMPORT_LAYER, NODE_PRELUDE_IMPORT_SUPPORTS, FLAG_IMPORTANT, } from './arena';