Skip to content

Commit fcf432a

Browse files
authored
Merge pull request #7 from N1cE-me/master
Fix vue-tsc errors on production build
2 parents 2532c48 + 49954ee commit fcf432a

File tree

8 files changed

+22
-20
lines changed

8 files changed

+22
-20
lines changed

β€Žplayground/vue/src/pages/blocking.vueβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<script lang="ts" setup>
22
import { ref, version } from 'vue'
33
4-
import BottomSheet from 'vue-spring-bottom-sheet'
5-
import 'vue-spring-bottom-sheet/dist/style.css'
4+
import BottomSheet from '@douxcode/vue-spring-bottom-sheet'
5+
import '@douxcode/vue-spring-bottom-sheet/dist/style.css'
66
77
const bottomSheet = ref<InstanceType<typeof BottomSheet>>()
88
const open = ref(false)

β€Žplayground/vue/src/pages/index.vueβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<script lang="ts" setup>
22
import { ref, version } from 'vue'
33
4-
import BottomSheet from 'vue-spring-bottom-sheet'
5-
import 'vue-spring-bottom-sheet/dist/style.css'
4+
import BottomSheet from '@douxcode/vue-spring-bottom-sheet'
5+
import '@douxcode/vue-spring-bottom-sheet/dist/style.css'
66
77
const bottomSheet = ref<InstanceType<typeof BottomSheet>>()
88

β€Žplayground/vue/src/pages/snap.vueβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<script lang="ts" setup>
22
import { ref, version } from 'vue'
33
4-
import BottomSheet from 'vue-spring-bottom-sheet'
5-
import 'vue-spring-bottom-sheet/dist/style.css'
4+
import BottomSheet from '@douxcode/vue-spring-bottom-sheet'
5+
import '@douxcode/vue-spring-bottom-sheet/dist/style.css'
66
77
const bottomSheet = ref<InstanceType<typeof BottomSheet>>()
88
const maxHeight = ref(0)

β€Žplayground/vue/src/pages/sticky.vueβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<script lang="ts" setup>
22
import { ref, version } from 'vue'
33
4-
import BottomSheet from 'vue-spring-bottom-sheet'
5-
import 'vue-spring-bottom-sheet/dist/style.css'
4+
import BottomSheet from '@douxcode/vue-spring-bottom-sheet'
5+
import '@douxcode/vue-spring-bottom-sheet/dist/style.css'
66
77
const bottomSheet = ref<InstanceType<typeof BottomSheet>>()
88

β€Žsrc/BottomSheet.vueβ€Ž

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<script lang="ts" setup>
2+
import type { BottomSheetProps } from './types.ts'
3+
24
import { computed, nextTick, onMounted, ref, toRefs, watch } from 'vue'
35
46
import { clamp, funnel } from 'remeda'
@@ -9,17 +11,7 @@ import { useFocusTrap } from '@vueuse/integrations/useFocusTrap'
911
1012
import { useSnapPoints } from './composables/useSnapPoints.ts'
1113
12-
interface IProps {
13-
duration?: number
14-
snapPoints?: number[]
15-
defaultSnapPoint?: number
16-
blocking?: boolean
17-
canSwipeClose?: boolean
18-
canBackdropClose?: boolean
19-
expandOnContentDrag?: boolean
20-
}
21-
22-
const props = withDefaults(defineProps<IProps>(), {
14+
const props = withDefaults(defineProps<BottomSheetProps>(), {
2315
blocking: true,
2416
canSwipeClose: true,
2517
canBackdropClose: true,

β€Žsrc/index.tsβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
import BottomSheet from './BottomSheet.vue'
2+
export * from './types.ts'
23

34
export default BottomSheet

β€Žsrc/types.tsβ€Ž

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export interface BottomSheetProps {
2+
duration?: number
3+
snapPoints?: number[]
4+
defaultSnapPoint?: number
5+
blocking?: boolean
6+
canSwipeClose?: boolean
7+
canBackdropClose?: boolean
8+
expandOnContentDrag?: boolean
9+
}

β€Žtsconfig.app.tsbuildinfoβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"root":["./src/index.ts","./src/vite-env.d.ts","./src/composables/usesnappoints.ts","./src/bottomsheet.vue"],"version":"5.6.3"}
1+
{"root":["./src/index.ts","./src/types.ts","./src/vite-env.d.ts","./src/composables/usesnappoints.ts","./src/bottomsheet.vue"],"version":"5.6.3"}

0 commit comments

Comments
Β (0)