This commit is contained in:
CHEVALLIER Abel
2025-11-13 16:23:22 +01:00
parent de9c515a47
commit cb235644dc
34924 changed files with 3811102 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
import type { CompiledQuery, InternalOptions } from "../types.js";
/**
* Some selectors such as `:contains` and (non-relative) `:has` will only be
* able to match elements if their parents match the selector (as they contain
* a subset of the elements that the parent contains).
*
* This function wraps the given `matches` function in a function that caches
* the results of the parent elements, so that the `matches` function only
* needs to be called once for each subtree.
*/
export declare function cacheParentResults<Node, ElementNode extends Node>(next: CompiledQuery<ElementNode>, { adapter, cacheResults }: InternalOptions<Node, ElementNode>, matches: (elem: ElementNode) => boolean): CompiledQuery<ElementNode>;
//# sourceMappingURL=cache.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../src/helpers/cache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAGlE;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EAC7D,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC,EAChC,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,EAC7D,OAAO,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,OAAO,GACxC,aAAa,CAAC,WAAW,CAAC,CAwC5B"}

45
node_modules/css-select/dist/commonjs/helpers/cache.js generated vendored Normal file
View File

@@ -0,0 +1,45 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.cacheParentResults = cacheParentResults;
const querying_js_1 = require("./querying.js");
/**
* Some selectors such as `:contains` and (non-relative) `:has` will only be
* able to match elements if their parents match the selector (as they contain
* a subset of the elements that the parent contains).
*
* This function wraps the given `matches` function in a function that caches
* the results of the parent elements, so that the `matches` function only
* needs to be called once for each subtree.
*/
function cacheParentResults(next, { adapter, cacheResults }, matches) {
if (cacheResults === false || typeof WeakMap === "undefined") {
return (elem) => next(elem) && matches(elem);
}
// Use a cache to avoid re-checking children of an element.
// @ts-expect-error `Node` is not extending object
const resultCache = new WeakMap();
function addResultToCache(elem) {
const result = matches(elem);
resultCache.set(elem, result);
return result;
}
return function cachedMatcher(elem) {
if (!next(elem)) {
return false;
}
if (resultCache.has(elem)) {
return resultCache.get(elem);
}
// Check all of the element's parents.
let node = elem;
do {
const parent = (0, querying_js_1.getElementParent)(node, adapter);
if (parent === null) {
return addResultToCache(elem);
}
node = parent;
} while (!resultCache.has(node));
return resultCache.get(node) && addResultToCache(elem);
};
}
//# sourceMappingURL=cache.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"cache.js","sourceRoot":"","sources":["../../../src/helpers/cache.ts"],"names":[],"mappings":";;AAYA,gDA4CC;AAvDD,+CAAiD;AAEjD;;;;;;;;GAQG;AACH,SAAgB,kBAAkB,CAC9B,IAAgC,EAChC,EAAE,OAAO,EAAE,YAAY,EAAsC,EAC7D,OAAuC;IAEvC,IAAI,YAAY,KAAK,KAAK,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE,CAAC;QAC3D,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;IAED,2DAA2D;IAE3D,kDAAkD;IAClD,MAAM,WAAW,GAAG,IAAI,OAAO,EAAiB,CAAC;IAEjD,SAAS,gBAAgB,CAAC,IAAiB;QACvC,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QAE7B,WAAW,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAC9B,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,OAAO,SAAS,aAAa,CAAC,IAAI;QAC9B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACd,OAAO,KAAK,CAAC;QACjB,CAAC;QACD,IAAI,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YACxB,OAAO,WAAW,CAAC,GAAG,CAAC,IAAI,CAAE,CAAC;QAClC,CAAC;QAED,sCAAsC;QACtC,IAAI,IAAI,GAAG,IAAI,CAAC;QAEhB,GAAG,CAAC;YACA,MAAM,MAAM,GAAG,IAAA,8BAAgB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAE/C,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;gBAClB,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAC;YAClC,CAAC;YAED,IAAI,GAAG,MAAM,CAAC;QAClB,CAAC,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QAEjC,OAAO,WAAW,CAAC,GAAG,CAAC,IAAI,CAAE,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAC5D,CAAC,CAAC;AACN,CAAC"}

View File

