HTMLDomStrings.d.ts 1.1 KB

1234567891011121314151617181920212223242526
  1. import { OptionList } from '../../util/Options.js';
  2. import { DOMAdaptor } from '../../core/DOMAdaptor.js';
  3. export declare type HTMLNodeList<N, T> = [N | T, number][];
  4. export declare class HTMLDomStrings<N, T, D> {
  5. static OPTIONS: OptionList;
  6. protected options: OptionList;
  7. protected strings: string[];
  8. protected string: string;
  9. protected snodes: HTMLNodeList<N, T>;
  10. protected nodes: HTMLNodeList<N, T>[];
  11. protected stack: [N | T, boolean][];
  12. protected skipHtmlTags: RegExp;
  13. protected ignoreHtmlClass: RegExp;
  14. protected processHtmlClass: RegExp;
  15. adaptor: DOMAdaptor<N, T, D>;
  16. constructor(options?: OptionList);
  17. protected init(): void;
  18. protected getPatterns(): void;
  19. protected pushString(): void;
  20. protected extendString(node: N | T, text: string): void;
  21. protected handleText(node: T, ignore: boolean): N | T;
  22. protected handleTag(node: N, ignore: boolean): N | T;
  23. protected handleContainer(node: N, ignore: boolean): [N | T, boolean];
  24. protected handleOther(node: N, _ignore: boolean): N | T;
  25. find(node: N | T): [string[], HTMLNodeList<N, T>[]];
  26. }