OptionaldefaultFallback fontSize when style.fontSize is unset. Default 16.
OptionalgetRead rich-text runs from data. Default: data.runs.
OptionalgetRead style from data. Default: data.style.
OptionalgetRead plain text from data. Default: data.text ?? ''.
OptionalisForwarded to useTextEdit: is el part of the editor's own chrome?
Focus moving into it does not end the edit. Wire it to whatever renders
the character controls.
OptionalsetProduce updated data with new runs. Default: { ...data, runs }.
OptionalsetProduce updated data with new text. Default: { ...data, text }.
OptionalviewCurrent viewport. Supply it on a canvas that pans or zooms: the overlay
is then positioned at the node's projected screen origin and CSS-scaled
by the view, so every typographic metric on it — including the
fontSize / letterSpacing a run carries — stays in world units and
scales together. Omit it and the node's world box is passed through as
screen pixels (correct at {x: 0, y: 0, scale: 1}).
The overlay takes a single scale factor, so a non-uniform view scale is
represented by its scale.x; text under scale.x !== scale.y will not
match the canvas.
All-optional projections + fontSize fallback.