@tamagui/core 1.0.1-beta.98 → 1.0.1-beta.99

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.
Files changed (45) hide show
  1. package/dist/cjs/constants/rnw.js +2 -2
  2. package/dist/cjs/constants/rnw.js.map +2 -2
  3. package/dist/cjs/createComponent.js.map +2 -2
  4. package/dist/cjs/helpers/cssHash.js +50 -0
  5. package/dist/cjs/helpers/cssHash.js.map +7 -0
  6. package/dist/cjs/helpers/expandStyle.js +0 -9
  7. package/dist/cjs/helpers/expandStyle.js.map +2 -2
  8. package/dist/cjs/helpers/expandStyles.js +7 -7
  9. package/dist/cjs/helpers/expandStyles.js.map +2 -2
  10. package/dist/cjs/helpers/getStylesAtomic.js +4 -1
  11. package/dist/cjs/helpers/getStylesAtomic.js.map +2 -2
  12. package/dist/cjs/helpers/normalizeColor.js +1 -1
  13. package/dist/cjs/helpers/normalizeColor.js.map +2 -2
  14. package/dist/cjs/helpers/normalizeValueWithProperty.js +1 -1
  15. package/dist/cjs/helpers/normalizeValueWithProperty.js.map +2 -2
  16. package/dist/cjs/types.js.map +1 -1
  17. package/dist/esm/constants/rnw.js +2 -2
  18. package/dist/esm/constants/rnw.js.map +2 -2
  19. package/dist/esm/createComponent.js.map +2 -2
  20. package/dist/esm/helpers/cssHash.js +27 -0
  21. package/dist/esm/helpers/cssHash.js.map +7 -0
  22. package/dist/esm/helpers/expandStyle.js +0 -9
  23. package/dist/esm/helpers/expandStyle.js.map +2 -2
  24. package/dist/esm/helpers/expandStyles.js +7 -7
  25. package/dist/esm/helpers/expandStyles.js.map +2 -2
  26. package/dist/esm/helpers/getStylesAtomic.js +4 -1
  27. package/dist/esm/helpers/getStylesAtomic.js.map +2 -2
  28. package/dist/esm/helpers/normalizeColor.js +1 -1
  29. package/dist/esm/helpers/normalizeColor.js.map +2 -2
  30. package/dist/esm/helpers/normalizeValueWithProperty.js +1 -1
  31. package/dist/esm/helpers/normalizeValueWithProperty.js.map +2 -2
  32. package/package.json +7 -7
  33. package/types/constants/rnw.d.ts.map +1 -1
  34. package/types/createComponent.d.ts +5 -5
  35. package/types/createComponent.d.ts.map +1 -1
  36. package/types/helpers/createTamaguiProvider.d.ts +0 -1
  37. package/types/helpers/createTamaguiProvider.d.ts.map +1 -1
  38. package/types/helpers/cssHash.d.ts +2 -0
  39. package/types/helpers/cssHash.d.ts.map +1 -0
  40. package/types/helpers/expandStyle.d.ts.map +1 -0
  41. package/types/helpers/getStylesAtomic.d.ts.map +1 -1
  42. package/types/helpers/normalizeColor.d.ts.map +1 -0
  43. package/types/helpers/normalizeValueWithProperty.d.ts.map +1 -0
  44. package/types/types.d.ts +1 -1
  45. package/types/types.d.ts.map +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/helpers/normalizeColor.ts"],
4
- "sourcesContent": ["import normalizeCSSColor from 'normalize-css-color'\n\nexport const normalizeColor = (color?: number | string | null, opacity?: number) => {\n if (color == null || color == undefined) {\n return\n }\n if (\n color[0] === '$' ||\n (process.env.TAMAGUI_TARGET === 'web' &&\n typeof color === 'string' &&\n (webColors[color] || color[0] === '_' || color.startsWith('var(')))\n ) {\n return color\n } else {\n const rgba = colorToRGBA(color)\n if (rgba != null) {\n const [r, g, b, a] = rgba\n const alpha = (opacity ?? a).toFixed(2)\n return `rgba(${r},${g},${b},${alpha})`\n }\n }\n return color\n}\n\nconst webColors = {\n currentColor: true,\n currentcolor: true,\n transparent: true,\n inherit: true,\n}\n\nexport function colorToRGBA(color: string | number) {\n const colorInt = processColor(color)\n if (colorInt != null) {\n const r = (colorInt >> 16) & 255\n const g = (colorInt >> 8) & 255\n const b = colorInt & 255\n const a = ((colorInt >> 24) & 255) / 255\n return [r, g, b, a] as const\n }\n return null\n}\n\nconst processColor = (color?: number | string) => {\n if (color === undefined || color === null) {\n return null\n }\n let intColor = normalizeCSSColor(color)\n if (intColor === undefined || intColor === null) {\n return null\n }\n return ((+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color'\n\nexport const normalizeColor = (color?: number | string | null, opacity?: number) => {\n if (color == null || color == undefined) {\n return\n }\n if (\n color[0] === '$' ||\n (process.env.TAMAGUI_TARGET === 'web' &&\n typeof color === 'string' &&\n (webColors[color] || color[0] === '_' || color.startsWith('var(')))\n ) {\n return color\n } else {\n const rgba = colorToRGBA(color)\n if (rgba != null) {\n const [r, g, b, a] = rgba\n const alpha = (opacity ?? a).toFixed(2)\n return `rgba(${r},${g},${b},${alpha})`\n }\n }\n return color\n}\n\nconst webColors = {\n currentColor: true,\n currentcolor: true,\n transparent: true,\n inherit: true,\n}\n\nexport function colorToRGBA(color: string | number) {\n const colorInt = processColor(color)\n if (colorInt != null) {\n const r = (colorInt >> 16) & 255\n const g = (colorInt >> 8) & 255\n const b = colorInt & 255\n const a = ((colorInt >> 24) & 255) / 255\n return [r, g, b, a] as const\n }\n return null\n}\n\nconst processColor = (color?: number | string) => {\n if (color === undefined || color === null) {\n return null\n }\n const intColor = normalizeCSSColor(color)\n if (intColor === undefined || intColor === null) {\n return null\n }\n return ((+intColor << 24) | (+intColor >>> 8)) >>> 0\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iCAA8B;AAEvB,MAAM,iBAAiB,CAAC,OAAgC,YAAqB;AAClF,MAAI,SAAS,QAAQ,SAAS,QAAW;AACvC;AAAA,EACF;AACA,MACE,MAAM,OAAO,OACZ,QAAQ,IAAI,mBAAmB,SAC9B,OAAO,UAAU,YAChB,WAAU,UAAU,MAAM,OAAO,OAAO,MAAM,WAAW,MAAM,IAClE;AACA,WAAO;AAAA,EACT,OAAO;AACL,UAAM,OAAO,YAAY,KAAK;AAC9B,QAAI,QAAQ,MAAM;AAChB,YAAM,CAAC,GAAG,GAAG,GAAG,KAAK;AACrB,YAAM,QAAS,YAAW,GAAG,QAAQ,CAAC;AACtC,aAAO,QAAQ,KAAK,KAAK,KAAK;AAAA,IAChC;AAAA,EACF;AACA,SAAO;AACT;AAEA,MAAM,YAAY;AAAA,EAChB,cAAc;AAAA,EACd,cAAc;AAAA,EACd,aAAa;AAAA,EACb,SAAS;AACX;AAEO,qBAAqB,OAAwB;AAClD,QAAM,WAAW,aAAa,KAAK;AACnC,MAAI,YAAY,MAAM;AACpB,UAAM,IAAK,YAAY,KAAM;AAC7B,UAAM,IAAK,YAAY,IAAK;AAC5B,UAAM,IAAI,WAAW;AACrB,UAAM,IAAM,aAAY,KAAM,OAAO;AACrC,WAAO,CAAC,GAAG,GAAG,GAAG,CAAC;AAAA,EACpB;AACA,SAAO;AACT;AAEA,MAAM,eAAe,CAAC,UAA4B;AAChD,MAAI,UAAU,UAAa,UAAU,MAAM;AACzC,WAAO;AAAA,EACT;AACA,QAAM,WAAW,wCAAkB,KAAK;AACxC,MAAI,aAAa,UAAa,aAAa,MAAM;AAC/C,WAAO;AAAA,EACT;AACA,SAAS,EAAC,YAAY,KAAO,CAAC,aAAa,OAAQ;AACrD;",
6
6
  "names": []
7
7
  }
