@tamagui/core 1.1.2 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/types.tsx"],
4
- "sourcesContent": ["// TODO split this into own package @tamagui/types to share with animations packages\n\nimport type { Properties } from 'csstype'\nimport type {\n ComponentType,\n ForwardRefExoticComponent,\n FunctionComponent,\n HTMLAttributes,\n ReactNode,\n RefAttributes,\n RefObject,\n} from 'react'\nimport type {\n Image,\n PressableProps,\n TextProps as ReactTextProps,\n Text,\n TextInput,\n TextStyle,\n View,\n ViewProps,\n ViewStyle,\n} from 'react-native'\n\nimport type { Variable } from './createVariable'\nimport type { ResolveVariableTypes } from './helpers/createPropMapper'\nimport type { TamaguiReactElement } from './static'\nimport type { RNWTextProps, RNWViewProps } from './types-rnw'\nimport type { FontLanguageProps } from './views/FontLanguage.types'\nimport type { ThemeProviderProps } from './views/ThemeProvider'\n\nexport type SpaceDirection = 'vertical' | 'horizontal' | 'both'\n\nexport type TamaguiElement = HTMLElement | View\n\nexport type DebugProp = boolean | 'break' | 'verbose'\n\n// base props that are accepted by createComponent (additional to react-native-web)\n\ntype DivAttributes = HTMLAttributes<HTMLDivElement>\n\nexport type TamaguiComponentPropsBase = {\n hitSlop?: PressableProps['hitSlop']\n asChild?: boolean\n space?: SpaceTokens | null\n spaceDirection?: SpaceDirection\n separator?: ReactNode\n dangerouslySetInnerHTML?: { __html: string }\n animation?: AnimationProp | null\n animateOnly?: string[]\n children?: any | any[]\n debug?: DebugProp\n disabled?: boolean\n className?: string\n themeShallow?: boolean\n id?: string\n tag?: string\n theme?: ThemeName | null\n componentName?: string\n /**\n * Forces the pseudo style state to be on\n */\n forceStyle?: 'hover' | 'press' | 'focus'\n onHoverIn?: DivAttributes['onMouseEnter']\n onHoverOut?: DivAttributes['onMouseLeave']\n onPress?: PressableProps['onPress']\n onPressIn?: PressableProps['onPress']\n onPressOut?: PressableProps['onPress']\n // WEB ONLY\n onMouseEnter?: DivAttributes['onMouseEnter']\n onMouseLeave?: DivAttributes['onMouseLeave']\n onMouseDown?: DivAttributes['onMouseDown']\n}\n\nexport type ReactComponentWithRef<Props, Ref> = ForwardRefExoticComponent<\n Props & RefAttributes<Ref>\n>\n\nexport type ConfigListener = (conf: TamaguiInternalConfig) => void\n\n// to prevent things from going circular, hoisting some types in this file\n// to generally order them as building up towards TamaguiConfig\n\nexport type VariableVal = number | string | Variable\nexport type VariableColorVal = string | Variable\n\ntype GenericKey = string | number | symbol\n\nexport interface CreateTokens<Val extends VariableVal = VariableVal> {\n color: { [key: GenericKey]: Val }\n space: { [key: GenericKey]: Val }\n size: { [key: GenericKey]: Val }\n radius: { [key: GenericKey]: Val }\n zIndex: { [key: GenericKey]: Val }\n}\n\ntype Tokenify<A extends GenericTokens> = {\n color: TokenifyRecord<A['color']>\n space: TokenifyRecord<A['space']>\n size: TokenifyRecord<A['size']>\n radius: TokenifyRecord<A['radius']>\n zIndex: TokenifyRecord<A['zIndex']>\n}\n\ntype TokenifyRecord<A extends CreateTokens[keyof CreateTokens]> = {\n [Key in keyof A]: Variable<A[Key]>\n}\n\nexport type TamaguiBaseTheme = {\n // defined for our tamagui kit , we could do this inside `tamagui`\n // but maybe helpful to have some sort of universally shared things +\n // + enforce if they want their own, redefine in their design sys\n background: VariableColorVal\n backgroundHover: VariableColorVal\n backgroundPress: VariableColorVal\n backgroundFocus: VariableColorVal\n color: VariableColorVal\n colorHover: VariableColorVal\n colorPress: VariableColorVal\n colorFocus: VariableColorVal\n borderColor: VariableColorVal\n borderColorHover: VariableColorVal\n borderColorPress: VariableColorVal\n borderColorFocus: VariableColorVal\n shadowColor: VariableColorVal\n shadowColorHover: VariableColorVal\n shadowColorPress: VariableColorVal\n shadowColorFocus: VariableColorVal\n}\n\ntype GenericTokens = CreateTokens\ntype GenericThemes = {\n [key: string]:\n | Partial<TamaguiBaseTheme> & {\n [key: string]: VariableVal\n }\n}\n\ntype AllStyleKeys = keyof StackStylePropsBase | keyof TextStylePropsBase\n\nexport type CreateShorthands = {\n [key: string]: AllStyleKeys\n}\n\nexport type GenericShorthands = {}\n\n// sm: { minWidth: 100 }\ntype GenericMedia = {\n [key: string]: {\n [key: string]: number | string\n }\n}\n\nexport type GenericFonts = Record<string, GenericFont>\n\ntype GenericAnimations = {\n [key: string]:\n | string\n | {\n [key: string]: any\n }\n | any[]\n}\n\n// this is the \"main\" typed object, which users re-define\n// (internal) keep all types directly on this object and reference them from elsewhere\n//\n// const config = createTamagui(...)\n// type MyConfig = typeof config\n// declare module 'tamagui' {\n// export interface TamaguiCustomConfig extends MyConfig {}\n// }\n// now your whole app/kit should be typed correctly\n//\nexport interface TamaguiCustomConfig {}\n\nexport interface TamaguiConfig\n extends Omit<GenericTamaguiConfig, keyof TamaguiCustomConfig>,\n TamaguiCustomConfig {}\n\nexport type CreateTamaguiConfig<\n A extends GenericTokens,\n B extends GenericThemes,\n C extends GenericShorthands = GenericShorthands,\n D extends GenericMedia = GenericMedia,\n E extends GenericAnimations = GenericAnimations,\n F extends GenericFonts = GenericFonts\n> = {\n fonts: RemoveLanguagePostfixes<F>\n fontLanguages: GetLanguagePostfixes<F> extends never\n ? string[]\n : GetLanguagePostfixes<F>[]\n tokens: A\n // parsed\n themes: {\n [Name in keyof B]: {\n [Key in keyof B[Name]]: Variable\n }\n }\n shorthands: C\n media: D\n animations: AnimationDriver<E>\n}\n\ntype GetLanguagePostfix<Set> = Set extends string\n ? Set extends `${string}_${infer Postfix}`\n ? Postfix\n : never\n : never\n\ntype OmitLanguagePostfix<Set> = Set extends string\n ? Set extends `${infer Prefix}_${string}`\n ? Prefix\n : Set\n : never\n\ntype RemoveLanguagePostfixes<F extends GenericFonts> = {\n [Key in OmitLanguagePostfix<keyof F>]: F[Key]\n}\n\ntype GetLanguagePostfixes<F extends GenericFonts> = GetLanguagePostfix<keyof F>\n\n// test RemoveLanguagePostfixes\n// type x = CreateTamaguiConfig<any, any, any, any, any, {\n// body: any,\n// body_en: any\n// }>['fonts']\n\ntype ConfProps<\n A extends GenericTokens,\n B extends GenericThemes,\n C extends GenericShorthands = GenericShorthands,\n D extends GenericMedia = GenericMedia,\n E extends GenericAnimations = GenericAnimations,\n F extends GenericFonts = GenericFonts\n> = {\n tokens: A\n themes: B\n shorthands?: C\n media?: D\n animations?: AnimationDriver<E>\n fonts: F\n}\n\nexport type InferTamaguiConfig<Conf> = Conf extends ConfProps<\n infer A,\n infer B,\n infer C,\n infer D,\n infer E,\n infer F\n>\n ? TamaguiInternalConfig<A, B, C, D, E, F>\n : unknown\n\n// for use in creation functions so it doesnt get overwritten\nexport type GenericTamaguiConfig = CreateTamaguiConfig<\n GenericTokens,\n GenericThemes,\n GenericShorthands,\n GenericMedia,\n GenericAnimations,\n GenericFonts\n>\n\n// since TamaguiConfig will be re-declared, these will all be typed globally\nexport type ThemeDefinition = TamaguiConfig['themes'][keyof TamaguiConfig['themes']]\nexport type ThemeKeys = keyof ThemeDefinition\nexport type ThemeParsed = {\n [key in ThemeKeys]: Variable<any>\n}\nexport type Tokens = TamaguiConfig['tokens']\nexport type Shorthands = TamaguiConfig['shorthands']\nexport type Media = TamaguiConfig['media']\nexport type Themes = TamaguiConfig['themes']\nexport type ThemeName = Exclude<GetAltThemeNames<keyof Themes>, number>\nexport type ThemeTokens = `$${ThemeKeys}`\nexport type AnimationKeys = TamaguiConfig['animations'] extends AnimationDriver<\n infer Config\n>\n ? keyof Config\n : string\nexport type FontLanguages = ArrayIntersection<TamaguiConfig['fontLanguages']>\n\nexport interface ThemeProps {\n className?: string\n name?: Exclude<ThemeName, number> | null\n componentName?: string\n children?: any\n reset?: boolean\n debug?: boolean | 'verbose'\n inverse?: boolean\n // on the web, for portals we need to re-insert className\n forceClassName?: boolean\n // allows for disabling the auto-update behavior\n shouldUpdate?: () => boolean\n}\n\ntype ArrayIntersection<A extends any[]> = A[keyof A]\n\ntype GetAltThemeNames<S> =\n | (S extends `${string}_${infer Alt}` ? GetAltThemeNames<Alt> : S)\n | S\n\ntype SpacerPropsBase = {\n size?: number | SpaceTokens | null\n flex?: boolean | number\n direction?: SpaceDirection\n}\ntype SpacerOwnProps = SpacerPropsBase &\n //\n WithThemeShorthandsPseudosMediaAnimation<SpacerPropsBase>\n\nexport type SpacerProps = Omit<StackProps, 'flex' | 'direction' | 'size'> &\n //\n SpacerOwnProps\n\nexport type CreateTamaguiProps = {\n reactNative?: any\n shorthands?: CreateShorthands\n media?: GenericTamaguiConfig['media']\n animations?: AnimationDriver<any>\n fonts: GenericTamaguiConfig['fonts']\n tokens: GenericTamaguiConfig['tokens']\n themes: {\n [key: string]: {\n [key: string]: string | number | Variable\n }\n }\n\n /**\n * *Advanced use case* For all CSS extracted views, this has no effect.\n *\n * For SSR compatibility on the web, Tamagui will render once with the settings\n * from `mediaQueryDefaultActive` set for all media queries. Then, it will render\n * again after the initial render using the proper media query values. This is so that\n * hydration will match perfectly with the server.\n *\n * Setting disableSSR will avoid this second render by setting the media query state\n * to the actual browser dimensions on initial load. This is only useful for client-only\n * apps.\n *\n */\n disableSSR?: boolean\n\n /**\n * Disable inserting a theme class in the DOM or context, allowing you to manually place it higher.\n * For custom use cases like integration with next-theme.\n */\n disableRootThemeClass?: boolean\n\n defaultProps?: Record<string, any> & {\n Stack?: StackProps\n Text?: TextProps\n Spacer?: SpacerProps\n }\n\n // for the first render, determines which media queries are true\n // useful for SSR\n mediaQueryDefaultActive?: Record<MediaQueryKey, boolean>\n\n // what's between each CSS style rule, set to \"\\n\" to be easier to read\n // defaults: \"\\n\" when NODE_ENV=development, \"\" otherwise\n cssStyleSeparator?: string\n\n // (Advanced)\n // on the web, tamagui treats `dark` and `light` themes as special and\n // generates extra CSS to avoid having to re-render the entire page.\n // this CSS relies on specificity hacks that multiply by your sub-themes.\n // this sets the maxiumum number of nested dark/light themes you can do\n // defaults to 3 for a balance, but can be higher if you nest them deeply.\n maxDarkLightNesting?: number\n\n // adds @media(prefers-color-scheme) media queries for dark/light\n shouldAddPrefersColorThemes?: boolean\n\n // only if you put the theme classname on the html element we have to generate diff\n themeClassNameOnRoot?: boolean\n}\n\n// this is the config generated via createTamagui()\nexport type TamaguiInternalConfig<\n A extends GenericTokens = GenericTokens,\n B extends GenericThemes = GenericThemes,\n C extends GenericShorthands = GenericShorthands,\n D extends GenericMedia = GenericMedia,\n E extends GenericAnimations = GenericAnimations,\n F extends GenericFonts = GenericFonts\n> = Omit<CreateTamaguiProps, keyof GenericTamaguiConfig> &\n Omit<CreateTamaguiConfig<A, B, C, D, E, F>, 'tokens'> & {\n // TODO need to make it this but this breaks types, revisit\n // animations: E //AnimationDriver<E>\n // with $ prefixes for fast lookups (one time cost at startup vs every render)\n tokens: Tokenify<A>\n tokensParsed: Tokenify<A>\n themeConfig: any\n fontsParsed: GenericFonts\n getCSS: () => string\n parsed: boolean\n inverseShorthands: Record<string, string>\n reactNative?: any\n }\n\nexport type GetAnimationKeys<A extends GenericTamaguiConfig> = keyof A['animations']\n\n// prevents const intersections from being clobbered into string, keeping the consts\nexport type UnionableString = string & {}\nexport type UnionableNumber = number & {}\nexport type PropTypes<A extends TamaguiComponent> = A extends FunctionComponent<\n infer Props\n>\n ? Props\n : unknown\n\nexport type GenericFont<Key extends number | string = number | string> = {\n size: { [key in Key]: number | Variable }\n lineHeight: Partial<{ [key in Key]: number | Variable }>\n letterSpacing: Partial<{ [key in Key]: number | Variable }>\n weight: Partial<{ [key in Key]: number | string | Variable }>\n family: string | Variable\n style?: Partial<{ [key in Key]: TextStyle['fontStyle'] | Variable }>\n transform?: Partial<{ [key in Key]: TextStyle['textTransform'] | Variable }>\n color?: Partial<{ [key in Key]: string | Variable }>\n // for native use only, lets you map to alternative fonts\n face?: Partial<{\n [key in FontWeightSteps]: { normal?: string; italic?: string }\n }>\n}\n\n// media\nexport type MediaQueryObject = { [key: string]: string | number | string }\nexport type MediaQueryKey = keyof Media\nexport type MediaPropKeys = `$${MediaQueryKey}`\nexport type MediaQueryState = { [key in MediaQueryKey]: boolean }\nexport type MediaProps<A> = {\n [key in MediaPropKeys]?: A\n}\nexport type MediaQueries = {\n [key in MediaQueryKey]: MediaQueryObject\n}\n\nexport interface MediaQueryList {\n addListener(listener?: any): void\n removeListener(listener?: any): void\n matches: boolean\n}\n\nexport type MatchMedia = (query: string) => MediaQueryList\n\nexport type TransformStyleProps = {\n x?: number\n y?: number\n perspective?: number\n scale?: number\n scaleX?: number\n scaleY?: number\n skewX?: string\n skewY?: string\n matrix?: number[]\n rotate?: string\n rotateY?: string\n rotateX?: string\n rotateZ?: string\n}\n\n// createComponent props helpers\n\n// animation=\"bouncy\"\n// animation={['bouncy', { }]}\n// { all: 'name' }\n\n// TODO can override for better types\nexport type AnimationConfigType = any\n\nexport type AnimationProp =\n | AnimationKeys\n | {\n [key: string]:\n | AnimationKeys\n | {\n type: AnimationKeys\n [key: string]: any\n }\n }\n | [\n AnimationKeys,\n {\n [key: string]:\n | AnimationKeys\n | {\n type?: AnimationKeys\n [key: string]: any\n }\n }\n ]\n\ntype GetTokenFontKeysFor<\n A extends\n | 'size'\n | 'weight'\n | 'letterSpacing'\n | 'family'\n | 'lineHeight'\n | 'transform'\n | 'style'\n | 'color'\n> = keyof TamaguiConfig['fonts']['body'][A]\n\ntype GetTokenString<A> = A extends string | number ? `$${A}` : `$${string}`\n\n// base tokens\nexport type SizeTokens = GetTokenString<keyof Tokens['size']> | number\nexport type SpaceTokens = GetTokenString<keyof Tokens['space']> | number | boolean\n\nexport type ColorTokens =\n | GetTokenString<keyof Tokens['color']>\n | GetTokenString<keyof ThemeParsed>\n | CSSColorNames\nexport type ZIndexTokens = GetTokenString<keyof Tokens['zIndex']> | number\nexport type RadiusTokens = GetTokenString<keyof Tokens['radius']> | number\n\n// font tokens\nexport type FontTokens = GetTokenString<keyof TamaguiConfig['fonts']>\nexport type FontSizeTokens = GetTokenString<GetTokenFontKeysFor<'size'>> | number\nexport type FontLineHeightTokens = `$${GetTokenFontKeysFor<'lineHeight'>}` | number\nexport type FontWeightSteps = `${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}00`\nexport type FontWeightTokens = `$${GetTokenFontKeysFor<'weight'>}` | FontWeightSteps\nexport type FontColorTokens = `$${GetTokenFontKeysFor<'color'>}` | number\nexport type FontLetterSpacingTokens = `$${GetTokenFontKeysFor<'letterSpacing'>}` | number\nexport type FontStyleTokens = `$${GetTokenFontKeysFor<'style'>}` | TextStyle['fontStyle']\nexport type FontTransformTokens =\n | `$${GetTokenFontKeysFor<'transform'>}`\n | TextStyle['textTransform']\n\n//\n// adds theme short values to relevant props\n//\n\nexport type ThemeValueByCategory<K extends string | number | symbol> = K extends 'theme'\n ? ThemeTokens\n : K extends 'size'\n ? SizeTokens\n : K extends 'font'\n ? FontTokens\n : K extends 'fontSize'\n ? FontSizeTokens\n : K extends 'space'\n ? SpaceTokens\n : K extends 'color'\n ? ColorTokens\n : K extends 'zIndex'\n ? ZIndexTokens\n : K extends 'lineHeight'\n ? FontLineHeightTokens\n : K extends 'fontWeight'\n ? FontWeightTokens\n : K extends 'letterSpacing'\n ? FontLetterSpacingTokens\n : {}\n\ntype FontKeys = 'fontFamily'\ntype FontSizeKeys = 'fontSize'\ntype FontWeightKeys = 'fontWeight'\ntype FontLetterSpacingKeys = 'letterSpacing'\ntype LineHeightKeys = 'lineHeight'\ntype ZIndexKeys = 'zIndex'\n\nexport type ThemeValueGet<K extends string | number | symbol> = K extends 'theme'\n ? ThemeTokens\n : K extends SizeKeys\n ? SizeTokens\n : K extends FontKeys\n ? FontTokens\n : K extends FontSizeKeys\n ? FontSizeTokens\n : K extends `${`border${string | ''}Radius`}`\n ? RadiusTokens\n : K extends SpaceKeys\n ? K extends 'shadowOffset'\n ? { width: SpaceTokens; height: SpaceTokens }\n : SpaceTokens\n : K extends ColorKeys\n ? ColorTokens\n : K extends ZIndexKeys\n ? ZIndexTokens\n : K extends LineHeightKeys\n ? FontLineHeightTokens\n : K extends FontWeightKeys\n ? FontWeightTokens\n : K extends FontLetterSpacingKeys\n ? FontLetterSpacingTokens\n : never\n\nexport type ThemeValueFallback = UnionableString | Variable\n\nexport type WithThemeValues<T extends object> = {\n [K in keyof T]: ThemeValueGet<K> extends never\n ? T[K]\n : ThemeValueGet<K> | Exclude<T[K], string> | ThemeValueFallback\n}\n\n// adds shorthand props\nexport type WithShorthands<StyleProps> = {\n [Key in keyof Shorthands]?: Shorthands[Key] extends keyof StyleProps\n ? StyleProps[Shorthands[Key]] | null\n : undefined\n}\n\n// adds pseudo props\nexport type PseudoProps<A> = {\n hoverStyle?: A | null\n pressStyle?: A | null\n focusStyle?: A | null\n exitStyle?: A | null\n enterStyle?: A | null\n}\n\nexport type PseudoPropKeys = keyof PseudoProps<any>\n\nexport type PseudoStyles = {\n hoverStyle?: ViewStyle\n pressStyle?: ViewStyle\n focusStyle?: ViewStyle\n enterStyle?: ViewStyle\n exitStyle?: ViewStyle\n}\n\n//\n// add both theme and shorthands\n//\ntype WithThemeAndShorthands<A extends object> = WithThemeValues<A> &\n WithShorthands<WithThemeValues<A>>\n\n//\n// combines all of theme, shorthands, pseudos...\n//\ntype WithThemeShorthandsAndPseudos<A extends object> =\n | WithThemeAndShorthands<A> & PseudoProps<WithThemeAndShorthands<A>>\n\n//\n// ... media queries and animations\n//\ntype WithThemeShorthandsPseudosMediaAnimation<A extends object> =\n WithThemeShorthandsAndPseudos<A> & MediaProps<WithThemeShorthandsAndPseudos<A>>\n\n/**\n * Base style-only props (no media, pseudo):\n */\n\ntype PropsWebOnly = {\n pointerEvents?: ViewProps['pointerEvents']\n cursor?: Properties['cursor']\n contain?: Properties['contain']\n display?: 'inherit' | 'none' | 'inline' | 'block' | 'contents' | 'flex' | 'inline-flex'\n userSelect?: Properties['userSelect']\n outlineColor?: Properties['outlineColor']\n outlineStyle?: Properties['outlineStyle']\n outlineOffset?: Properties['outlineOffset']\n outlineWidth?: Properties['outlineWidth']\n tabIndex?: string | number\n role?: string\n}\n\nexport type StackStylePropsBase = Omit<\n ViewStyle,\n 'display' | 'backfaceVisibility' | 'elevation'\n> &\n TransformStyleProps &\n PropsWebOnly\n\nexport type TextStylePropsBase = Omit<TextStyle, 'display' | 'backfaceVisibility'> &\n TransformStyleProps &\n PropsWebOnly & {\n ellipse?: boolean\n textDecorationDistance?: number\n textOverflow?: Properties['textOverflow']\n whiteSpace?: Properties['whiteSpace']\n wordWrap?: Properties['wordWrap']\n }\n\n//\n// Stack\n//\n\nexport type StackNonStyleProps = Omit<ViewProps, 'display' | 'children'> &\n RNWViewProps &\n TamaguiComponentPropsBase\n\nexport type StackStyleProps =\n WithThemeShorthandsPseudosMediaAnimation<StackStylePropsBase>\nexport type StackPropsBase = StackNonStyleProps &\n WithThemeAndShorthands<StackStylePropsBase>\nexport type StackProps = StackNonStyleProps & StackStyleProps\n\n//\n// Text props\n//\n\nexport type TextNonStyleProps = Omit<ReactTextProps, 'children'> &\n RNWTextProps &\n TamaguiComponentPropsBase\n\nexport type TextPropsBase = TextNonStyleProps & WithThemeAndShorthands<TextStylePropsBase>\nexport type TextStyleProps = WithThemeShorthandsPseudosMediaAnimation<TextStylePropsBase>\nexport type TextProps = TextNonStyleProps & TextStyleProps\n\n// could actually infer from parent\nexport type ViewOrTextProps = WithThemeShorthandsPseudosMediaAnimation<\n Omit<TextStylePropsBase, keyof StackStylePropsBase> & StackStylePropsBase\n>\n\n//\n// StaticComponent\n//\n\nexport type TamaguiComponent<\n Props = any,\n Ref = any,\n BaseProps = {},\n VariantProps = {}\n> = ReactComponentWithRef<Props, Ref> & StaticComponentObject\n\ntype StaticComponentObject = {\n staticConfig: StaticConfig\n /*\n * Only needed for more complex components\n * If you create a styled frame component this is a HoC to extract\n * styles from all parents.\n */\n extractable: <X>(a: X, opts?: Partial<StaticConfig>) => X\n}\n\nexport type TamaguiProviderProps = Partial<Omit<ThemeProviderProps, 'children'>> & {\n config: TamaguiInternalConfig\n disableInjectCSS?: boolean\n children?: ReactNode\n}\n\nexport type PropMapper = (\n key: string,\n value: any,\n theme: ThemeParsed,\n props: Record<string, any>,\n state: Partial<SplitStyleState>,\n languageContext?: FontLanguageProps,\n avoidDefaultProps?: boolean,\n debug?: DebugProp\n) => undefined | [string, any][]\n\nexport type StaticConfigParsed = StaticConfig & {\n parsed: true\n propMapper: PropMapper\n variantsParsed?: {\n [key: string]: {\n [key: string]: any\n }\n }\n}\n\nexport type GenericVariantDefinitions = {\n [key: string]: {\n [key: string]:\n | ((a: any, b: any) => any)\n | {\n [key: string]: any\n }\n }\n}\n\nexport type StaticConfigPublic = {\n /**\n * (compiler) If you need to pass context or something, prevents from ever\n * flattening. The 'jsx' option means it will never flatten. if you\n * pass JSX as a children (if its purely string, it will still flatten).\n */\n neverFlatten?: boolean | 'jsx'\n\n /**\n * Determines ultimate output tag (Text vs View)\n */\n isText?: boolean\n\n /**\n * Which style keys are allowed to be extracted.\n */\n validStyles?: { [key: string]: boolean }\n\n /**\n * (compiler) If these props are encountered, bail on all optimization.\n */\n deoptProps?: Set<string>\n\n /**\n * (compiler) If these props are encountered, leave them un-extracted.\n */\n inlineProps?: Set<string>\n\n /**\n * (compiler) If not flattening, leave this prop as original value.\n * Only applies to style attributes\n */\n inlineWhenUnflattened?: Set<string>\n\n /**\n * (compiler) A bit odd, only for more advanced heirarchies.\n * Indicates that the component will set this prop so the\n * static extraction can ensure it sets them to ={undefined}\n * so they get overriddent. In the future, this can be smarter.\n */\n ensureOverriddenProp?: { [key: string]: boolean }\n\n /**\n * Auto-detected, but can ovverride. Wraps children to space them on top\n */\n isZStack?: boolean\n\n /**\n * Auto-detect, but can override, passes styles properly to react-native-web\n */\n isReactNative?: boolean\n\n /**\n * By default if styled() doesn't recognize a parent Tamagui compoent or specific react-native views,\n * it will assume the passed in component only accepts style={} for react-native compatibility.\n * Setting `acceptsClassName: true` indicates Tamagui can pass in className props.\n */\n acceptsClassName?: boolean\n}\n\nexport type StaticConfig = StaticConfigPublic & {\n Component?: FunctionComponent<any> & StaticComponentObject\n\n variants?: GenericVariantDefinitions\n\n /**\n * Used for applying sub theme style\n */\n componentName?: string\n\n /**\n * Same as React.defaultProps, be sure to sync\n */\n defaultProps: Record<string, any>\n\n /**\n * Merges into defaultProps later on, used internally yonly\n */\n defaultVariants?: { [key: string]: any }\n\n /**\n * Memoize the component\n */\n memo?: boolean\n\n /**\n * Used insternally to attach default props to names\n */\n parentNames?: string[]\n\n /**\n * By default if styled() doesn't recognize a parent Tamagui compoent or specific react-native views,\n * it will assume the passed in component only accepts style={} for react-native compatibility.\n * Setting `acceptsClassName: true` indicates Tamagui can pass in className props.\n */\n acceptsClassName?: boolean\n\n /**\n * Used internally for handling focus\n */\n isInput?: boolean\n}\n\n/**\n * --------------------------------------------\n * variants\n * --------------------------------------------\n */\n\nexport type StylableComponent =\n | TamaguiComponent\n // * excessively deep type instantiation\n // | TamaguiReactElement\n | ComponentType<any>\n | ForwardRefExoticComponent<any>\n | ReactComponentWithRef<any, any>\n | (new (props: any) => any)\n | typeof View\n | typeof Text\n | typeof TextInput\n | typeof Image\n\nexport type GetStyledVariants<A extends TamaguiComponent> = A extends TamaguiComponent<\n any,\n any,\n any,\n infer Variants\n>\n ? Variants\n : never\n\nexport type GetBaseProps<A extends StylableComponent> = A extends TamaguiComponent<\n any,\n any,\n infer BaseProps\n>\n ? BaseProps\n : never\n\nexport type GetProps<A extends StylableComponent> = A extends TamaguiComponent<\n infer Props\n>\n ? Props\n : A extends TamaguiReactElement<infer Props>\n ? Props\n : A extends ComponentType<infer Props>\n ? GetGenericComponentTamaguiProps<Props>\n : A extends new (props: infer Props) => any\n ? GetGenericComponentTamaguiProps<Props>\n : {}\n\ntype GetGenericComponentTamaguiProps<P> = P &\n Omit<'textAlign' extends keyof P ? TextProps : StackProps, keyof P>\n\nexport type SpreadKeys =\n | '...fontSize'\n | '...fontStyle'\n | '...fontTransform'\n | '...lineHeight'\n | '...letterSpacing'\n | '...size'\n | '...space'\n | '...color'\n | '...zIndex'\n | '...theme'\n | '...radius'\n\nexport type VariantDefinitions<\n Parent extends StylableComponent = TamaguiComponent,\n MyProps extends Object = GetProps<Parent>,\n Val = any\n> = VariantDefinitionFromProps<MyProps, Val>\n\nexport type VariantDefinitionFromProps<MyProps, Val> = MyProps extends Object\n ? {\n [propName: string]:\n | VariantSpreadFunction<MyProps, Val>\n | ({\n [Key in SpreadKeys]?: Key extends '...fontSize'\n ? FontSizeVariantSpreadFunction<MyProps>\n : Key extends '...size'\n ? SizeVariantSpreadFunction<MyProps>\n : Key extends '...space'\n ? SpaceVariantSpreadFunction<MyProps>\n : Key extends '...color'\n ? ColorVariantSpreadFunction<MyProps>\n : Key extends '...lineHeight'\n ? FontLineHeightVariantSpreadFunction<MyProps>\n : Key extends '...fontTransform'\n ? FontTransformVariantSpreadFunction<MyProps>\n : Key extends '...fontStyle'\n ? FontStyleVariantSpreadFunction<MyProps>\n : Key extends '...letterSpacing'\n ? FontLetterSpacingVariantSpreadFunction<MyProps>\n : Key extends '...zIndex'\n ? ZIndexVariantSpreadFunction<MyProps>\n : Key extends '...radius'\n ? RadiusVariantSpreadFunction<MyProps>\n : Key extends '...theme'\n ? ThemeVariantSpreadFunction<MyProps>\n : never\n } & {\n [Key in string | number | 'true' | 'false']?:\n | MyProps\n | VariantSpreadFunction<MyProps, Val>\n } & {\n [Key in VariantTypeKeys]?: Key extends ':number'\n ? VariantSpreadFunction<MyProps, number>\n : Key extends ':boolean'\n ? VariantSpreadFunction<MyProps, boolean>\n : Key extends ':string'\n ? VariantSpreadFunction<MyProps, string>\n : never\n })\n }\n : never\n\nexport type GenericStackVariants = VariantDefinitionFromProps<StackProps, any>\nexport type GenericTextVariants = VariantDefinitionFromProps<StackProps, any>\n\nexport type GetVariantProps<Variants> = {\n [Key in keyof Variants]?: Variants[Key] extends VariantSpreadFunction<any, infer Val>\n ? Val\n : GetVariantValues<keyof Variants[Key]>\n}\n\nexport type VariantSpreadExtras<Props> = {\n fonts: TamaguiConfig['fonts']\n tokens: TamaguiConfig['tokens']\n theme: Themes extends { [key: string]: infer B } ? B : unknown\n props: Props\n}\n\ntype PropLike = { [key: string]: any }\n\nexport type VariantSpreadFunction<Props extends PropLike, Val = any> = (\n val: Val,\n config: VariantSpreadExtras<Props>\n) =>\n | {\n [Key in keyof Props]: Props[Key] | Variable\n }\n | null\n | undefined\n\nexport type VariantTypeKeys = ':string' | ':boolean' | ':number'\n\nexport type GetVariantValues<Key> = Key extends `...${infer VariantSpread}`\n ? ThemeValueByCategory<VariantSpread>\n : Key extends 'true' | 'false'\n ? boolean\n : Key extends ':string'\n ? string\n : Key extends ':boolean'\n ? boolean\n : Key extends ':number'\n ? number\n : Key\n\nexport type FontSizeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n FontSizeTokens\n>\nexport type SizeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n SizeTokens\n>\nexport type SpaceVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n SpaceTokens\n>\nexport type ColorVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n ColorTokens\n>\nexport type FontLineHeightVariantSpreadFunction<A extends PropLike> =\n VariantSpreadFunction<A, FontLineHeightTokens>\nexport type FontLetterSpacingVariantSpreadFunction<A extends PropLike> =\n VariantSpreadFunction<A, FontLetterSpacingTokens>\nexport type FontStyleVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n FontStyleTokens\n>\nexport type FontTransformVariantSpreadFunction<A extends PropLike> =\n VariantSpreadFunction<A, FontTransformTokens>\nexport type ZIndexVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n ZIndexTokens\n>\nexport type RadiusVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n RadiusTokens\n>\nexport type ThemeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n ThemeTokens\n>\n\n/**\n * --------------------------------------------\n * end variants\n * --------------------------------------------\n */\n\ntype SizeKeys =\n | 'width'\n | 'height'\n | 'minWidth'\n | 'minHeight'\n | 'maxWidth'\n | 'maxHeight'\n | 'shadowRadius'\n\ntype ColorKeys =\n | 'color'\n | 'backgroundColor'\n | 'borderColor'\n | 'borderBottomColor'\n | 'borderTopColor'\n | 'borderLeftColor'\n | 'borderRightColor'\n | 'shadowColor'\n | 'textShadowColor'\n\ntype SpaceKeys =\n | 'space'\n | 'padding'\n | 'paddingHorizontal'\n | 'paddingVertical'\n | 'paddingLeft'\n | 'paddingTop'\n | 'paddingBottom'\n | 'paddingLeft'\n | 'paddingRight'\n | 'paddingEnd'\n | 'paddingStart'\n | 'margin'\n | 'marginHorizontal'\n | 'marginVertical'\n | 'marginLeft'\n | 'marginTop'\n | 'marginBottom'\n | 'marginLeft'\n | 'marginRight'\n | 'marginEnd'\n | 'marginStart'\n | 'x'\n | 'y'\n | 'scale'\n | 'scaleX'\n | 'scaleY'\n | 'borderTopEndRadius'\n | 'borderTopLeftRadius'\n | 'borderTopRightRadius'\n | 'borderTopStartRadius'\n | 'borderBottomEndRadius'\n | 'borderBottomLeftRadius'\n | 'borderBottomRightRadius'\n | 'borderBottomStartRadius'\n | 'borderBottomWidth'\n | 'borderLeftWidth'\n | 'borderRadius'\n | 'borderRightWidth'\n | 'borderTopEndRadius'\n | 'borderTopLeftRadius'\n | 'borderTopRightRadius'\n | 'borderEndWidth'\n | 'borderStartWidth'\n | 'borderTopStartRadius'\n | 'borderTopWidth'\n | 'borderWidth'\n | 'left'\n | 'top'\n | 'right'\n | 'bottom'\n | 'shadowOffset'\n\ntype CSSColorNames =\n | 'aliceblue'\n | 'antiquewhite'\n | 'aqua'\n | 'aquamarine'\n | 'azure'\n | 'beige'\n | 'bisque'\n | 'black'\n | 'blanchedalmond'\n | 'blue'\n | 'blueviolet'\n | 'brown'\n | 'burlywood'\n | 'cadetblue'\n | 'chartreuse'\n | 'chocolate'\n | 'coral'\n | 'cornflowerblue'\n | 'cornsilk'\n | 'crimson'\n | 'cyan'\n | 'darkblue'\n | 'darkcyan'\n | 'darkgoldenrod'\n | 'darkgray'\n | 'darkgreen'\n | 'darkkhaki'\n | 'darkmagenta'\n | 'darkolivegreen'\n | 'darkorange'\n | 'darkorchid'\n | 'darkred'\n | 'darksalmon'\n | 'darkseagreen'\n | 'darkslateblue'\n | 'darkslategray'\n | 'darkturquoise'\n | 'darkviolet'\n | 'deeppink'\n | 'deepskyblue'\n | 'dimgray'\n | 'dodgerblue'\n | 'firebrick'\n | 'floralwhite'\n | 'forestgreen'\n | 'fuchsia'\n | 'gainsboro'\n | 'ghostwhite'\n | 'gold'\n | 'goldenrod'\n | 'gray'\n | 'green'\n | 'greenyellow'\n | 'honeydew'\n | 'hotpink'\n | 'indianred '\n | 'indigo '\n | 'ivory'\n | 'khaki'\n | 'lavender'\n | 'lavenderblush'\n | 'lawngreen'\n | 'lemonchiffon'\n | 'lightblue'\n | 'lightcoral'\n | 'lightcyan'\n | 'lightgoldenrodyellow'\n | 'lightgrey'\n | 'lightgreen'\n | 'lightpink'\n | 'lightsalmon'\n | 'lightseagreen'\n | 'lightskyblue'\n | 'lightslategray'\n | 'lightsteelblue'\n | 'lightyellow'\n | 'lime'\n | 'limegreen'\n | 'linen'\n | 'magenta'\n | 'maroon'\n | 'mediumaquamarine'\n | 'mediumblue'\n | 'mediumorchid'\n | 'mediumpurple'\n | 'mediumseagreen'\n | 'mediumslateblue'\n | 'mediumspringgreen'\n | 'mediumturquoise'\n | 'mediumvioletred'\n | 'midnightblue'\n | 'mintcream'\n | 'mistyrose'\n | 'moccasin'\n | 'navajowhite'\n | 'navy'\n | 'oldlace'\n | 'olive'\n | 'olivedrab'\n | 'orange'\n | 'orangered'\n | 'orchid'\n | 'palegoldenrod'\n | 'palegreen'\n | 'paleturquoise'\n | 'palevioletred'\n | 'papayawhip'\n | 'peachpuff'\n | 'peru'\n | 'pink'\n | 'plum'\n | 'powderblue'\n | 'purple'\n | 'red'\n | 'rosybrown'\n | 'royalblue'\n | 'saddlebrown'\n | 'salmon'\n | 'sandybrown'\n | 'seagreen'\n | 'seashell'\n | 'sienna'\n | 'silver'\n | 'skyblue'\n | 'slateblue'\n | 'slategray'\n | 'snow'\n | 'springgreen'\n | 'steelblue'\n | 'tan'\n | 'teal'\n | 'thistle'\n | 'tomato'\n | 'turquoise'\n | 'violet'\n | 'wheat'\n | 'white'\n | 'whitesmoke'\n | 'yellow'\n | 'yellowgreen'\n\nexport type TamaguiComponentState = {\n hover: boolean\n press: boolean\n pressIn: boolean\n focus: boolean\n unmounted: boolean\n animation?: null | {\n style?: any\n avoidClasses?: boolean\n }\n}\n\nexport type SplitStyleState = TamaguiComponentState & {\n mediaState?: Record<string, boolean>\n noClassNames?: boolean\n dynamicStylesInline?: boolean\n resolveVariablesAs?: ResolveVariableTypes\n fallbackProps?: Record<string, any>\n keepVariantsAsProps?: boolean\n hasTextAncestor?: boolean\n\n // for animations\n isExiting?: boolean\n exitVariant?: string\n enterVariant?: string\n}\n\n// Presence\n\nexport interface PresenceContextProps {\n id: string\n isPresent: boolean\n register: (id: string) => () => void\n onExitComplete?: (id: string) => void\n initial?: false | string | string[]\n custom?: any\n exitVariant?: string | null\n enterVariant?: string | null\n}\n\ntype SafeToRemoveCallback = () => void\ntype AlwaysPresent = [true, null, null]\ntype Present = [true, undefined, PresenceContextProps]\ntype NotPresent = [false, SafeToRemoveCallback, PresenceContextProps]\n\nexport type UsePresenceResult = AlwaysPresent | Present | NotPresent\n\n// Animations:\n\ntype AnimationConfig = {\n [key: string]: any\n}\n\n// includes a very limited adapter between various impls for number => style\n// this is useful only in limited scenarios like `Sheet`, but necessary in those cases\n\nexport type AnimatedNumberStrategy =\n // only values shared between reanimated/react-native for now\n | {\n type: 'spring'\n stiffness?: number\n damping?: number\n mass?: number\n overshootClamping?: boolean\n restSpeedThreshold?: number\n restDisplacementThreshold?: number\n }\n | { type: 'timing'; duration: number }\n | { type: 'direct' }\n\nexport type UniversalAnimatedNumber<A> = {\n getInstance(): A\n getValue(): number\n setValue(next: number, config?: AnimatedNumberStrategy): void\n stop(): void\n}\n\nexport type AnimationDriver<A extends AnimationConfig = AnimationConfig> = {\n isReactNative?: boolean\n useAnimations: UseAnimationHook\n usePresence: () => UsePresenceResult\n useAnimatedNumber: (initial: number) => UniversalAnimatedNumber<any>\n useAnimatedNumberStyle: <V extends UniversalAnimatedNumber<any>>(\n val: V,\n getStyle: (current: any) => any\n ) => any\n useAnimatedNumberReaction: (\n val: UniversalAnimatedNumber<any>,\n onValue: (current: number) => void\n ) => void\n animations: A\n View?: any\n Text?: any\n}\n\nexport type UseAnimationProps = TamaguiComponentPropsBase & Record<string, any>\n\nexport type UseAnimationHook = (props: {\n style: Record<string, any>\n props: Record<string, any>\n presence?: UsePresenceResult | null\n hostRef: RefObject<HTMLElement | View>\n staticConfig: StaticConfigParsed\n state: SplitStyleState\n pseudos: PseudoProps<ViewStyle> | null\n onDidAnimate?: any\n delay?: number\n}) => null | {\n style?: StackStylePropsBase | StackStylePropsBase[]\n}\n\nexport type GestureReponderEvent = Exclude<\n View['props']['onResponderMove'],\n void\n> extends (event: infer Event) => void\n ? Event\n : never\n"],
4
+ "sourcesContent": ["// TODO split this into own package @tamagui/types to share with animations packages\n\nimport type { Properties } from 'csstype'\nimport type {\n ComponentType,\n ForwardRefExoticComponent,\n FunctionComponent,\n HTMLAttributes,\n ReactNode,\n RefAttributes,\n RefObject,\n} from 'react'\nimport type {\n Image,\n PressableProps,\n TextProps as ReactTextProps,\n Text,\n TextInput,\n TextStyle,\n View,\n ViewProps,\n ViewStyle,\n} from 'react-native'\n\nimport type { Variable } from './createVariable'\nimport type { ResolveVariableTypes } from './helpers/createPropMapper'\nimport type { TamaguiReactElement } from './static'\nimport type { RNWTextProps, RNWViewProps } from './types-rnw'\nimport type { FontLanguageProps } from './views/FontLanguage.types'\nimport type { ThemeProviderProps } from './views/ThemeProvider'\n\nexport type SpaceDirection = 'vertical' | 'horizontal' | 'both'\n\nexport type TamaguiElement = HTMLElement | View\n\nexport type DebugProp = boolean | 'break' | 'verbose'\n\n// base props that are accepted by createComponent (additional to react-native-web)\n\ntype DivAttributes = HTMLAttributes<HTMLDivElement>\n\nexport type TamaguiComponentPropsBase = {\n hitSlop?: PressableProps['hitSlop']\n asChild?: boolean\n space?: SpaceTokens | null\n spaceDirection?: SpaceDirection\n separator?: ReactNode\n dangerouslySetInnerHTML?: { __html: string }\n animation?: AnimationProp | null\n animateOnly?: string[]\n children?: any | any[]\n debug?: DebugProp\n disabled?: boolean\n className?: string\n themeShallow?: boolean\n id?: string\n tag?: string\n theme?: ThemeName | null\n componentName?: string\n /**\n * Forces the pseudo style state to be on\n */\n forceStyle?: 'hover' | 'press' | 'focus'\n onHoverIn?: DivAttributes['onMouseEnter']\n onHoverOut?: DivAttributes['onMouseLeave']\n onPress?: PressableProps['onPress']\n onPressIn?: PressableProps['onPress']\n onPressOut?: PressableProps['onPress']\n // WEB ONLY\n onMouseEnter?: DivAttributes['onMouseEnter']\n onMouseLeave?: DivAttributes['onMouseLeave']\n onMouseDown?: DivAttributes['onMouseDown']\n}\n\nexport type ReactComponentWithRef<Props, Ref> = ForwardRefExoticComponent<\n Props & RefAttributes<Ref>\n>\n\nexport type ConfigListener = (conf: TamaguiInternalConfig) => void\n\n// to prevent things from going circular, hoisting some types in this file\n// to generally order them as building up towards TamaguiConfig\n\nexport type VariableVal = number | string | Variable\nexport type VariableColorVal = string | Variable\n\ntype GenericKey = string | number | symbol\n\nexport interface CreateTokens<Val extends VariableVal = VariableVal> {\n color: { [key: GenericKey]: Val }\n space: { [key: GenericKey]: Val }\n size: { [key: GenericKey]: Val }\n radius: { [key: GenericKey]: Val }\n zIndex: { [key: GenericKey]: Val }\n}\n\ntype Tokenify<A extends GenericTokens> = {\n color: TokenifyRecord<A['color']>\n space: TokenifyRecord<A['space']>\n size: TokenifyRecord<A['size']>\n radius: TokenifyRecord<A['radius']>\n zIndex: TokenifyRecord<A['zIndex']>\n}\n\ntype TokenifyRecord<A extends CreateTokens[keyof CreateTokens]> = {\n [Key in keyof A]: A[Key] extends Variable ? A[Key] : Variable<A[Key]>\n}\n\nexport type TamaguiBaseTheme = {\n // defined for our tamagui kit , we could do this inside `tamagui`\n // but maybe helpful to have some sort of universally shared things +\n // + enforce if they want their own, redefine in their design sys\n background: VariableColorVal\n backgroundHover: VariableColorVal\n backgroundPress: VariableColorVal\n backgroundFocus: VariableColorVal\n color: VariableColorVal\n colorHover: VariableColorVal\n colorPress: VariableColorVal\n colorFocus: VariableColorVal\n borderColor: VariableColorVal\n borderColorHover: VariableColorVal\n borderColorPress: VariableColorVal\n borderColorFocus: VariableColorVal\n shadowColor: VariableColorVal\n shadowColorHover: VariableColorVal\n shadowColorPress: VariableColorVal\n shadowColorFocus: VariableColorVal\n}\n\ntype GenericTokens = CreateTokens\ntype GenericThemes = {\n [key: string]:\n | Partial<TamaguiBaseTheme> & {\n [key: string]: VariableVal\n }\n}\n\ntype AllStyleKeys = keyof StackStylePropsBase | keyof TextStylePropsBase\n\nexport type CreateShorthands = {\n [key: string]: AllStyleKeys\n}\n\nexport type GenericShorthands = {}\n\n// sm: { minWidth: 100 }\ntype GenericMedia = {\n [key: string]: {\n [key: string]: number | string\n }\n}\n\nexport type GenericFonts = Record<string, GenericFont>\n\ntype GenericAnimations = {\n [key: string]:\n | string\n | {\n [key: string]: any\n }\n | any[]\n}\n\n// this is the \"main\" typed object, which users re-define\n// (internal) keep all types directly on this object and reference them from elsewhere\n//\n// const config = createTamagui(...)\n// type MyConfig = typeof config\n// declare module 'tamagui' {\n// export interface TamaguiCustomConfig extends MyConfig {}\n// }\n// now your whole app/kit should be typed correctly\n//\nexport interface TamaguiCustomConfig {}\n\nexport interface TamaguiConfig\n extends Omit<GenericTamaguiConfig, keyof TamaguiCustomConfig>,\n TamaguiCustomConfig {}\n\nexport type CreateTamaguiConfig<\n A extends GenericTokens,\n B extends GenericThemes,\n C extends GenericShorthands = GenericShorthands,\n D extends GenericMedia = GenericMedia,\n E extends GenericAnimations = GenericAnimations,\n F extends GenericFonts = GenericFonts\n> = {\n fonts: RemoveLanguagePostfixes<F>\n fontLanguages: GetLanguagePostfixes<F> extends never\n ? string[]\n : GetLanguagePostfixes<F>[]\n tokens: A\n // parsed\n themes: {\n [Name in keyof B]: {\n [Key in keyof B[Name]]: Variable\n }\n }\n shorthands: C\n media: D\n animations: AnimationDriver<E>\n}\n\ntype GetLanguagePostfix<Set> = Set extends string\n ? Set extends `${string}_${infer Postfix}`\n ? Postfix\n : never\n : never\n\ntype OmitLanguagePostfix<Set> = Set extends string\n ? Set extends `${infer Prefix}_${string}`\n ? Prefix\n : Set\n : never\n\ntype RemoveLanguagePostfixes<F extends GenericFonts> = {\n [Key in OmitLanguagePostfix<keyof F>]: F[Key]\n}\n\ntype GetLanguagePostfixes<F extends GenericFonts> = GetLanguagePostfix<keyof F>\n\n// test RemoveLanguagePostfixes\n// type x = CreateTamaguiConfig<any, any, any, any, any, {\n// body: any,\n// body_en: any\n// }>['fonts']\n\ntype ConfProps<\n A extends GenericTokens,\n B extends GenericThemes,\n C extends GenericShorthands = GenericShorthands,\n D extends GenericMedia = GenericMedia,\n E extends GenericAnimations = GenericAnimations,\n F extends GenericFonts = GenericFonts\n> = {\n tokens: A\n themes: B\n shorthands?: C\n media?: D\n animations?: AnimationDriver<E>\n fonts: F\n}\n\nexport type InferTamaguiConfig<Conf> = Conf extends ConfProps<\n infer A,\n infer B,\n infer C,\n infer D,\n infer E,\n infer F\n>\n ? TamaguiInternalConfig<A, B, C, D, E, F>\n : unknown\n\n// for use in creation functions so it doesnt get overwritten\nexport type GenericTamaguiConfig = CreateTamaguiConfig<\n GenericTokens,\n GenericThemes,\n GenericShorthands,\n GenericMedia,\n GenericAnimations,\n GenericFonts\n>\n\n// since TamaguiConfig will be re-declared, these will all be typed globally\nexport type ThemeDefinition = TamaguiConfig['themes'][keyof TamaguiConfig['themes']]\nexport type ThemeKeys = keyof ThemeDefinition\nexport type ThemeParsed = {\n [key in ThemeKeys]: Variable<any>\n}\nexport type Tokens = TamaguiConfig['tokens']\nexport type Shorthands = TamaguiConfig['shorthands']\nexport type Media = TamaguiConfig['media']\nexport type Themes = TamaguiConfig['themes']\nexport type ThemeName = Exclude<GetAltThemeNames<keyof Themes>, number>\nexport type ThemeTokens = `$${ThemeKeys}`\nexport type AnimationKeys = TamaguiConfig['animations'] extends AnimationDriver<\n infer Config\n>\n ? keyof Config\n : string\nexport type FontLanguages = ArrayIntersection<TamaguiConfig['fontLanguages']>\n\nexport interface ThemeProps {\n className?: string\n name?: Exclude<ThemeName, number> | null\n componentName?: string\n children?: any\n reset?: boolean\n debug?: boolean | 'verbose'\n inverse?: boolean\n // on the web, for portals we need to re-insert className\n forceClassName?: boolean\n // allows for disabling the auto-update behavior\n shouldUpdate?: () => boolean\n}\n\ntype ArrayIntersection<A extends any[]> = A[keyof A]\n\ntype GetAltThemeNames<S> =\n | (S extends `${string}_${infer Alt}` ? GetAltThemeNames<Alt> : S)\n | S\n\ntype SpacerPropsBase = {\n size?: number | SpaceTokens | null\n flex?: boolean | number\n direction?: SpaceDirection\n}\ntype SpacerOwnProps = SpacerPropsBase &\n //\n WithThemeShorthandsPseudosMediaAnimation<SpacerPropsBase>\n\nexport type SpacerProps = Omit<StackProps, 'flex' | 'direction' | 'size'> &\n //\n SpacerOwnProps\n\nexport type CreateTamaguiProps = {\n reactNative?: any\n shorthands?: CreateShorthands\n media?: GenericTamaguiConfig['media']\n animations?: AnimationDriver<any>\n fonts: GenericTamaguiConfig['fonts']\n tokens: GenericTamaguiConfig['tokens']\n themes: {\n [key: string]: {\n [key: string]: string | number | Variable\n }\n }\n\n /**\n * *Advanced use case* For all CSS extracted views, this has no effect.\n *\n * For SSR compatibility on the web, Tamagui will render once with the settings\n * from `mediaQueryDefaultActive` set for all media queries. Then, it will render\n * again after the initial render using the proper media query values. This is so that\n * hydration will match perfectly with the server.\n *\n * Setting disableSSR will avoid this second render by setting the media query state\n * to the actual browser dimensions on initial load. This is only useful for client-only\n * apps.\n *\n */\n disableSSR?: boolean\n\n /**\n * Disable inserting a theme class in the DOM or context, allowing you to manually place it higher.\n * For custom use cases like integration with next-theme.\n */\n disableRootThemeClass?: boolean\n\n defaultProps?: Record<string, any> & {\n Stack?: StackProps\n Text?: TextProps\n Spacer?: SpacerProps\n }\n\n // for the first render, determines which media queries are true\n // useful for SSR\n mediaQueryDefaultActive?: Record<MediaQueryKey, boolean>\n\n // what's between each CSS style rule, set to \"\\n\" to be easier to read\n // defaults: \"\\n\" when NODE_ENV=development, \"\" otherwise\n cssStyleSeparator?: string\n\n // (Advanced)\n // on the web, tamagui treats `dark` and `light` themes as special and\n // generates extra CSS to avoid having to re-render the entire page.\n // this CSS relies on specificity hacks that multiply by your sub-themes.\n // this sets the maxiumum number of nested dark/light themes you can do\n // defaults to 3 for a balance, but can be higher if you nest them deeply.\n maxDarkLightNesting?: number\n\n // adds @media(prefers-color-scheme) media queries for dark/light\n shouldAddPrefersColorThemes?: boolean\n\n // only if you put the theme classname on the html element we have to generate diff\n themeClassNameOnRoot?: boolean\n}\n\n// this is the config generated via createTamagui()\nexport type TamaguiInternalConfig<\n A extends GenericTokens = GenericTokens,\n B extends GenericThemes = GenericThemes,\n C extends GenericShorthands = GenericShorthands,\n D extends GenericMedia = GenericMedia,\n E extends GenericAnimations = GenericAnimations,\n F extends GenericFonts = GenericFonts\n> = Omit<CreateTamaguiProps, keyof GenericTamaguiConfig> &\n Omit<CreateTamaguiConfig<A, B, C, D, E, F>, 'tokens'> & {\n // TODO need to make it this but this breaks types, revisit\n // animations: E //AnimationDriver<E>\n // with $ prefixes for fast lookups (one time cost at startup vs every render)\n tokens: Tokenify<A>\n tokensParsed: Tokenify<A>\n themeConfig: any\n fontsParsed: GenericFonts\n getCSS: () => string\n parsed: boolean\n inverseShorthands: Record<string, string>\n reactNative?: any\n }\n\nexport type GetAnimationKeys<A extends GenericTamaguiConfig> = keyof A['animations']\n\n// prevents const intersections from being clobbered into string, keeping the consts\nexport type UnionableString = string & {}\nexport type UnionableNumber = number & {}\nexport type PropTypes<A extends TamaguiComponent> = A extends FunctionComponent<\n infer Props\n>\n ? Props\n : unknown\n\nexport type GenericFont<Key extends number | string = number | string> = {\n size: { [key in Key]: number | Variable }\n lineHeight: Partial<{ [key in Key]: number | Variable }>\n letterSpacing: Partial<{ [key in Key]: number | Variable }>\n weight: Partial<{ [key in Key]: number | string | Variable }>\n family: string | Variable\n style?: Partial<{ [key in Key]: TextStyle['fontStyle'] | Variable }>\n transform?: Partial<{ [key in Key]: TextStyle['textTransform'] | Variable }>\n color?: Partial<{ [key in Key]: string | Variable }>\n // for native use only, lets you map to alternative fonts\n face?: Partial<{\n [key in FontWeightSteps]: { normal?: string; italic?: string }\n }>\n}\n\n// media\nexport type MediaQueryObject = { [key: string]: string | number | string }\nexport type MediaQueryKey = keyof Media\nexport type MediaPropKeys = `$${MediaQueryKey}`\nexport type MediaQueryState = { [key in MediaQueryKey]: boolean }\nexport type MediaProps<A> = {\n [key in MediaPropKeys]?: A\n}\nexport type MediaQueries = {\n [key in MediaQueryKey]: MediaQueryObject\n}\n\nexport interface MediaQueryList {\n addListener(listener?: any): void\n removeListener(listener?: any): void\n matches: boolean\n}\n\nexport type MatchMedia = (query: string) => MediaQueryList\n\nexport type TransformStyleProps = {\n x?: number\n y?: number\n perspective?: number\n scale?: number\n scaleX?: number\n scaleY?: number\n skewX?: string\n skewY?: string\n matrix?: number[]\n rotate?: string\n rotateY?: string\n rotateX?: string\n rotateZ?: string\n}\n\n// createComponent props helpers\n\n// animation=\"bouncy\"\n// animation={['bouncy', { }]}\n// { all: 'name' }\n\n// TODO can override for better types\nexport type AnimationConfigType = any\n\nexport type AnimationProp =\n | AnimationKeys\n | {\n [key: string]:\n | AnimationKeys\n | {\n type: AnimationKeys\n [key: string]: any\n }\n }\n | [\n AnimationKeys,\n {\n [key: string]:\n | AnimationKeys\n | {\n type?: AnimationKeys\n [key: string]: any\n }\n }\n ]\n\ntype GetTokenFontKeysFor<\n A extends\n | 'size'\n | 'weight'\n | 'letterSpacing'\n | 'family'\n | 'lineHeight'\n | 'transform'\n | 'style'\n | 'color'\n> = keyof TamaguiConfig['fonts']['body'][A]\n\ntype GetTokenString<A> = A extends string | number ? `$${A}` : `$${string}`\n\n// base tokens\nexport type SizeTokens = GetTokenString<keyof Tokens['size']> | number\nexport type SpaceTokens = GetTokenString<keyof Tokens['space']> | number | boolean\n\nexport type ColorTokens =\n | GetTokenString<keyof Tokens['color']>\n | GetTokenString<keyof ThemeParsed>\n | CSSColorNames\nexport type ZIndexTokens = GetTokenString<keyof Tokens['zIndex']> | number\nexport type RadiusTokens = GetTokenString<keyof Tokens['radius']> | number\n\n// font tokens\nexport type FontTokens = GetTokenString<keyof TamaguiConfig['fonts']>\nexport type FontSizeTokens = GetTokenString<GetTokenFontKeysFor<'size'>> | number\nexport type FontLineHeightTokens = `$${GetTokenFontKeysFor<'lineHeight'>}` | number\nexport type FontWeightSteps = `${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}00`\nexport type FontWeightTokens = `$${GetTokenFontKeysFor<'weight'>}` | FontWeightSteps\nexport type FontColorTokens = `$${GetTokenFontKeysFor<'color'>}` | number\nexport type FontLetterSpacingTokens = `$${GetTokenFontKeysFor<'letterSpacing'>}` | number\nexport type FontStyleTokens = `$${GetTokenFontKeysFor<'style'>}` | TextStyle['fontStyle']\nexport type FontTransformTokens =\n | `$${GetTokenFontKeysFor<'transform'>}`\n | TextStyle['textTransform']\n\n//\n// adds theme short values to relevant props\n//\n\nexport type ThemeValueByCategory<K extends string | number | symbol> = K extends 'theme'\n ? ThemeTokens\n : K extends 'size'\n ? SizeTokens\n : K extends 'font'\n ? FontTokens\n : K extends 'fontSize'\n ? FontSizeTokens\n : K extends 'space'\n ? SpaceTokens\n : K extends 'color'\n ? ColorTokens\n : K extends 'zIndex'\n ? ZIndexTokens\n : K extends 'lineHeight'\n ? FontLineHeightTokens\n : K extends 'fontWeight'\n ? FontWeightTokens\n : K extends 'letterSpacing'\n ? FontLetterSpacingTokens\n : {}\n\ntype FontKeys = 'fontFamily'\ntype FontSizeKeys = 'fontSize'\ntype FontWeightKeys = 'fontWeight'\ntype FontLetterSpacingKeys = 'letterSpacing'\ntype LineHeightKeys = 'lineHeight'\ntype ZIndexKeys = 'zIndex'\n\nexport type ThemeValueGet<K extends string | number | symbol> = K extends 'theme'\n ? ThemeTokens\n : K extends SizeKeys\n ? SizeTokens\n : K extends FontKeys\n ? FontTokens\n : K extends FontSizeKeys\n ? FontSizeTokens\n : K extends `${`border${string | ''}Radius`}`\n ? RadiusTokens\n : K extends SpaceKeys\n ? K extends 'shadowOffset'\n ? { width: SpaceTokens; height: SpaceTokens }\n : SpaceTokens\n : K extends ColorKeys\n ? ColorTokens\n : K extends ZIndexKeys\n ? ZIndexTokens\n : K extends LineHeightKeys\n ? FontLineHeightTokens\n : K extends FontWeightKeys\n ? FontWeightTokens\n : K extends FontLetterSpacingKeys\n ? FontLetterSpacingTokens\n : never\n\nexport type ThemeValueFallback = UnionableString | Variable\n\nexport type WithThemeValues<T extends object> = {\n [K in keyof T]: ThemeValueGet<K> extends never\n ? T[K]\n : ThemeValueGet<K> | Exclude<T[K], string> | ThemeValueFallback\n}\n\n// adds shorthand props\nexport type WithShorthands<StyleProps> = {\n [Key in keyof Shorthands]?: Shorthands[Key] extends keyof StyleProps\n ? StyleProps[Shorthands[Key]] | null\n : undefined\n}\n\n// adds pseudo props\nexport type PseudoProps<A> = {\n hoverStyle?: A | null\n pressStyle?: A | null\n focusStyle?: A | null\n exitStyle?: A | null\n enterStyle?: A | null\n}\n\nexport type PseudoPropKeys = keyof PseudoProps<any>\n\nexport type PseudoStyles = {\n hoverStyle?: ViewStyle\n pressStyle?: ViewStyle\n focusStyle?: ViewStyle\n enterStyle?: ViewStyle\n exitStyle?: ViewStyle\n}\n\n//\n// add both theme and shorthands\n//\ntype WithThemeAndShorthands<A extends object> = WithThemeValues<A> &\n WithShorthands<WithThemeValues<A>>\n\n//\n// combines all of theme, shorthands, pseudos...\n//\ntype WithThemeShorthandsAndPseudos<A extends object> =\n | WithThemeAndShorthands<A> & PseudoProps<WithThemeAndShorthands<A>>\n\n//\n// ... media queries and animations\n//\ntype WithThemeShorthandsPseudosMediaAnimation<A extends object> =\n WithThemeShorthandsAndPseudos<A> & MediaProps<WithThemeShorthandsAndPseudos<A>>\n\n/**\n * Base style-only props (no media, pseudo):\n */\n\ntype PropsWebOnly = {\n pointerEvents?: ViewProps['pointerEvents']\n cursor?: Properties['cursor']\n contain?: Properties['contain']\n display?: 'inherit' | 'none' | 'inline' | 'block' | 'contents' | 'flex' | 'inline-flex'\n userSelect?: Properties['userSelect']\n outlineColor?: Properties['outlineColor']\n outlineStyle?: Properties['outlineStyle']\n outlineOffset?: Properties['outlineOffset']\n outlineWidth?: Properties['outlineWidth']\n tabIndex?: string | number\n role?: string\n}\n\nexport type StackStylePropsBase = Omit<\n ViewStyle,\n 'display' | 'backfaceVisibility' | 'elevation'\n> &\n TransformStyleProps &\n PropsWebOnly\n\nexport type TextStylePropsBase = Omit<TextStyle, 'display' | 'backfaceVisibility'> &\n TransformStyleProps &\n PropsWebOnly & {\n ellipse?: boolean\n textDecorationDistance?: number\n textOverflow?: Properties['textOverflow']\n whiteSpace?: Properties['whiteSpace']\n wordWrap?: Properties['wordWrap']\n }\n\n//\n// Stack\n//\n\nexport type StackNonStyleProps = Omit<ViewProps, 'display' | 'children'> &\n RNWViewProps &\n TamaguiComponentPropsBase\n\nexport type StackStyleProps =\n WithThemeShorthandsPseudosMediaAnimation<StackStylePropsBase>\nexport type StackPropsBase = StackNonStyleProps &\n WithThemeAndShorthands<StackStylePropsBase>\nexport type StackProps = StackNonStyleProps & StackStyleProps\n\n//\n// Text props\n//\n\nexport type TextNonStyleProps = Omit<ReactTextProps, 'children'> &\n RNWTextProps &\n TamaguiComponentPropsBase\n\nexport type TextPropsBase = TextNonStyleProps & WithThemeAndShorthands<TextStylePropsBase>\nexport type TextStyleProps = WithThemeShorthandsPseudosMediaAnimation<TextStylePropsBase>\nexport type TextProps = TextNonStyleProps & TextStyleProps\n\n// could actually infer from parent\nexport type ViewOrTextProps = WithThemeShorthandsPseudosMediaAnimation<\n Omit<TextStylePropsBase, keyof StackStylePropsBase> & StackStylePropsBase\n>\n\n//\n// StaticComponent\n//\n\nexport type TamaguiComponent<\n Props = any,\n Ref = any,\n BaseProps = {},\n VariantProps = {}\n> = ReactComponentWithRef<Props, Ref> & StaticComponentObject\n\ntype StaticComponentObject = {\n staticConfig: StaticConfig\n /*\n * Only needed for more complex components\n * If you create a styled frame component this is a HoC to extract\n * styles from all parents.\n */\n extractable: <X>(a: X, opts?: Partial<StaticConfig>) => X\n}\n\nexport type TamaguiProviderProps = Partial<Omit<ThemeProviderProps, 'children'>> & {\n config: TamaguiInternalConfig\n disableInjectCSS?: boolean\n children?: ReactNode\n}\n\nexport type PropMapper = (\n key: string,\n value: any,\n theme: ThemeParsed,\n props: Record<string, any>,\n state: Partial<SplitStyleState>,\n languageContext?: FontLanguageProps,\n avoidDefaultProps?: boolean,\n debug?: DebugProp\n) => undefined | [string, any][]\n\nexport type StaticConfigParsed = StaticConfig & {\n parsed: true\n propMapper: PropMapper\n variantsParsed?: {\n [key: string]: {\n [key: string]: any\n }\n }\n}\n\nexport type GenericVariantDefinitions = {\n [key: string]: {\n [key: string]:\n | ((a: any, b: any) => any)\n | {\n [key: string]: any\n }\n }\n}\n\nexport type StaticConfigPublic = {\n /**\n * (compiler) If you need to pass context or something, prevents from ever\n * flattening. The 'jsx' option means it will never flatten. if you\n * pass JSX as a children (if its purely string, it will still flatten).\n */\n neverFlatten?: boolean | 'jsx'\n\n /**\n * Determines ultimate output tag (Text vs View)\n */\n isText?: boolean\n\n /**\n * Which style keys are allowed to be extracted.\n */\n validStyles?: { [key: string]: boolean }\n\n /**\n * (compiler) If these props are encountered, bail on all optimization.\n */\n deoptProps?: Set<string>\n\n /**\n * (compiler) If these props are encountered, leave them un-extracted.\n */\n inlineProps?: Set<string>\n\n /**\n * (compiler) If not flattening, leave this prop as original value.\n * Only applies to style attributes\n */\n inlineWhenUnflattened?: Set<string>\n\n /**\n * (compiler) A bit odd, only for more advanced heirarchies.\n * Indicates that the component will set this prop so the\n * static extraction can ensure it sets them to ={undefined}\n * so they get overriddent. In the future, this can be smarter.\n */\n ensureOverriddenProp?: { [key: string]: boolean }\n\n /**\n * Auto-detected, but can ovverride. Wraps children to space them on top\n */\n isZStack?: boolean\n\n /**\n * Auto-detect, but can override, passes styles properly to react-native-web\n */\n isReactNative?: boolean\n\n /**\n * By default if styled() doesn't recognize a parent Tamagui compoent or specific react-native views,\n * it will assume the passed in component only accepts style={} for react-native compatibility.\n * Setting `acceptsClassName: true` indicates Tamagui can pass in className props.\n */\n acceptsClassName?: boolean\n}\n\nexport type StaticConfig = StaticConfigPublic & {\n Component?: FunctionComponent<any> & StaticComponentObject\n\n variants?: GenericVariantDefinitions\n\n /**\n * Used for applying sub theme style\n */\n componentName?: string\n\n /**\n * Same as React.defaultProps, be sure to sync\n */\n defaultProps: Record<string, any>\n\n /**\n * Merges into defaultProps later on, used internally yonly\n */\n defaultVariants?: { [key: string]: any }\n\n /**\n * Memoize the component\n */\n memo?: boolean\n\n /**\n * Used insternally to attach default props to names\n */\n parentNames?: string[]\n\n /**\n * By default if styled() doesn't recognize a parent Tamagui compoent or specific react-native views,\n * it will assume the passed in component only accepts style={} for react-native compatibility.\n * Setting `acceptsClassName: true` indicates Tamagui can pass in className props.\n */\n acceptsClassName?: boolean\n\n /**\n * Used internally for handling focus\n */\n isInput?: boolean\n}\n\n/**\n * --------------------------------------------\n * variants\n * --------------------------------------------\n */\n\nexport type StylableComponent =\n | TamaguiComponent\n // * excessively deep type instantiation\n // | TamaguiReactElement\n | ComponentType<any>\n | ForwardRefExoticComponent<any>\n | ReactComponentWithRef<any, any>\n | (new (props: any) => any)\n | typeof View\n | typeof Text\n | typeof TextInput\n | typeof Image\n\nexport type GetStyledVariants<A extends TamaguiComponent> = A extends TamaguiComponent<\n any,\n any,\n any,\n infer Variants\n>\n ? Variants\n : never\n\nexport type GetBaseProps<A extends StylableComponent> = A extends TamaguiComponent<\n any,\n any,\n infer BaseProps\n>\n ? BaseProps\n : never\n\nexport type GetProps<A extends StylableComponent> = A extends TamaguiComponent<\n infer Props\n>\n ? Props\n : A extends TamaguiReactElement<infer Props>\n ? Props\n : A extends ComponentType<infer Props>\n ? GetGenericComponentTamaguiProps<Props>\n : A extends new (props: infer Props) => any\n ? GetGenericComponentTamaguiProps<Props>\n : {}\n\ntype GetGenericComponentTamaguiProps<P> = P &\n Omit<'textAlign' extends keyof P ? TextProps : StackProps, keyof P>\n\nexport type SpreadKeys =\n | '...fontSize'\n | '...fontStyle'\n | '...fontTransform'\n | '...lineHeight'\n | '...letterSpacing'\n | '...size'\n | '...space'\n | '...color'\n | '...zIndex'\n | '...theme'\n | '...radius'\n\nexport type VariantDefinitions<\n Parent extends StylableComponent = TamaguiComponent,\n MyProps extends Object = GetProps<Parent>,\n Val = any\n> = VariantDefinitionFromProps<MyProps, Val>\n\nexport type VariantDefinitionFromProps<MyProps, Val> = MyProps extends Object\n ? {\n [propName: string]:\n | VariantSpreadFunction<MyProps, Val>\n | ({\n [Key in SpreadKeys]?: Key extends '...fontSize'\n ? FontSizeVariantSpreadFunction<MyProps>\n : Key extends '...size'\n ? SizeVariantSpreadFunction<MyProps>\n : Key extends '...space'\n ? SpaceVariantSpreadFunction<MyProps>\n : Key extends '...color'\n ? ColorVariantSpreadFunction<MyProps>\n : Key extends '...lineHeight'\n ? FontLineHeightVariantSpreadFunction<MyProps>\n : Key extends '...fontTransform'\n ? FontTransformVariantSpreadFunction<MyProps>\n : Key extends '...fontStyle'\n ? FontStyleVariantSpreadFunction<MyProps>\n : Key extends '...letterSpacing'\n ? FontLetterSpacingVariantSpreadFunction<MyProps>\n : Key extends '...zIndex'\n ? ZIndexVariantSpreadFunction<MyProps>\n : Key extends '...radius'\n ? RadiusVariantSpreadFunction<MyProps>\n : Key extends '...theme'\n ? ThemeVariantSpreadFunction<MyProps>\n : never\n } & {\n [Key in string | number | 'true' | 'false']?:\n | MyProps\n | VariantSpreadFunction<MyProps, Val>\n } & {\n [Key in VariantTypeKeys]?: Key extends ':number'\n ? VariantSpreadFunction<MyProps, number>\n : Key extends ':boolean'\n ? VariantSpreadFunction<MyProps, boolean>\n : Key extends ':string'\n ? VariantSpreadFunction<MyProps, string>\n : never\n })\n }\n : never\n\nexport type GenericStackVariants = VariantDefinitionFromProps<StackProps, any>\nexport type GenericTextVariants = VariantDefinitionFromProps<StackProps, any>\n\nexport type GetVariantProps<Variants> = {\n [Key in keyof Variants]?: Variants[Key] extends VariantSpreadFunction<any, infer Val>\n ? Val\n : GetVariantValues<keyof Variants[Key]>\n}\n\nexport type VariantSpreadExtras<Props> = {\n fonts: TamaguiConfig['fonts']\n tokens: TamaguiConfig['tokens']\n theme: Themes extends { [key: string]: infer B } ? B : unknown\n props: Props\n}\n\ntype PropLike = { [key: string]: any }\n\nexport type VariantSpreadFunction<Props extends PropLike, Val = any> = (\n val: Val,\n config: VariantSpreadExtras<Props>\n) =>\n | {\n [Key in keyof Props]: Props[Key] | Variable\n }\n | null\n | undefined\n\nexport type VariantTypeKeys = ':string' | ':boolean' | ':number'\n\nexport type GetVariantValues<Key> = Key extends `...${infer VariantSpread}`\n ? ThemeValueByCategory<VariantSpread>\n : Key extends 'true' | 'false'\n ? boolean\n : Key extends ':string'\n ? string\n : Key extends ':boolean'\n ? boolean\n : Key extends ':number'\n ? number\n : Key\n\nexport type FontSizeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n FontSizeTokens\n>\nexport type SizeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n SizeTokens\n>\nexport type SpaceVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n SpaceTokens\n>\nexport type ColorVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n ColorTokens\n>\nexport type FontLineHeightVariantSpreadFunction<A extends PropLike> =\n VariantSpreadFunction<A, FontLineHeightTokens>\nexport type FontLetterSpacingVariantSpreadFunction<A extends PropLike> =\n VariantSpreadFunction<A, FontLetterSpacingTokens>\nexport type FontStyleVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n FontStyleTokens\n>\nexport type FontTransformVariantSpreadFunction<A extends PropLike> =\n VariantSpreadFunction<A, FontTransformTokens>\nexport type ZIndexVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n ZIndexTokens\n>\nexport type RadiusVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n RadiusTokens\n>\nexport type ThemeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n ThemeTokens\n>\n\n/**\n * --------------------------------------------\n * end variants\n * --------------------------------------------\n */\n\ntype SizeKeys =\n | 'width'\n | 'height'\n | 'minWidth'\n | 'minHeight'\n | 'maxWidth'\n | 'maxHeight'\n | 'shadowRadius'\n\ntype ColorKeys =\n | 'color'\n | 'backgroundColor'\n | 'borderColor'\n | 'borderBottomColor'\n | 'borderTopColor'\n | 'borderLeftColor'\n | 'borderRightColor'\n | 'shadowColor'\n | 'textShadowColor'\n\ntype SpaceKeys =\n | 'space'\n | 'padding'\n | 'paddingHorizontal'\n | 'paddingVertical'\n | 'paddingLeft'\n | 'paddingTop'\n | 'paddingBottom'\n | 'paddingLeft'\n | 'paddingRight'\n | 'paddingEnd'\n | 'paddingStart'\n | 'margin'\n | 'marginHorizontal'\n | 'marginVertical'\n | 'marginLeft'\n | 'marginTop'\n | 'marginBottom'\n | 'marginLeft'\n | 'marginRight'\n | 'marginEnd'\n | 'marginStart'\n | 'x'\n | 'y'\n | 'scale'\n | 'scaleX'\n | 'scaleY'\n | 'borderTopEndRadius'\n | 'borderTopLeftRadius'\n | 'borderTopRightRadius'\n | 'borderTopStartRadius'\n | 'borderBottomEndRadius'\n | 'borderBottomLeftRadius'\n | 'borderBottomRightRadius'\n | 'borderBottomStartRadius'\n | 'borderBottomWidth'\n | 'borderLeftWidth'\n | 'borderRadius'\n | 'borderRightWidth'\n | 'borderTopEndRadius'\n | 'borderTopLeftRadius'\n | 'borderTopRightRadius'\n | 'borderEndWidth'\n | 'borderStartWidth'\n | 'borderTopStartRadius'\n | 'borderTopWidth'\n | 'borderWidth'\n | 'left'\n | 'top'\n | 'right'\n | 'bottom'\n | 'shadowOffset'\n\ntype CSSColorNames =\n | 'aliceblue'\n | 'antiquewhite'\n | 'aqua'\n | 'aquamarine'\n | 'azure'\n | 'beige'\n | 'bisque'\n | 'black'\n | 'blanchedalmond'\n | 'blue'\n | 'blueviolet'\n | 'brown'\n | 'burlywood'\n | 'cadetblue'\n | 'chartreuse'\n | 'chocolate'\n | 'coral'\n | 'cornflowerblue'\n | 'cornsilk'\n | 'crimson'\n | 'cyan'\n | 'darkblue'\n | 'darkcyan'\n | 'darkgoldenrod'\n | 'darkgray'\n | 'darkgreen'\n | 'darkkhaki'\n | 'darkmagenta'\n | 'darkolivegreen'\n | 'darkorange'\n | 'darkorchid'\n | 'darkred'\n | 'darksalmon'\n | 'darkseagreen'\n | 'darkslateblue'\n | 'darkslategray'\n | 'darkturquoise'\n | 'darkviolet'\n | 'deeppink'\n | 'deepskyblue'\n | 'dimgray'\n | 'dodgerblue'\n | 'firebrick'\n | 'floralwhite'\n | 'forestgreen'\n | 'fuchsia'\n | 'gainsboro'\n | 'ghostwhite'\n | 'gold'\n | 'goldenrod'\n | 'gray'\n | 'green'\n | 'greenyellow'\n | 'honeydew'\n | 'hotpink'\n | 'indianred '\n | 'indigo '\n | 'ivory'\n | 'khaki'\n | 'lavender'\n | 'lavenderblush'\n | 'lawngreen'\n | 'lemonchiffon'\n | 'lightblue'\n | 'lightcoral'\n | 'lightcyan'\n | 'lightgoldenrodyellow'\n | 'lightgrey'\n | 'lightgreen'\n | 'lightpink'\n | 'lightsalmon'\n | 'lightseagreen'\n | 'lightskyblue'\n | 'lightslategray'\n | 'lightsteelblue'\n | 'lightyellow'\n | 'lime'\n | 'limegreen'\n | 'linen'\n | 'magenta'\n | 'maroon'\n | 'mediumaquamarine'\n | 'mediumblue'\n | 'mediumorchid'\n | 'mediumpurple'\n | 'mediumseagreen'\n | 'mediumslateblue'\n | 'mediumspringgreen'\n | 'mediumturquoise'\n | 'mediumvioletred'\n | 'midnightblue'\n | 'mintcream'\n | 'mistyrose'\n | 'moccasin'\n | 'navajowhite'\n | 'navy'\n | 'oldlace'\n | 'olive'\n | 'olivedrab'\n | 'orange'\n | 'orangered'\n | 'orchid'\n | 'palegoldenrod'\n | 'palegreen'\n | 'paleturquoise'\n | 'palevioletred'\n | 'papayawhip'\n | 'peachpuff'\n | 'peru'\n | 'pink'\n | 'plum'\n | 'powderblue'\n | 'purple'\n | 'red'\n | 'rosybrown'\n | 'royalblue'\n | 'saddlebrown'\n | 'salmon'\n | 'sandybrown'\n | 'seagreen'\n | 'seashell'\n | 'sienna'\n | 'silver'\n | 'skyblue'\n | 'slateblue'\n | 'slategray'\n | 'snow'\n | 'springgreen'\n | 'steelblue'\n | 'tan'\n | 'teal'\n | 'thistle'\n | 'tomato'\n | 'turquoise'\n | 'violet'\n | 'wheat'\n | 'white'\n | 'whitesmoke'\n | 'yellow'\n | 'yellowgreen'\n\nexport type TamaguiComponentState = {\n hover: boolean\n press: boolean\n pressIn: boolean\n focus: boolean\n unmounted: boolean\n animation?: null | {\n style?: any\n avoidClasses?: boolean\n }\n}\n\nexport type SplitStyleState = TamaguiComponentState & {\n mediaState?: Record<string, boolean>\n noClassNames?: boolean\n dynamicStylesInline?: boolean\n resolveVariablesAs?: ResolveVariableTypes\n fallbackProps?: Record<string, any>\n keepVariantsAsProps?: boolean\n hasTextAncestor?: boolean\n\n // for animations\n isExiting?: boolean\n exitVariant?: string\n enterVariant?: string\n}\n\n// Presence\n\nexport interface PresenceContextProps {\n id: string\n isPresent: boolean\n register: (id: string) => () => void\n onExitComplete?: (id: string) => void\n initial?: false | string | string[]\n custom?: any\n exitVariant?: string | null\n enterVariant?: string | null\n}\n\ntype SafeToRemoveCallback = () => void\ntype AlwaysPresent = [true, null, null]\ntype Present = [true, undefined, PresenceContextProps]\ntype NotPresent = [false, SafeToRemoveCallback, PresenceContextProps]\n\nexport type UsePresenceResult = AlwaysPresent | Present | NotPresent\n\n// Animations:\n\ntype AnimationConfig = {\n [key: string]: any\n}\n\n// includes a very limited adapter between various impls for number => style\n// this is useful only in limited scenarios like `Sheet`, but necessary in those cases\n\nexport type AnimatedNumberStrategy =\n // only values shared between reanimated/react-native for now\n | {\n type: 'spring'\n stiffness?: number\n damping?: number\n mass?: number\n overshootClamping?: boolean\n restSpeedThreshold?: number\n restDisplacementThreshold?: number\n }\n | { type: 'timing'; duration: number }\n | { type: 'direct' }\n\nexport type UniversalAnimatedNumber<A> = {\n getInstance(): A\n getValue(): number\n setValue(next: number, config?: AnimatedNumberStrategy): void\n stop(): void\n}\n\nexport type AnimationDriver<A extends AnimationConfig = AnimationConfig> = {\n isReactNative?: boolean\n useAnimations: UseAnimationHook\n usePresence: () => UsePresenceResult\n useAnimatedNumber: (initial: number) => UniversalAnimatedNumber<any>\n useAnimatedNumberStyle: <V extends UniversalAnimatedNumber<any>>(\n val: V,\n getStyle: (current: any) => any\n ) => any\n useAnimatedNumberReaction: (\n val: UniversalAnimatedNumber<any>,\n onValue: (current: number) => void\n ) => void\n animations: A\n View?: any\n Text?: any\n}\n\nexport type UseAnimationProps = TamaguiComponentPropsBase & Record<string, any>\n\nexport type UseAnimationHook = (props: {\n style: Record<string, any>\n props: Record<string, any>\n presence?: UsePresenceResult | null\n hostRef: RefObject<HTMLElement | View>\n staticConfig: StaticConfigParsed\n state: SplitStyleState\n pseudos: PseudoProps<ViewStyle> | null\n onDidAnimate?: any\n delay?: number\n}) => null | {\n style?: StackStylePropsBase | StackStylePropsBase[]\n}\n\nexport type GestureReponderEvent = Exclude<\n View['props']['onResponderMove'],\n void\n> extends (event: infer Event) => void\n ? Event\n : never\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -124,7 +124,7 @@ function createComponent(configIn, ParentComponent) {
124
124
  );
