jq-studio is developed in the open at
github.com/tai42ai/jq-studio and published
to npm as
@tai42/jq-studio
(Apache-2.0). Its full component reference — the node vocabulary, the faithfulness
guarantee, the theming contract, and the worker model — lives in that repository.
This page covers how the Studio ships it and how to embed it; it does not restate
the editor’s own docs.Built in, everywhere
The Studio SDK re-exports jq-studio’sJqField
component and its declaration types. The Studio host does two things once, at the
shell level, so the editor is available to every field:
- it injects the Studio’s design system through a
PrimitivesProvider, so the editor renders in the host’s own inputs, buttons, and tokens rather than a bundled look; and - it installs the editor’s single evaluation worker — one dedicated Web Worker shared across the page — so jq evaluation runs off the main thread for every field.
JqField gets the visual canvas by construction.
From the schema, with no code
A form does not have to name its jq fields at all.SchemaForm reads the
x-tai42-expression annotation the server
puts on a jq-typed string property and renders JqField for it — the resting
control plus the visual-editor door — carrying the annotation’s label, blurb, input
keys, and Test-panel sample straight onto the field. So the server decides which
properties are expressions, and every form over that schema agrees.
The door is code-split. SchemaForm reaches the editor through a dynamic import
behind a lazy boundary, taken only when a field actually carries a well-formed
annotation — a form with no expression fields never pulls the editor, its worker, or
its wasm into the bundle. A malformed annotation, or a language this client does
not know, degrades silently to the ordinary text input rather than throwing.
A standalone library
@tai42/jq-studio embeds in any React app the same way the Studio uses it: render
JqField inside a PrimitivesProvider that supplies your design-system primitives.
--jq-* custom property, and it inherits light or dark from
the nearest ancestor carrying a data-theme attribute — so an app themes the
editor by setting those properties on a wrapper, with no editor configuration of its
own. See jq-studio’s repository for the full --jq-* contract and the primitives
interface.
The editor evaluates jq in a same-origin Web Worker and enforces a
terminate-on-deadline, so a runaway expression is killed rather than left to hang
the tab. The worker is a real, same-origin file — a
'self' worker with
'wasm-unsafe-eval', which is what a strict Content-Security-Policy permits. The
Studio’s own policy already allows it; an embedding app grants the same policy to run
evaluation off-thread.See also
- jq-studio on GitHub — the editor’s own repository and its component docs.
- Author a Studio plugin — how a plugin field renders the built-in editor, and the migration for plugins that used the old extension point.
- Visual jq in flows — how the flow editor authors jq with the same editor.
- The jq policy — a host jq field the editor serves.

