Skip to content

Commit fbfa6d7

Browse files
committed
fix: change windowSize from visual to inner;
docs: fix snapToPoint description, canOverlayClose to canBackdropClose; chore: bump version and improve release script;
1 parent a3f19a6 commit fbfa6d7

File tree

4 files changed

+12
-14
lines changed

4 files changed

+12
-14
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,18 +120,18 @@ For Nuxt 3, just wrap component in `<ClientOnly>`
120120
| initialSnapPoint | Number | minHeight | Initial snap point index |
121121
| blocking | Boolean | true | Block interactions with underlying content |
122122
| canSwipeClose | Boolean | true | Enable swipe-to-close gesture |
123-
| canOverlayClose | Boolean | true | Allow closing by tapping backdrop |
123+
| canBackdropClose | Boolean | true | Allow closing by tapping backdrop |
124124
| expandOnContentDrag | Boolean | true | Enable expanding by dragging content |
125125

126126
## Exposed methods
127127

128128
Assuming there is `const bottomSheet = ref()`
129129

130-
| Method | Description | Example |
131-
| ----------- | ------------------------- | ------------------------------------ |
132-
| open | Opens the bottom sheet | `bottomSheet.value.open()` |
133-
| close | Closes the bottom sheet | `bottomSheet.value.close()` |
134-
| snapToPoint | Snaps to a specific point | `bottomSheet.value.snapToPoint(300)` |
130+
| Method | Description | Example |
131+
| ----------- | ------------------------------- | ---------------------------------- |
132+
| open | Opens the bottom sheet | `bottomSheet.value.open()` |
133+
| close | Closes the bottom sheet | `bottomSheet.value.close()` |
134+
| snapToPoint | Snaps to an index of snapPoints | `bottomSheet.value.snapToPoint(1)` |
135135

136136
## Events
137137

bun.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
},
2424
"packages/vue-spring-bottom-sheet": {
2525
"name": "@douxcode/vue-spring-bottom-sheet",
26-
"version": "1.2.6",
26+
"version": "2.0.1",
2727
"dependencies": {
2828
"@vueuse/core": "^13.0.0",
2929
"@vueuse/integrations": "^13.0.0",
3030
"focus-trap": "^7.6.4",
31-
"motion-v": "0.13.1",
31+
"motion-v": "^0.13.1",
3232
"remeda": "^2.21.2",
3333
"vue": "^3.5.13",
3434
},

packages/vue-spring-bottom-sheet/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"url": "https://github.com/megaarmos/vue-spring-bottom-sheet/issues"
3333
},
3434
"private": false,
35-
"version": "2.0.1",
35+
"version": "2.0.2",
3636
"type": "module",
3737
"exports": {
3838
".": {
@@ -52,7 +52,7 @@
5252
"type-check": "vue-tsc --build",
5353
"lint": "eslint . --fix",
5454
"format": "prettier --write src/",
55-
"release": "copy ../../README.md . && npm run build && npm publish --access public"
55+
"release": "cp ../../README.md . && npm run build && npm publish --access public"
5656
},
5757
"peerDependencies": {
5858
"vue": ">=3.3"
@@ -61,7 +61,7 @@
6161
"@vueuse/core": "^13.0.0",
6262
"@vueuse/integrations": "^13.0.0",
6363
"focus-trap": "^7.6.4",
64-
"motion-v": "0.13.1",
64+
"motion-v": "^0.13.1",
6565
"remeda": "^2.21.2",
6666
"vue": "^3.5.13"
6767
},

packages/vue-spring-bottom-sheet/src/BottomSheet.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ const sheetContent = ref<HTMLElement | null>(null)
4040
const backdrop = ref<HTMLElement | null>(null)
4141
const preventContentScroll = ref(props.expandOnContentDrag)
4242
43-
const { height: windowHeight } = useWindowSize({
44-
type: 'visual',
45-
})
43+
const { height: windowHeight } = useWindowSize()
4644
const { height: sheetHeight } = useElementBounding(sheet)
4745
const { height: sheetHeaderHeight } = useElementBounding(sheetHeader)
4846
const { height: sheetContentHeight } = useElementBounding(sheetContent)

0 commit comments

Comments
 (0)