Skip to content

Commit 44ec346

Browse files
committed
Rebuild
1 parent b04222a commit 44ec346

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

pkg/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
Interact with [CSS scroll-snap](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Scroll_Snap).
44

5+
Zero dependencies.
6+
7+
Automatically accounts for `scroll-padding`.
8+
59
## Install
610

711
```shell
@@ -10,7 +14,7 @@ yarn add scroll-snap-api
1014
npm install --save scroll-snap-api
1115
```
1216

13-
Or import directly
17+
Or use directly
1418

1519
```js
1620
import * as scrollSnapApi from 'https://cdn.pika.dev/scroll-snap-api';

pkg/dist-types/index.d.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
export declare type Axis = 'x' | 'y';
22
export declare type ScrollDirection = 'left' | 'right' | 'up' | 'down';
3-
export declare type ScrollSnapAlignment = 'start' | 'end' | 'center';
4-
export declare type ScrollSnapAlignValue = 'none' | ScrollSnapAlignment;
5-
export declare type SnapPositionList = Record<ScrollSnapAlignment, number[]>;
3+
export declare type ScrollSnapAlignment = 'start' | 'end' | 'center' | 'none';
4+
export declare type SnapPositionList = Record<Exclude<ScrollSnapAlignment, 'none'>, number[]>;
65
export declare function scrollSnapToNext(element: HTMLElement, direction: ScrollDirection, scrollToOptions?: ScrollToOptions): void;
76
export declare function getScrollPadding(element: HTMLElement): Record<Axis, {
87
before: number;

0 commit comments

Comments
 (0)