@hanzo/ui

Catalog

import { defaultA2UICatalog } from '@hanzo/ui/a2ui'

No examples yet.

Types

export interface A2UIComponentRenderProps {
  node: A2UIComponentNode
  surfaceId: string
  dataModel: Record<string, unknown>
  basePath?: string
  readOnly?: boolean
  errors?: string[]
  /** Render another component by ID (optionally scoped to a relative `basePath`). */
  renderChild: (childId: string, scopedBasePath?: string) => ReactNode
  /** Update the surface `dataModel` at an RFC 6901 JSON Pointer. */
  setData: (path: string, value: unknown) => void
  /** Dispatch a zero-trust A2UI action event. */
  dispatchAction: (action: A2UIAction, sourceComponentId: string, basePath?: string) => void
}
export type A2UIComponentRenderer = React.ComponentType<A2UIComponentRenderProps>
export type A2UICatalog = Record<string, A2UIComponentRenderer>

Exports

defaultA2UICatalogtype A2UICatalogtype A2UIComponentRenderPropstype A2UIComponentRenderer