@types/wavesurfer.js
Advanced tools
Comparing version 6.0.1 to 6.0.2
@@ -10,5 +10,5 @@ // Type definitions for wavesurfer.js 6.0 | ||
import WaveSurfer from "./src/wavesurfer"; | ||
import WaveSurfer from './src/wavesurfer'; | ||
export = WaveSurfer; | ||
export as namespace WaveSurfer; |
{ | ||
"name": "@types/wavesurfer.js", | ||
"version": "6.0.1", | ||
"version": "6.0.2", | ||
"description": "TypeScript definitions for wavesurfer.js", | ||
@@ -45,4 +45,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/wavesurfer.js", | ||
}, | ||
"typesPublisherContentHash": "c44772ae8734833c9ac5919b2eab2c5dd09bb36baa1cea9cd324a99e4ac1b48f", | ||
"typeScriptVersion": "3.8" | ||
"typesPublisherContentHash": "cba46b346391ac8e456beedea9138d8699eb8b57cdaae38f12b64440375910b6", | ||
"typeScriptVersion": "3.9" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Tue, 22 Feb 2022 01:01:29 GMT | ||
* Last updated: Fri, 18 Mar 2022 11:01:47 GMT | ||
* Dependencies: [@types/debounce](https://npmjs.com/package/@types/debounce) | ||
@@ -14,0 +14,0 @@ * Global values: `WaveSurfer` |
@@ -1,2 +0,2 @@ | ||
import { DrawingContextAttributes } from "../types/util"; | ||
import { DrawingContextAttributes } from '../types/util'; | ||
@@ -3,0 +3,0 @@ export default class CanvasEntry { |
@@ -1,3 +0,3 @@ | ||
import { WaveSurferParams } from "../types/params"; | ||
import Observer from "./util/observer"; | ||
import { WaveSurferParams } from '../types/params'; | ||
import Observer from './util/observer'; | ||
@@ -4,0 +4,0 @@ export default class Drawer extends Observer { |
@@ -1,6 +0,6 @@ | ||
import { Peaks } from "../types/backend"; | ||
import { WaveSurferParams } from "../types/params"; | ||
import { DrawingContextAttributes } from "../types/util"; | ||
import Drawer from "./drawer"; | ||
import CanvasEntry from "./drawer.canvasentry"; | ||
import { Peaks } from '../types/backend'; | ||
import { WaveSurferParams } from '../types/params'; | ||
import { DrawingContextAttributes } from '../types/util'; | ||
import Drawer from './drawer'; | ||
import CanvasEntry from './drawer.canvasentry'; | ||
@@ -7,0 +7,0 @@ export default class MultiCanvas extends Drawer { |
@@ -1,4 +0,4 @@ | ||
import { WaveSurferParams } from "../types/params"; | ||
import { PluginDefinition, WaveSurferPlugin } from "../types/plugin"; | ||
import WaveSurfer from "./wavesurfer"; | ||
import { WaveSurferParams } from '../types/params'; | ||
import { PluginDefinition, WaveSurferPlugin } from '../types/plugin'; | ||
import WaveSurfer from './wavesurfer'; | ||
@@ -5,0 +5,0 @@ export default class Init { |
@@ -1,3 +0,3 @@ | ||
import { WaveSurferParams } from "../types/params"; | ||
import MediaElement from "./mediaelement"; | ||
import { WaveSurferParams } from '../types/params'; | ||
import MediaElement from './mediaelement'; | ||
@@ -4,0 +4,0 @@ export default class MediaElementWebAudio extends MediaElement { |
@@ -1,3 +0,3 @@ | ||
import { Peaks, WebAudioBackend } from "../types/backend"; | ||
import { WaveSurferParams } from "../types/params"; | ||
import { Peaks, WebAudioBackend } from '../types/backend'; | ||
import { WaveSurferParams } from '../types/params'; | ||
@@ -4,0 +4,0 @@ export default class MediaElement extends WebAudioBackend { |
@@ -1,5 +0,5 @@ | ||
import { PluginDefinition, PluginParams, WaveSurferPlugin } from "../../types/plugin"; | ||
import { Styles } from "../../types/util"; | ||
import Observer from "../util/observer"; | ||
import WaveSurfer from "../wavesurfer"; | ||
import { PluginDefinition, PluginParams, WaveSurferPlugin } from '../../types/plugin'; | ||
import { Styles } from '../../types/util'; | ||
import Observer from '../util/observer'; | ||
import WaveSurfer from '../wavesurfer'; | ||
export default class CursorPlugin extends Observer implements WaveSurferPlugin { | ||
@@ -24,3 +24,3 @@ constructor(params: CursorPluginParams, ws: WaveSurfer); | ||
readonly showTime: HTMLElement; | ||
readonly style: WaveSurfer["util"]["style"]; | ||
readonly style: WaveSurfer['util']['style']; | ||
readonly wavesurfer: WaveSurfer; | ||
@@ -27,0 +27,0 @@ readonly wrapper: HTMLElement; |
@@ -1,4 +0,4 @@ | ||
import { PluginDefinition, PluginParams, WaveSurferPlugin } from "../../types/plugin"; | ||
import Observer from "../util/observer"; | ||
import WaveSurfer from "../wavesurfer"; | ||
import { PluginDefinition, PluginParams, WaveSurferPlugin } from '../../types/plugin'; | ||
import Observer from '../util/observer'; | ||
import WaveSurfer from '../wavesurfer'; | ||
@@ -5,0 +5,0 @@ export default class ElanPlugin extends Observer implements WaveSurferPlugin { |
@@ -1,6 +0,6 @@ | ||
import { PluginDefinition, PluginParams, WaveSurferPlugin } from "../../types/plugin"; | ||
import Observer from "../util/observer"; | ||
import WaveSurfer from "../wavesurfer"; | ||
import { PluginDefinition, PluginParams, WaveSurferPlugin } from '../../types/plugin'; | ||
import Observer from '../util/observer'; | ||
import WaveSurfer from '../wavesurfer'; | ||
declare module "../../wavesurfer" { | ||
declare module '../../wavesurfer' { | ||
interface WaveSurfer { | ||
@@ -29,4 +29,4 @@ addMarker(param: MarkerParams): Marker; | ||
readonly params: MarkersPluginParams; | ||
readonly style: WaveSurfer["util"]["style"]; | ||
readonly util: WaveSurfer["util"]; | ||
readonly style: WaveSurfer['util']['style']; | ||
readonly util: WaveSurfer['util']; | ||
readonly wavesurfer: WaveSurfer; | ||
@@ -40,3 +40,3 @@ readonly wrapper: HTMLElement; | ||
color: string; | ||
position: "top" | "bottom"; | ||
position: 'top' | 'bottom'; | ||
} | ||
@@ -57,3 +57,3 @@ | ||
/** Position (default: "bottom"). */ | ||
position?: "top" | "bottom" | undefined; | ||
position?: 'top' | 'bottom' | undefined; | ||
/** An HTML element to display instead of the default marker image. */ | ||
@@ -60,0 +60,0 @@ markerElement?: HTMLElement | undefined; |
@@ -1,4 +0,4 @@ | ||
import { PluginDefinition, PluginParams, WaveSurferPlugin } from "../../types/plugin"; | ||
import Observer from "../util/observer"; | ||
import WaveSurfer from "../wavesurfer"; | ||
import { PluginDefinition, PluginParams, WaveSurferPlugin } from '../../types/plugin'; | ||
import Observer from '../util/observer'; | ||
import WaveSurfer from '../wavesurfer'; | ||
@@ -5,0 +5,0 @@ export default class MediaSessionPlugin extends Observer implements WaveSurferPlugin { |
@@ -1,4 +0,4 @@ | ||
import { PluginDefinition, PluginParams, WaveSurferPlugin } from "../../types/plugin"; | ||
import Observer from "../util/observer"; | ||
import WaveSurfer from "../wavesurfer"; | ||
import { PluginDefinition, PluginParams, WaveSurferPlugin } from '../../types/plugin'; | ||
import Observer from '../util/observer'; | ||
import WaveSurfer from '../wavesurfer'; | ||
@@ -55,3 +55,3 @@ export default class MicrophonePlugin extends Observer implements WaveSurferPlugin { | ||
export interface Browser { | ||
browser: "firefox" | "chrome" | "edge" | "safari" | "Not a supported browser."; | ||
browser: 'firefox' | 'chrome' | 'edge' | 'safari' | 'Not a supported browser.'; | ||
minVersion: number | null; | ||
@@ -58,0 +58,0 @@ version: number | null; |
@@ -1,6 +0,6 @@ | ||
import { PluginDefinition, PluginParams, WaveSurferPlugin } from "../../types/plugin"; | ||
import Drawer from "../drawer"; | ||
import Observer from "../util/observer"; | ||
import WaveSurfer from "../wavesurfer"; | ||
import RegionsPlugin from "./regions"; | ||
import { PluginDefinition, PluginParams, WaveSurferPlugin } from '../../types/plugin'; | ||
import Drawer from '../drawer'; | ||
import Observer from '../util/observer'; | ||
import WaveSurfer from '../wavesurfer'; | ||
import RegionsPlugin from './regions'; | ||
@@ -31,3 +31,3 @@ export default class MinimapPlugin extends Observer implements WaveSurferPlugin { | ||
readonly renderEvent: string; | ||
readonly util: WaveSurfer["util"]; | ||
readonly util: WaveSurfer['util']; | ||
readonly waveShowedWidth: number; | ||
@@ -34,0 +34,0 @@ readonly waveWidth: number; |
@@ -1,4 +0,4 @@ | ||
import { PluginDefinition, PluginParams, WaveSurferPlugin } from "../../types/plugin"; | ||
import Observer from "../util/observer"; | ||
import WaveSurfer from "../wavesurfer"; | ||
import { PluginDefinition, PluginParams, WaveSurferPlugin } from '../../types/plugin'; | ||
import Observer from '../util/observer'; | ||
import WaveSurfer from '../wavesurfer'; | ||
@@ -20,5 +20,5 @@ export default class PlayheadPlugin extends Observer implements WaveSurferPlugin { | ||
readonly playheadTime: number; | ||
readonly style: WaveSurfer["util"]["style"]; | ||
readonly style: WaveSurfer['util']['style']; | ||
readonly unFuns: Array<(this: WaveSurfer) => void>; | ||
readonly util: WaveSurfer["util"]; | ||
readonly util: WaveSurfer['util']; | ||
readonly wavesurfer: WaveSurfer; | ||
@@ -25,0 +25,0 @@ readonly wrapper: HTMLElement; |
@@ -1,7 +0,7 @@ | ||
import { Styles } from "../../types/util"; | ||
import { PluginDefinition, PluginParams, WaveSurferPlugin } from "../../types/plugin"; | ||
import Observer from "../util/observer"; | ||
import WaveSurfer from "../wavesurfer"; | ||
import { Styles } from '../../types/util'; | ||
import { PluginDefinition, PluginParams, WaveSurferPlugin } from '../../types/plugin'; | ||
import Observer from '../util/observer'; | ||
import WaveSurfer from '../wavesurfer'; | ||
declare module "../../wavesurfer" { | ||
declare module '../../wavesurfer' { | ||
interface WaveSurfer { | ||
@@ -31,3 +31,3 @@ addRegion(regionParams: RegionParams): void; | ||
readonly regionsMinLength: number; | ||
readonly util: WaveSurfer["util"]; | ||
readonly util: WaveSurfer['util']; | ||
readonly wavesurfer: WaveSurfer; | ||
@@ -57,3 +57,3 @@ readonly wrapper: HTMLElement; | ||
export class Region extends Observer { | ||
constructor(params: RegionParams, regionsUtil: WaveSurfer["util"], ws: WaveSurfer); | ||
constructor(params: RegionParams, regionsUtil: WaveSurfer['util'], ws: WaveSurfer); | ||
@@ -66,3 +66,3 @@ bindRagEvents(): void; | ||
onDrag(delta: number): void; | ||
onResize(delta: number, direction: "start" | "end"): void; | ||
onResize(delta: number, direction: 'start' | 'end'): void; | ||
play(start?: number): void; | ||
@@ -99,3 +99,3 @@ playLoop(start?: number): void; | ||
readonly regionHeight: string; | ||
readonly regionsUtil: WaveSurfer["util"]; | ||
readonly regionsUtil: WaveSurfer['util']; | ||
readonly resize: boolean; | ||
@@ -106,4 +106,4 @@ readonly scroll: boolean; | ||
readonly start: number; | ||
readonly style: WaveSurfer["util"]["style"]; | ||
readonly util: WaveSurfer["util"]; | ||
readonly style: WaveSurfer['util']['style']; | ||
readonly util: WaveSurfer['util']; | ||
readonly wavesurfer: WaveSurfer; | ||
@@ -110,0 +110,0 @@ readonly wrapper: HTMLElement; |
@@ -1,7 +0,7 @@ | ||
import { PluginDefinition, PluginParams, WaveSurferPlugin } from "../../types/plugin"; | ||
import Drawer from "../drawer"; | ||
import Observer from "../util/observer"; | ||
import WaveSurfer from "../wavesurfer"; | ||
import { PluginDefinition, PluginParams, WaveSurferPlugin } from '../../types/plugin'; | ||
import Drawer from '../drawer'; | ||
import Observer from '../util/observer'; | ||
import WaveSurfer from '../wavesurfer'; | ||
declare module "../../wavesurfer" { | ||
declare module '../../wavesurfer' { | ||
interface WaveSurfer { | ||
@@ -29,3 +29,3 @@ FFT(bufferSize: number, sampleRate: number, windowFunc: WindowFunction, alpha: number): void; | ||
readonly spectrCc: CanvasRenderingContext2D; | ||
readonly util: WaveSurfer["util"]; | ||
readonly util: WaveSurfer['util']; | ||
readonly wavesurfer: WaveSurfer; | ||
@@ -55,3 +55,3 @@ readonly width: number; | ||
/** A 256 long array of 4-element arrays. Each entry should contain a float between 0 and 1 and specify r, g, b, and alpha. */ | ||
colorMap?: RGBA[] & { length: 256 } | undefined; | ||
colorMap?: (RGBA[] & { length: 256 }) | undefined; | ||
} | ||
@@ -62,11 +62,11 @@ | ||
export type WindowFunction = | ||
| "bartlett" | ||
| "bartlettHann" | ||
| "blackman" | ||
| "cosine" | ||
| "gauss" | ||
| "hamming" | ||
| "hann" | ||
| "lanczoz" | ||
| "rectangular" | ||
| "triangular"; | ||
| 'bartlett' | ||
| 'bartlettHann' | ||
| 'blackman' | ||
| 'cosine' | ||
| 'gauss' | ||
| 'hamming' | ||
| 'hann' | ||
| 'lanczoz' | ||
| 'rectangular' | ||
| 'triangular'; |
@@ -1,4 +0,4 @@ | ||
import { PluginDefinition, PluginParams, WaveSurferPlugin } from "../../types/plugin"; | ||
import Observer from "../util/observer"; | ||
import WaveSurfer from "../wavesurfer"; | ||
import { PluginDefinition, PluginParams, WaveSurferPlugin } from '../../types/plugin'; | ||
import Observer from '../util/observer'; | ||
import WaveSurfer from '../wavesurfer'; | ||
@@ -45,3 +45,3 @@ export default class TimelinePlugin extends Observer implements WaveSurferPlugin { | ||
readonly params: TimelinePluginParams; | ||
readonly util: WaveSurfer["util"]; | ||
readonly util: WaveSurfer['util']; | ||
readonly wavesurfer: WaveSurfer; | ||
@@ -48,0 +48,0 @@ readonly wrapper: HTMLElement; |
@@ -1,4 +0,4 @@ | ||
import { Observer } from "."; | ||
import { XHROptions } from "../../types/xhr"; | ||
import { Observer } from '.'; | ||
import { XHROptions } from '../../types/xhr'; | ||
export default function fetchFile(options: XHROptions): Observer; |
@@ -1,15 +0,15 @@ | ||
import debounce = require("debounce"); | ||
import absMax from "./absMax"; | ||
import clamp from "./clamp"; | ||
import fetchFile from "./fetch"; | ||
import frame from "./frame"; | ||
import getId from "./get-id"; | ||
import ignoreSilenceMode from "./silence-mode"; | ||
import max from "./max"; | ||
import min from "./min"; | ||
import Observer from "./observer"; | ||
import withOrientation from "./orientation"; | ||
import preventClick from "./prevent-click"; | ||
import requestAnimationFrame from "./request-animation-frame"; | ||
import style from "./style"; | ||
import debounce = require('debounce'); | ||
import absMax from './absMax'; | ||
import clamp from './clamp'; | ||
import fetchFile from './fetch'; | ||
import frame from './frame'; | ||
import getId from './get-id'; | ||
import ignoreSilenceMode from './silence-mode'; | ||
import max from './max'; | ||
import min from './min'; | ||
import Observer from './observer'; | ||
import withOrientation from './orientation'; | ||
import preventClick from './prevent-click'; | ||
import requestAnimationFrame from './request-animation-frame'; | ||
import style from './style'; | ||
@@ -16,0 +16,0 @@ export { |
@@ -1,2 +0,2 @@ | ||
import { EventHandler, ListenerDescriptor } from "../../types/util"; | ||
import { EventHandler, ListenerDescriptor } from '../../types/util'; | ||
@@ -3,0 +3,0 @@ export default class Observer { |
@@ -1,3 +0,3 @@ | ||
import { Styles } from "../../types/util"; | ||
import { Styles } from '../../types/util'; | ||
export default function style<T extends HTMLElement>(el: T, styles: Styles): T; |
@@ -1,16 +0,16 @@ | ||
import { Peaks, WaveSurferBackend } from "../types/backend"; | ||
import { WaveSurferParams } from "../types/params"; | ||
import { PluginDefinition } from "../types/plugin"; | ||
import { WaveSurferUtil } from "../types/util"; | ||
import CursorPlugin from "./plugin/cursor"; | ||
import ElanPlugin from "./plugin/elan"; | ||
import MarkersPlugin from "./plugin/markers"; | ||
import MediaSessionPlugin from "./plugin/mediasession"; | ||
import MicrophonePlugin from "./plugin/microphone"; | ||
import MinimapPlugin from "./plugin/minimap"; | ||
import PlayheadPlugin from "./plugin/playhead"; | ||
import RegionsPlugin from "./plugin/regions"; | ||
import SpectrogramPlugin from "./plugin/spectrogram"; | ||
import TimelinePlugin from "./plugin/timeline"; | ||
import Observer from "./util/observer"; | ||
import { Peaks, WaveSurferBackend } from '../types/backend'; | ||
import { WaveSurferParams } from '../types/params'; | ||
import { PluginDefinition } from '../types/plugin'; | ||
import { WaveSurferUtil } from '../types/util'; | ||
import CursorPlugin from './plugin/cursor'; | ||
import ElanPlugin from './plugin/elan'; | ||
import MarkersPlugin from './plugin/markers'; | ||
import MediaSessionPlugin from './plugin/mediasession'; | ||
import MicrophonePlugin from './plugin/microphone'; | ||
import MinimapPlugin from './plugin/minimap'; | ||
import PlayheadPlugin from './plugin/playhead'; | ||
import RegionsPlugin from './plugin/regions'; | ||
import SpectrogramPlugin from './plugin/spectrogram'; | ||
import TimelinePlugin from './plugin/timeline'; | ||
import Observer from './util/observer'; | ||
@@ -21,3 +21,3 @@ export default class WaveSurfer extends Observer { | ||
static VERSION: string; | ||
static util: WaveSurfer["util"]; | ||
static util: WaveSurfer['util']; | ||
static create(params: WaveSurferParams): WaveSurfer; | ||
@@ -60,3 +60,3 @@ | ||
empty(): void; | ||
exportImage(format?: string, quality?: number, type?: "dataURL" | "blob"): string | string[] | Promise<Blob[]>; | ||
exportImage(format?: string, quality?: number, type?: 'dataURL' | 'blob'): string | string[] | Promise<Blob[]>; | ||
exportPCM(length?: number, accuracy?: number, noWindow?: boolean, start?: number, end?: number): Promise<Peaks>; | ||
@@ -63,0 +63,0 @@ getActivePlugins(): { [pluginName: string]: boolean }; |
@@ -1,2 +0,2 @@ | ||
import { WebAudioBackend } from "../types/backend"; | ||
import { WebAudioBackend } from '../types/backend'; | ||
@@ -3,0 +3,0 @@ export default class WebAudio extends WebAudioBackend { |
@@ -1,6 +0,6 @@ | ||
import MediaElement from "../src/mediaelement"; | ||
import MediaElementWebAudio from "../src/mediaelement-webaudio"; | ||
import Observer from "../src/util/observer"; | ||
import WebAudio from "../src/webaudio"; | ||
import { WaveSurferParams } from "./params"; | ||
import MediaElement from '../src/mediaelement'; | ||
import MediaElementWebAudio from '../src/mediaelement-webaudio'; | ||
import Observer from '../src/util/observer'; | ||
import WebAudio from '../src/webaudio'; | ||
import { WaveSurferParams } from './params'; | ||
@@ -7,0 +7,0 @@ export type WaveSurferBackend = WebAudio | MediaElement | MediaElementWebAudio; |
@@ -1,5 +0,5 @@ | ||
import MultiCanvas from "../src/drawer.multicanvas"; | ||
import { PluginDefinition } from "./plugin"; | ||
import { DrawingContextAttributes } from "./util"; | ||
import { XHROptions } from "./xhr"; | ||
import MultiCanvas from '../src/drawer.multicanvas'; | ||
import { PluginDefinition } from './plugin'; | ||
import { DrawingContextAttributes } from './util'; | ||
import { XHROptions } from './xhr'; | ||
@@ -25,3 +25,3 @@ export interface WaveSurferParams { | ||
*/ | ||
backend?: "WebAudio" | "MediaElement" | "MediaElementWebAudio" | undefined; | ||
backend?: 'WebAudio' | 'MediaElement' | 'MediaElementWebAudio' | undefined; | ||
/** Change background color of the waveform container (default: null). */ | ||
@@ -71,3 +71,3 @@ backgroundColor?: string | undefined; | ||
/** (Use with backend MediaElement or MediaElementWebAudio) 'audio'|'video' ('video' only for MediaElement) */ | ||
mediaType?: "audio" | "video" | undefined; | ||
mediaType?: 'audio' | 'video' | undefined; | ||
/** Minimum number of pixels per second of audio (default: 20). */ | ||
@@ -74,0 +74,0 @@ minPxPerSec?: number | undefined; |
@@ -1,2 +0,2 @@ | ||
import WaveSurfer from "../src/wavesurfer"; | ||
import WaveSurfer from '../src/wavesurfer'; | ||
@@ -20,3 +20,3 @@ export abstract class WaveSurferPlugin { | ||
/** The plugin instance factory, is called with the dependency specified in extends. Returns the plugin class. */ | ||
instance: { new (params: PluginDefinition["params"], ws: WaveSurfer): WaveSurferPlugin }; | ||
instance: { new (params: PluginDefinition['params'], ws: WaveSurfer): WaveSurferPlugin }; | ||
} | ||
@@ -23,0 +23,0 @@ |
@@ -1,4 +0,4 @@ | ||
import Observer from "../src/util/observer"; | ||
import { XHROptions } from "./xhr"; | ||
import * as util from "../src/util"; | ||
import Observer from '../src/util/observer'; | ||
import { XHROptions } from './xhr'; | ||
import * as util from '../src/util'; | ||
@@ -5,0 +5,0 @@ export type WaveSurferUtil = typeof util; |
@@ -7,3 +7,3 @@ export interface XHROptions { | ||
cache?: string | undefined; | ||
responseType?: "arraybuffer" | "blob" | "json" | "text" | undefined; | ||
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text' | undefined; | ||
requestHeaders?: XHRRequestHeader[] | undefined; | ||
@@ -10,0 +10,0 @@ redirect?: string | undefined; |
58508