Architecture and package boundaries
Goal: keep Core deterministic and framework‑agnostic, and keep the Vue layer a thin adapter.
1) Responsibility boundaries
| Package | Owns | Must not own |
|---|---|---|
@affino/datagrid-core | модели, runtime‑signals, viewport/virtualization, selection geometry | Vue refs, SFC‑рендер, adapter‑lifecycle |
@affino/datagrid-vue | composables, UI‑адаптер, lifecycle, интеграция | дублирование геометрии/virtualization |
2) Dependency direction
datagrid-coredoes not depend on Vue.datagrid-vuedepends ondatagrid-core.
3) Canonical runtime pipeline
- Input events reach the adapter.
- The adapter normalizes into core contracts.
- Core computes viewport/virtualization.
- Core emits deterministic geometry.
- The Vue layer renders only.
4) Invariants
- Single owner for scroll sync.
- Canonical
pin = left | right | none. - One coordinate system (world/viewport/client).