"use client";
import React from "react";
import { Frame } from "./frame";
export function CopilotKitCSS() {
return (
);
}
export const handleMouseMove = (e: any) => {
const tooltip: any = document.querySelector(".tooltip");
tooltip.style.display = "block";
const rect = tooltip.parentElement.getBoundingClientRect();
tooltip.style.left = `${e.clientX - rect.left + 15}px`;
tooltip.style.top = `${e.clientY - rect.top + 15}px`;
let element = e.target;
while (element && element !== document.body) {
if (element.classList.contains("copilotKitHeader")) {
tooltip.innerHTML =
"--copilot-kit-contrast-color: Header background color.
--copilot-kit-primary-color: Header text color.";
return;
} else if (element.classList.contains("copilotKitAssistantMessage")) {
tooltip.innerHTML =
"--copilot-kit-secondary-contrast-color: Assistant message text color.
--copilot-kit-primary-color: Assistant message action buttons color.";
return;
} else if (element.classList.contains("copilotKitUserMessage")) {
tooltip.innerHTML =
"--copilot-kit-primary-color: User message background color.
--copilot-kit-contrast-color: User message text color.";
return;
} else if (element.classList.contains("copilotKitMessages")) {
tooltip.innerHTML =
"--copilot-kit-background-color: Chat window background color.
--copilot-kit-separator-color: Chat window scrollbar color.";
return;
} else if (element.classList.contains("sendButton")) {
tooltip.innerHTML =
"--copilot-kit-primary-color: Active button color";
return;
} else if (element.classList.contains("micButton")) {
tooltip.innerHTML =
"--copilot-kit-muted-color: Muted button color";
return;
} else if (element.classList.contains("copilotKitInput")) {
tooltip.innerHTML =
"--copilot-kit-separator-color: Input box border color.
--copilot-kit-muted-color: Placeholder color.";
return;
} else if (element.classList.contains("poweredBy")) {
tooltip.innerHTML =
`The "Powered by CopilotKit" watermark is removed automatically for Copilot Cloud users`;
return;
}
element = element.parentElement;
}
tooltip.style.display = "none";
};
export const handleMouseLeave = (e: any) => {
const tooltip: any = document.querySelector(".tooltip");
tooltip.style.display = "none";
};
export const InteractiveCSSInspector = () => {
return (
<>
Powered by CopilotKit