Skip to content

Commit 46b4fc0

Browse files
authored
chore: updates splitpanes (#3689)
1 parent 4878144 commit 46b4fc0

File tree

4 files changed

+72
-70
lines changed

4 files changed

+72
-70
lines changed

assets/auto-imports.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ declare global {
3131
const createInjectionState: typeof import('@vueuse/core')['createInjectionState']
3232
const createPinia: typeof import('pinia')['createPinia']
3333
const createReactiveFn: typeof import('@vueuse/core')['createReactiveFn']
34+
const createRef: typeof import('@vueuse/core')['createRef']
3435
const createReusableTemplate: typeof import('@vueuse/core')['createReusableTemplate']
3536
const createSharedComposable: typeof import('@vueuse/core')['createSharedComposable']
3637
const createTemplatePromise: typeof import('@vueuse/core')['createTemplatePromise']
@@ -421,6 +422,7 @@ declare module 'vue' {
421422
readonly createInjectionState: UnwrapRef<typeof import('@vueuse/core')['createInjectionState']>
422423
readonly createPinia: UnwrapRef<typeof import('pinia')['createPinia']>
423424
readonly createReactiveFn: UnwrapRef<typeof import('@vueuse/core')['createReactiveFn']>
425+
readonly createRef: UnwrapRef<typeof import('@vueuse/core')['createRef']>
424426
readonly createReusableTemplate: UnwrapRef<typeof import('@vueuse/core')['createReusableTemplate']>
425427
readonly createSharedComposable: UnwrapRef<typeof import('@vueuse/core')['createSharedComposable']>
426428
readonly createTemplatePromise: UnwrapRef<typeof import('@vueuse/core')['createTemplatePromise']>

assets/layouts/default.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<Pane min-size="10" :size="menuWidth" v-if="!isMobile && !collapseNav && !forceMenuHidden">
66
<SidePanel @search="showFuzzySearch" />
77
</Pane>
8-
<Pane min-size="10">
8+
<Pane min-size="10" :size="100 - menuWidth">
99
<Splitpanes>
1010
<Pane class="router-view min-h-screen">
1111
<router-view></router-view>
@@ -91,9 +91,9 @@ function showFuzzySearch() {
9191
open.value = true;
9292
}
9393
94-
function onResized(e: any) {
95-
if (e.length == 2) {
96-
menuWidth.value = e[0].size;
94+
function onResized({ panes }: { panes: { size: number }[] }) {
95+
if (panes) {
96+
menuWidth.value = panes[0].size;
9797
}
9898
}
9999
</script>
@@ -102,7 +102,7 @@ function onResized(e: any) {
102102
@import "@/main.css" reference;
103103
104104
:deep(.splitpanes--vertical > .splitpanes__splitter) {
105-
@apply bg-base-100 hover:bg-secondary min-w-[3px];
105+
@apply bg-base-100 hover:bg-secondary min-w-[5px];
106106
}
107107
108108
@media screen and (max-width: 768px) {

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"lodash.debounce": "^4.0.8",
6161
"pinia": "^3.0.1",
6262
"sortablejs": "^1.15.6",
63-
"splitpanes": "^3.1.8",
63+
"splitpanes": "^4.0.2",
6464
"strip-ansi": "^7.1.0",
6565
"tailwindcss": "4.0.12",
6666
"unplugin-auto-import": "^19.1.1",
@@ -88,7 +88,7 @@
8888
"@types/d3-shape": "^3.1.7",
8989
"@types/d3-transition": "^3.0.9",
9090
"@types/lodash.debounce": "^4.0.9",
91-
"@types/node": "^22.13.9",
91+
"@types/node": "^22.13.10",
9292
"@vitejs/plugin-vue": "5.2.1",
9393
"@vue/compiler-sfc": "^3.5.13",
9494
"@vue/test-utils": "^2.4.6",

0 commit comments

Comments
 (0)