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

146 lines
4.7 KiB
TypeScript

import { ChevronLeft, ChevronRight } from '@hanzogui/lucide-icons-2'
import type { Href } from 'one'
import type { ReactNode } from 'react'
import { Paragraph, View, XStack, YStack } from '@hanzo/gui'
import { Container } from '~/components/Containers'
import { Link } from '~/components/Link'
import { DocsQuickNav, type Heading } from './DocsQuickNav'
type DocsPageFrameProps = {
children: ReactNode
headings?: Heading[]
editUrl?: string
previous?: { route: string; title: string } | null
next?: { route: string; title: string } | null
}
export function DocsPageFrame({
children,
headings,
editUrl,
previous,
next,
}: DocsPageFrameProps) {
return (
<>
{/* main content */}
<YStack flex={1} flexBasis="auto" py="$8" px="$4">
<YStack render="article">
<Container position="relative">{children}</Container>
<Container>
{(previous || next) && (
<XStack
aria-label="Pagination navigation"
my="$9"
justify="space-between"
gap="$4"
>
{previous && (
<Link href={previous.route as Href} asChild>
<XStack
render="a"
group="card"
hoverStyle={{
borderColor: '$color5',
}}
flex={1}
width="50%"
p="$5"
rounded="$2"
borderWidth={1}
borderColor="$borderColor"
aria-label={`Previous page: ${previous.title}`}
items="center"
gap="$4"
transition="100ms"
>
<View
opacity={0}
x="$-2"
$group-card-hover={{ opacity: 1, x: '$0' }}
transition="quickest"
>
<ChevronLeft color="$color11" />
</View>
<YStack
x="$-4"
$group-card-hover={{ x: '$0' }}
transition="quicker"
>
<Paragraph select="none" color="$color10" size="$5">
Previous
</Paragraph>
<Paragraph select="none" size="$3" color="$gray10">
{previous.title}
</Paragraph>
</YStack>
</XStack>
</Link>
)}
{next && (
<Link href={next.route as Href} asChild>
<XStack
render="a"
group="card"
hoverStyle={{
borderColor: '$color5',
}}
flex={1}
width="50%"
p="$5"
rounded="$2"
borderWidth={1}
borderColor="$borderColor"
aria-label={`Next page: ${next.title}`}
items="center"
justify="flex-end"
gap="$4"
transition="100ms"
>
<YStack x="$4" $group-card-hover={{ x: '$0' }} transition="quicker">
<Paragraph select="none" color="$color10" size="$5">
Next
</Paragraph>
<Paragraph select="none" size="$3" color="$gray10">
{next.title}
</Paragraph>
</YStack>
<View
opacity={0}
x="$2"
$group-card-hover={{ opacity: 1, x: '$0' }}
transition="quickest"
>
<ChevronRight color="$color11" />
</View>
</XStack>
</Link>
)}
</XStack>
)}
</Container>
{editUrl && (
<Container my="$3">
<Link
href={editUrl as Href}
rel="noopener noreferrer"
target="_blank"
opacity={0.4}
>
Edit this page on GitHub.
</Link>
</Container>
)}
</YStack>
</YStack>
{/* right sidebar - sticky */}
<DocsQuickNav headings={headings} />
</>
)
}