rusteerio 1.0.0 → 1.1.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.
Files changed (65) hide show
  1. package/Cargo.lock +42 -1
  2. package/Cargo.toml +8 -1
  3. package/README.md +90 -51
  4. package/THIRD_PARTY_NOTICES.md +138 -2
  5. package/dist/{chunk-DMRD3FGC.mjs → chunk-FPRP6UIX.mjs} +2233 -751
  6. package/dist/chunk-FPRP6UIX.mjs.map +1 -0
  7. package/dist/index.cjs +2232 -750
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.d.mts +2 -2
  10. package/dist/index.d.ts +2 -2
  11. package/dist/index.mjs +1 -1
  12. package/dist/slim.cjs +2226 -745
  13. package/dist/slim.cjs.map +1 -1
  14. package/dist/slim.d.mts +2 -2
  15. package/dist/slim.d.ts +2 -2
  16. package/dist/slim.mjs +1 -1
  17. package/dist/{types-BP6TpxE5.d.mts → types-Cs9UP1Vv.d.mts} +3 -3
  18. package/dist/{types-BP6TpxE5.d.ts → types-Cs9UP1Vv.d.ts} +3 -3
  19. package/dist/utils.d.mts +1 -1
  20. package/dist/utils.d.ts +1 -1
  21. package/native/src/arena.rs +231 -602
  22. package/native/src/attributes.rs +11 -5
  23. package/native/src/codec.rs +62 -18
  24. package/native/src/document_order.rs +711 -0
  25. package/native/src/extraction.rs +15 -3
  26. package/native/src/gc.rs +12 -3
  27. package/native/src/hook_sink.rs +77 -3
  28. package/native/src/id_hash.rs +42 -0
  29. package/native/src/immutable.rs +256 -0
  30. package/native/src/lib.rs +1097 -172
  31. package/native/src/markup_tokenizer.rs +668 -0
  32. package/native/src/runtime.rs +189 -33
  33. package/native/src/selector.rs +346 -44
  34. package/native/src/sink.rs +14 -1
  35. package/native/src/snapshot.rs +509 -0
  36. package/native/src/stream.rs +2 -2
  37. package/native/src/tokenizer.rs +377 -204
  38. package/native/vendor/README.md +3 -2
  39. package/native/vendor/html5ever-0.35.0/src/tokenizer/char_ref/mod.rs +79 -0
  40. package/native/vendor/html5ever-0.35.0/src/tokenizer/mod.rs +23 -13
  41. package/package.json +3 -1
  42. package/rusteerio.darwin-arm64.node +0 -0
  43. package/rusteerio.darwin-x64.node +0 -0
  44. package/rusteerio.linux-arm64-gnu.node +0 -0
  45. package/rusteerio.linux-arm64-musl.node +0 -0
  46. package/rusteerio.linux-x64-gnu.node +0 -0
  47. package/rusteerio.linux-x64-musl.node +0 -0
  48. package/rusteerio.win32-arm64-msvc.node +0 -0
  49. package/rusteerio.win32-x64-msvc.node +0 -0
  50. package/scripts/generate-notices.mjs +11 -0
  51. package/scripts/notices/htmlparser2-MIT.txt +18 -0
  52. package/scripts/notices/sources.json +6 -0
  53. package/src/attributes.ts +78 -44
  54. package/src/codec.ts +22 -3
  55. package/src/extract.ts +86 -2
  56. package/src/hooks.ts +148 -2
  57. package/src/index.ts +51 -40
  58. package/src/match.ts +207 -0
  59. package/src/native.ts +9 -1
  60. package/src/nodes.ts +531 -183
  61. package/src/router.ts +792 -229
  62. package/src/selection.ts +239 -125
  63. package/src/snapshot.ts +255 -0
  64. package/src/transport.ts +51 -42
  65. package/dist/chunk-DMRD3FGC.mjs.map +0 -1
