@liforma/client 0.2.1
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 +28 -0
- package/LICENSE +21 -0
- package/README.md +103 -0
- package/dist/next/index.js +5186 -0
- package/dist/next/index.js.map +1 -0
- package/dist/next/next/createLiformaSessionRouteHandler.d.ts +45 -0
- package/dist/next/next/createLiformaSessionRouteHandler.d.ts.map +1 -0
- package/dist/next/next/index.d.ts +8 -0
- package/dist/next/next/index.d.ts.map +1 -0
- package/dist/next/react/ExperienceThumbnail.d.ts +22 -0
- package/dist/next/react/ExperienceThumbnail.d.ts.map +1 -0
- package/dist/next/react/ExperienceWidget.d.ts +35 -0
- package/dist/next/react/ExperienceWidget.d.ts.map +1 -0
- package/dist/next/shims/apiBaseUrl.d.ts +14 -0
- package/dist/next/shims/apiBaseUrl.d.ts.map +1 -0
- package/dist/next/shims/localStack.d.ts +6 -0
- package/dist/next/shims/localStack.d.ts.map +1 -0
- package/dist/next/thumbnail/attachThumbnailParallax.d.ts +7 -0
- package/dist/next/thumbnail/attachThumbnailParallax.d.ts.map +1 -0
- package/dist/next/thumbnail/ensureStyles.d.ts +3 -0
- package/dist/next/thumbnail/ensureStyles.d.ts.map +1 -0
- package/dist/next/thumbnail/hostedLaunchUrl.d.ts +23 -0
- package/dist/next/thumbnail/hostedLaunchUrl.d.ts.map +1 -0
- package/dist/next/thumbnail/index.d.ts +9 -0
- package/dist/next/thumbnail/index.d.ts.map +1 -0
- package/dist/next/thumbnail/lazyLoad.d.ts +8 -0
- package/dist/next/thumbnail/lazyLoad.d.ts.map +1 -0
- package/dist/next/thumbnail/scrollParallax.d.ts +13 -0
- package/dist/next/thumbnail/scrollParallax.d.ts.map +1 -0
- package/dist/next/thumbnail/styles.d.ts +3 -0
- package/dist/next/thumbnail/styles.d.ts.map +1 -0
- package/dist/next/thumbnail/toGalleryThumbUrl.d.ts +23 -0
- package/dist/next/thumbnail/toGalleryThumbUrl.d.ts.map +1 -0
- package/dist/next/thumbnail/toGalleryThumbUrl.test.d.ts +2 -0
- package/dist/next/thumbnail/toGalleryThumbUrl.test.d.ts.map +1 -0
- package/dist/next/thumbnail/types.d.ts +37 -0
- package/dist/next/thumbnail/types.d.ts.map +1 -0
- package/dist/next/v2/api/fetchExperiencePreview.d.ts +15 -0
- package/dist/next/v2/api/fetchExperiencePreview.d.ts.map +1 -0
- package/dist/next/v2/api/mintPublicSession.d.ts +25 -0
- package/dist/next/v2/api/mintPublicSession.d.ts.map +1 -0
- package/dist/next/v2/api/sessionEndpointRequest.d.ts +16 -0
- package/dist/next/v2/api/sessionEndpointRequest.d.ts.map +1 -0
- package/dist/next/v2/conversationProcessor.d.ts +6 -0
- package/dist/next/v2/conversationProcessor.d.ts.map +1 -0
- package/dist/next/v2/embed/iframeHost.d.ts +70 -0
- package/dist/next/v2/embed/iframeHost.d.ts.map +1 -0
- package/dist/next/v2/embed/playerReachability.d.ts +4 -0
- package/dist/next/v2/embed/playerReachability.d.ts.map +1 -0
- package/dist/next/v2/embed/protocol.d.ts +181 -0
- package/dist/next/v2/embed/protocol.d.ts.map +1 -0
- package/dist/next/v2/embed/readyGate.d.ts +7 -0
- package/dist/next/v2/embed/readyGate.d.ts.map +1 -0
- package/dist/next/v2/experience.d.ts +133 -0
- package/dist/next/v2/experience.d.ts.map +1 -0
- package/dist/next/v2/experienceEvents.d.ts +27 -0
- package/dist/next/v2/experienceEvents.d.ts.map +1 -0
- package/dist/next/v2/shims/embedBaseUrl.d.ts +19 -0
- package/dist/next/v2/shims/embedBaseUrl.d.ts.map +1 -0
- package/dist/next/v2/speechOnlyManifest.d.ts +7 -0
- package/dist/next/v2/speechOnlyManifest.d.ts.map +1 -0
- package/dist/next/v2/types/sessionInteraction.d.ts +120 -0
- package/dist/next/v2/types/sessionInteraction.d.ts.map +1 -0
- package/dist/next/v2/types/sessionManifest.d.ts +93 -0
- package/dist/next/v2/types/sessionManifest.d.ts.map +1 -0
- package/dist/next/v2/types/sessionManifestSchema.d.ts +183 -0
- package/dist/next/v2/types/sessionManifestSchema.d.ts.map +1 -0
- package/dist/next/v2/types/sessionPipeline.d.ts +23 -0
- package/dist/next/v2/types/sessionPipeline.d.ts.map +1 -0
- package/dist/next/widget/dockGeometry.d.ts +26 -0
- package/dist/next/widget/dockGeometry.d.ts.map +1 -0
- package/dist/next/widget/index.d.ts +5 -0
- package/dist/next/widget/index.d.ts.map +1 -0
- package/dist/next/widget/mountExperienceWidget.d.ts +13 -0
- package/dist/next/widget/mountExperienceWidget.d.ts.map +1 -0
- package/dist/next/widget/styles.d.ts +4 -0
- package/dist/next/widget/styles.d.ts.map +1 -0
- package/dist/next/widget/types.d.ts +62 -0
- package/dist/next/widget/types.d.ts.map +1 -0
- package/dist/npm/index.js +4859 -0
- package/dist/npm/index.js.map +1 -0
- package/dist/npm/shims/apiBaseUrl.d.ts +14 -0
- package/dist/npm/shims/apiBaseUrl.d.ts.map +1 -0
- package/dist/npm/shims/localStack.d.ts +6 -0
- package/dist/npm/shims/localStack.d.ts.map +1 -0
- package/dist/npm/svelte/experienceLoadError.d.ts +16 -0
- package/dist/npm/svelte/experienceLoadError.d.ts.map +1 -0
- package/dist/npm/svelte/experienceLoadErrorOverlay.d.ts +8 -0
- package/dist/npm/svelte/experienceLoadErrorOverlay.d.ts.map +1 -0
- package/dist/npm/svelte/experienceLoadErrorStyles.d.ts +5 -0
- package/dist/npm/svelte/experienceLoadErrorStyles.d.ts.map +1 -0
- package/dist/npm/thumbnail/attachThumbnailParallax.d.ts +7 -0
- package/dist/npm/thumbnail/attachThumbnailParallax.d.ts.map +1 -0
- package/dist/npm/thumbnail/ensureStyles.d.ts +3 -0
- package/dist/npm/thumbnail/ensureStyles.d.ts.map +1 -0
- package/dist/npm/thumbnail/hostedLaunchUrl.d.ts +23 -0
- package/dist/npm/thumbnail/hostedLaunchUrl.d.ts.map +1 -0
- package/dist/npm/thumbnail/index.d.ts +9 -0
- package/dist/npm/thumbnail/index.d.ts.map +1 -0
- package/dist/npm/thumbnail/lazyLoad.d.ts +8 -0
- package/dist/npm/thumbnail/lazyLoad.d.ts.map +1 -0
- package/dist/npm/thumbnail/scrollParallax.d.ts +13 -0
- package/dist/npm/thumbnail/scrollParallax.d.ts.map +1 -0
- package/dist/npm/thumbnail/styles.d.ts +3 -0
- package/dist/npm/thumbnail/styles.d.ts.map +1 -0
- package/dist/npm/thumbnail/toGalleryThumbUrl.d.ts +23 -0
- package/dist/npm/thumbnail/toGalleryThumbUrl.d.ts.map +1 -0
- package/dist/npm/thumbnail/types.d.ts +37 -0
- package/dist/npm/thumbnail/types.d.ts.map +1 -0
- package/dist/npm/v2/api/fetchExperiencePreview.d.ts +15 -0
- package/dist/npm/v2/api/fetchExperiencePreview.d.ts.map +1 -0
- package/dist/npm/v2/api/mintPublicSession.d.ts +25 -0
- package/dist/npm/v2/api/mintPublicSession.d.ts.map +1 -0
- package/dist/npm/v2/api/sessionEndpointRequest.d.ts +16 -0
- package/dist/npm/v2/api/sessionEndpointRequest.d.ts.map +1 -0
- package/dist/npm/v2/conversationProcessor.d.ts +6 -0
- package/dist/npm/v2/conversationProcessor.d.ts.map +1 -0
- package/dist/npm/v2/embed/iframeHost.d.ts +70 -0
- package/dist/npm/v2/embed/iframeHost.d.ts.map +1 -0
- package/dist/npm/v2/embed/playerReachability.d.ts +4 -0
- package/dist/npm/v2/embed/playerReachability.d.ts.map +1 -0
- package/dist/npm/v2/embed/protocol.d.ts +181 -0
- package/dist/npm/v2/embed/protocol.d.ts.map +1 -0
- package/dist/npm/v2/embed/readyGate.d.ts +7 -0
- package/dist/npm/v2/embed/readyGate.d.ts.map +1 -0
- package/dist/npm/v2/embed/returnNavigation.d.ts +4 -0
- package/dist/npm/v2/embed/returnNavigation.d.ts.map +1 -0
- package/dist/npm/v2/experience.d.ts +133 -0
- package/dist/npm/v2/experience.d.ts.map +1 -0
- package/dist/npm/v2/experienceEvents.d.ts +27 -0
- package/dist/npm/v2/experienceEvents.d.ts.map +1 -0
- package/dist/npm/v2/index.d.ts +21 -0
- package/dist/npm/v2/index.d.ts.map +1 -0
- package/dist/npm/v2/liforma-experience-thumbnail.d.ts +9 -0
- package/dist/npm/v2/liforma-experience-thumbnail.d.ts.map +1 -0
- package/dist/npm/v2/liforma-experience-widget.d.ts +8 -0
- package/dist/npm/v2/liforma-experience-widget.d.ts.map +1 -0
- package/dist/npm/v2/liforma-experience.d.ts +15 -0
- package/dist/npm/v2/liforma-experience.d.ts.map +1 -0
- package/dist/npm/v2/npm.d.ts +10 -0
- package/dist/npm/v2/npm.d.ts.map +1 -0
- package/dist/npm/v2/shims/embedBaseUrl.d.ts +19 -0
- package/dist/npm/v2/shims/embedBaseUrl.d.ts.map +1 -0
- package/dist/npm/v2/speechOnlyManifest.d.ts +7 -0
- package/dist/npm/v2/speechOnlyManifest.d.ts.map +1 -0
- package/dist/npm/v2/types/index.d.ts +3 -0
- package/dist/npm/v2/types/index.d.ts.map +1 -0
- package/dist/npm/v2/types/sessionInteraction.d.ts +120 -0
- package/dist/npm/v2/types/sessionInteraction.d.ts.map +1 -0
- package/dist/npm/v2/types/sessionManifest.d.ts +93 -0
- package/dist/npm/v2/types/sessionManifest.d.ts.map +1 -0
- package/dist/npm/v2/types/sessionManifestSchema.d.ts +183 -0
- package/dist/npm/v2/types/sessionManifestSchema.d.ts.map +1 -0
- package/dist/npm/v2/types/sessionPipeline.d.ts +23 -0
- package/dist/npm/v2/types/sessionPipeline.d.ts.map +1 -0
- package/dist/npm/widget/dockGeometry.d.ts +26 -0
- package/dist/npm/widget/dockGeometry.d.ts.map +1 -0
- package/dist/npm/widget/index.d.ts +5 -0
- package/dist/npm/widget/index.d.ts.map +1 -0
- package/dist/npm/widget/mountExperienceWidget.d.ts +13 -0
- package/dist/npm/widget/mountExperienceWidget.d.ts.map +1 -0
- package/dist/npm/widget/styles.d.ts +4 -0
- package/dist/npm/widget/styles.d.ts.map +1 -0
- package/dist/npm/widget/types.d.ts +62 -0
- package/dist/npm/widget/types.d.ts.map +1 -0
- package/dist/react/component/experienceComponentLaunch.d.ts +7 -0
- package/dist/react/component/experienceComponentLaunch.d.ts.map +1 -0
- package/dist/react/component/experienceComponentRuntime.d.ts +55 -0
- package/dist/react/component/experienceComponentRuntime.d.ts.map +1 -0
- package/dist/react/component/experienceComponentTypes.d.ts +60 -0
- package/dist/react/component/experienceComponentTypes.d.ts.map +1 -0
- package/dist/react/index.js +5499 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react/react/Experience.d.ts +4 -0
- package/dist/react/react/Experience.d.ts.map +1 -0
- package/dist/react/react/ExperienceThumbnail.d.ts +22 -0
- package/dist/react/react/ExperienceThumbnail.d.ts.map +1 -0
- package/dist/react/react/ExperienceWidget.d.ts +35 -0
- package/dist/react/react/ExperienceWidget.d.ts.map +1 -0
- package/dist/react/react/index.d.ts +8 -0
- package/dist/react/react/index.d.ts.map +1 -0
- package/dist/react/shims/apiBaseUrl.d.ts +14 -0
- package/dist/react/shims/apiBaseUrl.d.ts.map +1 -0
- package/dist/react/shims/localStack.d.ts +6 -0
- package/dist/react/shims/localStack.d.ts.map +1 -0
- package/dist/react/svelte/experienceLoadError.d.ts +16 -0
- package/dist/react/svelte/experienceLoadError.d.ts.map +1 -0
- package/dist/react/svelte/experienceLoadErrorOverlay.d.ts +8 -0
- package/dist/react/svelte/experienceLoadErrorOverlay.d.ts.map +1 -0
- package/dist/react/svelte/experienceLoadErrorStyles.d.ts +5 -0
- package/dist/react/svelte/experienceLoadErrorStyles.d.ts.map +1 -0
- package/dist/react/thumbnail/attachThumbnailParallax.d.ts +7 -0
- package/dist/react/thumbnail/attachThumbnailParallax.d.ts.map +1 -0
- package/dist/react/thumbnail/ensureStyles.d.ts +3 -0
- package/dist/react/thumbnail/ensureStyles.d.ts.map +1 -0
- package/dist/react/thumbnail/hostedLaunchUrl.d.ts +23 -0
- package/dist/react/thumbnail/hostedLaunchUrl.d.ts.map +1 -0
- package/dist/react/thumbnail/index.d.ts +9 -0
- package/dist/react/thumbnail/index.d.ts.map +1 -0
- package/dist/react/thumbnail/lazyLoad.d.ts +8 -0
- package/dist/react/thumbnail/lazyLoad.d.ts.map +1 -0
- package/dist/react/thumbnail/scrollParallax.d.ts +13 -0
- package/dist/react/thumbnail/scrollParallax.d.ts.map +1 -0
- package/dist/react/thumbnail/styles.d.ts +3 -0
- package/dist/react/thumbnail/styles.d.ts.map +1 -0
- package/dist/react/thumbnail/toGalleryThumbUrl.d.ts +23 -0
- package/dist/react/thumbnail/toGalleryThumbUrl.d.ts.map +1 -0
- package/dist/react/thumbnail/toGalleryThumbUrl.test.d.ts +2 -0
- package/dist/react/thumbnail/toGalleryThumbUrl.test.d.ts.map +1 -0
- package/dist/react/thumbnail/types.d.ts +37 -0
- package/dist/react/thumbnail/types.d.ts.map +1 -0
- package/dist/react/v2/api/fetchExperiencePreview.d.ts +15 -0
- package/dist/react/v2/api/fetchExperiencePreview.d.ts.map +1 -0
- package/dist/react/v2/api/mintPublicSession.d.ts +25 -0
- package/dist/react/v2/api/mintPublicSession.d.ts.map +1 -0
- package/dist/react/v2/api/sessionEndpointRequest.d.ts +16 -0
- package/dist/react/v2/api/sessionEndpointRequest.d.ts.map +1 -0
- package/dist/react/v2/conversationProcessor.d.ts +6 -0
- package/dist/react/v2/conversationProcessor.d.ts.map +1 -0
- package/dist/react/v2/embed/iframeHost.d.ts +70 -0
- package/dist/react/v2/embed/iframeHost.d.ts.map +1 -0
- package/dist/react/v2/embed/playerReachability.d.ts +4 -0
- package/dist/react/v2/embed/playerReachability.d.ts.map +1 -0
- package/dist/react/v2/embed/protocol.d.ts +181 -0
- package/dist/react/v2/embed/protocol.d.ts.map +1 -0
- package/dist/react/v2/embed/readyGate.d.ts +7 -0
- package/dist/react/v2/embed/readyGate.d.ts.map +1 -0
- package/dist/react/v2/experience.d.ts +133 -0
- package/dist/react/v2/experience.d.ts.map +1 -0
- package/dist/react/v2/experienceEvents.d.ts +27 -0
- package/dist/react/v2/experienceEvents.d.ts.map +1 -0
- package/dist/react/v2/shims/embedBaseUrl.d.ts +19 -0
- package/dist/react/v2/shims/embedBaseUrl.d.ts.map +1 -0
- package/dist/react/v2/speechOnlyManifest.d.ts +7 -0
- package/dist/react/v2/speechOnlyManifest.d.ts.map +1 -0
- package/dist/react/v2/types/sessionInteraction.d.ts +120 -0
- package/dist/react/v2/types/sessionInteraction.d.ts.map +1 -0
- package/dist/react/v2/types/sessionManifest.d.ts +93 -0
- package/dist/react/v2/types/sessionManifest.d.ts.map +1 -0
- package/dist/react/v2/types/sessionManifestSchema.d.ts +183 -0
- package/dist/react/v2/types/sessionManifestSchema.d.ts.map +1 -0
- package/dist/react/v2/types/sessionPipeline.d.ts +23 -0
- package/dist/react/v2/types/sessionPipeline.d.ts.map +1 -0
- package/dist/react/widget/dockGeometry.d.ts +26 -0
- package/dist/react/widget/dockGeometry.d.ts.map +1 -0
- package/dist/react/widget/index.d.ts +5 -0
- package/dist/react/widget/index.d.ts.map +1 -0
- package/dist/react/widget/mountExperienceWidget.d.ts +13 -0
- package/dist/react/widget/mountExperienceWidget.d.ts.map +1 -0
- package/dist/react/widget/styles.d.ts +4 -0
- package/dist/react/widget/styles.d.ts.map +1 -0
- package/dist/react/widget/types.d.ts +62 -0
- package/dist/react/widget/types.d.ts.map +1 -0
- package/dist/sdk/v2/client.js +806 -0
- package/dist/sdk/v2/client.js.map +1 -0
- package/dist/svelte/Experience.svelte +522 -0
- package/dist/svelte/Experience.svelte.d.ts +15 -0
- package/dist/svelte/ExperienceThumbnail.svelte +376 -0
- package/dist/svelte/ExperienceThumbnail.svelte.d.ts +22 -0
- package/dist/svelte/ExperienceWidget.svelte +146 -0
- package/dist/svelte/ExperienceWidget.svelte.d.ts +35 -0
- package/dist/svelte/experienceLoadError.d.ts +15 -0
- package/dist/svelte/experienceLoadError.js +82 -0
- package/dist/svelte/experienceLoadError.test.d.ts +1 -0
- package/dist/svelte/experienceLoadError.test.js +18 -0
- package/dist/svelte/experienceLoadErrorOverlay.d.ts +7 -0
- package/dist/svelte/experienceLoadErrorOverlay.js +48 -0
- package/dist/svelte/experienceLoadErrorStyles.d.ts +4 -0
- package/dist/svelte/experienceLoadErrorStyles.js +112 -0
- package/dist/svelte/index.d.ts +7 -0
- package/dist/svelte/index.js +5 -0
- package/dist/svelte/types.d.ts +1 -0
- package/dist/svelte/types.js +1 -0
- package/package.json +154 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser-visible API origin for Liforma HTTP calls from the CDN SDK.
|
|
3
|
+
*
|
|
4
|
+
* Defaults to production. Local stack is opt-in only — never inferred from
|
|
5
|
+
* `localhost` hostname (third-party demos run on localhost against production).
|
|
6
|
+
*
|
|
7
|
+
* Override order:
|
|
8
|
+
* 1. `window.__LIFORMA_API_BASE_URL`
|
|
9
|
+
* 2. `data-api-base-url` on the SDK script tag
|
|
10
|
+
* 3. `window.__LIFORMA_STACK === 'local'` or host `?stack=local` → http://localhost:3001
|
|
11
|
+
* 4. production default → https://api.liforma.ai
|
|
12
|
+
*/
|
|
13
|
+
export declare function resolvePublicApiBaseUrl(): string;
|
|
14
|
+
//# sourceMappingURL=apiBaseUrl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apiBaseUrl.d.ts","sourceRoot":"","sources":["../../../src/shims/apiBaseUrl.ts"],"names":[],"mappings":"AA0BA;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAWhD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localStack.d.ts","sourceRoot":"","sources":["../../../src/shims/localStack.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,OAAO,CAc/C"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type ExperienceLoadErrorKind = 'not_found' | 'origin_not_allowed' | 'browser_embeds_disabled' | 'generic';
|
|
2
|
+
export type ExperienceLoadErrorPresentation = {
|
|
3
|
+
readonly kind: ExperienceLoadErrorKind;
|
|
4
|
+
readonly title: string;
|
|
5
|
+
readonly detail: string;
|
|
6
|
+
readonly technicalMessage: string;
|
|
7
|
+
readonly experienceId?: string;
|
|
8
|
+
readonly origin?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function extractExperienceIdFromMessage(message: string): string | undefined;
|
|
11
|
+
export declare function extractOriginFromMessage(message: string): string | undefined;
|
|
12
|
+
export declare function presentExperienceLoadError(error: unknown, options?: {
|
|
13
|
+
readonly experienceId?: string | null;
|
|
14
|
+
readonly origin?: string | null;
|
|
15
|
+
}): ExperienceLoadErrorPresentation;
|
|
16
|
+
//# sourceMappingURL=experienceLoadError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"experienceLoadError.d.ts","sourceRoot":"","sources":["../../../src/svelte/experienceLoadError.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uBAAuB,GAChC,WAAW,GACX,oBAAoB,GACpB,yBAAyB,GACzB,SAAS,CAAC;AAEb,MAAM,MAAM,+BAA+B,GAAG;IAC7C,QAAQ,CAAC,IAAI,EAAE,uBAAuB,CAAC;IACvC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAwBF,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAElF;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE5E;AAED,wBAAgB,0BAA0B,CACzC,KAAK,EAAE,OAAO,EACd,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAClF,+BAA+B,CAqEjC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ExperienceLoadErrorPresentation } from './experienceLoadError';
|
|
2
|
+
export type ExperienceLoadErrorOverlay = {
|
|
3
|
+
readonly root: HTMLDivElement;
|
|
4
|
+
setPresentation(presentation: ExperienceLoadErrorPresentation): void;
|
|
5
|
+
remove(): void;
|
|
6
|
+
};
|
|
7
|
+
export declare function createExperienceLoadErrorOverlay(container: HTMLElement, initial: ExperienceLoadErrorPresentation): ExperienceLoadErrorOverlay;
|
|
8
|
+
//# sourceMappingURL=experienceLoadErrorOverlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"experienceLoadErrorOverlay.d.ts","sourceRoot":"","sources":["../../../src/svelte/experienceLoadErrorOverlay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,uBAAuB,CAAC;AAG7E,MAAM,MAAM,0BAA0B,GAAG;IACxC,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,eAAe,CAAC,YAAY,EAAE,+BAA+B,GAAG,IAAI,CAAC;IACrE,MAAM,IAAI,IAAI,CAAC;CACf,CAAC;AAEF,wBAAgB,gCAAgC,CAC/C,SAAS,EAAE,WAAW,EACtB,OAAO,EAAE,+BAA+B,GACtC,0BAA0B,CA0D5B"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Subset of session loading overlay styles for pre-attach Experience load errors. */
|
|
2
|
+
export declare const EXPERIENCE_LOAD_ERROR_STYLE_ID = "liforma-experience-load-error-styles";
|
|
3
|
+
export declare function injectExperienceLoadErrorStyles(): void;
|
|
4
|
+
export declare const EXPERIENCE_LOAD_ERROR_CSS = "\n\t.liforma-loading-screen {\n\t\tinset: 0;\n\t\tz-index: 20;\n\t\tbox-sizing: border-box;\n\t\toverflow-x: clip;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tmax-width: 100vw;\n\t\tbackground:\n\t\t\tradial-gradient(circle at 50% 60%, rgba(79, 126, 196, 0.18), transparent 38%),\n\t\t\t#030508;\n\t\tfont-family: system-ui, -apple-system, sans-serif;\n\t\tcolor: #e8f0ff;\n\t\ttext-align: center;\n\t}\n\t.liforma-loading-screen-absolute {\n\t\tposition: absolute;\n\t}\n\t.liforma-loading-card {\n\t\tposition: absolute;\n\t\tleft: 50%;\n\t\ttop: 60%;\n\t\ttransform: translate(-50%, -50%);\n\t\twidth: min(22rem, calc(100% - 2.5rem));\n\t\tmax-width: calc(100% - max(1.25rem, env(safe-area-inset-left, 0px)) - max(1.25rem, env(safe-area-inset-right, 0px)));\n\t\tbox-sizing: border-box;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\tborder: 0;\n\t\tbackground: transparent;\n\t\tbox-shadow: none;\n\t}\n\t.liforma-loading-card-error {\n\t\tdisplay: block;\n\t\ttext-align: center;\n\t\tpadding: 1rem 1.05rem;\n\t\tborder-radius: 14px;\n\t\tborder: 1px solid rgba(255, 154, 154, 0.28);\n\t\tbackground:\n\t\t\tlinear-gradient(180deg, rgba(21, 29, 42, 0.92), rgba(9, 13, 20, 0.92));\n\t}\n\t.liforma-loading-kicker {\n\t\tmargin: 0 0 0.18rem;\n\t\tcolor: #8ba4c5;\n\t\tfont-size: 0.68rem;\n\t\tfont-weight: 700;\n\t\ttext-transform: uppercase;\n\t\tletter-spacing: 0.08em;\n\t}\n\t.liforma-loading-error {\n\t\tmargin: 0;\n\t\tmax-width: 28rem;\n\t\tcolor: #ffb4b4;\n\t\tfont-size: 0.92rem;\n\t\tline-height: 1.4;\n\t}\n\t.liforma-loading-error-title {\n\t\tmargin: 0;\n\t\tcolor: #f6ebe8;\n\t\tfont-size: 0.98rem;\n\t\tfont-weight: 650;\n\t\tline-height: 1.35;\n\t}\n\t.liforma-loading-error-advanced {\n\t\tmargin: 0.85rem 0 0;\n\t\tpadding: 0;\n\t\tborder: 0;\n\t\tbackground: transparent;\n\t\tcolor: #9eb7d8;\n\t\tfont: inherit;\n\t\tfont-size: 0.78rem;\n\t\tfont-weight: 650;\n\t\tletter-spacing: 0.02em;\n\t\ttext-decoration: underline;\n\t\ttext-underline-offset: 0.18em;\n\t\tcursor: pointer;\n\t}\n\t.liforma-loading-error-advanced:hover,\n\t.liforma-loading-error-advanced:focus-visible {\n\t\tcolor: #d7e6ff;\n\t\toutline: none;\n\t}\n\t.liforma-loading-error-detail {\n\t\tmargin: 0.7rem 0 0;\n\t\tpadding: 0.65rem 0.7rem;\n\t\tborder-radius: 10px;\n\t\tborder: 1px solid rgba(158, 191, 255, 0.16);\n\t\tbackground: rgba(3, 5, 8, 0.45);\n\t\tcolor: #c6d4e8;\n\t\tfont-size: 0.78rem;\n\t\tfont-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;\n\t\tline-height: 1.4;\n\t\ttext-align: left;\n\t\tword-break: break-word;\n\t}\n\t.liforma-loading-error-detail[hidden] {\n\t\tdisplay: none;\n\t}\n";
|
|
5
|
+
//# sourceMappingURL=experienceLoadErrorStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"experienceLoadErrorStyles.d.ts","sourceRoot":"","sources":["../../../src/svelte/experienceLoadErrorStyles.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,eAAO,MAAM,8BAA8B,yCAAyC,CAAC;AAErF,wBAAgB,+BAA+B,IAAI,IAAI,CAOtD;AAED,eAAO,MAAM,yBAAyB,ikFAmGrC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Drive `--liforma-et-parallax-*` CSS vars and `liforma-et--parallax` /
|
|
3
|
+
* `liforma-et--scroll-parallax` classes from pointer (desktop) or scroll (touch).
|
|
4
|
+
* Matches ExperienceThumbnail / `<liforma-experience-thumbnail>` behaviour.
|
|
5
|
+
*/
|
|
6
|
+
export declare function attachThumbnailParallax(root: HTMLElement): () => void;
|
|
7
|
+
//# sourceMappingURL=attachThumbnailParallax.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachThumbnailParallax.d.ts","sourceRoot":"","sources":["../../../src/thumbnail/attachThumbnailParallax.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,IAAI,CAgGrE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ensureStyles.d.ts","sourceRoot":"","sources":["../../../src/thumbnail/ensureStyles.ts"],"names":[],"mappings":"AAEA,qDAAqD;AACrD,wBAAgB,+BAA+B,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAWjE"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ResolveThumbnailInteractionInput, ThumbnailInteractionKind } from './types';
|
|
2
|
+
/** Priority: href → click-only → hosted (experienceId) → presentational. */
|
|
3
|
+
export declare function resolveThumbnailInteraction(input: ResolveThumbnailInteractionInput): ThumbnailInteractionKind;
|
|
4
|
+
export declare function resolvePlayerBaseUrl(playerBaseUrl?: string): string;
|
|
5
|
+
/**
|
|
6
|
+
* Build hosted player launch URL: `{player}/{experienceId}?returnUrl=…`
|
|
7
|
+
* When `returnUrl` is omitted, callers should assign on click (SSR-safe) or pass an explicit URL.
|
|
8
|
+
*/
|
|
9
|
+
export declare function buildHostedLaunchUrl(options: {
|
|
10
|
+
readonly experienceId: string;
|
|
11
|
+
readonly returnUrl?: string;
|
|
12
|
+
readonly playerBaseUrl?: string;
|
|
13
|
+
}): string;
|
|
14
|
+
/** Resolve href for anchor mode (app link or hosted launch). */
|
|
15
|
+
export declare function resolveThumbnailHref(options: {
|
|
16
|
+
readonly href?: string;
|
|
17
|
+
readonly experienceId?: string;
|
|
18
|
+
readonly returnUrl?: string;
|
|
19
|
+
readonly playerBaseUrl?: string;
|
|
20
|
+
/** When true and returnUrl omitted, use window.location.href (browser only). */
|
|
21
|
+
readonly useCurrentPageAsReturnUrl?: boolean;
|
|
22
|
+
}): string | undefined;
|
|
23
|
+
//# sourceMappingURL=hostedLaunchUrl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hostedLaunchUrl.d.ts","sourceRoot":"","sources":["../../../src/thumbnail/hostedLaunchUrl.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gCAAgC,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAK1F,4EAA4E;AAC5E,wBAAgB,2BAA2B,CAC1C,KAAK,EAAE,gCAAgC,GACrC,wBAAwB,CAK1B;AAED,wBAAgB,oBAAoB,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CASnE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE;IAC7C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CAChC,GAAG,MAAM,CAST;AAED,gEAAgE;AAChE,wBAAgB,oBAAoB,CAAC,OAAO,EAAE;IAC7C,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,gFAAgF;IAChF,QAAQ,CAAC,yBAAyB,CAAC,EAAE,OAAO,CAAC;CAC7C,GAAG,MAAM,GAAG,SAAS,CAiBrB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type { GalleryThumb, ExperienceThumbnailBaseProps, ThumbnailInteractionKind } from './types';
|
|
2
|
+
export { toGalleryThumbUrl, resolveThumbnailLayers } from './toGalleryThumbUrl';
|
|
3
|
+
export { resolveThumbnailInteraction, resolvePlayerBaseUrl, buildHostedLaunchUrl, resolveThumbnailHref } from './hostedLaunchUrl';
|
|
4
|
+
export { attachLazyThumb, attachImageReady } from './lazyLoad';
|
|
5
|
+
export { prefersScrollLinkedParallax, horizontalParallaxFromViewportY, attachScrollLinkedParallax } from './scrollParallax';
|
|
6
|
+
export { attachThumbnailParallax } from './attachThumbnailParallax';
|
|
7
|
+
export { EXPERIENCE_THUMBNAIL_CSS } from './styles';
|
|
8
|
+
export { ensureExperienceThumbnailStyles } from './ensureStyles';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/thumbnail/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,EACN,2BAA2B,EAC3B,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,EACN,2BAA2B,EAC3B,+BAA+B,EAC/B,0BAA0B,EAC1B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,+BAA+B,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type LazyThumbOptions = {
|
|
2
|
+
readonly rootMargin?: string;
|
|
3
|
+
readonly onVisibleChange: (visible: boolean) => void;
|
|
4
|
+
};
|
|
5
|
+
/** Observe the thumb and enable image loads when near the viewport. */
|
|
6
|
+
export declare function attachLazyThumb(element: HTMLElement, options: LazyThumbOptions): () => void;
|
|
7
|
+
export declare function attachImageReady(element: HTMLImageElement, onReady: () => void): () => void;
|
|
8
|
+
//# sourceMappingURL=lazyLoad.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazyLoad.d.ts","sourceRoot":"","sources":["../../../src/thumbnail/lazyLoad.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CACrD,CAAC;AAEF,uEAAuE;AACvE,wBAAgB,eAAe,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,gBAAgB,GAAG,MAAM,IAAI,CAiC3F;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAY3F"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Touch devices without hover — drive thumbnail parallax from scroll position. */
|
|
2
|
+
export declare function prefersScrollLinkedParallax(): boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Map an element's vertical centre in the viewport to horizontal parallax in [-1, 1].
|
|
5
|
+
*/
|
|
6
|
+
export declare function horizontalParallaxFromViewportY(rect: DOMRect, viewportHeight: number): number;
|
|
7
|
+
export type ScrollLinkedParallaxOptions = {
|
|
8
|
+
readonly onParallax: (x: number) => void;
|
|
9
|
+
readonly pointerActive?: () => boolean;
|
|
10
|
+
};
|
|
11
|
+
/** Subscribe to scroll/resize and update horizontal parallax from viewport Y. */
|
|
12
|
+
export declare function attachScrollLinkedParallax(element: HTMLElement, options: ScrollLinkedParallaxOptions): () => void;
|
|
13
|
+
//# sourceMappingURL=scrollParallax.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scrollParallax.d.ts","sourceRoot":"","sources":["../../../src/thumbnail/scrollParallax.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,wBAAgB,2BAA2B,IAAI,OAAO,CAIrD;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,GAAG,MAAM,CAI7F;AAED,MAAM,MAAM,2BAA2B,GAAG;IACzC,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,OAAO,CAAC;CACvC,CAAC;AAEF,iFAAiF;AACjF,wBAAgB,0BAA0B,CACzC,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,2BAA2B,GAClC,MAAM,IAAI,CA2BZ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/thumbnail/styles.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,eAAO,MAAM,wBAAwB,QA0K7B,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rewrite known Liforma CDN URLs to gallery thumb tiers.
|
|
3
|
+
* Avatars: /{tier}/ → /256/; locations: -{WxH}.webp → -256x256.webp.
|
|
4
|
+
* Unrecognized URLs are returned unchanged.
|
|
5
|
+
*/
|
|
6
|
+
export declare function toGalleryThumbUrl(url: string): string;
|
|
7
|
+
export declare function resolveThumbnailLayers(input: {
|
|
8
|
+
readonly galleryThumb?: {
|
|
9
|
+
readonly avatarImage?: string;
|
|
10
|
+
readonly backgroundImage?: string;
|
|
11
|
+
readonly foregroundImage?: string;
|
|
12
|
+
};
|
|
13
|
+
readonly avatarImage?: string;
|
|
14
|
+
readonly backgroundImage?: string;
|
|
15
|
+
readonly foregroundImage?: string;
|
|
16
|
+
readonly fallbackImage?: string;
|
|
17
|
+
}): {
|
|
18
|
+
readonly avatarImage: string;
|
|
19
|
+
readonly backgroundImage?: string;
|
|
20
|
+
readonly foregroundImage?: string;
|
|
21
|
+
readonly fallbackImage?: string;
|
|
22
|
+
} | null;
|
|
23
|
+
//# sourceMappingURL=toGalleryThumbUrl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toGalleryThumbUrl.d.ts","sourceRoot":"","sources":["../../../src/thumbnail/toGalleryThumbUrl.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAkBrD;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAC7C,QAAQ,CAAC,YAAY,CAAC,EAAE;QACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAC9B,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;QAClC,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;KAClC,CAAC;IACF,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CAChC,GAAG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CAChC,GAAG,IAAI,CAmBP"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** Catalog-shaped layered gallery preview (CDN URLs). */
|
|
2
|
+
export type GalleryThumb = {
|
|
3
|
+
readonly avatarImage: string;
|
|
4
|
+
readonly backgroundImage?: string;
|
|
5
|
+
readonly foregroundImage?: string;
|
|
6
|
+
};
|
|
7
|
+
export type ThumbnailInteractionKind = 'anchor' | 'button' | 'presentational';
|
|
8
|
+
export type ResolveThumbnailInteractionInput = {
|
|
9
|
+
readonly href?: string | null;
|
|
10
|
+
readonly hasClickHandler?: boolean;
|
|
11
|
+
readonly experienceId?: string | null;
|
|
12
|
+
};
|
|
13
|
+
export type ThumbnailLayers = {
|
|
14
|
+
readonly avatarImage: string;
|
|
15
|
+
readonly backgroundImage?: string;
|
|
16
|
+
readonly foregroundImage?: string;
|
|
17
|
+
readonly fallbackImage?: string;
|
|
18
|
+
};
|
|
19
|
+
/** Shared props across Svelte / React / Next (React uses `onClick`). */
|
|
20
|
+
export type ExperienceThumbnailBaseProps = {
|
|
21
|
+
readonly galleryThumb?: GalleryThumb;
|
|
22
|
+
readonly avatarImage?: string;
|
|
23
|
+
readonly backgroundImage?: string;
|
|
24
|
+
readonly foregroundImage?: string;
|
|
25
|
+
readonly alt: string;
|
|
26
|
+
readonly experienceId?: string;
|
|
27
|
+
readonly href?: string;
|
|
28
|
+
readonly target?: string;
|
|
29
|
+
readonly rel?: string;
|
|
30
|
+
readonly returnUrl?: string;
|
|
31
|
+
readonly playerBaseUrl?: string;
|
|
32
|
+
readonly parallax?: boolean;
|
|
33
|
+
readonly lazy?: boolean;
|
|
34
|
+
readonly className?: string;
|
|
35
|
+
readonly fallbackImage?: string;
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/thumbnail/types.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,MAAM,MAAM,YAAY,GAAG;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;CAClC,CAA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,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { GalleryThumb } from '../../thumbnail/types';
|
|
2
|
+
export type ExperiencePreview = {
|
|
3
|
+
readonly experienceId: string;
|
|
4
|
+
readonly title: string;
|
|
5
|
+
readonly galleryThumb: GalleryThumb;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Fetch public widget preview (title + gallery thumb plates) by experience id.
|
|
9
|
+
* No API key / origin allowlist — safe for collapsed FAB paint before mint.
|
|
10
|
+
*/
|
|
11
|
+
export declare function fetchExperiencePreview(experienceId: string, options?: {
|
|
12
|
+
readonly apiBaseUrl?: string;
|
|
13
|
+
readonly signal?: AbortSignal;
|
|
14
|
+
}): Promise<ExperiencePreview>;
|
|
15
|
+
//# sourceMappingURL=fetchExperiencePreview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchExperiencePreview.d.ts","sourceRoot":"","sources":["../../../../src/v2/api/fetchExperiencePreview.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,MAAM,MAAM,iBAAiB,GAAG;IAC/B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;CACpC,CAAC;AAkBF;;;GAGG;AACH,wBAAsB,sBAAsB,CAC3C,YAAY,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE;IACT,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAC9B,GACC,OAAO,CAAC,iBAAiB,CAAC,CAmD5B"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { SessionManifest } from '../types/sessionManifest';
|
|
2
|
+
import type { StartButtonOptions } from '../types/sessionInteraction';
|
|
3
|
+
export declare function mintPublicSession(experienceId: string, options?: {
|
|
4
|
+
readonly language?: 'en' | 'es';
|
|
5
|
+
readonly mode?: 'conversation' | 'presenter';
|
|
6
|
+
/** @deprecated Response ownership is derived from mode. */
|
|
7
|
+
readonly responseMode?: 'managed' | 'custom' | 'manual';
|
|
8
|
+
readonly speechInputMode?: 'auto' | 'manual' | 'off';
|
|
9
|
+
readonly startButton?: StartButtonOptions;
|
|
10
|
+
readonly speechOnly?: boolean;
|
|
11
|
+
}): Promise<SessionManifest>;
|
|
12
|
+
export type FetchSessionManifestOptions = {
|
|
13
|
+
readonly experienceId: string;
|
|
14
|
+
readonly language?: 'en' | 'es';
|
|
15
|
+
readonly mode?: 'conversation' | 'presenter';
|
|
16
|
+
/** @deprecated Response ownership is derived from mode. */
|
|
17
|
+
readonly responseMode?: 'managed' | 'custom' | 'manual';
|
|
18
|
+
readonly speechInputMode?: 'auto' | 'manual' | 'off';
|
|
19
|
+
readonly startButton?: StartButtonOptions;
|
|
20
|
+
readonly speechOnly?: boolean;
|
|
21
|
+
readonly signal?: AbortSignal;
|
|
22
|
+
readonly timeoutMs?: number;
|
|
23
|
+
};
|
|
24
|
+
export declare function fetchSessionManifest(sessionEndpoint: string, options: FetchSessionManifestOptions): Promise<SessionManifest>;
|
|
25
|
+
//# sourceMappingURL=mintPublicSession.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mintPublicSession.d.ts","sourceRoot":"","sources":["../../../../src/v2/api/mintPublicSession.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAgFtE,wBAAsB,iBAAiB,CACtC,YAAY,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE;IACT,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
|
|
3
|
+
readonly experienceId: string;
|
|
4
|
+
readonly language?: 'en' | 'es';
|
|
5
|
+
readonly mode?: 'conversation' | 'presenter';
|
|
6
|
+
/** @deprecated Response ownership is derived from mode. */
|
|
7
|
+
readonly responseMode?: 'managed' | 'custom' | 'manual';
|
|
8
|
+
readonly speechInputMode?: 'auto' | 'manual' | 'off';
|
|
9
|
+
readonly startButton?: StartButtonOptions;
|
|
10
|
+
readonly speechOnly?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare function createSessionEndpointRequest(sessionEndpoint: string, options: SessionEndpointRequestOptions): {
|
|
13
|
+
readonly url: string;
|
|
14
|
+
readonly init: RequestInit;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=sessionEndpointRequest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessionEndpointRequest.d.ts","sourceRoot":"","sources":["../../../../src/v2/api/sessionEndpointRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,MAAM,MAAM,6BAA6B,GAAG;IAC3C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,IAAI,CAAC,EAAE,cAAc,GAAG,WAAW,CAAC;IAC7C,2DAA2D;IAC3D,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACxD,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;IACrD,QAAQ,CAAC,WAAW,CAAC,EAAE,kBAAkB,CAAC;IAC1C,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEF,wBAAgB,4BAA4B,CAC3C,eAAe,EAAE,MAAM,EACvB,OAAO,EAAE,6BAA6B,GACpC;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;CAAE,CAuCtD"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ConversationProcessorContext, ConversationProcessorFn, ConversationProcessorResult, NormalizedProcessorSpeech, ProcessorDispatchResult } from './types/sessionInteraction';
|
|
2
|
+
export declare function isAsyncIterableString(value: unknown): value is AsyncIterable<string>;
|
|
3
|
+
export declare function normalizeConversationProcessorResult(result: ConversationProcessorResult): NormalizedProcessorSpeech;
|
|
4
|
+
export declare function runConversationProcessor(processor: ConversationProcessorFn, context: ConversationProcessorContext): Promise<NormalizedProcessorSpeech>;
|
|
5
|
+
export declare function dispatchConversationProcessor(processor: ConversationProcessorFn, context: ConversationProcessorContext): Promise<ProcessorDispatchResult>;
|
|
6
|
+
//# sourceMappingURL=conversationProcessor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversationProcessor.d.ts","sourceRoot":"","sources":["../../../src/v2/conversationProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,4BAA4B,EAC5B,uBAAuB,EACvB,2BAA2B,EAC3B,yBAAyB,EACzB,uBAAuB,EAEvB,MAAM,4BAA4B,CAAC;AAEpC,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAAC,MAAM,CAAC,CAGpF;AAED,wBAAgB,oCAAoC,CACnD,MAAM,EAAE,2BAA2B,GACjC,yBAAyB,CAmB3B;AAED,wBAAsB,wBAAwB,CAC7C,SAAS,EAAE,uBAAuB,EAClC,OAAO,EAAE,4BAA4B,GACnC,OAAO,CAAC,yBAAyB,CAAC,CAMpC;AAED,wBAAsB,6BAA6B,CAClD,SAAS,EAAE,uBAAuB,EAClC,OAAO,EAAE,4BAA4B,GACnC,OAAO,CAAC,uBAAuB,CAAC,CASlC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { CloseEvent, EmbedState } from './protocol';
|
|
2
|
+
import { type WidgetChromeMode } from './protocol';
|
|
3
|
+
import type { CharacterSpeechEvent, ConversationMessage, SpeakBehavior, SessionModeChange, SpeechResult, UserSpeechBoundaryEvent, UserTranscriptUpdate, UtteranceResult } from '../types/sessionInteraction';
|
|
4
|
+
export type IframeHostEventMap = {
|
|
5
|
+
close: CloseEvent;
|
|
6
|
+
stateUpdate: EmbedState;
|
|
7
|
+
userTranscript: UserTranscriptUpdate;
|
|
8
|
+
characterSpeechStarted: CharacterSpeechEvent;
|
|
9
|
+
characterSpeechEnded: CharacterSpeechEvent;
|
|
10
|
+
conversationUpdate: readonly ConversationMessage[];
|
|
11
|
+
listeningState: boolean;
|
|
12
|
+
started: {
|
|
13
|
+
readonly mode: 'conversation' | 'presenter';
|
|
14
|
+
};
|
|
15
|
+
widgetReady: void;
|
|
16
|
+
widgetExpand: void;
|
|
17
|
+
widgetCollapse: void;
|
|
18
|
+
widgetAudioSettings: boolean;
|
|
19
|
+
};
|
|
20
|
+
export type IframeHostOptions = {
|
|
21
|
+
readonly container: HTMLElement;
|
|
22
|
+
readonly src: string;
|
|
23
|
+
readonly playerOrigin: string;
|
|
24
|
+
/** Transparent iframe for ExperienceWidget warm overlay over a thumb. */
|
|
25
|
+
readonly transparent?: boolean;
|
|
26
|
+
readonly onClose?: (event: CloseEvent) => void;
|
|
27
|
+
readonly onStateUpdate?: (state: EmbedState) => void;
|
|
28
|
+
readonly onUserTranscript?: (update: UserTranscriptUpdate) => void;
|
|
29
|
+
readonly onUserSpeechStarted?: (event: UserSpeechBoundaryEvent) => void;
|
|
30
|
+
readonly onUserSpeechEnded?: (event: UserSpeechBoundaryEvent) => void;
|
|
31
|
+
readonly onCharacterSpeechStarted?: (event: CharacterSpeechEvent) => void;
|
|
32
|
+
readonly onCharacterSpeechEnded?: (event: CharacterSpeechEvent) => void;
|
|
33
|
+
readonly onConversationUpdate?: (conversation: readonly ConversationMessage[]) => void;
|
|
34
|
+
readonly onMessage?: (message: ConversationMessage) => void;
|
|
35
|
+
readonly onListeningState?: (listening: boolean) => void;
|
|
36
|
+
readonly onModeChange?: (mode: SessionModeChange) => void;
|
|
37
|
+
readonly onStarted?: (event: {
|
|
38
|
+
readonly mode: 'conversation' | 'presenter';
|
|
39
|
+
}) => void;
|
|
40
|
+
readonly onWidgetReady?: () => void;
|
|
41
|
+
readonly onWidgetExpand?: () => void;
|
|
42
|
+
readonly onWidgetCollapse?: () => void;
|
|
43
|
+
readonly onWidgetAudioSettings?: (open: boolean) => void;
|
|
44
|
+
};
|
|
45
|
+
export type IframeHost = {
|
|
46
|
+
waitForLoad(): Promise<void>;
|
|
47
|
+
postParentHello(): void;
|
|
48
|
+
postManifest(manifest: unknown): void;
|
|
49
|
+
postWidgetSetChrome(mode: WidgetChromeMode): void;
|
|
50
|
+
postWidgetToggleAudioSettings(): void;
|
|
51
|
+
speak(options: {
|
|
52
|
+
text: string;
|
|
53
|
+
characterId?: string;
|
|
54
|
+
behavior?: SpeakBehavior;
|
|
55
|
+
}): Promise<SpeechResult>;
|
|
56
|
+
startListening(): Promise<void>;
|
|
57
|
+
stopListening(): Promise<UtteranceResult>;
|
|
58
|
+
listenOnce(options?: {
|
|
59
|
+
readonly timeoutMs?: number;
|
|
60
|
+
}): Promise<UtteranceResult>;
|
|
61
|
+
speakProcessorStream(stream: AsyncIterable<string>, options?: {
|
|
62
|
+
readonly characterId?: string;
|
|
63
|
+
readonly behavior?: SpeakBehavior;
|
|
64
|
+
readonly signal?: AbortSignal;
|
|
65
|
+
}): Promise<SpeechResult>;
|
|
66
|
+
getConversation(): Promise<readonly ConversationMessage[]>;
|
|
67
|
+
destroy(): void;
|
|
68
|
+
};
|
|
69
|
+
export declare function createIframeHost(options: IframeHostOptions): IframeHost;
|
|
70
|
+
//# sourceMappingURL=iframeHost.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iframeHost.d.ts","sourceRoot":"","sources":["../../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AC;IACxB,YAAY,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;IACtC,mBAAmB,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAClD,6BAA6B,IAAI,IAAI,CAAC;IACtC,KAAK,CAAC,OAAO,EAAE;QACd,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,EAAE,aAAa,CAAC;KACzB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAC1B,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,aAAa,IAAI,OAAO,CAAC,eAAe,CAAC,CAAC;IAC1C,UAAU,CAAC,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAChF,oBAAoB,CACnB,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,EAC7B,OAAO,CAAC,EAAE;QACT,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAC9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,aAAa,CAAC;QAClC,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;KAC9B,GACC,OAAO,CAAC,YAAY,CAAC,CAAC;IACzB,eAAe,IAAI,OAAO,CAAC,SAAS,mBAAmB,EAAE,CAAC,CAAC;IAC3D,OAAO,IAAI,IAAI,CAAC;CAChB,CAAC;AASF,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,iBAAiB,GAAG,UAAU,CA4SvE"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function formatPlayerUnreachableMessage(playerOrigin: string): string;
|
|
2
|
+
export declare function assertPlayerReachable(embedUrl: string, playerOrigin: string): Promise<void>;
|
|
3
|
+
export declare function postMessageToPlayer(target: Window, message: unknown, playerOrigin: string): void;
|
|
4
|
+
//# sourceMappingURL=playerReachability.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"playerReachability.d.ts","sourceRoot":"","sources":["../../../../src/v2/embed/playerReachability.ts"],"names":[],"mappings":"AAEA,wBAAgB,8BAA8B,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAgB3E;AAED,wBAAsB,qBAAqB,CAC1C,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAUf;AAED,wBAAgB,mBAAmB,CAClC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,MAAM,GAClB,IAAI,CASN"}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import type { CharacterSpeechEvent, ConversationMessage, SpeakBehavior, SessionModeChange, UserSpeechBoundaryEvent, UserTranscriptUpdate } from '../types/sessionInteraction';
|
|
2
|
+
export declare const EMBED_MESSAGE_SCHEMA_VERSION: 2;
|
|
3
|
+
/** Outbound postMessage versions accepted from the player embed. */
|
|
4
|
+
export declare const SUPPORTED_EMBED_MESSAGE_SCHEMA_VERSIONS: ReadonlySet<number>;
|
|
5
|
+
export declare function isSupportedEmbedMessageSchemaVersion(version: unknown): boolean;
|
|
6
|
+
export type CloseEvent = {
|
|
7
|
+
readonly sessionId?: string;
|
|
8
|
+
readonly reason: 'user' | 'destroy';
|
|
9
|
+
readonly returnUrl?: string;
|
|
10
|
+
};
|
|
11
|
+
export type EmbedOutboundMessage = {
|
|
12
|
+
readonly type: 'close';
|
|
13
|
+
readonly schemaVersion: typeof EMBED_MESSAGE_SCHEMA_VERSION;
|
|
14
|
+
readonly payload: CloseEvent;
|
|
15
|
+
} | {
|
|
16
|
+
readonly type: 'stateUpdate';
|
|
17
|
+
readonly schemaVersion: typeof EMBED_MESSAGE_SCHEMA_VERSION;
|
|
18
|
+
readonly payload: {
|
|
19
|
+
readonly state: 'loading' | 'scene' | 'ready' | 'error';
|
|
20
|
+
};
|
|
21
|
+
} | {
|
|
22
|
+
readonly type: 'commandResult';
|
|
23
|
+
readonly schemaVersion: typeof EMBED_MESSAGE_SCHEMA_VERSION;
|
|
24
|
+
readonly payload: {
|
|
25
|
+
readonly correlationId: string;
|
|
26
|
+
readonly ok: boolean;
|
|
27
|
+
readonly error?: string;
|
|
28
|
+
readonly result?: unknown;
|
|
29
|
+
};
|
|
30
|
+
} | {
|
|
31
|
+
readonly type: 'userTranscript';
|
|
32
|
+
readonly schemaVersion: typeof EMBED_MESSAGE_SCHEMA_VERSION;
|
|
33
|
+
readonly payload: UserTranscriptUpdate;
|
|
34
|
+
} | {
|
|
35
|
+
readonly type: 'characterSpeechStarted';
|
|
36
|
+
readonly schemaVersion: typeof EMBED_MESSAGE_SCHEMA_VERSION;
|
|
37
|
+
readonly payload: CharacterSpeechEvent;
|
|
38
|
+
} | {
|
|
39
|
+
readonly type: 'characterSpeechEnded';
|
|
40
|
+
readonly schemaVersion: typeof EMBED_MESSAGE_SCHEMA_VERSION;
|
|
41
|
+
readonly payload: CharacterSpeechEvent;
|
|
42
|
+
} | {
|
|
43
|
+
readonly type: 'conversationUpdate';
|
|
44
|
+
readonly schemaVersion: typeof EMBED_MESSAGE_SCHEMA_VERSION;
|
|
45
|
+
readonly payload: {
|
|
46
|
+
readonly conversation: readonly ConversationMessage[];
|
|
47
|
+
};
|
|
48
|
+
} | {
|
|
49
|
+
readonly type: 'listeningState';
|
|
50
|
+
readonly schemaVersion: typeof EMBED_MESSAGE_SCHEMA_VERSION;
|
|
51
|
+
readonly payload: {
|
|
52
|
+
readonly listening: boolean;
|
|
53
|
+
};
|
|
54
|
+
} | {
|
|
55
|
+
readonly type: 'userSpeechStarted';
|
|
56
|
+
readonly schemaVersion: typeof EMBED_MESSAGE_SCHEMA_VERSION;
|
|
57
|
+
readonly payload: UserSpeechBoundaryEvent;
|
|
58
|
+
} | {
|
|
59
|
+
readonly type: 'userSpeechEnded';
|
|
60
|
+
readonly schemaVersion: typeof EMBED_MESSAGE_SCHEMA_VERSION;
|
|
61
|
+
readonly payload: UserSpeechBoundaryEvent;
|
|
62
|
+
} | {
|
|
63
|
+
readonly type: 'modeChange';
|
|
64
|
+
readonly schemaVersion: typeof EMBED_MESSAGE_SCHEMA_VERSION;
|
|
65
|
+
readonly payload: {
|
|
66
|
+
readonly mode: SessionModeChange;
|
|
67
|
+
};
|
|
68
|
+
} | {
|
|
69
|
+
readonly type: 'message';
|
|
70
|
+
readonly schemaVersion: typeof EMBED_MESSAGE_SCHEMA_VERSION;
|
|
71
|
+
readonly payload: ConversationMessage;
|
|
72
|
+
} | {
|
|
73
|
+
readonly type: 'started';
|
|
74
|
+
readonly schemaVersion: typeof EMBED_MESSAGE_SCHEMA_VERSION;
|
|
75
|
+
readonly payload: {
|
|
76
|
+
readonly mode: 'conversation' | 'presenter';
|
|
77
|
+
};
|
|
78
|
+
} | {
|
|
79
|
+
readonly type: 'widgetReady';
|
|
80
|
+
readonly schemaVersion: typeof EMBED_MESSAGE_SCHEMA_VERSION;
|
|
81
|
+
readonly payload: Record<string, never>;
|
|
82
|
+
} | {
|
|
83
|
+
readonly type: 'widgetExpand';
|
|
84
|
+
readonly schemaVersion: typeof EMBED_MESSAGE_SCHEMA_VERSION;
|
|
85
|
+
readonly payload: Record<string, never>;
|
|
86
|
+
} | {
|
|
87
|
+
readonly type: 'widgetCollapse';
|
|
88
|
+
readonly schemaVersion: typeof EMBED_MESSAGE_SCHEMA_VERSION;
|
|
89
|
+
readonly payload: Record<string, never>;
|
|
90
|
+
} | {
|
|
91
|
+
readonly type: 'widgetAudioSettings';
|
|
92
|
+
readonly schemaVersion: typeof EMBED_MESSAGE_SCHEMA_VERSION;
|
|
93
|
+
readonly payload: {
|
|
94
|
+
readonly open: boolean;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
export type WidgetChromeMode = 'collapsed' | 'loading' | 'expanded';
|
|
98
|
+
export type EmbedInboundMessage = {
|
|
99
|
+
readonly type: 'manifest';
|
|
100
|
+
readonly schemaVersion: typeof EMBED_MESSAGE_SCHEMA_VERSION;
|
|
101
|
+
readonly payload: {
|
|
102
|
+
readonly manifest: unknown;
|
|
103
|
+
};
|
|
104
|
+
} | {
|
|
105
|
+
readonly type: 'parentHello';
|
|
106
|
+
readonly schemaVersion: typeof EMBED_MESSAGE_SCHEMA_VERSION;
|
|
107
|
+
} | {
|
|
108
|
+
readonly type: 'speak';
|
|
109
|
+
readonly schemaVersion: typeof EMBED_MESSAGE_SCHEMA_VERSION;
|
|
110
|
+
readonly payload: {
|
|
111
|
+
readonly correlationId: string;
|
|
112
|
+
readonly text: string;
|
|
113
|
+
readonly characterId?: string;
|
|
114
|
+
readonly behavior?: SpeakBehavior;
|
|
115
|
+
};
|
|
116
|
+
} | {
|
|
117
|
+
readonly type: 'startListening';
|
|
118
|
+
readonly schemaVersion: typeof EMBED_MESSAGE_SCHEMA_VERSION;
|
|
119
|
+
readonly payload: {
|
|
120
|
+
readonly correlationId: string;
|
|
121
|
+
};
|
|
122
|
+
} | {
|
|
123
|
+
readonly type: 'stopListening';
|
|
124
|
+
readonly schemaVersion: typeof EMBED_MESSAGE_SCHEMA_VERSION;
|
|
125
|
+
readonly payload: {
|
|
126
|
+
readonly correlationId: string;
|
|
127
|
+
};
|
|
128
|
+
} | {
|
|
129
|
+
readonly type: 'getConversation';
|
|
130
|
+
readonly schemaVersion: typeof EMBED_MESSAGE_SCHEMA_VERSION;
|
|
131
|
+
readonly payload: {
|
|
132
|
+
readonly correlationId: string;
|
|
133
|
+
};
|
|
134
|
+
} | {
|
|
135
|
+
readonly type: 'listenOnce';
|
|
136
|
+
readonly schemaVersion: typeof EMBED_MESSAGE_SCHEMA_VERSION;
|
|
137
|
+
readonly payload: {
|
|
138
|
+
readonly correlationId: string;
|
|
139
|
+
readonly timeoutMs?: number;
|
|
140
|
+
};
|
|
141
|
+
} | {
|
|
142
|
+
readonly type: 'speakStreamStart';
|
|
143
|
+
readonly schemaVersion: typeof EMBED_MESSAGE_SCHEMA_VERSION;
|
|
144
|
+
readonly payload: {
|
|
145
|
+
readonly correlationId: string;
|
|
146
|
+
readonly characterId?: string;
|
|
147
|
+
readonly behavior?: SpeakBehavior;
|
|
148
|
+
};
|
|
149
|
+
} | {
|
|
150
|
+
readonly type: 'speakStreamChunk';
|
|
151
|
+
readonly schemaVersion: typeof EMBED_MESSAGE_SCHEMA_VERSION;
|
|
152
|
+
readonly payload: {
|
|
153
|
+
readonly streamId: string;
|
|
154
|
+
readonly text: string;
|
|
155
|
+
};
|
|
156
|
+
} | {
|
|
157
|
+
readonly type: 'speakStreamEnd';
|
|
158
|
+
readonly schemaVersion: typeof EMBED_MESSAGE_SCHEMA_VERSION;
|
|
159
|
+
readonly payload: {
|
|
160
|
+
readonly correlationId: string;
|
|
161
|
+
readonly streamId: string;
|
|
162
|
+
};
|
|
163
|
+
} | {
|
|
164
|
+
readonly type: 'widgetSetChrome';
|
|
165
|
+
readonly schemaVersion: typeof EMBED_MESSAGE_SCHEMA_VERSION;
|
|
166
|
+
readonly payload: {
|
|
167
|
+
readonly mode: WidgetChromeMode;
|
|
168
|
+
};
|
|
169
|
+
} | {
|
|
170
|
+
readonly type: 'widgetToggleAudioSettings';
|
|
171
|
+
readonly schemaVersion: typeof EMBED_MESSAGE_SCHEMA_VERSION;
|
|
172
|
+
readonly payload: Record<string, never>;
|
|
173
|
+
};
|
|
174
|
+
export type EmbedState = 'loading' | 'scene' | 'ready' | 'error';
|
|
175
|
+
export declare function parseOutboundMessage(data: unknown): EmbedOutboundMessage | null;
|
|
176
|
+
export declare function parseInboundMessage(data: unknown): EmbedInboundMessage | null;
|
|
177
|
+
export declare function createManifestMessage(manifest: unknown): EmbedInboundMessage;
|
|
178
|
+
export declare function createParentHelloMessage(): EmbedInboundMessage;
|
|
179
|
+
export declare function createWidgetSetChromeMessage(mode: WidgetChromeMode): EmbedInboundMessage;
|
|
180
|
+
export declare function createWidgetToggleAudioSettingsMessage(): EmbedInboundMessage;
|
|
181
|
+
//# sourceMappingURL=protocol.d.ts.map
|