@@ -30,8 +30,8 @@ function normalizeValueWithProperty(value, property) {
30
30
  if (process.env.TAMAGUI_TARGET === "web" && typeof value === "number" && (property === void 0 || !unitlessNumbers[property])) {
31
31
  res = `${value}px`;
32
32
  } else if (property && colorProps[property]) {
33
- cache[value] = res;
34
33
  res = (0, import_normalizeColor.normalizeColor)(value);
34
+ cache[value] = res;
35
35
  }
36
36
  return res;
37
37
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/helpers/normalizeValueWithProperty.ts"],
4
- "sourcesContent": ["/**\n * Some parts adapted from react-native-web\n * Copyright (c) Nicolas Gallagher licensed under the MIT license.\n */\n\nimport { normalizeColor } from './normalizeColor'\n\nconst cache = {}\n\nexport function normalizeValueWithProperty(value: any, property?: string): any {\n const cached = cache[value]\n if (cached) return cached\n let res = value\n if (\n process.env.TAMAGUI_TARGET === 'web' &&\n typeof value === 'number' &&\n (property === undefined || !unitlessNumbers[property])\n ) {\n res = `${value}px`\n } else if (property && colorProps[property]) {\n cache[value] = res\n res = normalizeColor(value)\n }\n return res\n}\n\nconst colorProps = {\n backgroundColor: true,\n borderColor: true,\n borderTopColor: true,\n borderRightColor: true,\n borderBottomColor: true,\n borderLeftColor: true,\n color: true,\n shadowColor: true,\n textDecorationColor: true,\n textShadowColor: true,\n}\n\nconst unitlessNumbers = {\n animationIterationCount: true,\n aspectRatio: true,\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n columnCount: true,\n flex: true,\n flexGrow: true,\n flexOrder: true,\n flexPositive: true,\n flexShrink: true,\n flexNegative: true,\n fontWeight: true,\n gridRow: true,\n gridRowEnd: true,\n gridRowGap: true,\n gridRowStart: true,\n gridColumn: true,\n gridColumnEnd: true,\n gridColumnGap: true,\n gridColumnStart: true,\n lineClamp: true,\n opacity: true,\n order: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zIndex: true,\n zoom: true,\n scale: true,\n scaleX: true,\n scaleY: true,\n scaleZ: true,\n shadowOpacity: true,\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,4BAA+B;AAE/B,MAAM,QAAQ,CAAC;AAER,oCAAoC,OAAY,UAAwB;AAC7E,QAAM,SAAS,MAAM;AACrB,MAAI;AAAQ,WAAO;AACnB,MAAI,MAAM;AACV,MACE,QAAQ,IAAI,mBAAmB,SAC/B,OAAO,UAAU,YAChB,cAAa,UAAa,CAAC,gBAAgB,YAC5C;AACA,UAAM,GAAG;AAAA,EACX,WAAW,YAAY,WAAW,WAAW;AAC3C,UAAM,SAAS;AACf,UAAM,0CAAe,KAAK;AAAA,EAC5B;AACA,SAAO;AACT;AAEA,MAAM,aAAa;AAAA,EACjB,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,OAAO;AAAA,EACP,aAAa;AAAA,EACb,qBAAqB;AAAA,EACrB,iBAAiB;AACnB;AAEA,MAAM,kBAAkB;AAAA,EACtB,yBAAyB;AAAA,EACzB,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,aAAa;AAAA,EACb,MAAM;AAAA,EACN,UAAU;AAAA,EACV,WAAW;AAAA,EACX,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,eAAe;AAAA,EACf,iBAAiB;AAAA,EACjB,WAAW;AAAA,EACX,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,eAAe;AACjB;",
4
+ "sourcesContent": ["/**\n * Some parts adapted from react-native-web\n * Copyright (c) Nicolas Gallagher licensed under the MIT license.\n */\n\nimport { normalizeColor } from './normalizeColor'\n\nconst cache = {}\n\nexport function normalizeValueWithProperty(value: any, property?: string): any {\n const cached = cache[value]\n if (cached) return cached\n let res = value\n if (\n process.env.TAMAGUI_TARGET === 'web' &&\n typeof value === 'number' &&\n (property === undefined || !unitlessNumbers[property])\n ) {\n res = `${value}px`\n } else if (property && colorProps[property]) {\n res = normalizeColor(value)\n cache[value] = res\n }\n return res\n}\n\nconst colorProps = {\n backgroundColor: true,\n borderColor: true,\n borderTopColor: true,\n borderRightColor: true,\n borderBottomColor: true,\n borderLeftColor: true,\n color: true,\n shadowColor: true,\n textDecorationColor: true,\n textShadowColor: true,\n}\n\nconst unitlessNumbers = {\n animationIterationCount: true,\n aspectRatio: true,\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n columnCount: true,\n flex: true,\n flexGrow: true,\n flexOrder: true,\n flexPositive: true,\n flexShrink: true,\n flexNegative: true,\n fontWeight: true,\n gridRow: true,\n gridRowEnd: true,\n gridRowGap: true,\n gridRowStart: true,\n gridColumn: true,\n gridColumnEnd: true,\n gridColumnGap: true,\n gridColumnStart: true,\n lineClamp: true,\n opacity: true,\n order: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zIndex: true,\n zoom: true,\n scale: true,\n scaleX: true,\n scaleY: true,\n scaleZ: true,\n shadowOpacity: true,\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,4BAA+B;AAE/B,MAAM,QAAQ,CAAC;AAER,oCAAoC,OAAY,UAAwB;AAC7E,QAAM,SAAS,MAAM;AACrB,MAAI;AAAQ,WAAO;AACnB,MAAI,MAAM;AACV,MACE,QAAQ,IAAI,mBAAmB,SAC/B,OAAO,UAAU,YAChB,cAAa,UAAa,CAAC,gBAAgB,YAC5C;AACA,UAAM,GAAG;AAAA,EACX,WAAW,YAAY,WAAW,WAAW;AAC3C,UAAM,0CAAe,KAAK;AAC1B,UAAM,SAAS;AAAA,EACjB;AACA,SAAO;AACT;AAEA,MAAM,aAAa;AAAA,EACjB,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,OAAO;AAAA,EACP,aAAa;AAAA,EACb,qBAAqB;AAAA,EACrB,iBAAiB;AACnB;AAEA,MAAM,kBAAkB;AAAA,EACtB,yBAAyB;AAAA,EACzB,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,aAAa;AAAA,EACb,MAAM;AAAA,EACN,UAAU;AAAA,EACV,WAAW;AAAA,EACX,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,eAAe;AAAA,EACf,iBAAiB;AAAA,EACjB,WAAW;AAAA,EACX,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,eAAe;AACjB;",
6
6
  "names": []
7
7
  }
@@ -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 { Properties } from 'csstype'\nimport React from 'react'\nimport {\n GestureResponderEvent,\n Image,\n TextProps as ReactTextProps,\n Text,\n TextInput,\n TextStyle,\n View,\n ViewProps,\n ViewStyle,\n} from 'react-native'\n\nimport { Variable } from './createVariable'\nimport { ResolveVariableTypes } from './helpers/createPropMapper'\nimport { RNWTextProps, RNWViewProps } from './types-rnw'\nimport { 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//\n// base props that are accepted by createComponent (additional to react-native-web)\n//\nexport type TamaguiComponentPropsBase = {\n asChild?: boolean\n space?: SpaceTokens\n spaceDirection?: SpaceDirection\n separator?: React.ReactNode\n dangerouslySetInnerHTML?: { __html: string }\n animation?: AnimationProp\n animateOnly?: string[]\n children?: any | any[]\n debug?: DebugProp\n disabled?: boolean\n className?: string\n id?: string\n tag?: string\n theme?: ThemeName | null\n componentName?: string\n forceStyle?: 'hover' | 'press' | 'focus'\n onHoverIn?: (e: MouseEvent) => any\n onHoverOut?: (e: MouseEvent) => any\n onPress?: (e: GestureResponderEvent) => any\n onPressIn?: (e: GestureResponderEvent) => any\n onPressOut?: (e: GestureResponderEvent) => any\n // WEB ONLY\n onMouseEnter?: (e: MouseEvent) => any\n onMouseLeave?: (e: MouseEvent) => any\n onMouseDown?: (e: MouseEvent) => any\n // WEB STYLES\n userSelect?: Properties['userSelect']\n cursor?: Properties['cursor']\n}\n\nexport type ReactComponentWithRef<Props, Ref> = React.ForwardRefExoticComponent<\n Props & React.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\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}\ntype GenericShorthands = {\n // [key: string]: string\n}\n\ntype GenericMedia<K extends string = string> = {\n // name => media shorthand name (camelCase) => value\n [key in K]: {\n [key: string]: number | string\n }\n}\n\nexport type GenericFonts = {\n [key: string]: GenericFont\n}\n\ntype GenericAnimations = {\n [key: string]:\n | string\n | {\n [key: string]: any\n }\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> = Partial<Pick<ThemeProviderProps, 'defaultTheme' | 'disableRootThemeClass'>> & {\n fonts: F\n tokens: A\n themes: B\n shorthands: C\n media: D\n animations: AnimationDriver<E>\n defaultProps?: Record<string, Object>\n}\n\n// for use in creation functions so it doesnt get overwrtitten\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 ThemeObject = TamaguiConfig['themes'][keyof TamaguiConfig['themes']]\nexport type Tokens = TamaguiConfig['tokens']\nexport type Shorthands = TamaguiConfig['shorthands']\nexport type Media = TamaguiConfig['media']\nexport type Themes = TamaguiConfig['themes']\nexport type ThemeName = GetAltThemeNames<keyof Themes>\n// export type ThemeNameWithSubThemes = GetSubThemes<ThemeName>\nexport type ThemeKeys = keyof ThemeObject\nexport type ThemeTokens = `$${ThemeKeys}`\nexport type AnimationKeys = Omit<GetAnimationKeys<TamaguiConfig>, number>\n\ntype GetAltThemeNames<S> = (S extends `${string}_${infer Alt}` ? GetAltThemeNames<Alt> : S) | S\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> = CreateTamaguiConfig<A, B, C, D, E, F> & {\n // TODO need to make it this but this breaks types, revisit\n // animations: E //AnimationDriver<E>\n Provider: (props: TamaguiProviderProps) => any\n // with $ prefixes for fast lookups (one time cost at startup vs every render)\n tokensParsed: CreateTokens<Variable>\n themeConfig: any\n fontsParsed: GenericFonts\n getCSS: () => string\n parsed: boolean\n\n // just passed in from CreateTamaguiProps\n themeClassNameOnRoot?: boolean\n}\n\nexport type GetAnimationKeys<A extends GenericTamaguiConfig> = keyof A['animations']['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 React.FunctionComponent<infer Props>\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}\n\n// media\nexport type MediaKeys = keyof Media\nexport type MediaQueryObject = { [key: string]: string | number | string }\nexport type MediaQueryKey = keyof Media\nexport type MediaPropKeys = `$${MediaQueryKey}`\nexport type MediaQueryState = { [key in MediaPropKeys]: boolean }\nexport type MediaProps<A> = {\n [key in MediaPropKeys]?: A\n}\nexport type MediaQueries = {\n [key in MediaQueryKey]: MediaQueryObject\n}\nexport type ConfigureMediaQueryOptions = {\n queries?: MediaQueries\n defaultActive?: MediaQueryKey[]\n}\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\nexport type ColorTokens =\n | GetTokenString<keyof Tokens['color']>\n | GetTokenString<keyof ThemeObject>\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 FontWeightTokens =\n | `$${GetTokenFontKeysFor<'weight'>}`\n | `${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}00`\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 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> = WithThemeShorthandsAndPseudos<A> &\n MediaProps<WithThemeShorthandsAndPseudos<A>>\n\n//\n// Stack\n//\n\ntype WebOnlyStyleProps = {\n // WEB ONLY\n cursor?: string\n // WEB ONLY\n contain?: 'none' | 'strict' | 'content' | 'size' | 'layout' | 'paint' | string\n // WEB ONLY values: inherit, inline, block, content\n display?: 'inherit' | 'none' | 'inline' | 'block' | 'contents' | 'flex' | 'inline-flex'\n // WEB ONLY pointerEvents can be a style prop\n pointerEvents?: ViewProps['pointerEvents']\n}\n\nexport type StackStylePropsBase = Omit<ViewStyle, 'display' | 'backfaceVisibility' | 'elevation'> &\n TransformStyleProps &\n WebOnlyStyleProps\n\nexport type StackPropsBaseShared = Omit<ViewProps, 'display' | 'children'> &\n RNWViewProps &\n TamaguiComponentPropsBase\n\nexport type StackStyleProps = WithThemeShorthandsPseudosMediaAnimation<StackStylePropsBase>\nexport type StackPropsBase = StackPropsBaseShared & WithThemeAndShorthands<StackStylePropsBase>\nexport type StackProps = StackPropsBaseShared & StackStyleProps\n\nexport type GestureReponderEvent = Exclude<View['props']['onResponderMove'], void> extends (\n event: infer Event\n) => void\n ? Event\n : never\n\n//\n// Text props\n//\n\nexport type TextStylePropsBase = Omit<TextStyle, 'display' | 'backfaceVisibility'> &\n TransformStyleProps &\n WebOnlyStyleProps & {\n ellipse?: boolean\n selectable?: boolean\n textDecorationDistance?: number\n textOverflow?: Properties['textOverflow']\n whiteSpace?: Properties['whiteSpace']\n wordWrap?: Properties['wordWrap']\n }\n\nexport type TextPropsBaseShared = Omit<ReactTextProps, 'children'> &\n RNWTextProps &\n TamaguiComponentPropsBase\nexport type TextPropsBase = TextPropsBaseShared & WithThemeAndShorthands<TextStylePropsBase>\nexport type TextStyleProps = WithThemeShorthandsPseudosMediaAnimation<TextStylePropsBase>\nexport type TextProps = TextPropsBaseShared & 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 disableInjectCSS?: boolean\n children?: React.ReactNode\n}\n\nexport type PropMapper = (\n key: string,\n value: any,\n theme: ThemeObject,\n props: Record<string, any>,\n state: Partial<SplitStyleState>,\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 StaticConfig = {\n Component?: React.FunctionComponent<any> & StaticComponentObject\n\n variants?: GenericVariantDefinitions\n\n /**\n * Used for applying sub theme style\n */\n componentName?: string\n\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 * Attempts to attach focus styles at runtime (useful for native)\n */\n isInput?: boolean\n\n /**\n * React native web images need special handling for className support\n */\n isImage?: boolean\n\n /**\n * Which style keys are allowed to be extracted.\n */\n validStyles?: { [key: string]: boolean }\n\n /**\n * Same as React.defaultProps, be sure to sync\n */\n defaultProps: Record<string, any>\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 * Merges into defaultProps later on, used internally yonly\n */\n defaultVariants?: { [key: string]: any }\n\n /**\n * Auto-detect, but can ovverride, passes styles properly to react-native-web\n */\n isReactNativeWeb?: boolean\n\n /**\n * Used internally to keep reference to the original rnw component\n */\n reactNativeWebComponent?: any\n\n /**\n * Memoize the component\n */\n memo?: boolean\n\n /**\n * Auto-detect, but can ovverride, passes styles properly to react-native-web\n */\n isTamagui?: boolean\n\n /**\n * Used internally to handle extractable HoC separate\n */\n isExtractable?: boolean\n\n /**\n * Used insternally to attach default props to names\n */\n parentNames?: string[]\n}\n\n/**\n * --------------------------------------------\n * variants\n * --------------------------------------------\n */\n\nexport type StylableComponent =\n | TamaguiComponent\n | React.Component\n | React.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<infer Props>\n ? Props\n : A extends React.Component<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<A, SizeTokens>\nexport type SpaceVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, SpaceTokens>\nexport type ColorVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, ColorTokens>\nexport type FontLineHeightVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n FontLineHeightTokens\n>\nexport type FontLetterSpacingVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n FontLetterSpacingTokens\n>\nexport type FontStyleVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n FontStyleTokens\n>\nexport type FontTransformVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n FontTransformTokens\n>\nexport type ZIndexVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, ZIndexTokens>\nexport type RadiusVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, RadiusTokens>\nexport type ThemeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, ThemeTokens>\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 mounted: boolean\n animation?: null | {\n style?: any\n avoidClasses?: boolean\n }\n}\n\nexport type SplitStyleState = TamaguiComponentState & {\n noClassNames?: boolean\n dynamicStylesInline?: boolean\n resolveVariablesAs?: ResolveVariableTypes\n fallbackProps?: Record<string, any>\n keepVariantsAsProps?: boolean\n hasTextAncestor?: boolean\n}\n\n// Animations:\n\ntype AnimationConfig = {\n [key: string]: any\n}\n\nexport type AnimationDriver<A extends AnimationConfig = AnimationConfig> = {\n avoidClasses?: boolean\n useAnimations: UseAnimationHook\n animations: A\n View?: any\n Text?: any\n}\n\nexport type UseAnimationProps = TamaguiComponentPropsBase & Record<string, any>\n\nexport type UseAnimationHelpers = {\n staticConfig: StaticConfigParsed\n getStyle: (props?: {\n isEntering?: boolean\n isExiting?: boolean\n exitVariant?: string | null\n enterVariant?: string | null\n }) => ViewStyle\n state: SplitStyleState\n pseudos: PseudoProps<ViewStyle>\n // style: ViewStyle | null | undefined\n // isMounted: boolean\n // exitStyle?: ViewStyle | null\n onDidAnimate?: any\n delay?: number\n // mergedStyles(props?: { isExiting?: boolean }): ViewStyle\n}\n\nexport type UseAnimationHook = (\n props: UseAnimationProps,\n helpers: UseAnimationHelpers\n) => {\n style?: StackStylePropsBase | StackStylePropsBase[]\n}\n"],
4
+ "sourcesContent": ["// TODO split this into own package @tamagui/types to share with animations packages\n\nimport { Properties } from 'csstype'\nimport React from 'react'\nimport {\n GestureResponderEvent,\n Image,\n TextProps as ReactTextProps,\n Text,\n TextInput,\n TextStyle,\n View,\n ViewProps,\n ViewStyle,\n} from 'react-native'\n\nimport { Variable } from './createVariable'\nimport { ResolveVariableTypes } from './helpers/createPropMapper'\nimport { RNWTextProps, RNWViewProps } from './types-rnw'\nimport { 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//\n// base props that are accepted by createComponent (additional to react-native-web)\n//\nexport type TamaguiComponentPropsBase = {\n asChild?: boolean\n space?: SpaceTokens | null\n spaceDirection?: SpaceDirection\n separator?: React.ReactNode\n dangerouslySetInnerHTML?: { __html: string }\n animation?: AnimationProp\n animateOnly?: string[]\n children?: any | any[]\n debug?: DebugProp\n disabled?: boolean\n className?: string\n id?: string\n tag?: string\n theme?: ThemeName | null\n componentName?: string\n forceStyle?: 'hover' | 'press' | 'focus'\n onHoverIn?: (e: MouseEvent) => any\n onHoverOut?: (e: MouseEvent) => any\n onPress?: (e: GestureResponderEvent) => any\n onPressIn?: (e: GestureResponderEvent) => any\n onPressOut?: (e: GestureResponderEvent) => any\n // WEB ONLY\n onMouseEnter?: (e: MouseEvent) => any\n onMouseLeave?: (e: MouseEvent) => any\n onMouseDown?: (e: MouseEvent) => any\n // WEB STYLES\n userSelect?: Properties['userSelect']\n cursor?: Properties['cursor']\n}\n\nexport type ReactComponentWithRef<Props, Ref> = React.ForwardRefExoticComponent<\n Props & React.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\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}\ntype GenericShorthands = {\n // [key: string]: string\n}\n\ntype GenericMedia<K extends string = string> = {\n // name => media shorthand name (camelCase) => value\n [key in K]: {\n [key: string]: number | string\n }\n}\n\nexport type GenericFonts = {\n [key: string]: GenericFont\n}\n\ntype GenericAnimations = {\n [key: string]:\n | string\n | {\n [key: string]: any\n }\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> = Partial<Pick<ThemeProviderProps, 'defaultTheme' | 'disableRootThemeClass'>> & {\n fonts: F\n tokens: A\n themes: B\n shorthands: C\n media: D\n animations: AnimationDriver<E>\n defaultProps?: Record<string, Object>\n}\n\n// for use in creation functions so it doesnt get overwrtitten\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 ThemeObject = TamaguiConfig['themes'][keyof TamaguiConfig['themes']]\nexport type Tokens = TamaguiConfig['tokens']\nexport type Shorthands = TamaguiConfig['shorthands']\nexport type Media = TamaguiConfig['media']\nexport type Themes = TamaguiConfig['themes']\nexport type ThemeName = GetAltThemeNames<keyof Themes>\n// export type ThemeNameWithSubThemes = GetSubThemes<ThemeName>\nexport type ThemeKeys = keyof ThemeObject\nexport type ThemeTokens = `$${ThemeKeys}`\nexport type AnimationKeys = Omit<GetAnimationKeys<TamaguiConfig>, number>\n\ntype GetAltThemeNames<S> = (S extends `${string}_${infer Alt}` ? GetAltThemeNames<Alt> : S) | S\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> = CreateTamaguiConfig<A, B, C, D, E, F> & {\n // TODO need to make it this but this breaks types, revisit\n // animations: E //AnimationDriver<E>\n Provider: (props: TamaguiProviderProps) => any\n // with $ prefixes for fast lookups (one time cost at startup vs every render)\n tokensParsed: CreateTokens<Variable>\n themeConfig: any\n fontsParsed: GenericFonts\n getCSS: () => string\n parsed: boolean\n\n // just passed in from CreateTamaguiProps\n themeClassNameOnRoot?: boolean\n}\n\nexport type GetAnimationKeys<A extends GenericTamaguiConfig> = keyof A['animations']['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 React.FunctionComponent<infer Props>\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}\n\n// media\nexport type MediaKeys = keyof Media\nexport type MediaQueryObject = { [key: string]: string | number | string }\nexport type MediaQueryKey = keyof Media\nexport type MediaPropKeys = `$${MediaQueryKey}`\nexport type MediaQueryState = { [key in MediaPropKeys]: boolean }\nexport type MediaProps<A> = {\n [key in MediaPropKeys]?: A\n}\nexport type MediaQueries = {\n [key in MediaQueryKey]: MediaQueryObject\n}\nexport type ConfigureMediaQueryOptions = {\n queries?: MediaQueries\n defaultActive?: MediaQueryKey[]\n}\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\nexport type ColorTokens =\n | GetTokenString<keyof Tokens['color']>\n | GetTokenString<keyof ThemeObject>\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 FontWeightTokens =\n | `$${GetTokenFontKeysFor<'weight'>}`\n | `${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}00`\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 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> = WithThemeShorthandsAndPseudos<A> &\n MediaProps<WithThemeShorthandsAndPseudos<A>>\n\n//\n// Stack\n//\n\ntype WebOnlyStyleProps = {\n // WEB ONLY\n cursor?: string\n // WEB ONLY\n contain?: 'none' | 'strict' | 'content' | 'size' | 'layout' | 'paint' | string\n // WEB ONLY values: inherit, inline, block, content\n display?: 'inherit' | 'none' | 'inline' | 'block' | 'contents' | 'flex' | 'inline-flex'\n // WEB ONLY pointerEvents can be a style prop\n pointerEvents?: ViewProps['pointerEvents']\n}\n\nexport type StackStylePropsBase = Omit<ViewStyle, 'display' | 'backfaceVisibility' | 'elevation'> &\n TransformStyleProps &\n WebOnlyStyleProps\n\nexport type StackPropsBaseShared = Omit<ViewProps, 'display' | 'children'> &\n RNWViewProps &\n TamaguiComponentPropsBase\n\nexport type StackStyleProps = WithThemeShorthandsPseudosMediaAnimation<StackStylePropsBase>\nexport type StackPropsBase = StackPropsBaseShared & WithThemeAndShorthands<StackStylePropsBase>\nexport type StackProps = StackPropsBaseShared & StackStyleProps\n\nexport type GestureReponderEvent = Exclude<View['props']['onResponderMove'], void> extends (\n event: infer Event\n) => void\n ? Event\n : never\n\n//\n// Text props\n//\n\nexport type TextStylePropsBase = Omit<TextStyle, 'display' | 'backfaceVisibility'> &\n TransformStyleProps &\n WebOnlyStyleProps & {\n ellipse?: boolean\n selectable?: boolean\n textDecorationDistance?: number\n textOverflow?: Properties['textOverflow']\n whiteSpace?: Properties['whiteSpace']\n wordWrap?: Properties['wordWrap']\n }\n\nexport type TextPropsBaseShared = Omit<ReactTextProps, 'children'> &\n RNWTextProps &\n TamaguiComponentPropsBase\nexport type TextPropsBase = TextPropsBaseShared & WithThemeAndShorthands<TextStylePropsBase>\nexport type TextStyleProps = WithThemeShorthandsPseudosMediaAnimation<TextStylePropsBase>\nexport type TextProps = TextPropsBaseShared & 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 disableInjectCSS?: boolean\n children?: React.ReactNode\n}\n\nexport type PropMapper = (\n key: string,\n value: any,\n theme: ThemeObject,\n props: Record<string, any>,\n state: Partial<SplitStyleState>,\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 StaticConfig = {\n Component?: React.FunctionComponent<any> & StaticComponentObject\n\n variants?: GenericVariantDefinitions\n\n /**\n * Used for applying sub theme style\n */\n componentName?: string\n\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 * Attempts to attach focus styles at runtime (useful for native)\n */\n isInput?: boolean\n\n /**\n * React native web images need special handling for className support\n */\n isImage?: boolean\n\n /**\n * Which style keys are allowed to be extracted.\n */\n validStyles?: { [key: string]: boolean }\n\n /**\n * Same as React.defaultProps, be sure to sync\n */\n defaultProps: Record<string, any>\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 * Merges into defaultProps later on, used internally yonly\n */\n defaultVariants?: { [key: string]: any }\n\n /**\n * Auto-detect, but can ovverride, passes styles properly to react-native-web\n */\n isReactNativeWeb?: boolean\n\n /**\n * Used internally to keep reference to the original rnw component\n */\n reactNativeWebComponent?: any\n\n /**\n * Memoize the component\n */\n memo?: boolean\n\n /**\n * Auto-detect, but can ovverride, passes styles properly to react-native-web\n */\n isTamagui?: boolean\n\n /**\n * Used internally to handle extractable HoC separate\n */\n isExtractable?: boolean\n\n /**\n * Used insternally to attach default props to names\n */\n parentNames?: string[]\n}\n\n/**\n * --------------------------------------------\n * variants\n * --------------------------------------------\n */\n\nexport type StylableComponent =\n | TamaguiComponent\n | React.Component\n | React.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<infer Props>\n ? Props\n : A extends React.Component<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<A, SizeTokens>\nexport type SpaceVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, SpaceTokens>\nexport type ColorVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, ColorTokens>\nexport type FontLineHeightVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n FontLineHeightTokens\n>\nexport type FontLetterSpacingVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n FontLetterSpacingTokens\n>\nexport type FontStyleVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n FontStyleTokens\n>\nexport type FontTransformVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n FontTransformTokens\n>\nexport type ZIndexVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, ZIndexTokens>\nexport type RadiusVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, RadiusTokens>\nexport type ThemeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, ThemeTokens>\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 mounted: boolean\n animation?: null | {\n style?: any\n avoidClasses?: boolean\n }\n}\n\nexport type SplitStyleState = TamaguiComponentState & {\n noClassNames?: boolean\n dynamicStylesInline?: boolean\n resolveVariablesAs?: ResolveVariableTypes\n fallbackProps?: Record<string, any>\n keepVariantsAsProps?: boolean\n hasTextAncestor?: boolean\n}\n\n// Animations:\n\ntype AnimationConfig = {\n [key: string]: any\n}\n\nexport type AnimationDriver<A extends AnimationConfig = AnimationConfig> = {\n avoidClasses?: boolean\n useAnimations: UseAnimationHook\n animations: A\n View?: any\n Text?: any\n}\n\nexport type UseAnimationProps = TamaguiComponentPropsBase & Record<string, any>\n\nexport type UseAnimationHelpers = {\n staticConfig: StaticConfigParsed\n getStyle: (props?: {\n isEntering?: boolean\n isExiting?: boolean\n exitVariant?: string | null\n enterVariant?: string | null\n }) => ViewStyle\n state: SplitStyleState\n pseudos: PseudoProps<ViewStyle>\n // style: ViewStyle | null | undefined\n // isMounted: boolean\n // exitStyle?: ViewStyle | null\n onDidAnimate?: any\n delay?: number\n // mergedStyles(props?: { isExiting?: boolean }): ViewStyle\n}\n\nexport type UseAnimationHook = (\n props: UseAnimationProps,\n helpers: UseAnimationHelpers\n) => {\n style?: StackStylePropsBase | StackStylePropsBase[]\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,5 @@
1
- import * as rnw2 from "@tamagui/rnw";
2
- const rnw = rnw2;
1
+ import * as RNW from "react-native-web";
2
+ const rnw = RNW["TamaguiExports"];
3
3
  export {
4
4
  rnw
5
5
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/constants/rnw.tsx"],
4
- "sourcesContent": ["import * as rnw2 from '@tamagui/rnw'\n\nexport const rnw = rnw2\n"],
5
- "mappings": "AAAA;AAEO,MAAM,MAAM;",
4
+ "sourcesContent": ["import * as RNW from 'react-native-web'\n\nexport const rnw = RNW['TamaguiExports']\n"],
5
+ "mappings": "AAAA;AAEO,MAAM,MAAM,IAAI;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/createComponent.tsx"],
4
- "sourcesContent": ["import { composeEventHandlers, stylePropsView, validStyles } from '@tamagui/helpers'\nimport {\n useElementLayout,\n useMergeRefs,\n usePlatformMethods,\n useResponderEvents,\n} from '@tamagui/rnw'\nimport { useForceUpdate } from '@tamagui/use-force-update'\nimport React, {\n Children,\n Fragment,\n createElement,\n forwardRef,\n memo,\n useCallback,\n useContext,\n useMemo,\n useRef,\n useState,\n} from 'react'\nimport { StyleSheet, Text, View, ViewStyle } from 'react-native'\n\nimport { getConfig, onConfiguredOnce } from './conf'\nimport { stackDefaultStyles } from './constants/constants'\nimport { isWeb, useIsomorphicLayoutEffect } from './constants/platform'\nimport { assignNativePropsToWeb } from './helpers/assignNativePropsToWeb'\nimport { getReturnVariablesAs } from './helpers/createPropMapper'\nimport { createShallowUpdate } from './helpers/createShallowUpdate'\nimport { extendStaticConfig, parseStaticConfig } from './helpers/extendStaticConfig'\nimport { SplitStyleResult, insertSplitStyles, useSplitStyles } from './helpers/getSplitStyles'\nimport { getAllSelectors } from './helpers/insertStyleRule'\nimport { mergeProps } from './helpers/mergeProps'\nimport { proxyThemeVariables } from './helpers/proxyThemeVariables'\nimport { wrapThemeManagerContext } from './helpers/wrapThemeManagerContext'\nimport { useFeatures } from './hooks/useFeatures'\nimport { useIsTouchDevice } from './hooks/useIsTouchDevice'\nimport { mediaState } from './hooks/useMedia'\nimport { usePressable } from './hooks/usePressable'\nimport { getThemeManagerIfChanged, useTheme } from './hooks/useTheme'\nimport { Pressability } from './Pressability'\nimport {\n SpaceDirection,\n SpaceTokens,\n StackProps,\n StaticConfig,\n StaticConfigParsed,\n StylableComponent,\n TamaguiComponent,\n TamaguiComponentState,\n TamaguiConfig,\n TamaguiElement,\n TamaguiInternalConfig,\n UseAnimationHook,\n} from './types'\nimport { Slot, mergeEvent } from './views/Slot'\nimport { TextAncestorContext } from './views/TextAncestorContext'\n\nReact['keep']\n\nconst defaultComponentState: TamaguiComponentState = Object.freeze({\n hover: false,\n press: false,\n pressIn: false,\n focus: false,\n // only used by enterStyle\n mounted: false,\n animation: null,\n})\n\nexport const mouseUps = new Set<Function>()\nif (typeof document !== 'undefined') {\n document.addEventListener('mouseup', () => {\n mouseUps.forEach((x) => x())\n mouseUps.clear()\n })\n document.addEventListener('touchend', () => {\n mouseUps.forEach((x) => x())\n mouseUps.clear()\n })\n document.addEventListener('touchcancel', () => {\n mouseUps.forEach((x) => x())\n mouseUps.clear()\n })\n}\n\n// mutates\nfunction mergeShorthands({ defaultProps }: StaticConfigParsed, { shorthands }: TamaguiConfig) {\n // they are defined in correct order already { ...parent, ...child }\n for (const key in defaultProps) {\n defaultProps[shorthands[key] || key] = defaultProps[key]\n }\n}\n\nlet initialTheme: any\n\nexport function createComponent<\n ComponentPropTypes extends Object = {},\n Ref = TamaguiElement,\n BaseProps = never\n>(configIn: Partial<StaticConfig> | StaticConfigParsed, ParentComponent?: StylableComponent) {\n const staticConfig = (() => {\n const config = extendStaticConfig(configIn, ParentComponent)\n if ('parsed' in config) {\n return config\n } else {\n return parseStaticConfig(config)\n }\n })()\n\n const defaultComponentClassName = `is_${staticConfig.componentName}`\n let tamaguiConfig: TamaguiInternalConfig\n let AnimatedText: any\n let AnimatedView: any\n let avoidClasses = true\n let defaultNativeStyle: any\n let defaultNativeStyleSheet: StyleSheet.NamedStyles<{ base: {} }>\n let tamaguiDefaultProps: any\n let initialSplitStyles: SplitStyleResult\n\n // see onConfiguredOnce below which attaches a name then to this component\n const component = forwardRef<Ref, ComponentPropTypes>((propsIn: any, forwardedRef) => {\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 hostRef = useRef<HTMLElement | View>(null)\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 if (process.env.NODE_ENV === 'development') {\n if (props['debug']) {\n const name = `${\n componentName || Component?.displayName || Component?.name || '[Unnamed Component]'\n }`\n const banner = `${name} ${propsIn['data-is'] || ''}`\n console.group(`%c \uD83D\uDC1B ${banner}`, 'background: yellow;')\n console.log('props', propsIn)\n console.log('ref', hostRef)\n if (props['debug'] === 'break') {\n debugger\n }\n }\n }\n\n const forceUpdate = useForceUpdate()\n const theme = useTheme(props.theme, componentName, props, forceUpdate)\n const statesUsed = useState<TamaguiComponentState>(defaultComponentState)\n const setStateShallow = createShallowUpdate(statesUsed[1])\n let state = statesUsed[0]\n\n // allow forcing a pseudo state on\n if (propsIn.forceStyle) {\n state = {\n ...state,\n [propsIn.forceStyle]: true,\n }\n }\n\n const shouldAvoidClasses = !!(props.animation && avoidClasses)\n const shouldForcePseudo = !!propsIn.forceStyle\n const hasTextAncestor = !!(isWeb ? useContext(TextAncestorContext) : false)\n const splitStyleState =\n !shouldAvoidClasses && !shouldForcePseudo\n ? {\n ...state,\n hasTextAncestor,\n dynamicStylesInline: true,\n }\n : ({\n ...state,\n noClassNames: true,\n dynamicStylesInline: true,\n hasTextAncestor,\n resolveVariablesAs: 'value',\n } as const)\n const splitStyles = useSplitStyles(\n props,\n staticConfig,\n theme,\n splitStyleState,\n props.asChild ? null : initialSplitStyles.classNames,\n props['debug']\n )\n\n const { viewProps: viewPropsIn, pseudos, medias, style, classNames } = splitStyles\n const useAnimations = tamaguiConfig.animations?.useAnimations as UseAnimationHook | undefined\n const isAnimated = !!(useAnimations && props.animation)\n const hasEnterStyle = !!props.enterStyle\n\n const animationFeatureStylesIn = props.animation ? { ...defaultNativeStyle, ...style } : null\n\n const features = useFeatures(props, {\n forceUpdate,\n setStateShallow,\n useAnimations,\n state,\n style: animationFeatureStylesIn,\n pseudos,\n staticConfig,\n theme,\n hostRef,\n onDidAnimate: props.onDidAnimate,\n })\n\n const {\n tag,\n hitSlop,\n asChild,\n children,\n onPress,\n onPressIn,\n onPressOut,\n onHoverIn,\n onHoverOut,\n space: spaceProp,\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 // get the right component\n const isTaggable = !Component || typeof Component === 'string'\n\n // default to tag, fallback to component (when both strings)\n const element = isWeb ? (isTaggable ? tag || Component : Component) : Component\n const BaseTextComponent = !isWeb ? Text : element || 'span'\n const BaseViewComponent = !isWeb ? View : element || (hasTextAncestor ? 'span' : 'div')\n let elementType = isText\n ? (isAnimated ? AnimatedText || Text : null) || BaseTextComponent\n : (isAnimated ? AnimatedView || View : null) || BaseViewComponent\n\n elementType = Component || elementType\n const isStringElement = typeof elementType === 'string'\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' && !staticConfig.isReactNativeWeb) {\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 // react-native props\n nativeID,\n\n // react-native-web accessibility props\n // @ts-ignore\n accessibilityActiveDescendant,\n // @ts-ignore\n accessibilityAtomic,\n // @ts-ignore\n accessibilityAutoComplete,\n // @ts-ignore\n accessibilityBusy,\n // @ts-ignore\n accessibilityChecked,\n // @ts-ignore\n accessibilityColumnCount,\n // @ts-ignore\n accessibilityColumnIndex,\n // @ts-ignore\n accessibilityColumnSpan,\n // @ts-ignore\n accessibilityControls,\n // @ts-ignore\n accessibilityCurrent,\n // @ts-ignore\n accessibilityDescribedBy,\n // @ts-ignore\n accessibilityDetails,\n // @ts-ignore\n accessibilityDisabled,\n // @ts-ignore\n accessibilityErrorMessage,\n // @ts-ignore\n accessibilityExpanded,\n // @ts-ignore\n accessibilityFlowTo,\n // @ts-ignore\n accessibilityHasPopup,\n // @ts-ignore\n accessibilityHidden,\n // @ts-ignore\n accessibilityInvalid,\n // @ts-ignore\n accessibilityKeyShortcuts,\n // @ts-ignore\n accessibilityLabel,\n // @ts-ignore\n accessibilityLabelledBy,\n // @ts-ignore\n accessibilityLevel,\n // @ts-ignore\n accessibilityLiveRegion,\n // @ts-ignore\n accessibilityModal,\n // @ts-ignore\n accessibilityMultiline,\n // @ts-ignore\n accessibilityMultiSelectable,\n // @ts-ignore\n accessibilityOrientation,\n // @ts-ignore\n accessibilityOwns,\n // @ts-ignore\n accessibilityPlaceholder,\n // @ts-ignore\n accessibilityPosInSet,\n // @ts-ignore\n accessibilityPressed,\n // @ts-ignore\n accessibilityReadOnly,\n // @ts-ignore\n accessibilityRequired,\n // @ts-ignore\n accessibilityRole,\n // @ts-ignore\n accessibilityRoleDescription,\n // @ts-ignore\n accessibilityRowCount,\n // @ts-ignore\n accessibilityRowIndex,\n // @ts-ignore\n accessibilityRowSpan,\n // @ts-ignore\n accessibilitySelected,\n // @ts-ignore\n accessibilitySetSize,\n // @ts-ignore\n accessibilitySort,\n // @ts-ignore\n accessibilityValueMax,\n // @ts-ignore\n accessibilityValueMin,\n // @ts-ignore\n accessibilityValueNow,\n // @ts-ignore\n accessibilityValueText,\n\n // deprecated\n accessible,\n accessibilityState,\n accessibilityValue,\n\n // android\n collapsable,\n focusable,\n\n onLayout,\n\n ...webProps\n } = nonTamaguiProps\n\n viewProps = webProps\n\n assignNativePropsToWeb(elementType, viewProps, nonTamaguiProps)\n\n useElementLayout(hostRef, onLayout)\n\n // from react-native-web\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 })\n\n // from react-native-web\n const platformMethodsRef = usePlatformMethods(viewProps)\n\n const setRef = useMergeRefs(hostRef, platformMethodsRef, forwardedRef as any)\n viewProps.ref = setRef\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 if (forwardedRef) {\n // @ts-ignore\n viewProps.ref = forwardedRef\n }\n }\n\n if (process.env.NODE_ENV === 'development' && !isText && isWeb) {\n Children.toArray(props.children).forEach((item) => {\n if (typeof item === 'string') {\n console.error(`Unexpected text node: ${item}. A text node cannot be a child of a <View>.`)\n }\n })\n }\n\n // isMounted\n const internal = useRef<{ isMounted: boolean; unmountEffects?: Function[] }>()\n if (!internal.current) {\n internal.current = {\n isMounted: true,\n }\n }\n\n useIsomorphicLayoutEffect(() => {\n // we need to use state to properly have mounted go from false => true\n if (typeof window !== 'undefined' && (hasEnterStyle || props.animation)) {\n // for SSR we never set mounted, ensuring enterStyle={{}} is set by default\n setStateShallow({\n mounted: true,\n })\n }\n\n internal.current!.isMounted = true\n return () => {\n mouseUps.delete(unPress)\n internal.current!.isMounted = false\n internal.current!.unmountEffects?.forEach((cb) => cb())\n }\n }, [hasEnterStyle, props.animation])\n\n let styles: any[]\n\n const animationStyles = state.animation ? state.animation.style : null\n\n if (isStringElement && shouldAvoidClasses && !shouldForcePseudo) {\n styles = {\n ...defaultNativeStyle,\n ...(animationStyles ?? style),\n ...medias,\n }\n } else {\n styles = [\n isWeb ? null : defaultNativeStyleSheet ? (defaultNativeStyleSheet.base as ViewStyle) : null,\n animationStyles ?? style,\n medias,\n ]\n if (!animationStyles) {\n const initPseudos = initialSplitStyles.pseudos\n const force = shouldForcePseudo\n !state.mounted && addPseudoToStyles(styles, initPseudos, pseudos, 'enterStyle')\n state.hover && addPseudoToStyles(styles, initPseudos, pseudos, 'hoverStyle', force)\n state.focus && addPseudoToStyles(styles, initPseudos, pseudos, 'focusStyle', force)\n state.press && addPseudoToStyles(styles, initPseudos, pseudos, 'pressStyle', force)\n }\n // ugly but for now...\n if (shouldForcePseudo) {\n const next = {}\n for (const style of styles) {\n if (style) {\n Object.assign(next, style)\n }\n }\n // @ts-ignore\n Object.assign(splitStyles.style, next)\n }\n }\n\n if (process.env.TAMAGUI_TARGET === 'web') {\n const fontFamilyName = isText\n ? props.fontFamily || staticConfig.defaultProps.fontFamily\n : null\n const fontFamily =\n fontFamilyName && fontFamilyName[0] === '$' ? fontFamilyName.slice(1) : null\n const classList = [\n componentName ? componentClassName : '',\n fontFamily ? `font_${fontFamily}` : '',\n theme.className,\n classNames ? Object.values(classNames).join(' ') : '',\n ]\n\n const className = classList.join(' ')\n const style = animationStyles ?? splitStyles.style\n\n // TODO this is specific to reanimated rn\n const isAnimatedReactNativeWeb = props.animation && avoidClasses\n\n if (staticConfig.isReactNativeWeb || isAnimatedReactNativeWeb) {\n viewProps.dataSet = {\n ...viewProps.dataSet,\n className,\n id: props.id,\n }\n if (props['data-is']) {\n viewProps.dataSet.is = props['data-is']\n }\n } else {\n viewProps.className = className\n }\n\n viewProps.style = style\n } else {\n viewProps.style = styles\n }\n\n // TODO need to loop active variants and see if they have matchin pseudos and apply as well\n const initialPseudos = initialSplitStyles.pseudos\n const attachPress = !!(\n pseudos?.pressStyle ||\n initialPseudos?.pressStyle ||\n onPress ||\n onPressOut ||\n onPressIn ||\n onClick\n )\n\n const isTouch = useIsTouchDevice()\n const isHoverable = isWeb && !isTouch\n const attachHover =\n isHoverable &&\n !!((pseudos && pseudos.hoverStyle) || onHoverIn || onHoverOut || onMouseEnter || onMouseLeave)\n\n const handlesPressEvents = !isStringElement && !asChild\n const pressKey = handlesPressEvents ? 'onPress' : 'onClick'\n const pressInKey = handlesPressEvents ? 'onPressIn' : 'onMouseDown'\n const pressOutKey = handlesPressEvents ? 'onPressOut' : 'onMouseUp'\n\n // check presence to prevent reparenting bugs, allows for onPress={x ? function : undefined} usage\n // while avoiding reparenting...\n // once proper reparenting is supported, we can remove this and use that...\n const shouldAttach =\n !asChild &&\n (attachPress ||\n attachHover ||\n 'pressStyle' in props ||\n 'onPress' in props ||\n 'onPressIn' in props ||\n 'onPressOut' in props ||\n (isWeb &&\n ('hoverStyle' in props ||\n 'onHoverIn' in props ||\n 'onHoverOut' in props ||\n 'onMouseEnter' in props ||\n 'onMouseLeave' in props)))\n\n const unPress = useCallback(() => {\n if (!internal.current!.isMounted) return\n setStateShallow({\n press: false,\n pressIn: false,\n })\n }, [])\n\n const events = shouldAttach\n ? {\n [pressOutKey]: attachPress\n ? (e) => {\n unPress()\n onPressOut?.(e)\n onMouseUp?.(e)\n }\n : undefined,\n ...(isHoverable && {\n onMouseEnter: attachHover\n ? (e) => {\n const next: Partial<typeof state> = {}\n if (attachHover) {\n next.hover = true\n }\n if (state.pressIn) {\n next.press = true\n }\n if (Object.keys(next).length) {\n setStateShallow(next)\n }\n onHoverIn?.(e)\n onMouseEnter?.(e)\n }\n : undefined,\n onMouseLeave: attachHover\n ? (e) => {\n const next: Partial<typeof state> = {}\n mouseUps.add(unPress)\n if (attachHover) {\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 [pressInKey]: attachPress\n ? (e) => {\n setStateShallow({\n press: true,\n pressIn: true,\n })\n onPressIn?.(e)\n onMouseDown?.(e)\n if (isWeb) {\n mouseUps.add(unPress)\n }\n }\n : null,\n [pressKey]: attachPress\n ? (e) => {\n unPress()\n onClick?.(e)\n onPress?.(e)\n }\n : null,\n\n // replicating TouchableWithoutFeedback\n ...(!isWeb && {\n cancelable: !props.rejectResponderTermination,\n disabled: props.disabled !== null ? props.disabled : props.accessibilityState?.disabled,\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 let space = spaceProp\n // find space by media query\n if (features.enabled.mediaQuery) {\n for (const key in mediaState) {\n if (!mediaState[key]) continue\n if (props[key] && props[key].space !== undefined) {\n space = props[key].space\n }\n }\n }\n\n const childEls =\n !children || asChild\n ? children\n : wrapThemeManagerContext(\n spacedChildren({\n separator,\n children,\n space,\n direction: props.spaceDirection || 'both',\n isZStack,\n }),\n getThemeManagerIfChanged(theme)\n )\n\n let content: any\n\n if (asChild) {\n elementType = Slot\n viewProps = {\n ...viewProps,\n onPress,\n onPressIn,\n onPressOut,\n }\n }\n\n // EVENTS: web\n if (isWeb) {\n const [pressableProps] = usePressable(\n events\n ? {\n disabled,\n ...(hitSlop && {\n hitSlop,\n }),\n onPressOut: events[pressOutKey],\n onPressIn: events[pressInKey],\n onPress: events[pressKey],\n }\n : {\n disabled: true,\n }\n )\n if (events) {\n if (handlesPressEvents) {\n Object.assign(viewProps, pressableProps)\n } else {\n Object.assign(viewProps, events)\n }\n }\n }\n\n // add focus events\n if (process.env.TAMAGUI_TARGET === 'native') {\n const attachFocus = !!(\n (pseudos && pseudos.focusStyle) ||\n (initialPseudos && initialPseudos.focusStyle)\n )\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\n // EVENTS native\n // replicates TouchableWithoutFeedback\n if (process.env.TAMAGUI_TARGET === 'native') {\n // only ever create once, use .configure() to update later\n const pressability = useMemo(() => {\n if (attachPress && events) {\n const pressability = new Pressability(events)\n internal.current!.unmountEffects = [\n () => {\n pressability.reset()\n },\n ]\n return pressability\n }\n }, [])\n\n if (attachPress && events) {\n pressability.configure(events)\n const eventHandlers = pressability.getEventHandlers()\n for (const key in eventHandlers) {\n if (key === 'onBlur' || key === 'onFocus') {\n // avoids the default\n continue\n }\n const og = props[key]\n const val = eventHandlers[key]\n viewProps[key] = og ? composeEventHandlers(og, val) : val\n }\n }\n }\n\n content = createElement(elementType, viewProps, childEls)\n\n if (process.env.TAMAGUI_TARGET === 'web') {\n // only necessary when animating because some AnimatedView which wraps RNW View doesn't forward dataSet className\n const isAnimatedRNWView = isAnimated && typeof elementType !== 'string' // assuming for now as reanimated is only driver\n const shouldWrapWithComponentTheme =\n isAnimatedRNWView && getReturnVariablesAs(props, splitStyleState) === 'non-color-value'\n const shouldWrapWithHover = events && attachHover\n\n if (shouldWrapWithHover || shouldWrapWithComponentTheme) {\n const themeClassName = shouldWrapWithComponentTheme ? `${theme.className}` : ''\n const hoverClassName = shouldWrapWithHover ? 't_Hoverable' : ''\n content = (\n <span\n className={`${hoverClassName} ${themeClassName}`}\n style={{\n display: 'contents',\n }}\n {...(shouldWrapWithHover && {\n onMouseEnter: events.onMouseEnter,\n onMouseLeave: events.onMouseLeave,\n })}\n >\n {content}\n </span>\n )\n }\n }\n\n if (process.env.NODE_ENV === 'development') {\n if (props['debug']) {\n console.groupCollapsed(elementType, `props out`, viewProps)\n for (const key in viewProps) {\n console.log(key, viewProps[key])\n }\n console.groupEnd()\n if (typeof window !== 'undefined') {\n // prettier-ignore\n console.log({ state, viewProps, splitStyles, animationStyles, isStringElement, classNamesIn: props.className?.split(' '), classNamesOut: viewProps.className?.split(' '), events, shouldAttach, styles, pseudos, content, childEls, shouldAvoidClasses, avoidClasses, animation: props.animation, style, defaultNativeStyle, initialSplitStyles, ...(typeof window !== 'undefined' ? { theme, themeClassName: theme.className, staticConfig, tamaguiConfig, events, shouldAvoidClasses, shouldForcePseudo, classNames: Object.fromEntries(Object.entries(classNames).map(([k, v]) => [v, getAllSelectors()[v]])) } : null) })\n }\n console.groupEnd()\n }\n }\n\n if (features.elements.length) {\n return (\n <>\n {features.elements}\n {content}\n </>\n )\n }\n\n return content\n })\n\n if (staticConfig.componentName) {\n component.displayName = staticConfig.componentName\n }\n\n // Once configuration is run and all components are registered\n // get default props + className and analyze styles\n onConfiguredOnce((conf) => {\n if (process.env.IS_STATIC === 'is_static') {\n // in static mode we just use these to lookup configuration\n return\n }\n\n tamaguiConfig = conf\n\n // do this to make sure shorthands don't duplicate with.. longhands\n mergeShorthands(staticConfig, tamaguiConfig)\n\n avoidClasses = !!tamaguiConfig.animations?.avoidClasses\n AnimatedText = tamaguiConfig.animations?.Text\n AnimatedView = tamaguiConfig?.animations?.View\n initialTheme =\n initialTheme ||\n proxyThemeVariables(conf.themes[conf.defaultTheme || Object.keys(conf.themes)[0]])\n\n // adds in user defined default props\n const config = getConfig()\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 (config.defaultProps && parentNames && staticConfig.componentName) {\n defaultPropsIn = mergeConfigDefaultProps(\n staticConfig.componentName,\n defaultPropsIn,\n config.defaultProps,\n parentNames\n )\n }\n\n const debug = process.env.NODE_ENV === 'development' ? defaultPropsIn['debug'] : false\n\n if (process.env.NODE_ENV === 'development' && debug === 'break') {\n debugger\n }\n\n // remove all classNames\n const [parentProps, parentClassNames] = mergeProps(defaultPropsIn, {}, true)\n\n initialSplitStyles = insertSplitStyles(\n parentProps,\n staticConfig,\n initialTheme,\n {\n mounted: true,\n hover: false,\n press: false,\n pressIn: false,\n focus: false,\n resolveVariablesAs: 'both',\n keepVariantsAsProps: true,\n },\n undefined,\n debug\n )\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(\n component.defaultProps as any,\n initialSplitStyles.viewProps,\n true\n )\n\n // avoid passing className props to variants\n initialSplitStyles.classNames = {\n ...parentClassNames,\n ...defaultsClassnames,\n ...initialSplitStyles.classNames,\n }\n\n defaultNativeStyle = {}\n\n const validStyles = staticConfig.validStyles || stylePropsView\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 ((typeof val === 'string' && val[0] === '$') || !validStyles[key]) {\n defaults[key] = val\n } else {\n defaultNativeStyle[key] = val\n }\n }\n }\n\n defaultNativeStyleSheet = StyleSheet.create({\n base: defaultNativeStyle,\n })\n\n if (Object.keys(defaults).length) {\n tamaguiDefaultProps = defaults\n }\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 initialSplitStyles,\n tamaguiDefaultProps,\n defaultNativeStyle,\n defaults,\n defaultPropsIn,\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 isExtractable: 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 type SpacerProps = Omit<StackProps, 'flex' | 'direction'> & {\n size?: number | SpaceTokens\n flex?: boolean | number\n direction?: SpaceDirection\n}\nexport const Spacer = createComponent<SpacerProps>({\n memo: true,\n componentName: 'Spacer',\n validStyles,\n defaultProps: {\n ...stackDefaultStyles,\n size: true,\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 },\n\n defaultVariants: {\n direction: 'both',\n },\n})\n\nexport type SpacedChildrenProps = {\n isZStack?: boolean\n children?: any\n space?: any\n spaceFlex?: boolean | number\n direction?: SpaceDirection\n separator?: React.ReactNode\n}\n\nexport function spacedChildren({\n isZStack,\n children,\n space,\n direction,\n spaceFlex,\n separator,\n}: SpacedChildrenProps) {\n const hasSpace = !!(space || spaceFlex)\n const hasSeparator = !(separator === undefined || separator === null)\n if (!hasSpace && !hasSeparator && !isZStack) {\n return children\n }\n const childrenList = Children.toArray(children)\n if (childrenList.length <= 1 && !isZStack) {\n return childrenList\n }\n const final: any[] = []\n for (const [index, child] of childrenList.entries()) {\n const isEmpty =\n child === null || child === undefined || (Array.isArray(child) && child.length === 0)\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}>{isZStack ? <AbsoluteFill>{child}</AbsoluteFill> : child}</Fragment>\n )\n }\n\n // first child unspaced avoid insert space\n if (isUnspaced(child) && index === 0) {\n continue\n }\n\n // no spacing on ZStack\n if (isZStack) {\n continue\n }\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}_before_sep_spacer`,\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}_after_sep_spacer`,\n direction,\n space,\n spaceFlex,\n })\n )\n }\n } else {\n final.push(\n createSpacer({\n key: `_${index}_spacer`,\n direction,\n space,\n spaceFlex,\n })\n )\n }\n }\n }\n\n return final\n}\n\ntype CreateSpacerProps = SpacedChildrenProps & { key: string }\n\nfunction createSpacer({ key, direction, space, spaceFlex }: CreateSpacerProps) {\n return (\n <Spacer\n key={key}\n size={space}\n direction={direction}\n {...(spaceFlex && {\n flex: spaceFlex,\n })}\n />\n )\n}\n\nfunction isUnspaced(child: any) {\n return child?.['type']?.['isVisuallyHidden'] || child?.['type']?.['isUnspaced']\n}\n\nexport function AbsoluteFill(props: { children?: React.ReactNode }) {\n return (\n <View pointerEvents=\"box-none\" style={StyleSheet.absoluteFill}>\n {props.children}\n </View>\n )\n}\n\n// this can be done with CSS entirely right?\n// const shouldWrapTextAncestor = isWeb && isText && !hasTextAncestor\n// if (shouldWrapTextAncestor) {\n// // from react-native-web\n// content = createElement(TextAncestorContext.Provider, { value: true }, content)\n// }\n\nexport function processIDRefList(idRefList: string | Array<string>): string {\n return Array.isArray(idRefList) ? idRefList.join(' ') : idRefList\n}\n\nexport const accessibilityRoleToWebRole = {\n adjustable: 'slider',\n button: 'button',\n header: 'heading',\n image: 'img',\n imagebutton: null,\n keyboardkey: null,\n label: null,\n link: 'link',\n none: 'presentation',\n search: 'search',\n summary: 'region',\n text: null,\n}\n\nfunction addPseudoToStyles(\n styles: any[],\n initialPseudos: SplitStyleResult['pseudos'],\n pseudos: any,\n name: string,\n force = false\n) {\n // on web use pseudo object { hoverStyle } to keep specificity with concatClassName\n const pseudoStyle = pseudos[name]\n const shouldNestObject = isWeb && name !== 'enterStyle' && name !== 'exitStyle'\n const defaultPseudoStyle = initialPseudos[name]\n const style = defaultPseudoStyle ? { ...defaultPseudoStyle, ...pseudoStyle } : pseudoStyle\n if (style) {\n styles.push(shouldNestObject && !force ? { [name]: style } : style)\n }\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) {\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)[0]\n console.log('set prev', prev)\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 (our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MAAM;AAAA,EACN,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,MAAM;AACR;AAEA,2BACE,QACA,gBACA,SACA,MACA,QAAQ,OACR;AAEA,QAAM,cAAc,QAAQ;AAC5B,QAAM,mBAAmB,SAAS,SAAS,gBAAgB,SAAS;AACpE,QAAM,qBAAqB,eAAe;AAC1C,QAAM,QAAQ,qBAAqB,kCAAK,qBAAuB,eAAgB;AAC/E,MAAI,OAAO;AACT,WAAO,KAAK,oBAAoB,CAAC,QAAQ,EAAE,CAAC,OAAO,MAAM,IAAI,KAAK;AAAA,EACpE;AACF;AAEA,MAAM,eAAe,oBAAI,IAAI;AAE7B,iCACE,MACA,OACA,gBACA,aACA;AACA,QAAM,MAAM,YAAY;AACxB,MAAI;AAEJ,WAAS,IAAI,GAAG,IAAI,KAAK,KAAK;AAC5B,UAAM,IAAI,YAAY;AACtB,QAAI,CAAC;AAAG;AACR,QAAI,aAAa,IAAI,CAAC,GAAG;AACvB,aAAO,aAAa,IAAI,CAAC;AACzB;AAAA,IACF;AACA,UAAM,SAAQ,eAAe;AAC7B,QAAI,CAAC,QAAO;AACV,UAAI,MAAM;AACR,qBAAa,IAAI,GAAG,IAAI;AAAA,MAC1B;AACA;AAAA,IACF;AACA,WAAO,WAAW,QAAQ,CAAC,GAAG,MAAK,EAAE;AACrC,YAAQ,IAAI,YAAY,IAAI;AAC5B,iBAAa,IAAI,GAAG,IAAI;AAAA,EAC1B;AAGA,QAAM,oBAAoB,aAAa,IAAI,IAAI;AAC/C,MAAI,mBAAmB;AACrB,WAAO,WAAW,OAAO,iBAAiB,EAAE;AAAA,EAC9C;AACA,SAAO;AACT;",
4
+ "sourcesContent": ["import { composeEventHandlers, stylePropsView, validStyles } from '@tamagui/helpers'\nimport {\n useElementLayout,\n useMergeRefs,\n usePlatformMethods,\n useResponderEvents,\n} from '@tamagui/rnw'\nimport { useForceUpdate } from '@tamagui/use-force-update'\nimport React, {\n Children,\n Fragment,\n createElement,\n forwardRef,\n memo,\n useCallback,\n useContext,\n useMemo,\n useRef,\n useState,\n} from 'react'\nimport { StyleSheet, Text, View, ViewStyle } from 'react-native'\n\nimport { getConfig, onConfiguredOnce } from './conf'\nimport { stackDefaultStyles } from './constants/constants'\nimport { isWeb, useIsomorphicLayoutEffect } from './constants/platform'\nimport { assignNativePropsToWeb } from './helpers/assignNativePropsToWeb'\nimport { getReturnVariablesAs } from './helpers/createPropMapper'\nimport { createShallowUpdate } from './helpers/createShallowUpdate'\nimport { extendStaticConfig, parseStaticConfig } from './helpers/extendStaticConfig'\nimport { SplitStyleResult, insertSplitStyles, useSplitStyles } from './helpers/getSplitStyles'\nimport { getAllSelectors } from './helpers/insertStyleRule'\nimport { mergeProps } from './helpers/mergeProps'\nimport { proxyThemeVariables } from './helpers/proxyThemeVariables'\nimport { wrapThemeManagerContext } from './helpers/wrapThemeManagerContext'\nimport { useFeatures } from './hooks/useFeatures'\nimport { useIsTouchDevice } from './hooks/useIsTouchDevice'\nimport { mediaState } from './hooks/useMedia'\nimport { usePressable } from './hooks/usePressable'\nimport { getThemeManagerIfChanged, useTheme } from './hooks/useTheme'\nimport { Pressability } from './Pressability'\nimport {\n SpaceDirection,\n SpaceTokens,\n StackProps,\n StaticConfig,\n StaticConfigParsed,\n StylableComponent,\n TamaguiComponent,\n TamaguiComponentState,\n TamaguiConfig,\n TamaguiElement,\n TamaguiInternalConfig,\n UseAnimationHook,\n} from './types'\nimport { Slot, mergeEvent } from './views/Slot'\nimport { TextAncestorContext } from './views/TextAncestorContext'\n\nReact['keep']\n\nconst defaultComponentState: TamaguiComponentState = Object.freeze({\n hover: false,\n press: false,\n pressIn: false,\n focus: false,\n // only used by enterStyle\n mounted: false,\n animation: null,\n})\n\nexport const mouseUps = new Set<Function>()\nif (typeof document !== 'undefined') {\n document.addEventListener('mouseup', () => {\n mouseUps.forEach((x) => x())\n mouseUps.clear()\n })\n document.addEventListener('touchend', () => {\n mouseUps.forEach((x) => x())\n mouseUps.clear()\n })\n document.addEventListener('touchcancel', () => {\n mouseUps.forEach((x) => x())\n mouseUps.clear()\n })\n}\n\n// mutates\nfunction mergeShorthands({ defaultProps }: StaticConfigParsed, { shorthands }: TamaguiConfig) {\n // they are defined in correct order already { ...parent, ...child }\n for (const key in defaultProps) {\n defaultProps[shorthands[key] || key] = defaultProps[key]\n }\n}\n\nlet initialTheme: any\n\nexport function createComponent<\n ComponentPropTypes extends Object = {},\n Ref = TamaguiElement,\n BaseProps = never\n>(configIn: Partial<StaticConfig> | StaticConfigParsed, ParentComponent?: StylableComponent) {\n const staticConfig = (() => {\n const config = extendStaticConfig(configIn, ParentComponent)\n if ('parsed' in config) {\n return config\n } else {\n return parseStaticConfig(config)\n }\n })()\n\n const defaultComponentClassName = `is_${staticConfig.componentName}`\n let tamaguiConfig: TamaguiInternalConfig\n let AnimatedText: any\n let AnimatedView: any\n let avoidClasses = true\n let defaultNativeStyle: any\n let defaultNativeStyleSheet: StyleSheet.NamedStyles<{ base: {} }>\n let tamaguiDefaultProps: any\n let initialSplitStyles: SplitStyleResult\n\n // see onConfiguredOnce below which attaches a name then to this component\n const component = forwardRef<Ref, ComponentPropTypes>((propsIn: any, forwardedRef) => {\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 hostRef = useRef<HTMLElement | View>(null)\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 if (process.env.NODE_ENV === 'development') {\n if (props['debug']) {\n const name = `${\n componentName || Component?.displayName || Component?.name || '[Unnamed Component]'\n }`\n const banner = `${name} ${propsIn['data-is'] || ''}`\n console.group(`%c \uD83D\uDC1B ${banner}`, 'background: yellow;')\n console.log('props', propsIn)\n console.log('ref', hostRef)\n if (props['debug'] === 'break') {\n debugger\n }\n }\n }\n\n const forceUpdate = useForceUpdate()\n const theme = useTheme(props.theme, componentName, props, forceUpdate)\n const statesUsed = useState<TamaguiComponentState>(defaultComponentState)\n const setStateShallow = createShallowUpdate(statesUsed[1])\n let state = statesUsed[0]\n\n // allow forcing a pseudo state on\n if (propsIn.forceStyle) {\n state = {\n ...state,\n [propsIn.forceStyle]: true,\n }\n }\n\n const shouldAvoidClasses = !!(props.animation && avoidClasses)\n const shouldForcePseudo = !!propsIn.forceStyle\n const hasTextAncestor = !!(isWeb ? useContext(TextAncestorContext) : false)\n const splitStyleState =\n !shouldAvoidClasses && !shouldForcePseudo\n ? {\n ...state,\n hasTextAncestor,\n dynamicStylesInline: true,\n }\n : ({\n ...state,\n noClassNames: true,\n dynamicStylesInline: true,\n hasTextAncestor,\n resolveVariablesAs: 'value',\n } as const)\n const splitStyles = useSplitStyles(\n props,\n staticConfig,\n theme,\n splitStyleState,\n props.asChild ? null : initialSplitStyles.classNames,\n props['debug']\n )\n\n const { viewProps: viewPropsIn, pseudos, medias, style, classNames } = splitStyles\n const useAnimations = tamaguiConfig.animations?.useAnimations as UseAnimationHook | undefined\n const isAnimated = !!(useAnimations && props.animation)\n const hasEnterStyle = !!props.enterStyle\n\n const animationFeatureStylesIn = props.animation ? { ...defaultNativeStyle, ...style } : null\n\n const features = useFeatures(props, {\n forceUpdate,\n setStateShallow,\n useAnimations,\n state,\n style: animationFeatureStylesIn,\n pseudos,\n staticConfig,\n theme,\n hostRef,\n onDidAnimate: props.onDidAnimate,\n })\n\n const {\n tag,\n hitSlop,\n asChild,\n children,\n onPress,\n onPressIn,\n onPressOut,\n onHoverIn,\n onHoverOut,\n space: spaceProp,\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 // get the right component\n const isTaggable = !Component || typeof Component === 'string'\n\n // default to tag, fallback to component (when both strings)\n const element = isWeb ? (isTaggable ? tag || Component : Component) : Component\n const BaseTextComponent = !isWeb ? Text : element || 'span'\n const BaseViewComponent = !isWeb ? View : element || (hasTextAncestor ? 'span' : 'div')\n let elementType = isText\n ? (isAnimated ? AnimatedText || Text : null) || BaseTextComponent\n : (isAnimated ? AnimatedView || View : null) || BaseViewComponent\n\n elementType = Component || elementType\n const isStringElement = typeof elementType === 'string'\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' && !staticConfig.isReactNativeWeb) {\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 // react-native props\n nativeID,\n\n // react-native-web accessibility props\n // @ts-ignore\n accessibilityActiveDescendant,\n // @ts-ignore\n accessibilityAtomic,\n // @ts-ignore\n accessibilityAutoComplete,\n // @ts-ignore\n accessibilityBusy,\n // @ts-ignore\n accessibilityChecked,\n // @ts-ignore\n accessibilityColumnCount,\n // @ts-ignore\n accessibilityColumnIndex,\n // @ts-ignore\n accessibilityColumnSpan,\n // @ts-ignore\n accessibilityControls,\n // @ts-ignore\n accessibilityCurrent,\n // @ts-ignore\n accessibilityDescribedBy,\n // @ts-ignore\n accessibilityDetails,\n // @ts-ignore\n accessibilityDisabled,\n // @ts-ignore\n accessibilityErrorMessage,\n // @ts-ignore\n accessibilityExpanded,\n // @ts-ignore\n accessibilityFlowTo,\n // @ts-ignore\n accessibilityHasPopup,\n // @ts-ignore\n accessibilityHidden,\n // @ts-ignore\n accessibilityInvalid,\n // @ts-ignore\n accessibilityKeyShortcuts,\n // @ts-ignore\n accessibilityLabel,\n // @ts-ignore\n accessibilityLabelledBy,\n // @ts-ignore\n accessibilityLevel,\n // @ts-ignore\n accessibilityLiveRegion,\n // @ts-ignore\n accessibilityModal,\n // @ts-ignore\n accessibilityMultiline,\n // @ts-ignore\n accessibilityMultiSelectable,\n // @ts-ignore\n accessibilityOrientation,\n // @ts-ignore\n accessibilityOwns,\n // @ts-ignore\n accessibilityPlaceholder,\n // @ts-ignore\n accessibilityPosInSet,\n // @ts-ignore\n accessibilityPressed,\n // @ts-ignore\n accessibilityReadOnly,\n // @ts-ignore\n accessibilityRequired,\n // @ts-ignore\n accessibilityRole,\n // @ts-ignore\n accessibilityRoleDescription,\n // @ts-ignore\n accessibilityRowCount,\n // @ts-ignore\n accessibilityRowIndex,\n // @ts-ignore\n accessibilityRowSpan,\n // @ts-ignore\n accessibilitySelected,\n // @ts-ignore\n accessibilitySetSize,\n // @ts-ignore\n accessibilitySort,\n // @ts-ignore\n accessibilityValueMax,\n // @ts-ignore\n accessibilityValueMin,\n // @ts-ignore\n accessibilityValueNow,\n // @ts-ignore\n accessibilityValueText,\n\n // deprecated\n accessible,\n accessibilityState,\n accessibilityValue,\n\n // android\n collapsable,\n focusable,\n\n onLayout,\n\n ...webProps\n } = nonTamaguiProps\n\n viewProps = webProps\n\n assignNativePropsToWeb(elementType, viewProps, nonTamaguiProps)\n\n useElementLayout(hostRef, onLayout)\n\n // from react-native-web\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 })\n\n // from react-native-web\n const platformMethodsRef = usePlatformMethods(viewProps)\n\n const setRef = useMergeRefs(hostRef, platformMethodsRef, forwardedRef as any)\n viewProps.ref = setRef\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 if (forwardedRef) {\n // @ts-ignore\n viewProps.ref = forwardedRef\n }\n }\n\n if (process.env.NODE_ENV === 'development' && !isText && isWeb) {\n Children.toArray(props.children).forEach((item) => {\n if (typeof item === 'string') {\n console.error(`Unexpected text node: ${item}. A text node cannot be a child of a <View>.`)\n }\n })\n }\n\n // isMounted\n const internal = useRef<{ isMounted: boolean; unmountEffects?: Function[] }>()\n if (!internal.current) {\n internal.current = {\n isMounted: true,\n }\n }\n\n useIsomorphicLayoutEffect(() => {\n // we need to use state to properly have mounted go from false => true\n if (typeof window !== 'undefined' && (hasEnterStyle || props.animation)) {\n // for SSR we never set mounted, ensuring enterStyle={{}} is set by default\n setStateShallow({\n mounted: true,\n })\n }\n\n internal.current!.isMounted = true\n return () => {\n mouseUps.delete(unPress)\n internal.current!.isMounted = false\n internal.current!.unmountEffects?.forEach((cb) => cb())\n }\n }, [hasEnterStyle, props.animation])\n\n let styles: any[]\n\n const animationStyles = state.animation ? state.animation.style : null\n\n if (isStringElement && shouldAvoidClasses && !shouldForcePseudo) {\n styles = {\n ...defaultNativeStyle,\n ...(animationStyles ?? style),\n ...medias,\n }\n } else {\n styles = [\n isWeb ? null : defaultNativeStyleSheet ? (defaultNativeStyleSheet.base as ViewStyle) : null,\n animationStyles ?? style,\n medias,\n ]\n if (!animationStyles) {\n const initPseudos = initialSplitStyles.pseudos\n const force = shouldForcePseudo\n !state.mounted && addPseudoToStyles(styles, initPseudos, pseudos, 'enterStyle')\n state.hover && addPseudoToStyles(styles, initPseudos, pseudos, 'hoverStyle', force)\n state.focus && addPseudoToStyles(styles, initPseudos, pseudos, 'focusStyle', force)\n state.press && addPseudoToStyles(styles, initPseudos, pseudos, 'pressStyle', force)\n }\n // ugly but for now...\n if (shouldForcePseudo) {\n const next = {}\n for (const style of styles) {\n if (style) {\n Object.assign(next, style)\n }\n }\n // @ts-ignore\n Object.assign(splitStyles.style, next)\n }\n }\n\n if (process.env.TAMAGUI_TARGET === 'web') {\n const fontFamilyName = isText\n ? props.fontFamily || staticConfig.defaultProps.fontFamily\n : null\n const fontFamily =\n fontFamilyName && fontFamilyName[0] === '$' ? fontFamilyName.slice(1) : null\n const classList = [\n componentName ? componentClassName : '',\n fontFamily ? `font_${fontFamily}` : '',\n theme.className,\n classNames ? Object.values(classNames).join(' ') : '',\n ]\n\n const className = classList.join(' ')\n const style = animationStyles ?? splitStyles.style\n\n // TODO this is specific to reanimated rn\n const isAnimatedReactNativeWeb = props.animation && avoidClasses\n\n if (staticConfig.isReactNativeWeb || isAnimatedReactNativeWeb) {\n viewProps.dataSet = {\n ...viewProps.dataSet,\n className,\n id: props.id,\n }\n if (props['data-is']) {\n viewProps.dataSet.is = props['data-is']\n }\n } else {\n viewProps.className = className\n }\n\n viewProps.style = style\n } else {\n viewProps.style = styles\n }\n\n // TODO need to loop active variants and see if they have matchin pseudos and apply as well\n const initialPseudos = initialSplitStyles.pseudos\n const attachPress = !!(\n pseudos?.pressStyle ||\n initialPseudos?.pressStyle ||\n onPress ||\n onPressOut ||\n onPressIn ||\n onClick\n )\n\n const isTouch = useIsTouchDevice()\n const isHoverable = isWeb && !isTouch\n const attachHover =\n isHoverable &&\n !!((pseudos && pseudos.hoverStyle) || onHoverIn || onHoverOut || onMouseEnter || onMouseLeave)\n\n const handlesPressEvents = !isStringElement && !asChild\n const pressKey = handlesPressEvents ? 'onPress' : 'onClick'\n const pressInKey = handlesPressEvents ? 'onPressIn' : 'onMouseDown'\n const pressOutKey = handlesPressEvents ? 'onPressOut' : 'onMouseUp'\n\n // check presence to prevent reparenting bugs, allows for onPress={x ? function : undefined} usage\n // while avoiding reparenting...\n // once proper reparenting is supported, we can remove this and use that...\n const shouldAttach =\n !asChild &&\n (attachPress ||\n attachHover ||\n 'pressStyle' in props ||\n 'onPress' in props ||\n 'onPressIn' in props ||\n 'onPressOut' in props ||\n (isWeb &&\n ('hoverStyle' in props ||\n 'onHoverIn' in props ||\n 'onHoverOut' in props ||\n 'onMouseEnter' in props ||\n 'onMouseLeave' in props)))\n\n const unPress = useCallback(() => {\n if (!internal.current!.isMounted) return\n setStateShallow({\n press: false,\n pressIn: false,\n })\n }, [])\n\n const events = shouldAttach\n ? {\n [pressOutKey]: attachPress\n ? (e) => {\n unPress()\n onPressOut?.(e)\n onMouseUp?.(e)\n }\n : undefined,\n ...(isHoverable && {\n onMouseEnter: attachHover\n ? (e) => {\n const next: Partial<typeof state> = {}\n if (attachHover) {\n next.hover = true\n }\n if (state.pressIn) {\n next.press = true\n }\n if (Object.keys(next).length) {\n setStateShallow(next)\n }\n onHoverIn?.(e)\n onMouseEnter?.(e)\n }\n : undefined,\n onMouseLeave: attachHover\n ? (e) => {\n const next: Partial<typeof state> = {}\n mouseUps.add(unPress)\n if (attachHover) {\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 [pressInKey]: attachPress\n ? (e) => {\n setStateShallow({\n press: true,\n pressIn: true,\n })\n onPressIn?.(e)\n onMouseDown?.(e)\n if (isWeb) {\n mouseUps.add(unPress)\n }\n }\n : null,\n [pressKey]: attachPress\n ? (e) => {\n unPress()\n onClick?.(e)\n onPress?.(e)\n }\n : null,\n\n // replicating TouchableWithoutFeedback\n ...(!isWeb && {\n cancelable: !props.rejectResponderTermination,\n disabled: props.disabled !== null ? props.disabled : props.accessibilityState?.disabled,\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 let space = spaceProp\n // find space by media query\n if (features.enabled.mediaQuery) {\n for (const key in mediaState) {\n if (!mediaState[key]) continue\n if (props[key] && props[key].space !== undefined) {\n space = props[key].space\n }\n }\n }\n\n const childEls =\n !children || asChild\n ? children\n : wrapThemeManagerContext(\n spacedChildren({\n separator,\n children,\n space,\n direction: props.spaceDirection || 'both',\n isZStack,\n }),\n getThemeManagerIfChanged(theme)\n )\n\n let content: any\n\n if (asChild) {\n elementType = Slot\n viewProps = {\n ...viewProps,\n onPress,\n onPressIn,\n onPressOut,\n }\n }\n\n // EVENTS: web\n if (isWeb) {\n const [pressableProps] = usePressable(\n events\n ? {\n disabled,\n ...(hitSlop && {\n hitSlop,\n }),\n onPressOut: events[pressOutKey],\n onPressIn: events[pressInKey],\n onPress: events[pressKey],\n }\n : {\n disabled: true,\n }\n )\n if (events) {\n if (handlesPressEvents) {\n Object.assign(viewProps, pressableProps)\n } else {\n Object.assign(viewProps, events)\n }\n }\n }\n\n // add focus events\n if (process.env.TAMAGUI_TARGET === 'native') {\n const attachFocus = !!(\n (pseudos && pseudos.focusStyle) ||\n (initialPseudos && initialPseudos.focusStyle)\n )\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\n // EVENTS native\n // replicates TouchableWithoutFeedback\n if (process.env.TAMAGUI_TARGET === 'native') {\n // only ever create once, use .configure() to update later\n const pressability = useMemo(() => {\n if (attachPress && events) {\n const pressability = new Pressability(events)\n internal.current!.unmountEffects = [\n () => {\n pressability.reset()\n },\n ]\n return pressability\n }\n }, [])\n\n if (attachPress && events) {\n pressability.configure(events)\n const eventHandlers = pressability.getEventHandlers()\n for (const key in eventHandlers) {\n if (key === 'onBlur' || key === 'onFocus') {\n // avoids the default\n continue\n }\n const og = props[key]\n const val = eventHandlers[key]\n viewProps[key] = og ? composeEventHandlers(og, val) : val\n }\n }\n }\n\n content = createElement(elementType, viewProps, childEls)\n\n if (process.env.TAMAGUI_TARGET === 'web') {\n // only necessary when animating because some AnimatedView which wraps RNW View doesn't forward dataSet className\n const isAnimatedRNWView = isAnimated && typeof elementType !== 'string' // assuming for now as reanimated is only driver\n const shouldWrapWithComponentTheme =\n isAnimatedRNWView && getReturnVariablesAs(props, splitStyleState) === 'non-color-value'\n const shouldWrapWithHover = events && attachHover\n\n if (shouldWrapWithHover || shouldWrapWithComponentTheme) {\n const themeClassName = shouldWrapWithComponentTheme ? `${theme.className}` : ''\n const hoverClassName = shouldWrapWithHover ? 't_Hoverable' : ''\n content = (\n <span\n className={`${hoverClassName} ${themeClassName}`}\n style={{\n display: 'contents',\n }}\n {...(shouldWrapWithHover && {\n onMouseEnter: events.onMouseEnter,\n onMouseLeave: events.onMouseLeave,\n })}\n >\n {content}\n </span>\n )\n }\n }\n\n if (process.env.NODE_ENV === 'development') {\n if (props['debug']) {\n console.groupCollapsed(elementType, `props out`, viewProps)\n for (const key in viewProps) {\n console.log(key, viewProps[key])\n }\n console.groupEnd()\n if (typeof window !== 'undefined') {\n // prettier-ignore\n console.log({ state, viewProps, splitStyles, animationStyles, isStringElement, classNamesIn: props.className?.split(' '), classNamesOut: viewProps.className?.split(' '), events, shouldAttach, styles, pseudos, content, childEls, shouldAvoidClasses, avoidClasses, animation: props.animation, style, defaultNativeStyle, initialSplitStyles, ...(typeof window !== 'undefined' ? { theme, themeClassName: theme.className, staticConfig, tamaguiConfig, events, shouldAvoidClasses, shouldForcePseudo, classNames: Object.fromEntries(Object.entries(classNames).map(([k, v]) => [v, getAllSelectors()[v]])) } : null) })\n }\n console.groupEnd()\n }\n }\n\n if (features.elements.length) {\n return (\n <>\n {features.elements}\n {content}\n </>\n )\n }\n\n return content\n })\n\n if (staticConfig.componentName) {\n component.displayName = staticConfig.componentName\n }\n\n // Once configuration is run and all components are registered\n // get default props + className and analyze styles\n onConfiguredOnce((conf) => {\n if (process.env.IS_STATIC === 'is_static') {\n // in static mode we just use these to lookup configuration\n return\n }\n\n tamaguiConfig = conf\n\n // do this to make sure shorthands don't duplicate with.. longhands\n mergeShorthands(staticConfig, tamaguiConfig)\n\n avoidClasses = !!tamaguiConfig.animations?.avoidClasses\n AnimatedText = tamaguiConfig.animations?.Text\n AnimatedView = tamaguiConfig?.animations?.View\n initialTheme =\n initialTheme ||\n proxyThemeVariables(conf.themes[conf.defaultTheme || Object.keys(conf.themes)[0]])\n\n // adds in user defined default props\n const config = getConfig()\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 (config.defaultProps && parentNames && staticConfig.componentName) {\n defaultPropsIn = mergeConfigDefaultProps(\n staticConfig.componentName,\n defaultPropsIn,\n config.defaultProps,\n parentNames\n )\n }\n\n const debug = process.env.NODE_ENV === 'development' ? defaultPropsIn['debug'] : false\n\n if (process.env.NODE_ENV === 'development' && debug === 'break') {\n debugger\n }\n\n // remove all classNames\n const [parentProps, parentClassNames] = mergeProps(defaultPropsIn, {}, true)\n\n initialSplitStyles = insertSplitStyles(\n parentProps,\n staticConfig,\n initialTheme,\n {\n mounted: true,\n hover: false,\n press: false,\n pressIn: false,\n focus: false,\n resolveVariablesAs: 'both',\n keepVariantsAsProps: true,\n },\n undefined,\n debug\n )\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(\n component.defaultProps as any,\n initialSplitStyles.viewProps,\n true\n )\n\n // avoid passing className props to variants\n initialSplitStyles.classNames = {\n ...parentClassNames,\n ...defaultsClassnames,\n ...initialSplitStyles.classNames,\n }\n\n defaultNativeStyle = {}\n\n const validStyles = staticConfig.validStyles || stylePropsView\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 ((typeof val === 'string' && val[0] === '$') || !validStyles[key]) {\n defaults[key] = val\n } else {\n defaultNativeStyle[key] = val\n }\n }\n }\n\n defaultNativeStyleSheet = StyleSheet.create({\n base: defaultNativeStyle,\n })\n\n if (Object.keys(defaults).length) {\n tamaguiDefaultProps = defaults\n }\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 initialSplitStyles,\n tamaguiDefaultProps,\n defaultNativeStyle,\n defaults,\n defaultPropsIn,\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 isExtractable: 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 type SpacerProps = Omit<StackProps, 'flex' | 'direction' | 'size'> & {\n size?: number | SpaceTokens | null\n flex?: boolean | number\n direction?: SpaceDirection\n}\nexport const Spacer = createComponent<SpacerProps>({\n memo: true,\n componentName: 'Spacer',\n validStyles,\n defaultProps: {\n ...stackDefaultStyles,\n size: true,\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 },\n\n defaultVariants: {\n direction: 'both',\n },\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}\n\nexport function spacedChildren({\n isZStack,\n children,\n space,\n direction,\n spaceFlex,\n separator,\n}: SpacedChildrenProps) {\n const hasSpace = !!(space || spaceFlex)\n const hasSeparator = !(separator === undefined || separator === null)\n if (!hasSpace && !hasSeparator && !isZStack) {\n return children\n }\n const childrenList = Children.toArray(children)\n if (childrenList.length <= 1 && !isZStack) {\n return childrenList\n }\n const final: React.ReactNode[] = []\n for (const [index, child] of childrenList.entries()) {\n const isEmpty =\n child === null || child === undefined || (Array.isArray(child) && child.length === 0)\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}>{isZStack ? <AbsoluteFill>{child}</AbsoluteFill> : child}</Fragment>\n )\n }\n\n // first child unspaced avoid insert space\n if (isUnspaced(child) && index === 0) {\n continue\n }\n\n // no spacing on ZStack\n if (isZStack) {\n continue\n }\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}_before_sep_spacer`,\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}_after_sep_spacer`,\n direction,\n space,\n spaceFlex,\n })\n )\n }\n } else {\n final.push(\n createSpacer({\n key: `_${index}_spacer`,\n direction,\n space,\n spaceFlex,\n })\n )\n }\n }\n }\n\n return final\n}\n\ntype CreateSpacerProps = SpacedChildrenProps & { key: string }\n\nfunction createSpacer({ key, direction, space, spaceFlex }: CreateSpacerProps) {\n return (\n <Spacer\n key={key}\n size={space}\n direction={direction}\n {...(spaceFlex && {\n flex: spaceFlex,\n })}\n />\n )\n}\n\nfunction isUnspaced(child: React.ReactNode) {\n // console.log('unspaced?', child)\n return child?.['type']?.['isVisuallyHidden'] || child?.['type']?.['isUnspaced']\n}\n\nexport function AbsoluteFill(props: { children?: React.ReactNode }) {\n return (\n <View pointerEvents=\"box-none\" style={StyleSheet.absoluteFill}>\n {props.children}\n </View>\n )\n}\n\n// this can be done with CSS entirely right?\n// const shouldWrapTextAncestor = isWeb && isText && !hasTextAncestor\n// if (shouldWrapTextAncestor) {\n// // from react-native-web\n// content = createElement(TextAncestorContext.Provider, { value: true }, content)\n// }\n\nexport function processIDRefList(idRefList: string | Array<string>): string {\n return Array.isArray(idRefList) ? idRefList.join(' ') : idRefList\n}\n\nexport const accessibilityRoleToWebRole = {\n adjustable: 'slider',\n button: 'button',\n header: 'heading',\n image: 'img',\n imagebutton: null,\n keyboardkey: null,\n label: null,\n link: 'link',\n none: 'presentation',\n search: 'search',\n summary: 'region',\n text: null,\n}\n\nfunction addPseudoToStyles(\n styles: any[],\n initialPseudos: SplitStyleResult['pseudos'],\n pseudos: any,\n name: string,\n force = false\n) {\n // on web use pseudo object { hoverStyle } to keep specificity with concatClassName\n const pseudoStyle = pseudos[name]\n const shouldNestObject = isWeb && name !== 'enterStyle' && name !== 'exitStyle'\n const defaultPseudoStyle = initialPseudos[name]\n const style = defaultPseudoStyle ? { ...defaultPseudoStyle, ...pseudoStyle } : pseudoStyle\n if (style) {\n styles.push(shouldNestObject && !force ? { [name]: style } : style)\n }\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) {\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)[0]\n console.log('set prev', prev)\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)[0]\n }\n return props\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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Ae;AAC1C,QAAM,QAAQ,qBAAqB,kCAAK,qBAAuB,eAAgB;AAC/E,MAAI,OAAO;AACT,WAAO,KAAK,oBAAoB,CAAC,QAAQ,EAAE,CAAC,OAAO,MAAM,IAAI,KAAK;AAAA,EACpE;AACF;AAEA,MAAM,eAAe,oBAAI,IAAI;AAE7B,iCACE,MACA,OACA,gBACA,aACA;AACA,QAAM,MAAM,YAAY;AACxB,MAAI;AAEJ,WAAS,IAAI,GAAG,IAAI,KAAK,KAAK;AAC5B,UAAM,IAAI,YAAY;AACtB,QAAI,CAAC;AAAG;AACR,QAAI,aAAa,IAAI,CAAC,GAAG;AACvB,aAAO,aAAa,IAAI,CAAC;AACzB;AAAA,IACF;AACA,UAAM,SAAQ,eAAe;AAC7B,QAAI,CAAC,QAAO;AACV,UAAI,MAAM;AACR,qBAAa,IAAI,GAAG,IAAI;AAAA,MAC1B;AACA;AAAA,IACF;AACA,WAAO,WAAW,QAAQ,CAAC,GAAG,MAAK,EAAE;AACrC,YAAQ,IAAI,YAAY,IAAI;AAC5B,iBAAa,IAAI,GAAG,IAAI;AAAA,EAC1B;AAGA,QAAM,oBAAoB,aAAa,IAAI,IAAI;AAC/C,MAAI,mBAAmB;AACrB,WAAO,WAAW,OAAO,iBAAiB,EAAE;AAAA,EAC9C;AACA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,27 @@
1
+ import { simpleHash } from "@tamagui/helpers";
2
+ function cssHash(val, maxLen = 10) {
3
+ if (val.length < maxLen) {
4
+ let res = "";
5
+ for (let i = 0; i < val.length; i++) {
6
+ const char = val[i];
7
+ if (specials[char]) {
8
+ res += specials[char];
9
+ } else {
10
+ res += validCSS.test(char) ? char : "_" + char.charCodeAt(0).toString();
11
+ }
12
+ }
13
+ return res;
14
+ }
15
+ return simpleHash(val);
16
+ }
17
+ const validCSS = /[a-z0-9]/i;
18
+ const specials = {
19
+ ".": "dot",
20
+ ",": "_",
21
+ "%": "pct",
22
+ "-": "neg"
23
+ };
24
+ export {
25
+ cssHash
26
+ };
27
+ //# sourceMappingURL=cssHash.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/helpers/cssHash.ts"],
4
+ "sourcesContent": ["import { simpleHash } from '@tamagui/helpers'\n\n// not sure it's worth the extra weight, could be dev time though\n// affordances for simple values\nexport function cssHash(val: string, maxLen = 10) {\n if (val.length < maxLen) {\n let res = ''\n for (let i = 0; i < val.length; i++) {\n const char = val[i]\n if (specials[char]) {\n res += specials[char]\n } else {\n res += validCSS.test(char) ? char : '_' + char.charCodeAt(0).toString()\n }\n }\n return res\n }\n return simpleHash(val)\n}\n\nconst validCSS = /[a-z0-9]/i\n\nconst specials = {\n '.': 'dot',\n ',': '_',\n '%': 'pct',\n '-': 'neg',\n}\n"],
5
+ "mappings": "AAAA;AAIO,iBAAiB,KAAa,SAAS,IAAI;AAChD,MAAI,IAAI,SAAS,QAAQ;AACvB,QAAI,MAAM;AACV,aAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;AACnC,YAAM,OAAO,IAAI;AACjB,UAAI,SAAS,OAAO;AAClB,eAAO,SAAS;AAAA,MAClB,OAAO;AACL,eAAO,SAAS,KAAK,IAAI,IAAI,OAAO,MAAM,KAAK,WAAW,CAAC,EAAE,SAAS;AAAA,MACxE;AAAA,IACF;AACA,WAAO;AAAA,EACT;AACA,SAAO,WAAW,GAAG;AACvB;AAEA,MAAM,WAAW;AAEjB,MAAM,WAAW;AAAA,EACf,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AACP;",
6
+ "names": []
7
+ }
@@ -16,9 +16,6 @@ var __spreadValues = (a, b) => {
16
16
  };
17
17
  import { isWeb } from "../constants/platform";
18
18
  function expandStyle(key, value) {
19
- if (key === "transform") {
20
- return;
21
- }
22
19
  if (process.env.TAMAGUI_TARGET === "web") {
23
20
  if (key === "flex") {
24
21
  if (value <= -1) {
@@ -37,12 +34,6 @@ function expandStyle(key, value) {
37
34
  return;
38
35
  }
39
36
  switch (key) {
40
- case "elevation":
41
- case "overlayColor":
42
- case "resizeMode":
43
- case "tintColor": {
44
- break;
45
- }
46
37
  case "aspectRatio": {
47
38
  return [[key, value.toString()]];
48
39
  }