Converts a JSX tree into static JointJS markup (dia.MarkupJSON), ready to
assign as a cell's markup. Intrinsic SVG/HTML tags become markup nodes;
function components are rendered once and their output is converted; fragments
(and any non-string element type) are unwrapped so their children flow through
without a wrapper node.
Text, number, boolean, and null children become text content; any other
child type throws. This is a one-time, static conversion with no hooks, no
state, and no React lifecycle, so author plain markup here rather than
interactive components.
The JSX tree to convert, typically authored inline as <g>…</g>.
The equivalent JointJS markup array.
Two prop conventions are translated for you:
className is emitted as the SVG class attribute.joint-* prop is lifted onto the markup node itself, e.g.
joint-selector="body" sets the node's selector (the same selector names
that useMarkup registers at runtime).
jsx() - Utility to create JointJS markup from JSX syntax