Files
supabase/packages/dev-tools/DevToolbarLogo.tsx
Alaister YoungandAlaister Young ff4638535e chore(dev-tools): remove next dependency (#53902)
Removes the `next` dependency from `packages/dev-tools` so it works
cleanly across both Next.js apps (`www`, `docs`) and TanStack Start
(`studio`).

**Removed:**

- `next/image` imports in `DevToolbar` and `DevToolbarTrigger`
- `next/image` mock and `next/navigation` test mock in
`packages/dev-tools`
- `next` and `next-router-mock` from `packages/dev-tools/package.json`
- `apps/studio/public/img/logo-pixel-small-light.png` (now unused)

**Added:**

- `DevToolbarLogo` component using an inline data URI for the 244-byte
pixel logo (also fixes the missing `/img/logo-pixel-small-light.png`
icon in `docs` and `www`). It's decorative (`alt=""` + `aria-hidden`)
since the trigger and sheet are already labelled

## To test

- Open the dev toolbar in Studio, Docs, and WWW in local dev
(`window.devToolbar()`) and verify the pixel logo renders in both the
trigger button and the toolbar header
- Run `packages/dev-tools` tests and typecheck (`getEventCountBadge >
returns a capped pill for large counts` also fails on master and isn't
touched here)

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-11-24 19:25:28 +08:00

22 lines
923 B
TypeScript

// 38x43 pixel logo inlined as a data URI so it renders in any host app regardless
// of its public assets or basePath.
const DEV_TOOLBAR_LOGO_DATA_URI =
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAArBAMAAADmjedDAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAVUExURUdwTBcXFxgYGBcXFxgYGBcXFxcXF3Y86DkAAAAGdFJOUwCgPuNgcJApY/cAAABWSURBVCjPY2CAgrS0JAZ0QFUxRUFBDDG3tDTqiTG5uIihizGmQQDtxNIwQNKQFBOEAqhAsqCgELofk1Hjl0IxY2NDDDEB9DREbbFUJSUFGqZxIEAKNwCAcpJYod0/5gAAAABJRU5ErkJggg=='
export function DevToolbarLogo({ className }: { className?: string }) {
return (
<img
src={DEV_TOOLBAR_LOGO_DATA_URI}
alt=""
width={16}
height={16}
style={{
filter:
'brightness(0) saturate(100%) invert(72%) sepia(57%) saturate(431%) hue-rotate(108deg) brightness(95%) contrast(91%)',
}}
aria-hidden="true"
className={className}
/>
)
}