125
125
  const state = propsIn.forceStyle ? { ...states[0], [propsIn.forceStyle]: true } : states[0];
126
126
  const setState = states[1];
127
- const setStateShallow = useShallowSetState(setState, true, debugProp, componentName);
127
+ const setStateShallow = useShallowSetState(setState, debugProp, componentName);
128
128
  const stateRef = useRef(
129
129
  void 0
130
130
  );
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/createComponent.tsx"],
4
- "sourcesContent": ["import { useComposedRefs } from '@tamagui/compose-refs'\nimport {\n isClient,\n isRSC,\n isServer,\n isWeb,\n useIsomorphicLayoutEffect,\n} from '@tamagui/constants'\nimport {\n composeEventHandlers,\n stylePropsView,\n validPseudoKeys,\n validStyles,\n} from '@tamagui/helpers'\nimport { useResponderEvents } from '@tamagui/react-native-use-responder-events'\nimport React, {\n Children,\n Fragment,\n RefObject,\n createElement,\n forwardRef,\n memo,\n useCallback,\n useContext,\n useEffect,\n useRef,\n} from 'react'\n\nimport { onConfiguredOnce } from './config'\nimport { stackDefaultStyles } from './constants/constants'\nimport { FontLanguageContext } from './contexts/FontLanguageContext'\nimport { TextAncestorContext } from './contexts/TextAncestorContext'\nimport { didGetVariableValue, setDidGetVariableValue } from './createVariable'\nimport { extendStaticConfig, parseStaticConfig } from './helpers/extendStaticConfig'\nimport { getRect } from './helpers/getRect'\nimport { useSplitStyles } from './helpers/getSplitStyles'\nimport { getAllSelectors } from './helpers/insertStyleRule'\nimport { mergeProps } from './helpers/mergeProps'\nimport { proxyThemeVariables } from './helpers/proxyThemeVariables'\nimport { useShallowSetState } from './helpers/useShallowSetState'\nimport { measureLayout, useElementLayout } from './hooks/useElementLayout'\nimport { setMediaShouldUpdate, useMedia } from './hooks/useMedia'\nimport { useServerRef, useServerState } from './hooks/useServerHooks'\nimport { useThemeWithState } from './hooks/useTheme'\nimport {\n DebugProp,\n SpaceDirection,\n SpaceTokens,\n SpacerProps,\n StaticConfig,\n StaticConfigParsed,\n StylableComponent,\n TamaguiComponent,\n TamaguiComponentState,\n TamaguiConfig,\n TamaguiElement,\n TamaguiInternalConfig,\n UseAnimationHook,\n UseAnimationProps,\n} from './types'\nimport { usePressability } from './vendor/Pressability'\nimport { Slot, mergeEvent } from './views/Slot'\nimport { useThemedChildren } from './views/Theme'\n\n// let t\n// import { timer } from '@tamagui/timer'\n// if (true || process.env.ANALYZE) {\n// t = require().timer()\n// setTimeout(() => {\n// const out = t.print()\n// if (isClient) {\n// alert(out)\n// }\n// }, 2000)\n// }\n\n// this appears to fix expo / babel not picking this up sometimes? really odd\nprocess.env.TAMAGUI_TARGET\n\nexport const defaultComponentState: TamaguiComponentState = {\n hover: false,\n press: false,\n pressIn: false,\n focus: false,\n unmounted: true,\n}\n\nconst defaultComponentStateMounted: TamaguiComponentState = {\n ...defaultComponentState,\n unmounted: false,\n}\n\n/**\n * All things that need one-time setup after createTamagui is called\n */\nlet tamaguiConfig: TamaguiInternalConfig\nlet AnimatedText: any\nlet AnimatedView: any\nlet initialTheme: any\n\nexport const mouseUps = new Set<Function>()\nif (typeof document !== 'undefined') {\n const cancelTouches = () => {\n mouseUps.forEach((x) => x())\n mouseUps.clear()\n }\n addEventListener('mouseup', cancelTouches)\n addEventListener('touchend', cancelTouches)\n addEventListener('touchcancel', cancelTouches)\n}\n\n// mutates\nfunction mergeShorthands(\n { defaultProps }: StaticConfigParsed,\n { shorthands }: TamaguiConfig\n) {\n // they are defined in correct order already { ...parent, ...child }\n for (const key of Object.keys(defaultProps)) {\n defaultProps[shorthands[key] || key] = defaultProps[key]\n }\n}\n\n/**\n * Only on native do we need the actual underlying View/Text\n * On the web we avoid react-native altogether in core.\n */\nlet BaseText: any\nlet BaseView: any\nif (process.env.TAMAGUI_TARGET === 'native') {\n const native = require('react-native')\n BaseText = native.Text || native.default.Text\n BaseView = native.View || native.default.View\n}\n\nexport function createComponent<\n ComponentPropTypes extends Object = {},\n Ref = TamaguiElement,\n BaseProps = never\n>(\n configIn: Partial<StaticConfig> | StaticConfigParsed,\n ParentComponent?: StylableComponent\n) {\n const staticConfig = (() => {\n const next = extendStaticConfig(configIn, ParentComponent)\n if ('parsed' in next) {\n return next\n } else {\n return parseStaticConfig(next)\n }\n })()\n\n const defaultComponentClassName = `is_${staticConfig.componentName}`\n let tamaguiDefaultProps: any\n let defaultTag: string | undefined\n\n // see onConfiguredOnce below which attaches a name then to this component\n const component = forwardRef<Ref, ComponentPropTypes>((propsIn: any, forwardedRef) => {\n // test only\n if (process.env.NODE_ENV === 'test') {\n if (propsIn['data-test-renders']) {\n propsIn['data-test-renders']['current'] ??= 0\n propsIn['data-test-renders']['current'] += 1\n }\n }\n // const time = t.start({ quiet: true })\n\n // React inserts default props after your props for some reason...\n // order important so we do loops, you can't just spread because JS does weird things\n let props: any\n if (tamaguiDefaultProps && !propsIn.asChild) {\n props = mergeProps(tamaguiDefaultProps, propsIn)[0]\n } else {\n props = propsIn\n }\n\n const debugProp = props['debug'] as DebugProp\n const { Component, isText, isZStack } = staticConfig\n const componentName = props.componentName || staticConfig.componentName\n const componentClassName = props.asChild\n ? ''\n : props.componentName\n ? `is_${props.componentName}`\n : defaultComponentClassName\n\n /**\n * Component state for tracking animations, pseudos\n */\n const animationsConfig = tamaguiConfig.animations\n const useAnimations = animationsConfig?.useAnimations as UseAnimationHook | undefined\n const avoidClassesWhileAnimating = animationsConfig.isReactNative\n const hasEnterStyle = !!props.enterStyle\n const needsMount = Boolean(\n (isWeb ? isClient : true) && (hasEnterStyle || props.animation)\n )\n const states = useServerState<TamaguiComponentState>(\n needsMount ? defaultComponentState! : defaultComponentStateMounted!\n )\n\n const state = propsIn.forceStyle\n ? { ...states[0], [propsIn.forceStyle]: true }\n : states[0]\n const setState = states[1]\n const setStateShallow = useShallowSetState(setState, true, debugProp, componentName)\n\n // conditional but if ever true stays true\n // [animated, inversed]\n const stateRef = useRef(\n undefined as any as {\n hasAnimated?: boolean\n themeShallow?: boolean\n didAccessThemeVariableValue?: boolean\n }\n )\n stateRef.current ??= {}\n\n const isAnimated = (() => {\n const next = !!(useAnimations && props.animation)\n if (next && !stateRef.current.hasAnimated) {\n stateRef.current.hasAnimated = true\n }\n return next || stateRef.current.hasAnimated\n })()\n\n const usePresence = tamaguiConfig.animations?.usePresence\n const presence = !isRSC && isAnimated ? usePresence() : null\n\n // set enter/exit variants onto our new props object\n if (isAnimated && presence) {\n const presenceState = presence[2]\n if (presenceState) {\n if (state.unmounted && presenceState.enterVariant) {\n props[presenceState.enterVariant] = true\n }\n if (!presenceState.isPresent && presenceState.exitVariant) {\n props[presenceState.exitVariant] = true\n }\n }\n }\n\n const isReactNative = Boolean(\n staticConfig.isReactNative || (isAnimated && tamaguiConfig.animations.isReactNative)\n )\n\n if (process.env.NODE_ENV === 'development') {\n if (debugProp) {\n // prettier-ignore\n const name = `${componentName || Component?.displayName || Component?.name || '[Unnamed Component]'}`\n const type = isReactNative ? '(rnw)' : ''\n const dataIs = propsIn['data-is'] || ''\n const banner = `${name}${dataIs ? ` ${dataIs}` : ''} ${type}`\n console.group(`%c ${banner}`, 'background: yellow;')\n if (!isServer) {\n console.log('state', state)\n }\n }\n }\n\n const shouldAvoidClasses =\n !isWeb ||\n !!(props.animation && avoidClassesWhileAnimating) ||\n !staticConfig.acceptsClassName\n const shouldForcePseudo = !!propsIn.forceStyle\n const noClassNames = shouldAvoidClasses || shouldForcePseudo\n\n const themeState = useThemeWithState({\n name: props.theme,\n componentName,\n reset: props.reset,\n inverse: props.themeInverse,\n // @ts-expect-error\n disable: props['data-themeable'],\n debug: props.debug,\n shouldUpdate: () => !!stateRef.current.didAccessThemeVariableValue,\n })!\n\n const hasTextAncestor = !!(isWeb && isText ? useContext(TextAncestorContext) : false)\n const languageContext = isRSC ? null : useContext(FontLanguageContext)\n const isDisabled = props.disabled ?? props.accessibilityState?.disabled\n\n const isTaggable = !Component || typeof Component === 'string'\n // default to tag, fallback to component (when both strings)\n const element = isWeb\n ? isTaggable\n ? props.tag || defaultTag || Component\n : Component\n : Component\n\n const BaseTextComponent = BaseText || element || 'span'\n const BaseViewComponent = BaseView || element || (hasTextAncestor ? 'span' : 'div')\n let elementType = isText\n ? (isAnimated ? AnimatedText : null) || BaseTextComponent\n : (isAnimated ? AnimatedView : null) || BaseViewComponent\n\n elementType = Component || elementType\n const isStringElement = typeof elementType === 'string'\n\n const isExiting = presence?.[0] === false\n\n const mediaState = useMedia(\n // @ts-ignore, we just pass a stable object so we can get it later with\n // should match to the one used in `setMediaShouldUpdate` below\n stateRef,\n debugProp ? { props, staticConfig } : null\n )\n\n setDidGetVariableValue(false)\n\n const splitStyles = useSplitStyles(\n props,\n staticConfig,\n themeState.theme,\n {\n ...state,\n mediaState,\n noClassNames,\n dynamicStylesInline: noClassNames,\n hasTextAncestor,\n resolveVariablesAs: 'auto',\n isExiting,\n },\n null,\n languageContext || undefined,\n elementType,\n debugProp\n )\n\n // only listen for changes if we are using raw theme values or media space, or dynamic media (native)\n // array = space media breakpoints\n const isMediaSpaced = Array.isArray(splitStyles.hasMedia)\n const shouldListenForMedia =\n didGetVariableValue() ||\n isMediaSpaced ||\n (noClassNames && splitStyles.hasMedia === true)\n\n setMediaShouldUpdate(stateRef, {\n enabled: shouldListenForMedia,\n keys: noClassNames && isMediaSpaced ? (splitStyles.hasMedia as any) : null,\n })\n\n const hostRef = useServerRef<TamaguiElement>(null)\n\n // animation setup\n const isAnimatedReactNativeWeb = isAnimated && avoidClassesWhileAnimating\n\n if (process.env.NODE_ENV === 'development') {\n if (!process.env.TAMAGUI_TARGET) {\n console.error(\n `No process.env.TAMAGUI_TARGET set, please set it to \"native\" or \"web\".`\n )\n }\n\n if (debugProp) {\n console.groupCollapsed('props')\n // prettier-ignore\n console.log('props in', propsIn, 'mapped to', props, 'in order', Object.keys(props))\n console.log('splitStyles', splitStyles)\n // eslint-disable-next-line no-console\n console.log('shouldListenForMedia', shouldListenForMedia)\n // eslint-disable-next-line no-console\n console.log('className', Object.values(splitStyles.classNames))\n if (isClient) {\n console.log('ref', hostRef, '(click to view)')\n }\n console.groupEnd()\n if (debugProp === 'break') {\n // rome-ignore lint/suspicious/noDebugger: ok\n debugger\n }\n }\n }\n\n const {\n viewProps: viewPropsIn,\n pseudos,\n style: splitStylesStyle,\n classNames,\n space,\n } = splitStyles\n\n const propsWithAnimation = props as UseAnimationProps\n\n // once you set animation prop don't remove it, you can set to undefined/false\n // reason is animations are heavy - no way around it, and must be run inline here (\uD83D\uDE45 loading as a sub-component)\n let animationStyles: any\n if (!isRSC && isAnimated && useAnimations) {\n const animations = useAnimations({\n props: propsWithAnimation,\n style: splitStylesStyle,\n presence,\n state,\n pseudos: pseudos || null,\n onDidAnimate: props.onDidAnimate,\n hostRef,\n staticConfig,\n })\n if (animations) {\n animationStyles = animations.style\n }\n }\n\n const {\n hitSlop,\n asChild,\n children,\n onPress,\n onPressIn,\n onPressOut,\n onHoverIn,\n onHoverOut,\n themeShallow,\n spaceDirection: _spaceDirection,\n disabled: disabledProp,\n onMouseUp,\n onMouseDown,\n onMouseEnter,\n onMouseLeave,\n hrefAttrs,\n separator,\n // ignore from here on out\n forceStyle: _forceStyle,\n // @ts-ignore for next/link compat etc\n onClick,\n theme: _themeProp,\n // @ts-ignore\n defaultVariants,\n\n ...nonTamaguiProps\n } = viewPropsIn\n\n const disabled =\n (props.accessibilityState != null && props.accessibilityState.disabled === true) ||\n props.accessibilityDisabled\n\n // these can ultimately be for DOM, react-native-web views, or animated views\n // so the type is pretty loose\n let viewProps: Record<string, any>\n\n // if react-native-web view just pass all props down\n if (process.env.TAMAGUI_TARGET === 'web' && !isReactNative) {\n // otherwise replicate react-native-web functionality\n const {\n // event props\n onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture,\n onResponderEnd,\n onResponderGrant,\n onResponderMove,\n onResponderReject,\n onResponderRelease,\n onResponderStart,\n onResponderTerminate,\n onResponderTerminationRequest,\n onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture,\n onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder,\n onStartShouldSetResponderCapture,\n\n // android\n collapsable,\n focusable,\n\n // deprecated,\n accessible,\n accessibilityDisabled,\n\n onLayout,\n\n ...webProps\n } = nonTamaguiProps\n\n viewProps = webProps\n\n if (!isRSC) {\n usePlatformMethods(hostRef as RefObject<Element>)\n\n useElementLayout(hostRef as RefObject<Element>, onLayout as any)\n\n useResponderEvents(hostRef, {\n onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture,\n onResponderEnd,\n onResponderGrant,\n onResponderMove,\n onResponderReject,\n onResponderRelease,\n onResponderStart,\n onResponderTerminate,\n onResponderTerminationRequest,\n onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture,\n onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder,\n onStartShouldSetResponderCapture,\n } as any)\n }\n\n if (props.href !== undefined && hrefAttrs !== undefined) {\n const { download, rel, target } = hrefAttrs\n if (download != null) {\n viewProps.download = download\n }\n if (rel != null) {\n viewProps.rel = rel\n }\n if (typeof target === 'string') {\n viewProps.target = target.charAt(0) !== '_' ? `_${target}` : target\n }\n }\n\n // FOCUS\n // \"focusable\" indicates that an element may be a keyboard tab-stop.\n const _focusable = focusable !== undefined ? focusable : accessible\n const role = viewProps.role\n if (_focusable === false) {\n viewProps.tabIndex = '-1'\n }\n if (\n // These native elements are focusable by default\n elementType === 'a' ||\n elementType === 'button' ||\n elementType === 'input' ||\n elementType === 'select' ||\n elementType === 'textarea'\n ) {\n if (_focusable === false || accessibilityDisabled === true) {\n viewProps.tabIndex = '-1'\n }\n } else if (\n // These roles are made focusable by default\n role === 'button' ||\n role === 'checkbox' ||\n role === 'link' ||\n role === 'radio' ||\n role === 'textbox' ||\n role === 'switch'\n ) {\n if (_focusable !== false) {\n viewProps.tabIndex = '0'\n }\n }\n // Everything else must explicitly set the prop\n if (_focusable === true) {\n viewProps.tabIndex = '0'\n }\n } else {\n viewProps = nonTamaguiProps\n }\n\n viewProps.ref = useComposedRefs(hostRef as any, forwardedRef)\n\n if (process.env.NODE_ENV === 'development' && !isText && isWeb) {\n Children.toArray(props.children).forEach((item) => {\n // allow newlines because why not its annoying with mdx\n if (typeof item === 'string' && item !== '\\n') {\n console.error(\n `Unexpected text node: ${item}. A text node cannot be a child of a <View>.`\n )\n }\n })\n }\n\n const unPress = useCallback(() => {\n setStateShallow({\n press: false,\n pressIn: false,\n })\n }, [setStateShallow])\n\n if (isWeb) {\n useEffect(() => {\n return () => {\n mouseUps.delete(unPress)\n }\n }, [])\n }\n\n const shouldSetMounted = needsMount && state.unmounted\n useEffect(() => {\n if (!shouldSetMounted) return\n if (state.unmounted === true && needsMount) {\n setStateShallow({\n unmounted: false,\n })\n return\n }\n\n setStateShallow({\n unmounted: false,\n })\n }, [shouldSetMounted, state.unmounted])\n\n let styles: Record<string, any>[]\n\n if (isStringElement && shouldAvoidClasses && !shouldForcePseudo) {\n styles = {\n ...(animationStyles ?? splitStylesStyle),\n }\n } else {\n styles = [animationStyles ?? splitStylesStyle]\n\n // ugly but for now...\n if (shouldForcePseudo) {\n const next = {}\n styles.forEach((style) => Object.assign(next, style))\n // @ts-ignore\n Object.assign(splitStyles.style, next)\n }\n }\n\n let fontFamily = isText\n ? splitStyles.fontFamily || staticConfig.defaultProps.fontFamily\n : null\n if (fontFamily && fontFamily[0] === '$') {\n fontFamily = fontFamily.slice(1)\n }\n const fontFamilyClassName = fontFamily ? `font_${fontFamily}` : ''\n\n const classList = [\n hasEnterStyle && ((state.unmounted && needsMount) || !isClient)\n ? 't_will-mount'\n : '',\n componentName ? componentClassName : '',\n fontFamilyClassName,\n classNames ? Object.values(classNames).join(' ') : '',\n ]\n\n const className = classList.join(' ')\n\n if (process.env.TAMAGUI_TARGET === 'web') {\n const style = animationStyles ?? splitStyles.style\n\n if (isAnimatedReactNativeWeb) {\n viewProps.style = style\n } else if (isReactNative) {\n const rnwStyle = { $$css: true }\n for (const name of className.split(' ')) {\n rnwStyle[name] = name\n }\n viewProps.style = [rnwStyle, ...(Array.isArray(style) ? style : [style])]\n\n if (process.env.NODE_ENV === 'development') {\n // turn debug data- props into dataSet in dev mode\n Object.keys(viewProps).forEach((key) => {\n if (key.startsWith('data-')) {\n viewProps.dataSet ??= {}\n viewProps.dataSet[key.replace('data-', '')] = viewProps[key]\n delete viewProps[key]\n }\n })\n }\n } else {\n viewProps.className = className\n viewProps.style = style\n }\n }\n\n if (process.env.TAMAGUI_TARGET === 'native') {\n // swap out the right family based on weight/style\n if (splitStyles.fontFamily) {\n const faceInfo = tamaguiConfig.fontsParsed[splitStyles.fontFamily]?.face\n if (faceInfo) {\n const [weight, style] = (() => {\n let weight: string | undefined\n let style: string | undefined\n for (let i = styles.length; i >= 0; i--) {\n weight ??= styles[i]?.fontWeight\n style ??= styles[i]?.fontStyle\n }\n return [weight || '400', style || 'normal'] as const\n })()\n const overrideFace = faceInfo[weight]?.[style]?.val\n if (overrideFace) {\n for (const style of styles) {\n if (style?.fontFamily) {\n style.fontFamily = overrideFace\n style.fontWeight = undefined\n style.fontStyle = undefined\n }\n }\n }\n }\n }\n\n // assign styles\n viewProps.style = styles\n }\n\n const runtimePressStyle = !disabled && noClassNames && pseudos?.pressStyle\n const attachPress = Boolean(\n runtimePressStyle || onPress || onPressOut || onPressIn || onClick\n )\n const runtimeHoverStyle = !disabled && noClassNames && pseudos?.hoverStyle\n const isHoverable =\n isWeb &&\n !!(runtimeHoverStyle || onHoverIn || onHoverOut || onMouseEnter || onMouseLeave)\n\n const handlesPressEvents = !(isWeb || asChild)\n\n // check presence rather than value to prevent reparenting bugs\n // allows for onPress={x ? function : undefined} without re-ordering dom\n const shouldAttach = Boolean(\n attachPress ||\n isHoverable ||\n (noClassNames && 'pressStyle' in props) ||\n (isWeb && noClassNames && 'hoverStyle' in props)\n )\n\n const events =\n shouldAttach && !isRSC && !isDisabled && !asChild\n ? {\n onPressOut: attachPress\n ? (e) => {\n unPress()\n onPressOut?.(e)\n onMouseUp?.(e)\n }\n : undefined,\n ...(isHoverable && {\n onMouseEnter: isHoverable\n ? (e) => {\n const next: Partial<typeof state> = {}\n if (isHoverable) {\n next.hover = true\n }\n if (state.pressIn) {\n next.press = true\n }\n if (isHoverable || state.pressIn) {\n setStateShallow(next)\n }\n onHoverIn?.(e)\n onMouseEnter?.(e)\n }\n : undefined,\n onMouseLeave: isHoverable\n ? (e) => {\n const next: Partial<typeof state> = {}\n mouseUps.add(unPress)\n if (isHoverable) {\n next.hover = false\n }\n if (state.pressIn) {\n next.press = false\n next.pressIn = false\n }\n if (Object.keys(next).length) {\n setStateShallow(next)\n }\n onHoverOut?.(e)\n onMouseLeave?.(e)\n }\n : undefined,\n }),\n onPressIn: attachPress\n ? (e) => {\n setStateShallow({\n press: true,\n pressIn: true,\n hover: false,\n })\n onPressIn?.(e)\n onMouseDown?.(e)\n if (isWeb) {\n mouseUps.add(unPress)\n }\n }\n : undefined,\n onPress: attachPress\n ? (e) => {\n unPress()\n // @ts-ignore\n onClick?.(e)\n onPress?.(e)\n }\n : undefined,\n\n // replicating TouchableWithoutFeedback\n ...(!isWeb && {\n cancelable: !props.rejectResponderTermination,\n disabled: isDisabled,\n hitSlop: props.hitSlop,\n delayLongPress: props.delayLongPress,\n delayPressIn: props.delayPressIn,\n delayPressOut: props.delayPressOut,\n focusable: viewProps.focusable ?? true,\n minPressDuration: 0,\n }),\n }\n : null\n\n // EVENTS native\n if (process.env.TAMAGUI_TARGET === 'native') {\n // add focus events\n const attachFocus = !!pseudos?.focusStyle\n if (attachFocus) {\n viewProps.onFocus = mergeEvent(viewProps.onFocus, () => {\n setStateShallow({ focus: true })\n })\n viewProps.onBlur = mergeEvent(viewProps.onBlur, () => {\n setStateShallow({ focus: false })\n })\n }\n\n // use Pressability to get smooth unPress when you press + hold + move out\n // only ever create once, use .configure() to update later\n const pressability = usePressability(events ? { ...events, hitSlop } : {})\n if (attachPress && events) {\n for (const key in pressability) {\n const og = props[key]\n const val = pressability[key]\n viewProps[key] =\n og && !dontComposePressabilityKeys[key] ? composeEventHandlers(og, val) : val\n }\n }\n }\n\n const shouldReset = !!(themeShallow && themeState.isNewTheme)\n if (shouldReset) {\n stateRef.current.themeShallow = true\n }\n\n let content =\n !children || asChild\n ? children\n : spacedChildren({\n separator,\n children,\n space,\n direction: props.spaceDirection || 'both',\n isZStack,\n debug: debugProp,\n })\n\n if (asChild) {\n elementType = Slot\n viewProps = {\n ...viewProps,\n onPress,\n onPressIn,\n onPressOut,\n }\n }\n\n content = createElement(elementType, viewProps, content)\n\n content = useThemedChildren(themeState, content, {\n shallow: stateRef.current.themeShallow,\n })\n\n if (process.env.TAMAGUI_TARGET === 'web') {\n if (events || isAnimatedReactNativeWeb) {\n content = (\n <span\n className={`${isAnimatedReactNativeWeb ? className : ''} _dsp_contents`}\n {...(events && {\n onMouseEnter: events.onMouseEnter,\n onMouseLeave: events.onMouseLeave,\n onClick: events.onPress,\n onMouseDown: events.onPressIn,\n onMouseUp: events.onPressOut,\n onTouchStart: events.onPressIn,\n onTouchEnd: events.onPressOut,\n })}\n >\n {content}\n </span>\n )\n }\n }\n\n if (process.env.NODE_ENV === 'development' && process.env.DEBUG !== 'tamagui') {\n if (debugProp) {\n const element = typeof elementType === 'string' ? elementType : 'Component'\n console.groupCollapsed(`render <${element} /> with props`, viewProps)\n for (const key in viewProps) {\n console.log(key, viewProps[key])\n }\n console.log('children', content)\n console.groupEnd()\n if (typeof window !== 'undefined') {\n // prettier-ignore\n console.log({ state, themeState, isAnimated, isAnimatedReactNativeWeb, tamaguiDefaultProps, viewProps, splitStyles, animationStyles, handlesPressEvents, isStringElement, classNamesIn: props.className?.split(' '), classNamesOut: viewProps.className?.split(' '), events, shouldAttach, styles, pseudos, content, shouldAvoidClasses, avoidClasses: avoidClassesWhileAnimating, animation: props.animation, style: splitStylesStyle, staticConfig, tamaguiConfig, shouldForcePseudo, classNamesFull: Object.fromEntries(Object.entries(classNames).map(([k, v]) => [v, getAllSelectors()[v]])) })\n }\n console.groupEnd()\n }\n }\n\n return content\n })\n\n if (staticConfig.componentName) {\n component.displayName = staticConfig.componentName\n }\n\n onConfiguredOnce((conf) => {\n // one time only setup\n if (!tamaguiConfig) {\n tamaguiConfig = conf\n\n if (tamaguiConfig.animations) {\n AnimatedText = tamaguiConfig.animations.Text\n AnimatedView = tamaguiConfig.animations.View\n }\n\n if (!initialTheme) {\n const next = conf.themes[Object.keys(conf.themes)[0]]\n initialTheme = proxyThemeVariables(next)\n if (process.env.NODE_ENV === 'development') {\n if (!initialTheme) {\n console.log('Warning: Missing theme')\n }\n }\n }\n }\n\n // per-component setup\n // do this to make sure shorthands don't duplicate with.. longhands\n mergeShorthands(staticConfig, tamaguiConfig)\n\n let defaultPropsIn = staticConfig.defaultProps || {}\n\n // because we run createTamagui after styled() defs, have to do some work here\n // gather defaults props one time and merge downwards\n // find last unprocessed and process\n const parentNames = [...(staticConfig.parentNames || []), staticConfig.componentName]\n\n if (tamaguiConfig.defaultProps && parentNames && staticConfig.componentName) {\n defaultPropsIn = mergeConfigDefaultProps(\n staticConfig.componentName,\n defaultPropsIn,\n tamaguiConfig.defaultProps,\n parentNames,\n tamaguiConfig\n )\n }\n\n const debug = defaultPropsIn['debug']\n\n // remove all classNames\n const [ourProps, ourClassNames] = mergeProps(defaultPropsIn, {})\n\n if (ourProps.tag) {\n defaultTag = ourProps.tag\n }\n\n const noClassNames = !staticConfig.acceptsClassName\n const { name, variants, defaultVariants, ...restProps } = ourProps\n\n // must preserve prop order\n // leave out className because we handle that already with initialSplitStyles.classNames\n // otherwise it confuses variant functions getting className props\n const [defaults, defaultsClassnames] = mergeProps(component.defaultProps as any, {\n ...defaultVariants,\n ...restProps,\n })\n\n // split - keep variables on props to be processed using theme values at runtime (native)\n if (!isWeb) {\n for (const key in staticConfig.defaultProps) {\n const val = staticConfig.defaultProps[key]\n if (validPseudoKeys[key]) continue\n defaults[key] = val\n }\n }\n\n // set to global\n tamaguiDefaultProps = defaults\n\n // add debug logs\n if (process.env.NODE_ENV === 'development' && debug) {\n if (process.env.IS_STATIC !== 'is_static') {\n console.log(`\uD83D\uDC1B [${staticConfig.componentName || 'Component'}]`, {\n staticConfig,\n tamaguiDefaultProps,\n defaults,\n defaultPropsIn,\n defaultPropsKeyOrder: Object.keys(staticConfig.defaultProps),\n defaultPropsInKeyOrder: Object.keys(defaultPropsIn).map((k) => [\n k,\n defaultPropsIn[k],\n ]),\n ourProps,\n ourClassNames,\n defaultsClassnames,\n defaultTag,\n noClassNames,\n })\n }\n }\n })\n\n let res: TamaguiComponent<ComponentPropTypes, Ref, BaseProps> = component as any\n\n if (configIn.memo) {\n res = memo(res) as any\n }\n\n res.staticConfig = {\n validStyles: staticConfig.validStyles || stylePropsView,\n ...staticConfig,\n }\n\n // res.extractable HoC\n res.extractable = (Component: any, conf?: Partial<StaticConfig>) => {\n Component.staticConfig = extendStaticConfig(\n {\n Component,\n ...conf,\n neverFlatten: true,\n defaultProps: {\n ...Component.defaultProps,\n ...conf?.defaultProps,\n },\n },\n res\n )\n return Component\n }\n\n return res\n}\n\n// for elements to avoid spacing\nexport const Unspaced = (props: { children?: any }) => {\n return props.children\n}\nUnspaced['isUnspaced'] = true\n\n// dont used styled() here to avoid circular deps\n// keep inline to avoid circular deps\n\nexport const Spacer = createComponent<SpacerProps>({\n acceptsClassName: true,\n memo: true,\n componentName: 'Spacer',\n validStyles,\n\n defaultProps: {\n ...stackDefaultStyles,\n // avoid nesting issues\n tag: 'span',\n size: true,\n pointerEvents: 'none',\n },\n\n variants: {\n size: {\n '...size': (size, { tokens }) => {\n size = size === true ? '$true' : size\n const sizePx = tokens.space[size] ?? size\n return {\n width: sizePx,\n height: sizePx,\n minWidth: sizePx,\n minHeight: sizePx,\n }\n },\n },\n\n flex: {\n true: {\n flexGrow: 1,\n },\n },\n\n direction: {\n horizontal: {\n height: 0,\n minHeight: 0,\n },\n vertical: {\n width: 0,\n minWidth: 0,\n },\n both: {},\n },\n } as const,\n})\n\nexport type SpacedChildrenProps = {\n isZStack?: boolean\n children?: React.ReactNode\n space?: SpaceTokens | number | null\n spaceFlex?: boolean | number\n direction?: SpaceDirection\n separator?: React.ReactNode\n debug?: DebugProp\n}\n\nexport function spacedChildren(props: SpacedChildrenProps) {\n const { isZStack, children, space, direction, spaceFlex, separator } = props\n const hasSpace = !!(space || spaceFlex)\n const hasSeparator = !(separator === undefined || separator === null)\n if (!(hasSpace || hasSeparator || isZStack)) {\n return children\n }\n\n const childrenList = Children.toArray(children)\n\n const len = childrenList.length\n if (len <= 1 && !isZStack && !childrenList[0]?.['type']?.['shouldForwardSpace']) {\n return childrenList\n }\n\n const final: React.ReactNode[] = []\n for (let [index, child] of childrenList.entries()) {\n const isEmpty =\n child === null ||\n child === undefined ||\n (Array.isArray(child) && child.length === 0)\n\n // forward space\n if (!isEmpty && React.isValidElement(child) && child.type?.['shouldForwardSpace']) {\n child = React.cloneElement(child, {\n space,\n spaceFlex,\n separator,\n key: child.key,\n } as any)\n }\n\n // push them all, but wrap some in Fragment\n if (isEmpty || !child || (child['key'] && !isZStack)) {\n final.push(child)\n } else {\n final.push(\n <Fragment key={index}>\n {isZStack ? <AbsoluteFill>{child}</AbsoluteFill> : child}\n </Fragment>\n )\n }\n\n // first child unspaced avoid insert space\n if (isUnspaced(child) && index === 0) continue\n // no spacing on ZStack\n if (isZStack) continue\n\n const next = childrenList[index + 1]\n\n if (next && !isUnspaced(next)) {\n if (separator) {\n if (hasSpace) {\n final.push(\n createSpacer({\n key: `_${index}_00tmgui`,\n direction,\n space,\n spaceFlex,\n })\n )\n }\n final.push(\n React.isValidElement(separator)\n ? React.cloneElement(separator, { key: `sep_${index}` })\n : separator\n )\n if (hasSpace) {\n final.push(\n createSpacer({\n key: `_${index}01tmgui`,\n direction,\n space,\n spaceFlex,\n })\n )\n }\n } else {\n final.push(\n createSpacer({\n key: `_${index}02tmgui`,\n direction,\n space,\n spaceFlex,\n })\n )\n }\n }\n }\n\n if (process.env.NODE_ENV === 'development') {\n if (props.debug) {\n console.log(` Spaced children`, final, props)\n }\n }\n\n return final\n}\n\ntype CreateSpacerProps = SpacedChildrenProps & { key: string }\n\nfunction createSpacer({ key, direction, space, spaceFlex }: CreateSpacerProps) {\n return (\n // @ts-ignore this one blew up but the types seem better\n <Spacer\n key={key}\n size={space}\n direction={direction}\n {...(typeof spaceFlex !== 'undefined' && {\n flex: spaceFlex === true ? 1 : spaceFlex === false ? 0 : spaceFlex,\n })}\n />\n )\n}\n\nfunction isUnspaced(child: React.ReactNode) {\n // console.log('unspaced?', child, getMedia())\n return child?.['type']?.['isVisuallyHidden'] || child?.['type']?.['isUnspaced']\n}\n\nconst DefaultProps = new Map()\n\nfunction mergeConfigDefaultProps(\n name: string,\n props: Record<string, any>,\n configDefaults: Record<string, Object>,\n parentNames: (string | undefined)[],\n conf: TamaguiInternalConfig\n) {\n const len = parentNames.length\n let prev\n\n for (let i = 0; i < len; i++) {\n const n = parentNames[i]\n if (!n) continue\n if (DefaultProps.has(n)) {\n prev = DefaultProps.get(n)\n continue\n }\n const props = configDefaults[n]\n if (!props) {\n if (prev) {\n DefaultProps.set(n, prev)\n }\n continue\n }\n prev = mergeProps(prev || {}, props, false, conf.inverseShorthands)[0]\n DefaultProps.set(n, prev)\n }\n\n // overwrite the user defined defaults on top of internal defined defaults\n const ourDefaultsMerged = DefaultProps.get(name)\n if (ourDefaultsMerged) {\n return mergeProps(props, ourDefaultsMerged, false, conf.inverseShorthands)[0]\n }\n return props\n}\n\n// react native compat (web only)\nfunction usePlatformMethods(hostRef: RefObject<Element>) {\n useIsomorphicLayoutEffect(() => {\n const node = hostRef.current\n if (!node) return\n // @ts-ignore\n node.measure = (callback) => measureLayout(node, null, callback)\n // @ts-ignore\n node.measureLayout = (relativeToNode, success) =>\n measureLayout(node as HTMLElement, relativeToNode, success)\n // @ts-ignore\n node.measureInWindow = (callback) => {\n if (!node) return\n setTimeout(() => {\n const { height, left, top, width } = getRect(node as HTMLElement)!\n callback(left, top, width, height)\n }, 0)\n }\n }, [hostRef])\n}\n\nconst AbsoluteFill: any = createComponent({\n componentName: 'AbsoluteFill',\n defaultProps: {\n ...stackDefaultStyles,\n flexDirection: 'column',\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n pointerEvents: 'box-none',\n },\n})\n\nconst dontComposePressabilityKeys = {\n onClick: true,\n}\n"],
5
- "mappings": "AAu1BU;AAv1BV,SAAS,uBAAuB;AAChC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,0BAA0B;AACnC,OAAO;AAAA,EACL;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,wBAAwB;AACjC,SAAS,0BAA0B;AACnC,SAAS,2BAA2B;AACpC,SAAS,2BAA2B;AACpC,SAAS,qBAAqB,8BAA8B;AAC5D,SAAS,oBAAoB,yBAAyB;AACtD,SAAS,eAAe;AACxB,SAAS,sBAAsB;AAC/B,SAAS,uBAAuB;AAChC,SAAS,kBAAkB;AAC3B,SAAS,2BAA2B;AACpC,SAAS,0BAA0B;AACnC,SAAS,eAAe,wBAAwB;AAChD,SAAS,sBAAsB,gBAAgB;AAC/C,SAAS,cAAc,sBAAsB;AAC7C,SAAS,yBAAyB;AAiBlC,SAAS,uBAAuB;AAChC,SAAS,MAAM,kBAAkB;AACjC,SAAS,yBAAyB;AAelC,QAAQ,IAAI;AAEL,MAAM,wBAA+C;AAAA,EAC1D,OAAO;AAAA,EACP,OAAO;AAAA,EACP,SAAS;AAAA,EACT,OAAO;AAAA,EACP,WAAW;AACb;AAEA,MAAM,+BAAsD;AAAA,EAC1D,GAAG;AAAA,EACH,WAAW;AACb;AAKA,IAAI;AACJ,IAAI;AACJ,IAAI;AACJ,IAAI;AAEG,MAAM,WAAW,oBAAI,IAAc;AAC1C,IAAI,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AI,IAAI;AAC/C,MAAI,mBAAmB;AACrB,WAAO,WAAW,OAAO,mBAAmB,OAAO,KAAK,iBAAiB,EAAE;AAAA,EAC7E;AACA,SAAO;AACT;AAGA,SAAS,mBAAmB,SAA6B;AACvD,4BAA0B,MAAM;AAC9B,UAAM,OAAO,QAAQ;AACrB,QAAI,CAAC;AAAM;AAEX,SAAK,UAAU,CAAC,aAAa,cAAc,MAAM,MAAM,QAAQ;AAE/D,SAAK,gBAAgB,CAAC,gBAAgB,YACpC,cAAc,MAAqB,gBAAgB,OAAO;AAE5D,SAAK,kBAAkB,CAAC,aAAa;AACnC,UAAI,CAAC;AAAM;AACX,iBAAW,MAAM;AACf,cAAM,EAAE,QAAQ,MAAM,KAAK,MAAM,IAAI,QAAQ,IAAmB;AAChE,iBAAS,MAAM,KAAK,OAAO,MAAM;AAAA,MACnC,GAAG,CAAC;AAAA,IACN;AAAA,EACF,GAAG,CAAC,OAAO,CAAC;AACd;AAEA,MAAM,eAAoB,gBAAgB;AAAA,EACxC,eAAe;AAAA,EACf,cAAc;AAAA,IACZ,GAAG;AAAA,IACH,eAAe;AAAA,IACf,UAAU;AAAA,IACV,KAAK;AAAA,IACL,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,eAAe;AAAA,EACjB;AACF,CAAC;AAED,MAAM,8BAA8B;AAAA,EAClC,SAAS;AACX;",
4
+ "sourcesContent": ["import { useComposedRefs } from '@tamagui/compose-refs'\nimport {\n isClient,\n isRSC,\n isServer,\n isWeb,\n useIsomorphicLayoutEffect,\n} from '@tamagui/constants'\nimport {\n composeEventHandlers,\n stylePropsView,\n validPseudoKeys,\n validStyles,\n} from '@tamagui/helpers'\nimport { useResponderEvents } from '@tamagui/react-native-use-responder-events'\nimport React, {\n Children,\n Fragment,\n RefObject,\n createElement,\n forwardRef,\n memo,\n useCallback,\n useContext,\n useEffect,\n useRef,\n} from 'react'\n\nimport { onConfiguredOnce } from './config'\nimport { stackDefaultStyles } from './constants/constants'\nimport { FontLanguageContext } from './contexts/FontLanguageContext'\nimport { TextAncestorContext } from './contexts/TextAncestorContext'\nimport { didGetVariableValue, setDidGetVariableValue } from './createVariable'\nimport { extendStaticConfig, parseStaticConfig } from './helpers/extendStaticConfig'\nimport { getRect } from './helpers/getRect'\nimport { useSplitStyles } from './helpers/getSplitStyles'\nimport { getAllSelectors } from './helpers/insertStyleRule'\nimport { mergeProps } from './helpers/mergeProps'\nimport { proxyThemeVariables } from './helpers/proxyThemeVariables'\nimport { useShallowSetState } from './helpers/useShallowSetState'\nimport { measureLayout, useElementLayout } from './hooks/useElementLayout'\nimport { setMediaShouldUpdate, useMedia } from './hooks/useMedia'\nimport { useServerRef, useServerState } from './hooks/useServerHooks'\nimport { useThemeWithState } from './hooks/useTheme'\nimport {\n DebugProp,\n SpaceDirection,\n SpaceTokens,\n SpacerProps,\n StaticConfig,\n StaticConfigParsed,\n StylableComponent,\n TamaguiComponent,\n TamaguiComponentState,\n TamaguiConfig,\n TamaguiElement,\n TamaguiInternalConfig,\n UseAnimationHook,\n UseAnimationProps,\n} from './types'\nimport { usePressability } from './vendor/Pressability'\nimport { Slot, mergeEvent } from './views/Slot'\nimport { useThemedChildren } from './views/Theme'\n\n// let t\n// import { timer } from '@tamagui/timer'\n// if (true || process.env.ANALYZE) {\n// t = require().timer()\n// setTimeout(() => {\n// const out = t.print()\n// if (isClient) {\n// alert(out)\n// }\n// }, 2000)\n// }\n\n// this appears to fix expo / babel not picking this up sometimes? really odd\nprocess.env.TAMAGUI_TARGET\n\nexport const defaultComponentState: TamaguiComponentState = {\n hover: false,\n press: false,\n pressIn: false,\n focus: false,\n unmounted: true,\n}\n\nconst defaultComponentStateMounted: TamaguiComponentState = {\n ...defaultComponentState,\n unmounted: false,\n}\n\n/**\n * All things that need one-time setup after createTamagui is called\n */\nlet tamaguiConfig: TamaguiInternalConfig\nlet AnimatedText: any\nlet AnimatedView: any\nlet initialTheme: any\n\nexport const mouseUps = new Set<Function>()\nif (typeof document !== 'undefined') {\n const cancelTouches = () => {\n mouseUps.forEach((x) => x())\n mouseUps.clear()\n }\n addEventListener('mouseup', cancelTouches)\n addEventListener('touchend', cancelTouches)\n addEventListener('touchcancel', cancelTouches)\n}\n\n// mutates\nfunction mergeShorthands(\n { defaultProps }: StaticConfigParsed,\n { shorthands }: TamaguiConfig\n) {\n // they are defined in correct order already { ...parent, ...child }\n for (const key of Object.keys(defaultProps)) {\n defaultProps[shorthands[key] || key] = defaultProps[key]\n }\n}\n\n/**\n * Only on native do we need the actual underlying View/Text\n * On the web we avoid react-native altogether in core.\n */\nlet BaseText: any\nlet BaseView: any\nif (process.env.TAMAGUI_TARGET === 'native') {\n const native = require('react-native')\n BaseText = native.Text || native.default.Text\n BaseView = native.View || native.default.View\n}\n\nexport function createComponent<\n ComponentPropTypes extends Object = {},\n Ref = TamaguiElement,\n BaseProps = never\n>(\n configIn: Partial<StaticConfig> | StaticConfigParsed,\n ParentComponent?: StylableComponent\n) {\n const staticConfig = (() => {\n const next = extendStaticConfig(configIn, ParentComponent)\n if ('parsed' in next) {\n return next\n } else {\n return parseStaticConfig(next)\n }\n })()\n\n const defaultComponentClassName = `is_${staticConfig.componentName}`\n let tamaguiDefaultProps: any\n let defaultTag: string | undefined\n\n // see onConfiguredOnce below which attaches a name then to this component\n const component = forwardRef<Ref, ComponentPropTypes>((propsIn: any, forwardedRef) => {\n // test only\n if (process.env.NODE_ENV === 'test') {\n if (propsIn['data-test-renders']) {\n propsIn['data-test-renders']['current'] ??= 0\n propsIn['data-test-renders']['current'] += 1\n }\n }\n // const time = t.start({ quiet: true })\n\n // React inserts default props after your props for some reason...\n // order important so we do loops, you can't just spread because JS does weird things\n let props: any\n if (tamaguiDefaultProps && !propsIn.asChild) {\n props = mergeProps(tamaguiDefaultProps, propsIn)[0]\n } else {\n props = propsIn\n }\n\n const debugProp = props['debug'] as DebugProp\n const { Component, isText, isZStack } = staticConfig\n const componentName = props.componentName || staticConfig.componentName\n const componentClassName = props.asChild\n ? ''\n : props.componentName\n ? `is_${props.componentName}`\n : defaultComponentClassName\n\n /**\n * Component state for tracking animations, pseudos\n */\n const animationsConfig = tamaguiConfig.animations\n const useAnimations = animationsConfig?.useAnimations as UseAnimationHook | undefined\n const avoidClassesWhileAnimating = animationsConfig.isReactNative\n const hasEnterStyle = !!props.enterStyle\n const needsMount = Boolean(\n (isWeb ? isClient : true) && (hasEnterStyle || props.animation)\n )\n const states = useServerState<TamaguiComponentState>(\n needsMount ? defaultComponentState! : defaultComponentStateMounted!\n )\n\n const state = propsIn.forceStyle\n ? { ...states[0], [propsIn.forceStyle]: true }\n : states[0]\n const setState = states[1]\n const setStateShallow = useShallowSetState(setState, debugProp, componentName)\n\n // conditional but if ever true stays true\n // [animated, inversed]\n const stateRef = useRef(\n undefined as any as {\n hasAnimated?: boolean\n themeShallow?: boolean\n didAccessThemeVariableValue?: boolean\n }\n )\n stateRef.current ??= {}\n\n const isAnimated = (() => {\n const next = !!(useAnimations && props.animation)\n if (next && !stateRef.current.hasAnimated) {\n stateRef.current.hasAnimated = true\n }\n return next || stateRef.current.hasAnimated\n })()\n\n const usePresence = tamaguiConfig.animations?.usePresence\n const presence = !isRSC && isAnimated ? usePresence() : null\n\n // set enter/exit variants onto our new props object\n if (isAnimated && presence) {\n const presenceState = presence[2]\n if (presenceState) {\n if (state.unmounted && presenceState.enterVariant) {\n props[presenceState.enterVariant] = true\n }\n if (!presenceState.isPresent && presenceState.exitVariant) {\n props[presenceState.exitVariant] = true\n }\n }\n }\n\n const isReactNative = Boolean(\n staticConfig.isReactNative || (isAnimated && tamaguiConfig.animations.isReactNative)\n )\n\n if (process.env.NODE_ENV === 'development') {\n if (debugProp) {\n // prettier-ignore\n const name = `${componentName || Component?.displayName || Component?.name || '[Unnamed Component]'}`\n const type = isReactNative ? '(rnw)' : ''\n const dataIs = propsIn['data-is'] || ''\n const banner = `${name}${dataIs ? ` ${dataIs}` : ''} ${type}`\n console.group(`%c ${banner}`, 'background: yellow;')\n if (!isServer) {\n console.log('state', state)\n }\n }\n }\n\n const shouldAvoidClasses =\n !isWeb ||\n !!(props.animation && avoidClassesWhileAnimating) ||\n !staticConfig.acceptsClassName\n const shouldForcePseudo = !!propsIn.forceStyle\n const noClassNames = shouldAvoidClasses || shouldForcePseudo\n\n const themeState = useThemeWithState({\n name: props.theme,\n componentName,\n reset: props.reset,\n inverse: props.themeInverse,\n // @ts-expect-error\n disable: props['data-themeable'],\n debug: props.debug,\n shouldUpdate: () => !!stateRef.current.didAccessThemeVariableValue,\n })!\n\n const hasTextAncestor = !!(isWeb && isText ? useContext(TextAncestorContext) : false)\n const languageContext = isRSC ? null : useContext(FontLanguageContext)\n const isDisabled = props.disabled ?? props.accessibilityState?.disabled\n\n const isTaggable = !Component || typeof Component === 'string'\n // default to tag, fallback to component (when both strings)\n const element = isWeb\n ? isTaggable\n ? props.tag || defaultTag || Component\n : Component\n : Component\n\n const BaseTextComponent = BaseText || element || 'span'\n const BaseViewComponent = BaseView || element || (hasTextAncestor ? 'span' : 'div')\n let elementType = isText\n ? (isAnimated ? AnimatedText : null) || BaseTextComponent\n : (isAnimated ? AnimatedView : null) || BaseViewComponent\n\n elementType = Component || elementType\n const isStringElement = typeof elementType === 'string'\n\n const isExiting = presence?.[0] === false\n\n const mediaState = useMedia(\n // @ts-ignore, we just pass a stable object so we can get it later with\n // should match to the one used in `setMediaShouldUpdate` below\n stateRef,\n debugProp ? { props, staticConfig } : null\n )\n\n setDidGetVariableValue(false)\n\n const splitStyles = useSplitStyles(\n props,\n staticConfig,\n themeState.theme,\n {\n ...state,\n mediaState,\n noClassNames,\n dynamicStylesInline: noClassNames,\n hasTextAncestor,\n resolveVariablesAs: 'auto',\n isExiting,\n },\n null,\n languageContext || undefined,\n elementType,\n debugProp\n )\n\n // only listen for changes if we are using raw theme values or media space, or dynamic media (native)\n // array = space media breakpoints\n const isMediaSpaced = Array.isArray(splitStyles.hasMedia)\n const shouldListenForMedia =\n didGetVariableValue() ||\n isMediaSpaced ||\n (noClassNames && splitStyles.hasMedia === true)\n\n setMediaShouldUpdate(stateRef, {\n enabled: shouldListenForMedia,\n keys: noClassNames && isMediaSpaced ? (splitStyles.hasMedia as any) : null,\n })\n\n const hostRef = useServerRef<TamaguiElement>(null)\n\n // animation setup\n const isAnimatedReactNativeWeb = isAnimated && avoidClassesWhileAnimating\n\n if (process.env.NODE_ENV === 'development') {\n if (!process.env.TAMAGUI_TARGET) {\n console.error(\n `No process.env.TAMAGUI_TARGET set, please set it to \"native\" or \"web\".`\n )\n }\n\n if (debugProp) {\n console.groupCollapsed('props')\n // prettier-ignore\n console.log('props in', propsIn, 'mapped to', props, 'in order', Object.keys(props))\n console.log('splitStyles', splitStyles)\n // eslint-disable-next-line no-console\n console.log('shouldListenForMedia', shouldListenForMedia)\n // eslint-disable-next-line no-console\n console.log('className', Object.values(splitStyles.classNames))\n if (isClient) {\n console.log('ref', hostRef, '(click to view)')\n }\n console.groupEnd()\n if (debugProp === 'break') {\n // rome-ignore lint/suspicious/noDebugger: ok\n debugger\n }\n }\n }\n\n const {\n viewProps: viewPropsIn,\n pseudos,\n style: splitStylesStyle,\n classNames,\n space,\n } = splitStyles\n\n const propsWithAnimation = props as UseAnimationProps\n\n // once you set animation prop don't remove it, you can set to undefined/false\n // reason is animations are heavy - no way around it, and must be run inline here (\uD83D\uDE45 loading as a sub-component)\n let animationStyles: any\n if (!isRSC && isAnimated && useAnimations) {\n const animations = useAnimations({\n props: propsWithAnimation,\n style: splitStylesStyle,\n presence,\n state,\n pseudos: pseudos || null,\n onDidAnimate: props.onDidAnimate,\n hostRef,\n staticConfig,\n })\n if (animations) {\n animationStyles = animations.style\n }\n }\n\n const {\n hitSlop,\n asChild,\n children,\n onPress,\n onPressIn,\n onPressOut,\n onHoverIn,\n onHoverOut,\n themeShallow,\n spaceDirection: _spaceDirection,\n disabled: disabledProp,\n onMouseUp,\n onMouseDown,\n onMouseEnter,\n onMouseLeave,\n hrefAttrs,\n separator,\n // ignore from here on out\n forceStyle: _forceStyle,\n // @ts-ignore for next/link compat etc\n onClick,\n theme: _themeProp,\n // @ts-ignore\n defaultVariants,\n\n ...nonTamaguiProps\n } = viewPropsIn\n\n const disabled =\n (props.accessibilityState != null && props.accessibilityState.disabled === true) ||\n props.accessibilityDisabled\n\n // these can ultimately be for DOM, react-native-web views, or animated views\n // so the type is pretty loose\n let viewProps: Record<string, any>\n\n // if react-native-web view just pass all props down\n if (process.env.TAMAGUI_TARGET === 'web' && !isReactNative) {\n // otherwise replicate react-native-web functionality\n const {\n // event props\n onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture,\n onResponderEnd,\n onResponderGrant,\n onResponderMove,\n onResponderReject,\n onResponderRelease,\n onResponderStart,\n onResponderTerminate,\n onResponderTerminationRequest,\n onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture,\n onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder,\n onStartShouldSetResponderCapture,\n\n // android\n collapsable,\n focusable,\n\n // deprecated,\n accessible,\n accessibilityDisabled,\n\n onLayout,\n\n ...webProps\n } = nonTamaguiProps\n\n viewProps = webProps\n\n if (!isRSC) {\n usePlatformMethods(hostRef as RefObject<Element>)\n\n useElementLayout(hostRef as RefObject<Element>, onLayout as any)\n\n useResponderEvents(hostRef, {\n onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture,\n onResponderEnd,\n onResponderGrant,\n onResponderMove,\n onResponderReject,\n onResponderRelease,\n onResponderStart,\n onResponderTerminate,\n onResponderTerminationRequest,\n onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture,\n onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder,\n onStartShouldSetResponderCapture,\n } as any)\n }\n\n if (props.href !== undefined && hrefAttrs !== undefined) {\n const { download, rel, target } = hrefAttrs\n if (download != null) {\n viewProps.download = download\n }\n if (rel != null) {\n viewProps.rel = rel\n }\n if (typeof target === 'string') {\n viewProps.target = target.charAt(0) !== '_' ? `_${target}` : target\n }\n }\n\n // FOCUS\n // \"focusable\" indicates that an element may be a keyboard tab-stop.\n const _focusable = focusable !== undefined ? focusable : accessible\n const role = viewProps.role\n if (_focusable === false) {\n viewProps.tabIndex = '-1'\n }\n if (\n // These native elements are focusable by default\n elementType === 'a' ||\n elementType === 'button' ||\n elementType === 'input' ||\n elementType === 'select' ||\n elementType === 'textarea'\n ) {\n if (_focusable === false || accessibilityDisabled === true) {\n viewProps.tabIndex = '-1'\n }\n } else if (\n // These roles are made focusable by default\n role === 'button' ||\n role === 'checkbox' ||\n role === 'link' ||\n role === 'radio' ||\n role === 'textbox' ||\n role === 'switch'\n ) {\n if (_focusable !== false) {\n viewProps.tabIndex = '0'\n }\n }\n // Everything else must explicitly set the prop\n if (_focusable === true) {\n viewProps.tabIndex = '0'\n }\n } else {\n viewProps = nonTamaguiProps\n }\n\n viewProps.ref = useComposedRefs(hostRef as any, forwardedRef)\n\n if (process.env.NODE_ENV === 'development' && !isText && isWeb) {\n Children.toArray(props.children).forEach((item) => {\n // allow newlines because why not its annoying with mdx\n if (typeof item === 'string' && item !== '\\n') {\n console.error(\n `Unexpected text node: ${item}. A text node cannot be a child of a <View>.`\n )\n }\n })\n }\n\n const unPress = useCallback(() => {\n setStateShallow({\n press: false,\n pressIn: false,\n })\n }, [setStateShallow])\n\n if (isWeb) {\n useEffect(() => {\n return () => {\n mouseUps.delete(unPress)\n }\n }, [])\n }\n\n const shouldSetMounted = needsMount && state.unmounted\n useEffect(() => {\n if (!shouldSetMounted) return\n if (state.unmounted === true && needsMount) {\n setStateShallow({\n unmounted: false,\n })\n return\n }\n\n setStateShallow({\n unmounted: false,\n })\n }, [shouldSetMounted, state.unmounted])\n\n let styles: Record<string, any>[]\n\n if (isStringElement && shouldAvoidClasses && !shouldForcePseudo) {\n styles = {\n ...(animationStyles ?? splitStylesStyle),\n }\n } else {\n styles = [animationStyles ?? splitStylesStyle]\n\n // ugly but for now...\n if (shouldForcePseudo) {\n const next = {}\n styles.forEach((style) => Object.assign(next, style))\n // @ts-ignore\n Object.assign(splitStyles.style, next)\n }\n }\n\n let fontFamily = isText\n ? splitStyles.fontFamily || staticConfig.defaultProps.fontFamily\n : null\n if (fontFamily && fontFamily[0] === '$') {\n fontFamily = fontFamily.slice(1)\n }\n const fontFamilyClassName = fontFamily ? `font_${fontFamily}` : ''\n\n const classList = [\n hasEnterStyle && ((state.unmounted && needsMount) || !isClient)\n ? 't_will-mount'\n : '',\n componentName ? componentClassName : '',\n fontFamilyClassName,\n classNames ? Object.values(classNames).join(' ') : '',\n ]\n\n const className = classList.join(' ')\n\n if (process.env.TAMAGUI_TARGET === 'web') {\n const style = animationStyles ?? splitStyles.style\n\n if (isAnimatedReactNativeWeb) {\n viewProps.style = style\n } else if (isReactNative) {\n const rnwStyle = { $$css: true }\n for (const name of className.split(' ')) {\n rnwStyle[name] = name\n }\n viewProps.style = [rnwStyle, ...(Array.isArray(style) ? style : [style])]\n\n if (process.env.NODE_ENV === 'development') {\n // turn debug data- props into dataSet in dev mode\n Object.keys(viewProps).forEach((key) => {\n if (key.startsWith('data-')) {\n viewProps.dataSet ??= {}\n viewProps.dataSet[key.replace('data-', '')] = viewProps[key]\n delete viewProps[key]\n }\n })\n }\n } else {\n viewProps.className = className\n viewProps.style = style\n }\n }\n\n if (process.env.TAMAGUI_TARGET === 'native') {\n // swap out the right family based on weight/style\n if (splitStyles.fontFamily) {\n const faceInfo = tamaguiConfig.fontsParsed[splitStyles.fontFamily]?.face\n if (faceInfo) {\n const [weight, style] = (() => {\n let weight: string | undefined\n let style: string | undefined\n for (let i = styles.length; i >= 0; i--) {\n weight ??= styles[i]?.fontWeight\n style ??= styles[i]?.fontStyle\n }\n return [weight || '400', style || 'normal'] as const\n })()\n const overrideFace = faceInfo[weight]?.[style]?.val\n if (overrideFace) {\n for (const style of styles) {\n if (style?.fontFamily) {\n style.fontFamily = overrideFace\n style.fontWeight = undefined\n style.fontStyle = undefined\n }\n }\n }\n }\n }\n\n // assign styles\n viewProps.style = styles\n }\n\n const runtimePressStyle = !disabled && noClassNames && pseudos?.pressStyle\n const attachPress = Boolean(\n runtimePressStyle || onPress || onPressOut || onPressIn || onClick\n )\n const runtimeHoverStyle = !disabled && noClassNames && pseudos?.hoverStyle\n const isHoverable =\n isWeb &&\n !!(runtimeHoverStyle || onHoverIn || onHoverOut || onMouseEnter || onMouseLeave)\n\n const handlesPressEvents = !(isWeb || asChild)\n\n // check presence rather than value to prevent reparenting bugs\n // allows for onPress={x ? function : undefined} without re-ordering dom\n const shouldAttach = Boolean(\n attachPress ||\n isHoverable ||\n (noClassNames && 'pressStyle' in props) ||\n (isWeb && noClassNames && 'hoverStyle' in props)\n )\n\n const events =\n shouldAttach && !isRSC && !isDisabled && !asChild\n ? {\n onPressOut: attachPress\n ? (e) => {\n unPress()\n onPressOut?.(e)\n onMouseUp?.(e)\n }\n : undefined,\n ...(isHoverable && {\n onMouseEnter: isHoverable\n ? (e) => {\n const next: Partial<typeof state> = {}\n if (isHoverable) {\n next.hover = true\n }\n if (state.pressIn) {\n next.press = true\n }\n if (isHoverable || state.pressIn) {\n setStateShallow(next)\n }\n onHoverIn?.(e)\n onMouseEnter?.(e)\n }\n : undefined,\n onMouseLeave: isHoverable\n ? (e) => {\n const next: Partial<typeof state> = {}\n mouseUps.add(unPress)\n if (isHoverable) {\n next.hover = false\n }\n if (state.pressIn) {\n next.press = false\n next.pressIn = false\n }\n if (Object.keys(next).length) {\n setStateShallow(next)\n }\n onHoverOut?.(e)\n onMouseLeave?.(e)\n }\n : undefined,\n }),\n onPressIn: attachPress\n ? (e) => {\n setStateShallow({\n press: true,\n pressIn: true,\n hover: false,\n })\n onPressIn?.(e)\n onMouseDown?.(e)\n if (isWeb) {\n mouseUps.add(unPress)\n }\n }\n : undefined,\n onPress: attachPress\n ? (e) => {\n unPress()\n // @ts-ignore\n onClick?.(e)\n onPress?.(e)\n }\n : undefined,\n\n // replicating TouchableWithoutFeedback\n ...(!isWeb && {\n cancelable: !props.rejectResponderTermination,\n disabled: isDisabled,\n hitSlop: props.hitSlop,\n delayLongPress: props.delayLongPress,\n delayPressIn: props.delayPressIn,\n delayPressOut: props.delayPressOut,\n focusable: viewProps.focusable ?? true,\n minPressDuration: 0,\n }),\n }\n : null\n\n // EVENTS native\n if (process.env.TAMAGUI_TARGET === 'native') {\n // add focus events\n const attachFocus = !!pseudos?.focusStyle\n if (attachFocus) {\n viewProps.onFocus = mergeEvent(viewProps.onFocus, () => {\n setStateShallow({ focus: true })\n })\n viewProps.onBlur = mergeEvent(viewProps.onBlur, () => {\n setStateShallow({ focus: false })\n })\n }\n\n // use Pressability to get smooth unPress when you press + hold + move out\n // only ever create once, use .configure() to update later\n const pressability = usePressability(events ? { ...events, hitSlop } : {})\n if (attachPress && events) {\n for (const key in pressability) {\n const og = props[key]\n const val = pressability[key]\n viewProps[key] =\n og && !dontComposePressabilityKeys[key] ? composeEventHandlers(og, val) : val\n }\n }\n }\n\n const shouldReset = !!(themeShallow && themeState.isNewTheme)\n if (shouldReset) {\n stateRef.current.themeShallow = true\n }\n\n let content =\n !children || asChild\n ? children\n : spacedChildren({\n separator,\n children,\n space,\n direction: props.spaceDirection || 'both',\n isZStack,\n debug: debugProp,\n })\n\n if (asChild) {\n elementType = Slot\n viewProps = {\n ...viewProps,\n onPress,\n onPressIn,\n onPressOut,\n }\n }\n\n content = createElement(elementType, viewProps, content)\n\n content = useThemedChildren(themeState, content, {\n shallow: stateRef.current.themeShallow,\n })\n\n if (process.env.TAMAGUI_TARGET === 'web') {\n if (events || isAnimatedReactNativeWeb) {\n content = (\n <span\n className={`${isAnimatedReactNativeWeb ? className : ''} _dsp_contents`}\n {...(events && {\n onMouseEnter: events.onMouseEnter,\n onMouseLeave: events.onMouseLeave,\n onClick: events.onPress,\n onMouseDown: events.onPressIn,\n onMouseUp: events.onPressOut,\n onTouchStart: events.onPressIn,\n onTouchEnd: events.onPressOut,\n })}\n >\n {content}\n </span>\n )\n }\n }\n\n if (process.env.NODE_ENV === 'development' && process.env.DEBUG !== 'tamagui') {\n if (debugProp) {\n const element = typeof elementType === 'string' ? elementType : 'Component'\n console.groupCollapsed(`render <${element} /> with props`, viewProps)\n for (const key in viewProps) {\n console.log(key, viewProps[key])\n }\n console.log('children', content)\n console.groupEnd()\n if (typeof window !== 'undefined') {\n // prettier-ignore\n console.log({ state, themeState, isAnimated, isAnimatedReactNativeWeb, tamaguiDefaultProps, viewProps, splitStyles, animationStyles, handlesPressEvents, isStringElement, classNamesIn: props.className?.split(' '), classNamesOut: viewProps.className?.split(' '), events, shouldAttach, styles, pseudos, content, shouldAvoidClasses, avoidClasses: avoidClassesWhileAnimating, animation: props.animation, style: splitStylesStyle, staticConfig, tamaguiConfig, shouldForcePseudo, classNamesFull: Object.fromEntries(Object.entries(classNames).map(([k, v]) => [v, getAllSelectors()[v]])) })\n }\n console.groupEnd()\n }\n }\n\n return content\n })\n\n if (staticConfig.componentName) {\n component.displayName = staticConfig.componentName\n }\n\n onConfiguredOnce((conf) => {\n // one time only setup\n if (!tamaguiConfig) {\n tamaguiConfig = conf\n\n if (tamaguiConfig.animations) {\n AnimatedText = tamaguiConfig.animations.Text\n AnimatedView = tamaguiConfig.animations.View\n }\n\n if (!initialTheme) {\n const next = conf.themes[Object.keys(conf.themes)[0]]\n initialTheme = proxyThemeVariables(next)\n if (process.env.NODE_ENV === 'development') {\n if (!initialTheme) {\n console.log('Warning: Missing theme')\n }\n }\n }\n }\n\n // per-component setup\n // do this to make sure shorthands don't duplicate with.. longhands\n mergeShorthands(staticConfig, tamaguiConfig)\n\n let defaultPropsIn = staticConfig.defaultProps || {}\n\n // because we run createTamagui after styled() defs, have to do some work here\n // gather defaults props one time and merge downwards\n // find last unprocessed and process\n const parentNames = [...(staticConfig.parentNames || []), staticConfig.componentName]\n\n if (tamaguiConfig.defaultProps && parentNames && staticConfig.componentName) {\n defaultPropsIn = mergeConfigDefaultProps(\n staticConfig.componentName,\n defaultPropsIn,\n tamaguiConfig.defaultProps,\n parentNames,\n tamaguiConfig\n )\n }\n\n const debug = defaultPropsIn['debug']\n\n // remove all classNames\n const [ourProps, ourClassNames] = mergeProps(defaultPropsIn, {})\n\n if (ourProps.tag) {\n defaultTag = ourProps.tag\n }\n\n const noClassNames = !staticConfig.acceptsClassName\n const { name, variants, defaultVariants, ...restProps } = ourProps\n\n // must preserve prop order\n // leave out className because we handle that already with initialSplitStyles.classNames\n // otherwise it confuses variant functions getting className props\n const [defaults, defaultsClassnames] = mergeProps(component.defaultProps as any, {\n ...defaultVariants,\n ...restProps,\n })\n\n // split - keep variables on props to be processed using theme values at runtime (native)\n if (!isWeb) {\n for (const key in staticConfig.defaultProps) {\n const val = staticConfig.defaultProps[key]\n if (validPseudoKeys[key]) continue\n defaults[key] = val\n }\n }\n\n // set to global\n tamaguiDefaultProps = defaults\n\n // add debug logs\n if (process.env.NODE_ENV === 'development' && debug) {\n if (process.env.IS_STATIC !== 'is_static') {\n console.log(`\uD83D\uDC1B [${staticConfig.componentName || 'Component'}]`, {\n staticConfig,\n tamaguiDefaultProps,\n defaults,\n defaultPropsIn,\n defaultPropsKeyOrder: Object.keys(staticConfig.defaultProps),\n defaultPropsInKeyOrder: Object.keys(defaultPropsIn).map((k) => [\n k,\n defaultPropsIn[k],\n ]),\n ourProps,\n ourClassNames,\n defaultsClassnames,\n defaultTag,\n noClassNames,\n })\n }\n }\n })\n\n let res: TamaguiComponent<ComponentPropTypes, Ref, BaseProps> = component as any\n\n if (configIn.memo) {\n res = memo(res) as any\n }\n\n res.staticConfig = {\n validStyles: staticConfig.validStyles || stylePropsView,\n ...staticConfig,\n }\n\n // res.extractable HoC\n res.extractable = (Component: any, conf?: Partial<StaticConfig>) => {\n Component.staticConfig = extendStaticConfig(\n {\n Component,\n ...conf,\n neverFlatten: true,\n defaultProps: {\n ...Component.defaultProps,\n ...conf?.defaultProps,\n },\n },\n res\n )\n return Component\n }\n\n return res\n}\n\n// for elements to avoid spacing\nexport const Unspaced = (props: { children?: any }) => {\n return props.children\n}\nUnspaced['isUnspaced'] = true\n\n// dont used styled() here to avoid circular deps\n// keep inline to avoid circular deps\n\nexport const Spacer = createComponent<SpacerProps>({\n acceptsClassName: true,\n memo: true,\n componentName: 'Spacer',\n validStyles,\n\n defaultProps: {\n ...stackDefaultStyles,\n // avoid nesting issues\n tag: 'span',\n size: true,\n pointerEvents: 'none',\n },\n\n variants: {\n size: {\n '...size': (size, { tokens }) => {\n size = size === true ? '$true' : size\n const sizePx = tokens.space[size] ?? size\n return {\n width: sizePx,\n height: sizePx,\n minWidth: sizePx,\n minHeight: sizePx,\n }\n },\n },\n\n flex: {\n true: {\n flexGrow: 1,\n },\n },\n\n direction: {\n horizontal: {\n height: 0,\n minHeight: 0,\n },\n vertical: {\n width: 0,\n minWidth: 0,\n },\n both: {},\n },\n } as const,\n})\n\nexport type SpacedChildrenProps = {\n isZStack?: boolean\n children?: React.ReactNode\n space?: SpaceTokens | number | null\n spaceFlex?: boolean | number\n direction?: SpaceDirection\n separator?: React.ReactNode\n debug?: DebugProp\n}\n\nexport function spacedChildren(props: SpacedChildrenProps) {\n const { isZStack, children, space, direction, spaceFlex, separator } = props\n const hasSpace = !!(space || spaceFlex)\n const hasSeparator = !(separator === undefined || separator === null)\n if (!(hasSpace || hasSeparator || isZStack)) {\n return children\n }\n\n const childrenList = Children.toArray(children)\n\n const len = childrenList.length\n if (len <= 1 && !isZStack && !childrenList[0]?.['type']?.['shouldForwardSpace']) {\n return childrenList\n }\n\n const final: React.ReactNode[] = []\n for (let [index, child] of childrenList.entries()) {\n const isEmpty =\n child === null ||\n child === undefined ||\n (Array.isArray(child) && child.length === 0)\n\n // forward space\n if (!isEmpty && React.isValidElement(child) && child.type?.['shouldForwardSpace']) {\n child = React.cloneElement(child, {\n space,\n spaceFlex,\n separator,\n key: child.key,\n } as any)\n }\n\n // push them all, but wrap some in Fragment\n if (isEmpty || !child || (child['key'] && !isZStack)) {\n final.push(child)\n } else {\n final.push(\n <Fragment key={index}>\n {isZStack ? <AbsoluteFill>{child}</AbsoluteFill> : child}\n </Fragment>\n )\n }\n\n // first child unspaced avoid insert space\n if (isUnspaced(child) && index === 0) continue\n // no spacing on ZStack\n if (isZStack) continue\n\n const next = childrenList[index + 1]\n\n if (next && !isUnspaced(next)) {\n if (separator) {\n if (hasSpace) {\n final.push(\n createSpacer({\n key: `_${index}_00tmgui`,\n direction,\n space,\n spaceFlex,\n })\n )\n }\n final.push(\n React.isValidElement(separator)\n ? React.cloneElement(separator, { key: `sep_${index}` })\n : separator\n )\n if (hasSpace) {\n final.push(\n createSpacer({\n key: `_${index}01tmgui`,\n direction,\n space,\n spaceFlex,\n })\n )\n }\n } else {\n final.push(\n createSpacer({\n key: `_${index}02tmgui`,\n direction,\n space,\n spaceFlex,\n })\n )\n }\n }\n }\n\n if (process.env.NODE_ENV === 'development') {\n if (props.debug) {\n console.log(` Spaced children`, final, props)\n }\n }\n\n return final\n}\n\ntype CreateSpacerProps = SpacedChildrenProps & { key: string }\n\nfunction createSpacer({ key, direction, space, spaceFlex }: CreateSpacerProps) {\n return (\n // @ts-ignore this one blew up but the types seem better\n <Spacer\n key={key}\n size={space}\n direction={direction}\n {...(typeof spaceFlex !== 'undefined' && {\n flex: spaceFlex === true ? 1 : spaceFlex === false ? 0 : spaceFlex,\n })}\n />\n )\n}\n\nfunction isUnspaced(child: React.ReactNode) {\n // console.log('unspaced?', child, getMedia())\n return child?.['type']?.['isVisuallyHidden'] || child?.['type']?.['isUnspaced']\n}\n\nconst DefaultProps = new Map()\n\nfunction mergeConfigDefaultProps(\n name: string,\n props: Record<string, any>,\n configDefaults: Record<string, Object>,\n parentNames: (string | undefined)[],\n conf: TamaguiInternalConfig\n) {\n const len = parentNames.length\n let prev\n\n for (let i = 0; i < len; i++) {\n const n = parentNames[i]\n if (!n) continue\n if (DefaultProps.has(n)) {\n prev = DefaultProps.get(n)\n continue\n }\n const props = configDefaults[n]\n if (!props) {\n if (prev) {\n DefaultProps.set(n, prev)\n }\n continue\n }\n prev = mergeProps(prev || {}, props, false, conf.inverseShorthands)[0]\n DefaultProps.set(n, prev)\n }\n\n // overwrite the user defined defaults on top of internal defined defaults\n const ourDefaultsMerged = DefaultProps.get(name)\n if (ourDefaultsMerged) {\n return mergeProps(props, ourDefaultsMerged, false, conf.inverseShorthands)[0]\n }\n return props\n}\n\n// react native compat (web only)\nfunction usePlatformMethods(hostRef: RefObject<Element>) {\n useIsomorphicLayoutEffect(() => {\n const node = hostRef.current\n if (!node) return\n // @ts-ignore\n node.measure = (callback) => measureLayout(node, null, callback)\n // @ts-ignore\n node.measureLayout = (relativeToNode, success) =>\n measureLayout(node as HTMLElement, relativeToNode, success)\n // @ts-ignore\n node.measureInWindow = (callback) => {\n if (!node) return\n setTimeout(() => {\n const { height, left, top, width } = getRect(node as HTMLElement)!\n callback(left, top, width, height)\n }, 0)\n }\n }, [hostRef])\n}\n\nconst AbsoluteFill: any = createComponent({\n componentName: 'AbsoluteFill',\n defaultProps: {\n ...stackDefaultStyles,\n flexDirection: 'column',\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n pointerEvents: 'box-none',\n },\n})\n\nconst dontComposePressabilityKeys = {\n onClick: true,\n}\n"],
5
+ "mappings": "AAu1BU;AAv1BV,SAAS,uBAAuB;AAChC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,0BAA0B;AACnC,OAAO;AAAA,EACL;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,wBAAwB;AACjC,SAAS,0BAA0B;AACnC,SAAS,2BAA2B;AACpC,SAAS,2BAA2B;AACpC,SAAS,qBAAqB,8BAA8B;AAC5D,SAAS,oBAAoB,yBAAyB;AACtD,SAAS,eAAe;AACxB,S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IACH,eAAe;AAAA,IACf,UAAU;AAAA,IACV,KAAK;AAAA,IACL,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,eAAe;AAAA,EACjB;AACF,CAAC;AAED,MAAM,8BAA8B;AAAA,EAClC,SAAS;AACX;",
6
6
  "names": ["_a", "_b", "weight", "style", "element", "props"]
