GNOMON UIDOCS / v0.1GITHUB
SECTIONS

INTEGRATION / SHARED CONTRACTGN / 03

One contract, every framework

Framework bindings translate composition conventions. Renderer bindings translate lifecycle. Neither may fork interaction state.

Core is the fixed point.

@gnomon-ui/core has no React, Vue, or Three dependency. It owns ordered items, selection, disabled-state rules, and input reasons.

Core
State, keyboard intent, subscriptions, and data-state values.
React
Spatial primitives, asChild composition, and external-store sync.
Vue
Matching primitives, v-model, provide/inject, and scoped slots.
Three
Renderer mount, value updates, pointer reports, and disposal.

React and Vue stay equivalent.

Both adapters emit the same semantic attributes and preserve controlled and uncontrolled state. Choose syntax based on the host application, not capability.

PARITY

React value and Vue v-model both map to the same core setOptions contract.

WebGL is optional.

The Three adapter is deliberately small. A renderer accepts a value, reports pointer-derived selection, and cleans up. Gnomon never owns your geometry, camera, or scene graph.

mountSpatialRenderer(host, ({ onValueChange }) => ({
  setValue(value, update) {
    scene.moveTo(value, { immediate: update?.immediate })
  },
  dispose() {
    scene.destroy()
  },
}))