index.d.ts 710 B

12345678910111213141516171819
  1. type ScrollLogicalPosition = 'start' | 'center' | 'end' | 'nearest';
  2. type ScrollMode = 'always' | 'if-needed';
  3. type SkipOverflowHiddenElements = boolean;
  4. interface Options {
  5. block?: ScrollLogicalPosition;
  6. inline?: ScrollLogicalPosition;
  7. scrollMode?: ScrollMode;
  8. boundary?: CustomScrollBoundary;
  9. skipOverflowHiddenElements?: SkipOverflowHiddenElements;
  10. }
  11. type CustomScrollBoundaryCallback = (parent: Element) => boolean;
  12. type CustomScrollBoundary = Element | CustomScrollBoundaryCallback | null;
  13. interface CustomScrollAction {
  14. el: Element;
  15. top: number;
  16. left: number;
  17. }
  18. declare const _default: (target: Element, options: Options) => CustomScrollAction[];
  19. export default _default;