7
7
  }
@@ -153,7 +153,9 @@ function createTamagui(configIn) {
153
153
  tokensParsed,
154
154
  parsed: true,
155
155
  getCSS: (separator = "\n") => {
156
- return `.t_unmounted .t_will-mount {opacity:0;visibility:hidden;}
156
+ return `
157
+ ._ovs-contain {overscroll-behavior:contain;}
158
+ .t_unmounted .t_will-mount {opacity:0;visibility:hidden;}
157
159
  .is_Text .is_Text {display:inline-flex;}
158
160
  ._dsp_contents {display:contents;}
159
161
  ${themeConfig.cssRuleSets.join(separator)}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/createTamagui.ts"],
4
- "sourcesContent": ["import { isRSC, isWeb } from '@tamagui/constants'\n\nimport { configListeners, setConfig } from './config'\nimport { createVariables, tokensKeysOrdered } from './createVariables'\nimport { getThemeCSSRules } from './helpers/getThemeCSSRules'\nimport {\n getAllRules,\n listenForSheetChanges,\n scanAllSheets,\n} from './helpers/insertStyleRule'\nimport {\n registerCSSVariable,\n tokensValueToVariable,\n variableToCSS,\n} from './helpers/registerCSSVariable'\nimport { ensureThemeVariable, proxyThemeToParents } from './helpers/themes'\nimport { configureMedia } from './hooks/useMedia'\nimport { parseFont, registerFontVariables } from './insertFont'\nimport { Tamagui } from './Tamagui'\nimport {\n CreateTamaguiProps,\n InferTamaguiConfig,\n TamaguiInternalConfig,\n ThemeParsed,\n} from './types'\n\n// config is re-run by the @tamagui/static, dont double validate\nconst createdConfigs = new WeakMap<any, boolean>()\n\nexport function createTamagui<Conf extends CreateTamaguiProps>(\n configIn: Conf\n): InferTamaguiConfig<Conf> {\n if (createdConfigs.has(configIn)) {\n return configIn as any\n }\n\n if (process.env.NODE_ENV === 'development') {\n if (!configIn.tokens) {\n throw new Error('Must define tokens')\n }\n if (!configIn.themes) {\n throw new Error('Must define themes')\n }\n if (!configIn.fonts) {\n throw new Error('Must define fonts')\n }\n }\n\n scanAllSheets()\n listenForSheetChanges()\n\n const fontTokens = Object.fromEntries(\n Object.entries(configIn.fonts!).map(([k, v]) => {\n return [k, createVariables(v, 'f', true)]\n })\n )\n\n const fontsParsed = (() => {\n const res = {} as typeof fontTokens\n for (const familyName in fontTokens) {\n res[`$${familyName}`] = parseFont(fontTokens[familyName])\n }\n return res!\n })()\n\n const themeConfig = (() => {\n const themes = { ...configIn.themes }\n const cssRuleSets: string[] = []\n\n if (isWeb) {\n const declarations: string[] = []\n const fontDeclarations: Record<\n string,\n { name: string; declarations: string[]; language?: string }\n > = {}\n\n for (const key in configIn.tokens) {\n for (const skey in configIn.tokens[key]) {\n const val = configIn.tokens[key][skey]\n registerCSSVariable(val)\n declarations.push(variableToCSS(val))\n }\n }\n\n for (const key in fontsParsed) {\n const fontParsed = fontsParsed[key]\n const [name, language] = key.includes('_') ? key.split('_') : [key]\n const fontVars = registerFontVariables(fontParsed)\n fontDeclarations[key] = {\n name: name.slice(1),\n declarations: fontVars,\n language,\n }\n }\n\n const sep =\n process.env.NODE_ENV === 'development' ? configIn.cssStyleSeparator || ' ' : ''\n\n function declarationsToRuleSet(decs: string[], selector = '') {\n return `:root${selector} {${sep}${[...decs].join(`;${sep}`)}${sep}}`\n }\n\n // non-font\n cssRuleSets.push(declarationsToRuleSet(declarations))\n\n // fonts\n if (fontDeclarations) {\n for (const key in fontDeclarations) {\n const { name, declarations, language = 'default' } = fontDeclarations[key]\n const fontSelector = `.font_${name}`\n const langSelector = `:root .t_lang-${name}-${language} ${fontSelector}`\n const selectors =\n language === 'default' ? ` ${fontSelector}, ${langSelector}` : langSelector\n const specificRuleSet = declarationsToRuleSet(declarations, selectors)\n cssRuleSets.push(specificRuleSet)\n }\n }\n }\n\n // dedupe themes to avoid duplicate CSS generation\n type DedupedTheme = {\n names: string[]\n theme: ThemeParsed\n }\n const dedupedThemes: {\n [key: string]: DedupedTheme\n } = {}\n const existing = new WeakMap<ThemeParsed, DedupedTheme>()\n\n // first, de-dupe and parse them\n for (const themeName in themes) {\n const rawTheme = themes[themeName] as ThemeParsed\n\n // if existing, avoid\n if (existing.has(rawTheme)) {\n const e = existing.get(rawTheme)!\n themes[themeName] = e.theme\n e.names.push(themeName)\n continue\n }\n\n // ensure each theme object unique for dedupe\n const theme = { ...rawTheme }\n // parse into variables\n for (const key in theme) {\n // make sure properly names theme variables\n ensureThemeVariable(theme, key)\n }\n themes[themeName] = theme\n\n // set deduped\n dedupedThemes[themeName] = {\n names: [themeName],\n theme,\n }\n existing.set(rawTheme, dedupedThemes[themeName])\n }\n\n // then, generate CSS from de-duped\n let themeRuleSets: string[] = []\n\n if (isWeb || isRSC) {\n for (const themeName in dedupedThemes) {\n themeRuleSets = [\n ...themeRuleSets,\n ...getThemeCSSRules({\n config: configIn,\n themeName,\n ...dedupedThemes[themeName],\n }),\n ]\n }\n }\n\n // proxy upwards to get parent variables (themes are subset going down)\n for (const themeName in themes) {\n themes[themeName] = proxyThemeToParents(themeName, themes[themeName], themes)\n }\n\n tokensValueToVariable.clear()\n\n return {\n themes,\n cssRuleSets,\n themeRuleSets,\n }\n })()\n\n // faster $lookups\n const tokensParsed: any = Object.fromEntries(\n Object.entries(configIn.tokens).map(([k, v]) => {\n const val = Object.fromEntries(Object.entries(v).map(([k, v]) => [`$${k}`, v]))\n tokensKeysOrdered.set(val, tokensKeysOrdered.get(v))\n return [k, val]\n })\n )\n\n const shorthands = configIn.shorthands || {}\n\n const config: TamaguiInternalConfig = {\n fontLanguages: [],\n animations: {} as any,\n media: {},\n ...configIn,\n // already processed by createTokens()\n tokens: configIn.tokens as any,\n // vite made this into a function if it wasn't set\n shorthands: { ...shorthands },\n inverseShorthands: shorthands\n ? Object.fromEntries(Object.entries(shorthands).map(([k, v]) => [v, k]))\n : {},\n themes: themeConfig.themes as any,\n fontsParsed,\n themeConfig,\n tokensParsed,\n parsed: true,\n getCSS: (separator = '\\n') => {\n return `.t_unmounted .t_will-mount {opacity:0;visibility:hidden;}\n.is_Text .is_Text {display:inline-flex;}\n._dsp_contents {display:contents;}\n${themeConfig.cssRuleSets.join(separator)}\n${themeConfig.themeRuleSets.join(separator)}\n${getAllRules().join(separator)}`\n },\n // const tokens = [...getToken(tokens.size[0])]\n // .spacer-sm + ._dsp_contents._dsp-sm-hidden { margin-left: -var(--${}) }\n }\n\n configureMedia(config)\n setConfig(config)\n\n if (configListeners.size) {\n configListeners.forEach((cb) => cb(config))\n configListeners.clear()\n }\n\n createdConfigs.set(config, true)\n\n if (process.env.NODE_ENV === 'development') {\n if (process.env.DEBUG?.startsWith('tamagui')) {\n // eslint-disable-next-line no-console\n console.log('Tamagui config:', config)\n }\n if (!globalThis['Tamagui']) {\n globalThis['Tamagui'] = Tamagui\n }\n }\n\n return config as any\n}\n"],
5
- "mappings": "AAAA,SAAS,OAAO,aAAa;AAE7B,SAAS,iBAAiB,iBAAiB;AAC3C,SAAS,iBAAiB,yBAAyB;AACnD,SAAS,wBAAwB;AACjC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,qBAAqB,2BAA2B;AACzD,SAAS,sBAAsB;AAC/B,SAAS,WAAW,6BAA6B;AACjD,SAAS,eAAe;AASxB,MAAM,iBAAiB,oBAAI,QAAsB;AAE1C,SAAS,cACd,UAC0B;AA/B5B;AAgCE,MAAI,eAAe,IAAI,QAAQ,GAAG;AAChC,WAAO;AAAA,EACT;AAEA,MAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,QAAI,CAAC,SAAS,QAAQ;AACpB,YAAM,IAAI,MAAM,oBAAoB;AAAA,IACtC;AACA,QAAI,CAAC,SAAS,QAAQ;AACpB,YAAM,IAAI,MAAM,oBAAoB;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OAAO,GAAG,MAAM,CAAC;AAC1C,oBAAgB,MAAM;AAAA,EACxB;AAEA,iBAAe,IAAI,QAAQ,IAAI;AAE/B,MAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,SAAI,aAAQ,IAAI,UAAZ,mBAAmB,WAAW,YAAY;AAE5C,cAAQ,IAAI,mBAAmB,MAAM;AAAA,IACvC;AACA,QAAI,CAAC,WAAW,YAAY;AAC1B,iBAAW,aAAa;AAAA,IAC1B;AAAA,EACF;AAEA,SAAO;AACT;",
4
+ "sourcesContent": ["import { isRSC, isWeb } from '@tamagui/constants'\n\nimport { configListeners, setConfig } from './config'\nimport { createVariables, tokensKeysOrdered } from './createVariables'\nimport { getThemeCSSRules } from './helpers/getThemeCSSRules'\nimport {\n getAllRules,\n listenForSheetChanges,\n scanAllSheets,\n} from './helpers/insertStyleRule'\nimport {\n registerCSSVariable,\n tokensValueToVariable,\n variableToCSS,\n} from './helpers/registerCSSVariable'\nimport { ensureThemeVariable, proxyThemeToParents } from './helpers/themes'\nimport { configureMedia } from './hooks/useMedia'\nimport { parseFont, registerFontVariables } from './insertFont'\nimport { Tamagui } from './Tamagui'\nimport {\n CreateTamaguiProps,\n InferTamaguiConfig,\n TamaguiInternalConfig,\n ThemeParsed,\n} from './types'\n\n// config is re-run by the @tamagui/static, dont double validate\nconst createdConfigs = new WeakMap<any, boolean>()\n\nexport function createTamagui<Conf extends CreateTamaguiProps>(\n configIn: Conf\n): InferTamaguiConfig<Conf> {\n if (createdConfigs.has(configIn)) {\n return configIn as any\n }\n\n if (process.env.NODE_ENV === 'development') {\n if (!configIn.tokens) {\n throw new Error('Must define tokens')\n }\n if (!configIn.themes) {\n throw new Error('Must define themes')\n }\n if (!configIn.fonts) {\n throw new Error('Must define fonts')\n }\n }\n\n scanAllSheets()\n listenForSheetChanges()\n\n const fontTokens = Object.fromEntries(\n Object.entries(configIn.fonts!).map(([k, v]) => {\n return [k, createVariables(v, 'f', true)]\n })\n )\n\n const fontsParsed = (() => {\n const res = {} as typeof fontTokens\n for (const familyName in fontTokens) {\n res[`$${familyName}`] = parseFont(fontTokens[familyName])\n }\n return res!\n })()\n\n const themeConfig = (() => {\n const themes = { ...configIn.themes }\n const cssRuleSets: string[] = []\n\n if (isWeb) {\n const declarations: string[] = []\n const fontDeclarations: Record<\n string,\n { name: string; declarations: string[]; language?: string }\n > = {}\n\n for (const key in configIn.tokens) {\n for (const skey in configIn.tokens[key]) {\n const val = configIn.tokens[key][skey]\n registerCSSVariable(val)\n declarations.push(variableToCSS(val))\n }\n }\n\n for (const key in fontsParsed) {\n const fontParsed = fontsParsed[key]\n const [name, language] = key.includes('_') ? key.split('_') : [key]\n const fontVars = registerFontVariables(fontParsed)\n fontDeclarations[key] = {\n name: name.slice(1),\n declarations: fontVars,\n language,\n }\n }\n\n const sep =\n process.env.NODE_ENV === 'development' ? configIn.cssStyleSeparator || ' ' : ''\n\n function declarationsToRuleSet(decs: string[], selector = '') {\n return `:root${selector} {${sep}${[...decs].join(`;${sep}`)}${sep}}`\n }\n\n // non-font\n cssRuleSets.push(declarationsToRuleSet(declarations))\n\n // fonts\n if (fontDeclarations) {\n for (const key in fontDeclarations) {\n const { name, declarations, language = 'default' } = fontDeclarations[key]\n const fontSelector = `.font_${name}`\n const langSelector = `:root .t_lang-${name}-${language} ${fontSelector}`\n const selectors =\n language === 'default' ? ` ${fontSelector}, ${langSelector}` : langSelector\n const specificRuleSet = declarationsToRuleSet(declarations, selectors)\n cssRuleSets.push(specificRuleSet)\n }\n }\n }\n\n // dedupe themes to avoid duplicate CSS generation\n type DedupedTheme = {\n names: string[]\n theme: ThemeParsed\n }\n const dedupedThemes: {\n [key: string]: DedupedTheme\n } = {}\n const existing = new WeakMap<ThemeParsed, DedupedTheme>()\n\n // first, de-dupe and parse them\n for (const themeName in themes) {\n const rawTheme = themes[themeName] as ThemeParsed\n\n // if existing, avoid\n if (existing.has(rawTheme)) {\n const e = existing.get(rawTheme)!\n themes[themeName] = e.theme\n e.names.push(themeName)\n continue\n }\n\n // ensure each theme object unique for dedupe\n const theme = { ...rawTheme }\n // parse into variables\n for (const key in theme) {\n // make sure properly names theme variables\n ensureThemeVariable(theme, key)\n }\n themes[themeName] = theme\n\n // set deduped\n dedupedThemes[themeName] = {\n names: [themeName],\n theme,\n }\n existing.set(rawTheme, dedupedThemes[themeName])\n }\n\n // then, generate CSS from de-duped\n let themeRuleSets: string[] = []\n\n if (isWeb || isRSC) {\n for (const themeName in dedupedThemes) {\n themeRuleSets = [\n ...themeRuleSets,\n ...getThemeCSSRules({\n config: configIn,\n themeName,\n ...dedupedThemes[themeName],\n }),\n ]\n }\n }\n\n // proxy upwards to get parent variables (themes are subset going down)\n for (const themeName in themes) {\n themes[themeName] = proxyThemeToParents(themeName, themes[themeName], themes)\n }\n\n tokensValueToVariable.clear()\n\n return {\n themes,\n cssRuleSets,\n themeRuleSets,\n }\n })()\n\n // faster $lookups\n const tokensParsed: any = Object.fromEntries(\n Object.entries(configIn.tokens).map(([k, v]) => {\n const val = Object.fromEntries(Object.entries(v).map(([k, v]) => [`$${k}`, v]))\n tokensKeysOrdered.set(val, tokensKeysOrdered.get(v))\n return [k, val]\n })\n )\n\n const shorthands = configIn.shorthands || {}\n\n const config: TamaguiInternalConfig = {\n fontLanguages: [],\n animations: {} as any,\n media: {},\n ...configIn,\n // already processed by createTokens()\n tokens: configIn.tokens as any,\n // vite made this into a function if it wasn't set\n shorthands: { ...shorthands },\n inverseShorthands: shorthands\n ? Object.fromEntries(Object.entries(shorthands).map(([k, v]) => [v, k]))\n : {},\n themes: themeConfig.themes as any,\n fontsParsed,\n themeConfig,\n tokensParsed,\n parsed: true,\n getCSS: (separator = '\\n') => {\n return `\n._ovs-contain {overscroll-behavior:contain;}\n.t_unmounted .t_will-mount {opacity:0;visibility:hidden;}\n.is_Text .is_Text {display:inline-flex;}\n._dsp_contents {display:contents;}\n${themeConfig.cssRuleSets.join(separator)}\n${themeConfig.themeRuleSets.join(separator)}\n${getAllRules().join(separator)}`\n },\n // const tokens = [...getToken(tokens.size[0])]\n // .spacer-sm + ._dsp_contents._dsp-sm-hidden { margin-left: -var(--${}) }\n }\n\n configureMedia(config)\n setConfig(config)\n\n if (configListeners.size) {\n configListeners.forEach((cb) => cb(config))\n configListeners.clear()\n }\n\n createdConfigs.set(config, true)\n\n if (process.env.NODE_ENV === 'development') {\n if (process.env.DEBUG?.startsWith('tamagui')) {\n // eslint-disable-next-line no-console\n console.log('Tamagui config:', config)\n }\n if (!globalThis['Tamagui']) {\n globalThis['Tamagui'] = Tamagui\n }\n }\n\n return config as any\n}\n"],
5
+ "mappings": "AAAA,SAAS,OAAO,aAAa;AAE7B,SAAS,iBAAiB,iBAAiB;AAC3C,SAAS,iBAAiB,yBAAyB;AACnD,SAAS,wBAAwB;AACjC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,qBAAqB,2BAA2B;AACzD,SAAS,sBAAsB;AAC/B,SAAS,WAAW,6BAA6B;AACjD,SAAS,eAAe;AASxB,MAAM,iBAAiB,oBAAI,QAAsB;AAE1C,SAAS,cACd,UAC0B;AA/B5B;AAgCE,MAAI,eAAe,IAAI,QAAQ,GAAG;AAChC,WAAO;AAAA,EACT;AAEA,MAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,QAAI,CAAC,SAAS,QAAQ;AACpB,YAAM,IAAI,MAAM,oBAAoB;AAAA,IACtC;AACA,QAAI,CAAC,SAAS,QAAQ;AACpB,YAAM,IAAI,MAAM,oBAAoB;AAAA,IACtC;AACA,QAAI,CAAC,SAAS,OAAO;AACnB,YAAM,IAAI,MAAM,mBAAmB;AAAA,IACrC;AAAA,EACF;AAEA,gBAAc;AACd,wBAAsB;AAEtB,QAAM,aAAa,OAAO;AAAA,IACxB,OAAO,QAAQ,SAAS,KAAM,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,MAAM;AAC9C,aAAO,CAAC,GAAG,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