@@ -0,0 +1,24 @@
import type { Adapter, InternalOptions, Predicate } from "../types.js";
/**
* Find all elements matching the query. If not in XML mode, the query will ignore
* the contents of `<template>` elements.
*
* @param query - Function that returns true if the element matches the query.
* @param elems - Nodes to query. If a node is an element, its children will be queried.
* @param options - Options for querying the document.
* @returns All matching elements.
*/
export declare function findAll<Node, ElementNode extends Node>(query: Predicate<ElementNode>, elems: Node[], options: InternalOptions<Node, ElementNode>): ElementNode[];
/**
* Find the first element matching the query. If not in XML mode, the query will ignore
* the contents of `<template>` elements.
*
* @param query - Function that returns true if the element matches the query.
* @param elems - Nodes to query. If a node is an element, its children will be queried.
* @param options - Options for querying the document.
* @returns The first matching element, or null if there was no match.
*/
export declare function findOne<Node, ElementNode extends Node>(query: Predicate<ElementNode>, elems: Node[], options: InternalOptions<Node, ElementNode>): ElementNode | null;
export declare function getNextSiblings<Node, ElementNode extends Node>(elem: Node, adapter: Adapter<Node, ElementNode>): ElementNode[];
export declare function getElementParent<Node, ElementNode extends Node>(node: ElementNode, adapter: Adapter<Node, ElementNode>): ElementNode | null;
//# sourceMappingURL=querying.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"querying.d.ts","sourceRoot":"","sources":["../../../src/helpers/querying.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEvE;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EAClD,KAAK,EAAE,SAAS,CAAC,WAAW,CAAC,EAC7B,KAAK,EAAE,IAAI,EAAE,EACb,OAAO,EAAE,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,GAC5C,WAAW,EAAE,CA6Cf;AAED;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EAClD,KAAK,EAAE,SAAS,CAAC,WAAW,CAAC,EAC7B,KAAK,EAAE,IAAI,EAAE,EACb,OAAO,EAAE,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,GAC5C,WAAW,GAAG,IAAI,CA4CpB;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EAC1D,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,GACpC,WAAW,EAAE,CAUf;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EAC3D,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,GACpC,WAAW,GAAG,IAAI,CAGpB"}

View File

@@ -0,0 +1,117 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.findAll = findAll;
exports.findOne = findOne;
exports.getNextSiblings = getNextSiblings;
exports.getElementParent = getElementParent;
/**
* Find all elements matching the query. If not in XML mode, the query will ignore
* the contents of `<template>` elements.
*
* @param query - Function that returns true if the element matches the query.
* @param elems - Nodes to query. If a node is an element, its children will be queried.
* @param options - Options for querying the document.
* @returns All matching elements.
*/
function findAll(query, elems, options) {
const { adapter, xmlMode = false } = options;
const result = [];
/** Stack of the arrays we are looking at. */
const nodeStack = [elems];
/** Stack of the indices within the arrays. */
const indexStack = [0];
for (;;) {
// First, check if the current array has any more elements to look at.
if (indexStack[0] >= nodeStack[0].length) {
// If we have no more arrays to look at, we are done.
if (nodeStack.length === 1) {
return result;
}
nodeStack.shift();
indexStack.shift();
// Loop back to the start to continue with the next array.
continue;
}
const elem = nodeStack[0][indexStack[0]++];
if (!adapter.isTag(elem)) {
continue;
}
if (query(elem)) {
result.push(elem);
}
if (xmlMode || adapter.getName(elem) !== "template") {
/*
* Add the children to the stack. We are depth-first, so this is
* the next array we look at.
*/
const children = adapter.getChildren(elem);
if (children.length > 0) {
nodeStack.unshift(children);
indexStack.unshift(0);
}
}
}
}
/**
* Find the first element matching the query. If not in XML mode, the query will ignore
* the contents of `<template>` elements.
*
* @param query - Function that returns true if the element matches the query.
* @param elems - Nodes to query. If a node is an element, its children will be queried.
* @param options - Options for querying the document.
* @returns The first matching element, or null if there was no match.
*/
function findOne(query, elems, options) {
const { adapter, xmlMode = false } = options;
/** Stack of the arrays we are looking at. */
const nodeStack = [elems];
/** Stack of the indices within the arrays. */
const indexStack = [0];
for (;;) {
// First, check if the current array has any more elements to look at.
if (indexStack[0] >= nodeStack[0].length) {
// If we have no more arrays to look at, we are done.
if (nodeStack.length === 1) {
return null;
}
nodeStack.shift();
indexStack.shift();
// Loop back to the start to continue with the next array.
continue;
}
const elem = nodeStack[0][indexStack[0]++];
if (!adapter.isTag(elem)) {
continue;
}
if (query(elem)) {
return elem;
}
if (xmlMode || adapter.getName(elem) !== "template") {
/*
* Add the children to the stack. We are depth-first, so this is
* the next array we look at.
*/
const children = adapter.getChildren(elem);
if (children.length > 0) {
nodeStack.unshift(children);
indexStack.unshift(0);
}
}
}
}
function getNextSiblings(elem, adapter) {
const siblings = adapter.getSiblings(elem);
if (siblings.length <= 1) {
return [];
}
const elemIndex = siblings.indexOf(elem);
if (elemIndex < 0 || elemIndex === siblings.length - 1) {
return [];
}
return siblings.slice(elemIndex + 1).filter(adapter.isTag);
}
function getElementParent(node, adapter) {
const parent = adapter.getParent(node);
return parent != null && adapter.isTag(parent) ? parent : null;
}
//# sourceMappingURL=querying.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"querying.js","sourceRoot":"","sources":["../../../src/helpers/querying.ts"],"names":[],"mappings":";;AAWA,0BAiDC;AAWD,0BAgDC;AAED,0CAaC;AAED,4CAMC;AA5ID;;;;;;;;GAQG;AACH,SAAgB,OAAO,CACnB,KAA6B,EAC7B,KAAa,EACb,OAA2C;IAE3C,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,KAAK,EAAE,GAAG,OAAO,CAAC;IAC7C,MAAM,MAAM,GAAkB,EAAE,CAAC;IACjC,6CAA6C;IAC7C,MAAM,SAAS,GAAG,CAAC,KAAK,CAAC,CAAC;IAC1B,8CAA8C;IAC9C,MAAM,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC;IAEvB,SAAS,CAAC;QACN,sEAAsE;QACtE,IAAI,UAAU,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;YACvC,qDAAqD;YACrD,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACzB,OAAO,MAAM,CAAC;YAClB,CAAC;YAED,SAAS,CAAC,KAAK,EAAE,CAAC;YAClB,UAAU,CAAC,KAAK,EAAE,CAAC;YAEnB,0DAA0D;YAC1D,SAAS;QACb,CAAC;QAED,MAAM,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAE3C,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YACvB,SAAS;QACb,CAAC;QACD,IAAI,KAAK,CAAC,IAAI,CAAC,EAA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@@ -0,0 +1,20 @@
import { type Traversal } from "css-what";
import type { InternalSelector } from "../types.js";
export declare function isTraversal(token: InternalSelector): token is Traversal;
/**
* Sort the parts of the passed selector, as there is potential for
* optimization (some types of selectors are faster than others).
*
* @param arr Selector to sort
*/
export declare function sortRules(arr: InternalSelector[]): void;
/**
* Determine the quality of the passed token. The higher the number, the
* faster the token is to execute.
*
* @param token Token to get the quality of.
* @returns The token's quality.
*/
export declare function getQuality(token: InternalSelector): number;
export declare function includesScopePseudo(t: InternalSelector): boolean;
//# sourceMappingURL=selectors.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../../src/helpers/selectors.ts"],"names":[],"mappings":"AAAA,OAAO,EAKH,KAAK,SAAS,EACjB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,KAAK,IAAI,SAAS,CAEvE;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAkBvD;AAgCD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAwC1D;AAED,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAOhE"}

