@reteps/tree-sitter-htmlmustache 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -33
- package/browser/out/browser/index.d.ts +43 -0
- package/browser/out/browser/index.d.ts.map +1 -0
- package/browser/out/browser/index.mjs +3612 -0
- package/browser/out/browser/index.mjs.map +7 -0
- package/browser/out/core/collectErrors.d.ts +36 -0
- package/browser/out/core/collectErrors.d.ts.map +1 -0
- package/browser/out/core/configSchema.d.ts +63 -0
- package/browser/out/core/configSchema.d.ts.map +1 -0
- package/browser/out/core/customCodeTags.d.ts +34 -0
- package/browser/out/core/customCodeTags.d.ts.map +1 -0
- package/browser/out/core/diagnostic.d.ts +24 -0
- package/browser/out/core/diagnostic.d.ts.map +1 -0
- package/browser/out/core/embeddedRegions.d.ts +12 -0
- package/browser/out/core/embeddedRegions.d.ts.map +1 -0
- package/browser/out/core/formatting/classifier.d.ts +68 -0
- package/browser/out/core/formatting/classifier.d.ts.map +1 -0
- package/browser/out/core/formatting/embedded.d.ts +19 -0
- package/browser/out/core/formatting/embedded.d.ts.map +1 -0
- package/browser/out/core/formatting/formatters.d.ts +85 -0
- package/browser/out/core/formatting/formatters.d.ts.map +1 -0
- package/browser/out/core/formatting/index.d.ts +44 -0
- package/browser/out/core/formatting/index.d.ts.map +1 -0
- package/browser/out/core/formatting/ir.d.ts +100 -0
- package/browser/out/core/formatting/ir.d.ts.map +1 -0
- package/browser/out/core/formatting/mergeOptions.d.ts +18 -0
- package/browser/out/core/formatting/mergeOptions.d.ts.map +1 -0
- package/browser/out/core/formatting/printer.d.ts +18 -0
- package/browser/out/core/formatting/printer.d.ts.map +1 -0
- package/browser/out/core/formatting/utils.d.ts +39 -0
- package/browser/out/core/formatting/utils.d.ts.map +1 -0
- package/browser/out/core/grammar.d.ts +3 -0
- package/browser/out/core/grammar.d.ts.map +1 -0
- package/browser/out/core/htmlBalanceChecker.d.ts +23 -0
- package/browser/out/core/htmlBalanceChecker.d.ts.map +1 -0
- package/browser/out/core/mustacheChecks.d.ts +24 -0
- package/browser/out/core/mustacheChecks.d.ts.map +1 -0
- package/browser/out/core/nodeHelpers.d.ts +54 -0
- package/browser/out/core/nodeHelpers.d.ts.map +1 -0
- package/browser/out/core/ruleMetadata.d.ts +12 -0
- package/browser/out/core/ruleMetadata.d.ts.map +1 -0
- package/browser/out/core/selectorMatcher.d.ts +74 -0
- package/browser/out/core/selectorMatcher.d.ts.map +1 -0
- package/cli/out/main.js +168 -122
- package/package.json +21 -3
- package/src/browser/browser.test.ts +207 -0
- package/src/browser/index.ts +128 -0
- package/src/browser/tsconfig.json +18 -0
- package/src/core/collectErrors.ts +233 -0
- package/src/core/configSchema.ts +273 -0
- package/src/core/customCodeTags.ts +159 -0
- package/src/core/diagnostic.ts +45 -0
- package/src/core/embeddedRegions.ts +70 -0
- package/src/core/formatting/classifier.ts +549 -0
- package/src/core/formatting/embedded.ts +56 -0
- package/src/core/formatting/formatters.ts +1272 -0
- package/src/core/formatting/index.ts +185 -0
- package/src/core/formatting/ir.ts +202 -0
- package/src/core/formatting/mergeOptions.ts +34 -0
- package/src/core/formatting/printer.ts +242 -0
- package/src/core/formatting/utils.ts +193 -0
- package/src/core/grammar.ts +2 -0
- package/src/core/htmlBalanceChecker.ts +382 -0
- package/src/core/mustacheChecks.ts +504 -0
- package/src/core/nodeHelpers.ts +126 -0
- package/src/core/ruleMetadata.ts +63 -0
- package/src/core/selectorMatcher.ts +719 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface BalanceNode {
|
|
2
|
+
type: string;
|
|
3
|
+
text: string;
|
|
4
|
+
startPosition: {
|
|
5
|
+
row: number;
|
|
6
|
+
column: number;
|
|
7
|
+
};
|
|
8
|
+
endPosition: {
|
|
9
|
+
row: number;
|
|
10
|
+
column: number;
|
|
11
|
+
};
|
|
12
|
+
startIndex: number;
|
|
13
|
+
endIndex: number;
|
|
14
|
+
children: BalanceNode[];
|
|
15
|
+
}
|
|
16
|
+
export interface BalanceError {
|
|
17
|
+
node: BalanceNode;
|
|
18
|
+
message: string;
|
|
19
|
+
}
|
|
20
|
+
export { getSectionName } from './nodeHelpers.js';
|
|
21
|
+
export declare function checkUnclosedTags(rootNode: BalanceNode): BalanceError[];
|
|
22
|
+
export declare function checkHtmlBalance(rootNode: BalanceNode): BalanceError[];
|
|
23
|
+
//# sourceMappingURL=htmlBalanceChecker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"htmlBalanceChecker.d.ts","sourceRoot":"","sources":["../../../src/core/htmlBalanceChecker.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/C,WAAW,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7C,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,WAAW,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAsBD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AA+QlD,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,WAAW,GAAG,YAAY,EAAE,CA2BvE;AAID,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,WAAW,GAAG,YAAY,EAAE,CAoCtE"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { BalanceNode, BalanceError } from './htmlBalanceChecker.js';
|
|
2
|
+
export interface TextReplacement {
|
|
3
|
+
startIndex: number;
|
|
4
|
+
endIndex: number;
|
|
5
|
+
newText: string;
|
|
6
|
+
}
|
|
7
|
+
export interface FixableError extends BalanceError {
|
|
8
|
+
severity?: 'error' | 'warning';
|
|
9
|
+
fix?: TextReplacement[];
|
|
10
|
+
fixDescription?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function checkNestedSameNameSections(rootNode: BalanceNode): FixableError[];
|
|
13
|
+
export declare function checkUnquotedMustacheAttributes(rootNode: BalanceNode): FixableError[];
|
|
14
|
+
export declare function checkConsecutiveSameNameSections(rootNode: BalanceNode, sourceText: string): FixableError[];
|
|
15
|
+
export declare function checkSelfClosingNonVoidTags(rootNode: BalanceNode): FixableError[];
|
|
16
|
+
export declare function checkUnescapedEntities(rootNode: BalanceNode): FixableError[];
|
|
17
|
+
export declare function checkHtmlComments(rootNode: BalanceNode): FixableError[];
|
|
18
|
+
export declare function checkUnrecognizedHtmlTags(rootNode: BalanceNode, customTagNames?: string[]): FixableError[];
|
|
19
|
+
export declare function checkDuplicateAttributes(rootNode: BalanceNode): FixableError[];
|
|
20
|
+
export declare function checkElementContentTooLong(rootNode: BalanceNode, elements: ReadonlyArray<{
|
|
21
|
+
tag: string;
|
|
22
|
+
maxBytes: number;
|
|
23
|
+
}>): FixableError[];
|
|
24
|
+
//# sourceMappingURL=mustacheChecks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mustacheChecks.d.ts","sourceRoot":"","sources":["../../../src/core/mustacheChecks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAIzE,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,YAAa,SAAQ,YAAY;IAChD,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,GAAG,CAAC,EAAE,eAAe,EAAE,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAGD,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,WAAW,GAAG,YAAY,EAAE,CAgCjF;AAGD,wBAAgB,+BAA+B,CAAC,QAAQ,EAAE,WAAW,GAAG,YAAY,EAAE,CA4BrF;AAGD,wBAAgB,gCAAgC,CAAC,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,GAAG,YAAY,EAAE,CA6D1G;AAUD,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,WAAW,GAAG,YAAY,EAAE,CA6BjF;AAiED,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,WAAW,GAAG,YAAY,EAAE,CAsD5E;AAGD,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,WAAW,GAAG,YAAY,EAAE,CAiCvE;AAgCD,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,WAAW,EAAE,cAAc,CAAC,EAAE,MAAM,EAAE,GAAG,YAAY,EAAE,CAsC1G;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,WAAW,GAAG,YAAY,EAAE,CAkD9E;AAED,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,WAAW,EACrB,QAAQ,EAAE,aAAa,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,GACzD,YAAY,EAAE,CAsChB"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared node helper functions and type constants for working with
|
|
3
|
+
* tree-sitter syntax nodes across the LSP and CLI.
|
|
4
|
+
*
|
|
5
|
+
* Uses a minimal interface compatible with both web-tree-sitter's SyntaxNode
|
|
6
|
+
* and the BalanceNode interface from htmlBalanceChecker.
|
|
7
|
+
*/
|
|
8
|
+
/** Minimal node interface compatible with both SyntaxNode and BalanceNode. */
|
|
9
|
+
export interface MinimalNode {
|
|
10
|
+
type: string;
|
|
11
|
+
text: string;
|
|
12
|
+
children: MinimalNode[];
|
|
13
|
+
}
|
|
14
|
+
export declare const MUSTACHE_SECTION_TYPES: Set<string>;
|
|
15
|
+
export declare const INTERPOLATION_TYPES: Set<string>;
|
|
16
|
+
export declare const RAW_CONTENT_ELEMENT_TYPES: Set<string>;
|
|
17
|
+
export declare const HTML_ELEMENT_TYPES: Set<string>;
|
|
18
|
+
export declare function isMustacheSection(node: MinimalNode): boolean;
|
|
19
|
+
export declare function isRawContentElement(node: MinimalNode): boolean;
|
|
20
|
+
export declare function isHtmlElementType(node: MinimalNode): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Get the tag name from an HTML element node.
|
|
23
|
+
* Works with any node that has children with type 'html_start_tag' or
|
|
24
|
+
* 'html_self_closing_tag' containing an 'html_tag_name' child.
|
|
25
|
+
*/
|
|
26
|
+
export declare function getTagName(node: MinimalNode): string | null;
|
|
27
|
+
/**
|
|
28
|
+
* Get the section name from a mustache section node.
|
|
29
|
+
* Looks for mustache_tag_name inside mustache_section_begin or
|
|
30
|
+
* mustache_inverted_section_begin.
|
|
31
|
+
*/
|
|
32
|
+
export declare function getSectionName(node: MinimalNode): string | null;
|
|
33
|
+
/**
|
|
34
|
+
* Get the tag name from an erroneous end tag node.
|
|
35
|
+
*/
|
|
36
|
+
export declare function getErroneousEndTagName(node: MinimalNode): string | null;
|
|
37
|
+
/**
|
|
38
|
+
* Get the dotted path text from a mustache_interpolation or mustache_triple
|
|
39
|
+
* node — e.g. `{{data.foo}}` → `"data.foo"`. Returns `"."` for the
|
|
40
|
+
* context-marker interpolation `{{.}}`. Returns null if the node has no
|
|
41
|
+
* recognisable expression child.
|
|
42
|
+
*/
|
|
43
|
+
export declare function getInterpolationPath(node: MinimalNode): string | null;
|
|
44
|
+
/**
|
|
45
|
+
* Get the content text of a mustache_comment node (`{{!foo}}` → `"foo"`).
|
|
46
|
+
* Returns null if no content child is present.
|
|
47
|
+
*/
|
|
48
|
+
export declare function getCommentContent(node: MinimalNode): string | null;
|
|
49
|
+
/**
|
|
50
|
+
* Get the partial name of a mustache_partial node (`{{>header}}` → `"header"`).
|
|
51
|
+
* Returns null if no content child is present.
|
|
52
|
+
*/
|
|
53
|
+
export declare function getPartialName(node: MinimalNode): string | null;
|
|
54
|
+
//# sourceMappingURL=nodeHelpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodeHelpers.d.ts","sourceRoot":"","sources":["../../../src/core/nodeHelpers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,8EAA8E;AAC9E,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,WAAW,EAAE,CAAC;CACzB;AAID,eAAO,MAAM,sBAAsB,aAGjC,CAAC;AAEH,eAAO,MAAM,mBAAmB,aAG9B,CAAC;AAEH,eAAO,MAAM,yBAAyB,aAIpC,CAAC;AAEH,eAAO,MAAM,kBAAkB,aAK7B,CAAC;AAIH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAE5D;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAE9D;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAE5D;AAID;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI,CAQ3D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI,CAO/D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI,CAGvE;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI,CAQrE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI,CAGlE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI,CAG/D"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { RuleSeverity } from './configSchema.js';
|
|
2
|
+
export interface RuleDefinition {
|
|
3
|
+
name: string;
|
|
4
|
+
defaultSeverity: RuleSeverity;
|
|
5
|
+
description: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const RULES: RuleDefinition[];
|
|
8
|
+
/** Set of all known rule names (for config validation). */
|
|
9
|
+
export declare const KNOWN_RULE_NAMES: Set<string>;
|
|
10
|
+
/** Default severity for each rule (for runtime resolution). */
|
|
11
|
+
export declare const RULE_DEFAULTS: Record<string, RuleSeverity>;
|
|
12
|
+
//# sourceMappingURL=ruleMetadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ruleMetadata.d.ts","sourceRoot":"","sources":["../../../src/core/ruleMetadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,YAAY,CAAC;IAC9B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,KAAK,EAAE,cAAc,EA8CjC,CAAC;AAEF,2DAA2D;AAC3D,eAAO,MAAM,gBAAgB,aAA0C,CAAC;AAExE,+DAA+D;AAC/D,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAEtD,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CSS-like selector parser and tree matcher for custom lint rules.
|
|
3
|
+
*
|
|
4
|
+
* Mustache constructs are written literally in selectors — `{{foo}}`,
|
|
5
|
+
* `{{{foo}}}`, `{{#foo}}`, `{{^foo}}`, `{{!foo}}`, `{{>foo}}`. A preprocessor
|
|
6
|
+
* substitutes each form into an internal `:m-*` pseudo-class marker, then the
|
|
7
|
+
* rewritten string is handed to parsel-js. This keeps users in Mustache
|
|
8
|
+
* vocabulary without reinventing a selector parser.
|
|
9
|
+
*
|
|
10
|
+
* Supported user-facing syntax:
|
|
11
|
+
* - Tag names (`div`), universal (`*`), classes (`.foo`), ids (`#foo`)
|
|
12
|
+
* - Attributes: `[attr]`, `[attr=v]`, `[attr^=v]`, `[attr*=v]`, `[attr$=v]`, `[attr~=v]`
|
|
13
|
+
* - Descendant (space) and child (`>`) combinators
|
|
14
|
+
* - Mustache variables: `{{path}}` and `{{{path}}}` (raw)
|
|
15
|
+
* - Mustache sections: `{{#name}}` and `{{^name}}` (inverted)
|
|
16
|
+
* - Mustache comments: `{{!content}}`
|
|
17
|
+
* - Mustache partials: `{{>name}}`
|
|
18
|
+
* - Glob wildcard `*` inside the argument: `{{options.*}}`, `{{*.deprecated}}`, `{{*}}`
|
|
19
|
+
* - `:has(selector)` — element has a matching descendant
|
|
20
|
+
* - `:not(...)` over any attribute/class/id/:has form
|
|
21
|
+
* - `:root` — the tree-sitter fragment root (the whole document). Unlike
|
|
22
|
+
* browser CSS where `:root` matches `<html>`, this matches the parse-tree
|
|
23
|
+
* root so it works on partials/fragments too. Useful as a document-scoped
|
|
24
|
+
* anchor, e.g. `:root:has(pl-question-panel):not(:has(pl-answer-panel))`
|
|
25
|
+
* matches the root iff a `pl-question-panel` is present anywhere but no
|
|
26
|
+
* `pl-answer-panel` is. Cannot combine with tag/class/id/attribute in the
|
|
27
|
+
* same compound (only with `:has` / `:not(:has(...))`). Inside `:has(...)`,
|
|
28
|
+
* `:root` refers to the element being checked, not the document.
|
|
29
|
+
* - Comma-separated alternatives
|
|
30
|
+
*
|
|
31
|
+
* Unsupported (parseSelector returns null, rule is skipped):
|
|
32
|
+
* - Sibling combinators (`+`, `~`)
|
|
33
|
+
* - `[attr|=v]`, case-insensitive `i` flag
|
|
34
|
+
* - Mixed HTML + Mustache kinds in one compound (e.g. `img{{foo}}`)
|
|
35
|
+
* - `{{/end}}` (end tags aren't standalone nodes)
|
|
36
|
+
* - `{{=<% %>=}}` (delimiter changes aren't grammar-tracked)
|
|
37
|
+
* - Mustache literals inside `:not(...)` (only attribute/class/id/:has)
|
|
38
|
+
*/
|
|
39
|
+
import type { BalanceNode } from './htmlBalanceChecker.js';
|
|
40
|
+
export type AttributeOperator = '=' | '^=' | '*=' | '$=' | '~=';
|
|
41
|
+
export type SegmentKind = 'html' | 'section' | 'inverted' | 'variable' | 'raw' | 'comment' | 'partial';
|
|
42
|
+
export interface AttributeConstraint {
|
|
43
|
+
name: string;
|
|
44
|
+
op: AttributeOperator;
|
|
45
|
+
value?: string;
|
|
46
|
+
negated: boolean;
|
|
47
|
+
}
|
|
48
|
+
export interface DescendantCheck {
|
|
49
|
+
selector: ParsedSelector;
|
|
50
|
+
negated: boolean;
|
|
51
|
+
}
|
|
52
|
+
export interface Segment {
|
|
53
|
+
kind: SegmentKind;
|
|
54
|
+
rootOnly: boolean;
|
|
55
|
+
name: string | null;
|
|
56
|
+
pathRegex?: RegExp;
|
|
57
|
+
attributes: AttributeConstraint[];
|
|
58
|
+
descendantChecks: DescendantCheck[];
|
|
59
|
+
combinator: 'descendant' | 'child';
|
|
60
|
+
}
|
|
61
|
+
/** A parsed selector is a list of alternatives (from comma-separated parts). */
|
|
62
|
+
export type ParsedSelector = Segment[][];
|
|
63
|
+
/**
|
|
64
|
+
* Rewrite Mustache-literal tokens (`{{...}}` forms) in the selector string into
|
|
65
|
+
* internal `:m-*` pseudo-class markers so parsel-js can handle them. Returns
|
|
66
|
+
* null if the string contains an unsupported or malformed Mustache token.
|
|
67
|
+
*
|
|
68
|
+
* Skips content inside `"..."` and `'...'` so that literal `{{...}}` embedded
|
|
69
|
+
* in CSS attribute-value strings is preserved unchanged.
|
|
70
|
+
*/
|
|
71
|
+
export declare function preprocessMustacheLiterals(raw: string): string | null;
|
|
72
|
+
export declare function parseSelector(raw: string): ParsedSelector | null;
|
|
73
|
+
export declare function matchSelector(rootNode: BalanceNode, selector: ParsedSelector): BalanceNode[];
|
|
74
|
+
//# sourceMappingURL=selectorMatcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectorMatcher.d.ts","sourceRoot":"","sources":["../../../src/core/selectorMatcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAY3D,MAAM,MAAM,iBAAiB,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEhE,MAAM,MAAM,WAAW,GACnB,MAAM,GACN,SAAS,GACT,UAAU,GACV,UAAU,GACV,KAAK,GACL,SAAS,GACT,SAAS,CAAC;AAEd,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,iBAAiB,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,cAAc,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,WAAW,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,mBAAmB,EAAE,CAAC;IAClC,gBAAgB,EAAE,eAAe,EAAE,CAAC;IACpC,UAAU,EAAE,YAAY,GAAG,OAAO,CAAC;CACpC;AAED,gFAAgF;AAChF,MAAM,MAAM,cAAc,GAAG,OAAO,EAAE,EAAE,CAAC;AAQzC;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAuFrE;AAID,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAuBhE;AA0eD,wBAAgB,aAAa,CAAC,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,cAAc,GAAG,WAAW,EAAE,CAY5F"}
|