Appearance
Host authoring
A host connection exposes an opaque capability bag, optional neutral entity resolution and idempotent detach. DOM integrations narrow the bag to selection, binding, reflection, anchor, focus and viewport capabilities. Implement only supported features.
Identity is a stable business string or number. Translate host indices inside the adapter; do not expose row position as identity. Cache mappings where necessary so opening an edit does not scan the complete dataset. Return current anchors after redraw, and return null when a field is not rendered.
Reflection methods return promises and display the complete canonical entity, including removal of obsolete properties. Detect missing targets, duplicate keys and host index changes. Reflection follows server commit; failure must remain a display error rather than a server rollback. Suppress external change notifications generated by the adapter's own reflection.
External refresh callbacks can invoke editor.notifyExternalEntity or notifyExternalRemoval. Keep independent immutable baselines when the host mutates its data in place. Detach removes only the adapter's own listeners and leaves the host instance under application ownership.
The reusable behavioral suite in tests/host-contract/suite.ts runs against real DataTables and Tabulator harnesses. New integrations should provide equivalent create, update, remove, selection, sort, notification and cleanup behavior using their actual APIs. Tests and examples consume public exports, and production packages never depend on test helpers.
A host may implement reflection.reflectMany(updates) to apply multiple { previous, current } replacements with one redraw. The runtime commits canonical entity state before invoking this method. One rejection reports a reflection failure for the affected group; server persistence remains committed. Hosts without this capability receive sequential single-entity reflection calls.