registry.d.ts 984 B

12345678910111213141516171819202122232425262728293031
  1. import Attributor from './attributor/attributor';
  2. import { Blot } from './blot/abstract/blot';
  3. export interface BlotConstructor {
  4. blotName: string;
  5. new (node: Node, value?: any): Blot;
  6. create(value?: any): Node;
  7. }
  8. export declare class ParchmentError extends Error {
  9. message: string;
  10. name: string;
  11. stack: string;
  12. constructor(message: string);
  13. }
  14. export declare const DATA_KEY = "__blot";
  15. export declare enum Scope {
  16. TYPE = 3,
  17. LEVEL = 12,
  18. ATTRIBUTE = 13,
  19. BLOT = 14,
  20. INLINE = 7,
  21. BLOCK = 11,
  22. BLOCK_BLOT = 10,
  23. INLINE_BLOT = 6,
  24. BLOCK_ATTRIBUTE = 9,
  25. INLINE_ATTRIBUTE = 5,
  26. ANY = 15,
  27. }
  28. export declare function create(input: Node | string | Scope, value?: any): Blot;
  29. export declare function find(node: Node | null, bubble?: boolean): Blot | null;
  30. export declare function query(query: string | Node | Scope, scope?: Scope): Attributor | BlotConstructor | null;
  31. export declare function register(...Definitions: any[]): any;