@staylift-tech/conv-widget 0.0.6 → 0.0.9

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.
@@ -6,7 +6,7 @@ var appGlobals = require('./app-globals-V2Kpy_OQ.js');
6
6
  const defineCustomElements = async (win, options) => {
7
7
  if (typeof window === 'undefined') return undefined;
8
8
  await appGlobals.globalScripts();
9
- return index.bootstrapLazy([["staylift-orb.cjs",[[1,"staylift-orb",{"inputVolume":[2,"input-volume"],"outputVolume":[2,"output-volume"],"isActive":[4,"is-active"],"primaryColor":[1,"primary-color"],"size":[8],"animationFrame":[32]}]]],["staylift-widget.cjs",[[1,"staylift-widget",{"agentId":[1,"agent-id"],"positionX":[1,"position-x"],"positionY":[1,"position-y"],"variant":[1],"mode":[1],"primaryColor":[1,"primary-color"],"brandName":[1,"brand-name"],"language":[1],"autoExpand":[4,"auto-expand"],"showBranding":[4,"show-branding"],"avatarUrl":[1,"avatar-url"],"fabPrompt":[1,"fab-prompt"],"fabButtonText":[1,"fab-button-text"],"status":[32],"isExpanded":[32],"termsAccepted":[32],"errorMessage":[32],"inputVolume":[32],"outputVolume":[32],"messages":[32],"inputText":[32],"copiedIndex":[32],"selectedMode":[32],"startConversation":[64],"endConversation":[64],"getStatus":[64],"sendMessage":[64]}]]]], options);
9
+ return index.bootstrapLazy([["staylift-orb.cjs",[[1,"staylift-orb",{"inputVolume":[2,"input-volume"],"outputVolume":[2,"output-volume"],"isActive":[4,"is-active"],"primaryColor":[1,"primary-color"],"size":[8],"animationFrame":[32]}]]],["staylift-widget.cjs",[[1,"staylift-widget",{"agentId":[1,"agent-id"],"textAgentId":[1,"text-agent-id"],"voiceAgentId":[1,"voice-agent-id"],"positionX":[1,"position-x"],"positionY":[1,"position-y"],"variant":[1],"mode":[1],"primaryColor":[1,"primary-color"],"brandName":[1,"brand-name"],"language":[1],"autoExpand":[4,"auto-expand"],"showBranding":[4,"show-branding"],"onlyText":[4,"only-text"],"avatarUrl":[1,"avatar-url"],"fabPrompt":[1,"fab-prompt"],"fabButtonText":[1,"fab-button-text"],"status":[32],"isExpanded":[32],"termsAccepted":[32],"errorMessage":[32],"inputVolume":[32],"outputVolume":[32],"messages":[32],"inputText":[32],"copiedIndex":[32],"selectedMode":[32],"startConversation":[64],"endConversation":[64],"getStatus":[64],"sendMessage":[64]}]]]], options);
10
10
  };
11
11
 
12
12
  exports.setNonce = index.setNonce;
@@ -26074,6 +26074,7 @@ const StayliftWidget = class {
26074
26074
  this.language = 'en';
26075
26075
  this.autoExpand = false;
26076
26076
  this.showBranding = true;
26077
+ this.onlyText = false;
26077
26078
  this.fabPrompt = 'Do you need help?';
26078
26079
  this.fabButtonText = 'Start';
26079
26080
  // ============ STATE ============
@@ -26122,6 +26123,8 @@ const StayliftWidget = class {
26122
26123
  componentWillLoad() {
26123
26124
  if (this.autoExpand)
26124
26125
  this.isExpanded = true;
26126
+ if (this.onlyText)
26127
+ this.selectedMode = 'text';
26125
26128
  }
26126
26129
  disconnectedCallback() {
26127
26130
  this.cleanup();
@@ -26192,8 +26195,12 @@ const StayliftWidget = class {
26192
26195
  }, CONNECTION_TIMEOUT);
26193
26196
  // Use TextConversation for text-only mode (no mic access), VoiceConversation for voice
26194
26197
  const ConversationClass = textOnly ? C : D;
26198
+ // Use mode-specific agent ID if provided, otherwise fall back to main agentId
26199
+ const effectiveAgentId = textOnly
26200
+ ? (this.textAgentId || this.agentId)
26201
+ : (this.voiceAgentId || this.agentId);
26195
26202
  this.conversation = await ConversationClass.startSession({
26196
- agentId: this.agentId,
26203
+ agentId: effectiveAgentId,
26197
26204
  connectionType: textOnly ? 'websocket' : 'webrtc',
26198
26205
  overrides: {
26199
26206
  conversation: {
@@ -26372,6 +26379,7 @@ const StayliftWidget = class {
26372
26379
  placeholder: 'Type a message...',
26373
26380
  emptyTitle: 'Start a conversation',
26374
26381
  emptyDesc: 'Type a message or tap the voice button',
26382
+ emptyDescTextOnly: 'Type a message to get started',
26375
26383
  starting: 'Starting conversation',
26376
26384
  connecting: 'Connecting...',
26377
26385
  ready: 'Ready to chat',
@@ -26397,6 +26405,7 @@ const StayliftWidget = class {
26397
26405
  placeholder: 'Napisz wiadomość...',
26398
26406
  emptyTitle: 'Rozpocznij rozmowę',
26399
26407
  emptyDesc: 'Napisz wiadomość lub naciśnij przycisk głosowy',
26408
+ emptyDescTextOnly: 'Napisz wiadomość, aby rozpocząć',
26400
26409
  starting: 'Rozpoczynanie rozmowy',
26401
26410
  connecting: 'Łączenie...',
26402
26411
  ready: 'Gotowe do czatu',
@@ -26422,6 +26431,7 @@ const StayliftWidget = class {
26422
26431
  placeholder: 'Nachricht eingeben...',
26423
26432
  emptyTitle: 'Gespräch starten',
26424
26433
  emptyDesc: 'Nachricht eingeben oder Voice-Button drücken',
26434
+ emptyDescTextOnly: 'Schreiben Sie eine Nachricht, um zu beginnen',
26425
26435
  starting: 'Gespräch wird gestartet',
26426
26436
  connecting: 'Verbindung wird hergestellt...',
26427
26437
  ready: 'Bereit zum Chatten',
@@ -26500,7 +26510,7 @@ const StayliftWidget = class {
26500
26510
  renderContent() {
26501
26511
  const isConnecting = this.status === 'connecting';
26502
26512
  const isConnected = this.status === 'connected';
26503
- return (index.h("div", { class: "sl-content", ref: (el) => this.messagesContainer = el ?? null }, this.messages.length === 0 ? (index.h("div", { class: "sl-empty" }, this.avatarUrl ? (index.h("img", { src: this.avatarUrl, alt: "", class: "sl-empty-avatar" })) : (index.h("staylift-orb", { size: 48, primaryColor: this.primaryColor, isActive: false })), index.h("h3", { class: "sl-empty-title" }, isConnecting ? this.t('starting') : isConnected ? this.t('talkOrType') : this.t('emptyTitle')), index.h("p", { class: "sl-empty-desc" }, isConnecting ? this.t('connecting') : isConnected ? this.t('ready') : this.t('emptyDesc')))) : (this.messages.map((message, index$1) => (index.h("div", { class: `sl-msg sl-msg--${message.role}`, key: index$1 }, index.h("div", { class: "sl-msg-row" }, index.h("div", { class: "sl-msg-bubble" }, message.content)), message.role === 'assistant' && (index.h("div", { class: "sl-msg-actions" }, index.h("button", { class: "sl-action", onClick: () => this.copyToClipboard(message.content, index$1) }, this.copiedIndex === index$1 ? (index.h("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, index.h("polyline", { points: "20 6 9 17 4 12" }))) : (index.h("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, index.h("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }), index.h("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }))))))))))));
26513
+ return (index.h("div", { class: "sl-content", ref: (el) => this.messagesContainer = el ?? null }, this.messages.length === 0 ? (index.h("div", { class: "sl-empty" }, this.avatarUrl ? (index.h("img", { src: this.avatarUrl, alt: "", class: "sl-empty-avatar" })) : (index.h("staylift-orb", { size: 48, primaryColor: this.primaryColor, isActive: false })), index.h("h3", { class: "sl-empty-title" }, isConnecting ? this.t('starting') : isConnected ? this.t('talkOrType') : this.t('emptyTitle')), index.h("p", { class: "sl-empty-desc" }, isConnecting ? this.t('connecting') : isConnected ? this.t('ready') : this.t(this.onlyText ? 'emptyDescTextOnly' : 'emptyDesc')))) : (this.messages.map((message, index$1) => (index.h("div", { class: `sl-msg sl-msg--${message.role}`, key: index$1 }, index.h("div", { class: "sl-msg-row" }, index.h("div", { class: "sl-msg-bubble" }, message.content)), message.role === 'assistant' && (index.h("div", { class: "sl-msg-actions" }, index.h("button", { class: "sl-action", onClick: () => this.copyToClipboard(message.content, index$1) }, this.copiedIndex === index$1 ? (index.h("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, index.h("polyline", { points: "20 6 9 17 4 12" }))) : (index.h("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, index.h("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }), index.h("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }))))))))))));
26504
26514
  }
26505
26515
  renderFooter(isTransitioning) {
26506
26516
  const isDisconnected = this.status === 'disconnected';
@@ -26508,7 +26518,7 @@ const StayliftWidget = class {
26508
26518
  const isConnectedVoice = this.status === 'connected' && !this.isTextOnlyMode;
26509
26519
  // Only show text input when connected in text mode
26510
26520
  const showTextInput = isConnectedText;
26511
- return (index.h("div", { class: "sl-footer" }, isDisconnected && (index.h("div", { class: "sl-mode-toggle" }, index.h("button", { class: `sl-mode-btn ${this.selectedMode === 'text' ? 'sl-mode-btn--active' : ''}`, onClick: () => this.selectedMode = 'text' }, index.h("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, index.h("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })), this.t('modeText')), index.h("button", { class: `sl-mode-btn ${this.selectedMode === 'voice' ? 'sl-mode-btn--active' : ''}`, onClick: () => this.selectedMode = 'voice' }, index.h("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, index.h("path", { d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" }), index.h("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }), index.h("line", { x1: "12", y1: "19", x2: "12", y2: "23" }), index.h("line", { x1: "8", y1: "23", x2: "16", y2: "23" })), this.t('modeVoice')))), showTextInput && (index.h("div", { class: "sl-input-row" }, index.h("button", { class: "sl-btn sl-btn--end", onClick: () => this.handleTextButton(), disabled: isTransitioning, title: this.t('endText') }, index.h("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, index.h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), index.h("line", { x1: "6", y1: "6", x2: "18", y2: "18" }))), index.h("input", { type: "text", class: "sl-input", placeholder: this.t('placeholder'), value: this.inputText, onInput: this.handleInputChange, onKeyDown: this.handleInputKeyDown, disabled: isTransitioning }), index.h("button", { class: "sl-btn", onClick: () => this.handleSendText(), disabled: !this.inputText.trim() || isTransitioning }, index.h("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, index.h("line", { x1: "22", y1: "2", x2: "11", y2: "13" }), index.h("polygon", { points: "22 2 15 22 11 13 2 9 22 2" }))))), this.selectedMode === 'text' && isDisconnected && (index.h("div", { class: "sl-voice-controls" }, index.h("button", { class: "sl-voice-btn", onClick: () => this.handleTextButton(), disabled: isTransitioning }, index.h("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, index.h("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })), isTransitioning ? this.t('connecting') : this.t('startText')))), this.selectedMode === 'voice' && isDisconnected && (index.h("div", { class: "sl-voice-controls" }, index.h("button", { class: "sl-voice-btn", onClick: () => this.handleVoiceButton(), disabled: isTransitioning }, index.h("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, index.h("path", { d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" }), index.h("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }), index.h("line", { x1: "12", y1: "19", x2: "12", y2: "23" }), index.h("line", { x1: "8", y1: "23", x2: "16", y2: "23" })), isTransitioning ? this.t('connecting') : this.t('startVoice')))), isConnectedVoice && (index.h("div", { class: "sl-voice-controls" }, index.h("button", { class: "sl-voice-btn sl-voice-btn--end", onClick: () => this.handleVoiceButton(), disabled: isTransitioning }, index.h("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, index.h("path", { d: "M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91" }), index.h("line", { x1: "22", y1: "2", x2: "2", y2: "22" })), this.t('endVoice')))), this.showBranding && (index.h("div", { class: "sl-branding" }, index.h("a", { href: "https://stayliftnow.com", target: "_blank", rel: "noopener noreferrer" }, index.h("img", { src: "data:image/png;base64,/9j/4AAQSkZJRgABAQAASABIAAD/4QBMRXhpZgAATU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAAD/7QA4UGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAAA4QklNBCUAAAAAABDUHYzZjwCyBOmACZjs+EJ+/8IAEQgAIAAgAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAMCBAEFAAYHCAkKC//EAMMQAAEDAwIEAwQGBAcGBAgGcwECAAMRBBIhBTETIhAGQVEyFGFxIweBIJFCFaFSM7EkYjAWwXLRQ5I0ggjhU0AlYxc18JNzolBEsoPxJlQ2ZJR0wmDShKMYcOInRTdls1V1pJXDhfLTRnaA40dWZrQJChkaKCkqODk6SElKV1hZWmdoaWp3eHl6hoeIiYqQlpeYmZqgpaanqKmqsLW2t7i5usDExcbHyMnK0NTV1tfY2drg5OXm5+jp6vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAQIAAwQFBgcICQoL/8QAwxEAAgIBAwMDAgMFAgUCBASHAQACEQMQEiEEIDFBEwUwIjJRFEAGMyNhQhVxUjSBUCSRoUOxFgdiNVPw0SVgwUThcvEXgmM2cCZFVJInotIICQoYGRooKSo3ODk6RkdISUpVVldYWVpkZWZnaGlqc3R1dnd4eXqAg4SFhoeIiYqQk5SVlpeYmZqgo6SlpqeoqaqwsrO0tba3uLm6wMLDxMXGx8jJytDT1NXW19jZ2uDi4+Tl5ufo6ery8/T19vf4+fr/2wBDAAICAgICAgMCAgMFAwMDBQYFBQUFBggGBgYGBggKCAgICAgICgoKCgoKCgoMDAwMDAwODg4ODg8PDw8PDw8PDw//2wBDAQICAgQEBAcEBAcQCwkLEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/2gAMAwEAAhEDEQAAAfiPo6T9gTw/lbxH1R8xAWn0XwXsuXwv2J+cvsHnGXj/AP/aAAgBAQABBQJ2O0btujuvDXiGygZS/B6bCDwr9Yvii93+QRKL5RL8C7HvO8yb3t22f0cO3xxpg2+r22+3Pbre83K/u0XUoD//2gAIAQMRAT8BwnczyRDk/enDhl9/j+j8l+8kutyx9kUA/wD/2gAIAQIRAT8B0OVnO3//2gAIAQEABj8CajttnLc48eWgqo1XV5t08MMftLWggDvtxssUw8hKlH+VTrr9rTFZoWnZ41URJQhMyx+avw8nw7SWKbmWDaf+BASqiVfyR8S7mwljSi1jhISnyTQdNPtfB8GLe1uVxRjXFLwurhcqR5E6dv/EADMQAQADAAICAgICAwEBAAACCwERACExQVFhcYGRobHB8NEQ4fEgMEBQYHCAkKCwwNDg/9oACAEBAAE/IZsYHlgL2hFFykgNxq/8i4rZQAQHMl53M1Hu+FPRCE0H7+OCoZU37nAvVx5U656pS9EIT8wQj3YdyrMaSOzIAl5fmjVxMtl8cUFL/9oADAMBAAIRAxEAABD2kov/xAAzEQEBAQADAAECBQUBAQABAQkBABEhMRBBUWEgcfCRgaGx0cHh8TBAUGBwgJCgsMDQ4P/aAAgBAxEBPxDT3M5sJdI+Ma/bs4t0zZy8v7fT4v/aAAgBAhEBPxBPA2RcX//aAAgBAQABPxCXMUdNxPzQSDHSzRnYYmQIwJUDyoU5qBhvVIgVuSPBo61iI8V5sIdq5DxIPbJQrnR+qCA5rryHQleAAiIk2UhJuwnSp6JKa/KjgYm/NRmPignYSnymSrtfVNewxg4eEjzFnxEX/9k=", alt: "Staylift", class: "sl-branding-logo" }), this.t('poweredBy'))))));
26521
+ return (index.h("div", { class: "sl-footer" }, isDisconnected && !this.onlyText && (index.h("div", { class: "sl-mode-toggle" }, index.h("button", { class: `sl-mode-btn ${this.selectedMode === 'text' ? 'sl-mode-btn--active' : ''}`, onClick: () => this.selectedMode = 'text' }, index.h("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, index.h("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })), this.t('modeText')), index.h("button", { class: `sl-mode-btn ${this.selectedMode === 'voice' ? 'sl-mode-btn--active' : ''}`, onClick: () => this.selectedMode = 'voice' }, index.h("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, index.h("path", { d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" }), index.h("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }), index.h("line", { x1: "12", y1: "19", x2: "12", y2: "23" }), index.h("line", { x1: "8", y1: "23", x2: "16", y2: "23" })), this.t('modeVoice')))), showTextInput && (index.h("div", { class: "sl-input-row" }, index.h("button", { class: "sl-btn sl-btn--end", onClick: () => this.handleTextButton(), disabled: isTransitioning, title: this.t('endText') }, index.h("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, index.h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), index.h("line", { x1: "6", y1: "6", x2: "18", y2: "18" }))), index.h("input", { type: "text", class: "sl-input", placeholder: this.t('placeholder'), value: this.inputText, onInput: this.handleInputChange, onKeyDown: this.handleInputKeyDown, disabled: isTransitioning }), index.h("button", { class: "sl-btn", onClick: () => this.handleSendText(), disabled: !this.inputText.trim() || isTransitioning }, index.h("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, index.h("line", { x1: "22", y1: "2", x2: "11", y2: "13" }), index.h("polygon", { points: "22 2 15 22 11 13 2 9 22 2" }))))), this.selectedMode === 'text' && isDisconnected && (index.h("div", { class: "sl-voice-controls" }, index.h("button", { class: "sl-voice-btn", onClick: () => this.handleTextButton(), disabled: isTransitioning }, index.h("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, index.h("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })), isTransitioning ? this.t('connecting') : this.t('startText')))), this.selectedMode === 'voice' && isDisconnected && (index.h("div", { class: "sl-voice-controls" }, index.h("button", { class: "sl-voice-btn", onClick: () => this.handleVoiceButton(), disabled: isTransitioning }, index.h("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, index.h("path", { d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" }), index.h("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }), index.h("line", { x1: "12", y1: "19", x2: "12", y2: "23" }), index.h("line", { x1: "8", y1: "23", x2: "16", y2: "23" })), isTransitioning ? this.t('connecting') : this.t('startVoice')))), isConnectedVoice && (index.h("div", { class: "sl-voice-controls" }, index.h("button", { class: "sl-voice-btn sl-voice-btn--end", onClick: () => this.handleVoiceButton(), disabled: isTransitioning }, index.h("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, index.h("path", { d: "M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91" }), index.h("line", { x1: "22", y1: "2", x2: "2", y2: "22" })), this.t('endVoice')))), this.showBranding && (index.h("div", { class: "sl-branding" }, index.h("a", { href: "https://stayliftnow.com", target: "_blank", rel: "noopener noreferrer" }, index.h("img", { src: "data:image/png;base64,/9j/4AAQSkZJRgABAQAASABIAAD/4QBMRXhpZgAATU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAAD/7QA4UGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAAA4QklNBCUAAAAAABDUHYzZjwCyBOmACZjs+EJ+/8IAEQgAIAAgAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAMCBAEFAAYHCAkKC//EAMMQAAEDAwIEAwQGBAcGBAgGcwECAAMRBBIhBTETIhAGQVEyFGFxIweBIJFCFaFSM7EkYjAWwXLRQ5I0ggjhU0AlYxc18JNzolBEsoPxJlQ2ZJR0wmDShKMYcOInRTdls1V1pJXDhfLTRnaA40dWZrQJChkaKCkqODk6SElKV1hZWmdoaWp3eHl6hoeIiYqQlpeYmZqgpaanqKmqsLW2t7i5usDExcbHyMnK0NTV1tfY2drg5OXm5+jp6vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAQIAAwQFBgcICQoL/8QAwxEAAgIBAwMDAgMFAgUCBASHAQACEQMQEiEEIDFBEwUwIjJRFEAGMyNhQhVxUjSBUCSRoUOxFgdiNVPw0SVgwUThcvEXgmM2cCZFVJInotIICQoYGRooKSo3ODk6RkdISUpVVldYWVpkZWZnaGlqc3R1dnd4eXqAg4SFhoeIiYqQk5SVlpeYmZqgo6SlpqeoqaqwsrO0tba3uLm6wMLDxMXGx8jJytDT1NXW19jZ2uDi4+Tl5ufo6ery8/T19vf4+fr/2wBDAAICAgICAgMCAgMFAwMDBQYFBQUFBggGBgYGBggKCAgICAgICgoKCgoKCgoMDAwMDAwODg4ODg8PDw8PDw8PDw//2wBDAQICAgQEBAcEBAcQCwkLEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/2gAMAwEAAhEDEQAAAfiPo6T9gTw/lbxH1R8xAWn0XwXsuXwv2J+cvsHnGXj/AP/aAAgBAQABBQJ2O0btujuvDXiGygZS/B6bCDwr9Yvii93+QRKL5RL8C7HvO8yb3t22f0cO3xxpg2+r22+3Pbre83K/u0XUoD//2gAIAQMRAT8BwnczyRDk/enDhl9/j+j8l+8kutyx9kUA/wD/2gAIAQIRAT8B0OVnO3//2gAIAQEABj8CajttnLc48eWgqo1XV5t08MMftLWggDvtxssUw8hKlH+VTrr9rTFZoWnZ41URJQhMyx+avw8nw7SWKbmWDaf+BASqiVfyR8S7mwljSi1jhISnyTQdNPtfB8GLe1uVxRjXFLwurhcqR5E6dv/EADMQAQADAAICAgICAwEBAAACCwERACExQVFhcYGRobHB8NEQ4fEgMEBQYHCAkKCwwNDg/9oACAEBAAE/IZsYHlgL2hFFykgNxq/8i4rZQAQHMl53M1Hu+FPRCE0H7+OCoZU37nAvVx5U656pS9EIT8wQj3YdyrMaSOzIAl5fmjVxMtl8cUFL/9oADAMBAAIRAxEAABD2kov/xAAzEQEBAQADAAECBQUBAQABAQkBABEhMRBBUWEgcfCRgaGx0cHh8TBAUGBwgJCgsMDQ4P/aAAgBAxEBPxDT3M5sJdI+Ma/bs4t0zZy8v7fT4v/aAAgBAhEBPxBPA2RcX//aAAgBAQABPxCXMUdNxPzQSDHSzRnYYmQIwJUDyoU5qBhvVIgVuSPBo61iI8V5sIdq5DxIPbJQrnR+qCA5rryHQleAAiIk2UhJuwnSp6JKa/KjgYm/NRmPignYSnymSrtfVNewxg4eEjzFnxEX/9k=", alt: "Staylift", class: "sl-branding-logo" }), this.t('poweredBy'))))));
26512
26522
  }
26513
26523
  get el() { return index.getElement(this); }
26514
26524
  };
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["staylift-orb.cjs",[[1,"staylift-orb",{"inputVolume":[2,"input-volume"],"outputVolume":[2,"output-volume"],"isActive":[4,"is-active"],"primaryColor":[1,"primary-color"],"size":[8],"animationFrame":[32]}]]],["staylift-widget.cjs",[[1,"staylift-widget",{"agentId":[1,"agent-id"],"positionX":[1,"position-x"],"positionY":[1,"position-y"],"variant":[1],"mode":[1],"primaryColor":[1,"primary-color"],"brandName":[1,"brand-name"],"language":[1],"autoExpand":[4,"auto-expand"],"showBranding":[4,"show-branding"],"avatarUrl":[1,"avatar-url"],"fabPrompt":[1,"fab-prompt"],"fabButtonText":[1,"fab-button-text"],"status":[32],"isExpanded":[32],"termsAccepted":[32],"errorMessage":[32],"inputVolume":[32],"outputVolume":[32],"messages":[32],"inputText":[32],"copiedIndex":[32],"selectedMode":[32],"startConversation":[64],"endConversation":[64],"getStatus":[64],"sendMessage":[64]}]]]], options);
22
+ return index.bootstrapLazy([["staylift-orb.cjs",[[1,"staylift-orb",{"inputVolume":[2,"input-volume"],"outputVolume":[2,"output-volume"],"isActive":[4,"is-active"],"primaryColor":[1,"primary-color"],"size":[8],"animationFrame":[32]}]]],["staylift-widget.cjs",[[1,"staylift-widget",{"agentId":[1,"agent-id"],"textAgentId":[1,"text-agent-id"],"voiceAgentId":[1,"voice-agent-id"],"positionX":[1,"position-x"],"positionY":[1,"position-y"],"variant":[1],"mode":[1],"primaryColor":[1,"primary-color"],"brandName":[1,"brand-name"],"language":[1],"autoExpand":[4,"auto-expand"],"showBranding":[4,"show-branding"],"onlyText":[4,"only-text"],"avatarUrl":[1,"avatar-url"],"fabPrompt":[1,"fab-prompt"],"fabButtonText":[1,"fab-button-text"],"status":[32],"isExpanded":[32],"termsAccepted":[32],"errorMessage":[32],"inputVolume":[32],"outputVolume":[32],"messages":[32],"inputText":[32],"copiedIndex":[32],"selectedMode":[32],"startConversation":[64],"endConversation":[64],"getStatus":[64],"sendMessage":[64]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -11,6 +11,7 @@ export class StayliftWidget {
11
11
  this.language = 'en';
12
12
  this.autoExpand = false;
13
13
  this.showBranding = true;
14
+ this.onlyText = false;
14
15
  this.fabPrompt = 'Do you need help?';
15
16
  this.fabButtonText = 'Start';
16
17
  // ============ STATE ============
@@ -59,6 +60,8 @@ export class StayliftWidget {
59
60
  componentWillLoad() {
60
61
  if (this.autoExpand)
61
62
  this.isExpanded = true;
63
+ if (this.onlyText)
64
+ this.selectedMode = 'text';
62
65
  }
63
66
  disconnectedCallback() {
64
67
  this.cleanup();
@@ -129,8 +132,12 @@ export class StayliftWidget {
129
132
  }, CONNECTION_TIMEOUT);
130
133
  // Use TextConversation for text-only mode (no mic access), VoiceConversation for voice
131
134
  const ConversationClass = textOnly ? TextConversation : VoiceConversation;
135
+ // Use mode-specific agent ID if provided, otherwise fall back to main agentId
136
+ const effectiveAgentId = textOnly
137
+ ? (this.textAgentId || this.agentId)
138
+ : (this.voiceAgentId || this.agentId);
132
139
  this.conversation = await ConversationClass.startSession({
133
- agentId: this.agentId,
140
+ agentId: effectiveAgentId,
134
141
  connectionType: textOnly ? 'websocket' : 'webrtc',
135
142
  overrides: {
136
143
  conversation: {
@@ -309,6 +316,7 @@ export class StayliftWidget {
309
316
  placeholder: 'Type a message...',
310
317
  emptyTitle: 'Start a conversation',
311
318
  emptyDesc: 'Type a message or tap the voice button',
319
+ emptyDescTextOnly: 'Type a message to get started',
312
320
  starting: 'Starting conversation',
313
321
  connecting: 'Connecting...',
314
322
  ready: 'Ready to chat',
@@ -334,6 +342,7 @@ export class StayliftWidget {
334
342
  placeholder: 'Napisz wiadomość...',
335
343
  emptyTitle: 'Rozpocznij rozmowę',
336
344
  emptyDesc: 'Napisz wiadomość lub naciśnij przycisk głosowy',
345
+ emptyDescTextOnly: 'Napisz wiadomość, aby rozpocząć',
337
346
  starting: 'Rozpoczynanie rozmowy',
338
347
  connecting: 'Łączenie...',
339
348
  ready: 'Gotowe do czatu',
@@ -359,6 +368,7 @@ export class StayliftWidget {
359
368
  placeholder: 'Nachricht eingeben...',
360
369
  emptyTitle: 'Gespräch starten',
361
370
  emptyDesc: 'Nachricht eingeben oder Voice-Button drücken',
371
+ emptyDescTextOnly: 'Schreiben Sie eine Nachricht, um zu beginnen',
362
372
  starting: 'Gespräch wird gestartet',
363
373
  connecting: 'Verbindung wird hergestellt...',
364
374
  ready: 'Bereit zum Chatten',
@@ -437,7 +447,7 @@ export class StayliftWidget {
437
447
  renderContent() {
438
448
  const isConnecting = this.status === 'connecting';
439
449
  const isConnected = this.status === 'connected';
440
- return (h("div", { class: "sl-content", ref: (el) => this.messagesContainer = el ?? null }, this.messages.length === 0 ? (h("div", { class: "sl-empty" }, this.avatarUrl ? (h("img", { src: this.avatarUrl, alt: "", class: "sl-empty-avatar" })) : (h("staylift-orb", { size: 48, primaryColor: this.primaryColor, isActive: false })), h("h3", { class: "sl-empty-title" }, isConnecting ? this.t('starting') : isConnected ? this.t('talkOrType') : this.t('emptyTitle')), h("p", { class: "sl-empty-desc" }, isConnecting ? this.t('connecting') : isConnected ? this.t('ready') : this.t('emptyDesc')))) : (this.messages.map((message, index) => (h("div", { class: `sl-msg sl-msg--${message.role}`, key: index }, h("div", { class: "sl-msg-row" }, h("div", { class: "sl-msg-bubble" }, message.content)), message.role === 'assistant' && (h("div", { class: "sl-msg-actions" }, h("button", { class: "sl-action", onClick: () => this.copyToClipboard(message.content, index) }, this.copiedIndex === index ? (h("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("polyline", { points: "20 6 9 17 4 12" }))) : (h("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }), h("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }))))))))))));
450
+ return (h("div", { class: "sl-content", ref: (el) => this.messagesContainer = el ?? null }, this.messages.length === 0 ? (h("div", { class: "sl-empty" }, this.avatarUrl ? (h("img", { src: this.avatarUrl, alt: "", class: "sl-empty-avatar" })) : (h("staylift-orb", { size: 48, primaryColor: this.primaryColor, isActive: false })), h("h3", { class: "sl-empty-title" }, isConnecting ? this.t('starting') : isConnected ? this.t('talkOrType') : this.t('emptyTitle')), h("p", { class: "sl-empty-desc" }, isConnecting ? this.t('connecting') : isConnected ? this.t('ready') : this.t(this.onlyText ? 'emptyDescTextOnly' : 'emptyDesc')))) : (this.messages.map((message, index) => (h("div", { class: `sl-msg sl-msg--${message.role}`, key: index }, h("div", { class: "sl-msg-row" }, h("div", { class: "sl-msg-bubble" }, message.content)), message.role === 'assistant' && (h("div", { class: "sl-msg-actions" }, h("button", { class: "sl-action", onClick: () => this.copyToClipboard(message.content, index) }, this.copiedIndex === index ? (h("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("polyline", { points: "20 6 9 17 4 12" }))) : (h("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }), h("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }))))))))))));
441
451
  }
442
452
  renderFooter(isTransitioning) {
443
453
  const isDisconnected = this.status === 'disconnected';
@@ -445,7 +455,7 @@ export class StayliftWidget {
445
455
  const isConnectedVoice = this.status === 'connected' && !this.isTextOnlyMode;
446
456
  // Only show text input when connected in text mode
447
457
  const showTextInput = isConnectedText;
448
- return (h("div", { class: "sl-footer" }, isDisconnected && (h("div", { class: "sl-mode-toggle" }, h("button", { class: `sl-mode-btn ${this.selectedMode === 'text' ? 'sl-mode-btn--active' : ''}`, onClick: () => this.selectedMode = 'text' }, h("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })), this.t('modeText')), h("button", { class: `sl-mode-btn ${this.selectedMode === 'voice' ? 'sl-mode-btn--active' : ''}`, onClick: () => this.selectedMode = 'voice' }, h("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("path", { d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" }), h("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }), h("line", { x1: "12", y1: "19", x2: "12", y2: "23" }), h("line", { x1: "8", y1: "23", x2: "16", y2: "23" })), this.t('modeVoice')))), showTextInput && (h("div", { class: "sl-input-row" }, h("button", { class: "sl-btn sl-btn--end", onClick: () => this.handleTextButton(), disabled: isTransitioning, title: this.t('endText') }, h("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { x1: "6", y1: "6", x2: "18", y2: "18" }))), h("input", { type: "text", class: "sl-input", placeholder: this.t('placeholder'), value: this.inputText, onInput: this.handleInputChange, onKeyDown: this.handleInputKeyDown, disabled: isTransitioning }), h("button", { class: "sl-btn", onClick: () => this.handleSendText(), disabled: !this.inputText.trim() || isTransitioning }, h("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("line", { x1: "22", y1: "2", x2: "11", y2: "13" }), h("polygon", { points: "22 2 15 22 11 13 2 9 22 2" }))))), this.selectedMode === 'text' && isDisconnected && (h("div", { class: "sl-voice-controls" }, h("button", { class: "sl-voice-btn", onClick: () => this.handleTextButton(), disabled: isTransitioning }, h("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })), isTransitioning ? this.t('connecting') : this.t('startText')))), this.selectedMode === 'voice' && isDisconnected && (h("div", { class: "sl-voice-controls" }, h("button", { class: "sl-voice-btn", onClick: () => this.handleVoiceButton(), disabled: isTransitioning }, h("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("path", { d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" }), h("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }), h("line", { x1: "12", y1: "19", x2: "12", y2: "23" }), h("line", { x1: "8", y1: "23", x2: "16", y2: "23" })), isTransitioning ? this.t('connecting') : this.t('startVoice')))), isConnectedVoice && (h("div", { class: "sl-voice-controls" }, h("button", { class: "sl-voice-btn sl-voice-btn--end", onClick: () => this.handleVoiceButton(), disabled: isTransitioning }, h("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("path", { d: "M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91" }), h("line", { x1: "22", y1: "2", x2: "2", y2: "22" })), this.t('endVoice')))), this.showBranding && (h("div", { class: "sl-branding" }, h("a", { href: "https://stayliftnow.com", target: "_blank", rel: "noopener noreferrer" }, h("img", { src: "data:image/png;base64,/9j/4AAQSkZJRgABAQAASABIAAD/4QBMRXhpZgAATU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAAD/7QA4UGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAAA4QklNBCUAAAAAABDUHYzZjwCyBOmACZjs+EJ+/8IAEQgAIAAgAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAMCBAEFAAYHCAkKC//EAMMQAAEDAwIEAwQGBAcGBAgGcwECAAMRBBIhBTETIhAGQVEyFGFxIweBIJFCFaFSM7EkYjAWwXLRQ5I0ggjhU0AlYxc18JNzolBEsoPxJlQ2ZJR0wmDShKMYcOInRTdls1V1pJXDhfLTRnaA40dWZrQJChkaKCkqODk6SElKV1hZWmdoaWp3eHl6hoeIiYqQlpeYmZqgpaanqKmqsLW2t7i5usDExcbHyMnK0NTV1tfY2drg5OXm5+jp6vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAQIAAwQFBgcICQoL/8QAwxEAAgIBAwMDAgMFAgUCBASHAQACEQMQEiEEIDFBEwUwIjJRFEAGMyNhQhVxUjSBUCSRoUOxFgdiNVPw0SVgwUThcvEXgmM2cCZFVJInotIICQoYGRooKSo3ODk6RkdISUpVVldYWVpkZWZnaGlqc3R1dnd4eXqAg4SFhoeIiYqQk5SVlpeYmZqgo6SlpqeoqaqwsrO0tba3uLm6wMLDxMXGx8jJytDT1NXW19jZ2uDi4+Tl5ufo6ery8/T19vf4+fr/2wBDAAICAgICAgMCAgMFAwMDBQYFBQUFBggGBgYGBggKCAgICAgICgoKCgoKCgoMDAwMDAwODg4ODg8PDw8PDw8PDw//2wBDAQICAgQEBAcEBAcQCwkLEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/2gAMAwEAAhEDEQAAAfiPo6T9gTw/lbxH1R8xAWn0XwXsuXwv2J+cvsHnGXj/AP/aAAgBAQABBQJ2O0btujuvDXiGygZS/B6bCDwr9Yvii93+QRKL5RL8C7HvO8yb3t22f0cO3xxpg2+r22+3Pbre83K/u0XUoD//2gAIAQMRAT8BwnczyRDk/enDhl9/j+j8l+8kutyx9kUA/wD/2gAIAQIRAT8B0OVnO3//2gAIAQEABj8CajttnLc48eWgqo1XV5t08MMftLWggDvtxssUw8hKlH+VTrr9rTFZoWnZ41URJQhMyx+avw8nw7SWKbmWDaf+BASqiVfyR8S7mwljSi1jhISnyTQdNPtfB8GLe1uVxRjXFLwurhcqR5E6dv/EADMQAQADAAICAgICAwEBAAACCwERACExQVFhcYGRobHB8NEQ4fEgMEBQYHCAkKCwwNDg/9oACAEBAAE/IZsYHlgL2hFFykgNxq/8i4rZQAQHMl53M1Hu+FPRCE0H7+OCoZU37nAvVx5U656pS9EIT8wQj3YdyrMaSOzIAl5fmjVxMtl8cUFL/9oADAMBAAIRAxEAABD2kov/xAAzEQEBAQADAAECBQUBAQABAQkBABEhMRBBUWEgcfCRgaGx0cHh8TBAUGBwgJCgsMDQ4P/aAAgBAxEBPxDT3M5sJdI+Ma/bs4t0zZy8v7fT4v/aAAgBAhEBPxBPA2RcX//aAAgBAQABPxCXMUdNxPzQSDHSzRnYYmQIwJUDyoU5qBhvVIgVuSPBo61iI8V5sIdq5DxIPbJQrnR+qCA5rryHQleAAiIk2UhJuwnSp6JKa/KjgYm/NRmPignYSnymSrtfVNewxg4eEjzFnxEX/9k=", alt: "Staylift", class: "sl-branding-logo" }), this.t('poweredBy'))))));
458
+ return (h("div", { class: "sl-footer" }, isDisconnected && !this.onlyText && (h("div", { class: "sl-mode-toggle" }, h("button", { class: `sl-mode-btn ${this.selectedMode === 'text' ? 'sl-mode-btn--active' : ''}`, onClick: () => this.selectedMode = 'text' }, h("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })), this.t('modeText')), h("button", { class: `sl-mode-btn ${this.selectedMode === 'voice' ? 'sl-mode-btn--active' : ''}`, onClick: () => this.selectedMode = 'voice' }, h("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("path", { d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" }), h("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }), h("line", { x1: "12", y1: "19", x2: "12", y2: "23" }), h("line", { x1: "8", y1: "23", x2: "16", y2: "23" })), this.t('modeVoice')))), showTextInput && (h("div", { class: "sl-input-row" }, h("button", { class: "sl-btn sl-btn--end", onClick: () => this.handleTextButton(), disabled: isTransitioning, title: this.t('endText') }, h("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { x1: "6", y1: "6", x2: "18", y2: "18" }))), h("input", { type: "text", class: "sl-input", placeholder: this.t('placeholder'), value: this.inputText, onInput: this.handleInputChange, onKeyDown: this.handleInputKeyDown, disabled: isTransitioning }), h("button", { class: "sl-btn", onClick: () => this.handleSendText(), disabled: !this.inputText.trim() || isTransitioning }, h("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("line", { x1: "22", y1: "2", x2: "11", y2: "13" }), h("polygon", { points: "22 2 15 22 11 13 2 9 22 2" }))))), this.selectedMode === 'text' && isDisconnected && (h("div", { class: "sl-voice-controls" }, h("button", { class: "sl-voice-btn", onClick: () => this.handleTextButton(), disabled: isTransitioning }, h("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })), isTransitioning ? this.t('connecting') : this.t('startText')))), this.selectedMode === 'voice' && isDisconnected && (h("div", { class: "sl-voice-controls" }, h("button", { class: "sl-voice-btn", onClick: () => this.handleVoiceButton(), disabled: isTransitioning }, h("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("path", { d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" }), h("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }), h("line", { x1: "12", y1: "19", x2: "12", y2: "23" }), h("line", { x1: "8", y1: "23", x2: "16", y2: "23" })), isTransitioning ? this.t('connecting') : this.t('startVoice')))), isConnectedVoice && (h("div", { class: "sl-voice-controls" }, h("button", { class: "sl-voice-btn sl-voice-btn--end", onClick: () => this.handleVoiceButton(), disabled: isTransitioning }, h("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("path", { d: "M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91" }), h("line", { x1: "22", y1: "2", x2: "2", y2: "22" })), this.t('endVoice')))), this.showBranding && (h("div", { class: "sl-branding" }, h("a", { href: "https://stayliftnow.com", target: "_blank", rel: "noopener noreferrer" }, h("img", { src: "data:image/png;base64,/9j/4AAQSkZJRgABAQAASABIAAD/4QBMRXhpZgAATU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAAD/7QA4UGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAAA4QklNBCUAAAAAABDUHYzZjwCyBOmACZjs+EJ+/8IAEQgAIAAgAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAMCBAEFAAYHCAkKC//EAMMQAAEDAwIEAwQGBAcGBAgGcwECAAMRBBIhBTETIhAGQVEyFGFxIweBIJFCFaFSM7EkYjAWwXLRQ5I0ggjhU0AlYxc18JNzolBEsoPxJlQ2ZJR0wmDShKMYcOInRTdls1V1pJXDhfLTRnaA40dWZrQJChkaKCkqODk6SElKV1hZWmdoaWp3eHl6hoeIiYqQlpeYmZqgpaanqKmqsLW2t7i5usDExcbHyMnK0NTV1tfY2drg5OXm5+jp6vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAQIAAwQFBgcICQoL/8QAwxEAAgIBAwMDAgMFAgUCBASHAQACEQMQEiEEIDFBEwUwIjJRFEAGMyNhQhVxUjSBUCSRoUOxFgdiNVPw0SVgwUThcvEXgmM2cCZFVJInotIICQoYGRooKSo3ODk6RkdISUpVVldYWVpkZWZnaGlqc3R1dnd4eXqAg4SFhoeIiYqQk5SVlpeYmZqgo6SlpqeoqaqwsrO0tba3uLm6wMLDxMXGx8jJytDT1NXW19jZ2uDi4+Tl5ufo6ery8/T19vf4+fr/2wBDAAICAgICAgMCAgMFAwMDBQYFBQUFBggGBgYGBggKCAgICAgICgoKCgoKCgoMDAwMDAwODg4ODg8PDw8PDw8PDw//2wBDAQICAgQEBAcEBAcQCwkLEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/2gAMAwEAAhEDEQAAAfiPo6T9gTw/lbxH1R8xAWn0XwXsuXwv2J+cvsHnGXj/AP/aAAgBAQABBQJ2O0btujuvDXiGygZS/B6bCDwr9Yvii93+QRKL5RL8C7HvO8yb3t22f0cO3xxpg2+r22+3Pbre83K/u0XUoD//2gAIAQMRAT8BwnczyRDk/enDhl9/j+j8l+8kutyx9kUA/wD/2gAIAQIRAT8B0OVnO3//2gAIAQEABj8CajttnLc48eWgqo1XV5t08MMftLWggDvtxssUw8hKlH+VTrr9rTFZoWnZ41URJQhMyx+avw8nw7SWKbmWDaf+BASqiVfyR8S7mwljSi1jhISnyTQdNPtfB8GLe1uVxRjXFLwurhcqR5E6dv/EADMQAQADAAICAgICAwEBAAACCwERACExQVFhcYGRobHB8NEQ4fEgMEBQYHCAkKCwwNDg/9oACAEBAAE/IZsYHlgL2hFFykgNxq/8i4rZQAQHMl53M1Hu+FPRCE0H7+OCoZU37nAvVx5U656pS9EIT8wQj3YdyrMaSOzIAl5fmjVxMtl8cUFL/9oADAMBAAIRAxEAABD2kov/xAAzEQEBAQADAAECBQUBAQABAQkBABEhMRBBUWEgcfCRgaGx0cHh8TBAUGBwgJCgsMDQ4P/aAAgBAxEBPxDT3M5sJdI+Ma/bs4t0zZy8v7fT4v/aAAgBAhEBPxBPA2RcX//aAAgBAQABPxCXMUdNxPzQSDHSzRnYYmQIwJUDyoU5qBhvVIgVuSPBo61iI8V5sIdq5DxIPbJQrnR+qCA5rryHQleAAiIk2UhJuwnSp6JKa/KjgYm/NRmPignYSnymSrtfVNewxg4eEjzFnxEX/9k=", alt: "Staylift", class: "sl-branding-logo" }), this.t('poweredBy'))))));
449
459
  }
450
460
  static get is() { return "staylift-widget"; }
451
461
  static get encapsulation() { return "shadow"; }
@@ -480,6 +490,44 @@ export class StayliftWidget {
480
490
  "reflect": false,
481
491
  "attribute": "agent-id"
482
492
  },
493
+ "textAgentId": {
494
+ "type": "string",
495
+ "mutable": false,
496
+ "complexType": {
497
+ "original": "string",
498
+ "resolved": "string | undefined",
499
+ "references": {}
500
+ },
501
+ "required": false,
502
+ "optional": true,
503
+ "docs": {
504
+ "tags": [],
505
+ "text": ""
506
+ },
507
+ "getter": false,
508
+ "setter": false,
509
+ "reflect": false,
510
+ "attribute": "text-agent-id"
511
+ },
512
+ "voiceAgentId": {
513
+ "type": "string",
514
+ "mutable": false,
515
+ "complexType": {
516
+ "original": "string",
517
+ "resolved": "string | undefined",
518
+ "references": {}
519
+ },
520
+ "required": false,
521
+ "optional": true,
522
+ "docs": {
523
+ "tags": [],
524
+ "text": ""
525
+ },
526
+ "getter": false,
527
+ "setter": false,
528
+ "reflect": false,
529
+ "attribute": "voice-agent-id"
530
+ },
483
531
  "positionX": {
484
532
  "type": "string",
485
533
  "mutable": false,
@@ -684,6 +732,26 @@ export class StayliftWidget {
684
732
  "attribute": "show-branding",
685
733
  "defaultValue": "true"
686
734
  },
735
+ "onlyText": {
736
+ "type": "boolean",
737
+ "mutable": false,
738
+ "complexType": {
739
+ "original": "boolean",
740
+ "resolved": "boolean",
741
+ "references": {}
742
+ },
743
+ "required": false,
744
+ "optional": false,
745
+ "docs": {
746
+ "tags": [],
747
+ "text": ""
748
+ },
749
+ "getter": false,
750
+ "setter": false,
751
+ "reflect": false,
752
+ "attribute": "only-text",
753
+ "defaultValue": "false"
754
+ },
687
755
  "avatarUrl": {
688
756
  "type": "string",
689
757
  "mutable": false,