Skip to Content

parseJsx

parseJsx(source: string, options?: object): AnumaNode

Defined in: src/tools/slides/jsx.ts:532 

Parse a JSX source string into an AnumaNode tree.

strict mode (opt-in, defaults to false) enables checks that catch model-emitted JSX with the wrong convention before it lands in the deck: top-level visual-styling props on text elements (which the renderer silently ignores → invisible output). Stored decks load with strict off — any deck previously built before the strict check existed might carry non-conforming JSX, and we don’t want a tightened validator to retro- actively break every tool call on that deck. Callers that parse model-submitted JSX (add_slide, insert_slide, replace_slide, replace_element, insert_element) pass strict: true.

Parameters

ParameterType

source

string

options?

object

options.strict?

boolean

Returns

AnumaNode

Last updated on