Core Concepts
comins-sortable@0.1.6
Comins Sortable separates pointer interaction from application state.
- A scope owns one drag lifecycle and isolates its registrations.
- An area is one sortable container with a stable
areaId. - A group controls move or copy between areas.
- An item ID is stable business identity, not visual position.
- A controlled commit renders proposed arrays before next-frame verification.
Framework adapters apply one immutable transaction to every affected area. For
a transfer, source and destination setters run before the root onChange
callback. A setter or callback failure restores the original arrays.
Vanilla createSortable owns its DOM transaction but does not own a consumer’s
business model. Update any model that mirrors the DOM from onChange.
Use a string group for ordinary movement:
const group = 'tasks';Use an object group for copy or directional acceptance:
const group = { name: 'tasks', pull: 'copy' as const, put: ['tasks'],};See Reorder and Transfer, Copy and Clone, and Lifecycle and Errors.