@projectwallace/css-parser 0.19.3 → 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.
Files changed (40) hide show
  1. package/README.md +14 -2
  2. package/dist/{arena-D123N1LO.js → arena-CaLnNKbP.js} +1 -2
  3. package/dist/{arena-DnAc8Oy_.d.ts → arena-D689Bo6V.d.ts} +0 -2
  4. package/dist/constants.d.ts +46 -48
  5. package/dist/constants.js +2 -3
  6. package/dist/{css-node-D9rqMgMI.js → css-node-CDTLvxo3.js} +3 -4
  7. package/dist/index.d.ts +6 -6
  8. package/dist/index.js +6 -6
  9. package/dist/{node-types-Pa1MR4CP.d.ts → node-types-BF6bhAjo.d.ts} +54 -62
  10. package/dist/node-types.d.ts +1 -1
  11. package/dist/node-types.js +2 -3
  12. package/dist/parse-anplusb.d.ts +3 -5
  13. package/dist/parse-anplusb.js +5 -6
  14. package/dist/{value-node-parser-ysQ7ssqf.js → parse-atrule-prelude-BMkgCZjw.js} +450 -12
  15. package/dist/parse-atrule-prelude.d.ts +3 -5
  16. package/dist/parse-atrule-prelude.js +1 -431
  17. package/dist/parse-declaration.d.ts +3 -5
  18. package/dist/parse-declaration.js +6 -7
  19. package/dist/parse-dimension.d.ts +1 -3
  20. package/dist/parse-dimension.js +2 -3
  21. package/dist/{parse-selector-BMeyZ-oJ.js → parse-selector-CMKZgPmu.js} +6 -8
  22. package/dist/parse-selector.d.ts +3 -5
  23. package/dist/parse-selector.js +1 -1
  24. package/dist/parse-value.d.ts +3 -5
  25. package/dist/parse-value.js +4 -5
  26. package/dist/parse.d.ts +3 -5
  27. package/dist/parse.js +6 -7
  28. package/dist/{string-helpers-t7UofIfp.d.ts → string-helpers-CwNEcEhd.d.ts} +0 -2
  29. package/dist/string-helpers.d.ts +1 -1
  30. package/dist/string-helpers.js +1 -1
  31. package/dist/{string-utils-aEEsA2CS.js → string-utils-BYH1Oe8a.js} +0 -1
  32. package/dist/{token-types-Bqsf5FX-.d.ts → token-types-BhoXrORA.d.ts} +0 -2
  33. package/dist/token-types.d.ts +1 -1
  34. package/dist/token-types.js +1 -2
  35. package/dist/{tokenize-B2QSzdrM.js → tokenize-DC2Vb0J_.js} +20 -6
  36. package/dist/tokenize.d.ts +17 -5
  37. package/dist/tokenize.js +1 -1
  38. package/dist/walk.d.ts +1 -3
  39. package/dist/walk.js +3 -4
  40. package/package.json +3 -3
package/README.md CHANGED
@@ -140,9 +140,21 @@ traverse(ast, {
140
140
  })
141
141
  ```
142
142
 
143
- ### `tokenize(source, on_comment?)`
143
+ ### `tokenize_cb(source, on_token)`
144
144
 
145
- A generator of tokens; comments are skipped and reported through `on_comment`.
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.
146
158
 
147
159
  ```typescript
148
160
  for (const token of tokenize('a { color: red }')) {
@@ -1,4 +1,4 @@
1
- //#region src/arena.ts
1
+ // src/arena.ts
2
2
  const BYTES_PER_NODE = 32;
3
3
  const STYLESHEET = 1;
4
4
  const STYLE_RULE = 2;
@@ -229,5 +229,4 @@ var CSSDataArena = class CSSDataArena {
229
229
  return (this.get_flags(node_index) & flag) !== 0;
230
230
  }
231
231
  };
232
- //#endregion
233
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;
@@ -100,5 +99,4 @@ declare class CSSDataArena {
100
99
  clear_flag(node_index: number, flag: number): void;
101
100
  has_flag(node_index: number, flag: number): boolean;
102
101
  }
