@aikaara/chat-sdk 0.8.3 → 0.8.5
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/dist/{MountTenant-CxO7hJgs.mjs → MountTenant-DQwRihyN.mjs} +10 -5
- package/dist/{MountTenant-BCjKRkD8.cjs → MountTenant-z47varff.cjs} +10 -5
- package/dist/cdn/aikaara-chat.iife.js +10 -5
- package/dist/headless.cjs +1 -1
- package/dist/headless.d.ts +14 -0
- package/dist/headless.mjs +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +14 -0
- package/dist/index.mjs +2 -2
- package/dist/ui.cjs +1 -1
- package/dist/ui.mjs +1 -1
- package/package.json +1 -1
|
@@ -12016,11 +12016,16 @@ class Ku extends HTMLElement {
|
|
|
12016
12016
|
:host {
|
|
12017
12017
|
--aikaara-primary: ${e.primaryColor};
|
|
12018
12018
|
--aikaara-primary-hover: ${this.darkenColor(e.primaryColor || lo)};
|
|
12019
|
-
|
|
12020
|
-
|
|
12021
|
-
|
|
12022
|
-
|
|
12023
|
-
|
|
12019
|
+
/* Cascade through descriptor.theme.surface / surfaceMuted /
|
|
12020
|
+
* text / textMuted / border when those are present (themeVars
|
|
12021
|
+
* sets the canonical token below). When the descriptor doesn't
|
|
12022
|
+
* theme the chat, the legacy literal defaults still apply, so
|
|
12023
|
+
* an un-themed widget renders exactly as it did before 0.8.5. */
|
|
12024
|
+
--aikaara-bg: var(--aikaara-surface, #ffffff);
|
|
12025
|
+
--aikaara-bg-secondary: var(--aikaara-surface-muted, #f9fafb);
|
|
12026
|
+
--aikaara-text: var(--aikaara-text, #1f2937);
|
|
12027
|
+
--aikaara-text-secondary: var(--aikaara-text-muted, #6b7280);
|
|
12028
|
+
--aikaara-border: var(--aikaara-border, #e5e7eb);
|
|
12024
12029
|
--aikaara-radius: ${e.borderRadius}px;
|
|
12025
12030
|
--aikaara-font: ${e.fontFamily};
|
|
12026
12031
|
--aikaara-panel-width: ${e.width}px;
|
|
@@ -42,11 +42,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
42
42
|
:host {
|
|
43
43
|
--aikaara-primary: ${e.primaryColor};
|
|
44
44
|
--aikaara-primary-hover: ${this.darkenColor(e.primaryColor||ho)};
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
/* Cascade through descriptor.theme.surface / surfaceMuted /
|
|
46
|
+
* text / textMuted / border when those are present (themeVars
|
|
47
|
+
* sets the canonical token below). When the descriptor doesn't
|
|
48
|
+
* theme the chat, the legacy literal defaults still apply, so
|
|
49
|
+
* an un-themed widget renders exactly as it did before 0.8.5. */
|
|
50
|
+
--aikaara-bg: var(--aikaara-surface, #ffffff);
|
|
51
|
+
--aikaara-bg-secondary: var(--aikaara-surface-muted, #f9fafb);
|
|
52
|
+
--aikaara-text: var(--aikaara-text, #1f2937);
|
|
53
|
+
--aikaara-text-secondary: var(--aikaara-text-muted, #6b7280);
|
|
54
|
+
--aikaara-border: var(--aikaara-border, #e5e7eb);
|
|
50
55
|
--aikaara-radius: ${e.borderRadius}px;
|
|
51
56
|
--aikaara-font: ${e.fontFamily};
|
|
52
57
|
--aikaara-panel-width: ${e.width}px;
|
|
@@ -42,11 +42,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
42
42
|
:host {
|
|
43
43
|
--aikaara-primary: ${e.primaryColor};
|
|
44
44
|
--aikaara-primary-hover: ${this.darkenColor(e.primaryColor||go)};
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
/* Cascade through descriptor.theme.surface / surfaceMuted /
|
|
46
|
+
* text / textMuted / border when those are present (themeVars
|
|
47
|
+
* sets the canonical token below). When the descriptor doesn't
|
|
48
|
+
* theme the chat, the legacy literal defaults still apply, so
|
|
49
|
+
* an un-themed widget renders exactly as it did before 0.8.5. */
|
|
50
|
+
--aikaara-bg: var(--aikaara-surface, #ffffff);
|
|
51
|
+
--aikaara-bg-secondary: var(--aikaara-surface-muted, #f9fafb);
|
|
52
|
+
--aikaara-text: var(--aikaara-text, #1f2937);
|
|
53
|
+
--aikaara-text-secondary: var(--aikaara-text-muted, #6b7280);
|
|
54
|
+
--aikaara-border: var(--aikaara-border, #e5e7eb);
|
|
50
55
|
--aikaara-radius: ${e.borderRadius}px;
|
|
51
56
|
--aikaara-font: ${e.fontFamily};
|
|
52
57
|
--aikaara-panel-width: ${e.width}px;
|
package/dist/headless.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./MountTenant-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./MountTenant-z47varff.cjs");class s extends e.EventEmitter{registration=null;pendingEdits=[];constructor(t){super(),this.setupListeners(t)}registerForm(t){this.registration=t;const i=this.pendingEdits.filter(r=>r.entity_type===t.entityType&&String(r.entity_id)===String(t.entityId));if(i.length>0){for(const r of i)t.onFieldUpdate(r.fields),this.emit("edit:applied",{entityType:r.entity_type,entityId:r.entity_id,fields:r.fields});this.pendingEdits=this.pendingEdits.filter(r=>!(r.entity_type===t.entityType&&String(r.entity_id)===String(t.entityId)))}}unregisterForm(t,i){this.registration?.entityType===t&&String(this.registration?.entityId)===String(i)&&(this.registration=null)}get currentForm(){return this.registration}pushFieldUpdates(t,i,r){this.registration&&this.registration.entityType===t&&String(this.registration.entityId)===String(i)?(this.registration.onFieldUpdate(r),this.emit("edit:applied",{entityType:t,entityId:i,fields:r})):(this.pendingEdits.push({action:"edit_entity",entity_type:t,entity_id:i,fields:r}),this.emit("edit:pending",{entityType:t,entityId:i,fields:r}))}async requestSave(){if(!this.registration)return{success:!1,error:"No form registered"};try{return await this.registration.onSave(),this.emit("save:success",{entityType:this.registration.entityType,entityId:this.registration.entityId}),{success:!0}}catch(t){const i=t instanceof Error?t.message:"Save failed";return this.emit("save:error",{entityType:this.registration.entityType,entityId:this.registration.entityId,error:i}),{success:!1,error:i}}}async requestTest(t){if(!this.registration?.onTest)return{success:!1,error:"Current form does not support testing"};try{return await this.registration.onTest(t),{success:!0}}catch(i){return{success:!1,error:i instanceof Error?i.message:"Test failed"}}}setupListeners(t){t.on("action:edit_entity",i=>{this.pushFieldUpdates(i.entity_type,i.entity_id,i.fields)}),t.on("action:save_entity",i=>{this.requestSave()}),t.on("action:test_tool",i=>{this.emit("test:triggered",{toolId:i.tool_id,parameters:i.parameters}),this.requestTest(i.parameters)})}}exports.ActionCableClient=e.ActionCableClient;exports.AikaaraChatClient=e.AikaaraChatClient;exports.ApiClient=e.ApiClient;exports.ChannelSubscription=e.ChannelSubscription;exports.ConnectionManager=e.ConnectionManager;exports.ConversationManager=e.ConversationManager;exports.EventEmitter=e.EventEmitter;exports.MessageStore=e.MessageStore;exports.SessionAuthAdapter=e.SessionAuthAdapter;exports.SsoExchangeAdapter=e.SsoExchangeAdapter;exports.TiledeskTransport=e.TiledeskTransport;exports.TokenDiscoveryError=e.TokenDiscoveryError;exports.TokenDiscoveryReader=e.TokenDiscoveryReader;exports.clearPersistedConversationId=e.clearPersistedConversationId;exports.collectSsoCredentials=e.collectSsoCredentials;exports.createFetchUploadAdapter=e.createFetchUploadAdapter;exports.createPresigned3StepUploadAdapter=e.createPresigned3StepUploadAdapter;exports.createTiledeskHistoryAdapter=e.createTiledeskHistoryAdapter;exports.discoverToken=e.discoverToken;exports.extractTiledeskFileEnvelope=e.extractTiledeskFileEnvelope;exports.inferTiledeskRole=e.inferTiledeskRole;exports.isTiledeskSelfEcho=e.isTiledeskSelfEcho;exports.mountFromSlug=e.mountFromSlug;exports.mountTenantWidget=e.mount;exports.parseTiledeskTemplate=e.parseTiledeskTemplate;exports.FormBridge=s;
|
package/dist/headless.d.ts
CHANGED
|
@@ -1366,6 +1366,20 @@ export declare interface SsoDescriptor {
|
|
|
1366
1366
|
name?: string;
|
|
1367
1367
|
phone?: string;
|
|
1368
1368
|
};
|
|
1369
|
+
/**
|
|
1370
|
+
* Name of the field inside the `{credentials: {...}}` body posted to
|
|
1371
|
+
* `/sso_exchange`. Default `"credential"`. Set to match what the partner's
|
|
1372
|
+
* `/auth` leg expects — e.g. `"idToken"` for legacy Google flows, `"token"`
|
|
1373
|
+
* for partner JWTs.
|
|
1374
|
+
*/
|
|
1375
|
+
credentialFieldName?: string;
|
|
1376
|
+
/**
|
|
1377
|
+
* Key under `user.properties` that the sso_exchange response carries the
|
|
1378
|
+
* tenant session token in. Set by `user_provisioning.response_map.properties`
|
|
1379
|
+
* server-side. Default `"partner_token"`. The browser uses this token as
|
|
1380
|
+
* the Bearer for `descriptor.auth.endpoint` (e.g. `chatbuddy/auth`).
|
|
1381
|
+
*/
|
|
1382
|
+
tenantTokenProperty?: string;
|
|
1369
1383
|
}
|
|
1370
1384
|
|
|
1371
1385
|
export declare class SsoExchangeAdapter {
|
package/dist/headless.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as s } from "./MountTenant-
|
|
2
|
-
import { A as p, b as l, k as g, C as c, l as h, m as y, M as u, S as m, n as f, T, o as S, p as _, q as v, s as E, t as C, u as F, v as k, w as A, x as I, y as x, z as U, B as q, D as M, F as b } from "./MountTenant-
|
|
1
|
+
import { E as s } from "./MountTenant-DQwRihyN.mjs";
|
|
2
|
+
import { A as p, b as l, k as g, C as c, l as h, m as y, M as u, S as m, n as f, T, o as S, p as _, q as v, s as E, t as C, u as F, v as k, w as A, x as I, y as x, z as U, B as q, D as M, F as b } from "./MountTenant-DQwRihyN.mjs";
|
|
3
3
|
class a extends s {
|
|
4
4
|
registration = null;
|
|
5
5
|
pendingEdits = [];
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./MountTenant-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./MountTenant-z47varff.cjs"),s=require("./headless.cjs");function l(a){e.registerComponents();const t=document.createElement("aikaara-chat-widget"),i={baseUrl:"base-url",userToken:"user-token",apiKey:"api-key",title:"title",subtitle:"subtitle",theme:"theme",primaryColor:"primary-color",position:"position",width:"width",height:"height",placeholder:"placeholder",welcomeMessage:"welcome-message",avatarUrl:"avatar-url"};for(const[o,n]of Object.entries(i)){const r=a[o];r!=null&&t.setAttribute(n,String(r))}return t.configure(a),document.body.appendChild(t),t}function d(){const a=document.querySelector("aikaara-chat-widget");a&&a.remove()}exports.ActionCableClient=e.ActionCableClient;exports.AikaaraChatBubble=e.AikaaraChatBubble;exports.AikaaraChatClient=e.AikaaraChatClient;exports.AikaaraChatHeader=e.AikaaraChatHeader;exports.AikaaraChatInput=e.AikaaraChatInput;exports.AikaaraChatWidget=e.AikaaraChatWidget;exports.AikaaraErrorBanner=e.AikaaraErrorBanner;exports.AikaaraMessageBubble=e.AikaaraMessageBubble;exports.AikaaraMessageList=e.AikaaraMessageList;exports.AikaaraStreamingMessage=e.AikaaraStreamingMessage;exports.AikaaraTypingIndicator=e.AikaaraTypingIndicator;exports.ApiClient=e.ApiClient;exports.ChannelSubscription=e.ChannelSubscription;exports.ConnectionManager=e.ConnectionManager;exports.ConversationManager=e.ConversationManager;exports.EventEmitter=e.EventEmitter;exports.MessageStore=e.MessageStore;exports.SessionAuthAdapter=e.SessionAuthAdapter;exports.SsoExchangeAdapter=e.SsoExchangeAdapter;exports.TiledeskTransport=e.TiledeskTransport;exports.TokenDiscoveryError=e.TokenDiscoveryError;exports.TokenDiscoveryReader=e.TokenDiscoveryReader;exports.clearPersistedConversationId=e.clearPersistedConversationId;exports.collectSsoCredentials=e.collectSsoCredentials;exports.createFetchUploadAdapter=e.createFetchUploadAdapter;exports.createPresigned3StepUploadAdapter=e.createPresigned3StepUploadAdapter;exports.createTiledeskHistoryAdapter=e.createTiledeskHistoryAdapter;exports.discoverToken=e.discoverToken;exports.extractTiledeskFileEnvelope=e.extractTiledeskFileEnvelope;exports.inferTiledeskRole=e.inferTiledeskRole;exports.isTiledeskSelfEcho=e.isTiledeskSelfEcho;exports.mountFromSlug=e.mountFromSlug;exports.mountTenantWidget=e.mount;exports.parseTiledeskTemplate=e.parseTiledeskTemplate;exports.registerComponents=e.registerComponents;exports.FormBridge=s.FormBridge;exports.mount=l;exports.unmount=d;
|
package/dist/index.d.ts
CHANGED
|
@@ -1267,6 +1267,20 @@ export declare interface SsoDescriptor {
|
|
|
1267
1267
|
name?: string;
|
|
1268
1268
|
phone?: string;
|
|
1269
1269
|
};
|
|
1270
|
+
/**
|
|
1271
|
+
* Name of the field inside the `{credentials: {...}}` body posted to
|
|
1272
|
+
* `/sso_exchange`. Default `"credential"`. Set to match what the partner's
|
|
1273
|
+
* `/auth` leg expects — e.g. `"idToken"` for legacy Google flows, `"token"`
|
|
1274
|
+
* for partner JWTs.
|
|
1275
|
+
*/
|
|
1276
|
+
credentialFieldName?: string;
|
|
1277
|
+
/**
|
|
1278
|
+
* Key under `user.properties` that the sso_exchange response carries the
|
|
1279
|
+
* tenant session token in. Set by `user_provisioning.response_map.properties`
|
|
1280
|
+
* server-side. Default `"partner_token"`. The browser uses this token as
|
|
1281
|
+
* the Bearer for `descriptor.auth.endpoint` (e.g. `chatbuddy/auth`).
|
|
1282
|
+
*/
|
|
1283
|
+
tenantTokenProperty?: string;
|
|
1270
1284
|
}
|
|
1271
1285
|
|
|
1272
1286
|
export declare class SsoExchangeAdapter {
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as o } from "./MountTenant-
|
|
2
|
-
import { A as u, a as m, b as k, c as g, d as h, e as A, f as C, g as T, h as b, i as v, j as f, k as y, C as S, l as w, m as E, E as M, M as x, S as B, n as F, T as U, o as D, p as I, q as j, s as q, t as H, u as P, v as R, w as W, x as z, y as K, z as L, B as O, D as G, F as J } from "./MountTenant-
|
|
1
|
+
import { r as o } from "./MountTenant-DQwRihyN.mjs";
|
|
2
|
+
import { A as u, a as m, b as k, c as g, d as h, e as A, f as C, g as T, h as b, i as v, j as f, k as y, C as S, l as w, m as E, E as M, M as x, S as B, n as F, T as U, o as D, p as I, q as j, s as q, t as H, u as P, v as R, w as W, x as z, y as K, z as L, B as O, D as G, F as J } from "./MountTenant-DQwRihyN.mjs";
|
|
3
3
|
import { FormBridge as Q } from "./headless.mjs";
|
|
4
4
|
function l(e) {
|
|
5
5
|
o();
|
package/dist/ui.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./MountTenant-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./MountTenant-z47varff.cjs");exports.AikaaraChat=a.AikaaraChat;exports.AikaaraChatBubble=a.AikaaraChatBubble;exports.AikaaraChatHeader=a.AikaaraChatHeader;exports.AikaaraChatInput=a.AikaaraChatInput;exports.AikaaraChatWidget=a.AikaaraChatWidget;exports.AikaaraComparePlans=a.AikaaraComparePlans;exports.AikaaraErrorBanner=a.AikaaraErrorBanner;exports.AikaaraLinkModal=a.AikaaraLinkModal;exports.AikaaraMessageBubble=a.AikaaraMessageBubble;exports.AikaaraMessageList=a.AikaaraMessageList;exports.AikaaraModalAction=a.AikaaraModalAction;exports.AikaaraOptionList=a.AikaaraOptionList;exports.AikaaraStreamingMessage=a.AikaaraStreamingMessage;exports.AikaaraSubmitAction=a.AikaaraSubmitAction;exports.AikaaraSystemPill=a.AikaaraSystemPill;exports.AikaaraTemplateRenderer=a.AikaaraTemplateRenderer;exports.AikaaraTypingIndicator=a.AikaaraTypingIndicator;exports.registerComponents=a.registerComponents;
|
package/dist/ui.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as i, a as s, c as e, d as t, e as A, H as k, f as n, I as o, g, h as l, J as d, K as m, i as p, L as C, N as h, O as b, j as M, r as c } from "./MountTenant-
|
|
1
|
+
import { G as i, a as s, c as e, d as t, e as A, H as k, f as n, I as o, g, h as l, J as d, K as m, i as p, L as C, N as h, O as b, j as M, r as c } from "./MountTenant-DQwRihyN.mjs";
|
|
2
2
|
export {
|
|
3
3
|
i as AikaaraChat,
|
|
4
4
|
s as AikaaraChatBubble,
|