package/dist/slim.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { contains, dom, merge } from './index.mjs';
2
- import { L as LoadContent, C as CheerioOptions, a as CheerioAPI } from './types-BP6TpxE5.mjs';
3
- export { A as AcceptedElems, b as AcceptedFilters, c as AnyNode, B as BasicAcceptedElems, d as CDATA, type e as Cheerio, f as CheerioRequestOptions, g as ChildNode, h as Comment, D as DataNode, i as DecodeStreamOptions, j as Document, k as DocumentMode, E as Element, type l as ElementType, m as EncodingOptions, n as ExtractDescriptor, o as ExtractMap, p as ExtractedMap, q as ExtractedValue, r as ExtractionDescriptor, s as ExtractionMap, t as ExtractionResult, F as FilterFunction, u as FormDataLike, H as HTMLParser2Options, I as InternalOptions, N as NamespaceURI, v as Node, w as NodeWithChildren, P as ParallelOptions, x as ParentNode, y as ParserError, z as ParserErrorCode, G as ParserErrorHandler, J as ProcessingInstruction, S as SelectorType, K as SerializedField, M as SourceCodeLocation, T as TagSourceCodeLocation, O as Text, Q as Tokenizer, R as TokenizerCallbacks, U as TokenizerConstructor, V as TokenizerOptions, W as TreeAdapter, X as TreeAdapterAttribute } from './types-BP6TpxE5.mjs';
2
+ import { L as LoadContent, C as CheerioOptions, a as CheerioAPI } from './types-Cs9UP1Vv.mjs';
3
+ export { A as AcceptedElems, b as AcceptedFilters, c as AnyNode, B as BasicAcceptedElems, d as CDATA, type e as Cheerio, f as CheerioRequestOptions, g as ChildNode, h as Comment, D as DataNode, i as DecodeStreamOptions, j as Document, k as DocumentMode, E as Element, type l as ElementType, m as EncodingOptions, n as ExtractDescriptor, o as ExtractMap, p as ExtractedMap, q as ExtractedValue, r as ExtractionDescriptor, s as ExtractionMap, t as ExtractionResult, F as FilterFunction, u as FormDataLike, H as HTMLParser2Options, I as InternalOptions, N as NamespaceURI, v as Node, w as NodeWithChildren, P as ParallelOptions, x as ParentNode, y as ParserError, z as ParserErrorCode, G as ParserErrorHandler, J as ProcessingInstruction, S as SelectorType, K as SerializedField, M as SourceCodeLocation, T as TagSourceCodeLocation, O as Text, Q as Tokenizer, R as TokenizerCallbacks, U as TokenizerConstructor, V as TokenizerOptions, W as TreeAdapter, X as TreeAdapterAttribute } from './types-Cs9UP1Vv.mjs';
4
4
  import 'node:stream';
5
5
  import 'node:querystring';
6
6
  import 'node:buffer';
package/dist/slim.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { contains, dom, merge } from './index.js';
2
- import { L as LoadContent, C as CheerioOptions, a as CheerioAPI } from './types-BP6TpxE5.js';
3
- export { A as AcceptedElems, b as AcceptedFilters, c as AnyNode, B as BasicAcceptedElems, d as CDATA, type e as Cheerio, f as CheerioRequestOptions, g as ChildNode, h as Comment, D as DataNode, i as DecodeStreamOptions, j as Document, k as DocumentMode, E as Element, type l as ElementType, m as EncodingOptions, n as ExtractDescriptor, o as ExtractMap, p as ExtractedMap, q as ExtractedValue, r as ExtractionDescriptor, s as ExtractionMap, t as ExtractionResult, F as FilterFunction, u as FormDataLike, H as HTMLParser2Options, I as InternalOptions, N as NamespaceURI, v as Node, w as NodeWithChildren, P as ParallelOptions, x as ParentNode, y as ParserError, z as ParserErrorCode, G as ParserErrorHandler, J as ProcessingInstruction, S as SelectorType, K as SerializedField, M as SourceCodeLocation, T as TagSourceCodeLocation, O as Text, Q as Tokenizer, R as TokenizerCallbacks, U as TokenizerConstructor, V as TokenizerOptions, W as TreeAdapter, X as TreeAdapterAttribute } from './types-BP6TpxE5.js';
2
+ import { L as LoadContent, C as CheerioOptions, a as CheerioAPI } from './types-Cs9UP1Vv.js';
3
+ export { A as AcceptedElems, b as AcceptedFilters, c as AnyNode, B as BasicAcceptedElems, d as CDATA, type e as Cheerio, f as CheerioRequestOptions, g as ChildNode, h as Comment, D as DataNode, i as DecodeStreamOptions, j as Document, k as DocumentMode, E as Element, type l as ElementType, m as EncodingOptions, n as ExtractDescriptor, o as ExtractMap, p as ExtractedMap, q as ExtractedValue, r as ExtractionDescriptor, s as ExtractionMap, t as ExtractionResult, F as FilterFunction, u as FormDataLike, H as HTMLParser2Options, I as InternalOptions, N as NamespaceURI, v as Node, w as NodeWithChildren, P as ParallelOptions, x as ParentNode, y as ParserError, z as ParserErrorCode, G as ParserErrorHandler, J as ProcessingInstruction, S as SelectorType, K as SerializedField, M as SourceCodeLocation, T as TagSourceCodeLocation, O as Text, Q as Tokenizer, R as TokenizerCallbacks, U as TokenizerConstructor, V as TokenizerOptions, W as TreeAdapter, X as TreeAdapterAttribute } from './types-Cs9UP1Vv.js';
4
4
  import 'node:stream';
