Expand description
Content namespace builder functions.
Static constructor functions for creating ContentNode values from the
Content namespace. These are intended to be registered as native
functions accessible from Shape code.
Content.text(string)— plain text nodeContent.table(headers, rows)— table nodeContent.chart(chart_type)— chart node (empty series)Content.code(language, source)— code blockContent.kv(pairs)— key-value pairsContent.fragment(parts)— composition of content nodes
Functions§
- align_
named - Align namespace:
Align.left,Align.center,Align.right. Returns a ValueWord string tag for alignment directives. - border_
named - Border namespace:
Border.rounded,Border.sharp, etc. Returns a ValueWord string tag that content methods accept as border args. - chart_
type_ named - ChartType namespace:
ChartType.line,ChartType.bar, etc. Returns a ValueWord string tag that content builders accept as chart type args. - color_
named - Color namespace:
Color.red,Color.green, etc. Returns a ValueWord string tag that content methods accept as color args. - color_
rgb - Color.rgb(r, g, b) — returns an RGB color string tag “rgb(r,g,b)”.
- content_
chart - Create a chart ContentNode with empty series.
- content_
code - Create a code block ContentNode.
- content_
fragment - Create a fragment ContentNode (composition of multiple nodes).
- content_
kv - Create a key-value ContentNode.
- content_
table - Create a table ContentNode.
- content_
text - Create a plain text ContentNode.