Utilities for TypeScript and Svelte
High-performance virtual grid. Renders rows as HTML elements directly for better scroll performance instead of relying on a JS framework (which means custom markup needs to be created with JS).
Virtual grid + KSelection usage example
Features:
Row-based selection manager, with both a JS and Svelte implementation..
Virtual grid + KSelection usage example
Features:
Automatically snapshot Svelte form values for input
, textarea
and select
elements.
The name
attribute is used as the key. If you need to use a different key than the name
attribute, you can alternatively specify it with the data-snapsho
attribute.
Usage:
<script>
import { auto_snapshot } from 'k5kit'
const snapshotter = auto_snapshot()
export const snapshot = snapshotter
</script>
<div use:snapshotter.container>
<input type="text" name="first_name" />
</div>
import { check_shortcut, check_modifiers } from 'k5kit'
check_shortcut(e, 'A') // 'A' with no modifiers pressed
check_shortcut(e, 'A', 'shift', 'alt', 'cmdOrCtrl')
check_modifiers(e) // Check that no modifiers are pressed (useful for mouse events)
check_modifiers(e, 'shift', 'alt', 'cmdOrCtrl')