
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
@docyrus/generative-ui
Advanced tools
React UI package for Docyrus-backed generative interfaces built on top of @json-render.
This package is the frontend/runtime layer. It gives you:
GenerativeUI React component@docyrus/generative-ui-coreIf you need backend-safe catalogs, prompt metadata, or compile helpers without a React runtime, use @docyrus/generative-ui-core directly.
The generative UI system is intentionally split into two packages:
@docyrus/generative-ui
Frontend/runtime package. Use this in React applications.@docyrus/generative-ui-core
Shared non-React package. Use this in backend services, API layers, validators, and generators.In practice:
@docyrus/generative-ui@docyrus/generative-ui-corepnpm add @docyrus/generative-ui @docyrus/signin react react-dom
Peer dependencies:
reactreact-dom@docyrus/signinGenerativeUI DoesGenerativeUI is a two-pane experience:
It talks to a backend endpoint that streams AI SDK UIMessage responses and json-render patch parts. For React-based modes, it compiles child-based json-render specs into adapter payloads before previewing them.
Default backend route shape:
/v1/ai/generate-ui/:mode
You can change that with endpointBasePath.
dashboardwidgetdata-gridformemailpdfimageAdapter requirements:
dashboard -> requires adapters.dashboardwidget -> requires adapters.widgetdata-grid -> requires adapters.widgetform -> requires adapters.formemail, pdf, image -> no React adapter requiredimport {
GenerativeUI,
type FormAdapterProps,
type SmartCanvasValue,
type SmartCanvasWidget,
} from "@docyrus/generative-ui";
function DashboardAdapter({ value }: { value: SmartCanvasValue }) {
return <pre>{JSON.stringify(value, null, 2)}</pre>;
}
function WidgetAdapter({ widget }: { widget: SmartCanvasWidget }) {
return <pre>{JSON.stringify(widget, null, 2)}</pre>;
}
function FormAdapter({ definition }: FormAdapterProps) {
return <pre>{JSON.stringify(definition, null, 2)}</pre>;
}
export function Example() {
return (
<GenerativeUI
modes={["dashboard", "widget", "data-grid", "form", "email", "pdf", "image"]}
adapters={{
dashboard: DashboardAdapter,
widget: WidgetAdapter,
form: FormAdapter,
}}
endpointBasePath="/v1/ai/generate-ui"
defaultMode="dashboard"
className="h-[900px]"
/>
);
}
GenerativeUI Propsinterface GenerativeUIProps {
modes?: GenerativeUIMode[];
defaultMode?: GenerativeUIMode;
chatSurfaceMode?: "fixed" | "floating";
endpointBasePath?: string;
floatingPlaceholder?: string;
adapters?: {
dashboard?: DashboardAdapter;
widget?: WidgetAdapter;
form?: FormAdapter;
};
className?: string;
onModeChange?: (mode: GenerativeUIMode) => void;
}
Notes:
modes is omitted, the component enables all supported modes it can satisfy from the provided adaptersdata-grid reuses the widget adapter because its compiled output is still a SmartCanvasWidgetchatSurfaceMode="floating" is useful when embedding the generator as an assistant-style overlayThe model does not directly generate the final adapter payloads for the React modes.
Instead, the flow is:
This is why the package exports both:
Component:
GenerativeUIRegistry helpers:
createDashboardRegistrycreateWidgetRegistrycreateFormRegistryCompile helpers and adapter-spec helpers:
compileDashboardSpeccompileWidgetSpeccompileDataGridSpeccompileFormSpeccreateDashboardAdapterSpeccreateWidgetAdapterSpeccreateDataGridAdapterSpeccreateFormAdapterSpecCatalogs and schemas:
dashboardCatalogwidgetCatalogdataGridCatalogformCatalogdashboardSchemawidgetSchemadataGridSchemaformSchemaTypes:
GenerativeUIModeSmartCanvasWidgetSmartCanvasValueGeneratedFormDefinitionGeneratedFormFieldDashboardAdapterPropsWidgetAdapterPropsFormAdapterPropsFor best results, pair this package with a backend that uses @docyrus/generative-ui-core.
The backend should:
POST /v1/ai/generate-ui/:modeUIMessage responsesMinimal backend usage looks like:
import { getCatalogForMode, ROOT_ELEMENT_TYPES } from "@docyrus/generative-ui-core";
@docyrus/generative-ui-core InsteadUse core directly when you need:
SUPPORTED_MODESgetCatalogForMode()@docyrus/generative-ui-core for all non-React mode logic@json-render/image is involved@docyrus/generative-ui-core@json-render/core@json-render/react@json-render/react-email@json-render/react-pdf@json-render/imageFAQs
Generative UI package for Docyrus-backed JSON render experiences.
We found that @docyrus/generative-ui demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.