API Reference

@techsquidtv/canvas-timeline-core

packages/core/src/index.ts

Common Entry Points

Start with these essential APIs, then check the full reference index below.

API Index

Exhaustive list of all public exports grouped by category.

Interface

97
ActiveClip

Clip that is active at a timeline time, including its mapped source time.

ActiveClipQuery

Filters for selecting active clips at a timeline time.

ActiveLayerOptions

Options for selecting active timeline layers at a timeline time. Use this when integrations need named layers such as `visuals`, `audio`, `subtitles`, or `effects` instead of one flat active-clip list. The same active clip can match more than one layer.

ActiveLayerResult

Active timeline layer lookup result. Results include every active clip matched by the requested selectors plus convenience `primary` entries for apps that only need the first match in each layer. Each `ActiveClip` includes mapped source time and source range data for preview and playback synchronization.

Clip

Represents an individual media clip node positioned at a specific timeline interval.

ClipCreatedEvent

Payload emitted by `clip:created` for committed clip creation.

ClipEditPreview

Transient edit-preview state attached to clips while an interaction is active. This state is not intended to be persisted with project data. UI layers can use it to render live editing affordances such as overwrite cut indicators.

ClipHitTestInput

Viewport-space pointer query for timeline clip hit testing.

ClipHitTestResult

Hit-test result for a clip pointer target.

ClipKeyframeChangeEvent

Keyframe add/update event payload.

ClipKeyframeRemoveEvent

Keyframe removal event payload.

ClipKeyframeSelectEvent

Keyframe selection change event payload.

ClipMoveEvent

Live clip movement event payload.

ClipPlayheadEvent

Event payload emitted when the playhead enters, updates within, or leaves a clip.

ClipRemovedEvent

Payload emitted by `clip:removed` for committed clip removal.

ClipResizeEvent

Live clip resizing event payload.

ClipSelectEvent

Clip selection change event payload.

ClipSlipEvent

Live clip slip event payload.

ClipSnapOptions

Persistent snap settings for one clip.

ClipSourceRange

Source-media interval covered by a timeline clip.

ClipSplitEvent

Payload emitted by `clip:split` for committed clip split.

ClipViewportRect

Viewport-space rectangle for a clip and its containing track.

EngineEventMap

Central event mapping definition for all engine events.

HistoryChangeEvent

Undo/redo history state change event payload.

InOutChangeEvent

Selection in/out point boundary change event payload.

Marker

Represents a bookmark or annotation pin on the timeline's top time ruler.

MarkerChangeEvent

Marker change event payload (add, remove, update).

MarkerSnapOptions

Persistent snap settings for one marker.

PlaybackOptions

Options for starting timeline playback.

SnapTargetOptions

Controls which built-in timeline boundaries are indexed as magnetic snap targets.

SourceFrame

Exact source-frame timestamp returned by a media integration.

SourceFrameResolver

App or media-player supplied exact source-frame resolver.

TimelineClipDropFeedback

Transient feedback for a live cross-track clip drag.

TimelineClipEntry

Flattened clip metadata shared by core geometry APIs, React hooks, and custom renderers.

TimelineClipMoveOptions

Options for moving a clip in time and optionally into another track.

TimelineClipMoveResult

Result metadata for a committed or previewed clip move.

TimelineClipRect

Clip entry with viewport geometry and editing/display state.

TimelineCubicBezier

Cubic Bezier easing control points used by Bezier keyframe interpolation.

TimelineDeleteRangeEditCommand

Command that removes a timeline range and ripples later clips closed by default.

TimelineEditAffectedRange

Range of timeline content affected by an edit command.

TimelineEditCommitResult

Result returned after committing an edit command.

TimelineEditImpact

Describes how an active timeline edit affects one clip. This state is transient and is intended for headless UI affordances during live editing interactions. It is not part of the persisted project model.

TimelineEditImpacts

Active live edit impacts for the current interaction. The model is operation-based so editing modes share the same headless React surface.

TimelineEditPolicy

App-defined behavioral policy for timeline edit commands.

TimelineEditPolicyContext

Context passed to product-defined edit policy callbacks.

TimelineEditPreview

Shared preview result produced for every edit command.

TimelineEditValidationResult

Result returned by command validation and policy callbacks.

TimelineInsertEditCommand

Command that inserts a new clip and pushes later clips forward.

TimelineInteractionGeometry

Canvas-aligned geometry settings for clip hit testing and affordance placement.

TimelineKeyframe

One clip-scoped property keyframe positioned at an absolute timeline time.

TimelineKeyframeCurveGeometryOptions

Options for keyframe curve segment and handle geometry.

TimelineKeyframeCurveHandle

Bezier curve handle entry with viewport geometry and edit state.

TimelineKeyframeCurveHandleViewportRect

Viewport-space rectangle for one keyframe curve handle affordance.

TimelineKeyframeCurveHitTestInput

Viewport-space pointer query for keyframe curve handle hit testing.

TimelineKeyframeCurvePoint

Viewport-space point used by keyframe curve segments and handles.

TimelineKeyframeCurveSegment

Keyframe curve segment entry with viewport geometry and optional Bezier handles.

TimelineKeyframeGeometryOptions

Options for keyframe geometry and hit-testing.

TimelineKeyframeHitTestInput

Viewport-space pointer query for timeline keyframe hit testing.

TimelineKeyframeMutationOptions

Options for committing or previewing keyframe mutations.

TimelineKeyframePointInput

Inputs for mapping a keyframe time/value pair into viewport space.

