@texuli/player · spec 0.3.0

JSON live preview

Texuli builds interfaces from validated JSON. Edit a blueprint on the left: it is checked as you type, and only a blueprint with no errors is painted by the real player, at the untrusted tier an agent's output gets. Nothing you type leaves the browser.

Blueprint

Local state with a list variable, $state bindings, closed on-actions, a sortable list bound to the list and a read-only workflow graph.

263 lines

Changes are checked 250 ms after you stop typing. Tab leaves the editor.

Result

Checking the blueprint…

Diagnostics

The validator is loading…

Rendered preview

Loading the player…

How the preview works

  1. Parse. The text must be JSON; a syntax error is reported with its line and column.
  2. Validate. The same checks the player runs: the local-state declarations, the player's binding checks and validateDraft from @texuli/catalog/validate with the player catalog (component ids, prop schemas, bindings, events and closed actions, block schemas, composition grammar and the untrusted URL policy). Each diagnostic lists its code, its message and its JSON path.
  3. Paint or refuse. With no errors, <Player> paints the blueprint at the untrusted tier and validates it again. With any error the preview is cleared, never left showing an older result, and the status reads “Not rendered”.

What is in development

  • The player's runtime for the spec 0.3.0 interaction fields (local state in the envelope, on actions, reorder and workflow graphs) is in development and first published in @texuli/player 0.4.0.
  • @texuli/workflows, which paints the workflow-graph node, is in development and on npm as 0.18.0; the player's workflow-graph painter that uses it ships from the player's 0.4.0 release. The preview shows graphs read-only.
  • This page does not run the spec's own structural validator (validateBlueprint from @texuli/spec); the player's checks above decide what paints.