createDock(options)
Creates and mounts an instance. Returns a Dock handle. Throws if the target cannot be resolved.
Options
target— element or selector to mount into. Required.theme— colour scheme. Defaults to"auto", which follows the OS preference.state— initial store contents. Defaults to an empty object.components— additional components to register beyond the built-ins.
Instance methods
dock.render(name, props)— render a registered component into the instance.dock.get(key)— read a value from the store.dock.set(key, value)— write a value and schedule a render.dock.on(event, handler)— subscribe to an instance event. Returns an unsubscribe function.dock.destroy()— tear the instance down and release all listeners.
Events
Instance events fire synchronously in the order listed below. Handlers that throw are logged and skipped; they do not stop the sequence.
mount— the instance has attached to its target.update— a batched write has been applied.render— the tree has been committed to the DOM.destroy— teardown has started.
Type exports
The package ships its own types. Dock, Registry, Selector, and SlotMap are all exported from the package root — there is no separate types entry point.