TimelineKeyframeRect

Keyframe entry with viewport geometry and edit/display state.

TimelineKeyframeViewportRect

Viewport-space rectangle for one keyframe affordance.

TimelineLiftRangeEditCommand

Command that removes a timeline range while leaving the gap in place.

TimelineMoveEditCommand

Command that moves an existing clip.

TimelineOverwriteEditCommand

Command that places a new clip and removes or trims overlaps on the target track.

TimelinePlaceClipCommand

Clip placement command shared by insert and overwrite edits.

TimelineRippleTrimEditCommand

Command that trims one boundary and ripples later clips on the same track.

TimelineRollTrimEditCommand

Command that rolls the shared boundary between two adjacent clips.

TimelineRulerTick

One viewport-space ruler tick for canvas, DOM, or custom rendering.

TimelineRulerTickOptions

Options for building shared headless timeline ruler ticks.

TimelineSetClipKeyframeOptions

Input for creating or upserting a clip keyframe.

TimelineSlideEditCommand

Command that moves an existing clip by a relative timeline offset.

TimelineSlipEditCommand

Command that shifts an existing clip's source start without moving timeline bounds.

TimelineSnapFeedback

Transient snap feedback consumed by canvas rendering and focused hooks.

TimelineSnapProviderContext

Context passed to runtime snap target providers.

TimelineSnapResult

Result of resolving a candidate time against the prepared snap index.

TimelineSnapTarget

One timeline time that can attract an edited boundary.

TimelineState

Represents the complete, serialized state model of the high performance timeline.

TimelineTrackGeometryOptions

Options for building track viewport geometry.

TimelineTrackHeightBatchOptions

Options for batching row-height updates with related viewport state.

TimelineTrackHeightUpdate

Expanded row height update for a timeline track.

TimelineTrackHitTestResult

Hit-test result for a timeline track row.

TimelineTrackRect

Viewport-space rectangle for a timeline track row.

TimelineTrimEditCommand

Command that trims one existing clip boundary.

TimelineUpdateClipKeyframeOptions

Input for updating one existing clip keyframe.

TimelineZoomConstraints

Engine-owned constraints for horizontal timeline zoom.

Track

A horizontal timeline lane containing clips and editing state. Tracks are app-owned rows in the timeline model. The engine uses each track's stable id for editing operations, reads the ordered clip list for rendering and hit testing, and honors view/editing flags such as visible, collapsed, locked, and muted.

TrackChangeEvent

Track change event payload (add, remove).

TrackHitTestInput

Viewport-space pointer query for timeline track hit testing.

TrackLockEvent

Track lock change event payload.

TrackMuteEvent

Track mute change event payload.

TrackResizeEvent

Track resize event payload.

TrackSelectEvent

Track selection change event payload.

TrackSnapOptions

Persistent snap settings for one track and its clips.

TrackVisibilityEvent

Track visibility change event payload.

VisibleTimelineClip

Viewport-intersecting clip entry with clipped timeline and source-media ranges.

VisibleTimelineClipOptions

Options for building viewport-intersecting clip geometry.

Type Alias

27
ActiveLayerSelector

Filters for one named active layer. A layer selector describes the kind of active clips an app wants to drive, such as visual previews, audio playback, subtitles, effects, or a particular source asset. Selectors are matched against the active clips returned for a single timeline time.

ClipCreatedReason

Reason a committed engine command created a new clip.

ClipHitRegion

Region of a timeline clip hit by pointer interaction.

ClipRemovedReason

Reason a committed engine command removed a clip.

MaybePromise

A value that may be available immediately or after asynchronous media lookup.

PlaybackClockSource

Clock responsible for advancing playback. Internal playback uses the engine's requestAnimationFrame loop. External playback lets a media player or audio clock drive playhead updates.

SnapPreparationOptions

Options for building snap targets before a drag, trim, or range-boundary edit.

SourceFrameResolveMode

Source-frame lookup strategy for media integrations.

TimelineClipDropFailureReason

Reason a clip cannot currently be dropped on a track.

TimelineClipGeometryOptions

Options for building all clip viewport geometry.

TimelineEditCommand

First-class edit command accepted by TimelineEngine edit APIs.

TimelineEditImpactEffect

Consequence of an active edit for an affected clip.

TimelineEditMode

Current tool or intent family selected by product editor chrome.

TimelineEditOperation

Editing operation that can produce live edit impacts.

TimelineEditRejectionReason

Machine-readable reason an edit command cannot be resolved or committed.

TimelineKeyframeCurveHandleHitTestResult

Hit-test result for a keyframe curve handle pointer target.

TimelineKeyframeCurveHandleKind

Bezier control handle edited by a curve interaction.

TimelineKeyframeHitTestResult

Hit-test result for a timeline keyframe pointer target.

TimelineKeyframeInterpolation

Segment interpolation mode used from one keyframe to the next.

TimelineKeyframeProperty

First-party clip property that can be animated with timeline keyframes.

TimelineRulerLabelFormat

Label style used by timeline ruler ticks.

TimelineRulerTickKind

Ruler tick visual weight.

TimelineSnapInteractionOperation

Timeline interaction currently preparing or resolving snap targets.

TimelineSnapProvider

Runtime source of app-defined snap targets such as grids, beats, and captions.

TimelineSnapTargetKind

Built-in and application-defined magnetic snap target categories.

VisibleTimelineKeyframe

Viewport-intersecting keyframe entry.

VisibleTimelineKeyframeCurveSegment

Viewport-intersecting keyframe curve segment.