@waveform-playlist/annotations 13.0.1 → 14.0.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/parsers/aeneas.ts","../src/components/Annotation.tsx","../src/components/AnnotationBox.tsx","../src/components/AnnotationBoxesWrapper.tsx","../src/components/AnnotationsTrack.tsx","../src/components/AnnotationText.tsx","../src/components/ContinuousPlayCheckbox.tsx","../src/components/LinkEndpointsCheckbox.tsx","../src/components/EditableCheckbox.tsx","../src/components/DownloadAnnotationsButton.tsx","../src/AnnotationProvider.tsx","../src/hooks/useAnnotationControls.ts"],"sourcesContent":["// Parsers\nexport { parseAeneas, serializeAeneas } from './parsers/aeneas';\nexport type { AeneasFragment } from './parsers/aeneas';\n\n// Components\nexport { Annotation } from './components/Annotation';\nexport type { AnnotationProps } from './components/Annotation';\n\nexport { AnnotationBox } from './components/AnnotationBox';\nexport type { AnnotationBoxComponentProps } from './components/AnnotationBox';\n\nexport { AnnotationBoxesWrapper } from './components/AnnotationBoxesWrapper';\nexport type { AnnotationBoxesWrapperProps } from './components/AnnotationBoxesWrapper';\n\nexport { AnnotationsTrack } from './components/AnnotationsTrack';\nexport type { AnnotationsTrackProps } from './components/AnnotationsTrack';\n\nexport { AnnotationText } from './components/AnnotationText';\nexport type { AnnotationTextProps } from './components/AnnotationText';\n\nexport { ContinuousPlayCheckbox } from './components/ContinuousPlayCheckbox';\nexport type { ContinuousPlayCheckboxProps } from './components/ContinuousPlayCheckbox';\n\nexport { LinkEndpointsCheckbox } from './components/LinkEndpointsCheckbox';\nexport type { LinkEndpointsCheckboxProps } from './components/LinkEndpointsCheckbox';\n\nexport { EditableCheckbox } from './components/EditableCheckbox';\nexport type { EditableCheckboxProps } from './components/EditableCheckbox';\n\nexport { DownloadAnnotationsButton } from './components/DownloadAnnotationsButton';\nexport type { DownloadAnnotationsButtonProps } from './components/DownloadAnnotationsButton';\n\n// Provider (registers annotation components with browser package)\nexport { AnnotationProvider } from './AnnotationProvider';\n\n// Hooks\nexport { useAnnotationControls } from './hooks/useAnnotationControls';\nexport type {\n UseAnnotationControlsOptions,\n UseAnnotationControlsReturn,\n AnnotationUpdateParams,\n} from './hooks/useAnnotationControls';\n","import type { AnnotationData } from '@waveform-playlist/core';\n\nexport interface AeneasFragment {\n begin: string;\n end: string;\n id: string;\n language: string;\n lines: string[];\n}\n\nexport function parseAeneas(data: AeneasFragment): AnnotationData {\n return {\n id: data.id,\n start: parseFloat(data.begin),\n end: parseFloat(data.end),\n lines: data.lines,\n language: data.language,\n };\n}\n\nexport function serializeAeneas(annotation: AnnotationData): AeneasFragment {\n return {\n id: annotation.id,\n begin: annotation.start.toFixed(3),\n end: annotation.end.toFixed(3),\n lines: annotation.lines,\n language: annotation.language || 'en',\n };\n}\n","import React, { FunctionComponent, useState } from 'react';\nimport styled from 'styled-components';\nimport type {\n AnnotationData,\n AnnotationAction,\n AnnotationActionOptions,\n} from '@waveform-playlist/core';\n\ninterface AnnotationOverlayProps {\n readonly $left: number;\n readonly $width: number;\n readonly $color: string;\n}\n\nconst AnnotationOverlay = styled.div.attrs<AnnotationOverlayProps>((props) => ({\n style: {\n left: `${props.$left}px`,\n width: `${props.$width}px`,\n },\n}))<AnnotationOverlayProps>`\n position: absolute;\n top: 0;\n background: ${(props) => props.$color};\n height: 100%;\n z-index: 10;\n pointer-events: auto;\n opacity: 0.3;\n border: 2px solid ${(props) => props.$color};\n border-radius: 4px;\n cursor: pointer;\n\n &:hover {\n opacity: 0.5;\n border-color: ${(props) => props.$color};\n }\n`;\n\nconst AnnotationText = styled.div`\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n background: rgba(0, 0, 0, 0.7);\n color: white;\n padding: 4px 8px;\n font-size: 12px;\n line-height: 1.3;\n max-height: 60%;\n overflow: hidden;\n text-overflow: ellipsis;\n pointer-events: none;\n white-space: pre-wrap;\n word-break: break-word;\n`;\n\nconst EditableText = styled.textarea`\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n background: rgba(0, 0, 0, 0.9);\n color: white;\n padding: 4px 8px;\n font-size: 12px;\n line-height: 1.3;\n max-height: 60%;\n overflow: auto;\n border: 1px solid #fff;\n resize: none;\n font-family: inherit;\n\n &:focus {\n outline: none;\n border-color: #4caf50;\n }\n`;\n\nconst ControlsBar = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n background: rgba(0, 0, 0, 0.8);\n display: flex;\n gap: 4px;\n padding: 4px;\n justify-content: flex-start;\n align-items: center;\n`;\n\nconst ControlButton = styled.button`\n background: transparent;\n border: 1px solid rgba(255, 255, 255, 0.5);\n color: white;\n padding: 4px 8px;\n font-size: 10px;\n cursor: pointer;\n border-radius: 3px;\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 24px;\n height: 24px;\n\n &:hover {\n background: rgba(255, 255, 255, 0.2);\n border-color: white;\n }\n\n &:active {\n background: rgba(255, 255, 255, 0.3);\n }\n`;\n\n// Re-export shared annotation types from core\nexport type {\n AnnotationData,\n AnnotationAction,\n AnnotationActionOptions,\n} from '@waveform-playlist/core';\n\nexport interface AnnotationProps {\n annotation: AnnotationData;\n index: number;\n allAnnotations: AnnotationData[];\n startPosition: number; // Start position in pixels\n endPosition: number; // End position in pixels\n color?: string;\n editable?: boolean;\n controls?: AnnotationAction[];\n onAnnotationUpdate?: (updatedAnnotations: AnnotationData[]) => void;\n annotationListConfig?: AnnotationActionOptions;\n onClick?: (annotation: AnnotationData) => void;\n}\n\nexport const Annotation: FunctionComponent<AnnotationProps> = ({\n annotation,\n index,\n allAnnotations,\n startPosition,\n endPosition,\n color = '#ff9800',\n editable = false,\n controls = [],\n onAnnotationUpdate,\n annotationListConfig,\n onClick,\n}) => {\n const [isEditing, setIsEditing] = useState(false);\n const [editedText, setEditedText] = useState(annotation.lines.join('\\n'));\n const width = Math.max(0, endPosition - startPosition);\n\n if (width <= 0) {\n return null;\n }\n\n const handleClick = () => {\n if (onClick) {\n onClick(annotation);\n }\n };\n\n const handleDoubleClick = () => {\n if (editable) {\n setIsEditing(true);\n }\n };\n\n const handleTextChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n setEditedText(e.target.value);\n };\n\n const handleTextBlur = () => {\n setIsEditing(false);\n const newLines = editedText.split('\\n');\n if (newLines.join('\\n') !== annotation.lines.join('\\n')) {\n const updatedAnnotations = [...allAnnotations];\n updatedAnnotations[index] = { ...annotation, lines: newLines };\n if (onAnnotationUpdate) {\n onAnnotationUpdate(updatedAnnotations);\n }\n }\n };\n\n const handleControlClick = (control: AnnotationAction) => {\n const annotationsCopy = [...allAnnotations];\n control.action(annotationsCopy[index], index, annotationsCopy, annotationListConfig || {});\n if (onAnnotationUpdate) {\n onAnnotationUpdate(annotationsCopy);\n }\n };\n\n const getIconClass = (classString: string) => {\n // Convert \"fas.fa-minus\" to \"fas fa-minus\"\n return classString.replace(/\\./g, ' ');\n };\n\n return (\n <AnnotationOverlay\n $left={startPosition}\n $width={width}\n $color={color}\n onClick={handleClick}\n onDoubleClick={handleDoubleClick}\n >\n {controls.length > 0 && (\n <ControlsBar>\n {controls.map((control, idx) => (\n <ControlButton\n key={idx}\n title={control.title}\n onClick={(e) => {\n e.stopPropagation();\n handleControlClick(control);\n }}\n >\n {control.text ? control.text : <i className={getIconClass(control.class || '')} />}\n </ControlButton>\n ))}\n </ControlsBar>\n )}\n {isEditing ? (\n <EditableText\n value={editedText}\n onChange={handleTextChange}\n onBlur={handleTextBlur}\n autoFocus\n onClick={(e) => e.stopPropagation()}\n onDoubleClick={(e) => e.stopPropagation()}\n />\n ) : (\n <AnnotationText>{annotation.lines.join('\\n')}</AnnotationText>\n )}\n </AnnotationOverlay>\n );\n};\n","import React, { FunctionComponent } from 'react';\nimport styled from 'styled-components';\nimport { useDraggable } from '@dnd-kit/react';\nimport { Feedback } from '@dnd-kit/dom';\n\n// Per-entity Feedback plugin config (@dnd-kit 0.5+), hoisted for a stable\n// reference. 'none' disables the Feedback plugin for the edge handles — resize\n// visual feedback comes from React state repositioning the annotation, not CSS\n// translate. Declared on the entity so it works inside ANY DragDropProvider.\nconst EDGE_HANDLE_PLUGINS = [Feedback.configure({ feedback: 'none' })];\n\ninterface WrapperProps {\n readonly $left: number;\n readonly $width: number;\n}\n\n// Wrapper positions the annotation and contains both Box and ResizeHandles as siblings\nconst Wrapper = styled.div.attrs<WrapperProps>((props) => ({\n style: {\n left: `${props.$left}px`,\n width: `${props.$width}px`,\n },\n}))<WrapperProps>`\n position: absolute;\n top: 0;\n height: 100%;\n pointer-events: none; /* Let events pass through to children */\n`;\n\ninterface BoxProps {\n readonly $color: string;\n readonly $isActive?: boolean;\n}\n\nconst Box = styled.div<BoxProps>`\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 100%;\n background: ${(props) =>\n props.$isActive\n ? props.theme?.annotationBoxActiveBackground || 'rgba(255, 200, 100, 0.95)'\n : props.theme?.annotationBoxBackground || 'rgba(255, 255, 255, 0.85)'};\n border: ${(props) => (props.$isActive ? '3px' : '2px')} solid\n ${(props) =>\n props.$isActive ? props.theme?.annotationBoxActiveBorder || '#ff9800' : props.$color};\n border-radius: 4px;\n cursor: pointer;\n pointer-events: auto;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n transition: all 0.2s ease;\n box-shadow: ${(props) =>\n props.$isActive\n ? '0 2px 8px rgba(255, 152, 0, 0.4), inset 0 0 0 1px rgba(255, 152, 0, 0.2)'\n : '0 1px 3px rgba(0, 0, 0, 0.1)'};\n\n &:hover {\n background: ${(props) =>\n props.theme?.annotationBoxHoverBackground || 'rgba(255, 255, 255, 0.98)'};\n border-color: ${(props) => props.theme?.annotationBoxActiveBorder || '#ff9800'};\n border-width: 3px;\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);\n }\n`;\n\nconst Label = styled.span`\n font-size: 12px;\n font-weight: 600;\n color: ${(props) => props.theme?.annotationLabelColor || '#2a2a2a'};\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 0 6px;\n letter-spacing: 0.3px;\n user-select: none;\n`;\n\ninterface ResizeHandleStyledProps {\n $position: 'left' | 'right';\n $isDragging?: boolean;\n}\n\n// ResizeHandles sit inside their annotation's bounds so adjacent annotations'\n// handles never overlap — each handle is independently grabbable.\nconst ResizeHandle = styled.div<ResizeHandleStyledProps>`\n position: absolute;\n top: 0;\n ${(props) => (props.$position === 'left' ? 'left: 0' : 'right: 0')};\n width: 8px;\n height: 100%;\n cursor: ew-resize;\n z-index: 120;\n background: ${(props) =>\n props.$isDragging\n ? props.theme?.annotationResizeHandleColor || 'rgba(0, 0, 0, 0.2)'\n : 'transparent'};\n border-radius: 4px;\n touch-action: none; /* Important for @dnd-kit on touch devices */\n pointer-events: auto;\n\n &::before {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 4px;\n height: 60%;\n background: ${(props) =>\n props.$isDragging\n ? props.theme?.annotationResizeHandleActiveColor || 'rgba(0, 0, 0, 0.8)'\n : props.theme?.annotationResizeHandleColor || 'rgba(0, 0, 0, 0.4)'};\n border-radius: 2px;\n opacity: ${(props) => (props.$isDragging ? 1 : 0.6)};\n transition:\n opacity 0.2s,\n background 0.2s;\n }\n\n &:hover {\n background: ${(props) => props.theme?.annotationResizeHandleColor || 'rgba(0, 0, 0, 0.1)'};\n }\n\n &:hover::before {\n opacity: 1;\n background: ${(props) =>\n props.theme?.annotationResizeHandleActiveColor || 'rgba(0, 0, 0, 0.7)'};\n }\n`;\n\nexport interface AnnotationBoxComponentProps {\n annotationId: string;\n annotationIndex: number;\n startPosition: number;\n endPosition: number;\n label?: string;\n color?: string;\n isActive?: boolean;\n onClick?: () => void;\n editable?: boolean; // Whether to show drag handles\n}\n\nexport const AnnotationBox: FunctionComponent<AnnotationBoxComponentProps> = ({\n annotationId,\n annotationIndex,\n startPosition,\n endPosition,\n label,\n color = '#ff9800',\n isActive = false,\n onClick,\n editable = true,\n}) => {\n const width = Math.max(0, endPosition - startPosition);\n\n // Left (start) boundary draggable\n const leftBoundaryId = `annotation-boundary-start-${annotationIndex}`;\n const { ref: leftRef, isDragSource: isLeftDragging } = useDraggable({\n id: leftBoundaryId,\n data: { annotationId, annotationIndex, edge: 'start' as const },\n disabled: !editable,\n plugins: EDGE_HANDLE_PLUGINS,\n });\n\n // Right (end) boundary draggable\n const rightBoundaryId = `annotation-boundary-end-${annotationIndex}`;\n const { ref: rightRef, isDragSource: isRightDragging } = useDraggable({\n id: rightBoundaryId,\n data: { annotationId, annotationIndex, edge: 'end' as const },\n disabled: !editable,\n plugins: EDGE_HANDLE_PLUGINS,\n });\n\n if (width <= 0) {\n return null;\n }\n\n const handleHandleClick = (e: React.MouseEvent) => {\n // Prevent clicks on resize handles from bubbling to annotation box\n e.stopPropagation();\n };\n\n return (\n <Wrapper $left={startPosition} $width={width}>\n <Box $color={color} $isActive={isActive} onClick={onClick}>\n {label && <Label>{label}</Label>}\n </Box>\n {editable && (\n <ResizeHandle\n ref={leftRef}\n $position=\"left\"\n $isDragging={isLeftDragging}\n onClick={handleHandleClick}\n />\n )}\n {editable && (\n <ResizeHandle\n ref={rightRef}\n $position=\"right\"\n $isDragging={isRightDragging}\n onClick={handleHandleClick}\n />\n )}\n </Wrapper>\n );\n};\n","import React, { FunctionComponent } from 'react';\nimport styled from 'styled-components';\n\ninterface ContainerProps {\n readonly $height: number;\n readonly $width?: number;\n}\n\nconst Container = styled.div.attrs<ContainerProps>((props) => ({\n style: {\n height: `${props.$height}px`,\n },\n}))<ContainerProps>`\n position: relative;\n ${(props) => props.$width !== undefined && `width: ${props.$width}px;`}\n background: transparent;\n z-index: 110;\n`;\n\nconst BoxesContainer = styled.div<{ $offset?: number }>`\n position: relative;\n height: 100%;\n padding-left: ${(props) => props.$offset || 0}px;\n`;\n\nexport interface AnnotationBoxesWrapperProps {\n className?: string;\n children?: React.ReactNode;\n height?: number;\n offset?: number;\n width?: number;\n}\n\nexport const AnnotationBoxesWrapper: FunctionComponent<AnnotationBoxesWrapperProps> = ({\n children,\n className,\n height = 30,\n offset = 0,\n width,\n}) => {\n return (\n <Container className={className} $height={height} $width={width}>\n <BoxesContainer $offset={offset}>{children}</BoxesContainer>\n </Container>\n );\n};\n","import React, { FunctionComponent } from 'react';\nimport styled from 'styled-components';\n\ninterface ContainerProps {\n readonly $height: number;\n readonly $width?: number;\n}\n\nconst Container = styled.div.attrs<ContainerProps>((props) => ({\n style: {\n height: `${props.$height}px`,\n },\n}))<ContainerProps>`\n position: relative;\n ${(props) => props.$width !== undefined && `width: ${props.$width}px;`}\n background: transparent;\n`;\n\nconst AnnotationsContainer = styled.div<{ $offset?: number }>`\n position: relative;\n height: 100%;\n padding-left: ${(props) => props.$offset || 0}px;\n`;\n\nexport interface AnnotationsTrackProps {\n className?: string;\n children?: React.ReactNode;\n height?: number;\n offset?: number;\n width?: number;\n}\n\nexport const AnnotationsTrack: FunctionComponent<AnnotationsTrackProps> = ({\n children,\n className,\n height = 100,\n offset = 0,\n width,\n}) => {\n return (\n <Container className={className} $height={height} $width={width}>\n <AnnotationsContainer $offset={offset}>{children}</AnnotationsContainer>\n </Container>\n );\n};\n","import React, { FunctionComponent, useRef, useEffect } from 'react';\nimport styled from 'styled-components';\nimport type {\n AnnotationData,\n AnnotationAction,\n AnnotationActionOptions,\n RenderAnnotationItemProps,\n} from '@waveform-playlist/core';\n\ninterface ContainerProps {\n $height?: number;\n}\n\nconst Container = styled.div<ContainerProps>`\n background: ${(props) => props.theme?.backgroundColor || '#fff'};\n ${(props) => (props.$height ? `height: ${props.$height}px;` : 'max-height: 200px;')}\n overflow-y: auto;\n padding: 8px;\n`;\n\nconst AnnotationItem = styled.div<{ $isActive?: boolean }>`\n padding: 12px;\n margin-bottom: 6px;\n border-left: 4px solid ${(props) => (props.$isActive ? '#ff9800' : 'transparent')};\n background: ${(props) => (props.$isActive ? 'rgba(255, 152, 0, 0.15)' : 'transparent')};\n border-radius: 4px;\n transition: all 0.2s;\n cursor: pointer;\n box-shadow: ${(props) =>\n props.$isActive\n ? '0 2px 8px rgba(255, 152, 0, 0.25), inset 0 0 0 1px rgba(255, 152, 0, 0.3)'\n : 'none'};\n\n &:hover {\n background: ${(props) =>\n props.$isActive\n ? 'rgba(255, 152, 0, 0.2)'\n : props.theme?.annotationTextItemHoverBackground || 'rgba(0, 0, 0, 0.05)'};\n border-left-color: ${(props) =>\n props.$isActive ? '#ff9800' : props.theme?.borderColor || '#ddd'};\n }\n\n &:focus-visible {\n outline: 2px solid #ff9800;\n outline-offset: 2px;\n }\n`;\n\nconst AnnotationHeader = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 6px;\n`;\n\nconst AnnotationInfo = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nconst AnnotationIdLabel = styled.span<{ $isEditable?: boolean }>`\n font-size: 11px;\n font-weight: 600;\n color: ${(props) => props.theme?.textColorMuted || '#666'};\n background: transparent;\n padding: 2px 6px;\n border-radius: 3px;\n min-width: 20px;\n outline: ${(props) =>\n props.$isEditable ? `1px dashed ${props.theme?.borderColor || '#ddd'}` : 'none'};\n\n &[contenteditable='true']:focus {\n outline: 2px solid #ff9800;\n background: rgba(255, 152, 0, 0.1);\n }\n`;\n\nconst TimeRange = styled.span`\n font-size: 12px;\n font-weight: 500;\n color: ${(props) => props.theme?.textColorMuted || '#555'};\n font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;\n letter-spacing: 0.5px;\n`;\n\nconst AnnotationControls = styled.div`\n display: flex;\n gap: 6px;\n`;\n\nconst ControlButton = styled.button`\n background: ${(props) => props.theme?.surfaceColor || '#f5f5f5'};\n border: 1px solid ${(props) => props.theme?.borderColor || '#ccc'};\n color: ${(props) => props.theme?.textColor || '#333'};\n padding: 4px 8px;\n font-size: 14px;\n cursor: pointer;\n border-radius: 4px;\n transition: all 0.15s ease;\n\n &:hover {\n background: ${(props) => props.theme?.inputBackground || '#3d3d3d'};\n border-color: ${(props) => props.theme?.textColorMuted || '#999'};\n transform: scale(1.05);\n }\n\n &:active {\n transform: scale(0.95);\n }\n`;\n\nconst AnnotationTextContent = styled.div<{ $isEditable?: boolean }>`\n font-size: 14px;\n line-height: 1.6;\n color: ${(props) => props.theme?.textColor || '#2a2a2a'};\n white-space: pre-wrap;\n word-break: break-word;\n outline: ${(props) =>\n props.$isEditable ? `1px dashed ${props.theme?.borderColor || '#ddd'}` : 'none'};\n padding: ${(props) => (props.$isEditable ? '6px' : '0')};\n border-radius: 3px;\n min-height: 20px;\n\n &[contenteditable='true']:focus {\n outline: 2px solid #ff9800;\n background: rgba(255, 152, 0, 0.1);\n }\n`;\n\n// Re-export from core\nexport type { RenderAnnotationItemProps } from '@waveform-playlist/core';\n\nexport interface AnnotationTextProps {\n annotations: AnnotationData[];\n activeAnnotationId?: string;\n shouldScrollToActive?: boolean;\n /** Where to position the active annotation when scrolling: 'center', 'start', 'end', or 'nearest'. Defaults to 'center'. */\n scrollActivePosition?: ScrollLogicalPosition;\n /** Which scrollable containers to scroll: 'nearest' (only the annotation list) or 'all' (including viewport). Defaults to 'nearest'. */\n scrollActiveContainer?: 'nearest' | 'all';\n editable?: boolean;\n controls?: AnnotationAction[];\n annotationListConfig?: AnnotationActionOptions;\n height?: number;\n onAnnotationClick?: (annotation: AnnotationData) => void;\n onAnnotationUpdate?: (updatedAnnotations: AnnotationData[]) => void;\n /**\n * Custom render function for annotation items.\n * When provided, completely replaces the default annotation item rendering.\n * Use this to customize the appearance of each annotation in the list.\n */\n renderAnnotationItem?: (props: RenderAnnotationItemProps) => React.ReactNode;\n}\n\nconst AnnotationTextComponent: FunctionComponent<AnnotationTextProps> = ({\n annotations,\n activeAnnotationId,\n shouldScrollToActive = false,\n scrollActivePosition = 'center',\n scrollActiveContainer = 'nearest',\n editable = false,\n controls = [],\n annotationListConfig,\n height,\n onAnnotationClick,\n onAnnotationUpdate,\n renderAnnotationItem,\n}) => {\n const activeAnnotationRef = useRef<HTMLDivElement>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n const prevActiveIdRef = useRef<string | undefined>(undefined);\n\n // Track component renders and scroll position\n useEffect(() => {\n // Render tracking removed\n });\n\n // Track scroll changes\n useEffect(() => {\n const container = containerRef.current;\n if (!container) return;\n\n const handleScroll = () => {\n // Scroll tracking removed\n };\n\n container.addEventListener('scroll', handleScroll);\n return () => container.removeEventListener('scroll', handleScroll);\n }, []);\n\n // Auto-scroll to active annotation when it changes\n useEffect(() => {\n // Only scroll if parent says we should (prevents scrolling on remount after pause)\n if (activeAnnotationId && activeAnnotationRef.current && shouldScrollToActive) {\n activeAnnotationRef.current.scrollIntoView({\n behavior: 'smooth',\n block: scrollActivePosition,\n container: scrollActiveContainer,\n } as ScrollIntoViewOptions);\n }\n\n prevActiveIdRef.current = activeAnnotationId;\n }, [activeAnnotationId, shouldScrollToActive, scrollActivePosition, scrollActiveContainer]);\n\n const formatTime = (seconds: number): string => {\n if (isNaN(seconds) || !isFinite(seconds)) {\n return '0:00.000';\n }\n const mins = Math.floor(seconds / 60);\n const secs = (seconds % 60).toFixed(3);\n return `${mins}:${secs.padStart(6, '0')}`;\n };\n\n const handleTextEdit = (index: number, newText: string) => {\n if (!editable || !onAnnotationUpdate) return;\n\n const updatedAnnotations = [...annotations];\n updatedAnnotations[index] = {\n ...updatedAnnotations[index],\n lines: newText.split('\\n'),\n };\n onAnnotationUpdate(updatedAnnotations);\n };\n\n const handleIdEdit = (index: number, newId: string) => {\n if (!editable || !onAnnotationUpdate) return;\n\n const trimmedId = newId.trim();\n if (!trimmedId) return; // Don't allow empty IDs\n\n const updatedAnnotations = [...annotations];\n updatedAnnotations[index] = {\n ...updatedAnnotations[index],\n id: trimmedId,\n };\n onAnnotationUpdate(updatedAnnotations);\n };\n\n const handleControlClick = (\n control: AnnotationAction,\n annotation: AnnotationData,\n index: number\n ) => {\n if (!onAnnotationUpdate) return;\n\n const annotationsCopy = [...annotations];\n control.action(annotationsCopy[index], index, annotationsCopy, annotationListConfig || {});\n onAnnotationUpdate(annotationsCopy);\n };\n\n const getIconClass = (classString: string) => {\n return classString.replace(/\\./g, ' ');\n };\n\n return (\n <Container ref={containerRef} $height={height}>\n {annotations.map((annotation, index) => {\n const isActive = annotation.id === activeAnnotationId;\n const handleClick = () => onAnnotationClick?.(annotation);\n\n // Use custom render function if provided\n if (renderAnnotationItem) {\n return (\n <div key={annotation.id} ref={isActive ? activeAnnotationRef : null}>\n {renderAnnotationItem({\n annotation,\n index,\n isActive,\n onClick: handleClick,\n formatTime,\n })}\n </div>\n );\n }\n\n // Default rendering\n return (\n <AnnotationItem\n key={annotation.id}\n ref={isActive ? activeAnnotationRef : null}\n $isActive={isActive}\n onClick={handleClick}\n >\n <AnnotationHeader>\n <AnnotationInfo>\n <AnnotationIdLabel\n $isEditable={editable}\n contentEditable={editable}\n suppressContentEditableWarning\n onBlur={(e) => handleIdEdit(index, e.currentTarget.textContent || '')}\n onKeyDown={(e) => {\n if (e.key === 'Enter') {\n e.preventDefault();\n (e.currentTarget as HTMLElement).blur();\n }\n }}\n >\n {annotation.id}\n </AnnotationIdLabel>\n <TimeRange>\n {formatTime(annotation.start)} - {formatTime(annotation.end)}\n </TimeRange>\n </AnnotationInfo>\n {controls.length > 0 && (\n <AnnotationControls onClick={(e) => e.stopPropagation()}>\n {controls.map((control, idx) => (\n <ControlButton\n key={idx}\n title={control.title}\n onClick={() => handleControlClick(control, annotation, index)}\n >\n {control.text ? (\n control.text\n ) : (\n <i className={getIconClass(control.class || '')} />\n )}\n </ControlButton>\n ))}\n </AnnotationControls>\n )}\n </AnnotationHeader>\n <AnnotationTextContent\n $isEditable={editable}\n contentEditable={editable}\n suppressContentEditableWarning\n onBlur={(e) => handleTextEdit(index, e.currentTarget.textContent || '')}\n onKeyDown={(e) => {\n if (e.key === 'Enter') {\n e.preventDefault();\n (e.currentTarget as HTMLElement).blur();\n }\n }}\n >\n {annotation.lines.join('\\n')}\n </AnnotationTextContent>\n </AnnotationItem>\n );\n })}\n </Container>\n );\n};\n\n// Memoize to prevent unnecessary remounting when parent re-renders\nexport const AnnotationText = React.memo(AnnotationTextComponent);\n","import React from 'react';\nimport {\n BaseCheckboxWrapper,\n BaseCheckbox,\n BaseCheckboxLabel,\n} from '@waveform-playlist/ui-components';\n\nexport interface ContinuousPlayCheckboxProps {\n checked: boolean;\n onChange: (checked: boolean) => void;\n disabled?: boolean;\n className?: string;\n}\n\n/**\n * Checkbox control for enabling/disabling continuous play of annotations.\n * When enabled, playback continues from one annotation to the next without stopping.\n */\nexport const ContinuousPlayCheckbox: React.FC<ContinuousPlayCheckboxProps> = ({\n checked,\n onChange,\n disabled = false,\n className,\n}) => {\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n onChange(e.target.checked);\n };\n\n return (\n <BaseCheckboxWrapper className={className}>\n <BaseCheckbox\n type=\"checkbox\"\n id=\"continuous-play\"\n className=\"continuous-play\"\n checked={checked}\n onChange={handleChange}\n disabled={disabled}\n />\n <BaseCheckboxLabel htmlFor=\"continuous-play\">Continuous Play</BaseCheckboxLabel>\n </BaseCheckboxWrapper>\n );\n};\n","import React from 'react';\nimport {\n BaseCheckboxWrapper,\n BaseCheckbox,\n BaseCheckboxLabel,\n} from '@waveform-playlist/ui-components';\n\nexport interface LinkEndpointsCheckboxProps {\n checked: boolean;\n onChange: (checked: boolean) => void;\n disabled?: boolean;\n className?: string;\n}\n\n/**\n * Checkbox control for enabling/disabling linked endpoints between annotations.\n * When enabled, the end time of one annotation is automatically linked to the start time of the next.\n */\nexport const LinkEndpointsCheckbox: React.FC<LinkEndpointsCheckboxProps> = ({\n checked,\n onChange,\n disabled = false,\n className,\n}) => {\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n onChange(e.target.checked);\n };\n\n return (\n <BaseCheckboxWrapper className={className}>\n <BaseCheckbox\n type=\"checkbox\"\n id=\"link-endpoints\"\n className=\"link-endpoints\"\n checked={checked}\n onChange={handleChange}\n disabled={disabled}\n />\n <BaseCheckboxLabel htmlFor=\"link-endpoints\">Link Endpoints</BaseCheckboxLabel>\n </BaseCheckboxWrapper>\n );\n};\n","import React from 'react';\nimport {\n BaseCheckboxWrapper,\n BaseCheckbox,\n BaseCheckboxLabel,\n} from '@waveform-playlist/ui-components';\n\nexport interface EditableCheckboxProps {\n checked: boolean;\n onChange: (enabled: boolean) => void;\n className?: string;\n}\n\nexport const EditableCheckbox: React.FC<EditableCheckboxProps> = ({\n checked,\n onChange,\n className,\n}) => {\n return (\n <BaseCheckboxWrapper className={className}>\n <BaseCheckbox\n type=\"checkbox\"\n id=\"editable-annotations\"\n checked={checked}\n onChange={(e) => onChange(e.target.checked)}\n />\n <BaseCheckboxLabel htmlFor=\"editable-annotations\">Editable Annotations</BaseCheckboxLabel>\n </BaseCheckboxWrapper>\n );\n};\n","import React from 'react';\nimport styled from 'styled-components';\nimport { serializeAeneas } from '../parsers/aeneas';\nimport type { AnnotationData } from '../types';\n\nconst StyledButton = styled.button`\n padding: 0.5rem 1rem;\n background: ${(props) => props.theme?.surfaceColor || '#f5f5f5'};\n color: ${(props) => props.theme?.textColor || '#333'};\n border: 1px solid ${(props) => props.theme?.borderColor || '#ccc'};\n border-radius: ${(props) => props.theme?.borderRadius || '4px'};\n cursor: pointer;\n font-family: ${(props) => props.theme?.fontFamily || 'inherit'};\n font-size: ${(props) => props.theme?.fontSize || '14px'};\n font-weight: 500;\n transition: all 0.15s ease;\n\n &:hover:not(:disabled) {\n background: ${(props) => props.theme?.inputBackground || '#3d3d3d'};\n border-color: ${(props) => props.theme?.textColorMuted || '#999'};\n }\n\n &:focus {\n outline: none;\n box-shadow: 0 0 0 2px ${(props) => props.theme?.inputFocusBorder || '#007bff'}44;\n }\n\n &:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n`;\n\nexport interface DownloadAnnotationsButtonProps {\n annotations: AnnotationData[];\n filename?: string;\n disabled?: boolean;\n className?: string;\n children?: React.ReactNode;\n}\n\nexport const DownloadAnnotationsButton: React.FC<DownloadAnnotationsButtonProps> = ({\n annotations,\n filename = 'annotations.json',\n disabled = false,\n className,\n children = 'Download JSON',\n}) => {\n const handleDownload = () => {\n if (annotations.length === 0) {\n return;\n }\n\n // Serialize annotations to Aeneas JSON format\n const jsonData = annotations.map((annotation) => serializeAeneas(annotation));\n const jsonString = JSON.stringify(jsonData, null, 2);\n\n // Create a blob and download link\n const blob = new Blob([jsonString], { type: 'application/json' });\n const url = URL.createObjectURL(blob);\n const link = document.createElement('a');\n link.href = url;\n link.download = filename;\n\n // Trigger download\n document.body.appendChild(link);\n link.click();\n\n // Cleanup\n document.body.removeChild(link);\n URL.revokeObjectURL(url);\n };\n\n return (\n <StyledButton\n onClick={handleDownload}\n disabled={disabled || annotations.length === 0}\n className={className}\n title={\n annotations.length === 0 ? 'No annotations to download' : 'Download the annotations as JSON'\n }\n >\n {children}\n </StyledButton>\n );\n};\n","import React from 'react';\nimport { AnnotationIntegrationProvider } from '@waveform-playlist/browser';\nimport type { AnnotationIntegration } from '@waveform-playlist/browser';\nimport { parseAeneas, serializeAeneas } from './parsers/aeneas';\nimport { AnnotationText } from './components/AnnotationText';\nimport { AnnotationBox } from './components/AnnotationBox';\nimport { AnnotationBoxesWrapper } from './components/AnnotationBoxesWrapper';\nimport { ContinuousPlayCheckbox } from './components/ContinuousPlayCheckbox';\nimport { LinkEndpointsCheckbox } from './components/LinkEndpointsCheckbox';\nimport { EditableCheckbox } from './components/EditableCheckbox';\nimport { DownloadAnnotationsButton } from './components/DownloadAnnotationsButton';\n\nconst annotationIntegration: AnnotationIntegration = {\n parseAeneas: parseAeneas as (data: unknown) => import('@waveform-playlist/core').AnnotationData,\n serializeAeneas: serializeAeneas as (\n annotation: import('@waveform-playlist/core').AnnotationData\n ) => unknown,\n AnnotationText,\n AnnotationBox,\n AnnotationBoxesWrapper,\n ContinuousPlayCheckbox,\n LinkEndpointsCheckbox,\n EditableCheckbox,\n DownloadAnnotationsButton,\n};\n\nexport const AnnotationProvider: React.FC<{ children: React.ReactNode }> = ({ children }) => {\n return (\n <AnnotationIntegrationProvider value={annotationIntegration}>\n {children}\n </AnnotationIntegrationProvider>\n );\n};\n","import { useState, useCallback } from 'react';\nimport { updateAnnotationBoundaries as computeAnnotationBoundaries } from '@waveform-playlist/core';\nimport type { AnnotationData } from '../types';\n\nexport interface UseAnnotationControlsOptions {\n initialContinuousPlay?: boolean;\n initialLinkEndpoints?: boolean;\n}\n\nexport interface AnnotationUpdateParams {\n annotationIndex: number;\n newTime: number;\n isDraggingStart: boolean;\n annotations: AnnotationData[];\n duration: number;\n linkEndpoints: boolean;\n}\n\nexport interface UseAnnotationControlsReturn {\n continuousPlay: boolean;\n linkEndpoints: boolean;\n setContinuousPlay: (value: boolean) => void;\n setLinkEndpoints: (value: boolean) => void;\n updateAnnotationBoundaries: (params: AnnotationUpdateParams) => AnnotationData[];\n}\n\n/**\n * Hook for managing annotation control state and boundary logic.\n * Boundary math lives in @waveform-playlist/core (shared with dawcore).\n */\nexport const useAnnotationControls = (\n options: UseAnnotationControlsOptions = {}\n): UseAnnotationControlsReturn => {\n const { initialContinuousPlay = false, initialLinkEndpoints = true } = options;\n\n const [continuousPlay, setContinuousPlay] = useState(initialContinuousPlay);\n const [linkEndpoints, setLinkEndpoints] = useState(initialLinkEndpoints);\n\n const updateAnnotationBoundaries = useCallback(\n (params: AnnotationUpdateParams): AnnotationData[] => computeAnnotationBoundaries(params),\n []\n );\n\n return {\n continuousPlay,\n linkEndpoints,\n setContinuousPlay,\n setLinkEndpoints,\n updateAnnotationBoundaries,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACUO,SAAS,YAAY,MAAsC;AAChE,SAAO;AAAA,IACL,IAAI,KAAK;AAAA,IACT,OAAO,WAAW,KAAK,KAAK;A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EvE,QAAM,iCAA6B;AAAA,IACjC,CAAC,eAAqD,YAAAC,4BAA4B,MAAM;AAAA,IACxF,CAAC;AAAA,EACH;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":["AnnotationText","styled","import_styled_components","import_react","import_jsx_runtime","styled","import_styled_components","import_jsx_runtime","styled","import_styled_components","import_jsx_runtime","Container","styled","import_react","import_styled_components","import_jsx_runtime","Container","styled","ControlButton","AnnotationText","React","import_jsx_runtime","import_ui_components","import_jsx_runtime","import_ui_components","import_jsx_runtime","import_styled_components","import_jsx_runtime","styled","import_jsx_runtime","AnnotationText","import_react","computeAnnotationBoundaries"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/parsers/aeneas.ts","../src/components/AnnotationBox.tsx","../src/components/AnnotationBoxesWrapper.tsx","../src/components/AnnotationText.tsx","../src/components/AnnotationCheckboxes.tsx","../src/components/DownloadAnnotationsButton.tsx","../src/AnnotationProvider.tsx"],"sourcesContent":["// Parsers\nexport { parseAeneas, serializeAeneas } from './parsers/aeneas';\nexport type { AeneasFragment } from './parsers/aeneas';\n\n// Components\nexport { AnnotationBox } from './components/AnnotationBox';\nexport type { AnnotationBoxComponentProps } from './components/AnnotationBox';\n\nexport { AnnotationBoxesWrapper } from './components/AnnotationBoxesWrapper';\nexport type { AnnotationBoxesWrapperProps } from './components/AnnotationBoxesWrapper';\n\nexport { AnnotationText } from './components/AnnotationText';\nexport type { AnnotationTextProps } from './components/AnnotationText';\n\n// Controls, bound to the playlist provider above them\nexport {\n ContinuousPlayCheckbox,\n LinkEndpointsCheckbox,\n EditableCheckbox,\n} from './components/AnnotationCheckboxes';\nexport type { AnnotationCheckboxProps } from './components/AnnotationCheckboxes';\n\nexport { DownloadAnnotationsButton } from './components/DownloadAnnotationsButton';\nexport type { DownloadAnnotationsButtonProps } from './components/DownloadAnnotationsButton';\n\n// Provider (hands the box and list components to the browser package's views)\nexport { AnnotationProvider } from './AnnotationProvider';\n","import type { AnnotationData } from '@waveform-playlist/core';\n\nexport interface AeneasFragment {\n begin: string;\n end: string;\n id: string;\n language: string;\n lines: string[];\n}\n\nexport function parseAeneas(data: AeneasFragment): AnnotationData {\n return {\n id: data.id,\n start: parseFloat(data.begin),\n end: parseFloat(data.end),\n lines: data.lines,\n language: data.language,\n };\n}\n\nexport function serializeAeneas(annotation: AnnotationData): AeneasFragment {\n return {\n id: annotation.id,\n begin: annotation.start.toFixed(3),\n end: annotation.end.toFixed(3),\n lines: annotation.lines,\n language: annotation.language || 'en',\n };\n}\n","import React, { FunctionComponent } from 'react';\nimport styled from 'styled-components';\nimport { useDraggable } from '@dnd-kit/react';\nimport { Feedback } from '@dnd-kit/dom';\n\n// Per-entity Feedback plugin config (@dnd-kit 0.5+), hoisted for a stable\n// reference. 'none' disables the Feedback plugin for the edge handles — resize\n// visual feedback comes from React state repositioning the annotation, not CSS\n// translate. Declared on the entity so it works inside ANY DragDropProvider.\nconst EDGE_HANDLE_PLUGINS = [Feedback.configure({ feedback: 'none' })];\n\ninterface WrapperProps {\n readonly $left: number;\n readonly $width: number;\n}\n\n// Wrapper positions the annotation and contains both Box and ResizeHandles as siblings\nconst Wrapper = styled.div.attrs<WrapperProps>((props) => ({\n style: {\n left: `${props.$left}px`,\n width: `${props.$width}px`,\n },\n}))<WrapperProps>`\n position: absolute;\n top: 0;\n height: 100%;\n pointer-events: none; /* Let events pass through to children */\n`;\n\ninterface BoxProps {\n readonly $color: string;\n readonly $isActive?: boolean;\n}\n\nconst Box = styled.div<BoxProps>`\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 100%;\n background: ${(props) =>\n props.$isActive\n ? props.theme?.annotationBoxActiveBackground || 'rgba(255, 200, 100, 0.95)'\n : props.theme?.annotationBoxBackground || 'rgba(255, 255, 255, 0.85)'};\n border: ${(props) => (props.$isActive ? '3px' : '2px')} solid\n ${(props) =>\n props.$isActive ? props.theme?.annotationBoxActiveBorder || '#ff9800' : props.$color};\n border-radius: 4px;\n cursor: pointer;\n pointer-events: auto;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n transition: all 0.2s ease;\n box-shadow: ${(props) =>\n props.$isActive\n ? // The glow of the active box is the box colour (the theme's\n // `annotationBoxBorder`, through the `color` prop) at 40% and 20%.\n `0 2px 8px color-mix(in srgb, ${props.$color} 40%, transparent), inset 0 0 0 1px color-mix(in srgb, ${props.$color} 20%, transparent)`\n : '0 1px 3px rgba(0, 0, 0, 0.1)'};\n\n &:hover {\n background: ${(props) =>\n props.theme?.annotationBoxHoverBackground || 'rgba(255, 255, 255, 0.98)'};\n border-color: ${(props) => props.theme?.annotationBoxActiveBorder || '#ff9800'};\n border-width: 3px;\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);\n }\n`;\n\nconst Label = styled.span`\n font-size: 12px;\n font-weight: 600;\n color: ${(props) => props.theme?.annotationLabelColor || '#2a2a2a'};\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 0 6px;\n letter-spacing: 0.3px;\n user-select: none;\n`;\n\ninterface ResizeHandleStyledProps {\n $position: 'left' | 'right';\n $isDragging?: boolean;\n}\n\n// ResizeHandles sit inside their annotation's bounds so adjacent annotations'\n// handles never overlap — each handle is independently grabbable.\nconst ResizeHandle = styled.div<ResizeHandleStyledProps>`\n position: absolute;\n top: 0;\n ${(props) => (props.$position === 'left' ? 'left: 0' : 'right: 0')};\n width: 8px;\n height: 100%;\n cursor: ew-resize;\n z-index: 120;\n background: ${(props) =>\n props.$isDragging\n ? props.theme?.annotationResizeHandleColor || 'rgba(0, 0, 0, 0.2)'\n : 'transparent'};\n border-radius: 4px;\n touch-action: none; /* Important for @dnd-kit on touch devices */\n pointer-events: auto;\n\n &::before {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 4px;\n height: 60%;\n background: ${(props) =>\n props.$isDragging\n ? props.theme?.annotationResizeHandleActiveColor || 'rgba(0, 0, 0, 0.8)'\n : props.theme?.annotationResizeHandleColor || 'rgba(0, 0, 0, 0.4)'};\n border-radius: 2px;\n opacity: ${(props) => (props.$isDragging ? 1 : 0.6)};\n transition:\n opacity 0.2s,\n background 0.2s;\n }\n\n &:hover {\n background: ${(props) => props.theme?.annotationResizeHandleColor || 'rgba(0, 0, 0, 0.1)'};\n }\n\n &:hover::before {\n opacity: 1;\n background: ${(props) =>\n props.theme?.annotationResizeHandleActiveColor || 'rgba(0, 0, 0, 0.7)'};\n }\n`;\n\nexport interface AnnotationBoxComponentProps {\n annotationId: string;\n annotationIndex: number;\n startPosition: number;\n endPosition: number;\n label?: string;\n color?: string;\n isActive?: boolean;\n onClick?: () => void;\n editable?: boolean; // Whether to show drag handles\n}\n\nexport const AnnotationBox: FunctionComponent<AnnotationBoxComponentProps> = ({\n annotationId,\n annotationIndex,\n startPosition,\n endPosition,\n label,\n color = '#ff9800',\n isActive = false,\n onClick,\n editable = true,\n}) => {\n const width = Math.max(0, endPosition - startPosition);\n\n // Left (start) boundary draggable\n const leftBoundaryId = `annotation-boundary-start-${annotationIndex}`;\n const { ref: leftRef, isDragSource: isLeftDragging } = useDraggable({\n id: leftBoundaryId,\n data: { annotationId, annotationIndex, edge: 'start' as const },\n disabled: !editable,\n plugins: EDGE_HANDLE_PLUGINS,\n });\n\n // Right (end) boundary draggable\n const rightBoundaryId = `annotation-boundary-end-${annotationIndex}`;\n const { ref: rightRef, isDragSource: isRightDragging } = useDraggable({\n id: rightBoundaryId,\n data: { annotationId, annotationIndex, edge: 'end' as const },\n disabled: !editable,\n plugins: EDGE_HANDLE_PLUGINS,\n });\n\n if (width <= 0) {\n return null;\n }\n\n const handleHandleClick = (e: React.MouseEvent) => {\n // Prevent clicks on resize handles from bubbling to annotation box\n e.stopPropagation();\n };\n\n return (\n <Wrapper $left={startPosition} $width={width}>\n <Box $color={color} $isActive={isActive} onClick={onClick}>\n {label && <Label>{label}</Label>}\n </Box>\n {editable && (\n <ResizeHandle\n ref={leftRef}\n $position=\"left\"\n $isDragging={isLeftDragging}\n onClick={handleHandleClick}\n />\n )}\n {editable && (\n <ResizeHandle\n ref={rightRef}\n $position=\"right\"\n $isDragging={isRightDragging}\n onClick={handleHandleClick}\n />\n )}\n </Wrapper>\n );\n};\n","import React, { FunctionComponent } from 'react';\nimport styled from 'styled-components';\n\ninterface ContainerProps {\n readonly $height: number;\n readonly $width?: number;\n}\n\nconst Container = styled.div.attrs<ContainerProps>((props) => ({\n style: {\n height: `${props.$height}px`,\n width: props.$width !== undefined ? `${props.$width}px` : undefined,\n },\n}))<ContainerProps>`\n position: relative;\n background: transparent;\n z-index: 110;\n`;\n\nconst BoxesContainer = styled.div<{ $offset?: number }>`\n position: relative;\n height: 100%;\n padding-left: ${(props) => props.$offset || 0}px;\n`;\n\nexport interface AnnotationBoxesWrapperProps {\n className?: string;\n children?: React.ReactNode;\n height?: number;\n offset?: number;\n width?: number;\n}\n\nexport const AnnotationBoxesWrapper: FunctionComponent<AnnotationBoxesWrapperProps> = ({\n children,\n className,\n height = 30,\n offset = 0,\n width,\n}) => {\n return (\n <Container className={className} $height={height} $width={width}>\n <BoxesContainer $offset={offset}>{children}</BoxesContainer>\n </Container>\n );\n};\n","import React, { FunctionComponent, useCallback, useRef, useEffect } from 'react';\nimport styled from 'styled-components';\nimport type {\n AnnotationData,\n AnnotationAction,\n AnnotationActionOptions,\n RenderAnnotationItemProps,\n} from '@waveform-playlist/core';\n\ninterface ContainerProps {\n $height?: number;\n}\n\n/** The colour of the active row and of the focus rings (theme: `annotationTextItemActiveColor`). */\nconst activeColor = (props: { theme?: { annotationTextItemActiveColor?: string } }) =>\n props.theme?.annotationTextItemActiveColor || '#ff9800';\n/** That colour at an opacity, as the tints and glows of the active row use it. */\nconst activeTint = (percent: number) => (props: Parameters<typeof activeColor>[0]) =>\n `color-mix(in srgb, ${activeColor(props)} ${percent}%, transparent)`;\n\nconst Container = styled.div<ContainerProps>`\n background: ${(props) => props.theme?.backgroundColor || '#fff'};\n ${(props) => (props.$height ? `height: ${props.$height}px;` : 'max-height: 200px;')}\n overflow-y: auto;\n padding: 8px;\n`;\n\nconst AnnotationItem = styled.div<{ $isActive?: boolean }>`\n padding: 12px;\n margin-bottom: 6px;\n border-left: 4px solid ${(props) => (props.$isActive ? activeColor(props) : 'transparent')};\n background: ${(props) => (props.$isActive ? activeTint(15)(props) : 'transparent')};\n border-radius: 4px;\n transition: all 0.2s;\n cursor: pointer;\n box-shadow: ${(props) =>\n props.$isActive\n ? `0 2px 8px ${activeTint(25)(props)}, inset 0 0 0 1px ${activeTint(30)(props)}`\n : 'none'};\n\n &:hover {\n background: ${(props) =>\n props.$isActive\n ? activeTint(20)(props)\n : props.theme?.annotationTextItemHoverBackground || 'rgba(0, 0, 0, 0.05)'};\n border-left-color: ${(props) =>\n props.$isActive ? activeColor(props) : props.theme?.borderColor || '#ddd'};\n }\n\n &:focus-visible {\n outline: 2px solid ${activeColor};\n outline-offset: 2px;\n }\n`;\n\nconst AnnotationHeader = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 6px;\n`;\n\nconst AnnotationInfo = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nconst AnnotationIdLabel = styled.span<{ $isEditable?: boolean }>`\n font-size: 11px;\n font-weight: 600;\n color: ${(props) => props.theme?.textColorMuted || '#666'};\n background: transparent;\n padding: 2px 6px;\n border-radius: 3px;\n min-width: 20px;\n outline: ${(props) =>\n props.$isEditable ? `1px dashed ${props.theme?.borderColor || '#ddd'}` : 'none'};\n\n &[contenteditable='true']:focus {\n outline: 2px solid ${activeColor};\n background: ${activeTint(10)};\n }\n`;\n\nconst TimeRange = styled.span`\n font-size: 12px;\n font-weight: 500;\n color: ${(props) => props.theme?.textColorMuted || '#555'};\n font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;\n letter-spacing: 0.5px;\n`;\n\nconst AnnotationControls = styled.div`\n display: flex;\n gap: 6px;\n`;\n\nconst ControlButton = styled.button`\n background: ${(props) => props.theme?.surfaceColor || '#f5f5f5'};\n border: 1px solid ${(props) => props.theme?.borderColor || '#ccc'};\n color: ${(props) => props.theme?.textColor || '#333'};\n padding: 4px 8px;\n font-size: 14px;\n cursor: pointer;\n border-radius: 4px;\n transition: all 0.15s ease;\n\n &:hover {\n background: ${(props) => props.theme?.inputBackground || '#3d3d3d'};\n border-color: ${(props) => props.theme?.textColorMuted || '#999'};\n transform: scale(1.05);\n }\n\n &:active {\n transform: scale(0.95);\n }\n`;\n\nconst AnnotationTextContent = styled.div<{ $isEditable?: boolean }>`\n font-size: 14px;\n line-height: 1.6;\n color: ${(props) => props.theme?.textColor || '#2a2a2a'};\n white-space: pre-wrap;\n word-break: break-word;\n outline: ${(props) =>\n props.$isEditable ? `1px dashed ${props.theme?.borderColor || '#ddd'}` : 'none'};\n padding: ${(props) => (props.$isEditable ? '6px' : '0')};\n border-radius: 3px;\n min-height: 20px;\n\n &[contenteditable='true']:focus {\n outline: 2px solid ${activeColor};\n background: ${activeTint(10)};\n }\n`;\n\nexport interface AnnotationTextProps {\n annotations: AnnotationData[];\n activeAnnotationId?: string;\n shouldScrollToActive?: boolean;\n /** Where to position the active annotation when scrolling: 'center', 'start', 'end', or 'nearest'. Defaults to 'center'. */\n scrollActivePosition?: ScrollLogicalPosition;\n /** Which scrollable containers to scroll: 'nearest' (only the annotation list) or 'all' (including viewport). Defaults to 'nearest'. */\n scrollActiveContainer?: 'nearest' | 'all';\n editable?: boolean;\n controls?: AnnotationAction[];\n annotationListConfig?: AnnotationActionOptions;\n height?: number;\n onAnnotationClick?: (annotation: AnnotationData) => void;\n onAnnotationUpdate?: (updatedAnnotations: AnnotationData[]) => void;\n /**\n * Custom render function for annotation items.\n * When provided, completely replaces the default annotation item rendering.\n * Use this to customize the appearance of each annotation in the list.\n */\n renderAnnotationItem?: (props: RenderAnnotationItemProps) => React.ReactNode;\n}\n\nconst NO_CONTROLS: AnnotationAction[] = [];\n\nconst formatTime = (seconds: number): string => {\n if (isNaN(seconds) || !isFinite(seconds)) {\n return '0:00.000';\n }\n const mins = Math.floor(seconds / 60);\n const secs = (seconds % 60).toFixed(3);\n return `${mins}:${secs.padStart(6, '0')}`;\n};\n\nconst getIconClass = (classString: string) => {\n return classString.replace(/\\./g, ' ');\n};\n\nconst blurOnEnter = (e: React.KeyboardEvent<HTMLElement>) => {\n if (e.key === 'Enter') {\n e.preventDefault();\n e.currentTarget.blur();\n }\n};\n\ninterface AnnotationListItemProps {\n annotation: AnnotationData;\n index: number;\n isActive: boolean;\n /** Set on the active item only, so the list can scroll to it. */\n itemRef?: React.Ref<HTMLDivElement>;\n editable: boolean;\n controls: AnnotationAction[];\n onAnnotationClick?: (annotation: AnnotationData) => void;\n onTextEdit: (index: number, newText: string) => void;\n onIdEdit: (index: number, newId: string) => void;\n onControlClick: (control: AnnotationAction, index: number) => void;\n renderAnnotationItem?: (props: RenderAnnotationItemProps) => React.ReactNode;\n}\n\n/**\n * One row of the list. Memoized: the active annotation changes at every\n * annotation boundary during playback, and only the row that stops being\n * active and the row that becomes active have a changed prop (#740). Every\n * function handed to it must therefore keep its identity across a render of\n * the list that did not change it.\n */\nconst AnnotationListItem = React.memo(function AnnotationListItem({\n annotation,\n index,\n isActive,\n itemRef,\n editable,\n controls,\n onAnnotationClick,\n onTextEdit,\n onIdEdit,\n onControlClick,\n renderAnnotationItem,\n}: AnnotationListItemProps) {\n const handleClick = () => onAnnotationClick?.(annotation);\n // The default row: a click in a field that is being edited places the\n // caret, it does not choose the annotation. (The action buttons stop their\n // own clicks.)\n const handleRowClick = (event: React.MouseEvent<HTMLElement>) => {\n const target = event.target as Element | null;\n if (target?.closest?.('[contenteditable=\"true\"]')) return;\n handleClick();\n };\n\n // Use custom render function if provided\n if (renderAnnotationItem) {\n return (\n <div ref={itemRef}>\n {renderAnnotationItem({\n annotation,\n index,\n isActive,\n onClick: handleClick,\n formatTime,\n })}\n </div>\n );\n }\n\n // Default rendering\n return (\n <AnnotationItem ref={itemRef} $isActive={isActive} onClick={handleRowClick}>\n <AnnotationHeader>\n <AnnotationInfo>\n <AnnotationIdLabel\n $isEditable={editable}\n contentEditable={editable}\n suppressContentEditableWarning\n onBlur={(e) => onIdEdit(index, e.currentTarget.textContent || '')}\n onKeyDown={blurOnEnter}\n >\n {annotation.id}\n </AnnotationIdLabel>\n <TimeRange>\n {formatTime(annotation.start)} - {formatTime(annotation.end)}\n </TimeRange>\n </AnnotationInfo>\n {controls.length > 0 && (\n <AnnotationControls onClick={(e) => e.stopPropagation()}>\n {controls.map((control, idx) => (\n <ControlButton\n key={idx}\n title={control.title}\n onClick={() => onControlClick(control, index)}\n >\n {control.text ? control.text : <i className={getIconClass(control.class || '')} />}\n </ControlButton>\n ))}\n </AnnotationControls>\n )}\n </AnnotationHeader>\n <AnnotationTextContent\n $isEditable={editable}\n contentEditable={editable}\n suppressContentEditableWarning\n onBlur={(e) => onTextEdit(index, e.currentTarget.textContent || '')}\n onKeyDown={blurOnEnter}\n >\n {annotation.lines.join('\\n')}\n </AnnotationTextContent>\n </AnnotationItem>\n );\n});\n\nconst AnnotationTextComponent: FunctionComponent<AnnotationTextProps> = ({\n annotations,\n activeAnnotationId,\n shouldScrollToActive = false,\n scrollActivePosition = 'center',\n scrollActiveContainer = 'nearest',\n editable = false,\n controls = NO_CONTROLS,\n annotationListConfig,\n height,\n onAnnotationClick,\n onAnnotationUpdate,\n renderAnnotationItem,\n}) => {\n const activeAnnotationRef = useRef<HTMLDivElement>(null);\n\n // Auto-scroll to active annotation when it changes\n useEffect(() => {\n // Only scroll if parent says we should (prevents scrolling on remount after pause)\n if (activeAnnotationId && activeAnnotationRef.current && shouldScrollToActive) {\n activeAnnotationRef.current.scrollIntoView({\n behavior: 'smooth',\n block: scrollActivePosition,\n container: scrollActiveContainer,\n } as ScrollIntoViewOptions);\n }\n }, [activeAnnotationId, shouldScrollToActive, scrollActivePosition, scrollActiveContainer]);\n\n // The three handlers below are props of every memoized row. Their\n // dependencies do not change when only the active annotation does.\n // The handlers below are props of every memoized row. They read the list\n // through a ref so that a change to one annotation (each move of an edge\n // drag) re-renders that annotation's row and not all of them.\n const annotationsRef = useRef(annotations);\n annotationsRef.current = annotations;\n // The options an action is called with are only needed when its button is\n // pressed. Read through a ref, a change of them (a link-endpoints or\n // continuous-play toggle) does not give every row a new handler.\n const annotationListConfigRef = useRef(annotationListConfig);\n annotationListConfigRef.current = annotationListConfig;\n\n const handleTextEdit = useCallback(\n (index: number, newText: string) => {\n if (!editable || !onAnnotationUpdate) return;\n\n const updatedAnnotations = [...annotationsRef.current];\n updatedAnnotations[index] = {\n ...updatedAnnotations[index],\n lines: newText.split('\\n'),\n };\n onAnnotationUpdate(updatedAnnotations);\n },\n [editable, onAnnotationUpdate]\n );\n\n const handleIdEdit = useCallback(\n (index: number, newId: string) => {\n if (!editable || !onAnnotationUpdate) return;\n\n const trimmedId = newId.trim();\n if (!trimmedId) return; // Don't allow empty IDs\n\n const updatedAnnotations = [...annotationsRef.current];\n updatedAnnotations[index] = {\n ...updatedAnnotations[index],\n id: trimmedId,\n };\n onAnnotationUpdate(updatedAnnotations);\n },\n [editable, onAnnotationUpdate]\n );\n\n const handleControlClick = useCallback(\n (control: AnnotationAction, index: number) => {\n if (!onAnnotationUpdate) return;\n\n const annotationsCopy = [...annotationsRef.current];\n control.action(\n annotationsCopy[index],\n index,\n annotationsCopy,\n annotationListConfigRef.current || {}\n );\n onAnnotationUpdate(annotationsCopy);\n },\n [onAnnotationUpdate]\n );\n\n return (\n <Container $height={height}>\n {annotations.map((annotation, index) => {\n const isActive = annotation.id === activeAnnotationId;\n return (\n <AnnotationListItem\n key={annotation.id}\n annotation={annotation}\n index={index}\n isActive={isActive}\n itemRef={isActive ? activeAnnotationRef : undefined}\n editable={editable}\n controls={controls}\n onAnnotationClick={onAnnotationClick}\n onTextEdit={handleTextEdit}\n onIdEdit={handleIdEdit}\n onControlClick={handleControlClick}\n renderAnnotationItem={renderAnnotationItem}\n />\n );\n })}\n </Container>\n );\n};\n\n// Memoize to prevent unnecessary remounting when parent re-renders\nexport const AnnotationText = React.memo(AnnotationTextComponent);\n","import React, { useId } from 'react';\nimport {\n BaseCheckboxWrapper,\n BaseCheckbox,\n BaseCheckboxLabel,\n} from '@waveform-playlist/ui-components';\nimport { useAnnotationOptions, usePlaybackControls } from '@waveform-playlist/browser';\n\nexport interface AnnotationCheckboxProps {\n /** On the element that wraps the checkbox and its label. */\n className?: string;\n disabled?: boolean;\n /** The label. Default (also for `null`): the option's English name. */\n children?: React.ReactNode;\n}\n\ninterface OptionCheckboxProps extends AnnotationCheckboxProps {\n checked: boolean;\n onChange: (checked: boolean) => void;\n /** Class of the input itself (kept from the older checkboxes). */\n inputClassName?: string;\n}\n\nconst OptionCheckbox: React.FC<OptionCheckboxProps> = ({\n checked,\n onChange,\n inputClassName,\n className,\n disabled,\n children,\n}) => {\n // Generated: two of one checkbox on a page must not share an id.\n const id = useId();\n return (\n <BaseCheckboxWrapper className={className}>\n <BaseCheckbox\n type=\"checkbox\"\n id={id}\n className={inputClassName}\n checked={checked}\n onChange={(e) => onChange(e.target.checked)}\n disabled={disabled}\n />\n <BaseCheckboxLabel htmlFor={id}>{children}</BaseCheckboxLabel>\n </BaseCheckboxWrapper>\n );\n};\n\n// In each control the props it was given come first and the bound ones after,\n// so a `checked` or `onChange` left over from the controlled form these names\n// had before cannot replace the provider's.\n\n/**\n * Shows and sets the provider's `continuousPlay` option: on, playback runs on\n * through the following annotations. Under either playlist provider.\n */\nexport const ContinuousPlayCheckbox: React.FC<AnnotationCheckboxProps> = ({\n children,\n ...rest\n}) => {\n const { continuousPlay } = useAnnotationOptions();\n const { setContinuousPlay } = usePlaybackControls();\n return (\n <OptionCheckbox\n {...rest}\n checked={continuousPlay}\n onChange={setContinuousPlay}\n inputClassName=\"continuous-play\"\n >\n {children ?? 'Continuous Play'}\n </OptionCheckbox>\n );\n};\n\n/**\n * Shows and sets the provider's `linkEndpoints` option: on, a dragged edge\n * takes the edge it touches along. Under either playlist provider.\n */\nexport const LinkEndpointsCheckbox: React.FC<AnnotationCheckboxProps> = ({ children, ...rest }) => {\n const { linkEndpoints } = useAnnotationOptions();\n const { setLinkEndpoints } = usePlaybackControls();\n return (\n <OptionCheckbox\n {...rest}\n checked={linkEndpoints}\n onChange={setLinkEndpoints}\n inputClassName=\"link-endpoints\"\n >\n {children ?? 'Link Endpoints'}\n </OptionCheckbox>\n );\n};\n\n/**\n * Shows and sets the provider's `editable` option: whether annotation edges\n * and text can be changed. Under either playlist provider.\n */\nexport const EditableCheckbox: React.FC<AnnotationCheckboxProps> = ({ children, ...rest }) => {\n const { editable } = useAnnotationOptions();\n const { setAnnotationsEditable } = usePlaybackControls();\n return (\n <OptionCheckbox {...rest} checked={editable} onChange={setAnnotationsEditable}>\n {children ?? 'Editable Annotations'}\n </OptionCheckbox>\n );\n};\n","import React from 'react';\nimport styled from 'styled-components';\nimport { useAnnotations } from '@waveform-playlist/browser';\nimport { serializeAeneas } from '../parsers/aeneas';\n\nconst StyledButton = styled.button`\n padding: 0.5rem 1rem;\n background: ${(props) => props.theme?.surfaceColor || '#f5f5f5'};\n color: ${(props) => props.theme?.textColor || '#333'};\n border: 1px solid ${(props) => props.theme?.borderColor || '#ccc'};\n border-radius: ${(props) => props.theme?.borderRadius || '4px'};\n cursor: pointer;\n font-family: ${(props) => props.theme?.fontFamily || 'inherit'};\n font-size: ${(props) => props.theme?.fontSize || '14px'};\n font-weight: 500;\n transition: all 0.15s ease;\n\n &:hover:not(:disabled) {\n background: ${(props) => props.theme?.inputBackground || '#3d3d3d'};\n border-color: ${(props) => props.theme?.textColorMuted || '#999'};\n }\n\n &:focus {\n outline: none;\n box-shadow: 0 0 0 2px ${(props) => props.theme?.inputFocusBorder || '#007bff'}44;\n }\n\n &:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n`;\n\nexport interface DownloadAnnotationsButtonProps {\n /** Name of the downloaded file. Default: `annotations.json`. */\n filename?: string;\n disabled?: boolean;\n className?: string;\n /** The label. Default: `Download JSON`. */\n children?: React.ReactNode;\n /**\n * The tooltip. Default: an English sentence, a different one when there is\n * nothing to download. Given, it is used in both cases.\n */\n title?: string;\n}\n\n/**\n * Downloads the provider's annotations as an array of Aeneas fragments.\n * Under either playlist provider.\n */\nexport const DownloadAnnotationsButton: React.FC<DownloadAnnotationsButtonProps> = ({\n filename = 'annotations.json',\n disabled = false,\n className,\n children = 'Download JSON',\n title,\n}) => {\n const { annotations } = useAnnotations();\n const handleDownload = () => {\n // Serialize annotations to Aeneas JSON format\n const jsonData = annotations.map((annotation) => serializeAeneas(annotation));\n const jsonString = JSON.stringify(jsonData, null, 2);\n\n // Create a blob and download link\n const blob = new Blob([jsonString], { type: 'application/json' });\n const url = URL.createObjectURL(blob);\n const link = document.createElement('a');\n link.href = url;\n link.download = filename;\n\n // Trigger download\n document.body.appendChild(link);\n link.click();\n\n // Cleanup\n document.body.removeChild(link);\n URL.revokeObjectURL(url);\n };\n\n return (\n <StyledButton\n onClick={handleDownload}\n disabled={disabled || annotations.length === 0}\n className={className}\n title={\n title ??\n (annotations.length === 0\n ? 'No annotations to download'\n : 'Download the annotations as JSON')\n }\n >\n {children}\n </StyledButton>\n );\n};\n","import React from 'react';\nimport { AnnotationIntegrationProvider } from '@waveform-playlist/browser';\nimport type { AnnotationIntegration } from '@waveform-playlist/browser';\nimport { parseAeneas, serializeAeneas } from './parsers/aeneas';\nimport { AnnotationText } from './components/AnnotationText';\nimport { AnnotationBox } from './components/AnnotationBox';\nimport { AnnotationBoxesWrapper } from './components/AnnotationBoxesWrapper';\n\nconst annotationIntegration: AnnotationIntegration = {\n parseAeneas: parseAeneas as (data: unknown) => import('@waveform-playlist/core').AnnotationData,\n serializeAeneas: serializeAeneas as (\n annotation: import('@waveform-playlist/core').AnnotationData\n ) => unknown,\n AnnotationText,\n AnnotationBox,\n AnnotationBoxesWrapper,\n};\n\nexport const AnnotationProvider: React.FC<{ children: React.ReactNode }> = ({ children }) => {\n return (\n <AnnotationInt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,UAAM,WAAW,YAAY,IAAI,CAAC,eAAe,gBAAgB,UAAU,CAAC;AAC5E,UAAM,aAAa,KAAK,UAAU,UAAU,MAAM,CAAC;AAGnD,UAAM,OAAO,IAAI,KAAK,CAAC,UAAU,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChE,UAAM,MAAM,IAAI,gBAAgB,IAAI;AACpC,UAAM,OAAO,SAAS,cAAc,GAAG;AACvC,SAAK,OAAO;AACZ,SAAK,WAAW;AAGhB,aAAS,KAAK,YAAY,IAAI;AAC9B,SAAK,MAAM;AAGX,aAAS,KAAK,YAAY,IAAI;AAC9B,QAAI,gBAAgB,GAAG;AAAA,EACzB;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAS;AAAA,MACT,UAAU,YAAY,YAAY,WAAW;AAAA,MAC7C;AAAA,MACA,OACE,UACC,YAAY,WAAW,IACpB,+BACA;AAAA,MAGL;AAAA;AAAA,EACH;AAEJ;;;AC9FA,IAAAC,kBAA8C;AAmB1C,IAAAC,sBAAA;AAZJ,IAAM,wBAA+C;AAAA,EACnD;AAAA,EACA;AAAA,EAGA;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,qBAA8D,CAAC,EAAE,SAAS,MAAM;AAC3F,SACE,6CAAC,iDAA8B,OAAO,uBACnC,UACH;AAEJ;","names":["styled","import_styled_components","import_jsx_runtime","styled","import_react","import_styled_components","import_jsx_runtime","Container","styled","React","AnnotationListItem","import_react","import_jsx_runtime","import_styled_components","import_browser","import_jsx_runtime","styled","import_browser","import_jsx_runtime"]}