@techsquidtv/canvas-timeline-renderer
packages/renderer/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
10Renderer setup or worker failure details.
CanvasRendererPropsProps for the timeline canvas renderer layer.
CanvasRendererStatsDiagnostic timing details emitted after a canvas renderer draw pass.
TimelineCanvasLayerDrawContextContext passed to a custom canvas layer draw callback.
TimelineCanvasLayerHandleImperative handle returned by `useTimelineCanvasLayer`.
TimelineCanvasLayerPropsProps for the package custom canvas layer component.
TimelineCanvasLayerViewportViewport metrics supplied to a custom canvas layer draw callback.
TimelineRendererThemeCore rendering theme settings used by the Offscreen Canvas Web Worker to draw the timeline grid.
TimelineRenderOptionsToggles optional canvas feedback overlays that may be paired with separate interactive layers.
UseTimelineCanvasLayerOptionsOptions for `useTimelineCanvasLayer`.
Type Alias
7Reason the worker rendered a new canvas timeline frame.
DeepPartialMakes every nested property in a type optional.
TimelineCanvasLayerDrawDraw callback used by custom canvas layers.
TimelineCanvasLayerRenderReasonReason a custom canvas layer redraw was requested.
TimelineRendererThemeInputPartial renderer theme overrides merged with the built-in canvas defaults.
TimelineRulerLabelFormatLabel style used by timeline ruler ticks.
TimelineRulerOptionsOptional ruler behavior for canvas-painted timeline ticks and labels.
Variable
3Function
5Renders the timeline canvas layer using an offscreen worker.
createTimelineRendererThemeCreates a complete renderer theme from optional nested overrides.
getPresetColorGenerates a random color value from the predefined list of aesthetic presets. Used when creating new clips, markers, or dynamic color selections.
resolveTimelineRendererThemeFromElementResolves shadcn/CSS custom properties into a serializable renderer theme. CSS is read on the main thread only. The returned object can be passed through postMessage to the worker without the worker touching DOM APIs.
useTimelineCanvasLayerWires an app-owned canvas to timeline geometry and redraw events. Drawing is imperative and scheduled through requestAnimationFrame so dense visual layers do not push scroll or zoom updates through React state.