Core
@sectile/core answers one question: given this state and event, what state and ordered commands come next? It contains no dates, collection layout state, platform measurement, DOM, framework lifecycle, or styling.
sh
pnpm add @sectile/corets
import * as listbox from '@sectile/core/listbox'
import * as sequence from '@sectile/core/sequence'What Core owns
- canonical structures: sequence, range, grid, tree
- independent state: cursor, selection, expansion, text editing
- deterministic transitions and ordered commands
- stable string or safe-integer identity, revisions, typed failures, resource ceilings
- bounded geometry values and operations, anchored placement, and a generic metric index
- composed component semantics such as Listbox, Combobox, Slider, and Tree Grid
Core geometry provides reusable calculations over explicit bounded values. Collection extents, viewport queries, dynamic measurement state, layout strategies, and virtual repair belong to @sectile/virtual. Actual element or terminal measurement belongs to the selected host adapter. Date arithmetic and picker calendars belong to @sectile/temporal.
Learning path
- Foundations: identity,
Result, revisions, and limits. - Structures and state: reusable sequence, range, grid, tree, and selection models.
- Transitions and composition: events, immutable updates, commands, and controlled ownership.
Core has no DOM, terminal, Vue, or styling dependency. Choose a host adapter only after the interaction contract is clear.
