{"version":3,"file":"useTimelineZoomScale.mjs","names":[],"sources":["../../../src/hooks/viewport/useTimelineZoomScale.ts"],"sourcesContent":["import type { TimelineEngine } from '@techsquidtv/canvas-timeline-core';\nimport { useTimelineExternalStore } from '#react/hooks/core/useTimelineExternalStore';\n\nconst zoomScaleEvents = ['zoom:change', 'render'] as const;\nconst getTimelineZoomScale = (engine: TimelineEngine) => engine.zoomScale;\n\n/**\n * Hook to subscribe directly to zoom changes.\n * Bypasses root-level context state updates for low-latency zoom interaction.\n *\n * @returns The current zoom scale factor (pixels per second).\n */\nexport function useTimelineZoomScale(): number {\n  return useTimelineExternalStore(zoomScaleEvents, getTimelineZoomScale);\n}\n"],"mappings":";;AAGA,MAAM,kBAAkB,CAAC,eAAe,QAAQ;AAChD,MAAM,wBAAwB,WAA2B,OAAO;;;;;;;AAQhE,SAAgB,uBAA+B;CAC7C,OAAO,yBAAyB,iBAAiB,oBAAoB;AACvE"}