@tamagui/web 3.0.0-beta.924.1 → 3.0.1
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
|
@@ -24,15 +24,17 @@ __export(mergeProps_exports, {
|
|
|
24
24
|
mergeProps: () => mergeProps
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(mergeProps_exports);
|
|
27
|
+
const mergeLayer = (out, layer) => {
|
|
28
|
+
for (const key in layer) {
|
|
29
|
+
const value = layer[key];
|
|
30
|
+
if (value === void 0 && key in out) continue;
|
|
31
|
+
out[key] = value;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
27
34
|
const mergeProps = (defaultProps, props) => {
|
|
28
35
|
const out = {};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
out[key] = defaultProps[key];
|
|
32
|
-
}
|
|
33
|
-
for (const key in props) {
|
|
34
|
-
out[key] = props[key];
|
|
35
|
-
}
|
|
36
|
+
mergeLayer(out, defaultProps);
|
|
37
|
+
mergeLayer(out, props);
|
|
36
38
|
return out;
|
|
37
39
|
};
|
|
38
40
|
const mergeComponentProps = (defaultProps, contextProps, props) => {
|
|
@@ -40,26 +42,21 @@ const mergeComponentProps = (defaultProps, contextProps, props) => {
|
|
|
40
42
|
if (!defaultProps && !contextProps) {
|
|
41
43
|
return [props, overriddenContext];
|
|
42
44
|
}
|
|
43
|
-
if (defaultProps && !contextProps) {
|
|
44
|
-
return [mergeProps(defaultProps, props), overriddenContext];
|
|
45
|
-
}
|
|
46
45
|
const out = {};
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
if (key in props) continue;
|
|
53
|
-
const contextValue = contextProps[key];
|
|
54
|
-
if (contextValue !== void 0) {
|
|
55
|
-
out[key] = contextValue;
|
|
46
|
+
if (defaultProps) mergeLayer(out, defaultProps);
|
|
47
|
+
if (contextProps) {
|
|
48
|
+
for (const key in contextProps) {
|
|
49
|
+
const value = contextProps[key];
|
|
50
|
+
if (value !== void 0) out[key] = value;
|
|
56
51
|
}
|
|
57
52
|
}
|
|
58
53
|
for (const key in props) {
|
|
59
|
-
|
|
54
|
+
const value = props[key];
|
|
55
|
+
if (value === void 0 && key in out) continue;
|
|
56
|
+
out[key] = value;
|
|
60
57
|
if (contextProps && key in contextProps) {
|
|
61
58
|
overriddenContext ||= {};
|
|
62
|
-
overriddenContext[key] =
|
|
59
|
+
overriddenContext[key] = value;
|
|
63
60
|
}
|
|
64
61
|
}
|
|
65
62
|
return [out, overriddenContext];
|
|
@@ -26,15 +26,17 @@ __export(mergeProps_exports, {
|
|
|
26
26
|
mergeProps: () => mergeProps
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(mergeProps_exports);
|
|
29
|
+
var mergeLayer = function(out, layer) {
|
|
30
|
+
for (var key in layer) {
|
|
31
|
+
var value = layer[key];
|
|
32
|
+
if (value === void 0 && key in out) continue;
|
|
33
|
+
out[key] = value;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
29
36
|
var mergeProps = function(defaultProps, props) {
|
|
30
37
|
var out = {};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
out[key] = defaultProps[key];
|
|
34
|
-
}
|
|
35
|
-
for (var key1 in props) {
|
|
36
|
-
out[key1] = props[key1];
|
|
37
|
-
}
|
|
38
|
+
mergeLayer(out, defaultProps);
|
|
39
|
+
mergeLayer(out, props);
|
|
38
40
|
return out;
|
|
39
41
|
};
|
|
40
42
|
var mergeComponentProps = function(defaultProps, contextProps, props) {
|
|
@@ -42,26 +44,21 @@ var mergeComponentProps = function(defaultProps, contextProps, props) {
|
|
|
42
44
|
if (!defaultProps && !contextProps) {
|
|
43
45
|
return [props, overriddenContext];
|
|
44
46
|
}
|
|
45
|
-
if (defaultProps && !contextProps) {
|
|
46
|
-
return [mergeProps(defaultProps, props), overriddenContext];
|
|
47
|
-
}
|
|
48
47
|
var out = {};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
if (key1 in props) continue;
|
|
55
|
-
var contextValue = contextProps[key1];
|
|
56
|
-
if (contextValue !== void 0) {
|
|
57
|
-
out[key1] = contextValue;
|
|
48
|
+
if (defaultProps) mergeLayer(out, defaultProps);
|
|
49
|
+
if (contextProps) {
|
|
50
|
+
for (var key in contextProps) {
|
|
51
|
+
var value = contextProps[key];
|
|
52
|
+
if (value !== void 0) out[key] = value;
|
|
58
53
|
}
|
|
59
54
|
}
|
|
60
|
-
for (var
|
|
61
|
-
|
|
62
|
-
if (
|
|
55
|
+
for (var key1 in props) {
|
|
56
|
+
var value1 = props[key1];
|
|
57
|
+
if (value1 === void 0 && key1 in out) continue;
|
|
58
|
+
out[key1] = value1;
|
|
59
|
+
if (contextProps && key1 in contextProps) {
|
|
63
60
|
overriddenContext || (overriddenContext = {});
|
|
64
|
-
overriddenContext[
|
|
61
|
+
overriddenContext[key1] = value1;
|
|
65
62
|
}
|
|
66
63
|
}
|
|
67
64
|
return [out, overriddenContext];
|
|
@@ -26,15 +26,17 @@ __export(mergeProps_exports, {
|
|
|
26
26
|
mergeProps: () => mergeProps
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(mergeProps_exports);
|
|
29
|
+
var mergeLayer = function(out, layer) {
|
|
30
|
+
for (var key in layer) {
|
|
31
|
+
var value = layer[key];
|
|
32
|
+
if (value === void 0 && key in out) continue;
|
|
33
|
+
out[key] = value;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
29
36
|
var mergeProps = function(defaultProps, props) {
|
|
30
37
|
var out = {};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
out[key] = defaultProps[key];
|
|
34
|
-
}
|
|
35
|
-
for (var key1 in props) {
|
|
36
|
-
out[key1] = props[key1];
|
|
37
|
-
}
|
|
38
|
+
mergeLayer(out, defaultProps);
|
|
39
|
+
mergeLayer(out, props);
|
|
38
40
|
return out;
|
|
39
41
|
};
|
|
40
42
|
var mergeComponentProps = function(defaultProps, contextProps, props) {
|
|
@@ -42,26 +44,21 @@ var mergeComponentProps = function(defaultProps, contextProps, props) {
|
|
|
42
44
|
if (!defaultProps && !contextProps) {
|
|
43
45
|
return [props, overriddenContext];
|
|
44
46
|
}
|
|
45
|
-
if (defaultProps && !contextProps) {
|
|
46
|
-
return [mergeProps(defaultProps, props), overriddenContext];
|
|
47
|
-
}
|
|
48
47
|
var out = {};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
if (key1 in props) continue;
|
|
55
|
-
var contextValue = contextProps[key1];
|
|
56
|
-
if (contextValue !== void 0) {
|
|
57
|
-
out[key1] = contextValue;
|
|
48
|
+
if (defaultProps) mergeLayer(out, defaultProps);
|
|
49
|
+
if (contextProps) {
|
|
50
|
+
for (var key in contextProps) {
|
|
51
|
+
var value = contextProps[key];
|
|
52
|
+
if (value !== void 0) out[key] = value;
|
|
58
53
|
}
|
|
59
54
|
}
|
|
60
|
-
for (var
|
|
61
|
-
|
|
62
|
-
if (
|
|
55
|
+
for (var key1 in props) {
|
|
56
|
+
var value1 = props[key1];
|
|
57
|
+
if (value1 === void 0 && key1 in out) continue;
|
|
58
|
+
out[key1] = value1;
|
|
59
|
+
if (contextProps && key1 in contextProps) {
|
|
63
60
|
overriddenContext || (overriddenContext = {});
|
|
64
|
-
overriddenContext[
|
|
61
|
+
overriddenContext[key1] = value1;
|
|
65
62
|
}
|
|
66
63
|
}
|
|
67
64
|
return [out, overriddenContext];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mergeProps.native.js","names":[],"sources":["cjs/helpers/mergeProps.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 mergeProps_exports = {};\n__export(mergeProps_exports, {\n mergeComponentProps: () => mergeComponentProps,\n mergeProps: () => mergeProps\n});\nmodule.exports = __toCommonJS(mergeProps_exports);\nvar
|
|
1
|
+
{"version":3,"file":"mergeProps.native.js","names":[],"sources":["cjs/helpers/mergeProps.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 mergeProps_exports = {};\n__export(mergeProps_exports, {\n mergeComponentProps: () => mergeComponentProps,\n mergeProps: () => mergeProps\n});\nmodule.exports = __toCommonJS(mergeProps_exports);\nvar mergeLayer = function(out, layer) {\n for (var key in layer) {\n var value = layer[key];\n if (value === void 0 && key in out) continue;\n out[key] = value;\n }\n};\nvar mergeProps = function(defaultProps, props) {\n var out = {};\n mergeLayer(out, defaultProps);\n mergeLayer(out, props);\n return out;\n};\nvar mergeComponentProps = function(defaultProps, contextProps, props) {\n var overriddenContext = null;\n if (!defaultProps && !contextProps) {\n return [\n props,\n overriddenContext\n ];\n }\n var out = {};\n if (defaultProps) mergeLayer(out, defaultProps);\n if (contextProps) {\n for (var key in contextProps) {\n var value = contextProps[key];\n if (value !== void 0) out[key] = value;\n }\n }\n for (var key1 in props) {\n var value1 = props[key1];\n if (value1 === void 0 && key1 in out) continue;\n out[key1] = value1;\n if (contextProps && key1 in contextProps) {\n overriddenContext || (overriddenContext = {});\n overriddenContext[key1] = value1;\n }\n }\n return [\n out,\n overriddenContext\n ];\n};\n//# sourceMappingURL=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AAI,MAAM,CAAC;CACX,IAAI,cAAc,WAAW,KAAK,YAAY;CAC9C,IAAI,cAAc;EAChB,KAAK,IAAI,OAAO,cAAc;GAC5B,IAAI,QAAQ,aAAa;GACzB,IAAI,UAAU,KAAK,GAAG,IAAI,OAAO;EACnC;CACF;CACA,KAAK,IAAI,QAAQ,OAAO;EACtB,IAAI,SAAS,MAAM;EACnB,IAAI,WAAW,KAAK,KAAK,QAAQ,KAAK;EACtC,IAAI,QAAQ;EACZ,IAAI,gBAAgB,QAAQ,cAAc;GACxC,sBAAsB,oBAAoB,CAAC;GAC3C,kBAAkB,QAAQ;EAC5B;CACF;CACA,OAAO,CACL,KACA,iBACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nativeOnlyProps.native.js","names":[],"sources":["cjs/helpers/nativeOnlyProps.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 nativeOnlyProps_exports = {};\n__export(nativeOnlyProps_exports, {\n nativeOnlyProps: () => nativeOnlyProps\n});\nmodule.exports = __toCommonJS(nativeOnlyProps_exports);\nvar nativeOnlyProps = {\n accessibilityElementsHidden: 1,\n accessibilityIgnoresInvertColors: 1,\n accessibilityLanguage: 1,\n adjustsFontSizeToFit: 1,\n allowFontScaling: 1,\n android_hyphenationFrequency: 1,\n dataDetectorType: 1,\n dynamicTypeRamp: 1,\n
|
|
1
|
+
{"version":3,"file":"nativeOnlyProps.native.js","names":[],"sources":["cjs/helpers/nativeOnlyProps.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 nativeOnlyProps_exports = {};\n__export(nativeOnlyProps_exports, {\n nativeOnlyProps: () => nativeOnlyProps\n});\nmodule.exports = __toCommonJS(nativeOnlyProps_exports);\nvar nativeOnlyProps = {\n accessibilityElementsHidden: 1,\n accessibilityIgnoresInvertColors: 1,\n accessibilityLanguage: 1,\n adjustsFontSizeToFit: 1,\n allowFontScaling: 1,\n android_hyphenationFrequency: 1,\n dataDetectorType: 1,\n dynamicTypeRamp: 1,\n ellipsizeMode: 1,\n hapticFeedback: 1,\n hapticStyle: 1,\n hitSlop: 1,\n importantForAccessibility: 1,\n lineBreakStrategyIOS: 1,\n maxFontSizeMultiplier: 1,\n minimumFontScale: 1,\n needsOffscreenAlphaCompositing: 1,\n nextFocusDown: 1,\n nextFocusForward: 1,\n nextFocusLeft: 1,\n nextFocusRight: 1,\n nextFocusUp: 1,\n onAccessibilityAction: 1,\n onAccessibilityEscape: 1,\n onAccessibilityTap: 1,\n onMagicTap: 1,\n onTextLayout: 1,\n pressRetentionOffset: 1,\n shouldRasterizeIO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,cAAc;CACd,sBAAsB;CACtB,oBAAoB;CACpB,sBAAsB;CACtB,mBAAmB;AACrB"}
|
|
@@ -0,0 +1,74 @@
|
|
|
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 nativeTextMetrics_exports = {};
|
|
22
|
+
__export(nativeTextMetrics_exports, { resolveTextMetrics: () => resolveTextMetrics });
|
|
23
|
+
module.exports = __toCommonJS(nativeTextMetrics_exports);
|
|
24
|
+
var import_createVariable = require("../createVariable.cjs");
|
|
25
|
+
var import_resolveVariableValue = require("./resolveVariableValue.cjs");
|
|
26
|
+
function resolveTextMetrics(style, lineHeight, parent, isStatic = false, apply = true) {
|
|
27
|
+
if ((0, import_createVariable.isVariable)(lineHeight)) lineHeight = (0, import_resolveVariableValue.resolveVariableValue)("lineHeight", lineHeight, "value");
|
|
28
|
+
let fontSize = typeof style.fontSize === "number" ? style.fontSize : parent?.parentFontSize;
|
|
29
|
+
const inheritsFontSize = style.fontSize == null && !!parent?.animatedText;
|
|
30
|
+
if (apply && style.fontSize == null && fontSize !== void 0 && !inheritsFontSize) style.fontSize = fontSize;
|
|
31
|
+
let leading;
|
|
32
|
+
if (lineHeight == null || lineHeight === "inherit" || lineHeight === "unset") {
|
|
33
|
+
leading = parent?.parentLineHeight;
|
|
34
|
+
} else if (lineHeight === "normal" || lineHeight === "initial") {
|
|
35
|
+
leading = "normal";
|
|
36
|
+
} else if (typeof lineHeight === "number") {
|
|
37
|
+
leading = lineHeight;
|
|
38
|
+
} else if (typeof lineHeight === "string") {
|
|
39
|
+
if (/^(?:\d+\.?\d*|\.\d+)px$/.test(lineHeight)) {
|
|
40
|
+
leading = lineHeight;
|
|
41
|
+
} else if (lineHeight.trim() !== "" && Number.isFinite(+lineHeight)) {
|
|
42
|
+
leading = +lineHeight;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
if (typeof leading === "number" && (!Number.isFinite(leading) || leading < 0)) {
|
|
46
|
+
delete style.lineHeight;
|
|
47
|
+
return {
|
|
48
|
+
fontSize,
|
|
49
|
+
...inheritsFontSize && { inheritsFontSize }
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
if (!apply) return {
|
|
53
|
+
fontSize,
|
|
54
|
+
lineHeight: leading,
|
|
55
|
+
...inheritsFontSize && { inheritsFontSize }
|
|
56
|
+
};
|
|
57
|
+
if (typeof leading === "number") {
|
|
58
|
+
if (fontSize === void 0 && !isStatic && !inheritsFontSize) {
|
|
59
|
+
fontSize = 14;
|
|
60
|
+
style.fontSize = fontSize;
|
|
61
|
+
}
|
|
62
|
+
if (inheritsFontSize || fontSize === void 0) delete style.lineHeight;
|
|
63
|
+
else style.lineHeight = fontSize * leading;
|
|
64
|
+
} else if (leading && leading !== "normal") {
|
|
65
|
+
style.lineHeight = Number.parseFloat(leading);
|
|
66
|
+
} else if (lineHeight != null || leading === "normal") {
|
|
67
|
+
delete style.lineHeight;
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
fontSize,
|
|
71
|
+
lineHeight: leading,
|
|
72
|
+
...inheritsFontSize && { inheritsFontSize }
|
|
73
|
+
};
|
|
74
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
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 nativeTextMetrics_exports = {};
|
|
24
|
+
__export(nativeTextMetrics_exports, { resolveTextMetrics: () => resolveTextMetrics });
|
|
25
|
+
module.exports = __toCommonJS(nativeTextMetrics_exports);
|
|
26
|
+
var import_createVariable = require("../createVariable.native.js");
|
|
27
|
+
var import_resolveVariableValue = require("./resolveVariableValue.native.js");
|
|
28
|
+
function resolveTextMetrics(style, lineHeight, parent) {
|
|
29
|
+
var isStatic = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false, apply = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : true;
|
|
30
|
+
if ((0, import_createVariable.isVariable)(lineHeight)) lineHeight = (0, import_resolveVariableValue.resolveVariableValue)("lineHeight", lineHeight, "value");
|
|
31
|
+
var fontSize = typeof style.fontSize === "number" ? style.fontSize : parent === null || parent === void 0 ? void 0 : parent.parentFontSize;
|
|
32
|
+
var inheritsFontSize = style.fontSize == null && !!(parent === null || parent === void 0 ? void 0 : parent.animatedText);
|
|
33
|
+
if (apply && style.fontSize == null && fontSize !== void 0 && !inheritsFontSize) style.fontSize = fontSize;
|
|
34
|
+
var leading;
|
|
35
|
+
if (lineHeight == null || lineHeight === "inherit" || lineHeight === "unset") {
|
|
36
|
+
leading = parent === null || parent === void 0 ? void 0 : parent.parentLineHeight;
|
|
37
|
+
} else if (lineHeight === "normal" || lineHeight === "initial") {
|
|
38
|
+
leading = "normal";
|
|
39
|
+
} else if (typeof lineHeight === "number") {
|
|
40
|
+
leading = lineHeight;
|
|
41
|
+
} else if (typeof lineHeight === "string") {
|
|
42
|
+
if (/^(?:\d+\.?\d*|\.\d+)px$/.test(lineHeight)) {
|
|
43
|
+
leading = lineHeight;
|
|
44
|
+
} else if (lineHeight.trim() !== "" && Number.isFinite(+lineHeight)) {
|
|
45
|
+
leading = +lineHeight;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (typeof leading === "number" && (!Number.isFinite(leading) || leading < 0)) {
|
|
49
|
+
delete style.lineHeight;
|
|
50
|
+
return {
|
|
51
|
+
fontSize,
|
|
52
|
+
...inheritsFontSize && { inheritsFontSize }
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
if (!apply) return {
|
|
56
|
+
fontSize,
|
|
57
|
+
lineHeight: leading,
|
|
58
|
+
...inheritsFontSize && { inheritsFontSize }
|
|
59
|
+
};
|
|
60
|
+
if (typeof leading === "number") {
|
|
61
|
+
if (fontSize === void 0 && !isStatic && !inheritsFontSize) {
|
|
62
|
+
fontSize = 14;
|
|
63
|
+
style.fontSize = fontSize;
|
|
64
|
+
}
|
|
65
|
+
if (inheritsFontSize || fontSize === void 0) delete style.lineHeight;
|
|
66
|
+
else style.lineHeight = fontSize * leading;
|
|
67
|
+
} else if (leading && leading !== "normal") {
|
|
68
|
+
style.lineHeight = Number.parseFloat(leading);
|
|
69
|
+
} else if (lineHeight != null || leading === "normal") {
|
|
70
|
+
delete style.lineHeight;
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
fontSize,
|
|
74
|
+
lineHeight: leading,
|
|
75
|
+
...inheritsFontSize && { inheritsFontSize }
|
|
76
|
+
};
|
|
77
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
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 nativeTextMetrics_exports = {};
|
|
24
|
+
__export(nativeTextMetrics_exports, { resolveTextMetrics: () => resolveTextMetrics });
|
|
25
|
+
module.exports = __toCommonJS(nativeTextMetrics_exports);
|
|
26
|
+
var import_createVariable = require("../createVariable.native.js");
|
|
27
|
+
var import_resolveVariableValue = require("./resolveVariableValue.native.js");
|
|
28
|
+
function resolveTextMetrics(style, lineHeight, parent) {
|
|
29
|
+
var isStatic = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false, apply = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : true;
|
|
30
|
+
if ((0, import_createVariable.isVariable)(lineHeight)) lineHeight = (0, import_resolveVariableValue.resolveVariableValue)("lineHeight", lineHeight, "value");
|
|
31
|
+
var fontSize = typeof style.fontSize === "number" ? style.fontSize : parent === null || parent === void 0 ? void 0 : parent.parentFontSize;
|
|
32
|
+
var inheritsFontSize = style.fontSize == null && !!(parent === null || parent === void 0 ? void 0 : parent.animatedText);
|
|
33
|
+
if (apply && style.fontSize == null && fontSize !== void 0 && !inheritsFontSize) style.fontSize = fontSize;
|
|
34
|
+
var leading;
|
|
35
|
+
if (lineHeight == null || lineHeight === "inherit" || lineHeight === "unset") {
|
|
36
|
+
leading = parent === null || parent === void 0 ? void 0 : parent.parentLineHeight;
|
|
37
|
+
} else if (lineHeight === "normal" || lineHeight === "initial") {
|
|
38
|
+
leading = "normal";
|
|
39
|
+
} else if (typeof lineHeight === "number") {
|
|
40
|
+
leading = lineHeight;
|
|
41
|
+
} else if (typeof lineHeight === "string") {
|
|
42
|
+
if (/^(?:\d+\.?\d*|\.\d+)px$/.test(lineHeight)) {
|
|
43
|
+
leading = lineHeight;
|
|
44
|
+
} else if (lineHeight.trim() !== "" && Number.isFinite(+lineHeight)) {
|
|
45
|
+
leading = +lineHeight;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (typeof leading === "number" && (!Number.isFinite(leading) || leading < 0)) {
|
|
49
|
+
delete style.lineHeight;
|
|
50
|
+
return {
|
|
51
|
+
fontSize,
|
|
52
|
+
...inheritsFontSize && { inheritsFontSize }
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
if (!apply) return {
|
|
56
|
+
fontSize,
|
|
57
|
+
lineHeight: leading,
|
|
58
|
+
...inheritsFontSize && { inheritsFontSize }
|
|
59
|
+
};
|
|
60
|
+
if (typeof leading === "number") {
|
|
61
|
+
if (fontSize === void 0 && !isStatic && !inheritsFontSize) {
|
|
62
|
+
fontSize = 14;
|
|
63
|
+
style.fontSize = fontSize;
|
|
64
|
+
}
|
|
65
|
+
if (inheritsFontSize || fontSize === void 0) delete style.lineHeight;
|
|
66
|
+
else style.lineHeight = fontSize * leading;
|
|
67
|
+
} else if (leading && leading !== "normal") {
|
|
68
|
+
style.lineHeight = Number.parseFloat(leading);
|
|
69
|
+
} else if (lineHeight != null || leading === "normal") {
|
|
70
|
+
delete style.lineHeight;
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
fontSize,
|
|
74
|
+
lineHeight: leading,
|
|
75
|
+
...inheritsFontSize && { inheritsFontSize }
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
//# sourceMappingURL=nativeTextMetrics.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nativeTextMetrics.native.js","names":[],"sources":["cjs/helpers/nativeTextMetrics.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 nativeTextMetrics_exports = {};\n__export(nativeTextMetrics_exports, {\n resolveTextMetrics: () => resolveTextMetrics\n});\nmodule.exports = __toCommonJS(nativeTextMetrics_exports);\nvar import_createVariable = require(\"../createVariable\");\nvar import_resolveVariableValue = require(\"./resolveVariableValue\");\nfunction resolveTextMetrics(style, lineHeight, parent) {\n var isStatic = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false, apply = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : true;\n if ((0, import_createVariable.isVariable)(lineHeight)) lineHeight = (0, import_resolveVariableValue.resolveVariableValue)(\"lineHeight\", lineHeight, \"value\");\n var fontSize = typeof style.fontSize === \"number\" ? style.fontSize : parent === null || parent === void 0 ? void 0 : parent.parentFontSize;\n var inheritsFontSize = style.fontSize == null && !!(parent === null || parent === void 0 ? void 0 : parent.animatedText);\n if (apply && style.fontSize == null && fontSize !== void 0 && !inheritsFontSize) style.fontSize = fontSize;\n var leading;\n if (lineHeight == null || lineHeight === \"inherit\" || lineHeight === \"unset\") {\n leading = parent === null || parent === void 0 ? void 0 : parent.parentLineHeight;\n } else if (lineHeight === \"normal\" || lineHeight === \"initial\") {\n leading = \"normal\";\n } else if (typeof lineHeight === \"number\") {\n leading = lineHeight;\n } else if (typeof lineHeight === \"string\") {\n if (/^(?:\\d+\\.?\\d*|\\.\\d+)px$/.test(lineHeight)) {\n leading = lineHeight;\n } else if (lineHeight.trim() !== \"\" && Number.isFinite(+lineHeight)) {\n leading = +lineHeight;\n }\n }\n if (typeof leading === \"number\" && (!Number.isFinite(leading) || leading < 0)) {\n delete style.lineHeight;\n return {\n fontSize,\n ...inheritsFontSize && {\n inheritsFontSize\n }\n };\n }\n if (!apply) return {\n fontSize,\n lineHeight: leading,\n ...inheritsFontSize && {\n inheritsFontSize\n }\n };\n if (typeof leading === \"number\") {\n if (fontSize === void 0 && !isStatic && !inheritsFontSize) {\n fontSize = 14;\n style.fontSize = fontSize;\n }\n if (inheritsFontSize || fontSize === void 0) delete style.lineHeight;\n else style.lineHeight = fontSize * leading;\n } else if (leading && leading !== \"normal\") {\n style.lineHeight = Number.parseFloat(leading);\n } else if (lineHeight != null || leading === \"normal\") {\n delete style.lineHeight;\n }\n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YAAY,UAAU;EACrD,OAAO,MAAM;CACf;CACA,OAAO;EACL;EACA,YAAY;EACZ,GAAG,oBAAoB,EACrB,iBACF;CACF;AACF"}
|
|
@@ -29,9 +29,23 @@ __export(normalizeColor_native_exports, {
|
|
|
29
29
|
module.exports = __toCommonJS(normalizeColor_native_exports);
|
|
30
30
|
var import_normalize_css_color = require("@tamagui/normalize-css-color");
|
|
31
31
|
var import_normalize_css_color2 = require("@tamagui/normalize-css-color");
|
|
32
|
+
var isDynamicColor = function(color) {
|
|
33
|
+
return typeof color.dynamic === "object" && color.dynamic !== null;
|
|
34
|
+
};
|
|
32
35
|
var normalizeColor = function(color, opacity) {
|
|
33
36
|
if (!color) return;
|
|
34
|
-
if (typeof color !== "string")
|
|
37
|
+
if (typeof color !== "string") {
|
|
38
|
+
if (opacity === void 0 || opacity === 1 || !isDynamicColor(color)) return color;
|
|
39
|
+
var dynamic = {};
|
|
40
|
+
for (var key in color.dynamic) {
|
|
41
|
+
var variant = normalizeColor(color.dynamic[key], opacity);
|
|
42
|
+
if (typeof variant === "string") dynamic[key] = variant;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
...color,
|
|
46
|
+
dynamic
|
|
47
|
+
};
|
|
48
|
+
}
|
|
35
49
|
var rgbaVal = getRgba(color);
|
|
36
50
|
if (rgbaVal) {
|
|
37
51
|
var colors = `${rgbaVal.r},${rgbaVal.g},${rgbaVal.b}`;
|
|
@@ -42,7 +56,8 @@ var normalizeColor = function(color, opacity) {
|
|
|
42
56
|
};
|
|
43
57
|
var getRgba = function(color) {
|
|
44
58
|
if (typeof color !== "string") return;
|
|
45
|
-
var
|
|
59
|
+
var nativeColor = color.replace(/^(rgb|hsl)\((?=[^)]*\/)/, "$1a(");
|
|
60
|
+
var colorNum = (0, import_normalize_css_color.normalizeCSSColor)(nativeColor);
|
|
46
61
|
if (colorNum != null) {
|
|
47
62
|
return (0, import_normalize_css_color.rgba)(colorNum);
|
|
48
63
|
}
|
|
@@ -29,9 +29,23 @@ __export(normalizeColor_native_exports, {
|
|
|
29
29
|
module.exports = __toCommonJS(normalizeColor_native_exports);
|
|
30
30
|
var import_normalize_css_color = require("@tamagui/normalize-css-color");
|
|
31
31
|
var import_normalize_css_color2 = require("@tamagui/normalize-css-color");
|
|
32
|
+
var isDynamicColor = function(color) {
|
|
33
|
+
return typeof color.dynamic === "object" && color.dynamic !== null;
|
|
34
|
+
};
|
|
32
35
|
var normalizeColor = function(color, opacity) {
|
|
33
36
|
if (!color) return;
|
|
34
|
-
if (typeof color !== "string")
|
|
37
|
+
if (typeof color !== "string") {
|
|
38
|
+
if (opacity === void 0 || opacity === 1 || !isDynamicColor(color)) return color;
|
|
39
|
+
var dynamic = {};
|
|
40
|
+
for (var key in color.dynamic) {
|
|
41
|
+
var variant = normalizeColor(color.dynamic[key], opacity);
|
|
42
|
+
if (typeof variant === "string") dynamic[key] = variant;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
...color,
|
|
46
|
+
dynamic
|
|
47
|
+
};
|
|
48
|
+
}
|
|
35
49
|
var rgbaVal = getRgba(color);
|
|
36
50
|
if (rgbaVal) {
|
|
37
51
|
var colors = `${rgbaVal.r},${rgbaVal.g},${rgbaVal.b}`;
|
|
@@ -42,7 +56,8 @@ var normalizeColor = function(color, opacity) {
|
|
|
42
56
|
};
|
|
43
57
|
var getRgba = function(color) {
|
|
44
58
|
if (typeof color !== "string") return;
|
|
45
|
-
var
|
|
59
|
+
var nativeColor = color.replace(/^(rgb|hsl)\((?=[^)]*\/)/, "$1a(");
|
|
60
|
+
var colorNum = (0, import_normalize_css_color.normalizeCSSColor)(nativeColor);
|
|
46
61
|
if (colorNum != null) {
|
|
47
62
|
return (0, import_normalize_css_color.rgba)(colorNum);
|
|
48
63
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeColor.native.js","names":[],"sources":["cjs/helpers/normalizeColor.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 normalizeColor_native_exports = {};\n__export(normalizeColor_native_exports, {\n getRgba: () => getRgba,\n normalizeColor: () => normalizeColor,\n rgba: () => import_normalize_css_color2.rgba\n});\nmodule.exports = __toCommonJS(normalizeColor_native_exports);\nvar import_normalize_css_color = require(\"@tamagui/normalize-css-color\");\nvar import_normalize_css_color2 = require(\"@tamagui/normalize-css-color\");\nvar normalizeColor = function(color, opacity) {\n if (!color) return;\n if (typeof color !== \"string\") return color;\n var rgbaVal = getRgba(color);\n if (rgbaVal) {\n var colors = `${rgbaVal.r},${rgbaVal.g},${rgbaVal.b}`;\n var _ref;\n return opacity === 1 ? `rgb(${colors})` : `rgba(${colors},${(_ref = opacity !== null && opacity !== void 0 ? opacity : rgbaVal.a) !== null && _ref !== void 0 ? _ref : 1})`;\n }\n return color;\n};\nvar getRgba = function(color) {\n if (typeof color !== \"string\") return;\n var colorNum = (0, import_normalize_css_color.normalizeCSSColor)(
|
|
1
|
+
{"version":3,"file":"normalizeColor.native.js","names":[],"sources":["cjs/helpers/normalizeColor.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 normalizeColor_native_exports = {};\n__export(normalizeColor_native_exports, {\n getRgba: () => getRgba,\n normalizeColor: () => normalizeColor,\n rgba: () => import_normalize_css_color2.rgba\n});\nmodule.exports = __toCommonJS(normalizeColor_native_exports);\nvar import_normalize_css_color = require(\"@tamagui/normalize-css-color\");\nvar import_normalize_css_color2 = require(\"@tamagui/normalize-css-color\");\nvar isDynamicColor = function(color) {\n return typeof color.dynamic === \"object\" && color.dynamic !== null;\n};\nvar normalizeColor = function(color, opacity) {\n if (!color) return;\n if (typeof color !== \"string\") {\n if (opacity === void 0 || opacity === 1 || !isDynamicColor(color)) return color;\n var dynamic = {};\n for (var key in color.dynamic) {\n var variant = normalizeColor(color.dynamic[key], opacity);\n if (typeof variant === \"string\") dynamic[key] = variant;\n }\n return {\n ...color,\n dynamic\n };\n }\n var rgbaVal = getRgba(color);\n if (rgbaVal) {\n var colors = `${rgbaVal.r},${rgbaVal.g},${rgbaVal.b}`;\n var _ref;\n return opacity === 1 ? `rgb(${colors})` : `rgba(${colors},${(_ref = opacity !== null && opacity !== void 0 ? opacity : rgbaVal.a) !== null && _ref !== void 0 ? _ref : 1})`;\n }\n return color;\n};\nvar getRgba = function(color) {\n if (typeof color !== \"string\") return;\n var nativeColor = color.replace(/^(rgb|hsl)\\((?=[^)]*\\/)/, \"$1a(\");\n var colorNum = (0, import_normalize_css_color.normalizeCSSColor)(nativeColor);\n if (colorNum != null) {\n return (0, import_normalize_css_color.rgba)(colorNum);\n }\n};\n//# sourceMappingURL=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e,MAAM,QAAQ,MAAM,OAAO;GACxD,IAAI,OAAO,YAAY,UAAU,QAAQ,OAAO;EAClD;EACA,OAAO;GACL,GAAG;GACH;EACF;CACF;CACA,IAAI,UAAU,QAAQ,KAAK;CAC3B,IAAI,SAAS;EACX,IAAI,SAAS,GAAG,QAAQ,EAAE,GAAG,QAAQ,EAAE,GAAG,QAAQ;EAClD,IAAI;EACJ,OAAO,YAAY,IAAI,OAAO,OAAO,KAAK,QAAQ,OAAO,IAAI,OAAO,YAAY,QAAQ,YAAY,KAAK,IAAI,UAAU,QAAQ,OAAO,QAAQ,SAAS,KAAK,IAAI,OAAO,EAAE;CAC3K;CACA,OAAO;AACT;AACA,IAAI,UAAU,SAAS,OAAO;CAC5B,IAAI,OAAO,UAAU,UAAU;CAC/B,IAAI,cAAc,MAAM,QAAQ,2BAA2B,MAAM;CACjE,IAAI,YAAY,GAAG,2BAA2B,kBAAiB,CAAE,WAAW;CAC5E,IAAI,YAAY,MAAM;EACpB,QAAQ,GAAG,2BAA2B,KAAI,CAAE,QAAQ;CACtD;AACF"}
|
|
@@ -27,10 +27,11 @@ const unitfulProps = new Set([
|
|
|
27
27
|
...Object.keys(import_helpers.stylePropsAll),
|
|
28
28
|
"translateX",
|
|
29
29
|
"translateY"
|
|
30
|
-
].filter((key) => !import_helpers.stylePropsUnitless[key]));
|
|
30
|
+
].filter((key) => key !== "lineHeight" && !import_helpers.stylePropsUnitless[key]));
|
|
31
31
|
const pxStringRe = /^-?\d*\.?\d+px$/;
|
|
32
32
|
function normalizeValueWithProperty(value, property = "") {
|
|
33
33
|
if (!import_constants.isWeb) {
|
|
34
|
+
if (property === "lineHeight") return value;
|
|
34
35
|
if (typeof value === "string" && pxStringRe.test(value)) {
|
|
35
36
|
return Number.parseFloat(value);
|
|
36
37
|
}
|
|
@@ -25,21 +25,18 @@ __export(normalizeValueWithProperty_exports, { normalizeValueWithProperty: () =>
|
|
|
25
25
|
module.exports = __toCommonJS(normalizeValueWithProperty_exports);
|
|
26
26
|
var import_constants = require("@tamagui/constants");
|
|
27
27
|
var import_helpers = require("@tamagui/helpers");
|
|
28
|
-
function _type_of(obj) {
|
|
29
|
-
"@swc/helpers - typeof";
|
|
30
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
31
|
-
}
|
|
32
28
|
var unitfulProps = new Set([
|
|
33
29
|
...Object.keys(import_helpers.stylePropsAll),
|
|
34
30
|
"translateX",
|
|
35
31
|
"translateY"
|
|
36
32
|
].filter(function(key) {
|
|
37
|
-
return !import_helpers.stylePropsUnitless[key];
|
|
33
|
+
return key !== "lineHeight" && !import_helpers.stylePropsUnitless[key];
|
|
38
34
|
}));
|
|
39
35
|
var pxStringRe = /^-?\d*\.?\d+px$/;
|
|
40
36
|
function normalizeValueWithProperty(value) {
|
|
41
37
|
var property = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
42
38
|
if (!import_constants.isWeb) {
|
|
39
|
+
if (property === "lineHeight") return value;
|
|
43
40
|
if (typeof value === "string" && pxStringRe.test(value)) {
|
|
44
41
|
return Number.parseFloat(value);
|
|
45
42
|
}
|
|
@@ -47,7 +44,7 @@ function normalizeValueWithProperty(value) {
|
|
|
47
44
|
}
|
|
48
45
|
if (property !== "" && !unitfulProps.has(property)) return value;
|
|
49
46
|
if (typeof value === "boolean") return value;
|
|
50
|
-
if (value &&
|
|
47
|
+
if (value && typeof value === "object") {
|
|
51
48
|
if (typeof value.__getValue === "function") {
|
|
52
49
|
value = value.__getValue();
|
|
53
50
|
} else {
|