@projectwallace/css-parser 0.19.2 → 0.19.4
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/README.md +15 -2
- package/dist/{arena-CsJhQRUX.js → arena-CaLnNKbP.js} +7 -4
- package/dist/{arena-7RLvyGPB.d.ts → arena-D689Bo6V.d.ts} +4 -3
- package/dist/constants.d.ts +46 -48
- package/dist/constants.js +2 -3
- package/dist/{css-node-BKcf0ZeS.js → css-node-CDTLvxo3.js} +3 -4
- package/dist/index.d.ts +6 -6
- package/dist/index.js +6 -6
- package/dist/{node-types-CD7A-d_c.d.ts → node-types-BF6bhAjo.d.ts} +56 -64
- package/dist/node-types.d.ts +1 -1
- package/dist/node-types.js +2 -3
- package/dist/parse-anplusb.d.ts +3 -5
- package/dist/parse-anplusb.js +5 -6
- package/dist/{value-node-parser-B568SwUx.js → parse-atrule-prelude-BMkgCZjw.js} +465 -15
- package/dist/parse-atrule-prelude.d.ts +13 -6
- package/dist/parse-atrule-prelude.js +1 -431
- package/dist/parse-declaration.d.ts +4 -6
- package/dist/parse-declaration.js +8 -9
- package/dist/parse-dimension.d.ts +1 -3
- package/dist/parse-dimension.js +2 -3
- package/dist/{parse-selector-DORsuJvq.js → parse-selector-CMKZgPmu.js} +6 -8
- package/dist/parse-selector.d.ts +3 -5
- package/dist/parse-selector.js +1 -1
- package/dist/parse-value.d.ts +4 -6
- package/dist/parse-value.js +6 -7
- package/dist/parse.d.ts +10 -5
- package/dist/parse.js +9 -10
- package/dist/{string-helpers-t7UofIfp.d.ts → string-helpers-CwNEcEhd.d.ts} +0 -2
- package/dist/string-helpers.d.ts +1 -1
- package/dist/string-helpers.js +1 -1
- package/dist/{string-utils-aEEsA2CS.js → string-utils-BYH1Oe8a.js} +0 -1
- package/dist/{token-types-Bqsf5FX-.d.ts → token-types-BhoXrORA.d.ts} +0 -2
- package/dist/token-types.d.ts +1 -1
- package/dist/token-types.js +1 -2
- package/dist/{tokenize-B2QSzdrM.js → tokenize-DC2Vb0J_.js} +20 -6
- package/dist/tokenize.d.ts +17 -5
- package/dist/tokenize.js +1 -1
- package/dist/walk.d.ts +1 -3
- package/dist/walk.js +3 -4
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -100,6 +100,7 @@ Options:
|
|
|
100
100
|
- `parse_values` (default `true`) — parse declaration values into nodes
|
|
101
101
|
- `parse_selectors` (default `true`) — parse selectors into nodes
|
|
102
102
|
- `parse_atrule_preludes` (default `true`) — parse at-rule preludes into nodes
|
|
103
|
+
- `media_feature_range_name_as_child` (default `false`) — also add the feature name of a media range (`width` in `(400px < width < 1000px)`) as an `Identifier` child, so the children read in source order. `name` is set either way. **Deprecated:** this will become the default in 0.20.0 and the option will be removed, so opt in now to prepare
|
|
103
104
|
- `on_comment` — called for every comment (`{ start, end, length, line, column }`); comments are never part of the tree
|
|
104
105
|
|
|
105
106
|
### Sub-parsers
|
|
@@ -139,9 +140,21 @@ traverse(ast, {
|
|
|
139
140
|
})
|
|
140
141
|
```
|
|
141
142
|
|
|
142
|
-
### `
|
|
143
|
+
### `tokenize_cb(source, on_token)`
|
|
143
144
|
|
|
144
|
-
|
|
145
|
+
Calls `on_token(type, start, end, line, column)` for every token. Whitespace and comments are emitted as tokens (`TOKEN_WHITESPACE`, `TOKEN_COMMENT`). This is about 35% faster than iterating `tokenize()`, because no generator or token objects are allocated.
|
|
146
|
+
|
|
147
|
+
```typescript
|
|
148
|
+
tokenize_cb('a { color: red }', (type, start, end, line, column) => {
|
|
149
|
+
console.log(type, start, end)
|
|
150
|
+
})
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
In 0.20.0 this becomes `tokenize()`, replacing the iterator form below.
|
|
154
|
+
|
|
155
|
+
### `tokenize(source, on_comment?)` (deprecated)
|
|
156
|
+
|
|
157
|
+
A generator of tokens; comments are skipped and reported through `on_comment`. Deprecated: use `tokenize_cb()` now, it becomes `tokenize()` in 0.20.0.
|
|
145
158
|
|
|
146
159
|
```typescript
|
|
147
160
|
for (const token of tokenize('a { color: red }')) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/arena.ts
|
|
2
2
|
const BYTES_PER_NODE = 32;
|
|
3
3
|
const STYLESHEET = 1;
|
|
4
4
|
const STYLE_RULE = 2;
|
|
@@ -56,6 +56,9 @@ var CSSDataArena = class CSSDataArena {
|
|
|
56
56
|
overflow_lengths;
|
|
57
57
|
static GROWTH_FACTOR = 1.3;
|
|
58
58
|
static NODES_PER_KB = 210;
|
|
59
|
+
static NODES_PER_KB_NO_VALUES = 150;
|
|
60
|
+
static NODES_PER_KB_NO_SELECTORS = 180;
|
|
61
|
+
static NODES_PER_KB_NO_VALUES_NO_SELECTORS = 120;
|
|
59
62
|
static CAPACITY_BUFFER = 1.1;
|
|
60
63
|
constructor(initial_capacity = 1024) {
|
|
61
64
|
this.capacity = initial_capacity;
|
|
@@ -65,9 +68,10 @@ var CSSDataArena = class CSSDataArena {
|
|
|
65
68
|
this.view = new DataView(this.buffer);
|
|
66
69
|
this.overflow_lengths = /* @__PURE__ */ new Map();
|
|
67
70
|
}
|
|
68
|
-
static capacity_for_source(source_length) {
|
|
71
|
+
static capacity_for_source(source_length, parse_values = true, parse_selectors = true) {
|
|
72
|
+
const nodes_per_kb = parse_values ? parse_selectors ? CSSDataArena.NODES_PER_KB : CSSDataArena.NODES_PER_KB_NO_SELECTORS : parse_selectors ? CSSDataArena.NODES_PER_KB_NO_VALUES : CSSDataArena.NODES_PER_KB_NO_VALUES_NO_SELECTORS;
|
|
69
73
|
const size_in_kb = source_length / 1024;
|
|
70
|
-
const estimated_nodes = Math.ceil(size_in_kb *
|
|
74
|
+
const estimated_nodes = Math.ceil(size_in_kb * nodes_per_kb);
|
|
71
75
|
const capacity = Math.ceil(estimated_nodes * CSSDataArena.CAPACITY_BUFFER);
|
|
72
76
|
return Math.max(16, capacity);
|
|
73
77
|
}
|
|
@@ -225,5 +229,4 @@ var CSSDataArena = class CSSDataArena {
|
|
|
225
229
|
return (this.get_flags(node_index) & flag) !== 0;
|
|
226
230
|
}
|
|
227
231
|
};
|
|
228
|
-
//#endregion
|
|
229
232
|
export { PARENTHESIS as A, STYLE_RULE as B, MEDIA_QUERY as C, NTH_SELECTOR as D, NTH_OF_SELECTOR as E, RAW as F, UNIVERSAL_SELECTOR as G, SUPPORTS_QUERY as H, SELECTOR as I, URL as K, SELECTOR_LIST as L, PSEUDO_CLASS_SELECTOR as M, PSEUDO_ELEMENT_SELECTOR as N, NUMBER as O, RATIO as P, STRING as R, MEDIA_FEATURE as S, NESTING_SELECTOR as T, TYPE_SELECTOR as U, SUPPORTS_DECLARATION as V, UNICODE_RANGE as W, ID_SELECTOR as _, CLASS_SELECTOR as a, LANG_SELECTOR as b, CONTAINER_QUERY as c, DIMENSION as d, FEATURE_RANGE as f, IDENTIFIER as g, HASH as h, BLOCK as i, PRELUDE_OPERATOR as j, OPERATOR as k, CSSDataArena as l, FUNCTION as m, AT_RULE as n, COMBINATOR as o, FLAG_IMPORTANT as p, VALUE as q, AT_RULE_PRELUDE as r, COMMENT as s, ATTRIBUTE_SELECTOR as t, DECLARATION as u, IF_BRANCH as v, MEDIA_TYPE as w, LAYER_NAME as x, IF_CONDITION as y, STYLESHEET as z };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/arena.d.ts
|
|
2
1
|
declare const STYLESHEET = 1;
|
|
3
2
|
declare const STYLE_RULE = 2;
|
|
4
3
|
declare const AT_RULE = 3;
|
|
@@ -56,9 +55,12 @@ declare class CSSDataArena {
|
|
|
56
55
|
private overflow_lengths;
|
|
57
56
|
private static readonly GROWTH_FACTOR;
|
|
58
57
|
private static readonly NODES_PER_KB;
|
|
58
|
+
private static readonly NODES_PER_KB_NO_VALUES;
|
|
59
|
+
private static readonly NODES_PER_KB_NO_SELECTORS;
|
|
60
|
+
private static readonly NODES_PER_KB_NO_VALUES_NO_SELECTORS;
|
|
59
61
|
private static readonly CAPACITY_BUFFER;
|
|
60
62
|
constructor(initial_capacity?: number);
|
|
61
|
-
static capacity_for_source(source_length: number): number;
|
|
63
|
+
static capacity_for_source(source_length: number, parse_values?: boolean, parse_selectors?: boolean): number;
|
|
62
64
|
get_count(): number;
|
|
63
65
|
get_capacity(): number;
|
|
64
66
|
get_growth_count(): number;
|
|
@@ -97,5 +99,4 @@ declare class CSSDataArena {
|
|
|
97
99
|
clear_flag(node_index: number, flag: number): void;
|
|
98
100
|
has_flag(node_index: number, flag: number): boolean;
|
|
99
101
|
}
|
|
100
|
-
//#endregion
|
|
101
102
|
export { PARENTHESIS as A, STYLESHEET as B, MEDIA_QUERY as C, NTH_SELECTOR as D, NTH_OF_SELECTOR as E, RATIO as F, UNICODE_RANGE as G, SUPPORTS_DECLARATION as H, RAW as I, VALUE as J, UNIVERSAL_SELECTOR as K, SELECTOR as L, PRELUDE_SELECTORLIST as M, PSEUDO_CLASS_SELECTOR as N, NUMBER as O, PSEUDO_ELEMENT_SELECTOR as P, SELECTOR_LIST as R, MEDIA_FEATURE as S, NESTING_SELECTOR as T, SUPPORTS_QUERY as U, STYLE_RULE as V, TYPE_SELECTOR as W, ID_SELECTOR as _, CLASS_SELECTOR as a, LANG_SELECTOR as b, CONTAINER_QUERY as c, DIMENSION as d, FEATURE_RANGE as f, IDENTIFIER as g, HASH as h, BLOCK as i, PRELUDE_OPERATOR as j, OPERATOR as k, CSSDataArena as l, FUNCTION as m, AT_RULE as n, COMBINATOR as o, FLAG_IMPORTANT as p, URL as q, AT_RULE_PRELUDE as r, COMMENT as s, ATTRIBUTE_SELECTOR as t, DECLARATION as u, IF_BRANCH as v, MEDIA_TYPE as w, LAYER_NAME as x, IF_CONDITION as y, STRING as z };
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,51 +1,49 @@
|
|
|
1
|
-
import { A as PARENTHESIS, B as STYLESHEET, C as MEDIA_QUERY, D as NTH_SELECTOR, E as NTH_OF_SELECTOR, F as RATIO, G as UNICODE_RANGE, H as SUPPORTS_DECLARATION, I as RAW, J as VALUE, K as UNIVERSAL_SELECTOR, L as SELECTOR, N as PSEUDO_CLASS_SELECTOR, O as NUMBER, P as PSEUDO_ELEMENT_SELECTOR, R as SELECTOR_LIST, S as MEDIA_FEATURE, T as NESTING_SELECTOR, U as SUPPORTS_QUERY, V as STYLE_RULE, W as TYPE_SELECTOR, _ as ID_SELECTOR, a as CLASS_SELECTOR, b as LANG_SELECTOR, c as CONTAINER_QUERY, d as DIMENSION, f as FEATURE_RANGE, g as IDENTIFIER, h as HASH, i as BLOCK, j as PRELUDE_OPERATOR, k as OPERATOR, m as FUNCTION, n as AT_RULE, o as COMBINATOR, p as FLAG_IMPORTANT, q as URL, r as AT_RULE_PRELUDE, s as COMMENT, t as ATTRIBUTE_SELECTOR, u as DECLARATION, v as IF_BRANCH, w as MEDIA_TYPE, x as LAYER_NAME, y as IF_CONDITION, z as STRING } from "./arena-
|
|
2
|
-
//#region src/constants.d.ts
|
|
1
|
+
import { A as PARENTHESIS, B as STYLESHEET, C as MEDIA_QUERY, D as NTH_SELECTOR, E as NTH_OF_SELECTOR, F as RATIO, G as UNICODE_RANGE, H as SUPPORTS_DECLARATION, I as RAW, J as VALUE, K as UNIVERSAL_SELECTOR, L as SELECTOR, N as PSEUDO_CLASS_SELECTOR, O as NUMBER, P as PSEUDO_ELEMENT_SELECTOR, R as SELECTOR_LIST, S as MEDIA_FEATURE, T as NESTING_SELECTOR, U as SUPPORTS_QUERY, V as STYLE_RULE, W as TYPE_SELECTOR, _ as ID_SELECTOR, a as CLASS_SELECTOR, b as LANG_SELECTOR, c as CONTAINER_QUERY, d as DIMENSION, f as FEATURE_RANGE, g as IDENTIFIER, h as HASH, i as BLOCK, j as PRELUDE_OPERATOR, k as OPERATOR, m as FUNCTION, n as AT_RULE, o as COMBINATOR, p as FLAG_IMPORTANT, q as URL, r as AT_RULE_PRELUDE, s as COMMENT, t as ATTRIBUTE_SELECTOR, u as DECLARATION, v as IF_BRANCH, w as MEDIA_TYPE, x as LAYER_NAME, y as IF_CONDITION, z as STRING } from "./arena-D689Bo6V.js";
|
|
3
2
|
export declare const NODE_TYPES: {
|
|
4
|
-
readonly STYLESHEET:
|
|
5
|
-
readonly STYLE_RULE:
|
|
6
|
-
readonly AT_RULE:
|
|
7
|
-
readonly DECLARATION:
|
|
8
|
-
readonly SELECTOR:
|
|
9
|
-
readonly COMMENT:
|
|
10
|
-
readonly BLOCK:
|
|
11
|
-
readonly RAW:
|
|
12
|
-
readonly IDENTIFIER:
|
|
13
|
-
readonly NUMBER:
|
|
14
|
-
readonly DIMENSION:
|
|
15
|
-
readonly STRING:
|
|
16
|
-
readonly HASH:
|
|
17
|
-
readonly FUNCTION:
|
|
18
|
-
readonly OPERATOR:
|
|
19
|
-
readonly PARENTHESIS:
|
|
20
|
-
readonly URL:
|
|
21
|
-
readonly UNICODE_RANGE:
|
|
22
|
-
readonly IF_BRANCH:
|
|
23
|
-
readonly IF_CONDITION:
|
|
24
|
-
readonly VALUE:
|
|
25
|
-
readonly SELECTOR_LIST:
|
|
26
|
-
readonly TYPE_SELECTOR:
|
|
27
|
-
readonly CLASS_SELECTOR:
|
|
28
|
-
readonly ID_SELECTOR:
|
|
29
|
-
readonly ATTRIBUTE_SELECTOR:
|
|
30
|
-
readonly PSEUDO_CLASS_SELECTOR:
|
|
31
|
-
readonly PSEUDO_ELEMENT_SELECTOR:
|
|
32
|
-
readonly COMBINATOR:
|
|
33
|
-
readonly UNIVERSAL_SELECTOR:
|
|
34
|
-
readonly NESTING_SELECTOR:
|
|
35
|
-
readonly NTH_SELECTOR:
|
|
36
|
-
readonly NTH_OF_SELECTOR:
|
|
37
|
-
readonly LANG_SELECTOR:
|
|
38
|
-
readonly MEDIA_QUERY:
|
|
39
|
-
readonly MEDIA_FEATURE:
|
|
40
|
-
readonly MEDIA_TYPE:
|
|
41
|
-
readonly CONTAINER_QUERY:
|
|
42
|
-
readonly SUPPORTS_QUERY:
|
|
43
|
-
readonly SUPPORTS_DECLARATION:
|
|
44
|
-
readonly LAYER_NAME:
|
|
45
|
-
readonly PRELUDE_OPERATOR:
|
|
46
|
-
readonly FEATURE_RANGE:
|
|
47
|
-
readonly AT_RULE_PRELUDE:
|
|
48
|
-
readonly RATIO:
|
|
3
|
+
readonly STYLESHEET: typeof STYLESHEET;
|
|
4
|
+
readonly STYLE_RULE: typeof STYLE_RULE;
|
|
5
|
+
readonly AT_RULE: typeof AT_RULE;
|
|
6
|
+
readonly DECLARATION: typeof DECLARATION;
|
|
7
|
+
readonly SELECTOR: typeof SELECTOR;
|
|
8
|
+
readonly COMMENT: typeof COMMENT;
|
|
9
|
+
readonly BLOCK: typeof BLOCK;
|
|
10
|
+
readonly RAW: typeof RAW;
|
|
11
|
+
readonly IDENTIFIER: typeof IDENTIFIER;
|
|
12
|
+
readonly NUMBER: typeof NUMBER;
|
|
13
|
+
readonly DIMENSION: typeof DIMENSION;
|
|
14
|
+
readonly STRING: typeof STRING;
|
|
15
|
+
readonly HASH: typeof HASH;
|
|
16
|
+
readonly FUNCTION: typeof FUNCTION;
|
|
17
|
+
readonly OPERATOR: typeof OPERATOR;
|
|
18
|
+
readonly PARENTHESIS: typeof PARENTHESIS;
|
|
19
|
+
readonly URL: typeof URL;
|
|
20
|
+
readonly UNICODE_RANGE: typeof UNICODE_RANGE;
|
|
21
|
+
readonly IF_BRANCH: typeof IF_BRANCH;
|
|
22
|
+
readonly IF_CONDITION: typeof IF_CONDITION;
|
|
23
|
+
readonly VALUE: typeof VALUE;
|
|
24
|
+
readonly SELECTOR_LIST: typeof SELECTOR_LIST;
|
|
25
|
+
readonly TYPE_SELECTOR: typeof TYPE_SELECTOR;
|
|
26
|
+
readonly CLASS_SELECTOR: typeof CLASS_SELECTOR;
|
|
27
|
+
readonly ID_SELECTOR: typeof ID_SELECTOR;
|
|
28
|
+
readonly ATTRIBUTE_SELECTOR: typeof ATTRIBUTE_SELECTOR;
|
|
29
|
+
readonly PSEUDO_CLASS_SELECTOR: typeof PSEUDO_CLASS_SELECTOR;
|
|
30
|
+
readonly PSEUDO_ELEMENT_SELECTOR: typeof PSEUDO_ELEMENT_SELECTOR;
|
|
31
|
+
readonly COMBINATOR: typeof COMBINATOR;
|
|
32
|
+
readonly UNIVERSAL_SELECTOR: typeof UNIVERSAL_SELECTOR;
|
|
33
|
+
readonly NESTING_SELECTOR: typeof NESTING_SELECTOR;
|
|
34
|
+
readonly NTH_SELECTOR: typeof NTH_SELECTOR;
|
|
35
|
+
readonly NTH_OF_SELECTOR: typeof NTH_OF_SELECTOR;
|
|
36
|
+
readonly LANG_SELECTOR: typeof LANG_SELECTOR;
|
|
37
|
+
readonly MEDIA_QUERY: typeof MEDIA_QUERY;
|
|
38
|
+
readonly MEDIA_FEATURE: typeof MEDIA_FEATURE;
|
|
39
|
+
readonly MEDIA_TYPE: typeof MEDIA_TYPE;
|
|
40
|
+
readonly CONTAINER_QUERY: typeof CONTAINER_QUERY;
|
|
41
|
+
readonly SUPPORTS_QUERY: typeof SUPPORTS_QUERY;
|
|
42
|
+
readonly SUPPORTS_DECLARATION: typeof SUPPORTS_DECLARATION;
|
|
43
|
+
readonly LAYER_NAME: typeof LAYER_NAME;
|
|
44
|
+
readonly PRELUDE_OPERATOR: typeof PRELUDE_OPERATOR;
|
|
45
|
+
readonly FEATURE_RANGE: typeof FEATURE_RANGE;
|
|
46
|
+
readonly AT_RULE_PRELUDE: typeof AT_RULE_PRELUDE;
|
|
47
|
+
readonly RATIO: typeof RATIO;
|
|
49
48
|
};
|
|
50
|
-
//#endregion
|
|
51
49
|
export { ATTRIBUTE_SELECTOR, AT_RULE, AT_RULE_PRELUDE, BLOCK, CLASS_SELECTOR, COMBINATOR, COMMENT, CONTAINER_QUERY, DECLARATION, DIMENSION, FEATURE_RANGE, FLAG_IMPORTANT, FUNCTION, HASH, IDENTIFIER, ID_SELECTOR, IF_BRANCH, IF_CONDITION, LANG_SELECTOR, LAYER_NAME, MEDIA_FEATURE, MEDIA_QUERY, MEDIA_TYPE, NESTING_SELECTOR, NTH_OF_SELECTOR, NTH_SELECTOR, NUMBER, OPERATOR, PARENTHESIS, PRELUDE_OPERATOR, PSEUDO_CLASS_SELECTOR, PSEUDO_ELEMENT_SELECTOR, RATIO, RAW, SELECTOR, SELECTOR_LIST, STRING, STYLESHEET, STYLE_RULE, SUPPORTS_DECLARATION, SUPPORTS_QUERY, TYPE_SELECTOR, UNICODE_RANGE, UNIVERSAL_SELECTOR, URL, VALUE };
|
package/dist/constants.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as PARENTHESIS, B as STYLE_RULE, C as MEDIA_QUERY, D as NTH_SELECTOR, E as NTH_OF_SELECTOR, F as RAW, G as UNIVERSAL_SELECTOR, H as SUPPORTS_QUERY, I as SELECTOR, K as URL, L as SELECTOR_LIST, M as PSEUDO_CLASS_SELECTOR, N as PSEUDO_ELEMENT_SELECTOR, O as NUMBER, P as RATIO, R as STRING, S as MEDIA_FEATURE, T as NESTING_SELECTOR, U as TYPE_SELECTOR, V as SUPPORTS_DECLARATION, W as UNICODE_RANGE, _ as ID_SELECTOR, a as CLASS_SELECTOR, b as LANG_SELECTOR, c as CONTAINER_QUERY, d as DIMENSION, f as FEATURE_RANGE, g as IDENTIFIER, h as HASH, i as BLOCK, j as PRELUDE_OPERATOR, k as OPERATOR, m as FUNCTION, n as AT_RULE, o as COMBINATOR, p as FLAG_IMPORTANT, q as VALUE, r as AT_RULE_PRELUDE, s as COMMENT, t as ATTRIBUTE_SELECTOR, u as DECLARATION, v as IF_BRANCH, w as MEDIA_TYPE, x as LAYER_NAME, y as IF_CONDITION, z as STYLESHEET } from "./arena-
|
|
2
|
-
|
|
1
|
+
import { A as PARENTHESIS, B as STYLE_RULE, C as MEDIA_QUERY, D as NTH_SELECTOR, E as NTH_OF_SELECTOR, F as RAW, G as UNIVERSAL_SELECTOR, H as SUPPORTS_QUERY, I as SELECTOR, K as URL, L as SELECTOR_LIST, M as PSEUDO_CLASS_SELECTOR, N as PSEUDO_ELEMENT_SELECTOR, O as NUMBER, P as RATIO, R as STRING, S as MEDIA_FEATURE, T as NESTING_SELECTOR, U as TYPE_SELECTOR, V as SUPPORTS_DECLARATION, W as UNICODE_RANGE, _ as ID_SELECTOR, a as CLASS_SELECTOR, b as LANG_SELECTOR, c as CONTAINER_QUERY, d as DIMENSION, f as FEATURE_RANGE, g as IDENTIFIER, h as HASH, i as BLOCK, j as PRELUDE_OPERATOR, k as OPERATOR, m as FUNCTION, n as AT_RULE, o as COMBINATOR, p as FLAG_IMPORTANT, q as VALUE, r as AT_RULE_PRELUDE, s as COMMENT, t as ATTRIBUTE_SELECTOR, u as DECLARATION, v as IF_BRANCH, w as MEDIA_TYPE, x as LAYER_NAME, y as IF_CONDITION, z as STYLESHEET } from "./arena-CaLnNKbP.js";
|
|
2
|
+
// src/constants.ts
|
|
3
3
|
const NODE_TYPES = {
|
|
4
4
|
STYLESHEET: 1,
|
|
5
5
|
STYLE_RULE: 2,
|
|
@@ -47,5 +47,4 @@ const NODE_TYPES = {
|
|
|
47
47
|
AT_RULE_PRELUDE: 40,
|
|
48
48
|
RATIO: 58
|
|
49
49
|
};
|
|
50
|
-
//#endregion
|
|
51
50
|
export { ATTRIBUTE_SELECTOR, AT_RULE, AT_RULE_PRELUDE, BLOCK, CLASS_SELECTOR, COMBINATOR, COMMENT, CONTAINER_QUERY, DECLARATION, DIMENSION, FEATURE_RANGE, FLAG_IMPORTANT, FUNCTION, HASH, IDENTIFIER, ID_SELECTOR, IF_BRANCH, IF_CONDITION, LANG_SELECTOR, LAYER_NAME, MEDIA_FEATURE, MEDIA_QUERY, MEDIA_TYPE, NESTING_SELECTOR, NODE_TYPES, NTH_OF_SELECTOR, NTH_SELECTOR, NUMBER, OPERATOR, PARENTHESIS, PRELUDE_OPERATOR, PSEUDO_CLASS_SELECTOR, PSEUDO_ELEMENT_SELECTOR, RATIO, RAW, SELECTOR, SELECTOR_LIST, STRING, STYLESHEET, STYLE_RULE, SUPPORTS_DECLARATION, SUPPORTS_QUERY, TYPE_SELECTOR, UNICODE_RANGE, UNIVERSAL_SELECTOR, URL, VALUE };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./arena-
|
|
2
|
-
import { a as is_vendor_prefixed, o as is_whitespace, s as str_equals, u as str_starts_with } from "./string-utils-
|
|
1
|
+
import "./arena-CaLnNKbP.js";
|
|
2
|
+
import { a as is_vendor_prefixed, o as is_whitespace, s as str_equals, u as str_starts_with } from "./string-utils-BYH1Oe8a.js";
|
|
3
3
|
import { dimension_number_end } from "./parse-dimension.js";
|
|
4
|
-
|
|
4
|
+
// src/css-node.ts
|
|
5
5
|
const nodes_with_name = /* @__PURE__ */ new Set([
|
|
6
6
|
3,
|
|
7
7
|
10,
|
|
@@ -448,5 +448,4 @@ var CSSNode = class CSSNode {
|
|
|
448
448
|
return plain;
|
|
449
449
|
}
|
|
450
450
|
};
|
|
451
|
-
//#endregion
|
|
452
451
|
export { CSSNode as t };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as PARENTHESIS, B as STYLESHEET, C as MEDIA_QUERY, D as NTH_SELECTOR, E as NTH_OF_SELECTOR, F as RATIO, G as UNICODE_RANGE, H as SUPPORTS_DECLARATION, I as RAW, J as VALUE, K as UNIVERSAL_SELECTOR, L as SELECTOR, N as PSEUDO_CLASS_SELECTOR, O as NUMBER, P as PSEUDO_ELEMENT_SELECTOR, R as SELECTOR_LIST, S as MEDIA_FEATURE, T as NESTING_SELECTOR, U as SUPPORTS_QUERY, V as STYLE_RULE, W as TYPE_SELECTOR, _ as ID_SELECTOR, a as CLASS_SELECTOR, b as LANG_SELECTOR, c as CONTAINER_QUERY, d as DIMENSION, f as FEATURE_RANGE, g as IDENTIFIER, h as HASH, i as BLOCK, j as PRELUDE_OPERATOR, k as OPERATOR, m as FUNCTION, n as AT_RULE, o as COMBINATOR, p as FLAG_IMPORTANT, q as URL, r as AT_RULE_PRELUDE, s as COMMENT, t as ATTRIBUTE_SELECTOR, u as DECLARATION, v as IF_BRANCH, w as MEDIA_TYPE, x as LAYER_NAME, y as IF_CONDITION, z as STRING } from "./arena-
|
|
1
|
+
import { A as PARENTHESIS, B as STYLESHEET, C as MEDIA_QUERY, D as NTH_SELECTOR, E as NTH_OF_SELECTOR, F as RATIO, G as UNICODE_RANGE, H as SUPPORTS_DECLARATION, I as RAW, J as VALUE, K as UNIVERSAL_SELECTOR, L as SELECTOR, N as PSEUDO_CLASS_SELECTOR, O as NUMBER, P as PSEUDO_ELEMENT_SELECTOR, R as SELECTOR_LIST, S as MEDIA_FEATURE, T as NESTING_SELECTOR, U as SUPPORTS_QUERY, V as STYLE_RULE, W as TYPE_SELECTOR, _ as ID_SELECTOR, a as CLASS_SELECTOR, b as LANG_SELECTOR, c as CONTAINER_QUERY, d as DIMENSION, f as FEATURE_RANGE, g as IDENTIFIER, h as HASH, i as BLOCK, j as PRELUDE_OPERATOR, k as OPERATOR, m as FUNCTION, n as AT_RULE, o as COMBINATOR, p as FLAG_IMPORTANT, q as URL, r as AT_RULE_PRELUDE, s as COMMENT, t as ATTRIBUTE_SELECTOR, u as DECLARATION, v as IF_BRANCH, w as MEDIA_TYPE, x as LAYER_NAME, y as IF_CONDITION, z as STRING } from "./arena-D689Bo6V.js";
|
|
2
2
|
import { NODE_TYPES } from "./constants.js";
|
|
3
|
-
import { C as TOKEN_SEMICOLON, D as TOKEN_WHITESPACE, E as TOKEN_URL, O as Token, S as TOKEN_RIGHT_PAREN, T as TOKEN_UNICODE_RANGE, _ as TOKEN_LEFT_PAREN, a as TOKEN_CDO, b as TOKEN_RIGHT_BRACE, c as TOKEN_COMMENT, d as TOKEN_EOF, f as TOKEN_FUNCTION, g as TOKEN_LEFT_BRACKET, h as TOKEN_LEFT_BRACE, i as TOKEN_CDC, k as TokenType, l as TOKEN_DELIM, m as TOKEN_IDENT, n as TOKEN_BAD_STRING, o as TOKEN_COLON, p as TOKEN_HASH, r as TOKEN_BAD_URL, s as TOKEN_COMMA, t as TOKEN_AT_KEYWORD, u as TOKEN_DIMENSION, v as TOKEN_NUMBER, w as TOKEN_STRING, x as TOKEN_RIGHT_BRACKET, y as TOKEN_PERCENTAGE } from "./token-types-
|
|
4
|
-
import { CommentInfo, LexerPosition, tokenize } from "./tokenize.js";
|
|
5
|
-
import { $ as is_atrule, A as Operator, At as is_pseudo_element_selector, B as SelectorList, Bt as is_type_selector, C as MediaFeature, Ct as is_nth_selector, D as NthOfSelector, Dt as is_prelude_operator, E as NestingSelector, Et as is_parenthesis, F as PseudoElementSelector, Ft as is_selector_list, G as SupportsQuery, Gt as CloneOptions, H as String, Ht as is_universal_selector, I as Ratio, It as is_string, J as UnicodeRange, K as ToPlain, Kt as PlainCSSNode, L as Raw, Lt as is_stylesheet, M as PreludeOperator, Mt as is_raw, N as PreludeSelectorList, Nt as is_rule, O as NthSelector, Ot as is_prelude_selectorlist, P as PseudoClassSelector, Pt as is_selector, Q as WithChildren, R as Rule, Rt as is_supports_declaration, S as LayerName, St as is_nth_of_selector, T as MediaType, Tt as is_operator, U as StyleSheet, Ut as is_url, V as SelectorNode, Vt as is_unicode_range, W as SupportsDeclaration, Wt as is_value, X as Url, Y as UniversalSelector, Z as Value, _ as IdSelector, _t as is_layer_name, a as Block, at as is_comment, b as IfCondition, bt as is_media_type, c as ClassSelector, ct as is_dimension, d as ContainerQuery, dt as is_hash, et as is_atrule_prelude, f as Declaration, ft as is_id_selector, g as Hash, gt as is_lang_selector, h as Function, ht as is_if_condition, i as AttributeSelector, it as is_combinator, j as Parenthesis, jt as is_ratio, k as Number, kt as is_pseudo_class_selector, l as Combinator, lt as is_feature_range, m as FeatureRange, mt as is_if_branch, n as Atrule, nt as is_block, ot as is_container_query, p as Dimension, pt as is_identifier, q as TypeSelector, r as AtrulePrelude, rt as is_class_selector, s as CSSNode, st as is_declaration, t as AnyNode, tt as is_attribute_selector, u as Comment, ut as is_function, v as Identifier, vt as is_media_feature, w as MediaQuery, wt as is_number, x as LangSelector, xt as is_nesting_selector, y as IfBranch, yt as is_media_query, z as Selector, zt as is_supports_query } from "./node-types-
|
|
3
|
+
import { C as TOKEN_SEMICOLON, D as TOKEN_WHITESPACE, E as TOKEN_URL, O as Token, S as TOKEN_RIGHT_PAREN, T as TOKEN_UNICODE_RANGE, _ as TOKEN_LEFT_PAREN, a as TOKEN_CDO, b as TOKEN_RIGHT_BRACE, c as TOKEN_COMMENT, d as TOKEN_EOF, f as TOKEN_FUNCTION, g as TOKEN_LEFT_BRACKET, h as TOKEN_LEFT_BRACE, i as TOKEN_CDC, k as TokenType, l as TOKEN_DELIM, m as TOKEN_IDENT, n as TOKEN_BAD_STRING, o as TOKEN_COLON, p as TOKEN_HASH, r as TOKEN_BAD_URL, s as TOKEN_COMMA, t as TOKEN_AT_KEYWORD, u as TOKEN_DIMENSION, v as TOKEN_NUMBER, w as TOKEN_STRING, x as TOKEN_RIGHT_BRACKET, y as TOKEN_PERCENTAGE } from "./token-types-BhoXrORA.js";
|
|
4
|
+
import { CommentInfo, LexerPosition, OnToken, tokenize, tokenize_cb } from "./tokenize.js";
|
|
5
|
+
import { $ as is_atrule, A as Operator, At as is_pseudo_element_selector, B as SelectorList, Bt as is_type_selector, C as MediaFeature, Ct as is_nth_selector, D as NthOfSelector, Dt as is_prelude_operator, E as NestingSelector, Et as is_parenthesis, F as PseudoElementSelector, Ft as is_selector_list, G as SupportsQuery, Gt as CloneOptions, H as String, Ht as is_universal_selector, I as Ratio, It as is_string, J as UnicodeRange, K as ToPlain, Kt as PlainCSSNode, L as Raw, Lt as is_stylesheet, M as PreludeOperator, Mt as is_raw, N as PreludeSelectorList, Nt as is_rule, O as NthSelector, Ot as is_prelude_selectorlist, P as PseudoClassSelector, Pt as is_selector, Q as WithChildren, R as Rule, Rt as is_supports_declaration, S as LayerName, St as is_nth_of_selector, T as MediaType, Tt as is_operator, U as StyleSheet, Ut as is_url, V as SelectorNode, Vt as is_unicode_range, W as SupportsDeclaration, Wt as is_value, X as Url, Y as UniversalSelector, Z as Value, _ as IdSelector, _t as is_layer_name, a as Block, at as is_comment, b as IfCondition, bt as is_media_type, c as ClassSelector, ct as is_dimension, d as ContainerQuery, dt as is_hash, et as is_atrule_prelude, f as Declaration, ft as is_id_selector, g as Hash, gt as is_lang_selector, h as Function, ht as is_if_condition, i as AttributeSelector, it as is_combinator, j as Parenthesis, jt as is_ratio, k as Number, kt as is_pseudo_class_selector, l as Combinator, lt as is_feature_range, m as FeatureRange, mt as is_if_branch, n as Atrule, nt as is_block, ot as is_container_query, p as Dimension, pt as is_identifier, q as TypeSelector, r as AtrulePrelude, rt as is_class_selector, s as CSSNode, st as is_declaration, t as AnyNode, tt as is_attribute_selector, u as Comment, ut as is_function, v as Identifier, vt as is_media_feature, w as MediaQuery, wt as is_number, x as LangSelector, xt as is_nesting_selector, y as IfBranch, yt as is_media_query, z as Selector, zt as is_supports_query } from "./node-types-BF6bhAjo.js";
|
|
6
6
|
import { ParserOptions, parse } from "./parse.js";
|
|
7
7
|
import { parse_selector, parse_selector_list } from "./parse-selector.js";
|
|
8
8
|
import { parse_atrule_prelude } from "./parse-atrule-prelude.js";
|
|
@@ -10,5 +10,5 @@ import { parse_declaration } from "./parse-declaration.js";
|
|
|
10
10
|
import { parse_value } from "./parse-value.js";
|
|
11
11
|
import { parse_dimension } from "./parse-dimension.js";
|
|
12
12
|
import { BREAK, SKIP, traverse, walk } from "./walk.js";
|
|
13
|
-
import { a as str_starts_with, i as str_index_of, n as is_vendor_prefixed, o as strip_vendor_prefix, r as str_equals, t as is_custom } from "./string-helpers-
|
|
14
|
-
export { ATTRIBUTE_SELECTOR, AT_RULE, AT_RULE_PRELUDE, type AnyNode, type Atrule, type AtrulePrelude, type AttributeSelector, BLOCK, BREAK, type Block, CLASS_SELECTOR, COMBINATOR, COMMENT, CONTAINER_QUERY, type CSSNode, type ClassSelector, type CloneOptions, type Combinator, type Comment, type CommentInfo, type ContainerQuery, DECLARATION, DIMENSION, type Declaration, type Dimension, FEATURE_RANGE, FLAG_IMPORTANT, FUNCTION, type FeatureRange, type Function, HASH, type Hash, IDENTIFIER, ID_SELECTOR, IF_BRANCH, IF_CONDITION, type IdSelector, type Identifier, type IfBranch, type IfCondition, LANG_SELECTOR, LAYER_NAME, type LangSelector, type LayerName, type LexerPosition, MEDIA_FEATURE, MEDIA_QUERY, MEDIA_TYPE, type MediaFeature, type MediaQuery, type MediaType, NESTING_SELECTOR, NODE_TYPES, NTH_OF_SELECTOR, NTH_SELECTOR, NUMBER, type NestingSelector, type NthOfSelector, type NthSelector, type Number, OPERATOR, type Operator, PARENTHESIS, PRELUDE_OPERATOR, PSEUDO_CLASS_SELECTOR, PSEUDO_ELEMENT_SELECTOR, type Parenthesis, type ParserOptions, type PlainCSSNode, type PreludeOperator, type PreludeSelectorList, type PseudoClassSelector, type PseudoElementSelector, RATIO, RAW, type Ratio, type Raw, type Rule, SELECTOR, SELECTOR_LIST, SKIP, STRING, STYLESHEET, STYLE_RULE, SUPPORTS_DECLARATION, SUPPORTS_QUERY, type Selector, type SelectorList, type SelectorNode, type String, type StyleSheet, type SupportsDeclaration, type SupportsQuery, TOKEN_AT_KEYWORD, TOKEN_BAD_STRING, TOKEN_BAD_URL, TOKEN_CDC, TOKEN_CDO, TOKEN_COLON, TOKEN_COMMA, TOKEN_COMMENT, TOKEN_DELIM, TOKEN_DIMENSION, TOKEN_EOF, TOKEN_FUNCTION, TOKEN_HASH, TOKEN_IDENT, TOKEN_LEFT_BRACE, TOKEN_LEFT_BRACKET, TOKEN_LEFT_PAREN, TOKEN_NUMBER, TOKEN_PERCENTAGE, TOKEN_RIGHT_BRACE, TOKEN_RIGHT_BRACKET, TOKEN_RIGHT_PAREN, TOKEN_SEMICOLON, TOKEN_STRING, TOKEN_UNICODE_RANGE, TOKEN_URL, TOKEN_WHITESPACE, TYPE_SELECTOR, type ToPlain, Token, TokenType, type TypeSelector, UNICODE_RANGE, UNIVERSAL_SELECTOR, URL, type UnicodeRange, type UniversalSelector, type Url, VALUE, type Value, type WithChildren, is_atrule, is_atrule_prelude, is_attribute_selector, is_block, is_class_selector, is_combinator, is_comment, is_container_query, is_custom, is_declaration, is_dimension, is_feature_range, is_function, is_hash, is_id_selector, is_identifier, is_if_branch, is_if_condition, is_lang_selector, is_layer_name, is_media_feature, is_media_query, is_media_type, is_nesting_selector, is_nth_of_selector, is_nth_selector, is_number, is_operator, is_parenthesis, is_prelude_operator, is_prelude_selectorlist, is_pseudo_class_selector, is_pseudo_element_selector, is_ratio, is_raw, is_rule, is_selector, is_selector_list, is_string, is_stylesheet, is_supports_declaration, is_supports_query, is_type_selector, is_unicode_range, is_universal_selector, is_url, is_value, is_vendor_prefixed, parse, parse_atrule_prelude, parse_declaration, parse_dimension, parse_selector, parse_selector_list, parse_value, str_equals, str_index_of, str_starts_with, strip_vendor_prefix, tokenize, traverse, walk };
|
|
13
|
+
import { a as str_starts_with, i as str_index_of, n as is_vendor_prefixed, o as strip_vendor_prefix, r as str_equals, t as is_custom } from "./string-helpers-CwNEcEhd.js";
|
|
14
|
+
export { ATTRIBUTE_SELECTOR, AT_RULE, AT_RULE_PRELUDE, type AnyNode, type Atrule, type AtrulePrelude, type AttributeSelector, BLOCK, BREAK, type Block, CLASS_SELECTOR, COMBINATOR, COMMENT, CONTAINER_QUERY, type CSSNode, type ClassSelector, type CloneOptions, type Combinator, type Comment, type CommentInfo, type ContainerQuery, DECLARATION, DIMENSION, type Declaration, type Dimension, FEATURE_RANGE, FLAG_IMPORTANT, FUNCTION, type FeatureRange, type Function, HASH, type Hash, IDENTIFIER, ID_SELECTOR, IF_BRANCH, IF_CONDITION, type IdSelector, type Identifier, type IfBranch, type IfCondition, LANG_SELECTOR, LAYER_NAME, type LangSelector, type LayerName, type LexerPosition, MEDIA_FEATURE, MEDIA_QUERY, MEDIA_TYPE, type MediaFeature, type MediaQuery, type MediaType, NESTING_SELECTOR, NODE_TYPES, NTH_OF_SELECTOR, NTH_SELECTOR, NUMBER, type NestingSelector, type NthOfSelector, type NthSelector, type Number, OPERATOR, type OnToken, type Operator, PARENTHESIS, PRELUDE_OPERATOR, PSEUDO_CLASS_SELECTOR, PSEUDO_ELEMENT_SELECTOR, type Parenthesis, type ParserOptions, type PlainCSSNode, type PreludeOperator, type PreludeSelectorList, type PseudoClassSelector, type PseudoElementSelector, RATIO, RAW, type Ratio, type Raw, type Rule, SELECTOR, SELECTOR_LIST, SKIP, STRING, STYLESHEET, STYLE_RULE, SUPPORTS_DECLARATION, SUPPORTS_QUERY, type Selector, type SelectorList, type SelectorNode, type String, type StyleSheet, type SupportsDeclaration, type SupportsQuery, TOKEN_AT_KEYWORD, TOKEN_BAD_STRING, TOKEN_BAD_URL, TOKEN_CDC, TOKEN_CDO, TOKEN_COLON, TOKEN_COMMA, TOKEN_COMMENT, TOKEN_DELIM, TOKEN_DIMENSION, TOKEN_EOF, TOKEN_FUNCTION, TOKEN_HASH, TOKEN_IDENT, TOKEN_LEFT_BRACE, TOKEN_LEFT_BRACKET, TOKEN_LEFT_PAREN, TOKEN_NUMBER, TOKEN_PERCENTAGE, TOKEN_RIGHT_BRACE, TOKEN_RIGHT_BRACKET, TOKEN_RIGHT_PAREN, TOKEN_SEMICOLON, TOKEN_STRING, TOKEN_UNICODE_RANGE, TOKEN_URL, TOKEN_WHITESPACE, TYPE_SELECTOR, type ToPlain, Token, TokenType, type TypeSelector, UNICODE_RANGE, UNIVERSAL_SELECTOR, URL, type UnicodeRange, type UniversalSelector, type Url, VALUE, type Value, type WithChildren, is_atrule, is_atrule_prelude, is_attribute_selector, is_block, is_class_selector, is_combinator, is_comment, is_container_query, is_custom, is_declaration, is_dimension, is_feature_range, is_function, is_hash, is_id_selector, is_identifier, is_if_branch, is_if_condition, is_lang_selector, is_layer_name, is_media_feature, is_media_query, is_media_type, is_nesting_selector, is_nth_of_selector, is_nth_selector, is_number, is_operator, is_parenthesis, is_prelude_operator, is_prelude_selectorlist, is_pseudo_class_selector, is_pseudo_element_selector, is_ratio, is_raw, is_rule, is_selector, is_selector_list, is_string, is_stylesheet, is_supports_declaration, is_supports_query, is_type_selector, is_unicode_range, is_universal_selector, is_url, is_value, is_vendor_prefixed, parse, parse_atrule_prelude, parse_declaration, parse_dimension, parse_selector, parse_selector_list, parse_value, str_equals, str_index_of, str_starts_with, strip_vendor_prefix, tokenize, tokenize_cb, traverse, walk };
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { n as tokenize } from "./tokenize-
|
|
1
|
+
import { n as tokenize, r as tokenize_cb } from "./tokenize-DC2Vb0J_.js";
|
|
2
2
|
import { TOKEN_AT_KEYWORD, TOKEN_BAD_STRING, TOKEN_BAD_URL, TOKEN_CDC, TOKEN_CDO, TOKEN_COLON, TOKEN_COMMA, TOKEN_COMMENT, TOKEN_DELIM, TOKEN_DIMENSION, TOKEN_EOF, TOKEN_FUNCTION, TOKEN_HASH, TOKEN_IDENT, TOKEN_LEFT_BRACE, TOKEN_LEFT_BRACKET, TOKEN_LEFT_PAREN, TOKEN_NUMBER, TOKEN_PERCENTAGE, TOKEN_RIGHT_BRACE, TOKEN_RIGHT_BRACKET, TOKEN_RIGHT_PAREN, TOKEN_SEMICOLON, TOKEN_STRING, TOKEN_UNICODE_RANGE, TOKEN_URL, TOKEN_WHITESPACE } from "./token-types.js";
|
|
3
|
-
import { A as PARENTHESIS, B as STYLE_RULE, C as MEDIA_QUERY, D as NTH_SELECTOR, E as NTH_OF_SELECTOR, F as RAW, G as UNIVERSAL_SELECTOR, H as SUPPORTS_QUERY, I as SELECTOR, K as URL, L as SELECTOR_LIST, M as PSEUDO_CLASS_SELECTOR, N as PSEUDO_ELEMENT_SELECTOR, O as NUMBER, P as RATIO, R as STRING, S as MEDIA_FEATURE, T as NESTING_SELECTOR, U as TYPE_SELECTOR, V as SUPPORTS_DECLARATION, W as UNICODE_RANGE, _ as ID_SELECTOR, a as CLASS_SELECTOR, b as LANG_SELECTOR, c as CONTAINER_QUERY, d as DIMENSION, f as FEATURE_RANGE, g as IDENTIFIER, h as HASH, i as BLOCK, j as PRELUDE_OPERATOR, k as OPERATOR, m as FUNCTION, n as AT_RULE, o as COMBINATOR, p as FLAG_IMPORTANT, q as VALUE, r as AT_RULE_PRELUDE, s as COMMENT, t as ATTRIBUTE_SELECTOR, u as DECLARATION, v as IF_BRANCH, w as MEDIA_TYPE, x as LAYER_NAME, y as IF_CONDITION, z as STYLESHEET } from "./arena-
|
|
4
|
-
import { a as is_vendor_prefixed, d as strip_vendor_prefix, l as str_index_of, r as is_custom, s as str_equals, u as str_starts_with } from "./string-utils-
|
|
3
|
+
import { A as PARENTHESIS, B as STYLE_RULE, C as MEDIA_QUERY, D as NTH_SELECTOR, E as NTH_OF_SELECTOR, F as RAW, G as UNIVERSAL_SELECTOR, H as SUPPORTS_QUERY, I as SELECTOR, K as URL, L as SELECTOR_LIST, M as PSEUDO_CLASS_SELECTOR, N as PSEUDO_ELEMENT_SELECTOR, O as NUMBER, P as RATIO, R as STRING, S as MEDIA_FEATURE, T as NESTING_SELECTOR, U as TYPE_SELECTOR, V as SUPPORTS_DECLARATION, W as UNICODE_RANGE, _ as ID_SELECTOR, a as CLASS_SELECTOR, b as LANG_SELECTOR, c as CONTAINER_QUERY, d as DIMENSION, f as FEATURE_RANGE, g as IDENTIFIER, h as HASH, i as BLOCK, j as PRELUDE_OPERATOR, k as OPERATOR, m as FUNCTION, n as AT_RULE, o as COMBINATOR, p as FLAG_IMPORTANT, q as VALUE, r as AT_RULE_PRELUDE, s as COMMENT, t as ATTRIBUTE_SELECTOR, u as DECLARATION, v as IF_BRANCH, w as MEDIA_TYPE, x as LAYER_NAME, y as IF_CONDITION, z as STYLESHEET } from "./arena-CaLnNKbP.js";
|
|
4
|
+
import { a as is_vendor_prefixed, d as strip_vendor_prefix, l as str_index_of, r as is_custom, s as str_equals, u as str_starts_with } from "./string-utils-BYH1Oe8a.js";
|
|
5
5
|
import { parse_dimension } from "./parse-dimension.js";
|
|
6
|
-
import { n as parse_selector, r as parse_selector_list } from "./parse-selector-
|
|
7
|
-
import { parse_atrule_prelude } from "./parse-atrule-prelude.js";
|
|
6
|
+
import { n as parse_selector, r as parse_selector_list } from "./parse-selector-CMKZgPmu.js";
|
|
7
|
+
import { n as parse_atrule_prelude } from "./parse-atrule-prelude-BMkgCZjw.js";
|
|
8
8
|
import { parse_value } from "./parse-value.js";
|
|
9
9
|
import { parse_declaration } from "./parse-declaration.js";
|
|
10
10
|
import { parse } from "./parse.js";
|
|
@@ -12,4 +12,4 @@ import { NODE_TYPES } from "./constants.js";
|
|
|
12
12
|
import { BREAK, SKIP, traverse, walk } from "./walk.js";
|
|
13
13
|
import "./string-helpers.js";
|
|
14
14
|
import { is_atrule, is_atrule_prelude, is_attribute_selector, is_block, is_class_selector, is_combinator, is_comment, is_container_query, is_declaration, is_dimension, is_feature_range, is_function, is_hash, is_id_selector, is_identifier, is_if_branch, is_if_condition, is_lang_selector, is_layer_name, is_media_feature, is_media_query, is_media_type, is_nesting_selector, is_nth_of_selector, is_nth_selector, is_number, is_operator, is_parenthesis, is_prelude_operator, is_prelude_selectorlist, is_pseudo_class_selector, is_pseudo_element_selector, is_ratio, is_raw, is_rule, is_selector, is_selector_list, is_string, is_stylesheet, is_supports_declaration, is_supports_query, is_type_selector, is_unicode_range, is_universal_selector, is_url, is_value } from "./node-types.js";
|
|
15
|
-
export { ATTRIBUTE_SELECTOR, AT_RULE, AT_RULE_PRELUDE, BLOCK, BREAK, CLASS_SELECTOR, COMBINATOR, COMMENT, CONTAINER_QUERY, DECLARATION, DIMENSION, FEATURE_RANGE, FLAG_IMPORTANT, FUNCTION, HASH, IDENTIFIER, ID_SELECTOR, IF_BRANCH, IF_CONDITION, LANG_SELECTOR, LAYER_NAME, MEDIA_FEATURE, MEDIA_QUERY, MEDIA_TYPE, NESTING_SELECTOR, NODE_TYPES, NTH_OF_SELECTOR, NTH_SELECTOR, NUMBER, OPERATOR, PARENTHESIS, PRELUDE_OPERATOR, PSEUDO_CLASS_SELECTOR, PSEUDO_ELEMENT_SELECTOR, RATIO, RAW, SELECTOR, SELECTOR_LIST, SKIP, STRING, STYLESHEET, STYLE_RULE, SUPPORTS_DECLARATION, SUPPORTS_QUERY, TOKEN_AT_KEYWORD, TOKEN_BAD_STRING, TOKEN_BAD_URL, TOKEN_CDC, TOKEN_CDO, TOKEN_COLON, TOKEN_COMMA, TOKEN_COMMENT, TOKEN_DELIM, TOKEN_DIMENSION, TOKEN_EOF, TOKEN_FUNCTION, TOKEN_HASH, TOKEN_IDENT, TOKEN_LEFT_BRACE, TOKEN_LEFT_BRACKET, TOKEN_LEFT_PAREN, TOKEN_NUMBER, TOKEN_PERCENTAGE, TOKEN_RIGHT_BRACE, TOKEN_RIGHT_BRACKET, TOKEN_RIGHT_PAREN, TOKEN_SEMICOLON, TOKEN_STRING, TOKEN_UNICODE_RANGE, TOKEN_URL, TOKEN_WHITESPACE, TYPE_SELECTOR, UNICODE_RANGE, UNIVERSAL_SELECTOR, URL, VALUE, is_atrule, is_atrule_prelude, is_attribute_selector, is_block, is_class_selector, is_combinator, is_comment, is_container_query, is_custom, is_declaration, is_dimension, is_feature_range, is_function, is_hash, is_id_selector, is_identifier, is_if_branch, is_if_condition, is_lang_selector, is_layer_name, is_media_feature, is_media_query, is_media_type, is_nesting_selector, is_nth_of_selector, is_nth_selector, is_number, is_operator, is_parenthesis, is_prelude_operator, is_prelude_selectorlist, is_pseudo_class_selector, is_pseudo_element_selector, is_ratio, is_raw, is_rule, is_selector, is_selector_list, is_string, is_stylesheet, is_supports_declaration, is_supports_query, is_type_selector, is_unicode_range, is_universal_selector, is_url, is_value, is_vendor_prefixed, parse, parse_atrule_prelude, parse_declaration, parse_dimension, parse_selector, parse_selector_list, parse_value, str_equals, str_index_of, str_starts_with, strip_vendor_prefix, tokenize, traverse, walk };
|
|
15
|
+
export { ATTRIBUTE_SELECTOR, AT_RULE, AT_RULE_PRELUDE, BLOCK, BREAK, CLASS_SELECTOR, COMBINATOR, COMMENT, CONTAINER_QUERY, DECLARATION, DIMENSION, FEATURE_RANGE, FLAG_IMPORTANT, FUNCTION, HASH, IDENTIFIER, ID_SELECTOR, IF_BRANCH, IF_CONDITION, LANG_SELECTOR, LAYER_NAME, MEDIA_FEATURE, MEDIA_QUERY, MEDIA_TYPE, NESTING_SELECTOR, NODE_TYPES, NTH_OF_SELECTOR, NTH_SELECTOR, NUMBER, OPERATOR, PARENTHESIS, PRELUDE_OPERATOR, PSEUDO_CLASS_SELECTOR, PSEUDO_ELEMENT_SELECTOR, RATIO, RAW, SELECTOR, SELECTOR_LIST, SKIP, STRING, STYLESHEET, STYLE_RULE, SUPPORTS_DECLARATION, SUPPORTS_QUERY, TOKEN_AT_KEYWORD, TOKEN_BAD_STRING, TOKEN_BAD_URL, TOKEN_CDC, TOKEN_CDO, TOKEN_COLON, TOKEN_COMMA, TOKEN_COMMENT, TOKEN_DELIM, TOKEN_DIMENSION, TOKEN_EOF, TOKEN_FUNCTION, TOKEN_HASH, TOKEN_IDENT, TOKEN_LEFT_BRACE, TOKEN_LEFT_BRACKET, TOKEN_LEFT_PAREN, TOKEN_NUMBER, TOKEN_PERCENTAGE, TOKEN_RIGHT_BRACE, TOKEN_RIGHT_BRACKET, TOKEN_RIGHT_PAREN, TOKEN_SEMICOLON, TOKEN_STRING, TOKEN_UNICODE_RANGE, TOKEN_URL, TOKEN_WHITESPACE, TYPE_SELECTOR, UNICODE_RANGE, UNIVERSAL_SELECTOR, URL, VALUE, is_atrule, is_atrule_prelude, is_attribute_selector, is_block, is_class_selector, is_combinator, is_comment, is_container_query, is_custom, is_declaration, is_dimension, is_feature_range, is_function, is_hash, is_id_selector, is_identifier, is_if_branch, is_if_condition, is_lang_selector, is_layer_name, is_media_feature, is_media_query, is_media_type, is_nesting_selector, is_nth_of_selector, is_nth_selector, is_number, is_operator, is_parenthesis, is_prelude_operator, is_prelude_selectorlist, is_pseudo_class_selector, is_pseudo_element_selector, is_ratio, is_raw, is_rule, is_selector, is_selector_list, is_string, is_stylesheet, is_supports_declaration, is_supports_query, is_type_selector, is_unicode_range, is_universal_selector, is_url, is_value, is_vendor_prefixed, parse, parse_atrule_prelude, parse_declaration, parse_dimension, parse_selector, parse_selector_list, parse_value, str_equals, str_index_of, str_starts_with, strip_vendor_prefix, tokenize, tokenize_cb, traverse, walk };
|