103
- //#endregion
104
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 };
@@ -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-DnAc8Oy_.js";
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: 1;
5
- readonly STYLE_RULE: 2;
6
- readonly AT_RULE: 3;
7
- readonly DECLARATION: 4;
8
- readonly SELECTOR: 5;
9
- readonly COMMENT: 6;
10
- readonly BLOCK: 7;
11
- readonly RAW: 8;
12
- readonly IDENTIFIER: 10;
13
- readonly NUMBER: 11;
14
- readonly DIMENSION: 12;
15
- readonly STRING: 13;
16
- readonly HASH: 14;
17
- readonly FUNCTION: 15;
18
- readonly OPERATOR: 16;
19
- readonly PARENTHESIS: 17;
20
- readonly URL: 18;
21
- readonly UNICODE_RANGE: 19;
22
- readonly IF_BRANCH: 59;
23
- readonly IF_CONDITION: 60;
24
- readonly VALUE: 50;
25
- readonly SELECTOR_LIST: 20;
26
- readonly TYPE_SELECTOR: 21;
27
- readonly CLASS_SELECTOR: 22;
28
- readonly ID_SELECTOR: 23;
29
- readonly ATTRIBUTE_SELECTOR: 24;
30
- readonly PSEUDO_CLASS_SELECTOR: 25;
31
- readonly PSEUDO_ELEMENT_SELECTOR: 26;
32
- readonly COMBINATOR: 27;
33
- readonly UNIVERSAL_SELECTOR: 28;
34
- readonly NESTING_SELECTOR: 29;
35
- readonly NTH_SELECTOR: 30;
36
- readonly NTH_OF_SELECTOR: 31;
37
- readonly LANG_SELECTOR: 56;
38
- readonly MEDIA_QUERY: 32;
39
- readonly MEDIA_FEATURE: 33;
40
- readonly MEDIA_TYPE: 34;
41
- readonly CONTAINER_QUERY: 35;
42
- readonly SUPPORTS_QUERY: 36;
43
- readonly SUPPORTS_DECLARATION: 57;
44
- readonly LAYER_NAME: 37;
45
- readonly PRELUDE_OPERATOR: 38;
46
- readonly FEATURE_RANGE: 39;
47
- readonly AT_RULE_PRELUDE: 40;
48
- readonly RATIO: 58;
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-D123N1LO.js";
2
- //#region src/constants.ts
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-D123N1LO.js";
2
- import { a as is_vendor_prefixed, o as is_whitespace, s as str_equals, u as str_starts_with } from "./string-utils-aEEsA2CS.js";
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
- //#region src/css-node.ts
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-DnAc8Oy_.js";
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-Bqsf5FX-.js";
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-Pa1MR4CP.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-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-t7UofIfp.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 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-B2QSzdrM.js";
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-D123N1LO.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-aEEsA2CS.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-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-BMeyZ-oJ.js";
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 };
@@ -1,6 +1,5 @@
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, M as PRELUDE_SELECTORLIST, 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, 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-DnAc8Oy_.js";
2
- //#region src/css-node.d.ts
3
- type TypeName = 'StyleSheet' | 'Rule' | 'Atrule' | 'Declaration' | 'Selector' | 'Comment' | 'Block' | 'Raw' | 'Identifier' | 'Number' | 'Dimension' | 'String' | 'Hash' | 'Function' | 'Operator' | 'Parentheses' | 'Url' | 'UnicodeRange' | 'Value' | 'SelectorList' | 'TypeSelector' | 'ClassSelector' | 'IdSelector' | 'AttributeSelector' | 'PseudoClassSelector' | 'PseudoElementSelector' | 'Combinator' | 'UniversalSelector' | 'NestingSelector' | 'Nth' | 'NthOf' | 'Lang' | 'MediaQuery' | 'Feature' | 'MediaType' | 'ContainerQuery' | 'SupportsQuery' | 'SupportsDeclaration' | 'Layer' | 'MediaFeatureRange' | 'AtrulePrelude' | 'PreludeSelectorList' | 'Ratio' | 'IfBranch' | 'IfCondition' | 'unknown';
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, M as PRELUDE_SELECTORLIST, 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, 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
+ type TypeName = "StyleSheet" | "Rule" | "Atrule" | "Declaration" | "Selector" | "Comment" | "Block" | "Raw" | "Identifier" | "Number" | "Dimension" | "String" | "Hash" | "Function" | "Operator" | "Parentheses" | "Url" | "UnicodeRange" | "Value" | "SelectorList" | "TypeSelector" | "ClassSelector" | "IdSelector" | "AttributeSelector" | "PseudoClassSelector" | "PseudoElementSelector" | "Combinator" | "UniversalSelector" | "NestingSelector" | "Nth" | "NthOf" | "Lang" | "MediaQuery" | "Feature" | "MediaType" | "ContainerQuery" | "SupportsQuery" | "SupportsDeclaration" | "Layer" | "MediaFeatureRange" | "AtrulePrelude" | "PreludeSelectorList" | "Ratio" | "IfBranch" | "IfCondition" | "unknown";
4
3
  type CSSNodeType = typeof STYLESHEET | typeof STYLE_RULE | typeof AT_RULE | typeof DECLARATION | typeof SELECTOR | typeof COMMENT | typeof BLOCK | typeof RAW | typeof IDENTIFIER | typeof NUMBER | typeof DIMENSION | typeof STRING | typeof HASH | typeof FUNCTION | typeof OPERATOR | typeof PARENTHESIS | typeof URL | typeof UNICODE_RANGE | typeof VALUE | typeof SELECTOR_LIST | typeof TYPE_SELECTOR | typeof CLASS_SELECTOR | typeof ID_SELECTOR | typeof ATTRIBUTE_SELECTOR | typeof PSEUDO_CLASS_SELECTOR | typeof PSEUDO_ELEMENT_SELECTOR | typeof COMBINATOR | typeof UNIVERSAL_SELECTOR | typeof NESTING_SELECTOR | typeof NTH_SELECTOR | typeof NTH_OF_SELECTOR | typeof LANG_SELECTOR | typeof MEDIA_QUERY | typeof MEDIA_FEATURE | typeof MEDIA_TYPE | typeof CONTAINER_QUERY | typeof SUPPORTS_QUERY | typeof LAYER_NAME | typeof PRELUDE_OPERATOR | typeof FEATURE_RANGE | typeof AT_RULE_PRELUDE | typeof PRELUDE_SELECTORLIST | typeof SUPPORTS_DECLARATION | typeof RATIO | typeof IF_BRANCH | typeof IF_CONDITION;
