@hanzogui/web
v8.3.5 · types/index.d.ts · 188 values · 298 types
Exports
_disableMediaTouch
valueexport declare function _disableMediaTouch(val: boolean): void;
@hanzogui/web/types/hooks/useMedia.d.ts
_withStableStyle
valueexport declare const _withStableStyle: (Component: any, createStyle: (theme: any, expressions: any[]) => object, hasThemeKeys?: boolean, hasMediaKeys?: boolean) => React.NamedExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
@hanzogui/web/types/_withStableStyle.d.ts
AddWebOnlyStyleProps
typeexport type AddWebOnlyStyleProps<A> = Partial<CSSProperties> & Partial<WebOnlyValidStyleValues> & { [K in Exclude<keyof A, keyof CSSProperties>]?: A[K]; };
@hanzogui/web/types/types.d.ts
AllGroupContexts
typeexport type AllGroupContexts = { [GroupName: string]: SingleGroupContext; };
@hanzogui/web/types/types.d.ts
AllowedValueSettingColor
typeexport type AllowedValueSettingColor = GetThemeValueSettingForCategory<'color'>;
@hanzogui/web/types/types.d.ts
AllowedValueSettingRadius
typeexport type AllowedValueSettingRadius = GetThemeValueSettingForCategory<'radius'>;
@hanzogui/web/types/types.d.ts
AllowedValueSettingSize
typeexport type AllowedValueSettingSize = GetThemeValueSettingForCategory<'size'>;
@hanzogui/web/types/types.d.ts
AllowedValueSettingSpace
typeexport type AllowedValueSettingSpace = GetThemeValueSettingForCategory<'space'>;
@hanzogui/web/types/types.d.ts
AllowedValueSettingZIndex
typeexport type AllowedValueSettingZIndex = GetThemeValueSettingForCategory<'zIndex'>;
@hanzogui/web/types/types.d.ts
AllPlatforms
typeexport type AllPlatforms = 'web' | 'native' | 'android' | 'ios' | 'tv' | 'androidtv' | 'tvos';
@hanzogui/web/types/types.d.ts
AnimatedNumberStrategy
typeexport type AnimatedNumberStrategy = { type: 'spring'; stiffness?: number; damping?: number; mass?: number; overshootClamping?: boolean; restSpeedThreshold?: number; restDisplacementThreshold?: number; } | { type: 'timing'; duration: number; } | { type: 'direct'; };
@hanzogui/web/types/types.d.ts
AnimationConfigType
typeexport type AnimationConfigType = any;
@hanzogui/web/types/types.d.ts
AnimationDriver
typeexport type AnimationDriver<A extends AnimationConfig = AnimationConfig> = { isReactNative?: boolean; /** What style format the driver expects as input: 'css' (CSS variables) or 'value' (resolved values) */ inputStyle?: 'css' | 'value'; /** How the driver outputs styles: 'css' (className-based) or 'inline' (style object) */ outputStyle?: 'css' | 'inline'; needsCustomComponent?: boolean; avoidReRenders?: boolean; onMount?: () => void; /** When true, this is a stub driver with no real animation support */ isStub?: boolean; useAnimations: UseAnimationHook; usePresence: () => UsePresenceResult; ResetPresence: (props: { children?: React.ReactNode; disabled?: boolean; }) => React.ReactNode; useAnimatedNumber: UseAnimatedNumber; useAnimatedNumberStyle: UseAnimatedNumberStyle; useAnimatedNumbersStyle?: UseAnimatedNumbersStyle; useAnimatedNumberReaction: UseAnimatedNumberReaction; animations: A; View?: any; Text?: any; };
@hanzogui/web/types/types.d.ts
AnimationDriverKeys
typeexport type AnimationDriverKeys = 'default' | Extract<Exclude<GuiConfig['animationDriverKeys'], undefined>, string> | (ReturnType<TypeOverride['animationDrivers']> extends 1 ? never : ReturnType<TypeOverride['animationDrivers']>);
@hanzogui/web/types/types.d.ts
AnimationsConfig
typeAnimation drivers config - can be a single driver or named drivers object. If object, must include a 'default' key.
export type AnimationsConfig = AnimationDriver<any> | AnimationsConfigObject;
@hanzogui/web/types/types.d.ts
AnimationsConfigObject
typeexport type AnimationsConfigObject = { default: AnimationDriver<any>; [key: string]: AnimationDriver<any>; };
@hanzogui/web/types/types.d.ts
autoVariables
valueexport declare const autoVariables: Variable[];
@hanzogui/web/types/helpers/registerCSSVariable.d.ts
BaseStyleProps
typeexport type BaseStyleProps = { [Key in keyof TextStylePropsBase]?: TextStyle[Key] | GetThemeValueForKey<Key>; } & { [Key in keyof StackStyleBase]?: StackStyle[Key] | GetThemeValueForKey<Key>; };
@hanzogui/web/types/types.d.ts
BorderValue
typeexport type BorderValue = BorderPreset | (string & {});
@hanzogui/web/types/types.d.ts
BoxShadowValue
typeexport type BoxShadowValue = BoxShadowPreset | (string & {});
@hanzogui/web/types/types.d.ts
CallbackSetState
typeexport type CallbackSetState<State> = (next: (cb: State) => State) => void;
@hanzogui/is-equal-shallow/types/index.d.ts
ChildGroupState
typeexport type ChildGroupState = { pseudo?: PseudoGroupState; media?: Record<MediaQueryKey extends number ? never : MediaQueryKey, boolean>; };
@hanzogui/web/types/types.d.ts
clamp
valueexport declare function clamp(value: number, [min, max]: [number, number]): number;
@hanzogui/helpers/types/clamp.d.ts
ClassNamesObject
typeexport type ClassNamesObject = Record<string, string>;
@hanzogui/web/types/types.d.ts
ClientOnly
valueexport declare const ClientOnly: ({ children, enabled, }: { children: any; enabled?: boolean; }) => React.ReactNode;
@hanzogui/use-did-finish-ssr/types/ClientOnly.d.ts
ClientOnlyContext
valueexport declare const ClientOnlyContext: React.Context<boolean>;
@hanzogui/use-did-finish-ssr/types/ClientOnly.d.ts
ColorKeys
typeexport type ColorKeys = 'color' | 'backgroundColor' | 'borderColor' | 'borderBottomColor' | 'borderTopColor' | 'borderLeftColor' | 'borderRightColor' | 'shadowColor' | 'outlineColor' | 'textShadowColor' | 'borderBlockColor' | 'borderBlockEndColor' | 'borderBlockStartColor' | 'borderInlineColor' | 'borderInlineStartColor' | 'borderInlineEndColor';
@hanzogui/web/types/types.d.ts
ColorScheme
typeexport type ColorScheme = 'light' | 'dark';
@hanzogui/web/types/types.d.ts
ColorStyleProp
typeexport type ColorStyleProp = ThemeValueFallbackColor | ColorTokens;
@hanzogui/web/types/types.d.ts
ColorTokens
typeexport type ColorTokens = ColorTokenBase | CSSColorNames | TokenWithOpacity;
@hanzogui/web/types/types.d.ts
ColorVariantSpreadFunction
typeexport type ColorVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, ColorTokens>;
@hanzogui/web/types/types.d.ts
ComponentContext
valueexport declare const ComponentContext: import("../types.tsx").StyledContext<ComponentContextI>;
@hanzogui/web/types/contexts/ComponentContext.d.ts
ComponentContextI
typeexport type ComponentContextI = { disableSSR?: boolean; inText: boolean; language: LanguageContextType | null; animationDriver: AnimationDriver | null; setParentFocusState: ComponentSetStateShallow | null; mediaEmit?: (state: UseMediaState) => void; mediaEmitListeners?: Set<(state: UseMediaState) => void>; insets?: { top: number; right: number; bottom: number; left: number; } | null; };
@hanzogui/web/types/types.d.ts
ComponentGroupEmitter
typeexport type ComponentGroupEmitter = { listeners: Set<GroupStateListener>; emit: GroupStateListener; subscribe: (cb: GroupStateListener) => () => void; };
@hanzogui/web/types/types.d.ts
ComponentGroupState
typeexport type ComponentGroupState = { pseudo?: PseudoGroupState; layout?: WidthHeight; };
@hanzogui/web/types/types.d.ts
componentSetStates
valueexport declare const componentSetStates: Set<ComponentSetState>;
@hanzogui/web/types/createComponent.d.ts
ComponentSetStateShallow
typeexport type ComponentSetStateShallow = React.Dispatch<React.SetStateAction<Partial<GuiComponentState>>>;
@hanzogui/web/types/types.d.ts
composeEventHandlers
valueexport declare function composeEventHandlers<E extends Events>(og?: EventHandler<E> | null, next?: EventHandler<E> | null, { checkDefaultPrevented }?: { checkDefaultPrevented?: boolean | undefined; }): EventHandler<E> | undefined;
@hanzogui/helpers/types/composeEventHandlers.d.ts
composeRefs
valueA utility to compose multiple refs together Accepts callback refs and RefObject(s)
export declare function composeRefs<T>(...refs: PossibleRef<T>[]): (node: T) => void;
@hanzogui/compose-refs/types/compose-refs.d.ts
ConfigListener
typeexport type ConfigListener = (conf: GuiInternalConfig) => void;
@hanzogui/web/types/types.d.ts
Configuration
valueexport declare const Configuration: (props: ConfigurationProps) => React.JSX.Element;
@hanzogui/web/types/views/Configuration.d.ts
configureMedia
valueexport declare const configureMedia: (config: GuiInternalConfig) => void;
@hanzogui/web/types/hooks/useMedia.d.ts
createComponent
valueexport declare function createComponent<ComponentPropTypes extends Record<string, any> = {}, Ref extends GuiElement = GuiElement, BaseProps = never, BaseStyles extends object = never>(staticConfig: StaticConfig): GuiComponent<ComponentPropTypes, Ref, BaseProps, BaseStyles, {}>;
@hanzogui/web/types/createComponent.d.ts
createCSSVariable
valueexport declare const createCSSVariable: (nameProp: string, includeVar?: boolean) => string;
@hanzogui/web/types/createVariable.d.ts
createFont
valueexport declare const createFont: <A extends GenericFont>(font: A) => A;
@hanzogui/web/types/createFont.d.ts
createGui
valueexport declare function createGui<Conf extends CreateGuiProps>(configIn: Conf): InferGuiConfig<Conf>;
@hanzogui/web/types/createGui.d.ts
CreateGuiConfig
typeexport type CreateGuiConfig<A extends GenericTokens, B extends GenericThemes, C extends GenericShorthands = GenericShorthands, D extends GenericMedia = GenericMedia, E extends GenericAnimations = GenericAnimations, F extends GenericFonts = GenericFonts, H extends GenericGuiSettings = GenericGuiSettings, AnimDriverKeys extends string = string> = { fonts: RemoveLanguagePostfixes<F>; fontLanguages: GetLanguagePostfixes<F> extends never ? string[] : GetLanguagePostfixes<F>[]; tokens: A; themes: { [Name in keyof B]: { [Key in keyof B[Name]]: CoerceToVariable<B[Name][Key]>; }; }; shorthands: C; media: D; animations: AnimationDriver<E> | AnimationsConfigObject; animationDriverKeys?: AnimDriverKeys; settings: H; };
@hanzogui/web/types/types.d.ts
CreateGuiProps
typeexport type CreateGuiProps = { reactNative?: any; shorthands?: CreateShorthands; media?: GenericGuiConfig['media']; /** * Animation driver(s) configuration. * Can be a single driver or an object of named drivers (must include 'default'). * @example * // Single driver * animations: createAnimations({ slow: '...', fast: '...' }) * // Multiple named drivers * animations: { default: cssDriver, spring: motiDriver } */ animations?: AnimationsConfig; fonts?: GenericGuiConfig['fonts']; tokens?: GenericGuiConfig['tokens']; themes?: { [key: string]: { [key: string]: string | number | Variable; }; }; settings?: Partial<GenericGuiSettings>; /** * Web-only: define text-selection CSS */ selectionStyles?: (theme: Record<string, string>) => null | { backgroundColor?: any; color?: any; }; defaultProps?: Record<string, any> & { Text?: TextProps; View?: StackNonStyleProps & StackStyle; }; };
@hanzogui/web/types/types.d.ts
createMediaStyle
valueexport declare const createMediaStyle: (styleObject: StyleObject, mediaKeyIn: string, mediaQueries: MediaQueries, type: IsMediaType, negate?: boolean, priority?: number) => MediaStyleObject;
@hanzogui/web/types/helpers/createMediaStyle.d.ts
createShorthands
valueexport declare function createShorthands<A extends CreateShorthands>(shorthands: A): A;
@hanzogui/web/types/createShorthands.d.ts
CreateShorthands
typeexport type CreateShorthands = { [key: string]: string; };
@hanzogui/web/types/types.d.ts
createStyledContext
valueexport declare const createStyledContext: <VariantProps extends Record<string, any>>(defaultValues?: VariantProps, namespace?: string) => StyledContext<VariantProps>;
@hanzogui/web/types/helpers/createStyledContext.d.ts
createTokens
valueexport declare function createTokens<T extends CreateTokens>(tokens: T): MakeTokens<T>;
@hanzogui/web/types/createTokens.d.ts
CreateTokens
typeexport type CreateTokens<Val extends VariableVal = VariableVal> = Record<string, { [key: GenericKey]: Val; }> & { color?: { [key: GenericKey]: Val; }; space?: { [key: GenericKey]: Val; }; size?: { [key: GenericKey]: Val; }; radius?: { [key: GenericKey]: Val; }; zIndex?: { [key: GenericKey]: Val; }; };
@hanzogui/web/types/types.d.ts
createVariable
valueexport declare const createVariable: <A extends string | number | Variable = any>(props: VariableIn<A>, skipHash?: boolean) => Variable<A>;
@hanzogui/web/types/createVariable.d.ts
createVariables
valueexport declare const createVariables: <A extends DeepTokenObject>(tokens: A, parentPath?: string, isFont?: boolean) => DeepVariableObject<A>;
@hanzogui/web/types/createVariables.d.ts
cssShorthandLonghands
valueexport declare const cssShorthandLonghands: { borderWidth: boolean; borderStyle: boolean; borderColor: boolean; borderTopWidth: boolean; borderTopStyle: boolean; borderTopColor: boolean; borderRightWidth: boolean; borderRightStyle: boolean; borderRightColor: boolean; borderBottomWidth: boolean; borderBottomStyle: boolean; borderBottomColor: boolean; borderLeftWidth: boolean; borderLeftStyle: boolean; borderLeftColor: boolean; outlineWidth: boolean; outlineStyle: boolean; outlineColor: boolean; outlineOffset: boolean; };
@hanzogui/helpers/types/validStyleProps.d.ts
currentPlatform
valueReflects Platform.OS. TV platforms are intentionally NOT separate values: - Android TV has Platform.OS === 'android' (react-native-tvos behavior) - tvOS has Platform.OS === 'ios' (react-native-tvos behavior) Use `isTV` combined with `isAndroid`/`isIos` to detect specific TV platforms.
export declare const currentPlatform: 'web' | 'ios' | 'native' | 'android';
@hanzogui/constants/types/constants.d.ts
DebugProp
typeexport type DebugProp = boolean | 'break' | 'verbose' | 'visualize' | 'profile';
@hanzogui/web/types/types.d.ts
DedupedTheme
typeexport type DedupedTheme = { names: string[]; theme: ThemeParsed; };
@hanzogui/web/types/types.d.ts
DedupedThemes
typeexport type DedupedThemes = DedupedTheme[];
@hanzogui/web/types/types.d.ts
DeepVariableObject
typeexport type DeepVariableObject<A extends DeepTokenObject> = { [Key in keyof A]: A[Key] extends string | number ? Variable<A[Key]> : A[Key] extends DeepTokenObject ? DeepVariableObject<A[Key]> : never; };
@hanzogui/web/types/createVariables.d.ts
defaultMediaImportance
valueexport declare const defaultMediaImportance: number;
@hanzogui/web/types/helpers/pseudoDescriptors.d.ts
didGetVariableValue
valueexport declare const didGetVariableValue: () => boolean;
@hanzogui/web/types/createVariable.d.ts
Display
typeWhich layout algorithm runs. CSS's own selector, and the one place a layout mode is named — there is no second prop and no component that means `grid` by existing. On web every value is the browser's. On native, Yoga has Flex, None and Contents and nothing else, so `grid` and `inline-grid` cross as `flex` (expandStyle.ts): a grid with no template fills one implicit column top to bottom, which is what a flex column does, so a one-dimensional grid arrives intact. Two-dimensional placement has no flex equivalent and does not cross — the properties that express it are web-only and are stripped there. The mode does NOT narrow which properties are accepted, and that was tried rather than assumed. A discriminated union on `display` — grid properties `never` unless display is grid, flexDirection `never` when it is — narrows exactly right and rejects exactly the six cases it should. It is not affordable here. These props are ~380 wide and already near TypeScript's ceiling, and any union intersected into them distributes across all of it: placed in GetFinalProps it took @hanzogui/form to TS2590 "union type too complex to represent", and placed on View alone it took @hanzogui/collapsible to the same error. `interface X extends ViewProps` also stops compiling (TS2312), and that is a published idiom. What it would have bought is small: naming a track list without `display: grid` renders a flex column instead of a grid, which you see immediately. The failures worth catching here were the ones you cannot see, and those are closed at runtime instead — grid properties are stripped on native rather than handed to an engine with no grid, and XStack resolves its axis against the mode instead of laying out backwards.
export type Display = 'inherit' | 'none' | 'inline' | 'block' | 'contents' | 'flex' | 'inline-flex' | 'grid' | 'inline-grid' | 'list-item';
@hanzogui/web/types/types.d.ts
DisposeFn
typeexport type DisposeFn = () => void;
@hanzogui/web/types/types.d.ts
DivAttributes
typeexport type DivAttributes = HTMLAttributes<HTMLDivElement>;
@hanzogui/web/types/types.d.ts
ensureThemeVariable
valueexport declare function ensureThemeVariable(theme: any, key: string): void;
@hanzogui/web/types/helpers/themes.d.ts
EventHandler
typeexport type EventHandler<E extends Events> = (event: E) => void;
@hanzogui/helpers/types/composeEventHandlers.d.ts
ExplicitNativePlatform
typeexport type ExplicitNativePlatform = Exclude<NativePlatform, 'mobile'>;
@hanzogui/helpers/types/shouldRenderNativePlatform.d.ts
ExtendBaseStackProps
typeexport interface ExtendBaseStackProps { }
@hanzogui/web/types/types.d.ts
ExtendBaseTextProps
typeexport interface ExtendBaseTextProps { }
@hanzogui/web/types/types.d.ts
extractPseudoState
valueExtracts pseudo state from GuiComponentState for storage in prevPseudoState
export declare function extractPseudoState(state: GuiComponentState): PseudoState;
@hanzogui/web/types/helpers/pseudoTransitions.d.ts
Falsy
type`StyleProp` copied from React Native: Exported to fix https://github.com/hanzoai/gui/issues/1258
export type Falsy = undefined | null | false | '';
@hanzogui/web/types/types.d.ts
FillInFont
typeexport type FillInFont<A extends GenericFont, DefaultKeys extends string | number> = { family: string; lineHeight: FillInFontValues<A, 'lineHeight', DefaultKeys>; weight: FillInFontValues<A, 'weight', DefaultKeys>; letterSpacing: FillInFontValues<A, 'letterSpacing', DefaultKeys>; size: FillInFontValues<A, 'size', DefaultKeys>; style: FillInFontValues<A, 'style', DefaultKeys>; transform: FillInFontValues<A, 'transform', DefaultKeys>; color: FillInFontValues<A, 'color', DefaultKeys>; face: Partial<A['face']>; };
@hanzogui/web/types/types.d.ts
FilterValue
typeexport type FilterValue = FilterPreset | (string & {});
@hanzogui/web/types/types.d.ts
fixStyles
valueexport declare function fixStyles(style: Record<string, any>): void;
@hanzogui/web/types/helpers/expandStyles.d.ts
Font
typeexport type Font = ParseFont<Fonts>;
@hanzogui/web/types/types.d.ts
FONT_DATA_ATTRIBUTE_NAME
valueexport declare const FONT_DATA_ATTRIBUTE_NAME = "data-hanzogui-font";
@hanzogui/web/types/constants/constants.d.ts
FontColorTokens
typeexport type FontColorTokens = FontColorTokenBase | number | TokenWithOpacity;
@hanzogui/web/types/types.d.ts
FontFamilyTokens
typeexport type FontFamilyTokens = GetTokenString<GetTokenFontKeysFor<'family'>>;
@hanzogui/web/types/types.d.ts
FontKeys
typeexport type FontKeys = 'fontFamily';
@hanzogui/web/types/types.d.ts
FontLanguage
valueexport declare function FontLanguage({ children, ...props }: FontLanguageProps): import("react").JSX.Element; export declare namespace FontLanguage { var displayName: string; }
@hanzogui/web/types/views/FontLanguage.d.ts
FontLanguageProps
typeexport type FontLanguageProps = LanguageContextType & { children?: React.ReactNode; };
@hanzogui/web/types/types.d.ts
FontLanguages
typeexport type FontLanguages = ArrayIntersection<GuiConfig['fontLanguages']>;
@hanzogui/web/types/types.d.ts
FontLetterSpacingKeys
typeexport type FontLetterSpacingKeys = 'letterSpacing';
@hanzogui/web/types/types.d.ts
FontLetterSpacingTokens
typeexport type FontLetterSpacingTokens = `$${GetTokenFontKeysFor<'letterSpacing'>}` | number | RemString;
@hanzogui/web/types/types.d.ts
FontLetterSpacingVariantSpreadFunction
typeexport type FontLetterSpacingVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, FontLetterSpacingTokens>;
@hanzogui/web/types/types.d.ts
FontLineHeightTokens
typeexport type FontLineHeightTokens = `$${GetTokenFontKeysFor<'lineHeight'>}` | number | RemString;
@hanzogui/web/types/types.d.ts
FontLineHeightVariantSpreadFunction
typeexport type FontLineHeightVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, FontLineHeightTokens>;
@hanzogui/web/types/types.d.ts
Fonts
typeexport type Fonts = DefaultFont extends string ? GuiConfig['fonts'][DefaultFont] : never;
@hanzogui/web/types/types.d.ts
FontSizeKeys
typeexport type FontSizeKeys = 'fontSize';
@hanzogui/web/types/types.d.ts
FontSizeTokens
typeexport type FontSizeTokens = GetTokenString<GetTokenFontKeysFor<'size'>> | number | RemString;
@hanzogui/web/types/types.d.ts
FontSizeVariantSpreadFunction
typeexport type FontSizeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, FontSizeTokens>;
@hanzogui/web/types/types.d.ts
FontStyleTokens
typeexport type FontStyleTokens = `$${GetTokenFontKeysFor<'style'>}` | RNTextStyle['fontStyle'];
@hanzogui/web/types/types.d.ts
FontStyleVariantSpreadFunction
typeexport type FontStyleVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, FontStyleTokens>;
@hanzogui/web/types/types.d.ts
FontTokens
typeexport type FontTokens = GetTokenString<keyof GuiConfig['fonts']>;
@hanzogui/web/types/types.d.ts
FontTransformTokens
typeexport type FontTransformTokens = `$${GetTokenFontKeysFor<'transform'>}` | RNTextStyle['textTransform'];
@hanzogui/web/types/types.d.ts
FontTransformVariantSpreadFunction
typeexport type FontTransformVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, FontTransformTokens>;
@hanzogui/web/types/types.d.ts
FontWeightKeys
typeexport type FontWeightKeys = 'fontWeight';
@hanzogui/web/types/types.d.ts
FontWeightTokens
typeexport type FontWeightTokens = `$${GetTokenFontKeysFor<'weight'>}` | FontWeightValues;
@hanzogui/web/types/types.d.ts
FontWeightValues
typeexport type FontWeightValues = `${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}00` | 'bold' | 'normal';
@hanzogui/web/types/types.d.ts
forceUpdateThemes
valueexport declare const forceUpdateThemes: () => void;
@hanzogui/web/types/hooks/useThemeState.d.ts
GenericFont
typeexport type GenericFont<Key extends GenericFontKey = GenericFontKey> = { size: { [key in Key]: number | Variable; }; family?: string | Variable; lineHeight?: Partial<{ [key in Key]: number | Variable; }> | undefined; letterSpacing?: Partial<{ [key in Key]: number | Variable; }> | undefined; weight?: Partial<{ [key in Key]: number | string | Variable; }> | undefined; style?: Partial<{ [key in Key]: RNTextStyle['fontStyle'] | Variable; }> | undefined; transform?: Partial<{ [key in Key]: RNTextStyle['textTransform'] | Variable; }> | undefined; color?: Partial<{ [key in Key]: string | Variable; }> | undefined; face?: Partial<{ [key in FontWeightValues]: { normal?: string; italic?: string; }; }> | undefined; };
@hanzogui/web/types/types.d.ts
GenericFonts
typeexport type GenericFonts = Record<string, GenericFont>;
@hanzogui/web/types/types.d.ts
GenericGuiConfig
typeexport type GenericGuiConfig = CreateGuiConfig<GenericTokens, GenericThemes, GenericShorthands, GenericMedia, GenericAnimations, GenericFonts>;
@hanzogui/web/types/types.d.ts
GenericGuiSettings
typeexport interface GenericGuiSettings { /** * controls style semantics where React Native/Yoga and CSS differ. * * - "legacy": preserves Gui v1 flex expansion. * - "react-native": follows React Native/Yoga flex and raw numeric lineHeight semantics. * - "web": follows CSS flex and unitless numeric lineHeight semantics. * * @default "web" */ styleCompat?: 'legacy' | 'react-native' | 'web'; /** * When true, Gui will always prefer a more specific style prop over a * less specific one. * * By default, Gui processes all style props in order of definition on the * object. This is a bit strange to most people, but it gets around many * annoying issues with specificity. You can see our docs on this here: * https://hanzogui.dev/docs/intro/styles#style-order-is-important * * But this can be confusing in simple cases, like when you do: * * <View paddingTop={0} padding={10} /> * * This would set paddingTop ultimately to be 10, because padding comes after * paddingTop. When this setting is set to true, paddingTop will always beat * padding, because it is more specific. …
@hanzogui/web/types/types.d.ts
GenericProps
typePreserves prop ordering, so that the order most closely matches the last spread objects Useful for having { ...defaultProps, ...props } that ensure props ordering is always kept Honestly this is somehwat backwards logically from Object.assign, reason was that we typically are merging defaultProps, givenProps, but we started using it elsewhere and now its a bit confusing Should look into refactoring this to match common usage Merges sub-objects if they start are pseudo-keys or media-key-like (start with "$") Given: mergeProps({ a: 1, b: 2 }, { b: 1, a: 2 }) The final key order will be: b, a
export type GenericProps = Record<string, any>;
@hanzogui/web/types/helpers/mergeProps.d.ts
GenericShorthands
typeexport type GenericShorthands = {};
@hanzogui/web/types/types.d.ts
GenericStackVariants
typeexport type GenericStackVariants = VariantDefinitionFromProps<StackNonStyleProps & StackStyle, any>;
@hanzogui/web/types/types.d.ts
GenericTextVariants
typeexport type GenericTextVariants = VariantDefinitionFromProps<TextProps, any>;
@hanzogui/web/types/types.d.ts
GenericVariantDefinitions
typeexport type GenericVariantDefinitions = { [key: string]: { [key: string]: ((a: any, b: any) => any) | { [key: string]: any; }; }; };
@hanzogui/web/types/types.d.ts
GestureReponderEvent
typeexport type GestureReponderEvent = Exclude<View['props']['onResponderMove'], void> extends (event: infer Event) => void ? Event : never;
@hanzogui/web/types/types.d.ts
GetAnimationKeys
typeexport type GetAnimationKeys<A extends GenericGuiConfig> = keyof A['animations'];
@hanzogui/web/types/types.d.ts
GetBaseStyles
typeexport type GetBaseStyles<A, B> = A extends { __tama: [any, any, any, infer C, any, any]; } ? B extends { isText: true; } | { isInput: true; } ? C & TextStylePropsBase : C : B extends { isText: true; } ? TextStylePropsBase : B extends { isInput: true; } ? TextStylePropsBase : StackStyleBase;
@hanzogui/web/types/types.d.ts
getConfig
valueexport declare const getConfig: () => GuiInternalConfig;
@hanzogui/web/types/config.d.ts
GetCSS
typeexport type GetCSS = (opts?: { separator?: string; exclude?: 'themes' | 'design-system' | null; sinceLastCall?: boolean; }) => string;
@hanzogui/web/types/types.d.ts
getCSSStylesAtomic
valueexport declare function getCSSStylesAtomic(style: ViewStyleWithPseudos): StyleObject[];
@hanzogui/web/types/helpers/getCSSStylesAtomic.d.ts
getDefaultProps
valueexport declare const getDefaultProps: (staticConfig: StaticConfig, propsComponentName?: string) => Record<string, any> | undefined;
@hanzogui/web/types/helpers/getDefaultProps.d.ts
getExpandedShorthand
valueexport declare function getExpandedShorthand(propKey: string, props: object): any;
@hanzogui/web/types/helpers/getExpandedShorthands.d.ts
getExpandedShorthands
value@deprecated use useProps instead
export declare function getExpandedShorthands<A extends object>(props: A): Omit<A, keyof Shorthands>;
@hanzogui/web/types/helpers/getExpandedShorthands.d.ts
GetFinalProps
typeexport type GetFinalProps<NonStyleProps, StylePropsBase, Variants> = Omit<NonStyleProps, keyof StylePropsBase | keyof Variants> & (StylePropsBase extends object ? WithThemeShorthandsPseudosMedia<StylePropsBase, Variants> : {});
@hanzogui/web/types/types.d.ts
getFontFamilyFromNameOrVariable
valueexport declare function getFontFamilyFromNameOrVariable(input: any, conf: GuiInternalConfig): string | undefined;
@hanzogui/web/types/helpers/propMapper.d.ts
getFontsForLanguage
valueexport declare function getFontsForLanguage(fonts: GenericFonts, language: LanguageContextType): any;
@hanzogui/web/types/helpers/getVariantExtras.d.ts
getMedia
valueexport declare const getMedia: () => MediaQueryState;
@hanzogui/web/types/helpers/mediaState.d.ts
GetNonStyledProps
typeexport type GetNonStyledProps<A extends StylableComponent> = A extends { __tama: [any, any, infer B, any, any, any]; } ? B : GuiComponentPropsBaseBase & GetProps<A>;
@hanzogui/web/types/types.d.ts
getPlatformDriver
valueexport declare function getPlatformDriver(): PlatformDriver | null;
@hanzogui/constants/types/platformDriver.d.ts
GetProps
typeexport type GetProps<A extends StylableComponent> = A extends { __tama: [ infer Props, any, infer NonStyledProps, infer BaseStyles, infer VariantProps, any ]; } ? Props extends TamaDefer ? GetFinalProps<NonStyledProps, BaseStyles, VariantProps> : Props : InferGenericComponentProps<A>;
@hanzogui/web/types/types.d.ts
getReactNativeConfig
valueexport declare function getReactNativeConfig(Component: any): Partial<StaticConfig> | { isReactNative: true; } | null | undefined;
@hanzogui/web/types/setupReactNative.d.ts
GetRef
typeexport type GetRef<C> = C extends GuiComponent<any, infer Ref> ? Ref : C extends new (props: any) => Component ? InstanceType<C> : C extends abstract new (...args: any) => any ? InstanceType<C> : C extends Component ? C : (C extends JSXElementConstructor<{ ref?: infer R; }> ? R : C extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElements[C]['ref'] : unknown) extends Ref<infer T> | string | undefined ? T : unknown;
@hanzogui/web/types/interfaces/GetRef.d.ts
getRgba
valueexport declare const getRgba: (color: string) => { r: number; g: number; b: number; a: number; } | undefined;
@hanzogui/web/types/helpers/normalizeColor.d.ts
getSetting
valueexport declare const getSetting: <Key extends keyof GenericGuiSettings>(key: Key) => GenericGuiSettings[Key];
@hanzogui/web/types/config.d.ts
getShorthandValue
valueexport declare const getShorthandValue: (props: Record<string, any>, key: string) => any;
@hanzogui/web/types/helpers/getShorthandValue.d.ts
getSplitStyles
valueexport declare const getSplitStyles: StyleSplitter;
@hanzogui/web/types/helpers/getSplitStyles.d.ts
GetStaticConfig
typeexport type GetStaticConfig<A, Extra = {}> = A extends { __tama: [any, any, any, any, any, infer B]; } ? B & Extra : Extra;
@hanzogui/web/types/types.d.ts
getStyleAtomic
valueexport declare const getStyleAtomic: (style: ViewStyleWithPseudos, pseudo?: PseudoDescriptor) => StyleObject[];
@hanzogui/web/types/helpers/getCSSStylesAtomic.d.ts
getStyleCompat
valueexport declare function getStyleCompat(): StyleCompat;
@hanzogui/web/types/config.d.ts
GetStyledVariants
typeexport type GetStyledVariants<A> = A extends { __tama: [any, any, any, any, infer B, any]; } ? B : {};
@hanzogui/web/types/types.d.ts
GetStyleResult
typeexport type GetStyleResult = { pseudos?: PseudoStyles | null; style: ViewStyle | null; classNames: ClassNamesObject; rulesToInsert: RulesToInsert; viewProps: (StackNonStyleProps & StackStyle) & Record<string, any>; fontFamily: string | undefined; space?: any; hasMedia: boolean | Set<string>; dynamicThemeAccess?: boolean; pseudoGroups?: Set<string>; mediaGroups?: Set<string>; overriddenContextProps?: Record<string, any>; pseudoTransitions?: PseudoTransitions | null; effectiveTransition?: TransitionProp | null; };
@hanzogui/web/types/types.d.ts
GetStyleState
typeexport type GetStyleState = { style: TextStyle | null; usedKeys: Record<string, number>; classNames: ClassNamesObject; staticConfig: StaticConfig; theme: ThemeParsed; props: Record<string, any>; context?: ComponentContextI; viewProps: Record<string, any>; styleProps: SplitStyleProps; componentState: GuiComponentState; conf: GuiInternalConfig; avoidMergeTransform?: boolean; fontFamily?: string; debug?: DebugProp; flatTransforms?: Record<string, any>; overriddenContextProps?: Record<string, any>; originalContextPropValues?: Record<string, any>; tokenProvenance?: Record<string, string>; pseudoTransitions?: PseudoTransitions | null; animationDriver?: AnimationDriver | null; };
@hanzogui/web/types/types.d.ts
getStyleTags
valueexport declare function getStyleTags(styles: StyleObject[]): import("react").JSX.Element | undefined;
@hanzogui/web/types/helpers/wrapStyleTags.d.ts
getStyleTokenProvenance
valueexport declare function getStyleTokenProvenance(style: object | null | undefined): StyleTokenProvenance | undefined;
@hanzogui/web/types/helpers/styleProvenance.d.ts
getSubStyle
valueexport declare const getSubStyle: (styleState: GetStyleState, subKey: string, styleIn: object, avoidMergeTransform?: boolean) => TextStyle;
@hanzogui/web/types/helpers/getSplitStyles.d.ts
getThemeCSSRules
valueexport declare function getThemeCSSRules(props: { config: CreateGuiProps; themeName: string; theme: ThemeParsed; names: string[]; hasDarkLight?: boolean; useMutatedVariables?: boolean; }): string[];
@hanzogui/web/types/helpers/getThemeCSSRules.d.ts
getThemedChildren
valueexport declare function getThemedChildren(themeState: ThemeState, children: any, props: ThemeComponentPropsOnly, isRoot: boolean | undefined, stateRef: MutableRefObject<{ hasEverThemed?: boolean | 'wrapped'; }>, passThrough?: boolean): any;
@hanzogui/web/types/views/Theme.d.ts
getThemes
valueexport declare const getThemes: () => { [x: string]: { [x: string]: import("./types.tsx").Variable<any> | import("./types.tsx").Variable<string> | import("./types.tsx").Variable<number> | import("./types.tsx").Variable<import("./types.tsx").PxValue> | import("./types.tsx").Variable<import("./types.tsx").VariableValGeneric>; background?: import("./types.tsx").Variable<any> | import("./types.tsx").Variable<undefined> | import("./types.tsx").Variable<string> | undefined; backgroundHover?: import("./types.tsx").Variable<any> | import("./types.tsx").Variable<undefined> | import("./types.tsx").Variable<string> | undefined; backgroundPress?: import("./types.tsx").Variable<any> | import("./types.tsx").Variable<undefined> | import("./types.tsx").Variable<string> | undefined; backgroundFocus?: import("./types.tsx").Variable<any> | import("./types.tsx").Variable<undefined> | import("./types.tsx").Variable<string> | undefined; color?: import("./types.tsx").Variable<any> | import("./types.tsx").Variable<undefined> | import("./types.tsx").Variable<string> | undefined; colorHover?: import("./types.tsx").Variable<any> | …
@hanzogui/web/types/config.d.ts
GetThemeValueFallbackFor
typeexport type GetThemeValueFallbackFor<Setting, StrictValue, SomewhatStrictValue, LooseValue, WebOnlyValue> = Setting extends 'strict' ? StrictValue : Setting extends 'strict-web' ? StrictValue | WebOnlyValue : Setting extends 'somewhat-strict' ? SomewhatStrictValue : Setting extends 'somewhat-strict-web' ? SomewhatStrictValue | WebOnlyValue : LooseValue;
@hanzogui/web/types/types.d.ts
GetThemeValueForKey
typeexport type GetThemeValueForKey<K extends string | symbol | number> = ThemeValueGet<K> | ThemeValueFallback | (GuiSettings extends { autocompleteSpecificTokens: infer Val; } ? Val extends true | undefined ? SpecificTokens : never : never);
@hanzogui/web/types/types.d.ts
GetThemeValueSettingForCategory
typeexport type GetThemeValueSettingForCategory<Cat extends keyof AllowedStyleValuesSettingPerCategory> = UserAllowedStyleValuesSetting extends AllowedValueSettingBase | undefined ? UserAllowedStyleValuesSetting : UserAllowedStyleValuesSetting extends AllowedStyleValuesSettingPerCategory ? UserAllowedStyleValuesSetting[Cat] : true;
@hanzogui/web/types/types.d.ts
getToken
valueexport declare const getToken: (value: Token, group?: keyof Tokens, useVariable?: boolean) => any;
@hanzogui/web/types/config.d.ts
GetTokenFontKeysFor
typeexport type GetTokenFontKeysFor<A extends 'size' | 'weight' | 'letterSpacing' | 'family' | 'lineHeight' | 'transform' | 'style' | 'color'> = keyof GuiConfig['fonts']['body'][A];
@hanzogui/web/types/types.d.ts
getTokenForKey
valueexport declare const getTokenForKey: (key: string, value: string, styleProps: SplitStyleProps, styleState: Partial<GetStyleState>) => any;
@hanzogui/web/types/helpers/getTokenForKey.d.ts
getTokens
valueexport declare const getTokens: ({ prefixed, }?: { /** * Force either with $ or without $ prefix */ prefixed?: boolean; }) => TokensMerged;
@hanzogui/web/types/config.d.ts
GetTokenString
typeexport type GetTokenString<A> = A extends `$${string}` ? A : A extends string | number ? `$${A}` : `$${string}`;
@hanzogui/web/types/types.d.ts
getTokenValue
valueexport declare const getTokenValue: (value: Token | 'unset' | 'auto', group?: keyof Tokens) => any;
@hanzogui/web/types/config.d.ts
getValueFromIdentifier
valueexport declare const getValueFromIdentifier: (identifier: string) => any;
@hanzogui/web/types/Gui.d.ts
getVariable
valueexport declare function getVariable(nameOrVariable: Variable | string | any, group?: TokenCategories): any;
@hanzogui/web/types/createVariable.d.ts
getVariableName
valueexport declare function getVariableName(v: Variable | any): any;
@hanzogui/web/types/createVariable.d.ts
getVariableValue
valueexport declare function getVariableValue(v: Variable | any, group?: TokenCategories): any;
@hanzogui/web/types/createVariable.d.ts
getVariableVariable
valueexport declare function getVariableVariable(v: Variable | string | undefined): string | undefined;
@hanzogui/web/types/createVariable.d.ts
getVariantExtras
valueexport declare const getVariantExtras: (styleState: GetStyleState) => any;
@hanzogui/web/types/helpers/getVariantExtras.d.ts
GetVariantProps
typeexport type GetVariantProps<A extends StylableComponent, IsText extends boolean | undefined> = A extends { __tama: [ infer Props, any, infer NonStyledProps, infer BaseStyles, infer VariantProps, any ]; } ? Props extends TamaDefer ? GetFinalProps<NonStyledProps, BaseStyles, VariantProps> : Props : WithThemeShorthandsPseudosMedia<IsText extends true ? TextStylePropsBase : StackStyleBase>;
@hanzogui/web/types/types.d.ts
GetVariantValues
typeexport type GetVariantValues<Key> = Key extends `...${infer VariantSpread}` ? ThemeValueByCategory<VariantSpread> : Key extends 'true' | 'false' ? boolean : Key extends ':string' ? string : Key extends ':boolean' ? boolean : Key extends ':number' ? number : Key;
@hanzogui/web/types/types.d.ts
gridProps
valueexport declare const gridProps: { gridAutoColumns: boolean; gridAutoRows: boolean; gridTemplateColumns: boolean; gridTemplateRows: boolean; grid: boolean; gridArea: boolean; gridAutoFlow: boolean; gridColumn: boolean; gridColumnEnd: boolean; gridColumnStart: boolean; gridRow: boolean; gridRowEnd: boolean; gridRowStart: boolean; gridTemplate: boolean; gridTemplateAreas: boolean; justifyItems: boolean; justifySelf: boolean; placeContent: boolean; placeItems: boolean; placeSelf: boolean; };
@hanzogui/helpers/types/webOnlyStyleProps.d.ts
gridUnitless
valueexport declare const gridUnitless: { grid: boolean; gridArea: boolean; gridAutoFlow: boolean; gridColumn: boolean; gridColumnEnd: boolean; gridColumnStart: boolean; gridRow: boolean; gridRowEnd: boolean; gridRowStart: boolean; gridTemplate: boolean; gridTemplateAreas: boolean; justifyItems: boolean; justifySelf: boolean; placeContent: boolean; placeItems: boolean; placeSelf: boolean; };
@hanzogui/helpers/types/webOnlyStyleProps.d.ts
GroupContext
valueexport declare const GroupContext: import("react").Context<AllGroupContexts | null>;
@hanzogui/web/types/contexts/GroupContext.d.ts
GroupMediaKeys
typeexport type GroupMediaKeys = `$group-${GroupNames}` | `$group-${GroupNames}-${ParentMediaStates}` | `$group-${GroupNames}-${MediaQueryKey}` | `$group-${GroupNames}-${MediaQueryKey}-${ParentMediaStates}` | `$group-${ParentMediaStates}` | `$group-${MediaQueryKey}` | `$group-${MediaQueryKey}-${ParentMediaStates}`;
@hanzogui/web/types/types.d.ts
GroupNames
typeexport type GroupNames = ReturnType<TypeOverride['groupNames']> extends 1 ? never : ReturnType<TypeOverride['groupNames']>;
@hanzogui/web/types/types.d.ts
GroupStateListener
typeexport type GroupStateListener = (state: ComponentGroupState) => void;
@hanzogui/web/types/types.d.ts
Gui
valueexport declare const Gui: { Helpers: typeof Helpers; get mediaState(): { [x: string]: boolean; [x: number]: boolean; }; get config(): import("./types.tsx").GuiInternalConfig; get insertedRules(): string[]; get allSelectors(): Record<string, string>; get identifierToValue(): Map<string, any>; } | undefined;
@hanzogui/web/types/Gui.d.ts
GuiBaseTheme
typeexport type GuiBaseTheme = { background: VariableColorVal; backgroundHover: VariableColorVal; backgroundPress: VariableColorVal; backgroundFocus: VariableColorVal; color: VariableColorVal; colorHover: VariableColorVal; colorPress: VariableColorVal; colorFocus: VariableColorVal; borderColor: VariableColorVal; borderColorHover: VariableColorVal; borderColorPress: VariableColorVal; borderColorFocus: VariableColorVal; shadowColor: VariableColorVal; shadowColorHover: VariableColorVal; shadowColorPress: VariableColorVal; shadowColorFocus: VariableColorVal; };
@hanzogui/web/types/types.d.ts
GuiBuildOptions
typeexport interface GuiBuildOptions { /** * module paths you want to compile with hanzogui (for example ['hanzogui']) * */ components?: string[]; /** * relative path to your hanzogui.config.ts */ config?: string; /** * Use the new ThemeBuilder in `@hanzogui/create-theme` to create beautiful theme sets, * see docs at https://hanzogui.dev/docs/guides/theme-builder * This helps you automate generating the build themes typescript file which loads fastere * and has smaller bundle size. */ themeBuilder?: { input: string; output: string; }; /** * Emit design system related CSS during build step for usage with frameworks */ outputCSS?: string | null | false; /** * (Experimental) outputs themes using CSS Nesting https://caniuse.com/css-nesting * Which can cut them in half due to no media query duplication. */ useCSSNesting?: boolean; /** * Gui can follow imports and evaluate them when parsing styles, leading to * higher percent of flattened / optimized views. We normalize this to be the * full path of the file, always ending in ".js". * …
@hanzogui/types/types/index.d.ts
GuiComponent
typeexport type GuiComponent<Props = any, Ref = any, NonStyledProps = {}, BaseStyles extends object = {}, Variants = {}, ParentStaticProperties = {}> = ForwardRefExoticComponent<(Props extends TamaDefer ? GetFinalProps<NonStyledProps, BaseStyles, Variants> : Props) & RefAttributes<Ref>> & StaticComponentObject<Props, Ref, NonStyledProps, BaseStyles, Variants, ParentStaticProperties> & Omit<ParentStaticProperties, 'staticConfig' | 'styleable'> & { __tama: [Props, Ref, NonStyledProps, BaseStyles, Variants, ParentStaticProperties]; };
@hanzogui/web/types/types.d.ts
GuiComponentEvents
typeexport type GuiComponentEvents = { cancelable?: boolean | undefined; disabled?: any; hitSlop?: any; delayLongPress?: any; delayPressIn?: any; delayPressOut?: any; focusable?: any; minPressDuration?: number | undefined; onPressIn: ((e: any) => void) | undefined; onPress: ((e: any) => void) | undefined; onLongPress?: ((e: any) => void) | undefined; onMouseEnter?: ((e: any) => void) | undefined; onMouseLeave?: ((e: any) => void) | undefined; onPressOut: ((e: any) => void) | undefined; onFocus?: ((e: any) => void) | undefined; onBlur?: ((e: any) => void) | undefined; };
@hanzogui/web/types/interfaces/GuiComponentEvents.d.ts
GuiComponentExpectingVariants
typeexport type GuiComponentExpectingVariants<Props = {}, Variants extends object = {}> = GuiComponent<Props, any, any, any, Variants>;
@hanzogui/web/types/types.d.ts
GuiComponentPropsBase
typeexport interface GuiComponentPropsBase extends GuiComponentPropsBaseBase, WebOnlyPressEvents { }
@hanzogui/web/types/types.d.ts
GuiComponentPropsBaseBase
typeexport type GuiComponentPropsBaseBase = { target?: string; htmlFor?: string; /** * When truthy passes through all props to a single child element, and avoids rendering its own element. * Must pass just one child React element that will receive all the props. * * The option "except-style" will avoid passing any style related props. * * The option "web" will map all React Native style props to web props (onPress becomes onClick). * * The option "except-style-web" combines the except-style and web options. * */ asChild?: boolean | 'except-style' | 'except-style-web' | 'web'; dangerouslySetInnerHTML?: { __html: string; }; children?: any | any[]; debug?: DebugProp; disabled?: boolean; /** * Same as the web className property, useful for applying styles from CSS on web only */ className?: string; /** * If given a theme it will only apply to this element, instead of passing down to children */ themeShallow?: boolean; /** * If true, component themes will not be applied */ unstyled?: boolean; /** * Same as the web id property for …
@hanzogui/web/types/types.d.ts
GuiComponentState
typeexport type GuiComponentState = { unmounted: boolean | 'should-enter'; disabled?: boolean; hover?: boolean; press?: boolean; pressIn?: boolean; focus?: boolean; focusVisible?: boolean; focusWithin?: boolean; transition?: null | { style?: any; avoidClasses?: boolean; }; group?: Record<string, ChildGroupState>; hasDynGroupChildren?: boolean; };
@hanzogui/web/types/types.d.ts
GuiComponentStateRef
typeexport type GuiComponentStateRef = { startedUnhydrated: boolean; host?: GuiElement; composedRef?: (x: GuiElement) => void; willHydrate?: boolean; hasMeasured?: boolean; hasAnimated?: boolean; themeShallow?: boolean; hasEverThemed?: boolean | 'wrapped'; hasEverResetPresence?: boolean; hasHadEvents?: boolean; hasRealPressEvents?: boolean; isListeningToTheme?: boolean; unPress?: Function; setStateShallow?: ComponentSetStateShallow; baseSetStateShallow?: ComponentSetStateShallow; useStyleListener?: UseStyleListener; updateStyleListener?: () => void; group?: ComponentGroupEmitter; nextState?: GuiComponentState; nextMedia?: UseMediaState; mediaEmitCleanup?: () => void; prevPseudoState?: { hover?: boolean; press?: boolean; focus?: boolean; groups?: Record<string, { hover?: boolean; press?: boolean; focus?: boolean; }>; }; };
@hanzogui/web/types/types.d.ts
GuiConfig
typeexport interface GuiConfig extends Omit<GenericGuiConfig, keyof GuiCustomConfig>, GuiCustomConfig { }
@hanzogui/web/types/types.d.ts
GuiCustomConfig
typeexport interface GuiCustomConfig { }
@hanzogui/web/types/types.d.ts
GuiElement
typeCross-platform element ref type. On web, includes GuiElementMethods (measure, focus, blur) which Gui adds at runtime. On native, View already has these via NativeMethods.
export type GuiElement = (HTMLElement & GuiElementMethods) | View;
@hanzogui/web/types/types.d.ts
GuiElementMethods
typeMethods added to element refs that work across web and native. On web these are added at runtime to HTMLElements. On native these exist on View already.
export interface GuiElementMethods { measure(callback: MeasureOnSuccessCallback): void; measureInWindow(callback: MeasureInWindowOnSuccessCallback): void; measureLayout(relativeToNativeNode: View | HTMLElement, onSuccess: MeasureLayoutOnSuccessCallback, onFail?: () => void): void; focus(): void; blur(): void; }
@hanzogui/web/types/types.d.ts
GuiInternalConfig
typeexport type GuiInternalConfig<A extends GenericTokens = GenericTokens, B extends GenericThemes = GenericThemes, C extends GenericShorthands = GenericShorthands, D extends GenericMedia = GenericMedia, E extends GenericAnimations = GenericAnimations, F extends GenericFonts = GenericFonts, G extends GenericGuiSettings = GenericGuiSettings, AnimDriverKeys extends string = string> = Omit<CreateGuiProps, keyof GenericGuiConfig> & Omit<CreateGuiConfig<A, B, C, D, E, F, G, AnimDriverKeys>, 'tokens'> & { tokens: Tokenify<A>; tokensParsed: Tokenify<A>; themeConfig: any; fontsParsed: GenericFonts; getCSS: GetCSS; getNewCSS: GetCSS; parsed: boolean; inverseShorthands: Record<string, string>; userShorthands: C; reactNative?: any; fontSizeTokens: Set<string>; specificTokens: Record<string, Variable>; settings: Omit<GenericGuiSettings, keyof G> & G; defaultFont?: string; defaultFontToken: `${string}`; animationDrivers?: Record<string, AnimationDriver>; };
@hanzogui/web/types/types.d.ts
GuiProjectInfo
typeexport type GuiProjectInfo = { components: LoadedComponents[]; hanzoguiConfig: GuiInternalConfig; nameToPaths: NameToPaths; };
@hanzogui/web/types/types.d.ts
GuiProvider
valueexport declare function GuiProvider({ children, disableInjectCSS, config, className, defaultTheme: defaultThemeProp, reset, insets, }: GuiProviderProps): React.JSX.Element;
@hanzogui/web/types/views/GuiProvider.d.ts
GuiProviderProps
typeexport type GuiProviderProps = Omit<ThemeProviderProps, 'children'> & { config?: GuiInternalConfig; disableInjectCSS?: boolean; children?: ReactNode; insets?: { top: number; right: number; bottom: number; left: number; }; };
@hanzogui/web/types/types.d.ts
GuiRoot
valueApplies default font class and CSS variable inheritance via display:contents. Used by GuiProvider at the root and by portals to re-establish font scope. Pass trackMount to also handle the t_unmounted class for CSS animation gating.
export declare function GuiRoot({ children, theme, isRootRoot, passThrough, style, }: { children: React.ReactNode; theme: ThemeName; isRootRoot?: boolean; passThrough?: boolean; style?: React.CSSProperties; }): React.JSX.Element;
@hanzogui/web/types/views/GuiRoot.d.ts
GuiSettings
typeexport type GuiSettings = GuiConfig['settings'];
@hanzogui/web/types/types.d.ts
GuiTextElement
typeexport type GuiTextElement = (HTMLElement & GuiElementMethods) | RNText;
@hanzogui/web/types/types.d.ts
GuiWebElement
typeWeb-specific element type for platform-specific .tsx files. Use when you need HTMLElement subtype properties (e.g., selectionStart on HTMLInputElement) that aren't on the cross-platform GuiElement type. @example const ref = useRef<GuiWebElement<HTMLInputElement>>(null) // ref.current has both HTMLInputElement props and GuiElementMethods
export type GuiWebElement<T extends HTMLElement = HTMLElement> = T & GuiElementMethods;
@hanzogui/web/types/types.d.ts
hooks
valueexport declare const hooks: InternalHooks;
@hanzogui/web/types/setupHooks.d.ts
InferGenericComponentProps
typeexport type InferGenericComponentProps<A> = A extends ComponentType<infer Props> ? Props : A extends ForwardRefExoticComponent<infer P> ? P : A extends ReactComponentWithRef<infer P, any> ? P : A extends new (props: infer Props) => any ? Props : {};
@hanzogui/web/types/types.d.ts
InferGuiConfig
typeexport type InferGuiConfig<Conf> = Conf extends ConfProps<infer A, infer B, infer C, infer D, infer E, infer F, infer H> ? GuiInternalConfig<A extends GenericTokens ? A : EmptyTokens, B extends GenericThemes ? B : EmptyThemes, C extends GenericShorthands ? C : EmptyShorthands, D extends GenericMedia ? D : EmptyMedia, ExtractAnimationConfig<E>, F extends GenericFonts ? F : EmptyFonts, H extends GenericGuiSettings ? H : EmptyGuiSettings, ExtractAnimationDriverKeys<E>> : unknown;
@hanzogui/web/types/types.d.ts
InferStyledProps
typeexport type InferStyledProps<A extends StylableComponent, B extends StaticConfigPublic> = A extends { __tama: any; } ? GetProps<A> : GetFinalProps<InferGenericComponentProps<A>, GetBaseStyles<{}, B>, {}>;
@hanzogui/web/types/types.d.ts
InferStyleProps
typeLike InferStyledProps but returns only style props (no non-styled props or variants).
export type InferStyleProps<A extends StylableComponent, B extends StaticConfigPublic> = WithThemeShorthandsPseudosMedia<GetBaseStyles<A, B>, {}>;
@hanzogui/web/types/types.d.ts
insertFont
valueRuntime dynamic insert font
export declare function insertFont<A extends GenericFont>(name: string, fontIn: A): DeepVariableObject<A>;
@hanzogui/web/types/insertFont.d.ts
insertStyleRules
valueexport declare function insertStyleRules(rulesToInsert: RulesToInsert): void;
@hanzogui/web/types/helpers/insertStyleRule.d.ts
Insets
typeexport interface Insets { top?: number; left?: number; bottom?: number; right?: number; }
@hanzogui/web/types/types.d.ts
isAndroid
valueexport declare const isAndroid: boolean;
@hanzogui/constants/types/constants.d.ts
isBrowser
valueexport declare const isBrowser: boolean;
@hanzogui/constants/types/constants.d.ts
isChrome
valueexport declare const isChrome: boolean;
@hanzogui/constants/types/constants.d.ts
isClient
valueexport declare const isClient: boolean;
@hanzogui/constants/types/constants.d.ts
isEqualShallow
valueexport declare function isEqualShallow(prev: Record<string, unknown>, next: Record<string, unknown>): boolean;
@hanzogui/is-equal-shallow/types/index.d.ts
isGuiComponent
valueexport declare function isGuiComponent<A>(comp: A, name?: string): comp is A & { staticConfig: StaticConfig; };
@hanzogui/web/types/helpers/isGuiComponent.d.ts
isGuiElement
valueexport declare const isGuiElement: (child: any, name?: string) => child is React.ReactElement<any> & { type: { staticConfig: StaticConfig; }; };
@hanzogui/web/types/helpers/isGuiElement.d.ts
isIos
valueexport declare const isIos: boolean;
@hanzogui/constants/types/constants.d.ts
IsMediaType
typeexport type IsMediaType = boolean | 'platform' | 'theme' | 'group';
@hanzogui/web/types/types.d.ts
isNativeDesktop
valueexport declare const isNativeDesktop: boolean;
@hanzogui/constants/types/constants.d.ts
isServer
valueexport declare const isServer: boolean;
@hanzogui/constants/types/constants.d.ts
isTouchable
valueexport declare const isTouchable: boolean;
@hanzogui/constants/types/constants.d.ts
isTV
valueexport declare const isTV: boolean;
@hanzogui/constants/types/constants.d.ts
isVariable
valueexport declare function isVariable(v: Variable | any): v is Variable;
@hanzogui/web/types/createVariable.d.ts
isWeb
valueexport declare const isWeb: boolean;
@hanzogui/constants/types/constants.d.ts
isWebTouchable
valueexport declare const isWebTouchable: boolean;
@hanzogui/constants/types/constants.d.ts
isWindowDefined
value@deprecated use isBrowser instead
export declare const isWindowDefined: boolean;
@hanzogui/constants/types/constants.d.ts
LanguageContextType
typeexport type LanguageContextType = Partial<{ [key in FontFamilies]: FontLanguages | 'default'; }>;
@hanzogui/web/types/types.d.ts
LayoutEvent
typeexport type LayoutEvent = { nativeEvent: { layout: LayoutValue; target: any; }; timeStamp: number; };
@hanzogui/web/types/types.d.ts
LineHeightKeys
typeexport type LineHeightKeys = 'lineHeight';
@hanzogui/web/types/types.d.ts
loadAnimationDriver
valueDynamically load an animation driver at runtime. Useful for lazy loading heavier animation drivers after initial page load. @example ```tsx // import loadAnimationDriver from hanzogui // import createAnimations from your preferred driver (e.g. animations-reanimated) const driver = createAnimations({ bouncy: { type: 'spring', damping: 10 } }) loadAnimationDriver('spring', driver) ```
export declare function loadAnimationDriver(name: string, driver: AnimationDriver): void;
@hanzogui/web/types/config.d.ts
LoadedComponents
typeexport type LoadedComponents = { moduleName: string; nameToInfo: Record<string, { staticConfig: StaticConfig; }>; };
@hanzogui/web/types/types.d.ts
Longhands
typeexport type Longhands = NarrowShorthands[keyof NarrowShorthands];
@hanzogui/web/types/types.d.ts
MakeVariable
typeexport type MakeVariable<A = any> = A extends string | number ? Variable<A> : A;
@hanzogui/web/types/types.d.ts
matchMedia
valueexport declare const matchMedia: typeof matchMediaFallback | (((query: string) => globalThis.MediaQueryList) & typeof globalThis.matchMedia);
@hanzogui/web/types/helpers/matchMedia.d.ts
MatchMedia
typeexport type MatchMedia = (query: string) => MediaQueryList;
@hanzogui/web/types/types.d.ts
MaybeGuiComponent
typeexport type MaybeGuiComponent<A = any> = GuiComponent<A> | React.FC<A>;
@hanzogui/web/types/types.d.ts
Media
typeexport type Media = GuiConfig['media'];
@hanzogui/web/types/types.d.ts
MEDIA_SEP
valueexport declare const MEDIA_SEP = "_";
@hanzogui/web/types/helpers/createMediaStyle.d.ts
mediaKeyMatch
valueexport declare function mediaKeyMatch(key: string, dimensions: { width: number; height: number; }): boolean;
@hanzogui/web/types/hooks/useMedia.d.ts
mediaObjectToString
valueexport declare function mediaObjectToString(query: string | MediaQueryObject): string;
@hanzogui/web/types/helpers/mediaObjectToString.d.ts
MediaPropKeys
typeexport type MediaPropKeys = `$${MediaQueryKey}`;
@hanzogui/web/types/types.d.ts
MediaQueries
typeexport type MediaQueries = { [key in MediaQueryKey]: MediaQueryObject; };
@hanzogui/web/types/types.d.ts
mediaQueryConfig
valueexport declare const mediaQueryConfig: MediaQueries;
@hanzogui/web/types/helpers/mediaState.d.ts
MediaQueryKey
typeexport type MediaQueryKey = keyof Media;
@hanzogui/web/types/types.d.ts
MediaQueryList
typeexport interface MediaQueryList { addListener(listener?: any): void; removeListener(listener?: any): void; match?: (query: string, dimensions: { width: number; height: number; }) => boolean; matches: boolean; }
@hanzogui/web/types/types.d.ts
MediaQueryObject
typeexport type MediaQueryObject = { [key: string]: string | number | string; };
@hanzogui/web/types/types.d.ts
MediaQueryState
typeexport type MediaQueryState = { [key in MediaQueryKey]: boolean; };
@hanzogui/web/types/types.d.ts
mediaState
valueexport declare let mediaState: MediaQueryState;
@hanzogui/web/types/helpers/mediaState.d.ts
MediaStyleObject
typeexport type MediaStyleObject = Omit<StyleObject, 'value'>;
@hanzogui/helpers/types/types.d.ts
mergeComponentProps
valueexport declare const mergeComponentProps: (defaultProps: object | null | undefined, contextProps: object | undefined, props: object) => readonly [object, null] | readonly [GenericProps, GenericProps | null];
@hanzogui/web/types/helpers/mergeProps.d.ts
mergeIfNotShallowEqual
valueexport declare function mergeIfNotShallowEqual<State extends Record<string, unknown>>(prev: State, next: Partial<State>): State;
@hanzogui/is-equal-shallow/types/index.d.ts
mergeProps
valueexport declare const mergeProps: (defaultProps: object, props: object) => GenericProps;
@hanzogui/web/types/helpers/mergeProps.d.ts
mergeSlotStyleProps
valueMerges props with special handling for style, className, ref, and event handlers. Used by Slot and render prop implementations. @param base - Base props (typically from parent/slot) @param overlay - Props to merge on top (typically from child/element) @returns Merged props object (mutates and returns base for perf)
export declare function mergeSlotStyleProps(base: Record<string, any>, overlay: Record<string, any>): Record<string, any>;
@hanzogui/web/types/helpers/mergeSlotStyleProps.d.ts
MISSING_THEME_MESSAGE
valueexport declare const MISSING_THEME_MESSAGE: string;
@hanzogui/web/types/constants/constants.d.ts
ModifyGuiComponentStyleProps
typeexport type ModifyGuiComponentStyleProps<Comp extends GuiComponent, ChangedProps extends object> = Comp extends GuiComponent<infer A, infer B, infer C, infer D, infer E> ? A extends object ? GuiComponent<Omit<A, keyof ChangedProps> & ChangedProps, B, C, D, E> : never : never;
@hanzogui/web/types/types.d.ts
mutatedAutoVariables
valueexport declare const mutatedAutoVariables: Variable[];
@hanzogui/web/types/helpers/registerCSSVariable.d.ts
Narrow
typeexport type Narrow<A> = Try<A, [], NarrowRaw<A>>;
@hanzogui/web/types/types.d.ts
NarrowShorthands
typeexport type NarrowShorthands = Narrow<Shorthands>;
@hanzogui/web/types/types.d.ts
NativePlatform
typeexport type NativePlatform = 'web' | 'mobile' | 'android' | 'ios';
@hanzogui/helpers/types/shouldRenderNativePlatform.d.ts
NativeValue
typeexport type NativeValue<Platform extends NativePlatform = NativePlatform> = boolean | Platform | Platform[];
@hanzogui/helpers/types/shouldRenderNativePlatform.d.ts
nonAnimatableStyleProps
valueexport declare const nonAnimatableStyleProps: { gridAutoColumns: boolean; gridAutoRows: boolean; gridTemplateColumns: boolean; gridTemplateRows: boolean; grid: boolean; gridArea: boolean; gridAutoFlow: boolean; gridColumn: boolean; gridColumnEnd: boolean; gridColumnStart: boolean; gridRow: boolean; gridRowEnd: boolean; gridRowStart: boolean; gridTemplate: boolean; gridTemplateAreas: boolean; justifyItems: boolean; justifySelf: boolean; placeContent: boolean; placeItems: boolean; placeSelf: boolean; backgroundAttachment?: boolean | undefined; backgroundBlendMode?: boolean | undefined; backgroundClip?: boolean | undefined; backgroundOrigin?: boolean | undefined; backgroundRepeat?: boolean | undefined; borderBottomStyle?: boolean | undefined; borderLeftStyle?: boolean | undefined; borderRightStyle?: boolean | undefined; borderTopStyle?: boolean | undefined; contain?: boolean | undefined; containerType?: boolean | undefined; content?: boolean | undefined; float?: boolean | undefined; maskBorderMode?: boolean | undefined; maskBorderRepeat?: boolean …
@hanzogui/helpers/types/validStyleProps.d.ts
nonAnimatableWebTextProps
valueexport declare const nonAnimatableWebTextProps: { whiteSpace: boolean; wordWrap: boolean; textOverflow: boolean; WebkitBoxOrient: boolean; };
@hanzogui/helpers/types/webOnlyStyleProps.d.ts
nonAnimatableWebViewProps
valueexport declare const nonAnimatableWebViewProps: { backgroundAttachment: boolean; backgroundBlendMode: boolean; backgroundClip: boolean; backgroundOrigin: boolean; backgroundRepeat: boolean; borderBottomStyle: boolean; borderLeftStyle: boolean; borderRightStyle: boolean; borderTopStyle: boolean; contain: boolean; containerType: boolean; content: boolean; float: boolean; maskBorderMode: boolean; maskBorderRepeat: boolean; maskClip: boolean; maskComposite: boolean; maskMode: boolean; maskOrigin: boolean; maskRepeat: boolean; maskType: boolean; objectFit: boolean; overflowBlock: boolean; overflowInline: boolean; overflowX: boolean; overflowY: boolean; pointerEvents: boolean; scrollbarWidth: boolean; textWrap: boolean; touchAction: boolean; transformStyle: boolean; willChange: boolean; };
@hanzogui/helpers/types/webOnlyStyleProps.d.ts
NonSpecificTokens
typeexport type NonSpecificTokens = GetTokenString<keyof Tokens['radius']> | GetTokenString<keyof Tokens['zIndex']> | GetTokenString<keyof Tokens['color']> | GetTokenString<keyof Tokens['space']> | GetTokenString<keyof Tokens['size']>;
@hanzogui/web/types/types.d.ts
normalizeColor
valueexport declare const normalizeColor: (color?: string | null, opacity?: number) => string | undefined;
@hanzogui/web/types/helpers/normalizeColor.d.ts
normalizeStyle
valueThis is what you want to run before Object.assign() a style onto another. It does the following: 1. Shorthands into longhands, px = paddingHorizontal 2. Expands flex, borderColor and other properties that can expand into sub-parts 3. Normalizes all sub pseudo-media-etc styles
export declare function normalizeStyle(style: Record<string, any>, disableNormalize?: boolean): Record<string, any>;
@hanzogui/web/types/helpers/normalizeStyle.d.ts
normalizeValueWithProperty
valueSome parts adapted from react-native-web Copyright (c) Nicolas Gallagher licensed under the MIT license.
export declare function normalizeValueWithProperty(value: any, property?: string): any;
@hanzogui/web/types/helpers/normalizeValueWithProperty.d.ts
OnlyAllowShorthandsSetting
typeexport type OnlyAllowShorthandsSetting = GuiConfig['settings'] extends { onlyAllowShorthands: infer X; } ? X : false;
@hanzogui/web/types/types.d.ts
OnlyShorthandStylePropsSetting
typeexport type OnlyShorthandStylePropsSetting = GuiConfig['settings'] extends { onlyShorthandStyleProps: infer X; } ? X : false;
@hanzogui/web/types/types.d.ts
OpacityKeys
typeexport type OpacityKeys = 'opacity';
@hanzogui/web/types/types.d.ts
OutlineValue
typeexport type OutlineValue = OutlinePreset | (string & {});
@hanzogui/web/types/types.d.ts
parseFont
valueexport declare function parseFont<A extends GenericFont>(definition: A): DeepVariableObject<A>;
@hanzogui/web/types/insertFont.d.ts
ParseFont
typeexport type ParseFont<A extends GenericFont> = { size: TokenPrefixed<A['size']>; lineHeight: TokenPrefixedIfExists<A['lineHeight']>; letterSpacing: TokenPrefixedIfExists<A['letterSpacing']>; weight: TokenPrefixedIfExists<A['weight']>; family: TokenPrefixedIfExists<A['family']>; style: TokenPrefixedIfExists<A['style']>; transform: TokenPrefixedIfExists<A['transform']>; color: TokenPrefixedIfExists<A['color']>; face: TokenPrefixedIfExists<A['face']>; };
@hanzogui/web/types/types.d.ts
PlatformDriver
typeexport interface PlatformDriver { pseudo?: { /** * subscribe a mounted component's host instance to native pseudo-state flips. * the host instance is whatever the renderer's ref resolves to (on * react-native-gpui, the reconciler Instance whose `.id` is the host node id). * returns an unsubscribe. */ subscribe(hostInstance: unknown, listener: (state: PlatformDriverPseudoState) => void): () => void; }; }
@hanzogui/constants/types/platformDriver.d.ts
PlatformDriverPseudoState
typeexport interface PlatformDriverPseudoState { hovered: boolean; pressed: boolean; }
@hanzogui/constants/types/platformDriver.d.ts
PlatformMediaKeys
typeexport type PlatformMediaKeys = `$platform-${AllPlatforms}`;
@hanzogui/web/types/types.d.ts
PresenceContextProps
typeexport interface PresenceContextProps { id: string; isPresent: boolean; register: (id: string) => () => void; onExitComplete?: (id: string) => void; initial?: false | string | string[]; custom?: any; exitVariant?: string | null; enterVariant?: string | null; enterExitVariant?: string | null; }
@hanzogui/web/types/types.d.ts
PROP_SPLIT
valueexport declare const PROP_SPLIT = "-";
@hanzogui/web/types/helpers/getSplitStyles.d.ts
PropMappedValue
typeexport type PropMappedValue = [string, any, any?][] | undefined;
@hanzogui/web/types/types.d.ts
propMapper
valueexport declare const propMapper: PropMapper;
@hanzogui/web/types/helpers/propMapper.d.ts
PropMapper
typeexport type PropMapper = (key: string, value: any, state: GetStyleState, disabled: boolean, map: (key: string, val: any, originalVal?: any) => void) => void;
@hanzogui/web/types/types.d.ts
PropsWithoutMediaStyles
typeexport type PropsWithoutMediaStyles<A> = { [Key in keyof A as Key extends `$${string}` ? never : Key]?: A[Key]; };
@hanzogui/web/types/hooks/useProps.d.ts
proxyThemesToParents
valueexport declare function proxyThemesToParents(dedupedThemes: DedupedThemes): Record<string, ThemeParsed>;
@hanzogui/web/types/helpers/proxyThemeToParents.d.ts
proxyThemeToParents
valueexport declare function proxyThemeToParents(themeName: string, theme: ThemeParsed): {};
@hanzogui/web/types/helpers/proxyThemeToParents.d.ts
proxyThemeVariables
valueexport declare function proxyThemeVariables<A extends object>(obj: A): A;
@hanzogui/web/types/helpers/proxyThemeVariables.d.ts
PseudoDescriptor
typeexport type PseudoDescriptor = { name: string; priority: number; stateKey?: string; selector?: string; };
@hanzogui/web/types/helpers/pseudoDescriptors.d.ts
PseudoDescriptorKey
typeexport type PseudoDescriptorKey = keyof typeof pseudoDescriptorsBase;
@hanzogui/web/types/helpers/pseudoDescriptors.d.ts
pseudoDescriptors
valueexport declare const pseudoDescriptors: Record<PseudoDescriptorKey | 'enterStyle' | 'exitStyle', PseudoDescriptor>;
@hanzogui/web/types/helpers/pseudoDescriptors.d.ts
PseudoDescriptors
typeexport type PseudoDescriptors = { [Key in keyof typeof pseudoDescriptors]: PseudoDescriptor; };
@hanzogui/web/types/helpers/pseudoDescriptors.d.ts
pseudoDescriptorsBase
valueexport declare const pseudoDescriptorsBase: { readonly hoverStyle: { readonly name: 'hover'; readonly priority: 2; }; readonly pressStyle: { readonly name: 'active'; readonly stateKey: 'press'; readonly priority: 3; }; readonly focusVisibleStyle: { readonly name: 'focus-visible'; readonly priority: 4; readonly stateKey: 'focusVisible'; }; readonly focusStyle: { readonly name: 'focus'; readonly priority: 4; }; readonly focusWithinStyle: { readonly name: 'focus-within'; readonly priority: 4; readonly stateKey: 'focusWithin'; }; readonly disabledStyle: { readonly name: 'disabled'; readonly priority: 5; readonly stateKey: 'disabled'; }; };
@hanzogui/web/types/helpers/pseudoDescriptors.d.ts
PseudoGroupState
typeexport type PseudoGroupState = Pick<GuiComponentState, 'disabled' | 'hover' | 'press' | 'pressIn' | 'focus' | 'focusVisible' | 'focusWithin'>;
@hanzogui/web/types/types.d.ts
pseudoPriorities
valueexport declare const pseudoPriorities: { hover: 2; press: 3; focus: 4; focusVisible: 4; focusWithin: 4; disabled: 5; };
@hanzogui/web/types/helpers/pseudoDescriptors.d.ts
PseudoPropKeys
typeexport type PseudoPropKeys = keyof WithPseudoProps<any>;
@hanzogui/web/types/types.d.ts
PseudoState
typePseudo state for tracking enter/exit transitions
export type PseudoState = { hover?: boolean; press?: boolean; focus?: boolean; groups?: Record<string, { hover?: boolean; press?: boolean; focus?: boolean; }>; };
@hanzogui/web/types/helpers/pseudoTransitions.d.ts
PseudoStyles
typeexport type PseudoStyles = { hoverStyle?: ViewStyle; pressStyle?: ViewStyle; focusStyle?: ViewStyle; focusWithinStyle?: ViewStyle; focusVisibleStyle?: ViewStyle; disabledStyle?: ViewStyle; enterStyle?: ViewStyle; exitStyle?: ViewStyle; };
@hanzogui/web/types/types.d.ts
PseudoStyleWithTransition
typeexport type PseudoStyleWithTransition<A> = A & { transition?: TransitionProp | null; };
@hanzogui/web/types/types.d.ts
PseudoTransitions
typeexport type PseudoTransitions = Partial<Record<keyof WithPseudoProps<any>, TransitionProp | null>> & { [key: `$group-${string}-${'hover' | 'press' | 'focus'}`]: TransitionProp | null | undefined; };
@hanzogui/web/types/types.d.ts
px
valueHelper function to mark a token value as needing px units. Usage: px(100) creates a token that will become "100px" on web, 100 on native. @param value - The numeric value @returns A special object that indicates this value needs px units
export declare function px(value: number): PxValue;
@hanzogui/web/types/createVariable.d.ts
PxValue
typeType for the px helper object that indicates a token value needs px units
export interface PxValue { val: number; needsPx: true; }
@hanzogui/web/types/types.d.ts
RadiusTokens
typeexport type RadiusTokens = SpecificTokensSpecial | GetTokenString<keyof Tokens['radius']> | ThemeValueFallbackRadius | number | RemString;
@hanzogui/web/types/types.d.ts
RadiusVariantSpreadFunction
typeexport type RadiusVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, RadiusTokens>;
@hanzogui/web/types/types.d.ts
ReactComponentWithRef
typeexport type ReactComponentWithRef<Props, Ref> = ForwardRefExoticComponent<Props & RefAttributes<Ref>>;
@hanzogui/web/types/types.d.ts
RecursiveArray
typeexport interface RecursiveArray<T> extends Array<T | ReadonlyArray<T> | RecursiveArray<T>> { }
@hanzogui/web/types/types.d.ts
RegisteredStyle
typeKeep a brand of 'T' so that calls to `StyleSheet.flatten` can take `RegisteredStyle<T>` and return `T`.
export type RegisteredStyle<T> = number & { __registeredStyleBrand: T; };
@hanzogui/web/types/types.d.ts
registerFontVariables
valueexport declare function registerFontVariables(parsedFont: any): string[];
@hanzogui/web/types/insertFont.d.ts
resetMediaStyleCache
valueexport declare function resetMediaStyleCache(): void;
@hanzogui/web/types/helpers/createMediaStyle.d.ts
resolveEffectivePseudoTransition
valueResolves the effective transition based on pseudo state changes. When entering a pseudo state (e.g., hover), use that pseudo's transition. When exiting (returning to base), use the base transition. CSS-like semantics: - Enter hover: Uses hover's transition (fast snap) - Exit hover: Uses base transition (slow fade)
export declare function resolveEffectivePseudoTransition(prev: PseudoState | undefined, next: GuiComponentState, pseudoTransitions: PseudoTransitions | undefined | null, baseTransition: TransitionProp | undefined | null): TransitionProp | undefined | null;
@hanzogui/web/types/helpers/pseudoTransitions.d.ts
ResolveVariableAs
type-------------------------------------------- end variants --------------------------------------------
export type ResolveVariableAs = 'auto' | 'value' | 'variable' | 'none' | 'web' | 'except-theme';
@hanzogui/web/types/types.d.ts
RNExtraProps
typeexport interface RNExtraProps { onScrollShouldSetResponder?: unknown; onScrollShouldSetResponderCapture?: unknown; onSelectionChangeShouldSetResponder?: unknown; onSelectionChangeShouldSetResponderCapture?: unknown; onLayout?: OnLayout; elevationAndroid?: number | string; }
@hanzogui/web/types/interfaces/RNExclusiveTypes.d.ts
RNOnlyProps
typeexport type RNOnlyProps = 'onStartShouldSetResponder' | 'onScrollShouldSetResponder' | 'onScrollShouldSetResponderCapture' | 'onSelectionChangeShouldSetResponder' | 'onSelectionChangeShouldSetResponderCapture' | 'onLayout' | 'onTextLayout' | 'href' | 'hrefAttrs' | 'elevationAndroid' | 'rel' | 'download' | 'dir' | 'onStartShouldSetResponder' | 'onMoveShouldSetResponder' | 'onResponderEnd' | 'onResponderGrant' | 'onResponderReject' | 'onResponderMove' | 'onResponderRelease' | 'onResponderStart' | 'onResponderTerminationRequest' | 'onResponderTerminate' | 'onStartShouldSetResponderCapture' | 'onMoveShouldSetResponderCapture';
@hanzogui/web/types/interfaces/RNExclusiveTypes.d.ts
RNTextProps
typeexport interface RNTextProps extends RNExtraProps { dir?: 'ltr' | 'rtl' | 'auto'; onTextLayout?: OnTextLayout; }
@hanzogui/web/types/interfaces/RNExclusiveTypes.d.ts
RNViewProps
typeexport interface RNViewProps extends GestureResponderHandlers, RNExtraProps { rel?: any; download?: any; }
@hanzogui/web/types/interfaces/RNExclusiveTypes.d.ts
Role
typeexport type Role = 'alert' | 'alertdialog' | 'application' | 'article' | 'banner' | 'button' | 'cell' | 'checkbox' | 'columnheader' | 'combobox' | 'complementary' | 'contentinfo' | 'definition' | 'dialog' | 'directory' | 'document' | 'feed' | 'figure' | 'form' | 'grid' | 'group' | 'heading' | 'img' | 'link' | 'list' | 'listitem' | 'log' | 'main' | 'marquee' | 'math' | 'menu' | 'menubar' | 'menuitem' | 'meter' | 'navigation' | 'none' | 'note' | 'option' | 'presentation' | 'progressbar' | 'radio' | 'radiogroup' | 'region' | 'row' | 'rowgroup' | 'rowheader' | 'scrollbar' | 'searchbox' | 'separator' | 'slider' | 'spinbutton' | 'status' | 'summary' | 'switch' | 'tab' | 'table' | 'tablist' | 'tabpanel' | 'term' | 'timer' | 'toolbar' | 'tooltip' | 'tree' | 'treegrid' | 'treeitem';
@hanzogui/web/types/types.d.ts
RulesToInsert
typeexport type RulesToInsert = Record<string, StyleObject>;
@hanzogui/web/types/types.d.ts
SafeAreaValueKeys
typeexport type SafeAreaValueKeys = 'padding' | 'paddingTop' | 'paddingBottom' | 'paddingLeft' | 'paddingRight' | 'paddingHorizontal' | 'paddingVertical' | 'paddingStart' | 'paddingEnd' | 'paddingBlock' | 'paddingInline' | 'paddingBlockStart' | 'paddingBlockEnd' | 'paddingInlineStart' | 'paddingInlineEnd' | 'margin' | 'marginTop' | 'marginBottom' | 'marginLeft' | 'marginRight' | 'marginHorizontal' | 'marginVertical' | 'marginStart' | 'marginEnd' | 'marginBlock' | 'marginInline' | 'marginBlockStart' | 'marginBlockEnd' | 'marginInlineStart' | 'marginInlineEnd' | 'inset' | 'top' | 'bottom' | 'left' | 'right' | 'start' | 'end';
@hanzogui/web/types/types.d.ts
setConfig
valueexport declare const setConfig: (next: GuiInternalConfig) => void;
@hanzogui/web/types/config.d.ts
setDidGetVariableValue
valueexport declare const setDidGetVariableValue: (val: boolean) => boolean;
@hanzogui/web/types/createVariable.d.ts
setIdentifierValue
valueexport declare const setIdentifierValue: (identifier: string, value: any) => void;
@hanzogui/web/types/Gui.d.ts
setMediaState
valueexport declare const setMediaState: (next: MediaQueryState) => void;
@hanzogui/web/types/helpers/mediaState.d.ts
setNonce
valueexport declare function setNonce(_: string): void;
@hanzogui/web/types/helpers/insertStyleRule.d.ts
setRef
valueSet a given ref to a given value This utility takes care of different types of refs: callback refs and RefObject(s)
export declare function setRef<T>(ref: PossibleRef<T>, value: T): void;
@hanzogui/compose-refs/types/compose-refs.d.ts
setupDev
valueexport declare function setupDev(conf: DevConfig): void;
@hanzogui/web/types/config.d.ts
setupHooks
valueexport declare function setupHooks(next: InternalHooks): void;
@hanzogui/web/types/setupHooks.d.ts
setupMatchMedia
valueexport declare function setupMatchMedia(_: MatchMedia): void;
@hanzogui/web/types/helpers/matchMedia.d.ts
setupPlatformDriver
valueregister the renderer platform driver — call once at app setup, before render.
export declare function setupPlatformDriver(driver: PlatformDriver): void;
@hanzogui/constants/types/platformDriver.d.ts
Shorthands
typeexport type Shorthands = GuiConfig['shorthands'];
@hanzogui/web/types/types.d.ts
shouldRenderNativePlatform
valuetakes in what user has inputted the native-supporting component and returns the name of the native platform we should render @example ['android'] => 'android' (when current platform is android) @example ['android'] => null (when current platform is not android) @example ['mobile'] => 'ios' (when current platform is ios) @param supportedSpecificNativeValues the platforms your component/system supports @param nativeProp the platforms your user is requesting you to use @returns
export declare function shouldRenderNativePlatform(nativeProp?: NativeValue): ExplicitNativePlatform | null;
@hanzogui/helpers/types/shouldRenderNativePlatform.d.ts
simpleHash
valueexport declare const simpleHash: (strIn: string, hashMin?: number | 'strict') => string;
@hanzogui/simple-hash/types/index.d.ts
SingleGroupContext
typeexport type SingleGroupContext = { subscribe: (cb: GroupStateListener) => DisposeFn; state: ComponentGroupState; };
@hanzogui/web/types/types.d.ts
SizeKeys
typeexport type SizeKeys = 'width' | 'height' | 'minWidth' | 'minHeight' | 'maxWidth' | 'maxHeight' | 'shadowRadius';
@hanzogui/web/types/types.d.ts
SizeTokens
typeexport type SizeTokens = SpecificTokensSpecial | ThemeValueFallbackSize | GetTokenString<keyof Tokens['size']>;
@hanzogui/web/types/types.d.ts
SizeVariantSpreadFunction
typeexport type SizeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, SizeTokens>;
@hanzogui/web/types/types.d.ts
Slot
valueexport declare const Slot: import("react").NamedExoticComponent<SlotProps & import("react").RefAttributes<any>>;
@hanzogui/web/types/views/Slot.d.ts
Slottable
valueexport declare function Slottable({ children }: { children: ReactNode; }): import("react").JSX.Element; export declare namespace Slottable { var displayName: string; }
@hanzogui/web/types/views/Slot.d.ts
SomewhatSpecificColorValue
typeexport type SomewhatSpecificColorValue = CSSColorNames | 'transparent' | (`rgba(${string})` & {}) | (`rgb(${string})` & {}) | (`hsl(${string})` & {}) | (`hsla(${string})` & {}) | (`#${string}` & {});
@hanzogui/web/types/types.d.ts
SpaceKeys
typeexport type SpaceKeys = 'space' | 'padding' | 'paddingHorizontal' | 'paddingVertical' | 'paddingLeft' | 'paddingTop' | 'paddingBottom' | 'paddingLeft' | 'paddingRight' | 'paddingEnd' | 'paddingStart' | 'margin' | 'marginHorizontal' | 'marginVertical' | 'marginLeft' | 'marginTop' | 'marginBottom' | 'marginLeft' | 'marginRight' | 'marginEnd' | 'marginStart' | 'marginBlock' | 'marginBlockStart' | 'marginBlockEnd' | 'marginInline' | 'marginInlineStart' | 'marginInlineEnd' | 'paddingBlock' | 'paddingBlockStart' | 'paddingBlockEnd' | 'paddingInline' | 'paddingInlineStart' | 'paddingInlineEnd' | 'x' | 'y' | 'gap' | 'rowGap' | 'columnGap' | 'scale' | 'scaleX' | 'scaleY' | 'borderTopEndRadius' | 'borderTopLeftRadius' | 'borderTopRightRadius' | 'borderTopStartRadius' | 'borderBottomEndRadius' | 'borderBottomLeftRadius' | 'borderBottomRightRadius' | 'borderBottomStartRadius' | 'borderBottomWidth' | 'borderLeftWidth' | 'borderRadius' | 'borderRightWidth' | 'borderTopEndRadius' | 'borderTopLeftRadius' | 'borderTopRightRadius' | 'borderEndWidth' | 'borderStartWidth' | 'borderTopStartRadius' | 'borderTopWidth' | 'borderWidth' | 'left' | 'top' | 'right' | 'bottom' | 'shadowOffset' | …
@hanzogui/web/types/types.d.ts
SpaceTokens
typeexport type SpaceTokens = SpecificTokensSpecial | GetTokenString<keyof Tokens['space']> | ThemeValueFallbackSpace;
@hanzogui/web/types/types.d.ts
SpaceValue
typeexport type SpaceValue = number | SpaceTokens | ThemeValueFallback;
@hanzogui/web/types/types.d.ts
SpaceVariantSpreadFunction
typeexport type SpaceVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, SpaceTokens>;
@hanzogui/web/types/types.d.ts
SpecificTokens
typeexport type SpecificTokens<Record = Tokens, RK extends keyof Record = keyof Record> = RK extends string ? `$${RK}.${keyof Record[RK] extends string | number ? keyof Record[RK] extends `$${infer X}` ? X : keyof Record[RK] : never}` : never;
@hanzogui/web/types/types.d.ts
SpecificTokensSpecial
typeexport type SpecificTokensSpecial = GuiSettings extends { autocompleteSpecificTokens: infer Val; } ? Val extends 'except-special' | undefined ? never : SpecificTokens : SpecificTokens;
@hanzogui/web/types/types.d.ts
SplitStyleProps
typeexport type SplitStyleProps = { styledContext?: Record<string, any>; mediaState?: Record<string, boolean>; noClass?: boolean; noExpand?: boolean; noNormalize?: boolean | 'values'; noSkip?: boolean; noMergeStyle?: boolean; resolveValues?: ResolveVariableAs; disableExpandShorthands?: boolean; fallbackProps?: Record<string, any>; hasTextAncestor?: boolean; willBeAnimated?: boolean; isAnimated: boolean; isExiting?: boolean; exitVariant?: string; enterVariant?: string; };
@hanzogui/web/types/types.d.ts
SplitStyleResult
typeexport type SplitStyleResult = ReturnType<typeof getSplitStyles>;
@hanzogui/web/types/helpers/getSplitStyles.d.ts
SplitStyles
typeexport type SplitStyles = ReturnType<typeof getSplitStyles>;
@hanzogui/web/types/helpers/getSplitStyles.d.ts
SpreadKeys
typeexport type SpreadKeys = '...fontSize' | '...fontStyle' | '...fontTransform' | '...lineHeight' | '...letterSpacing' | '...size' | '...space' | '...color' | '...zIndex' | '...theme' | '...radius';
@hanzogui/web/types/types.d.ts
StackNonStyleProps
typeexport interface StackNonStyleProps extends Omit<ViewProps, 'hitSlop' | 'pointerEvents' | 'display' | 'children' | keyof GuiComponentPropsBaseBase | RNOnlyProps | keyof ExtendBaseStackProps | 'style' | 'onFocus' | 'onBlur' | 'onPointerCancel' | 'onPointerDown' | 'onPointerMove' | 'onPointerUp'>, ExtendBaseStackProps, GuiComponentPropsBase { style?: StyleProp<LooseCombinedObjects<React.CSSProperties, ViewStyle>>; }
@hanzogui/web/types/types.d.ts
StackStyle
typeexport type StackStyle = WithThemeShorthandsPseudosMedia<StackStyleBase>;
@hanzogui/web/types/types.d.ts
StackStyleBase
typeexport interface StackStyleBase extends Omit<ViewStyle, keyof ExtendedBaseProps | 'elevation'>, ExtendedBaseProps { }
@hanzogui/web/types/types.d.ts
StaticComponentObject
typeexport type StaticComponentObject<Props, Ref, NonStyledProps, BaseStyles extends object, VariantProps, ParentStaticProperties> = { staticConfig: StaticConfig; styleable: Styleable<Props extends TamaDefer ? GetFinalProps<NonStyledProps, BaseStyles, VariantProps> : Props, Ref, NonStyledProps, BaseStyles, VariantProps, ParentStaticProperties>; };
@hanzogui/web/types/types.d.ts
StaticConfig
typeexport type StaticConfig = StaticConfigBase & { parentStaticConfig?: StaticConfigBase; };
@hanzogui/web/types/types.d.ts
StaticConfigPublic
typeexport type StaticConfigPublic = { defaultProps?: Record<string, any>; /** * (compiler) If you need to pass context or something, prevents from ever * flattening. The 'jsx' option means it will never flatten. if you * pass JSX as a children (if its purely string, it will still flatten). */ neverFlatten?: boolean | 'jsx'; /** * Adds support for text props and handles focus properly */ isInput?: boolean; /** * Determines ultimate output tag (Text vs View) */ isText?: boolean; /** * Which style keys are allowed to be extracted. */ validStyles?: { [key: string]: boolean; }; /** * Accept Gui tokens for these props (key for the prop key, val for the token category) */ accept?: { [key: string]: keyof Tokens | 'style' | 'textStyle'; }; /** * (compiler) If these props are encountered, leave them un-extracted. */ inlineProps?: Set<string>; /** * (compiler) If not flattening, leave this prop as original value. * Only applies to style attributes */ inlineWhenUnflattened?: Set<string>; /** * Auto-detected, but can …
@hanzogui/web/types/types.d.ts
StylableComponent
type-------------------------------------------- variants --------------------------------------------
export type StylableComponent = GuiComponent | ComponentType<any> | ForwardRefExoticComponent<any> | ReactComponentWithRef<any, any> | (new (props: any) => any);
@hanzogui/web/types/types.d.ts
STYLE_TOKEN_PROVENANCE_KEY
valueexport declare const STYLE_TOKEN_PROVENANCE_KEY = "hanzogui.styleTokenProvenance";
@hanzogui/web/types/helpers/styleProvenance.d.ts
Styleable
typeexport type Styleable<Props, Ref, NonStyledProps, BaseStyles extends object, VariantProps, ParentStaticProperties> = <CustomProps extends object | void = void, MergedProps = CustomProps extends void ? Props : Omit<Props, keyof CustomProps> & CustomProps, FunctionDef extends ForwardRefRenderFunction<Ref, MergedProps> = ForwardRefRenderFunction<Ref, MergedProps>>(a: FunctionDef, options?: StyleableOptions) => GuiComponent<MergedProps, Ref, NonStyledProps & CustomProps, BaseStyles, VariantProps, ParentStaticProperties>;
@hanzogui/web/types/types.d.ts
StyleableOptions
typeexport type StyleableOptions = { disableTheme?: boolean; staticConfig?: Partial<StaticConfig>; };
@hanzogui/web/types/types.d.ts
StyleCompat
typeexport type StyleCompat = 'legacy' | 'react-native' | 'web';
@hanzogui/web/types/config.d.ts
styled
valuedeclare const styledExport: typeof styled & StyledHtmlFactories;
@hanzogui/web/types/styled.d.ts
StyledContext
typeexport type StyledContext<Props extends Record<string, any> = any> = Context<Props> & { context: Context<Props>; props: Record<string, any> | undefined; Provider: ProviderExoticComponent<Partial<Props | undefined> & { children?: ReactNode; scope?: string; }>; useStyledContext: (scope?: string) => Props; };
@hanzogui/web/types/types.d.ts
styledHtml
valuestyledHtml() for HTML element tags like 'a', 'button', 'div', etc. Automatically provides element-specific props (href for anchors, type for buttons, etc.) @example const StyledAnchor = styledHtml('a', { color: '$blue10', textDecorationLine: 'underline', }) // StyledAnchor now accepts `href` prop with proper typing <StyledAnchor href="/path">Link</StyledAnchor>
export declare function styledHtml<Tag extends keyof HTMLElementTagNameMap, Variants extends VariantDefinitions<any, any> | undefined = undefined>(tag: Tag, options?: Partial<HTMLElementStyleBase<Tag>> & { name?: string; variants?: Variants; defaultVariants?: GetVariantAcceptedValues<NonNullable<Variants>>; context?: StyledContext; }): GuiComponent<TamaDefer, HTMLElementTagNameMap[Tag], GuiComponentPropsBase & HTMLElementSpecificProps<Tag>, HTMLElementStyleBase<Tag>, Variants extends undefined ? {} : AreVariantsUndefined<NonNullable<Variants>> extends true ? {} : GetVariantAcceptedValues<NonNullable<Variants>>, {}>;
@hanzogui/web/types/styled.d.ts
StyleObject
typeexport type StyleObject = [ property: string, value: any, identifier: string, pseudo: 'hover' | 'focus' | 'focus-visible' | 'focus-within' | 'active' | undefined, rules: string[] ];
@hanzogui/helpers/types/types.d.ts
StyleObjectIdentifier
valueexport declare const StyleObjectIdentifier = 2;
@hanzogui/helpers/types/types.d.ts
StyleObjectProperty
valueexport declare const StyleObjectProperty = 0;
@hanzogui/helpers/types/types.d.ts
StyleObjectPseudo
valueexport declare const StyleObjectPseudo = 3;
@hanzogui/helpers/types/types.d.ts
StyleObjectRules
valueexport declare const StyleObjectRules = 4;
@hanzogui/helpers/types/types.d.ts
StyleObjectValue
valueexport declare const StyleObjectValue = 1;
@hanzogui/helpers/types/types.d.ts
styleOriginalValues
valueexport { styleOriginalValues };
@hanzogui/web/types/helpers/getSplitStyles.d.ts
StyleProp
typeexport type StyleProp<T> = T | RegisteredStyle<T> | RecursiveArray<T | RegisteredStyle<T> | Falsy> | Falsy;
@hanzogui/web/types/types.d.ts
stylePropsAll
valueexport declare const stylePropsAll: { gridAutoColumns: boolean; gridAutoRows: boolean; gridTemplateColumns: boolean; gridTemplateRows: boolean; grid: boolean; gridArea: boolean; gridAutoFlow: boolean; gridColumn: boolean; gridColumnEnd: boolean; gridColumnStart: boolean; gridRow: boolean; gridRowEnd: boolean; gridRowStart: boolean; gridTemplate: boolean; gridTemplateAreas: boolean; justifyItems: boolean; justifySelf: boolean; placeContent: boolean; placeItems: boolean; placeSelf: boolean; backgroundAttachment?: boolean | undefined; backgroundBlendMode?: boolean | undefined; backgroundClip?: boolean | undefined; backgroundOrigin?: boolean | undefined; backgroundRepeat?: boolean | undefined; borderBottomStyle?: boolean | undefined; borderLeftStyle?: boolean | undefined; borderRightStyle?: boolean | undefined; borderTopStyle?: boolean | undefined; contain?: boolean | undefined; containerType?: boolean | undefined; content?: boolean | undefined; float?: boolean | undefined; maskBorderMode?: boolean | undefined; maskBorderRepeat?: boolean | …
@hanzogui/helpers/types/validStyleProps.d.ts
stylePropsText
valueexport declare const stylePropsText: { gridAutoColumns: boolean; gridAutoRows: boolean; gridTemplateColumns: boolean; gridTemplateRows: boolean; grid: boolean; gridArea: boolean; gridAutoFlow: boolean; gridColumn: boolean; gridColumnEnd: boolean; gridColumnStart: boolean; gridRow: boolean; gridRowEnd: boolean; gridRowStart: boolean; gridTemplate: boolean; gridTemplateAreas: boolean; justifyItems: boolean; justifySelf: boolean; placeContent: boolean; placeItems: boolean; placeSelf: boolean; backgroundAttachment?: boolean | undefined; backgroundBlendMode?: boolean | undefined; backgroundClip?: boolean | undefined; backgroundOrigin?: boolean | undefined; backgroundRepeat?: boolean | undefined; borderBottomStyle?: boolean | undefined; borderLeftStyle?: boolean | undefined; borderRightStyle?: boolean | undefined; borderTopStyle?: boolean | undefined; contain?: boolean | undefined; containerType?: boolean | undefined; content?: boolean | undefined; float?: boolean | undefined; maskBorderMode?: boolean | undefined; maskBorderRepeat?: boolean | …
@hanzogui/helpers/types/validStyleProps.d.ts
stylePropsTextOnly
valueexport declare const stylePropsTextOnly: { whiteSpace?: boolean | undefined; wordWrap?: boolean | undefined; textOverflow?: boolean | undefined; WebkitBoxOrient?: boolean | undefined; textDecorationDistance?: boolean | undefined; WebkitLineClamp?: boolean | undefined; color: boolean; textDecorationColor: boolean; textShadowColor: boolean; fontFamily: boolean; fontStyle: boolean; fontVariant: boolean; textTransform: boolean; textAlign: boolean; textDecorationLine: boolean; textDecorationStyle: boolean; userSelect: boolean; fontSize: boolean; fontWeight: boolean; letterSpacing: boolean; lineHeight: boolean; textShadow: boolean; textShadowOffset: boolean; textShadowRadius: boolean; verticalAlign: boolean; };
@hanzogui/helpers/types/validStyleProps.d.ts
stylePropsTransform
valueexport declare const stylePropsTransform: { x: boolean; y: boolean; scale: boolean; perspective: boolean; scaleX: boolean; scaleY: boolean; skewX: boolean; skewY: boolean; matrix: boolean; rotate: boolean; rotateY: boolean; rotateX: boolean; rotateZ: boolean; };
@hanzogui/helpers/types/validStyleProps.d.ts
stylePropsUnitless
valueexport declare const stylePropsUnitless: { grid: boolean; gridArea: boolean; gridAutoFlow: boolean; gridColumn: boolean; gridColumnEnd: boolean; gridColumnStart: boolean; gridRow: boolean; gridRowEnd: boolean; gridRowStart: boolean; gridTemplate: boolean; gridTemplateAreas: boolean; justifyItems: boolean; justifySelf: boolean; placeContent: boolean; placeItems: boolean; placeSelf: boolean; WebkitLineClamp: boolean; lineClamp: boolean; animationIterationCount: boolean; aspectRatio: boolean; borderImageOutset: boolean; borderImageSlice: boolean; borderImageWidth: boolean; columnCount: boolean; flex: boolean; flexGrow: boolean; flexOrder: boolean; flexPositive: boolean; flexShrink: boolean; flexNegative: boolean; fontWeight: boolean; opacity: boolean; order: boolean; orphans: boolean; tabSize: boolean; widows: boolean; zIndex: boolean; zoom: boolean; scale: boolean; scaleX: boolean; scaleY: boolean; scaleZ: boolean; shadowOpacity: boolean; };
@hanzogui/helpers/types/validStyleProps.d.ts
stylePropsView
valueexport declare const stylePropsView: { gridAutoColumns: boolean; gridAutoRows: boolean; gridTemplateColumns: boolean; gridTemplateRows: boolean; grid: boolean; gridArea: boolean; gridAutoFlow: boolean; gridColumn: boolean; gridColumnEnd: boolean; gridColumnStart: boolean; gridRow: boolean; gridRowEnd: boolean; gridRowStart: boolean; gridTemplate: boolean; gridTemplateAreas: boolean; justifyItems: boolean; justifySelf: boolean; placeContent: boolean; placeItems: boolean; placeSelf: boolean; backgroundAttachment?: boolean | undefined; backgroundBlendMode?: boolean | undefined; backgroundClip?: boolean | undefined; backgroundOrigin?: boolean | undefined; backgroundRepeat?: boolean | undefined; borderBottomStyle?: boolean | undefined; borderLeftStyle?: boolean | undefined; borderRightStyle?: boolean | undefined; borderTopStyle?: boolean | undefined; contain?: boolean | undefined; containerType?: boolean | undefined; content?: boolean | undefined; float?: boolean | undefined; maskBorderMode?: boolean | undefined; maskBorderRepeat?: boolean | …
@hanzogui/helpers/types/validStyleProps.d.ts
StyleResolver
typeexport type StyleResolver<Response = PropMappedValue> = (key: string, value: any, props: SplitStyleProps, state: GetStyleState, parentVariantKey: string) => Response;
@hanzogui/web/types/types.d.ts
styleToCSS
valueexport declare function styleToCSS(style: Record<string, any>): void;
@hanzogui/web/types/helpers/getCSSStylesAtomic.d.ts
StyleTokenBinding
typeexport type StyleTokenBinding = { /** original token string before resolution, e.g. '$background' or '$color9' */ token: string; /** full resolved theme name that produced the value, e.g. 'light_accent' */ theme: string; };
@hanzogui/web/types/helpers/styleProvenance.d.ts
StyleTokenProvenance
typeexport type StyleTokenProvenance = Record<string, StyleTokenBinding>;
@hanzogui/web/types/helpers/styleProvenance.d.ts
supportsDynamicColorIOS
valueexport declare const supportsDynamicColorIOS: boolean;
@hanzogui/constants/types/constants.d.ts
TamaDefer
typeexport type TamaDefer = { __tamaDefer: true; };
@hanzogui/web/types/types.d.ts
Text
typeexport type Text = GuiTextElement;
@hanzogui/web/types/views/Text.d.ts
Text
valueexport declare const Text: import("../types.tsx").GuiComponent<TextProps, GuiTextElement, TextNonStyleProps, TextStylePropsBase, {}>;
@hanzogui/web/types/views/Text.d.ts
TextNonStyleProps
typeexport interface TextNonStyleProps extends Omit<ReactTextProps, 'children' | keyof WebOnlyPressEvents | RNOnlyProps | keyof ExtendBaseTextProps | 'style'>, ExtendBaseTextProps, GuiComponentPropsBase { style?: StyleProp<LooseCombinedObjects<React.CSSProperties, RNTextStyle>>; }
@hanzogui/web/types/types.d.ts
TextProps
typeexport type TextProps = TextNonStyleProps & TextStyle;
@hanzogui/web/types/types.d.ts
TextStyle
typeexport type TextStyle = WithThemeShorthandsPseudosMedia<TextStylePropsBase>;
@hanzogui/web/types/types.d.ts
TextStylePropsBase
typeexport interface TextStylePropsBase extends Omit<RNTextStyle, keyof ExtendedBaseProps>, ExtendedBaseProps { ellipsis?: boolean; numberOfLines?: number; textDecorationDistance?: number; textOverflow?: Properties['textOverflow']; whiteSpace?: Properties['whiteSpace']; wordWrap?: Properties['wordWrap']; /** * CSS text-shadow string. Supports tokens: "2px 2px 4px $shadowColor" * On native, only a single shadow is supported. */ textShadow?: string; }
@hanzogui/web/types/types.d.ts
Theme
valueexport declare const Theme: React.ForwardRefExoticComponent<ThemeProps & { passThrough?: boolean; contain?: boolean; } & React.RefAttributes<unknown>>;
@hanzogui/web/types/views/Theme.d.ts
THEME_CLASSNAME_PREFIX
valueexport declare const THEME_CLASSNAME_PREFIX = "t_";
@hanzogui/web/types/constants/constants.d.ts
THEME_NAME_SEPARATOR
valueexport declare const THEME_NAME_SEPARATOR = "_";
@hanzogui/web/types/constants/constants.d.ts
themeable
valueexport declare function themeable<ComponentType extends (props: any) => any>(Component: ComponentType, staticConfig: Partial<StaticConfig>, optimize?: boolean): ComponentType extends (props: infer P) => infer R ? (props: Omit<P, 'theme'> & ThemeableProps) => R : unknown;
@hanzogui/web/types/helpers/themeable.d.ts
ThemeableProps
typeexport interface ThemeableProps { theme?: ThemeName | null; themeReset?: boolean; componentName?: string; debug?: DebugProp; }
@hanzogui/web/types/types.d.ts
ThemeDefinition
typeexport type ThemeDefinition = BaseThemeDefinitions extends never ? GenericThemeDefinition : BaseThemeDefinitions;
@hanzogui/web/types/types.d.ts
ThemeKeys
typeexport type ThemeKeys = keyof ThemeDefinition;
@hanzogui/web/types/types.d.ts
ThemeMediaKeys
typeexport type ThemeMediaKeys<TK extends keyof Themes = keyof Themes> = TK extends string ? string extends TK ? never : TK extends `${string}_${string}` ? never : `$theme-${TK}` : never;
@hanzogui/web/types/types.d.ts
ThemeName
typeexport type ThemeName = Exclude<GetAltThemeNames<keyof Themes>, number>;
@hanzogui/web/types/types.d.ts
ThemeParsed
typeexport type ThemeParsed = { [key in ThemeKeys]: CoerceToVariable<ThemeDefinition[key]>; };
@hanzogui/web/types/types.d.ts
ThemeProps
typeexport interface ThemeProps { className?: string; name?: Exclude<ThemeName, number> | null; componentName?: string; children?: any; reset?: boolean; debug?: DebugProp; forceClassName?: boolean; shallow?: boolean; }
@hanzogui/web/types/types.d.ts
ThemeProvider
valueexport declare const ThemeProvider: (props: ThemeProviderProps) => import("react").JSX.Element;
@hanzogui/web/types/views/ThemeProvider.d.ts
ThemeProviderProps
typeexport type ThemeProviderProps = { className?: string; defaultTheme: string | null | undefined; /** @deprecated moved to createGui({ settings: { disableRootThemeClass } }) */ disableRootThemeClass?: boolean; /** @deprecated moved to createGui({ settings: { themeClassNameOnRoot } }) */ themeClassNameOnRoot?: boolean; children?: any; reset?: boolean; };
@hanzogui/web/types/types.d.ts
Themes
typeexport type Themes = GuiConfig['themes'];
@hanzogui/web/types/types.d.ts
ThemesLikeObject
typeexport type ThemesLikeObject = Record<string, Record<string, string>>;
@hanzogui/web/types/types.d.ts
ThemeState
typeexport type ThemeState = { id: string; name: string; theme: ThemeParsed; parentName?: string; isInverse?: boolean; inverses?: number; isNew?: boolean; parentId?: string; scheme?: 'light' | 'dark'; };
@hanzogui/web/types/types.d.ts
ThemeTokens
typeexport type ThemeTokens = `$${ThemeKeys}`;
@hanzogui/web/types/types.d.ts
ThemeValueByCategory
typeexport type ThemeValueByCategory<K extends string | number | symbol> = K extends 'theme' ? ThemeTokens : K extends 'size' ? SizeTokens : K extends 'font' ? FontTokens : K extends 'fontSize' ? FontSizeTokens : K extends 'space' ? SpaceTokens : K extends 'color' ? ColorTokens : K extends 'zIndex' ? ZIndexTokens : K extends 'radius' ? RadiusTokens : K extends 'lineHeight' ? FontLineHeightTokens : K extends 'fontWeight' ? FontWeightTokens : K extends 'letterSpacing' ? FontLetterSpacingTokens : K extends keyof Tokens ? GetTokenString<keyof Tokens[K]> : never;
@hanzogui/web/types/types.d.ts
ThemeValueFallback
typeexport type ThemeValueFallback = (GuiSettings extends { allowedStyleValues: any; } ? never : UnionableString) | Variable;
@hanzogui/web/types/types.d.ts
ThemeValueFallbackColor
typeexport type ThemeValueFallbackColor = ThemeValueFallback | GetThemeValueFallbackFor<AllowedValueSettingColor, never, SomewhatSpecificColorValue, UnionableString | UnionableNumber, WebStyleValueUniversal>;
@hanzogui/web/types/types.d.ts
ThemeValueFallbackRadius
typeexport type ThemeValueFallbackRadius = ThemeValueFallback | GetThemeValueFallbackFor<AllowedValueSettingRadius, never, UnionableNumber, UnionableNumber, WebStyleValueUniversal>;
@hanzogui/web/types/types.d.ts
ThemeValueFallbackSize
typeexport type ThemeValueFallbackSize = GetThemeValueFallbackFor<AllowedValueSettingSize, never, SomewhatSpecificSizeValue, UnionableString | UnionableNumber, WebStyleValueUniversal | WebOnlySizeValue>;
@hanzogui/web/types/types.d.ts
ThemeValueFallbackSpace
typeexport type ThemeValueFallbackSpace = ThemeValueFallback | GetThemeValueFallbackFor<AllowedValueSettingSpace, never, SomewhatSpecificSpaceValue, UnionableString | UnionableNumber, WebStyleValueUniversal | WebOnlySizeValue>;
@hanzogui/web/types/types.d.ts
ThemeValueFallbackZIndex
typeexport type ThemeValueFallbackZIndex = ThemeValueFallback | GetThemeValueFallbackFor<AllowedValueSettingZIndex, never, UnionableNumber, UnionableNumber, WebStyleValueUniversal>;
@hanzogui/web/types/types.d.ts
ThemeValueGet
typeexport type ThemeValueGet<K extends string | number | symbol> = K extends 'theme' ? ThemeTokens : K extends SizeKeys ? SizeTokens : K extends FontKeys ? FontTokens : K extends FontSizeKeys ? FontSizeTokens : K extends `${`border${string | ''}Radius`}` ? RadiusTokens : K extends SpaceKeys ? K extends 'shadowOffset' ? { width: SpaceTokens; height: SpaceTokens; } : SpaceTokens : K extends ColorKeys ? ColorTokens | ThemeValueFallbackColor : K extends ZIndexKeys ? ZIndexTokens : K extends LineHeightKeys ? FontLineHeightTokens : K extends FontWeightKeys ? FontWeightTokens : K extends FontLetterSpacingKeys ? FontLetterSpacingTokens : K extends OpacityKeys ? SpecificTokens | ThemeValueFallback : never;
@hanzogui/web/types/types.d.ts
ThemeVariantSpreadFunction
typeexport type ThemeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, ThemeTokens>;
@hanzogui/web/types/types.d.ts
ThemeWithState
typeexport type ThemeWithState = [ThemeParsed, ThemeState];
@hanzogui/web/types/hooks/useTheme.d.ts
Token
typeexport type Token = NonSpecificTokens | (GuiSettings extends { autocompleteSpecificTokens: false; } ? never : SpecificTokens);
@hanzogui/web/types/types.d.ts
tokenCategories
valueexport declare const tokenCategories: { radius: { borderRadius: boolean; borderTopLeftRadius: boolean; borderTopRightRadius: boolean; borderBottomLeftRadius: boolean; borderBottomRightRadius: boolean; borderStartStartRadius: boolean; borderStartEndRadius: boolean; borderEndStartRadius: boolean; borderEndEndRadius: boolean; }; size: { width: boolean; height: boolean; minWidth: boolean; minHeight: boolean; maxWidth: boolean; maxHeight: boolean; blockSize: boolean; minBlockSize: boolean; maxBlockSize: boolean; inlineSize: boolean; minInlineSize: boolean; maxInlineSize: boolean; }; zIndex: { zIndex: boolean; }; color: { color: boolean; textDecorationColor: boolean; textShadowColor: boolean; backgroundColor: boolean; borderColor: boolean; borderBlockStartColor: boolean; borderBlockEndColor: boolean; borderBlockColor: boolean; borderBottomColor: boolean; borderInlineColor: boolean; …
@hanzogui/helpers/types/validStyleProps.d.ts
TokenCategories
typeexport type TokenCategories = 'color' | 'space' | 'size' | 'radius' | 'zIndex';
@hanzogui/web/types/types.d.ts
TokenPrefixedIfExists
typeexport type TokenPrefixedIfExists<A> = A extends Record<string, any> ? TokenPrefixed<A> : {};
@hanzogui/web/types/types.d.ts
Tokens
typeexport type Tokens = GuiConfig['tokens'];
@hanzogui/web/types/types.d.ts
TokensMerged
typeexport type TokensMerged = TokensParsed & Tokens;
@hanzogui/web/types/types.d.ts
TokensParsed
typeexport type TokensParsed = { [Key in keyof Required<Tokens>]: TokenPrefixed<Tokens[Key]>; };
@hanzogui/web/types/types.d.ts
transformsToString
valueexport declare function transformsToString(transforms: object[]): string;
@hanzogui/web/types/helpers/transformsToString.d.ts
TransformStyleProps
typeexport interface TransformStyleProps { /** * Maps to translateX */ x?: number; /** * Maps to translateY */ y?: number; perspective?: number; scale?: number; scaleX?: number; scaleY?: number; skewX?: string; skewY?: string; matrix?: number[]; rotate?: `${number}deg` | UnionableString; rotateY?: `${number}deg` | UnionableString; rotateX?: `${number}deg` | UnionableString; rotateZ?: `${number}deg` | UnionableString; }
@hanzogui/web/types/types.d.ts
TransitionKeys
typeexport type TransitionKeys = InferredTransitionKeys;
@hanzogui/web/types/types.d.ts
TransitionProp
typeexport type TransitionProp = TransitionKeys | ({ default?: TransitionKeys; enter?: TransitionKeys; exit?: TransitionKeys; delay?: number; } & TransitionSpringConfig & { [key: string]: TransitionKeys | { type: TransitionKeys; [key: string]: any; } | number | boolean | undefined; }) | [ TransitionKeys, { delay?: number; enter?: TransitionKeys; exit?: TransitionKeys; } & TransitionSpringConfig & { [key: string]: TransitionKeys | { type?: TransitionKeys; [key: string]: any; } | number | boolean | undefined; } ];
@hanzogui/web/types/types.d.ts
TransitionSpringConfig
typeSpring configuration parameters that can override preset defaults. Use with array syntax: transition={['bouncy', { stiffness: 1000, damping: 70 }]}
export type TransitionSpringConfig = { stiffness?: number; damping?: number; mass?: number; tension?: number; friction?: number; velocity?: number; overshootClamping?: boolean; duration?: number; bounciness?: number; speed?: number; };
@hanzogui/web/types/types.d.ts
Try
typeNarrow copied from ts-toolbelt https://github.com/millsp/ts-toolbelt/blob/master/sources/Function/Narrow.ts
export type Try<A1, A2, Catch = never> = A1 extends A2 ? A1 : Catch;
@hanzogui/web/types/types.d.ts
TypeOverride
typeexport interface TypeOverride { groupNames(): 1; animationDrivers(): 1; }
@hanzogui/web/types/types.d.ts
UnionableNumber
typeexport type UnionableNumber = number & {};
@hanzogui/web/types/types.d.ts
UnionableString
typeexport type UnionableString = string & {};
@hanzogui/web/types/types.d.ts
UniversalAnimatedNumber
typeexport type UniversalAnimatedNumber<A> = { getInstance(): A; getValue(): number; setValue(next: number, config?: AnimatedNumberStrategy, onFinished?: () => void): void; stop(): void; };
@hanzogui/web/types/types.d.ts
updateConfig
valueexport declare const updateConfig: (key: string, value: any) => void;
@hanzogui/web/types/config.d.ts
updateFont
valueexport declare const updateFont: typeof insertFont;
@hanzogui/web/types/insertFont.d.ts
updateMediaListeners
valueexport declare function updateMediaListeners(): void;
@hanzogui/web/types/hooks/useMedia.d.ts
UseAnimatedNumber
typeexport type UseAnimatedNumber<N extends UniversalAnimatedNumber<any> = UniversalAnimatedNumber<any>> = (initial: number) => N;
@hanzogui/web/types/types.d.ts
UseAnimatedNumberReaction
typeexport type UseAnimatedNumberReaction<V extends UniversalAnimatedNumber<any> = UniversalAnimatedNumber<any>> = (opts: { value: V; hostRef: RefObject<GuiElement>; }, onValue: (current: number) => void) => void;
@hanzogui/web/types/types.d.ts
UseAnimatedNumbersStyle
typeexport type UseAnimatedNumbersStyle<V extends UniversalAnimatedNumber<any> = UniversalAnimatedNumber<any>> = (vals: V[], getStyle: (...currentValues: any[]) => any) => any;
@hanzogui/web/types/types.d.ts
UseAnimatedNumberStyle
typeexport type UseAnimatedNumberStyle<V extends UniversalAnimatedNumber<any> = UniversalAnimatedNumber<any>> = (val: V, getStyle: (current: any) => any) => any;
@hanzogui/web/types/types.d.ts
UseAnimationHook
typeexport type UseAnimationHook = (props: { style: Record<string, any>; props: Record<string, any>; presence?: UsePresenceResult | null; staticConfig: StaticConfig; styleProps: SplitStyleProps; componentState: GuiComponentState; useStyleEmitter?: UseStyleEmitter; theme: ThemeParsed; themeName: string; pseudos: WithPseudoProps<ViewStyle> | null; stateRef: { current: GuiComponentStateRef; }; styleState?: GetStyleResult; onDidAnimate?: any; delay?: number; }) => null | { style?: object | object[]; className?: string; ref?: any; };
@hanzogui/web/types/types.d.ts
UseAnimationProps
typeexport type UseAnimationProps = GuiComponentPropsBase & Record<string, any>;
@hanzogui/web/types/types.d.ts
useClientValue
valueexport declare function useClientValue<Value>(value?: Value): FunctionOrValue<Value> | undefined;
@hanzogui/use-did-finish-ssr/types/index.d.ts
useComposedRefs
valueA custom hook that composes multiple refs Accepts callback refs and RefObject(s)
export declare function useComposedRefs<T>(...refs: PossibleRef<T>[]): (node: T) => void;
@hanzogui/compose-refs/types/compose-refs.d.ts
useConfiguration
valueexport declare const useConfiguration: () => ComponentContextI;
@hanzogui/web/types/contexts/ComponentContext.d.ts
useCreateShallowSetState
valueexport declare function useCreateShallowSetState<State extends Record<string, unknown>>(setter: CallbackSetState<State>, debug?: DebugProp): React.Dispatch<React.SetStateAction<Partial<State>>>;
@hanzogui/is-equal-shallow/types/index.d.ts
useDidFinishSSR
valueexport declare function useDidFinishSSR(): boolean;
@hanzogui/use-did-finish-ssr/types/index.d.ts
useEvent
valueexport declare function useEvent<T extends AnyFunction>(callback?: T): T;
@hanzogui/use-event/types/useEvent.d.ts
useGet
valueexport declare function useGet<A>(currentValue: A, initialValue?: any, forwardToFunction?: boolean): () => A;
@hanzogui/use-event/types/useGet.d.ts
useIsClientOnly
valueexport declare const useIsClientOnly: () => boolean;
@hanzogui/use-did-finish-ssr/types/index.d.ts
useIsomorphicLayoutEffect
valueexport declare const useIsomorphicLayoutEffect: typeof useEffect;
@hanzogui/constants/types/constants.d.ts
useIsTouchDevice
valueexport declare const useIsTouchDevice: () => boolean;
@hanzogui/web/types/hooks/useIsTouchDevice.d.ts
useMedia
valueexport declare function useMedia(componentContext?: ComponentContextI, debug?: DebugProp): UseMediaState;
@hanzogui/web/types/hooks/useMedia.d.ts
UseMediaState
typeexport type UseMediaState = { [key in MediaQueryKey]: boolean; };
@hanzogui/web/types/types.d.ts
UsePresenceResult
typeexport type UsePresenceResult = AlwaysPresent | Present | NotPresent;
@hanzogui/web/types/types.d.ts
useProps
valueReturns props and style as a single object, expanding and merging shorthands and media queries. Use sparingly, it will loop props and trigger re-render on all media queries you access.
export declare function useProps<A extends PropsLikeObject>(props: A, opts?: UsePropsOptions): PropsWithoutMediaStyles<A>;
@hanzogui/web/types/hooks/useProps.d.ts
usePropsAndStyle
valueReturns [props, styles, theme, media] fully resolved and flattened with merged media queries and shorthands with all theme and token values resolved. Use sparingly, it will loop props and trigger re-render on all media queries you access.
export declare function usePropsAndStyle<A extends PropsLikeObject>(props: A, opts?: UsePropsOptions): [PropsWithoutMediaStyles<A>, PropsWithoutMediaStyles<A>, ThemeParsed, UseMediaState];
@hanzogui/web/types/hooks/useProps.d.ts
useSplitStyles
valueexport declare const useSplitStyles: StyleSplitter;
@hanzogui/web/types/helpers/getSplitStyles.d.ts
useStyle
valueReturns only style values fully resolved and flattened with merged media queries and shorthands with all theme and token values resolved. Use sparingly, it will loop props and trigger re-render on all media queries you access.
export declare function useStyle<A extends StyleLikeObject>(props: A, opts?: UsePropsOptions): PropsWithoutMediaStyles<A>;
@hanzogui/web/types/hooks/useProps.d.ts
UseStyleEmitter
typeexport type UseStyleEmitter = (cb: UseStyleListener) => void;
@hanzogui/web/types/types.d.ts
useTheme
valueexport declare const useTheme: () => ThemeProxied;
@hanzogui/web/types/hooks/useTheme.d.ts
useThemeName
valueexport declare function useThemeName(): ThemeName;
@hanzogui/web/types/hooks/useThemeName.d.ts
useThemeWithState
valueAdds a proxy around themeState that tracks update keys
export declare const useThemeWithState: (props: UseThemeWithStateProps, isRoot?: boolean, forThemeView?: boolean) => ThemeWithState;
@hanzogui/web/types/hooks/useTheme.d.ts
UseThemeWithStateProps
typeexport type UseThemeWithStateProps = ThemeProps & { deopt?: boolean; passThrough?: boolean; disable?: boolean; needsUpdate?: () => boolean; unstyled?: boolean; };
@hanzogui/web/types/types.d.ts
validPseudoKeys
valueexport declare const validPseudoKeys: { enterStyle: boolean; exitStyle: boolean; hoverStyle: boolean; pressStyle: boolean; focusStyle: boolean; disabledStyle: boolean; focusWithinStyle: boolean; focusVisibleStyle?: boolean | undefined; };
@hanzogui/helpers/types/validStyleProps.d.ts
validStyles
valueexport declare const validStyles: { gridAutoColumns: boolean; gridAutoRows: boolean; gridTemplateColumns: boolean; gridTemplateRows: boolean; grid: boolean; gridArea: boolean; gridAutoFlow: boolean; gridColumn: boolean; gridColumnEnd: boolean; gridColumnStart: boolean; gridRow: boolean; gridRowEnd: boolean; gridRowStart: boolean; gridTemplate: boolean; gridTemplateAreas: boolean; justifyItems: boolean; justifySelf: boolean; placeContent: boolean; placeItems: boolean; placeSelf: boolean; backgroundAttachment?: boolean | undefined; backgroundBlendMode?: boolean | undefined; backgroundClip?: boolean | undefined; backgroundOrigin?: boolean | undefined; backgroundRepeat?: boolean | undefined; borderBottomStyle?: boolean | undefined; borderLeftStyle?: boolean | undefined; borderRightStyle?: boolean | undefined; borderTopStyle?: boolean | undefined; contain?: boolean | undefined; containerType?: boolean | undefined; content?: boolean | undefined; float?: boolean | undefined; maskBorderMode?: boolean | undefined; maskBorderRepeat?: boolean | …
@hanzogui/helpers/types/validStyleProps.d.ts
Variable
typeexport interface Variable<A = any> { isVar: true; variable?: string; val: A; name: string; key: string; needsPx?: boolean; }
@hanzogui/web/types/types.d.ts
VariableColorVal
typeexport type VariableColorVal = string | Variable;
@hanzogui/web/types/types.d.ts
variableToString
valueexport declare function variableToString(vrble?: any, getValue?: boolean): string;
@hanzogui/web/types/createVariable.d.ts
VariableVal
typeexport type VariableVal = number | string | Variable | VariableValGeneric | PxValue;
@hanzogui/web/types/types.d.ts
VariableValGeneric
typeexport type VariableValGeneric = { __generic: 1; };
@hanzogui/web/types/types.d.ts
VariantDefinitionFromProps
typeexport type VariantDefinitionFromProps<MyProps, Val> = MyProps extends object ? { [propName: string]: VariantSpreadFunction<MyProps, Val> | ({ [Key in SpreadKeys]?: Key extends '...fontSize' ? FontSizeVariantSpreadFunction<MyProps> : Key extends '...size' ? SizeVariantSpreadFunction<MyProps> : Key extends '...space' ? SpaceVariantSpreadFunction<MyProps> : Key extends '...color' ? ColorVariantSpreadFunction<MyProps> : Key extends '...lineHeight' ? FontLineHeightVariantSpreadFunction<MyProps> : Key extends '...fontTransform' ? FontTransformVariantSpreadFunction<MyProps> : Key extends '...fontStyle' ? FontStyleVariantSpreadFunction<MyProps> : Key extends '...letterSpacing' ? FontLetterSpacingVariantSpreadFunction<MyProps> : Key extends '...zIndex' ? ZIndexVariantSpreadFunction<MyProps> : Key extends '...radius' ? RadiusVariantSpreadFunction<MyProps> : Key extends '...theme' ? ThemeVariantSpreadFunction<MyProps> : never; } & { [Key in string | number | 'true' | 'false']?: MyProps | VariantSpreadFunction<MyProps, Val>; } & { [Key in VariantTypeKeys]?: Key extends ':number' ? VariantSpreadFunction<MyProps, number> : Key extends ':boolean' ? …
@hanzogui/web/types/types.d.ts
VariantDefinitions
typeexport type VariantDefinitions<Parent extends StylableComponent = GuiComponent, StaticConfig extends StaticConfigPublic = Parent extends { __tama: [any, any, any, any, any, infer S]; } ? S : {}, MyProps extends object = Partial<GetVariantProps<Parent, StaticConfig['isText'] extends true ? true : StaticConfig['isInput'] extends true ? true : false>>, Val = any> = VariantDefinitionFromProps<MyProps, Val> & { _isEmpty?: 1; };
@hanzogui/web/types/types.d.ts
VariantSpreadExtras
typeexport type VariantSpreadExtras<Props> = { fonts: GuiConfig['fonts']; tokens: TokensParsed; theme: Themes extends { [key: string]: infer B; } ? B : unknown; props: Props; fontFamily?: FontFamilyTokens; font?: Font; };
@hanzogui/web/types/types.d.ts
VariantSpreadFunction
typeexport type VariantSpreadFunction<Props extends PropLike, Val = any> = (val: Val, config: VariantSpreadExtras<Props>) => { [Key in keyof Props]: Props[Key] | Variable | VariableVal; } | null | undefined;
@hanzogui/web/types/types.d.ts
VariantTypeKeys
typeexport type VariantTypeKeys = ':string' | ':boolean' | ':number';
@hanzogui/web/types/types.d.ts
View
typeexport type View = GuiElement;
@hanzogui/web/types/views/View.d.ts
View
valueexport declare const View: import("../types.tsx").GuiComponent<ViewProps, GuiElement, StackNonStyleProps, StackStyleBase, {}>;
@hanzogui/web/types/views/View.d.ts
ViewNonStyleProps
typeexport type ViewNonStyleProps = StackNonStyleProps;
@hanzogui/web/types/views/View.d.ts
ViewProps
typeexport type ViewProps = ViewNonStyleProps & ViewStyle;
@hanzogui/web/types/views/View.d.ts
ViewStyle
typeexport type ViewStyle = StackStyle;
@hanzogui/web/types/views/View.d.ts
ViewStylePropsBase
typeexport type ViewStylePropsBase = StackStyleBase;
@hanzogui/web/types/views/View.d.ts
ViewStyleWithPseudos
typeexport type ViewStyleWithPseudos = TextStyle | (TextStyle & { hoverStyle?: TextStyle; pressStyle?: TextStyle; focusStyle?: TextStyle; focusWithinStyle?: TextStyle; focusVisibleStyle?: TextStyle; disabledStyle?: TextStyle; });
@hanzogui/web/types/types.d.ts
WebOnlyPressEvents
typeexport interface WebOnlyPressEvents { onPress?: PressableProps['onPress']; onLongPress?: PressableProps['onLongPress']; onPressIn?: PressableProps['onPress']; onPressOut?: PressableProps['onPress']; onMouseEnter?: DivAttributes['onMouseEnter']; onMouseLeave?: DivAttributes['onMouseLeave']; onMouseDown?: DivAttributes['onMouseDown']; onMouseUp?: DivAttributes['onMouseUp']; onMouseMove?: DivAttributes['onMouseMove']; onMouseOver?: DivAttributes['onMouseOver']; onMouseOut?: DivAttributes['onMouseOut']; onFocus?: DivAttributes['onFocus']; onBlur?: DivAttributes['onBlur']; onClick?: DivAttributes['onClick']; onDoubleClick?: DivAttributes['onDoubleClick']; onContextMenu?: DivAttributes['onContextMenu']; onWheel?: DivAttributes['onWheel']; onKeyDown?: DivAttributes['onKeyDown']; onKeyUp?: DivAttributes['onKeyUp']; onChange?: DivAttributes['onChange']; onInput?: DivAttributes['onInput']; onBeforeInput?: DivAttributes['onBeforeInput']; onScroll?: DivAttributes['onScroll']; onCopy?: DivAttributes['onCopy']; onCut?: DivAttributes['onCut']; onPaste?: DivAttributes['onPaste']; onDrag?: …
@hanzogui/web/types/types.d.ts
webOnlyStylePropsText
valueexport declare const webOnlyStylePropsText: { whiteSpace: boolean; wordWrap: boolean; textOverflow: boolean; WebkitBoxOrient: boolean; textDecorationDistance: boolean; WebkitLineClamp: boolean; };
@hanzogui/helpers/types/webOnlyStyleProps.d.ts
webOnlyStylePropsView
valueexport declare const webOnlyStylePropsView: { backgroundAttachment: boolean; backgroundBlendMode: boolean; backgroundClip: boolean; backgroundOrigin: boolean; backgroundRepeat: boolean; borderBottomStyle: boolean; borderLeftStyle: boolean; borderRightStyle: boolean; borderTopStyle: boolean; contain: boolean; containerType: boolean; content: boolean; float: boolean; maskBorderMode: boolean; maskBorderRepeat: boolean; maskClip: boolean; maskComposite: boolean; maskMode: boolean; maskOrigin: boolean; maskRepeat: boolean; maskType: boolean; objectFit: boolean; overflowBlock: boolean; overflowInline: boolean; overflowX: boolean; overflowY: boolean; pointerEvents: boolean; scrollbarWidth: boolean; textWrap: boolean; touchAction: boolean; transformStyle: boolean; willChange: boolean; transition: boolean; backdropFilter: boolean; WebkitBackdropFilter: boolean; background: boolean; borderTop: boolean; borderRight: boolean; borderBottom: boolean; borderLeft: boolean; backgroundPosition: boolean; backgroundSize: boolean; …
@hanzogui/helpers/types/webOnlyStyleProps.d.ts
WebOnlyValidStyleValues
typeexport type WebOnlyValidStyleValues = { position: '-webkit-sticky'; };
@hanzogui/web/types/types.d.ts
WebStyleValueUniversal
typeexport type WebStyleValueUniversal = 'unset' | 'inherit' | VariableString;
@hanzogui/web/types/types.d.ts
WidthHeight
typeexport type WidthHeight = { width: number; height: number; };
@hanzogui/web/types/types.d.ts
WithMediaProps
typeexport type WithMediaProps<A> = { [Key in MediaPropKeys | GroupMediaKeys | ThemeMediaKeys | PlatformMediaKeys]?: Key extends MediaPropKeys ? A & { [Key in PlatformMediaKeys]?: AddWebOnlyStyleProps<A>; } : Key extends `$platform-web` ? AddWebOnlyStyleProps<A> & { [Key in MediaPropKeys]?: AddWebOnlyStyleProps<A>; } : A & { [Key in MediaPropKeys]?: A; }; };
@hanzogui/web/types/types.d.ts
WithPseudoProps
typeexport type WithPseudoProps<A> = { hoverStyle?: PseudoStyleWithTransition<A> | null; pressStyle?: PseudoStyleWithTransition<A> | null; focusStyle?: PseudoStyleWithTransition<A> | null; focusWithinStyle?: PseudoStyleWithTransition<A> | null; focusVisibleStyle?: PseudoStyleWithTransition<A> | null; disabledStyle?: PseudoStyleWithTransition<A> | null; exitStyle?: PseudoStyleWithTransition<A> | null; enterStyle?: PseudoStyleWithTransition<A> | null; };
@hanzogui/web/types/types.d.ts
WithShorthands
typeexport type WithShorthands<StyleProps> = { [Key in keyof Shorthands]?: Shorthands[Key] extends keyof StyleProps ? StyleProps[Shorthands[Key]] | null : undefined; };
@hanzogui/web/types/types.d.ts
withStaticProperties
valueexport declare const withStaticProperties: <A extends Function, B extends Record<string, any>>(component: A, staticProps: B) => Combined<A, B>;
@hanzogui/helpers/types/withStaticProperties.d.ts
WithThemeAndShorthands
typeexport type WithThemeAndShorthands<A extends object, Variants = {}> = OnlyAllowShorthands extends true ? WithThemeValues<MaybeOmitLonghands<Omit<A, Longhands>>> & Variants & WithShorthands<WithThemeValues<A>> : WithThemeValues<MaybeOmitLonghands<A>> & Variants & WithShorthands<WithThemeValues<A>>;
@hanzogui/web/types/types.d.ts
WithThemeShorthandsAndPseudos
typeexport type WithThemeShorthandsAndPseudos<A extends object, Variants = {}> = WithThemeAndShorthands<A, Variants> & WithPseudoProps<WithThemeAndShorthands<A, Variants>>;
@hanzogui/web/types/types.d.ts
WithThemeShorthandsPseudosMedia
typeexport type WithThemeShorthandsPseudosMedia<A extends object, Variants = {}> = WithThemeShorthandsAndPseudos<A, Variants> & WithMediaProps<WithThemeShorthandsAndPseudos<A, Variants>>;
@hanzogui/web/types/types.d.ts
WithThemeValues
typeexport type WithThemeValues<T extends object> = { [K in keyof T]: (ThemeValueGet<K> extends never ? K extends keyof ExtraBaseProps ? T[K] : T[K] | 'unset' : GetThemeValueForKey<K> | Exclude<T[K], string> | 'unset') | (K extends SafeAreaValueKeys ? 'safe' : never); };
@hanzogui/web/types/types.d.ts
ZIndexKeys
typeexport type ZIndexKeys = 'zIndex';
@hanzogui/web/types/types.d.ts
ZIndexTokens
typeexport type ZIndexTokens = SpecificTokensSpecial | GetTokenString<keyof Tokens['zIndex']> | ThemeValueFallbackZIndex | number;
@hanzogui/web/types/types.d.ts
ZIndexVariantSpreadFunction
typeexport type ZIndexVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, ZIndexTokens>;
@hanzogui/web/types/types.d.ts