refactor(logo): HanzoLogoIcon consumes @hanzo/logo (single source)

Stop re-typing the block-H path data — import MARK_PATHS/MARK_VIEWBOX from
@hanzo/logo (the one geometry home). Byte-identical mark, same props
(className/size/currentColor), 4 consumers unaffected. Needs @hanzo/logo
published install to update the pnpm lock (deploy-gate); scoped tsc of the
changed file green against real react + logo types.
This commit is contained in:
Hanzo Dev
2026-07-21 09:35:43 -07:00
parent b81e6561fb
commit fff0b4cf27
2 changed files with 16 additions and 16 deletions
+6 -5
View File
@@ -29,18 +29,20 @@
},
"homepage": "https://hanzo.ai/chat",
"dependencies": {
"@hanzo/ai": "^0.2.1",
"@hanzo/ui": "npm:@hanzo/ui-shadcn@^5.7.4",
"@hanzo/event": "^0.2.0",
"@ariakit/react": "^0.4.15",
"@ariakit/react-core": "^0.4.17",
"@codesandbox/sandpack-react": "^2.19.10",
"@dicebear/collection": "^9.2.2",
"@dicebear/core": "^9.2.2",
"@hanzo/ai": "^0.2.1",
"@hanzo/event": "^0.2.0",
"@hanzo/iam": "^0.13.1",
"@hanzo/logo": "^1.0.13",
"@hanzo/ui": "npm:@hanzo/ui-shadcn@^5.7.4",
"@hanzo/usage": "^0.1.6",
"@headlessui/react": "^2.1.2",
"@hanzochat/client": "workspace:*",
"@hanzochat/data-provider": "workspace:*",
"@headlessui/react": "^2.1.2",
"@marsidev/react-turnstile": "^1.1.0",
"@mcp-ui/client": "^5.7.0",
"@radix-ui/react-accordion": "^1.1.2",
@@ -81,7 +83,6 @@
"input-otp": "^1.4.2",
"jotai": "^2.12.5",
"js-cookie": "^3.0.5",
"@hanzochat/data-provider": "workspace:*",
"lodash": "^4.17.23",
"lucide-react": "^0.394.0",
"match-sorter": "^8.1.0",
+10 -11
View File
@@ -1,4 +1,5 @@
import React from 'react';
import { MARK_PATHS, MARK_VIEWBOX } from '@hanzo/logo';
export interface HanzoLogoIconProps extends React.SVGProps<SVGSVGElement> {
/** Pixel size; when set, applies to width and height. */
@@ -8,20 +9,22 @@ export interface HanzoLogoIconProps extends React.SVGProps<SVGSVGElement> {
}
/**
* Official Hanzo ▼/H mark — monochrome, `currentColor` fill.
* Official Hanzo block-H mark — monochrome, `currentColor` fill.
*
* Canonical brand source: `@hanzo/logo` (hanzo.app / hanzo.ai favicon set).
* Drop-in replacement for the upstream Chat lucide `Feather` brand fallback.
* Geometry comes from `@hanzo/logo` (`MARK_PATHS` / `MARK_VIEWBOX`, the ONE home
* of the mark) — this component no longer re-types the paths. Drop-in
* replacement for the upstream Chat lucide `Feather` brand fallback.
*/
export default function HanzoLogoIcon({
className = '',
size,
strokeWidth: _strokeWidth,
children: _children,
...props
}: HanzoLogoIconProps) {
return (
<svg
viewBox="0 0 67 67"
viewBox={MARK_VIEWBOX}
className={className}
{...(size != null ? { width: size, height: size } : {})}
fill="currentColor"
@@ -29,12 +32,8 @@ export default function HanzoLogoIcon({
aria-label="Hanzo"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<path d="M22.21 67V44.6369H0V67H22.21Z" />
<path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" />
<path d="M22.21 0H0V22.3184H22.21V0Z" />
<path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" />
<path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" />
</svg>
// MARK_PATHS is a build-time-trusted @hanzo/logo constant — never user input.
dangerouslySetInnerHTML={{ __html: MARK_PATHS }}
/>
);
}