react-text-to-speech
Advanced tools
Comparing version 0.6.5 to 0.6.6
import React, { DetailedHTMLProps, HTMLAttributes, ReactNode } from 'react'; | ||
export type Button = JSX.Element | string | null; | ||
export type SpeechStatus = 'started' | 'paused' | 'stopped'; | ||
export interface ChildrenOptions { | ||
export type ChildrenOptions = { | ||
speechStatus?: SpeechStatus; | ||
@@ -9,6 +9,6 @@ start?: Function; | ||
stop?: Function; | ||
} | ||
}; | ||
export type Children = (childrenOptions: ChildrenOptions) => ReactNode; | ||
export type Props = DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>; | ||
export interface SpeechProps { | ||
export type SpeechProps = { | ||
text: string; | ||
@@ -26,5 +26,5 @@ pitch?: number; | ||
props?: Props; | ||
} | ||
}; | ||
export type { IconProps } from './icons.js'; | ||
declare function Speech({ text, pitch, rate, volume, lang, startBtn, pauseBtn, stopBtn, useStopOverPause, onError, children, props }: SpeechProps): string | number | boolean | React.JSX.Element | Iterable<React.ReactNode> | null | undefined; | ||
export default Speech; |
{ | ||
"name": "react-text-to-speech", | ||
"version": "0.6.5", | ||
"version": "0.6.6", | ||
"description": "An easy to use react component for the Web Speech API.", | ||
@@ -16,7 +16,8 @@ "type": "module", | ||
"component", | ||
"webspeechapi", | ||
"webspeech-api", | ||
"text-to-speech", | ||
"tts", | ||
"react-text-to-speech", | ||
"react-tts" | ||
"react-tts", | ||
"typescript" | ||
], | ||
@@ -23,0 +24,0 @@ "author": "Sahil Aggarwal", |
@@ -135,8 +135,3 @@ # react-text-to-speech | ||
type SpeechStatus = 'started' | 'paused' | 'stopped' | ||
interface ChildrenOptions { | ||
speechStatus?: SpeechStatus | ||
start?: Function | ||
pause?: Function | ||
stop?: Function | ||
} | ||
type ChildrenOptions = { speechStatus?: SpeechStatus, start?: Function, pause?: Function, stop?: Function } | ||
type Children = (childrenOptions: ChildrenOptions) => ReactNode | ||
@@ -143,0 +138,0 @@ ``` |
14434
139