@dvaji/cheerox 0.1.4 → 0.1.5

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.
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_cheerio_compat = require("./cheerio-compat-BeDR8TQZ.cjs");
5
+ const require_cheerio_compat = require("./cheerio-compat-BRbgK33C.cjs");
6
6
  exports.cheerio = require_cheerio_compat.moduleCheerio;
7
7
  exports.default = require_cheerio_compat.moduleCheerio;
8
8
  exports.contains = require_cheerio_compat.staticContains;
@@ -1,2 +1,2 @@
1
- import { C as LegacyOptions, S as LegacyNode, _ as CheerioInstance, a as staticContains, b as Document, c as staticParseHTML, d as staticXml, f as update, g as CheerioConstructor, h as CheerioAPI, i as parse, l as staticRoot, m as Cheerio, n as load, o as staticExports, p as AnyNode, r as moduleCheerio, s as staticHtml, t as evaluate, u as staticText, v as CheerioPrototype, x as Element, y as CheerioStatic } from "./cheerio-compat-C6M5aNE9.cjs";
1
+ import { C as LegacyOptions, S as LegacyNode, _ as CheerioInstance, a as staticContains, b as Document, c as staticParseHTML, d as staticXml, f as update, g as CheerioConstructor, h as CheerioAPI, i as parse, l as staticRoot, m as Cheerio, n as load, o as staticExports, p as AnyNode, r as moduleCheerio, s as staticHtml, t as evaluate, u as staticText, v as CheerioPrototype, x as Element, y as CheerioStatic } from "./cheerio-compat-6yCbWRc-.cjs";
2
2
  export { type AnyNode, type Cheerio, type CheerioAPI, type CheerioConstructor, type CheerioInstance, type CheerioPrototype, type CheerioStatic, type Document, type Element, type LegacyNode, type LegacyOptions, moduleCheerio as cheerio, moduleCheerio as default, staticContains as contains, evaluate, staticHtml as html, staticExports as legacyStatics, load, parse, staticParseHTML as parseHTML, staticRoot as root, staticText as text, update, staticXml as xml };
@@ -1,2 +1,2 @@
1
- import { C as LegacyOptions, S as LegacyNode, _ as CheerioInstance, a as staticContains, b as Document, c as staticParseHTML, d as staticXml, f as update, g as CheerioConstructor, h as CheerioAPI, i as parse, l as staticRoot, m as Cheerio, n as load, o as staticExports, p as AnyNode, r as moduleCheerio, s as staticHtml, t as evaluate, u as staticText, v as CheerioPrototype, x as Element, y as CheerioStatic } from "./cheerio-compat-WDud2pl9.mjs";
1
+ import { C as LegacyOptions, S as LegacyNode, _ as CheerioInstance, a as staticContains, b as Document, c as staticParseHTML, d as staticXml, f as update, g as CheerioConstructor, h as CheerioAPI, i as parse, l as staticRoot, m as Cheerio, n as load, o as staticExports, p as AnyNode, r as moduleCheerio, s as staticHtml, t as evaluate, u as staticText, v as CheerioPrototype, x as Element, y as CheerioStatic } from "./cheerio-compat-Ck7utR5z.mjs";
2
2
  export { type AnyNode, type Cheerio, type CheerioAPI, type CheerioConstructor, type CheerioInstance, type CheerioPrototype, type CheerioStatic, type Document, type Element, type LegacyNode, type LegacyOptions, moduleCheerio as cheerio, moduleCheerio as default, staticContains as contains, evaluate, staticHtml as html, staticExports as legacyStatics, load, parse, staticParseHTML as parseHTML, staticRoot as root, staticText as text, update, staticXml as xml };
