Skip to content

HoverData

Read as Markdown

Import from @pibbl/core/viz. Evaluates an ordinary synchronous query and renders its typed result.

query(context) reads current signals and context.scale(id) snapshots. Its synchronous result (including undefined) goes to children(result). Callbacks cannot call hooks or write signals; return components for hooks. Query function identity does not determine child identity. The context cannot be retained.

Evaluates an ordinary synchronous query under the current scale scope.

HoverData: <T>({ query, children }: HoverDataProps<T>) => PibblNode

Related API: HoverData, HoverDataProps, PibblNode.

  • props — Hover query and child renderer receiving its result. See HoverDataProps.

Content rendered from the current hover query result. See PibblNode.

HoverDataProps

PibblNode

View source — packages/core/src/features/viz/lib/hover-data.tsx:15

Scale lookup context supplied when evaluating a hover query.

interface HoverQueryContext

Related API: HoverQueryContext.

ScaleId

ResolvedContinuousScale

HoverQuery

View source — packages/core/src/features/viz/lib/hover-types.ts:13

scale
scale: (id: ScaleId) => ResolvedContinuousScale

Related API: ScaleId, ResolvedContinuousScale.

Looks up a resolved continuous scale by its identifier. See ResolvedContinuousScale.

  • id — Identity of the scale needed by the query. See ScaleId.

The resolved continuous scale. See ResolvedContinuousScale.

View source — packages/core/src/features/viz/lib/hover-types.ts:19

A query that resolves reactive hover input into a hit or no result.

type HoverQuery<T> = (context: HoverQueryContext) => T | undefined

Related API: HoverQuery, HoverQueryContext.

  • context — Pointer position and scale lookup for this query. See HoverQueryContext.

The current match, or undefined when there is no match.

HoverQueryContext

HoverDataProps

closestPoint

View source — packages/core/src/features/viz/lib/hover-types.ts:32

Authored inputs for HoverData, including the declared data and presentation options.

interface HoverDataProps<T>

Related API: HoverDataProps.

HoverQuery

PibblNode

HoverData

View source — packages/core/src/features/viz/lib/hover-types.ts:40

query
readonly query: HoverQuery<T> & (T extends PromiseLike<unknown> ? never : unknown)

Related API: HoverQuery.

Query that selects a style rule or resolves a hover result. See HoverQuery.

View source — packages/core/src/features/viz/lib/hover-types.ts:42

children
readonly children: (result: T | undefined) => PibblNode

Related API: PibblNode.

Descendant content or the callback that supplies it. See PibblNode.

  • result — Current query match, or undefined when there is no match.

Pibbl content to render for the hover state. See PibblNode.

View source — packages/core/src/features/viz/lib/hover-types.ts:48

Read the Authoring, signals, and lifecycle companion for ownership, adaptation, failure modes, and verification. Agent start provides the version-selection workflow.

Documentation built with @pibbl/core 0.0.2, revision 2dccb19. ALPHA — NOT FOR PRODUCTION USE.