@eloquentai/chat-sdk 0.33.8-dev → 0.33.9-dev

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.
@@ -30,6 +30,13 @@ export interface ChatInterfaceProps {
30
30
  hasSuggestedMessageShine?: boolean;
31
31
  title?: string;
32
32
  subtitle?: string;
33
+ /**
34
+ * Play the intro sequence (skeleton + animated logo) while the Rive asset
35
+ * loads, defaulting to true — the embed widget's existing behavior. With
36
+ * false the real interface renders immediately and the Rive runtime is never
37
+ * downloaded; read-only transcript views (and server rendering) want this.
38
+ */
39
+ hasIntroAnimation?: boolean;
33
40
  onSendMessage?: (message: MessageData) => Promise<void>;
34
41
  onMessageClick?: (message: MessageData) => void;
35
42
  onClose?: () => void;
@@ -0,0 +1,36 @@
1
+ import "./index-IRBMUmPg.js";
2
+ try {
3
+ let e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, t = new e.Error().stack;
4
+ t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "4fa3fbd0-d5e7-4d27-8da8-353f72257f91", e._sentryDebugIdIdentifier = "sentry-dbid-4fa3fbd0-d5e7-4d27-8da8-353f72257f91");
5
+ } catch {
6
+ }
7
+ const o = { BASE_URL: "/", DEV: !1, MODE: "dev", PROD: !0, SSR: !1, VITE_API_URL: "https://chat.eloquentai.dev", VITE_CDN_URL: "https://cdn.eloquentai.dev", VITE_ENVIRONMENT: "dev", VITE_REGION_API_URL: "https://region.eloquentai.dev" }, d = "/assets/logo-waiting-simple.riv";
8
+ function n(e) {
9
+ return typeof window > "u" || typeof import.meta > "u" ? "" : o[e] || "";
10
+ }
11
+ const _ = n("VITE_CDN_URL"), f = n("VITE_API_URL"), s = n("VITE_REGION_API_URL"), r = _ + d;
12
+ function l() {
13
+ return f || "";
14
+ }
15
+ function u() {
16
+ return s || "";
17
+ }
18
+ function I(e, t, i) {
19
+ return {
20
+ API: {
21
+ Events: {
22
+ endpoint: e || "",
23
+ region: i || "",
24
+ defaultAuthMode: "apiKey",
25
+ apiKey: t || ""
26
+ }
27
+ }
28
+ };
29
+ }
30
+ export {
31
+ r as L,
32
+ I as a,
33
+ l as b,
34
+ u as g
35
+ };
36
+ //# sourceMappingURL=config-CFAxzluW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-CFAxzluW.js","sources":["../src/lib/config.ts"],"sourcesContent":["const logoAnimatedUrl = \"/assets/logo-waiting-simple.riv\";\n\n// Helper to safely access import.meta.env in SSR environments\nfunction getEnvVariable(key: string): string {\n // Check if we're in a browser or if import.meta is available\n if (typeof window === \"undefined\" || typeof import.meta === \"undefined\") {\n return \"\";\n }\n return (import.meta.env[key] as string) || \"\";\n}\n\n// Define environment-specific constants that will be replaced during build\nconst ENV_CDN_URL = getEnvVariable(\"VITE_CDN_URL\");\nconst ENV_API_URL = getEnvVariable(\"VITE_API_URL\");\nconst ENV_REGION_API_URL = getEnvVariable(\"VITE_REGION_API_URL\");\n\nexport const LOGO_ANIMATED_URL = ENV_CDN_URL + logoAnimatedUrl;\n\n/**\n * Returns the API URL based on the provided custom URL or the default API URL.\n * @returns The API URL.\n */\nexport function getApiUrl(): string {\n return ENV_API_URL || \"\";\n}\n\n/**\n * Returns the Region API URL based on the environment.\n * @returns The Region API URL.\n */\nexport function getRegionApiUrl(): string {\n return ENV_REGION_API_URL || \"\";\n}\n\n/**\n * Returns the Amplify configuration for the API.\n * @returns The Amplify configuration.\n */\nexport function amplifyConfig(\n appSyncUrl?: string | null,\n appSyncApiKey?: string | null,\n appSyncRegion?: string | null,\n) {\n return {\n API: {\n Events: {\n endpoint: appSyncUrl || \"\",\n region: appSyncRegion || \"\",\n defaultAuthMode: \"apiKey\",\n apiKey: appSyncApiKey || \"\",\n },\n },\n } as const;\n}\n"],"names":["logoAnimatedUrl","getEnvVariable","key","__vite_import_meta_env__","ENV_CDN_URL","ENV_API_URL","ENV_REGION_API_URL","LOGO_ANIMATED_URL","getApiUrl","getRegionApiUrl","amplifyConfig","appSyncUrl","appSyncApiKey","appSyncRegion"],"mappings":";;;;;;8OAAMA,IAAkB;AAGxB,SAASC,EAAeC,GAAqB;AAE3C,SAAI,OAAO,SAAW,OAAe,OAAO,cAAgB,MACnD,KAEDC,EAAgBD,CAAG,KAAgB;AAC7C;AAGA,MAAME,IAAcH,EAAe,cAAc,GAC3CI,IAAcJ,EAAe,cAAc,GAC3CK,IAAqBL,EAAe,qBAAqB,GAElDM,IAAoBH,IAAcJ;AAMxC,SAASQ,IAAoB;AAClC,SAAOH,KAAe;AACxB;AAMO,SAASI,IAA0B;AACxC,SAAOH,KAAsB;AAC/B;AAMO,SAASI,EACdC,GACAC,GACAC,GACA;AACA,SAAO;AAAA,IACL,KAAK;AAAA,MACH,QAAQ;AAAA,QACN,UAAUF,KAAc;AAAA,QACxB,QAAQE,KAAiB;AAAA,QACzB,iBAAiB;AAAA,QACjB,QAAQD,KAAiB;AAAA,MAAA;AAAA,IAC3B;AAAA,EACF;AAEJ;"}