@waveform-playlist/browser 5.0.0-alpha.11 → 5.0.0-alpha.13
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.d.ts +28 -1
- package/dist/index.js +50 -50
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1902 -1885
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ declare interface AnnotationActionOptions {
|
|
|
50
50
|
[key: string]: unknown;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
declare interface AnnotationData {
|
|
53
|
+
export declare interface AnnotationData {
|
|
54
54
|
id: string;
|
|
55
55
|
start: number;
|
|
56
56
|
end: number;
|
|
@@ -673,6 +673,17 @@ declare interface PlaylistStateContextValue {
|
|
|
673
673
|
loopEnd: number;
|
|
674
674
|
}
|
|
675
675
|
|
|
676
|
+
/**
|
|
677
|
+
* Props passed to the renderAnnotationItem function for custom rendering
|
|
678
|
+
*/
|
|
679
|
+
export declare interface RenderAnnotationItemProps {
|
|
680
|
+
annotation: AnnotationData;
|
|
681
|
+
index: number;
|
|
682
|
+
isActive: boolean;
|
|
683
|
+
onClick: () => void;
|
|
684
|
+
formatTime: (seconds: number) => string;
|
|
685
|
+
}
|
|
686
|
+
|
|
676
687
|
/**
|
|
677
688
|
* Type for custom playhead render functions.
|
|
678
689
|
* Receives position, color, and animation refs for smooth 60fps animation.
|
|
@@ -1653,6 +1664,22 @@ export declare interface WaveformProps {
|
|
|
1653
1664
|
annotationControls?: AnnotationAction[];
|
|
1654
1665
|
annotationListConfig?: AnnotationActionOptions;
|
|
1655
1666
|
annotationTextHeight?: number;
|
|
1667
|
+
/**
|
|
1668
|
+
* Custom render function for annotation items in the text list.
|
|
1669
|
+
* Use this to completely customize how each annotation is displayed.
|
|
1670
|
+
*/
|
|
1671
|
+
renderAnnotationItem?: (props: RenderAnnotationItemProps) => ReactNode;
|
|
1672
|
+
/**
|
|
1673
|
+
* Custom function to generate the label shown on annotation boxes in the waveform.
|
|
1674
|
+
* Receives the annotation data and should return a string label.
|
|
1675
|
+
* Default: annotation.id
|
|
1676
|
+
*/
|
|
1677
|
+
getAnnotationBoxLabel?: (annotation: {
|
|
1678
|
+
id: string;
|
|
1679
|
+
start: number;
|
|
1680
|
+
end: number;
|
|
1681
|
+
lines: string[];
|
|
1682
|
+
}) => string;
|
|
1656
1683
|
className?: string;
|
|
1657
1684
|
showClipHeaders?: boolean;
|
|
1658
1685
|
interactiveClips?: boolean;
|