Aller au contenu principal

42 documents étiquetés avec "SVG"

SVG import, parsing, and SVG-aligned rendering behavior.

Voir toutes les étiquettes

Chromium SVG Text

SVG text is the most intricate part of SVG rendering because it combines:

Clipboard — copy, cut, paste

FRD for clipboard support in the SVG editor: the payload is a standalone SVG document, not a private format. Specifies the two extraction operations (standalone payload vs in-document clone), the five kinds of context a lifted subtree leaves behind and the policy for each, command and history semantics, placement, transport ownership, and the paste-is-load trust model.

Durable node identity — referencing a node across reloads and rewrites

RFD for the open problem behind #775: NodeId is parse-ephemeral, so there is no reference that survives a load() — let alone an external rewrite of the file. Frames the gap, scopes the candidate identity contracts (positional path, id attribute, semantic anchor), and sets the promotion gate before any public API lands.

Hit-testing — design notes for v2

Investigation, bugs, and architectural lessons from a v1 hit-test implementation in @grida/svg-editor — input to the v2 hit-test architecture.

Policy Class

Defined term — the minimal partition of editable SVG elements such that every editing intent admits the same set of legal solutions within a class.

Promote-to-Path — vector editing of non-path shapes

RFD for editing the non-path SVG shapes (rect, circle, ellipse, line, polyline, polygon) as vector geometry: native writeback while the tag can express the edit, promotion to <path> when it cannot — the timing, target, conic representation, and round-trip invariants that keep the conversion honest.

Rendering hardening — the inert projection

Specification for rendering untrusted SVG documents inertly in the SVG editor: hardening is a projection choice at the rendering surface, never a mutation of the document model. Names the execution-vector inventory the projection must neutralize, the surface obligations that constrain the strategy, the inert-projection requirements, the named costs, and the residual risks left to the host.

Subtree clone — duplicate and clone-drag

Design note for the SVG editor's in-document subtree-clone operation: the second of the clipboard FRD's two extraction operations. Specifies the no-closure/no-shell verdict, verbatim-id collision semantics, placement and paint order, who moves during a clone-drag, the mid-drag modifier toggle, the one-undo-step history bracket, and the repeating-offset duplicate (⌘D remembers the translate delta).

SVG Editor (TS SDK) — Design

Index of design notes for the @grida/svg-editor TypeScript SDK — element IR proposal, hit-test architecture, transform pipeline critique, Policy Class glossary.

SVG Testing

This document describes the testing methodology and tools used to evaluate SVG rendering accuracy in Grida Canvas.

SVG Transforms and Coordinate Frames

Reference for SVG transform-attribute syntax, viewport / viewBox, and use-instance coordinate frames — feeds an IR redesign that must refuse-vs-normalize rotation and pivot.

Text creation — design

Why creating text in an SVG editor is click-to-place rather than drag-to-size, and why an empty text element is treated as a deletion.

Untrusted SVG rendering — isolation strategies

Survey of how the web platform and peer editors render untrusted SVG without executing author script: the script-execution vector inventory, allowlist sanitization (DOMPurify, tldraw), the secure static image mode, iframe sandboxing, parse-into-model editors (Figma, Penpot, Excalidraw), and what a host CSP does and does not neutralize.