refactor(helpers): modernize reactive helpers and add tests
This commit is contained in:
@@ -1,3 +1,27 @@
|
||||
/**
|
||||
* Reactive helper factories using Svelte 5 runes
|
||||
*
|
||||
* Provides composable state management patterns for common UI needs:
|
||||
* - Filter management with multi-selection
|
||||
* - Typography controls with bounds and stepping
|
||||
* - Virtual scrolling for large lists
|
||||
* - Debounced state for search inputs
|
||||
* - Entity stores with O(1) lookups
|
||||
* - Character-by-character font comparison
|
||||
* - Persistent localStorage-backed state
|
||||
* - Responsive breakpoint tracking
|
||||
* - 3D perspective animations
|
||||
*
|
||||
* @example
|
||||
* ```ts
|
||||
* import { createFilter, createVirtualizer, createTypographyControl } from '$shared/lib/helpers';
|
||||
*
|
||||
* const filter = createFilter({ properties: [...] });
|
||||
* const virtualizer = createVirtualizer(() => ({ count: 1000, estimateSize: () => 50 }));
|
||||
* const control = createTypographyControl({ value: 16, min: 12, max: 72, step: 1 });
|
||||
* ```
|
||||
*/
|
||||
|
||||
export {
|
||||
createFilter,
|
||||
type Filter,
|
||||
|
||||
Reference in New Issue
Block a user