ttp-agent-sdk 2.40.0 → 2.44.0

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.
@@ -816,6 +816,33 @@
816
816
  line-height: 1;
817
817
  }
818
818
 
819
+ /* Match SDK default pill: waveform in frosted circle */
820
+ .mock-pill-icon.mock-pill-icon--wave {
821
+ background: rgba(255, 255, 255, 0.15);
822
+ }
823
+ .mock-pill-waveform {
824
+ display: flex;
825
+ align-items: center;
826
+ gap: 2px;
827
+ height: 16px;
828
+ }
829
+ .mock-pill-waveform .bar {
830
+ width: 2px;
831
+ background: #fff;
832
+ border-radius: 1px;
833
+ animation: mockPillWaveAnim 0.8s ease-in-out infinite;
834
+ transform-origin: center bottom;
835
+ }
836
+ .mock-pill-waveform .bar:nth-child(1) { height: 5px; animation-delay: 0s; }
837
+ .mock-pill-waveform .bar:nth-child(2) { height: 10px; animation-delay: 0.1s; }
838
+ .mock-pill-waveform .bar:nth-child(3) { height: 16px; animation-delay: 0.2s; }
839
+ .mock-pill-waveform .bar:nth-child(4) { height: 8px; animation-delay: 0.3s; }
840
+ .mock-pill-waveform .bar:nth-child(5) { height: 12px; animation-delay: 0.4s; }
841
+ @keyframes mockPillWaveAnim {
842
+ 0%, 100% { transform: scaleY(0.4); }
843
+ 50% { transform: scaleY(1); }
844
+ }
845
+
819
846
  .mock-pill-text {
820
847
  display: flex;
821
848
  flex-direction: column;
@@ -1815,8 +1842,10 @@
1815
1842
  <div class="mock-prompt-bubble" id="mockPromptBubble" style="display: none;"></div>
1816
1843
  <div class="mock-pulse-rings" id="mockPulseRings" style="display: none;"></div>
1817
1844
  <button class="mock-pill-launcher" id="mockButton" data-element-type="button">
1818
- <div class="mock-pill-icon" id="mockPillIcon">
1819
- <img src="https://talktopc.com/logo192.png" alt="" style="width:22px;height:22px;border-radius:50%;object-fit:cover;">
1845
+ <div class="mock-pill-icon mock-pill-icon--wave" id="mockPillIcon">
1846
+ <div class="mock-pill-waveform" aria-hidden="true">
1847
+ <span class="bar"></span><span class="bar"></span><span class="bar"></span><span class="bar"></span><span class="bar"></span>
1848
+ </div>
1820
1849
  </div>
1821
1850
  <div class="mock-pill-text" id="mockPillText">
1822
1851
  <span class="mock-pill-title" id="mockPillTitle">Chat Assistant</span>
@@ -1977,7 +2006,6 @@
1977
2006
  },
1978
2007
  icon: {
1979
2008
  type: 'custom',
1980
- customImage: 'https://talktopc.com/logo192.png',
1981
2009
  size: 'medium',
1982
2010
  backgroundColor: '#FFFFFF'
1983
2011
  },
@@ -2175,17 +2203,23 @@
2175
2203
  const iconConfig = widgetConfig.icon;
2176
2204
  const headerConfig = widgetConfig.header;
2177
2205
 
2178
- // Update pill icon
2206
+ // Update pill icon (SDK: custom URL → image; else animated waveform like mobile FAB)
2179
2207
  const pillIcon = document.getElementById('mockPillIcon');
2180
2208
  if (pillIcon) {
2181
- if (iconConfig.type === 'custom' && iconConfig.customImage) {
2209
+ const hasCustomUrl = iconConfig.type === 'custom' && iconConfig.customImage != null && String(iconConfig.customImage).trim() !== '';
2210
+ if (hasCustomUrl) {
2211
+ pillIcon.className = 'mock-pill-icon';
2182
2212
  pillIcon.innerHTML = `<img src="${iconConfig.customImage}" alt="" style="width:22px;height:22px;border-radius:50%;object-fit:cover;">`;
2213
+ pillIcon.style.backgroundColor = iconConfig.backgroundColor || '#ffffff';
2183
2214
  } else if (iconConfig.type === 'emoji') {
2215
+ pillIcon.className = 'mock-pill-icon';
2184
2216
  pillIcon.innerHTML = `<span class="pill-emoji">${iconConfig.emoji || '🤖'}</span>`;
2217
+ pillIcon.style.backgroundColor = iconConfig.backgroundColor || '#ffffff';
2185
2218
  } else {
2186
- pillIcon.innerHTML = `<img src="${iconConfig.customImage || 'https://talktopc.com/logo192.png'}" alt="" style="width:22px;height:22px;border-radius:50%;object-fit:cover;">`;
2219
+ pillIcon.className = 'mock-pill-icon mock-pill-icon--wave';
2220
+ pillIcon.innerHTML = '<div class="mock-pill-waveform" aria-hidden="true"><span class="bar"></span><span class="bar"></span><span class="bar"></span><span class="bar"></span><span class="bar"></span></div>';
2221
+ pillIcon.style.backgroundColor = '';
2187
2222
  }
2188
- pillIcon.style.backgroundColor = iconConfig.backgroundColor || '#ffffff';
2189
2223
  }
2190
2224
 
2191
2225
  // Update pill title and status
@@ -3179,7 +3213,7 @@
3179
3213
  </div>
3180
3214
  <div class="control-item" id="iconCustomImageControl" style="display: ${widgetConfig.icon.type === 'custom' ? 'block' : 'none'};">
3181
3215
  <label>Image URL</label>
3182
- <input type="text" id="iconCustomImage" value="${widgetConfig.icon.customImage || 'https://talktopc.com/logo192.png'}" placeholder="https://talktopc.com/logo192.png">
3216
+ <input type="text" id="iconCustomImage" value="${widgetConfig.icon.customImage || ''}" placeholder="Optional image URL — leave empty for waveform">
3183
3217
  </div>
3184
3218
  <div class="control-item" id="iconEmojiControl" style="display: ${widgetConfig.icon.type === 'emoji' ? 'block' : 'none'};">
3185
3219
  <label>Emoji</label>
@@ -4518,7 +4552,6 @@
4518
4552
  },
4519
4553
  icon: {
4520
4554
  type: 'custom',
4521
- customImage: 'https://talktopc.com/logo192.png',
4522
4555
  size: 'medium',
4523
4556
  backgroundColor: '#FFFFFF'
4524
4557
  },
@@ -5240,7 +5273,6 @@
5240
5273
  },
5241
5274
  icon: {
5242
5275
  type: 'custom',
5243
- customImage: 'https://talktopc.com/logo192.png',
5244
5276
  size: 'medium',
5245
5277
  backgroundColor: '#FFFFFF'
5246
5278
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ttp-agent-sdk",
3
- "version": "2.40.0",
3
+ "version": "2.44.0",
4
4
  "description": "Comprehensive Voice Agent SDK with Customizable Widget - Real-time audio, WebSocket communication, React components, and extensive customization options",
5
5
  "main": "dist/agent-widget.js",
6
6
  "module": "dist/agent-widget.esm.js",
@@ -19,7 +19,6 @@
19
19
  "README.md",
20
20
  "GETTING_STARTED.md",
21
21
  "ENHANCED_WIDGET_GUIDE.md",
22
- "SIGNED_LINK_GUIDE.md",
23
22
  "WORDPRESS_WIX_GUIDE.md"
24
23
  ],
25
24
  "scripts": {