@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createStyledContext.native.js","names":[],"sources":["cjs/helpers/createStyledContext.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar createStyledContext_exports = {};\n__export(createStyledContext_exports, {\n createStyledContext: () => createStyledContext\n});\nmodule.exports = __toCommonJS(createStyledContext_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_react = __toESM(require(\"react\"), 1);\nvar import_isObj = require(\"./isObj\");\nvar import_mergeProps = require(\"./mergeProps\");\nvar import_objectIdentityKey = require(\"./objectIdentityKey\");\
|
|
1
|
+
{"version":3,"file":"createStyledContext.native.js","names":[],"sources":["cjs/helpers/createStyledContext.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar createStyledContext_exports = {};\n__export(createStyledContext_exports, {\n createStyledContext: () => createStyledContext\n});\nmodule.exports = __toCommonJS(createStyledContext_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_react = __toESM(require(\"react\"), 1);\nvar import_isObj = require(\"./isObj\");\nvar import_mergeProps = require(\"./mergeProps\");\nvar import_objectIdentityKey = require(\"./objectIdentityKey\");\nvar createStyledContext = function(defaultValues) {\n \"use no memo\";\n var namespaceOrOptions = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : \"\";\n var namespace = typeof namespaceOrOptions === \"string\" ? namespaceOrOptions : namespaceOrOptions.namespace || \"\";\n var defaultKeys = (0, import_isObj.isPlainObject)(defaultValues) ? Object.keys(defaultValues) : void 0;\n var propKeys = typeof namespaceOrOptions === \"object\" && namespaceOrOptions.keys ? namespaceOrOptions.keys : defaultKeys;\n var OGContext = /* @__PURE__ */ import_react.default.createContext(defaultValues);\n var OGProvider = OGContext.Provider;\n var Context = OGContext;\n var scopedContexts = /* @__PURE__ */ new Map();\n var LastScopeInNamespace = /* @__PURE__ */ import_react.default.createContext(namespace);\n function getOrCreateScopedContext(scope) {\n var ScopedContext = scopedContexts.get(scope);\n if (!ScopedContext) {\n ScopedContext = /* @__PURE__ */ import_react.default.createContext(defaultValues);\n scopedContexts.set(scope, ScopedContext);\n }\n return ScopedContext;\n }\n var getNamespacedScope = function(scope) {\n return namespace ? `${namespace}--${scope}` : scope;\n };\n var Provider = function(param) {\n var { children, scope: scopeIn, __disableMergeDefaultValues, ...values } = param;\n var scope = getNamespacedScope(scopeIn);\n var next = import_react.default.useMemo(function() {\n if (__disableMergeDefaultValues) return values;\n return (0, import_mergeProps.mergeProps)(defaultValues || {}, values);\n }, [\n (0, import_objectIdentityKey.objectIdentityKey)(values)\n ]);\n var ScopedProvider = scope ? getOrCreateScopedContext(scope).Provider : OGProvider;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LastScopeInNamespace.Provider, {\n value: scope,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScopedProvider, {\n value: next,\n children\n })\n });\n };\n var useStyledContext = function() {\n var scopeIn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : \"\";\n var lastScopeInNamespace = import_react.default.useContext(LastScopeInNamespace);\n var scope = namespace ? scopeIn ? getNamespacedScope(scopeIn) : lastScopeInNamespace : scopeIn;\n var context = scope ? getOrCreateScopedContext(scope) : OGContext;\n return import_react.default.useContext(context);\n };\n Context.Provider = Provider;\n Context.props = defaultValues;\n Context.propKeys = propKeys;\n Context.context = OGContext;\n Context.useStyledContext = useStyledContext;\n return Context;\n};\n//# sourceMappingURL=createStyledContext.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,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,KAAK,IAAI;EACxD,OAAO,aAAa,QAAQ,WAAW,OAAO;CAChD;CACA,QAAQ,WAAW;CACnB,QAAQ,QAAQ;CAChB,QAAQ,WAAW;CACnB,QAAQ,UAAU;CAClB,QAAQ,mBAAmB;CAC3B,OAAO;AACT"}
|
|
@@ -19,10 +19,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
19
|
};
|
|
20
20
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
21
|
var expandStyle_exports = {};
|
|
22
|
-
__export(expandStyle_exports, {
|
|
22
|
+
__export(expandStyle_exports, {
|
|
23
|
+
expandStyle: () => expandStyle,
|
|
24
|
+
nativeShorthandLogicals: () => nativeShorthandLogicals
|
|
25
|
+
});
|
|
23
26
|
module.exports = __toCommonJS(expandStyle_exports);
|
|
24
27
|
var import_constants = require("@tamagui/constants");
|
|
25
28
|
var import_config = require("../config.cjs");
|
|
29
|
+
require("./borderComponents.cjs");
|
|
26
30
|
require("./parseBorderShorthand.cjs");
|
|
27
31
|
require("./parseOutlineShorthand.cjs");
|
|
28
32
|
const neg1Flex = [
|
|
@@ -71,6 +75,7 @@ function expandStyle(key, value, styleCompat = (0, import_config.getStyleCompat)
|
|
|
71
75
|
case "writingDirection": return [["direction", value]];
|
|
72
76
|
case "backdropFilter": return [["backdropFilter", value], ["WebkitBackdropFilter", value]];
|
|
73
77
|
}
|
|
78
|
+
if (key in webInlineRenames) return [[webInlineRenames[key], value]];
|
|
74
79
|
if (key in universalExpansions) return universalExpansions[key].map((k) => [k, value]);
|
|
75
80
|
if (key in EXPANSIONS) return EXPANSIONS[key].map((k) => [k, value]);
|
|
76
81
|
}
|
|
@@ -155,3 +160,42 @@ const universalExpansions = {
|
|
|
155
160
|
blockSize: ["height"],
|
|
156
161
|
inlineSize: ["width"]
|
|
157
162
|
};
|
|
163
|
+
const webInlineRenames = {
|
|
164
|
+
paddingStart: "paddingInlineStart",
|
|
165
|
+
paddingEnd: "paddingInlineEnd",
|
|
166
|
+
marginStart: "marginInlineStart",
|
|
167
|
+
marginEnd: "marginInlineEnd",
|
|
168
|
+
borderStartWidth: "borderInlineStartWidth",
|
|
169
|
+
borderEndWidth: "borderInlineEndWidth",
|
|
170
|
+
borderStartColor: "borderInlineStartColor",
|
|
171
|
+
borderEndColor: "borderInlineEndColor",
|
|
172
|
+
borderStartStyle: "borderInlineStartStyle",
|
|
173
|
+
borderEndStyle: "borderInlineEndStyle",
|
|
174
|
+
borderTopStartRadius: "borderStartStartRadius",
|
|
175
|
+
borderTopEndRadius: "borderStartEndRadius",
|
|
176
|
+
borderBottomStartRadius: "borderEndStartRadius",
|
|
177
|
+
borderBottomEndRadius: "borderEndEndRadius",
|
|
178
|
+
start: "insetInlineStart",
|
|
179
|
+
end: "insetInlineEnd"
|
|
180
|
+
};
|
|
181
|
+
const paddingLogicals = ["paddingStart", "paddingEnd"];
|
|
182
|
+
const marginLogicals = ["marginStart", "marginEnd"];
|
|
183
|
+
const nativeShorthandLogicals = {
|
|
184
|
+
padding: paddingLogicals,
|
|
185
|
+
paddingHorizontal: paddingLogicals,
|
|
186
|
+
margin: marginLogicals,
|
|
187
|
+
marginHorizontal: marginLogicals,
|
|
188
|
+
borderRadius: [
|
|
189
|
+
"borderTopStartRadius",
|
|
190
|
+
"borderTopEndRadius",
|
|
191
|
+
"borderBottomStartRadius",
|
|
192
|
+
"borderBottomEndRadius",
|
|
193
|
+
"borderStartStartRadius",
|
|
194
|
+
"borderStartEndRadius",
|
|
195
|
+
"borderEndStartRadius",
|
|
196
|
+
"borderEndEndRadius"
|
|
197
|
+
],
|
|
198
|
+
borderWidth: ["borderStartWidth", "borderEndWidth"],
|
|
199
|
+
borderColor: ["borderStartColor", "borderEndColor"],
|
|
200
|
+
gap: ["rowGap", "columnGap"]
|
|
201
|
+
};
|
|
@@ -21,10 +21,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
21
21
|
};
|
|
22
22
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
23
|
var expandStyle_exports = {};
|
|
24
|
-
__export(expandStyle_exports, {
|
|
24
|
+
__export(expandStyle_exports, {
|
|
25
|
+
expandStyle: () => expandStyle,
|
|
26
|
+
nativeShorthandLogicals: () => nativeShorthandLogicals
|
|
27
|
+
});
|
|
25
28
|
module.exports = __toCommonJS(expandStyle_exports);
|
|
26
29
|
var import_constants = require("@tamagui/constants");
|
|
27
30
|
var import_config = require("../config.native.js");
|
|
31
|
+
var import_borderComponents = require("./borderComponents.native.js");
|
|
28
32
|
var import_parseBorderShorthand = require("./parseBorderShorthand.native.js");
|
|
29
33
|
var import_parseOutlineShorthand = require("./parseOutlineShorthand.native.js");
|
|
30
34
|
var _loop = function(parent2) {
|
|
@@ -37,10 +41,16 @@ var _loop = function(parent2) {
|
|
|
37
41
|
};
|
|
38
42
|
function expandStyle(key, value) {
|
|
39
43
|
arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : (0, import_config.getStyleCompat)();
|
|
40
|
-
if (import_constants.isAndroid && key === "elevationAndroid") return [["elevation", value]];
|
|
41
44
|
switch (key) {
|
|
42
45
|
case "objectFit": return [["resizeMode", resizeModeMap[value] || "cover"]];
|
|
43
46
|
case "verticalAlign": return [["textAlignVertical", verticalAlignMap[value] || "auto"]];
|
|
47
|
+
case "direction": return [["direction", value], ["writingDirection", directionMap[value] || "auto"]];
|
|
48
|
+
case "gap":
|
|
49
|
+
if (typeof value === "string") {
|
|
50
|
+
var parts = (0, import_borderComponents.splitComponents)(value);
|
|
51
|
+
if (parts.length === 2) return [["rowGap", parts[0]], ["columnGap", parts[1]]];
|
|
52
|
+
}
|
|
53
|
+
return;
|
|
44
54
|
case "position":
|
|
45
55
|
if (value === "fixed" || value === "sticky") return [["position", "absolute"]];
|
|
46
56
|
return;
|
|
@@ -86,6 +96,11 @@ var verticalAlignMap = {
|
|
|
86
96
|
bottom: "bottom",
|
|
87
97
|
auto: "auto"
|
|
88
98
|
};
|
|
99
|
+
var directionMap = {
|
|
100
|
+
ltr: "ltr",
|
|
101
|
+
rtl: "rtl",
|
|
102
|
+
inherit: "auto"
|
|
103
|
+
};
|
|
89
104
|
var all = [
|
|
90
105
|
"Top",
|
|
91
106
|
"Right",
|
|
@@ -183,3 +198,24 @@ var nativeInlineExpansions = {
|
|
|
183
198
|
insetInlineStart: ["left"],
|
|
184
199
|
insetInlineEnd: ["right"]
|
|
185
200
|
};
|
|
201
|
+
var paddingLogicals = ["paddingStart", "paddingEnd"];
|
|
202
|
+
var marginLogicals = ["marginStart", "marginEnd"];
|
|
203
|
+
var nativeShorthandLogicals = {
|
|
204
|
+
padding: paddingLogicals,
|
|
205
|
+
paddingHorizontal: paddingLogicals,
|
|
206
|
+
margin: marginLogicals,
|
|
207
|
+
marginHorizontal: marginLogicals,
|
|
208
|
+
borderRadius: [
|
|
209
|
+
"borderTopStartRadius",
|
|
210
|
+
"borderTopEndRadius",
|
|
211
|
+
"borderBottomStartRadius",
|
|
212
|
+
"borderBottomEndRadius",
|
|
213
|
+
"borderStartStartRadius",
|
|
214
|
+
"borderStartEndRadius",
|
|
215
|
+
"borderEndStartRadius",
|
|
216
|
+
"borderEndEndRadius"
|
|
217
|
+
],
|
|
218
|
+
borderWidth: ["borderStartWidth", "borderEndWidth"],
|
|
219
|
+
borderColor: ["borderStartColor", "borderEndColor"],
|
|
220
|
+
gap: ["rowGap", "columnGap"]
|
|
221
|
+
};
|
|
@@ -21,10 +21,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
21
21
|
};
|
|
22
22
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
23
|
var expandStyle_exports = {};
|
|
24
|
-
__export(expandStyle_exports, {
|
|
24
|
+
__export(expandStyle_exports, {
|
|
25
|
+
expandStyle: () => expandStyle,
|
|
26
|
+
nativeShorthandLogicals: () => nativeShorthandLogicals
|
|
27
|
+
});
|
|
25
28
|
module.exports = __toCommonJS(expandStyle_exports);
|
|
26
29
|
var import_constants = require("@tamagui/constants");
|
|
27
30
|
var import_config = require("../config.native.js");
|
|
31
|
+
var import_borderComponents = require("./borderComponents.native.js");
|
|
28
32
|
var import_parseBorderShorthand = require("./parseBorderShorthand.native.js");
|
|
29
33
|
var import_parseOutlineShorthand = require("./parseOutlineShorthand.native.js");
|
|
30
34
|
var _loop = function(parent2) {
|
|
@@ -37,10 +41,16 @@ var _loop = function(parent2) {
|
|
|
37
41
|
};
|
|
38
42
|
function expandStyle(key, value) {
|
|
39
43
|
arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : (0, import_config.getStyleCompat)();
|
|
40
|
-
if (import_constants.isAndroid && key === "elevationAndroid") return [["elevation", value]];
|
|
41
44
|
switch (key) {
|
|
42
45
|
case "objectFit": return [["resizeMode", resizeModeMap[value] || "cover"]];
|
|
43
46
|
case "verticalAlign": return [["textAlignVertical", verticalAlignMap[value] || "auto"]];
|
|
47
|
+
case "direction": return [["direction", value], ["writingDirection", directionMap[value] || "auto"]];
|
|
48
|
+
case "gap":
|
|
49
|
+
if (typeof value === "string") {
|
|
50
|
+
var parts = (0, import_borderComponents.splitComponents)(value);
|
|
51
|
+
if (parts.length === 2) return [["rowGap", parts[0]], ["columnGap", parts[1]]];
|
|
52
|
+
}
|
|
53
|
+
return;
|
|
44
54
|
case "position":
|
|
45
55
|
if (value === "fixed" || value === "sticky") return [["position", "absolute"]];
|
|
46
56
|
return;
|
|
@@ -86,6 +96,11 @@ var verticalAlignMap = {
|
|
|
86
96
|
bottom: "bottom",
|
|
87
97
|
auto: "auto"
|
|
88
98
|
};
|
|
99
|
+
var directionMap = {
|
|
100
|
+
ltr: "ltr",
|
|
101
|
+
rtl: "rtl",
|
|
102
|
+
inherit: "auto"
|
|
103
|
+
};
|
|
89
104
|
var all = [
|
|
90
105
|
"Top",
|
|
91
106
|
"Right",
|
|
@@ -183,5 +198,26 @@ var nativeInlineExpansions = {
|
|
|
183
198
|
insetInlineStart: ["left"],
|
|
184
199
|
insetInlineEnd: ["right"]
|
|
185
200
|
};
|
|
201
|
+
var paddingLogicals = ["paddingStart", "paddingEnd"];
|
|
202
|
+
var marginLogicals = ["marginStart", "marginEnd"];
|
|
203
|
+
var nativeShorthandLogicals = {
|
|
204
|
+
padding: paddingLogicals,
|
|
205
|
+
paddingHorizontal: paddingLogicals,
|
|
206
|
+
margin: marginLogicals,
|
|
207
|
+
marginHorizontal: marginLogicals,
|
|
208
|
+
borderRadius: [
|
|
209
|
+
"borderTopStartRadius",
|
|
210
|
+
"borderTopEndRadius",
|
|
211
|
+
"borderBottomStartRadius",
|
|
212
|
+
"borderBottomEndRadius",
|
|
213
|
+
"borderStartStartRadius",
|
|
214
|
+
"borderStartEndRadius",
|
|
215
|
+
"borderEndStartRadius",
|
|
216
|
+
"borderEndEndRadius"
|
|
217
|
+
],
|
|
218
|
+
borderWidth: ["borderStartWidth", "borderEndWidth"],
|
|
219
|
+
borderColor: ["borderStartColor", "borderEndColor"],
|
|
220
|
+
gap: ["rowGap", "columnGap"]
|
|
221
|
+
};
|
|
186
222
|
|
|
187
223
|
//# sourceMappingURL=expandStyle.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expandStyle.native.js","names":[],"sources":["cjs/helpers/expandStyle.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, all2) => {\n\tfor (var name in all2) __defProp(target, name, {\n\t\tget: all2[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 expandStyle_exports = {};\n__export(expandStyle_exports, { expandStyle: () => expandStyle });\nmodule.exports = __toCommonJS(expandStyle_exports);\nvar import_constants = require(\"@tamagui/constants\");\nvar import_config = require(\"../config\");\nvar import_parseBorderShorthand = require(\"./parseBorderShorthand\");\nvar import_parseOutlineShorthand = require(\"./parseOutlineShorthand\");\nvar _loop = function(parent2) {\n\tvar _exec;\n\tvar _exec_index;\n\tvar prefix = parent2.slice(0, (_exec_index = (_exec = /[A-Z]/.exec(parent2)) === null || _exec === void 0 ? void 0 : _exec.index) !== null && _exec_index !== void 0 ? _exec_index : parent2.length);\n\tEXPANSIONS[parent2] = EXPANSIONS[parent2].map(function(k) {\n\t\treturn `${prefix}${k}`;\n\t});\n};\nfunction expandStyle(key, value) {\n\targuments.length > 2 && arguments[2] !== void 0 ? arguments[2] : (0, import_config.getStyleCompat)();\n\tif (import_constants.isAndroid && key === \"elevationAndroid\") return [[\"elevation\", value]];\n\tswitch (key) {\n\t\tcase \"objectFit\": return [[\"resizeMode\", resizeModeMap[value] || \"cover\"]];\n\t\tcase \"verticalAlign\": return [[\"textAlignVertical\", verticalAlignMap[value] || \"auto\"]];\n\t\tcase \"position\":\n\t\t\tif (value === \"fixed\" || value === \"sticky\") return [[\"position\", \"absolute\"]];\n\t\t\treturn;\n\t\tcase \"visibility\":\n\t\t\tif (value === \"hidden\") return [[\"opacity\", 0], [\"pointerEvents\", \"none\"]];\n\t\t\treturn [];\n\t\tcase \"backgroundImage\":\n\t\t\tif (typeof value === \"string\") return;\n\t\t\treturn [[\"experimental_backgroundImage\", value]];\n\t\tcase \"border\":\n\t\t\tif (typeof value === \"string\") {\n\t\t\t\tvar parsed = (0, import_parseBorderShorthand.parseBorderShorthand)(value);\n\t\t\t\tif (parsed) return parsed;\n\t\t\t}\n\t\t\treturn;\n\t\tcase \"outline\":\n\t\t\tif (typeof value === \"string\") {\n\t\t\t\tvar parsed1 = (0, import_parseOutlineShorthand.parseOutlineShorthand)(value);\n\t\t\t\tif (parsed1) return parsed1;\n\t\t\t}\n\t\t\treturn;\n\t}\n\tif (key in nativeInlineExpansions) return nativeInlineExpansions[key].map(function(k) {\n\t\treturn [k, value];\n\t});\n\tif (key in universalExpansions) return universalExpansions[key].map(function(k) {\n\t\treturn [k, value];\n\t});\n\tif (key in EXPANSIONS) return EXPANSIONS[key].map(function(k) {\n\t\treturn [k, value];\n\t});\n}\nvar resizeModeMap = {\n\tfill: \"stretch\",\n\tnone: \"center\",\n\t\"scale-down\": \"contain\",\n\tcontain: \"contain\",\n\tcover: \"cover\"\n};\nvar verticalAlignMap = {\n\ttop: \"top\",\n\tmiddle: \"center\",\n\tbottom: \"bottom\",\n\tauto: \"auto\"\n};\nvar all = [\n\t\"Top\",\n\t\"Right\",\n\t\"Bottom\",\n\t\"Left\"\n];\nvar horiz = [\"Right\", \"Left\"];\nvar vert = [\"Top\", \"Bottom\"];\nvar xy = [\"X\", \"Y\"];\nvar EXPANSIONS = {\n\tborderColor: [\n\t\t\"TopColor\",\n\t\t\"RightColor\",\n\t\t\"BottomColor\",\n\t\t\"LeftColor\"\n\t],\n\tborderRadius: [\n\t\t\"TopLeftRadius\",\n\t\t\"TopRightRadius\",\n\t\t\"BottomRightRadius\",\n\t\t\"BottomLeftRadius\"\n\t],\n\tborderWidth: [\n\t\t\"TopWidth\",\n\t\t\"RightWidth\",\n\t\t\"BottomWidth\",\n\t\t\"LeftWidth\"\n\t],\n\tmargin: all,\n\tmarginHorizontal: horiz,\n\tmarginVertical: vert,\n\tpadding: all,\n\tpaddingHorizontal: horiz,\n\tpaddingVertical: vert,\n\t...import_constants.isWeb && {\n\t\tborderStyle: [\n\t\t\t\"TopStyle\",\n\t\t\t\"RightStyle\",\n\t\t\t\"BottomStyle\",\n\t\t\t\"LeftStyle\"\n\t\t],\n\t\toverflow: xy,\n\t\toverscrollBehavior: xy\n\t}\n};\nfor (var parent in EXPANSIONS) _loop(parent);\nvar universalExpansions = {\n\tinset: [\n\t\t\"top\",\n\t\t\"right\",\n\t\t\"bottom\",\n\t\t\"left\"\n\t],\n\tinsetBlock: [\"top\", \"bottom\"],\n\tinsetBlockStart: [\"top\"],\n\tinsetBlockEnd: [\"bottom\"],\n\tmarginBlock: [\"marginTop\", \"marginBottom\"],\n\tmarginBlockStart: [\"marginTop\"],\n\tmarginBlockEnd: [\"marginBottom\"],\n\tpaddingBlock: [\"paddingTop\", \"paddingBottom\"],\n\tpaddingBlockStart: [\"paddingTop\"],\n\tpaddingBlockEnd: [\"paddingBottom\"],\n\tborderBlockColor: [\"borderTopColor\", \"borderBottomColor\"],\n\tborderBlockWidth: [\"borderTopWidth\", \"borderBottomWidth\"],\n\tborderBlockStyle: [\"borderTopStyle\", \"borderBottomStyle\"],\n\tborderBlockStartColor: [\"borderTopColor\"],\n\tborderBlockEndColor: [\"borderBottomColor\"],\n\tborderBlockStartWidth: [\"borderTopWidth\"],\n\tborderBlockEndWidth: [\"borderBottomWidth\"],\n\tborderBlockStartStyle: [\"borderTopStyle\"],\n\tborderBlockEndStyle: [\"borderBottomStyle\"],\n\tminBlockSize: [\"minHeight\"],\n\tmaxBlockSize: [\"maxHeight\"],\n\tminInlineSize: [\"minWidth\"],\n\tmaxInlineSize: [\"maxWidth\"],\n\tblockSize: [\"height\"],\n\tinlineSize: [\"width\"]\n};\nvar nativeInlineExpansions = {\n\tborderInlineColor: [\"borderEndColor\", \"borderStartColor\"],\n\tborderInlineWidth: [\"borderEndWidth\", \"borderStartWidth\"],\n\tborderInlineStyle: [\"borderEndStyle\", \"borderStartStyle\"],\n\tborderInlineStartColor: [\"borderStartColor\"],\n\tborderInlineEndColor: [\"borderEndColor\"],\n\tborderInlineStartWidth: [\"borderStartWidth\"],\n\tborderInlineEndWidth: [\"borderEndWidth\"],\n\tborderInlineStartStyle: [\"borderStartStyle\"],\n\tborderInlineEndStyle: [\"borderEndStyle\"],\n\tmarginInline: [\"marginEnd\", \"marginStart\"],\n\tmarginInlineStart: [\"marginStart\"],\n\tmarginInlineEnd: [\"marginEnd\"],\n\tpaddingInline: [\"paddingEnd\", \"paddingStart\"],\n\tpaddingInlineStart: [\"paddingStart\"],\n\tpaddingInlineEnd: [\"paddingEnd\"],\n\tinsetInlineStart: [\"left\"],\n\tinsetInlineEnd: [\"right\"]\n};\n//# sourceMappingURL=expandStyle.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,SAAS;CAChC,KAAK,IAAI,QAAQ,MAAM,UAAU,QAAQ,MAAM;EAC9C,KAAK,KAAK;EACV,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,sBAAsB,CAAC;AAC3B,SAAS,qBAAqB,EAAE,mBAAmB,YAAY,CAAC;AAChE,OAAO,UAAU,aAAa,mBAAmB;AACjD,IAAI,mBAAmB,QAAQ,oBAAoB;AACnD,IAAI,gBAAgB,QAAQ,qBAAW;AACvC,IAAI,8BAA8B,QAAQ,kCAAwB;AAClE,IAAI,+BAA+B,QAAQ,mCAAyB;AACpE,IAAI,QAAQ,SAAS,SAAS;CAC7B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,YAAY;CAChC,iBAAiB,CAAC,eAAe;CACjC,kBAAkB,CAAC,kBAAkB,mBAAmB;CACxD,kBAAkB,CAAC,kBAAkB,mBAAmB;CACxD,kBAAkB,CAAC,kBAAkB,mBAAmB;CACxD,uBAAuB,CAAC,gBAAgB;CACxC,qBAAqB,CAAC,mBAAmB;CACzC,uBAAuB,CAAC,gBAAgB;CACxC,qBAAqB,CAAC,mBAAmB;CACzC,uBAAuB,CAAC,gBAAgB;CACxC,qBAAqB,CAAC,mBAAmB;CACzC,cAAc,CAAC,WAAW;CAC1B,cAAc,CAAC,WAAW;CAC1B,eAAe,CAAC,UAAU;CAC1B,eAAe,CAAC,UAAU;CAC1B,WAAW,CAAC,QAAQ;CACpB,YAAY,CAAC,OAAO;AACrB;AACA,IAAI,yBAAyB;CAC5B,mBAAmB,CAAC,kBAAkB,kBAAkB;CACxD,mBAAmB,CAAC,kBAAkB,kBAAkB;CACxD,mBAAmB,CAAC,kBAAkB,kBAAkB;CACxD,wBAAwB,CAAC,kBAAkB;CAC3C,sBAAsB,CAAC,gBAAgB;CACvC,wBAAwB,CAAC,kBAAkB;CAC3C,sBAAsB,CAAC,gBAAgB;CACvC,wBAAwB,CAAC,kBAAkB;CAC3C,sBAAsB,CAAC,gBAAgB;CACvC,cAAc,CAAC,aAAa,aAAa;CACzC,mBAAmB,CAAC,aAAa;CACjC,iBAAiB,CAAC,WAAW;CAC7B,eAAe,CAAC,cAAc,cAAc;CAC5C,oBAAoB,CAAC,cAAc;CACnC,kBAAkB,CAAC,YAAY;CAC/B,kBAAkB,CAAC,MAAM;CACzB,gBAAgB,CAAC,OAAO;AACzB"}
|
|
1
|
+
{"version":3,"file":"expandStyle.native.js","names":[],"sources":["cjs/helpers/expandStyle.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, all2) => {\n\tfor (var name in all2) __defProp(target, name, {\n\t\tget: all2[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 expandStyle_exports = {};\n__export(expandStyle_exports, {\n\texpandStyle: () => expandStyle,\n\tnativeShorthandLogicals: () => nativeShorthandLogicals\n});\nmodule.exports = __toCommonJS(expandStyle_exports);\nvar import_constants = require(\"@tamagui/constants\");\nvar import_config = require(\"../config\");\nvar import_borderComponents = require(\"./borderComponents\");\nvar import_parseBorderShorthand = require(\"./parseBorderShorthand\");\nvar import_parseOutlineShorthand = require(\"./parseOutlineShorthand\");\nvar _loop = function(parent2) {\n\tvar _exec;\n\tvar _exec_index;\n\tvar prefix = parent2.slice(0, (_exec_index = (_exec = /[A-Z]/.exec(parent2)) === null || _exec === void 0 ? void 0 : _exec.index) !== null && _exec_index !== void 0 ? _exec_index : parent2.length);\n\tEXPANSIONS[parent2] = EXPANSIONS[parent2].map(function(k) {\n\t\treturn `${prefix}${k}`;\n\t});\n};\nfunction expandStyle(key, value) {\n\targuments.length > 2 && arguments[2] !== void 0 ? arguments[2] : (0, import_config.getStyleCompat)();\n\tswitch (key) {\n\t\tcase \"objectFit\": return [[\"resizeMode\", resizeModeMap[value] || \"cover\"]];\n\t\tcase \"verticalAlign\": return [[\"textAlignVertical\", verticalAlignMap[value] || \"auto\"]];\n\t\tcase \"direction\": return [[\"direction\", value], [\"writingDirection\", directionMap[value] || \"auto\"]];\n\t\tcase \"gap\":\n\t\t\tif (typeof value === \"string\") {\n\t\t\t\tvar parts = (0, import_borderComponents.splitComponents)(value);\n\t\t\t\tif (parts.length === 2) return [[\"rowGap\", parts[0]], [\"columnGap\", parts[1]]];\n\t\t\t}\n\t\t\treturn;\n\t\tcase \"position\":\n\t\t\tif (value === \"fixed\" || value === \"sticky\") return [[\"position\", \"absolute\"]];\n\t\t\treturn;\n\t\tcase \"visibility\":\n\t\t\tif (value === \"hidden\") return [[\"opacity\", 0], [\"pointerEvents\", \"none\"]];\n\t\t\treturn [];\n\t\tcase \"backgroundImage\":\n\t\t\tif (typeof value === \"string\") return;\n\t\t\treturn [[\"experimental_backgroundImage\", value]];\n\t\tcase \"border\":\n\t\t\tif (typeof value === \"string\") {\n\t\t\t\tvar parsed = (0, import_parseBorderShorthand.parseBorderShorthand)(value);\n\t\t\t\tif (parsed) return parsed;\n\t\t\t}\n\t\t\treturn;\n\t\tcase \"outline\":\n\t\t\tif (typeof value === \"string\") {\n\t\t\t\tvar parsed1 = (0, import_parseOutlineShorthand.parseOutlineShorthand)(value);\n\t\t\t\tif (parsed1) return parsed1;\n\t\t\t}\n\t\t\treturn;\n\t}\n\tif (key in nativeInlineExpansions) return nativeInlineExpansions[key].map(function(k) {\n\t\treturn [k, value];\n\t});\n\tif (key in universalExpansions) return universalExpansions[key].map(function(k) {\n\t\treturn [k, value];\n\t});\n\tif (key in EXPANSIONS) return EXPANSIONS[key].map(function(k) {\n\t\treturn [k, value];\n\t});\n}\nvar resizeModeMap = {\n\tfill: \"stretch\",\n\tnone: \"center\",\n\t\"scale-down\": \"contain\",\n\tcontain: \"contain\",\n\tcover: \"cover\"\n};\nvar verticalAlignMap = {\n\ttop: \"top\",\n\tmiddle: \"center\",\n\tbottom: \"bottom\",\n\tauto: \"auto\"\n};\nvar directionMap = {\n\tltr: \"ltr\",\n\trtl: \"rtl\",\n\tinherit: \"auto\"\n};\nvar all = [\n\t\"Top\",\n\t\"Right\",\n\t\"Bottom\",\n\t\"Left\"\n];\nvar horiz = [\"Right\", \"Left\"];\nvar vert = [\"Top\", \"Bottom\"];\nvar xy = [\"X\", \"Y\"];\nvar EXPANSIONS = {\n\tborderColor: [\n\t\t\"TopColor\",\n\t\t\"RightColor\",\n\t\t\"BottomColor\",\n\t\t\"LeftColor\"\n\t],\n\tborderRadius: [\n\t\t\"TopLeftRadius\",\n\t\t\"TopRightRadius\",\n\t\t\"BottomRightRadius\",\n\t\t\"BottomLeftRadius\"\n\t],\n\tborderWidth: [\n\t\t\"TopWidth\",\n\t\t\"RightWidth\",\n\t\t\"BottomWidth\",\n\t\t\"LeftWidth\"\n\t],\n\tmargin: all,\n\tmarginHorizontal: horiz,\n\tmarginVertical: vert,\n\tpadding: all,\n\tpaddingHorizontal: horiz,\n\tpaddingVertical: vert,\n\t...import_constants.isWeb && {\n\t\tborderStyle: [\n\t\t\t\"TopStyle\",\n\t\t\t\"RightStyle\",\n\t\t\t\"BottomStyle\",\n\t\t\t\"LeftStyle\"\n\t\t],\n\t\toverflow: xy,\n\t\toverscrollBehavior: xy\n\t}\n};\nfor (var parent in EXPANSIONS) _loop(parent);\nvar universalExpansions = {\n\tinset: [\n\t\t\"top\",\n\t\t\"right\",\n\t\t\"bottom\",\n\t\t\"left\"\n\t],\n\tinsetBlock: [\"top\", \"bottom\"],\n\tinsetBlockStart: [\"top\"],\n\tinsetBlockEnd: [\"bottom\"],\n\tmarginBlock: [\"marginTop\", \"marginBottom\"],\n\tmarginBlockStart: [\"marginTop\"],\n\tmarginBlockEnd: [\"marginBottom\"],\n\tpaddingBlock: [\"paddingTop\", \"paddingBottom\"],\n\tpaddingBlockStart: [\"paddingTop\"],\n\tpaddingBlockEnd: [\"paddingBottom\"],\n\tborderBlockColor: [\"borderTopColor\", \"borderBottomColor\"],\n\tborderBlockWidth: [\"borderTopWidth\", \"borderBottomWidth\"],\n\tborderBlockStyle: [\"borderTopStyle\", \"borderBottomStyle\"],\n\tborderBlockStartColor: [\"borderTopColor\"],\n\tborderBlockEndColor: [\"borderBottomColor\"],\n\tborderBlockStartWidth: [\"borderTopWidth\"],\n\tborderBlockEndWidth: [\"borderBottomWidth\"],\n\tborderBlockStartStyle: [\"borderTopStyle\"],\n\tborderBlockEndStyle: [\"borderBottomStyle\"],\n\tminBlockSize: [\"minHeight\"],\n\tmaxBlockSize: [\"maxHeight\"],\n\tminInlineSize: [\"minWidth\"],\n\tmaxInlineSize: [\"maxWidth\"],\n\tblockSize: [\"height\"],\n\tinlineSize: [\"width\"]\n};\nvar nativeInlineExpansions = {\n\tborderInlineColor: [\"borderEndColor\", \"borderStartColor\"],\n\tborderInlineWidth: [\"borderEndWidth\", \"borderStartWidth\"],\n\tborderInlineStyle: [\"borderEndStyle\", \"borderStartStyle\"],\n\tborderInlineStartColor: [\"borderStartColor\"],\n\tborderInlineEndColor: [\"borderEndColor\"],\n\tborderInlineStartWidth: [\"borderStartWidth\"],\n\tborderInlineEndWidth: [\"borderEndWidth\"],\n\tborderInlineStartStyle: [\"borderStartStyle\"],\n\tborderInlineEndStyle: [\"borderEndStyle\"],\n\tmarginInline: [\"marginEnd\", \"marginStart\"],\n\tmarginInlineStart: [\"marginStart\"],\n\tmarginInlineEnd: [\"marginEnd\"],\n\tpaddingInline: [\"paddingEnd\", \"paddingStart\"],\n\tpaddingInlineStart: [\"paddingStart\"],\n\tpaddingInlineEnd: [\"paddingEnd\"],\n\tinsetInlineStart: [\"left\"],\n\tinsetInlineEnd: [\"right\"]\n};\nvar paddingLogicals = [\"paddingStart\", \"paddingEnd\"];\nvar marginLogicals = [\"marginStart\", \"marginEnd\"];\nvar nativeShorthandLogicals = {\n\tpadding: paddingLogicals,\n\tpaddingHorizontal: paddingLogicals,\n\tmargin: marginLogicals,\n\tmarginHorizontal: marginLogicals,\n\tborderRadius: [\n\t\t\"borderTopStartRadius\",\n\t\t\"borderTopEndRadius\",\n\t\t\"borderBottomStartRadius\",\n\t\t\"borderBottomEndRadius\",\n\t\t\"borderStartStartRadius\",\n\t\t\"borderStartEndRadius\",\n\t\t\"borderEndStartRadius\",\n\t\t\"borderEndEndRadius\"\n\t],\n\tborderWidth: [\"borderStartWidth\", \"borderEndWidth\"],\n\tborderColor: [\"borderStartColor\", \"borderEndColor\"],\n\tgap: [\"rowGap\", \"columnGap\"]\n};\n//# sourceMappingURL=expandStyle.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,SAAS;CAChC,KAAK,IAAI,QAAQ,MAAM,UAAU,QAAQ,MAAM;EAC9C,KAAK,KAAK;EACV,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,sBAAsB,CAAC;AAC3B,SAAS,qBAAqB;CAC7B,mBAAmB;CACnB,+BAA+B;AAChC,CAAC;AACD,OAAO,UAAU,aAAa,mBAAmB;AACjD,IAAI,mBAAmB,QAAQ,oBAAoB;AACnD,IAAI,gBAAgB,QAAQ,qBAAW;AACvC,IAAI,0BAA0B,QAAQ,8BAAoB;AAC1D,IAAI,8BAA8B,QAAQ,kCAAwB;AAClE,IAAI,+BAA+B,QAAQ,mCAAyB;AACpE,IAAI,QAAQ,SAAS,SAAS;CAC7B,IAAI;CACJ,IAAI;CACJ,IAAI,SAAS,QAAQ,MAAM,IAAI,eAAe,QAAQ,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kBAAkB,CAAC,gBAAgB,YAAY;AACnD,IAAI,iBAAiB,CAAC,eAAe,WAAW;AAChD,IAAI,0BAA0B;CAC7B,SAAS;CACT,mBAAmB;CACnB,QAAQ;CACR,kBAAkB;CAClB,cAAc;EACb;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD;CACA,aAAa,CAAC,oBAAoB,gBAAgB;CAClD,aAAa,CAAC,oBAAoB,gBAAgB;CAClD,KAAK,CAAC,UAAU,WAAW;AAC5B"}
|
|
@@ -24,8 +24,14 @@ module.exports = __toCommonJS(expandStyles_exports);
|
|
|
24
24
|
var import_constants = require("@tamagui/constants");
|
|
25
25
|
var import_normalizeShadow = require("./normalizeShadow.cjs");
|
|
26
26
|
function fixStyles(style) {
|
|
27
|
-
if (style.shadowRadius != null || style.shadowColor || style.shadowOpacity != null || style.shadowOffset)
|
|
28
|
-
|
|
27
|
+
if (style.shadowRadius != null || style.shadowColor || style.shadowOpacity != null || style.shadowOffset) {
|
|
28
|
+
Object.assign(style, (0, import_normalizeShadow.normalizeShadow)(style));
|
|
29
|
+
}
|
|
30
|
+
for (const key in borderDefaults) {
|
|
31
|
+
if (key in style) {
|
|
32
|
+
style[borderDefaults[key]] ||= "solid";
|
|
33
|
+
}
|
|
34
|
+
}
|
|
29
35
|
}
|
|
30
36
|
const nativeStyle = import_constants.isWeb ? null : "borderStyle";
|
|
31
37
|
const borderDefaults = {
|
|
@@ -33,5 +39,11 @@ const borderDefaults = {
|
|
|
33
39
|
borderBottomWidth: nativeStyle || "borderBottomStyle",
|
|
34
40
|
borderTopWidth: nativeStyle || "borderTopStyle",
|
|
35
41
|
borderLeftWidth: nativeStyle || "borderLeftStyle",
|
|
36
|
-
borderRightWidth: nativeStyle || "borderRightStyle"
|
|
42
|
+
borderRightWidth: nativeStyle || "borderRightStyle",
|
|
43
|
+
borderBlockWidth: nativeStyle || "borderBlockStyle",
|
|
44
|
+
borderBlockStartWidth: nativeStyle || "borderBlockStartStyle",
|
|
45
|
+
borderBlockEndWidth: nativeStyle || "borderBlockEndStyle",
|
|
46
|
+
borderInlineWidth: nativeStyle || "borderInlineStyle",
|
|
47
|
+
borderInlineStartWidth: nativeStyle || "borderInlineStartStyle",
|
|
48
|
+
borderInlineEndWidth: nativeStyle || "borderInlineEndStyle"
|
|
37
49
|
};
|
|
@@ -26,14 +26,14 @@ module.exports = __toCommonJS(expandStyles_exports);
|
|
|
26
26
|
var import_constants = require("@tamagui/constants");
|
|
27
27
|
var import_normalizeShadow = require("./normalizeShadow.native.js");
|
|
28
28
|
function fixStyles(style) {
|
|
29
|
-
if (
|
|
30
|
-
style
|
|
31
|
-
delete style.elevationAndroid;
|
|
29
|
+
if (style.shadowRadius != null || style.shadowColor || style.shadowOpacity != null || style.shadowOffset) {
|
|
30
|
+
Object.assign(style, (0, import_normalizeShadow.normalizeShadow)(style));
|
|
32
31
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
for (var key in borderDefaults) {
|
|
33
|
+
if (key in style) {
|
|
34
|
+
var _style, _borderDefaults_key;
|
|
35
|
+
(_style = style)[_borderDefaults_key = borderDefaults[key]] || (_style[_borderDefaults_key] = "solid");
|
|
36
|
+
}
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
var nativeStyle = import_constants.isWeb ? null : "borderStyle";
|
|
@@ -42,5 +42,11 @@ var borderDefaults = {
|
|
|
42
42
|
borderBottomWidth: nativeStyle || "borderBottomStyle",
|
|
43
43
|
borderTopWidth: nativeStyle || "borderTopStyle",
|
|
44
44
|
borderLeftWidth: nativeStyle || "borderLeftStyle",
|
|
45
|
-
borderRightWidth: nativeStyle || "borderRightStyle"
|
|
45
|
+
borderRightWidth: nativeStyle || "borderRightStyle",
|
|
46
|
+
borderBlockWidth: nativeStyle || "borderBlockStyle",
|
|
47
|
+
borderBlockStartWidth: nativeStyle || "borderBlockStartStyle",
|
|
48
|
+
borderBlockEndWidth: nativeStyle || "borderBlockEndStyle",
|
|
49
|
+
borderInlineWidth: nativeStyle || "borderInlineStyle",
|
|
50
|
+
borderInlineStartWidth: nativeStyle || "borderInlineStartStyle",
|
|
51
|
+
borderInlineEndWidth: nativeStyle || "borderInlineEndStyle"
|
|
46
52
|
};
|
|
@@ -26,14 +26,14 @@ module.exports = __toCommonJS(expandStyles_exports);
|
|
|
26
26
|
var import_constants = require("@tamagui/constants");
|
|
27
27
|
var import_normalizeShadow = require("./normalizeShadow.native.js");
|
|
28
28
|
function fixStyles(style) {
|
|
29
|
-
if (
|
|
30
|
-
style
|
|
31
|
-
delete style.elevationAndroid;
|
|
29
|
+
if (style.shadowRadius != null || style.shadowColor || style.shadowOpacity != null || style.shadowOffset) {
|
|
30
|
+
Object.assign(style, (0, import_normalizeShadow.normalizeShadow)(style));
|
|
32
31
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
for (var key in borderDefaults) {
|
|
33
|
+
if (key in style) {
|
|
34
|
+
var _style, _borderDefaults_key;
|
|
35
|
+
(_style = style)[_borderDefaults_key = borderDefaults[key]] || (_style[_borderDefaults_key] = "solid");
|
|
36
|
+
}
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
var nativeStyle = import_constants.isWeb ? null : "borderStyle";
|
|
@@ -42,7 +42,13 @@ var borderDefaults = {
|
|
|
42
42
|
borderBottomWidth: nativeStyle || "borderBottomStyle",
|
|
43
43
|
borderTopWidth: nativeStyle || "borderTopStyle",
|
|
44
44
|
borderLeftWidth: nativeStyle || "borderLeftStyle",
|
|
45
|
-
borderRightWidth: nativeStyle || "borderRightStyle"
|
|
45
|
+
borderRightWidth: nativeStyle || "borderRightStyle",
|
|
46
|
+
borderBlockWidth: nativeStyle || "borderBlockStyle",
|
|
47
|
+
borderBlockStartWidth: nativeStyle || "borderBlockStartStyle",
|
|
48
|
+
borderBlockEndWidth: nativeStyle || "borderBlockEndStyle",
|
|
49
|
+
borderInlineWidth: nativeStyle || "borderInlineStyle",
|
|
50
|
+
borderInlineStartWidth: nativeStyle || "borderInlineStartStyle",
|
|
51
|
+
borderInlineEndWidth: nativeStyle || "borderInlineEndStyle"
|
|
46
52
|
};
|
|
47
53
|
|
|
48
54
|
//# sourceMappingURL=expandStyles.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expandStyles.native.js","names":[],"sources":["cjs/helpers/expandStyles.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
|
|
1
|
+
{"version":3,"file":"expandStyles.native.js","names":[],"sources":["cjs/helpers/expandStyles.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 expandStyles_exports = {};\n__export(expandStyles_exports, {\n fixStyles: () => fixStyles\n});\nmodule.exports = __toCommonJS(expandStyles_exports);\nvar import_constants = require(\"@tamagui/constants\");\nvar import_normalizeShadow = require(\"./normalizeShadow\");\nfunction fixStyles(style) {\n if (style.shadowRadius != null || style.shadowColor || style.shadowOpacity != null || style.shadowOffset) {\n Object.assign(style, (0, import_normalizeShadow.normalizeShadow)(style));\n }\n for (var key in borderDefaults) {\n if (key in style) {\n var _style, _borderDefaults_key;\n (_style = style)[_borderDefaults_key = borderDefaults[key]] || (_style[_borderDefaults_key] = \"solid\");\n }\n }\n}\nvar nativeStyle = import_constants.isWeb ? null : \"borderStyle\";\nvar borderDefaults = {\n borderWidth: \"borderStyle\",\n borderBottomWidth: nativeStyle || \"borderBottomStyle\",\n borderTopWidth: nativeStyle || \"borderTopStyle\",\n borderLeftWidth: nativeStyle || \"borderLeftStyle\",\n borderRightWidth: nativeStyle || \"borderRightStyle\",\n borderBlockWidth: nativeStyle || \"borderBlockStyle\",\n borderBlockStartWidth: nativeStyle || \"borderBlockStartStyle\",\n borderBlockEndWidth: nativeStyle || \"borderBlockEndStyle\",\n borderInlineWidth: nativeStyle || \"borderInlineStyle\",\n borderInlineStartWidth: nativeStyle || \"borderInlineStartStyle\",\n borderInlineEndWidth: nativeStyle || \"borderInlineEndStyle\"\n};\n//# sourceMappingURL=expandStyles.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;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,uBAAuB,CAAC;AAC5B,SAAS,sBAAsB,EAC7B,iBAAiB,UACnB,CAAC;AACD,OAAO,UAAU,aAAa,oBAAoB;AAClD,IAAI,mBAAmB,QAAQ,oBAAoB;AACnD,IAAI,yBAAyB,QAAQ,6BAAmB;AACxD,SAAS,UAAU,OAAO;CACxB,IAAI,MAAM,gBAAgB,QAAQ,MAAM,eAAe,MAAM,iBAAiB,QAAQ,MAAM,cAAc;EACxG,OAAO,OAAO,QAAQ,GAAG,uBAAuB,gBAAe,CAAE,KAAK,CAAC;CACzE;CACA,KAAK,IAAI,OAAO,gBAAgB;EAC9B,IAAI,OAAO,OAAO;GAChB,IAAI,QAAQ;GACZ,CAAC,SAAS,MAAK,CAAE,sBAAsB,eAAe,UAAU,OAAO,uBAAuB;EAChG;CACF;AACF;AACA,IAAI,cAAc,iBAAiB,QAAQ,OAAO;AAClD,IAAI,iBAAiB;CACnB,aAAa;CACb,mBAAmB,eAAe;CAClC,gBAAgB,eAAe;CAC/B,iBAAiB,eAAe;CAChC,kBAAkB,eAAe;CACjC,kBAAkB,eAAe;CACjC,uBAAuB,eAAe;CACtC,qBAAqB,eAAe;CACpC,mBAAmB,eAAe;CAClC,wBAAwB,eAAe;CACvC,sBAAsB,eAAe;AACvC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
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 fluid_exports = {};
|
|
22
|
+
__export(fluid_exports, { fluid: () => fluid });
|
|
23
|
+
module.exports = __toCommonJS(fluid_exports);
|
|
24
|
+
function fluid(arg1, arg2, arg3) {
|
|
25
|
+
let min;
|
|
26
|
+
let max;
|
|
27
|
+
let from = 375;
|
|
28
|
+
let to = 1200;
|
|
29
|
+
let unit = "cqi";
|
|
30
|
+
if (typeof arg1 === "number") {
|
|
31
|
+
min = arg1;
|
|
32
|
+
max = arg2;
|
|
33
|
+
if (arg3) {
|
|
34
|
+
if (arg3.from !== void 0) from = arg3.from;
|
|
35
|
+
if (arg3.to !== void 0) to = arg3.to;
|
|
36
|
+
if (arg3.unit !== void 0) unit = arg3.unit;
|
|
37
|
+
}
|
|
38
|
+
} else {
|
|
39
|
+
min = arg1.min;
|
|
40
|
+
max = arg1.max;
|
|
41
|
+
if (arg1.from !== void 0) from = arg1.from;
|
|
42
|
+
if (arg1.to !== void 0) to = arg1.to;
|
|
43
|
+
if (arg1.unit !== void 0) unit = arg1.unit;
|
|
44
|
+
}
|
|
45
|
+
const slope = (max - min) / (to - from);
|
|
46
|
+
const intercept = min - slope * from;
|
|
47
|
+
const slopePercent = +(slope * 100).toFixed(4);
|
|
48
|
+
const interceptRounded = +intercept.toFixed(2);
|
|
49
|
+
let expr = `${slopePercent}${unit}`;
|
|
50
|
+
if (interceptRounded > 0) {
|
|
51
|
+
expr += ` + ${interceptRounded}px`;
|
|
52
|
+
} else if (interceptRounded < 0) {
|
|
53
|
+
expr += ` - ${Math.abs(interceptRounded)}px`;
|
|
54
|
+
}
|
|
55
|
+
return `clamp(${min}px, ${expr}, ${max}px)`;
|
|
56
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
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 fluid_exports = {};
|
|
24
|
+
__export(fluid_exports, { fluid: () => fluid });
|
|
25
|
+
module.exports = __toCommonJS(fluid_exports);
|
|
26
|
+
function fluid(arg1, arg2, arg3) {
|
|
27
|
+
var min;
|
|
28
|
+
var max;
|
|
29
|
+
var from = 375;
|
|
30
|
+
var to = 1200;
|
|
31
|
+
var unit = "cqi";
|
|
32
|
+
if (typeof arg1 === "number") {
|
|
33
|
+
min = arg1;
|
|
34
|
+
max = arg2;
|
|
35
|
+
if (arg3) {
|
|
36
|
+
if (arg3.from !== void 0) from = arg3.from;
|
|
37
|
+
if (arg3.to !== void 0) to = arg3.to;
|
|
38
|
+
if (arg3.unit !== void 0) unit = arg3.unit;
|
|
39
|
+
}
|
|
40
|
+
} else {
|
|
41
|
+
min = arg1.min;
|
|
42
|
+
max = arg1.max;
|
|
43
|
+
if (arg1.from !== void 0) from = arg1.from;
|
|
44
|
+
if (arg1.to !== void 0) to = arg1.to;
|
|
45
|
+
if (arg1.unit !== void 0) unit = arg1.unit;
|
|
46
|
+
}
|
|
47
|
+
var slope = (max - min) / (to - from);
|
|
48
|
+
var intercept = min - slope * from;
|
|
49
|
+
var slopePercent = +(slope * 100).toFixed(4);
|
|
50
|
+
var interceptRounded = +intercept.toFixed(2);
|
|
51
|
+
var expr = `${slopePercent}${unit}`;
|
|
52
|
+
if (interceptRounded > 0) {
|
|
53
|
+
expr += ` + ${interceptRounded}px`;
|
|
54
|
+
} else if (interceptRounded < 0) {
|
|
55
|
+
expr += ` - ${Math.abs(interceptRounded)}px`;
|
|
56
|
+
}
|
|
57
|
+
return `clamp(${min}px, ${expr}, ${max}px)`;
|
|
58
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
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 fluid_exports = {};
|
|
24
|
+
__export(fluid_exports, { fluid: () => fluid });
|
|
25
|
+
module.exports = __toCommonJS(fluid_exports);
|
|
26
|
+
function fluid(arg1, arg2, arg3) {
|
|
27
|
+
var min;
|
|
28
|
+
var max;
|
|
29
|
+
var from = 375;
|
|
30
|
+
var to = 1200;
|
|
31
|
+
var unit = "cqi";
|
|
32
|
+
if (typeof arg1 === "number") {
|
|
33
|
+
min = arg1;
|
|
34
|
+
max = arg2;
|
|
35
|
+
if (arg3) {
|
|
36
|
+
if (arg3.from !== void 0) from = arg3.from;
|
|
37
|
+
if (arg3.to !== void 0) to = arg3.to;
|
|
38
|
+
if (arg3.unit !== void 0) unit = arg3.unit;
|
|
39
|
+
}
|
|
40
|
+
} else {
|
|
41
|
+
min = arg1.min;
|
|
42
|
+
max = arg1.max;
|
|
43
|
+
if (arg1.from !== void 0) from = arg1.from;
|
|
44
|
+
if (arg1.to !== void 0) to = arg1.to;
|
|
45
|
+
if (arg1.unit !== void 0) unit = arg1.unit;
|
|
46
|
+
}
|
|
47
|
+
var slope = (max - min) / (to - from);
|
|
48
|
+
var intercept = min - slope * from;
|
|
49
|
+
var slopePercent = +(slope * 100).toFixed(4);
|
|
50
|
+
var interceptRounded = +intercept.toFixed(2);
|
|
51
|
+
var expr = `${slopePercent}${unit}`;
|
|
52
|
+
if (interceptRounded > 0) {
|
|
53
|
+
expr += ` + ${interceptRounded}px`;
|
|
54
|
+
} else if (interceptRounded < 0) {
|
|
55
|
+
expr += ` - ${Math.abs(interceptRounded)}px`;
|
|
56
|
+
}
|
|
57
|
+
return `clamp(${min}px, ${expr}, ${max}px)`;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
//# sourceMappingURL=fluid.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fluid.native.js","names":[],"sources":["cjs/helpers/fluid.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 fluid_exports = {};\n__export(fluid_exports, {\n fluid: () => fluid\n});\nmodule.exports = __toCommonJS(fluid_exports);\nfunction fluid(arg1, arg2, arg3) {\n var min;\n var max;\n var from = 375;\n var to = 1200;\n var unit = \"cqi\";\n if (typeof arg1 === \"number\") {\n min = arg1;\n max = arg2;\n if (arg3) {\n if (arg3.from !== void 0) from = arg3.from;\n if (arg3.to !== void 0) to = arg3.to;\n if (arg3.unit !== void 0) unit = arg3.unit;\n }\n } else {\n min = arg1.min;\n max = arg1.max;\n if (arg1.from !== void 0) from = arg1.from;\n if (arg1.to !== void 0) to = arg1.to;\n if (arg1.unit !== void 0) unit = arg1.unit;\n }\n var slope = (max - min) / (to - from);\n var intercept = min - slope * from;\n var slopePercent = +(slope * 100).toFixed(4);\n var interceptRounded = +intercept.toFixed(2);\n var expr = `${slopePercent}${unit}`;\n if (interceptRounded > 0) {\n expr += ` + ${interceptRounded}px`;\n } else if (interceptRounded < 0) {\n expr += ` - ${Math.abs(interceptRounded)}px`;\n }\n return `clamp(${min}px, ${expr}, ${max}px)`;\n}\n//# sourceMappingURL=fluid.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,o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,MAAM,QAAQ,KAAK;CAChC,IAAI,YAAY,MAAM,QAAQ;CAC9B,IAAI,eAAe,EAAE,QAAQ,IAAG,CAAE,QAAQ,CAAC;CAC3C,IAAI,mBAAmB,CAAC,UAAU,QAAQ,CAAC;CAC3C,IAAI,OAAO,GAAG,eAAe;CAC7B,IAAI,mBAAmB,GAAG;EACxB,QAAQ,MAAM,iBAAiB;CACjC,OAAO,IAAI,mBAAmB,GAAG;EAC/B,QAAQ,MAAM,KAAK,IAAI,gBAAgB,EAAE;CAC3C;CACA,OAAO,SAAS,IAAI,MAAM,KAAK,IAAI,IAAI;AACzC"}
|
|
@@ -23,10 +23,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
23
23
|
var formatDiagnostic_exports = {};
|
|
24
24
|
__export(formatDiagnostic_exports, { formatDiagnostic: () => formatDiagnostic });
|
|
25
25
|
module.exports = __toCommonJS(formatDiagnostic_exports);
|
|
26
|
-
function _type_of(obj) {
|
|
27
|
-
"@swc/helpers - typeof";
|
|
28
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
29
|
-
}
|
|
30
26
|
var maxDiagnosticValueLength = 160;
|
|
31
27
|
function formatDiagnosticValue(value) {
|
|
32
28
|
var depth = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, seen = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : /* @__PURE__ */ new WeakSet();
|
|
@@ -37,9 +33,9 @@ function formatDiagnosticValue(value) {
|
|
|
37
33
|
if (value == null || typeof value === "number" || typeof value === "boolean") {
|
|
38
34
|
return String(value);
|
|
39
35
|
}
|
|
40
|
-
if (
|
|
36
|
+
if (typeof value === "bigint") return `${value}n`;
|
|
41
37
|
if (typeof value === "function") return `[Function ${value.name || "anonymous"}]`;
|
|
42
|
-
if (
|
|
38
|
+
if (typeof value !== "object") return String(value);
|
|
43
39
|
if (seen.has(value)) return "[Circular]";
|
|
44
40
|
if (depth === 2) return Array.isArray(value) ? "[Array]" : "[Object]";
|
|
45
41
|
seen.add(value);
|