# Canvas and runtime types

These contracts describe Pibbl's Canvas host, root-surface configuration, and
the stable values returned by its runtime and state APIs. Import them with
`type` from `@pibbl/core`.

## Canvas

`Canvas` is the supported host union: `HTMLCanvasElement | OffscreenCanvas`.
Pibbl owns at most one live mount for a host Canvas.

## PibblAnimatedValueOptions

`PibblAnimatedValueOptions<T>` supplies an animation definition or pure factory,
optional initial value, equality comparison, and diagnostic label.

## PibblAnimationDefinition

`PibblAnimationDefinition<T>` is an opaque immutable value description without a
clock or output binding.

## PibblAnimationOptions

`PibblAnimationOptions<T>` configures `defineAnimation` with a finite duration,
synchronous sampler, and optional debug name.

## PibblAnimationProgram

`PibblAnimationProgram` is an opaque immutable composition of tracks, sequences,
parallel work, waits, markers, and repeats.

## PibblAnimationRepeatDirection

`PibblAnimationRepeatDirection` is `normal`, `reverse`, `alternate`, or
`alternate-reverse`.

## PibblAnimationRepeatOptions

`PibblAnimationRepeatOptions` supplies a positive iteration count or infinity and
an optional repeat direction.

## PibblAnimationSampleInput

`PibblAnimationSampleInput<T>` gives a custom sampler its activation value, local
time, and normalized progress.

## PibblAnimationTarget

`PibblAnimationTarget<T>` provides `from`, `to`, and optional committed spring
`velocity` to a custom animation factory.

## PibblConfig

`PibblConfig` selects either the fixed logical viewport configuration or the
responsive viewport configuration. The first `pibbl()` mount owns this choice.

## PibblController

`PibblController` is the stable controller returned by `pibbl()`. Its `dispose()`
method is idempotent and releases runtime-owned resources for that mount.

## PibblEasing

`PibblEasing` maps normalized progress to interpolation progress.

## PibblFit

`PibblFit` is the fixed-surface fitting mode. Fixed roots use centered `contain`
by default; the logical viewport remains distinct from CSS and backing pixels.

## PibblFixedViewportConfig

`PibblFixedViewportConfig` configures a fixed logical viewport with optional `fit`, `pixelRatio`, and `signal`. Omitting it captures the Canvas's initial logical
dimensions; the signal can abort runtime ownership.

## PibblInterpolator

`PibblInterpolator<T>` produces a typed value between `from` and `to` for a
normalized progress value.

## PibblKeyframesOptions

`PibblKeyframesOptions<T>` supplies at least two values, duration, optional
offsets/easing/interpolator, and a debug name.

## PibblPixelRatio

`PibblPixelRatio` describes the backing-pixel density policy. It keeps logical
geometry independent from the Canvas backing-store density.

## PibblPlayback

`PibblPlayback` exposes readonly `status` and `currentTime` signals plus stable
play, pause, resume, cancel, finish, seek, reverse, and playback-rate controls.

## PibblPlaybackEvent

`PibblPlaybackEvent` describes start, iteration, marker, finish, and cancel
milestones delivered after rendering during Complete.

## PibblPlaybackOptions

`PibblPlaybackOptions` configures autoplay, conflict policy, debug name,
milestone delivery, and isolated error handling.

## PibblPlaybackStatus

`PibblPlaybackStatus` is `idle`, `scheduled`, `running`, `paused`, `finished`,
`cancelled`, or `disposed`.

## PibblReactionOptions

`PibblReactionOptions` accepts an optional debug name for a component-owned
`useReaction` lifecycle.

## PibblRef

`PibblRef<T>` is the stable mutable `{ current }` object returned by `useRef`.
Writing `current` does not schedule rendering and its lifetime is one component
identity.

## PibblRenderLayerComponentProps

`PibblRenderLayerComponentProps` supplies the style and normal Pibbl event, focus,
and participation fields reserved by a render layer.

## PibblRenderLayerContext

`PibblRenderLayerContext` exposes the layer's owned `OffscreenCanvas`, current
resolved size, and a coalesced invalidation callback.

## PibblRenderLayerDefinition

`PibblRenderLayerDefinition` describes synchronous create, update, resize,
render, and optional disposal callbacks for an external raster layer.

## PibblRenderLayerFrame

`PibblRenderLayerFrame` provides Pibbl logical frame time, delta, and next-frame
invalidation to one render callback.

## PibblRenderLayerHit

`PibblRenderLayerHit<Target>` reports a layer-local miss, an occluding block, or
a registered application target identity.

## PibblRenderLayerInput

`PibblRenderLayerInput<Target>` delivers coordinate input only after the layer
wins global reverse-paint arbitration, with layer-local coordinates and
winner-owned pointer capture controls.

## PibblRenderLayerInteraction

`PibblRenderLayerInteraction<Props, Resources, Target>` settles the interaction
snapshot that commits transactionally with a candidate bitmap.

## PibblRenderLayerInteractionSnapshot

`PibblRenderLayerInteractionSnapshot<Target>` contains one generation's target
declarations, hit test, and optional winner input handler.

## PibblRenderLayerProps

`PibblRenderLayerProps<Props>` combines custom layer props with the reserved Pibbl
component fields and rejects reserved custom names.

## PibblRenderLayerSize

`PibblRenderLayerSize` records logical and backing dimensions plus effective
pixel ratios for one layer frame.

## PibblRenderLayerStyle

`PibblRenderLayerStyle` is the local box, layout, and filter style accepted by a
render layer.

## PibblRenderLayerTarget

`PibblRenderLayerTarget<Target>` associates a stable application identity with
Pibbl handlers, cursor participation, and optional focus geometry.

## PibblResponsiveViewportConfig

`PibblResponsiveViewportConfig` is `{ viewport: "responsive", pixelRatio?,
signal? }`. Its logical root follows CSS content-box pixels instead of a fixed
captured viewport.

## PibblSpringOptions

`PibblSpringOptions` configures a number-only analytic spring and its rest bounds.

## PibblStepperOptions

`PibblStepperOptions<State, T>` supplies the fixed step, state initialization,
step/read callbacks, optional completion predicate, elapsed clamp, and debug
name.

## PibblTweenOptions

`PibblTweenOptions<T>` supplies `to`, optional `from`, duration, easing,
interpolator, and debug name.

## RenderingContext2D

`RenderingContext2D` is the 2D-context union for the supported Canvas hosts.
`useCanvasContext()` exposes it only while a Pibbl component is rendering.

## Signal

`Signal<T>` is a nominal readonly value with an explicit `get(): T` method.

## SignalEquals

`SignalEquals<T>` compares the previous and candidate values. Pibbl uses
`Object.is` when no custom equality function is supplied.

## SignalOptions

`SignalOptions<T>` accepts an optional equality function and debug name.

## WritableSignal

`WritableSignal<T>` adds `set(value)`, `update(updater)`, and cached
`asReadonly()` to `Signal<T>`. `set()` treats functions as values.

## API details from source

<span id="api-Signal"></span>

### Signal

A readonly reactive value; get records a dependency when called by a tracked consumer.

```ts
interface Signal<T>
```