5
4
  interface CloneOptions {
6
5
  /**
@@ -44,8 +43,6 @@ type PlainCSSNode = {
44
43
  length?: number;
45
44
  end?: number;
46
45
  };
47
- //#endregion
48
- //#region src/node-types.d.ts
49
46
  type CSSNode = {
50
47
  readonly type: CSSNodeType;
51
48
  readonly type_name: TypeName;
@@ -95,29 +92,25 @@ interface WithChildren<T = AnyNode> {
95
92
  * since clone() never serialises them.
96
93
  */
97
94
  type ToPlain<T extends CSSNode> = PlainCSSNode & {
98
- type: T['type'];
99
- } & { [K in Exclude<keyof T, keyof CSSNode | symbol | 'attr_operator' | 'attr_flags' | 'has_children' | 'child_count' | 'children'> as T[K] extends ((...args: any[]) => any) ? never : K]: T[K] extends CSSNode | null | undefined ? PlainCSSNode | Exclude<T[K], CSSNode> : T[K] extends CSSNode[] ? PlainCSSNode[] : T[K]; };
95
+ type: T["type"];
96
+ } & { [K in Exclude<keyof T, keyof CSSNode | symbol | "attr_operator" | "attr_flags" | "has_children" | "child_count" | "children"> as T[K] extends ((...args: any[]) => any) ? never : K]: T[K] extends CSSNode | null | undefined ? PlainCSSNode | Exclude<T[K], CSSNode> : T[K] extends CSSNode[] ? PlainCSSNode[] : T[K]; };
100
97
  type StyleSheet = WithClone<CSSNode & WithChildren & {
101
98
  readonly type: typeof STYLESHEET;
102
- readonly type_name: 'StyleSheet';
99
+ readonly type_name: "StyleSheet";
103
100
  }>;
