0bfaf47797ba374571b6e161400be7fc47a2f57aa034a1539a4bf4159dbc159a52d4bbcb0108c53e80730eb4b1c9671e7eb28a9dcd51da561173ed143bdc7e 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. export declare type Selector = PseudoSelector | PseudoElement | AttributeSelector | TagSelector | UniversalSelector | Traversal;
  2. export declare enum SelectorType {
  3. Attribute = "attribute",
  4. Pseudo = "pseudo",
  5. PseudoElement = "pseudo-element",
  6. Tag = "tag",
  7. Universal = "universal",
  8. Adjacent = "adjacent",
  9. Child = "child",
  10. Descendant = "descendant",
  11. Parent = "parent",
  12. Sibling = "sibling",
  13. ColumnCombinator = "column-combinator"
  14. }
  15. /**
  16. * Modes for ignore case.
  17. *
  18. * This could be updated to an enum, and the object is
  19. * the current stand-in that will allow code to be updated
  20. * without big changes.
  21. */
  22. export declare const IgnoreCaseMode: {
  23. readonly Unknown: null;
  24. readonly QuirksMode: "quirks";
  25. readonly IgnoreCase: true;
  26. readonly CaseSensitive: false;
  27. };
  28. export interface AttributeSelector {
  29. type: SelectorType.Attribute;
  30. name: string;
  31. action: AttributeAction;
  32. value: string;
  33. ignoreCase: "quirks" | boolean | null;
  34. namespace: string | null;
  35. }
  36. export declare type DataType = Selector[][] | null | string;
  37. export interface PseudoSelector {
  38. type: SelectorType.Pseudo;
  39. name: string;
  40. data: DataType;
  41. }
  42. export interface PseudoElement {
  43. type: SelectorType.PseudoElement;
  44. name: string;
  45. data: string | null;
  46. }
  47. export interface TagSelector {
  48. type: SelectorType.Tag;
  49. name: string;
  50. namespace: string | null;
  51. }
  52. export interface UniversalSelector {
  53. type: SelectorType.Universal;
  54. namespace: string | null;
  55. }
  56. export interface Traversal {
  57. type: TraversalType;
  58. }
  59. export declare enum AttributeAction {
  60. Any = "any",
  61. Element = "element",
  62. End = "end",
  63. Equals = "equals",
  64. Exists = "exists",
  65. Hyphen = "hyphen",
  66. Not = "not",
  67. Start = "start"
  68. }
  69. export declare type TraversalType = SelectorType.Adjacent | SelectorType.Child | SelectorType.Descendant | SelectorType.Parent | SelectorType.Sibling | SelectorType.ColumnCombinator;
  70. //# sourceMappingURL=types.d.ts.map