{"version":3,"file":"VerticalScrollbar.mjs","names":[],"sources":["../../../src/components/scrollbars/VerticalScrollbar.tsx"],"sourcesContent":["import React from 'react';\nimport {\n  RangeScrollbar,\n  type RangeScrollbarHandleProps,\n  type RangeScrollbarRootProps,\n  type RangeScrollbarThumbProps,\n} from '#react/rangeScrollbar';\nimport { useTimelineVerticalRangeControl } from '#react/hooks';\n\n/** Props for the timeline vertical scrollbar root. */\nexport type VerticalScrollbarRootProps = Omit<\n  RangeScrollbarRootProps,\n  'max' | 'min' | 'minSpan' | 'onValueChange' | 'orientation' | 'value'\n>;\n\n/** Props for the timeline vertical scrollbar thumb. */\nexport type VerticalScrollbarThumbProps = RangeScrollbarThumbProps;\n\n/** Props for a timeline vertical scrollbar resize handle. */\nexport type VerticalScrollbarHandleProps = RangeScrollbarHandleProps;\n\n/**\n * Timeline-aware scrollbar root for panning the vertical track viewport.\n *\n * @param props - Timeline vertical scrollbar DOM props.\n * @returns A range scrollbar root wired to the current `TimelineEngine`.\n */\nexport const VerticalScrollbarRoot = React.forwardRef<HTMLDivElement, VerticalScrollbarRootProps>(\n  ({ children, className = '', ...props }, ref) => {\n    const verticalScrollbar = useTimelineVerticalRangeControl();\n\n    return (\n      <RangeScrollbar.Root\n        ref={ref}\n        className={['timeline-vertical-scrollbar', className].filter(Boolean).join(' ')}\n        {...verticalScrollbar.rootProps}\n        {...props}\n      >\n        {children}\n      </RangeScrollbar.Root>\n    );\n  }\n);\n\nVerticalScrollbarRoot.displayName = 'Timeline.VerticalScrollbar';\n\n/**\n * Draggable timeline vertical scrollbar thumb.\n *\n * @param props - DOM props and optional custom content for the vertical thumb.\n * @returns A range scrollbar thumb that pans the timeline track viewport.\n */\nexport const VerticalScrollbarThumb = React.forwardRef<HTMLDivElement, VerticalScrollbarThumbProps>(\n  ({ className = '', ...props }, ref) => (\n    <RangeScrollbar.Thumb\n      ref={ref}\n      className={['timeline-vertical-scrollbar-thumb', className].filter(Boolean).join(' ')}\n      aria-label={props['aria-label'] ?? 'Timeline vertical viewport'}\n      {...props}\n    />\n  )\n);\n\nVerticalScrollbarThumb.displayName = 'Timeline.VerticalScrollbarThumb';\n\n/**\n * Timeline vertical scrollbar resize handle.\n *\n * @param props - Handle props.\n * @returns A range scrollbar handle for custom vertical range compositions.\n */\nexport const VerticalScrollbarHandle = React.forwardRef<\n  HTMLDivElement,\n  VerticalScrollbarHandleProps\n>((props, ref) => (\n  <RangeScrollbar.Handle\n    ref={ref}\n    {...props}\n    className={['timeline-vertical-scrollbar-handle', props.className].filter(Boolean).join(' ')}\n    aria-label={\n      props['aria-label'] ??\n      (props.side === 'start'\n        ? 'Timeline vertical viewport start'\n        : 'Timeline vertical viewport end')\n    }\n  />\n));\n\nVerticalScrollbarHandle.displayName = 'Timeline.VerticalScrollbarHandle';\n\n/**\n * Namespace of timeline-aware vertical scrollbar components.\n */\n// oxlint-disable-next-line react-refresh/only-export-components\nexport const VerticalScrollbar = {\n  /** Root element wired to timeline vertical scroll state. */\n  Root: VerticalScrollbarRoot,\n  /** Draggable thumb that pans the timeline track viewport. */\n  Thumb: VerticalScrollbarThumb,\n  /** Range handle for custom vertical range compositions. */\n  Handle: VerticalScrollbarHandle,\n};\n"],"mappings":";;;;;;;;;;;AA2BA,MAAa,wBAAwB,MAAM,YACxC,EAAE,UAAU,YAAY,IAAI,GAAG,SAAS,QAAQ;CAC/C,MAAM,oBAAoB,gCAAgC;CAE1D,OACE,oBAAC,eAAe,MAAhB;EACO;EACL,WAAW,CAAC,+BAA+B,SAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EAC9E,GAAI,kBAAkB;EACtB,GAAI;EAEH;CACkB,CAAA;AAEzB,CACF;AAEA,sBAAsB,cAAc;;;;;;;AAQpC,MAAa,yBAAyB,MAAM,YACzC,EAAE,YAAY,IAAI,GAAG,SAAS,QAC7B,oBAAC,eAAe,OAAhB;CACO;CACL,WAAW,CAAC,qCAAqC,SAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;CACpF,cAAY,MAAM,iBAAiB;CACnC,GAAI;AACL,CAAA,CAEL;AAEA,uBAAuB,cAAc;;;;;;;AAQrC,MAAa,0BAA0B,MAAM,YAG1C,OAAO,QACR,oBAAC,eAAe,QAAhB;CACO;CACL,GAAI;CACJ,WAAW,CAAC,sCAAsC,MAAM,SAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;CAC3F,cACE,MAAM,kBACL,MAAM,SAAS,UACZ,qCACA;AAEP,CAAA,CACF;AAED,wBAAwB,cAAc;;;;AAMtC,MAAa,oBAAoB;;CAE/B,MAAM;;CAEN,OAAO;;CAEP,QAAQ;AACV"}