Skip to content

Commit a917000

Browse files
authored
feat(wikibase-schema-editor): create drag-and-drop context types and utilities (#70)
1 parent 34b3382 commit a917000

12 files changed

Lines changed: 1735 additions & 188 deletions

File tree

.kiro/specs/wikibase-schema-editor/tasks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
- Implement TypeScript interfaces for schema mapping
77
- _Requirements: 1.2_
88

9-
- [ ] 2. Create drag-and-drop context types and utilities
9+
- [x] 2. Create drag-and-drop context types and utilities
1010
- Write tests for drag-and-drop context state management
1111
- Write tests for drop target validation logic
1212
- Implement drag-and-drop context types and utilities

.kiro/steering/tech.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
- **Auto-imports**: Automatic imports for Vue composables and PrimeVue components
2828
- **TypeScript**: Strict type checking across the stack
2929

30+
## Coding Standards
31+
- **Function Declarations**: Always use arrow functions (`const fn = () => {}`) instead of function declarations (`function fn() {}`)
32+
3033
## Auto-Import Configuration (Frontend)
3134

3235
The frontend uses `unplugin-auto-import` and `unplugin-vue-components` for automatic imports:

frontend/.eslintrc-auto-import.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
"controlledComputed": true,
7474
"controlledRef": true,
7575
"createApp": true,
76+
"createDropZoneConfig": true,
7677
"createEventHook": true,
7778
"createGlobalState": true,
7879
"createInjectionState": true,
@@ -229,6 +230,7 @@
229230
"useDevicesList": true,
230231
"useDisplayMedia": true,
231232
"useDocumentVisibility": true,
233+
"useDragDropContext": true,
232234
"useDraggable": true,
233235
"useDropZone": true,
234236
"useElementBounding": true,

frontend/auto-imports.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ declare global {
2424
const controlledComputed: typeof import('@vueuse/core')['controlledComputed']
2525
const controlledRef: typeof import('@vueuse/core')['controlledRef']
2626
const createApp: typeof import('vue')['createApp']
27+
const createDropZoneConfig: typeof import('./src/composables/useDragDropContext')['createDropZoneConfig']
2728
const createEventHook: typeof import('@vueuse/core')['createEventHook']
2829
const createGlobalState: typeof import('@vueuse/core')['createGlobalState']
2930
const createInjectionState: typeof import('@vueuse/core')['createInjectionState']
@@ -189,6 +190,7 @@ declare global {
189190
const useDevicesList: typeof import('@vueuse/core')['useDevicesList']
190191
const useDisplayMedia: typeof import('@vueuse/core')['useDisplayMedia']
191192
const useDocumentVisibility: typeof import('@vueuse/core')['useDocumentVisibility']
193+
const useDragDropContext: typeof import('./src/composables/useDragDropContext')['useDragDropContext']
192194
const useDraggable: typeof import('@vueuse/core')['useDraggable']
193195
const useDropZone: typeof import('@vueuse/core')['useDropZone']
194196
const useElementBounding: typeof import('@vueuse/core')['useElementBounding']
@@ -382,6 +384,7 @@ declare module 'vue' {
382384
readonly controlledComputed: UnwrapRef<typeof import('@vueuse/core')['controlledComputed']>
383385
readonly controlledRef: UnwrapRef<typeof import('@vueuse/core')['controlledRef']>
384386
readonly createApp: UnwrapRef<typeof import('vue')['createApp']>
387+
readonly createDropZoneConfig: UnwrapRef<typeof import('./src/composables/useDragDropContext')['createDropZoneConfig']>
385388
readonly createEventHook: UnwrapRef<typeof import('@vueuse/core')['createEventHook']>
386389
readonly createGlobalState: UnwrapRef<typeof import('@vueuse/core')['createGlobalState']>
387390
readonly createInjectionState: UnwrapRef<typeof import('@vueuse/core')['createInjectionState']>
@@ -538,6 +541,7 @@ declare module 'vue' {
538541
readonly useDevicesList: UnwrapRef<typeof import('@vueuse/core')['useDevicesList']>
539542
readonly useDisplayMedia: UnwrapRef<typeof import('@vueuse/core')['useDisplayMedia']>
540543
readonly useDocumentVisibility: UnwrapRef<typeof import('@vueuse/core')['useDocumentVisibility']>
544+
readonly useDragDropContext: UnwrapRef<typeof import('./src/composables/useDragDropContext')['useDragDropContext']>
541545
readonly useDraggable: UnwrapRef<typeof import('@vueuse/core')['useDraggable']>
542546
readonly useDropZone: UnwrapRef<typeof import('@vueuse/core')['useDropZone']>
543547
readonly useElementBounding: UnwrapRef<typeof import('@vueuse/core')['useElementBounding']>

0 commit comments

Comments
 (0)