104
- type Rule = WithClone<CSSNode &
105
- /** SELECTOR_LIST (parse_selectors=true) or RAW (parse_selectors=false) */
106
- Toggle<'has_prelude', 'prelude', SelectorList | Raw> & Toggle<'has_block', 'block', Block> & {
101
+ type Rule = WithClone<CSSNode & Toggle<"has_prelude", "prelude", SelectorList | Raw> & Toggle<"has_block", "block", Block> & {
107
102
  readonly type: typeof STYLE_RULE;
108
- readonly type_name: 'Rule';
103
+ readonly type_name: "Rule";
109
104
  readonly has_declarations: boolean;
110
105
  }>;
111
- type Atrule = WithClone<CSSNode &
112
- /** AT_RULE_PRELUDE (parse_atrule_preludes=true) or RAW (parse_atrule_preludes=false) */
113
- Toggle<'has_prelude', 'prelude', AtrulePrelude | Raw> & Toggle<'has_block', 'block', Block> & {
106
+ type Atrule = WithClone<CSSNode & Toggle<"has_prelude", "prelude", AtrulePrelude | Raw> & Toggle<"has_block", "block", Block> & {
114
107
  readonly type: typeof AT_RULE;
115
- readonly type_name: 'Atrule';
108
+ readonly type_name: "Atrule";
116
109
  /** At-rule keyword, e.g. "media", "keyframes" */
117
110
  readonly name: string;
118
111
  readonly has_declarations: boolean;
119
112
  }>;
120
- type Declaration = Leaf<typeof DECLARATION, 'Declaration', {
113
+ type Declaration = Leaf<typeof DECLARATION, "Declaration", {
121
114
  /** Property name, e.g. "color" */
122
115
  readonly property: string;
123
116
  /** VALUE node (parse_values=true), RAW node (parse_values=false), or null */
@@ -128,82 +121,82 @@ type Declaration = Leaf<typeof DECLARATION, 'Declaration', {
128
121
  type SelectorNode = TypeSelector | IdSelector | ClassSelector | NthSelector | NthOfSelector | LangSelector | NestingSelector | AttributeSelector | UniversalSelector | PseudoClassSelector | PseudoElementSelector;
129
122
  type Selector = WithClone<CSSNode & WithChildren<SelectorNode> & {
130
123
  readonly type: typeof SELECTOR;
131
- readonly type_name: 'Selector';
124
+ readonly type_name: "Selector";
132
125
  }>;
133
126
  type SelectorList = WithClone<CSSNode & WithChildren<Selector> & {
134
127
  readonly type: typeof SELECTOR_LIST;
135
- readonly type_name: 'SelectorList';
128
+ readonly type_name: "SelectorList";
136
129
  }>;
137
130
  /**
138
131
  * A direct child of a Block: `Raw | Declaration | Atrule | Rule` with
139
132
  * `next_sibling` narrowed to the same union instead of generic `CSSNode`.
140
133
  * Safe since none of the four use WithChildren, avoiding TS2589.
141
134
  */
142
- type BlockChild = (Raw | Declaration | Atrule | Rule) & Toggle<'has_next', 'next_sibling', Raw | Declaration | Atrule | Rule>;
135
+ type BlockChild = (Raw | Declaration | Atrule | Rule) & Toggle<"has_next", "next_sibling", Raw | Declaration | Atrule | Rule>;
143
136
  type Block = WithClone<CSSNode & WithChildren<Raw | Declaration | Atrule | Rule> & {
144
137
  readonly type: typeof BLOCK;
145
- readonly type_name: 'Block';
138
+ readonly type_name: "Block";
146
139
  readonly is_empty: boolean;
147
140
  /** Block children with next_sibling narrowed to the Block child union. */
148
141
  readonly first_child: BlockChild;
149
142
  readonly children: BlockChild[];
150
143
  [Symbol.iterator](): Iterator<BlockChild>;
151
144
  }>;
152
- type Comment = Leaf<typeof COMMENT, 'Comment'>;
153
- type Raw = Leaf<typeof RAW, 'Raw'>;
145
+ type Comment = Leaf<typeof COMMENT, "Comment">;
146
+ type Raw = Leaf<typeof RAW, "Raw">;
154
147
  type ValueLike = Function | IfBranch | Identifier | Operator | Parenthesis | Url | UnicodeRange | String | Hash | Dimension | Number | Ratio | SelectorList | SupportsDeclaration;
155
- type Identifier = Leaf<typeof IDENTIFIER, 'Identifier', {
148
+ type Identifier = Leaf<typeof IDENTIFIER, "Identifier", {
156
149
  readonly name: string;
157
150
  }>;
158
- type Number = Leaf<typeof NUMBER, 'Number', {
151
+ type Number = Leaf<typeof NUMBER, "Number", {
159
152
  readonly value: number;
160
153
  }>;
161
154
  /** Ratio value, e.g. "16/9" in `aspect-ratio: 16/9`. A bare number like `aspect-ratio: 1` parses as a plain Number instead. */
162
- type Ratio = Leaf<typeof RATIO, 'Ratio', {
155
+ type Ratio = Leaf<typeof RATIO, "Ratio", {
163
156
  readonly left: Number;
164
157
  readonly right: Number;
165
158
  }>;
166
- type Dimension = Leaf<typeof DIMENSION, 'Dimension', {
159
+ type Dimension = Leaf<typeof DIMENSION, "Dimension", {
167
160
  readonly value: number;
168
161
  /** Unit string, e.g. "px", "%" */
169
162
  readonly unit: string;
170
163
  }>;
171
- type String = Leaf<typeof STRING, 'String'>;
172
- type Hash = Leaf<typeof HASH, 'Hash'>;
173
- type Function = WithClone<CSSNode & WithChildren<ValueLike | MediaFeature | SupportsDeclaration | SupportsQuery | LayerName | FeatureRange | PreludeOperator> & {
164
+ type String = Leaf<typeof STRING, "String">;
165
+ type Hash = Leaf<typeof HASH, "Hash">;
166
+ type Function = WithClone<CSSNode & WithChildren<ValueLike | MediaFeature | MediaQuery | SupportsDeclaration | SupportsQuery | LayerName | FeatureRange | PreludeOperator> & {
174
167
  readonly type: typeof FUNCTION;
175
- readonly type_name: 'Function';
168
+ readonly type_name: "Function";
176
169
  /** Function name, e.g. "rgb", "calc" */
177
170
  readonly name: string;
178
171
  /** Function arguments as raw text, e.g. "255, 0, 0" for rgb(255, 0, 0) */
179
172
  readonly value: string | null;
180
173
  }>;
181
- type Operator = Leaf<typeof OPERATOR, 'Operator', {
174
+ type Operator = Leaf<typeof OPERATOR, "Operator", {
182
175
  /** The operator character(s), e.g. ",", "+", "-" */
183
176
  readonly value: string;
184
177
  }>;
185
178
  type Parenthesis = WithClone<CSSNode & WithChildren & {
186
179
  readonly type: typeof PARENTHESIS;
187
- readonly type_name: 'Parentheses';
180
+ readonly type_name: "Parentheses";
188
181
  }>;
189
- type Url = Leaf<typeof URL, 'Url', {
182
+ type Url = Leaf<typeof URL, "Url", {
190
183
  /** URL content, e.g. '"image.png"' (with quotes) or 'mycursor.cur' (unquoted) */
191
184
  readonly value: string | null;
192
185
  }>;
193
- type UnicodeRange = Leaf<typeof UNICODE_RANGE, 'UnicodeRange'>;
186
+ type UnicodeRange = Leaf<typeof UNICODE_RANGE, "UnicodeRange">;
194
187
  type Value = WithClone<CSSNode & WithChildren<ValueLike> & {
195
188
  readonly type: typeof VALUE;
196
- readonly type_name: 'Value';
189
+ readonly type_name: "Value";
197
190
  }>;
198
191
  /** Compound `if()` condition: a flat sequence of `not`/`and`/`or` operators and `style()`/`media()`/`supports()` functions, e.g. `not style(--a: 1)`. */
199
192
  type IfCondition = WithClone<CSSNode & WithChildren<Function | PreludeOperator> & {
200
193
  readonly type: typeof IF_CONDITION;
201
- readonly type_name: 'IfCondition';
194
+ readonly type_name: "IfCondition";
202
195
  }>;
203
196
  /** A `<condition>: <value>` branch of an `if()` function. `children` is the condition followed by the parsed value nodes. */
204
197
  type IfBranch = CSSNode & WithChildren<Function | Identifier | IfCondition | Value> & {
205
198
  readonly type: typeof IF_BRANCH;
206
- readonly type_name: 'IfBranch';
199
+ readonly type_name: "IfBranch";
207
200
  /** Function (`style(--x: 1)`), Identifier (`else`) or IfCondition */
208
201
  readonly condition: Function | Identifier | IfCondition;
209
202
  /** Branch value, or null when empty */
@@ -211,21 +204,21 @@ type IfBranch = CSSNode & WithChildren<Function | Identifier | IfCondition | Val
211
204
  readonly is_else: boolean;
212
205
  clone(options?: CloneOptions): ToPlain<IfBranch>;
213
206
  };
214
- type TypeSelector = Leaf<typeof TYPE_SELECTOR, 'TypeSelector', {
207
+ type TypeSelector = Leaf<typeof TYPE_SELECTOR, "TypeSelector", {
215
208
  /** Local element name, e.g. "div" in both "div" and "ns|div" */
216
209
  readonly name: string;
217
210
  /** Namespace prefix: null if no qualifier, '' for |div, 'ns' for ns|div, '*' for *|div */
218
211
  readonly namespace: string | null;
219
212
  }>;
220
- type ClassSelector = Leaf<typeof CLASS_SELECTOR, 'ClassSelector', {
213
+ type ClassSelector = Leaf<typeof CLASS_SELECTOR, "ClassSelector", {
221
214
  /** Class name without dot, e.g. "foo" from ".foo" */
222
215
  readonly name: string;
223
216
  }>;
224
- type IdSelector = Leaf<typeof ID_SELECTOR, 'IdSelector', {
217
+ type IdSelector = Leaf<typeof ID_SELECTOR, "IdSelector", {
225
218
  /** Id without hash, e.g. "bar" from "#bar" */
226
219
  readonly name: string;
227
220
  }>;
228
- type AttributeSelector = Leaf<typeof ATTRIBUTE_SELECTOR, 'AttributeSelector', {
221
+ type AttributeSelector = Leaf<typeof ATTRIBUTE_SELECTOR, "AttributeSelector", {
229
222
  /** Attribute name, e.g. "href" from "[href]" */
230
223
  readonly name: string;
231
224
  /** Operator string, e.g. "=", "~=", "|="; null if no operator ([attr] form) */
@@ -237,82 +230,82 @@ type AttributeSelector = Leaf<typeof ATTRIBUTE_SELECTOR, 'AttributeSelector', {
237
230
  }>;
238
231
  type PseudoClassSelector = WithClone<CSSNode & WithChildren<Selector | NthOfSelector> & {
239
232
  readonly type: typeof PSEUDO_CLASS_SELECTOR;
240
- readonly type_name: 'PseudoClassSelector';
233
+ readonly type_name: "PseudoClassSelector";
241
234
  /** Pseudo-class name without colon, e.g. "hover" */
242
235
  readonly name: string;
243
236
  }>;
244
237
  type PseudoElementSelector = WithClone<CSSNode & WithChildren<SelectorList> & {
245
238
  readonly type: typeof PSEUDO_ELEMENT_SELECTOR;
246
- readonly type_name: 'PseudoElementSelector';
239
+ readonly type_name: "PseudoElementSelector";
247
240
  /** Pseudo-element name without colons, e.g. "before" */
248
241
  readonly name: string;
249
242
  }>;
250
- type Combinator = Leaf<typeof COMBINATOR, 'Combinator', {
243
+ type Combinator = Leaf<typeof COMBINATOR, "Combinator", {
251
244
  /** Combinator character(s), e.g. " ", ">", "~", "+", "||", "/deep/" */
252
245
  readonly name: string;
253
246
  }>;
254
- type UniversalSelector = Leaf<typeof UNIVERSAL_SELECTOR, 'UniversalSelector', {
247
+ type UniversalSelector = Leaf<typeof UNIVERSAL_SELECTOR, "UniversalSelector", {
255
248
  /** Always null — universal selector has no element name */
256
249
  readonly name: null;
257
250
  /** Namespace prefix: null if no qualifier, '' for |*, 'ns' for ns|*, '*' for *|* */
258
251
  readonly namespace: string | null;
259
252
  }>;
260
- type NestingSelector = Leaf<typeof NESTING_SELECTOR, 'NestingSelector'>;
261
- type NthSelector = Leaf<typeof NTH_SELECTOR, 'Nth', {
253
+ type NestingSelector = Leaf<typeof NESTING_SELECTOR, "NestingSelector">;
254
+ type NthSelector = Leaf<typeof NTH_SELECTOR, "Nth", {
262
255
  /** The `An` part of the An+B formula, including keywords `odd`/`even`. Null when only a B value is present (e.g. `:nth-child(3)`). */
263
256
  readonly nth_a: string | null;
264
257
  /** The `+B` part of the An+B formula. Null when only an A value is present (e.g. `:nth-child(2n)` or `:nth-child(odd)`). */
265
258
  readonly nth_b: string | null;
266
259
  }>;
267
- type NthOfSelector = Leaf<typeof NTH_OF_SELECTOR, 'NthOf', {
260
+ type NthOfSelector = Leaf<typeof NTH_OF_SELECTOR, "NthOf", {
268
261
  /** The An+B formula node */
269
262
  readonly nth: NthSelector | null;
270
263
  /** The selector list from :nth-child(An+B of <selector>) */
271
264
  readonly selector: SelectorList | null;
272
265
  }>;
273
- type LangSelector = Leaf<typeof LANG_SELECTOR, 'Lang', {
266
+ type LangSelector = Leaf<typeof LANG_SELECTOR, "Lang", {
274
267
  /** `"nl"`, `en-US` */
275
268
  readonly name: string | null;
276
269
  }>;
277
270
  type AtrulePrelude = WithClone<CSSNode & WithChildren<Raw | MediaQuery | MediaType | ContainerQuery | SupportsQuery | LayerName | PreludeOperator | PreludeSelectorList | Parenthesis | Url | Function | Identifier | String> & {
278
271
  readonly type: typeof AT_RULE_PRELUDE;
279
- readonly type_name: 'AtrulePrelude';
272
+ readonly type_name: "AtrulePrelude";
280
273
  }>;
281
274
  type MediaQuery = WithClone<CSSNode & WithChildren<MediaFeature | PreludeOperator | MediaType | FeatureRange> & {
282
275
  readonly type: typeof MEDIA_QUERY;
283
- readonly type_name: 'MediaQuery';
276
+ readonly type_name: "MediaQuery";
284
277
  }>;
285
278
  type MediaFeature = WithClone<CSSNode & WithChildren<Identifier | Number | Dimension | Ratio> & {
286
279
  readonly type: typeof MEDIA_FEATURE;
287
- readonly type_name: 'Feature';
280
+ readonly type_name: "Feature";
288
281
  /** Feature name, e.g. "min-width" */
289
282
  readonly property: string;
290
283
  /** Feature value node (Dimension, Number, Identifier or Ratio), or null for boolean features like (hover). Hacks like `0\0` add further children after it. */
291
284
  readonly value: Identifier | Number | Dimension | Ratio | null;
292
285
  }>;
293
- type MediaType = Leaf<typeof MEDIA_TYPE, 'MediaType', {
286
+ type MediaType = Leaf<typeof MEDIA_TYPE, "MediaType", {
294
287
  /** Media type text, e.g. "screen", "print" */
295
288
  readonly value: string;
296
289
  }>;
297
290
  type ContainerQuery = WithClone<CSSNode & WithChildren<Identifier | MediaFeature | Function | PreludeOperator> & {
298
291
  readonly type: typeof CONTAINER_QUERY;
299
- readonly type_name: 'ContainerQuery';
292
+ readonly type_name: "ContainerQuery";
300
293
  }>;
301
294
  type SupportsQuery = WithClone<CSSNode & WithChildren<SupportsDeclaration | SupportsQuery | PreludeOperator | Function> & {
302
295
  readonly type: typeof SUPPORTS_QUERY;
303
- readonly type_name: 'SupportsQuery';
296
+ readonly type_name: "SupportsQuery";
304
297
  /** The supports condition text, e.g. "display: flex" from "supports(display: flex)" */
305
298
  readonly value: string;
306
299
  }>;
307
300
  type SupportsDeclaration = WithClone<CSSNode & WithChildren<Declaration> & {
308
301
  readonly type: typeof SUPPORTS_DECLARATION;
309
- readonly type_name: 'SupportsDeclaration';
302
+ readonly type_name: "SupportsDeclaration";
310
303
  /** Property name, e.g. "display" from "(display: flex)" */
311
304
  readonly property: string;
312
305
  /** VALUE node for the declaration's value, e.g. "flex" from "(display: flex)" */
313
306
  readonly value: Value | null;
314
307
  }>;
315
- type LayerName = Leaf<typeof LAYER_NAME, 'Layer', {
308
+ type LayerName = Leaf<typeof LAYER_NAME, "Layer", {
316
309
  readonly name: string;
317
310
  /** Alias for name — the layer name string, e.g. "base" from "layer(base)" */
318
311
  readonly value: string;
@@ -327,16 +320,16 @@ type LayerName = Leaf<typeof LAYER_NAME, 'Layer', {
327
320
  */
328
321
  type PreludeSelectorList = WithClone<CSSNode & WithChildren<SelectorList> & {
329
322
  readonly type: typeof PRELUDE_SELECTORLIST;
330
- readonly type_name: 'PreludeSelectorList';
323
+ readonly type_name: "PreludeSelectorList";
331
324
  readonly value: string;
332
325
  }>;
333
- type PreludeOperator = Leaf<typeof PRELUDE_OPERATOR, 'Operator', {
326
+ type PreludeOperator = Leaf<typeof PRELUDE_OPERATOR, "Operator", {
334
327
  /** The operator keyword or range comparator, e.g. "and", "or", "not", "only", "to", "<", "<=", ">", ">=", "=" */
335
328
  readonly value: string;
336
329
  }>;
337
330
  type FeatureRange = WithClone<CSSNode & WithChildren<Dimension | Function | Identifier | PreludeOperator> & {
338
331
  readonly type: typeof FEATURE_RANGE;
339
- readonly type_name: 'MediaFeatureRange';
332
+ readonly type_name: "MediaFeatureRange";
340
333
  /** The feature name in a range comparison, e.g. "width" from "(width >= 400px)". Also present as an Identifier child, in source order. */
341
334
  readonly name: string;
342
335
  }>;
@@ -387,5 +380,4 @@ declare function is_prelude_operator(node: CSSNode): node is PreludeOperator;
387
380
  declare function is_feature_range(node: CSSNode): node is FeatureRange;
388
381
  declare function is_ratio(node: CSSNode): node is Ratio;
389
382
  declare function is_prelude_selectorlist(node: CSSNode): node is PreludeSelectorList;
390
- //#endregion
391
383
  export { is_atrule as $, Operator as A, is_pseudo_element_selector as At, SelectorList as B, is_type_selector as Bt, MediaFeature as C, is_nth_selector as Ct, NthOfSelector as D, is_prelude_operator as Dt, NestingSelector as E, is_parenthesis as Et, PseudoElementSelector as F, is_selector_list as Ft, SupportsQuery as G, CloneOptions as Gt, String as H, is_universal_selector as Ht, Ratio as I, is_string as It, UnicodeRange as J, ToPlain as K, PlainCSSNode as Kt, Raw as L, is_stylesheet as Lt, PreludeOperator as M, is_raw as Mt, PreludeSelectorList as N, is_rule as Nt, NthSelector as O, is_prelude_selectorlist as Ot, PseudoClassSelector as P, is_selector as Pt, WithChildren as Q, Rule as R, is_supports_declaration as Rt, LayerName as S, is_nth_of_selector as St, MediaType as T, is_operator as Tt, StyleSheet as U, is_url as Ut, SelectorNode as V, is_unicode_range as Vt, SupportsDeclaration as W, is_value as Wt, Url as X, UniversalSelector as Y, Value as Z, IdSelector as _, is_layer_name as _t, Block as a, is_comment as at, IfCondition as b, is_media_type as bt, ClassSelector as c, is_dimension as ct, ContainerQuery as d, is_hash as dt, is_atrule_prelude as et, Declaration as f, is_id_selector as ft, Hash as g, is_lang_selector as gt, Function as h, is_if_condition as ht, AttributeSelector as i, is_combinator as it, Parenthesis as j, is_ratio as jt, Number as k, is_pseudo_class_selector as kt, Combinator as l, is_feature_range as lt, FeatureRange as m, is_if_branch as mt, Atrule as n, is_block as nt, BlockChild as o, is_container_query as ot, Dimension as p, is_identifier as pt, TypeSelector as q, AtrulePrelude as r, is_class_selector as rt, CSSNode as s, is_declaration as st, AnyNode as t, is_attribute_selector as tt, Comment as u, is_function as ut, Identifier as v, is_media_feature as vt, MediaQuery as w, is_number as wt, LangSelector as x, is_nesting_selector as xt, IfBranch as y, is_media_query as yt, Selector as z, is_supports_query as zt };
@@ -1,2 +1,2 @@
1
- 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, o as BlockChild, 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-Pa1MR4CP.js";
1
+ 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, o as BlockChild, 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";
2
2
  export { AnyNode, Atrule, AtrulePrelude, AttributeSelector, Block, BlockChild, CSSNode, ClassSelector, type CloneOptions, Combinator, Comment, ContainerQuery, Declaration, Dimension, FeatureRange, Function, Hash, IdSelector, Identifier, IfBranch, IfCondition, LangSelector, LayerName, MediaFeature, MediaQuery, MediaType, NestingSelector, NthOfSelector, NthSelector, Number, Operator, Parenthesis, type PlainCSSNode, PreludeOperator, PreludeSelectorList, PseudoClassSelector, PseudoElementSelector, Ratio, Raw, Rule, Selector, SelectorList, SelectorNode, String, StyleSheet, SupportsDeclaration, SupportsQuery, ToPlain, TypeSelector, UnicodeRange, UniversalSelector, Url, Value, WithChildren, 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 };