docs/plans/2026-04-10-slate-v2-core-ts-complete-dissection-plan.md
core.ts Complete Dissection PlanFinish the dissection of core.ts so we stop doing it half-way.
The end state is:
core.ts no longer hides major exported runtime behaviorOnly keep drift that strengthens the better engine direction:
For packages/slate/src/** specifically:
src/core/* ownerscore.tsINTERNALcore.tsThese are still needed by multiple extracted path files, but they are not themselves the reviewer-facing behavior names users think about:
Recommended destination:
packages/slate/src/core/fragment-helpers.tsDo not create one file per tiny helper if the only result is fragmentation without semantic gain.
This tranche is already done:
Before more extraction:
core.tsDo in this order:
get-state.tsstep-current-point.tsapply-operation.tswith-transaction.tsReason:
core.ts feel like the
real ownercore.tsStatus:
Rules:
core.tsDone:
core.ts is now an explicit export surface, not the real home of the engineexport * fallbackbatch-dirty-paths.ts or
update-dirty-paths.ts unless the current engine really uses them againcore.ts as the secret real owner after the path files existFor every slice:
tsc --noEmit --skipLibCheck --target es2022 --module esnext --moduleResolution bundler ... probe over the touched files and direct callersThe dissection is complete when:
core.ts no longer contains major exported runtime behavior bodiessrc/core/* path is a real ownerpr-description.md explains the surviving drift concretely, file by file