View File

@@ -0,0 +1,109 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isTraversal = isTraversal;
exports.sortRules = sortRules;
exports.getQuality = getQuality;
exports.includesScopePseudo = includesScopePseudo;
const css_what_1 = require("css-what");
function isTraversal(token) {
return token.type === "_flexibleDescendant" || (0, css_what_1.isTraversal)(token);
}
/**
* Sort the parts of the passed selector, as there is potential for
* optimization (some types of selectors are faster than others).
*
* @param arr Selector to sort
*/
function sortRules(arr) {
const ratings = arr.map(getQuality);
for (let i = 1; i < arr.length; i++) {
const procNew = ratings[i];
if (procNew < 0) {
continue;
}
// Use insertion sort to move the token to the correct position.
for (let j = i; j > 0 && procNew < ratings[j - 1]; j--) {
const token = arr[j];
arr[j] = arr[j - 1];
arr[j - 1] = token;
ratings[j] = ratings[j - 1];
ratings[j - 1] = procNew;
}
}
}
function getAttributeQuality(token) {
switch (token.action) {
case css_what_1.AttributeAction.Exists: {
return 10;
}
case css_what_1.AttributeAction.Equals: {
// Prefer ID selectors (eg. #ID)
return token.name === "id" ? 9 : 8;
}
case css_what_1.AttributeAction.Not: {
return 7;
}
case css_what_1.AttributeAction.Start: {
return 6;
}
case css_what_1.AttributeAction.End: {
return 6;
}
case css_what_1.AttributeAction.Any: {
return 5;
}
case css_what_1.AttributeAction.Hyphen: {
return 4;
}
case css_what_1.AttributeAction.Element: {
return 3;
}
}
}
/**
* Determine the quality of the passed token. The higher the number, the
* faster the token is to execute.
*
* @param token Token to get the quality of.
* @returns The token's quality.
*/
function getQuality(token) {
switch (token.type) {
case css_what_1.SelectorType.Universal: {
return 50;
}
case css_what_1.SelectorType.Tag: {
return 30;
}
case css_what_1.SelectorType.Attribute: {
return Math.floor(getAttributeQuality(token) /
// `ignoreCase` adds some overhead, half the result if applicable.
(token.ignoreCase ? 2 : 1));
}
case css_what_1.SelectorType.Pseudo: {
return !token.data
? 3
: token.name === "has" ||
token.name === "contains" ||
token.name === "icontains"
? // Expensive in any case — run as late as possible.
0
: Array.isArray(token.data)
? // Eg. `:is`, `:not`
Math.max(
// If we have traversals, try to avoid executing this selector
0, Math.min(...token.data.map((d) => Math.min(...d.map(getQuality)))))
: 2;
}
default: {
return -1;
}
}
}
function includesScopePseudo(t) {
return (t.type === css_what_1.SelectorType.Pseudo &&
(t.name === "scope" ||
(Array.isArray(t.data) &&
t.data.some((data) => data.some(includesScopePseudo)))));
}
//# sourceMappingURL=selectors.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"selectors.js","sourceRoot":"","sources":["../../../src/helpers/selectors.ts"],"names":[],"mappings":";;AASA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