Skip to content

Commit 0f1d0e3

Browse files
committed
fix: vite-plugin-dts issues and apps/docs
Fixed apps/docs not able to build without it's peer imports. Upgraded @vuepress/plugin*'s. Some vite-plugin-dts issues were caused from https://github.com/qmhc/vite-plugin-dts#take-type-error-when-using-both-script-and-setup-script-in-vue-component , The components that don't contain that fix, are somehow fixed with converting to pure TS interfaces. I don't know why it worked, but it did.
1 parent 78b128a commit 0f1d0e3

File tree

17 files changed

+126
-77
lines changed

17 files changed

+126
-77
lines changed

apps/docs/package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@
88
"deploy": "./scripts/deploy.sh"
99
},
1010
"devDependencies": {
11+
"@vuepress/client": "2.0.0-beta.45",
12+
"@vuepress/plugin-register-components": "2.0.0-beta.49",
13+
"@vuepress/plugin-search": "2.0.0-beta.49",
1114
"bootstrap": "5.x.x",
12-
"tsconfig": "workspace:*",
13-
"@vuepress/plugin-search": "^2.0.0-beta.48",
14-
"@vuepress/plugin-register-components": "^2.0.0-beta.48",
1515
"bootstrap-vue-3": "workspace:*",
16+
"tsconfig": "workspace:*",
17+
"vue": "^3.2.37",
1618
"vuepress": "^2.0.0-beta.48"
1719
}
1820
}

apps/playground/src/App.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,11 @@
365365
<!-- Form -->
366366
<div class="my-2">
367367
<h2>Form</h2>
368-
<b-form @submit.stop.prevent>
368+
<!-- TODO doing @submit.stop.prevent alone is not allowed -->
369+
<!-- This is an issue for people that want to stop propogation -->
370+
<!-- A workaround is to do () => {} -->
371+
<!-- But that's not a great solution -->
372+
<b-form @submit.stop.prevent="() => {}">
369373
<label for="text-password">Password</label>
370374
<b-form-input
371375
id="text-password"

packages/bootstrap-vue-3/src/components/BAvatar/BAvatar.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
</template>
2626

