@tamagui/web 1.114.3 → 1.115.0
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.
- package/dist/cjs/Tamagui.cjs +80 -0
- package/dist/cjs/_withStableStyle.cjs +51 -0
- package/dist/cjs/config.cjs +111 -0
- package/dist/cjs/constants/{accessibilityDirectMap.js → accessibilityDirectMap.cjs} +19 -11
- package/dist/cjs/constants/accessibilityDirectMap.native.cjs +34 -0
- package/dist/cjs/constants/accessibilityDirectMap.native.cjs.map +6 -0
- package/dist/cjs/constants/constants.cjs +45 -0
- package/dist/cjs/constants/isDevTools.cjs +31 -0
- package/dist/cjs/constants/webToNativeProps.cjs +28 -0
- package/dist/cjs/constants/webToNativeProps.native.cjs +102 -0
- package/dist/cjs/constants/webToNativeProps.native.cjs.map +6 -0
- package/dist/cjs/contexts/{ComponentContext.js → ComponentContext.cjs} +17 -12
- package/dist/cjs/{createComponent.js → createComponent.cjs} +407 -317
- package/dist/cjs/createFont.cjs +42 -0
- package/dist/cjs/createShorthands.cjs +28 -0
- package/dist/cjs/createTamagui.cjs +235 -0
- package/dist/cjs/createTheme.cjs +26 -0
- package/dist/cjs/createTokens.cjs +29 -0
- package/dist/cjs/{createVariable.js → createVariable.cjs} +31 -24
- package/dist/cjs/createVariables.cjs +58 -0
- package/dist/cjs/defaultComponentState.cjs +44 -0
- package/dist/cjs/helpers/ThemeManager.cjs +184 -0
- package/dist/cjs/helpers/{ThemeManagerContext.js → ThemeManagerContext.cjs} +22 -14
- package/dist/cjs/helpers/createMediaStyle.cjs +96 -0
- package/dist/cjs/helpers/{createShallowSetState.js → createShallowSetState.cjs} +29 -22
- package/dist/cjs/helpers/createStyledContext.cjs +70 -0
- package/dist/cjs/helpers/defaultOffset.cjs +29 -0
- package/dist/cjs/helpers/expandStyle.cjs +67 -0
- package/dist/cjs/helpers/expandStyles.cjs +40 -0
- package/dist/cjs/helpers/getExpandedShorthands.cjs +33 -0
- package/dist/cjs/helpers/getFontLanguage.cjs +26 -0
- package/dist/cjs/helpers/getGroupPropParts.cjs +37 -0
- package/dist/cjs/helpers/{getSplitStyles.js → getSplitStyles.cjs} +362 -335
- package/dist/cjs/helpers/getStylesAtomic.cjs +176 -0
- package/dist/cjs/helpers/getStylesAtomic.native.cjs +33 -0
- package/dist/cjs/helpers/getStylesAtomic.native.cjs.map +6 -0
- package/dist/cjs/helpers/getThemeCSSRules.cjs +119 -0
- package/dist/cjs/helpers/getThemeCSSRules.native.cjs +28 -0
- package/dist/cjs/helpers/getThemeCSSRules.native.cjs.map +6 -0
- package/dist/cjs/helpers/getVariantExtras.cjs +65 -0
- package/dist/cjs/helpers/{insertStyleRule.js → insertStyleRule.cjs} +93 -96
- package/dist/cjs/helpers/isActivePlatform.cjs +35 -0
- package/dist/cjs/helpers/isObj.cjs +26 -0
- package/dist/cjs/helpers/isTamaguiComponent.cjs +29 -0
- package/dist/cjs/helpers/{isTamaguiElement.js → isTamaguiElement.cjs} +24 -15
- package/dist/cjs/helpers/log.cjs +36 -0
- package/dist/cjs/helpers/matchMedia.cjs +36 -0
- package/dist/cjs/helpers/matchMedia.native.cjs +39 -0
- package/dist/cjs/helpers/matchMedia.native.cjs.map +6 -0
- package/dist/cjs/helpers/mergeProps.cjs +45 -0
- package/dist/cjs/helpers/{mergeVariants.js → mergeVariants.cjs} +19 -17
- package/dist/cjs/helpers/normalizeColor.cjs +48 -0
- package/dist/cjs/helpers/{normalizeShadow.js → normalizeShadow.cjs} +22 -13
- package/dist/cjs/helpers/normalizeStyle.cjs +47 -0
- package/dist/cjs/helpers/normalizeStylePropKeys.cjs +26 -0
- package/dist/cjs/helpers/normalizeStylePropKeys.native.cjs +37 -0
- package/dist/cjs/helpers/normalizeStylePropKeys.native.cjs.map +6 -0
- package/dist/cjs/helpers/{normalizeValueWithProperty.js → normalizeValueWithProperty.cjs} +22 -19
- package/dist/cjs/helpers/objectIdentityKey.cjs +39 -0
- package/dist/cjs/helpers/propMapper.cjs +254 -0
- package/dist/cjs/helpers/proxyThemeToParents.cjs +61 -0
- package/dist/cjs/helpers/{proxyThemeVariables.js → proxyThemeVariables.cjs} +16 -11
- package/dist/cjs/helpers/pseudoDescriptors.cjs +72 -0
- package/dist/cjs/helpers/registerCSSVariable.cjs +33 -0
- package/dist/cjs/helpers/setElementProps.cjs +29 -0
- package/dist/cjs/helpers/setElementProps.native.cjs +30 -0
- package/dist/cjs/helpers/setElementProps.native.cjs.map +6 -0
- package/dist/cjs/helpers/{skipProps.js → skipProps.cjs} +17 -12
- package/dist/cjs/helpers/sortString.cjs +26 -0
- package/dist/cjs/helpers/{subscribeToContextGroup.js → subscribeToContextGroup.cjs} +25 -17
- package/dist/cjs/helpers/themeable.cjs +83 -0
- package/dist/cjs/helpers/{themes.js → themes.cjs} +17 -12
- package/dist/cjs/helpers/timer.cjs +32 -0
- package/dist/cjs/helpers/transformsToString.cjs +37 -0
- package/dist/cjs/helpers/webPropsToSkip.cjs +26 -0
- package/dist/cjs/helpers/webPropsToSkip.native.cjs +79 -0
- package/dist/cjs/helpers/webPropsToSkip.native.cjs.map +6 -0
- package/dist/cjs/helpers/wrapStyleTags.cjs +40 -0
- package/dist/cjs/hooks/{useComponentState.js → useComponentState.cjs} +75 -30
- package/dist/cjs/hooks/useConfiguration.cjs +55 -0
- package/dist/cjs/hooks/{useDidHydrateOnce.js → useDidHydrateOnce.cjs} +27 -16
- package/dist/cjs/hooks/useDisableSSR.cjs +29 -0
- package/dist/cjs/hooks/useIsTouchDevice.cjs +28 -0
- package/dist/cjs/hooks/useMedia.cjs +227 -0
- package/dist/cjs/hooks/useProps.cjs +108 -0
- package/dist/cjs/hooks/useTheme.cjs +277 -0
- package/dist/cjs/hooks/useThemeName.cjs +50 -0
- package/dist/cjs/index.cjs +106 -0
- package/dist/cjs/inject-styles.cjs +37 -0
- package/dist/cjs/insertFont.cjs +72 -0
- package/dist/cjs/interfaces/CSSColorNames.cjs +16 -0
- package/dist/cjs/interfaces/GetRef.cjs +16 -0
- package/dist/cjs/interfaces/KeyTypes.cjs +16 -0
- package/dist/cjs/interfaces/RNExclusiveTypes.cjs +16 -0
- package/dist/cjs/interfaces/Role.cjs +16 -0
- package/dist/cjs/interfaces/TamaguiComponentEvents.cjs +16 -0
- package/dist/cjs/interfaces/{TamaguiComponentPropsBaseBase.js → TamaguiComponentPropsBaseBase.cjs} +8 -6
- package/dist/cjs/interfaces/TamaguiComponentState.cjs +16 -0
- package/dist/cjs/interfaces/WebOnlyPressEvents.cjs +16 -0
- package/dist/cjs/setupHooks.cjs +30 -0
- package/dist/cjs/setupReactNative.cjs +49 -0
- package/dist/cjs/styled.cjs +87 -0
- package/dist/cjs/type-utils.cjs +16 -0
- package/dist/cjs/types.cjs +19 -0
- package/dist/cjs/views/Configuration.cjs +47 -0
- package/dist/cjs/views/FontLanguage.cjs +37 -0
- package/dist/cjs/views/FontLanguage.native.cjs +50 -0
- package/dist/cjs/views/FontLanguage.native.cjs.map +6 -0
- package/dist/cjs/views/FontLanguage.types.cjs +16 -0
- package/dist/cjs/views/Slot.cjs +78 -0
- package/dist/cjs/views/Stack.cjs +34 -0
- package/dist/cjs/views/TamaguiProvider.cjs +93 -0
- package/dist/cjs/views/Text.cjs +86 -0
- package/dist/cjs/views/Theme.cjs +145 -0
- package/dist/cjs/views/ThemeDebug.cjs +92 -0
- package/dist/cjs/views/ThemeDebug.native.cjs +33 -0
- package/dist/cjs/views/ThemeDebug.native.cjs.map +6 -0
- package/dist/cjs/views/ThemeProvider.cjs +56 -0
- package/dist/cjs/views/View.cjs +33 -0
- package/package.json +15 -14
- package/dist/cjs/Tamagui.js +0 -63
- package/dist/cjs/_withStableStyle.js +0 -33
- package/dist/cjs/config.js +0 -97
- package/dist/cjs/constants/constants.js +0 -36
- package/dist/cjs/constants/isDevTools.js +0 -28
- package/dist/cjs/constants/webToNativeProps.js +0 -22
- package/dist/cjs/createFont.js +0 -53
- package/dist/cjs/createShorthands.js +0 -23
- package/dist/cjs/createTamagui.js +0 -189
- package/dist/cjs/createTheme.js +0 -21
- package/dist/cjs/createTokens.js +0 -24
- package/dist/cjs/createVariables.js +0 -47
- package/dist/cjs/defaultComponentState.js +0 -37
- package/dist/cjs/helpers/ThemeManager.js +0 -166
- package/dist/cjs/helpers/createMediaStyle.js +0 -74
- package/dist/cjs/helpers/createStyledContext.js +0 -53
- package/dist/cjs/helpers/defaultOffset.js +0 -21
- package/dist/cjs/helpers/expandStyle.js +0 -73
- package/dist/cjs/helpers/expandStyles.js +0 -34
- package/dist/cjs/helpers/getExpandedShorthands.js +0 -29
- package/dist/cjs/helpers/getFontLanguage.js +0 -21
- package/dist/cjs/helpers/getGroupPropParts.js +0 -27
- package/dist/cjs/helpers/getStylesAtomic.js +0 -152
- package/dist/cjs/helpers/getThemeCSSRules.js +0 -89
- package/dist/cjs/helpers/getVariantExtras.js +0 -58
- package/dist/cjs/helpers/isActivePlatform.js +0 -29
- package/dist/cjs/helpers/isObj.js +0 -21
- package/dist/cjs/helpers/isTamaguiComponent.js +0 -24
- package/dist/cjs/helpers/log.js +0 -31
- package/dist/cjs/helpers/matchMedia.js +0 -34
- package/dist/cjs/helpers/mergeProps.js +0 -41
- package/dist/cjs/helpers/normalizeColor.js +0 -43
- package/dist/cjs/helpers/normalizeStyle.js +0 -36
- package/dist/cjs/helpers/normalizeStylePropKeys.js +0 -21
- package/dist/cjs/helpers/objectIdentityKey.js +0 -38
- package/dist/cjs/helpers/propMapper.js +0 -238
- package/dist/cjs/helpers/proxyThemeToParents.js +0 -52
- package/dist/cjs/helpers/pseudoDescriptors.js +0 -65
- package/dist/cjs/helpers/registerCSSVariable.js +0 -29
- package/dist/cjs/helpers/setElementProps.js +0 -24
- package/dist/cjs/helpers/sortString.js +0 -21
- package/dist/cjs/helpers/themeable.js +0 -63
- package/dist/cjs/helpers/timer.js +0 -27
- package/dist/cjs/helpers/transformsToString.js +0 -32
- package/dist/cjs/helpers/webPropsToSkip.js +0 -21
- package/dist/cjs/helpers/wrapStyleTags.js +0 -39
- package/dist/cjs/hooks/useConfiguration.js +0 -37
- package/dist/cjs/hooks/useDisableSSR.js +0 -24
- package/dist/cjs/hooks/useIsTouchDevice.js +0 -22
- package/dist/cjs/hooks/useMedia.js +0 -206
- package/dist/cjs/hooks/useProps.js +0 -95
- package/dist/cjs/hooks/useTheme.js +0 -263
- package/dist/cjs/hooks/useThemeName.js +0 -39
- package/dist/cjs/index.js +0 -99
- package/dist/cjs/inject-styles.js +0 -28
- package/dist/cjs/insertFont.js +0 -65
- package/dist/cjs/interfaces/CSSColorNames.js +0 -14
- package/dist/cjs/interfaces/GetRef.js +0 -14
- package/dist/cjs/interfaces/KeyTypes.js +0 -14
- package/dist/cjs/interfaces/RNExclusiveTypes.js +0 -14
- package/dist/cjs/interfaces/Role.js +0 -14
- package/dist/cjs/interfaces/TamaguiComponentEvents.js +0 -14
- package/dist/cjs/interfaces/TamaguiComponentState.js +0 -14
- package/dist/cjs/interfaces/WebOnlyPressEvents.js +0 -14
- package/dist/cjs/setupHooks.js +0 -25
- package/dist/cjs/setupReactNative.js +0 -46
- package/dist/cjs/styled.js +0 -74
- package/dist/cjs/type-utils.js +0 -14
- package/dist/cjs/types.js +0 -16
- package/dist/cjs/views/Configuration.js +0 -34
- package/dist/cjs/views/FontLanguage.js +0 -32
- package/dist/cjs/views/FontLanguage.types.js +0 -14
- package/dist/cjs/views/Slot.js +0 -59
- package/dist/cjs/views/Stack.js +0 -27
- package/dist/cjs/views/TamaguiProvider.js +0 -76
- package/dist/cjs/views/Text.js +0 -77
- package/dist/cjs/views/Theme.js +0 -103
- package/dist/cjs/views/ThemeDebug.js +0 -94
- package/dist/cjs/views/ThemeProvider.js +0 -45
- package/dist/cjs/views/View.js +0 -26
- /package/dist/cjs/{Tamagui.js.map → Tamagui.cjs.map} +0 -0
- /package/dist/cjs/{_withStableStyle.js.map → _withStableStyle.cjs.map} +0 -0
- /package/dist/cjs/{config.js.map → config.cjs.map} +0 -0
- /package/dist/cjs/constants/{accessibilityDirectMap.js.map → accessibilityDirectMap.cjs.map} +0 -0
- /package/dist/cjs/constants/{constants.js.map → constants.cjs.map} +0 -0
- /package/dist/cjs/constants/{isDevTools.js.map → isDevTools.cjs.map} +0 -0
- /package/dist/cjs/constants/{webToNativeProps.js.map → webToNativeProps.cjs.map} +0 -0
- /package/dist/cjs/contexts/{ComponentContext.js.map → ComponentContext.cjs.map} +0 -0
- /package/dist/cjs/{createComponent.js.map → createComponent.cjs.map} +0 -0
- /package/dist/cjs/{createFont.js.map → createFont.cjs.map} +0 -0
- /package/dist/cjs/{createShorthands.js.map → createShorthands.cjs.map} +0 -0
- /package/dist/cjs/{createTamagui.js.map → createTamagui.cjs.map} +0 -0
- /package/dist/cjs/{createTheme.js.map → createTheme.cjs.map} +0 -0
- /package/dist/cjs/{createTokens.js.map → createTokens.cjs.map} +0 -0
- /package/dist/cjs/{createVariable.js.map → createVariable.cjs.map} +0 -0
- /package/dist/cjs/{createVariables.js.map → createVariables.cjs.map} +0 -0
- /package/dist/cjs/{defaultComponentState.js.map → defaultComponentState.cjs.map} +0 -0
- /package/dist/cjs/helpers/{ThemeManager.js.map → ThemeManager.cjs.map} +0 -0
- /package/dist/cjs/helpers/{ThemeManagerContext.js.map → ThemeManagerContext.cjs.map} +0 -0
- /package/dist/cjs/helpers/{createMediaStyle.js.map → createMediaStyle.cjs.map} +0 -0
- /package/dist/cjs/helpers/{createShallowSetState.js.map → createShallowSetState.cjs.map} +0 -0
- /package/dist/cjs/helpers/{createStyledContext.js.map → createStyledContext.cjs.map} +0 -0
- /package/dist/cjs/helpers/{defaultOffset.js.map → defaultOffset.cjs.map} +0 -0
- /package/dist/cjs/helpers/{expandStyle.js.map → expandStyle.cjs.map} +0 -0
- /package/dist/cjs/helpers/{expandStyles.js.map → expandStyles.cjs.map} +0 -0
- /package/dist/cjs/helpers/{getExpandedShorthands.js.map → getExpandedShorthands.cjs.map} +0 -0
- /package/dist/cjs/helpers/{getFontLanguage.js.map → getFontLanguage.cjs.map} +0 -0
- /package/dist/cjs/helpers/{getGroupPropParts.js.map → getGroupPropParts.cjs.map} +0 -0
- /package/dist/cjs/helpers/{getSplitStyles.js.map → getSplitStyles.cjs.map} +0 -0
- /package/dist/cjs/helpers/{getStylesAtomic.js.map → getStylesAtomic.cjs.map} +0 -0
- /package/dist/cjs/helpers/{getThemeCSSRules.js.map → getThemeCSSRules.cjs.map} +0 -0
- /package/dist/cjs/helpers/{getVariantExtras.js.map → getVariantExtras.cjs.map} +0 -0
- /package/dist/cjs/helpers/{insertStyleRule.js.map → insertStyleRule.cjs.map} +0 -0
- /package/dist/cjs/helpers/{isActivePlatform.js.map → isActivePlatform.cjs.map} +0 -0
- /package/dist/cjs/helpers/{isObj.js.map → isObj.cjs.map} +0 -0
- /package/dist/cjs/helpers/{isTamaguiComponent.js.map → isTamaguiComponent.cjs.map} +0 -0
- /package/dist/cjs/helpers/{isTamaguiElement.js.map → isTamaguiElement.cjs.map} +0 -0
- /package/dist/cjs/helpers/{log.js.map → log.cjs.map} +0 -0
- /package/dist/cjs/helpers/{matchMedia.js.map → matchMedia.cjs.map} +0 -0
- /package/dist/cjs/helpers/{mergeProps.js.map → mergeProps.cjs.map} +0 -0
- /package/dist/cjs/helpers/{mergeVariants.js.map → mergeVariants.cjs.map} +0 -0
- /package/dist/cjs/helpers/{normalizeColor.js.map → normalizeColor.cjs.map} +0 -0
- /package/dist/cjs/helpers/{normalizeShadow.js.map → normalizeShadow.cjs.map} +0 -0
- /package/dist/cjs/helpers/{normalizeStyle.js.map → normalizeStyle.cjs.map} +0 -0
- /package/dist/cjs/helpers/{normalizeStylePropKeys.js.map → normalizeStylePropKeys.cjs.map} +0 -0
- /package/dist/cjs/helpers/{normalizeValueWithProperty.js.map → normalizeValueWithProperty.cjs.map} +0 -0
- /package/dist/cjs/helpers/{objectIdentityKey.js.map → objectIdentityKey.cjs.map} +0 -0
- /package/dist/cjs/helpers/{propMapper.js.map → propMapper.cjs.map} +0 -0
- /package/dist/cjs/helpers/{proxyThemeToParents.js.map → proxyThemeToParents.cjs.map} +0 -0
- /package/dist/cjs/helpers/{proxyThemeVariables.js.map → proxyThemeVariables.cjs.map} +0 -0
- /package/dist/cjs/helpers/{pseudoDescriptors.js.map → pseudoDescriptors.cjs.map} +0 -0
- /package/dist/cjs/helpers/{registerCSSVariable.js.map → registerCSSVariable.cjs.map} +0 -0
- /package/dist/cjs/helpers/{setElementProps.js.map → setElementProps.cjs.map} +0 -0
- /package/dist/cjs/helpers/{skipProps.js.map → skipProps.cjs.map} +0 -0
- /package/dist/cjs/helpers/{sortString.js.map → sortString.cjs.map} +0 -0
- /package/dist/cjs/helpers/{subscribeToContextGroup.js.map → subscribeToContextGroup.cjs.map} +0 -0
- /package/dist/cjs/helpers/{themeable.js.map → themeable.cjs.map} +0 -0
- /package/dist/cjs/helpers/{themes.js.map → themes.cjs.map} +0 -0
- /package/dist/cjs/helpers/{timer.js.map → timer.cjs.map} +0 -0
- /package/dist/cjs/helpers/{transformsToString.js.map → transformsToString.cjs.map} +0 -0
- /package/dist/cjs/helpers/{webPropsToSkip.js.map → webPropsToSkip.cjs.map} +0 -0
- /package/dist/cjs/helpers/{wrapStyleTags.js.map → wrapStyleTags.cjs.map} +0 -0
- /package/dist/cjs/hooks/{useComponentState.js.map → useComponentState.cjs.map} +0 -0
- /package/dist/cjs/hooks/{useConfiguration.js.map → useConfiguration.cjs.map} +0 -0
- /package/dist/cjs/hooks/{useDidHydrateOnce.js.map → useDidHydrateOnce.cjs.map} +0 -0
- /package/dist/cjs/hooks/{useDisableSSR.js.map → useDisableSSR.cjs.map} +0 -0
- /package/dist/cjs/hooks/{useIsTouchDevice.js.map → useIsTouchDevice.cjs.map} +0 -0
- /package/dist/cjs/hooks/{useMedia.js.map → useMedia.cjs.map} +0 -0
- /package/dist/cjs/hooks/{useProps.js.map → useProps.cjs.map} +0 -0
- /package/dist/cjs/hooks/{useTheme.js.map → useTheme.cjs.map} +0 -0
- /package/dist/cjs/hooks/{useThemeName.js.map → useThemeName.cjs.map} +0 -0
- /package/dist/cjs/{index.js.map → index.cjs.map} +0 -0
- /package/dist/cjs/{inject-styles.js.map → inject-styles.cjs.map} +0 -0
- /package/dist/cjs/{insertFont.js.map → insertFont.cjs.map} +0 -0
- /package/dist/cjs/interfaces/{CSSColorNames.js.map → CSSColorNames.cjs.map} +0 -0
- /package/dist/cjs/interfaces/{GetRef.js.map → GetRef.cjs.map} +0 -0
- /package/dist/cjs/interfaces/{KeyTypes.js.map → KeyTypes.cjs.map} +0 -0
- /package/dist/cjs/interfaces/{RNExclusiveTypes.js.map → RNExclusiveTypes.cjs.map} +0 -0
- /package/dist/cjs/interfaces/{Role.js.map → Role.cjs.map} +0 -0
- /package/dist/cjs/interfaces/{TamaguiComponentEvents.js.map → TamaguiComponentEvents.cjs.map} +0 -0
- /package/dist/cjs/interfaces/{TamaguiComponentPropsBaseBase.js.map → TamaguiComponentPropsBaseBase.cjs.map} +0 -0
- /package/dist/cjs/interfaces/{TamaguiComponentState.js.map → TamaguiComponentState.cjs.map} +0 -0
- /package/dist/cjs/interfaces/{WebOnlyPressEvents.js.map → WebOnlyPressEvents.cjs.map} +0 -0
- /package/dist/cjs/{setupHooks.js.map → setupHooks.cjs.map} +0 -0
- /package/dist/cjs/{setupReactNative.js.map → setupReactNative.cjs.map} +0 -0
- /package/dist/cjs/{styled.js.map → styled.cjs.map} +0 -0
- /package/dist/cjs/{type-utils.js.map → type-utils.cjs.map} +0 -0
- /package/dist/cjs/{types.js.map → types.cjs.map} +0 -0
- /package/dist/cjs/views/{Configuration.js.map → Configuration.cjs.map} +0 -0
- /package/dist/cjs/views/{FontLanguage.js.map → FontLanguage.cjs.map} +0 -0
- /package/dist/cjs/views/{FontLanguage.types.js.map → FontLanguage.types.cjs.map} +0 -0
- /package/dist/cjs/views/{Slot.js.map → Slot.cjs.map} +0 -0
- /package/dist/cjs/views/{Stack.js.map → Stack.cjs.map} +0 -0
- /package/dist/cjs/views/{TamaguiProvider.js.map → TamaguiProvider.cjs.map} +0 -0
- /package/dist/cjs/views/{Text.js.map → Text.cjs.map} +0 -0
- /package/dist/cjs/views/{Theme.js.map → Theme.cjs.map} +0 -0
- /package/dist/cjs/views/{ThemeDebug.js.map → ThemeDebug.cjs.map} +0 -0
- /package/dist/cjs/views/{ThemeProvider.js.map → ThemeProvider.cjs.map} +0 -0
- /package/dist/cjs/views/{View.js.map → View.cjs.map} +0 -0
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
-
var mergeProps_exports = {};
|
|
16
|
-
__export(mergeProps_exports, {
|
|
17
|
-
mergeProps: () => mergeProps
|
|
18
|
-
});
|
|
19
|
-
module.exports = __toCommonJS(mergeProps_exports);
|
|
20
|
-
var import_useMedia = require("../hooks/useMedia"), import_pseudoDescriptors = require("./pseudoDescriptors");
|
|
21
|
-
const mergeProps = (a, b, inverseShorthands) => {
|
|
22
|
-
const out = {};
|
|
23
|
-
for (const key in a)
|
|
24
|
-
mergeProp(out, a, b, key, inverseShorthands);
|
|
25
|
-
if (b)
|
|
26
|
-
for (const key in b)
|
|
27
|
-
mergeProp(out, b, void 0, key, inverseShorthands);
|
|
28
|
-
return out;
|
|
29
|
-
};
|
|
30
|
-
function mergeProp(out, a, b, key, inverseShorthands) {
|
|
31
|
-
const longhand = inverseShorthands?.[key] || null, val = a[key];
|
|
32
|
-
if (key in import_pseudoDescriptors.pseudoDescriptors || import_useMedia.mediaKeys.has(key)) {
|
|
33
|
-
out[key] = {
|
|
34
|
-
...out[key],
|
|
35
|
-
...val
|
|
36
|
-
};
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
b && (key in b || longhand && longhand in b) || (out[longhand || key] = val);
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=mergeProps.js.map
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
-
var normalizeColor_exports = {};
|
|
16
|
-
__export(normalizeColor_exports, {
|
|
17
|
-
getRgba: () => getRgba,
|
|
18
|
-
normalizeColor: () => normalizeColor,
|
|
19
|
-
rgba: () => import_normalize_css_color2.rgba
|
|
20
|
-
});
|
|
21
|
-
module.exports = __toCommonJS(normalizeColor_exports);
|
|
22
|
-
var import_normalize_css_color = require("@tamagui/normalize-css-color"), import_normalize_css_color2 = require("@tamagui/normalize-css-color");
|
|
23
|
-
const normalizeColor = (color, opacity) => {
|
|
24
|
-
if (color) {
|
|
25
|
-
if (color[0] === "$") return color;
|
|
26
|
-
if (color.startsWith("var(")) {
|
|
27
|
-
if (typeof opacity == "number" && opacity < 1)
|
|
28
|
-
return `color-mix(in srgb, ${color} ${opacity * 100}%, transparent)`;
|
|
29
|
-
} else {
|
|
30
|
-
const rgba3 = getRgba(color);
|
|
31
|
-
if (rgba3) {
|
|
32
|
-
const colors = `${rgba3.r},${rgba3.g},${rgba3.b}`;
|
|
33
|
-
return opacity === 1 ? `rgb(${colors})` : `rgba(${colors},${opacity ?? rgba3.a ?? 1})`;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return color;
|
|
37
|
-
}
|
|
38
|
-
}, getRgba = (color) => {
|
|
39
|
-
const colorNum = (0, import_normalize_css_color.normalizeCSSColor)(color);
|
|
40
|
-
if (colorNum != null)
|
|
41
|
-
return (0, import_normalize_css_color.rgba)(colorNum);
|
|
42
|
-
};
|
|
43
|
-
//# sourceMappingURL=normalizeColor.js.map
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
-
var normalizeStyle_exports = {};
|
|
16
|
-
__export(normalizeStyle_exports, {
|
|
17
|
-
normalizeStyle: () => normalizeStyle
|
|
18
|
-
});
|
|
19
|
-
module.exports = __toCommonJS(normalizeStyle_exports);
|
|
20
|
-
var import_expandStyle = require("./expandStyle"), import_expandStyles = require("./expandStyles"), import_isObj = require("./isObj"), import_normalizeValueWithProperty = require("./normalizeValueWithProperty"), import_pseudoDescriptors = require("./pseudoDescriptors");
|
|
21
|
-
function normalizeStyle(style, disableNormalize = !1) {
|
|
22
|
-
const res = {};
|
|
23
|
-
for (let key in style) {
|
|
24
|
-
const prop = style[key];
|
|
25
|
-
if (prop == null) continue;
|
|
26
|
-
if (key in import_pseudoDescriptors.pseudoDescriptors || // this should capture all parent-based styles like media, group, etc
|
|
27
|
-
key[0] === "$" && (0, import_isObj.isObj)(prop)) {
|
|
28
|
-
res[key] = normalizeStyle(prop, disableNormalize);
|
|
29
|
-
continue;
|
|
30
|
-
}
|
|
31
|
-
const value = disableNormalize ? prop : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(prop, key), out = (0, import_expandStyle.expandStyle)(key, value);
|
|
32
|
-
out ? Object.assign(res, Object.fromEntries(out)) : res[key] = value;
|
|
33
|
-
}
|
|
34
|
-
return (0, import_expandStyles.fixStyles)(res), res;
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=normalizeStyle.js.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
-
var normalizeStylePropKeys_exports = {};
|
|
16
|
-
__export(normalizeStylePropKeys_exports, {
|
|
17
|
-
normalizeStylePropKeys: () => normalizeStylePropKeys
|
|
18
|
-
});
|
|
19
|
-
module.exports = __toCommonJS(normalizeStylePropKeys_exports);
|
|
20
|
-
const normalizeStylePropKeys = {};
|
|
21
|
-
//# sourceMappingURL=normalizeStylePropKeys.js.map
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
-
var objectIdentityKey_exports = {};
|
|
16
|
-
__export(objectIdentityKey_exports, {
|
|
17
|
-
objectIdentityKey: () => objectIdentityKey
|
|
18
|
-
});
|
|
19
|
-
module.exports = __toCommonJS(objectIdentityKey_exports);
|
|
20
|
-
function objectIdentityKey(obj) {
|
|
21
|
-
let k = "";
|
|
22
|
-
for (const key in obj) {
|
|
23
|
-
k += key;
|
|
24
|
-
const arg = obj[key];
|
|
25
|
-
let type = typeof arg;
|
|
26
|
-
if (!arg || type !== "object" && type !== "function")
|
|
27
|
-
k += type + arg;
|
|
28
|
-
else if (cache.has(arg))
|
|
29
|
-
k += cache.get(arg);
|
|
30
|
-
else {
|
|
31
|
-
let v = Math.random();
|
|
32
|
-
cache.set(arg, v), k += v;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return k;
|
|
36
|
-
}
|
|
37
|
-
const cache = /* @__PURE__ */ new WeakMap();
|
|
38
|
-
//# sourceMappingURL=objectIdentityKey.js.map
|
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
-
var propMapper_exports = {};
|
|
16
|
-
__export(propMapper_exports, {
|
|
17
|
-
getFontFamilyFromNameOrVariable: () => getFontFamilyFromNameOrVariable,
|
|
18
|
-
getPropMappedFontFamily: () => getPropMappedFontFamily,
|
|
19
|
-
getTokenForKey: () => getTokenForKey,
|
|
20
|
-
propMapper: () => propMapper
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(propMapper_exports);
|
|
23
|
-
var import_constants = require("@tamagui/constants"), import_helpers = require("@tamagui/helpers"), import_config = require("../config"), import_createVariable = require("../createVariable"), import_expandStyle = require("./expandStyle"), import_normalizeStyle = require("./normalizeStyle"), import_getVariantExtras = require("./getVariantExtras"), import_isObj = require("./isObj"), import_pseudoDescriptors = require("./pseudoDescriptors"), import_skipProps = require("./skipProps");
|
|
24
|
-
const propMapper = (key, value, styleState) => {
|
|
25
|
-
if (lastFontFamilyToken = null, key === "elevationAndroid") return;
|
|
26
|
-
const { conf, styleProps, fontFamily, staticConfig } = styleState;
|
|
27
|
-
if (value === "unset") {
|
|
28
|
-
const unsetVal = conf.unset?.[key];
|
|
29
|
-
if (unsetVal != null)
|
|
30
|
-
value = unsetVal;
|
|
31
|
-
else
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
styleProps.fallbackProps && (styleState.props = styleProps.fallbackProps);
|
|
35
|
-
const { variants } = staticConfig;
|
|
36
|
-
if (process.env.NODE_ENV === "development" && fontFamily && fontFamily[0] === "$" && !(fontFamily in conf.fontsParsed) && console.warn(
|
|
37
|
-
`Warning: no fontFamily "${fontFamily}" found in config: ${Object.keys(
|
|
38
|
-
conf.fontsParsed
|
|
39
|
-
).join(", ")}`
|
|
40
|
-
), !styleProps.noExpand && variants && key in variants) {
|
|
41
|
-
const variantValue = resolveVariants(key, value, styleProps, styleState, "");
|
|
42
|
-
if (variantValue)
|
|
43
|
-
return variantValue;
|
|
44
|
-
}
|
|
45
|
-
if (styleProps.disableExpandShorthands || key in conf.shorthands && (key = conf.shorthands[key]), value && (value[0] === "$" ? value = getTokenForKey(key, value, styleProps.resolveValues, styleState) : (0, import_createVariable.isVariable)(value) && (value = resolveVariableValue(key, value, styleProps.resolveValues))), value != null) {
|
|
46
|
-
const result = (styleProps.noExpand ? null : (0, import_expandStyle.expandStyle)(key, value)) || [
|
|
47
|
-
[key, value]
|
|
48
|
-
];
|
|
49
|
-
return key === "fontFamily" && lastFontFamilyToken && fontFamilyCache.set(result, lastFontFamilyToken), result;
|
|
50
|
-
}
|
|
51
|
-
}, resolveVariants = (key, value, styleProps, styleState, parentVariantKey) => {
|
|
52
|
-
const { staticConfig, conf, debug } = styleState, { variants } = staticConfig;
|
|
53
|
-
if (!variants) return;
|
|
54
|
-
let variantValue = getVariantDefinition(variants[key], value, conf);
|
|
55
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed(`\u2666\uFE0F\u2666\uFE0F\u2666\uFE0F resolve variant ${key}`), console.info({
|
|
56
|
-
key,
|
|
57
|
-
value,
|
|
58
|
-
variantValue,
|
|
59
|
-
variants
|
|
60
|
-
}), console.groupEnd()), !variantValue) {
|
|
61
|
-
if (process.env.TAMAGUI_WARN_ON_MISSING_VARIANT === "1" && typeof value != "boolean") {
|
|
62
|
-
const name = staticConfig.componentName || "[UnnamedComponent]";
|
|
63
|
-
console.warn(
|
|
64
|
-
`No variant found: ${name} has variant "${key}", but no matching value "${value}"`
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
if (typeof variantValue == "function") {
|
|
70
|
-
const fn = variantValue, extras = (0, import_getVariantExtras.getVariantExtras)(styleState);
|
|
71
|
-
variantValue = fn(value, extras), process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed(" expanded functional variant", key), console.info({ fn, variantValue, extras }), console.groupEnd());
|
|
72
|
-
}
|
|
73
|
-
let fontFamilyResult;
|
|
74
|
-
if ((0, import_isObj.isObj)(variantValue)) {
|
|
75
|
-
const fontFamilyUpdate = variantValue.fontFamily || variantValue[conf.inverseShorthands.fontFamily];
|
|
76
|
-
fontFamilyUpdate && (fontFamilyResult = getFontFamilyFromNameOrVariable(fontFamilyUpdate, conf), styleState.fontFamily = fontFamilyResult, process.env.NODE_ENV === "development" && debug === "verbose" && console.info(" updating font family", fontFamilyResult)), variantValue = resolveTokensAndVariants(
|
|
77
|
-
key,
|
|
78
|
-
variantValue,
|
|
79
|
-
styleProps,
|
|
80
|
-
styleState,
|
|
81
|
-
parentVariantKey
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
if (variantValue) {
|
|
85
|
-
const expanded = (0, import_normalizeStyle.normalizeStyle)(variantValue, !!styleProps.noNormalize);
|
|
86
|
-
process.env.NODE_ENV === "development" && debug === "verbose" && console.info(" expanding styles from ", variantValue, "to", expanded);
|
|
87
|
-
const next = Object.entries(expanded);
|
|
88
|
-
return fontFamilyResult && fontFamilyResult[0] === "$" && fontFamilyCache.set(next, (0, import_createVariable.getVariableValue)(fontFamilyResult)), next;
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
function getFontFamilyFromNameOrVariable(input, conf) {
|
|
92
|
-
if ((0, import_createVariable.isVariable)(input)) {
|
|
93
|
-
const val = variableToFontNameCache.get(input);
|
|
94
|
-
if (val) return val;
|
|
95
|
-
for (const key in conf.fontsParsed) {
|
|
96
|
-
const familyVariable = conf.fontsParsed[key].family;
|
|
97
|
-
if ((0, import_createVariable.isVariable)(familyVariable) && (variableToFontNameCache.set(familyVariable, key), familyVariable === input))
|
|
98
|
-
return key;
|
|
99
|
-
}
|
|
100
|
-
} else if (typeof input == "string" && input[0] === "$")
|
|
101
|
-
return input;
|
|
102
|
-
}
|
|
103
|
-
const variableToFontNameCache = /* @__PURE__ */ new WeakMap(), fontFamilyCache = /* @__PURE__ */ new WeakMap(), getPropMappedFontFamily = (expanded) => expanded && fontFamilyCache.get(expanded), resolveTokensAndVariants = (key, value, styleProps, styleState, parentVariantKey) => {
|
|
104
|
-
const { conf, staticConfig, debug, theme } = styleState, { variants } = staticConfig, res = {};
|
|
105
|
-
process.env.NODE_ENV === "development" && debug === "verbose" && console.info(" - resolveTokensAndVariants", key, value);
|
|
106
|
-
for (const _key in value) {
|
|
107
|
-
const subKey = conf.shorthands[_key] || _key, val = value[_key];
|
|
108
|
-
if (!(!styleProps.noSkip && subKey in import_skipProps.skipProps)) {
|
|
109
|
-
if (styleProps.noExpand)
|
|
110
|
-
res[subKey] = val;
|
|
111
|
-
else if (variants && subKey in variants) {
|
|
112
|
-
if (parentVariantKey && parentVariantKey === key)
|
|
113
|
-
res[subKey] = // SYNC WITH *1
|
|
114
|
-
val[0] === "$" ? getTokenForKey(subKey, val, styleProps.resolveValues, styleState) : val;
|
|
115
|
-
else {
|
|
116
|
-
const variantOut = resolveVariants(subKey, val, styleProps, styleState, key);
|
|
117
|
-
if (variantOut)
|
|
118
|
-
for (const [key2, val2] of variantOut)
|
|
119
|
-
val2 != null && (key2 in import_pseudoDescriptors.pseudoDescriptors ? (res[key2] ??= {}, Object.assign(res[key2], val2)) : res[key2] = val2);
|
|
120
|
-
}
|
|
121
|
-
continue;
|
|
122
|
-
}
|
|
123
|
-
if ((0, import_createVariable.isVariable)(val)) {
|
|
124
|
-
res[subKey] = resolveVariableValue(subKey, val, styleProps.resolveValues), process.env.NODE_ENV === "development" && debug === "verbose" && console.info("variable", subKey, res[subKey]);
|
|
125
|
-
continue;
|
|
126
|
-
}
|
|
127
|
-
if (typeof val == "string") {
|
|
128
|
-
const fVal = (
|
|
129
|
-
// SYNC WITH *1
|
|
130
|
-
val[0] === "$" ? getTokenForKey(subKey, val, styleProps.resolveValues, styleState) : val
|
|
131
|
-
);
|
|
132
|
-
res[subKey] = fVal;
|
|
133
|
-
continue;
|
|
134
|
-
}
|
|
135
|
-
if ((0, import_isObj.isObj)(val)) {
|
|
136
|
-
const subObject = resolveTokensAndVariants(subKey, val, styleProps, styleState, key);
|
|
137
|
-
process.env.NODE_ENV === "development" && debug === "verbose" && console.info("object", subKey, subObject), res[subKey] ??= {}, Object.assign(res[subKey], subObject);
|
|
138
|
-
} else
|
|
139
|
-
res[subKey] = val;
|
|
140
|
-
process.env.NODE_ENV === "development" && debug && res[subKey]?.[0] === "$" && console.warn(
|
|
141
|
-
`\u26A0\uFE0F Missing token in theme ${theme.name}:`,
|
|
142
|
-
subKey,
|
|
143
|
-
res[subKey],
|
|
144
|
-
theme
|
|
145
|
-
);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
return res;
|
|
149
|
-
}, tokenCats = ["size", "color", "radius", "space", "zIndex"].map((name) => ({
|
|
150
|
-
name,
|
|
151
|
-
spreadName: `...${name}`
|
|
152
|
-
}));
|
|
153
|
-
function getVariantDefinition(variant, value, conf) {
|
|
154
|
-
if (typeof variant == "function")
|
|
155
|
-
return variant;
|
|
156
|
-
const exact = variant[value];
|
|
157
|
-
if (exact)
|
|
158
|
-
return exact;
|
|
159
|
-
if (value != null) {
|
|
160
|
-
const { tokensParsed } = conf;
|
|
161
|
-
for (const { name, spreadName } of tokenCats)
|
|
162
|
-
if (spreadName in variant && value in tokensParsed[name])
|
|
163
|
-
return variant[spreadName];
|
|
164
|
-
const fontSizeVariant = variant["...fontSize"];
|
|
165
|
-
if (fontSizeVariant && conf.fontSizeTokens.has(value))
|
|
166
|
-
return fontSizeVariant;
|
|
167
|
-
}
|
|
168
|
-
return variant[`:${typeof value}`] || variant["..."];
|
|
169
|
-
}
|
|
170
|
-
const fontShorthand = {
|
|
171
|
-
fontSize: "size",
|
|
172
|
-
fontWeight: "weight"
|
|
173
|
-
};
|
|
174
|
-
let lastFontFamilyToken = null;
|
|
175
|
-
const getTokenForKey = (key, value, resolveAs = "none", styleState) => {
|
|
176
|
-
if (resolveAs === "none")
|
|
177
|
-
return value;
|
|
178
|
-
const { theme, conf = (0, import_config.getConfig)(), context, fontFamily, staticConfig } = styleState, tokensParsed = conf.tokensParsed;
|
|
179
|
-
let valOrVar, hasSet = !1;
|
|
180
|
-
const customTokenAccept = staticConfig?.accept?.[key];
|
|
181
|
-
if (customTokenAccept) {
|
|
182
|
-
const val = theme?.[value] ?? tokensParsed[customTokenAccept][value];
|
|
183
|
-
val != null && (resolveAs = "value", valOrVar = val, hasSet = !0);
|
|
184
|
-
}
|
|
185
|
-
if (theme && value in theme)
|
|
186
|
-
valOrVar = theme[value], process.env.NODE_ENV === "development" && styleState.debug === "verbose" && (globalThis.tamaguiAvoidTracking = !0, console.info(
|
|
187
|
-
` - resolving ${key} to theme value ${value} resolveAs ${resolveAs}`,
|
|
188
|
-
valOrVar
|
|
189
|
-
), globalThis.tamaguiAvoidTracking = !1), hasSet = !0;
|
|
190
|
-
else {
|
|
191
|
-
if (value in conf.specificTokens)
|
|
192
|
-
hasSet = !0, valOrVar = conf.specificTokens[value];
|
|
193
|
-
else {
|
|
194
|
-
switch (key) {
|
|
195
|
-
case "fontFamily": {
|
|
196
|
-
valOrVar = (context?.language ? (0, import_getVariantExtras.getFontsForLanguage)(conf.fontsParsed, context.language) : conf.fontsParsed)[value]?.family || value, lastFontFamilyToken = value, hasSet = !0;
|
|
197
|
-
break;
|
|
198
|
-
}
|
|
199
|
-
case "fontSize":
|
|
200
|
-
case "lineHeight":
|
|
201
|
-
case "letterSpacing":
|
|
202
|
-
case "fontWeight": {
|
|
203
|
-
const fam = fontFamily || conf.defaultFontToken;
|
|
204
|
-
if (fam) {
|
|
205
|
-
const fontsParsed = context?.language ? (0, import_getVariantExtras.getFontsForLanguage)(conf.fontsParsed, context.language) : conf.fontsParsed;
|
|
206
|
-
valOrVar = (fontsParsed[fam] || fontsParsed[conf.defaultFontToken])?.[fontShorthand[key] || key]?.[value] || value, hasSet = !0;
|
|
207
|
-
}
|
|
208
|
-
break;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
for (const cat in import_helpers.tokenCategories)
|
|
212
|
-
if (key in import_helpers.tokenCategories[cat]) {
|
|
213
|
-
const res = tokensParsed[cat][value];
|
|
214
|
-
res != null && (valOrVar = res, hasSet = !0);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
if (!hasSet) {
|
|
218
|
-
const spaceVar = tokensParsed.space[value];
|
|
219
|
-
spaceVar != null && (valOrVar = spaceVar, hasSet = !0);
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
if (hasSet) {
|
|
223
|
-
const out = resolveVariableValue(key, valOrVar, resolveAs);
|
|
224
|
-
return process.env.NODE_ENV === "development" && styleState.debug === "verbose" && (globalThis.tamaguiAvoidTracking = !0, console.info("resolved", resolveAs, valOrVar, out), globalThis.tamaguiAvoidTracking = !1), out;
|
|
225
|
-
}
|
|
226
|
-
process.env.NODE_ENV === "development" && styleState.debug === "verbose" && console.warn(`Warning: no token found for ${key}, omitting`);
|
|
227
|
-
};
|
|
228
|
-
function resolveVariableValue(key, valOrVar, resolveValues) {
|
|
229
|
-
if (resolveValues === "none") return valOrVar;
|
|
230
|
-
if ((0, import_createVariable.isVariable)(valOrVar)) {
|
|
231
|
-
if (resolveValues === "value")
|
|
232
|
-
return valOrVar.val;
|
|
233
|
-
const get = valOrVar?.get;
|
|
234
|
-
return typeof get == "function" ? get(resolveValues === "web" ? "web" : void 0) : valOrVar.variable;
|
|
235
|
-
}
|
|
236
|
-
return valOrVar;
|
|
237
|
-
}
|
|
238
|
-
//# sourceMappingURL=propMapper.js.map
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
-
var proxyThemeToParents_exports = {};
|
|
16
|
-
__export(proxyThemeToParents_exports, {
|
|
17
|
-
proxyThemeToParents: () => proxyThemeToParents,
|
|
18
|
-
proxyThemesToParents: () => proxyThemesToParents
|
|
19
|
-
});
|
|
20
|
-
module.exports = __toCommonJS(proxyThemeToParents_exports);
|
|
21
|
-
var import_config = require("../config");
|
|
22
|
-
const themesRaw = {};
|
|
23
|
-
function proxyThemesToParents(dedupedThemes) {
|
|
24
|
-
for (const { names, theme } of dedupedThemes)
|
|
25
|
-
for (const name of names)
|
|
26
|
-
themesRaw[name] = theme;
|
|
27
|
-
const themes = {};
|
|
28
|
-
for (const { names, theme } of dedupedThemes)
|
|
29
|
-
for (const themeName of names) {
|
|
30
|
-
const proxiedTheme = proxyThemeToParents(themeName, theme);
|
|
31
|
-
themes[themeName] = proxiedTheme;
|
|
32
|
-
}
|
|
33
|
-
return themes;
|
|
34
|
-
}
|
|
35
|
-
function proxyThemeToParents(themeName, theme) {
|
|
36
|
-
const cur = [], parents = themeName.split("_").slice(0, -1).map((part) => (cur.push(part), cur.join("_"))), numParents = parents.length;
|
|
37
|
-
return new Proxy(theme, {
|
|
38
|
-
get(target, key) {
|
|
39
|
-
if (!key || // dont ask me, idk why but on hermes you can see that useTheme()[undefined] passes in STRING undefined to proxy
|
|
40
|
-
// if someone is crazy enough to use "undefined" as a theme key then this not working is on them
|
|
41
|
-
key == "undefined" || Reflect.has(target, key))
|
|
42
|
-
return Reflect.get(target, key);
|
|
43
|
-
for (let i = numParents - 1; i >= 0; i--) {
|
|
44
|
-
const parent = themesRaw[parents[i]];
|
|
45
|
-
if (parent && Reflect.has(parent, key))
|
|
46
|
-
return Reflect.get(parent, key);
|
|
47
|
-
}
|
|
48
|
-
return (0, import_config.getTokenObject)(key);
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=proxyThemeToParents.js.map
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
-
var pseudoDescriptors_exports = {};
|
|
16
|
-
__export(pseudoDescriptors_exports, {
|
|
17
|
-
pseudoDescriptors: () => pseudoDescriptors,
|
|
18
|
-
pseudoDescriptorsBase: () => pseudoDescriptorsBase,
|
|
19
|
-
pseudoPriorities: () => pseudoPriorities
|
|
20
|
-
});
|
|
21
|
-
module.exports = __toCommonJS(pseudoDescriptors_exports);
|
|
22
|
-
const pseudoDescriptorsBase = {
|
|
23
|
-
// order of keys here important! in priority order
|
|
24
|
-
hoverStyle: {
|
|
25
|
-
name: "hover",
|
|
26
|
-
priority: 1
|
|
27
|
-
},
|
|
28
|
-
pressStyle: {
|
|
29
|
-
name: "active",
|
|
30
|
-
stateKey: "press",
|
|
31
|
-
priority: 2
|
|
32
|
-
},
|
|
33
|
-
focusVisibleStyle: {
|
|
34
|
-
name: "focus-visible",
|
|
35
|
-
priority: 3,
|
|
36
|
-
stateKey: "focusVisible"
|
|
37
|
-
},
|
|
38
|
-
focusStyle: {
|
|
39
|
-
name: "focus",
|
|
40
|
-
priority: 3
|
|
41
|
-
},
|
|
42
|
-
disabledStyle: {
|
|
43
|
-
name: "disabled",
|
|
44
|
-
priority: 4,
|
|
45
|
-
stateKey: "disabled"
|
|
46
|
-
}
|
|
47
|
-
}, pseudoPriorities = {
|
|
48
|
-
hover: 1,
|
|
49
|
-
press: 2,
|
|
50
|
-
focus: 3,
|
|
51
|
-
focusVisible: 3,
|
|
52
|
-
disabled: 4
|
|
53
|
-
}, pseudoDescriptors = {
|
|
54
|
-
...pseudoDescriptorsBase,
|
|
55
|
-
enterStyle: {
|
|
56
|
-
name: "enter",
|
|
57
|
-
selector: ".t_unmounted",
|
|
58
|
-
priority: 4
|
|
59
|
-
},
|
|
60
|
-
exitStyle: {
|
|
61
|
-
name: "exit",
|
|
62
|
-
priority: 5
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
//# sourceMappingURL=pseudoDescriptors.js.map
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
-
var registerCSSVariable_exports = {};
|
|
16
|
-
__export(registerCSSVariable_exports, {
|
|
17
|
-
registerCSSVariable: () => registerCSSVariable,
|
|
18
|
-
tokensValueToVariable: () => tokensValueToVariable,
|
|
19
|
-
variableToCSS: () => variableToCSS
|
|
20
|
-
});
|
|
21
|
-
module.exports = __toCommonJS(registerCSSVariable_exports);
|
|
22
|
-
var import_createVariable = require("../createVariable");
|
|
23
|
-
const registerCSSVariable = (v) => {
|
|
24
|
-
tokensValueToVariable.set((0, import_createVariable.getVariableValue)(v), v);
|
|
25
|
-
}, variableToCSS = (v, unitless = !1) => `--${process.env.TAMAGUI_CSS_VARIABLE_PREFIX || ""}${(0, import_createVariable.createCSSVariable)(
|
|
26
|
-
v.name,
|
|
27
|
-
!1
|
|
28
|
-
)}:${!unitless && typeof v.val == "number" ? `${v.val}px` : v.val}`, tokensValueToVariable = /* @__PURE__ */ new Map();
|
|
29
|
-
//# sourceMappingURL=registerCSSVariable.js.map
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
-
var setElementProps_exports = {};
|
|
16
|
-
__export(setElementProps_exports, {
|
|
17
|
-
setElementProps: () => setElementProps
|
|
18
|
-
});
|
|
19
|
-
module.exports = __toCommonJS(setElementProps_exports);
|
|
20
|
-
var import_setupHooks = require("../setupHooks");
|
|
21
|
-
const setElementProps = (node) => {
|
|
22
|
-
import_setupHooks.hooks.setElementProps?.(node);
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=setElementProps.js.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
-
var sortString_exports = {};
|
|
16
|
-
__export(sortString_exports, {
|
|
17
|
-
sortString: () => sortString
|
|
18
|
-
});
|
|
19
|
-
module.exports = __toCommonJS(sortString_exports);
|
|
20
|
-
const sortString = (a, b) => a < b ? -1 : a > b ? 1 : 0;
|
|
21
|
-
//# sourceMappingURL=sortString.js.map
|