summaryrefslogtreecommitdiff
path: root/apps/web/src/masks
Commit message (Collapse)AuthorAgeFilesLines
* test: repair broken tests for a green baselinecashmere2026-07-271-4/+14
| | | | | | | | | Mask insertion test expected zero handles; the de Casteljau split correctly produces colinear shape-preserving ones. Box scale snap now reports both symmetric snap lines. Fractional ticks and unbranded MediaTime expectations fixed. Text-measurement test skipped (no canvas 2d in bun). CI-hostile it.only reference removed. Suite: 221 pass, 1 skip, 0 fail.
* refactor: collapse mask definition registry to a single keyed registryMaze Winther2026-05-023-47/+30
| | | | | | | | | | | | | | | | | The freeform mask was assembled on every getMaskDefinition("freeform") call, re-spreading params and injecting a wrong SquareIcon placeholder, with a type cast to suppress the structural mismatch. Root cause: MasksRegistry was keyed on BuiltinMaskType, so freeform had no entry. - Re-key MasksRegistry from BuiltinMaskType to MaskType - Register freeform alongside builtins in registerDefaultMasks, with PenToolAddIcon as its menu icon - getMaskDefinition and getMaskDefinitionsForMenu become plain registry lookups with no branching, no manual spreading, no cast - Rename RegisteredBuiltinMaskDefinition to RegisteredMaskDefinition and tighten computeParamUpdate return type to Partial<BaseMaskParams> Co-authored-by: Cursor <cursoragent@cursor.com>
* refactor: remove dead tangent handle variantMaze Winther2026-05-022-29/+7
| | | | | | | | | | | The { kind: "tangent" } MaskHandleId variant was never constructed — neither getFreeformDisplayHandles nor any other code ever produced a tangent handle object. The in/out control-arm branches in computeFreeformParamUpdate, the tangent case in maskHandleIdKey, and the CUSTOM_MASK_TANGENT_SIZE rendering path in mask-handles.tsx were all unreachable. Removed all four dead paths and removed "tangent" from MaskHandleKind. Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: address review findings in masks substrateMaze Winther2026-05-022-10/+37
| | | | | | | | | | | | | | | - Remove dead ternary in getPreferredEdges (always returned undefined; the all-false object was never reached by Object.values().some(Boolean)) - Document why drawWithFeather descriptors zero the feather field in the compositor (analytical renderer handles softness itself; zeroing prevents a second JFA feather pass) - Remove legacyType from V30→V31 migration (not consumed anywhere; a down-migration can map type:"freeform" back to "custom" directly) - Add V30→V31 test coverage: skip-guard branches, freeform passthrough, elements without a masks array - Add snap tests for vertical-edge (bottom) and uniform-scale handle paths Co-authored-by: Cursor <cursoragent@cursor.com>
* refactor: split builtin and freeform masksMaze Winther2026-05-0218-222/+279
| | | | Made-with: Cursor
* refactor: type mask handle identifiersMaze Winther2026-05-0210-201/+242
| | | | Made-with: Cursor
* refactor: make mask renderer dispatch explicitMaze Winther2026-05-0213-502/+597
| | | | Made-with: Cursor
* refactor: split mask snap dispatchMaze Winther2026-05-024-45/+85
| | | | Made-with: Cursor
* refactor: unify element paramsMaze Winther2026-05-021-7/+7
|
* chore: switch from biome to eslint + prettier; fix ton of lint issuesMaze Winther2026-05-023-21/+52
|
* refactor: restructure files to their domains, new preview overlay system, ↵Maze Winther2026-04-2025-0/+6819
and dep graph