Skip to content

Commit

Permalink
chore: cosmetic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
orefalo committed Jun 19, 2024
1 parent 7dd9945 commit 8d710c3
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 31 deletions.
6 changes: 0 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@

## [1.0.3](https://github.com/orefalo/svelte-virtuallists/compare/v1.0.2...v1.0.3) (2024-06-18)


### Bug Fixes

* unrecognized token ([da522d2](https://github.com/orefalo/svelte-virtuallists/commit/da522d22dfe395a2c65a1fa4230bf55e7685917d))


### Miscellaneous Chores

* release 1.0.3 ([618b650](https://github.com/orefalo/svelte-virtuallists/commit/618b6506e811947378c5d84a61e91565844be4d6))
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"@commitlint/config-conventional": "^19.2.2",
"@playwright/test": "^1.44.1",
"@sveltejs/adapter-static": "^3.0.2",
"@sveltejs/kit": "^2.5.16",
"@sveltejs/kit": "^2.5.17",
"@sveltejs/package": "2.3.0",
"@sveltejs/vite-plugin-svelte": "^4.0.0-next.3",
"@types/eslint": "^8.56.10",
Expand Down
46 changes: 22 additions & 24 deletions src/lib/VirtualList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -52,29 +52,6 @@
[DIRECTION.HORIZONTAL]: 'scrollLeft'
};
interface Props {
height: number | string;
width: number | string;
itemCount: number;
itemSize: VirtualRowSize;
estimatedItemSize?: number;
getKey?: (i: number) => string;
// positioning
scrollToIndex?: number | undefined;
scrollOffset?: number | undefined;
windowOverPadding?: number;
scrollDirection?: DIRECTION;
scrollToAlignment?: ALIGNMENT;
scrollToBehaviour?: SCROLL_BEHAVIOR;
// snippets
header?: Snippet;
row: Snippet<[RowAttributes]>;
footer?: Snippet;
// events
onVisibleRangeUpdate?: (range: VirtualRangeEvent) => void;
onAfterScroll?: (event: AfterScrollEvent) => void;
}
const {
height,
width = '100%',
Expand All @@ -99,7 +76,28 @@
// events
onVisibleRangeUpdate,
onAfterScroll
}: Props = $props();
}: {
height: number | string;
width: number | string;
itemCount: number;
itemSize: VirtualRowSize;
estimatedItemSize?: number;
getKey?: (i: number) => string;
// positioning
scrollToIndex?: number | undefined;
scrollOffset?: number | undefined;
windowOverPadding?: number;
scrollDirection?: DIRECTION;
scrollToAlignment?: ALIGNMENT;
scrollToBehaviour?: SCROLL_BEHAVIOR;
// snippets
header?: Snippet;
row: Snippet<[RowAttributes]>;
footer?: Snippet;
// events
onVisibleRangeUpdate?: (range: VirtualRangeEvent) => void;
onAfterScroll?: (event: AfterScrollEvent) => void;
} = $props();
const sizeAndPositionManager = new SizeAndPositionManager(itemSize, itemCount, getEstimatedItemSize());
Expand Down

0 comments on commit 8d710c3

Please sign in to comment.