2727
<script setup lang="ts">
28-
// import type { BAvatarProps, BAvatarEmits } from '../types/components'
28+
// import type { BAvatarProps, BAvatarEmits, InputSize } from '../types/components'
2929
import {isEmptySlot} from '../../utils/dom'
3030
import type {BAvatarGroupParentData} from '../../types/components'
3131
import {computed, inject, StyleValue, useSlots} from 'vue'
32-
import type {ColorVariant, InputSize} from '../../types'
32+
import type {ColorVariant} from '../../types'
3333
import {isNumber, isNumeric, isString} from '../../utils/inspect'
3434
import {toFloat} from '../../utils/number'
3535
import {injectionKey} from './BAvatarGroup.vue'
@@ -47,7 +47,8 @@ interface BAvatarProps {
4747
disabled?: boolean
4848
icon?: string
4949
rounded?: boolean | string
50-
size?: InputSize | string | number
50+
size?: 'sm' | 'md' | 'lg' | string
51+
// size?: InputSize | string
5152
square?: boolean
5253
src?: string
5354
text?: string

packages/bootstrap-vue-3/src/components/BAvatar/BAvatarGroup.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
</template>
88

99
<script setup lang="ts">
10-
// import type { BAvatarGroupParentData, BAvatarGroupProps } from '../types/components'
10+
// import type { BAvatarGroupParentData, BAvatarGroupProps, InputSize } from '../types/components'
1111
import type {BAvatarGroupParentData} from '../../types/components'
1212
import {computed, InjectionKey, provide, StyleValue} from 'vue'
13-
import type {ColorVariant, InputSize} from '../../types'
13+
import type {ColorVariant} from '../../types'
1414
import {mathMax, mathMin} from '../../utils/math'
1515
import {toFloat} from '../../utils/number'
1616
import {computeSize} from './BAvatar.vue'
@@ -19,7 +19,8 @@ import {isNumeric, isString} from '../../utils/inspect'
1919
interface BAvatarGroupProps {
2020
overlap?: number | string
2121
rounded?: boolean | string
22-
size?: InputSize | string
22+
size?: 'sm' | 'md' | 'lg' | string
23+
// size?: InputSize | string
2324
square?: boolean
2425
tag?: string
2526
variant?: ColorVariant

packages/bootstrap-vue-3/src/components/BDropdown/BDropdownGroup.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
<script setup lang="ts">
2727
// import type {BDropdownGroupProps} from '../../types/components'
2828
import type {ColorVariant} from '../../types'
29+
import {computed} from 'vue'
2930
3031
interface BDropdownGroupProps {
3132
id?: string
@@ -56,8 +57,7 @@ const classes = computed(() => ({
5657
</script>
5758

5859
<script lang="ts">
59-
import {computed, defineComponent} from 'vue'
60-
export default defineComponent({
60+
export default {
6161
inheritAttrs: false,
62-
})
62+
}
6363
</script>

packages/bootstrap-vue-3/src/components/BDropdown/BDropdownItem.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
<script setup lang="ts">
1616
// import type {BDropdownItemButtonEmits, BDropdownItemProps} from '../../types/components'
17+
import {computed, useAttrs} from 'vue'
1718
import type {ColorVariant, LinkTarget} from '../../types'
1819
1920
interface BDropdownItemProps {
@@ -65,8 +66,7 @@ const clicked = (e: MouseEvent): void => emit('click', e)
6566
</script>
6667

6768
<script lang="ts">
68-
import {computed, defineComponent, useAttrs} from 'vue'
69-
export default defineComponent({
69+
export default {
7070
inheritAttrs: false,
71-
})
71+
}
7272
</script>

packages/bootstrap-vue-3/src/components/BDropdown/BDropdownItemButton.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<script setup lang="ts">
1010
// import type {BDropdownItemButtonEmits, BDropdownItemButtonProps} from '../../types/components'
1111
import type {ButtonType, ColorVariant} from '../../types'
12+
import {computed} from 'vue'
1213
1314
interface BDropdownItemButtonProps {
1415
buttonClass?: string | Array<unknown> | Record<string, unknown>
@@ -47,8 +48,7 @@ const clicked = (e: MouseEvent): void => emit('click', e)
4748
</script>
4849

4950
<script lang="ts">
50-
import {computed, defineComponent} from 'vue'
51-
export default defineComponent({
51+
export default {
5252
inheritAttrs: false,
53-
})
53+
}
5454
</script>

packages/bootstrap-vue-3/src/components/BFormCheckbox/BFormCheckbox.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
<script setup lang="ts">
3333
// import type {BFormCheckboxEmits, BFormCheckboxProps} from '../../types/components'
34+
import {computed, onMounted, ref} from 'vue'
3435
import {getClasses, getInputClasses, getLabelClasses, useId} from '../../composables'
3536
import type {ButtonVariant, InputSize} from '../../types'
3637
@@ -145,8 +146,7 @@ onMounted((): void => {
145146
</script>
146147

147148
<script lang="ts">
148-
import {computed, defineComponent, onMounted, ref} from 'vue'
149-
export default defineComponent({
149+
export default {
150150
inheritAttrs: false,
151-
})
151+
}
152152
</script>

packages/bootstrap-vue-3/src/components/BFormRadio/BFormRadio.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ interface BFormRadioProps {
5050
buttonVariant?: ButtonVariant
5151
inline?: boolean
5252
required?: boolean
53-
state?: boolean | null
53+
state?: boolean
5454
value?: string | boolean | Record<string, unknown> | number
5555
}
5656

packages/bootstrap-vue-3/src/components/BListGroup/BListGroup.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
<script setup lang="ts">
88
// import type {BListGroupProps} from '../../types/components'
99
import {computed, InjectionKey, provide} from 'vue'
10-
import type {Breakpoint} from '../../types'
10+
// import type {Breakpoint} from '../../types'
1111
1212
interface BListGroupProps {
1313
flush?: boolean
14-
horizontal?: boolean | Breakpoint
14+
horizontal?: boolean | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'
1515
numbered?: boolean
1616
tag?: string
1717
}

0 commit comments

Comments
 (0)