Related API: [Signal](/reference/types/canvas-runtime/#signal).

#### See also

[SignalValue](/reference/types/signal-inputs/#signalvalue)

[WritableSignal](/reference/types/canvas-runtime/#writablesignal)

[computed](/reference/functions/computed/)

[View source — packages/core/src/lib/signals/types.ts:38](/source/packages/core/src/lib/signals/types-ts/#L38)

#### Properties and methods

<span id="api-Signal-get"></span>
<details>
<summary>get</summary>


```ts
get: () => T
```

Reads the current value and records a dependency in the active tracked consumer. See
Signal.

##### Returns

The current value, recording a dependency when called from a tracked consumer.

[View source — packages/core/src/lib/signals/types.ts:45](/source/packages/core/src/lib/signals/types-ts/#L45)

</details>

<span id="api-SignalEquals"></span>

### SignalEquals

Compares previous and next values to decide whether a signal change should be published.

```ts
type SignalEquals<T> = (previous: T, next: T) => boolean
```

Related API: [SignalEquals](/reference/types/canvas-runtime/#signalequals).

#### Parameters

- **`previous`** — Previously stored value.

- **`next`** — Proposed replacement value.

#### Returns

True when the values are equivalent and a change should be suppressed.

#### See also

[SignalOptions](/reference/types/canvas-runtime/#signaloptions)

[View source — packages/core/src/lib/signals/types.ts:13](/source/packages/core/src/lib/signals/types-ts/#L13)

<span id="api-SignalOptions"></span>

### SignalOptions

Equality comparison and diagnostic naming options for a signal.

```ts
interface SignalOptions<T>
```

Related API: [SignalOptions](/reference/types/canvas-runtime/#signaloptions).

#### See also

[SignalEquals](/reference/types/canvas-runtime/#signalequals)

[computed](/reference/functions/computed/)

[signal](/reference/functions/signal/)

[View source — packages/core/src/lib/signals/types.ts:24](/source/packages/core/src/lib/signals/types-ts/#L24)

#### Properties and methods

<span id="api-SignalOptions-equals"></span>
<details>
<summary>equals (optional)</summary>


```ts
equals?: SignalEquals<T> | undefined
```

Related API: [SignalEquals](/reference/types/canvas-runtime/#signalequals).

Compares old and new values to suppress equivalent updates; defaults to Object.is. See SignalEquals.

[View source — packages/core/src/lib/signals/types.ts:26](/source/packages/core/src/lib/signals/types-ts/#L26)

</details>

<span id="api-SignalOptions-debugName"></span>
<details>
<summary>debugName (optional)</summary>


```ts
debugName?: string | undefined
```

Optional label used in diagnostics. See SignalOptions.

[View source — packages/core/src/lib/signals/types.ts:28](/source/packages/core/src/lib/signals/types-ts/#L28)

</details>

<span id="api-WritableSignal"></span>

### WritableSignal

A signal with synchronous replacement and update operations and a readonly view.

```ts
interface WritableSignal<T> extends Signal<T>
```

Related API: [WritableSignal](/reference/types/canvas-runtime/#writablesignal), [Signal](/reference/types/canvas-runtime/#signal).

#### See also

[Signal](/reference/types/canvas-runtime/#signal)

[batch](/reference/functions/batch/)

[signal](/reference/functions/signal/)

[View source — packages/core/src/lib/signals/types.ts:64](/source/packages/core/src/lib/signals/types-ts/#L64)

#### Properties and methods

<span id="api-WritableSignal-set"></span>
<details>
<summary>set</summary>


```ts
set: (value: T) => void
```

Synchronously replaces the value, publishing only when the equality comparison reports a
change. See WritableSignal.

##### Parameters

- **`value`** — Replacement value to compare with the currently stored value.

[View source — packages/core/src/lib/signals/types.ts:70](/source/packages/core/src/lib/signals/types-ts/#L70)

</details>

<span id="api-WritableSignal-update"></span>
<details>
<summary>update</summary>


```ts
update: (update: (current: T) => T) => void
```

Computes a replacement from the current value and applies the signal's equality policy. See
WritableSignal.

##### Parameters

- **`update`** — Synchronous function receiving the current value and returning its
replacement.

[View source — packages/core/src/lib/signals/types.ts:77](/source/packages/core/src/lib/signals/types-ts/#L77)

</details>

<span id="api-WritableSignal-asReadonly"></span>
<details>
<summary>asReadonly</summary>


```ts
asReadonly: () => Signal<T>
```

Related API: [Signal](/reference/types/canvas-runtime/#signal).

Returns a readonly signal view of this same reactive value. See Signal.

##### Returns

A readonly view of the same signal, without set or update operations. See
[Signal](/reference/types/canvas-runtime/#signal) .

[View source — packages/core/src/lib/signals/types.ts:83](/source/packages/core/src/lib/signals/types-ts/#L83)

</details>

<span id="api-WritableSignal-get"></span>
<details>
<summary>get</summary>


```ts
get: () => T
```

Reads the current value and records a dependency in the active tracked consumer. See
Signal.

##### Returns

The current value, recording a dependency when called from a tracked consumer.

[View source — packages/core/src/lib/signals/types.ts:45](/source/packages/core/src/lib/signals/types-ts/#L45)

</details>

<span id="api-PibblAnimationDefinition"></span>

### PibblAnimationDefinition

An opaque, immutable description of an animation value.

```ts
interface PibblAnimationDefinition<T>
```

Related API: [PibblAnimationDefinition](/reference/types/canvas-runtime/#pibblanimationdefinition).

#### See also

[defineAnimation](/reference/functions/define-animation/)

[keyframes](/reference/functions/keyframes/)

[spring](/reference/functions/spring/)

[View source — packages/core/src/lib/animation/types.ts:41](/source/packages/core/src/lib/animation/types-ts/#L41)

<span id="api-PibblAnimationOptions"></span>

### PibblAnimationOptions

Duration and sampling callback for a custom seekable animation definition.

```ts
interface PibblAnimationOptions<T>
```

Related API: [PibblAnimationOptions](/reference/types/canvas-runtime/#pibblanimationoptions).

#### See also

[PibblAnimationSampleInput](/reference/types/canvas-runtime/#pibblanimationsampleinput)

[defineAnimation](/reference/functions/define-animation/)

[View source — packages/core/src/lib/animation/types.ts:234](/source/packages/core/src/lib/animation/types-ts/#L234)

#### Properties and methods

<span id="api-PibblAnimationOptions-duration"></span>
<details>
<summary>duration</summary>


```ts
readonly duration: number
```

Duration of the animation or transition in milliseconds. See PibblAnimationOptions.

[View source — packages/core/src/lib/animation/types.ts:236](/source/packages/core/src/lib/animation/types-ts/#L236)

</details>

<span id="api-PibblAnimationOptions-sample"></span>
<details>
<summary>sample</summary>


```ts
readonly sample: (input: PibblAnimationSampleInput<T>) => T
```

Related API: [PibblAnimationSampleInput](/reference/types/canvas-runtime/#pibblanimationsampleinput).

Samples a value from the captured initial value, local time, and normalized progress. See
PibblAnimationSampleInput.

##### Parameters

- **`input`** — Logical sample time, progress, and value captured at the start of the run. See
[PibblAnimationSampleInput](/reference/types/canvas-runtime/#pibblanimationsampleinput) .

##### Returns

The value to publish for this sample.

[View source — packages/core/src/lib/animation/types.ts:244](/source/packages/core/src/lib/animation/types-ts/#L244)

</details>

<span id="api-PibblAnimationOptions-debugName"></span>
<details>
<summary>debugName (optional)</summary>


```ts
readonly debugName?: string | undefined
```

Optional label used in diagnostics. See PibblAnimationOptions.

[View source — packages/core/src/lib/animation/types.ts:246](/source/packages/core/src/lib/animation/types-ts/#L246)

</details>

<span id="api-PibblAnimationProgram"></span>

### PibblAnimationProgram

An opaque, immutable composition of animation definitions.

```ts
interface PibblAnimationProgram
```

Related API: [PibblAnimationProgram](/reference/types/canvas-runtime/#pibblanimationprogram).

#### See also

[marker](/reference/functions/marker/)

[parallel](/reference/functions/parallel/)

[repeat](/reference/functions/repeat/)

[View source — packages/core/src/lib/animation/types.ts:52](/source/packages/core/src/lib/animation/types-ts/#L52)

<span id="api-PibblAnimationRepeatDirection"></span>

### PibblAnimationRepeatDirection

Playback direction across iterations, including reversed and alternating runs.

```ts
type PibblAnimationRepeatDirection = | 'normal'
  | 'reverse'
  | 'alternate'
  | 'alternate-reverse'
```

Related API: [PibblAnimationRepeatDirection](/reference/types/canvas-runtime/#pibblanimationrepeatdirection).

#### See also

[PibblAnimationRepeatOptions](/reference/types/canvas-runtime/#pibblanimationrepeatoptions)

[View source — packages/core/src/lib/animation/types.ts:61](/source/packages/core/src/lib/animation/types-ts/#L61)

<span id="api-PibblAnimationRepeatOptions"></span>

### PibblAnimationRepeatOptions

Count and direction controls for a repeated animation program.

```ts
interface PibblAnimationRepeatOptions
```

Related API: [PibblAnimationRepeatOptions](/reference/types/canvas-runtime/#pibblanimationrepeatoptions).

#### See also

[PibblAnimationRepeatDirection](/reference/types/canvas-runtime/#pibblanimationrepeatdirection)

[repeat](/reference/functions/repeat/)

[View source — packages/core/src/lib/animation/types.ts:73](/source/packages/core/src/lib/animation/types-ts/#L73)

#### Properties and methods

<span id="api-PibblAnimationRepeatOptions-iterations"></span>
<details>
<summary>iterations</summary>


```ts
readonly iterations: number
```

Number of times the program is repeated. See PibblAnimationRepeatOptions.

[View source — packages/core/src/lib/animation/types.ts:75](/source/packages/core/src/lib/animation/types-ts/#L75)

</details>

<span id="api-PibblAnimationRepeatOptions-direction"></span>
<details>
<summary>direction (optional)</summary>


```ts
readonly direction?: PibblAnimationRepeatDirection | undefined
```

Related API: [PibblAnimationRepeatDirection](/reference/types/canvas-runtime/#pibblanimationrepeatdirection).

Direction in which this operation proceeds. See PibblAnimationRepeatDirection.

[View source — packages/core/src/lib/animation/types.ts:77](/source/packages/core/src/lib/animation/types-ts/#L77)

</details>

<span id="api-PibblAnimationSampleInput"></span>

### PibblAnimationSampleInput

Time and endpoint values supplied when sampling a seekable animation definition.

```ts
interface PibblAnimationSampleInput<T>
```

Related API: [PibblAnimationSampleInput](/reference/types/canvas-runtime/#pibblanimationsampleinput).

#### See also

[PibblAnimationOptions](/reference/types/canvas-runtime/#pibblanimationoptions)

[View source — packages/core/src/lib/animation/types.ts:210](/source/packages/core/src/lib/animation/types-ts/#L210)

#### Properties and methods

<span id="api-PibblAnimationSampleInput-initialValue"></span>
<details>
<summary>initialValue</summary>


```ts
readonly initialValue: T
```

Value captured at the start of this animation sample's run. See
PibblAnimationSampleInput.

[View source — packages/core/src/lib/animation/types.ts:215](/source/packages/core/src/lib/animation/types-ts/#L215)

</details>

<span id="api-PibblAnimationSampleInput-localTime"></span>
<details>
<summary>localTime</summary>


```ts
readonly localTime: number
```

Elapsed logical time within the sampled animation, in milliseconds. See
PibblAnimationSampleInput.

[View source — packages/core/src/lib/animation/types.ts:220](/source/packages/core/src/lib/animation/types-ts/#L220)

</details>

<span id="api-PibblAnimationSampleInput-progress"></span>
<details>
<summary>progress</summary>


```ts
readonly progress: number
```

Normalized progress through the current animation or transition. See
PibblAnimationSampleInput.

[View source — packages/core/src/lib/animation/types.ts:225](/source/packages/core/src/lib/animation/types-ts/#L225)

</details>

<span id="api-PibblAnimatedValueOptions"></span>

### PibblAnimatedValueOptions

Definition-based target animation with mount-owned equality and initial presentation.

```ts
interface PibblAnimatedValueOptions<T>
```

Related API: [PibblAnimatedValueOptions](/reference/types/canvas-runtime/#pibblanimatedvalueoptions).

#### See also

[useAnimatedValue](/reference/hooks/use-animated-value/)

[PibblAnimationDefinition](/reference/types/canvas-runtime/#pibblanimationdefinition)

[View source — packages/core/src/lib/animation/types.ts:187](/source/packages/core/src/lib/animation/types-ts/#L187)

#### Properties and methods

<span id="api-PibblAnimatedValueOptions-animation"></span>
<details>
<summary>animation</summary>


```ts
readonly animation: PibblAnimationDefinition<T> | ((target: PibblAnimationTarget<T>) => PibblAnimationDefinition<T>)
```

Related API: [PibblAnimationDefinition](/reference/types/canvas-runtime/#pibblanimationdefinition), [PibblAnimationTarget](/reference/types/canvas-runtime/#pibblanimationtarget).

Immutable definition or pure factory receiving the hook-owned endpoints. Factories run
synchronously during render and cannot write signals or call hooks.

##### See also

[PibblAnimationTarget](/reference/types/canvas-runtime/#pibblanimationtarget)

[PibblAnimationDefinition](/reference/types/canvas-runtime/#pibblanimationdefinition)

##### Parameters

- **`target`** — Current endpoints and previous spring velocity. See [PibblAnimationTarget](/reference/types/canvas-runtime/#pibblanimationtarget).

##### Returns

A concrete animation definition. See [PibblAnimationDefinition](/reference/types/canvas-runtime/#pibblanimationdefinition).

[View source — packages/core/src/lib/animation/types.ts:196](/source/packages/core/src/lib/animation/types-ts/#L196)

</details>

<span id="api-PibblAnimatedValueOptions-equals"></span>
<details>
<summary>equals (optional)</summary>


```ts
readonly equals?: SignalEquals<T> | undefined
```

Related API: [SignalEquals](/reference/types/canvas-runtime/#signalequals).

Comparison used to suppress equal targets. See SignalEquals.

[View source — packages/core/src/lib/animation/types.ts:198](/source/packages/core/src/lib/animation/types-ts/#L198)

</details>

<span id="api-PibblAnimatedValueOptions-initial"></span>
<details>
<summary>initial (optional)</summary>


```ts
readonly initial?: T | undefined
```

Initial presented value; omitted initial values present the target without entrance motion. See useAnimatedValue.

[View source — packages/core/src/lib/animation/types.ts:200](/source/packages/core/src/lib/animation/types-ts/#L200)

</details>

<span id="api-PibblAnimatedValueOptions-debugName"></span>
<details>
<summary>debugName (optional)</summary>


```ts
readonly debugName?: string | undefined
```

Optional playback diagnostic label. See useAnimatedValue.

[View source — packages/core/src/lib/animation/types.ts:202](/source/packages/core/src/lib/animation/types-ts/#L202)

</details>

<span id="api-PibblAnimationTarget"></span>

### PibblAnimationTarget

Current endpoints and optional committed spring velocity supplied to an animation factory.

```ts
interface PibblAnimationTarget<T>
```

Related API: [PibblAnimationTarget](/reference/types/canvas-runtime/#pibblanimationtarget).

#### See also

[PibblAnimatedValueOptions](/reference/types/canvas-runtime/#pibblanimatedvalueoptions)

[View source — packages/core/src/lib/animation/types.ts:173](/source/packages/core/src/lib/animation/types-ts/#L173)

#### Properties and methods

<span id="api-PibblAnimationTarget-from"></span>
<details>
<summary>from</summary>


```ts
readonly from: T
```

Last presented value, or the explicit mount initial value. See useAnimatedValue.

[View source — packages/core/src/lib/animation/types.ts:175](/source/packages/core/src/lib/animation/types-ts/#L175)

</details>

<span id="api-PibblAnimationTarget-to"></span>
<details>
<summary>to</summary>


```ts
readonly to: T
```

Latest requested target. See useAnimatedValue.

[View source — packages/core/src/lib/animation/types.ts:177](/source/packages/core/src/lib/animation/types-ts/#L177)

</details>

<span id="api-PibblAnimationTarget-velocity"></span>
<details>
<summary>velocity (optional)</summary>


```ts
readonly velocity?: number | undefined
```

Committed analytic spring velocity, when the previous run is a spring. See spring.

[View source — packages/core/src/lib/animation/types.ts:179](/source/packages/core/src/lib/animation/types-ts/#L179)

</details>

<span id="api-PibblPlayback"></span>

### PibblPlayback

Mount-owned playback controls and reactive status/time for an animation program.

```ts
interface PibblPlayback
```

Related API: [PibblPlayback](/reference/types/canvas-runtime/#pibblplayback).

#### See also

[PibblPlaybackStatus](/reference/types/canvas-runtime/#pibblplaybackstatus)

[usePlayback](/reference/hooks/use-playback/)

[Signal](/reference/types/canvas-runtime/#signal)

[View source — packages/core/src/lib/animation/types.ts:340](/source/packages/core/src/lib/animation/types-ts/#L340)

#### Properties and methods

<span id="api-PibblPlayback-status"></span>
<details>
<summary>status</summary>


```ts
readonly status: Signal<PibblPlaybackStatus>
```

Related API: [Signal](/reference/types/canvas-runtime/#signal), [PibblPlaybackStatus](/reference/types/canvas-runtime/#pibblplaybackstatus).

Reactive lifecycle state of the mounted playback. See PibblPlaybackStatus.

[View source — packages/core/src/lib/animation/types.ts:342](/source/packages/core/src/lib/animation/types-ts/#L342)

</details>

<span id="api-PibblPlayback-currentTime"></span>
<details>
<summary>currentTime</summary>


```ts
readonly currentTime: Signal<number>
```

Related API: [Signal](/reference/types/canvas-runtime/#signal).

Reactive logical playback position in milliseconds. See PibblPlayback.

[View source — packages/core/src/lib/animation/types.ts:344](/source/packages/core/src/lib/animation/types-ts/#L344)

</details>

<span id="api-PibblPlayback-play"></span>
<details>
<summary>play</summary>


```ts
play: (options?: { readonly conflict?: 'error' | 'replace'; }) => void
```

Queues playback startup with an optional conflicting-writer replacement policy. See
PibblPlayback.

##### Parameters

- **`options`** — Writer-conflict policy; replacement must be explicitly requested.

[View source — packages/core/src/lib/animation/types.ts:351](/source/packages/core/src/lib/animation/types-ts/#L351)

</details>

<span id="api-PibblPlayback-pause"></span>
<details>
<summary>pause</summary>


```ts
pause: () => void
```

Queues a pause without discarding the current playback position. See PibblPlayback.

[View source — packages/core/src/lib/animation/types.ts:356](/source/packages/core/src/lib/animation/types-ts/#L356)

</details>

<span id="api-PibblPlayback-resume"></span>
<details>
<summary>resume</summary>


```ts
resume: () => void
```

Queues resumption from the paused playback position. See PibblPlayback.

[View source — packages/core/src/lib/animation/types.ts:358](/source/packages/core/src/lib/animation/types-ts/#L358)

</details>

<span id="api-PibblPlayback-cancel"></span>
<details>
<summary>cancel</summary>


```ts
cancel: () => void
```

Queues cancellation and release of the program's writer leases. See PibblPlayback.

[View source — packages/core/src/lib/animation/types.ts:360](/source/packages/core/src/lib/animation/types-ts/#L360)

</details>

<span id="api-PibblPlayback-finish"></span>
<details>
<summary>finish</summary>


```ts
finish: () => void
```

Queues completion at the program's terminal value when supported. See PibblPlayback.

[View source — packages/core/src/lib/animation/types.ts:362](/source/packages/core/src/lib/animation/types-ts/#L362)

</details>

<span id="api-PibblPlayback-seek"></span>
<details>
<summary>seek</summary>


```ts
seek: (milliseconds: number) => void
```

Queues a change to the playback's logical position in milliseconds. See PibblPlayback.

##### Parameters

- **`milliseconds`** — Logical playback position in milliseconds.

[View source — packages/core/src/lib/animation/types.ts:367](/source/packages/core/src/lib/animation/types-ts/#L367)

</details>

<span id="api-PibblPlayback-reverse"></span>
<details>
<summary>reverse</summary>


```ts
reverse: () => void
```

Queues reversal of the playback direction. See PibblPlayback.

[View source — packages/core/src/lib/animation/types.ts:369](/source/packages/core/src/lib/animation/types-ts/#L369)

</details>

<span id="api-PibblPlayback-setPlaybackRate"></span>
<details>
<summary>setPlaybackRate</summary>


```ts
setPlaybackRate: (rate: number) => void
```

Queues a change to the rate at which logical playback time advances. See PibblPlayback.

##### Parameters

- **`rate`** — Playback speed multiplier.

[View source — packages/core/src/lib/animation/types.ts:374](/source/packages/core/src/lib/animation/types-ts/#L374)

</details>

<span id="api-PibblPlaybackEvent"></span>

### PibblPlaybackEvent

Playback milestone information delivered after the scheduler completes the frame.

```ts
interface PibblPlaybackEvent
```

Related API: [PibblPlaybackEvent](/reference/types/canvas-runtime/#pibblplaybackevent).

#### See also

[PibblPlaybackOptions](/reference/types/canvas-runtime/#pibblplaybackoptions)

[View source — packages/core/src/lib/animation/types.ts:313](/source/packages/core/src/lib/animation/types-ts/#L313)

#### Properties and methods

<span id="api-PibblPlaybackEvent-type"></span>
<details>
<summary>type</summary>


```ts
readonly type: "cancel" | "finish" | "iteration" | "marker" | "start"
```

Related API: [marker](/reference/functions/marker/).

Selects `"start"` , `"iteration"` , `"marker"` , `"finish"` , `"cancel"` for type. See
PibblPlaybackEvent.

[View source — packages/core/src/lib/animation/types.ts:318](/source/packages/core/src/lib/animation/types-ts/#L318)

</details>

<span id="api-PibblPlaybackEvent-logicalTime"></span>
<details>
<summary>logicalTime</summary>


```ts
readonly logicalTime: number
```

Logical scheduler time in milliseconds. See PibblPlaybackEvent.

[View source — packages/core/src/lib/animation/types.ts:320](/source/packages/core/src/lib/animation/types-ts/#L320)

</details>

<span id="api-PibblPlaybackEvent-frameId"></span>
<details>
<summary>frameId</summary>


```ts
readonly frameId: number
```

Identifier of the shared scheduler frame. See PibblPlaybackEvent.

[View source — packages/core/src/lib/animation/types.ts:322](/source/packages/core/src/lib/animation/types-ts/#L322)

</details>

<span id="api-PibblPlaybackEvent-programPath"></span>
<details>
<summary>programPath</summary>


```ts
readonly programPath: readonly number[]
```

Indices identifying the program node that produced this event. See PibblPlaybackEvent.

[View source — packages/core/src/lib/animation/types.ts:326](/source/packages/core/src/lib/animation/types-ts/#L326)

</details>

<span id="api-PibblPlaybackEvent-iteration"></span>
<details>
<summary>iteration</summary>


```ts
readonly iteration: number
```

Index of the current repetition. See PibblPlaybackEvent.

[View source — packages/core/src/lib/animation/types.ts:328](/source/packages/core/src/lib/animation/types-ts/#L328)

</details>

<span id="api-PibblPlaybackEvent-marker"></span>
<details>
<summary>marker (optional)</summary>


```ts
readonly marker?: string | undefined
```

Related API: [marker](/reference/functions/marker/).

Name or source marker identifying this milestone. See PibblPlaybackEvent.

[View source — packages/core/src/lib/animation/types.ts:330](/source/packages/core/src/lib/animation/types-ts/#L330)

</details>

<span id="api-PibblPlaybackOptions"></span>

### PibblPlaybackOptions

Playback startup, writer replacement, and lifecycle callback configuration.

```ts
interface PibblPlaybackOptions
```

Related API: [PibblPlaybackOptions](/reference/types/canvas-runtime/#pibblplaybackoptions).

#### See also

[PibblPlaybackEvent](/reference/types/canvas-runtime/#pibblplaybackevent)

[View source — packages/core/src/lib/animation/types.ts:382](/source/packages/core/src/lib/animation/types-ts/#L382)

#### Properties and methods

<span id="api-PibblPlaybackOptions-autoplay"></span>
<details>
<summary>autoplay (optional)</summary>


```ts
readonly autoplay?: boolean | undefined
```

Whether playback is requested automatically when the owner mounts. See
PibblPlaybackOptions.

[View source — packages/core/src/lib/animation/types.ts:387](/source/packages/core/src/lib/animation/types-ts/#L387)

</details>

<span id="api-PibblPlaybackOptions-conflict"></span>
<details>
<summary>conflict (optional)</summary>


```ts
readonly conflict?: "error" | "replace" | undefined
```

Selects `"error"`, `"replace"` for conflict. See PibblPlaybackOptions.

[View source — packages/core/src/lib/animation/types.ts:389](/source/packages/core/src/lib/animation/types-ts/#L389)

</details>

<span id="api-PibblPlaybackOptions-debugName"></span>
<details>
<summary>debugName (optional)</summary>


```ts
readonly debugName?: string | undefined
```

Optional label used in diagnostics. See PibblPlaybackOptions.

[View source — packages/core/src/lib/animation/types.ts:391](/source/packages/core/src/lib/animation/types-ts/#L391)

</details>

<span id="api-PibblPlaybackOptions-onEvent"></span>
<details>
<summary>onEvent (optional)</summary>


```ts
readonly onEvent?: ((event: PibblPlaybackEvent) => void) | undefined
```

Related API: [PibblPlaybackEvent](/reference/types/canvas-runtime/#pibblplaybackevent).

Receives lifecycle and milestone notifications. See PibblPlaybackEvent.

##### Parameters

- **`event`** — Playback milestone or lifecycle event delivered during Complete. See
[PibblPlaybackEvent](/reference/types/canvas-runtime/#pibblplaybackevent) .

[View source — packages/core/src/lib/animation/types.ts:397](/source/packages/core/src/lib/animation/types-ts/#L397)

</details>

<span id="api-PibblPlaybackOptions-onError"></span>
<details>
<summary>onError (optional)</summary>


```ts
readonly onError?: ((error: unknown) => void) | undefined
```

Receives failures reported by the owning runtime resource. See PibblPlaybackOptions.

##### Parameters

- **`error`** — Failure reported by playback.

[View source — packages/core/src/lib/animation/types.ts:402](/source/packages/core/src/lib/animation/types-ts/#L402)

</details>

<span id="api-PibblPlaybackStatus"></span>

### PibblPlaybackStatus

The current lifecycle state of an animation playback.

```ts
type PibblPlaybackStatus = | 'idle'
  | 'scheduled'
  | 'running'
  | 'paused'
  | 'finished'
  | 'cancelled'
  | 'disposed'
```

Related API: [PibblPlaybackStatus](/reference/types/canvas-runtime/#pibblplaybackstatus).

#### See also

[PibblPlayback](/reference/types/canvas-runtime/#pibblplayback)

[View source — packages/core/src/lib/animation/types.ts:299](/source/packages/core/src/lib/animation/types-ts/#L299)

<span id="api-PibblEasing"></span>

### PibblEasing

Maps normalized animation progress to an interpolation progress.

```ts
type PibblEasing = (progress: number) => number
```

Related API: [PibblEasing](/reference/types/canvas-runtime/#pibbleasing).

#### Parameters

- **`progress`** — Normalized input progress.

#### Returns

Eased progress used for interpolation.

#### See also

[PibblKeyframesOptions](/reference/types/canvas-runtime/#pibblkeyframesoptions)

[PibblTweenOptions](/reference/types/canvas-runtime/#pibbltweenoptions)

[View source — packages/core/src/lib/animation/types.ts:19](/source/packages/core/src/lib/animation/types-ts/#L19)

<span id="api-PibblInterpolator"></span>

### PibblInterpolator

Produces an in-between value for a normalized interpolation progress.

```ts
type PibblInterpolator<T> = (from: T, to: T, progress: number) => T
```

Related API: [PibblInterpolator](/reference/types/canvas-runtime/#pibblinterpolator).

#### Parameters

- **`from`** — Value at the start of the interpolation.

- **`to`** — Value at the end of the interpolation.

- **`progress`** — Interpolation progress after easing.

#### Returns

The interpolated value.

#### See also

[PibblKeyframesOptions](/reference/types/canvas-runtime/#pibblkeyframesoptions)

[PibblTweenOptions](/reference/types/canvas-runtime/#pibbltweenoptions)

[View source — packages/core/src/lib/animation/types.ts:32](/source/packages/core/src/lib/animation/types-ts/#L32)

<span id="api-PibblKeyframesOptions"></span>

### PibblKeyframesOptions

Keyframe values, timing, and easing for a seekable animation definition.

```ts
interface PibblKeyframesOptions<T>
```

Related API: [PibblKeyframesOptions](/reference/types/canvas-runtime/#pibblkeyframesoptions).

#### See also

[PibblEasing](/reference/types/canvas-runtime/#pibbleasing)

[PibblInterpolator](/reference/types/canvas-runtime/#pibblinterpolator)

[keyframes](/reference/functions/keyframes/)

[View source — packages/core/src/lib/animation/types.ts:111](/source/packages/core/src/lib/animation/types-ts/#L111)

#### Properties and methods

<span id="api-PibblKeyframesOptions-values"></span>
<details>
<summary>values</summary>


```ts
readonly values: readonly [T, T, ...T[]]
```

Ordered values interpolated by the animation. See PibblKeyframesOptions.

[View source — packages/core/src/lib/animation/types.ts:113](/source/packages/core/src/lib/animation/types-ts/#L113)

</details>

<span id="api-PibblKeyframesOptions-duration"></span>
<details>
<summary>duration</summary>


```ts
readonly duration: number
```

Duration of the animation or transition in milliseconds. See PibblKeyframesOptions.

[View source — packages/core/src/lib/animation/types.ts:115](/source/packages/core/src/lib/animation/types-ts/#L115)

</details>

<span id="api-PibblKeyframesOptions-offsets"></span>
<details>
<summary>offsets (optional)</summary>


```ts
readonly offsets?: readonly number[] | undefined
```

Normalized positions of the keyframes along the animation duration. See
PibblKeyframesOptions.

[View source — packages/core/src/lib/animation/types.ts:120](/source/packages/core/src/lib/animation/types-ts/#L120)

</details>

<span id="api-PibblKeyframesOptions-easing"></span>
<details>
<summary>easing (optional)</summary>


```ts
readonly easing?: PibblEasing | readonly PibblEasing[] | undefined
```

Related API: [easing](/reference/functions/easing/), [PibblEasing](/reference/types/canvas-runtime/#pibbleasing).

Maps normalized progress before interpolation. See PibblEasing.

[View source — packages/core/src/lib/animation/types.ts:122](/source/packages/core/src/lib/animation/types-ts/#L122)

</details>

<span id="api-PibblKeyframesOptions-interpolate"></span>
<details>
<summary>interpolate (optional)</summary>


```ts
readonly interpolate?: PibblInterpolator<T> | undefined
```

Related API: [PibblInterpolator](/reference/types/canvas-runtime/#pibblinterpolator).

Produces a value between two endpoints at the supplied progress. See PibblInterpolator.

[View source — packages/core/src/lib/animation/types.ts:126](/source/packages/core/src/lib/animation/types-ts/#L126)

</details>

<span id="api-PibblKeyframesOptions-debugName"></span>
<details>
<summary>debugName (optional)</summary>


```ts
readonly debugName?: string | undefined
```

Optional label used in diagnostics. See PibblKeyframesOptions.

[View source — packages/core/src/lib/animation/types.ts:128](/source/packages/core/src/lib/animation/types-ts/#L128)

</details>

<span id="api-PibblSpringOptions"></span>

### PibblSpringOptions

Physical parameters and completion thresholds for an analytic spring definition.

```ts
interface PibblSpringOptions
```

Related API: [PibblSpringOptions](/reference/types/canvas-runtime/#pibblspringoptions).

#### See also

[spring](/reference/functions/spring/)

[PibblAnimationDefinition](/reference/types/canvas-runtime/#pibblanimationdefinition)

[View source — packages/core/src/lib/animation/types.ts:137](/source/packages/core/src/lib/animation/types-ts/#L137)

#### Properties and methods

<span id="api-PibblSpringOptions-from"></span>
<details>
<summary>from (optional)</summary>


```ts
readonly from?: number | undefined
```

Starting endpoint or value. See PibblSpringOptions.

[View source — packages/core/src/lib/animation/types.ts:139](/source/packages/core/src/lib/animation/types-ts/#L139)

</details>

<span id="api-PibblSpringOptions-to"></span>
<details>
<summary>to (optional)</summary>


```ts
readonly to?: number | undefined
```

Destination endpoint; omit when useAnimatedValue supplies the target. See PibblSpringOptions.

[View source — packages/core/src/lib/animation/types.ts:141](/source/packages/core/src/lib/animation/types-ts/#L141)

</details>

<span id="api-PibblSpringOptions-mass"></span>
<details>
<summary>mass (optional)</summary>


```ts
readonly mass?: number | undefined
```

Mass used by the spring or physics calculation. See PibblSpringOptions.

[View source — packages/core/src/lib/animation/types.ts:143](/source/packages/core/src/lib/animation/types-ts/#L143)

</details>

<span id="api-PibblSpringOptions-stiffness"></span>
<details>
<summary>stiffness (optional)</summary>


```ts
readonly stiffness?: number | undefined
```

Spring stiffness controlling acceleration toward the target. See PibblSpringOptions.

[View source — packages/core/src/lib/animation/types.ts:145](/source/packages/core/src/lib/animation/types-ts/#L145)

</details>

<span id="api-PibblSpringOptions-damping"></span>
<details>
<summary>damping (optional)</summary>


```ts
readonly damping?: number | undefined
```

Spring damping controlling the loss of velocity. See PibblSpringOptions.

[View source — packages/core/src/lib/animation/types.ts:147](/source/packages/core/src/lib/animation/types-ts/#L147)

</details>

<span id="api-PibblSpringOptions-initialVelocity"></span>
<details>
<summary>initialVelocity (optional)</summary>


```ts
readonly initialVelocity?: number | undefined
```

Starting velocity of the spring. See PibblSpringOptions.

[View source — packages/core/src/lib/animation/types.ts:149](/source/packages/core/src/lib/animation/types-ts/#L149)

</details>

<span id="api-PibblSpringOptions-restSpeed"></span>
<details>
<summary>restSpeed (optional)</summary>


```ts
readonly restSpeed?: number | undefined
```

Velocity threshold used to determine when the spring has settled. See PibblSpringOptions
.

[View source — packages/core/src/lib/animation/types.ts:154](/source/packages/core/src/lib/animation/types-ts/#L154)

</details>

<span id="api-PibblSpringOptions-restDelta"></span>
<details>
<summary>restDelta (optional)</summary>


```ts
readonly restDelta?: number | undefined
```

Distance-from-target threshold used to determine when the spring has settled. See
PibblSpringOptions.

[View source — packages/core/src/lib/animation/types.ts:159](/source/packages/core/src/lib/animation/types-ts/#L159)

</details>

<span id="api-PibblSpringOptions-maxDuration"></span>
<details>
<summary>maxDuration (optional)</summary>


```ts
readonly maxDuration?: number | undefined
```

Maximum duration allowed before the spring is forced to complete. See PibblSpringOptions
.

[View source — packages/core/src/lib/animation/types.ts:164](/source/packages/core/src/lib/animation/types-ts/#L164)

</details>

<span id="api-PibblSpringOptions-debugName"></span>
<details>
<summary>debugName (optional)</summary>


```ts
readonly debugName?: string | undefined
```

Optional label used in diagnostics. See PibblSpringOptions.

[View source — packages/core/src/lib/animation/types.ts:166](/source/packages/core/src/lib/animation/types-ts/#L166)

</details>

<span id="api-PibblStepperOptions"></span>

### PibblStepperOptions

Fixed-step state-machine configuration; execution state is playback-owned.

```ts
interface PibblStepperOptions<State, T>
```

Related API: [PibblStepperOptions](/reference/types/canvas-runtime/#pibblstepperoptions).

#### See also

[stepper](/reference/functions/stepper/)

[PibblAnimationDefinition](/reference/types/canvas-runtime/#pibblanimationdefinition)

[View source — packages/core/src/lib/animation/types.ts:255](/source/packages/core/src/lib/animation/types-ts/#L255)

#### Properties and methods

<span id="api-PibblStepperOptions-stepMilliseconds"></span>
<details>
<summary>stepMilliseconds</summary>


```ts
readonly stepMilliseconds: number
```

Fixed integration step in milliseconds. See PibblStepperOptions.

[View source — packages/core/src/lib/animation/types.ts:257](/source/packages/core/src/lib/animation/types-ts/#L257)

</details>

<span id="api-PibblStepperOptions-maxElapsedMilliseconds"></span>
<details>
<summary>maxElapsedMilliseconds (optional)</summary>


```ts
readonly maxElapsedMilliseconds?: number | undefined
```

Maximum elapsed time admitted to fixed-step integration per frame. See
PibblStepperOptions.

[View source — packages/core/src/lib/animation/types.ts:262](/source/packages/core/src/lib/animation/types-ts/#L262)

</details>

<span id="api-PibblStepperOptions-initial"></span>
<details>
<summary>initial</summary>


```ts
readonly initial: (currentValue: T) => State
```

Creates playback-owned integration state from the current output value. See
PibblStepperOptions.

##### Parameters

- **`currentValue`** — Output signal value at the start of this run.

##### Returns

Initial integration state for the run.

[View source — packages/core/src/lib/animation/types.ts:269](/source/packages/core/src/lib/animation/types-ts/#L269)

</details>

<span id="api-PibblStepperOptions-step"></span>
<details>
<summary>step</summary>


```ts
readonly step: (state: State, deltaMilliseconds: number) => State
```

Advances the integration state by the supplied fixed timestep in milliseconds. See
PibblStepperOptions.

##### Parameters

- **`state`** — Integration state before this step.

- **`deltaMilliseconds`** — Fixed step duration in milliseconds.

##### Returns

Integration state after this step.

[View source — packages/core/src/lib/animation/types.ts:277](/source/packages/core/src/lib/animation/types-ts/#L277)

</details>

<span id="api-PibblStepperOptions-read"></span>
<details>
<summary>read</summary>


```ts
readonly read: (state: State) => T
```

Extracts the output value from the current integration state. See PibblStepperOptions.

##### Parameters

- **`state`** — Current integration state.

##### Returns

The output value represented by that state.

[View source — packages/core/src/lib/animation/types.ts:283](/source/packages/core/src/lib/animation/types-ts/#L283)

</details>

<span id="api-PibblStepperOptions-done"></span>
<details>
<summary>done (optional)</summary>


```ts
readonly done?: ((state: State) => boolean) | undefined
```

Reports whether the integration state has reached completion. See PibblStepperOptions.

##### Parameters

- **`state`** — Current integration state.

##### Returns

True when the stepper has completed.

[View source — packages/core/src/lib/animation/types.ts:289](/source/packages/core/src/lib/animation/types-ts/#L289)

</details>

<span id="api-PibblStepperOptions-debugName"></span>
<details>
<summary>debugName (optional)</summary>


```ts
readonly debugName?: string | undefined
```

Optional label used in diagnostics. See PibblStepperOptions.

[View source — packages/core/src/lib/animation/types.ts:291](/source/packages/core/src/lib/animation/types-ts/#L291)

</details>

<span id="api-PibblTweenOptions"></span>

### PibblTweenOptions

Duration, easing, and optional custom interpolation between animation endpoints.

```ts
interface PibblTweenOptions<T>
```

Related API: [PibblTweenOptions](/reference/types/canvas-runtime/#pibbltweenoptions).

#### See also

[PibblEasing](/reference/types/canvas-runtime/#pibbleasing)

[PibblInterpolator](/reference/types/canvas-runtime/#pibblinterpolator)

[tween](/reference/functions/tween/)

[View source — packages/core/src/lib/animation/types.ts:87](/source/packages/core/src/lib/animation/types-ts/#L87)

#### Properties and methods

<span id="api-PibblTweenOptions-from"></span>
<details>
<summary>from (optional)</summary>


```ts
readonly from?: T | undefined
```

Starting endpoint or value. See PibblTweenOptions.

[View source — packages/core/src/lib/animation/types.ts:89](/source/packages/core/src/lib/animation/types-ts/#L89)

</details>

<span id="api-PibblTweenOptions-to"></span>
<details>
<summary>to (optional)</summary>


```ts
readonly to?: T | undefined
```

Destination endpoint; omit when useAnimatedValue supplies the target. See PibblTweenOptions.

[View source — packages/core/src/lib/animation/types.ts:91](/source/packages/core/src/lib/animation/types-ts/#L91)

</details>

<span id="api-PibblTweenOptions-duration"></span>
<details>
<summary>duration</summary>


```ts
readonly duration: number
```

Duration of the animation or transition in milliseconds. See PibblTweenOptions.

[View source — packages/core/src/lib/animation/types.ts:93](/source/packages/core/src/lib/animation/types-ts/#L93)

</details>

<span id="api-PibblTweenOptions-easing"></span>
<details>
<summary>easing (optional)</summary>


```ts
readonly easing?: PibblEasing | undefined
```

Related API: [easing](/reference/functions/easing/), [PibblEasing](/reference/types/canvas-runtime/#pibbleasing).

Maps normalized progress before interpolation. See PibblEasing.

[View source — packages/core/src/lib/animation/types.ts:95](/source/packages/core/src/lib/animation/types-ts/#L95)

</details>

<span id="api-PibblTweenOptions-interpolate"></span>
<details>
<summary>interpolate (optional)</summary>


```ts
readonly interpolate?: PibblInterpolator<T> | undefined
```

Related API: [PibblInterpolator](/reference/types/canvas-runtime/#pibblinterpolator).

Produces a value between two endpoints at the supplied progress. See PibblInterpolator.

[View source — packages/core/src/lib/animation/types.ts:99](/source/packages/core/src/lib/animation/types-ts/#L99)

</details>

<span id="api-PibblTweenOptions-debugName"></span>
<details>
<summary>debugName (optional)</summary>


```ts
readonly debugName?: string | undefined
```

Optional label used in diagnostics. See PibblTweenOptions.

[View source — packages/core/src/lib/animation/types.ts:101](/source/packages/core/src/lib/animation/types-ts/#L101)

</details>

<span id="api-PibblConfig"></span>

### PibblConfig

Canvas surface sizing, pixel density, and viewport configuration for a Pibbl mount.

```ts
type PibblConfig = | PibblFixedViewportConfig
  | PibblResponsiveViewportConfig
```

Related API: [PibblConfig](/reference/types/canvas-runtime/#pibblconfig), [PibblFixedViewportConfig](/reference/types/canvas-runtime/#pibblfixedviewportconfig), [PibblResponsiveViewportConfig](/reference/types/canvas-runtime/#pibblresponsiveviewportconfig).

#### See also

[PibblFixedViewportConfig](/reference/types/canvas-runtime/#pibblfixedviewportconfig)

[PibblResponsiveViewportConfig](/reference/types/canvas-runtime/#pibblresponsiveviewportconfig)

[pibbl](/reference/functions/pibbl/)

[View source — packages/core/src/lib/surface/types.ts:92](/source/packages/core/src/lib/surface/types-ts/#L92)

#### Properties and methods

<span id="api-PibblConfig-htmlOverlay"></span>
<details>
<summary>htmlOverlay (optional)</summary>


```ts
htmlOverlay?: HTMLElement | undefined
```

Opt-in host for application-owned HTML regions associated with this canvas. See
PibblFixedViewportConfig.
Opt-in host for application-owned HTML regions associated with this canvas. See
PibblResponsiveViewportConfig.

[View source — packages/core/src/lib/surface/types.ts:34](/source/packages/core/src/lib/surface/types-ts/#L34)

</details>

<span id="api-PibblConfig-signal"></span>
<details>
<summary>signal (optional)</summary>


```ts
signal?: AbortSignal | undefined
```

Related API: [signal](/reference/functions/signal/).

Abort signal governing the lifetime of this operation or mount. See
PibblFixedViewportConfig.
Abort signal governing the lifetime of this operation or mount. See
PibblResponsiveViewportConfig.

[View source — packages/core/src/lib/surface/types.ts:39](/source/packages/core/src/lib/surface/types-ts/#L39)

</details>

<span id="api-PibblConfig-viewport"></span>
<details>
<summary>viewport (optional)</summary>


```ts
viewport?: "responsive" | Readonly<{ width: number; height: number; }> | undefined
```

Logical viewport dimensions and fitting configuration. See PibblFixedViewportConfig.
Logical viewport dimensions and fitting configuration. See PibblResponsiveViewportConfig
.

[View source — packages/core/src/lib/surface/types.ts:41](/source/packages/core/src/lib/surface/types-ts/#L41)

</details>

<span id="api-PibblConfig-pixelRatio"></span>
<details>
<summary>pixelRatio (optional)</summary>


```ts
pixelRatio?: PibblPixelRatio | undefined
```

Related API: [PibblPixelRatio](/reference/types/canvas-runtime/#pibblpixelratio).

Requested backing-store pixel density. See PibblPixelRatio.

[View source — packages/core/src/lib/surface/types.ts:56](/source/packages/core/src/lib/surface/types-ts/#L56)

</details>

<span id="api-PibblFit"></span>

### PibblFit

How a fixed logical viewport fits inside its displayed canvas surface.

```ts
type PibblFit = | 'contain'
  | 'cover'
  | 'fill'
  | 'none'
  | 'scale-down'
```

Related API: [PibblFit](/reference/types/canvas-runtime/#pibblfit).

#### See also

[PibblFixedViewportConfig](/reference/types/canvas-runtime/#pibblfixedviewportconfig)

[View source — packages/core/src/lib/surface/types.ts:7](/source/packages/core/src/lib/surface/types-ts/#L7)

<span id="api-PibblFixedViewportConfig"></span>

### PibblFixedViewportConfig

Fixed logical viewport dimensions and fitting policy for a canvas mount.

```ts
interface PibblFixedViewportConfig
```

Related API: [PibblFixedViewportConfig](/reference/types/canvas-runtime/#pibblfixedviewportconfig).

#### See also

[PibblFit](/reference/types/canvas-runtime/#pibblfit)

[PibblPixelRatio](/reference/types/canvas-runtime/#pibblpixelratio)

[PibblConfig](/reference/types/canvas-runtime/#pibblconfig)

[View source — packages/core/src/lib/surface/types.ts:29](/source/packages/core/src/lib/surface/types-ts/#L29)

#### Properties and methods

<span id="api-PibblFixedViewportConfig-htmlOverlay"></span>
<details>
<summary>htmlOverlay (optional)</summary>


```ts
htmlOverlay?: HTMLElement | undefined
```

Opt-in host for application-owned HTML regions associated with this canvas. See
PibblFixedViewportConfig.

[View source — packages/core/src/lib/surface/types.ts:34](/source/packages/core/src/lib/surface/types-ts/#L34)

</details>

<span id="api-PibblFixedViewportConfig-signal"></span>
<details>
<summary>signal (optional)</summary>


```ts
signal?: AbortSignal | undefined
```

Related API: [signal](/reference/functions/signal/).

Abort signal governing the lifetime of this operation or mount. See
PibblFixedViewportConfig.

[View source — packages/core/src/lib/surface/types.ts:39](/source/packages/core/src/lib/surface/types-ts/#L39)

</details>

<span id="api-PibblFixedViewportConfig-viewport"></span>
<details>
<summary>viewport (optional)</summary>


```ts
viewport?: Readonly<{ width: number; height: number; }> | undefined
```

Logical viewport dimensions and fitting configuration. See PibblFixedViewportConfig.

[View source — packages/core/src/lib/surface/types.ts:41](/source/packages/core/src/lib/surface/types-ts/#L41)

</details>

<span id="api-PibblFixedViewportConfig-fit"></span>
<details>
<summary>fit (optional)</summary>


```ts
fit?: PibblFit | undefined
```

Related API: [PibblFit](/reference/types/canvas-runtime/#pibblfit).

Policy for fitting content within its available box. See PibblFit.

[View source — packages/core/src/lib/surface/types.ts:54](/source/packages/core/src/lib/surface/types-ts/#L54)

</details>

<span id="api-PibblFixedViewportConfig-pixelRatio"></span>
<details>
<summary>pixelRatio (optional)</summary>


```ts
pixelRatio?: PibblPixelRatio | undefined
```

Related API: [PibblPixelRatio](/reference/types/canvas-runtime/#pibblpixelratio).

Requested backing-store pixel density. See PibblPixelRatio.

[View source — packages/core/src/lib/surface/types.ts:56](/source/packages/core/src/lib/surface/types-ts/#L56)

</details>

<span id="api-PibblPixelRatio"></span>

### PibblPixelRatio

Requested backing-store density, either explicit or derived from the device.

```ts
type PibblPixelRatio = 'device' | number
```

Related API: [PibblPixelRatio](/reference/types/canvas-runtime/#pibblpixelratio).

#### See also

[PibblFixedViewportConfig](/reference/types/canvas-runtime/#pibblfixedviewportconfig)

[PibblResponsiveViewportConfig](/reference/types/canvas-runtime/#pibblresponsiveviewportconfig)

[View source — packages/core/src/lib/surface/types.ts:20](/source/packages/core/src/lib/surface/types-ts/#L20)

<span id="api-PibblResponsiveViewportConfig"></span>

### PibblResponsiveViewportConfig

A viewport that follows the displayed canvas dimensions.

```ts
interface PibblResponsiveViewportConfig
```

Related API: [PibblResponsiveViewportConfig](/reference/types/canvas-runtime/#pibblresponsiveviewportconfig).

#### See also

[PibblPixelRatio](/reference/types/canvas-runtime/#pibblpixelratio)

[PibblConfig](/reference/types/canvas-runtime/#pibblconfig)

[View source — packages/core/src/lib/surface/types.ts:65](/source/packages/core/src/lib/surface/types-ts/#L65)

#### Properties and methods

<span id="api-PibblResponsiveViewportConfig-htmlOverlay"></span>
<details>
<summary>htmlOverlay (optional)</summary>


```ts
htmlOverlay?: HTMLElement | undefined
```

Opt-in host for application-owned HTML regions associated with this canvas. See
PibblResponsiveViewportConfig.

[View source — packages/core/src/lib/surface/types.ts:70](/source/packages/core/src/lib/surface/types-ts/#L70)

</details>

<span id="api-PibblResponsiveViewportConfig-signal"></span>
<details>
<summary>signal (optional)</summary>


```ts
signal?: AbortSignal | undefined
```

Related API: [signal](/reference/functions/signal/).

Abort signal governing the lifetime of this operation or mount. See
PibblResponsiveViewportConfig.

[View source — packages/core/src/lib/surface/types.ts:75](/source/packages/core/src/lib/surface/types-ts/#L75)

</details>

<span id="api-PibblResponsiveViewportConfig-viewport"></span>
<details>
<summary>viewport</summary>


```ts
viewport: "responsive"
```

Logical viewport dimensions and fitting configuration. See PibblResponsiveViewportConfig
.

[View source — packages/core/src/lib/surface/types.ts:80](/source/packages/core/src/lib/surface/types-ts/#L80)

</details>

<span id="api-PibblResponsiveViewportConfig-pixelRatio"></span>
<details>
<summary>pixelRatio (optional)</summary>


```ts
pixelRatio?: PibblPixelRatio | undefined
```

Related API: [PibblPixelRatio](/reference/types/canvas-runtime/#pibblpixelratio).

Requested backing-store pixel density. See PibblPixelRatio.

[View source — packages/core/src/lib/surface/types.ts:82](/source/packages/core/src/lib/surface/types-ts/#L82)

</details>

<span id="api-PibblRenderLayerComponentProps"></span>

### PibblRenderLayerComponentProps

Pibbl-owned style, event, focus, and miss-handling props shared by external layers.

```ts
interface PibblRenderLayerComponentProps extends PibblEventHandlers, PibblEventFocusOptions, PibblEventParticipationOptions
```

Related API: [PibblRenderLayerComponentProps](/reference/types/canvas-runtime/#pibblrenderlayercomponentprops), [PibblEventHandlers](/reference/types/events/#pibbleventhandlers), [PibblEventParticipationOptions](/reference/types/events/#pibbleventparticipationoptions).

#### See also

[PibblEventHandlers](/reference/types/events/#pibbleventhandlers)

[PibblEventParticipationOptions](/reference/types/events/#pibbleventparticipationoptions)

[PibblRenderLayerStyle](/reference/types/canvas-runtime/#pibblrenderlayerstyle)

[PibblRenderLayerProps](/reference/types/canvas-runtime/#pibblrenderlayerprops)

[View source — packages/core/src/lib/render-layer/types.ts:265](/source/packages/core/src/lib/render-layer/types-ts/#L265)

#### Properties and methods

<span id="api-PibblRenderLayerComponentProps-style"></span>
<details>
<summary>style (optional)</summary>


```ts
readonly style?: PibblRenderLayerStyle | undefined
```

Related API: [PibblRenderLayerStyle](/reference/types/canvas-runtime/#pibblrenderlayerstyle).

Declared presentation and layout properties. See PibblRenderLayerStyle.

[View source — packages/core/src/lib/render-layer/types.ts:268](/source/packages/core/src/lib/render-layer/types-ts/#L268)

</details>

<span id="api-PibblRenderLayerComponentProps-missBehavior"></span>
<details>
<summary>missBehavior (optional)</summary>


```ts
readonly missBehavior?: "block" | "pass-through" | "target-layer" | undefined
```

How a layer miss participates in arbitration with lower painted content. See
PibblRenderLayerComponentProps.

[View source — packages/core/src/lib/render-layer/types.ts:273](/source/packages/core/src/lib/render-layer/types-ts/#L273)

</details>

<span id="api-PibblRenderLayerComponentProps-pointerEvents"></span>
<details>
<summary>pointerEvents (optional)</summary>


```ts
readonly pointerEvents?: PibblPointerEvents | undefined
```

Related API: [PibblPointerEvents](/reference/types/events/#pibblpointerevents).

Whether this content participates in pointer targeting. See PibblPointerEvents.

[View source — packages/core/src/lib/events/types.ts:126](/source/packages/core/src/lib/events/types-ts/#L126)

</details>

<span id="api-PibblRenderLayerComponentProps-keyboardFocusable"></span>
<details>
<summary>keyboardFocusable (optional)</summary>


```ts
readonly keyboardFocusable?: boolean | undefined
```

Whether the target may receive keyboard focus. See PibblEventFocusOptions.

[View source — packages/core/src/lib/events/types.ts:137](/source/packages/core/src/lib/events/types-ts/#L137)

</details>

<span id="api-PibblRenderLayerComponentProps-keyboardNavigationBounds"></span>
<details>
<summary>keyboardNavigationBounds (optional)</summary>


```ts
readonly keyboardNavigationBounds?: Readonly<LayoutBox> | undefined
```

Related API: [LayoutBox](/reference/types/layout/#layoutbox).

Logical rectangle used for directional keyboard navigation. See LayoutBox.

[View source — packages/core/src/lib/events/types.ts:139](/source/packages/core/src/lib/events/types-ts/#L139)

</details>

<span id="api-PibblRenderLayerDefinition"></span>

### PibblRenderLayerDefinition

Resource creation, update, resizing, rendering, disposal, and interaction lifecycle of an
external layer.

```ts
interface PibblRenderLayerDefinition<Props, Resources, Target extends object = object>
```

Related API: [PibblRenderLayerDefinition](/reference/types/canvas-runtime/#pibblrenderlayerdefinition).

#### See also

[PibblRenderLayerContext](/reference/types/canvas-runtime/#pibblrenderlayercontext)

[PibblRenderLayerSize](/reference/types/canvas-runtime/#pibblrenderlayersize)

[PibblRenderLayerFrame](/reference/types/canvas-runtime/#pibblrenderlayerframe)

[PibblRenderLayerInteraction](/reference/types/canvas-runtime/#pibblrenderlayerinteraction)

[defineRenderLayer](/reference/functions/define-render-layer/)

[View source — packages/core/src/lib/render-layer/types.ts:286](/source/packages/core/src/lib/render-layer/types-ts/#L286)

#### Properties and methods

<span id="api-PibblRenderLayerDefinition-create"></span>
<details>
<summary>create</summary>


```ts
create: (context: Readonly<PibblRenderLayerContext>, initialProps: Readonly<Props>) => Resources
```

Related API: [PibblRenderLayerContext](/reference/types/canvas-runtime/#pibblrenderlayercontext).

Allocates application resources once for this mounted layer identity. See
PibblRenderLayerDefinition.

##### Parameters

- **`context`** — Mount-owned canvas, size, and invalidation services. See
[PibblRenderLayerContext](/reference/types/canvas-runtime/#pibblrenderlayercontext) .

- **`initialProps`** — Props supplied for the first mounted render.

##### Returns

Persistent application resources retained until dispose.

[View source — packages/core/src/lib/render-layer/types.ts:299](/source/packages/core/src/lib/render-layer/types-ts/#L299)

</details>

<span id="api-PibblRenderLayerDefinition-update"></span>
<details>
<summary>update (optional)</summary>


```ts
update?: ((resources: Resources, props: Readonly<Props>, context: Readonly<PibblRenderLayerContext>) => void) | undefined
```

Related API: [PibblRenderLayerContext](/reference/types/canvas-runtime/#pibblrenderlayercontext).

Applies the latest props to existing resources before rendering. See
PibblRenderLayerDefinition.

##### Parameters

- **`resources`** — Resources previously returned by create.

- **`props`** — Latest component props.

- **`context`** — Mount-owned canvas, size, and invalidation services. See
[PibblRenderLayerContext](/reference/types/canvas-runtime/#pibblrenderlayercontext) .

[View source — packages/core/src/lib/render-layer/types.ts:311](/source/packages/core/src/lib/render-layer/types-ts/#L311)

</details>

<span id="api-PibblRenderLayerDefinition-resize"></span>
<details>
<summary>resize (optional)</summary>


```ts
resize?: ((resources: Resources, size: Readonly<PibblRenderLayerSize>, context: Readonly<PibblRenderLayerContext>) => void) | undefined
```

Related API: [PibblRenderLayerSize](/reference/types/canvas-runtime/#pibblrenderlayersize), [PibblRenderLayerContext](/reference/types/canvas-runtime/#pibblrenderlayercontext).

Adjusts resources to the newly resolved logical and backing-store dimensions. See
PibblRenderLayerDefinition.

##### Parameters

- **`resources`** — Resources previously returned by create.

- **`size`** — New logical and backing dimensions. See [PibblRenderLayerSize](/reference/types/canvas-runtime/#pibblrenderlayersize).

- **`context`** — Mount-owned canvas, size, and invalidation services. See
[PibblRenderLayerContext](/reference/types/canvas-runtime/#pibblrenderlayercontext) .

[View source — packages/core/src/lib/render-layer/types.ts:324](/source/packages/core/src/lib/render-layer/types-ts/#L324)

</details>

<span id="api-PibblRenderLayerDefinition-render"></span>
<details>
<summary>render</summary>


```ts
render: (resources: Resources, frame: Readonly<PibblRenderLayerFrame>, context: Readonly<PibblRenderLayerContext>) => void
```

Related API: [PibblRenderLayerFrame](/reference/types/canvas-runtime/#pibblrenderlayerframe), [PibblRenderLayerContext](/reference/types/canvas-runtime/#pibblrenderlayercontext).

Draws this generation using Pibbl's frame; invalidate only when another frame is needed. See
PibblRenderLayerDefinition.

##### Parameters

- **`resources`** — Resources previously returned by create.

- **`frame`** — Shared Pibbl frame timing and invalidation service. See
[PibblRenderLayerFrame](/reference/types/canvas-runtime/#pibblrenderlayerframe) .

- **`context`** — Mount-owned canvas, size, and invalidation services. See
[PibblRenderLayerContext](/reference/types/canvas-runtime/#pibblrenderlayercontext) .

[View source — packages/core/src/lib/render-layer/types.ts:338](/source/packages/core/src/lib/render-layer/types-ts/#L338)

</details>

<span id="api-PibblRenderLayerDefinition-dispose"></span>
<details>
<summary>dispose (optional)</summary>


```ts
dispose?: ((resources: Resources, context: Readonly<PibblRenderLayerContext>) => void) | undefined
```

Related API: [PibblRenderLayerContext](/reference/types/canvas-runtime/#pibblrenderlayercontext).

Releases application resources when the mounted layer is torn down. See
PibblRenderLayerDefinition.

##### Parameters

- **`resources`** — Resources previously returned by create, whose application-owned resources
must be released.

- **`context`** — Mount-owned context for this resource lifetime. See
[PibblRenderLayerContext](/reference/types/canvas-runtime/#pibblrenderlayercontext) .

[View source — packages/core/src/lib/render-layer/types.ts:351](/source/packages/core/src/lib/render-layer/types-ts/#L351)

</details>

<span id="api-PibblRenderLayerDefinition-interaction"></span>
<details>
<summary>interaction (optional)</summary>


```ts
interaction?: PibblRenderLayerInteraction<Props, Resources, Target> | undefined
```

Related API: [PibblRenderLayerInteraction](/reference/types/canvas-runtime/#pibblrenderlayerinteraction).

Builds the interaction snapshot committed with the rendered bitmap. See
PibblRenderLayerInteraction.

[View source — packages/core/src/lib/render-layer/types.ts:356](/source/packages/core/src/lib/render-layer/types-ts/#L356)

</details>

<span id="api-PibblRenderLayerFrame"></span>

### PibblRenderLayerFrame

Shared scheduler timing and invalidation supplied to an external renderer for one frame.

```ts
interface PibblRenderLayerFrame
```

Related API: [PibblRenderLayerFrame](/reference/types/canvas-runtime/#pibblrenderlayerframe).

#### See also

[PibblRenderLayerDefinition](/reference/types/canvas-runtime/#pibblrenderlayerdefinition)

[View source — packages/core/src/lib/render-layer/types.ts:53](/source/packages/core/src/lib/render-layer/types-ts/#L53)

#### Properties and methods

<span id="api-PibblRenderLayerFrame-frameId"></span>
<details>
<summary>frameId</summary>


```ts
readonly frameId: number
```

Identifier of the shared scheduler frame. See PibblRenderLayerFrame.

[View source — packages/core/src/lib/render-layer/types.ts:55](/source/packages/core/src/lib/render-layer/types-ts/#L55)

</details>

<span id="api-PibblRenderLayerFrame-time"></span>
<details>
<summary>time</summary>


```ts
readonly time: number
```

Current shared logical time in milliseconds. See PibblRenderLayerFrame.

[View source — packages/core/src/lib/render-layer/types.ts:57](/source/packages/core/src/lib/render-layer/types-ts/#L57)

</details>

<span id="api-PibblRenderLayerFrame-delta"></span>
<details>
<summary>delta</summary>


```ts
readonly delta: number
```

Elapsed frame time in milliseconds. See PibblRenderLayerFrame.

[View source — packages/core/src/lib/render-layer/types.ts:59](/source/packages/core/src/lib/render-layer/types-ts/#L59)

</details>

<span id="api-PibblRenderLayerFrame-deltaSeconds"></span>
<details>
<summary>deltaSeconds</summary>


```ts
readonly deltaSeconds: number
```

Elapsed frame time in seconds. See PibblRenderLayerFrame.

[View source — packages/core/src/lib/render-layer/types.ts:61](/source/packages/core/src/lib/render-layer/types-ts/#L61)

</details>

<span id="api-PibblRenderLayerFrame-invalidate"></span>
<details>
<summary>invalidate</summary>


```ts
invalidate: () => void
```

Requests another Pibbl render through the shared scheduler. See PibblRenderLayerFrame.

[View source — packages/core/src/lib/render-layer/types.ts:63](/source/packages/core/src/lib/render-layer/types-ts/#L63)

</details>

<span id="api-PibblRenderLayerContext"></span>

### PibblRenderLayerContext

The Pibbl-owned offscreen canvas, current size, and frame-invalidation capability.

```ts
interface PibblRenderLayerContext
```

Related API: [PibblRenderLayerContext](/reference/types/canvas-runtime/#pibblrenderlayercontext).

#### See also

[PibblRenderLayerSize](/reference/types/canvas-runtime/#pibblrenderlayersize)

[PibblRenderLayerDefinition](/reference/types/canvas-runtime/#pibblrenderlayerdefinition)

[View source — packages/core/src/lib/render-layer/types.ts:72](/source/packages/core/src/lib/render-layer/types-ts/#L72)

#### Properties and methods

<span id="api-PibblRenderLayerContext-canvas"></span>
<details>
<summary>canvas</summary>


```ts
readonly canvas: OffscreenCanvas
```

Canvas surface associated with this resource or mount. See PibblRenderLayerContext.

[View source — packages/core/src/lib/render-layer/types.ts:74](/source/packages/core/src/lib/render-layer/types-ts/#L74)

</details>

<span id="api-PibblRenderLayerContext-size"></span>
<details>
<summary>size</summary>


```ts
readonly size: PibblRenderLayerSize
```

Related API: [PibblRenderLayerSize](/reference/types/canvas-runtime/#pibblrenderlayersize).

Current logical dimensions, backing-store dimensions, and effective pixel ratios. See PibblRenderLayerSize.

[View source — packages/core/src/lib/render-layer/types.ts:76](/source/packages/core/src/lib/render-layer/types-ts/#L76)

</details>

<span id="api-PibblRenderLayerContext-invalidate"></span>
<details>
<summary>invalidate</summary>


```ts
invalidate: () => void
```

Requests another Pibbl render through the shared scheduler. See PibblRenderLayerContext.

[View source — packages/core/src/lib/render-layer/types.ts:80](/source/packages/core/src/lib/render-layer/types-ts/#L80)

</details>

<span id="api-PibblRenderLayerHit"></span>

### PibblRenderLayerHit

A hit-test decision: pass through, block lower paint, or select one logical target.

```ts
type PibblRenderLayerHit<Target extends object> = | {
      /** Selects the kind of geometry, material, or result. See {@link PibblRenderLayerHit}. */
      readonly kind: "miss";
    }
  | {
      /** Selects the kind of geometry, material, or result. See {@link PibblRenderLayerHit}. */
      readonly kind: "block";
    }
  | {
      /** Selects the kind of geometry, material, or result. See {@link PibblRenderLayerHit}. */
      readonly kind: "target";
      /** The selected logical target or target configuration. See {@link PibblRenderLayerHit}. */
      readonly target: Target;
    }
```

Related API: [PibblRenderLayerHit](/reference/types/canvas-runtime/#pibblrenderlayerhit).

#### See also

[PibblRenderLayerInput](/reference/types/canvas-runtime/#pibblrenderlayerinput)

[PibblRenderLayerInteractionSnapshot](/reference/types/canvas-runtime/#pibblrenderlayerinteractionsnapshot)

[View source — packages/core/src/lib/render-layer/types.ts:100](/source/packages/core/src/lib/render-layer/types-ts/#L100)

#### Properties and methods

<span id="api-PibblRenderLayerHit-kind"></span>
<details>
<summary>kind</summary>


```ts
readonly kind: "block" | "miss" | "target"
```

Selects the kind of geometry, material, or result. See PibblRenderLayerHit.

[View source — packages/core/src/lib/render-layer/types.ts:103](/source/packages/core/src/lib/render-layer/types-ts/#L103)

</details>

<span id="api-PibblRenderLayerInput"></span>

### PibblRenderLayerInput

Pibbl-routed pointer input in layer-local coordinates with pointer-capture operations.

```ts
interface PibblRenderLayerInput<Target extends object>
```

Related API: [PibblRenderLayerInput](/reference/types/canvas-runtime/#pibblrenderlayerinput).

#### See also

[PibblRenderLayerHit](/reference/types/canvas-runtime/#pibblrenderlayerhit)

[PibblRenderLayerInteractionSnapshot](/reference/types/canvas-runtime/#pibblrenderlayerinteractionsnapshot)

[View source — packages/core/src/lib/render-layer/types.ts:145](/source/packages/core/src/lib/render-layer/types-ts/#L145)

#### Properties and methods

<span id="api-PibblRenderLayerInput-type"></span>
<details>
<summary>type</summary>


```ts
readonly type: "click" | "contextmenu" | "pointercancel" | "pointerdown" | "pointermove" | "pointerup" | "wheel"
```

Selects `"pointerdown"` , `"pointermove"` , `"pointerup"` , `"pointercancel"` , `"wheel"` ,
`"contextmenu"` , `"click"` for type. See PibblRenderLayerInput.

[View source — packages/core/src/lib/render-layer/types.ts:150](/source/packages/core/src/lib/render-layer/types-ts/#L150)

</details>

<span id="api-PibblRenderLayerInput-point"></span>
<details>
<summary>point</summary>


```ts
readonly point: Readonly<{ x: number; y: number; }>
```

Pointer position in the external layer's logical local coordinates. See
PibblRenderLayerInput.

[View source — packages/core/src/lib/render-layer/types.ts:162](/source/packages/core/src/lib/render-layer/types-ts/#L162)

</details>

<span id="api-PibblRenderLayerInput-hit"></span>
<details>
<summary>hit</summary>


```ts
readonly hit: PibblRenderLayerHit<Target>
```

Related API: [PibblRenderLayerHit](/reference/types/canvas-runtime/#pibblrenderlayerhit).

Target, block, or miss decision associated with the input. See PibblRenderLayerHit.

[View source — packages/core/src/lib/render-layer/types.ts:175](/source/packages/core/src/lib/render-layer/types-ts/#L175)

</details>

<span id="api-PibblRenderLayerInput-originalEvent"></span>
<details>
<summary>originalEvent</summary>


```ts
readonly originalEvent: MouseEvent | PointerEvent | WheelEvent
```

The originating browser event. See PibblRenderLayerInput.

[View source — packages/core/src/lib/render-layer/types.ts:177](/source/packages/core/src/lib/render-layer/types-ts/#L177)

</details>

<span id="api-PibblRenderLayerInput-setPointerCapture"></span>
<details>
<summary>setPointerCapture</summary>


```ts
setPointerCapture: (pointerId: number) => void
```

Captures the pointer for this logical target until release or cancellation. See
PibblRenderLayerInput.

##### Parameters

- **`pointerId`** — Pointer identifier from the routed pointer event.

[View source — packages/core/src/lib/render-layer/types.ts:183](/source/packages/core/src/lib/render-layer/types-ts/#L183)

</details>

<span id="api-PibblRenderLayerInput-releasePointerCapture"></span>
<details>
<summary>releasePointerCapture</summary>


```ts
releasePointerCapture: (pointerId: number) => void
```

Releases this target's capture of the identified pointer. See PibblRenderLayerInput.

##### Parameters

- **`pointerId`** — Pointer identifier from the routed pointer event.

[View source — packages/core/src/lib/render-layer/types.ts:188](/source/packages/core/src/lib/render-layer/types-ts/#L188)

</details>

<span id="api-PibblRenderLayerInteraction"></span>

### PibblRenderLayerInteraction

Settles renderer resources into the interaction snapshot for a committed generation.

```ts
interface PibblRenderLayerInteraction<Props, Resources, Target extends object>
```

Related API: [PibblRenderLayerInteraction](/reference/types/canvas-runtime/#pibblrenderlayerinteraction).

#### See also

[PibblRenderLayerSize](/reference/types/canvas-runtime/#pibblrenderlayersize)

[PibblRenderLayerInteractionSnapshot](/reference/types/canvas-runtime/#pibblrenderlayerinteractionsnapshot)

[PibblRenderLayerDefinition](/reference/types/canvas-runtime/#pibblrenderlayerdefinition)

[View source — packages/core/src/lib/render-layer/types.ts:239](/source/packages/core/src/lib/render-layer/types-ts/#L239)

#### Properties and methods

<span id="api-PibblRenderLayerInteraction-settle"></span>
<details>
<summary>settle</summary>


```ts
settle: (resources: Resources, props: Readonly<Props>, size: Readonly<PibblRenderLayerSize>) => PibblRenderLayerInteractionSnapshot<Target>
```

Related API: [PibblRenderLayerSize](/reference/types/canvas-runtime/#pibblrenderlayersize), [PibblRenderLayerInteractionSnapshot](/reference/types/canvas-runtime/#pibblrenderlayerinteractionsnapshot).

Captures interaction state corresponding to the generation being committed. See
PibblRenderLayerInteractionSnapshot.

##### Parameters

- **`resources`** — Resources representing the rendered scene.

- **`props`** — Props used for the committed render.

- **`size`** — Logical and backing dimensions for this generation. See
[PibblRenderLayerSize](/reference/types/canvas-runtime/#pibblrenderlayersize) .

##### Returns

The interaction snapshot to commit together with the rendered bitmap. See
[PibblRenderLayerInteractionSnapshot](/reference/types/canvas-runtime/#pibblrenderlayerinteractionsnapshot) .

[View source — packages/core/src/lib/render-layer/types.ts:250](/source/packages/core/src/lib/render-layer/types-ts/#L250)

</details>

<span id="api-PibblRenderLayerInteractionSnapshot"></span>

### PibblRenderLayerInteractionSnapshot

Targets and hit testing committed atomically with one rendered bitmap generation.

```ts
interface PibblRenderLayerInteractionSnapshot<Target extends object>
```

Related API: [PibblRenderLayerInteractionSnapshot](/reference/types/canvas-runtime/#pibblrenderlayerinteractionsnapshot).

#### See also

[PibblRenderLayerTarget](/reference/types/canvas-runtime/#pibblrenderlayertarget)

[PibblRenderLayerHit](/reference/types/canvas-runtime/#pibblrenderlayerhit)

[PibblRenderLayerInput](/reference/types/canvas-runtime/#pibblrenderlayerinput)

[PibblRenderLayerInteraction](/reference/types/canvas-runtime/#pibblrenderlayerinteraction)

[View source — packages/core/src/lib/render-layer/types.ts:199](/source/packages/core/src/lib/render-layer/types-ts/#L199)

#### Properties and methods

<span id="api-PibblRenderLayerInteractionSnapshot-targets"></span>
<details>
<summary>targets</summary>


```ts
readonly targets: Iterable<PibblRenderLayerTarget<Target>>
```

Related API: [PibblRenderLayerTarget](/reference/types/canvas-runtime/#pibblrenderlayertarget).

Logical targets exposed by this committed generation. See PibblRenderLayerTarget.

[View source — packages/core/src/lib/render-layer/types.ts:201](/source/packages/core/src/lib/render-layer/types-ts/#L201)

</details>

<span id="api-PibblRenderLayerInteractionSnapshot-hitTest"></span>
<details>
<summary>hitTest</summary>


```ts
hitTest: (point: Readonly<{ x: number; y: number; }>) => PibblRenderLayerHit<Target>
```

Related API: [PibblRenderLayerHit](/reference/types/canvas-runtime/#pibblrenderlayerhit).

Resolves a layer-local point to a target, block, or miss decision. See
PibblRenderLayerHit.

##### Parameters

- **`point`** — Pointer position in layer-local logical coordinates.

##### Returns

A target hit, a blocking hit, or a miss for this interaction generation. See
[PibblRenderLayerHit](/reference/types/canvas-runtime/#pibblrenderlayerhit) .

[View source — packages/core/src/lib/render-layer/types.ts:209](/source/packages/core/src/lib/render-layer/types-ts/#L209)

</details>

<span id="api-PibblRenderLayerInteractionSnapshot-onInput"></span>
<details>
<summary>onInput (optional)</summary>


```ts
onInput?: ((input: Readonly<PibblRenderLayerInput<Target>>) => void) | undefined
```

Related API: [PibblRenderLayerInput](/reference/types/canvas-runtime/#pibblrenderlayerinput).

Receives Pibbl-routed input for this committed interaction generation. See
PibblRenderLayerInteractionSnapshot.

##### Parameters

- **`input`** — Pibbl-routed input for the committed interaction generation. See
[PibblRenderLayerInput](/reference/types/canvas-runtime/#pibblrenderlayerinput) .

[View source — packages/core/src/lib/render-layer/types.ts:229](/source/packages/core/src/lib/render-layer/types-ts/#L229)

</details>

<span id="api-PibblRenderLayerProps"></span>

### PibblRenderLayerProps

Application props combined with layer props; reserved Pibbl prop collisions are rejected.

```ts
type PibblRenderLayerProps<Props> = Extract<keyof Props, PibblRenderLayerReservedProp> extends never
    ? Props & PibblRenderLayerComponentProps
    : never
```

Related API: [PibblRenderLayerProps](/reference/types/canvas-runtime/#pibblrenderlayerprops), [PibblRenderLayerComponentProps](/reference/types/canvas-runtime/#pibblrenderlayercomponentprops).

#### See also

[PibblRenderLayerComponentProps](/reference/types/canvas-runtime/#pibblrenderlayercomponentprops)

[defineRenderLayer](/reference/functions/define-render-layer/)

[View source — packages/core/src/lib/render-layer/types.ts:373](/source/packages/core/src/lib/render-layer/types-ts/#L373)

#### Properties and methods

<span id="api-PibblRenderLayerProps-style"></span>
<details>
<summary>style (optional)</summary>


```ts
readonly style?: PibblRenderLayerStyle | undefined
```

Related API: [PibblRenderLayerStyle](/reference/types/canvas-runtime/#pibblrenderlayerstyle).

Declared presentation and layout properties. See PibblRenderLayerStyle.

[View source — packages/core/src/lib/render-layer/types.ts:268](/source/packages/core/src/lib/render-layer/types-ts/#L268)

</details>

<span id="api-PibblRenderLayerProps-missBehavior"></span>
<details>
<summary>missBehavior (optional)</summary>


```ts
readonly missBehavior?: "block" | "pass-through" | "target-layer" | undefined
```

How a layer miss participates in arbitration with lower painted content. See
PibblRenderLayerComponentProps.

[View source — packages/core/src/lib/render-layer/types.ts:273](/source/packages/core/src/lib/render-layer/types-ts/#L273)

</details>

<span id="api-PibblRenderLayerProps-pointerEvents"></span>
<details>
<summary>pointerEvents (optional)</summary>


```ts
readonly pointerEvents?: PibblPointerEvents | undefined
```

Related API: [PibblPointerEvents](/reference/types/events/#pibblpointerevents).

Whether this content participates in pointer targeting. See PibblPointerEvents.

[View source — packages/core/src/lib/events/types.ts:126](/source/packages/core/src/lib/events/types-ts/#L126)

</details>

<span id="api-PibblRenderLayerProps-keyboardFocusable"></span>
<details>
<summary>keyboardFocusable (optional)</summary>


```ts
readonly keyboardFocusable?: boolean | undefined
```

Whether the target may receive keyboard focus. See PibblEventFocusOptions.

[View source — packages/core/src/lib/events/types.ts:137](/source/packages/core/src/lib/events/types-ts/#L137)

</details>

<span id="api-PibblRenderLayerProps-keyboardNavigationBounds"></span>
<details>
<summary>keyboardNavigationBounds (optional)</summary>


```ts
readonly keyboardNavigationBounds?: Readonly<LayoutBox> | undefined
```

Related API: [LayoutBox](/reference/types/layout/#layoutbox).

Logical rectangle used for directional keyboard navigation. See LayoutBox.

[View source — packages/core/src/lib/events/types.ts:139](/source/packages/core/src/lib/events/types-ts/#L139)

</details>

<span id="api-PibblRenderLayerSize"></span>

### PibblRenderLayerSize

Logical surface size, backing-store dimensions, and effective pixel ratios of an external render
layer.

```ts
interface PibblRenderLayerSize
```

Related API: [PibblRenderLayerSize](/reference/types/canvas-runtime/#pibblrenderlayersize).

#### See also

[PibblRenderLayerDefinition](/reference/types/canvas-runtime/#pibblrenderlayerdefinition)

[PibblRenderLayerContext](/reference/types/canvas-runtime/#pibblrenderlayercontext)

[PibblRenderLayerInteraction](/reference/types/canvas-runtime/#pibblrenderlayerinteraction)

[View source — packages/core/src/lib/render-layer/types.ts:21](/source/packages/core/src/lib/render-layer/types-ts/#L21)

#### Properties and methods

<span id="api-PibblRenderLayerSize-width"></span>
<details>
<summary>width</summary>


```ts
readonly width: number
```

Horizontal extent in the units of the containing geometry or surface. See
PibblRenderLayerSize.

[View source — packages/core/src/lib/render-layer/types.ts:26](/source/packages/core/src/lib/render-layer/types-ts/#L26)

</details>

<span id="api-PibblRenderLayerSize-height"></span>
<details>
<summary>height</summary>


```ts
readonly height: number
```

Vertical extent in the units of the containing geometry or surface. See
PibblRenderLayerSize.

[View source — packages/core/src/lib/render-layer/types.ts:31](/source/packages/core/src/lib/render-layer/types-ts/#L31)

</details>

<span id="api-PibblRenderLayerSize-backingWidth"></span>
<details>
<summary>backingWidth</summary>


```ts
readonly backingWidth: number
```

Width of the backing raster in physical pixels. See PibblRenderLayerSize.

[View source — packages/core/src/lib/render-layer/types.ts:33](/source/packages/core/src/lib/render-layer/types-ts/#L33)

</details>

<span id="api-PibblRenderLayerSize-backingHeight"></span>
<details>
<summary>backingHeight</summary>


```ts
readonly backingHeight: number
```

Height of the backing raster in physical pixels. See PibblRenderLayerSize.

[View source — packages/core/src/lib/render-layer/types.ts:35](/source/packages/core/src/lib/render-layer/types-ts/#L35)

</details>

<span id="api-PibblRenderLayerSize-pixelRatioX"></span>
<details>
<summary>pixelRatioX</summary>


```ts
readonly pixelRatioX: number
```

Effective ratio of backing pixels to logical units on the x axis. See
PibblRenderLayerSize.

[View source — packages/core/src/lib/render-layer/types.ts:40](/source/packages/core/src/lib/render-layer/types-ts/#L40)

</details>

<span id="api-PibblRenderLayerSize-pixelRatioY"></span>
<details>
<summary>pixelRatioY</summary>


```ts
readonly pixelRatioY: number
```

Effective ratio of backing pixels to logical units on the y axis. See
PibblRenderLayerSize.

[View source — packages/core/src/lib/render-layer/types.ts:45](/source/packages/core/src/lib/render-layer/types-ts/#L45)

</details>

<span id="api-PibblRenderLayerStyle"></span>

### PibblRenderLayerStyle

Layout and outer Canvas composition style for an external render layer.

```ts
interface PibblRenderLayerStyle extends SystemStyle, BoxStyle, LayoutItemStyle
```

Related API: [PibblRenderLayerStyle](/reference/types/canvas-runtime/#pibblrenderlayerstyle), [SystemStyle](/reference/types/styles/#systemstyle), [BoxStyle](/reference/types/layout/#boxstyle), [LayoutItemStyle](/reference/types/layout/#layoutitemstyle).

#### See also

[SystemStyle](/reference/types/styles/#systemstyle)

[BoxStyle](/reference/types/layout/#boxstyle)

[LayoutItemStyle](/reference/types/layout/#layoutitemstyle)

[PibblRenderLayerComponentProps](/reference/types/canvas-runtime/#pibblrenderlayercomponentprops)

[View source — packages/core/src/lib/render-layer/types.ts:91](/source/packages/core/src/lib/render-layer/types-ts/#L91)

#### Properties and methods

<span id="api-PibblRenderLayerStyle-maxHeight"></span>
<details>
<summary>maxHeight (optional)</summary>


```ts
maxHeight?: number | `${number}%` | undefined
```

Maximum permitted height. See Length.

[View source — packages/core/src/lib/style/types.ts:91](/source/packages/core/src/lib/style/types-ts/#L91)

</details>

<span id="api-PibblRenderLayerStyle-padding"></span>
<details>
<summary>padding (optional)</summary>


```ts
padding?: EdgeValues | undefined
```

Related API: [EdgeValues](/reference/types/layout/#edgevalues).

Insets between the border box and content box. See EdgeValues.

[View source — packages/core/src/lib/style/types.ts:93](/source/packages/core/src/lib/style/types-ts/#L93)

</details>

<span id="api-PibblRenderLayerStyle-filter"></span>
<details>
<summary>filter (optional)</summary>


```ts
filter?: PibblFilter | readonly PibblFilter[] | undefined
```

Related API: [PibblFilter](/reference/types/filters/#pibblfilter).

Ordered pixel-only filters applied to the receiving primitive and its descendants. See
PibblFilter.

[View source — packages/core/src/lib/types.ts:76](/source/packages/core/src/lib/types-ts/#L76)

</details>

<span id="api-PibblRenderLayerStyle-left"></span>
<details>
<summary>left (optional)</summary>


```ts
left?: number | `${number}%` | undefined
```

Left edge coordinate or inset. See Length.

[View source — packages/core/src/lib/style/positioning.ts:127](/source/packages/core/src/lib/style/positioning-ts/#L127)

</details>

<span id="api-PibblRenderLayerStyle-top"></span>
<details>
<summary>top (optional)</summary>


```ts
top?: number | `${number}%` | undefined
```

Top edge value or top envelope guide. See Length.

[View source — packages/core/src/lib/style/positioning.ts:129](/source/packages/core/src/lib/style/positioning-ts/#L129)

</details>

<span id="api-PibblRenderLayerStyle-width"></span>
<details>
<summary>width (optional)</summary>


```ts
width?: Length | undefined
```

Related API: [Length](/reference/types/layout/#length).

Horizontal extent in the units of the containing geometry or surface. See Length.

[View source — packages/core/src/lib/style/types.ts:81](/source/packages/core/src/lib/style/types-ts/#L81)

</details>

<span id="api-PibblRenderLayerStyle-height"></span>
<details>
<summary>height (optional)</summary>


```ts
height?: Length | undefined
```

Related API: [Length](/reference/types/layout/#length).

Vertical extent in the units of the containing geometry or surface. See Length.

[View source — packages/core/src/lib/style/types.ts:83](/source/packages/core/src/lib/style/types-ts/#L83)

</details>

<span id="api-PibblRenderLayerStyle-minWidth"></span>
<details>
<summary>minWidth (optional)</summary>


```ts
minWidth?: number | `${number}%` | undefined
```

Minimum permitted width. See Length.

[View source — packages/core/src/lib/style/types.ts:85](/source/packages/core/src/lib/style/types-ts/#L85)

</details>

<span id="api-PibblRenderLayerStyle-maxWidth"></span>
<details>
<summary>maxWidth (optional)</summary>


```ts
maxWidth?: number | `${number}%` | undefined
```

Maximum permitted width. See Length.

[View source — packages/core/src/lib/style/types.ts:87](/source/packages/core/src/lib/style/types-ts/#L87)

</details>

<span id="api-PibblRenderLayerStyle-minHeight"></span>
<details>
<summary>minHeight (optional)</summary>


```ts
minHeight?: number | `${number}%` | undefined
```

Minimum permitted height. See Length.

[View source — packages/core/src/lib/style/types.ts:89](/source/packages/core/src/lib/style/types-ts/#L89)

</details>

<span id="api-PibblRenderLayerStyle-overflow"></span>
<details>
<summary>overflow (optional)</summary>


```ts
overflow?: "clip" | "visible" | undefined
```

Selects `"visible"`, `"clip"` for overflow. See BoxStyle.

[View source — packages/core/src/lib/style/types.ts:95](/source/packages/core/src/lib/style/types-ts/#L95)

</details>

<span id="api-PibblRenderLayerStyle-alignSelf"></span>
<details>
<summary>alignSelf (optional)</summary>


```ts
alignSelf?: "auto" | "center" | "end" | "flex-end" | "flex-start" | "start" | "stretch" | undefined
```

This child's cross-axis or block-axis alignment override. See LayoutItemStyle.

[View source — packages/core/src/lib/style/types.ts:121](/source/packages/core/src/lib/style/types-ts/#L121)

</details>

<span id="api-PibblRenderLayerStyle-justifySelf"></span>
<details>
<summary>justifySelf (optional)</summary>


```ts
justifySelf?: "auto" | "center" | "end" | "start" | "stretch" | undefined
```

This child's inline-axis alignment override. See LayoutItemStyle.

[View source — packages/core/src/lib/style/types.ts:123](/source/packages/core/src/lib/style/types-ts/#L123)

</details>

<span id="api-PibblRenderLayerStyle-flexBasis"></span>
<details>
<summary>flexBasis (optional)</summary>


```ts
flexBasis?: Length | undefined
```

Related API: [Length](/reference/types/layout/#length).

Initial main-axis size before flex growth or shrinkage. See Length.

[View source — packages/core/src/lib/style/types.ts:125](/source/packages/core/src/lib/style/types-ts/#L125)

</details>

<span id="api-PibblRenderLayerStyle-flexGrow"></span>
<details>
<summary>flexGrow (optional)</summary>


```ts
flexGrow?: number | undefined
```

Relative share of positive free space assigned to this child. See LayoutItemStyle.

[View source — packages/core/src/lib/style/types.ts:127](/source/packages/core/src/lib/style/types-ts/#L127)

</details>

<span id="api-PibblRenderLayerStyle-flexShrink"></span>
<details>
<summary>flexShrink (optional)</summary>


```ts
flexShrink?: number | undefined
```

Relative factor used when reducing main-axis size. See LayoutItemStyle.

[View source — packages/core/src/lib/style/types.ts:129](/source/packages/core/src/lib/style/types-ts/#L129)

</details>

<span id="api-PibblRenderLayerStyle-gridColumnStart"></span>
<details>
<summary>gridColumnStart (optional)</summary>


```ts
gridColumnStart?: number | undefined
```

Explicit starting grid column. See LayoutItemStyle.

[View source — packages/core/src/lib/style/types.ts:131](/source/packages/core/src/lib/style/types-ts/#L131)

</details>

<span id="api-PibblRenderLayerStyle-gridColumnSpan"></span>
<details>
<summary>gridColumnSpan (optional)</summary>


```ts
gridColumnSpan?: number | undefined
```

Number of columns occupied by this child. See LayoutItemStyle.

[View source — packages/core/src/lib/style/types.ts:133](/source/packages/core/src/lib/style/types-ts/#L133)

</details>

<span id="api-PibblRenderLayerStyle-gridRowStart"></span>
<details>
<summary>gridRowStart (optional)</summary>


```ts
gridRowStart?: number | undefined
```

Explicit starting grid row. See LayoutItemStyle.

[View source — packages/core/src/lib/style/types.ts:135](/source/packages/core/src/lib/style/types-ts/#L135)

</details>

<span id="api-PibblRenderLayerStyle-gridRowSpan"></span>
<details>
<summary>gridRowSpan (optional)</summary>


```ts
gridRowSpan?: number | undefined
```

Number of rows occupied by this child. See LayoutItemStyle.

[View source — packages/core/src/lib/style/types.ts:137](/source/packages/core/src/lib/style/types-ts/#L137)

</details>

<span id="api-PibblRenderLayerStyle-transition"></span>
<details>
<summary>transition (optional)</summary>


```ts
transition?: PibblTransitionBinding | undefined
```

Related API: [PibblTransitionBinding](/reference/hooks/use-visibility-transition/).

Visibility-transition binding applied to this primitive and its captured descendants. See SystemStyle.

[View source — packages/core/src/lib/types.ts:69](/source/packages/core/src/lib/types-ts/#L69)

</details>

<span id="api-PibblRenderLayerStyle-custom"></span>
<details>
<summary>custom (optional)</summary>


```ts
custom?: unknown
```

Application-defined style payload passed through the runtime. See SystemStyle.

[View source — packages/core/src/lib/types.ts:71](/source/packages/core/src/lib/types-ts/#L71)

</details>

<span id="api-PibblRenderLayerTarget"></span>

### PibblRenderLayerTarget

Stable target identity with event, cursor, and keyboard-focus metadata.

```ts
interface PibblRenderLayerTarget<Target extends object>
```

Related API: [PibblRenderLayerTarget](/reference/types/canvas-runtime/#pibblrenderlayertarget).

#### See also

[PibblEventHandlers](/reference/types/events/#pibbleventhandlers)

[PibblPointerEvents](/reference/types/events/#pibblpointerevents)

[LayoutBox](/reference/types/layout/#layoutbox)

[PibblRenderLayerInteractionSnapshot](/reference/types/canvas-runtime/#pibblrenderlayerinteractionsnapshot)

[View source — packages/core/src/lib/render-layer/types.ts:124](/source/packages/core/src/lib/render-layer/types-ts/#L124)

#### Properties and methods

<span id="api-PibblRenderLayerTarget-target"></span>
<details>
<summary>target</summary>


```ts
readonly target: Target
```

The selected logical target or target configuration. See PibblRenderLayerTarget.

[View source — packages/core/src/lib/render-layer/types.ts:126](/source/packages/core/src/lib/render-layer/types-ts/#L126)

</details>

<span id="api-PibblRenderLayerTarget-handlers"></span>
<details>
<summary>handlers (optional)</summary>


<details>
<summary>Full type declaration</summary>

```ts
readonly handlers?: Partial<{ onAuxClick: PibblEventHandler<"auxclick">; onBeforeInput: PibblEventHandler<"beforeinput">; onBlur: PibblEventHandler<"blur">; onChange: PibblEventHandler<"change">; onClick: PibblEventHandler<"click">; onCompositionEnd: PibblEventHandler<"compositionend">; onCompositionStart: PibblEventHandler<"compositionstart">; onCompositionUpdate: PibblEventHandler<"compositionupdate">; onContextMenu: PibblEventHandler<"contextmenu">; onCopy: PibblEventHandler<"copy">; onCut: PibblEventHandler<"cut">; onDblClick: PibblEventHandler<"dblclick">; onDrag: PibblEventHandler<"drag">; onDragEnd: PibblEventHandler<"dragend">; onDragEnter: PibblEventHandler<"dragenter">; onDragLeave: PibblEventHandler<"dragleave">; onDragOver: PibblEventHandler<"dragover">; onDragStart: PibblEventHandler<"dragstart">; onDrop: PibblEventHandler<"drop">; onFocus: PibblEventHandler<"focus">; onFocusIn: PibblEventHandler<"focusin">; onFocusOut: PibblEventHandler<"focusout">; onGotPointerCapture: PibblEventHandler<"gotpointercapture">; onInput: PibblEventHandler<"input">; onKeyDown: PibblEventHandler<"keydown">; onKeyUp: PibblEventHandler<"keyup">; onLostPointerCapture: PibblEventHandler<"lostpointercapture">; onMouseDown: PibblEventHandler<"mousedown">; onMouseEnter: PibblEventHandler<"mouseenter">; onMouseLeave: PibblEventHandler<"mouseleave">; onMouseMove: PibblEventHandler<"mousemove">; onMouseOut: PibblEventHandler<"mouseout">; onMouseOver: PibblEventHandler<"mouseover">; onMouseUp: PibblEventHandler<"mouseup">; onPaste: PibblEventHandler<"paste">; onPointerCancel: PibblEventHandler<"pointercancel">; onPointerDown: PibblEventHandler<"pointerdown">; onPointerEnter: PibblEventHandler<"pointerenter">; onPointerLeave: PibblEventHandler<"pointerleave">; onPointerMove: PibblEventHandler<"pointermove">; onPointerOut: PibblEventHandler<"pointerout">; onPointerOver: PibblEventHandler<"pointerover">; onPointerRawUpdate: PibblEventHandler<"pointerrawupdate">; onPointerUp: PibblEventHandler<"pointerup">; onSelect: PibblEventHandler<"select">; onSelectionChange: PibblEventHandler<"selectionchange">; onTouchCancel: PibblEventHandler<"touchcancel">; onTouchEnd: PibblEventHandler<"touchend">; onTouchMove: PibblEventHandler<"touchmove">; onTouchStart: PibblEventHandler<"touchstart">; onWheel: PibblEventHandler<"wheel">; } & { onAuxClickCapture: PibblEventHandler<"auxclick">; onBeforeInputCapture: PibblEventHandler<"beforeinput">; onBlurCapture: PibblEventHandler<"blur">; onChangeCapture: PibblEventHandler<"change">; onClickCapture: PibblEventHandler<"click">; onCompositionEndCapture: PibblEventHandler<"compositionend">; onCompositionStartCapture: PibblEventHandler<"compositionstart">; onCompositionUpdateCapture: PibblEventHandler<"compositionupdate">; onContextMenuCapture: PibblEventHandler<"contextmenu">; onCopyCapture: PibblEventHandler<"copy">; onCutCapture: PibblEventHandler<"cut">; onDblClickCapture: PibblEventHandler<"dblclick">; onDragCapture: PibblEventHandler<"drag">; onDragEndCapture: PibblEventHandler<"dragend">; onDragEnterCapture: PibblEventHandler<"dragenter">; onDragLeaveCapture: PibblEventHandler<"dragleave">; onDragOverCapture: PibblEventHandler<"dragover">; onDragStartCapture: PibblEventHandler<"dragstart">; onDropCapture: PibblEventHandler<"drop">; onFocusCapture: PibblEventHandler<"focus">; onFocusInCapture: PibblEventHandler<"focusin">; onFocusOutCapture: PibblEventHandler<"focusout">; onGotPointerCaptureCapture: PibblEventHandler<"gotpointercapture">; onInputCapture: PibblEventHandler<"input">; onKeyDownCapture: PibblEventHandler<"keydown">; onKeyUpCapture: PibblEventHandler<"keyup">; onLostPointerCaptureCapture: PibblEventHandler<"lostpointercapture">; onMouseDownCapture: PibblEventHandler<"mousedown">; onMouseEnterCapture: PibblEventHandler<"mouseenter">; onMouseLeaveCapture: PibblEventHandler<"mouseleave">; onMouseMoveCapture: PibblEventHandler<"mousemove">; onMouseOutCapture: PibblEventHandler<"mouseout">; onMouseOverCapture: PibblEventHandler<"mouseover">; onMouseUpCapture: PibblEventHandler<"mouseup">; onPasteCapture: PibblEventHandler<"paste">; onPointerCancelCapture: PibblEventHandler<"pointercancel">; onPointerDownCapture: PibblEventHandler<"pointerdown">; onPointerEnterCapture: PibblEventHandler<"pointerenter">; onPointerLeaveCapture: PibblEventHandler<"pointerleave">; onPointerMoveCapture: PibblEventHandler<"pointermove">; onPointerOutCapture: PibblEventHandler<"pointerout">; onPointerOverCapture: PibblEventHandler<"pointerover">; onPointerRawUpdateCapture: PibblEventHandler<"pointerrawupdate">; onPointerUpCapture: PibblEventHandler<"pointerup">; onSelectCapture: PibblEventHandler<"select">; onSelectionChangeCapture: PibblEventHandler<"selectionchange">; onTouchCancelCapture: PibblEventHandler<"touchcancel">; onTouchEndCapture: PibblEventHandler<"touchend">; onTouchMoveCapture: PibblEventHandler<"touchmove">; onTouchStartCapture: PibblEventHandler<"touchstart">; onWheelCapture: PibblEventHandler<"wheel">; }> | undefined
```

</details>

Related API: [PibblEventHandler](/reference/types/events/#pibbleventhandler), [blur](/reference/types/filters/#blur).

Event handlers dispatched for this logical target. See PibblEventHandlers.

[View source — packages/core/src/lib/render-layer/types.ts:128](/source/packages/core/src/lib/render-layer/types-ts/#L128)

</details>

<span id="api-PibblRenderLayerTarget-pointerEvents"></span>
<details>
<summary>pointerEvents (optional)</summary>


```ts
readonly pointerEvents?: PibblPointerEvents | undefined
```

Related API: [PibblPointerEvents](/reference/types/events/#pibblpointerevents).

Whether this content participates in pointer targeting. See PibblPointerEvents.

[View source — packages/core/src/lib/render-layer/types.ts:130](/source/packages/core/src/lib/render-layer/types-ts/#L130)

</details>

<span id="api-PibblRenderLayerTarget-cursor"></span>
<details>
<summary>cursor (optional)</summary>


```ts
readonly cursor?: string | undefined
```

Cursor shown while this target owns pointer presentation. See PibblRenderLayerTarget.

[View source — packages/core/src/lib/render-layer/types.ts:132](/source/packages/core/src/lib/render-layer/types-ts/#L132)

</details>

<span id="api-PibblRenderLayerTarget-keyboardFocusable"></span>
<details>
<summary>keyboardFocusable (optional)</summary>


```ts
readonly keyboardFocusable?: boolean | undefined
```

Whether the target may receive keyboard focus. See PibblRenderLayerTarget.

[View source — packages/core/src/lib/render-layer/types.ts:134](/source/packages/core/src/lib/render-layer/types-ts/#L134)

</details>

<span id="api-PibblRenderLayerTarget-keyboardNavigationBounds"></span>
<details>
<summary>keyboardNavigationBounds (optional)</summary>


```ts
readonly keyboardNavigationBounds?: Readonly<LayoutBox> | undefined
```

Related API: [LayoutBox](/reference/types/layout/#layoutbox).

Logical rectangle used for directional keyboard navigation. See LayoutBox.

[View source — packages/core/src/lib/render-layer/types.ts:136](/source/packages/core/src/lib/render-layer/types-ts/#L136)

</details>

<span id="api-PibblRef"></span>

### PibblRef

A stable mutable container whose current value does not itself schedule rendering.

```ts
interface PibblRef<T>
```

Related API: [PibblRef](/reference/types/canvas-runtime/#pibblref).

#### See also

[useRef](/reference/hooks/use-ref/)

[View source — packages/core/src/lib/hooks/use-ref.ts:8](/source/packages/core/src/lib/hooks/use-ref-ts/#L8)

#### Properties and methods

<span id="api-PibblRef-current"></span>
<details>
<summary>current</summary>


```ts
current: T | undefined
```

Mutable value retained by the ref container. See PibblRef.

[View source — packages/core/src/lib/hooks/use-ref.ts:10](/source/packages/core/src/lib/hooks/use-ref-ts/#L10)

</details>

<span id="api-PibblReactionOptions"></span>

### PibblReactionOptions

Options controlling when a signal reaction runs and how it is named for diagnostics.

```ts
interface PibblReactionOptions
```

Related API: [PibblReactionOptions](/reference/types/canvas-runtime/#pibblreactionoptions).

#### See also

[useReaction](/reference/hooks/use-reaction/)

[View source — packages/core/src/lib/hooks/use-reaction.ts:37](/source/packages/core/src/lib/hooks/use-reaction-ts/#L37)

#### Properties and methods

<span id="api-PibblReactionOptions-debugName"></span>
<details>
<summary>debugName (optional)</summary>


```ts
readonly debugName?: string | undefined
```

Optional label used in diagnostics. See PibblReactionOptions.

[View source — packages/core/src/lib/hooks/use-reaction.ts:39](/source/packages/core/src/lib/hooks/use-reaction-ts/#L39)

</details>

<span id="api-Canvas"></span>

### Canvas

A supported HTML or offscreen Canvas drawing surface.

```ts
type Canvas = HTMLCanvasElement | OffscreenCanvas
```

Related API: [Canvas](/reference/types/canvas-runtime/#canvas).

#### See also

[pibbl](/reference/functions/pibbl/)

[RenderingContext2D](/reference/types/canvas-runtime/#renderingcontext2d)

[View source — packages/core/src/lib/types.ts:260](/source/packages/core/src/lib/types-ts/#L260)

<span id="api-PibblController"></span>

### PibblController

The stable controller of one canvas mount, including explicit idempotent disposal.

```ts
interface PibblController
```

Related API: [PibblController](/reference/types/canvas-runtime/#pibblcontroller).

#### See also

[pibbl](/reference/functions/pibbl/)

[View source — packages/core/src/lib/types.ts:627](/source/packages/core/src/lib/types-ts/#L627)

#### Properties and methods

<span id="api-PibblController-dispose"></span>
<details>
<summary>dispose</summary>


```ts
dispose: () => void
```

Releases every resource owned by this Pibbl mount. Safe to call repeatedly.

[View source — packages/core/src/lib/types.ts:629](/source/packages/core/src/lib/types-ts/#L629)

</details>

<span id="api-RenderingContext2D"></span>

### RenderingContext2D

A supported HTML or offscreen Canvas 2D rendering context.

```ts
type RenderingContext2D = CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D
```

Related API: [RenderingContext2D](/reference/types/canvas-runtime/#renderingcontext2d).

#### See also

[Canvas](/reference/types/canvas-runtime/#canvas)

[PrimitiveRender](/reference/types/styles/#primitiverender)

[useCanvasContext](/reference/hooks/use-canvas-context/)

[View source — packages/core/src/lib/types.ts:268](/source/packages/core/src/lib/types-ts/#L268)

## Implementation guidance for agents

Read the [Authoring, signals, and lifecycle companion](/agents/topics/lifecycle/) for ownership, adaptation, failure modes, and verification. [Agent start](/agents/) provides the version-selection workflow.

## Complete minimal examples

- [Mount, update, and dispose](/minimal-examples/lifecycle/mount/): Own one Pibbl root for a canvas and replace its content without creating another controller. [Plain source](/minimal/lifecycle/mount.tsx)
- [Animate changing targets](/minimal-examples/animation/targets/): Compare a tween and spring as the same target changes. [Plain source](/minimal/animation/targets.tsx)
- [Tween playback controls](/minimal-examples/animation/tween/): Animate a signal and control the mounted playback with native buttons. [Plain source](/minimal/animation/tween.tsx)
- [Custom sampling and fixed steps](/minimal-examples/animation/custom/): Combine a time-sampled sine wave with a fixed-step state machine. [Plain source](/minimal/animation/custom.tsx)
- [Compose keyframes and springs](/minimal-examples/animation/composition/): Run two independent tracks together, then mark, wait, and repeat. [Plain source](/minimal/animation/composition.tsx)
- [Configure viewport and pixel density](/minimal-examples/lifecycle/surface/): Compare a fixed logical viewport with one that follows a resizable host. [Plain source](/minimal/lifecycle/surface.tsx)
- [Component-owned state and reactions](/minimal-examples/lifecycle/hooks/): Click to update a signal, derive a value, and publish an imperative effect after commit. [Plain source](/minimal/lifecycle/hooks.tsx)
- [Interactive bitmap layer](/minimal-examples/render-layers/bitmap-layer/): Draw a dot into an OffscreenCanvas and route clicks through Pibbl's event boundary. [Plain source](/minimal/render-layers/bitmap-layer.tsx)
- [Define a Canvas primitive](/minimal-examples/lifecycle/primitive/): Supply synchronous drawing, style normalization, resolution, and opt-in measurement. [Plain source](/minimal/lifecycle/primitive.tsx)
- [Read and update signals](/minimal-examples/lifecycle/signals/): Use writable, readonly, and computed values with synchronous batching. [Plain source](/minimal/lifecycle/signals.ts)
## Documentation version

Documentation built with @pibbl/core 0.0.2, revision 272a94a. ALPHA — NOT FOR PRODUCTION USE.
