# Data, search, editor, and components

Use paged `api.search`, `api.metadata`, `api.notes`, and `api.assets`; never walk
the vault or query an index directly. Preserve opaque property/body revisions
and handle `stale` outcomes rather than overwriting. Batch property mutations
in at most 100 operations and retain every per-item result.

Native plugins can mount host-owned SearchView, note editor, and Markdown
components. Handles are imperative and must be destroyed. The editor owns its
live-document lease; plugins never receive CodeMirror or Yjs internals.
Markdown needs an explicit source-note context and interaction policy.

Sandboxed and live runtimes use the serializable API. Live views publish
bounded declarative trees; sandboxed pages own only their iframe DOM.
Subscriptions, cursors, watches, jobs, requests, and mounted handles belong to
the plugin lifecycle and must be released on teardown.
