Repository navigation
v0.10.0
New Features 🔥
Vue Package (@compotes/vue)
Official Vue 3 support is here! The new @compotes/vue package provides ready-to-use components and composables for all Compote components.
Components:
CCollapse/CCollapseTrigger- Collapsible content with toggle triggerCDrag- Click-and-drag scrollable containerCDrilldown/CDrilldownMenu/CDrilldownNext/CDrilldownBack- Hierarchical navigationCDropdown/CDropdownMenu/CDropdownTrigger- Dropdown with context injectionCMarquee- Scrolling marquee
All components support the as prop to customize the rendered element, expose methods and reactive state via template refs, and emit typed events.
Composables:
useCollapse- Reactive collapse state (isExpanded,isCollapsing) and methodsuseDrag- Reactive drag state (isDragging,isDraggable)useDrilldown- Reactive drilldown state (level,currentMenuId) and navigation methodsuseDropdown- Reactive dropdown state (isOpen,type) and control methodsuseMarquee- Reactive marquee state (isPaused) and playback methods
Core Improvements
- Declarative event listeners - Pass event handlers via the
onoption instead of manualaddEventListener - State change callbacks - Subscribe to reactive state changes with the
onStateChangeoption - Typed events - Each component exports an
Eventsenum for type-safe event handling - Typed state - Each component exports a
Stateinterface (CollapseState,DragState, etc.) - Debounced observers -
ResizeObserverandMutationObservercallbacks are now debounced to prevent page freezing - Deferred initialization - Components can be instantiated without an element and initialized later with
init()
Bug Fixes 🔨
- Collapse: Fixed concurrent animation issues, improved destroy cleanup (removes inline styles and ARIA attributes)
- Drag: Switched from mouse events to pointer events for better touch support, added
setPointerCapturefor reliable drag behavior - Drilldown: Fixed items array not clearing on
updateItems(), mutation observer no longer triggers on clone operations - Dropdown: Fixed error message referencing wrong selector, improved accessibility event initialization and cleanup
- Marquee: Fixed inverted fill detection logic, improved clone cleanup and focus handling
- Accessibility:
focusChar()is now case-insensitive
Breaking Changes 💥
Core API Changes
- Constructor / el / init(): The element parameter is now optional. Components can be created without an element and initialized later via
init(el, options) destroyEvents()removed: Event cleanup is now handled automatically viaAbortController
Removed Options
initAccessibility- Accessibility is now always enabledinitEvents- Events are now always initialized
New Options
on- Declarative event listeners objectonStateChange- State change callback for Vue integration
CSS Changes
- Marquee direction classes renamed:
.c-marquee--direction-top→.c-marquee--direction-up,.c-marquee--direction-bottom→.c-marquee--direction-downto respect<marquee>usage.
Build Output
- UMD file renamed:
compotes.umd.cjs→compotes.umd.js
Infrastructure 🧰
- Migrated build system from Vite to tsdown/rolldown
- Migrated to pnpm workspace catalogs for centralized dependency management
- Added test coverage reporting with Coveralls
- Added browser-based testing with Vitest + Playwright
- Added
doc-syncCI check to validate documentation stays in sync with implementation - Major dependency updates: pnpm 10, Vitest 4, ESLint 10, TypeScript 5.9, Vite 7