Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@markuplint/selector

Package Overview
Dependencies
Maintainers
1
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@markuplint/selector - npm Package Compare versions

Comparing version 3.0.0-rc.1 to 3.0.0-rc.2

2

lib/invalid-selector-error.d.ts
export declare class InvalidSelectorError extends Error {
name: string;
name: string;
}
import type { Specificity, RegexSelector } from './types';
export type SelectorMatches = SelectorMatched | SelectorUnmatched;
type SelectorMatched = {
matched: true;
selector: string;
specificity: Specificity;
data?: Record<string, string>;
matched: true;
selector: string;
specificity: Specificity;
data?: Record<string, string>;
};
type SelectorUnmatched = {
matched: false;
matched: false;
};
export declare function matchSelector(el: Node, selector: string | RegexSelector | undefined): SelectorMatches;
export {};

@@ -1,7 +0,3 @@

export declare function regexSelectorMatches(
reg: string,
raw: string,
ignoreCase: boolean,
): {
[x: string]: string;
export declare function regexSelectorMatches(reg: string, raw: string, ignoreCase: boolean): {
[x: string]: string;
} | null;
import type { SelectorResult, Specificity } from './types';
type ExtendedPseudoClass = Record<string, (content: string) => (el: Element) => SelectorResult>;
export declare class Selector {
#private;
constructor(selector: string, extended?: ExtendedPseudoClass);
match(el: Node, scope?: ParentNode | null): Specificity | false;
search(el: Node, scope?: ParentNode | null): SelectorResult[];
#private;
constructor(selector: string, extended?: ExtendedPseudoClass);
match(el: Node, scope?: ParentNode | null): Specificity | false;
search(el: Node, scope?: ParentNode | null): SelectorResult[];
}
export {};
export type Specificity = [number, number, number];
export type SelectorResult = SelectorMatchedResult | SelectorUnmatchedResult;
export type SelectorMatchedResult = {
specificity: Specificity;
matched: true;
nodes: (Element | Text)[];
has: SelectorMatchedResult[];
specificity: Specificity;
matched: true;
nodes: (Element | Text)[];
has: SelectorMatchedResult[];
};
export type SelectorUnmatchedResult = {
specificity: Specificity;
matched: false;
not?: SelectorMatchedResult[];
specificity: Specificity;
matched: false;
not?: SelectorMatchedResult[];
};
export type RegexSelector = RegexSelectorWithoutCombination & {
combination?: {
combinator: RegexSelectorCombinator;
} & RegexSelector;
combination?: {
combinator: RegexSelectorCombinator;
} & RegexSelector;
};
export type RegexSelectorCombinator = ' ' | '>' | '+' | '~' | ':has(+)' | ':has(~)';
export type RegexSelectorWithoutCombination = {
nodeName?: string;
attrName?: string;
attrValue?: string;
nodeName?: string;
attrName?: string;
attrValue?: string;
};
{
"name": "@markuplint/selector",
"version": "3.0.0-rc.1",
"version": "3.0.0-rc.2",
"description": "Extended W3C Selectors matcher",

@@ -25,3 +25,3 @@ "repository": "git@github.com:markuplint/markuplint.git",

"devDependencies": {
"@markuplint/ml-spec": "3.0.0-rc.1",
"@markuplint/ml-spec": "3.0.0-rc.2",
"@types/debug": "^4.1.7",

@@ -31,3 +31,3 @@ "@types/jsdom": "16",

},
"gitHead": "f0d1cd3216c171949c6e6be0d4388a760bd5d37b"
"gitHead": "27a5c8d136f4b0cf8452552cff529dd0a4db6bba"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc