@ephia/dova-sdk 1.0.0
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/README.md +89 -0
- package/dist/EphiaBinding-BvRmlqqC.d.ts +36 -0
- package/dist/EphiaFloatingButton-CxiF86VW.d.ts +65 -0
- package/dist/EphiaTextarea-B4_CAVUg.d.ts +183 -0
- package/dist/NativeBinding-ChG0GeSz.d.ts +53 -0
- package/dist/TargetBinding-BKGQwUMc.d.ts +89 -0
- package/dist/TiptapBinding-B-agfV2H.d.ts +45 -0
- package/dist/Transport-zdeA4Pou.d.ts +63 -0
- package/dist/audio-state-kZ3KSvux.d.ts +39 -0
- package/dist/chunk-35AJK2IO.js +1 -0
- package/dist/chunk-35AJK2IO.js.map +1 -0
- package/dist/chunk-3LXZODL4.js +886 -0
- package/dist/chunk-3LXZODL4.js.map +1 -0
- package/dist/chunk-5IK5TLSK.js +67 -0
- package/dist/chunk-5IK5TLSK.js.map +1 -0
- package/dist/chunk-7E43RY75.js +9 -0
- package/dist/chunk-7E43RY75.js.map +1 -0
- package/dist/chunk-A5UEXJ5R.js +183 -0
- package/dist/chunk-A5UEXJ5R.js.map +1 -0
- package/dist/chunk-AEE554FT.js +51 -0
- package/dist/chunk-AEE554FT.js.map +1 -0
- package/dist/chunk-DIEWY3IT.js +1332 -0
- package/dist/chunk-DIEWY3IT.js.map +1 -0
- package/dist/chunk-EGIAN7FH.js +18 -0
- package/dist/chunk-EGIAN7FH.js.map +1 -0
- package/dist/chunk-EMOEAPVU.js +486 -0
- package/dist/chunk-EMOEAPVU.js.map +1 -0
- package/dist/chunk-IDC7FHIZ.js +40 -0
- package/dist/chunk-IDC7FHIZ.js.map +1 -0
- package/dist/chunk-ITJFN3VM.js +601 -0
- package/dist/chunk-ITJFN3VM.js.map +1 -0
- package/dist/chunk-K24GNU27.js +22 -0
- package/dist/chunk-K24GNU27.js.map +1 -0
- package/dist/chunk-LXMCRXXF.js +778 -0
- package/dist/chunk-LXMCRXXF.js.map +1 -0
- package/dist/chunk-MJCEOOLW.js +122 -0
- package/dist/chunk-MJCEOOLW.js.map +1 -0
- package/dist/chunk-N7U5M3VZ.js +33 -0
- package/dist/chunk-N7U5M3VZ.js.map +1 -0
- package/dist/chunk-PSYX674B.js +27 -0
- package/dist/chunk-PSYX674B.js.map +1 -0
- package/dist/chunk-RFQRV7ML.js +33 -0
- package/dist/chunk-RFQRV7ML.js.map +1 -0
- package/dist/chunk-THNHRV2B.js +18 -0
- package/dist/chunk-THNHRV2B.js.map +1 -0
- package/dist/chunk-VSLGR64U.js +62 -0
- package/dist/chunk-VSLGR64U.js.map +1 -0
- package/dist/chunk-W2ZP674X.js +346 -0
- package/dist/chunk-W2ZP674X.js.map +1 -0
- package/dist/chunk-YWZUMUYE.js +695 -0
- package/dist/chunk-YWZUMUYE.js.map +1 -0
- package/dist/client-options-Uo6jXO8k.d.ts +64 -0
- package/dist/connection-state-Bk33YprE.d.ts +32 -0
- package/dist/core/bindings/index.d.ts +24 -0
- package/dist/core/bindings/index.js +1025 -0
- package/dist/core/bindings/index.js.map +1 -0
- package/dist/core/index.d.ts +383 -0
- package/dist/core/index.js +1284 -0
- package/dist/core/index.js.map +1 -0
- package/dist/createEphiaClient-BhdZ183V.d.ts +69 -0
- package/dist/devices/speechmike/index.d.ts +148 -0
- package/dist/devices/speechmike/index.js +40 -0
- package/dist/devices/speechmike/index.js.map +1 -0
- package/dist/headless/index.d.ts +10 -0
- package/dist/headless/index.js +25 -0
- package/dist/headless/index.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +119 -0
- package/dist/index.js.map +1 -0
- package/dist/react/index.d.ts +38 -0
- package/dist/react/index.js +70 -0
- package/dist/react/index.js.map +1 -0
- package/dist/rich-editor/index.d.ts +46 -0
- package/dist/rich-editor/index.js +13 -0
- package/dist/rich-editor/index.js.map +1 -0
- package/dist/schema-B2ycPlNB.d.ts +87 -0
- package/dist/session-APaXR48R.d.ts +12 -0
- package/dist/shared/index.d.ts +16 -0
- package/dist/shared/index.js +30 -0
- package/dist/shared/index.js.map +1 -0
- package/dist/style.css +1093 -0
- package/dist/testing/index.d.ts +84 -0
- package/dist/testing/index.js +36 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/types-D5SXPSwR.d.ts +32 -0
- package/dist/ui/index.d.ts +30 -0
- package/dist/ui/index.js +34 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/useEphiaSpeechMike-CjD7DWnh.d.ts +64 -0
- package/package.json +110 -0
- package/src/core/audio/audio-worklet-source.ts +30 -0
- package/src/core/audio/index.ts +3 -0
- package/src/core/audio/voice-level-meter.test.ts +27 -0
- package/src/core/audio/voice-level-meter.ts +270 -0
- package/src/core/bindings/EphiaBinding.ts +41 -0
- package/src/core/bindings/SegmentBindingBridge.test.ts +422 -0
- package/src/core/bindings/SegmentBindingBridge.ts +377 -0
- package/src/core/bindings/TargetBinding.ts +142 -0
- package/src/core/bindings/adapters/NativeAdapter.test.ts +85 -0
- package/src/core/bindings/adapters/NativeAdapter.ts +216 -0
- package/src/core/bindings/adapters/ProseMirrorAdapter.ts +231 -0
- package/src/core/bindings/adapters/index.ts +2 -0
- package/src/core/bindings/binding-factory.ts +78 -0
- package/src/core/bindings/detect-editor-type.ts +87 -0
- package/src/core/bindings/index.ts +13 -0
- package/src/core/bindings/insertion-boundary.test.ts +38 -0
- package/src/core/bindings/insertion-boundary.ts +26 -0
- package/src/core/bindings/native/NativeBinding.test.ts +277 -0
- package/src/core/bindings/native/NativeBinding.ts +239 -0
- package/src/core/bindings/resolver.ts +18 -0
- package/src/core/bindings/targets/codemirror.binding.ts +293 -0
- package/src/core/bindings/targets/contenteditable.binding.ts +452 -0
- package/src/core/bindings/targets/index.ts +10 -0
- package/src/core/bindings/targets/monaco.binding.ts +315 -0
- package/src/core/bindings/targets/tiptap.binding.test.ts +417 -0
- package/src/core/bindings/targets/tiptap.binding.ts +1192 -0
- package/src/core/bindings/tiptap/TiptapBinding.test.ts +63 -0
- package/src/core/bindings/tiptap/TiptapBinding.ts +464 -0
- package/src/core/bindings/types.ts +41 -0
- package/src/core/client/EphiaAudioClient.ts +654 -0
- package/src/core/client/audio-capture.ts +263 -0
- package/src/core/client/client-options.ts +39 -0
- package/src/core/client/client-state.ts +18 -0
- package/src/core/client/constants.ts +23 -0
- package/src/core/client/session-api.ts +415 -0
- package/src/core/connection/connection-state.ts +78 -0
- package/src/core/connection/index.ts +6 -0
- package/src/core/index.ts +47 -0
- package/src/core/operations/textToDocumentOperations.test.ts +69 -0
- package/src/core/operations/textToDocumentOperations.ts +92 -0
- package/src/core/runtime/DictationRuntime.test.ts +578 -0
- package/src/core/runtime/DictationRuntime.ts +434 -0
- package/src/core/runtime/TranscriptApplier.test.ts +355 -0
- package/src/core/runtime/TranscriptApplier.ts +229 -0
- package/src/core/runtime/index.ts +18 -0
- package/src/core/session/index.ts +2 -0
- package/src/core/session/session-machine.test.ts +16 -0
- package/src/core/session/session-machine.ts +59 -0
- package/src/core/targets/EditorContextCollector.ts +71 -0
- package/src/core/targets/TargetManager.test.ts +194 -0
- package/src/core/targets/TargetManager.ts +194 -0
- package/src/core/targets/index.ts +10 -0
- package/src/core/text-processing/index.ts +11 -0
- package/src/core/text-processing/overlap.test.ts +35 -0
- package/src/core/text-processing/overlap.ts +101 -0
- package/src/core/text-processing/voice-formatting.normalizer.test.ts +132 -0
- package/src/core/text-processing/voice-formatting.normalizer.ts +284 -0
- package/src/core/transcript/client-transcript.reducer.ts +366 -0
- package/src/core/transcript/client-transcript.state.ts +25 -0
- package/src/core/transcript/index.ts +19 -0
- package/src/core/transcript/transcript.assembler.test.ts +205 -0
- package/src/core/transcript/transcript.assembler.ts +152 -0
- package/src/core/transcript/transcript.reducer.test.ts +199 -0
- package/src/core/transcript/transcript.reducer.ts +771 -0
- package/src/core/transcript/transcript.state.ts +123 -0
- package/src/core/transport/LiveKitTransport.publish.test.ts +226 -0
- package/src/core/transport/LiveKitTransport.ts +459 -0
- package/src/core/transport/MockTransport.ts +231 -0
- package/src/core/transport/Transport.ts +82 -0
- package/src/debug/sdk-debug-collector.ts +79 -0
- package/src/devices/index.ts +2 -0
- package/src/devices/speechmike/__tests__/EphiaSpeechMikeProvider.test.tsx +99 -0
- package/src/devices/speechmike/__tests__/speechmike-audio-resolver.test.ts +96 -0
- package/src/devices/speechmike/__tests__/speechmike-button-router.test.ts +66 -0
- package/src/devices/speechmike/__tests__/speechmike-device-manager.test.ts +201 -0
- package/src/devices/speechmike/__tests__/speechmike-led-controller.test.ts +68 -0
- package/src/devices/speechmike/browser.ts +80 -0
- package/src/devices/speechmike/constants.ts +74 -0
- package/src/devices/speechmike/dictation-support-loader.ts +81 -0
- package/src/devices/speechmike/index.ts +11 -0
- package/src/devices/speechmike/react/EphiaSpeechMikeContext.ts +34 -0
- package/src/devices/speechmike/react/EphiaSpeechMikeProvider.tsx +287 -0
- package/src/devices/speechmike/react/useEphiaSpeechMike.ts +26 -0
- package/src/devices/speechmike/speechmike-audio-resolver.ts +58 -0
- package/src/devices/speechmike/speechmike-button-router.ts +73 -0
- package/src/devices/speechmike/speechmike-device-manager.ts +461 -0
- package/src/devices/speechmike/speechmike-led-controller.ts +78 -0
- package/src/devices/speechmike/types.ts +96 -0
- package/src/dictation_support.d.ts +31 -0
- package/src/global.d.ts +10 -0
- package/src/headless/createEphiaClient.ts +220 -0
- package/src/headless/index.ts +18 -0
- package/src/index.ts +89 -0
- package/src/react/EphiaAuto.tsx +87 -0
- package/src/react/components/EphiaDictationButton.tsx +88 -0
- package/src/react/components/EphiaStatusBar.tsx +59 -0
- package/src/react/components/EphiaTextarea.tsx +295 -0
- package/src/react/ephia-react.css +318 -0
- package/src/react/hooks/targets/index.ts +3 -0
- package/src/react/hooks/targets/useEphiaCodemirror.ts +35 -0
- package/src/react/hooks/targets/useEphiaMonaco.ts +35 -0
- package/src/react/hooks/targets/useEphiaTiptap.ts +23 -0
- package/src/react/hooks/useEphia.lifecycle.test.tsx +389 -0
- package/src/react/hooks/useEphia.ts +367 -0
- package/src/react/hooks/useEphiaDiscardTarget.ts +53 -0
- package/src/react/hooks/useEphiaServerEvent.ts +33 -0
- package/src/react/hooks/useEphiaTarget.ts +47 -0
- package/src/react/hooks/useEphiaTranscript.ts +22 -0
- package/src/react/index.ts +58 -0
- package/src/react/provider/EphiaContext.ts +63 -0
- package/src/react/provider/EphiaInternalContext.ts +32 -0
- package/src/react/provider/EphiaProvider.tsx +373 -0
- package/src/react/registry/binding-factory.ts +7 -0
- package/src/react/registry/detect-editor-type.ts +2 -0
- package/src/react/registry/events.ts +37 -0
- package/src/react/registry/registries/CodeMirrorInstanceRegistry.ts +24 -0
- package/src/react/registry/registries/MonacoInstanceRegistry.ts +23 -0
- package/src/react/registry/registries/TargetRegistry.ts +327 -0
- package/src/react/registry/registries/TiptapInstanceRegistry.ts +43 -0
- package/src/react/registry/registries/index.ts +5 -0
- package/src/react/store/create-ephia-store.ts +36 -0
- package/src/react/store/types.ts +41 -0
- package/src/react/utils/flash-range.ts +24 -0
- package/src/react/utils/index.ts +1 -0
- package/src/rich-editor/adapters/tiptap.test.ts +86 -0
- package/src/rich-editor/adapters/tiptap.ts +23 -0
- package/src/rich-editor/index.ts +3 -0
- package/src/rich-editor/types.ts +24 -0
- package/src/rich-editor/use-ephia-rich-editor.test.tsx +202 -0
- package/src/rich-editor/use-ephia-rich-editor.ts +47 -0
- package/src/shared/config/endpoint.test.ts +45 -0
- package/src/shared/config/endpoint.ts +39 -0
- package/src/shared/config/schema.ts +32 -0
- package/src/shared/effective-text.ts +13 -0
- package/src/shared/errors/EphiaSdkError.ts +54 -0
- package/src/shared/errors/messages.ts +40 -0
- package/src/shared/index.ts +27 -0
- package/src/shared/state/audio-state.ts +45 -0
- package/src/shared/state/index.ts +2 -0
- package/src/shared/store/document-store.ts +32 -0
- package/src/shared/store/index.ts +2 -0
- package/src/shared/types/editors.ts +28 -0
- package/src/shared/types/session.ts +12 -0
- package/src/style.css +2 -0
- package/src/testing/index.tsx +60 -0
- package/src/ui/assets/ephia-logo.svg +4 -0
- package/src/ui/components/EphiaLogo.tsx +77 -0
- package/src/ui/index.ts +24 -0
- package/src/ui/primitives/Button.tsx +53 -0
- package/src/ui/primitives/Spinner.tsx +21 -0
- package/src/ui/primitives/index.ts +5 -0
- package/src/ui/recorder/EphiaFloatingButton.tsx +489 -0
- package/src/ui/recorder/MinimalProcessingBars.tsx +122 -0
- package/src/ui/recorder/StandardIntensityVisualizer.tsx +148 -0
- package/src/ui/recorder/appearance.ts +9 -0
- package/src/ui/recorder/index.ts +8 -0
- package/src/ui/theme.css +775 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export { E as EphiaAuto, a as EphiaDictationButton, b as EphiaProvider, c as EphiaProviderProps, d as EphiaStatusBar, e as EphiaTextarea, q as UseEphiaNativeTargetOptions, U as UseEphiaReturn, r as UseEphiaTargetOptions, u as useEphia, f as useEphiaAudioLevel, g as useEphiaConnection, h as useEphiaError, i as useEphiaNativeTarget, j as useEphiaPartial, k as useEphiaSpeaking, l as useEphiaStatus, m as useEphiaTarget, n as useEphiaTiptap, o as useOptionalEphiaConnection, p as useOptionalEphiaStatus } from '../EphiaTextarea-B4_CAVUg.js';
|
|
2
|
+
export { E as EphiaStartResult } from '../client-options-Uo6jXO8k.js';
|
|
3
|
+
import { EphiaServerEvent } from 'ephia-protocol';
|
|
4
|
+
export { E as EphiaV2CommittedMark, a as EphiaV2PreviewMark } from '../TiptapBinding-B-agfV2H.js';
|
|
5
|
+
export { E as EphiaSpeechMikeAction, a as EphiaSpeechMikeAudioStatus, b as EphiaSpeechMikeButton, e as EphiaSpeechMikeDeviceInfo, f as EphiaSpeechMikeError, g as EphiaSpeechMikeHidStatus, h as EphiaSpeechMikeLedIntent, i as EphiaSpeechMikeProvider, j as EphiaSpeechMikeProviderProps, k as EphiaSpeechMikeState, l as EphiaSpeechMikeStatus, u as useEphiaSpeechMike } from '../useEphiaSpeechMike-CjD7DWnh.js';
|
|
6
|
+
export { E as EphiaStatus } from '../types-D5SXPSwR.js';
|
|
7
|
+
import 'react/jsx-runtime';
|
|
8
|
+
import 'react';
|
|
9
|
+
import '../connection-state-Bk33YprE.js';
|
|
10
|
+
import '../Transport-zdeA4Pou.js';
|
|
11
|
+
import '../audio-state-kZ3KSvux.js';
|
|
12
|
+
import '@tiptap/core';
|
|
13
|
+
import '../session-APaXR48R.js';
|
|
14
|
+
import '../EphiaBinding-BvRmlqqC.js';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Subscribe to a specific server event emitted by the underlying SDK client.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* useEphiaServerEvent("segment.operation", (event) => {
|
|
21
|
+
* console.log("segment", event.payload.segmentId, event.payload.text);
|
|
22
|
+
* });
|
|
23
|
+
*/
|
|
24
|
+
declare function useEphiaServerEvent<T extends EphiaServerEvent["type"]>(type: T, handler: (event: Extract<EphiaServerEvent, {
|
|
25
|
+
type: T;
|
|
26
|
+
}>) => void): void;
|
|
27
|
+
|
|
28
|
+
interface UseEphiaDiscardTargetOptions {
|
|
29
|
+
enabled?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Enregistre une cible no-op (segments ignorés côté éditeur).
|
|
33
|
+
* Utile en mode « event-only » : l'app affiche le transcript via useEphiaServerEvent
|
|
34
|
+
* sans textarea/TipTap, mais le backend route quand même vers un targetId.
|
|
35
|
+
*/
|
|
36
|
+
declare function useEphiaDiscardTarget(id: string, options?: UseEphiaDiscardTargetOptions): void;
|
|
37
|
+
|
|
38
|
+
export { type UseEphiaDiscardTargetOptions, useEphiaDiscardTarget, useEphiaServerEvent };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EphiaAuto,
|
|
3
|
+
EphiaDictationButton,
|
|
4
|
+
EphiaStatusBar,
|
|
5
|
+
EphiaTextarea,
|
|
6
|
+
useEphiaDiscardTarget,
|
|
7
|
+
useEphiaNativeTarget,
|
|
8
|
+
useEphiaServerEvent,
|
|
9
|
+
useEphiaTarget,
|
|
10
|
+
useEphiaTiptap
|
|
11
|
+
} from "../chunk-EMOEAPVU.js";
|
|
12
|
+
import {
|
|
13
|
+
EphiaSpeechMikeProvider,
|
|
14
|
+
useEphiaSpeechMike
|
|
15
|
+
} from "../chunk-3LXZODL4.js";
|
|
16
|
+
import {
|
|
17
|
+
EphiaProvider,
|
|
18
|
+
useEphia,
|
|
19
|
+
useEphiaAudioLevel,
|
|
20
|
+
useEphiaConnection,
|
|
21
|
+
useEphiaError,
|
|
22
|
+
useEphiaPartial,
|
|
23
|
+
useEphiaSpeaking,
|
|
24
|
+
useEphiaStatus,
|
|
25
|
+
useOptionalEphiaConnection,
|
|
26
|
+
useOptionalEphiaStatus
|
|
27
|
+
} from "../chunk-ITJFN3VM.js";
|
|
28
|
+
import "../chunk-IDC7FHIZ.js";
|
|
29
|
+
import "../chunk-5IK5TLSK.js";
|
|
30
|
+
import "../chunk-RFQRV7ML.js";
|
|
31
|
+
import "../chunk-A5UEXJ5R.js";
|
|
32
|
+
import "../chunk-DIEWY3IT.js";
|
|
33
|
+
import "../chunk-PSYX674B.js";
|
|
34
|
+
import "../chunk-EGIAN7FH.js";
|
|
35
|
+
import "../chunk-LXMCRXXF.js";
|
|
36
|
+
import "../chunk-N7U5M3VZ.js";
|
|
37
|
+
import "../chunk-AEE554FT.js";
|
|
38
|
+
import "../chunk-THNHRV2B.js";
|
|
39
|
+
import "../chunk-K24GNU27.js";
|
|
40
|
+
import {
|
|
41
|
+
EphiaV2CommittedMark,
|
|
42
|
+
EphiaV2PreviewMark
|
|
43
|
+
} from "../chunk-W2ZP674X.js";
|
|
44
|
+
import "../chunk-VSLGR64U.js";
|
|
45
|
+
export {
|
|
46
|
+
EphiaAuto,
|
|
47
|
+
EphiaDictationButton,
|
|
48
|
+
EphiaProvider,
|
|
49
|
+
EphiaSpeechMikeProvider,
|
|
50
|
+
EphiaStatusBar,
|
|
51
|
+
EphiaTextarea,
|
|
52
|
+
EphiaV2CommittedMark,
|
|
53
|
+
EphiaV2PreviewMark,
|
|
54
|
+
useEphia,
|
|
55
|
+
useEphiaAudioLevel,
|
|
56
|
+
useEphiaConnection,
|
|
57
|
+
useEphiaDiscardTarget,
|
|
58
|
+
useEphiaError,
|
|
59
|
+
useEphiaNativeTarget,
|
|
60
|
+
useEphiaPartial,
|
|
61
|
+
useEphiaServerEvent,
|
|
62
|
+
useEphiaSpeaking,
|
|
63
|
+
useEphiaSpeechMike,
|
|
64
|
+
useEphiaStatus,
|
|
65
|
+
useEphiaTarget,
|
|
66
|
+
useEphiaTiptap,
|
|
67
|
+
useOptionalEphiaConnection,
|
|
68
|
+
useOptionalEphiaStatus
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { E as EphiaBinding } from '../EphiaBinding-BvRmlqqC.js';
|
|
2
|
+
import { Editor } from '@tiptap/core';
|
|
3
|
+
import 'ephia-protocol';
|
|
4
|
+
|
|
5
|
+
interface EphiaRichEditorAdapter {
|
|
6
|
+
kind: string;
|
|
7
|
+
/**
|
|
8
|
+
* Stable identity for this editor instance across React renders.
|
|
9
|
+
* Official adapters always provide this. Custom adapters should too.
|
|
10
|
+
* When present, useEphiaRichEditor depends on this instead of the adapter object,
|
|
11
|
+
* making the hook safe against inline adapter creation (e.g. without useMemo).
|
|
12
|
+
*/
|
|
13
|
+
identity?: object;
|
|
14
|
+
createBinding(options: {
|
|
15
|
+
targetId: string;
|
|
16
|
+
label?: string;
|
|
17
|
+
}): EphiaBinding;
|
|
18
|
+
getElement?(): HTMLElement | null;
|
|
19
|
+
}
|
|
20
|
+
interface UseEphiaRichEditorOptions {
|
|
21
|
+
id: string;
|
|
22
|
+
mode?: string;
|
|
23
|
+
label?: string;
|
|
24
|
+
enabled?: boolean;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Registers a rich text editor via an adapter as a V2 Ephia target.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* const ephiaRef = useEphiaRichEditor(
|
|
32
|
+
* createTiptapEphiaAdapter(editor),
|
|
33
|
+
* { id: "report", label: "Compte rendu" },
|
|
34
|
+
* );
|
|
35
|
+
*
|
|
36
|
+
* return (
|
|
37
|
+
* <div ref={ephiaRef}>
|
|
38
|
+
* <EditorContent editor={editor} />
|
|
39
|
+
* </div>
|
|
40
|
+
* );
|
|
41
|
+
*/
|
|
42
|
+
declare function useEphiaRichEditor(adapter: EphiaRichEditorAdapter | null, options: UseEphiaRichEditorOptions): React.RefObject<HTMLDivElement | null>;
|
|
43
|
+
|
|
44
|
+
declare function createTiptapEphiaAdapter(editor: Editor | null): EphiaRichEditorAdapter | null;
|
|
45
|
+
|
|
46
|
+
export { type EphiaRichEditorAdapter, type UseEphiaRichEditorOptions, createTiptapEphiaAdapter, useEphiaRichEditor };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createTiptapEphiaAdapter,
|
|
3
|
+
useEphiaRichEditor
|
|
4
|
+
} from "../chunk-AEE554FT.js";
|
|
5
|
+
import "../chunk-THNHRV2B.js";
|
|
6
|
+
import "../chunk-K24GNU27.js";
|
|
7
|
+
import "../chunk-W2ZP674X.js";
|
|
8
|
+
import "../chunk-VSLGR64U.js";
|
|
9
|
+
export {
|
|
10
|
+
createTiptapEphiaAdapter,
|
|
11
|
+
useEphiaRichEditor
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
type EphiaLang = "fr" | "en";
|
|
4
|
+
declare function getMessage(code: string, lang?: EphiaLang): string;
|
|
5
|
+
|
|
6
|
+
/** URL API Ephia par défaut (production). */
|
|
7
|
+
declare const DEFAULT_EPHIA_SDK_API_URL = "https://api.ephia.app";
|
|
8
|
+
/**
|
|
9
|
+
* Résout l'URL API utilisée par le SDK.
|
|
10
|
+
*
|
|
11
|
+
* Priorité :
|
|
12
|
+
* 1. `apiUrl` explicite (ex. localhost en dev)
|
|
13
|
+
* 2. `EPHIA_SDK_ENDPOINT` ou `NEXT_PUBLIC_EPHIA_SDK_ENDPOINT`
|
|
14
|
+
* 3. {@link DEFAULT_EPHIA_SDK_API_URL}
|
|
15
|
+
*/
|
|
16
|
+
declare function resolveEphiaSdkApiUrl(explicitApiUrl?: string | null): string;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Schéma Zod de validation de la configuration du SDK.
|
|
20
|
+
* SSR-safe : pas de z.instanceof(Element) qui plante en Node/SSR.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
declare const ephiaSessionOptionsSchema: z.ZodObject<{
|
|
24
|
+
language: z.ZodOptional<z.ZodEnum<["fr", "en"]>>;
|
|
25
|
+
mode: z.ZodOptional<z.ZodEnum<["fast_xs", "fast_s", "smart_xs", "smart_s"]>>;
|
|
26
|
+
debugChunks: z.ZodOptional<z.ZodBoolean>;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
mode?: "fast_xs" | "fast_s" | "smart_xs" | "smart_s" | undefined;
|
|
29
|
+
language?: "fr" | "en" | undefined;
|
|
30
|
+
debugChunks?: boolean | undefined;
|
|
31
|
+
}, {
|
|
32
|
+
mode?: "fast_xs" | "fast_s" | "smart_xs" | "smart_s" | undefined;
|
|
33
|
+
language?: "fr" | "en" | undefined;
|
|
34
|
+
debugChunks?: boolean | undefined;
|
|
35
|
+
}>;
|
|
36
|
+
declare const ephiaClientConfigSchema: z.ZodObject<{
|
|
37
|
+
apiUrl: z.ZodString;
|
|
38
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
39
|
+
bearerToken: z.ZodOptional<z.ZodString>;
|
|
40
|
+
clientType: z.ZodOptional<z.ZodString>;
|
|
41
|
+
session: z.ZodOptional<z.ZodObject<{
|
|
42
|
+
language: z.ZodOptional<z.ZodEnum<["fr", "en"]>>;
|
|
43
|
+
mode: z.ZodOptional<z.ZodEnum<["fast_xs", "fast_s", "smart_xs", "smart_s"]>>;
|
|
44
|
+
debugChunks: z.ZodOptional<z.ZodBoolean>;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
mode?: "fast_xs" | "fast_s" | "smart_xs" | "smart_s" | undefined;
|
|
47
|
+
language?: "fr" | "en" | undefined;
|
|
48
|
+
debugChunks?: boolean | undefined;
|
|
49
|
+
}, {
|
|
50
|
+
mode?: "fast_xs" | "fast_s" | "smart_xs" | "smart_s" | undefined;
|
|
51
|
+
language?: "fr" | "en" | undefined;
|
|
52
|
+
debugChunks?: boolean | undefined;
|
|
53
|
+
}>>;
|
|
54
|
+
debug: z.ZodOptional<z.ZodBoolean>;
|
|
55
|
+
noiseFilter: z.ZodOptional<z.ZodBoolean>;
|
|
56
|
+
target: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<Element, z.ZodTypeDef, Element>, z.ZodNull]>>;
|
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
|
58
|
+
apiUrl: string;
|
|
59
|
+
target?: string | Element | null | undefined;
|
|
60
|
+
debug?: boolean | undefined;
|
|
61
|
+
clientType?: string | undefined;
|
|
62
|
+
apiKey?: string | undefined;
|
|
63
|
+
bearerToken?: string | undefined;
|
|
64
|
+
session?: {
|
|
65
|
+
mode?: "fast_xs" | "fast_s" | "smart_xs" | "smart_s" | undefined;
|
|
66
|
+
language?: "fr" | "en" | undefined;
|
|
67
|
+
debugChunks?: boolean | undefined;
|
|
68
|
+
} | undefined;
|
|
69
|
+
noiseFilter?: boolean | undefined;
|
|
70
|
+
}, {
|
|
71
|
+
apiUrl: string;
|
|
72
|
+
target?: string | Element | null | undefined;
|
|
73
|
+
debug?: boolean | undefined;
|
|
74
|
+
clientType?: string | undefined;
|
|
75
|
+
apiKey?: string | undefined;
|
|
76
|
+
bearerToken?: string | undefined;
|
|
77
|
+
session?: {
|
|
78
|
+
mode?: "fast_xs" | "fast_s" | "smart_xs" | "smart_s" | undefined;
|
|
79
|
+
language?: "fr" | "en" | undefined;
|
|
80
|
+
debugChunks?: boolean | undefined;
|
|
81
|
+
} | undefined;
|
|
82
|
+
noiseFilter?: boolean | undefined;
|
|
83
|
+
}>;
|
|
84
|
+
type EphiaClientConfig = z.infer<typeof ephiaClientConfigSchema>;
|
|
85
|
+
type EphiaSessionOptionsConfig = z.infer<typeof ephiaSessionOptionsSchema>;
|
|
86
|
+
|
|
87
|
+
export { DEFAULT_EPHIA_SDK_API_URL as D, type EphiaClientConfig as E, type EphiaLang as a, type EphiaSessionOptionsConfig as b, ephiaSessionOptionsSchema as c, ephiaClientConfigSchema as e, getMessage as g, resolveEphiaSdkApiUrl as r };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types pour la configuration d'une session de transcription.
|
|
3
|
+
*/
|
|
4
|
+
type Mode = "fast_xs" | "fast_s" | "smart_xs" | "smart_s";
|
|
5
|
+
type EphiaSessionOptions = {
|
|
6
|
+
language?: string;
|
|
7
|
+
/** Mode global : fast_xs | fast_s | smart_xs | smart_s */
|
|
8
|
+
mode?: Mode;
|
|
9
|
+
debugChunks?: boolean;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export type { EphiaSessionOptions as E, Mode as M };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { E as EphiaAudioPermission, a as EphiaAudioState, b as EphiaSdkError, c as EphiaSdkErrorCode, i as initialAudioState } from '../audio-state-kZ3KSvux.js';
|
|
2
|
+
export { D as DEFAULT_EPHIA_SDK_API_URL, E as EphiaClientConfig, a as EphiaLang, b as EphiaSessionOptionsConfig, e as ephiaClientConfigSchema, c as ephiaSessionOptionsSchema, g as getMessage, r as resolveEphiaSdkApiUrl } from '../schema-B2ycPlNB.js';
|
|
3
|
+
export { E as EphiaSessionOptions, M as Mode } from '../session-APaXR48R.js';
|
|
4
|
+
import 'zod';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Returns the text to apply to DOM/state after a finalized or committed
|
|
8
|
+
* transcript event. An empty delta is intentional and must not fall back to
|
|
9
|
+
* the raw provider text.
|
|
10
|
+
*/
|
|
11
|
+
declare function pickEffectiveText(payload: {
|
|
12
|
+
text: string;
|
|
13
|
+
delta?: string | null;
|
|
14
|
+
}): string;
|
|
15
|
+
|
|
16
|
+
export { pickEffectiveText };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import "../chunk-35AJK2IO.js";
|
|
2
|
+
import {
|
|
3
|
+
pickEffectiveText
|
|
4
|
+
} from "../chunk-7E43RY75.js";
|
|
5
|
+
import {
|
|
6
|
+
ephiaClientConfigSchema,
|
|
7
|
+
ephiaSessionOptionsSchema,
|
|
8
|
+
getMessage
|
|
9
|
+
} from "../chunk-5IK5TLSK.js";
|
|
10
|
+
import {
|
|
11
|
+
DEFAULT_EPHIA_SDK_API_URL,
|
|
12
|
+
resolveEphiaSdkApiUrl
|
|
13
|
+
} from "../chunk-PSYX674B.js";
|
|
14
|
+
import {
|
|
15
|
+
initialAudioState
|
|
16
|
+
} from "../chunk-EGIAN7FH.js";
|
|
17
|
+
import {
|
|
18
|
+
EphiaSdkError
|
|
19
|
+
} from "../chunk-N7U5M3VZ.js";
|
|
20
|
+
export {
|
|
21
|
+
DEFAULT_EPHIA_SDK_API_URL,
|
|
22
|
+
EphiaSdkError,
|
|
23
|
+
ephiaClientConfigSchema,
|
|
24
|
+
ephiaSessionOptionsSchema,
|
|
25
|
+
getMessage,
|
|
26
|
+
initialAudioState,
|
|
27
|
+
pickEffectiveText,
|
|
28
|
+
resolveEphiaSdkApiUrl
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|