@@ -1,2 +1,2 @@
1
- import { C as LegacyOptions, S as LegacyNode, _ as CheerioInstance, a as staticContains, b as Document, c as staticParseHTML, d as staticXml, f as update, g as CheerioConstructor, h as CheerioAPI, i as parse, l as staticRoot, m as Cheerio, n as load, o as staticExports, p as AnyNode, r as moduleCheerio, s as staticHtml, t as evaluate, u as staticText, v as CheerioPrototype, x as Element, y as CheerioStatic } from "./cheerio-compat-C6M5aNE9.cjs";
1
+ import { C as LegacyOptions, S as LegacyNode, _ as CheerioInstance, a as staticContains, b as Document, c as staticParseHTML, d as staticXml, f as update, g as CheerioConstructor, h as CheerioAPI, i as parse, l as staticRoot, m as Cheerio, n as load, o as staticExports, p as AnyNode, r as moduleCheerio, s as staticHtml, t as evaluate, u as staticText, v as CheerioPrototype, x as Element, y as CheerioStatic } from "./cheerio-compat-6yCbWRc-.cjs";
2
2
  export { type AnyNode, type Cheerio, type CheerioAPI, type CheerioConstructor, type CheerioInstance, type CheerioPrototype, type CheerioStatic, type Document, type Element, type LegacyNode, type LegacyOptions, moduleCheerio as cheerio, moduleCheerio as default, staticContains as contains, evaluate, staticHtml as html, staticExports as legacyStatics, load, parse, staticParseHTML as parseHTML, staticRoot as root, staticText as text, update, staticXml as xml };
@@ -1 +1 @@
1
- export { r as cheerio, r as default, a as contains, t as evaluate, s as html, o as legacyStatics, n as load, i as parse, c as parseHTML, l as root, u as text, f as update, d as xml } from "./cheerio-compat-CVs7vojA.mjs";
1
+ export { r as cheerio, r as default, a as contains, t as evaluate, s as html, o as legacyStatics, n as load, i as parse, c as parseHTML, l as root, u as text, f as update, d as xml } from "./cheerio-compat-Dz2XQ2aX.mjs";
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { $ as nativeStatus } from "./types-CA01Zg3r.mjs";
2
- import { C as LegacyOptions, S as LegacyNode, _ as CheerioInstance, a as staticContains, b as Document, c as staticParseHTML, d as staticXml, f as update, g as CheerioConstructor, h as CheerioAPI, i as parse, l as staticRoot, m as Cheerio, n as load, p as AnyNode, r as moduleCheerio, s as staticHtml, t as evaluate, u as staticText, x as Element } from "./cheerio-compat-WDud2pl9.mjs";
2
+ import { C as LegacyOptions, S as LegacyNode, _ as CheerioInstance, a as staticContains, b as Document, c as staticParseHTML, d as staticXml, f as update, g as CheerioConstructor, h as CheerioAPI, i as parse, l as staticRoot, m as Cheerio, n as load, p as AnyNode, r as moduleCheerio, s as staticHtml, t as evaluate, u as staticText, x as Element } from "./cheerio-compat-Ck7utR5z.mjs";
3
3
  import { _ as workerPoolInfo, a as flattenOptions, c as loadAsync, d as fromURL, f as loadBuffer, g as configureWorkers, i as extractAll, l as merge, n as createAPI, p as stringStream, r as dom, s as loadAll, u as decodeStream } from "./modern-CJvSD_y5.mjs";
4
4
  export declare const version: string;
5
5
  export {type AnyNode, type Cheerio, type CheerioAPI, type CheerioConstructor, type CheerioInstance, type Document, type Element, type LegacyNode, type LegacyOptions, moduleCheerio as cheerio, moduleCheerio as default, configureWorkers, staticContains as contains, createAPI, decodeStream, dom, evaluate, extractAll, flattenOptions, fromURL, staticHtml as html, load, loadAll, loadAsync, loadBuffer, merge, nativeStatus, parse, staticParseHTML as parseHTML, staticRoot as root, stringStream, staticText as text, update, workerPoolInfo, staticXml as xml};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dvaji/cheerox",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Cheerio 0.22.0-compatible HTML/XML processing on a Rust engine, with parallel, non-blocking extraction",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -23,6 +23,16 @@ export interface CheerioInstance {
23
23
  prevObject?: CheerioInstance;
24
24
  [index: number]: LegacyNode;
25
25
  [Symbol.iterator](): Iterator<LegacyNode>;
26
+ /**
27
+ * Iteration callbacks are declared so consumers with noImplicitAny keep
28
+ * contextual parameter types, as with cheerio 1.x. The rest of the 0.22
29
+ * dynamic surface (plugins, ad-hoc fields) stays available through the
30
+ * index signature below.
31
+ */
32
+ each(callback: (index: number, element: LegacyNode) => void | boolean): CheerioInstance;
33
+ map(callback: (index: number, element: LegacyNode) => unknown): CheerioInstance;
34
+ filter(selector: string): CheerioInstance;
35
+ filter(callback: (index: number, element: LegacyNode) => boolean): CheerioInstance;
26
36
  [key: string]: any;
27
37
  }
28
38