Files
zeekayandHanzo Dev 751ef5c778 rename the framework to @hanzo/gui and the loader to @hanzogui/loader
Both old names are owned by a different npm account (artemis-prime), so
publishing them returns 403 — which is how this surfaced: the 8.0.0 run
shipped @hanzogui/logo and @hanzogui/demos depending on [email protected], a
version that cannot be published and therefore does not exist. Those two
were uninstallable.

@hanzo/gui and @hanzogui/* are ours, so the framework now carries the name
it is imported by everywhere downstream, and the loader moves under the
scope we control.

The rewrite is limited to package references. `DEBUG?.startsWith('hanzogui')`
is a log-namespace filter and join(dir, 'hanzogui') is a path — rewriting
either would change behaviour, so both are untouched.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-30 20:23:18 -07:00

97 lines
2.8 KiB
TypeScript

import { Image } from '@hanzogui/image'
import { FastForward, Pause, Rewind } from '@hanzogui/lucide-icons-2'
import { memo } from 'react'
import type { ThemeName, YStackProps } from '@hanzo/gui'
import { Button, Paragraph, Separator, Square, Theme, XStack, YStack } from '@hanzo/gui'
import image from './tame-impala.jpg'
export const MediaPlayer = memo(
(
props: YStackProps & {
alt?: number | null
onHoverSection?: (name: string) => void
pointerEventsControls?: any
}
) => {
const {
theme,
alt,
onHoverSection,
pointerEvents,
pointerEventsControls,
...cardProps
} = props
const tint = !alt ? null : (`alt${alt}` as ThemeName)
return (
<YStack display="flex" items="stretch" contain="strict" minW={330} minH={222}>
<Theme name={tint}>
<YStack
overflow="visible"
borderWidth={1}
borderColor="$borderColor"
bg="$color1"
rounded="$7"
pointerEvents={pointerEvents}
p={0}
items="stretch"
mb={40}
{...cardProps}
>
<XStack items="center" p="$4" gap="$5">
<Square position="relative" overflow="hidden" rounded="$6" size="$8">
<Image src={image} width={90} height={90} />
</Square>
<YStack items="center" y={-3} minW={165} justify="center">
<Paragraph fontWeight="700">The Less I Know the Better</Paragraph>
<Paragraph color="$color11" size="$3">
Tame Impala
</Paragraph>
<Paragraph color="$color11" opacity={0.65} size="$3">
Currents
</Paragraph>
</YStack>
</XStack>
<Separator mb={-1} />
<XStack
z={1000}
width="100%"
px="$6"
py="$4"
bg="$backgroundHover"
borderBottomRightRadius={17}
borderBottomLeftRadius={17}
items="center"
gap="$5"
justify="center"
pointerEvents={pointerEvents}
>
<Rewind size={20} />
<Button
bg="$background"
hoverStyle={{
bg: '$backgroundHover',
elevation: '$6',
scale: 1.025,
}}
my="$-7"
icon={Pause}
size="$8"
circular
elevation="$2"
aria-label="Pause"
pointerEvents={pointerEventsControls}
/>
<FastForward size={20} />
</XStack>
</YStack>
</Theme>
</YStack>
)
}
)