diff --git a/src/browser-entry.ts b/src/browser-entry.ts index 89f2833..aaa1f0e 100644 --- a/src/browser-entry.ts +++ b/src/browser-entry.ts @@ -40,9 +40,9 @@ export { EdgeTTSBrowser } from './browser'; // Export the new simplified browser-specific API as the main EdgeTTS export { BrowserEdgeTTS as EdgeTTS, - ProsodyOptions, - WordBoundary, - SynthesisResult, + type ProsodyOptions, + type WordBoundary, + type SynthesisResult, createVTT, createSRT } from './browser-simple'; @@ -50,7 +50,7 @@ export { // Export browser-specific implementations to avoid Node.js dependencies export { BrowserCommunicate as Communicate, - BrowserCommunicateOptions as CommunicateOptions + type BrowserCommunicateOptions as CommunicateOptions } from './browser-communicate'; export { @@ -66,4 +66,4 @@ export { SubMaker } from './submaker'; // Common types and exceptions export * from './exceptions'; -export * from './types'; \ No newline at end of file +export * from './types'; diff --git a/src/index.ts b/src/index.ts index 323a927..4a2e51e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -37,17 +37,25 @@ */ // Node.js-specific API (uses axios, Node.js crypto, etc.) -export { Communicate, CommunicateOptions } from './communicate'; +export { Communicate, type CommunicateOptions } from './communicate'; export { SubMaker } from './submaker'; export { VoicesManager, listVoices } from './voices'; // Simple API (works in both Node.js and browsers when using appropriate exports) -export { EdgeTTS, ProsodyOptions, WordBoundary, SynthesisResult, createVTT, createSRT, UniversalEdgeTTS } from './simple'; +export { + EdgeTTS, + type ProsodyOptions, + type WordBoundary, + type SynthesisResult, + createVTT, + createSRT, + UniversalEdgeTTS +} from './simple'; // Universal/Isomorphic API (works in both Node.js and browsers) export { IsomorphicCommunicate, - IsomorphicCommunicateOptions + type IsomorphicCommunicateOptions } from './isomorphic-communicate'; export { IsomorphicVoicesManager, @@ -59,9 +67,9 @@ export { IsomorphicDRM } from './isomorphic-drm'; // Simple isomorphic API export { IsomorphicEdgeTTS, - ProsodyOptions as IsomorphicProsodyOptions, - WordBoundary as IsomorphicWordBoundary, - SynthesisResult as IsomorphicSynthesisResult, + type ProsodyOptions as IsomorphicProsodyOptions, + type WordBoundary as IsomorphicWordBoundary, + type SynthesisResult as IsomorphicSynthesisResult, createVTT as createVTTIsomorphic, createSRT as createSRTIsomorphic } from './isomorphic-simple'; @@ -69,7 +77,7 @@ export { // Universal aliases (preferred naming) export { IsomorphicCommunicate as UniversalCommunicate, - IsomorphicCommunicateOptions as UniversalCommunicateOptions + type IsomorphicCommunicateOptions as UniversalCommunicateOptions } from './isomorphic-communicate'; export { IsomorphicVoicesManager as UniversalVoicesManager, @@ -79,9 +87,9 @@ export { export { IsomorphicDRM as UniversalDRM } from './isomorphic-drm'; export { IsomorphicEdgeTTS as UniversalEdgeTTS_Isomorphic, - ProsodyOptions as UniversalProsodyOptions_Isomorphic, - WordBoundary as UniversalWordBoundary_Isomorphic, - SynthesisResult as UniversalSynthesisResult_Isomorphic, + type ProsodyOptions as UniversalProsodyOptions_Isomorphic, + type WordBoundary as UniversalWordBoundary_Isomorphic, + type SynthesisResult as UniversalSynthesisResult_Isomorphic, createVTT as createVTTUniversal_Isomorphic, createSRT as createSRTUniversal_Isomorphic } from './isomorphic-simple'; @@ -89,13 +97,13 @@ export { // Browser-specific API (uses native browser APIs only) export { EdgeTTSBrowser, - ProsodyOptions as BrowserProsodyOptions, - WordBoundary as BrowserWordBoundary, - SynthesisResult as BrowserSynthesisResult, + type ProsodyOptions as BrowserProsodyOptions, + type WordBoundary as BrowserWordBoundary, + type SynthesisResult as BrowserSynthesisResult, createVTT as createVTTBrowser, createSRT as createSRTBrowser } from './browser'; // Common types and exceptions export * from './exceptions'; -export * from './types'; \ No newline at end of file +export * from './types'; diff --git a/src/isomorphic-communicate.ts b/src/isomorphic-communicate.ts index cef8b02..5a9bd8c 100644 --- a/src/isomorphic-communicate.ts +++ b/src/isomorphic-communicate.ts @@ -417,4 +417,4 @@ export class IsomorphicCommunicate { } } } -} \ No newline at end of file +} diff --git a/src/isomorphic-entry.ts b/src/isomorphic-entry.ts index beb368b..d667e8c 100644 --- a/src/isomorphic-entry.ts +++ b/src/isomorphic-entry.ts @@ -31,7 +31,7 @@ export { IsomorphicCommunicate as Communicate, - IsomorphicCommunicateOptions as CommunicateOptions + type IsomorphicCommunicateOptions as CommunicateOptions } from './isomorphic-communicate'; export { @@ -45,9 +45,9 @@ export { IsomorphicDRM as DRM } from './isomorphic-drm'; // Simple API using isomorphic backend (all from isomorphic-simple to avoid Node.js deps) export { IsomorphicEdgeTTS as EdgeTTS, - ProsodyOptions, - WordBoundary, - SynthesisResult, + type ProsodyOptions, + type WordBoundary, + type SynthesisResult, createVTT, createSRT } from './isomorphic-simple'; @@ -62,7 +62,7 @@ export * from './types'; // Universal aliases (preferred naming convention) export { IsomorphicCommunicate as UniversalCommunicate, - IsomorphicCommunicateOptions as UniversalCommunicateOptions + type IsomorphicCommunicateOptions as UniversalCommunicateOptions } from './isomorphic-communicate'; export { @@ -75,4 +75,4 @@ export { IsomorphicDRM as UniversalDRM } from './isomorphic-drm'; export { IsomorphicEdgeTTS as UniversalEdgeTTS -} from './isomorphic-simple'; \ No newline at end of file +} from './isomorphic-simple'; diff --git a/src/webworker-entry.ts b/src/webworker-entry.ts index 96d3b0b..fc5e2dd 100644 --- a/src/webworker-entry.ts +++ b/src/webworker-entry.ts @@ -41,7 +41,7 @@ export { IsomorphicCommunicate as Communicate, - IsomorphicCommunicateOptions as CommunicateOptions + type IsomorphicCommunicateOptions as CommunicateOptions } from './isomorphic-communicate'; export { @@ -56,9 +56,9 @@ export { IsomorphicDRM as DRM } from './isomorphic-drm'; // Import everything from isomorphic-simple to avoid Node.js dependencies export { IsomorphicEdgeTTS as EdgeTTS, - ProsodyOptions, - WordBoundary, - SynthesisResult, + type ProsodyOptions, + type WordBoundary, + type SynthesisResult, createVTT, createSRT } from './isomorphic-simple'; @@ -101,4 +101,4 @@ export function postAudioMessage(audio: Blob, subtitle: any[]) { } else { console.warn('postAudioMessage should only be called in Web Worker context'); } -} \ No newline at end of file +}