Rocky_Mountain_Vending/.pnpm-store/v10/files/e3/6947b76d68bbe3565bf1fe50cc32293005b7c4d90c89689315eac927c7c16ec936637713d3b54496f69b0f422d65718af475deb3cefe77668d7b93836f7832
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

46 lines
1.1 KiB
Text

/**
* @license
* Copyright 2022 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/
import {
createTextContent,
isSuitableNodeForTextMatching,
} from './TextContent.js';
/**
* Queries the given node for all nodes matching the given text selector.
*
* @internal
*/
export const textQuerySelectorAll = function* (
root: Node,
selector: string,
): Generator<Element> {
let yielded = false;
for (const node of root.childNodes) {
if (node instanceof Element && isSuitableNodeForTextMatching(node)) {
let matches: Generator<Element, boolean>;
if (!node.shadowRoot) {
matches = textQuerySelectorAll(node, selector);
} else {
matches = textQuerySelectorAll(node.shadowRoot, selector);
}
for (const match of matches) {
yield match;
yielded = true;
}
}
}
if (yielded) {
return;
}
if (root instanceof Element && isSuitableNodeForTextMatching(root)) {
const textContent = createTextContent(root);
if (textContent.full.includes(selector)) {
yield root;
}
}
};