Skip to content

03 — Add shared bindable component metadata contracts #49

Description

@artiphishle

Goal

Define the shared type-only metadata contracts that UI libraries such as ZORA can use to declare which component props and events are bindable.

ZORA should export concrete metadata. Studio should consume that metadata. Runtime should resolve concrete bindings. The shared shape belongs in @ankhorage/contracts.

Scope

Add bindable component metadata contracts to @ankhorage/contracts.

Required concepts

  • BindableComponentMeta
  • BindablePropMeta
  • BindableEventMeta
  • BindableValueType
  • BindableEventPayloadMeta
  • ComponentTypeId
  • label/description fields for authoring UI
  • optional compatibility/value-type hints

Design requirements

  • Metadata is serializable/type-only.
  • Metadata does not import React.
  • Metadata does not import React Native.
  • Metadata does not import Studio.
  • Metadata does not import Runtime.
  • Metadata describes component types, not concrete component instances.
  • Concrete component instance bindings remain separate.

No legacy / no deprecation rule

This is a new metadata model. Use final clean names only.

Do not add deprecated metadata names, aliases, or compatibility wrappers.

Implementation tasks

  • Define component type ID/reference contracts.
  • Define bindable component metadata contract.
  • Define bindable prop metadata contract.
  • Define bindable event metadata contract.
  • Define bindable value type model.
  • Define event payload metadata model.
  • Add compile examples for Text, Button, Input, Select, and Image metadata.
  • Export contracts cleanly.

Acceptance criteria

  • ZORA can import the shared metadata types and export concrete component metadata.
  • Studio can consume metadata without importing component internals.
  • Metadata can represent prop and event binding points.
  • Metadata remains UI-framework-independent.
  • bun run build, bun run lint:fix, and bun run test pass.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions