From 6061acb56b99ceb20019717536a947425b6910ac Mon Sep 17 00:00:00 2001 From: Rijk van Zanten Date: Tue, 26 Aug 2025 17:25:43 -0400 Subject: [PATCH] Refactor logic into composables --- packages/vue-split-panel/src/SplitPanel.vue | 280 +++++------------- .../src/composables/use-grid-template.ts | 51 ++++ .../src/composables/use-keyboard.ts | 55 ++++ .../src/composables/use-pointer.ts | 81 +++++ .../src/composables/use-resize.ts | 35 +++ .../src/composables/use-sizes.ts | 95 ++++++ packages/vue-split-panel/src/types.ts | 13 +- 7 files changed, 392 insertions(+), 218 deletions(-) create mode 100644 packages/vue-split-panel/src/composables/use-grid-template.ts create mode 100644 packages/vue-split-panel/src/composables/use-keyboard.ts create mode 100644 packages/vue-split-panel/src/composables/use-pointer.ts create mode 100644 packages/vue-split-panel/src/composables/use-resize.ts create mode 100644 packages/vue-split-panel/src/composables/use-sizes.ts diff --git a/packages/vue-split-panel/src/SplitPanel.vue b/packages/vue-split-panel/src/SplitPanel.vue index 835a811..d4d305e 100644 --- a/packages/vue-split-panel/src/SplitPanel.vue +++ b/packages/vue-split-panel/src/SplitPanel.vue @@ -1,10 +1,11 @@