ef-workbench

Full editor shell. Composes hierarchy, canvas, and timeline into a complete editing layout.

ef-workbench is a CSS grid shell with three named slots: hierarchy (left panel), canvas (center), and timeline (bottom). It adds a toolbar row with mode switching (DOM vs canvas render), theme toggle, zoom controls, and export. Pan/zoom state and theme preference are persisted to localStorage.

<ef-workbench style="width: 100%; height: 100vh; display: block;">
  <ef-hierarchy slot="hierarchy" target="root" show-header header="Layers"></ef-hierarchy>

  <ef-fit-scale slot="canvas">
    <ef-timegroup id="root" mode="fixed" duration="10s" class="w-[1920px] h-[1080px] bg-slate-900">
      <!-- composition content -->
    </ef-timegroup>
  </ef-fit-scale>

  <ef-timeline slot="timeline" target="root" show-ruler show-playback-controls></ef-timeline>
</ef-workbench>

Alternatively, set the workbench attribute directly on a root ef-timegroup to auto-wrap:

<ef-timegroup workbench mode="fixed" duration="10s" class="w-[1920px] h-[1080px]">
  <!-- workbench is created automatically -->
</ef-timegroup>

Slots:

SlotDescription
canvasThe composition — typically ef-fit-scale wrapping an ef-timegroup
hierarchyLayer panel — typically ef-hierarchy
timelineTimeline panel — typically ef-timeline

Render modes:

ModeDescription
domLive DOM rendering. ef-fit-scale is paused; the timegroup updates in place.
canvasRAF render loop via renderTimegroupToCanvas. Adaptive resolution during motion.

Public methods:

MethodDescription
startExport(options)Begin rendering to video
cancelExport()Abort an in-progress export