@surveystudio/node-registery
v1.14.12
Published
Typed survey question node registry with split builder, runner, and logic entrypoints.
Maintainers
Readme
@surveystudio/node-registery
Typed survey question node registry with separate entrypoints for pure logic, runner UI, and builder UI.
This package is currently in early migration. It exports migrated node logic for server runtimes and selected builder/runner UI adapters while the remaining SurveyChamp question nodes are being moved into the registry.
Entrypoints
import { logicRegistry } from "@surveystudio/node-registery/logic";
import { runnerRegistry } from "@surveystudio/node-registery/runner";
import { builderRegistry } from "@surveystudio/node-registery/builder";
import { TextLikeNode, ChoiceNode } from "@surveystudio/node-registery/ui";Use /logic for Worker, export, and server runtimes. It is intentionally React-free.
Use /runner, /builder, and /ui only in React runtimes. React is a peer dependency and is not bundled. The /ui entrypoint contains shadcn-style primitive parts for node UIs; Worker and API runtimes should keep importing only /logic.
Builder manifests/adapters are available for the migrated input, choice, scale, structured choice, consent, media, flow, captcha, emoji rating, and plain text nodes.
Logic Pipeline
Every node logic module should expose the same pure, Worker-safe pipeline:
const value = logicRegistry.plainText.normalizeValue(rawAnswer, node.data, context);
const validation = logicRegistry.plainText.validate(value, node.data, context);
const columns = logicRegistry.plainText.extractValue(value, node.data, context);Runner APIs should persist and queue normalized values. Export/projection APIs should read normalized values through extractValue.
Current Status
Migrated nodes:
textInputnumberInputemailInputdateInputmultiInputzipCodeInputsingleChoicelogicmultipleChoicelogicdropdownlogicrankinglogicmatrixChoicelogiccascadingChoicelogicratinglogicsliderlogicconsentlogiccaptchalogicimagelogicvideologicaudiologicplainTextemojiRatinglogicstartlogicendlogicbranchlogicvalidationlogic
The registry contract test covers every migrated logic and builder node so package consumers fail fast if an entrypoint goes stale.
