From 861e17e3f98d86e230d5fccc01367cf1d7195dd7 Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Tue, 19 May 2026 14:10:02 -0400 Subject: [PATCH] Vector shapes (Phases A-E) + project polish MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Vector shapes feature (per docs/VECTOR_SHAPES_FEATURE.md): Phase A - Shape primitive layers (rect, rounded-rect, circle, ellipse, triangle, polygon, star, line) with a 0-100 viewBox coord system that renders on all six surfaces (editor canvas + five preview renderers) plus Canvas2D export. Solid fill, kind-specific controls (corner radius, sides, star points, inner ratio, line stroke width). Layer data is purely additive in JSON; old clients skip unknown shape kinds. Phase B - Linear + radial gradient fills with two-stop pickers. SVG emits via /; canvas via createLinearGradient/createRadialGradient. Angles follow CSS linear-gradient convention. Switching fill types preserves the most relevant color. Phase C - Solid strokes on all non-line shapes. Color, width (in shape-local viewBox units), dash style (solid / dashed / dotted) with auto-scaled dash patterns. SVG emits stroke attributes; canvas uses strokeStyle + setLineDash. Phase D - Custom SVG / full-SVG layer via file upload: - File picker (.svg, image/svg+xml) replaces a paste textarea. - Detects single vs full …; single paths land as kind:'path' with editable fill/stroke, multi-element SVGs land as kind:'svg' with fills baked in. - Sanitizer strips