@tamagui/web 3.0.0-beta.922.1 → 3.0.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/_withNativeStyle.cjs +3 -0
- package/dist/cjs/_withNativeStyle.native.cjs +3 -0
- package/dist/cjs/_withNativeStyle.native.js +3 -0
- package/dist/cjs/_withNativeStyle.native.js.map +1 -1
- package/dist/cjs/_withStableStyle.native.cjs +1 -5
- package/dist/cjs/_withStableStyle.native.js +1 -5
- package/dist/cjs/_withStableStyle.native.js.map +1 -1
- package/dist/cjs/config.cjs +6 -3
- package/dist/cjs/config.native.cjs +7 -5
- package/dist/cjs/config.native.js +7 -5
- package/dist/cjs/config.native.js.map +1 -1
- package/dist/cjs/contexts/ComponentContext.cjs +1 -0
- package/dist/cjs/contexts/ComponentContext.native.cjs +8 -0
- package/dist/cjs/contexts/ComponentContext.native.js +8 -0
- package/dist/cjs/contexts/ComponentContext.native.js.map +1 -1
- package/dist/cjs/createComponent.cjs +46 -32
- package/dist/cjs/createComponent.native.cjs +92 -72
- package/dist/cjs/createComponent.native.js +92 -72
- package/dist/cjs/createComponent.native.js.map +1 -1
- package/dist/cjs/createTamagui.cjs +32 -14
- package/dist/cjs/createTamagui.native.cjs +33 -19
- package/dist/cjs/createTamagui.native.js +33 -19
- package/dist/cjs/createTamagui.native.js.map +1 -1
- package/dist/cjs/createTokens.native.cjs +1 -5
- package/dist/cjs/createTokens.native.js +1 -5
- package/dist/cjs/createTokens.native.js.map +1 -1
- package/dist/cjs/createVariable.native.cjs +1 -5
- package/dist/cjs/createVariable.native.js +1 -5
- package/dist/cjs/createVariable.native.js.map +1 -1
- package/dist/cjs/createVariables.native.cjs +2 -6
- package/dist/cjs/createVariables.native.js +2 -6
- package/dist/cjs/createVariables.native.js.map +1 -1
- package/dist/cjs/dom/html.cjs +87 -329
- package/dist/cjs/dom/html.native.cjs +53 -2
- package/dist/cjs/dom/html.native.js +53 -2
- package/dist/cjs/dom/html.native.js.map +1 -1
- package/dist/cjs/{helpers/timer.native.js → dom/htmlReset.cjs} +6 -12
- package/dist/cjs/{helpers/timer.native.cjs → dom/htmlReset.native.cjs} +6 -8
- package/dist/cjs/dom/htmlReset.native.js +30 -0
- package/dist/cjs/dom/htmlReset.native.js.map +1 -0
- package/dist/cjs/dom/htmlRuntime.native.cjs +4 -0
- package/dist/cjs/dom/htmlRuntime.native.js +4 -0
- package/dist/cjs/dom/htmlRuntime.native.js.map +1 -1
- package/dist/cjs/dom/htmlStaticConfig.cjs +44 -0
- package/dist/cjs/dom/htmlStaticConfig.native.cjs +46 -0
- package/dist/cjs/dom/htmlStaticConfig.native.js +48 -0
- package/dist/cjs/dom/htmlStaticConfig.native.js.map +1 -0
- package/dist/cjs/dom/primitives.native.cjs +81 -34
- package/dist/cjs/dom/primitives.native.js +81 -34
- package/dist/cjs/dom/primitives.native.js.map +1 -1
- package/dist/cjs/eventHandling.cjs +10 -4
- package/dist/cjs/eventHandling.native.cjs +52 -16
- package/dist/cjs/eventHandling.native.js +52 -16
- package/dist/cjs/eventHandling.native.js.map +1 -1
- package/dist/cjs/helpers/NativeTextBinding.cjs +36 -0
- package/dist/cjs/helpers/NativeTextBinding.native.cjs +39 -0
- package/dist/cjs/helpers/NativeTextBinding.native.js +41 -0
- package/dist/cjs/helpers/NativeTextBinding.native.js.map +1 -0
- package/dist/cjs/helpers/configVariables.native.cjs +2 -6
- package/dist/cjs/helpers/configVariables.native.js +2 -6
- package/dist/cjs/helpers/configVariables.native.js.map +1 -1
- package/dist/cjs/helpers/createDesignSystem.cjs +14 -10
- package/dist/cjs/helpers/createDesignSystem.native.cjs +5 -4
- package/dist/cjs/helpers/createDesignSystem.native.js +5 -4
- package/dist/cjs/helpers/createDesignSystem.native.js.map +1 -1
- package/dist/cjs/helpers/createStyledContext.native.cjs +1 -5
- package/dist/cjs/helpers/createStyledContext.native.js +1 -5
- package/dist/cjs/helpers/createStyledContext.native.js.map +1 -1
- package/dist/cjs/helpers/expandStyle.cjs +45 -1
- package/dist/cjs/helpers/expandStyle.native.cjs +38 -2
- package/dist/cjs/helpers/expandStyle.native.js +38 -2
- package/dist/cjs/helpers/expandStyle.native.js.map +1 -1
- package/dist/cjs/helpers/expandStyles.cjs +15 -3
- package/dist/cjs/helpers/expandStyles.native.cjs +14 -8
- package/dist/cjs/helpers/expandStyles.native.js +14 -8
- package/dist/cjs/helpers/expandStyles.native.js.map +1 -1
- package/dist/cjs/helpers/fluid.cjs +56 -0
- package/dist/cjs/helpers/fluid.native.cjs +58 -0
- package/dist/cjs/helpers/fluid.native.js +60 -0
- package/dist/cjs/helpers/fluid.native.js.map +1 -0
- package/dist/cjs/helpers/formatDiagnostic.native.cjs +2 -6
- package/dist/cjs/helpers/formatDiagnostic.native.js +2 -6
- package/dist/cjs/helpers/formatDiagnostic.native.js.map +1 -1
- package/dist/cjs/helpers/getCSSStylesAtomic.cjs +6 -6
- package/dist/cjs/helpers/getSplitStyles.cjs +366 -150
- package/dist/cjs/helpers/getSplitStyles.native.cjs +584 -184
- package/dist/cjs/helpers/getSplitStyles.native.js +584 -184
- package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/cjs/helpers/getThemeCSSRules.cjs +37 -25
- package/dist/cjs/helpers/grammarConfig.cjs +6 -14
- package/dist/cjs/helpers/grammarConfig.native.cjs +32 -22
- package/dist/cjs/helpers/grammarConfig.native.js +32 -22
- package/dist/cjs/helpers/grammarConfig.native.js.map +1 -1
- package/dist/cjs/helpers/insertStyleRule.cjs +11 -4
- package/dist/cjs/helpers/insertStyleRule.native.cjs +8 -11
- package/dist/cjs/helpers/insertStyleRule.native.js +8 -11
- package/dist/cjs/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/cjs/helpers/isObj.native.cjs +1 -5
- package/dist/cjs/helpers/isObj.native.js +1 -5
- package/dist/cjs/helpers/isObj.native.js.map +1 -1
- package/dist/cjs/helpers/mainThreadPressEvents.native.cjs +48 -100
- package/dist/cjs/helpers/mainThreadPressEvents.native.js +48 -100
- package/dist/cjs/helpers/mainThreadPressEvents.native.js.map +1 -1
- package/dist/cjs/helpers/mergeProps.cjs +18 -21
- package/dist/cjs/helpers/mergeProps.native.cjs +20 -23
- package/dist/cjs/helpers/mergeProps.native.js +20 -23
- package/dist/cjs/helpers/mergeProps.native.js.map +1 -1
- package/dist/cjs/helpers/nativeOnlyProps.cjs +0 -1
- package/dist/cjs/helpers/nativeOnlyProps.native.cjs +0 -1
- package/dist/cjs/helpers/nativeOnlyProps.native.js +0 -1
- package/dist/cjs/helpers/nativeOnlyProps.native.js.map +1 -1
- package/dist/cjs/helpers/nativeTextMetrics.cjs +74 -0
- package/dist/cjs/helpers/nativeTextMetrics.native.cjs +77 -0
- package/dist/cjs/helpers/nativeTextMetrics.native.js +79 -0
- package/dist/cjs/helpers/nativeTextMetrics.native.js.map +1 -0
- package/dist/cjs/helpers/normalizeColor.native.cjs +17 -2
- package/dist/cjs/helpers/normalizeColor.native.js +17 -2
- package/dist/cjs/helpers/normalizeColor.native.js.map +1 -1
- package/dist/cjs/helpers/normalizeValueWithProperty.cjs +2 -1
- package/dist/cjs/helpers/normalizeValueWithProperty.native.cjs +3 -6
- package/dist/cjs/helpers/normalizeValueWithProperty.native.js +3 -6
- package/dist/cjs/helpers/normalizeValueWithProperty.native.js.map +1 -1
- package/dist/cjs/helpers/objectIdentityKey.native.cjs +1 -5
- package/dist/cjs/helpers/objectIdentityKey.native.js +1 -5
- package/dist/cjs/helpers/objectIdentityKey.native.js.map +1 -1
- package/dist/cjs/helpers/parseNativeStyle.cjs +187 -0
- package/dist/cjs/helpers/parseNativeStyle.native.cjs +6 -4
- package/dist/cjs/helpers/parseNativeStyle.native.js +6 -4
- package/dist/cjs/helpers/parseNativeStyle.native.js.map +1 -1
- package/dist/cjs/helpers/proxyThemeToParents.cjs +9 -2
- package/dist/cjs/helpers/proxyThemeToParents.native.cjs +28 -2
- package/dist/cjs/helpers/proxyThemeToParents.native.js +28 -2
- package/dist/cjs/helpers/proxyThemeToParents.native.js.map +1 -1
- package/dist/cjs/helpers/resolveAnimationDriver.native.cjs +1 -5
- package/dist/cjs/helpers/resolveAnimationDriver.native.js +1 -5
- package/dist/cjs/helpers/resolveAnimationDriver.native.js.map +1 -1
- package/dist/cjs/helpers/{timer.cjs → resolveNativeUnits.cjs} +12 -8
- package/dist/cjs/helpers/resolveNativeUnits.native.cjs +205 -0
- package/dist/cjs/helpers/resolveNativeUnits.native.js +207 -0
- package/dist/cjs/helpers/resolveNativeUnits.native.js.map +1 -0
- package/dist/cjs/helpers/resolveRem.native.cjs +18 -21
- package/dist/cjs/helpers/resolveRem.native.js +18 -21
- package/dist/cjs/helpers/resolveRem.native.js.map +1 -1
- package/dist/cjs/helpers/resolveSizing.cjs +124 -0
- package/dist/cjs/helpers/resolveSizing.native.cjs +133 -0
- package/dist/cjs/helpers/resolveSizing.native.js +135 -0
- package/dist/cjs/helpers/resolveSizing.native.js.map +1 -0
- package/dist/cjs/helpers/resolveVariableValue.cjs +7 -7
- package/dist/cjs/helpers/resolveVariableValue.native.cjs +7 -9
- package/dist/cjs/helpers/resolveVariableValue.native.js +7 -9
- package/dist/cjs/helpers/resolveVariableValue.native.js.map +1 -1
- package/dist/cjs/helpers/resolveVariantStyle.native.cjs +2 -6
- package/dist/cjs/helpers/resolveVariantStyle.native.js +2 -6
- package/dist/cjs/helpers/resolveVariantStyle.native.js.map +1 -1
- package/dist/cjs/helpers/skipProps.cjs +0 -1
- package/dist/cjs/helpers/skipProps.native.cjs +0 -1
- package/dist/cjs/helpers/skipProps.native.js +0 -1
- package/dist/cjs/helpers/skipProps.native.js.map +1 -1
- package/dist/cjs/helpers/styleFrontend.cjs +23 -1
- package/dist/cjs/helpers/styleFrontend.native.cjs +23 -1
- package/dist/cjs/helpers/styleFrontend.native.js +23 -1
- package/dist/cjs/helpers/styleFrontend.native.js.map +1 -1
- package/dist/cjs/helpers/styleStaticConfigCore.cjs +5 -4
- package/dist/cjs/helpers/styleStaticConfigCore.native.cjs +7 -4
- package/dist/cjs/helpers/styleStaticConfigCore.native.js +7 -4
- package/dist/cjs/helpers/styleStaticConfigCore.native.js.map +1 -1
- package/dist/cjs/helpers/styledDynamic.cjs +5 -0
- package/dist/cjs/helpers/styledDynamic.native.cjs +8 -7
- package/dist/cjs/helpers/styledDynamic.native.js +8 -7
- package/dist/cjs/helpers/styledDynamic.native.js.map +1 -1
- package/dist/cjs/helpers/subscribeToContextGroup.cjs +16 -7
- package/dist/cjs/helpers/subscribeToContextGroup.native.cjs +18 -8
- package/dist/cjs/helpers/subscribeToContextGroup.native.js +18 -8
- package/dist/cjs/helpers/subscribeToContextGroup.native.js.map +1 -1
- package/dist/cjs/helpers/themeRef.native.cjs +1 -5
- package/dist/cjs/helpers/themeRef.native.js +1 -5
- package/dist/cjs/helpers/themeRef.native.js.map +1 -1
- package/dist/cjs/helpers/themes.cjs +26 -11
- package/dist/cjs/helpers/themes.native.cjs +26 -11
- package/dist/cjs/helpers/themes.native.js +26 -11
- package/dist/cjs/helpers/themes.native.js.map +1 -1
- package/dist/cjs/helpers/tokenCategories.cjs +2 -2
- package/dist/cjs/helpers/tokenCategories.native.cjs +2 -2
- package/dist/cjs/helpers/tokenCategories.native.js +2 -2
- package/dist/cjs/helpers/tokenCategories.native.js.map +1 -1
- package/dist/cjs/helpers/variables.cjs +1 -1
- package/dist/cjs/helpers/variables.native.cjs +4 -8
- package/dist/cjs/helpers/variables.native.js +4 -8
- package/dist/cjs/helpers/variables.native.js.map +1 -1
- package/dist/cjs/helpers/warnOnce.cjs +6 -0
- package/dist/cjs/helpers/warnOnce.native.cjs +6 -0
- package/dist/cjs/helpers/warnOnce.native.js +6 -0
- package/dist/cjs/helpers/warnOnce.native.js.map +1 -1
- package/dist/cjs/helpers/webPropsToSkip.native.cjs +3 -3
- package/dist/cjs/helpers/webPropsToSkip.native.js +3 -3
- package/dist/cjs/helpers/webPropsToSkip.native.js.map +1 -1
- package/dist/cjs/helpers/wrapStyleTags.cjs +1 -1
- package/dist/cjs/helpers/wrapStyleTags.native.cjs +1 -1
- package/dist/cjs/helpers/wrapStyleTags.native.js +1 -1
- package/dist/cjs/helpers/wrapStyleTags.native.js.map +1 -1
- package/dist/cjs/hooks/useComponentState.native.cjs +1 -5
- package/dist/cjs/hooks/useComponentState.native.js +1 -5
- package/dist/cjs/hooks/useComponentState.native.js.map +1 -1
- package/dist/cjs/hooks/useMedia.cjs +27 -34
- package/dist/cjs/hooks/useMedia.native.cjs +45 -51
- package/dist/cjs/hooks/useMedia.native.js +45 -51
- package/dist/cjs/hooks/useMedia.native.js.map +1 -1
- package/dist/cjs/hooks/useSplitStyles.cjs +1 -1
- package/dist/cjs/hooks/useSplitStyles.native.cjs +1 -1
- package/dist/cjs/hooks/useSplitStyles.native.js +1 -1
- package/dist/cjs/hooks/useSplitStyles.native.js.map +1 -1
- package/dist/cjs/hooks/useThemeState.cjs +37 -47
- package/dist/cjs/hooks/useThemeState.native.cjs +44 -50
- package/dist/cjs/hooks/useThemeState.native.js +44 -50
- package/dist/cjs/hooks/useThemeState.native.js.map +1 -1
- package/dist/cjs/index.cjs +7 -0
- package/dist/cjs/index.native.cjs +7 -0
- package/dist/cjs/index.native.js +7 -0
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/internal-runtime.cjs +22 -0
- package/dist/cjs/internal-runtime.native.cjs +22 -0
- package/dist/cjs/internal-runtime.native.js +22 -0
- package/dist/cjs/internal-runtime.native.js.map +1 -1
- package/dist/cjs/static-resolve.native.cjs +2 -9
- package/dist/cjs/static-resolve.native.js +2 -9
- package/dist/cjs/static-resolve.native.js.map +1 -1
- package/dist/cjs/style.cjs +1 -1
- package/dist/cjs/style.native.cjs +4 -7
- package/dist/cjs/style.native.js +4 -7
- package/dist/cjs/style.native.js.map +1 -1
- package/dist/cjs/views/Theme.cjs +10 -17
- package/dist/cjs/views/Theme.native.cjs +9 -11
- package/dist/cjs/views/Theme.native.js +9 -11
- package/dist/cjs/views/Theme.native.js.map +1 -1
- package/dist/cjs/views/ThemeDebug.cjs +1 -1
- package/dist/cjs/views/ThemeUpdate.cjs +1 -1
- package/dist/cjs/views/ThemeUpdate.native.cjs +1 -1
- package/dist/cjs/views/ThemeUpdate.native.js +1 -1
- package/dist/cjs/views/ThemeUpdate.native.js.map +1 -1
- package/dist/esm/_withNativeStyle.mjs +4 -1
- package/dist/esm/_withNativeStyle.mjs.map +1 -1
- package/dist/esm/_withNativeStyle.native.js +4 -1
- package/dist/esm/_withNativeStyle.native.js.map +1 -1
- package/dist/esm/_withStableStyle.native.js +1 -5
- package/dist/esm/_withStableStyle.native.js.map +1 -1
- package/dist/esm/config.mjs +6 -3
- package/dist/esm/config.mjs.map +1 -1
- package/dist/esm/config.native.js +7 -5
- package/dist/esm/config.native.js.map +1 -1
- package/dist/esm/contexts/ComponentContext.mjs +9 -9
- package/dist/esm/contexts/ComponentContext.mjs.map +1 -1
- package/dist/esm/contexts/ComponentContext.native.js +16 -9
- package/dist/esm/contexts/ComponentContext.native.js.map +1 -1
- package/dist/esm/createComponent.mjs +45 -42
- package/dist/esm/createComponent.mjs.map +1 -1
- package/dist/esm/createComponent.native.js +93 -82
- package/dist/esm/createComponent.native.js.map +1 -1
- package/dist/esm/createTamagui.mjs +33 -15
- package/dist/esm/createTamagui.mjs.map +1 -1
- package/dist/esm/createTamagui.native.js +34 -20
- package/dist/esm/createTamagui.native.js.map +1 -1
- package/dist/esm/createTokens.native.js +1 -5
- package/dist/esm/createTokens.native.js.map +1 -1
- package/dist/esm/createVariable.native.js +1 -5
- package/dist/esm/createVariable.native.js.map +1 -1
- package/dist/esm/createVariables.native.js +2 -6
- package/dist/esm/createVariables.native.js.map +1 -1
- package/dist/esm/dom/html.mjs +87 -329
- package/dist/esm/dom/html.mjs.map +1 -1
- package/dist/esm/dom/html.native.js +53 -2
- package/dist/esm/dom/html.native.js.map +1 -1
- package/dist/esm/dom/htmlReset.mjs +6 -0
- package/dist/esm/dom/htmlReset.mjs.map +1 -0
- package/dist/esm/dom/htmlReset.native.js +6 -0
- package/dist/esm/dom/htmlReset.native.js.map +1 -0
- package/dist/esm/dom/htmlRuntime.native.js +4 -0
- package/dist/esm/dom/htmlRuntime.native.js.map +1 -1
- package/dist/esm/dom/htmlStaticConfig.mjs +22 -0
- package/dist/esm/dom/htmlStaticConfig.mjs.map +1 -0
- package/dist/esm/dom/htmlStaticConfig.native.js +22 -0
- package/dist/esm/dom/htmlStaticConfig.native.js.map +1 -0
- package/dist/esm/dom/primitives.native.js +81 -34
- package/dist/esm/dom/primitives.native.js.map +1 -1
- package/dist/esm/eventHandling.mjs +10 -4
- package/dist/esm/eventHandling.mjs.map +1 -1
- package/dist/esm/eventHandling.native.js +52 -16
- package/dist/esm/eventHandling.native.js.map +1 -1
- package/dist/esm/helpers/NativeTextBinding.mjs +17 -0
- package/dist/esm/helpers/NativeTextBinding.mjs.map +1 -0
- package/dist/esm/helpers/NativeTextBinding.native.js +18 -0
- package/dist/esm/helpers/NativeTextBinding.native.js.map +1 -0
- package/dist/esm/helpers/configVariables.native.js +2 -6
- package/dist/esm/helpers/configVariables.native.js.map +1 -1
- package/dist/esm/helpers/createDesignSystem.mjs +14 -10
- package/dist/esm/helpers/createDesignSystem.mjs.map +1 -1
- package/dist/esm/helpers/createDesignSystem.native.js +4 -4
- package/dist/esm/helpers/createDesignSystem.native.js.map +1 -1
- package/dist/esm/helpers/createStyledContext.native.js +1 -5
- package/dist/esm/helpers/createStyledContext.native.js.map +1 -1
- package/dist/esm/helpers/expandStyle.mjs +41 -1
- package/dist/esm/helpers/expandStyle.mjs.map +1 -1
- package/dist/esm/helpers/expandStyle.native.js +36 -3
- package/dist/esm/helpers/expandStyle.native.js.map +1 -1
- package/dist/esm/helpers/expandStyles.mjs +15 -3
- package/dist/esm/helpers/expandStyles.mjs.map +1 -1
- package/dist/esm/helpers/expandStyles.native.js +14 -8
- package/dist/esm/helpers/expandStyles.native.js.map +1 -1
- package/dist/esm/helpers/fluid.mjs +36 -0
- package/dist/esm/helpers/fluid.mjs.map +1 -0
- package/dist/esm/helpers/fluid.native.js +36 -0
- package/dist/esm/helpers/fluid.native.js.map +1 -0
- package/dist/esm/helpers/formatDiagnostic.native.js +2 -6
- package/dist/esm/helpers/formatDiagnostic.native.js.map +1 -1
- package/dist/esm/helpers/getCSSStylesAtomic.mjs +6 -6
- package/dist/esm/helpers/getCSSStylesAtomic.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.mjs +364 -150
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +588 -188
- package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/esm/helpers/getThemeCSSRules.mjs +37 -25
- package/dist/esm/helpers/getThemeCSSRules.mjs.map +1 -1
- package/dist/esm/helpers/grammarConfig.mjs +6 -14
- package/dist/esm/helpers/grammarConfig.mjs.map +1 -1
- package/dist/esm/helpers/grammarConfig.native.js +32 -22
- package/dist/esm/helpers/grammarConfig.native.js.map +1 -1
- package/dist/esm/helpers/insertStyleRule.mjs +11 -4
- package/dist/esm/helpers/insertStyleRule.mjs.map +1 -1
- package/dist/esm/helpers/insertStyleRule.native.js +4 -4
- package/dist/esm/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/esm/helpers/isObj.native.js +1 -5
- package/dist/esm/helpers/isObj.native.js.map +1 -1
- package/dist/esm/helpers/mainThreadPressEvents.native.js +48 -100
- package/dist/esm/helpers/mainThreadPressEvents.native.js.map +1 -1
- package/dist/esm/helpers/mergeProps.mjs +18 -21
- package/dist/esm/helpers/mergeProps.mjs.map +1 -1
- package/dist/esm/helpers/mergeProps.native.js +20 -23
- package/dist/esm/helpers/mergeProps.native.js.map +1 -1
- package/dist/esm/helpers/nativeOnlyProps.mjs +0 -1
- package/dist/esm/helpers/nativeOnlyProps.mjs.map +1 -1
- package/dist/esm/helpers/nativeOnlyProps.native.js +0 -1
- package/dist/esm/helpers/nativeOnlyProps.native.js.map +1 -1
- package/dist/esm/helpers/nativeTextMetrics.mjs +55 -0
- package/dist/esm/helpers/nativeTextMetrics.mjs.map +1 -0
- package/dist/esm/helpers/nativeTextMetrics.native.js +56 -0
- package/dist/esm/helpers/nativeTextMetrics.native.js.map +1 -0
- package/dist/esm/helpers/normalizeColor.native.js +17 -2
- package/dist/esm/helpers/normalizeColor.native.js.map +1 -1
- package/dist/esm/helpers/normalizeValueWithProperty.mjs +2 -1
- package/dist/esm/helpers/normalizeValueWithProperty.mjs.map +1 -1
- package/dist/esm/helpers/normalizeValueWithProperty.native.js +3 -6
- package/dist/esm/helpers/normalizeValueWithProperty.native.js.map +1 -1
- package/dist/esm/helpers/objectIdentityKey.native.js +1 -5
- package/dist/esm/helpers/objectIdentityKey.native.js.map +1 -1
- package/dist/esm/helpers/parseNativeStyle.mjs +168 -0
- package/dist/esm/helpers/parseNativeStyle.mjs.map +1 -0
- package/dist/esm/helpers/parseNativeStyle.native.js +4 -1
- package/dist/esm/helpers/parseNativeStyle.native.js.map +1 -1
- package/dist/esm/helpers/proxyThemeToParents.mjs +10 -2
- package/dist/esm/helpers/proxyThemeToParents.mjs.map +1 -1
- package/dist/esm/helpers/proxyThemeToParents.native.js +29 -2
- package/dist/esm/helpers/proxyThemeToParents.native.js.map +1 -1
- package/dist/esm/helpers/resolveAnimationDriver.native.js +1 -5
- package/dist/esm/helpers/resolveAnimationDriver.native.js.map +1 -1
- package/dist/esm/helpers/resolveNativeUnits.mjs +9 -0
- package/dist/esm/helpers/resolveNativeUnits.mjs.map +1 -0
- package/dist/esm/helpers/resolveNativeUnits.native.js +178 -0
- package/dist/esm/helpers/resolveNativeUnits.native.js.map +1 -0
- package/dist/esm/helpers/resolveRem.native.js +18 -21
- package/dist/esm/helpers/resolveRem.native.js.map +1 -1
- package/dist/esm/helpers/resolveSizing.mjs +102 -0
- package/dist/esm/helpers/resolveSizing.mjs.map +1 -0
- package/dist/esm/helpers/resolveSizing.native.js +109 -0
- package/dist/esm/helpers/resolveSizing.native.js.map +1 -0
- package/dist/esm/helpers/resolveVariableValue.mjs +7 -7
- package/dist/esm/helpers/resolveVariableValue.mjs.map +1 -1
- package/dist/esm/helpers/resolveVariableValue.native.js +7 -9
- package/dist/esm/helpers/resolveVariableValue.native.js.map +1 -1
- package/dist/esm/helpers/resolveVariantStyle.native.js +2 -6
- package/dist/esm/helpers/resolveVariantStyle.native.js.map +1 -1
- package/dist/esm/helpers/skipProps.mjs +0 -1
- package/dist/esm/helpers/skipProps.mjs.map +1 -1
- package/dist/esm/helpers/skipProps.native.js +0 -1
- package/dist/esm/helpers/skipProps.native.js.map +1 -1
- package/dist/esm/helpers/styleFrontend.mjs +20 -1
- package/dist/esm/helpers/styleFrontend.mjs.map +1 -1
- package/dist/esm/helpers/styleFrontend.native.js +20 -1
- package/dist/esm/helpers/styleFrontend.native.js.map +1 -1
- package/dist/esm/helpers/styleStaticConfigCore.mjs +5 -4
- package/dist/esm/helpers/styleStaticConfigCore.mjs.map +1 -1
- package/dist/esm/helpers/styleStaticConfigCore.native.js +7 -4
- package/dist/esm/helpers/styleStaticConfigCore.native.js.map +1 -1
- package/dist/esm/helpers/styledDynamic.mjs +5 -0
- package/dist/esm/helpers/styledDynamic.mjs.map +1 -1
- package/dist/esm/helpers/styledDynamic.native.js +8 -7
- package/dist/esm/helpers/styledDynamic.native.js.map +1 -1
- package/dist/esm/helpers/subscribeToContextGroup.mjs +16 -7
- package/dist/esm/helpers/subscribeToContextGroup.mjs.map +1 -1
- package/dist/esm/helpers/subscribeToContextGroup.native.js +18 -8
- package/dist/esm/helpers/subscribeToContextGroup.native.js.map +1 -1
- package/dist/esm/helpers/themeRef.native.js +1 -5
- package/dist/esm/helpers/themeRef.native.js.map +1 -1
- package/dist/esm/helpers/themes.mjs +20 -11
- package/dist/esm/helpers/themes.mjs.map +1 -1
- package/dist/esm/helpers/themes.native.js +20 -11
- package/dist/esm/helpers/themes.native.js.map +1 -1
- package/dist/esm/helpers/tokenCategories.mjs +2 -2
- package/dist/esm/helpers/tokenCategories.mjs.map +1 -1
- package/dist/esm/helpers/tokenCategories.native.js +2 -2
- package/dist/esm/helpers/tokenCategories.native.js.map +1 -1
- package/dist/esm/helpers/variables.mjs +1 -1
- package/dist/esm/helpers/variables.mjs.map +1 -1
- package/dist/esm/helpers/variables.native.js +4 -8
- package/dist/esm/helpers/variables.native.js.map +1 -1
- package/dist/esm/helpers/warnOnce.mjs +6 -1
- package/dist/esm/helpers/warnOnce.mjs.map +1 -1
- package/dist/esm/helpers/warnOnce.native.js +6 -1
- package/dist/esm/helpers/warnOnce.native.js.map +1 -1
- package/dist/esm/helpers/webPropsToSkip.native.js +3 -3
- package/dist/esm/helpers/webPropsToSkip.native.js.map +1 -1
- package/dist/esm/helpers/wrapStyleTags.mjs +1 -1
- package/dist/esm/helpers/wrapStyleTags.mjs.map +1 -1
- package/dist/esm/helpers/wrapStyleTags.native.js +1 -1
- package/dist/esm/helpers/wrapStyleTags.native.js.map +1 -1
- package/dist/esm/hooks/useComponentState.native.js +1 -5
- package/dist/esm/hooks/useComponentState.native.js.map +1 -1
- package/dist/esm/hooks/useMedia.mjs +27 -34
- package/dist/esm/hooks/useMedia.mjs.map +1 -1
- package/dist/esm/hooks/useMedia.native.js +45 -51
- package/dist/esm/hooks/useMedia.native.js.map +1 -1
- package/dist/esm/hooks/useSplitStyles.mjs +1 -1
- package/dist/esm/hooks/useSplitStyles.mjs.map +1 -1
- package/dist/esm/hooks/useSplitStyles.native.js +1 -1
- package/dist/esm/hooks/useSplitStyles.native.js.map +1 -1
- package/dist/esm/hooks/useThemeState.mjs +36 -48
- package/dist/esm/hooks/useThemeState.mjs.map +1 -1
- package/dist/esm/hooks/useThemeState.native.js +44 -50
- package/dist/esm/hooks/useThemeState.native.js.map +1 -1
- package/dist/esm/index.js +4 -1
- package/dist/esm/index.mjs +4 -1
- package/dist/esm/index.native.js +4 -1
- package/dist/esm/internal-runtime.mjs +22 -3
- package/dist/esm/internal-runtime.mjs.map +1 -1
- package/dist/esm/internal-runtime.native.js +22 -3
- package/dist/esm/internal-runtime.native.js.map +1 -1
- package/dist/esm/static-resolve.native.js +2 -9
- package/dist/esm/static-resolve.native.js.map +1 -1
- package/dist/esm/style.mjs +1 -1
- package/dist/esm/style.mjs.map +1 -1
- package/dist/esm/style.native.js +4 -7
- package/dist/esm/style.native.js.map +1 -1
- package/dist/esm/views/Theme.mjs +15 -14
- package/dist/esm/views/Theme.mjs.map +1 -1
- package/dist/esm/views/Theme.native.js +15 -15
- package/dist/esm/views/Theme.native.js.map +1 -1
- package/dist/esm/views/ThemeDebug.mjs +1 -1
- package/dist/esm/views/ThemeDebug.mjs.map +1 -1
- package/dist/esm/views/ThemeUpdate.mjs +1 -1
- package/dist/esm/views/ThemeUpdate.mjs.map +1 -1
- package/dist/esm/views/ThemeUpdate.native.js +1 -1
- package/dist/esm/views/ThemeUpdate.native.js.map +1 -1
- package/package.json +20 -18
- package/reset.css +11 -0
- package/src/_withNativeStyle.tsx +6 -1
- package/src/config.ts +6 -6
- package/src/contexts/ComponentContext.tsx +8 -0
- package/src/createComponent.tsx +177 -57
- package/src/createStyledHOC.tsx +25 -26
- package/src/createTamagui.ts +47 -28
- package/src/dom/contract.ts +4 -1
- package/src/dom/html.native.tsx +55 -2
- package/src/dom/html.tsx +189 -388
- package/src/dom/htmlReset.ts +15 -0
- package/src/dom/htmlRuntime.native.tsx +5 -0
- package/src/dom/htmlStaticConfig.ts +40 -0
- package/src/dom/primitives.native.tsx +138 -33
- package/src/dom/standalone.ts +2 -1
- package/src/dom/styleTypes.ts +82 -92
- package/src/eventHandling.native.ts +61 -11
- package/src/eventHandling.ts +19 -4
- package/src/helpers/NativeTextBinding.tsx +26 -0
- package/src/helpers/createDesignSystem.ts +24 -8
- package/src/helpers/expandStyle.ts +88 -4
- package/src/helpers/expandStyles.ts +6 -11
- package/src/helpers/fluid.ts +66 -0
- package/src/helpers/getCSSStylesAtomic.ts +11 -6
- package/src/helpers/getSplitStyles.tsx +1032 -296
- package/src/helpers/getThemeCSSRules.ts +73 -35
- package/src/helpers/grammarConfig.ts +23 -8
- package/src/helpers/insertStyleRule.tsx +14 -8
- package/src/helpers/mainThreadPressEvents.native.ts +65 -141
- package/src/helpers/mergeProps.ts +29 -62
- package/src/helpers/nativeOnlyProps.ts +0 -1
- package/src/helpers/nativeTextMetrics.ts +77 -0
- package/src/helpers/normalizeColor.native.ts +29 -4
- package/src/helpers/normalizeValueWithProperty.ts +2 -1
- package/src/helpers/{parseNativeStyle.native.ts → parseNativeStyle.ts} +8 -1
- package/src/helpers/proxyThemeToParents.ts +13 -2
- package/src/helpers/resolveNativeUnits.native.ts +247 -0
- package/src/helpers/resolveNativeUnits.ts +10 -0
- package/src/helpers/resolveRem.native.ts +25 -26
- package/src/helpers/resolveSizing.ts +167 -0
- package/src/helpers/resolveVariableValue.ts +21 -17
- package/src/helpers/skipProps.ts +0 -1
- package/src/helpers/styleFrontend.ts +39 -0
- package/src/helpers/styleProvenance.ts +1 -1
- package/src/helpers/styleStaticConfigCore.ts +15 -4
- package/src/helpers/styledDynamic.ts +3 -1
- package/src/helpers/subscribeToContextGroup.tsx +16 -7
- package/src/helpers/themes.ts +27 -11
- package/src/helpers/tokenCategories.ts +15 -3
- package/src/helpers/variables.ts +2 -2
- package/src/helpers/warnOnce.ts +6 -0
- package/src/helpers/webPropsToSkip.native.ts +9 -3
- package/src/helpers/wrapStyleTags.tsx +4 -1
- package/src/hooks/useMedia.tsx +36 -47
- package/src/hooks/useSplitStyles.tsx +4 -1
- package/src/hooks/useThemeState.ts +69 -74
- package/src/index.ts +13 -0
- package/src/interfaces/RNExclusiveTypes.ts +1 -3
- package/src/internal-runtime.ts +43 -2
- package/src/style.ts +4 -1
- package/src/styled.tsx +34 -3
- package/src/types.tsx +412 -132
- package/src/views/Theme.tsx +18 -21
- package/src/views/ThemeDebug.tsx +1 -1
- package/src/views/ThemeUpdate.tsx +1 -1
- package/types/_withNativeStyle.d.ts.map +1 -1
- package/types/config.d.ts.map +1 -1
- package/types/contexts/ComponentContext.d.ts +1 -1
- package/types/contexts/ComponentContext.d.ts.map +1 -1
- package/types/createComponent.d.ts.map +1 -1
- package/types/createStyledHOC.d.ts +5 -2
- package/types/createStyledHOC.d.ts.map +1 -1
- package/types/createTamagui.d.ts.map +1 -1
- package/types/dom/contract.d.ts +4 -1
- package/types/dom/contract.d.ts.map +1 -1
- package/types/dom/html.d.ts +60 -51
- package/types/dom/html.d.ts.map +1 -1
- package/types/dom/html.native.d.ts.map +1 -1
- package/types/dom/htmlReset.d.ts +10 -0
- package/types/dom/htmlReset.d.ts.map +1 -0
- package/types/dom/htmlRuntime.native.d.ts.map +1 -1
- package/types/dom/htmlStaticConfig.d.ts +22 -0
- package/types/dom/htmlStaticConfig.d.ts.map +1 -0
- package/types/dom/primitives.native.d.ts.map +1 -1
- package/types/dom/standalone.d.ts +2 -1
- package/types/dom/standalone.d.ts.map +1 -1
- package/types/dom/styleTypes.d.ts +63 -84
- package/types/dom/styleTypes.d.ts.map +1 -1
- package/types/eventHandling.d.ts +12 -4
- package/types/eventHandling.d.ts.map +1 -1
- package/types/eventHandling.native.d.ts.map +1 -1
- package/types/helpers/NativeTextBinding.d.ts +11 -0
- package/types/helpers/NativeTextBinding.d.ts.map +1 -0
- package/types/helpers/createDesignSystem.d.ts.map +1 -1
- package/types/helpers/expandStyle.d.ts +1 -0
- package/types/helpers/expandStyle.d.ts.map +1 -1
- package/types/helpers/expandStyles.d.ts.map +1 -1
- package/types/helpers/fluid.d.ts +21 -0
- package/types/helpers/fluid.d.ts.map +1 -0
- package/types/helpers/getCSSStylesAtomic.d.ts +3 -1
- package/types/helpers/getCSSStylesAtomic.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts +2 -1
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/getThemeCSSRules.d.ts.map +1 -1
- package/types/helpers/grammarConfig.d.ts.map +1 -1
- package/types/helpers/insertStyleRule.d.ts.map +1 -1
- package/types/helpers/mainThreadPressEvents.native.d.ts +0 -7
- package/types/helpers/mainThreadPressEvents.native.d.ts.map +1 -1
- package/types/helpers/mergeProps.d.ts +1 -15
- package/types/helpers/mergeProps.d.ts.map +1 -1
- package/types/helpers/nativeOnlyProps.d.ts +0 -1
- package/types/helpers/nativeOnlyProps.d.ts.map +1 -1
- package/types/helpers/nativeTextMetrics.d.ts +16 -0
- package/types/helpers/nativeTextMetrics.d.ts.map +1 -0
- package/types/helpers/normalizeColor.native.d.ts +4 -1
- package/types/helpers/normalizeColor.native.d.ts.map +1 -1
- package/types/helpers/normalizeShadow.native.d.ts +3 -1
- package/types/helpers/normalizeShadow.native.d.ts.map +1 -1
- package/types/helpers/normalizeValueWithProperty.d.ts.map +1 -1
- package/types/helpers/{parseNativeStyle.native.d.ts → parseNativeStyle.d.ts} +1 -1
- package/types/helpers/parseNativeStyle.d.ts.map +1 -0
- package/types/helpers/proxyThemeToParents.d.ts +1 -1
- package/types/helpers/proxyThemeToParents.d.ts.map +1 -1
- package/types/helpers/resolveNativeUnits.d.ts +6 -0
- package/types/helpers/resolveNativeUnits.d.ts.map +1 -0
- package/types/helpers/resolveNativeUnits.native.d.ts +16 -0
- package/types/helpers/resolveNativeUnits.native.d.ts.map +1 -0
- package/types/helpers/resolveRem.native.d.ts +6 -4
- package/types/helpers/resolveRem.native.d.ts.map +1 -1
- package/types/helpers/resolveSizing.d.ts +90 -0
- package/types/helpers/resolveSizing.d.ts.map +1 -0
- package/types/helpers/resolveVariableValue.d.ts.map +1 -1
- package/types/helpers/skipProps.d.ts +0 -1
- package/types/helpers/skipProps.d.ts.map +1 -1
- package/types/helpers/styleFrontend.d.ts +21 -0
- package/types/helpers/styleFrontend.d.ts.map +1 -1
- package/types/helpers/styleProvenance.d.ts +1 -1
- package/types/helpers/styleProvenance.d.ts.map +1 -1
- package/types/helpers/styleStaticConfigCore.d.ts.map +1 -1
- package/types/helpers/styledDynamic.d.ts +1 -1
- package/types/helpers/styledDynamic.d.ts.map +1 -1
- package/types/helpers/themes.d.ts +4 -0
- package/types/helpers/themes.d.ts.map +1 -1
- package/types/helpers/tokenCategories.d.ts +1 -1
- package/types/helpers/tokenCategories.d.ts.map +1 -1
- package/types/helpers/warnOnce.d.ts +1 -0
- package/types/helpers/warnOnce.d.ts.map +1 -1
- package/types/helpers/webPropsToSkip.native.d.ts +6 -2
- package/types/helpers/webPropsToSkip.native.d.ts.map +1 -1
- package/types/helpers/wrapStyleTags.d.ts.map +1 -1
- package/types/hooks/useMedia.d.ts +5 -2
- package/types/hooks/useMedia.d.ts.map +1 -1
- package/types/hooks/useSplitStyles.d.ts.map +1 -1
- package/types/hooks/useThemeState.d.ts.map +1 -1
- package/types/index.d.ts +4 -1
- package/types/index.d.ts.map +1 -1
- package/types/interfaces/RNExclusiveTypes.d.ts +2 -3
- package/types/interfaces/RNExclusiveTypes.d.ts.map +1 -1
- package/types/internal-runtime.d.ts +12 -1
- package/types/internal-runtime.d.ts.map +1 -1
- package/types/style.d.ts.map +1 -1
- package/types/styled.d.ts +7 -4
- package/types/styled.d.ts.map +1 -1
- package/types/types.d.ts +258 -102
- package/types/types.d.ts.map +1 -1
- package/types/views/Theme.d.ts.map +1 -1
- package/dist/cjs/helpers/timer.native.js.map +0 -1
- package/dist/esm/helpers/timer.mjs +0 -13
- package/dist/esm/helpers/timer.mjs.map +0 -1
- package/dist/esm/helpers/timer.native.js +0 -13
- package/dist/esm/helpers/timer.native.js.map +0 -1
- package/src/helpers/timer.ts +0 -9
- package/types/helpers/parseNativeStyle.native.d.ts.map +0 -1
- package/types/helpers/timer.d.ts +0 -2
- package/types/helpers/timer.d.ts.map +0 -1
|
@@ -0,0 +1,124 @@
|
|
|
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) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var resolveSizing_exports = {};
|
|
22
|
+
__export(resolveSizing_exports, {
|
|
23
|
+
defaultSizing: () => defaultSizing,
|
|
24
|
+
resolveSizing: () => resolveSizing
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(resolveSizing_exports);
|
|
27
|
+
var import_config = require("../config.cjs");
|
|
28
|
+
var import_createVariable = require("../createVariable.cjs");
|
|
29
|
+
const defaultSizing = {
|
|
30
|
+
default: "md",
|
|
31
|
+
sizes: {
|
|
32
|
+
xs: {
|
|
33
|
+
fontSize: "xs",
|
|
34
|
+
controlFontSize: "xs",
|
|
35
|
+
paddingInline: "2",
|
|
36
|
+
paddingBlock: "1",
|
|
37
|
+
gap: "1",
|
|
38
|
+
radius: "sm"
|
|
39
|
+
},
|
|
40
|
+
sm: {
|
|
41
|
+
fontSize: "sm",
|
|
42
|
+
controlFontSize: "sm",
|
|
43
|
+
paddingInline: "3",
|
|
44
|
+
paddingBlock: "1.5",
|
|
45
|
+
gap: "1.5",
|
|
46
|
+
radius: "md"
|
|
47
|
+
},
|
|
48
|
+
md: {
|
|
49
|
+
fontSize: "sm",
|
|
50
|
+
controlFontSize: "base",
|
|
51
|
+
paddingInline: "4",
|
|
52
|
+
paddingBlock: "2",
|
|
53
|
+
gap: "2",
|
|
54
|
+
radius: "md"
|
|
55
|
+
},
|
|
56
|
+
lg: {
|
|
57
|
+
fontSize: "base",
|
|
58
|
+
controlFontSize: "lg",
|
|
59
|
+
paddingInline: "6",
|
|
60
|
+
paddingBlock: "2",
|
|
61
|
+
gap: "2",
|
|
62
|
+
radius: "md"
|
|
63
|
+
},
|
|
64
|
+
xl: {
|
|
65
|
+
fontSize: "lg",
|
|
66
|
+
controlFontSize: "xl",
|
|
67
|
+
paddingInline: "8",
|
|
68
|
+
paddingBlock: "2.5",
|
|
69
|
+
gap: "2.5",
|
|
70
|
+
radius: "lg"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
const toPx = (value) => typeof value === "number" ? value : Number.parseFloat(value);
|
|
75
|
+
function resolveSizing(size, env) {
|
|
76
|
+
if (size === false) return void 0;
|
|
77
|
+
const conf = env?.fonts && env?.tokens ? void 0 : (0, import_config.getConfig)();
|
|
78
|
+
const sizing = {
|
|
79
|
+
...defaultSizing,
|
|
80
|
+
...env?.sizing ?? conf?.sizing
|
|
81
|
+
};
|
|
82
|
+
const name = size === true || size == null ? sizing.default : size;
|
|
83
|
+
const rung = sizing.sizes[name];
|
|
84
|
+
if (!rung) return void 0;
|
|
85
|
+
const keys = {
|
|
86
|
+
fontSize: rung.fontSize,
|
|
87
|
+
lineHeight: rung.fontSize,
|
|
88
|
+
paddingInline: rung.paddingInline,
|
|
89
|
+
paddingBlock: rung.paddingBlock,
|
|
90
|
+
gap: rung.gap,
|
|
91
|
+
radius: rung.radius
|
|
92
|
+
};
|
|
93
|
+
if (rung.px) {
|
|
94
|
+
return {
|
|
95
|
+
name,
|
|
96
|
+
...keys,
|
|
97
|
+
height: rung.px.height,
|
|
98
|
+
icon: rung.px.icon,
|
|
99
|
+
square: rung.px.square
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
const fonts = env?.fonts ?? conf?.fontsParsed;
|
|
103
|
+
const tokens = env?.tokens ?? conf?.tokensParsed;
|
|
104
|
+
const font = env?.font ?? fonts?.[conf?.defaultFontToken ?? "body"];
|
|
105
|
+
const px = {
|
|
106
|
+
fontSize: toPx((0, import_createVariable.getVariableValue)(font?.size?.[rung.fontSize])),
|
|
107
|
+
control: toPx((0, import_createVariable.getVariableValue)(font?.size?.[rung.controlFontSize])),
|
|
108
|
+
lineHeight: toPx((0, import_createVariable.getVariableValue)(font?.lineHeight?.[rung.fontSize])),
|
|
109
|
+
paddingBlock: toPx((0, import_createVariable.getVariableValue)(tokens?.space?.[rung.paddingBlock]))
|
|
110
|
+
};
|
|
111
|
+
if (!Object.values(px).every(Number.isFinite)) {
|
|
112
|
+
if (process.env.NODE_ENV === "development") {
|
|
113
|
+
console.warn(`[tamagui] size "${name}" references a missing token (fontSize "${rung.fontSize}", controlFontSize "${rung.controlFontSize}", paddingBlock "${rung.paddingBlock}"); resolving to no styles`);
|
|
114
|
+
}
|
|
115
|
+
return void 0;
|
|
116
|
+
}
|
|
117
|
+
return {
|
|
118
|
+
name,
|
|
119
|
+
...keys,
|
|
120
|
+
height: px.lineHeight + px.paddingBlock * 2,
|
|
121
|
+
icon: Math.ceil(px.fontSize / 4) * 4,
|
|
122
|
+
square: Math.round(px.control * 1.4)
|
|
123
|
+
};
|
|
124
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
+
var resolveSizing_exports = {};
|
|
24
|
+
__export(resolveSizing_exports, {
|
|
25
|
+
defaultSizing: () => defaultSizing,
|
|
26
|
+
resolveSizing: () => resolveSizing
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(resolveSizing_exports);
|
|
29
|
+
var import_config = require("../config.native.js");
|
|
30
|
+
var import_createVariable = require("../createVariable.native.js");
|
|
31
|
+
var defaultSizing = {
|
|
32
|
+
default: "md",
|
|
33
|
+
sizes: {
|
|
34
|
+
xs: {
|
|
35
|
+
fontSize: "xs",
|
|
36
|
+
controlFontSize: "xs",
|
|
37
|
+
paddingInline: "2",
|
|
38
|
+
paddingBlock: "1",
|
|
39
|
+
gap: "1",
|
|
40
|
+
radius: "sm"
|
|
41
|
+
},
|
|
42
|
+
sm: {
|
|
43
|
+
fontSize: "sm",
|
|
44
|
+
controlFontSize: "sm",
|
|
45
|
+
paddingInline: "3",
|
|
46
|
+
paddingBlock: "1.5",
|
|
47
|
+
gap: "1.5",
|
|
48
|
+
radius: "md"
|
|
49
|
+
},
|
|
50
|
+
md: {
|
|
51
|
+
fontSize: "sm",
|
|
52
|
+
controlFontSize: "base",
|
|
53
|
+
paddingInline: "4",
|
|
54
|
+
paddingBlock: "2",
|
|
55
|
+
gap: "2",
|
|
56
|
+
radius: "md"
|
|
57
|
+
},
|
|
58
|
+
lg: {
|
|
59
|
+
fontSize: "base",
|
|
60
|
+
controlFontSize: "lg",
|
|
61
|
+
paddingInline: "6",
|
|
62
|
+
paddingBlock: "2",
|
|
63
|
+
gap: "2",
|
|
64
|
+
radius: "md"
|
|
65
|
+
},
|
|
66
|
+
xl: {
|
|
67
|
+
fontSize: "lg",
|
|
68
|
+
controlFontSize: "xl",
|
|
69
|
+
paddingInline: "8",
|
|
70
|
+
paddingBlock: "2.5",
|
|
71
|
+
gap: "2.5",
|
|
72
|
+
radius: "lg"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
var toPx = function(value) {
|
|
77
|
+
return typeof value === "number" ? value : Number.parseFloat(value);
|
|
78
|
+
};
|
|
79
|
+
function resolveSizing(size, env) {
|
|
80
|
+
var _font_size, _font_size1, _font_lineHeight, _tokens_space;
|
|
81
|
+
if (size === false) return void 0;
|
|
82
|
+
var conf = (env === null || env === void 0 ? void 0 : env.fonts) && (env === null || env === void 0 ? void 0 : env.tokens) ? void 0 : (0, import_config.getConfig)();
|
|
83
|
+
var _env_sizing;
|
|
84
|
+
var sizing = {
|
|
85
|
+
...defaultSizing,
|
|
86
|
+
...(_env_sizing = env === null || env === void 0 ? void 0 : env.sizing) !== null && _env_sizing !== void 0 ? _env_sizing : conf === null || conf === void 0 ? void 0 : conf.sizing
|
|
87
|
+
};
|
|
88
|
+
var name = size === true || size == null ? sizing.default : size;
|
|
89
|
+
var rung = sizing.sizes[name];
|
|
90
|
+
if (!rung) return void 0;
|
|
91
|
+
var keys = {
|
|
92
|
+
fontSize: rung.fontSize,
|
|
93
|
+
lineHeight: rung.fontSize,
|
|
94
|
+
paddingInline: rung.paddingInline,
|
|
95
|
+
paddingBlock: rung.paddingBlock,
|
|
96
|
+
gap: rung.gap,
|
|
97
|
+
radius: rung.radius
|
|
98
|
+
};
|
|
99
|
+
if (rung.px) {
|
|
100
|
+
return {
|
|
101
|
+
name,
|
|
102
|
+
...keys,
|
|
103
|
+
height: rung.px.height,
|
|
104
|
+
icon: rung.px.icon,
|
|
105
|
+
square: rung.px.square
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
var _env_fonts;
|
|
109
|
+
var fonts = (_env_fonts = env === null || env === void 0 ? void 0 : env.fonts) !== null && _env_fonts !== void 0 ? _env_fonts : conf === null || conf === void 0 ? void 0 : conf.fontsParsed;
|
|
110
|
+
var _env_tokens;
|
|
111
|
+
var tokens = (_env_tokens = env === null || env === void 0 ? void 0 : env.tokens) !== null && _env_tokens !== void 0 ? _env_tokens : conf === null || conf === void 0 ? void 0 : conf.tokensParsed;
|
|
112
|
+
var _conf_defaultFontToken, _env_font;
|
|
113
|
+
var font = (_env_font = env === null || env === void 0 ? void 0 : env.font) !== null && _env_font !== void 0 ? _env_font : fonts === null || fonts === void 0 ? void 0 : fonts[(_conf_defaultFontToken = conf === null || conf === void 0 ? void 0 : conf.defaultFontToken) !== null && _conf_defaultFontToken !== void 0 ? _conf_defaultFontToken : "body"];
|
|
114
|
+
var px = {
|
|
115
|
+
fontSize: toPx((0, import_createVariable.getVariableValue)(font === null || font === void 0 ? void 0 : (_font_size = font.size) === null || _font_size === void 0 ? void 0 : _font_size[rung.fontSize])),
|
|
116
|
+
control: toPx((0, import_createVariable.getVariableValue)(font === null || font === void 0 ? void 0 : (_font_size1 = font.size) === null || _font_size1 === void 0 ? void 0 : _font_size1[rung.controlFontSize])),
|
|
117
|
+
lineHeight: toPx((0, import_createVariable.getVariableValue)(font === null || font === void 0 ? void 0 : (_font_lineHeight = font.lineHeight) === null || _font_lineHeight === void 0 ? void 0 : _font_lineHeight[rung.fontSize])),
|
|
118
|
+
paddingBlock: toPx((0, import_createVariable.getVariableValue)(tokens === null || tokens === void 0 ? void 0 : (_tokens_space = tokens.space) === null || _tokens_space === void 0 ? void 0 : _tokens_space[rung.paddingBlock]))
|
|
119
|
+
};
|
|
120
|
+
if (!Object.values(px).every(Number.isFinite)) {
|
|
121
|
+
if (process.env.NODE_ENV === "development") {
|
|
122
|
+
console.warn(`[tamagui] size "${name}" references a missing token (fontSize "${rung.fontSize}", controlFontSize "${rung.controlFontSize}", paddingBlock "${rung.paddingBlock}"); resolving to no styles`);
|
|
123
|
+
}
|
|
124
|
+
return void 0;
|
|
125
|
+
}
|
|
126
|
+
return {
|
|
127
|
+
name,
|
|
128
|
+
...keys,
|
|
129
|
+
height: px.lineHeight + px.paddingBlock * 2,
|
|
130
|
+
icon: Math.ceil(px.fontSize / 4) * 4,
|
|
131
|
+
square: Math.round(px.control * 1.4)
|
|
132
|
+
};
|
|
133
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
+
var resolveSizing_exports = {};
|
|
24
|
+
__export(resolveSizing_exports, {
|
|
25
|
+
defaultSizing: () => defaultSizing,
|
|
26
|
+
resolveSizing: () => resolveSizing
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(resolveSizing_exports);
|
|
29
|
+
var import_config = require("../config.native.js");
|
|
30
|
+
var import_createVariable = require("../createVariable.native.js");
|
|
31
|
+
var defaultSizing = {
|
|
32
|
+
default: "md",
|
|
33
|
+
sizes: {
|
|
34
|
+
xs: {
|
|
35
|
+
fontSize: "xs",
|
|
36
|
+
controlFontSize: "xs",
|
|
37
|
+
paddingInline: "2",
|
|
38
|
+
paddingBlock: "1",
|
|
39
|
+
gap: "1",
|
|
40
|
+
radius: "sm"
|
|
41
|
+
},
|
|
42
|
+
sm: {
|
|
43
|
+
fontSize: "sm",
|
|
44
|
+
controlFontSize: "sm",
|
|
45
|
+
paddingInline: "3",
|
|
46
|
+
paddingBlock: "1.5",
|
|
47
|
+
gap: "1.5",
|
|
48
|
+
radius: "md"
|
|
49
|
+
},
|
|
50
|
+
md: {
|
|
51
|
+
fontSize: "sm",
|
|
52
|
+
controlFontSize: "base",
|
|
53
|
+
paddingInline: "4",
|
|
54
|
+
paddingBlock: "2",
|
|
55
|
+
gap: "2",
|
|
56
|
+
radius: "md"
|
|
57
|
+
},
|
|
58
|
+
lg: {
|
|
59
|
+
fontSize: "base",
|
|
60
|
+
controlFontSize: "lg",
|
|
61
|
+
paddingInline: "6",
|
|
62
|
+
paddingBlock: "2",
|
|
63
|
+
gap: "2",
|
|
64
|
+
radius: "md"
|
|
65
|
+
},
|
|
66
|
+
xl: {
|
|
67
|
+
fontSize: "lg",
|
|
68
|
+
controlFontSize: "xl",
|
|
69
|
+
paddingInline: "8",
|
|
70
|
+
paddingBlock: "2.5",
|
|
71
|
+
gap: "2.5",
|
|
72
|
+
radius: "lg"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
var toPx = function(value) {
|
|
77
|
+
return typeof value === "number" ? value : Number.parseFloat(value);
|
|
78
|
+
};
|
|
79
|
+
function resolveSizing(size, env) {
|
|
80
|
+
var _font_size, _font_size1, _font_lineHeight, _tokens_space;
|
|
81
|
+
if (size === false) return void 0;
|
|
82
|
+
var conf = (env === null || env === void 0 ? void 0 : env.fonts) && (env === null || env === void 0 ? void 0 : env.tokens) ? void 0 : (0, import_config.getConfig)();
|
|
83
|
+
var _env_sizing;
|
|
84
|
+
var sizing = {
|
|
85
|
+
...defaultSizing,
|
|
86
|
+
...(_env_sizing = env === null || env === void 0 ? void 0 : env.sizing) !== null && _env_sizing !== void 0 ? _env_sizing : conf === null || conf === void 0 ? void 0 : conf.sizing
|
|
87
|
+
};
|
|
88
|
+
var name = size === true || size == null ? sizing.default : size;
|
|
89
|
+
var rung = sizing.sizes[name];
|
|
90
|
+
if (!rung) return void 0;
|
|
91
|
+
var keys = {
|
|
92
|
+
fontSize: rung.fontSize,
|
|
93
|
+
lineHeight: rung.fontSize,
|
|
94
|
+
paddingInline: rung.paddingInline,
|
|
95
|
+
paddingBlock: rung.paddingBlock,
|
|
96
|
+
gap: rung.gap,
|
|
97
|
+
radius: rung.radius
|
|
98
|
+
};
|
|
99
|
+
if (rung.px) {
|
|
100
|
+
return {
|
|
101
|
+
name,
|
|
102
|
+
...keys,
|
|
103
|
+
height: rung.px.height,
|
|
104
|
+
icon: rung.px.icon,
|
|
105
|
+
square: rung.px.square
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
var _env_fonts;
|
|
109
|
+
var fonts = (_env_fonts = env === null || env === void 0 ? void 0 : env.fonts) !== null && _env_fonts !== void 0 ? _env_fonts : conf === null || conf === void 0 ? void 0 : conf.fontsParsed;
|
|
110
|
+
var _env_tokens;
|
|
111
|
+
var tokens = (_env_tokens = env === null || env === void 0 ? void 0 : env.tokens) !== null && _env_tokens !== void 0 ? _env_tokens : conf === null || conf === void 0 ? void 0 : conf.tokensParsed;
|
|
112
|
+
var _conf_defaultFontToken, _env_font;
|
|
113
|
+
var font = (_env_font = env === null || env === void 0 ? void 0 : env.font) !== null && _env_font !== void 0 ? _env_font : fonts === null || fonts === void 0 ? void 0 : fonts[(_conf_defaultFontToken = conf === null || conf === void 0 ? void 0 : conf.defaultFontToken) !== null && _conf_defaultFontToken !== void 0 ? _conf_defaultFontToken : "body"];
|
|
114
|
+
var px = {
|
|
115
|
+
fontSize: toPx((0, import_createVariable.getVariableValue)(font === null || font === void 0 ? void 0 : (_font_size = font.size) === null || _font_size === void 0 ? void 0 : _font_size[rung.fontSize])),
|
|
116
|
+
control: toPx((0, import_createVariable.getVariableValue)(font === null || font === void 0 ? void 0 : (_font_size1 = font.size) === null || _font_size1 === void 0 ? void 0 : _font_size1[rung.controlFontSize])),
|
|
117
|
+
lineHeight: toPx((0, import_createVariable.getVariableValue)(font === null || font === void 0 ? void 0 : (_font_lineHeight = font.lineHeight) === null || _font_lineHeight === void 0 ? void 0 : _font_lineHeight[rung.fontSize])),
|
|
118
|
+
paddingBlock: toPx((0, import_createVariable.getVariableValue)(tokens === null || tokens === void 0 ? void 0 : (_tokens_space = tokens.space) === null || _tokens_space === void 0 ? void 0 : _tokens_space[rung.paddingBlock]))
|
|
119
|
+
};
|
|
120
|
+
if (!Object.values(px).every(Number.isFinite)) {
|
|
121
|
+
if (process.env.NODE_ENV === "development") {
|
|
122
|
+
console.warn(`[tamagui] size "${name}" references a missing token (fontSize "${rung.fontSize}", controlFontSize "${rung.controlFontSize}", paddingBlock "${rung.paddingBlock}"); resolving to no styles`);
|
|
123
|
+
}
|
|
124
|
+
return void 0;
|
|
125
|
+
}
|
|
126
|
+
return {
|
|
127
|
+
name,
|
|
128
|
+
...keys,
|
|
129
|
+
height: px.lineHeight + px.paddingBlock * 2,
|
|
130
|
+
icon: Math.ceil(px.fontSize / 4) * 4,
|
|
131
|
+
square: Math.round(px.control * 1.4)
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
//# sourceMappingURL=resolveSizing.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveSizing.native.js","names":[],"sources":["cjs/helpers/resolveSizing.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar resolveSizing_exports = {};\n__export(resolveSizing_exports, {\n defaultSizing: () => defaultSizing,\n resolveSizing: () => resolveSizing\n});\nmodule.exports = __toCommonJS(resolveSizing_exports);\nvar import_config = require(\"../config\");\nvar import_createVariable = require(\"../createVariable\");\nvar defaultSizing = {\n default: \"md\",\n sizes: {\n xs: {\n fontSize: \"xs\",\n controlFontSize: \"xs\",\n paddingInline: \"2\",\n paddingBlock: \"1\",\n gap: \"1\",\n radius: \"sm\"\n },\n sm: {\n fontSize: \"sm\",\n controlFontSize: \"sm\",\n paddingInline: \"3\",\n paddingBlock: \"1.5\",\n gap: \"1.5\",\n radius: \"md\"\n },\n md: {\n fontSize: \"sm\",\n controlFontSize: \"base\",\n paddingInline: \"4\",\n paddingBlock: \"2\",\n gap: \"2\",\n radius: \"md\"\n },\n lg: {\n fontSize: \"base\",\n controlFontSize: \"lg\",\n paddingInline: \"6\",\n paddingBlock: \"2\",\n gap: \"2\",\n radius: \"md\"\n },\n xl: {\n fontSize: \"lg\",\n controlFontSize: \"xl\",\n paddingInline: \"8\",\n paddingBlock: \"2.5\",\n gap: \"2.5\",\n radius: \"lg\"\n }\n }\n};\nvar toPx = function(value) {\n return typeof value === \"number\" ? value : Number.parseFloat(value);\n};\nfunction resolveSizing(size, env) {\n var _font_size, _font_size1, _font_lineHeight, _tokens_space;\n if (size === false) return void 0;\n var conf = (env === null || env === void 0 ? void 0 : env.fonts) && (env === null || env === void 0 ? void 0 : env.tokens) ? void 0 : (0, import_config.getConfig)();\n var _env_sizing;\n var sizing = {\n ...defaultSizing,\n ...(_env_sizing = env === null || env === void 0 ? void 0 : env.sizing) !== null && _env_sizing !== void 0 ? _env_sizing : conf === null || conf === void 0 ? void 0 : conf.sizing\n };\n var name = size === true || size == null ? sizing.default : size;\n var rung = sizing.sizes[name];\n if (!rung) return void 0;\n var keys = {\n fontSize: rung.fontSize,\n lineHeight: rung.fontSize,\n paddingInline: rung.paddingInline,\n paddingBlock: rung.paddingBlock,\n gap: rung.gap,\n radius: rung.radius\n };\n if (rung.px) {\n return {\n name,\n ...keys,\n height: rung.px.height,\n icon: rung.px.icon,\n square: rung.px.square\n };\n }\n var _env_fonts;\n var fonts = (_env_fonts = env === null || env === void 0 ? void 0 : env.fonts) !== null && _env_fonts !== void 0 ? _env_fonts : conf === null || conf === void 0 ? void 0 : conf.fontsParsed;\n var _env_tokens;\n var tokens = (_env_tokens = env === null || env === void 0 ? void 0 : env.tokens) !== null && _env_tokens !== void 0 ? _env_tokens : conf === null || conf === void 0 ? void 0 : conf.tokensParsed;\n var _conf_defaultFontToken, _env_font;\n var font = (_env_font = env === null || env === void 0 ? void 0 : env.font) !== null && _env_font !== void 0 ? _env_font : fonts === null || fonts === void 0 ? void 0 : fonts[(_conf_defaultFontToken = conf === null || conf === void 0 ? void 0 : conf.defaultFontToken) !== null && _conf_defaultFontToken !== void 0 ? _conf_defaultFontToken : \"body\"];\n var px = {\n fontSize: toPx((0, import_createVariable.getVariableValue)(font === null || font === void 0 ? void 0 : (_font_size = font.size) === null || _font_size === void 0 ? void 0 : _font_size[rung.fontSize])),\n control: toPx((0, import_createVariable.getVariableValue)(font === null || font === void 0 ? void 0 : (_font_size1 = font.size) === null || _font_size1 === void 0 ? void 0 : _font_size1[rung.controlFontSize])),\n lineHeight: toPx((0, import_createVariable.getVariableValue)(font === null || font === void 0 ? void 0 : (_font_lineHeight = font.lineHeight) === null || _font_lineHeight === void 0 ? void 0 : _font_lineHeight[rung.fontSize])),\n paddingBlock: toPx((0, import_createVariable.getVariableValue)(tokens === null || tokens === void 0 ? void 0 : (_tokens_space = tokens.space) === null || _tokens_space === void 0 ? void 0 : _tokens_space[rung.paddingBlock]))\n };\n if (!Object.values(px).every(Number.isFinite)) {\n if (process.env.NODE_ENV === \"development\") {\n console.warn(`[tamagui] size \"${name}\" references a missing token (fontSize \"${rung.fontSize}\", controlFontSize \"${rung.controlFontSize}\", paddingBlock \"${rung.paddingBlock}\"); resolving to no styles`);\n }\n return void 0;\n }\n return {\n name,\n ...keys,\n height: px.lineHeight + px.paddingBlock * 2,\n icon: Math.ceil(px.fontSize / 4) * 4,\n square: Math.round(px.control * 1.4)\n };\n}\n//# sourceMappingURL=resolveSizing.js.map\n"],"mappings":"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"}
|
|
@@ -23,12 +23,12 @@ __export(resolveVariableValue_exports, { resolveVariableValue: () => resolveVari
|
|
|
23
23
|
module.exports = __toCommonJS(resolveVariableValue_exports);
|
|
24
24
|
var import_createVariable = require("../createVariable.cjs");
|
|
25
25
|
function resolveVariableValue(key, valOrVar, resolveValues) {
|
|
26
|
-
if (resolveValues === "none") return valOrVar;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
if (resolveValues === "none" || !(0, import_createVariable.isVariable)(valOrVar)) return valOrVar;
|
|
27
|
+
let value;
|
|
28
|
+
if (resolveValues === "value") value = valOrVar.val;
|
|
29
|
+
else {
|
|
30
|
+
const get = valOrVar.get;
|
|
31
|
+
value = typeof get === "function" ? get(resolveValues === "web" ? "web" : void 0) : valOrVar.variable;
|
|
32
32
|
}
|
|
33
|
-
return
|
|
33
|
+
return key === "lineHeight" && typeof value === "number" ? `${value}px` : value;
|
|
34
34
|
}
|
|
@@ -25,14 +25,12 @@ __export(resolveVariableValue_exports, { resolveVariableValue: () => resolveVari
|
|
|
25
25
|
module.exports = __toCommonJS(resolveVariableValue_exports);
|
|
26
26
|
var import_createVariable = require("../createVariable.native.js");
|
|
27
27
|
function resolveVariableValue(key, valOrVar, resolveValues) {
|
|
28
|
-
if (resolveValues === "none") return valOrVar;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
return valOrVar.val;
|
|
28
|
+
if (resolveValues === "none" || !(0, import_createVariable.isVariable)(valOrVar)) return valOrVar;
|
|
29
|
+
var value;
|
|
30
|
+
if (resolveValues === "value") value = valOrVar.val;
|
|
31
|
+
else {
|
|
32
|
+
var get = valOrVar.get;
|
|
33
|
+
value = !(key === "shadowColor" || key === "boxShadow" || key === "textShadow" || key === "backgroundImage") && typeof get === "function" ? get(resolveValues === "web" ? "web" : void 0) : valOrVar.val;
|
|
36
34
|
}
|
|
37
|
-
return
|
|
35
|
+
return key === "lineHeight" && typeof value === "number" ? `${value}px` : value;
|
|
38
36
|
}
|
|
@@ -25,16 +25,14 @@ __export(resolveVariableValue_exports, { resolveVariableValue: () => resolveVari
|
|
|
25
25
|
module.exports = __toCommonJS(resolveVariableValue_exports);
|
|
26
26
|
var import_createVariable = require("../createVariable.native.js");
|
|
27
27
|
function resolveVariableValue(key, valOrVar, resolveValues) {
|
|
28
|
-
if (resolveValues === "none") return valOrVar;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
return valOrVar.val;
|
|
28
|
+
if (resolveValues === "none" || !(0, import_createVariable.isVariable)(valOrVar)) return valOrVar;
|
|
29
|
+
var value;
|
|
30
|
+
if (resolveValues === "value") value = valOrVar.val;
|
|
31
|
+
else {
|
|
32
|
+
var get = valOrVar.get;
|
|
33
|
+
value = !(key === "shadowColor" || key === "boxShadow" || key === "textShadow" || key === "backgroundImage") && typeof get === "function" ? get(resolveValues === "web" ? "web" : void 0) : valOrVar.val;
|
|
36
34
|
}
|
|
37
|
-
return
|
|
35
|
+
return key === "lineHeight" && typeof value === "number" ? `${value}px` : value;
|
|
38
36
|
}
|
|
39
37
|
|
|
40
38
|
//# sourceMappingURL=resolveVariableValue.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveVariableValue.native.js","names":[],"sources":["cjs/helpers/resolveVariableValue.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n};\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") {\n\t\tfor (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: () => from[key],\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar resolveVariableValue_exports = {};\n__export(resolveVariableValue_exports, { resolveVariableValue: () => resolveVariableValue });\nmodule.exports = __toCommonJS(resolveVariableValue_exports);\nvar import_createVariable = require(\"../createVariable\");\nfunction resolveVariableValue(key, valOrVar, resolveValues) {\n\tif (resolveValues === \"none\"
|
|
1
|
+
{"version":3,"file":"resolveVariableValue.native.js","names":[],"sources":["cjs/helpers/resolveVariableValue.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n};\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") {\n\t\tfor (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: () => from[key],\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar resolveVariableValue_exports = {};\n__export(resolveVariableValue_exports, { resolveVariableValue: () => resolveVariableValue });\nmodule.exports = __toCommonJS(resolveVariableValue_exports);\nvar import_createVariable = require(\"../createVariable\");\nfunction resolveVariableValue(key, valOrVar, resolveValues) {\n\tif (resolveValues === \"none\" || !(0, import_createVariable.isVariable)(valOrVar)) return valOrVar;\n\tvar value;\n\tif (resolveValues === \"value\") value = valOrVar.val;\n\telse {\n\t\tvar get = valOrVar.get;\n\t\tvalue = !(key === \"shadowColor\" || key === \"boxShadow\" || key === \"textShadow\" || key === \"backgroundImage\") && typeof get === \"function\" ? get(resolveValues === \"web\" ? \"web\" : void 0) : valOrVar.val;\n\t}\n\treturn key === \"lineHeight\" && typeof value === \"number\" ? `${value}px` : value;\n}\n//# sourceMappingURL=resolveVariableValue.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC/B,KAAK,IAAI,QAAQ,KAAK,UAAU,QAAQ,MAAM;EAC7C,KAAK,IAAI;EACT,YAAY;CACb,CAAC;AACF;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC7C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EACnE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GAAG,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QAAQ,UAAU,IAAI,KAAK;GAC9G,WAAW,KAAK;GAChB,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAC3D,CAAC;CACF;CACA,OAAO;AACR;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,+BAA+B,CAAC;AACpC,SAAS,8BAA8B,EAAE,4BAA4B,qBAAqB,CAAC;AAC3F,OAAO,UAAU,aAAa,4BAA4B;AAC1D,IAAI,wBAAwB,QAAQ,6BAAmB;AACvD,SAAS,qBAAqB,KAAK,UAAU,eAAe;CAC3D,IAAI,kBAAkB,UAAU,EAAE,GAAG,sBAAsB,WAAU,CAAE,QAAQ,GAAG,OAAO;CACzF,IAAI;CACJ,IAAI,kBAAkB,SAAS,QAAQ,SAAS;MAC3C;EACJ,IAAI,MAAM,SAAS;EACnB,QAAQ,EAAE,QAAQ,iBAAiB,QAAQ,eAAe,QAAQ,gBAAgB,QAAQ,sBAAsB,OAAO,QAAQ,aAAa,IAAI,kBAAkB,QAAQ,QAAQ,KAAK,CAAC,IAAI,SAAS;CACtM;CACA,OAAO,QAAQ,gBAAgB,OAAO,UAAU,WAAW,GAAG,MAAM,MAAM;AAC3E"}
|
|
@@ -29,17 +29,13 @@ var import_skipProps = require("./skipProps.native.js");
|
|
|
29
29
|
var import_styleOriginalValues = require("./styleOriginalValues.native.js");
|
|
30
30
|
var import_normalizeValueWithProperty = require("./normalizeValueWithProperty.native.js");
|
|
31
31
|
var import_styledDynamic = require("./styledDynamic.native.js");
|
|
32
|
-
function _type_of(obj) {
|
|
33
|
-
"@swc/helpers - typeof";
|
|
34
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
35
|
-
}
|
|
36
32
|
function resolveVariantStyle(state, variants, key, value) {
|
|
37
33
|
var parentKey = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : key, parentCondition = arguments.length > 5 ? arguments[5] : void 0;
|
|
38
34
|
var definition = variants[key];
|
|
39
35
|
if (typeof definition !== "function" && (0, import_styledDynamic.isStyledDynamic)(definition)) {
|
|
40
36
|
return;
|
|
41
37
|
}
|
|
42
|
-
if (!(typeof value === "string" && definition &&
|
|
38
|
+
if (!(typeof value === "string" && definition && typeof definition === "object" && value in definition) && (0, import_getSplitStyles.walkConditionalValue)(state, key, value, parentCondition, function(payload, condition) {
|
|
43
39
|
return resolveSelection(state, variants, key, payload, parentKey, condition || void 0);
|
|
44
40
|
})) {
|
|
45
41
|
return;
|
|
@@ -51,7 +47,7 @@ function resolveSelection(state, variants, key, value, parentKey, condition) {
|
|
|
51
47
|
var output;
|
|
52
48
|
if ((0, import_styledDynamic.isStyledDynamic)(definition) && typeof definition === "function") {
|
|
53
49
|
output = definition(value, (0, import_styledDynamic.getDynamicEnv)(state));
|
|
54
|
-
} else if (definition &&
|
|
50
|
+
} else if (definition && typeof definition === "object" && value !== void 0) {
|
|
55
51
|
output = definition[value];
|
|
56
52
|
}
|
|
57
53
|
if (!(0, import_isObj.isObj)(output)) return;
|
|
@@ -29,17 +29,13 @@ var import_skipProps = require("./skipProps.native.js");
|
|
|
29
29
|
var import_styleOriginalValues = require("./styleOriginalValues.native.js");
|
|
30
30
|
var import_normalizeValueWithProperty = require("./normalizeValueWithProperty.native.js");
|
|
31
31
|
var import_styledDynamic = require("./styledDynamic.native.js");
|
|
32
|
-
function _type_of(obj) {
|
|
33
|
-
"@swc/helpers - typeof";
|
|
34
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
35
|
-
}
|
|
36
32
|
function resolveVariantStyle(state, variants, key, value) {
|
|
37
33
|
var parentKey = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : key, parentCondition = arguments.length > 5 ? arguments[5] : void 0;
|
|
38
34
|
var definition = variants[key];
|
|
39
35
|
if (typeof definition !== "function" && (0, import_styledDynamic.isStyledDynamic)(definition)) {
|
|
40
36
|
return;
|
|
41
37
|
}
|
|
42
|
-
if (!(typeof value === "string" && definition &&
|
|
38
|
+
if (!(typeof value === "string" && definition && typeof definition === "object" && value in definition) && (0, import_getSplitStyles.walkConditionalValue)(state, key, value, parentCondition, function(payload, condition) {
|
|
43
39
|
return resolveSelection(state, variants, key, payload, parentKey, condition || void 0);
|
|
44
40
|
})) {
|
|
45
41
|
return;
|
|
@@ -51,7 +47,7 @@ function resolveSelection(state, variants, key, value, parentKey, condition) {
|
|
|
51
47
|
var output;
|
|
52
48
|
if ((0, import_styledDynamic.isStyledDynamic)(definition) && typeof definition === "function") {
|
|
53
49
|
output = definition(value, (0, import_styledDynamic.getDynamicEnv)(state));
|
|
54
|
-
} else if (definition &&
|
|
50
|
+
} else if (definition && typeof definition === "object" && value !== void 0) {
|
|
55
51
|
output = definition[value];
|
|
56
52
|
}
|
|
57
53
|
if (!(0, import_isObj.isObj)(output)) return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveVariantStyle.native.js","names":[],"sources":["cjs/helpers/resolveVariantStyle.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar resolveVariantStyle_exports = {};\n__export(resolveVariantStyle_exports, {\n resolveVariantStyle: () => resolveVariantStyle\n});\nmodule.exports = __toCommonJS(resolveVariantStyle_exports);\nvar import_getSplitStyles = require(\"./getSplitStyles\");\nvar import_isObj = require(\"./isObj\");\nvar import_skipProps = require(\"./skipProps\");\nvar import_styleOriginalValues = require(\"./styleOriginalValues\");\nvar import_normalizeValueWithProperty = require(\"./normalizeValueWithProperty\");\nvar import_styledDynamic = require(\"./styledDynamic\");\nfunction
|
|
1
|
+
{"version":3,"file":"resolveVariantStyle.native.js","names":[],"sources":["cjs/helpers/resolveVariantStyle.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar resolveVariantStyle_exports = {};\n__export(resolveVariantStyle_exports, {\n resolveVariantStyle: () => resolveVariantStyle\n});\nmodule.exports = __toCommonJS(resolveVariantStyle_exports);\nvar import_getSplitStyles = require(\"./getSplitStyles\");\nvar import_isObj = require(\"./isObj\");\nvar import_skipProps = require(\"./skipProps\");\nvar import_styleOriginalValues = require(\"./styleOriginalValues\");\nvar import_normalizeValueWithProperty = require(\"./normalizeValueWithProperty\");\nvar import_styledDynamic = require(\"./styledDynamic\");\nfunction resolveVariantStyle(state, variants, key, value) {\n var parentKey = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : key, parentCondition = arguments.length > 5 ? arguments[5] : void 0;\n var definition = variants[key];\n if (typeof definition !== \"function\" && (0, import_styledDynamic.isStyledDynamic)(definition)) {\n return;\n }\n if (!(typeof value === \"string\" && definition && typeof definition === \"object\" && value in definition) && (0, import_getSplitStyles.walkConditionalValue)(state, key, value, parentCondition, function(payload, condition) {\n return resolveSelection(state, variants, key, payload, parentKey, condition || void 0);\n })) {\n return;\n }\n resolveSelection(state, variants, key, value, parentKey, parentCondition);\n}\nfunction resolveSelection(state, variants, key, value, parentKey, condition) {\n var definition = variants[key];\n var output;\n if ((0, import_styledDynamic.isStyledDynamic)(definition) && typeof definition === \"function\") {\n output = definition(value, (0, import_styledDynamic.getDynamicEnv)(state));\n } else if (definition && typeof definition === \"object\" && value !== void 0) {\n output = definition[value];\n }\n if (!(0, import_isObj.isObj)(output)) return;\n var originals = import_styleOriginalValues.styleOriginalValues.get(output);\n for (var outputKey in output) {\n if (!state.styleProps.noSkip && outputKey in import_skipProps.skipProps) continue;\n var raw = output[outputKey];\n if (raw == null) continue;\n var _$value = state.styleProps.noNormalize ? raw : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(raw, state.conf.shorthands[outputKey] || outputKey);\n var _originals_outputKey;\n (0, import_getSplitStyles.emitVariantStyle)(state, outputKey, _$value, (_originals_outputKey = originals === null || originals === void 0 ? void 0 : originals[outputKey]) !== null && _originals_outputKey !== void 0 ? _originals_outputKey : raw, condition, parentKey === key && outputKey === key);\n }\n}\n//# sourceMappingURL=resolveVariantStyle.js.map\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skipProps.native.js","names":[],"sources":["cjs/helpers/skipProps.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n};\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") {\n\t\tfor (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: () => from[key],\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar skipProps_exports = {};\n__export(skipProps_exports, {\n\tHOC_CLASSNAME_MARKER: () => HOC_CLASSNAME_MARKER,\n\tskipProps: () => skipProps\n});\nmodule.exports = __toCommonJS(skipProps_exports);\nrequire(\"./nativeOnlyProps\");\nvar import_webPropsToSkip = require(\"./webPropsToSkip\");\nvar HOC_CLASSNAME_MARKER = \"data-tamagui-hoc-class\";\nvar skipProps = {\n\tuntilMeasured: 1,\n\ttransition: 1,\n\tspace: 1,\n\
|
|
1
|
+
{"version":3,"file":"skipProps.native.js","names":[],"sources":["cjs/helpers/skipProps.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n};\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") {\n\t\tfor (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: () => from[key],\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar skipProps_exports = {};\n__export(skipProps_exports, {\n\tHOC_CLASSNAME_MARKER: () => HOC_CLASSNAME_MARKER,\n\tskipProps: () => skipProps\n});\nmodule.exports = __toCommonJS(skipProps_exports);\nrequire(\"./nativeOnlyProps\");\nvar import_webPropsToSkip = require(\"./webPropsToSkip\");\nvar HOC_CLASSNAME_MARKER = \"data-tamagui-hoc-class\";\nvar skipProps = {\n\tuntilMeasured: 1,\n\ttransition: 1,\n\tspace: 1,\n\tanimatedBy: 1,\n\tdisplayName: 1,\n\tdisableClassName: 1,\n\tdebug: 1,\n\tdisableOptimization: 1,\n\tdisableNativeStyle: 1,\n\trender: 1,\n\tstyle: 1,\n\t[HOC_CLASSNAME_MARKER]: 1,\n\tgroup: 1,\n\tcontainer: 1,\n\tanimatePresence: 1\n};\nif (process.env.NODE_ENV === \"test\") skipProps[\"data-test-renders\"] = 1;\nif (process.env.NODE_ENV === \"development\") skipProps[\"__tamaguiStyleDebugReceipt\"] = 1;\nObject.assign(skipProps, import_webPropsToSkip.webPropsToSkip);\n//# sourceMappingURL=skipProps.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC/B,KAAK,IAAI,QAAQ,KAAK,UAAU,QAAQ,MAAM;EAC7C,KAAK,IAAI;EACT,YAAY;CACb,CAAC;AACF;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC7C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EACnE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GAAG,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QAAQ,UAAU,IAAI,KAAK;GAC9G,WAAW,KAAK;GAChB,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAC3D,CAAC;CACF;CACA,OAAO;AACR;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,oBAAoB,CAAC;AACzB,SAAS,mBAAmB;CAC3B,4BAA4B;CAC5B,iBAAiB;AAClB,CAAC;AACD,OAAO,UAAU,aAAa,iBAAiB;AAC/C,QAAQ,6BAAmB;AAC3B,IAAI,wBAAwB,QAAQ,4BAAkB;AACtD,IAAI,uBAAuB;AAC3B,IAAI,YAAY;CACf,eAAe;CACf,YAAY;CACZ,OAAO;CACP,YAAY;CACZ,aAAa;CACb,kBAAkB;CAClB,OAAO;CACP,qBAAqB;CACrB,oBAAoB;CACpB,QAAQ;CACR,OAAO;EACN,uBAAuB;CACxB,OAAO;CACP,WAAW;CACX,iBAAiB;AAClB;AACA,IAAI,QAAQ,IAAI,aAAa,QAAQ,UAAU,uBAAuB;AACtE,IAAI,QAAQ,IAAI,aAAa,eAAe,UAAU,gCAAgC;AACtF,OAAO,OAAO,WAAW,sBAAsB,cAAc"}
|