@projectwallace/css-parser 0.14.0 → 0.14.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{css-node-CbNQbD4P.js → css-node-DwKXZuNm.js} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/{node-types-Dt096ytO.d.ts → node-types-DXNwTg3_.d.ts} +127 -144
- package/dist/parse-anplusb.d.ts +1 -1
- package/dist/parse-anplusb.js +1 -1
- package/dist/parse-atrule-prelude.d.ts +1 -1
- package/dist/parse-atrule-prelude.js +1 -1
- package/dist/parse-declaration.d.ts +1 -1
- package/dist/parse-declaration.js +1 -1
- package/dist/parse-selector.d.ts +1 -1
- package/dist/parse-selector.js +1 -2
- package/dist/parse-value.d.ts +1 -1
- package/dist/parse-value.js +1 -1
- package/dist/parse.d.ts +1 -1
- package/dist/parse.js +1 -1
- package/dist/walk.d.ts +1 -1
- package/package.json +3 -3
|
@@ -113,7 +113,7 @@ var CSSNode = class CSSNode {
|
|
|
113
113
|
return this.get_content();
|
|
114
114
|
}
|
|
115
115
|
/**
|
|
116
|
-
* Get the value text (for declarations: "blue" in "
|
|
116
|
+
* Get the value text (for declarations: "1px solid blue" in "border: 1px solid blue")
|
|
117
117
|
* For dimension/number nodes: returns the numeric value as a number
|
|
118
118
|
* For string nodes: returns the string content without quotes
|
|
119
119
|
* For URL nodes with quoted string: returns the string with quotes (consistent with STRING node)
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { B as TYPE_SELECTOR, C as NESTING_SELECTOR, D as OPERATOR, E as NUMBER, F as SELECTOR_LIST, H as UNIVERSAL_SELECTOR, I as STRING, L as STYLESHEET, M as PSEUDO_ELEMENT_SELECTOR, N as RAW, O as PARENTHESIS, P as SELECTOR, R as STYLE_RULE, S as MEDIA_TYPE, T as NTH_SELECTOR, U as URL, V as UNICODE_RANGE, W as VALUE, _ as ID_SELECTOR, a as CLASS_SELECTOR, b as MEDIA_FEATURE, c as CONTAINER_QUERY, d as DIMENSION, f as FEATURE_RANGE, g as IDENTIFIER, h as HASH, i as BLOCK, j as PSEUDO_CLASS_SELECTOR, k as PRELUDE_OPERATOR, m as FUNCTION, n as AT_RULE, o as COMBINATOR, p as FLAG_IMPORTANT, r as AT_RULE_PRELUDE, s as COMMENT, t as ATTRIBUTE_SELECTOR, u as DECLARATION, v as LANG_SELECTOR, w as NTH_OF_SELECTOR, x as MEDIA_QUERY, y as LAYER_NAME, z as SUPPORTS_QUERY } from "./arena-D6TANE5e.js";
|
|
2
2
|
import { NODE_TYPES } from "./constants.js";
|
|
3
3
|
import { A as TOKEN_URL, C as TOKEN_PERCENTAGE, D as TOKEN_SEMICOLON, E as TOKEN_RIGHT_PAREN, M as Token, N as TokenType, O as TOKEN_STRING, S as TOKEN_NUMBER, T as TOKEN_RIGHT_BRACKET, _ as TOKEN_HASH, a as TOKEN_AT_KEYWORD, b as TOKEN_LEFT_BRACKET, c as TOKEN_CDC, d as TOKEN_COMMA, f as TOKEN_COMMENT, g as TOKEN_FUNCTION, h as TOKEN_EOF, i as tokenize, j as TOKEN_WHITESPACE, k as TOKEN_UNICODE_RANGE, l as TOKEN_CDO, m as TOKEN_DIMENSION, o as TOKEN_BAD_STRING, p as TOKEN_DELIM, r as LexerPosition, s as TOKEN_BAD_URL, t as CommentInfo, u as TOKEN_COLON, v as TOKEN_IDENT, w as TOKEN_RIGHT_BRACE, x as TOKEN_LEFT_PAREN, y as TOKEN_LEFT_BRACE } from "./tokenize-CyiJelQC.js";
|
|
4
|
-
import { $ as
|
|
4
|
+
import { $ as is_combinator, A as PreludeSelectorList, At as is_supports_query, B as SupportsQuery, C as NestingSelector, Ct as is_pseudo_element_selector, D as Operator, Dt as is_selector_list, E as Number, Et as is_selector, F as Selector, Ft as is_value, G as Url, H as TypeSelector, I as SelectorList, It as CloneOptions, J as is_atrule, K as Value, L as SelectorNode, Lt as TYPE_NAMES, M as PseudoElementSelector, Mt as is_unicode_range, N as Raw, Nt as is_universal_selector, O as Parenthesis, Ot as is_string, P as Rule, Pt as is_url, Q as is_class_selector, R as String, S as MediaType, St as is_pseudo_class_selector, T as NthSelector, Tt as is_rule, U as UnicodeRange, V as ToPlain, W as UniversalSelector, X as is_attribute_selector, Y as is_atrule_prelude, Z as is_block, _ as Identifier, _t as is_number, a as Block, at as is_function, b as MediaFeature, bt as is_prelude_operator, c as Combinator, ct as is_identifier, d as Declaration, dt as is_media_feature, et as is_comment, f as Dimension, ft as is_media_query, g as IdSelector, gt as is_nth_selector, h as Hash, ht as is_nth_of_selector, i as AttributeSelector, it as is_feature_range, j as PseudoClassSelector, jt as is_type_selector, k as PreludeOperator, kt as is_stylesheet, l as Comment, lt as is_lang_selector, m as Function, mt as is_nesting_selector, n as Atrule, nt as is_declaration, o as CSSNode, ot as is_hash, p as FeatureRange, pt as is_media_type, q as WithChildren, r as AtrulePrelude, rt as is_dimension, s as ClassSelector, st as is_id_selector, t as AnyNode, tt as is_container_query, u as ContainerQuery, ut as is_layer_name, v as LangSelector, vt as is_operator, w as NthOfSelector, wt as is_raw, x as MediaQuery, xt as is_prelude_selectorlist, y as LayerName, yt as is_parenthesis, z as StyleSheet } from "./node-types-DXNwTg3_.js";
|
|
5
5
|
import { ParserOptions, parse } from "./parse.js";
|
|
6
6
|
import { parse_selector } from "./parse-selector.js";
|
|
7
7
|
import { parse_atrule_prelude } from "./parse-atrule-prelude.js";
|
|
@@ -75,4 +75,4 @@ declare function is_vendor_prefixed(source: string, start: number, end: number):
|
|
|
75
75
|
*/
|
|
76
76
|
declare function is_custom(str: string): boolean;
|
|
77
77
|
//#endregion
|
|
78
|
-
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, type IdSelector, type Identifier, 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 PreludeOperator, type PreludeSelectorList, type PseudoClassSelector, type PseudoElementSelector, RAW, type Raw, type Rule, SELECTOR, SELECTOR_LIST, SKIP, STRING, STYLESHEET, STYLE_RULE, SUPPORTS_QUERY, type Selector, type SelectorList, type String, type StyleSheet, 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_NAMES, 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_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_raw, is_rule, is_selector, is_selector_list, is_string, is_stylesheet, 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_value, str_equals, str_index_of, str_starts_with, tokenize, traverse, walk };
|
|
78
|
+
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, type IdSelector, type Identifier, 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 PreludeOperator, type PreludeSelectorList, type PseudoClassSelector, type PseudoElementSelector, RAW, type Raw, type Rule, SELECTOR, SELECTOR_LIST, SKIP, STRING, STYLESHEET, STYLE_RULE, SUPPORTS_QUERY, type Selector, type SelectorList, type SelectorNode, type String, type StyleSheet, 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_NAMES, 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_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_raw, is_rule, is_selector, is_selector_list, is_string, is_stylesheet, 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_value, str_equals, str_index_of, str_starts_with, tokenize, traverse, walk };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { C as TOKEN_RIGHT_BRACKET, D as TOKEN_UNICODE_RANGE, E as TOKEN_STRING, O as TOKEN_URL, S as TOKEN_RIGHT_BRACE, T as TOKEN_SEMICOLON, _ as TOKEN_LEFT_BRACE, a as TOKEN_BAD_URL, b as TOKEN_NUMBER, c as TOKEN_COLON, d as TOKEN_DELIM, f as TOKEN_DIMENSION, g as TOKEN_IDENT, h as TOKEN_HASH, i as TOKEN_BAD_STRING, k as TOKEN_WHITESPACE, l as TOKEN_COMMA, m as TOKEN_FUNCTION, n as tokenize, o as TOKEN_CDC, p as TOKEN_EOF, r as TOKEN_AT_KEYWORD, s as TOKEN_CDO, u as TOKEN_COMMENT, v as TOKEN_LEFT_BRACKET, w as TOKEN_RIGHT_PAREN, x as TOKEN_PERCENTAGE, y as TOKEN_LEFT_PAREN } from "./tokenize-BSycRGm0.js";
|
|
2
2
|
import { A as PSEUDO_CLASS_SELECTOR, B as UNICODE_RANGE, C as NESTING_SELECTOR, D as OPERATOR, E as NUMBER, F as STRING, H as URL, I as STYLESHEET, L as STYLE_RULE, M as RAW, N as SELECTOR, O as PARENTHESIS, P as SELECTOR_LIST, R as SUPPORTS_QUERY, S as MEDIA_TYPE, T as NTH_SELECTOR, U as VALUE, V as UNIVERSAL_SELECTOR, _ as ID_SELECTOR, a as CLASS_SELECTOR, b as MEDIA_FEATURE, c as CONTAINER_QUERY, d as DIMENSION, f as FEATURE_RANGE, g as IDENTIFIER, h as HASH, i as BLOCK, j as PSEUDO_ELEMENT_SELECTOR, k as PRELUDE_OPERATOR, m as FUNCTION, n as AT_RULE, o as COMBINATOR, p as FLAG_IMPORTANT, r as AT_RULE_PRELUDE, s as COMMENT, t as ATTRIBUTE_SELECTOR, u as DECLARATION, v as LANG_SELECTOR, w as NTH_OF_SELECTOR, x as MEDIA_QUERY, y as LAYER_NAME, z as TYPE_SELECTOR } from "./arena-CveFYH2l.js";
|
|
3
3
|
import { c as str_starts_with, i as is_vendor_prefixed, o as str_equals, r as is_custom, s as str_index_of, t as parse_dimension } from "./parse-dimension-CCn_XRDe.js";
|
|
4
|
-
import { n as TYPE_NAMES } from "./css-node-
|
|
4
|
+
import { n as TYPE_NAMES } from "./css-node-DwKXZuNm.js";
|
|
5
5
|
import { parse_selector } from "./parse-selector.js";
|
|
6
6
|
import { parse_atrule_prelude } from "./parse-atrule-prelude.js";
|
|
7
7
|
import { parse_value } from "./parse-value.js";
|
|
@@ -87,7 +87,7 @@ type PlainCSSNode = {
|
|
|
87
87
|
};
|
|
88
88
|
//#endregion
|
|
89
89
|
//#region src/node-types.d.ts
|
|
90
|
-
|
|
90
|
+
type CSSNode = {
|
|
91
91
|
readonly type: CSSNodeType;
|
|
92
92
|
readonly type_name: TypeName;
|
|
93
93
|
readonly text: string;
|
|
@@ -98,13 +98,15 @@ interface CSSNode {
|
|
|
98
98
|
readonly start: number;
|
|
99
99
|
readonly length: number;
|
|
100
100
|
readonly end: number;
|
|
101
|
-
/** Low-level linked-list pointer used by walk()/traverse(). Prefer .children on nodes that have it. */
|
|
102
101
|
readonly first_child: CSSNode | null;
|
|
103
|
-
/** Low-level linked-list pointer used by walk()/traverse(). */
|
|
104
|
-
readonly next_sibling: CSSNode | null;
|
|
105
|
-
readonly has_next: boolean;
|
|
106
102
|
clone(options?: CloneOptions): PlainCSSNode;
|
|
107
|
-
}
|
|
103
|
+
} & ({
|
|
104
|
+
readonly has_next: false;
|
|
105
|
+
readonly next_sibling: null;
|
|
106
|
+
} | {
|
|
107
|
+
readonly has_next: true;
|
|
108
|
+
readonly next_sibling: CSSNode;
|
|
109
|
+
});
|
|
108
110
|
/**
|
|
109
111
|
* Mixin for node types that have child nodes.
|
|
110
112
|
*
|
|
@@ -113,11 +115,12 @@ interface CSSNode {
|
|
|
113
115
|
* (Identifier, Number, Dimension, …) do not extend WithChildren, reflecting
|
|
114
116
|
* that they never carry child nodes in a well-formed tree.
|
|
115
117
|
*/
|
|
116
|
-
interface WithChildren {
|
|
118
|
+
interface WithChildren<T = AnyNode> {
|
|
117
119
|
readonly has_children: boolean;
|
|
118
120
|
readonly child_count: number;
|
|
119
|
-
readonly children:
|
|
120
|
-
|
|
121
|
+
readonly children: T[];
|
|
122
|
+
readonly first_child: T;
|
|
123
|
+
[Symbol.iterator](): Iterator<T>;
|
|
121
124
|
}
|
|
122
125
|
/**
|
|
123
126
|
* Maps a CssNodeCommon subtype interface to its plain-object equivalent,
|
|
@@ -139,10 +142,10 @@ interface WithChildren {
|
|
|
139
142
|
type ToPlain<T extends CSSNode> = PlainCSSNode & {
|
|
140
143
|
type: T['type'];
|
|
141
144
|
} & { [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] };
|
|
142
|
-
|
|
145
|
+
type StyleSheet = CSSNode & WithChildren & {
|
|
143
146
|
readonly type: typeof STYLESHEET;
|
|
144
147
|
clone(options?: CloneOptions): ToPlain<StyleSheet>;
|
|
145
|
-
}
|
|
148
|
+
};
|
|
146
149
|
type Rule = CSSNode & {
|
|
147
150
|
readonly type: typeof STYLE_RULE;
|
|
148
151
|
readonly name: string;
|
|
@@ -179,205 +182,186 @@ type Atrule = CSSNode & {
|
|
|
179
182
|
readonly has_block: false;
|
|
180
183
|
readonly block: null;
|
|
181
184
|
});
|
|
182
|
-
|
|
183
|
-
readonly type: typeof DECLARATION;
|
|
184
|
-
/**
|
|
185
|
-
readonly property: string;
|
|
186
|
-
/** VALUE node (parse_values=true), RAW node (parse_values=false), or null */
|
|
185
|
+
type Declaration = CSSNode & {
|
|
186
|
+
readonly type: typeof DECLARATION; /** Property name, e.g. "color" */
|
|
187
|
+
readonly property: string; /** VALUE node (parse_values=true), RAW node (parse_values=false), or null */
|
|
187
188
|
readonly value: Value | Raw | null;
|
|
188
189
|
readonly is_important: boolean;
|
|
189
190
|
readonly is_browserhack: boolean;
|
|
190
191
|
clone(options?: CloneOptions): ToPlain<Declaration>;
|
|
191
|
-
}
|
|
192
|
-
|
|
192
|
+
};
|
|
193
|
+
type SelectorNode = TypeSelector | IdSelector | ClassSelector | NthSelector | NthOfSelector | LangSelector | NestingSelector | AttributeSelector | UniversalSelector | PseudoClassSelector | PseudoElementSelector;
|
|
194
|
+
type Selector = CSSNode & WithChildren<SelectorNode> & {
|
|
193
195
|
readonly type: typeof SELECTOR;
|
|
194
196
|
clone(options?: CloneOptions): ToPlain<Selector>;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
+
};
|
|
198
|
+
type SelectorList = CSSNode & WithChildren<Selector> & {
|
|
197
199
|
readonly type: typeof SELECTOR_LIST;
|
|
198
200
|
clone(options?: CloneOptions): ToPlain<SelectorList>;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
+
};
|
|
202
|
+
type Block = CSSNode & WithChildren<Raw | Declaration | Atrule | Rule> & {
|
|
201
203
|
readonly type: typeof BLOCK;
|
|
202
204
|
readonly is_empty: boolean;
|
|
203
205
|
clone(options?: CloneOptions): ToPlain<Block>;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
+
};
|
|
207
|
+
type Comment = CSSNode & {
|
|
206
208
|
readonly type: typeof COMMENT;
|
|
207
209
|
clone(options?: CloneOptions): ToPlain<Comment>;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
+
};
|
|
211
|
+
type Raw = CSSNode & {
|
|
210
212
|
readonly type: typeof RAW;
|
|
211
213
|
clone(options?: CloneOptions): ToPlain<Raw>;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
+
};
|
|
215
|
+
type ValueLike = Function | Identifier | Operator | Parenthesis | Url | UnicodeRange | String | Hash | Dimension | Number;
|
|
216
|
+
type Identifier = CSSNode & {
|
|
214
217
|
readonly type: typeof IDENTIFIER;
|
|
215
218
|
readonly name: string;
|
|
216
219
|
clone(options?: CloneOptions): ToPlain<Identifier>;
|
|
217
|
-
}
|
|
218
|
-
|
|
220
|
+
};
|
|
221
|
+
type Number = CSSNode & {
|
|
219
222
|
readonly type: typeof NUMBER;
|
|
220
223
|
readonly value: number;
|
|
221
224
|
clone(options?: CloneOptions): ToPlain<Number>;
|
|
222
|
-
}
|
|
223
|
-
|
|
225
|
+
};
|
|
226
|
+
type Dimension = CSSNode & {
|
|
224
227
|
readonly type: typeof DIMENSION;
|
|
225
|
-
readonly value: number;
|
|
226
|
-
/** Unit string, e.g. "px", "%" */
|
|
228
|
+
readonly value: number; /** Unit string, e.g. "px", "%" */
|
|
227
229
|
readonly unit: string;
|
|
228
230
|
clone(options?: CloneOptions): ToPlain<Dimension>;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
+
};
|
|
232
|
+
type String = CSSNode & {
|
|
231
233
|
readonly type: typeof STRING;
|
|
232
234
|
clone(options?: CloneOptions): ToPlain<String>;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
+
};
|
|
236
|
+
type Hash = CSSNode & {
|
|
235
237
|
readonly type: typeof HASH;
|
|
236
238
|
clone(options?: CloneOptions): ToPlain<Hash>;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
readonly type: typeof FUNCTION;
|
|
240
|
-
/** Function
|
|
241
|
-
readonly name: string;
|
|
242
|
-
/** Function arguments as raw text, e.g. "255, 0, 0" for rgb(255, 0, 0) */
|
|
239
|
+
};
|
|
240
|
+
type Function = CSSNode & WithChildren<ValueLike> & {
|
|
241
|
+
readonly type: typeof FUNCTION; /** Function name, e.g. "rgb", "calc" */
|
|
242
|
+
readonly name: string; /** Function arguments as raw text, e.g. "255, 0, 0" for rgb(255, 0, 0) */
|
|
243
243
|
readonly value: string | null;
|
|
244
244
|
clone(options?: CloneOptions): ToPlain<Function>;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
readonly type: typeof OPERATOR;
|
|
248
|
-
/** The operator character(s), e.g. ",", "+", "-" */
|
|
245
|
+
};
|
|
246
|
+
type Operator = CSSNode & {
|
|
247
|
+
readonly type: typeof OPERATOR; /** The operator character(s), e.g. ",", "+", "-" */
|
|
249
248
|
readonly value: string;
|
|
250
249
|
clone(options?: CloneOptions): ToPlain<Operator>;
|
|
251
|
-
}
|
|
252
|
-
|
|
250
|
+
};
|
|
251
|
+
type Parenthesis = CSSNode & WithChildren & {
|
|
253
252
|
readonly type: typeof PARENTHESIS;
|
|
254
253
|
clone(options?: CloneOptions): ToPlain<Parenthesis>;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
readonly type: typeof URL;
|
|
258
|
-
/** URL content, e.g. '"image.png"' (with quotes) or 'mycursor.cur' (unquoted) */
|
|
254
|
+
};
|
|
255
|
+
type Url = CSSNode & {
|
|
256
|
+
readonly type: typeof URL; /** URL content, e.g. '"image.png"' (with quotes) or 'mycursor.cur' (unquoted) */
|
|
259
257
|
readonly value: string | null;
|
|
260
258
|
clone(options?: CloneOptions): ToPlain<Url>;
|
|
261
|
-
}
|
|
262
|
-
|
|
259
|
+
};
|
|
260
|
+
type UnicodeRange = CSSNode & {
|
|
263
261
|
readonly type: typeof UNICODE_RANGE;
|
|
264
262
|
clone(options?: CloneOptions): ToPlain<UnicodeRange>;
|
|
265
|
-
}
|
|
266
|
-
|
|
263
|
+
};
|
|
264
|
+
type Value = CSSNode & WithChildren<ValueLike> & {
|
|
267
265
|
readonly type: typeof VALUE;
|
|
268
266
|
clone(options?: CloneOptions): ToPlain<Value>;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
readonly type: typeof TYPE_SELECTOR;
|
|
272
|
-
/** Element type, e.g. "div", "span" */
|
|
267
|
+
};
|
|
268
|
+
type TypeSelector = CSSNode & {
|
|
269
|
+
readonly type: typeof TYPE_SELECTOR; /** Element type, e.g. "div", "span" */
|
|
273
270
|
readonly name: string;
|
|
274
271
|
clone(options?: CloneOptions): ToPlain<TypeSelector>;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
readonly type: typeof CLASS_SELECTOR;
|
|
278
|
-
/** Class name without dot, e.g. "foo" from ".foo" */
|
|
272
|
+
};
|
|
273
|
+
type ClassSelector = CSSNode & {
|
|
274
|
+
readonly type: typeof CLASS_SELECTOR; /** Class name without dot, e.g. "foo" from ".foo" */
|
|
279
275
|
readonly name: string;
|
|
280
276
|
clone(options?: CloneOptions): ToPlain<ClassSelector>;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
readonly type: typeof ID_SELECTOR;
|
|
284
|
-
/** Id without hash, e.g. "bar" from "#bar" */
|
|
277
|
+
};
|
|
278
|
+
type IdSelector = CSSNode & {
|
|
279
|
+
readonly type: typeof ID_SELECTOR; /** Id without hash, e.g. "bar" from "#bar" */
|
|
285
280
|
readonly name: string;
|
|
286
281
|
clone(options?: CloneOptions): ToPlain<IdSelector>;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
readonly type: typeof ATTRIBUTE_SELECTOR;
|
|
290
|
-
/**
|
|
291
|
-
readonly
|
|
292
|
-
/**
|
|
293
|
-
readonly
|
|
294
|
-
/** Flag character, e.g. "i", "s"; null if no flag */
|
|
295
|
-
readonly attr_flags: string | null;
|
|
282
|
+
};
|
|
283
|
+
type AttributeSelector = CSSNode & {
|
|
284
|
+
readonly type: typeof ATTRIBUTE_SELECTOR; /** Attribute name, e.g. "href" from "[href]" */
|
|
285
|
+
readonly name: string; /** Operator string, e.g. "=", "~=", "|="; null if no operator ([attr] form) */
|
|
286
|
+
readonly attr_operator: string | null; /** Flag character, e.g. "i", "s"; null if no flag */
|
|
287
|
+
readonly attr_flags: string | null; /** Attribute value, e.g. "external" from [rel="external"] */
|
|
288
|
+
readonly value: string | null;
|
|
296
289
|
clone(options?: CloneOptions): ToPlain<AttributeSelector>;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
readonly type: typeof PSEUDO_CLASS_SELECTOR;
|
|
300
|
-
/** Pseudo-class name without colon, e.g. "hover" */
|
|
290
|
+
};
|
|
291
|
+
type PseudoClassSelector = CSSNode & WithChildren<Selector> & {
|
|
292
|
+
readonly type: typeof PSEUDO_CLASS_SELECTOR; /** Pseudo-class name without colon, e.g. "hover" */
|
|
301
293
|
readonly name: string;
|
|
302
294
|
clone(options?: CloneOptions): ToPlain<PseudoClassSelector>;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
readonly type: typeof PSEUDO_ELEMENT_SELECTOR;
|
|
306
|
-
/** Pseudo-element name without colons, e.g. "before" */
|
|
295
|
+
};
|
|
296
|
+
type PseudoElementSelector = CSSNode & WithChildren<Selector> & {
|
|
297
|
+
readonly type: typeof PSEUDO_ELEMENT_SELECTOR; /** Pseudo-element name without colons, e.g. "before" */
|
|
307
298
|
readonly name: string;
|
|
308
299
|
clone(options?: CloneOptions): ToPlain<PseudoElementSelector>;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
readonly type: typeof COMBINATOR;
|
|
312
|
-
/** Combinator character(s), e.g. " ", ">", "~", "+", "||", "/deep/" */
|
|
300
|
+
};
|
|
301
|
+
type Combinator = CSSNode & {
|
|
302
|
+
readonly type: typeof COMBINATOR; /** Combinator character(s), e.g. " ", ">", "~", "+", "||", "/deep/" */
|
|
313
303
|
readonly name: string;
|
|
314
304
|
clone(options?: CloneOptions): ToPlain<Combinator>;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
readonly type: typeof UNIVERSAL_SELECTOR;
|
|
318
|
-
|
|
319
|
-
readonly name: string | undefined;
|
|
305
|
+
};
|
|
306
|
+
type UniversalSelector = CSSNode & {
|
|
307
|
+
readonly type: typeof UNIVERSAL_SELECTOR; /** Namespace qualifier (e.g. 'ns' in 'ns|*'), null if no namespace */
|
|
308
|
+
readonly name: string | null;
|
|
320
309
|
clone(options?: CloneOptions): ToPlain<UniversalSelector>;
|
|
321
|
-
}
|
|
322
|
-
|
|
310
|
+
};
|
|
311
|
+
type NestingSelector = CSSNode & {
|
|
323
312
|
readonly type: typeof NESTING_SELECTOR;
|
|
324
313
|
clone(options?: CloneOptions): ToPlain<NestingSelector>;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
readonly type: typeof NTH_SELECTOR;
|
|
328
|
-
readonly nth_a: string |
|
|
329
|
-
readonly nth_b: string |
|
|
314
|
+
};
|
|
315
|
+
type NthSelector = CSSNode & {
|
|
316
|
+
readonly type: typeof NTH_SELECTOR; /** 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)`). */
|
|
317
|
+
readonly nth_a: string | null; /** 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)`). */
|
|
318
|
+
readonly nth_b: string | null;
|
|
330
319
|
clone(options?: CloneOptions): ToPlain<NthSelector>;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
readonly type: typeof NTH_OF_SELECTOR;
|
|
334
|
-
/** The An+B
|
|
335
|
-
readonly nth: NthSelector | null;
|
|
336
|
-
/** The selector list from :nth-child(An+B of <selector>) */
|
|
320
|
+
};
|
|
321
|
+
type NthOfSelector = CSSNode & {
|
|
322
|
+
readonly type: typeof NTH_OF_SELECTOR; /** The An+B formula node */
|
|
323
|
+
readonly nth: NthSelector | null; /** The selector list from :nth-child(An+B of <selector>) */
|
|
337
324
|
readonly selector: SelectorList | null;
|
|
338
325
|
clone(options?: CloneOptions): ToPlain<NthOfSelector>;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
readonly type: typeof LANG_SELECTOR;
|
|
326
|
+
};
|
|
327
|
+
type LangSelector = CSSNode & {
|
|
328
|
+
readonly type: typeof LANG_SELECTOR; /** `"nl"`, `en-US` */
|
|
329
|
+
readonly name: string | null;
|
|
342
330
|
clone(options?: CloneOptions): ToPlain<LangSelector>;
|
|
343
|
-
}
|
|
344
|
-
|
|
331
|
+
};
|
|
332
|
+
type AtrulePrelude = CSSNode & WithChildren<Raw | MediaQuery | MediaType | ContainerQuery | SupportsQuery | LayerName | PreludeOperator | PreludeSelectorList | Parenthesis | Url> & {
|
|
345
333
|
readonly type: typeof AT_RULE_PRELUDE;
|
|
346
334
|
clone(options?: CloneOptions): ToPlain<AtrulePrelude>;
|
|
347
|
-
}
|
|
348
|
-
|
|
335
|
+
};
|
|
336
|
+
type MediaQuery = CSSNode & WithChildren<MediaFeature | PreludeOperator | MediaType | FeatureRange> & {
|
|
349
337
|
readonly type: typeof MEDIA_QUERY;
|
|
350
338
|
clone(options?: CloneOptions): ToPlain<MediaQuery>;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
readonly type: typeof MEDIA_FEATURE;
|
|
354
|
-
/** Feature name, e.g. "min-width" */
|
|
339
|
+
};
|
|
340
|
+
type MediaFeature = CSSNode & WithChildren & {
|
|
341
|
+
readonly type: typeof MEDIA_FEATURE; /** Feature name, e.g. "min-width" */
|
|
355
342
|
readonly property: string;
|
|
356
343
|
clone(options?: CloneOptions): ToPlain<MediaFeature>;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
readonly type: typeof MEDIA_TYPE;
|
|
360
|
-
/** Media type text, e.g. "screen", "print" */
|
|
344
|
+
};
|
|
345
|
+
type MediaType = CSSNode & {
|
|
346
|
+
readonly type: typeof MEDIA_TYPE; /** Media type text, e.g. "screen", "print" */
|
|
361
347
|
readonly value: string;
|
|
362
348
|
clone(options?: CloneOptions): ToPlain<MediaType>;
|
|
363
|
-
}
|
|
364
|
-
|
|
349
|
+
};
|
|
350
|
+
type ContainerQuery = CSSNode & WithChildren<Identifier | MediaFeature | Function> & {
|
|
365
351
|
readonly type: typeof CONTAINER_QUERY;
|
|
366
352
|
clone(options?: CloneOptions): ToPlain<ContainerQuery>;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
readonly type: typeof SUPPORTS_QUERY;
|
|
370
|
-
/** The supports condition text, e.g. "display: flex" from "supports(display: flex)" */
|
|
353
|
+
};
|
|
354
|
+
type SupportsQuery = CSSNode & {
|
|
355
|
+
readonly type: typeof SUPPORTS_QUERY; /** The supports condition text, e.g. "display: flex" from "supports(display: flex)" */
|
|
371
356
|
readonly value: string;
|
|
372
357
|
clone(options?: CloneOptions): ToPlain<SupportsQuery>;
|
|
373
|
-
}
|
|
374
|
-
|
|
358
|
+
};
|
|
359
|
+
type LayerName = CSSNode & {
|
|
375
360
|
readonly type: typeof LAYER_NAME;
|
|
376
|
-
readonly name: string;
|
|
377
|
-
/** Alias for name — the layer name string, e.g. "base" from "layer(base)" */
|
|
361
|
+
readonly name: string; /** Alias for name — the layer name string, e.g. "base" from "layer(base)" */
|
|
378
362
|
readonly value: string;
|
|
379
363
|
clone(options?: CloneOptions): ToPlain<LayerName>;
|
|
380
|
-
}
|
|
364
|
+
};
|
|
381
365
|
/**
|
|
382
366
|
* A parenthesised selector argument in an at-rule prelude.
|
|
383
367
|
*
|
|
@@ -394,21 +378,20 @@ interface LayerName extends CSSNode {
|
|
|
394
378
|
* `value` is the raw selector text inside the parentheses, trimmed of
|
|
395
379
|
* whitespace: ".parent" from "(.parent)".
|
|
396
380
|
*/
|
|
397
|
-
|
|
381
|
+
type PreludeSelectorList = CSSNode & {
|
|
398
382
|
readonly type: typeof PRELUDE_SELECTORLIST;
|
|
399
383
|
readonly value: string;
|
|
400
384
|
clone(options?: CloneOptions): ToPlain<PreludeSelectorList>;
|
|
401
|
-
}
|
|
402
|
-
|
|
385
|
+
};
|
|
386
|
+
type PreludeOperator = CSSNode & {
|
|
403
387
|
readonly type: typeof PRELUDE_OPERATOR;
|
|
404
388
|
clone(options?: CloneOptions): ToPlain<PreludeOperator>;
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
readonly type: typeof FEATURE_RANGE;
|
|
408
|
-
/** The feature name in a range comparison, e.g. "width" from "(width >= 400px)" */
|
|
389
|
+
};
|
|
390
|
+
type FeatureRange = CSSNode & WithChildren<Dimension | Operator> & {
|
|
391
|
+
readonly type: typeof FEATURE_RANGE; /** The feature name in a range comparison, e.g. "width" from "(width >= 400px)" */
|
|
409
392
|
readonly name: string;
|
|
410
393
|
clone(options?: CloneOptions): ToPlain<FeatureRange>;
|
|
411
|
-
}
|
|
394
|
+
};
|
|
412
395
|
type AnyNode = StyleSheet | Rule | Atrule | Declaration | Selector | SelectorList | Block | Comment | Raw | Identifier | Number | Dimension | String | Hash | Function | Operator | Parenthesis | Url | UnicodeRange | Value | TypeSelector | ClassSelector | IdSelector | AttributeSelector | PseudoClassSelector | PseudoElementSelector | Combinator | UniversalSelector | NestingSelector | NthSelector | NthOfSelector | LangSelector | AtrulePrelude | MediaQuery | MediaFeature | MediaType | ContainerQuery | SupportsQuery | LayerName | PreludeOperator | FeatureRange | PreludeSelectorList;
|
|
413
396
|
declare function is_stylesheet(node: CSSNode): node is StyleSheet;
|
|
414
397
|
declare function is_rule(node: CSSNode): node is Rule;
|
|
@@ -453,4 +436,4 @@ declare function is_prelude_operator(node: CSSNode): node is PreludeOperator;
|
|
|
453
436
|
declare function is_feature_range(node: CSSNode): node is FeatureRange;
|
|
454
437
|
declare function is_prelude_selectorlist(node: CSSNode): node is PreludeSelectorList;
|
|
455
438
|
//#endregion
|
|
456
|
-
export {
|
|
439
|
+
export { is_combinator as $, PreludeSelectorList as A, is_supports_query as At, SupportsQuery as B, NestingSelector as C, is_pseudo_element_selector as Ct, Operator as D, is_selector_list as Dt, Number as E, is_selector as Et, Selector as F, is_value as Ft, Url as G, TypeSelector as H, SelectorList as I, CloneOptions as It, is_atrule as J, Value as K, SelectorNode as L, TYPE_NAMES as Lt, PseudoElementSelector as M, is_unicode_range as Mt, Raw as N, is_universal_selector as Nt, Parenthesis as O, is_string as Ot, Rule as P, is_url as Pt, is_class_selector as Q, String as R, MediaType as S, is_pseudo_class_selector as St, NthSelector as T, is_rule as Tt, UnicodeRange as U, ToPlain as V, UniversalSelector as W, is_attribute_selector as X, is_atrule_prelude as Y, is_block as Z, Identifier as _, is_number as _t, Block as a, is_function as at, MediaFeature as b, is_prelude_operator as bt, Combinator as c, is_identifier as ct, Declaration as d, is_media_feature as dt, is_comment as et, Dimension as f, is_media_query as ft, IdSelector as g, is_nth_selector as gt, Hash as h, is_nth_of_selector as ht, AttributeSelector as i, is_feature_range as it, PseudoClassSelector as j, is_type_selector as jt, PreludeOperator as k, is_stylesheet as kt, Comment as l, is_lang_selector as lt, Function as m, is_nesting_selector as mt, Atrule as n, is_declaration as nt, CSSNode as o, is_hash as ot, FeatureRange as p, is_media_type as pt, WithChildren as q, AtrulePrelude as r, is_dimension as rt, ClassSelector as s, is_id_selector as st, AnyNode as t, is_container_query as tt, ContainerQuery as u, is_layer_name as ut, LangSelector as v, is_operator as vt, NthOfSelector as w, is_raw as wt, MediaQuery as x, is_prelude_selectorlist as xt, LayerName as y, is_parenthesis as yt, StyleSheet as z };
|
package/dist/parse-anplusb.d.ts
CHANGED
package/dist/parse-anplusb.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as Lexer } from "./tokenize-BSycRGm0.js";
|
|
2
2
|
import { l as CSSDataArena } from "./arena-CveFYH2l.js";
|
|
3
3
|
import { o as str_equals, s as str_index_of } from "./parse-dimension-CCn_XRDe.js";
|
|
4
|
-
import { t as CSSNode } from "./css-node-
|
|
4
|
+
import { t as CSSNode } from "./css-node-DwKXZuNm.js";
|
|
5
5
|
//#region src/parse-anplusb.ts
|
|
6
6
|
/** @internal */
|
|
7
7
|
var ANplusBParser = class {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as Lexer } from "./tokenize-BSycRGm0.js";
|
|
2
2
|
import { l as CSSDataArena } from "./arena-CveFYH2l.js";
|
|
3
3
|
import { a as is_whitespace, l as strip_vendor_prefix, o as str_equals } from "./parse-dimension-CCn_XRDe.js";
|
|
4
|
-
import { t as CSSNode } from "./css-node-
|
|
4
|
+
import { t as CSSNode } from "./css-node-DwKXZuNm.js";
|
|
5
5
|
import { i as trim_boundaries, n as skip_whitespace_and_comments_forward } from "./parse-utils-BxrmqJxI.js";
|
|
6
6
|
//#region src/parse-atrule-prelude.ts
|
|
7
7
|
/** @internal */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { l as CSSDataArena } from "./arena-D6TANE5e.js";
|
|
2
2
|
import { n as Lexer } from "./tokenize-CyiJelQC.js";
|
|
3
|
-
import { d as Declaration } from "./node-types-
|
|
3
|
+
import { d as Declaration } from "./node-types-DXNwTg3_.js";
|
|
4
4
|
|
|
5
5
|
//#region src/parse-declaration.d.ts
|
|
6
6
|
/** @internal */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as Lexer } from "./tokenize-BSycRGm0.js";
|
|
2
2
|
import { l as CSSDataArena } from "./arena-CveFYH2l.js";
|
|
3
3
|
import { i as is_vendor_prefixed } from "./parse-dimension-CCn_XRDe.js";
|
|
4
|
-
import { t as CSSNode } from "./css-node-
|
|
4
|
+
import { t as CSSNode } from "./css-node-DwKXZuNm.js";
|
|
5
5
|
import { i as trim_boundaries } from "./parse-utils-BxrmqJxI.js";
|
|
6
6
|
import { ValueParser } from "./parse-value.js";
|
|
7
7
|
//#region src/parse-declaration.ts
|
package/dist/parse-selector.d.ts
CHANGED
package/dist/parse-selector.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as Lexer } from "./tokenize-BSycRGm0.js";
|
|
2
2
|
import { l as CSSDataArena } from "./arena-CveFYH2l.js";
|
|
3
3
|
import { a as is_whitespace, n as is_combinator, o as str_equals } from "./parse-dimension-CCn_XRDe.js";
|
|
4
|
-
import { t as CSSNode } from "./css-node-
|
|
4
|
+
import { t as CSSNode } from "./css-node-DwKXZuNm.js";
|
|
5
5
|
import { n as skip_whitespace_and_comments_forward, r as skip_whitespace_forward, t as skip_whitespace_and_comments_backward } from "./parse-utils-BxrmqJxI.js";
|
|
6
6
|
import { ANplusBParser } from "./parse-anplusb.js";
|
|
7
7
|
//#region src/parse-selector.ts
|
|
@@ -393,7 +393,6 @@ var SelectorParser = class {
|
|
|
393
393
|
if (this.lexer.pos >= end) break;
|
|
394
394
|
}
|
|
395
395
|
if (first_child !== null) this.arena.set_first_child(parent_node, first_child);
|
|
396
|
-
if (last_child !== null) {}
|
|
397
396
|
this.selector_end = saved_selector_end;
|
|
398
397
|
this.lexer = saved_lexer;
|
|
399
398
|
}
|
package/dist/parse-value.d.ts
CHANGED
package/dist/parse-value.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as Lexer } from "./tokenize-BSycRGm0.js";
|
|
2
2
|
import { l as CSSDataArena } from "./arena-CveFYH2l.js";
|
|
3
3
|
import { a as is_whitespace, o as str_equals } from "./parse-dimension-CCn_XRDe.js";
|
|
4
|
-
import { t as CSSNode } from "./css-node-
|
|
4
|
+
import { t as CSSNode } from "./css-node-DwKXZuNm.js";
|
|
5
5
|
//#region src/parse-value.ts
|
|
6
6
|
/** @internal */
|
|
7
7
|
var ValueParser = class {
|
package/dist/parse.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { l as CSSDataArena } from "./arena-D6TANE5e.js";
|
|
2
2
|
import { t as CommentInfo } from "./tokenize-CyiJelQC.js";
|
|
3
|
-
import {
|
|
3
|
+
import { z as StyleSheet } from "./node-types-DXNwTg3_.js";
|
|
4
4
|
|
|
5
5
|
//#region src/parse.d.ts
|
|
6
6
|
interface ParserOptions {
|
package/dist/parse.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as Lexer } from "./tokenize-BSycRGm0.js";
|
|
2
2
|
import { l as CSSDataArena } from "./arena-CveFYH2l.js";
|
|
3
|
-
import { t as CSSNode } from "./css-node-
|
|
3
|
+
import { t as CSSNode } from "./css-node-DwKXZuNm.js";
|
|
4
4
|
import { i as trim_boundaries } from "./parse-utils-BxrmqJxI.js";
|
|
5
5
|
import { SelectorParser } from "./parse-selector.js";
|
|
6
6
|
import { AtRulePreludeParser } from "./parse-atrule-prelude.js";
|
package/dist/walk.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@projectwallace/css-parser",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.7",
|
|
4
4
|
"description": "High-performance CSS lexer and parser, optimized for CSS inspection and analysis",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ast",
|
|
@@ -90,14 +90,14 @@
|
|
|
90
90
|
"bootstrap": "^5.3.8",
|
|
91
91
|
"css-tree": "^3.1.0",
|
|
92
92
|
"knip": "^6.0.1",
|
|
93
|
-
"oxfmt": "^0.
|
|
93
|
+
"oxfmt": "^0.43.0",
|
|
94
94
|
"oxlint": "^1.28.0",
|
|
95
95
|
"postcss": "^8.5.6",
|
|
96
96
|
"publint": "^0.3.18",
|
|
97
97
|
"tailwindcss": "^2.2.8",
|
|
98
98
|
"tinybench": "^6.0.0",
|
|
99
99
|
"tsdown": "^0.21.0",
|
|
100
|
-
"typescript": "^
|
|
100
|
+
"typescript": "^6.0.2",
|
|
101
101
|
"vitest": "^4.0.8"
|
|
102
102
|
},
|
|
103
103
|
"issues": "https://github.com/projectwallace/css-parser/issues"
|