Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/audio-lines-float-icon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@perspective-ai/sdk": patch
---

Change the float launcher's default icon from a microphone to lucide's AudioLines icon for the voice and voice+text channels.
4 changes: 2 additions & 2 deletions packages/sdk/src/float.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
ensureHostPreconnect,
} from "./iframe";
import { createLoadingIndicator } from "./loading";
import { injectStyles, MIC_ICON, MESSAGES_ICON, CLOSE_ICON } from "./styles";
import { injectStyles, AUDIO_ICON, MESSAGES_ICON, CLOSE_ICON } from "./styles";
import { getPersistedOpenState, setPersistedOpenState } from "./state";
import {
cn,
Expand Down Expand Up @@ -106,7 +106,7 @@ function resolveTeaserConfig(
export function getDefaultIconHtml(config: InternalEmbedConfig): string {
return getChannelMode(resolveChannel(config)) === "text"
? MESSAGES_ICON
: MIC_ICON;
: AUDIO_ICON;
}

export function createIconImg(
Expand Down
16 changes: 11 additions & 5 deletions packages/sdk/src/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -463,18 +463,24 @@ export function injectStyles(): void {
document.head.appendChild(style);
}

export const MIC_ICON = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 18.75a6 6 0 006-6v-1.5m-6 7.5a6 6 0 01-6-6v-1.5m6 7.5v3.75m-3.75 0h7.5M12 15.75a3 3 0 01-3-3V4.5a3 3 0 116 0v8.25a3 3 0 01-3 3z" />
export const AUDIO_ICON = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-audio-lines-icon lucide-audio-lines">
<path d="M2 10v3"/>
<path d="M6 6v11"/>
<path d="M10 3v18"/>
<path d="M14 8v7"/>
<path d="M18 5v13"/>
<path d="M22 10v3"/>
</svg>`;

// export const MIC_ICON = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
// <path stroke-linecap="round" stroke-linejoin="round" d="M12 18.75a6 6 0 006-6v-1.5m-6 7.5a6 6 0 01-6-6v-1.5m6 7.5v3.75m-3.75 0h7.5M12 15.75a3 3 0 01-3-3V4.5a3 3 0 116 0v8.25a3 3 0 01-3 3z" />
// </svg>`;

Comment thread
LEVI-RIVKIN marked this conversation as resolved.
export const MESSAGES_ICON = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-messages-square-icon lucide-messages-square">
<path d="M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"/>
<path d="M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1"/>
</svg>`;

/** @deprecated Use MIC_ICON instead */
export const CHAT_ICON = MIC_ICON;

export const CLOSE_ICON = `<svg xmlns="http://www.w3.org/2000/svg" class="lucide-x" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
</svg>`;
Loading