@tamagui/core 1.0.0-alpha.37 → 1.0.0-alpha.40

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 (161) hide show
  1. package/dist/cjs/conf.js +52 -0
  2. package/dist/cjs/conf.js.map +7 -0
  3. package/dist/cjs/constants/constants.js +15 -10
  4. package/dist/cjs/constants/constants.js.map +2 -2
  5. package/dist/cjs/constants/platform.js +12 -11
  6. package/dist/cjs/constants/platform.js.map +1 -1
  7. package/dist/cjs/constants/pseudos.js +19 -2
  8. package/dist/cjs/constants/pseudos.js.map +1 -1
  9. package/dist/cjs/constants/rnw.js +19 -2
  10. package/dist/cjs/constants/rnw.js.map +1 -1
  11. package/dist/cjs/createComponent.js +29 -23
  12. package/dist/cjs/createComponent.js.map +2 -2
  13. package/dist/cjs/createFont.js +11 -10
  14. package/dist/cjs/createFont.js.map +1 -1
  15. package/dist/cjs/createShorthands.js +19 -2
  16. package/dist/cjs/createShorthands.js.map +1 -1
  17. package/dist/cjs/createTamagui.js +32 -50
  18. package/dist/cjs/createTamagui.js.map +2 -2
  19. package/dist/cjs/createTheme.js +19 -2
  20. package/dist/cjs/createTheme.js.map +1 -1
  21. package/dist/cjs/createTokens.js +12 -11
  22. package/dist/cjs/createTokens.js.map +1 -1
  23. package/dist/cjs/createVariable.js +11 -10
  24. package/dist/cjs/createVariable.js.map +1 -1
  25. package/dist/cjs/getThemeParentClassName.js +34 -0
  26. package/dist/cjs/getThemeParentClassName.js.map +7 -0
  27. package/dist/cjs/helpers/addStylesUsingClassname.js +14 -13
  28. package/dist/cjs/helpers/addStylesUsingClassname.js.map +1 -1
  29. package/dist/cjs/helpers/createMediaStyle.js +11 -10
  30. package/dist/cjs/helpers/createMediaStyle.js.map +1 -1
  31. package/dist/cjs/helpers/createPropMapper.js +15 -14
  32. package/dist/cjs/helpers/createPropMapper.js.map +2 -2
  33. package/dist/cjs/helpers/createTamaguiProvider.js +15 -9
  34. package/dist/cjs/helpers/createTamaguiProvider.js.map +1 -1
  35. package/dist/cjs/helpers/extendStaticConfig.js +11 -10
  36. package/dist/cjs/helpers/extendStaticConfig.js.map +1 -1
  37. package/dist/cjs/helpers/fixNativeShadow.js +19 -2
  38. package/dist/cjs/helpers/fixNativeShadow.js.map +1 -1
  39. package/dist/cjs/helpers/fixNativeShadow.native.js +19 -2
  40. package/dist/cjs/helpers/fixNativeShadow.native.js.map +1 -1
  41. package/dist/cjs/helpers/getSplitStyles.js +17 -16
  42. package/dist/cjs/helpers/getSplitStyles.js.map +1 -1
  43. package/dist/cjs/helpers/getStylesAtomic.js +13 -12
  44. package/dist/cjs/helpers/getStylesAtomic.js.map +1 -1
  45. package/dist/cjs/helpers/getStylesAtomic.native.js +19 -2
  46. package/dist/cjs/helpers/getStylesAtomic.native.js.map +1 -1
  47. package/dist/cjs/helpers/getThemeParentClassName.js +34 -0
  48. package/dist/cjs/helpers/getThemeParentClassName.js.map +7 -0
  49. package/dist/cjs/helpers/insertStyleRule.js +11 -10
  50. package/dist/cjs/helpers/insertStyleRule.js.map +1 -1
  51. package/dist/cjs/helpers/isObj.js +19 -2
  52. package/dist/cjs/helpers/isObj.js.map +1 -1
  53. package/dist/cjs/helpers/isTamaguiElement.js +11 -10
  54. package/dist/cjs/helpers/isTamaguiElement.js.map +1 -1
  55. package/dist/cjs/helpers/matchMedia.js +19 -2
  56. package/dist/cjs/helpers/matchMedia.js.map +1 -1
  57. package/dist/cjs/helpers/matchMedia.native.js +13 -7
  58. package/dist/cjs/helpers/matchMedia.native.js.map +1 -1
  59. package/dist/cjs/helpers/themeable.js +15 -9
  60. package/dist/cjs/helpers/themeable.js.map +1 -1
  61. package/dist/cjs/helpers/validate.js +13 -7
  62. package/dist/cjs/helpers/validate.js.map +1 -1
  63. package/dist/cjs/hooks/useConstant.js +11 -10
  64. package/dist/cjs/hooks/useConstant.js.map +1 -1
  65. package/dist/cjs/hooks/useFeatures.js +15 -9
  66. package/dist/cjs/hooks/useFeatures.js.map +1 -1
  67. package/dist/cjs/hooks/useMedia.js +18 -17
  68. package/dist/cjs/hooks/useMedia.js.map +2 -2
  69. package/dist/cjs/hooks/usePressable.js +11 -10
  70. package/dist/cjs/hooks/usePressable.js.map +1 -1
  71. package/dist/cjs/hooks/useTheme.js +19 -18
  72. package/dist/cjs/hooks/useTheme.js.map +2 -2
  73. package/dist/cjs/index.js +46 -38
  74. package/dist/cjs/index.js.map +2 -2
  75. package/dist/cjs/static/postProcessStyles.js +11 -10
  76. package/dist/cjs/static/postProcessStyles.js.map +1 -1
  77. package/dist/cjs/static.js +23 -22
  78. package/dist/cjs/static.js.map +1 -1
  79. package/dist/cjs/styled.js +12 -11
  80. package/dist/cjs/styled.js.map +2 -2
  81. package/dist/cjs/types.js +18 -1
  82. package/dist/cjs/types.js.map +2 -2
  83. package/dist/cjs/views/Animated.js +17 -11
  84. package/dist/cjs/views/Animated.js.map +1 -1
  85. package/dist/cjs/views/Stack.js +12 -11
  86. package/dist/cjs/views/Stack.js.map +1 -1
  87. package/dist/cjs/views/Text.js +13 -12
  88. package/dist/cjs/views/Text.js.map +1 -1
  89. package/dist/cjs/views/TextAncestorContext.js +14 -8
  90. package/dist/cjs/views/TextAncestorContext.js.map +1 -1
  91. package/dist/cjs/views/Theme.js +19 -13
  92. package/dist/cjs/views/Theme.js.map +2 -2
  93. package/dist/cjs/views/ThemeContext.js +11 -10
  94. package/dist/cjs/views/ThemeContext.js.map +1 -1
  95. package/dist/cjs/views/ThemeInverse.js +15 -9
  96. package/dist/cjs/views/ThemeInverse.js.map +1 -1
  97. package/dist/cjs/views/ThemeManagerContext.js +14 -13
  98. package/dist/cjs/views/ThemeManagerContext.js.map +1 -1
  99. package/dist/cjs/views/ThemeProvider.js +22 -16
  100. package/dist/cjs/views/ThemeProvider.js.map +2 -2
  101. package/dist/esm/conf.js +29 -0
  102. package/dist/esm/conf.js.map +7 -0
  103. package/dist/esm/constants/constants.js +4 -0
  104. package/dist/esm/constants/constants.js.map +2 -2
  105. package/dist/esm/createComponent.js +2 -2
  106. package/dist/esm/createComponent.js.map +2 -2
  107. package/dist/esm/createTamagui.js +10 -29
  108. package/dist/esm/createTamagui.js.map +2 -2
  109. package/dist/esm/getThemeParentClassName.js +11 -0
  110. package/dist/esm/getThemeParentClassName.js.map +7 -0
  111. package/dist/esm/helpers/addStylesUsingClassname.js +1 -1
  112. package/dist/esm/helpers/addStylesUsingClassname.js.map +1 -1
  113. package/dist/esm/helpers/createPropMapper.js +1 -1
  114. package/dist/esm/helpers/createPropMapper.js.map +1 -1
  115. package/dist/esm/helpers/getThemeParentClassName.js +11 -0
  116. package/dist/esm/helpers/getThemeParentClassName.js.map +7 -0
  117. package/dist/esm/hooks/useMedia.js +3 -3
  118. package/dist/esm/hooks/useMedia.js.map +2 -2
  119. package/dist/esm/hooks/useTheme.js +2 -2
  120. package/dist/esm/hooks/useTheme.js.map +2 -2
  121. package/dist/esm/index.js +8 -1
  122. package/dist/esm/index.js.map +2 -2
  123. package/dist/esm/styled.js.map +1 -1
  124. package/dist/esm/views/Theme.js +1 -1
  125. package/dist/esm/views/Theme.js.map +1 -1
  126. package/dist/esm/views/ThemeManagerContext.js +3 -3
  127. package/dist/esm/views/ThemeManagerContext.js.map +1 -1
  128. package/dist/esm/views/ThemeProvider.js +3 -3
  129. package/dist/esm/views/ThemeProvider.js.map +2 -2
  130. package/dist/jsx/conf.js +28 -0
  131. package/dist/jsx/constants/constants.js +4 -0
  132. package/dist/jsx/createComponent.js +2 -2
  133. package/dist/jsx/createTamagui.js +10 -29
  134. package/dist/jsx/getThemeParentClassName.js +10 -0
  135. package/dist/jsx/helpers/addStylesUsingClassname.js +1 -1
  136. package/dist/jsx/helpers/createPropMapper.js +1 -1
  137. package/dist/jsx/helpers/getThemeParentClassName.js +10 -0
  138. package/dist/jsx/hooks/useMedia.js +3 -3
  139. package/dist/jsx/hooks/useTheme.js +2 -2
  140. package/dist/jsx/index.js +8 -1
  141. package/dist/jsx/views/Theme.js +1 -1
  142. package/dist/jsx/views/ThemeManagerContext.js +3 -3
  143. package/dist/jsx/views/ThemeProvider.js +3 -3
  144. package/package.json +6 -9
  145. package/types/conf.d.ts +46 -0
  146. package/types/conf.d.ts.map +1 -0
  147. package/types/constants/constants.d.ts +2 -0
  148. package/types/constants/constants.d.ts.map +1 -1
  149. package/types/createTamagui.d.ts +2 -43
  150. package/types/createTamagui.d.ts.map +1 -1
  151. package/types/helpers/getThemeParentClassName.d.ts +2 -0
  152. package/types/helpers/getThemeParentClassName.d.ts.map +1 -0
  153. package/types/hooks/useTheme.d.ts.map +1 -1
  154. package/types/index.d.ts +2 -0
  155. package/types/index.d.ts.map +1 -1
  156. package/types/styled.d.ts +1 -1
  157. package/types/styled.d.ts.map +1 -1
  158. package/types/types.d.ts +2 -2
  159. package/types/types.d.ts.map +1 -1
  160. package/types/views/ThemeProvider.d.ts +0 -1
  161. package/types/views/ThemeProvider.d.ts.map +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/types.tsx"],
