# makeHydrateContext

Creates a hydration context starting from a root element.

This context allows the renderer to "attach" to existing DOM nodes (SSR output)
instead of creating new ones.

## Signatures

```ts
export declare const makeHydrateContext: (rootElement: HTMLElement) => Context.Context<never>;
```

## Why

Hydration is an opt-in context derived from Typed's versioned boundary
markers. If `rootElement` is not a compatible hydration root, this function
returns `Context.empty()` so DOM rendering performs a fresh construction; it
does not promise to adopt arbitrary markup or sanitize it.

## Ownership and lifetime

The returned Context only describes the starting cursor. The Scope running
`render` owns adopted-node updates, listeners, subscriptions, and cleanup.
Existing DOM identity is preserved only for successfully matched ranges.

## Examples

```ts
import { makeHydrateContext } from "@typed/template/HydrateContext"

const services = makeHydrateContext(document.querySelector("#app")!)
```
