john-okeefe
86444ec7ae
refactor: remove duplicate HTMX type declaration
...
Delete web/src/types/htmx.d.ts - HTMX is already declared in web/src/alpine.ts.
Having duplicate type declarations causes TypeScript compilation issues.
The Window interface extension in alpine.ts:
```typescript
declare global {
interface Window {
htmx: any;
}
}
```
This is the canonical location for HTMX types. Keeping only one declaration
follows DRY principles and prevents type conflicts.
2026-03-20 22:58:21 -04:00
john-okeefe
f2cbb5a433
chore: add HTMX TypeScript types and book picker implementation plan
...
- Add htmx.d.ts with TypeScript type definitions for HTMX global
- Add BOOK_PICKER_IMPL.md with implementation plan for book picker modal
2026-03-16 16:24:26 -04:00
john-okeefe
533dfd64e2
refactor: Update main.ts imports and add TypeScript types
...
- main.ts: Added imports for all new Alpine component files:
* admin, api-explorer-docs, login, profile, profile-modal,
* register, toast-error, unlinked_books, index, collection-rules
- api.d.ts: Added match_reason field to TestRuleMatch interface
for collection rules test results display
2026-03-08 21:36:32 -04:00
john-okeefe
ea5ad7a41b
feat(web): update frontend TypeScript modules and API types
...
This commit updates the web frontend TypeScript modules:
Core modules:
- admin.ts: Admin panel functionality and user management
- analytics.ts: Analytics dashboard and data visualization
- api-explorer.ts: Interactive API documentation explorer
- api.ts: Core API client with request/response handling
- collections.ts: Book collection management UI
- conflicts.ts: Sync conflict resolution interface
- custom-section-builder.ts: Dynamic section builder for UI
- docs.ts: Documentation viewer and navigation
- dom.ts: DOM manipulation utilities and helpers
- header.ts: Application header with navigation
- library.ts: Library view and book grid management
- linking.ts: Device-book linking interface
- password_validation.ts: Client-side password strength validation
- queue.ts: Device sync queue management UI
- search.ts: Full-text search with Lunr integration
- storage.ts: Local storage and cache management
- theme.ts: Theme management and CSS variable updates
- themeDropdown.ts: Theme selector dropdown component
- toast.ts: Toast notification system
- woodPaneling.ts: Visual theme effects
- woodPanelingInit.ts: Visual effects initialization
Type definitions:
- api.d.ts: Updated TypeScript definitions for API responses
These updates enhance the frontend with improved functionality
for book management, device synchronization, and user experience.
2026-02-27 17:06:48 -05:00
john-okeefe
a8920a8f6c
Add dashboard redesign, custom section builder, and enhanced search functionality
...
Features:
- Complete dashboard redesign with improved UI components and layout
- Implement custom section builder for personalized book organization
- Add new events tracking system for user interactions
- Enhance search functionality with better static search.js
- Update TypeScript type definitions for API responses
Backend:
- Update Go dependencies in go.mod
- Add new frontend routes in router
Templates:
- Update admin and dashboard templates with new components
Frontend:
- Refactor analytics, collections, conflicts, and queue modules
- Add new documentation features in docs.ts
- Implement linking between books and collections
- Add toast notifications for user feedback
- Include placeholder book SVG asset
This commit consolidates multiple feature additions and improvements
across the entire stack including backend, templates, and frontend.
2026-02-25 16:56:10 -05:00
john-okeefe
9ef94efeb5
feat(dashboard): implement Phase 6 TypeScript type definitions
...
Add TypeScript interfaces for Carousel-style dashboard to api.d.ts:
New Interfaces:
1. SectionData
- Matches handlers.SectionData in collections.go (lines 73-81)
- id: Collection name (string)
- is_system: Boolean flag (true for system collections, false for user)
- title: Display title
- description: Collection description
- icon: Emoji icon
- items: Array of BookInfo objects
- view_all_url: URL to view all items (system collections only)
- priority: Display order (lower numbers first)
2. DashboardPreferences
- Matches database.UserDashboardPreferences (models.go:381-390)
- library_id: Library UUID
- hidden_collections: Array of collection names to hide
- collection_order: Array of collection names for custom ordering
- items_per_section: Number of items per section
Existing Interface:
- BookInfo: Already defined (media_item_id, title, author, cover_image_path)
- Reused by SectionData for items array
- No duplicate definitions needed
Key Compliance:
- is_system: boolean matches database is_system_collection field
- media_item_id matches Go BookInfo.MediaItemID field
- Uses existing BookInfo struct (no duplicates)
- Added to existing api.d.ts file (follows established pattern)
2026-02-19 21:05:59 -05:00
john-okeefe
60c5a093b5
feat(typescript): add core infrastructure modules
...
- Add centralized API type definitions (types/api.d.ts)
- Interfaces for all API responses matching Go handler JSON
- Snake_case field names matching actual API responses
- Source file references in comments for verification
- Add API client module (api.ts)
- Procedural get/post/put/delete functions
- Automatic auth header injection
- Exported to window for cross-module access
- Add DOM utilities (dom.ts)
- escapeHtml for safe HTML rendering
- querySelector wrappers with null checks
- Element creation helpers
- Add event delegation helpers (events.ts)
- Reusable event delegation pattern
- Data attribute selectors for dynamic content
- Add localStorage wrapper (storage.ts)
- Type-safe token management
- Theme persistence helpers
2026-02-18 16:40:29 -05:00