4
- "sourcesContent": ["import React, { RefObject } from 'react'\nimport { TextProps as ReactTextProps, TextStyle } from 'react-native'\nimport { GestureResponderEvent, View, ViewProps, ViewStyle } from 'react-native'\n\nimport { Variable } from './createVariable'\nimport { ThemeProviderProps } from './views/ThemeProvider'\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 interface CreateTokens<Val extends number | string | Variable = number | string | Variable> {\n font: { [key: string]: GenericFont }\n color: { [key: string]: Val }\n space: { [key: string]: Val }\n size: { [key: string]: Val }\n radius: { [key: string]: Val }\n zIndex: { [key: string]: Val }\n}\n\ntype GenericTokens = CreateTokens\ntype GenericThemes = {\n [key: string]: {\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 bg: string | Variable\n bg2: string | Variable\n bg3: string | Variable\n bg4: string | Variable\n color: string | Variable\n color2: string | Variable\n color3: string | Variable\n color4: string | Variable\n borderColor: string | Variable\n borderColor2: string | Variable\n shadowColor: string | Variable\n shadowColor2: string | Variable\n }\n}\ntype GenericShorthands = {}\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\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,\n D extends GenericMedia\n> = Partial<Pick<ThemeProviderProps, 'defaultTheme' | 'disableRootThemeClass'>> & {\n tokens: A\n themes: B\n shorthands: C\n media: D\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>\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']\n// themes\nexport type ThemeName = keyof Themes extends `${infer Prefix}-${string}`\n ? Prefix | keyof Themes\n : keyof Themes\nexport type ThemeKeys = keyof ThemeObject\nexport type ThemeKeyVariables = `$${ThemeKeys}`\n// export type Spaces = TamaguiConfig['tokens']['spaces'][keyof TamaguiConfig['tokens']['spaces']]\n// export type FontSizes = TamaguiConfig['tokens']['fontSizes'][keyof TamaguiConfig['tokens']['fontSizes']]\n// export type Colors = TamaguiConfig['tokens']['colors'][keyof TamaguiConfig['tokens']['colors']]\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> = CreateTamaguiConfig<A, B, C, D> & {\n Provider: (props: TamaguiProviderProps) => any\n // with $ prefixes for fast lookups (one time cost at startup vs every render)\n themeParsed: { [key: string]: Variable }\n tokensParsed: CreateTokens<Variable>\n themeConfig: any\n getCSS: () => string\n parsed: boolean\n}\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 StaticComponent> = A extends React.FunctionComponent<infer Props>\n ? Props\n : unknown\n\nexport type GenericFont = {\n size: { [key: string | number]: number | Variable }\n lineHeight: { [key: string | number]: number | Variable }\n letterSpacing: { [key: string | number]: number | Variable }\n weight: { [key: string | number]: string | Variable }\n family: string | Variable\n}\n\n// media\nexport type MediaKeys = keyof Media\nexport type MediaQueryObject = { [key: string]: string | number | string }\nexport type MediaQueryState = {\n [key in string]: boolean\n}\nexport type MediaQueryKey = keyof Media\nexport type MediaProps<A> = {\n [key in `$${MediaQueryKey}`]?: 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//\n// base props that are accepted by createComponent (additional to react-native-web)\n//\ntype ComponentPropsBase = {\n className?: string\n tag?: string\n animated?: boolean\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: GestureResponderEvent) => any\n // WEB ONLY\n onMouseLeave?: (e: GestureResponderEvent) => any\n space?: Tokens['space'][keyof Tokens['space']] | boolean | string | number\n pointerEvents?: string\n}\n\ntype GetTokenFontKeysFor<A extends 'size' | 'weight' | 'letterSpacing' | 'family' | 'lineHeight'> =\n keyof Tokens['font'][keyof Tokens['font']][A]\n\nexport type SizeTokens = `$${keyof Tokens['size']}`\nexport type FontTokens = `$${keyof Tokens['font']}`\nexport type FontSizeTokens = `$${GetTokenFontKeysFor<'size'>}`\nexport type FontLineHeightTokens = `$${GetTokenFontKeysFor<'lineHeight'>}`\nexport type FontWeightTokens = `$${GetTokenFontKeysFor<'weight'>}`\nexport type FontLetterSpacingTokens = `$${GetTokenFontKeysFor<'letterSpacing'>}`\nexport type SpaceTokens = `$${keyof Tokens['space']}`\nexport type ColorTokens = `$${keyof Tokens['color']}`\nexport type ZIndexTokens = `$${keyof Tokens['zIndex']}`\n\n//\n// adds in theme short values to relevant props\n//\ntype ThemeValue<A> = Omit<A, string> | UnionableString | Variable\nexport type WithThemeValues<T extends object> = {\n [K in keyof T]:\n | ThemeValue<T[K]>\n | (K extends ColorableKeys\n ? ThemeKeyVariables\n : K extends SizeKeys\n ? SizeTokens\n : K extends FontKeys\n ? FontTokens\n : K extends FontSizeKeys\n ? FontSizeTokens\n : K extends SpaceKeys\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 : {})\n}\n\n//\n// adds in shorthand props\n//\ntype WithShorthands<StyleProps> = {\n [Key in keyof Shorthands]?: Shorthands[Key] extends keyof StyleProps\n ? StyleProps[Shorthands[Key]] | null\n : undefined\n}\n\n//\n// add both theme and shorthands\n//\ntype WithThemeAndShorthands<A extends object> = WithThemeValues<A> &\n WithShorthands<WithThemeValues<A>>\n\n//\n// adds theme and shorthands + pseudo styles with both\n//\ntype WithThemeShorthandsAndPseudos<A extends object> = WithThemeAndShorthands<A> & {\n hoverStyle?: WithThemeAndShorthands<A> | null\n pressStyle?: WithThemeAndShorthands<A> | null\n}\n\n//\n// adds theme, shorthands, psuedos, then all the previous to media queries\n//\ntype WithThemeShorthandsPseudosAndMedia<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 StackStyleProps = WithThemeShorthandsPseudosAndMedia<StackStylePropsBase>\n\nexport type StackProps = Omit<RNWInternalProps, 'children'> &\n // Omit<ViewProps, 'display' | 'children'> &\n StackStyleProps &\n ComponentPropsBase & {\n ref?: RefObject<View | HTMLElement> | ((node: View | HTMLElement) => any)\n children?: any | any[]\n }\n\n//\n// Text props\n//\n\n// type EnhancedTextStyleProps = WithThemeValues<\n// Omit<TextStyle, 'display' | 'backfaceVisibility'> & TransformStyleProps\n// >\n// export type TextStylePropsBase = EnhancedTextStyleProps\n// export type TextStyleProps<S = TextStylePropsBase> = S & {\n// hoverStyle?: S | null\n// pressStyle?: S | null\n// }\n\ntype TextStyleProps = WithThemeShorthandsPseudosAndMedia<\n Omit<TextStyle, 'display' | 'backfaceVisibility'> & TransformStyleProps & WebOnlyStyleProps\n>\n\nexport type TextProps = Omit<ReactTextProps, 'style'> &\n TextStyleProps &\n ComponentPropsBase & {\n ellipse?: boolean\n selectable?: boolean\n textDecorationDistance?: number\n }\n\n//\n// StaticComponent\n//\n\nexport type StaticComponent<\n Props = any,\n VariantProps = any,\n StaticConfParsed = StaticConfigParsed,\n ParentVariantProps = any\n> = React.FunctionComponent<Props> & {\n staticConfig: StaticConfParsed\n variantProps?: VariantProps\n\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?: StaticConfig) => X\n}\n\nexport type TamaguiProviderProps = Partial<Omit<ThemeProviderProps, 'children'>> & {\n initialWindowMetrics?: any\n fallback?: any\n children?: any\n}\n\nexport type RNWInternalProps = {\n accessibilityState?: {\n busy?: boolean\n checked?: boolean | 'mixed'\n disabled?: boolean\n expanded?: boolean\n grabbed?: boolean\n hidden?: boolean\n invalid?: boolean\n modal?: boolean\n pressed?: boolean\n readonly?: boolean\n required?: boolean\n selected?: boolean\n }\n accessibilityValue?: {\n max?: number\n min?: number\n now?: number\n text?: string\n }\n children?: any\n focusable?: boolean\n nativeID?: string\n onBlur?: (e: any) => void\n onClick?: (e: any) => void\n onClickCapture?: (e: any) => void\n onContextMenu?: (e: any) => void\n onFocus?: (e: any) => void\n onKeyDown?: (e: any) => void\n onKeyUp?: (e: any) => void\n onMoveShouldSetResponder?: (e: any) => boolean\n onMoveShouldSetResponderCapture?: (e: any) => boolean\n onResponderEnd?: (e: any) => void\n onResponderGrant?: (e: any) => void\n onResponderMove?: (e: any) => void\n onResponderReject?: (e: any) => void\n onResponderRelease?: (e: any) => void\n onResponderStart?: (e: any) => void\n onResponderTerminate?: (e: any) => void\n onResponderTerminationRequest?: (e: any) => boolean\n onScrollShouldSetResponder?: (e: any) => boolean\n onScrollShouldSetResponderCapture?: (e: any) => boolean\n onSelectionChangeShouldSetResponder?: (e: any) => boolean\n onSelectionChangeShouldSetResponderCapture?: (e: any) => boolean\n onStartShouldSetResponder?: (e: any) => boolean\n onStartShouldSetResponderCapture?: (e: any) => boolean\n pointerEvents?: 'box-none' | 'none' | 'box-only' | 'auto'\n testID?: string\n // unstable\n dataSet?: Object\n onMouseDown?: (e: any) => void\n onMouseEnter?: (e: any) => void\n onMouseLeave?: (e: any) => void\n onMouseMove?: (e: any) => void\n onMouseOver?: (e: any) => void\n onMouseOut?: (e: any) => void\n onMouseUp?: (e: any) => void\n onScroll?: (e: any) => void\n onTouchCancel?: (e: any) => void\n onTouchCancelCapture?: (e: any) => void\n onTouchEnd?: (e: any) => void\n onTouchEndCapture?: (e: any) => void\n onTouchMove?: (e: any) => void\n onTouchMoveCapture?: (e: any) => void\n onTouchStart?: (e: any) => void\n onTouchStartCapture?: (e: any) => void\n onWheel?: (e: any) => void\n href?: string\n hrefAttrs?: { download?: boolean; rel?: string; target?: string }\n}\n\nexport type StaticConfigParsed = StaticConfig & {\n parsed: true\n propMapper: (\n key: string,\n value: any,\n theme: ThemeObject,\n props: any\n ) => undefined | boolean | { [key: string]: any }\n variantsParsed?: {\n [key: string]: {\n [key: string]: any\n }\n }\n}\n\nexport type StaticConfig = {\n Component?: StaticComponent\n\n variants?: {\n [key: string]: {\n [key: string]:\n | ((a: any, b: any) => any)\n | {\n [key: string]: any\n }\n }\n }\n\n /*\n * If you need to pass context or something, prevents from ever\n * flattening. The 'jsx' option means it will never flatten. if you\n * pass JSX as a children (if its purely string, it will still flatten).\n */\n neverFlatten?: boolean | 'jsx'\n\n /*\n * Determines ultimate output tag (Text vs View)\n */\n isText?: boolean\n\n /*\n * Which style keys are allowed to be extracted.\n */\n validStyles?: { [key: string]: boolean }\n\n /*\n * Allows for defining extra valid props to be extracted beyond\n * the default ones.\n */\n validPropsExtra?: { [key: string]: any }\n\n /*\n * Same as React.defaultProps, be sure to sync\n */\n defaultProps?: any\n\n /*\n * If this prop is encountered, bail on all optimization.\n */\n deoptProps?: Set<string>\n\n /*\n * 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 * We need to wrap children\n */\n isZStack?: boolean\n}\n\ntype ColorableKeys =\n | 'color'\n | 'backgroundColor'\n | 'borderColor'\n | 'borderTopColor'\n | 'borderBottomColor'\n | 'borderLeftColor'\n | 'borderRightColor'\n | 'shadowColor'\n\ntype SizeKeys = 'width' | 'height' | 'minWidth' | 'minHeight' | 'maxWidth' | 'maxHeight'\n\ntype FontKeys = 'fontFamily'\n\ntype FontSizeKeys = 'fontSize'\n\ntype FontWeightKeys = 'fontWeight'\n\ntype FontLetterSpacingKeys = 'letterSpacing'\n\ntype LineHeightKeys = 'lineHeight'\n\ntype ZIndexKeys = 'zIndex'\n\ntype ColorKeys =\n | 'color'\n | 'backgroundColor'\n | 'borderColor'\n | 'borderBottomColor'\n | 'borderTopColor'\n | 'borderLeftColor'\n | 'borderRightColor'\n\ntype SpaceKeys =\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"],
5
- "mappings": ";;AAAA;",
4
+ "sourcesContent": ["import React, { RefObject } from 'react'\nimport { TextProps as ReactTextProps, TextStyle } from 'react-native'\nimport { GestureResponderEvent, View, ViewProps, ViewStyle } from 'react-native'\n\nimport { Variable } from './createVariable'\nimport { ThemeProviderProps } from './views/ThemeProvider'\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 interface CreateTokens<Val extends number | string | Variable = number | string | Variable> {\n font: { [key: string]: GenericFont }\n color: { [key: string]: Val }\n space: { [key: string]: Val }\n size: { [key: string]: Val }\n radius: { [key: string]: Val }\n zIndex: { [key: string]: Val }\n}\n\ntype GenericTokens = CreateTokens\ntype GenericThemes = {\n [key: string]: {\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 bg: string | Variable\n bg2: string | Variable\n bg3: string | Variable\n bg4: string | Variable\n color: string | Variable\n color2: string | Variable\n color3: string | Variable\n color4: string | Variable\n borderColor: string | Variable\n borderColor2: string | Variable\n shadowColor: string | Variable\n shadowColor2: string | Variable\n }\n}\ntype GenericShorthands = {}\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\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,\n D extends GenericMedia\n> = Partial<Pick<ThemeProviderProps, 'defaultTheme' | 'disableRootThemeClass'>> & {\n tokens: A\n themes: B\n shorthands: C\n media: D\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>\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']\n// themes\nexport type ThemeName = keyof Themes extends `${infer Prefix}-${string}`\n ? Prefix | keyof Themes\n : keyof Themes\nexport type ThemeKeys = keyof ThemeObject\nexport type ThemeKeyVariables = `$${ThemeKeys}`\n// export type Spaces = TamaguiConfig['tokens']['spaces'][keyof TamaguiConfig['tokens']['spaces']]\n// export type FontSizes = TamaguiConfig['tokens']['fontSizes'][keyof TamaguiConfig['tokens']['fontSizes']]\n// export type Colors = TamaguiConfig['tokens']['colors'][keyof TamaguiConfig['tokens']['colors']]\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> = CreateTamaguiConfig<A, B, C, D> & {\n Provider: (props: TamaguiProviderProps) => any\n // with $ prefixes for fast lookups (one time cost at startup vs every render)\n themeParsed: { [key: string]: Variable }\n tokensParsed: CreateTokens<Variable>\n themeConfig: any\n getCSS: () => string\n parsed: boolean\n}\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 StaticComponent> = A extends React.FunctionComponent<infer Props>\n ? Props\n : unknown\n\nexport type GenericFont = {\n size: { [key: string | number]: number | Variable }\n lineHeight: { [key: string | number]: number | Variable }\n letterSpacing: { [key: string | number]: number | Variable }\n weight: { [key: string | number]: string | Variable }\n family: string | Variable\n}\n\n// media\nexport type MediaKeys = keyof Media\nexport type MediaQueryObject = { [key: string]: string | number | string }\nexport type MediaQueryState = {\n [key in string]: boolean\n}\nexport type MediaQueryKey = keyof Media\nexport type MediaProps<A> = {\n [key in `$${MediaQueryKey}`]?: 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//\n// base props that are accepted by createComponent (additional to react-native-web)\n//\ntype ComponentPropsBase = {\n className?: string\n tag?: string\n animated?: boolean\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: GestureResponderEvent) => any\n // WEB ONLY\n onMouseLeave?: (e: GestureResponderEvent) => any\n space?: Tokens['space'][keyof Tokens['space']] | boolean | string | number\n pointerEvents?: string\n}\n\ntype GetTokenFontKeysFor<A extends 'size' | 'weight' | 'letterSpacing' | 'family' | 'lineHeight'> =\n keyof Tokens['font'][keyof Tokens['font']][A]\n\nexport type SizeTokens = `$${keyof Tokens['size']}`\nexport type FontTokens = `$${keyof Tokens['font']}`\nexport type FontSizeTokens = `$${GetTokenFontKeysFor<'size'>}`\nexport type FontLineHeightTokens = `$${GetTokenFontKeysFor<'lineHeight'>}`\nexport type FontWeightTokens = `$${GetTokenFontKeysFor<'weight'>}`\nexport type FontLetterSpacingTokens = `$${GetTokenFontKeysFor<'letterSpacing'>}`\nexport type SpaceTokens = `$${keyof Tokens['space']}`\nexport type ColorTokens = `$${keyof Tokens['color']}`\nexport type ZIndexTokens = `$${keyof Tokens['zIndex']}`\n\n//\n// adds in theme short values to relevant props\n//\ntype ThemeValue<A> = Omit<A, string> | UnionableString | Variable\nexport type WithThemeValues<T extends object> = {\n [K in keyof T]:\n | ThemeValue<T[K]>\n | (K extends ColorableKeys\n ? ThemeKeyVariables\n : K extends SizeKeys\n ? SizeTokens\n : K extends FontKeys\n ? FontTokens\n : K extends FontSizeKeys\n ? FontSizeTokens\n : K extends SpaceKeys\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 : {})\n}\n\n//\n// adds in shorthand props\n//\ntype WithShorthands<StyleProps> = {\n [Key in keyof Shorthands]?: Shorthands[Key] extends keyof StyleProps\n ? StyleProps[Shorthands[Key]] | null\n : undefined\n}\n\n//\n// add both theme and shorthands\n//\ntype WithThemeAndShorthands<A extends object> = WithThemeValues<A> &\n WithShorthands<WithThemeValues<A>>\n\n//\n// adds theme and shorthands + pseudo styles with both\n//\ntype WithThemeShorthandsAndPseudos<A extends object> = WithThemeAndShorthands<A> & {\n hoverStyle?: WithThemeAndShorthands<A> | null\n pressStyle?: WithThemeAndShorthands<A> | null\n}\n\n//\n// adds theme, shorthands, psuedos, then all the previous to media queries\n//\ntype WithThemeShorthandsPseudosAndMedia<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 StackStyleProps = WithThemeShorthandsPseudosAndMedia<StackStylePropsBase>\n\nexport type StackProps = Omit<RNWInternalProps, 'children'> &\n Omit<ViewProps, 'display' | 'children'> &\n StackStyleProps &\n ComponentPropsBase & {\n ref?: RefObject<View | HTMLElement> | ((node: View | HTMLElement) => any)\n children?: any | any[]\n }\n\n//\n// Text props\n//\n\n// type EnhancedTextStyleProps = WithThemeValues<\n// Omit<TextStyle, 'display' | 'backfaceVisibility'> & TransformStyleProps\n// >\n// export type TextStylePropsBase = EnhancedTextStyleProps\n// export type TextStyleProps<S = TextStylePropsBase> = S & {\n// hoverStyle?: S | null\n// pressStyle?: S | null\n// }\n\ntype TextStyleProps = WithThemeShorthandsPseudosAndMedia<\n Omit<TextStyle, 'display' | 'backfaceVisibility'> & TransformStyleProps & WebOnlyStyleProps\n>\n\nexport type TextProps = ReactTextProps &\n TextStyleProps &\n ComponentPropsBase & {\n ellipse?: boolean\n selectable?: boolean\n textDecorationDistance?: number\n }\n\n//\n// StaticComponent\n//\n\nexport type StaticComponent<\n Props = any,\n VariantProps = any,\n StaticConfParsed = StaticConfigParsed,\n ParentVariantProps = any\n> = React.FunctionComponent<Props> & {\n staticConfig: StaticConfParsed\n variantProps?: VariantProps\n\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?: StaticConfig) => X\n}\n\nexport type TamaguiProviderProps = Partial<Omit<ThemeProviderProps, 'children'>> & {\n initialWindowMetrics?: any\n fallback?: any\n children?: any\n}\n\nexport type RNWInternalProps = {\n accessibilityState?: {\n busy?: boolean\n checked?: boolean | 'mixed'\n disabled?: boolean\n expanded?: boolean\n grabbed?: boolean\n hidden?: boolean\n invalid?: boolean\n modal?: boolean\n pressed?: boolean\n readonly?: boolean\n required?: boolean\n selected?: boolean\n }\n accessibilityValue?: {\n max?: number\n min?: number\n now?: number\n text?: string\n }\n children?: any\n focusable?: boolean\n nativeID?: string\n onBlur?: (e: any) => void\n onClick?: (e: any) => void\n onClickCapture?: (e: any) => void\n onContextMenu?: (e: any) => void\n onFocus?: (e: any) => void\n onKeyDown?: (e: any) => void\n onKeyUp?: (e: any) => void\n onMoveShouldSetResponder?: (e: any) => boolean\n onMoveShouldSetResponderCapture?: (e: any) => boolean\n onResponderEnd?: (e: any) => void\n onResponderGrant?: (e: any) => void\n onResponderMove?: (e: any) => void\n onResponderReject?: (e: any) => void\n onResponderRelease?: (e: any) => void\n onResponderStart?: (e: any) => void\n onResponderTerminate?: (e: any) => void\n onResponderTerminationRequest?: (e: any) => boolean\n onScrollShouldSetResponder?: (e: any) => boolean\n onScrollShouldSetResponderCapture?: (e: any) => boolean\n onSelectionChangeShouldSetResponder?: (e: any) => boolean\n onSelectionChangeShouldSetResponderCapture?: (e: any) => boolean\n onStartShouldSetResponder?: (e: any) => boolean\n onStartShouldSetResponderCapture?: (e: any) => boolean\n pointerEvents?: 'box-none' | 'none' | 'box-only' | 'auto'\n testID?: string\n // unstable\n dataSet?: Object\n onMouseDown?: (e: any) => void\n onMouseEnter?: (e: any) => void\n onMouseLeave?: (e: any) => void\n onMouseMove?: (e: any) => void\n onMouseOver?: (e: any) => void\n onMouseOut?: (e: any) => void\n onMouseUp?: (e: any) => void\n onScroll?: (e: any) => void\n onTouchCancel?: (e: any) => void\n onTouchCancelCapture?: (e: any) => void\n onTouchEnd?: (e: any) => void\n onTouchEndCapture?: (e: any) => void\n onTouchMove?: (e: any) => void\n onTouchMoveCapture?: (e: any) => void\n onTouchStart?: (e: any) => void\n onTouchStartCapture?: (e: any) => void\n onWheel?: (e: any) => void\n href?: string\n hrefAttrs?: { download?: boolean; rel?: string; target?: string }\n}\n\nexport type StaticConfigParsed = StaticConfig & {\n parsed: true\n propMapper: (\n key: string,\n value: any,\n theme: ThemeObject,\n props: any\n ) => undefined | boolean | { [key: string]: any }\n variantsParsed?: {\n [key: string]: {\n [key: string]: any\n }\n }\n}\n\nexport type StaticConfig = {\n Component?: StaticComponent\n\n variants?: {\n [key: string]: {\n [key: string]:\n | ((a: any, b: any) => any)\n | {\n [key: string]: any\n }\n }\n }\n\n /*\n * If you need to pass context or something, prevents from ever\n * flattening. The 'jsx' option means it will never flatten. if you\n * pass JSX as a children (if its purely string, it will still flatten).\n */\n neverFlatten?: boolean | 'jsx'\n\n /*\n * Determines ultimate output tag (Text vs View)\n */\n isText?: boolean\n\n /*\n * Which style keys are allowed to be extracted.\n */\n validStyles?: { [key: string]: boolean }\n\n /*\n * Allows for defining extra valid props to be extracted beyond\n * the default ones.\n */\n validPropsExtra?: { [key: string]: any }\n\n /*\n * Same as React.defaultProps, be sure to sync\n */\n defaultProps?: any\n\n /*\n * If this prop is encountered, bail on all optimization.\n */\n deoptProps?: Set<string>\n\n /*\n * 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 * We need to wrap children\n */\n isZStack?: boolean\n}\n\ntype ColorableKeys =\n | 'color'\n | 'backgroundColor'\n | 'borderColor'\n | 'borderTopColor'\n | 'borderBottomColor'\n | 'borderLeftColor'\n | 'borderRightColor'\n | 'shadowColor'\n\ntype SizeKeys = 'width' | 'height' | 'minWidth' | 'minHeight' | 'maxWidth' | 'maxHeight'\n\ntype FontKeys = 'fontFamily'\n\ntype FontSizeKeys = 'fontSize'\n\ntype FontWeightKeys = 'fontWeight'\n\ntype FontLetterSpacingKeys = 'letterSpacing'\n\ntype LineHeightKeys = 'lineHeight'\n\ntype ZIndexKeys = 'zIndex'\n\ntype ColorKeys =\n | 'color'\n | 'backgroundColor'\n | 'borderColor'\n | 'borderBottomColor'\n | 'borderTopColor'\n | 'borderLeftColor'\n | 'borderRightColor'\n\ntype SpaceKeys =\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"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;",
6
6
  "names": []
7
7
  }
