Commit graph

7 commits

Author SHA1 Message Date
839365a5a1
Add weapon stat modifier UI for AX skills and befoulments (#448)
## Summary
- Add weapon stat modifier types and API layer
- Rewrite AX skill components to fetch modifiers from API instead of
local data
- Add befoulment select component for weapon editing
- Update weapon edit views to use new modifier system
- Remove old hardcoded ax skill definitions

This is the frontend counterpart to the API weapon stat modifiers
feature. AX skills and befoulments are now fetched from the API instead
of being hardcoded in the frontend.

## Test plan
- [ ] Edit a weapon with AX skills, verify dropdown shows correct
options
- [ ] Add/remove AX skills on a weapon, verify saves correctly
- [ ] Add befoulment to a weapon, verify UI and save work
- [ ] Verify existing weapons with AX skills display correctly
2025-12-31 22:21:22 -08:00
9fb2e2485d fix: Phase 7c - fix Touch/drag-drop types (32 -> 28 errors)
Fixed TypeScript errors where custom drag data was being stored on the
native Touch type, which doesn't allow extension.

The issue: `currentTouch` was typed as `Touch | null` but the code was
trying to store custom properties (item, source, type) on it for pending
drag operations initiated by mouse pointer events.

The fix: Created a new `PendingDragData` interface to properly type the
custom drag data being stored for mouse events.

Changes:
- src/lib/composables/drag-drop.svelte.ts:
  - Added PendingDragData interface with item, source, type
  - Changed TouchState.currentTouch from `Touch | null` to `PendingDragData | null`
  - This allows storing pending drag data without conflicting with native Touch type

Result: 32 → 28 errors (-4)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 20:01:46 -08:00
5d98bba30c fix: Phase 2 - remove optionalProps() shim misuse (45 -> 43 errors)
Removed inappropriate use of optionalProps() type shim from our own
codebase where we control the types. Type shims should only be used
for third-party library incompatibilities.

Files modified:
- base.adapter.ts: Removed shim from RequestOptions spreading
- grid.service.ts: Removed 3 usages from update methods
- party.service.ts: Removed import
- users.ts: Removed import and usage
- UserSettingsModal.svelte: Direct object construction
- drag-drop.svelte.ts: Direct object for DragOperation.target

Result: 45 → 43 errors (-2)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 19:23:14 -08:00
a74653ee93 fix: apply exactOptionalPropertyTypes shims to adapters and services
- Add optionalProps shim to base.adapter.ts for RequestInit compatibility
- Apply optionalProps to UserSettingsModal updateData
- Use conditional spreading for Navigation Button element prop
- Apply optionalProps to drag-drop target object creation
- Apply optionalProps to party.service create/update methods
- Apply optionalProps to grid.service CRUD operations
- Fix transcendenceStage -> transcendenceStep typo in grid.service
- Update UserUpdateParams interface to include | undefined
- Update DragOperation interface properties to include | undefined

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 18:42:38 -08:00
e4c59e14f6 feat: add grid API endpoints and drag-drop support 2025-09-17 10:46:49 -07:00
16e18525da Fix drag-drop swapping
Add parent +server.ts files to fix routing conflicts
Pass actual target item IDs instead of placeholder strings
2025-09-16 17:19:26 -07:00
1d0495f1f2 Add drag-drop system for grids
- Core composable with touch support & operation queue
- DraggableItem & DropZone components
- Proper position mapping for containers
- Cross-container swap/move operations
- Visual feedback states

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-16 02:43:58 -07:00