Skip to content

Commit 0239f0f

Browse files
authored
refactor: migrate shared components to ui package (#168)
1 parent c70b8e5 commit 0239f0f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+151
-84
lines changed

alias.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export const alias = {
2323
'@vitejs/devtools-ui/unocss': r('ui/src/unocss/index.ts'),
2424
'@vitejs/devtools-ui/components': r('ui/src/components'),
2525
'@vitejs/devtools-ui/composables': r('ui/src/composables'),
26+
'@vitejs/devtools-ui/utils': r('ui/src/utils'),
2627
}
2728

2829
// update tsconfig.base.json

packages/ui/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,18 @@
3535
"./composables/*": {
3636
"types": "./src/composables/*.ts",
3737
"import": "./src/composables/*.ts"
38+
},
39+
"./utils/*": {
40+
"types": "./src/utils/*.ts",
41+
"import": "./src/utils/*.ts"
3842
}
3943
},
4044
"main": "./src/index.ts",
4145
"module": "./src/index.ts",
4246
"peerDependencies": {
4347
"@vueuse/core": "*",
4448
"unocss": "*",
45-
"vue": "*"
49+
"vue": "*",
50+
"vue-virtual-scroller": ">=2.0.0-beta.0"
4651
}
4752
}
File renamed without changes.

packages/vite/src/app/components/display/Badge.vue renamed to packages/ui/src/components/DisplayBadge.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { computed } from 'vue'
33
import {
44
getHashColorFromString,
55
getHsla,
6-
} from '~/utils/color'
6+
} from '../utils/color'
77
88
const props = withDefaults(
99
defineProps<{
File renamed without changes.

packages/vite/src/app/components/display/Duration.vue renamed to packages/ui/src/components/DisplayDuration.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script setup lang="ts">
22
import { computed } from 'vue'
3-
import { formatDuration } from '~/utils/format'
3+
import { formatDuration } from '../utils/format'
4+
import DisplayNumberWithUnit from './DisplayNumberWithUnit.vue'
45
56
const props = withDefaults(
67
defineProps<{
File renamed without changes.
File renamed without changes.

packages/vite/src/app/components/display/NumberWithUnit.vue renamed to packages/ui/src/components/DisplayNumberWithUnit.vue

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)