@cludosearch/cludo-search-components 1.0.128 → 1.0.130

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.
@@ -0,0 +1,36 @@
1
+ export type ReadAloudStatus = "idle" | "playing" | "paused";
2
+ export interface ReadAloudOptions {
3
+ maxChunkLength?: number;
4
+ /** BCP-47 language for voice selection, e.g. "en-GB". */
5
+ lang?: string;
6
+ rate?: number;
7
+ pitch?: number;
8
+ }
9
+ /** Strip markdown / HTML to plain text and drop bare URLs so they are not read aloud. */
10
+ export declare function cleanTextForSpeech(raw: string): string;
11
+ /** Split cleaned text into utterance-sized chunks on sentence boundaries, hard-splitting long sentences. */
12
+ export declare function chunkText(text: string, maxLen?: number): string[];
13
+ export declare class ReadAloud {
14
+ private synth;
15
+ private opts;
16
+ private chunks;
17
+ private index;
18
+ private status;
19
+ private listeners;
20
+ private keepAlive;
21
+ private epoch;
22
+ constructor(options?: ReadAloudOptions);
23
+ isSupported(): boolean;
24
+ getStatus(): ReadAloudStatus;
25
+ onStatusChange(cb: (s: ReadAloudStatus) => void): () => void;
26
+ private setStatus;
27
+ private resolveVoice;
28
+ play(rawText: string): Promise<void>;
29
+ private speakNext;
30
+ pause(): void;
31
+ resume(): void;
32
+ stop(): void;
33
+ private startKeepAlive;
34
+ private stopKeepAlive;
35
+ }
36
+ //# sourceMappingURL=read-aloud.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-aloud.d.ts","sourceRoot":"","sources":["../../src/utils/read-aloud.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE5D,MAAM,WAAW,gBAAgB;IAChC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,yDAAyD;IACzD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAoBD,yFAAyF;AACzF,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAmBtD;AAED,4GAA4G;AAC5G,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,GAAE,MAA0B,GAAG,MAAM,EAAE,CA0CpF;AAED,qBAAa,SAAS;IACrB,OAAO,CAAC,KAAK,CAAyB;IACtC,OAAO,CAAC,IAAI,CAA4F;IACxG,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,KAAK,CAAK;IAClB,OAAO,CAAC,MAAM,CAA2B;IACzC,OAAO,CAAC,SAAS,CAA2C;IAC5D,OAAO,CAAC,SAAS,CAA+C;IAEhE,OAAO,CAAC,KAAK,CAAK;gBAEN,OAAO,GAAE,gBAAqB;IAU1C,WAAW,IAAI,OAAO;IAGtB,SAAS,IAAI,eAAe;IAG5B,cAAc,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,eAAe,KAAK,IAAI,GAAG,MAAM,IAAI;IAI5D,OAAO,CAAC,SAAS;IAOjB,OAAO,CAAC,YAAY;IA2Bd,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAe1C,OAAO,CAAC,SAAS;IA6BjB,KAAK;IAOL,MAAM;IAQN,IAAI;IAcJ,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,aAAa;CAMrB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cludosearch/cludo-search-components",
3
- "version": "1.0.128",
3
+ "version": "1.0.130",
4
4
  "description": "Cludo Search Components in React",
5
5
  "exports": {
6
6
  ".": {