@liforma/client 0.4.0 → 0.4.2
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/CHANGELOG.md +21 -0
- package/dist/next/index.js +1101 -4239
- package/dist/next/index.js.map +1 -1
- package/dist/next/next/createLiformaSessionRouteHandler.d.ts +3 -2
- package/dist/next/next/createLiformaSessionRouteHandler.d.ts.map +1 -1
- package/dist/next/react/ExperienceThumbnail.d.ts +1 -0
- package/dist/next/react/ExperienceThumbnail.d.ts.map +1 -1
- package/dist/next/thumbnail/styles.d.ts.map +1 -1
- package/dist/next/thumbnail/toGalleryThumbUrl.d.ts.map +1 -1
- package/dist/next/thumbnail/types.d.ts +2 -0
- package/dist/next/thumbnail/types.d.ts.map +1 -1
- package/dist/next/v2/api/mintPublicSession.d.ts +23 -17
- package/dist/next/v2/api/mintPublicSession.d.ts.map +1 -1
- package/dist/next/v2/api/sessionEndpointRequest.d.ts +10 -5
- package/dist/next/v2/api/sessionEndpointRequest.d.ts.map +1 -1
- package/dist/next/v2/embed/iframeHost.d.ts +8 -2
- package/dist/next/v2/embed/iframeHost.d.ts.map +1 -1
- package/dist/next/v2/embed/protocol.d.ts +20 -0
- package/dist/next/v2/embed/protocol.d.ts.map +1 -1
- package/dist/next/v2/errors/LiformaError.d.ts +23 -0
- package/dist/next/v2/errors/LiformaError.d.ts.map +1 -0
- package/dist/next/v2/experience.d.ts +59 -53
- package/dist/next/v2/experience.d.ts.map +1 -1
- package/dist/next/v2/experienceEvents.d.ts +22 -13
- package/dist/next/v2/experienceEvents.d.ts.map +1 -1
- package/dist/next/v2/types/sessionLaunch.d.ts +66 -0
- package/dist/next/v2/types/sessionLaunch.d.ts.map +1 -0
- package/dist/next/v2/types/sessionManifest.d.ts +8 -0
- package/dist/next/v2/types/sessionManifest.d.ts.map +1 -1
- package/dist/next/widget/mountExperienceWidget.d.ts.map +1 -1
- package/dist/next/widget/types.d.ts +6 -1
- package/dist/next/widget/types.d.ts.map +1 -1
- package/dist/npm/index.js +951 -4090
- package/dist/npm/index.js.map +1 -1
- package/dist/npm/thumbnail/styles.d.ts.map +1 -1
- package/dist/npm/thumbnail/toGalleryThumbUrl.d.ts.map +1 -1
- package/dist/npm/thumbnail/types.d.ts +2 -0
- package/dist/npm/thumbnail/types.d.ts.map +1 -1
- package/dist/npm/v2/api/mintPublicSession.d.ts +23 -17
- package/dist/npm/v2/api/mintPublicSession.d.ts.map +1 -1
- package/dist/npm/v2/api/sessionEndpointRequest.d.ts +10 -5
- package/dist/npm/v2/api/sessionEndpointRequest.d.ts.map +1 -1
- package/dist/npm/v2/embed/iframeHost.d.ts +8 -2
- package/dist/npm/v2/embed/iframeHost.d.ts.map +1 -1
- package/dist/npm/v2/embed/protocol.d.ts +20 -0
- package/dist/npm/v2/embed/protocol.d.ts.map +1 -1
- package/dist/npm/v2/errors/LiformaError.d.ts +23 -0
- package/dist/npm/v2/errors/LiformaError.d.ts.map +1 -0
- package/dist/npm/v2/experience.d.ts +59 -53
- package/dist/npm/v2/experience.d.ts.map +1 -1
- package/dist/npm/v2/experienceEvents.d.ts +22 -13
- package/dist/npm/v2/experienceEvents.d.ts.map +1 -1
- package/dist/npm/v2/index.d.ts +4 -1
- package/dist/npm/v2/index.d.ts.map +1 -1
- package/dist/npm/v2/liforma-experience-thumbnail.d.ts.map +1 -1
- package/dist/npm/v2/liforma-experience-widget.d.ts.map +1 -1
- package/dist/npm/v2/liforma-experience.d.ts.map +1 -1
- package/dist/npm/v2/npm.d.ts +5 -2
- package/dist/npm/v2/npm.d.ts.map +1 -1
- package/dist/npm/v2/types/index.d.ts +2 -0
- package/dist/npm/v2/types/index.d.ts.map +1 -1
- package/dist/npm/v2/types/sessionLaunch.d.ts +66 -0
- package/dist/npm/v2/types/sessionLaunch.d.ts.map +1 -0
- package/dist/npm/v2/types/sessionManifest.d.ts +8 -0
- package/dist/npm/v2/types/sessionManifest.d.ts.map +1 -1
- package/dist/npm/v2/types/sessionManifestSchema.d.ts +7 -0
- package/dist/npm/v2/types/sessionManifestSchema.d.ts.map +1 -1
- package/dist/npm/widget/mountExperienceWidget.d.ts.map +1 -1
- package/dist/npm/widget/types.d.ts +6 -1
- package/dist/npm/widget/types.d.ts.map +1 -1
- package/dist/react/component/experienceComponentLaunch.d.ts +1 -0
- package/dist/react/component/experienceComponentLaunch.d.ts.map +1 -1
- package/dist/react/component/experienceComponentRuntime.d.ts +10 -2
- package/dist/react/component/experienceComponentRuntime.d.ts.map +1 -1
- package/dist/react/component/experienceComponentTypes.d.ts +24 -13
- package/dist/react/component/experienceComponentTypes.d.ts.map +1 -1
- package/dist/react/index.js +1251 -4378
- package/dist/react/index.js.map +1 -1
- package/dist/react/react/Experience.d.ts.map +1 -1
- package/dist/react/react/ExperienceThumbnail.d.ts +1 -0
- package/dist/react/react/ExperienceThumbnail.d.ts.map +1 -1
- package/dist/react/thumbnail/styles.d.ts.map +1 -1
- package/dist/react/thumbnail/toGalleryThumbUrl.d.ts.map +1 -1
- package/dist/react/thumbnail/types.d.ts +2 -0
- package/dist/react/thumbnail/types.d.ts.map +1 -1
- package/dist/react/v2/api/mintPublicSession.d.ts +23 -17
- package/dist/react/v2/api/mintPublicSession.d.ts.map +1 -1
- package/dist/react/v2/api/sessionEndpointRequest.d.ts +10 -5
- package/dist/react/v2/api/sessionEndpointRequest.d.ts.map +1 -1
- package/dist/react/v2/embed/iframeHost.d.ts +8 -2
- package/dist/react/v2/embed/iframeHost.d.ts.map +1 -1
- package/dist/react/v2/embed/protocol.d.ts +20 -0
- package/dist/react/v2/embed/protocol.d.ts.map +1 -1
- package/dist/react/v2/errors/LiformaError.d.ts +23 -0
- package/dist/react/v2/errors/LiformaError.d.ts.map +1 -0
- package/dist/react/v2/experience.d.ts +59 -53
- package/dist/react/v2/experience.d.ts.map +1 -1
- package/dist/react/v2/experienceEvents.d.ts +22 -13
- package/dist/react/v2/experienceEvents.d.ts.map +1 -1
- package/dist/react/v2/types/sessionLaunch.d.ts +66 -0
- package/dist/react/v2/types/sessionLaunch.d.ts.map +1 -0
- package/dist/react/v2/types/sessionManifest.d.ts +8 -0
- package/dist/react/v2/types/sessionManifest.d.ts.map +1 -1
- package/dist/react/widget/mountExperienceWidget.d.ts.map +1 -1
- package/dist/react/widget/types.d.ts +6 -1
- package/dist/react/widget/types.d.ts.map +1 -1
- package/dist/sdk/v2/client.js +36 -76
- package/dist/sdk/v2/client.js.map +1 -1
- package/dist/svelte/Experience.svelte +54 -44
- package/dist/svelte/Experience.svelte.d.ts +2 -1
- package/dist/svelte/ExperienceThumbnail.svelte +8 -1
- package/dist/svelte/ExperienceThumbnail.svelte.d.ts +1 -0
- package/package.json +3 -1
- package/dist/next/v2/speechOnlyManifest.d.ts +0 -7
- package/dist/next/v2/speechOnlyManifest.d.ts.map +0 -1
- package/dist/next/v2/types/sessionManifestSchema.d.ts +0 -183
- package/dist/next/v2/types/sessionManifestSchema.d.ts.map +0 -1
- package/dist/react/v2/speechOnlyManifest.d.ts +0 -7
- package/dist/react/v2/speechOnlyManifest.d.ts.map +0 -1
- package/dist/react/v2/types/sessionManifestSchema.d.ts +0 -183
- package/dist/react/v2/types/sessionManifestSchema.d.ts.map +0 -1
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
type ExperienceEventName,
|
|
12
12
|
type ExperienceSession,
|
|
13
13
|
type ListenOnceOptions,
|
|
14
|
+
type Session,
|
|
14
15
|
type SessionManifest,
|
|
15
16
|
type StartSessionOptions,
|
|
16
17
|
type UtteranceResult
|
|
@@ -47,13 +48,16 @@
|
|
|
47
48
|
let {
|
|
48
49
|
experienceId,
|
|
49
50
|
sessionEndpoint,
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
launch: launchToken,
|
|
52
|
+
session: launchSessionSummary,
|
|
53
|
+
locale,
|
|
54
|
+
secondaryLocale,
|
|
55
|
+
learningLocale,
|
|
52
56
|
language,
|
|
53
57
|
mode,
|
|
54
|
-
responseMode,
|
|
55
58
|
speechInputMode,
|
|
56
59
|
startButton,
|
|
60
|
+
closeButton,
|
|
57
61
|
conversationProcessor,
|
|
58
62
|
speechOnly = false,
|
|
59
63
|
fit,
|
|
@@ -72,8 +76,9 @@
|
|
|
72
76
|
onConversationUpdate,
|
|
73
77
|
onMessage,
|
|
74
78
|
onListeningState,
|
|
75
|
-
|
|
79
|
+
onActivityChange,
|
|
76
80
|
onConversationProcessorError,
|
|
81
|
+
onPlayerStatusChange,
|
|
77
82
|
onStateUpdate,
|
|
78
83
|
onClose,
|
|
79
84
|
onError
|
|
@@ -87,21 +92,18 @@
|
|
|
87
92
|
let activeGeneration: Generation | null = null;
|
|
88
93
|
const launchIdentities = new WeakMap<object, number>();
|
|
89
94
|
|
|
90
|
-
const startButtonKey = $derived(stableSerialize(startButton));
|
|
91
95
|
const launchKey = $derived(
|
|
92
96
|
stableSerialize([
|
|
93
97
|
experienceId,
|
|
94
98
|
sessionEndpoint,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
language,
|
|
99
|
+
launchToken,
|
|
100
|
+
launchSessionSummary ? identityKey(launchSessionSummary) : 0,
|
|
101
|
+
locale ?? language,
|
|
102
|
+
secondaryLocale ?? learningLocale,
|
|
98
103
|
mode,
|
|
99
|
-
responseMode,
|
|
100
104
|
speechInputMode,
|
|
101
|
-
startButtonKey,
|
|
102
105
|
conversationProcessor ? identityKey(conversationProcessor) : 0,
|
|
103
106
|
speechOnly,
|
|
104
|
-
fit,
|
|
105
107
|
avatarId,
|
|
106
108
|
locationId,
|
|
107
109
|
embedBaseUrl,
|
|
@@ -190,12 +192,10 @@
|
|
|
190
192
|
const id = (options as { readonly experienceId?: string }).experienceId;
|
|
191
193
|
if (typeof id === 'string' && id.trim()) return id;
|
|
192
194
|
}
|
|
193
|
-
if ('
|
|
194
|
-
const
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
if (typeof id === 'string' && id.trim()) return id;
|
|
198
|
-
}
|
|
195
|
+
if ('session' in options) {
|
|
196
|
+
const id = (options as { readonly session?: { readonly experienceId?: unknown } }).session
|
|
197
|
+
?.experienceId;
|
|
198
|
+
if (typeof id === 'string' && id.trim()) return id;
|
|
199
199
|
}
|
|
200
200
|
return experienceId?.trim() || undefined;
|
|
201
201
|
}
|
|
@@ -268,7 +268,7 @@
|
|
|
268
268
|
);
|
|
269
269
|
subscribe(generation, session, 'message', (event) => onMessage?.(event));
|
|
270
270
|
subscribe(generation, session, 'listeningState', (event) => onListeningState?.(event));
|
|
271
|
-
subscribe(generation, session, '
|
|
271
|
+
subscribe(generation, session, 'activityChange', (event) => onActivityChange?.(event));
|
|
272
272
|
subscribe(generation, session, 'conversationProcessorError', (event) =>
|
|
273
273
|
onConversationProcessorError?.(event)
|
|
274
274
|
);
|
|
@@ -276,61 +276,60 @@
|
|
|
276
276
|
|
|
277
277
|
function buildStartOptions(): StartSessionOptions {
|
|
278
278
|
const hasSessionEndpoint = Boolean(sessionEndpoint?.trim());
|
|
279
|
+
const hasLaunch = Boolean(launchToken?.trim());
|
|
279
280
|
if (hasSessionEndpoint && !experienceId?.trim()) {
|
|
280
281
|
throw new Error('sessionEndpoint requires experienceId.');
|
|
281
282
|
}
|
|
282
|
-
if (!hasSessionEndpoint && !
|
|
283
|
-
throw new Error('Experience requires experienceId or
|
|
283
|
+
if (!hasSessionEndpoint && !hasLaunch && !experienceId) {
|
|
284
|
+
throw new Error('Experience requires experienceId, sessionEndpoint, or launch.');
|
|
284
285
|
}
|
|
285
286
|
|
|
287
|
+
if (hasLaunch && launchToken) {
|
|
288
|
+
return {
|
|
289
|
+
launch: launchToken,
|
|
290
|
+
session: launchSessionSummary,
|
|
291
|
+
embedBaseUrl,
|
|
292
|
+
debug,
|
|
293
|
+
speechOnly,
|
|
294
|
+
conversationProcessor
|
|
295
|
+
};
|
|
296
|
+
}
|
|
286
297
|
if (hasSessionEndpoint && experienceId && sessionEndpoint) {
|
|
287
298
|
return {
|
|
288
299
|
experienceId,
|
|
289
300
|
sessionEndpoint,
|
|
301
|
+
locale,
|
|
302
|
+
secondaryLocale,
|
|
303
|
+
learningLocale,
|
|
290
304
|
language,
|
|
291
305
|
locationId,
|
|
292
306
|
avatarId,
|
|
293
307
|
embedBaseUrl,
|
|
294
308
|
debug,
|
|
295
309
|
mode,
|
|
296
|
-
responseMode,
|
|
297
310
|
speechInputMode,
|
|
298
311
|
speechOnly,
|
|
299
|
-
fit,
|
|
300
|
-
startButton: untrack(() => startButton),
|
|
301
|
-
conversationProcessor
|
|
302
|
-
};
|
|
303
|
-
}
|
|
304
|
-
if (manifest) {
|
|
305
|
-
return {
|
|
306
|
-
manifest,
|
|
307
|
-
acceptCredentialExposure,
|
|
308
|
-
embedBaseUrl,
|
|
309
|
-
debug,
|
|
310
|
-
speechOnly,
|
|
311
|
-
fit,
|
|
312
|
-
startButton: untrack(() => startButton),
|
|
313
312
|
conversationProcessor
|
|
314
313
|
};
|
|
315
314
|
}
|
|
316
315
|
if (experienceId) {
|
|
317
316
|
return {
|
|
318
317
|
experienceId,
|
|
318
|
+
locale,
|
|
319
|
+
secondaryLocale,
|
|
320
|
+
learningLocale,
|
|
319
321
|
language,
|
|
320
322
|
locationId,
|
|
321
323
|
avatarId,
|
|
322
324
|
embedBaseUrl,
|
|
323
325
|
debug,
|
|
324
326
|
mode,
|
|
325
|
-
responseMode,
|
|
326
327
|
speechInputMode,
|
|
327
328
|
speechOnly,
|
|
328
|
-
fit,
|
|
329
|
-
startButton: untrack(() => startButton),
|
|
330
329
|
conversationProcessor
|
|
331
330
|
};
|
|
332
331
|
}
|
|
333
|
-
throw new Error('Experience requires experienceId or
|
|
332
|
+
throw new Error('Experience requires experienceId, sessionEndpoint, or launch.');
|
|
334
333
|
}
|
|
335
334
|
|
|
336
335
|
function snapshotLaunch(): LaunchSnapshot {
|
|
@@ -341,7 +340,7 @@
|
|
|
341
340
|
}
|
|
342
341
|
}
|
|
343
342
|
|
|
344
|
-
async function
|
|
343
|
+
async function runLaunch(
|
|
345
344
|
generation: Generation,
|
|
346
345
|
container: HTMLDivElement,
|
|
347
346
|
options: StartSessionOptions
|
|
@@ -357,9 +356,15 @@
|
|
|
357
356
|
subscribeToEvents(generation, session);
|
|
358
357
|
const player = await session.attach({
|
|
359
358
|
container,
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
359
|
+
fit: untrack(() => fit),
|
|
360
|
+
startButton: untrack(() => startButton),
|
|
361
|
+
closeButton: untrack(() => closeButton),
|
|
362
|
+
returnUrl: untrack(() => returnUrl),
|
|
363
|
+
showClose: Boolean(onClose || returnUrl?.trim() || closeButton),
|
|
364
|
+
onPlayerStatusChange: (state: EmbedState) => {
|
|
365
|
+
if (generation.destroyed) return;
|
|
366
|
+
onPlayerStatusChange?.(state);
|
|
367
|
+
onStateUpdate?.(state);
|
|
363
368
|
}
|
|
364
369
|
});
|
|
365
370
|
assertCurrent(generation);
|
|
@@ -437,6 +442,11 @@
|
|
|
437
442
|
return withSession((session) => session.listenOnce(options));
|
|
438
443
|
}
|
|
439
444
|
|
|
445
|
+
export function getSession(): Session | null {
|
|
446
|
+
return activeGeneration?.instance?.getSession() ?? null;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/** @deprecated Prefer getSession(). */
|
|
440
450
|
export function getManifest(): SessionManifest | null {
|
|
441
451
|
return activeGeneration?.instance?.getManifest() ?? null;
|
|
442
452
|
}
|
|
@@ -462,7 +472,7 @@
|
|
|
462
472
|
generation.ready.reject(error);
|
|
463
473
|
generation.started.reject(error);
|
|
464
474
|
} else {
|
|
465
|
-
void
|
|
475
|
+
void runLaunch(generation, container, snapshot.options);
|
|
466
476
|
}
|
|
467
477
|
|
|
468
478
|
return () => cancelGeneration(generation);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ExperienceEvents, type ExperienceSession, type ListenOnceOptions, type SessionManifest, type UtteranceResult } from '@liforma/client';
|
|
1
|
+
import { type ExperienceEvents, type ExperienceSession, type ListenOnceOptions, type Session, type SessionManifest, type UtteranceResult } from '@liforma/client';
|
|
2
2
|
import type { ExperienceProps } from './types';
|
|
3
3
|
declare const Experience: import("svelte").Component<ExperienceProps, {
|
|
4
4
|
ready: () => Promise<ExperienceEvents["ready"]>;
|
|
@@ -12,6 +12,7 @@ declare const Experience: import("svelte").Component<ExperienceProps, {
|
|
|
12
12
|
startListening: () => Promise<void>;
|
|
13
13
|
stopListening: () => Promise<UtteranceResult>;
|
|
14
14
|
listenOnce: (options?: ListenOnceOptions) => Promise<UtteranceResult>;
|
|
15
|
+
getSession: () => Session | null;
|
|
15
16
|
getManifest: () => SessionManifest | null;
|
|
16
17
|
getConversation: () => ReturnType<ExperienceSession["getConversation"]>;
|
|
17
18
|
end: () => Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { onMount } from 'svelte';
|
|
2
|
+
import { onMount, untrack } from 'svelte';
|
|
3
3
|
import type { Attachment } from 'svelte/attachments';
|
|
4
4
|
|
|
5
5
|
import {
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
returnUrl,
|
|
30
30
|
playerBaseUrl,
|
|
31
31
|
parallax = true,
|
|
32
|
+
fit = 'full',
|
|
32
33
|
lazy = true,
|
|
33
34
|
class: className = '',
|
|
34
35
|
fallbackImage
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
returnUrl?: string;
|
|
47
48
|
playerBaseUrl?: string;
|
|
48
49
|
parallax?: boolean;
|
|
50
|
+
fit?: 'full' | 'face';
|
|
49
51
|
lazy?: boolean;
|
|
50
52
|
class?: string;
|
|
51
53
|
fallbackImage?: string;
|
|
@@ -126,6 +128,10 @@
|
|
|
126
128
|
void layers?.backgroundImage;
|
|
127
129
|
void layers?.foregroundImage;
|
|
128
130
|
void resolvedAvatarImage;
|
|
131
|
+
const alreadyShown = untrack(
|
|
132
|
+
() => backgroundReady || avatarReady || foregroundReady
|
|
133
|
+
);
|
|
134
|
+
if (alreadyShown) return;
|
|
129
135
|
backgroundReady = false;
|
|
130
136
|
avatarReady = false;
|
|
131
137
|
foregroundReady = false;
|
|
@@ -257,6 +263,7 @@
|
|
|
257
263
|
[
|
|
258
264
|
'liforma-et',
|
|
259
265
|
hasScene ? 'liforma-et--scene' : '',
|
|
266
|
+
fit === 'face' ? 'liforma-et--fit-face' : '',
|
|
260
267
|
parallaxLayersActive ? 'liforma-et--parallax' : '',
|
|
261
268
|
scrollParallax ? 'liforma-et--scroll-parallax' : '',
|
|
262
269
|
shouldLoad && !revealThumb ? 'liforma-et--loading' : '',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liforma/client",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Liforma browser SDK — Experience sessions, speech API, and Svelte embed component.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -163,6 +163,7 @@
|
|
|
163
163
|
"fetch:lf-sta": "node scripts/fetch-wav2vec-phoneme-ctc.mjs",
|
|
164
164
|
"fetch:supertonic-3": "node scripts/fetch-supertonic-3.mjs",
|
|
165
165
|
"fetch:lf-tts": "node scripts/fetch-supertonic-3.mjs",
|
|
166
|
+
"fetch:lf-t2i-turbo": "python3 ../tools/krea-2-salad/scripts/fetch_cdn_snapshot.py",
|
|
166
167
|
"fetch:models": "npm run fetch:depth-anything-v2 && npm run fetch:video-depth-anything && npm run fetch:depth-pro && npm run fetch:face-landmarker && npm run fetch:anime-face-detector && npm run fetch:face-parsing && npm run fetch:lf-sta && npm run fetch:lf-tts",
|
|
167
168
|
"locations": "npm run catalogue:locations && npm run build:locations",
|
|
168
169
|
"configure:cors": "node scripts/configure-r2-cors.mjs",
|
|
@@ -178,6 +179,7 @@
|
|
|
178
179
|
},
|
|
179
180
|
"devDependencies": {
|
|
180
181
|
"@aws-sdk/client-s3": "^3.1000.0",
|
|
182
|
+
"@aws-sdk/lib-storage": "^3.1110.0",
|
|
181
183
|
"@elevenlabs/client": "^1.17.0",
|
|
182
184
|
"@sveltejs/package": "^2.5.8",
|
|
183
185
|
"@sveltejs/vite-plugin-svelte": "^7.0.0",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { SessionManifest } from './types/sessionManifest';
|
|
2
|
-
/**
|
|
3
|
-
* Strip avatar rendering and location scene assets from a Session Manifest.
|
|
4
|
-
* Used when integrators request voice-only mode without authoring a separate experience.
|
|
5
|
-
*/
|
|
6
|
-
export declare function applySpeechOnlyManifest(manifest: SessionManifest): SessionManifest;
|
|
7
|
-
//# sourceMappingURL=speechOnlyManifest.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"speechOnlyManifest.d.ts","sourceRoot":"","sources":["../../../src/v2/speechOnlyManifest.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAU/D;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,eAAe,GAAG,eAAe,CAiBlF"}
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import type { SessionManifest } from './sessionManifest';
|
|
3
|
-
export declare const sessionManifestSchema: z.ZodObject<{
|
|
4
|
-
schemaVersion: z.ZodLiteral<1>;
|
|
5
|
-
sessionId: z.ZodString;
|
|
6
|
-
experienceId: z.ZodString;
|
|
7
|
-
expiresAt: z.ZodString;
|
|
8
|
-
sessionToken: z.ZodString;
|
|
9
|
-
experience: z.ZodObject<{
|
|
10
|
-
title: z.ZodString;
|
|
11
|
-
slug: z.ZodString;
|
|
12
|
-
mode: z.ZodEnum<{
|
|
13
|
-
conversation: "conversation";
|
|
14
|
-
presenter: "presenter";
|
|
15
|
-
}>;
|
|
16
|
-
responseMode: z.ZodEnum<{
|
|
17
|
-
manual: "manual";
|
|
18
|
-
managed: "managed";
|
|
19
|
-
custom: "custom";
|
|
20
|
-
}>;
|
|
21
|
-
speechInputMode: z.ZodEnum<{
|
|
22
|
-
auto: "auto";
|
|
23
|
-
manual: "manual";
|
|
24
|
-
off: "off";
|
|
25
|
-
}>;
|
|
26
|
-
startButton: z.ZodOptional<z.ZodObject<{
|
|
27
|
-
label: z.ZodOptional<z.ZodString>;
|
|
28
|
-
ariaLabel: z.ZodOptional<z.ZodString>;
|
|
29
|
-
placement: z.ZodOptional<z.ZodEnum<{
|
|
30
|
-
center: "center";
|
|
31
|
-
"bottom-center": "bottom-center";
|
|
32
|
-
"bottom-left": "bottom-left";
|
|
33
|
-
"bottom-right": "bottom-right";
|
|
34
|
-
}>>;
|
|
35
|
-
variant: z.ZodOptional<z.ZodEnum<{
|
|
36
|
-
primary: "primary";
|
|
37
|
-
secondary: "secondary";
|
|
38
|
-
minimal: "minimal";
|
|
39
|
-
}>>;
|
|
40
|
-
appearance: z.ZodOptional<z.ZodObject<{
|
|
41
|
-
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
42
|
-
textColor: z.ZodOptional<z.ZodString>;
|
|
43
|
-
borderColor: z.ZodOptional<z.ZodString>;
|
|
44
|
-
borderRadiusPx: z.ZodOptional<z.ZodNumber>;
|
|
45
|
-
size: z.ZodOptional<z.ZodEnum<{
|
|
46
|
-
small: "small";
|
|
47
|
-
medium: "medium";
|
|
48
|
-
large: "large";
|
|
49
|
-
}>>;
|
|
50
|
-
shadow: z.ZodOptional<z.ZodEnum<{
|
|
51
|
-
strong: "strong";
|
|
52
|
-
none: "none";
|
|
53
|
-
soft: "soft";
|
|
54
|
-
}>>;
|
|
55
|
-
}, z.core.$strip>>;
|
|
56
|
-
}, z.core.$strip>>;
|
|
57
|
-
openingMessage: z.ZodOptional<z.ZodString>;
|
|
58
|
-
}, z.core.$strip>;
|
|
59
|
-
transport: z.ZodObject<{
|
|
60
|
-
type: z.ZodLiteral<"http">;
|
|
61
|
-
config: z.ZodObject<{
|
|
62
|
-
apiBaseUrl: z.ZodString;
|
|
63
|
-
}, z.core.$strip>;
|
|
64
|
-
}, z.core.$strip>;
|
|
65
|
-
runtime: z.ZodObject<{
|
|
66
|
-
cdnBaseUrl: z.ZodString;
|
|
67
|
-
input: z.ZodLiteral<"browserStt">;
|
|
68
|
-
renderer: z.ZodLiteral<"morph2d">;
|
|
69
|
-
}, z.core.$strip>;
|
|
70
|
-
pipeline: z.ZodOptional<z.ZodObject<{
|
|
71
|
-
stt: z.ZodObject<{
|
|
72
|
-
placement: z.ZodEnum<{
|
|
73
|
-
browser: "browser";
|
|
74
|
-
cloud: "cloud";
|
|
75
|
-
}>;
|
|
76
|
-
provider: z.ZodString;
|
|
77
|
-
model: z.ZodOptional<z.ZodString>;
|
|
78
|
-
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
79
|
-
}, z.core.$strip>;
|
|
80
|
-
llm: z.ZodObject<{
|
|
81
|
-
placement: z.ZodEnum<{
|
|
82
|
-
browser: "browser";
|
|
83
|
-
cloud: "cloud";
|
|
84
|
-
}>;
|
|
85
|
-
provider: z.ZodString;
|
|
86
|
-
model: z.ZodOptional<z.ZodString>;
|
|
87
|
-
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
88
|
-
}, z.core.$strip>;
|
|
89
|
-
tts: z.ZodObject<{
|
|
90
|
-
placement: z.ZodEnum<{
|
|
91
|
-
browser: "browser";
|
|
92
|
-
cloud: "cloud";
|
|
93
|
-
}>;
|
|
94
|
-
provider: z.ZodString;
|
|
95
|
-
model: z.ZodOptional<z.ZodString>;
|
|
96
|
-
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
97
|
-
}, z.core.$strip>;
|
|
98
|
-
animation: z.ZodObject<{
|
|
99
|
-
enabled: z.ZodBoolean;
|
|
100
|
-
placement: z.ZodOptional<z.ZodEnum<{
|
|
101
|
-
browser: "browser";
|
|
102
|
-
cloud: "cloud";
|
|
103
|
-
}>>;
|
|
104
|
-
source: z.ZodEnum<{
|
|
105
|
-
none: "none";
|
|
106
|
-
azureViseme: "azureViseme";
|
|
107
|
-
speechToAnimation: "speechToAnimation";
|
|
108
|
-
}>;
|
|
109
|
-
provider: z.ZodOptional<z.ZodString>;
|
|
110
|
-
model: z.ZodOptional<z.ZodString>;
|
|
111
|
-
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
112
|
-
}, z.core.$strip>;
|
|
113
|
-
}, z.core.$strip>>;
|
|
114
|
-
capabilities: z.ZodArray<z.ZodString>;
|
|
115
|
-
characters: z.ZodArray<z.ZodObject<{
|
|
116
|
-
characterId: z.ZodString;
|
|
117
|
-
displayName: z.ZodString;
|
|
118
|
-
avatarId: z.ZodString;
|
|
119
|
-
voiceId: z.ZodString;
|
|
120
|
-
sttLang: z.ZodString;
|
|
121
|
-
agentId: z.ZodString;
|
|
122
|
-
appearance: z.ZodOptional<z.ZodObject<{
|
|
123
|
-
costume: z.ZodOptional<z.ZodString>;
|
|
124
|
-
costumeClothes: z.ZodOptional<z.ZodString>;
|
|
125
|
-
hair: z.ZodOptional<z.ZodString>;
|
|
126
|
-
}, z.core.$strip>>;
|
|
127
|
-
}, z.core.$strip>>;
|
|
128
|
-
activeCharacterId: z.ZodString;
|
|
129
|
-
location: z.ZodOptional<z.ZodObject<{
|
|
130
|
-
locationId: z.ZodString;
|
|
131
|
-
title: z.ZodString;
|
|
132
|
-
scene: z.ZodOptional<z.ZodObject<{
|
|
133
|
-
type: z.ZodLiteral<"image">;
|
|
134
|
-
layers: z.ZodArray<z.ZodString>;
|
|
135
|
-
assets: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
136
|
-
}, z.core.$strip>>;
|
|
137
|
-
placement: z.ZodOptional<z.ZodObject<{
|
|
138
|
-
cx: z.ZodNumber;
|
|
139
|
-
cy: z.ZodNumber;
|
|
140
|
-
scale: z.ZodNumber;
|
|
141
|
-
distanceM: z.ZodNumber;
|
|
142
|
-
}, z.core.$strip>>;
|
|
143
|
-
metersPerDepth: z.ZodOptional<z.ZodNumber>;
|
|
144
|
-
hasZoomVariant: z.ZodOptional<z.ZodBoolean>;
|
|
145
|
-
}, z.core.$strip>>;
|
|
146
|
-
world: z.ZodOptional<z.ZodObject<{
|
|
147
|
-
worldId: z.ZodString;
|
|
148
|
-
rulesetVersion: z.ZodNumber;
|
|
149
|
-
}, z.core.$strip>>;
|
|
150
|
-
state: z.ZodObject<{
|
|
151
|
-
schemaVersion: z.ZodLiteral<1>;
|
|
152
|
-
values: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
153
|
-
}, z.core.$strip>;
|
|
154
|
-
tools: z.ZodArray<z.ZodUnknown>;
|
|
155
|
-
integration: z.ZodOptional<z.ZodObject<{
|
|
156
|
-
returnUrl: z.ZodOptional<z.ZodString>;
|
|
157
|
-
navigateOnClose: z.ZodOptional<z.ZodBoolean>;
|
|
158
|
-
}, z.core.$strip>>;
|
|
159
|
-
closeButton: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
160
|
-
visible: z.ZodOptional<z.ZodBoolean>;
|
|
161
|
-
style: z.ZodOptional<z.ZodEnum<{
|
|
162
|
-
text: "text";
|
|
163
|
-
icon: "icon";
|
|
164
|
-
}>>;
|
|
165
|
-
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
166
|
-
position: z.ZodOptional<z.ZodString>;
|
|
167
|
-
}, z.core.$strip>>>;
|
|
168
|
-
billing: z.ZodOptional<z.ZodObject<{
|
|
169
|
-
payer: z.ZodLiteral<"creator">;
|
|
170
|
-
meterId: z.ZodString;
|
|
171
|
-
}, z.core.$strip>>;
|
|
172
|
-
language: z.ZodOptional<z.ZodEnum<{
|
|
173
|
-
en: "en";
|
|
174
|
-
es: "es";
|
|
175
|
-
}>>;
|
|
176
|
-
languagePackRevision: z.ZodOptional<z.ZodString>;
|
|
177
|
-
processorId: z.ZodOptional<z.ZodString>;
|
|
178
|
-
}, z.core.$strip>;
|
|
179
|
-
/** Apply API defaults for interaction modes omitted by older mint paths. */
|
|
180
|
-
export declare function normalizeSessionManifestInput(data: unknown): unknown;
|
|
181
|
-
export declare function parseSessionManifest(data: unknown): SessionManifest;
|
|
182
|
-
export declare function manifestHasSessionCredential(manifest: SessionManifest): boolean;
|
|
183
|
-
//# sourceMappingURL=sessionManifestSchema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sessionManifestSchema.d.ts","sourceRoot":"","sources":["../../../../src/v2/types/sessionManifestSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AA0FzD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwEhC,CAAC;AAEH,4EAA4E;AAC5E,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAgBpE;AAWD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,GAAG,eAAe,CAMnE;AAED,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,eAAe,GAAG,OAAO,CAE/E"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { SessionManifest } from './types/sessionManifest';
|
|
2
|
-
/**
|
|
3
|
-
* Strip avatar rendering and location scene assets from a Session Manifest.
|
|
4
|
-
* Used when integrators request voice-only mode without authoring a separate experience.
|
|
5
|
-
*/
|
|
6
|
-
export declare function applySpeechOnlyManifest(manifest: SessionManifest): SessionManifest;
|
|
7
|
-
//# sourceMappingURL=speechOnlyManifest.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"speechOnlyManifest.d.ts","sourceRoot":"","sources":["../../../src/v2/speechOnlyManifest.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAU/D;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,eAAe,GAAG,eAAe,CAiBlF"}
|