Type alias NodePatch

NodePatch: Partial<{
    align: "start" | "center" | "end" | "stretch";
    alpha: number;
    bottom: Length;
    centerX: Length;
    centerY: Length;
    cornerRadius: number;
    direction: "row" | "column";
    fill: Color;
    gap: LengthPx;
    height: Length;
    left: Length;
    margin: Padding;
    maxHeight: Length;
    maxWidth: Length;
    minHeight: Length;
    minWidth: Length;
    right: Length;
    style: Partial<TextStyle>;
    text: string;
    top: Length;
    visible: boolean;
    width: Length;
}>

Patch payload for CustomOverlay.patch. Lists every field that may be mutated on a live node - a loose union covering all node kinds. At runtime the overlay validates that each provided field is applicable to the addressed node (e.g. text on a non-TextNode throws).

Not patchable:

  • id, type - immutable identity.
  • children - tree structure is fixed; remove and re-add the overlay if you need a different layout.
  • mask / isMask - mask wiring is structural. Patch the referenced rect's dimensions like any other node to animate the clip.

Type declaration