feat(FN-1503): refine Kimi logo with official crescent moon brand mark
- Update ProviderIcon with Kimi's official crescent moon brand mark - Add comprehensive tests for ProviderIcon component with Kimi logo variants - Include changeset for @gsxdsm/fusion package
This commit is contained in:
@@ -131,8 +131,10 @@ function ZaiIcon({ size, color, label = "Z.ai" }: { size: number; color: string;
|
||||
);
|
||||
}
|
||||
|
||||
// Kimi / Moonshot AI logo — stylized "K" mark from official Moonshot AI brand identity
|
||||
// Source: https://iconify.design/icon/logos:moonshot-ai
|
||||
// Kimi / Moonshot AI logo — crescent moon mark from official Moonshot AI brand identity
|
||||
// Source: https://raw.githubusercontent.com/gilbarbara/logos/master/logos/moonshot-ai.svg
|
||||
// The moon crescent shape is derived from the official Moonshot AI logo
|
||||
// For a 24x24 icon, we use a simplified crescent moon path
|
||||
function KimiIcon({ size, color, label = "Kimi" }: { size: number; color: string; label?: string }) {
|
||||
return (
|
||||
<svg
|
||||
@@ -144,9 +146,9 @@ function KimiIcon({ size, color, label = "Kimi" }: { size: number; color: string
|
||||
data-testid="kimi-icon"
|
||||
aria-label={label}
|
||||
>
|
||||
{/* Stylized "K" character from Moonshot AI brand */}
|
||||
{/* Crescent moon from official Moonshot AI logo mark */}
|
||||
<path
|
||||
d="M5.5 5.5h8v2.5h-5v2h3.5v2.5h-3.5v6.5h-3z"
|
||||
d="M12 3a9 9 0 1 0 9 9c0-.46-.04-.92-.1-1.36a5.39 5.39 0 0 1-4.4 2.26 5.4 5.4 0 0 1-3.14-9.8c.2-.07.4-.1.64-.1z"
|
||||
fill={color}
|
||||
/>
|
||||
</svg>
|
||||
|
||||
@@ -290,4 +290,19 @@ describe("ProviderIcon", () => {
|
||||
const wrapper = screen.getByTestId("kimi-icon").parentElement;
|
||||
expect(wrapper).toHaveAttribute("data-provider", "moonshot");
|
||||
});
|
||||
|
||||
// Regression test: verify the Kimi icon is the crescent moon shape, not the old "K" placeholder
|
||||
it("renders crescent moon icon geometry (not the old K placeholder)", () => {
|
||||
render(<ProviderIcon provider="kimi" />);
|
||||
const svg = screen.getByTestId("kimi-icon");
|
||||
const path = svg.querySelector("path");
|
||||
expect(path).toBeInTheDocument();
|
||||
|
||||
// The old "K" placeholder path was: "M5.5 5.5h8v2.5h-5v2h3.5v2.5h-3.5v6.5h-3z"
|
||||
// The new crescent moon path should contain "a9 9" (circle arc) not "h8" (horizontal line)
|
||||
const pathD = path?.getAttribute("d") || "";
|
||||
expect(pathD).not.toBe("M5.5 5.5h8v2.5h-5v2h3.5v2.5h-3.5v6.5h-3z");
|
||||
// Verify the new crescent moon geometry: contains circle arc notation "a9 9"
|
||||
expect(pathD).toContain("a9 9");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user