5
5
  import 'node:querystring';
6
6
  import 'node:buffer';
package/dist/slim.mjs CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  dom,
4
4
  load,
5
5
  merge
6
- } from "./chunk-DMRD3FGC.mjs";
6
+ } from "./chunk-FPRP6UIX.mjs";
7
7
  import "./chunk-OHPGEY3E.mjs";
8
8
 
9
9
  // src/slim.ts
@@ -69,14 +69,14 @@ interface AttributeMethods<T = AnyNode> {
69
69
  serialize<U extends AnyNode>(this: Cheerio<U>): string;
70
70
  }
71
71
 
72
- /** An array-like selection of stable handles into the Rust document arena. */
72
+ /** An array-like selection of native nodes. */
73
73
  declare class Cheerio<T = AnyNode> implements ArrayLike<T>, Iterable<T> {
74
74
  [index: number]: T;
75
+ length: number;
75
76
  options: CheerioOptions;
76
77
  _root: Cheerio<Document> | null;
77
78
  prevObject: Cheerio<any> | undefined;
78
- length: number;
79
- cheerio: "[cheerio object]";
79
+ cheerio: '[cheerio object]';
80
80
  constructor(api: CheerioAPI, document: NativeDocument, ids?: number[], root?: Cheerio<Document> | null, options?: CheerioOptions, values?: T[]);
81
81
  _make<R>(value: ArrayLike<R> | R | string, context?: BasicAcceptedElems<AnyNode>): Cheerio<R>;
82
82
  _parse(content: any, options: CheerioOptions, isDocument: boolean, context: ParentNode | null): Document;
@@ -69,14 +69,14 @@ interface AttributeMethods<T = AnyNode> {
69
69
  serialize<U extends AnyNode>(this: Cheerio<U>): string;
70
70
  }
71
71
 
72
- /** An array-like selection of stable handles into the Rust document arena. */
72
+ /** An array-like selection of native nodes. */
73
73
  declare class Cheerio<T = AnyNode> implements ArrayLike<T>, Iterable<T> {
74
74
  [index: number]: T;
75
+ length: number;
75
76
  options: CheerioOptions;
76
77
  _root: Cheerio<Document> | null;
77
78
  prevObject: Cheerio<any> | undefined;
78
- length: number;
79
- cheerio: "[cheerio object]";
79
+ cheerio: '[cheerio object]';
80
80
  constructor(api: CheerioAPI, document: NativeDocument, ids?: number[], root?: Cheerio<Document> | null, options?: CheerioOptions, values?: T[]);
81
81
  _make<R>(value: ArrayLike<R> | R | string, context?: BasicAcceptedElems<AnyNode>): Cheerio<R>;
82
82
  _parse(content: any, options: CheerioOptions, isDocument: boolean, context: ParentNode | null): Document;
package/dist/utils.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { e as Cheerio, c as AnyNode, E as Element } from './types-BP6TpxE5.mjs';
1
+ import { e as Cheerio, c as AnyNode, E as Element } from './types-Cs9UP1Vv.mjs';
2
2
  import 'node:querystring';
3
3
  import 'node:stream';
4
4
  import 'node:buffer';
package/dist/utils.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { e as Cheerio, c as AnyNode, E as Element } from './types-BP6TpxE5.js';
1
+ import { e as Cheerio, c as AnyNode, E as Element } from './types-Cs9UP1Vv.js';
2
2
  import 'node:querystring';
3
3
  import 'node:stream';
4
4
  import 'node:buffer';