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

93 lines
2.0 KiB
TypeScript

import { Lightbulb, X } from '@hanzogui/lucide-icons-2'
import { useEffect, useState } from 'react'
import { Button, Popover, Theme } from '@hanzo/gui'
import { useThemeBuilderStore } from '~/features/studio/theme/store/ThemeBuilderStore'
export function StudioCurrentStepTip() {
const store = useThemeBuilderStore()
const Tip = store.currentSection.tip
// open after a bit of a delay because animations need to settle
const [show, setShow] = useState(false)
useEffect(() => {
if (store.showExplanationSteps === false) {
return
}
if (!Tip) {
setShow(false)
} else {
const tm = setTimeout(() => {
setShow(true)
}, 1000)
return () => {
clearTimeout(tm)
}
}
}, [Tip])
const button = (
<Button
cursor="default"
size="$2"
chromeless
scaleIcon={1.2}
circular
icon={Lightbulb}
my="$-1"
ml="$2"
onPress={() => {
setShow(!show)
}}
/>
)
if (!Tip) {
return null
}
return (
<Popover open={show} size="$5" allowFlip placement="bottom">
<Popover.Trigger asChild>{button}</Popover.Trigger>
<Theme name="yellow">
<Popover.Content
trapFocus={false}
borderWidth={2}
borderColor="$borderColor"
enterStyle={{ y: -10, opacity: 0 }}
exitStyle={{ y: -10, opacity: 0 }}
elevate
maxW={500}
transition={[
'quickest',
{
opacity: {
overshootClamping: true,
},
},
]}
>
<Popover.Arrow borderWidth={2} borderColor="$borderColor" />
<Tip />
<Button
size="$2"
circular
position="absolute"
t="$-3"
r="$-3"
icon={X}
onPress={() => {
setShow(false)
}}
></Button>
</Popover.Content>
</Theme>
</Popover>
)
}