@@ -33,29 +33,34 @@ var __objRest = (source, exclude) => {
33
33
  return target;
34
34
  };
35
35
  var __export = (target, all) => {
36
- __markAsModule(target);
37
36
  for (var name in all)
38
37
  __defProp(target, name, { get: all[name], enumerable: true });
39
38
  };
40
- var __reExport = (target, module2, desc) => {
39
+ var __reExport = (target, module2, copyDefault, desc) => {
41
40
  if (module2 && typeof module2 === "object" || typeof module2 === "function") {
42
41
  for (let key of __getOwnPropNames(module2))
43
- if (!__hasOwnProp.call(target, key) && key !== "default")
42
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
44
43
  __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
45
44
  }
46
45
  return target;
47
46
  };
48
- var __toModule = (module2) => {
49
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
47
+ var __toESM = (module2, isNodeMode) => {
48
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
50
49
  };
51
- __export(exports, {
50
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
51
+ return (module2, temp) => {
52
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
53
+ };
54
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
55
+ var Animated_exports = {};
56
+ __export(Animated_exports, {
52
57
  AnimatedStack: () => AnimatedStack
53
58
  });
54
- var import_react = __toModule(require("react"));
55
- var import_react_native = __toModule(require("react-native"));
56
- var import_platform = __toModule(require("../constants/platform"));
57
- var import_useConstant = __toModule(require("../hooks/useConstant"));
58
- var import_Stack = __toModule(require("./Stack"));
59
+ var import_react = __toESM(require("react"));
60
+ var import_react_native = require("react-native");
61
+ var import_platform = require("../constants/platform");
62
+ var import_useConstant = require("../hooks/useConstant");
63
+ var import_Stack = require("./Stack");
59
64
  const defaultAnimation = {
60
65
  from: {
61
66
  opacity: 0,
@@ -126,4 +131,5 @@ const AnimatedStack = /* @__PURE__ */ __name((_a) => {
126
131
  animated
127
132
  }, props), animatedProps), childrenMemo);
128
133
  }, "AnimatedStack");
134
+ module.exports = __toCommonJS(Animated_exports);
129
135
  //# sourceMappingURL=Animated.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/views/Animated.tsx"],
4
4
  "sourcesContent": ["import React, { useMemo } from 'react'\nimport {\n Animated,\n PerpectiveTransform,\n RotateTransform,\n RotateXTransform,\n RotateYTransform,\n RotateZTransform,\n ScaleTransform,\n ScaleXTransform,\n ScaleYTransform,\n SkewXTransform,\n SkewYTransform,\n TranslateXTransform,\n TranslateYTransform,\n} from 'react-native'\n\nimport { useIsomorphicLayoutEffect } from '../constants/platform'\nimport { useConstant } from '../hooks/useConstant'\nimport { StackProps } from '../types'\nimport { Stack } from './Stack'\n\nconst defaultAnimation = {\n from: {\n opacity: 0,\n translateY: 12,\n },\n to: {\n opacity: 1,\n translateY: 0,\n },\n}\n\ntype AnimatableProps = Partial<\n Pick<StackProps, 'backgroundColor' | 'borderColor' | 'opacity'> &\n PerpectiveTransform &\n RotateTransform &\n RotateXTransform &\n RotateYTransform &\n RotateZTransform &\n ScaleTransform &\n ScaleXTransform &\n ScaleYTransform &\n TranslateXTransform &\n TranslateYTransform &\n SkewXTransform &\n SkewYTransform\n>\n\nconst styleKeys = {\n opacity: true,\n backgroundColor: true,\n borderColor: true,\n}\n\nexport type AnimatedStackProps = StackProps & {\n animateState?: 'in' | 'out'\n velocity?: number\n animation?: {\n from: AnimatableProps\n to: AnimatableProps\n }\n}\n\nexport const AnimatedStack = ({\n animateState = 'in',\n animation = defaultAnimation,\n velocity = 6,\n children,\n animated,\n ...props\n}: AnimatedStackProps) => {\n const driver = useConstant(() => {\n return new Animated.Value(0)\n })\n\n const animatedProps = useMemo(() => {\n if (!animated) {\n return null\n }\n\n const styleProps = {}\n const transform: any = []\n\n for (const key in animation.from) {\n const fromVal = animation.from[key]\n const toVal = animation.to[key]\n const interpolatedVal = driver.interpolate({\n inputRange: [0, 1],\n outputRange: [fromVal, toVal],\n })\n if (styleKeys[key]) {\n styleProps[key] = interpolatedVal\n } else {\n transform.push({\n [key]: interpolatedVal,\n })\n }\n }\n return { transform, ...styleProps }\n }, [animated, animateState])\n\n useIsomorphicLayoutEffect(() => {\n if (!animated) {\n return\n }\n Animated.spring(driver, {\n useNativeDriver: true,\n velocity,\n toValue: animateState === 'in' ? 1 : 0,\n }).start()\n }, [animated, animateState])\n\n const childrenMemo = useMemo(() => children, [children])\n\n return (\n <Stack animated={animated} {...props} {...animatedProps}>\n {childrenMemo}\n </Stack>\n )\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,mBAA+B;AAC/B,0BAcO;AAEP,sBAA0C;AAC1C,yBAA4B;AAE5B,mBAAsB;AAEtB,MAAM,mBAAmB;AAAA,EACvB,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,YAAY;AAAA;AAAA,EAEd,IAAI;AAAA,IACF,SAAS;AAAA,IACT,YAAY;AAAA;AAAA;AAoBhB,MAAM,YAAY;AAAA,EAChB,SAAS;AAAA,EACT,iBAAiB;AAAA,EACjB,aAAa;AAAA;AAYR,MAAM,gBAAgB,wBAAC,OAOJ;AAPI,eAC5B;AAAA,mBAAe;AAAA,IACf,YAAY;AAAA,IACZ,WAAW;AAAA,IACX;AAAA,IACA;AAAA,MAL4B,IAMzB,kBANyB,IAMzB;AAAA,IALH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGA,QAAM,SAAS,oCAAY,MAAM;AAC/B,WAAO,IAAI,6BAAS,MAAM;AAAA;AAG5B,QAAM,gBAAgB,0BAAQ,MAAM;AAClC,QAAI,CAAC,UAAU;AACb,aAAO;AAAA;AAGT,UAAM,aAAa;AACnB,UAAM,YAAiB;AAEvB,eAAW,OAAO,UAAU,MAAM;AAChC,YAAM,UAAU,UAAU,KAAK;AAC/B,YAAM,QAAQ,UAAU,GAAG;AAC3B,YAAM,kBAAkB,OAAO,YAAY;AAAA,QACzC,YAAY,CAAC,GAAG;AAAA,QAChB,aAAa,CAAC,SAAS;AAAA;AAEzB,UAAI,UAAU,MAAM;AAClB,mBAAW,OAAO;AAAA,aACb;AACL,kBAAU,KAAK;AAAA,WACZ,MAAM;AAAA;AAAA;AAAA;AAIb,WAAO,iBAAE,aAAc;AAAA,KACtB,CAAC,UAAU;AAEd,iDAA0B,MAAM;AAC9B,QAAI,CAAC,UAAU;AACb;AAAA;AAEF,iCAAS,OAAO,QAAQ;AAAA,MACtB,iBAAiB;AAAA,MACjB;AAAA,MACA,SAAS,iBAAiB,OAAO,IAAI;AAAA,OACpC;AAAA,KACF,CAAC,UAAU;AAEd,QAAM,eAAe,0BAAQ,MAAM,UAAU,CAAC;AAE9C,SACE,mDAAC,oBAAD;AAAA,IAAO;AAAA,KAAwB,QAAW,gBACvC;AAAA,GArDsB;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA+B;AAC/B,0BAcO;AAEP,sBAA0C;AAC1C,yBAA4B;AAE5B,mBAAsB;AAEtB,MAAM,mBAAmB;AAAA,EACvB,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,YAAY;AAAA;AAAA,EAEd,IAAI;AAAA,IACF,SAAS;AAAA,IACT,YAAY;AAAA;AAAA;AAoBhB,MAAM,YAAY;AAAA,EAChB,SAAS;AAAA,EACT,iBAAiB;AAAA,EACjB,aAAa;AAAA;AAYR,MAAM,gBAAgB,wBAAC,OAOJ;AAPI,eAC5B;AAAA,mBAAe;AAAA,IACf,YAAY;AAAA,IACZ,WAAW;AAAA,IACX;AAAA,IACA;AAAA,MAL4B,IAMzB,kBANyB,IAMzB;AAAA,IALH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGA,QAAM,SAAS,oCAAY,MAAM;AAC/B,WAAO,IAAI,6BAAS,MAAM;AAAA;AAG5B,QAAM,gBAAgB,0BAAQ,MAAM;AAClC,QAAI,CAAC,UAAU;AACb,aAAO;AAAA;AAGT,UAAM,aAAa;AACnB,UAAM,YAAiB;AAEvB,eAAW,OAAO,UAAU,MAAM;AAChC,YAAM,UAAU,UAAU,KAAK;AAC/B,YAAM,QAAQ,UAAU,GAAG;AAC3B,YAAM,kBAAkB,OAAO,YAAY;AAAA,QACzC,YAAY,CAAC,GAAG;AAAA,QAChB,aAAa,CAAC,SAAS;AAAA;AAEzB,UAAI,UAAU,MAAM;AAClB,mBAAW,OAAO;AAAA,aACb;AACL,kBAAU,KAAK;AAAA,WACZ,MAAM;AAAA;AAAA;AAAA;AAIb,WAAO,iBAAE,aAAc;AAAA,KACtB,CAAC,UAAU;AAEd,iDAA0B,MAAM;AAC9B,QAAI,CAAC,UAAU;AACb;AAAA;AAEF,iCAAS,OAAO,QAAQ;AAAA,MACtB,iBAAiB;AAAA,MACjB;AAAA,MACA,SAAS,iBAAiB,OAAO,IAAI;AAAA,OACpC;AAAA,KACF,CAAC,UAAU;AAEd,QAAM,eAAe,0BAAQ,MAAM,UAAU,CAAC;AAE9C,SACE,mDAAC,oBAAD;AAAA,IAAO;AAAA,KAAwB,QAAW,gBACvC;AAAA,GArDsB;",
6
6
  "names": []
7
7
  }
@@ -1,11 +1,9 @@
1
- var __create = Object.create;
2
1
  var __defProp = Object.defineProperty;
3
2
  var __defProps = Object.defineProperties;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
6
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
- var __getProtoOf = Object.getPrototypeOf;
9
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
10
8
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
9
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
@@ -23,29 +21,32 @@ var __spreadValues = (a, b) => {
23
21
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
22
  var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
25
23
  var __export = (target, all) => {
26
- __markAsModule(target);
27
24
  for (var name in all)
28
25
  __defProp(target, name, { get: all[name], enumerable: true });
29
26
  };
30
- var __reExport = (target, module2, desc) => {
27
+ var __reExport = (target, module2, copyDefault, desc) => {
31
28
  if (module2 && typeof module2 === "object" || typeof module2 === "function") {
32
29
  for (let key of __getOwnPropNames(module2))
33
- if (!__hasOwnProp.call(target, key) && key !== "default")
30
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
34
31
  __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
35
32
  }
36
33
  return target;
37
34
  };
38
- var __toModule = (module2) => {
39
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
40
- };
41
- __export(exports, {
35
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
36
+ return (module2, temp) => {
37
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
38
+ };
39
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
40
+ var Stack_exports = {};
41
+ __export(Stack_exports, {
42
42
  Stack: () => Stack
43
43
  });
44
- var import_constants = __toModule(require("../constants/constants"));
45
- var import_createComponent = __toModule(require("../createComponent"));
44
+ var import_constants = require("../constants/constants");
45
+ var import_createComponent = require("../createComponent");
46
46
  const Stack = (0, import_createComponent.createComponent)({
47
47
  defaultProps: __spreadProps(__spreadValues({}, import_constants.stackDefaultStyles), {
48
48
  flexDirection: "column"
49
49
  })
50
50
  });
51
+ module.exports = __toCommonJS(Stack_exports);
51
52
  //# sourceMappingURL=Stack.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/views/Stack.tsx"],
4
4
  "sourcesContent": ["import { stackDefaultStyles } from '../constants/constants'\nimport { createComponent } from '../createComponent'\nimport { StackProps } from '../types'\n\nexport const Stack = createComponent<StackProps>({\n defaultProps: {\n ...stackDefaultStyles,\n flexDirection: 'column',\n },\n})\n\n// test types\n// export const YStack = styled(Stack, {\n// flexDirection: 'column',\n// })\n// // test types\n// const x00 = <Stack missing={0} /> // should err\n// const x0 = <YStack missing={0} /> // should err\n// const x1 = (props: StackProps) => <YStack {...props} />\n// type ys = typeof YStack\n// type ysv = ys extends StaticComponent<any, infer V> ? V : unknown\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,uBAAmC;AACnC,6BAAgC;AAGzB,MAAM,QAAQ,4CAA4B;AAAA,EAC/C,cAAc,iCACT,sCADS;AAAA,IAEZ,eAAe;AAAA;AAAA;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAmC;AACnC,6BAAgC;AAGzB,MAAM,QAAQ,4CAA4B;AAAA,EAC/C,cAAc,iCACT,sCADS;AAAA,IAEZ,eAAe;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -1,9 +1,7 @@
1
- var __create = Object.create;
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
4
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
9
7
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
@@ -20,27 +18,29 @@ var __spreadValues = (a, b) => {
20
18
  };
21
19
  var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
22
20
  var __export = (target, all) => {
23
- __markAsModule(target);
24
21
  for (var name in all)
25
22
  __defProp(target, name, { get: all[name], enumerable: true });
26
23
  };
27
- var __reExport = (target, module2, desc) => {
24
+ var __reExport = (target, module2, copyDefault, desc) => {
28
25
  if (module2 && typeof module2 === "object" || typeof module2 === "function") {
29
26
  for (let key of __getOwnPropNames(module2))
30
- if (!__hasOwnProp.call(target, key) && key !== "default")
27
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
31
28
  __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
32
29
  }
33
30
  return target;
34
31
  };
35
- var __toModule = (module2) => {
36
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
37
- };
38
- __export(exports, {
32
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
33
+ return (module2, temp) => {
34
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
35
+ };
36
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
37
+ var Text_exports = {};
38
+ __export(Text_exports, {
39
39
  Text: () => Text
40
40
  });
41
- var import_helpers = __toModule(require("@tamagui/helpers"));
42
- var import_platform = __toModule(require("../constants/platform"));
43
- var import_createComponent = __toModule(require("../createComponent"));
41
+ var import_helpers = require("@tamagui/helpers");
42
+ var import_platform = require("../constants/platform");
43
+ var import_createComponent = require("../createComponent");
44
44
  const ellipseStyle = {
45
45
  maxWidth: "100%",
46
46
  overflow: "hidden",
@@ -90,4 +90,5 @@ const Text = (0, import_createComponent.createComponent)({
90
90
  cursor: true
91
91
  })
92
92
  });
93
+ module.exports = __toCommonJS(Text_exports);
93
94
  //# sourceMappingURL=Text.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/views/Text.tsx"],
4
4
  "sourcesContent": ["import { stylePropsTextOnly, validStyles } from '@tamagui/helpers'\n\nimport { isWeb } from '../constants/platform'\nimport { createComponent } from '../createComponent'\nimport { TextProps } from '../types'\n\nconst ellipseStyle = {\n maxWidth: '100%',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n}\n\nexport const Text = createComponent<TextProps>({\n isText: true,\n defaultProps: {\n display: isWeb ? 'inline' : 'inline-flex',\n boxSizing: 'border-box',\n fontFamily: 'System',\n wordWrap: 'break-word',\n },\n variants: {\n numberOfLines: {\n 1: ellipseStyle,\n // TODO imply fn, test 1, could do types `>1` `<2`\n '[number]': (lines) => (lines > 1 ? { WebkitLineClamp: 1 } : null),\n },\n\n selectable: {\n true: {\n userSelect: 'text',\n },\n false: {\n userSelect: 'none',\n },\n },\n\n pressable: {\n true: {\n cursor: 'pointer',\n },\n },\n\n ellipse: {\n true: isWeb\n ? ellipseStyle\n : {\n numberOfLines: 1,\n lineBreakMode: 'clip',\n },\n },\n },\n deoptProps: new Set(isWeb ? [] : ['ellipse']),\n validStyles: {\n ...validStyles,\n ...stylePropsTextOnly,\n ...(isWeb && {\n userSelect: true,\n textOverflow: true,\n whiteSpace: true,\n wordWrap: true,\n selectable: true,\n cursor: true,\n }),\n },\n})\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,qBAAgD;AAEhD,sBAAsB;AACtB,6BAAgC;AAGhC,MAAM,eAAe;AAAA,EACnB,UAAU;AAAA,EACV,UAAU;AAAA,EACV,cAAc;AAAA,EACd,YAAY;AAAA;AAGP,MAAM,OAAO,4CAA2B;AAAA,EAC7C,QAAQ;AAAA,EACR,cAAc;AAAA,IACZ,SAAS,wBAAQ,WAAW;AAAA,IAC5B,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,UAAU;AAAA;AAAA,EAEZ,UAAU;AAAA,IACR,eAAe;AAAA,MACb,GAAG;AAAA,MAEH,YAAY,CAAC,UAAW,QAAQ,IAAI,EAAE,iBAAiB,MAAM;AAAA;AAAA,IAG/D,YAAY;AAAA,MACV,MAAM;AAAA,QACJ,YAAY;AAAA;AAAA,MAEd,OAAO;AAAA,QACL,YAAY;AAAA;AAAA;AAAA,IAIhB,WAAW;AAAA,MACT,MAAM;AAAA,QACJ,QAAQ;AAAA;AAAA;AAAA,IAIZ,SAAS;AAAA,MACP,MAAM,wBACF,eACA;AAAA,QACE,eAAe;AAAA,QACf,eAAe;AAAA;AAAA;AAAA;AAAA,EAIzB,YAAY,IAAI,IAAI,wBAAQ,KAAK,CAAC;AAAA,EAClC,aAAa,iDACR,6BACA,oCACC,yBAAS;AAAA,IACX,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,QAAQ;AAAA;AAAA;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAgD;AAEhD,sBAAsB;AACtB,6BAAgC;AAGhC,MAAM,eAAe;AAAA,EACnB,UAAU;AAAA,EACV,UAAU;AAAA,EACV,cAAc;AAAA,EACd,YAAY;AAAA;AAGP,MAAM,OAAO,4CAA2B;AAAA,EAC7C,QAAQ;AAAA,EACR,cAAc;AAAA,IACZ,SAAS,wBAAQ,WAAW;AAAA,IAC5B,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,UAAU;AAAA;AAAA,EAEZ,UAAU;AAAA,IACR,eAAe;AAAA,MACb,GAAG;AAAA,MAEH,YAAY,CAAC,UAAW,QAAQ,IAAI,EAAE,iBAAiB,MAAM;AAAA;AAAA,IAG/D,YAAY;AAAA,MACV,MAAM;AAAA,QACJ,YAAY;AAAA;AAAA,MAEd,OAAO;AAAA,QACL,YAAY;AAAA;AAAA;AAAA,IAIhB,WAAW;AAAA,MACT,MAAM;AAAA,QACJ,QAAQ;AAAA;AAAA;AAAA,IAIZ,SAAS;AAAA,MACP,MAAM,wBACF,eACA;AAAA,QACE,eAAe;AAAA,QACf,eAAe;AAAA;AAAA;AAAA;AAAA,EAIzB,YAAY,IAAI,IAAI,wBAAQ,KAAK,CAAC;AAAA,EAClC,aAAa,iDACR,6BACA,oCACC,yBAAS;AAAA,IACX,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,QAAQ;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -7,28 +7,33 @@ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
8
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
9
9
  var __export = (target, all) => {
10
- __markAsModule(target);
11
10
  for (var name in all)
12
11
  __defProp(target, name, { get: all[name], enumerable: true });
13
12
  };
14
- var __reExport = (target, module2, desc) => {
13
+ var __reExport = (target, module2, copyDefault, desc) => {
15
14
  if (module2 && typeof module2 === "object" || typeof module2 === "function") {
16
15
  for (let key of __getOwnPropNames(module2))
17
- if (!__hasOwnProp.call(target, key) && key !== "default")
16
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
18
17
  __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
19
18
  }
20
19
  return target;
21
20
  };
22
- var __toModule = (module2) => {
23
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
21
+ var __toESM = (module2, isNodeMode) => {
22
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
24
23
  };
25
- __export(exports, {
24
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
25
+ return (module2, temp) => {
26
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
27
+ };
28
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
29
+ var TextAncestorContext_exports = {};
30
+ __export(TextAncestorContext_exports, {
26
31
  FallbackNativeContext: () => FallbackNativeContext,
27
32
  TextAncestorContext: () => TextAncestorContext,
28
33
  TextAncestorProvider: () => TextAncestorProvider
29
34
  });
30
- var import_react = __toModule(require("react"));
31
- var import_rnw = __toModule(require("../constants/rnw"));
35
+ var import_react = __toESM(require("react"));
36
+ var import_rnw = require("../constants/rnw");
32
37
  var _a;
33
38
  const FallbackNativeContext = (0, import_react.createContext)(false);
34
39
  const TextAncestorContext = ((_a = import_rnw.rnw) == null ? void 0 : _a.TextAncestorContext) ?? FallbackNativeContext;
@@ -37,4 +42,5 @@ const TextAncestorProvider = /* @__PURE__ */ __name((props) => {
37
42
  value: false
38
43
  }, props.children);
39
44
  }, "TextAncestorProvider");
45
+ module.exports = __toCommonJS(TextAncestorContext_exports);
40
46
  //# sourceMappingURL=TextAncestorContext.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/views/TextAncestorContext.tsx"],
4
4
  "sourcesContent": ["import React, { createContext } from 'react'\n\nimport { rnw } from '../constants/rnw'\n\nexport const FallbackNativeContext = createContext(false)\n\nexport const TextAncestorContext = rnw?.TextAncestorContext ?? FallbackNativeContext\n\nexport const TextAncestorProvider = (props) => {\n return <TextAncestorContext.Provider value={false}>{props.children}</TextAncestorContext.Provider>\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAqC;AAErC,iBAAoB;AAFpB;AAIO,MAAM,wBAAwB,gCAAc;AAE5C,MAAM,sBAAsB,6CAAK,wBAAuB;AAExD,MAAM,uBAAuB,wBAAC,UAAU;AAC7C,SAAO,mDAAC,oBAAoB,UAArB;AAAA,IAA8B,OAAO;AAAA,KAAQ,MAAM;AAAA,GADxB;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAqC;AAErC,iBAAoB;AAFpB;AAIO,MAAM,wBAAwB,gCAAc;AAE5C,MAAM,sBAAsB,6CAAK,wBAAuB;AAExD,MAAM,uBAAuB,wBAAC,UAAU;AAC7C,SAAO,mDAAC,oBAAoB,UAArB;AAAA,IAA8B,OAAO;AAAA,KAAQ,MAAM;AAAA,GADxB;",
6
6
  "names": []
7
7
  }
@@ -7,30 +7,35 @@ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
8
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
9
9
  var __export = (target, all) => {
10
- __markAsModule(target);
11
10
  for (var name in all)
12
11
  __defProp(target, name, { get: all[name], enumerable: true });
13
12
  };
14
- var __reExport = (target, module2, desc) => {
13
+ var __reExport = (target, module2, copyDefault, desc) => {
15
14
  if (module2 && typeof module2 === "object" || typeof module2 === "function") {
16
15
  for (let key of __getOwnPropNames(module2))
17
- if (!__hasOwnProp.call(target, key) && key !== "default")
16
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
18
17
  __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
19
18
  }
20
19
  return target;
21
20
  };
22
- var __toModule = (module2) => {
23
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
21
+ var __toESM = (module2, isNodeMode) => {
22
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
24
23
  };
25
- __export(exports, {
24
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
25
+ return (module2, temp) => {
26
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
27
+ };
28
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
29
+ var Theme_exports = {};
30
+ __export(Theme_exports, {
26
31
  Theme: () => Theme
27
32
  });
28
- var import_react = __toModule(require("react"));
29
- var import_platform = __toModule(require("../constants/platform"));
30
- var import_createTamagui = __toModule(require("../createTamagui"));
31
- var import_useConstant = __toModule(require("../hooks/useConstant"));
32
- var import_ThemeContext = __toModule(require("./ThemeContext"));
33
- var import_ThemeManagerContext = __toModule(require("./ThemeManagerContext"));
33
+ var import_react = __toESM(require("react"));
34
+ var import_platform = require("../constants/platform");
35
+ var import_getThemeParentClassName = require("../helpers/getThemeParentClassName");
36
+ var import_useConstant = require("../hooks/useConstant");
37
+ var import_ThemeContext = require("./ThemeContext");
38
+ var import_ThemeManagerContext = require("./ThemeManagerContext");
34
39
  const Theme = /* @__PURE__ */ __name((props) => {
35
40
  var _a, _b;
36
41
  const parent = (0, import_react.useContext)(import_ThemeManagerContext.ThemeManagerContext);
@@ -81,11 +86,12 @@ const Theme = /* @__PURE__ */ __name((props) => {
81
86
  if (name) {
82
87
  const color = (_b = (_a = themes[name]) == null ? void 0 : _a["color"]) == null ? void 0 : _b["variable"];
83
88
  return /* @__PURE__ */ import_react.default.createElement("div", {
84
- className: (0, import_createTamagui.getThemeParentClassName)(props.name),
89
+ className: (0, import_getThemeParentClassName.getThemeParentClassName)(props.name),
85
90
  style: { display: "contents", color }
86
91
  }, contents);
87
92
  }
88
93
  }
89
94
  return contents;
90
95
  }, "Theme");
96
+ module.exports = __toCommonJS(Theme_exports);
91
97
  //# sourceMappingURL=Theme.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/views/Theme.tsx"],
4
- "sourcesContent": ["import React, { useContext, useState } from 'react'\n\nimport { isWeb, useIsomorphicLayoutEffect } from '../constants/platform'\nimport { getThemeParentClassName } from '../createTamagui'\nimport { useConstant } from '../hooks/useConstant'\nimport { ThemeName } from '../types'\nimport { ThemeContext } from './ThemeContext'\nimport { ThemeManager, ThemeManagerContext } from './ThemeManagerContext'\n\nexport type ThemeProps = {\n disableThemeClass?: boolean\n name: Exclude<ThemeName, number> | null\n children?: any\n}\n\nexport const Theme = (props: ThemeProps) => {\n const parent = useContext(ThemeManagerContext)\n const themes = useContext(ThemeContext)\n const [parentName, setParentName] = useState(parent.name || 'light')\n if (!themes) {\n console.warn('Error, no themes in context', props)\n return props.children\n }\n\n const nextNameParent = `${props.name}-${parentName}`\n const nextNameParentParent = `${props.name}-${parent.parentName}`\n const name = !props.name\n ? null\n : props.name in themes\n ? props.name\n : nextNameParent in themes\n ? nextNameParent\n : nextNameParentParent in themes\n ? nextNameParentParent\n : null\n const theme = name ? themes[name] : null\n const themeManager = useConstant<ThemeManager | null>(() => {\n if (!theme) {\n return null\n }\n const manager = new ThemeManager()\n if (name) {\n manager.setActiveTheme({ name, theme: themes[name], parentName })\n }\n return manager\n })\n\n useIsomorphicLayoutEffect(() => {\n if (!themeManager) {\n return\n }\n if (name) {\n themeManager.setActiveTheme({ name, theme, parentName })\n }\n return parent.onChangeTheme((next) => {\n if (next) {\n themeManager.setActiveTheme({ name: next, theme: themes[next], parentName })\n setParentName(next)\n }\n })\n }, [themes, name, parentName])\n\n if (!name || !theme) {\n return props.children\n }\n\n const contents = themeManager ? (\n <ThemeManagerContext.Provider value={themeManager}>\n {props.children}\n </ThemeManagerContext.Provider>\n ) : (\n props.children\n )\n\n if (isWeb) {\n if (props.disableThemeClass) {\n return contents\n }\n if (name) {\n const color = themes[name]?.['color']?.['variable']\n return (\n <div\n className={getThemeParentClassName(props.name)}\n // in order to provide currentColor, set color by default\n style={{ display: 'contents', color }}\n >\n {contents}\n </div>\n )\n }\n }\n\n return contents\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,mBAA4C;AAE5C,sBAAiD;AACjD,2BAAwC;AACxC,yBAA4B;AAE5B,0BAA6B;AAC7B,iCAAkD;AAQ3C,MAAM,QAAQ,wBAAC,UAAsB;AAf5C;AAgBE,QAAM,SAAS,6BAAW;AAC1B,QAAM,SAAS,6BAAW;AAC1B,QAAM,CAAC,YAAY,iBAAiB,2BAAS,OAAO,QAAQ;AAC5D,MAAI,CAAC,QAAQ;AACX,YAAQ,KAAK,+BAA+B;AAC5C,WAAO,MAAM;AAAA;AAGf,QAAM,iBAAiB,GAAG,MAAM,QAAQ;AACxC,QAAM,uBAAuB,GAAG,MAAM,QAAQ,OAAO;AACrD,QAAM,OAAO,CAAC,MAAM,OAChB,OACA,MAAM,QAAQ,SACd,MAAM,OACN,kBAAkB,SAClB,iBACA,wBAAwB,SACxB,uBACA;AACJ,QAAM,QAAQ,OAAO,OAAO,QAAQ;AACpC,QAAM,eAAe,oCAAiC,MAAM;AAC1D,QAAI,CAAC,OAAO;AACV,aAAO;AAAA;AAET,UAAM,UAAU,IAAI;AACpB,QAAI,MAAM;AACR,cAAQ,eAAe,EAAE,MAAM,OAAO,OAAO,OAAO;AAAA;AAEtD,WAAO;AAAA;AAGT,iDAA0B,MAAM;AAC9B,QAAI,CAAC,cAAc;AACjB;AAAA;AAEF,QAAI,MAAM;AACR,mBAAa,eAAe,EAAE,MAAM,OAAO;AAAA;AAE7C,WAAO,OAAO,cAAc,CAAC,SAAS;AACpC,UAAI,MAAM;AACR,qBAAa,eAAe,EAAE,MAAM,MAAM,OAAO,OAAO,OAAO;AAC/D,sBAAc;AAAA;AAAA;AAAA,KAGjB,CAAC,QAAQ,MAAM;AAElB,MAAI,CAAC,QAAQ,CAAC,OAAO;AACnB,WAAO,MAAM;AAAA;AAGf,QAAM,WAAW,eACf,mDAAC,+CAAoB,UAArB;AAAA,IAA8B,OAAO;AAAA,KAClC,MAAM,YAGT,MAAM;AAGR,MAAI,uBAAO;AACT,QAAI,MAAM,mBAAmB;AAC3B,aAAO;AAAA;AAET,QAAI,MAAM;AACR,YAAM,QAAQ,mBAAO,UAAP,mBAAe,aAAf,mBAA0B;AACxC,aACE,mDAAC,OAAD;AAAA,QACE,WAAW,kDAAwB,MAAM;AAAA,QAEzC,OAAO,EAAE,SAAS,YAAY;AAAA,SAE7B;AAAA;AAAA;AAMT,SAAO;AAAA,GA7EY;",
4
+ "sourcesContent": ["import React, { useContext, useState } from 'react'\n\nimport { isWeb, useIsomorphicLayoutEffect } from '../constants/platform'\nimport { getThemeParentClassName } from '../helpers/getThemeParentClassName'\nimport { useConstant } from '../hooks/useConstant'\nimport { ThemeName } from '../types'\nimport { ThemeContext } from './ThemeContext'\nimport { ThemeManager, ThemeManagerContext } from './ThemeManagerContext'\n\nexport type ThemeProps = {\n disableThemeClass?: boolean\n name: Exclude<ThemeName, number> | null\n children?: any\n}\n\nexport const Theme = (props: ThemeProps) => {\n const parent = useContext(ThemeManagerContext)\n const themes = useContext(ThemeContext)\n const [parentName, setParentName] = useState(parent.name || 'light')\n if (!themes) {\n console.warn('Error, no themes in context', props)\n return props.children\n }\n\n const nextNameParent = `${props.name}-${parentName}`\n const nextNameParentParent = `${props.name}-${parent.parentName}`\n const name = !props.name\n ? null\n : props.name in themes\n ? props.name\n : nextNameParent in themes\n ? nextNameParent\n : nextNameParentParent in themes\n ? nextNameParentParent\n : null\n const theme = name ? themes[name] : null\n const themeManager = useConstant<ThemeManager | null>(() => {\n if (!theme) {\n return null\n }\n const manager = new ThemeManager()\n if (name) {\n manager.setActiveTheme({ name, theme: themes[name], parentName })\n }\n return manager\n })\n\n useIsomorphicLayoutEffect(() => {\n if (!themeManager) {\n return\n }\n if (name) {\n themeManager.setActiveTheme({ name, theme, parentName })\n }\n return parent.onChangeTheme((next) => {\n if (next) {\n themeManager.setActiveTheme({ name: next, theme: themes[next], parentName })\n setParentName(next)\n }\n })\n }, [themes, name, parentName])\n\n if (!name || !theme) {\n return props.children\n }\n\n const contents = themeManager ? (\n <ThemeManagerContext.Provider value={themeManager}>\n {props.children}\n </ThemeManagerContext.Provider>\n ) : (\n props.children\n )\n\n if (isWeb) {\n if (props.disableThemeClass) {\n return contents\n }\n if (name) {\n const color = themes[name]?.['color']?.['variable']\n return (\n <div\n className={getThemeParentClassName(props.name)}\n // in order to provide currentColor, set color by default\n style={{ display: 'contents', color }}\n >\n {contents}\n </div>\n )\n }\n }\n\n return contents\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA4C;AAE5C,sBAAiD;AACjD,qCAAwC;AACxC,yBAA4B;AAE5B,0BAA6B;AAC7B,iCAAkD;AAQ3C,MAAM,QAAQ,wBAAC,UAAsB;AAf5C;AAgBE,QAAM,SAAS,6BAAW;AAC1B,QAAM,SAAS,6BAAW;AAC1B,QAAM,CAAC,YAAY,iBAAiB,2BAAS,OAAO,QAAQ;AAC5D,MAAI,CAAC,QAAQ;AACX,YAAQ,KAAK,+BAA+B;AAC5C,WAAO,MAAM;AAAA;AAGf,QAAM,iBAAiB,GAAG,MAAM,QAAQ;AACxC,QAAM,uBAAuB,GAAG,MAAM,QAAQ,OAAO;AACrD,QAAM,OAAO,CAAC,MAAM,OAChB,OACA,MAAM,QAAQ,SACd,MAAM,OACN,kBAAkB,SAClB,iBACA,wBAAwB,SACxB,uBACA;AACJ,QAAM,QAAQ,OAAO,OAAO,QAAQ;AACpC,QAAM,eAAe,oCAAiC,MAAM;AAC1D,QAAI,CAAC,OAAO;AACV,aAAO;AAAA;AAET,UAAM,UAAU,IAAI;AACpB,QAAI,MAAM;AACR,cAAQ,eAAe,EAAE,MAAM,OAAO,OAAO,OAAO;AAAA;AAEtD,WAAO;AAAA;AAGT,iDAA0B,MAAM;AAC9B,QAAI,CAAC,cAAc;AACjB;AAAA;AAEF,QAAI,MAAM;AACR,mBAAa,eAAe,EAAE,MAAM,OAAO;AAAA;AAE7C,WAAO,OAAO,cAAc,CAAC,SAAS;AACpC,UAAI,MAAM;AACR,qBAAa,eAAe,EAAE,MAAM,MAAM,OAAO,OAAO,OAAO;AAC/D,sBAAc;AAAA;AAAA;AAAA,KAGjB,CAAC,QAAQ,MAAM;AAElB,MAAI,CAAC,QAAQ,CAAC,OAAO;AACnB,WAAO,MAAM;AAAA;AAGf,QAAM,WAAW,eACf,mDAAC,+CAAoB,UAArB;AAAA,IAA8B,OAAO;AAAA,KAClC,MAAM,YAGT,MAAM;AAGR,MAAI,uBAAO;AACT,QAAI,MAAM,mBAAmB;AAC3B,aAAO;AAAA;AAET,QAAI,MAAM;AACR,YAAM,QAAQ,mBAAO,UAAP,mBAAe,aAAf,mBAA0B;AACxC,aACE,mDAAC,OAAD;AAAA,QACE,WAAW,4DAAwB,MAAM;AAAA,QAEzC,OAAO,EAAE,SAAS,YAAY;AAAA,SAE7B;AAAA;AAAA;AAMT,SAAO;AAAA,GA7EY;",
6
6
  "names": []
7
7
  }
@@ -1,29 +1,30 @@
1
- var __create = Object.create;
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
5
  var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
6
  var __export = (target, all) => {
9
- __markAsModule(target);
10
7
  for (var name in all)
11
8
  __defProp(target, name, { get: all[name], enumerable: true });
12
9
  };
13
- var __reExport = (target, module2, desc) => {
10
+ var __reExport = (target, module2, copyDefault, desc) => {
14
11
  if (module2 && typeof module2 === "object" || typeof module2 === "function") {
15
12
  for (let key of __getOwnPropNames(module2))
16
- if (!__hasOwnProp.call(target, key) && key !== "default")
13
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
17
14
  __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
18
15
  }
19
16
  return target;
20
17
  };
21
- var __toModule = (module2) => {
22
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
23
- };
24
- __export(exports, {
18
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
19
+ return (module2, temp) => {
20
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
21
+ };
22
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
23
+ var ThemeContext_exports = {};
24
+ __export(ThemeContext_exports, {
25
25
  ThemeContext: () => ThemeContext
26
26
  });
27
- var import_react = __toModule(require("react"));
27
+ var import_react = require("react");
28
28
  const ThemeContext = (0, import_react.createContext)(null);
29
+ module.exports = __toCommonJS(ThemeContext_exports);
29
30
  //# sourceMappingURL=ThemeContext.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/views/ThemeContext.tsx"],
4
4
  "sourcesContent": ["import { createContext } from 'react'\n\nimport { Themes } from '../types'\n\nexport const ThemeContext = createContext<Themes>(null as any)\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,mBAA8B;AAIvB,MAAM,eAAe,gCAAsB;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA8B;AAIvB,MAAM,eAAe,gCAAsB;",
6
6
  "names": []
7
7
  }
@@ -7,28 +7,33 @@ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
8
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
9
9
  var __export = (target, all) => {
10
- __markAsModule(target);
11
10
  for (var name in all)
12
11
  __defProp(target, name, { get: all[name], enumerable: true });
13
12
  };
14
- var __reExport = (target, module2, desc) => {
13
+ var __reExport = (target, module2, copyDefault, desc) => {
15
14
  if (module2 && typeof module2 === "object" || typeof module2 === "function") {
16
15
  for (let key of __getOwnPropNames(module2))
17
- if (!__hasOwnProp.call(target, key) && key !== "default")
16
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
18
17
  __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
19
18
  }
20
19
  return target;
21
20
  };
22
- var __toModule = (module2) => {
23
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
21
+ var __toESM = (module2, isNodeMode) => {
22
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
24
23
  };
25
- __export(exports, {
24
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
25
+ return (module2, temp) => {
26
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
27
+ };
28
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
29
+ var ThemeInverse_exports = {};
30
+ __export(ThemeInverse_exports, {
26
31
  ThemeInverse: () => ThemeInverse,
27
32
  setThemeInversions: () => setThemeInversions
28
33
  });
29
- var import_react = __toModule(require("react"));
30
- var import_useTheme = __toModule(require("../hooks/useTheme"));
31
- var import_Theme = __toModule(require("./Theme"));
34
+ var import_react = __toESM(require("react"));
35
+ var import_useTheme = require("../hooks/useTheme");
36
+ var import_Theme = require("./Theme");
32
37
  let inversions = {
33
38
  light: "dark",
34
39
  dark: "light"
@@ -45,4 +50,5 @@ const ThemeInverse = /* @__PURE__ */ __name((props) => {
45
50
  name
46
51
  }, props.children);
47
52
  }, "ThemeInverse");
53
+ module.exports = __toCommonJS(ThemeInverse_exports);
48
54
  //# sourceMappingURL=ThemeInverse.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/views/ThemeInverse.tsx"],
4
4
  "sourcesContent": ["import React from 'react'\n\nimport { useDefaultThemeName, useThemeName } from '../hooks/useTheme'\nimport { Theme } from './Theme'\n\ntype StringRecord = { [key: string]: string }\n\nlet inversions: StringRecord = {\n light: 'dark',\n dark: 'light',\n}\n\nexport function setThemeInversions(next: StringRecord) {\n inversions = next\n}\n\nexport const ThemeInverse = (props: { children: any }) => {\n const themeName = useThemeName()\n const defaultTheme = useDefaultThemeName()\n const name = inversions[themeName] || inversions[defaultTheme] || null\n return <Theme name={name}>{props.children}</Theme>\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAElB,sBAAkD;AAClD,mBAAsB;AAItB,IAAI,aAA2B;AAAA,EAC7B,OAAO;AAAA,EACP,MAAM;AAAA;AAGD,4BAA4B,MAAoB;AACrD,eAAa;AAAA;AADC;AAIT,MAAM,eAAe,wBAAC,UAA6B;AACxD,QAAM,YAAY;AAClB,QAAM,eAAe;AACrB,QAAM,OAAO,WAAW,cAAc,WAAW,iBAAiB;AAClE,SAAO,mDAAC,oBAAD;AAAA,IAAO;AAAA,KAAa,MAAM;AAAA,GAJP;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAElB,sBAAkD;AAClD,mBAAsB;AAItB,IAAI,aAA2B;AAAA,EAC7B,OAAO;AAAA,EACP,MAAM;AAAA;AAGD,4BAA4B,MAAoB;AACrD,eAAa;AAAA;AADC;AAIT,MAAM,eAAe,wBAAC,UAA6B;AACxD,QAAM,YAAY;AAClB,QAAM,eAAe;AACrB,QAAM,OAAO,WAAW,cAAc,WAAW,iBAAiB;AAClE,SAAO,mDAAC,oBAAD;AAAA,IAAO;AAAA,KAAa,MAAM;AAAA,GAJP;",
6
6
  "names": []
7
7
  }