{"version":3,"file":"useTimelineScrollTop.mjs","names":[],"sources":["../../../src/hooks/viewport/useTimelineScrollTop.ts"],"sourcesContent":["import type { TimelineEngine } from '@techsquidtv/canvas-timeline-core';\nimport { useTimelineExternalStore } from '#react/hooks/core/useTimelineExternalStore';\n\nconst scrollTopEvents = ['scroll:change', 'render'] as const;\nconst getTimelineScrollTop = (engine: TimelineEngine) => engine.scrollTop;\n\n/**\n * Hook to subscribe directly to scroll top position changes.\n * Bypasses root-level context state updates for smooth vertical navigation.\n *\n * @returns The current scroll top offset in pixels.\n */\nexport function useTimelineScrollTop(): number {\n  return useTimelineExternalStore(scrollTopEvents, getTimelineScrollTop);\n}\n"],"mappings":";;AAGA,MAAM,kBAAkB,CAAC,iBAAiB,QAAQ;AAClD,MAAM,wBAAwB,WAA2B,OAAO;;;;;;;AAQhE,SAAgB,uBAA+B;CAC7C,OAAO,yBAAyB,iBAAiB,oBAAoB;AACvE"}