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

34 lines
969 B
TypeScript

import { useColorScheme } from 'react-native'
import { GuiProvider, type GuiProviderProps } from '@hanzo/gui'
import { ToastProvider, ToastViewport } from '@hanzogui/toast'
import { CurrentToast } from './CurrentToast'
import { config } from '../hanzogui.config'
export function Provider({
children,
...rest
}: Omit<GuiProviderProps, 'config' | 'defaultTheme'>) {
const colorScheme = useColorScheme()
return (
<GuiProvider
config={config}
defaultTheme={colorScheme === 'dark' ? 'dark' : 'light'}
{...rest}
>
<ToastProvider
swipeDirection="horizontal"
duration={6000}
native={[
// uncomment the next line to do native toasts on mobile. NOTE: it'll require you making a dev build and won't work with Expo Go
// 'mobile'
]}
>
{children}
<CurrentToast />
<ToastViewport top="$8" left={0} right={0} />
</ToastProvider>
</GuiProvider>
)
}