mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-28 19:01:34 +00:00
refactor: вынести box-модель лестниц в ленивый модуль stairs-box.ts (#676)
Просмотр импортирует stairTargetState из stairs-editor-model.ts, и общий модуль Rollup кладёт в eager-чанк: новые функции протяжки, ресайза, магнита и диалога утянули туда 2,5 КБ gzip и выбили бюджет первого View. Теперь eager-модуль снова маленький, а всё редакторское живёт в stairs-box.ts, который импортирует только ленивый редактор: initial View 299 165 Б при бюджете 301 066, запас 1 901 Б. Потолок ленивого редактора 236 400 → 239 000 (замер 237 985) с записью истории в bundle-budget.mjs; база монолита bundleBytes поднята тем же коммитом (+10 069 Б сырых — код слоя редактирования). Хук data-hp получил запись stair-frame; смок не пишет в приватное поле. Issue: #676 User-Visible: no Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018qZfe7YS4rqEMKoVeS3GKd
This commit is contained in:
+6
-4
@@ -116,11 +116,13 @@ links are cleared; a one-space transfer cannot invent an external target.
|
||||
primitives.
|
||||
- `src/stairs-view.ts` is the eager read-only boundary for symbols, guarded
|
||||
navigation and touch/pointer gesture suppression.
|
||||
- `src/stairs-editor-model.ts` owns pure Plan transforms — the oriented box,
|
||||
- `src/stairs-editor-model.ts` keeps the eager-safe helpers the View runtime
|
||||
shares (defaults, kind conversion, target state, stair-to-stair magnet);
|
||||
`src/stairs-box.ts` owns the editor-only oriented-box transforms —
|
||||
drag-to-draw, resize about the anchor, edge magnets, handle bearings and
|
||||
cursors, dialog conversion — plus target state and stair-to-stair magnet
|
||||
math; `src/stairs-editor.ts` owns the lazy Plan UI (gestures, the frame
|
||||
rendered by the card in its top overlay, properties).
|
||||
cursors, dialog conversion — and is imported only by the lazy editor chunk;
|
||||
`src/stairs-editor.ts` owns the lazy Plan UI (gestures, the frame rendered
|
||||
by the card in its top overlay, properties).
|
||||
- `src/clean-floor.ts` and `src/summary-panel-metrics.ts` consume the same
|
||||
footprint subtraction for room cards and summary totals; PDF rendering uses
|
||||
the same stair outline/tread geometry without changing the room floor paint.
|
||||
|
||||
Reference in New Issue
Block a user