@tamagui/web 3.0.0-beta.922.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/_withNativeStyle.cjs +3 -0
- package/dist/cjs/_withNativeStyle.native.cjs +3 -0
- package/dist/cjs/_withNativeStyle.native.js +3 -0
- package/dist/cjs/_withNativeStyle.native.js.map +1 -1
- package/dist/cjs/_withStableStyle.native.cjs +1 -5
- package/dist/cjs/_withStableStyle.native.js +1 -5
- package/dist/cjs/_withStableStyle.native.js.map +1 -1
- package/dist/cjs/config.cjs +6 -3
- package/dist/cjs/config.native.cjs +7 -5
- package/dist/cjs/config.native.js +7 -5
- package/dist/cjs/config.native.js.map +1 -1
- package/dist/cjs/contexts/ComponentContext.cjs +1 -0
- package/dist/cjs/contexts/ComponentContext.native.cjs +8 -0
- package/dist/cjs/contexts/ComponentContext.native.js +8 -0
- package/dist/cjs/contexts/ComponentContext.native.js.map +1 -1
- package/dist/cjs/createComponent.cjs +46 -32
- package/dist/cjs/createComponent.native.cjs +92 -72
- package/dist/cjs/createComponent.native.js +92 -72
- package/dist/cjs/createComponent.native.js.map +1 -1
- package/dist/cjs/createTamagui.cjs +32 -14
- package/dist/cjs/createTamagui.native.cjs +33 -19
- package/dist/cjs/createTamagui.native.js +33 -19
- package/dist/cjs/createTamagui.native.js.map +1 -1
- package/dist/cjs/createTokens.native.cjs +1 -5
- package/dist/cjs/createTokens.native.js +1 -5
- package/dist/cjs/createTokens.native.js.map +1 -1
- package/dist/cjs/createVariable.native.cjs +1 -5
- package/dist/cjs/createVariable.native.js +1 -5
- package/dist/cjs/createVariable.native.js.map +1 -1
- package/dist/cjs/createVariables.native.cjs +2 -6
- package/dist/cjs/createVariables.native.js +2 -6
- package/dist/cjs/createVariables.native.js.map +1 -1
- package/dist/cjs/dom/html.cjs +87 -329
- package/dist/cjs/dom/html.native.cjs +53 -2
- package/dist/cjs/dom/html.native.js +53 -2
- package/dist/cjs/dom/html.native.js.map +1 -1
- package/dist/cjs/{helpers/timer.native.js → dom/htmlReset.cjs} +6 -12
- package/dist/cjs/{helpers/timer.native.cjs → dom/htmlReset.native.cjs} +6 -8
- package/dist/cjs/dom/htmlReset.native.js +30 -0
- package/dist/cjs/dom/htmlReset.native.js.map +1 -0
- package/dist/cjs/dom/htmlRuntime.native.cjs +4 -0
- package/dist/cjs/dom/htmlRuntime.native.js +4 -0
- package/dist/cjs/dom/htmlRuntime.native.js.map +1 -1
- package/dist/cjs/dom/htmlStaticConfig.cjs +44 -0
- package/dist/cjs/dom/htmlStaticConfig.native.cjs +46 -0
- package/dist/cjs/dom/htmlStaticConfig.native.js +48 -0
- package/dist/cjs/dom/htmlStaticConfig.native.js.map +1 -0
- package/dist/cjs/dom/primitives.native.cjs +81 -34
- package/dist/cjs/dom/primitives.native.js +81 -34
- package/dist/cjs/dom/primitives.native.js.map +1 -1
- package/dist/cjs/eventHandling.cjs +10 -4
- package/dist/cjs/eventHandling.native.cjs +52 -16
- package/dist/cjs/eventHandling.native.js +52 -16
- package/dist/cjs/eventHandling.native.js.map +1 -1
- package/dist/cjs/helpers/NativeTextBinding.cjs +36 -0
- package/dist/cjs/helpers/NativeTextBinding.native.cjs +39 -0
- package/dist/cjs/helpers/NativeTextBinding.native.js +41 -0
- package/dist/cjs/helpers/NativeTextBinding.native.js.map +1 -0
- package/dist/cjs/helpers/configVariables.native.cjs +2 -6
- package/dist/cjs/helpers/configVariables.native.js +2 -6
- package/dist/cjs/helpers/configVariables.native.js.map +1 -1
- package/dist/cjs/helpers/createDesignSystem.cjs +14 -10
- package/dist/cjs/helpers/createDesignSystem.native.cjs +5 -4
- package/dist/cjs/helpers/createDesignSystem.native.js +5 -4
- package/dist/cjs/helpers/createDesignSystem.native.js.map +1 -1
- package/dist/cjs/helpers/createStyledContext.native.cjs +1 -5
- package/dist/cjs/helpers/createStyledContext.native.js +1 -5
- package/dist/cjs/helpers/createStyledContext.native.js.map +1 -1
- package/dist/cjs/helpers/expandStyle.cjs +45 -1
- package/dist/cjs/helpers/expandStyle.native.cjs +38 -2
- package/dist/cjs/helpers/expandStyle.native.js +38 -2
- package/dist/cjs/helpers/expandStyle.native.js.map +1 -1
- package/dist/cjs/helpers/expandStyles.cjs +15 -3
- package/dist/cjs/helpers/expandStyles.native.cjs +14 -8
- package/dist/cjs/helpers/expandStyles.native.js +14 -8
- package/dist/cjs/helpers/expandStyles.native.js.map +1 -1
- package/dist/cjs/helpers/fluid.cjs +56 -0
- package/dist/cjs/helpers/fluid.native.cjs +58 -0
- package/dist/cjs/helpers/fluid.native.js +60 -0
- package/dist/cjs/helpers/fluid.native.js.map +1 -0
- package/dist/cjs/helpers/formatDiagnostic.native.cjs +2 -6
- package/dist/cjs/helpers/formatDiagnostic.native.js +2 -6
- package/dist/cjs/helpers/formatDiagnostic.native.js.map +1 -1
- package/dist/cjs/helpers/getCSSStylesAtomic.cjs +6 -6
- package/dist/cjs/helpers/getSplitStyles.cjs +366 -150
- package/dist/cjs/helpers/getSplitStyles.native.cjs +584 -184
- package/dist/cjs/helpers/getSplitStyles.native.js +584 -184
- package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/cjs/helpers/getThemeCSSRules.cjs +37 -25
- package/dist/cjs/helpers/grammarConfig.cjs +6 -14
- package/dist/cjs/helpers/grammarConfig.native.cjs +32 -22
- package/dist/cjs/helpers/grammarConfig.native.js +32 -22
- package/dist/cjs/helpers/grammarConfig.native.js.map +1 -1
- package/dist/cjs/helpers/insertStyleRule.cjs +11 -4
- package/dist/cjs/helpers/insertStyleRule.native.cjs +8 -11
- package/dist/cjs/helpers/insertStyleRule.native.js +8 -11
- package/dist/cjs/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/cjs/helpers/isObj.native.cjs +1 -5
- package/dist/cjs/helpers/isObj.native.js +1 -5
- package/dist/cjs/helpers/isObj.native.js.map +1 -1
- package/dist/cjs/helpers/mainThreadPressEvents.native.cjs +48 -100
- package/dist/cjs/helpers/mainThreadPressEvents.native.js +48 -100
- package/dist/cjs/helpers/mainThreadPressEvents.native.js.map +1 -1
- package/dist/cjs/helpers/mergeProps.cjs +18 -21
- package/dist/cjs/helpers/mergeProps.native.cjs +20 -23
- package/dist/cjs/helpers/mergeProps.native.js +20 -23
- package/dist/cjs/helpers/mergeProps.native.js.map +1 -1
- package/dist/cjs/helpers/nativeOnlyProps.cjs +0 -1
- package/dist/cjs/helpers/nativeOnlyProps.native.cjs +0 -1
- package/dist/cjs/helpers/nativeOnlyProps.native.js +0 -1
- package/dist/cjs/helpers/nativeOnlyProps.native.js.map +1 -1
- package/dist/cjs/helpers/nativeTextMetrics.cjs +74 -0
- package/dist/cjs/helpers/nativeTextMetrics.native.cjs +77 -0
- package/dist/cjs/helpers/nativeTextMetrics.native.js +79 -0
- package/dist/cjs/helpers/nativeTextMetrics.native.js.map +1 -0
- package/dist/cjs/helpers/normalizeColor.native.cjs +17 -2
- package/dist/cjs/helpers/normalizeColor.native.js +17 -2
- package/dist/cjs/helpers/normalizeColor.native.js.map +1 -1
- package/dist/cjs/helpers/normalizeValueWithProperty.cjs +2 -1
- package/dist/cjs/helpers/normalizeValueWithProperty.native.cjs +3 -6
- package/dist/cjs/helpers/normalizeValueWithProperty.native.js +3 -6
- package/dist/cjs/helpers/normalizeValueWithProperty.native.js.map +1 -1
- package/dist/cjs/helpers/objectIdentityKey.native.cjs +1 -5
- package/dist/cjs/helpers/objectIdentityKey.native.js +1 -5
- package/dist/cjs/helpers/objectIdentityKey.native.js.map +1 -1
- package/dist/cjs/helpers/parseNativeStyle.cjs +187 -0
- package/dist/cjs/helpers/parseNativeStyle.native.cjs +6 -4
- package/dist/cjs/helpers/parseNativeStyle.native.js +6 -4
- package/dist/cjs/helpers/parseNativeStyle.native.js.map +1 -1
- package/dist/cjs/helpers/proxyThemeToParents.cjs +9 -2
- package/dist/cjs/helpers/proxyThemeToParents.native.cjs +28 -2
- package/dist/cjs/helpers/proxyThemeToParents.native.js +28 -2
- package/dist/cjs/helpers/proxyThemeToParents.native.js.map +1 -1
- package/dist/cjs/helpers/resolveAnimationDriver.native.cjs +1 -5
- package/dist/cjs/helpers/resolveAnimationDriver.native.js +1 -5
- package/dist/cjs/helpers/resolveAnimationDriver.native.js.map +1 -1
- package/dist/cjs/helpers/{timer.cjs → resolveNativeUnits.cjs} +12 -8
- package/dist/cjs/helpers/resolveNativeUnits.native.cjs +205 -0
- package/dist/cjs/helpers/resolveNativeUnits.native.js +207 -0
- package/dist/cjs/helpers/resolveNativeUnits.native.js.map +1 -0
- package/dist/cjs/helpers/resolveRem.native.cjs +18 -21
- package/dist/cjs/helpers/resolveRem.native.js +18 -21
- package/dist/cjs/helpers/resolveRem.native.js.map +1 -1
- package/dist/cjs/helpers/resolveSizing.cjs +124 -0
- package/dist/cjs/helpers/resolveSizing.native.cjs +133 -0
- package/dist/cjs/helpers/resolveSizing.native.js +135 -0
- package/dist/cjs/helpers/resolveSizing.native.js.map +1 -0
- package/dist/cjs/helpers/resolveVariableValue.cjs +7 -7
- package/dist/cjs/helpers/resolveVariableValue.native.cjs +7 -9
- package/dist/cjs/helpers/resolveVariableValue.native.js +7 -9
- package/dist/cjs/helpers/resolveVariableValue.native.js.map +1 -1
- package/dist/cjs/helpers/resolveVariantStyle.native.cjs +2 -6
- package/dist/cjs/helpers/resolveVariantStyle.native.js +2 -6
- package/dist/cjs/helpers/resolveVariantStyle.native.js.map +1 -1
- package/dist/cjs/helpers/skipProps.cjs +0 -1
- package/dist/cjs/helpers/skipProps.native.cjs +0 -1
- package/dist/cjs/helpers/skipProps.native.js +0 -1
- package/dist/cjs/helpers/skipProps.native.js.map +1 -1
- package/dist/cjs/helpers/styleFrontend.cjs +23 -1
- package/dist/cjs/helpers/styleFrontend.native.cjs +23 -1
- package/dist/cjs/helpers/styleFrontend.native.js +23 -1
- package/dist/cjs/helpers/styleFrontend.native.js.map +1 -1
- package/dist/cjs/helpers/styleStaticConfigCore.cjs +5 -4
- package/dist/cjs/helpers/styleStaticConfigCore.native.cjs +7 -4
- package/dist/cjs/helpers/styleStaticConfigCore.native.js +7 -4
- package/dist/cjs/helpers/styleStaticConfigCore.native.js.map +1 -1
- package/dist/cjs/helpers/styledDynamic.cjs +5 -0
- package/dist/cjs/helpers/styledDynamic.native.cjs +8 -7
- package/dist/cjs/helpers/styledDynamic.native.js +8 -7
- package/dist/cjs/helpers/styledDynamic.native.js.map +1 -1
- package/dist/cjs/helpers/subscribeToContextGroup.cjs +16 -7
- package/dist/cjs/helpers/subscribeToContextGroup.native.cjs +18 -8
- package/dist/cjs/helpers/subscribeToContextGroup.native.js +18 -8
- package/dist/cjs/helpers/subscribeToContextGroup.native.js.map +1 -1
- package/dist/cjs/helpers/themeRef.native.cjs +1 -5
- package/dist/cjs/helpers/themeRef.native.js +1 -5
- package/dist/cjs/helpers/themeRef.native.js.map +1 -1
- package/dist/cjs/helpers/themes.cjs +26 -11
- package/dist/cjs/helpers/themes.native.cjs +26 -11
- package/dist/cjs/helpers/themes.native.js +26 -11
- package/dist/cjs/helpers/themes.native.js.map +1 -1
- package/dist/cjs/helpers/tokenCategories.cjs +2 -2
- package/dist/cjs/helpers/tokenCategories.native.cjs +2 -2
- package/dist/cjs/helpers/tokenCategories.native.js +2 -2
- package/dist/cjs/helpers/tokenCategories.native.js.map +1 -1
- package/dist/cjs/helpers/variables.cjs +1 -1
- package/dist/cjs/helpers/variables.native.cjs +4 -8
- package/dist/cjs/helpers/variables.native.js +4 -8
- package/dist/cjs/helpers/variables.native.js.map +1 -1
- package/dist/cjs/helpers/warnOnce.cjs +6 -0
- package/dist/cjs/helpers/warnOnce.native.cjs +6 -0
- package/dist/cjs/helpers/warnOnce.native.js +6 -0
- package/dist/cjs/helpers/warnOnce.native.js.map +1 -1
- package/dist/cjs/helpers/webPropsToSkip.native.cjs +3 -3
- package/dist/cjs/helpers/webPropsToSkip.native.js +3 -3
- package/dist/cjs/helpers/webPropsToSkip.native.js.map +1 -1
- package/dist/cjs/helpers/wrapStyleTags.cjs +1 -1
- package/dist/cjs/helpers/wrapStyleTags.native.cjs +1 -1
- package/dist/cjs/helpers/wrapStyleTags.native.js +1 -1
- package/dist/cjs/helpers/wrapStyleTags.native.js.map +1 -1
- package/dist/cjs/hooks/useComponentState.native.cjs +1 -5
- package/dist/cjs/hooks/useComponentState.native.js +1 -5
- package/dist/cjs/hooks/useComponentState.native.js.map +1 -1
- package/dist/cjs/hooks/useMedia.cjs +27 -34
- package/dist/cjs/hooks/useMedia.native.cjs +45 -51
- package/dist/cjs/hooks/useMedia.native.js +45 -51
- package/dist/cjs/hooks/useMedia.native.js.map +1 -1
- package/dist/cjs/hooks/useSplitStyles.cjs +1 -1
- package/dist/cjs/hooks/useSplitStyles.native.cjs +1 -1
- package/dist/cjs/hooks/useSplitStyles.native.js +1 -1
- package/dist/cjs/hooks/useSplitStyles.native.js.map +1 -1
- package/dist/cjs/hooks/useThemeState.cjs +37 -47
- package/dist/cjs/hooks/useThemeState.native.cjs +44 -50
- package/dist/cjs/hooks/useThemeState.native.js +44 -50
- package/dist/cjs/hooks/useThemeState.native.js.map +1 -1
- package/dist/cjs/index.cjs +7 -0
- package/dist/cjs/index.native.cjs +7 -0
- package/dist/cjs/index.native.js +7 -0
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/internal-runtime.cjs +22 -0
- package/dist/cjs/internal-runtime.native.cjs +22 -0
- package/dist/cjs/internal-runtime.native.js +22 -0
- package/dist/cjs/internal-runtime.native.js.map +1 -1
- package/dist/cjs/static-resolve.native.cjs +2 -9
- package/dist/cjs/static-resolve.native.js +2 -9
- package/dist/cjs/static-resolve.native.js.map +1 -1
- package/dist/cjs/style.cjs +1 -1
- package/dist/cjs/style.native.cjs +4 -7
- package/dist/cjs/style.native.js +4 -7
- package/dist/cjs/style.native.js.map +1 -1
- package/dist/cjs/views/Theme.cjs +10 -17
- package/dist/cjs/views/Theme.native.cjs +9 -11
- package/dist/cjs/views/Theme.native.js +9 -11
- package/dist/cjs/views/Theme.native.js.map +1 -1
- package/dist/cjs/views/ThemeDebug.cjs +1 -1
- package/dist/cjs/views/ThemeUpdate.cjs +1 -1
- package/dist/cjs/views/ThemeUpdate.native.cjs +1 -1
- package/dist/cjs/views/ThemeUpdate.native.js +1 -1
- package/dist/cjs/views/ThemeUpdate.native.js.map +1 -1
- package/dist/esm/_withNativeStyle.mjs +4 -1
- package/dist/esm/_withNativeStyle.mjs.map +1 -1
- package/dist/esm/_withNativeStyle.native.js +4 -1
- package/dist/esm/_withNativeStyle.native.js.map +1 -1
- package/dist/esm/_withStableStyle.native.js +1 -5
- package/dist/esm/_withStableStyle.native.js.map +1 -1
- package/dist/esm/config.mjs +6 -3
- package/dist/esm/config.mjs.map +1 -1
- package/dist/esm/config.native.js +7 -5
- package/dist/esm/config.native.js.map +1 -1
- package/dist/esm/contexts/ComponentContext.mjs +9 -9
- package/dist/esm/contexts/ComponentContext.mjs.map +1 -1
- package/dist/esm/contexts/ComponentContext.native.js +16 -9
- package/dist/esm/contexts/ComponentContext.native.js.map +1 -1
- package/dist/esm/createComponent.mjs +45 -42
- package/dist/esm/createComponent.mjs.map +1 -1
- package/dist/esm/createComponent.native.js +93 -82
- package/dist/esm/createComponent.native.js.map +1 -1
- package/dist/esm/createTamagui.mjs +33 -15
- package/dist/esm/createTamagui.mjs.map +1 -1
- package/dist/esm/createTamagui.native.js +34 -20
- package/dist/esm/createTamagui.native.js.map +1 -1
- package/dist/esm/createTokens.native.js +1 -5
- package/dist/esm/createTokens.native.js.map +1 -1
- package/dist/esm/createVariable.native.js +1 -5
- package/dist/esm/createVariable.native.js.map +1 -1
- package/dist/esm/createVariables.native.js +2 -6
- package/dist/esm/createVariables.native.js.map +1 -1
- package/dist/esm/dom/html.mjs +87 -329
- package/dist/esm/dom/html.mjs.map +1 -1
- package/dist/esm/dom/html.native.js +53 -2
- package/dist/esm/dom/html.native.js.map +1 -1
- package/dist/esm/dom/htmlReset.mjs +6 -0
- package/dist/esm/dom/htmlReset.mjs.map +1 -0
- package/dist/esm/dom/htmlReset.native.js +6 -0
- package/dist/esm/dom/htmlReset.native.js.map +1 -0
- package/dist/esm/dom/htmlRuntime.native.js +4 -0
- package/dist/esm/dom/htmlRuntime.native.js.map +1 -1
- package/dist/esm/dom/htmlStaticConfig.mjs +22 -0
- package/dist/esm/dom/htmlStaticConfig.mjs.map +1 -0
- package/dist/esm/dom/htmlStaticConfig.native.js +22 -0
- package/dist/esm/dom/htmlStaticConfig.native.js.map +1 -0
- package/dist/esm/dom/primitives.native.js +81 -34
- package/dist/esm/dom/primitives.native.js.map +1 -1
- package/dist/esm/eventHandling.mjs +10 -4
- package/dist/esm/eventHandling.mjs.map +1 -1
- package/dist/esm/eventHandling.native.js +52 -16
- package/dist/esm/eventHandling.native.js.map +1 -1
- package/dist/esm/helpers/NativeTextBinding.mjs +17 -0
- package/dist/esm/helpers/NativeTextBinding.mjs.map +1 -0
- package/dist/esm/helpers/NativeTextBinding.native.js +18 -0
- package/dist/esm/helpers/NativeTextBinding.native.js.map +1 -0
- package/dist/esm/helpers/configVariables.native.js +2 -6
- package/dist/esm/helpers/configVariables.native.js.map +1 -1
- package/dist/esm/helpers/createDesignSystem.mjs +14 -10
- package/dist/esm/helpers/createDesignSystem.mjs.map +1 -1
- package/dist/esm/helpers/createDesignSystem.native.js +4 -4
- package/dist/esm/helpers/createDesignSystem.native.js.map +1 -1
- package/dist/esm/helpers/createStyledContext.native.js +1 -5
- package/dist/esm/helpers/createStyledContext.native.js.map +1 -1
- package/dist/esm/helpers/expandStyle.mjs +41 -1
- package/dist/esm/helpers/expandStyle.mjs.map +1 -1
- package/dist/esm/helpers/expandStyle.native.js +36 -3
- package/dist/esm/helpers/expandStyle.native.js.map +1 -1
- package/dist/esm/helpers/expandStyles.mjs +15 -3
- package/dist/esm/helpers/expandStyles.mjs.map +1 -1
- package/dist/esm/helpers/expandStyles.native.js +14 -8
- package/dist/esm/helpers/expandStyles.native.js.map +1 -1
- package/dist/esm/helpers/fluid.mjs +36 -0
- package/dist/esm/helpers/fluid.mjs.map +1 -0
- package/dist/esm/helpers/fluid.native.js +36 -0
- package/dist/esm/helpers/fluid.native.js.map +1 -0
- package/dist/esm/helpers/formatDiagnostic.native.js +2 -6
- package/dist/esm/helpers/formatDiagnostic.native.js.map +1 -1
- package/dist/esm/helpers/getCSSStylesAtomic.mjs +6 -6
- package/dist/esm/helpers/getCSSStylesAtomic.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.mjs +364 -150
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +588 -188
- package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/esm/helpers/getThemeCSSRules.mjs +37 -25
- package/dist/esm/helpers/getThemeCSSRules.mjs.map +1 -1
- package/dist/esm/helpers/grammarConfig.mjs +6 -14
- package/dist/esm/helpers/grammarConfig.mjs.map +1 -1
- package/dist/esm/helpers/grammarConfig.native.js +32 -22
- package/dist/esm/helpers/grammarConfig.native.js.map +1 -1
- package/dist/esm/helpers/insertStyleRule.mjs +11 -4
- package/dist/esm/helpers/insertStyleRule.mjs.map +1 -1
- package/dist/esm/helpers/insertStyleRule.native.js +4 -4
- package/dist/esm/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/esm/helpers/isObj.native.js +1 -5
- package/dist/esm/helpers/isObj.native.js.map +1 -1
- package/dist/esm/helpers/mainThreadPressEvents.native.js +48 -100
- package/dist/esm/helpers/mainThreadPressEvents.native.js.map +1 -1
- package/dist/esm/helpers/mergeProps.mjs +18 -21
- package/dist/esm/helpers/mergeProps.mjs.map +1 -1
- package/dist/esm/helpers/mergeProps.native.js +20 -23
- package/dist/esm/helpers/mergeProps.native.js.map +1 -1
- package/dist/esm/helpers/nativeOnlyProps.mjs +0 -1
- package/dist/esm/helpers/nativeOnlyProps.mjs.map +1 -1
- package/dist/esm/helpers/nativeOnlyProps.native.js +0 -1
- package/dist/esm/helpers/nativeOnlyProps.native.js.map +1 -1
- package/dist/esm/helpers/nativeTextMetrics.mjs +55 -0
- package/dist/esm/helpers/nativeTextMetrics.mjs.map +1 -0
- package/dist/esm/helpers/nativeTextMetrics.native.js +56 -0
- package/dist/esm/helpers/nativeTextMetrics.native.js.map +1 -0
- package/dist/esm/helpers/normalizeColor.native.js +17 -2
- package/dist/esm/helpers/normalizeColor.native.js.map +1 -1
- package/dist/esm/helpers/normalizeValueWithProperty.mjs +2 -1
- package/dist/esm/helpers/normalizeValueWithProperty.mjs.map +1 -1
- package/dist/esm/helpers/normalizeValueWithProperty.native.js +3 -6
- package/dist/esm/helpers/normalizeValueWithProperty.native.js.map +1 -1
- package/dist/esm/helpers/objectIdentityKey.native.js +1 -5
- package/dist/esm/helpers/objectIdentityKey.native.js.map +1 -1
- package/dist/esm/helpers/parseNativeStyle.mjs +168 -0
- package/dist/esm/helpers/parseNativeStyle.mjs.map +1 -0
- package/dist/esm/helpers/parseNativeStyle.native.js +4 -1
- package/dist/esm/helpers/parseNativeStyle.native.js.map +1 -1
- package/dist/esm/helpers/proxyThemeToParents.mjs +10 -2
- package/dist/esm/helpers/proxyThemeToParents.mjs.map +1 -1
- package/dist/esm/helpers/proxyThemeToParents.native.js +29 -2
- package/dist/esm/helpers/proxyThemeToParents.native.js.map +1 -1
- package/dist/esm/helpers/resolveAnimationDriver.native.js +1 -5
- package/dist/esm/helpers/resolveAnimationDriver.native.js.map +1 -1
- package/dist/esm/helpers/resolveNativeUnits.mjs +9 -0
- package/dist/esm/helpers/resolveNativeUnits.mjs.map +1 -0
- package/dist/esm/helpers/resolveNativeUnits.native.js +178 -0
- package/dist/esm/helpers/resolveNativeUnits.native.js.map +1 -0
- package/dist/esm/helpers/resolveRem.native.js +18 -21
- package/dist/esm/helpers/resolveRem.native.js.map +1 -1
- package/dist/esm/helpers/resolveSizing.mjs +102 -0
- package/dist/esm/helpers/resolveSizing.mjs.map +1 -0
- package/dist/esm/helpers/resolveSizing.native.js +109 -0
- package/dist/esm/helpers/resolveSizing.native.js.map +1 -0
- package/dist/esm/helpers/resolveVariableValue.mjs +7 -7
- package/dist/esm/helpers/resolveVariableValue.mjs.map +1 -1
- package/dist/esm/helpers/resolveVariableValue.native.js +7 -9
- package/dist/esm/helpers/resolveVariableValue.native.js.map +1 -1
- package/dist/esm/helpers/resolveVariantStyle.native.js +2 -6
- package/dist/esm/helpers/resolveVariantStyle.native.js.map +1 -1
- package/dist/esm/helpers/skipProps.mjs +0 -1
- package/dist/esm/helpers/skipProps.mjs.map +1 -1
- package/dist/esm/helpers/skipProps.native.js +0 -1
- package/dist/esm/helpers/skipProps.native.js.map +1 -1
- package/dist/esm/helpers/styleFrontend.mjs +20 -1
- package/dist/esm/helpers/styleFrontend.mjs.map +1 -1
- package/dist/esm/helpers/styleFrontend.native.js +20 -1
- package/dist/esm/helpers/styleFrontend.native.js.map +1 -1
- package/dist/esm/helpers/styleStaticConfigCore.mjs +5 -4
- package/dist/esm/helpers/styleStaticConfigCore.mjs.map +1 -1
- package/dist/esm/helpers/styleStaticConfigCore.native.js +7 -4
- package/dist/esm/helpers/styleStaticConfigCore.native.js.map +1 -1
- package/dist/esm/helpers/styledDynamic.mjs +5 -0
- package/dist/esm/helpers/styledDynamic.mjs.map +1 -1
- package/dist/esm/helpers/styledDynamic.native.js +8 -7
- package/dist/esm/helpers/styledDynamic.native.js.map +1 -1
- package/dist/esm/helpers/subscribeToContextGroup.mjs +16 -7
- package/dist/esm/helpers/subscribeToContextGroup.mjs.map +1 -1
- package/dist/esm/helpers/subscribeToContextGroup.native.js +18 -8
- package/dist/esm/helpers/subscribeToContextGroup.native.js.map +1 -1
- package/dist/esm/helpers/themeRef.native.js +1 -5
- package/dist/esm/helpers/themeRef.native.js.map +1 -1
- package/dist/esm/helpers/themes.mjs +20 -11
- package/dist/esm/helpers/themes.mjs.map +1 -1
- package/dist/esm/helpers/themes.native.js +20 -11
- package/dist/esm/helpers/themes.native.js.map +1 -1
- package/dist/esm/helpers/tokenCategories.mjs +2 -2
- package/dist/esm/helpers/tokenCategories.mjs.map +1 -1
- package/dist/esm/helpers/tokenCategories.native.js +2 -2
- package/dist/esm/helpers/tokenCategories.native.js.map +1 -1
- package/dist/esm/helpers/variables.mjs +1 -1
- package/dist/esm/helpers/variables.mjs.map +1 -1
- package/dist/esm/helpers/variables.native.js +4 -8
- package/dist/esm/helpers/variables.native.js.map +1 -1
- package/dist/esm/helpers/warnOnce.mjs +6 -1
- package/dist/esm/helpers/warnOnce.mjs.map +1 -1
- package/dist/esm/helpers/warnOnce.native.js +6 -1
- package/dist/esm/helpers/warnOnce.native.js.map +1 -1
- package/dist/esm/helpers/webPropsToSkip.native.js +3 -3
- package/dist/esm/helpers/webPropsToSkip.native.js.map +1 -1
- package/dist/esm/helpers/wrapStyleTags.mjs +1 -1
- package/dist/esm/helpers/wrapStyleTags.mjs.map +1 -1
- package/dist/esm/helpers/wrapStyleTags.native.js +1 -1
- package/dist/esm/helpers/wrapStyleTags.native.js.map +1 -1
- package/dist/esm/hooks/useComponentState.native.js +1 -5
- package/dist/esm/hooks/useComponentState.native.js.map +1 -1
- package/dist/esm/hooks/useMedia.mjs +27 -34
- package/dist/esm/hooks/useMedia.mjs.map +1 -1
- package/dist/esm/hooks/useMedia.native.js +45 -51
- package/dist/esm/hooks/useMedia.native.js.map +1 -1
- package/dist/esm/hooks/useSplitStyles.mjs +1 -1
- package/dist/esm/hooks/useSplitStyles.mjs.map +1 -1
- package/dist/esm/hooks/useSplitStyles.native.js +1 -1
- package/dist/esm/hooks/useSplitStyles.native.js.map +1 -1
- package/dist/esm/hooks/useThemeState.mjs +36 -48
- package/dist/esm/hooks/useThemeState.mjs.map +1 -1
- package/dist/esm/hooks/useThemeState.native.js +44 -50
- package/dist/esm/hooks/useThemeState.native.js.map +1 -1
- package/dist/esm/index.js +4 -1
- package/dist/esm/index.mjs +4 -1
- package/dist/esm/index.native.js +4 -1
- package/dist/esm/internal-runtime.mjs +22 -3
- package/dist/esm/internal-runtime.mjs.map +1 -1
- package/dist/esm/internal-runtime.native.js +22 -3
- package/dist/esm/internal-runtime.native.js.map +1 -1
- package/dist/esm/static-resolve.native.js +2 -9
- package/dist/esm/static-resolve.native.js.map +1 -1
- package/dist/esm/style.mjs +1 -1
- package/dist/esm/style.mjs.map +1 -1
- package/dist/esm/style.native.js +4 -7
- package/dist/esm/style.native.js.map +1 -1
- package/dist/esm/views/Theme.mjs +15 -14
- package/dist/esm/views/Theme.mjs.map +1 -1
- package/dist/esm/views/Theme.native.js +15 -15
- package/dist/esm/views/Theme.native.js.map +1 -1
- package/dist/esm/views/ThemeDebug.mjs +1 -1
- package/dist/esm/views/ThemeDebug.mjs.map +1 -1
- package/dist/esm/views/ThemeUpdate.mjs +1 -1
- package/dist/esm/views/ThemeUpdate.mjs.map +1 -1
- package/dist/esm/views/ThemeUpdate.native.js +1 -1
- package/dist/esm/views/ThemeUpdate.native.js.map +1 -1
- package/package.json +20 -18
- package/reset.css +11 -0
- package/src/_withNativeStyle.tsx +6 -1
- package/src/config.ts +6 -6
- package/src/contexts/ComponentContext.tsx +8 -0
- package/src/createComponent.tsx +177 -57
- package/src/createStyledHOC.tsx +25 -26
- package/src/createTamagui.ts +47 -28
- package/src/dom/contract.ts +4 -1
- package/src/dom/html.native.tsx +55 -2
- package/src/dom/html.tsx +189 -388
- package/src/dom/htmlReset.ts +15 -0
- package/src/dom/htmlRuntime.native.tsx +5 -0
- package/src/dom/htmlStaticConfig.ts +40 -0
- package/src/dom/primitives.native.tsx +138 -33
- package/src/dom/standalone.ts +2 -1
- package/src/dom/styleTypes.ts +82 -92
- package/src/eventHandling.native.ts +61 -11
- package/src/eventHandling.ts +19 -4
- package/src/helpers/NativeTextBinding.tsx +26 -0
- package/src/helpers/createDesignSystem.ts +24 -8
- package/src/helpers/expandStyle.ts +88 -4
- package/src/helpers/expandStyles.ts +6 -11
- package/src/helpers/fluid.ts +66 -0
- package/src/helpers/getCSSStylesAtomic.ts +11 -6
- package/src/helpers/getSplitStyles.tsx +1032 -296
- package/src/helpers/getThemeCSSRules.ts +73 -35
- package/src/helpers/grammarConfig.ts +23 -8
- package/src/helpers/insertStyleRule.tsx +14 -8
- package/src/helpers/mainThreadPressEvents.native.ts +65 -141
- package/src/helpers/mergeProps.ts +29 -62
- package/src/helpers/nativeOnlyProps.ts +0 -1
- package/src/helpers/nativeTextMetrics.ts +77 -0
- package/src/helpers/normalizeColor.native.ts +29 -4
- package/src/helpers/normalizeValueWithProperty.ts +2 -1
- package/src/helpers/{parseNativeStyle.native.ts → parseNativeStyle.ts} +8 -1
- package/src/helpers/proxyThemeToParents.ts +13 -2
- package/src/helpers/resolveNativeUnits.native.ts +247 -0
- package/src/helpers/resolveNativeUnits.ts +10 -0
- package/src/helpers/resolveRem.native.ts +25 -26
- package/src/helpers/resolveSizing.ts +167 -0
- package/src/helpers/resolveVariableValue.ts +21 -17
- package/src/helpers/skipProps.ts +0 -1
- package/src/helpers/styleFrontend.ts +39 -0
- package/src/helpers/styleProvenance.ts +1 -1
- package/src/helpers/styleStaticConfigCore.ts +15 -4
- package/src/helpers/styledDynamic.ts +3 -1
- package/src/helpers/subscribeToContextGroup.tsx +16 -7
- package/src/helpers/themes.ts +27 -11
- package/src/helpers/tokenCategories.ts +15 -3
- package/src/helpers/variables.ts +2 -2
- package/src/helpers/warnOnce.ts +6 -0
- package/src/helpers/webPropsToSkip.native.ts +9 -3
- package/src/helpers/wrapStyleTags.tsx +4 -1
- package/src/hooks/useMedia.tsx +36 -47
- package/src/hooks/useSplitStyles.tsx +4 -1
- package/src/hooks/useThemeState.ts +69 -74
- package/src/index.ts +13 -0
- package/src/interfaces/RNExclusiveTypes.ts +1 -3
- package/src/internal-runtime.ts +43 -2
- package/src/style.ts +4 -1
- package/src/styled.tsx +34 -3
- package/src/types.tsx +412 -132
- package/src/views/Theme.tsx +18 -21
- package/src/views/ThemeDebug.tsx +1 -1
- package/src/views/ThemeUpdate.tsx +1 -1
- package/types/_withNativeStyle.d.ts.map +1 -1
- package/types/config.d.ts.map +1 -1
- package/types/contexts/ComponentContext.d.ts +1 -1
- package/types/contexts/ComponentContext.d.ts.map +1 -1
- package/types/createComponent.d.ts.map +1 -1
- package/types/createStyledHOC.d.ts +5 -2
- package/types/createStyledHOC.d.ts.map +1 -1
- package/types/createTamagui.d.ts.map +1 -1
- package/types/dom/contract.d.ts +4 -1
- package/types/dom/contract.d.ts.map +1 -1
- package/types/dom/html.d.ts +60 -51
- package/types/dom/html.d.ts.map +1 -1
- package/types/dom/html.native.d.ts.map +1 -1
- package/types/dom/htmlReset.d.ts +10 -0
- package/types/dom/htmlReset.d.ts.map +1 -0
- package/types/dom/htmlRuntime.native.d.ts.map +1 -1
- package/types/dom/htmlStaticConfig.d.ts +22 -0
- package/types/dom/htmlStaticConfig.d.ts.map +1 -0
- package/types/dom/primitives.native.d.ts.map +1 -1
- package/types/dom/standalone.d.ts +2 -1
- package/types/dom/standalone.d.ts.map +1 -1
- package/types/dom/styleTypes.d.ts +63 -84
- package/types/dom/styleTypes.d.ts.map +1 -1
- package/types/eventHandling.d.ts +12 -4
- package/types/eventHandling.d.ts.map +1 -1
- package/types/eventHandling.native.d.ts.map +1 -1
- package/types/helpers/NativeTextBinding.d.ts +11 -0
- package/types/helpers/NativeTextBinding.d.ts.map +1 -0
- package/types/helpers/createDesignSystem.d.ts.map +1 -1
- package/types/helpers/expandStyle.d.ts +1 -0
- package/types/helpers/expandStyle.d.ts.map +1 -1
- package/types/helpers/expandStyles.d.ts.map +1 -1
- package/types/helpers/fluid.d.ts +21 -0
- package/types/helpers/fluid.d.ts.map +1 -0
- package/types/helpers/getCSSStylesAtomic.d.ts +3 -1
- package/types/helpers/getCSSStylesAtomic.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts +2 -1
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/getThemeCSSRules.d.ts.map +1 -1
- package/types/helpers/grammarConfig.d.ts.map +1 -1
- package/types/helpers/insertStyleRule.d.ts.map +1 -1
- package/types/helpers/mainThreadPressEvents.native.d.ts +0 -7
- package/types/helpers/mainThreadPressEvents.native.d.ts.map +1 -1
- package/types/helpers/mergeProps.d.ts +1 -15
- package/types/helpers/mergeProps.d.ts.map +1 -1
- package/types/helpers/nativeOnlyProps.d.ts +0 -1
- package/types/helpers/nativeOnlyProps.d.ts.map +1 -1
- package/types/helpers/nativeTextMetrics.d.ts +16 -0
- package/types/helpers/nativeTextMetrics.d.ts.map +1 -0
- package/types/helpers/normalizeColor.native.d.ts +4 -1
- package/types/helpers/normalizeColor.native.d.ts.map +1 -1
- package/types/helpers/normalizeShadow.native.d.ts +3 -1
- package/types/helpers/normalizeShadow.native.d.ts.map +1 -1
- package/types/helpers/normalizeValueWithProperty.d.ts.map +1 -1
- package/types/helpers/{parseNativeStyle.native.d.ts → parseNativeStyle.d.ts} +1 -1
- package/types/helpers/parseNativeStyle.d.ts.map +1 -0
- package/types/helpers/proxyThemeToParents.d.ts +1 -1
- package/types/helpers/proxyThemeToParents.d.ts.map +1 -1
- package/types/helpers/resolveNativeUnits.d.ts +6 -0
- package/types/helpers/resolveNativeUnits.d.ts.map +1 -0
- package/types/helpers/resolveNativeUnits.native.d.ts +16 -0
- package/types/helpers/resolveNativeUnits.native.d.ts.map +1 -0
- package/types/helpers/resolveRem.native.d.ts +6 -4
- package/types/helpers/resolveRem.native.d.ts.map +1 -1
- package/types/helpers/resolveSizing.d.ts +90 -0
- package/types/helpers/resolveSizing.d.ts.map +1 -0
- package/types/helpers/resolveVariableValue.d.ts.map +1 -1
- package/types/helpers/skipProps.d.ts +0 -1
- package/types/helpers/skipProps.d.ts.map +1 -1
- package/types/helpers/styleFrontend.d.ts +21 -0
- package/types/helpers/styleFrontend.d.ts.map +1 -1
- package/types/helpers/styleProvenance.d.ts +1 -1
- package/types/helpers/styleProvenance.d.ts.map +1 -1
- package/types/helpers/styleStaticConfigCore.d.ts.map +1 -1
- package/types/helpers/styledDynamic.d.ts +1 -1
- package/types/helpers/styledDynamic.d.ts.map +1 -1
- package/types/helpers/themes.d.ts +4 -0
- package/types/helpers/themes.d.ts.map +1 -1
- package/types/helpers/tokenCategories.d.ts +1 -1
- package/types/helpers/tokenCategories.d.ts.map +1 -1
- package/types/helpers/warnOnce.d.ts +1 -0
- package/types/helpers/warnOnce.d.ts.map +1 -1
- package/types/helpers/webPropsToSkip.native.d.ts +6 -2
- package/types/helpers/webPropsToSkip.native.d.ts.map +1 -1
- package/types/helpers/wrapStyleTags.d.ts.map +1 -1
- package/types/hooks/useMedia.d.ts +5 -2
- package/types/hooks/useMedia.d.ts.map +1 -1
- package/types/hooks/useSplitStyles.d.ts.map +1 -1
- package/types/hooks/useThemeState.d.ts.map +1 -1
- package/types/index.d.ts +4 -1
- package/types/index.d.ts.map +1 -1
- package/types/interfaces/RNExclusiveTypes.d.ts +2 -3
- package/types/interfaces/RNExclusiveTypes.d.ts.map +1 -1
- package/types/internal-runtime.d.ts +12 -1
- package/types/internal-runtime.d.ts.map +1 -1
- package/types/style.d.ts.map +1 -1
- package/types/styled.d.ts +7 -4
- package/types/styled.d.ts.map +1 -1
- package/types/types.d.ts +258 -102
- package/types/types.d.ts.map +1 -1
- package/types/views/Theme.d.ts.map +1 -1
- package/dist/cjs/helpers/timer.native.js.map +0 -1
- package/dist/esm/helpers/timer.mjs +0 -13
- package/dist/esm/helpers/timer.mjs.map +0 -1
- package/dist/esm/helpers/timer.native.js +0 -13
- package/dist/esm/helpers/timer.native.js.map +0 -1
- package/src/helpers/timer.ts +0 -9
- package/types/helpers/parseNativeStyle.native.d.ts.map +0 -1
- package/types/helpers/timer.d.ts +0 -2
- package/types/helpers/timer.d.ts.map +0 -1
|
@@ -1,28 +1,33 @@
|
|
|
1
|
+
import { getTransitionResolver } from "@tamagui/animation-helpers/transitionResolver";
|
|
1
2
|
import { isAndroid, isClient, supportsDynamicColorIOS } from "@tamagui/constants";
|
|
2
3
|
import { nonAnimatableStyleProps, stylePropsAll, stylePropsInput, stylePropsText, stylePropsTransform, validStyles } from "@tamagui/helpers";
|
|
3
|
-
import { addTransformValue, createTransformAccumulator, finalizeTransformAccumulator, getTransformPartKeys, removeTransformValue } from "@tamagui/style-grammar/runtime";
|
|
4
|
-
import { getConfig, getFont } from "../config.native.js";
|
|
4
|
+
import { addTransformValue, createTransformAccumulator, finalizeTransformAccumulator, getTransformPartKeys, grammarMaxNonPlatformDepth, namedCssColors, removeTransformValue } from "@tamagui/style-grammar/runtime";
|
|
5
|
+
import { getConfig, getFont, getSetting } from "../config.native.js";
|
|
5
6
|
import { isDevTools } from "../constants/isDevTools.native.js";
|
|
6
7
|
import { defaultComponentStateMounted } from "../defaultComponentState.native.js";
|
|
7
8
|
import { isVariable } from "../createVariable.native.js";
|
|
8
9
|
import { stylePieceSymbol } from "../types.native.js";
|
|
9
10
|
import { addComposition, canGenerateCSS, flushDirectStyles, registerAtomicSlot } from "./getCSSStylesAtomic.native.js";
|
|
10
|
-
import { expandStyle } from "./expandStyle.native.js";
|
|
11
|
+
import { expandStyle, nativeShorthandLogicals } from "./expandStyle.native.js";
|
|
11
12
|
import { classifyBorderComponents, splitComponents, startsValueFunction } from "./borderComponents.native.js";
|
|
12
13
|
import { fixStyles } from "./expandStyles.native.js";
|
|
13
14
|
import { getConfigRevisionState } from "./grammarConfig.native.js";
|
|
14
15
|
import { mediaKeyMatch, mediaState } from "./mediaState.native.js";
|
|
15
16
|
import { getStyleStaticConfig } from "./styleStaticConfig.native.js";
|
|
17
|
+
import { mergeFrontendCondition } from "./styleFrontend.native.js";
|
|
16
18
|
import { nativeTextInputColorProps, normalizeNativeStyle } from "./nativeStyleEngine.native.js";
|
|
17
19
|
import { warnOnce, warnRefusedValue } from "./warnOnce.native.js";
|
|
18
|
-
import { isColorStyleKey } from "./getDynamicVal.native.js";
|
|
20
|
+
import { extractValueFromDynamic, isColorStyleKey } from "./getDynamicVal.native.js";
|
|
19
21
|
import { getDynamicEnv } from "./styledDynamic.native.js";
|
|
20
22
|
import { getRulesForIdentifier } from "./insertStyleRule.native.js";
|
|
21
23
|
import { log } from "./log.native.js";
|
|
22
24
|
import { normalizeColor } from "./normalizeColor.native.js";
|
|
23
25
|
import { normalizeValueWithProperty } from "./normalizeValueWithProperty.native.js";
|
|
26
|
+
import { resolveTextMetrics } from "./nativeTextMetrics.native.js";
|
|
27
|
+
import { isTamaguiElement } from "./isTamaguiElement.native.js";
|
|
24
28
|
import { parseNativeStyle } from "./parseNativeStyle.native.js";
|
|
25
29
|
import { parseNativeTransform } from "./parseNativeTransform.native.js";
|
|
30
|
+
import { resolveNativeUnits } from "./resolveNativeUnits.native.js";
|
|
26
31
|
import { resolveVariableValue } from "./resolveVariableValue.native.js";
|
|
27
32
|
import { HOC_CLASSNAME_MARKER, skipProps } from "./skipProps.native.js";
|
|
28
33
|
import { styleOriginalValues } from "./styleOriginalValues.native.js";
|
|
@@ -33,10 +38,6 @@ import { isStylePiece, isStylePieceCacheable, setStylePieceCompiler, setStylePie
|
|
|
33
38
|
|
|
34
39
|
export * from "./tokenCategories.native.js"
|
|
35
40
|
|
|
36
|
-
function _type_of(obj) {
|
|
37
|
-
"@swc/helpers - typeof";
|
|
38
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
39
|
-
}
|
|
40
41
|
var shouldTrackStyleTokenProvenance = process.env.NODE_ENV === "development" && process.env.TAMAGUI_ENABLE_STYLE_TOKEN_PROVENANCE === "1";
|
|
41
42
|
var conditionValue = 0;
|
|
42
43
|
var conditionPlatform = 1;
|
|
@@ -238,6 +239,7 @@ var passFrontendContainerType = 27;
|
|
|
238
239
|
var passSourceLayer = 28;
|
|
239
240
|
var passParentCursor = 29;
|
|
240
241
|
var passMapSourceKey = 30;
|
|
242
|
+
var passVariantOutput = 31;
|
|
241
243
|
var passFlags = 13;
|
|
242
244
|
var sourceLayerBase = 0;
|
|
243
245
|
var sourceLayerVariant = 1;
|
|
@@ -252,6 +254,9 @@ var passHocFlag = 16;
|
|
|
252
254
|
var passTextFlag = 32;
|
|
253
255
|
var passInputFlag = 64;
|
|
254
256
|
var passAsChildStyleFlag = 128;
|
|
257
|
+
function isRemovedVendorStyleProp(property) {
|
|
258
|
+
return /^(Webkit|Moz|ms)[A-Z]/.test(property) && !(property in stylePropsAll);
|
|
259
|
+
}
|
|
255
260
|
function isValidStyleKey(key, validStyles) {
|
|
256
261
|
return key in validStyles;
|
|
257
262
|
}
|
|
@@ -291,7 +296,6 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
291
296
|
var shouldCheckSkipProps = !noSkip;
|
|
292
297
|
var asChildExceptStyleLike = Boolean(flags & passAsChildStyleFlag);
|
|
293
298
|
var isTextOrInput = isText || isInput;
|
|
294
|
-
var hocParentVariants = isHOC ? parentVariants : void 0;
|
|
295
299
|
var keyInit = keyOg;
|
|
296
300
|
var valInit = valOg;
|
|
297
301
|
if (keyInit === "children") {
|
|
@@ -313,17 +317,24 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
313
317
|
return;
|
|
314
318
|
}
|
|
315
319
|
var resolveClassName = styleFrontend === null || styleFrontend === void 0 ? void 0 : styleFrontend.resolveClassName;
|
|
316
|
-
var
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
320
|
+
var composedProps = null;
|
|
321
|
+
var sink = function(entry2) {
|
|
322
|
+
var property3 = entry2[0];
|
|
323
|
+
var condition2 = entry2[2];
|
|
324
|
+
if (property3.charCodeAt(0) === 95 && property3.charCodeAt(1) === 95) {
|
|
325
|
+
composedProps || (composedProps = {});
|
|
326
|
+
composedProps[property3] = mergeFrontendCondition(composedProps[property3], entry2[1], condition2);
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
if (condition2 !== void 0) {
|
|
330
|
+
if (isValidStyleKey(property3, validStyles)) contributeValue(styleState, property3, entry2[1], void 0, false, condition2);
|
|
331
|
+
else if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${property3}" is not a valid style on this component; the frontend value is dropped.`);
|
|
332
|
+
return;
|
|
326
333
|
}
|
|
334
|
+
if (property3 === "group") pass[passFrontendGroup] = entry2[1];
|
|
335
|
+
else if (property3 === "container") pass[passFrontendContainer] = entry2[1];
|
|
336
|
+
else if (property3 === "containerType") pass[passFrontendContainerType] = entry2[1];
|
|
337
|
+
contributeProp(pass, property3, entry2[1]);
|
|
327
338
|
};
|
|
328
339
|
var start = 0;
|
|
329
340
|
for (var index = 0; index <= valInit.length; index++) {
|
|
@@ -349,17 +360,69 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
349
360
|
}
|
|
350
361
|
start = index + 1;
|
|
351
362
|
}
|
|
363
|
+
if (composedProps) {
|
|
364
|
+
var _styleFrontend_compose;
|
|
365
|
+
var composed = (_styleFrontend_compose = styleFrontend.compose) === null || _styleFrontend_compose === void 0 ? void 0 : _styleFrontend_compose.call(styleFrontend, composedProps);
|
|
366
|
+
for (var property in composed) contributeProp(pass, property, composed[property]);
|
|
367
|
+
}
|
|
352
368
|
}
|
|
353
369
|
return;
|
|
354
370
|
}
|
|
355
371
|
if (keyInit === HOC_CLASSNAME_MARKER) {
|
|
356
|
-
if (valInit
|
|
372
|
+
if (valInit) {
|
|
357
373
|
var _direct;
|
|
358
|
-
var
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
374
|
+
var [hocClassNames, hocSlots] = valInit;
|
|
375
|
+
var direct = styleState;
|
|
376
|
+
var layers = (_direct = direct).flatPropertyLayers || (_direct.flatPropertyLayers = /* @__PURE__ */ new Map());
|
|
377
|
+
for (var property1 in hocClassNames) {
|
|
378
|
+
if (hocSlots === null || hocSlots === void 0 ? void 0 : hocSlots.has(property1)) continue;
|
|
379
|
+
clearDirectStyle(styleState, property1);
|
|
380
|
+
styleState.classNames[property1] = hocClassNames[property1];
|
|
381
|
+
layers.set(property1, pass[passSourceLayer]);
|
|
382
|
+
}
|
|
383
|
+
if (hocSlots) {
|
|
384
|
+
var _direct1;
|
|
385
|
+
var slots = (_direct1 = direct).flatSlots || (_direct1.flatSlots = /* @__PURE__ */ new Map());
|
|
386
|
+
var markerLayer = pass[passSourceLayer];
|
|
387
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
388
|
+
try {
|
|
389
|
+
for (var _iterator = hocSlots[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
390
|
+
var [slot, entries] = _step.value;
|
|
391
|
+
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
|
|
392
|
+
try {
|
|
393
|
+
for (var _iterator1 = entries[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
|
|
394
|
+
var entry = _step1.value;
|
|
395
|
+
pass[passSourceLayer] = Math.max(entry[7] >> 5, sourceLayerResolver);
|
|
396
|
+
if (!ownsSourceLayer(styleState, entry[0], !!entry[2])) continue;
|
|
397
|
+
if (!isHOC && styleState.styleProps.isAnimated && (slot === "transition" || entry[8]) && !(entry[0] in nonAnimatableStyleProps)) {
|
|
398
|
+
var _styleState_animationDriver;
|
|
399
|
+
var property2 = entry[0] === "--t-x" ? "x" : entry[0] === "--t-y" ? "y" : entry[0] === "--t-scale-x" ? "scaleX" : entry[0] === "--t-scale-y" ? "scaleY" : entry[0];
|
|
400
|
+
var value = ((_styleState_animationDriver = styleState.animationDriver) === null || _styleState_animationDriver === void 0 ? void 0 : _styleState_animationDriver.inputStyle) === "value" ? entry[6] : entry[1];
|
|
401
|
+
entry[3] ? contributeValue(styleState, property2, value, entry[6], false, entry[3]) : emitValue(styleState, property2, value, null, entry[6], false);
|
|
402
|
+
} else writeStyleSlot(slots, slot, [...entry], pass[passSourceLayer]);
|
|
403
|
+
}
|
|
404
|
+
} catch (err) {
|
|
405
|
+
_didIteratorError1 = true;
|
|
406
|
+
_iteratorError1 = err;
|
|
407
|
+
} finally {
|
|
408
|
+
try {
|
|
409
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) _iterator1.return();
|
|
410
|
+
} finally {
|
|
411
|
+
if (_didIteratorError1) throw _iteratorError1;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
} catch (err) {
|
|
416
|
+
_didIteratorError = true;
|
|
417
|
+
_iteratorError = err;
|
|
418
|
+
} finally {
|
|
419
|
+
try {
|
|
420
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
|
|
421
|
+
} finally {
|
|
422
|
+
if (_didIteratorError) throw _iteratorError;
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
pass[passSourceLayer] = markerLayer;
|
|
363
426
|
}
|
|
364
427
|
}
|
|
365
428
|
return;
|
|
@@ -387,9 +450,23 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
387
450
|
continue;
|
|
388
451
|
}
|
|
389
452
|
var styleOriginals = shouldTrackStyleTokenProvenance ? styleOriginalValues.get(style) : void 0;
|
|
390
|
-
for (var
|
|
391
|
-
|
|
392
|
-
|
|
453
|
+
for (var authoredKey in style) {
|
|
454
|
+
var value1 = style[authoredKey];
|
|
455
|
+
if (value1 == null) continue;
|
|
456
|
+
var key1 = disableExpandShorthands ? authoredKey : shorthands[authoredKey] || authoredKey;
|
|
457
|
+
var inline = !styleState.styleProps.stylePieceEntries;
|
|
458
|
+
if (inline) {
|
|
459
|
+
if (typeof value1 === "string") {
|
|
460
|
+
var [segments] = getConfigRevisionState(conf).parseFlatValue(value1);
|
|
461
|
+
for (var index2 = 4; index2 < segments.length; index2 += 5) if (!(segments[index2] & 1)) {
|
|
462
|
+
inline = false;
|
|
463
|
+
break;
|
|
464
|
+
}
|
|
465
|
+
} else if (value1 && typeof value1 === "object" && !Array.isArray(value1) && !isVariable(value1) && classifyConditionalObject(value1, styleState) !== 0) inline = false;
|
|
466
|
+
}
|
|
467
|
+
styleState.flatInlineStyleProp = inline;
|
|
468
|
+
contributeValue(styleState, key1, value1, styleOriginals === null || styleOriginals === void 0 ? void 0 : styleOriginals[authoredKey]);
|
|
469
|
+
styleState.flatInlineStyleProp = false;
|
|
393
470
|
}
|
|
394
471
|
}
|
|
395
472
|
pass[passSourceLayer] = layerBeforeStyle;
|
|
@@ -400,18 +477,29 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
400
477
|
var defaultVal = (_defaultProps_keyOg = defaultProps[keyOg]) !== null && _defaultProps_keyOg !== void 0 ? _defaultProps_keyOg : defaultProps[keyInit];
|
|
401
478
|
if (defaultVal !== void 0 && valInit === defaultVal) return;
|
|
402
479
|
}
|
|
480
|
+
if (process.env.NODE_ENV === "development") {
|
|
481
|
+
if (!isValidStyleKey(keyInit, validStyles) && (keyInit === "animation" || !(keyInit in stylePropsAll)) && (!variants || !(keyInit in variants))) {
|
|
482
|
+
var replacement;
|
|
483
|
+
if (keyInit === "animation") replacement = "transition=";
|
|
484
|
+
else if (keyInit === "hoverStyle") replacement = "hover: clause";
|
|
485
|
+
else if (keyInit === "pressStyle") replacement = "press: clause";
|
|
486
|
+
else if (keyInit === "focusStyle") replacement = "focus: clause";
|
|
487
|
+
else if (keyInit === "enterStyle") replacement = "enter: clause";
|
|
488
|
+
else if (keyInit === "exitStyle") replacement = "exit: clause";
|
|
489
|
+
else if (keyInit.charCodeAt(0) === 36 && keyInit.length > 1) replacement = `${keyInit.slice(1)}: clause`;
|
|
490
|
+
if (replacement) warnOnce(`v2-prop:${keyInit}`, `prop "${keyInit}" was removed in v3; use ${replacement}`);
|
|
491
|
+
}
|
|
492
|
+
}
|
|
403
493
|
var isNativeInputColor = isInput && keyInit in nativeTextInputColorProps;
|
|
404
494
|
if (!isNativeInputColor && keyInit in skipProps && shouldSkipDirectProps && !(neverSkipProps === null || neverSkipProps === void 0 ? void 0 : neverSkipProps[keyInit])) if (keyInit === "transition" && typeof valInit === "string") return;
|
|
405
495
|
else return;
|
|
406
496
|
var isValidStyleKeyInit = isValidStyleKey(keyInit, validStyles);
|
|
497
|
+
if (keyInit === "userSelect") {
|
|
498
|
+
if (isText) viewProps.selectable = valInit !== "none";
|
|
499
|
+
return;
|
|
500
|
+
}
|
|
407
501
|
if (!isValidStyleKeyInit) {
|
|
408
|
-
if (
|
|
409
|
-
if (keyInit === "elevationAndroid") return;
|
|
410
|
-
}
|
|
411
|
-
if (keyInit === "userSelect") {
|
|
412
|
-
keyInit = "selectable";
|
|
413
|
-
valInit = valInit !== "none";
|
|
414
|
-
} else if (keyInit === "textOverflow") {
|
|
502
|
+
if (keyInit === "textOverflow") {
|
|
415
503
|
if (isText && valInit === "ellipsis") {
|
|
416
504
|
var _viewProps, _viewProps1;
|
|
417
505
|
var _numberOfLines;
|
|
@@ -422,12 +510,15 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
422
510
|
return;
|
|
423
511
|
} else if (keyInit.startsWith("data-")) return;
|
|
424
512
|
}
|
|
513
|
+
if (pass[passVariantOutput] && !isValidStyleKeyInit && !keyInit.startsWith("aria-") && !(keyInit in stylePropsAll) && !(keyInit in skipProps) && !(variants && keyInit in variants) && !(parentVariants && keyInit in parentVariants) && !(styledContextKeys === null || styledContextKeys === void 0 ? void 0 : styledContextKeys.has(keyInit)) && !(styledContext && keyInit in styledContext)) {
|
|
514
|
+
if (process.env.NODE_ENV === "development") warnOnce(`variant-non-style:${keyInit}`, `a variant set "${keyInit}", which is not a style. Variants hold styles and aria/data attributes only: set "${keyInit}" on the component one level up.`);
|
|
515
|
+
return;
|
|
516
|
+
}
|
|
425
517
|
var isVariant = !isValidStyleKeyInit && variants && keyInit in variants;
|
|
426
518
|
var isStyleProp = isValidStyleKeyInit || isVariant && !noExpand;
|
|
427
519
|
if (isStyleProp && asChildExceptStyleLike) return;
|
|
428
|
-
var shouldPassProp = !isStyleProp && isHOC ||
|
|
429
|
-
var
|
|
430
|
-
var isHOCShouldPassThrough = Boolean(isHOC && (parentVariant || keyInit in skipProps));
|
|
520
|
+
var shouldPassProp = !isStyleProp && isHOC || isHOC && keyInit === "disabled" || parentVariants && keyInit in parentVariants || (inlineProps === null || inlineProps === void 0 ? void 0 : inlineProps.has(keyInit));
|
|
521
|
+
var isHOCShouldPassThrough = isHOC && keyInit in skipProps;
|
|
431
522
|
var shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
|
|
432
523
|
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
433
524
|
console.groupCollapsed(` \u{1F511} ${keyOg}${keyInit !== keyOg ? ` (shorthand for ${keyInit})` : ""} ${shouldPassThrough ? "(pass)" : ""}`);
|
|
@@ -451,7 +542,8 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
451
542
|
if (!isVariant) return;
|
|
452
543
|
}
|
|
453
544
|
if (!isNativeInputColor && shouldCheckSkipProps && !(neverSkipProps === null || neverSkipProps === void 0 ? void 0 : neverSkipProps[keyInit])) {
|
|
454
|
-
|
|
545
|
+
var _getTransitionResolver;
|
|
546
|
+
if (keyInit in skipProps && !(keyInit === "transition" && typeof valInit === "string" && !((_getTransitionResolver = getTransitionResolver()) === null || _getTransitionResolver === void 0 ? void 0 : _getTransitionResolver.resolve(valInit, { animations: driverAnimations }).fused))) {
|
|
455
547
|
if (process.env.NODE_ENV === "development" && debug === "verbose") console.groupEnd();
|
|
456
548
|
return;
|
|
457
549
|
}
|
|
@@ -484,22 +576,22 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
484
576
|
if (valInit === "unset") {
|
|
485
577
|
var expanded = expandStyle(keyInit, valInit, conf.settings.styleCompat || "web");
|
|
486
578
|
clearDirectStyle(styleState, keyInit);
|
|
487
|
-
if (expanded) for (var
|
|
488
|
-
} else contributeValue(styleState, keyInit, valInit, originalOg, !isHostStyleKey);
|
|
579
|
+
if (expanded) for (var index3 = 0; index3 < expanded.length; index3++) clearDirectStyle(styleState, expanded[index3][0]);
|
|
580
|
+
} else contributeValue(styleState, keyInit, valInit, originalOg, !isHostStyleKey || isStyledContextProp && typeof valInit === "boolean");
|
|
489
581
|
return;
|
|
490
582
|
}
|
|
491
583
|
var condition = pass[passParentCursor];
|
|
492
584
|
if (condition) {
|
|
493
585
|
if (isHOC) {
|
|
494
586
|
var previous = viewProps[keyInit];
|
|
495
|
-
var transport = previous &&
|
|
587
|
+
var transport = previous && typeof previous === "object" && !Array.isArray(previous) && "default" in previous ? previous : { default: previous };
|
|
496
588
|
transport[condition[conditionKey]] = valInit;
|
|
497
589
|
viewProps[keyInit] = transport;
|
|
498
590
|
} else if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${keyInit}" is not a valid style on this component; the conditional variant value is dropped.`);
|
|
499
591
|
return;
|
|
500
592
|
}
|
|
501
|
-
if (keyInit in stylePropsAll) {
|
|
502
|
-
if (process.env.NODE_ENV === "development"
|
|
593
|
+
if (keyInit in stylePropsAll || isRemovedVendorStyleProp(keyInit)) {
|
|
594
|
+
if (process.env.NODE_ENV === "development" && false);
|
|
503
595
|
return;
|
|
504
596
|
}
|
|
505
597
|
viewProps[keyInit] = valInit;
|
|
@@ -514,7 +606,7 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
514
606
|
}
|
|
515
607
|
}
|
|
516
608
|
var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, componentContext, groupContext, elementType, startedUnhydrated, debug, animationDriver, styleStaticConfig) {
|
|
517
|
-
var _styleState_flatMediaKeys, _styleState_flatGroupKeys, _styleState_flatGroupMedia, _styleState_style;
|
|
609
|
+
var _staticConfig_Component_staticConfig, _staticConfig_Component, _styleState_flatMediaKeys, _styleState_flatGroupKeys, _styleState_flatGroupMedia, _styleState_flatGroupKeys1, _styleState_flatGroupMedia1, _styleState_style;
|
|
518
610
|
var conf = getConfig();
|
|
519
611
|
styleStaticConfig || (styleStaticConfig = getStyleStaticConfig(staticConfig, conf));
|
|
520
612
|
var driver = animationDriver || (componentContext === null || componentContext === void 0 ? void 0 : componentContext.animationDriver) || conf.animations;
|
|
@@ -528,7 +620,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
528
620
|
var variants = styleStaticConfig.variants;
|
|
529
621
|
var viewProps = {};
|
|
530
622
|
var mediaState$1 = styleProps.mediaState || mediaState;
|
|
531
|
-
var shouldDoClasses =
|
|
623
|
+
var shouldDoClasses = process.env.TAMAGUI_RUNTIME !== "island" && acceptsClassName && false;
|
|
532
624
|
var rulesToInsert = void 0;
|
|
533
625
|
var classNames = {};
|
|
534
626
|
var hasMedia = false;
|
|
@@ -559,6 +651,12 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
559
651
|
animationDriver: resolvedDriver
|
|
560
652
|
};
|
|
561
653
|
styleState.flatStyleStaticConfig = styleStaticConfig;
|
|
654
|
+
var prev = styleProps.prevStyle;
|
|
655
|
+
if (prev) {
|
|
656
|
+
styleState.flatPrevStyle = prev;
|
|
657
|
+
styleState.flatStyleChanged = false;
|
|
658
|
+
styleState.flatStyleKeyCount = 0;
|
|
659
|
+
}
|
|
562
660
|
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`style-state`;
|
|
563
661
|
if (process.env.NODE_ENV === "development" && debug === "verbose" && isClient) {
|
|
564
662
|
if (isDevTools) {
|
|
@@ -584,7 +682,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
584
682
|
var frontendContainer;
|
|
585
683
|
var frontendContainerType;
|
|
586
684
|
var processedProps = props;
|
|
587
|
-
var parentVariants =
|
|
685
|
+
var parentVariants = isHOC ? (_staticConfig_Component = staticConfig.Component) === null || _staticConfig_Component === void 0 ? void 0 : (_staticConfig_Component_staticConfig = _staticConfig_Component.staticConfig) === null || _staticConfig_Component_staticConfig === void 0 ? void 0 : _staticConfig_Component_staticConfig.variants : void 0;
|
|
588
686
|
var defaultProps = asChild ? styleStaticConfig.defaultProps : void 0;
|
|
589
687
|
var asChildExceptStyleLike = asChild === "except-style" || asChild === "except-style-web";
|
|
590
688
|
var containerValue;
|
|
@@ -606,7 +704,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
606
704
|
styledContextKeys,
|
|
607
705
|
(noSkip ? passNoSkipFlag : 0) | (disableExpandShorthands ? passDisableShorthandsFlag : 0) | (noExpand ? passNoExpandFlag : 0) | (noMergeStyle ? passNoMergeFlag : 0) | (isHOC ? passHocFlag : 0) | (isText ? passTextFlag : 0) | (isInput ? passInputFlag : 0) | (asChildExceptStyleLike ? passAsChildStyleFlag : 0),
|
|
608
706
|
debug,
|
|
609
|
-
parentStaticConfig,
|
|
707
|
+
process.env.NODE_ENV === "development" ? parentStaticConfig : void 0,
|
|
610
708
|
defaultProps,
|
|
611
709
|
driverAnimations,
|
|
612
710
|
driverOutputStyle,
|
|
@@ -647,6 +745,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
647
745
|
}
|
|
648
746
|
var resolvers = staticConfig.resolvers;
|
|
649
747
|
if (resolvers && !noExpand) {
|
|
748
|
+
var prevSourceLayer = pass[passSourceLayer];
|
|
650
749
|
pass[passSourceLayer] = sourceLayerResolver;
|
|
651
750
|
var flagsBefore = pass[passFlags];
|
|
652
751
|
pass[passFlags] = flagsBefore | passNoExpandFlag;
|
|
@@ -659,6 +758,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
659
758
|
}
|
|
660
759
|
}
|
|
661
760
|
pass[passFlags] = flagsBefore;
|
|
761
|
+
pass[passSourceLayer] = prevSourceLayer;
|
|
662
762
|
}
|
|
663
763
|
className = pass[passClassName];
|
|
664
764
|
shouldDoClasses = pass[passShouldDoClasses];
|
|
@@ -704,6 +804,8 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
704
804
|
}
|
|
705
805
|
}
|
|
706
806
|
completeResolvedStyles(styleState);
|
|
807
|
+
if ((_styleState_flatGroupKeys1 = styleState.flatGroupKeys) === null || _styleState_flatGroupKeys1 === void 0 ? void 0 : _styleState_flatGroupKeys1.size) pseudoGroups = styleState.flatGroupKeys;
|
|
808
|
+
if ((_styleState_flatGroupMedia1 = styleState.flatGroupMedia) === null || _styleState_flatGroupMedia1 === void 0 ? void 0 : _styleState_flatGroupMedia1.size) mediaGroups = styleState.flatGroupMedia;
|
|
707
809
|
if (styleProps.isStatic) for (var property in classNames) {
|
|
708
810
|
var identifier = classNames[property];
|
|
709
811
|
if (rulesToInsert[identifier]) continue;
|
|
@@ -738,26 +840,47 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
738
840
|
}
|
|
739
841
|
}
|
|
740
842
|
}
|
|
843
|
+
var nativeTextMetrics;
|
|
844
|
+
var _styleState_style2;
|
|
741
845
|
if (viewProps.tabIndex === 0) {
|
|
742
846
|
var _viewProps;
|
|
743
847
|
var _accessible;
|
|
744
848
|
(_accessible = (_viewProps = viewProps).accessible) !== null && _accessible !== void 0 || (_viewProps.accessible = true);
|
|
745
849
|
}
|
|
746
|
-
|
|
747
|
-
|
|
850
|
+
if ((isText || isInput || staticConfig.isDOM) && !isHOC && (styleState.nativeLineHeight !== void 0 || ((_styleState_style2 = styleState.style) === null || _styleState_style2 === void 0 ? void 0 : _styleState_style2.fontSize) !== void 0 || (componentContext === null || componentContext === void 0 ? void 0 : componentContext.parentFontSize) !== void 0 || (componentContext === null || componentContext === void 0 ? void 0 : componentContext.parentLineHeight) !== void 0)) {
|
|
851
|
+
var _parentSplitStyles_nativeTextMetrics;
|
|
852
|
+
var _styleState2;
|
|
853
|
+
var style = (_styleState2 = styleState).style || (_styleState2.style = {});
|
|
854
|
+
var _styleState_nativeLineHeight;
|
|
855
|
+
var lineHeight = (_styleState_nativeLineHeight = styleState.nativeLineHeight) !== null && _styleState_nativeLineHeight !== void 0 ? _styleState_nativeLineHeight : parentSplitStyles === null || parentSplitStyles === void 0 ? void 0 : (_parentSplitStyles_nativeTextMetrics = parentSplitStyles.nativeTextMetrics) === null || _parentSplitStyles_nativeTextMetrics === void 0 ? void 0 : _parentSplitStyles_nativeTextMetrics.lineHeight;
|
|
856
|
+
if (typeof lineHeight === "string") {
|
|
857
|
+
var length = resolveNativeUnits("lineHeight", lineHeight, styleState);
|
|
858
|
+
if (typeof length === "number") lineHeight = `${length}px`;
|
|
859
|
+
}
|
|
860
|
+
nativeTextMetrics = resolveTextMetrics(style, lineHeight, componentContext, styleProps.isStatic, !staticConfig.isDOM && !(processedProps.asChild && isTamaguiElement(processedProps.children)));
|
|
861
|
+
if (staticConfig.isDOM) viewProps.__textMetrics = nativeTextMetrics;
|
|
862
|
+
var directText = styleState;
|
|
863
|
+
var prevTextStyle = directText.flatPrevStyle;
|
|
864
|
+
if (prevTextStyle && !directText.flatStyleChanged) {
|
|
865
|
+
var resolvedTextStyle = styleState.style;
|
|
866
|
+
if (resolvedTextStyle && (resolvedTextStyle.fontSize !== prevTextStyle.fontSize || resolvedTextStyle.lineHeight !== prevTextStyle.lineHeight)) directText.flatStyleChanged = true;
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
var style1 = styleState.style;
|
|
870
|
+
if (style1 === null || style1 === void 0 ? void 0 : style1.fontFamily) {
|
|
748
871
|
var _getFont;
|
|
749
|
-
var faceInfo = (_getFont = getFont(
|
|
872
|
+
var faceInfo = (_getFont = getFont(style1.fontFamily)) === null || _getFont === void 0 ? void 0 : _getFont.face;
|
|
750
873
|
if (faceInfo) {
|
|
751
874
|
var _faceInfo_style_fontWeight_, _faceInfo_style_fontWeight;
|
|
752
|
-
var overrideFace = (_faceInfo_style_fontWeight = faceInfo[
|
|
875
|
+
var overrideFace = (_faceInfo_style_fontWeight = faceInfo[style1.fontWeight]) === null || _faceInfo_style_fontWeight === void 0 ? void 0 : (_faceInfo_style_fontWeight_ = _faceInfo_style_fontWeight[style1.fontStyle || "normal"]) === null || _faceInfo_style_fontWeight_ === void 0 ? void 0 : _faceInfo_style_fontWeight_.val;
|
|
753
876
|
if (overrideFace) {
|
|
754
|
-
|
|
877
|
+
style1.fontFamily = overrideFace;
|
|
755
878
|
styleState.fontFamily = overrideFace;
|
|
756
|
-
delete
|
|
757
|
-
delete
|
|
879
|
+
delete style1.fontWeight;
|
|
880
|
+
delete style1.fontStyle;
|
|
758
881
|
}
|
|
759
882
|
}
|
|
760
|
-
if (process.env.NODE_ENV === "development" && debug && debug !== "profile") log(`Found fontFamily native: ${
|
|
883
|
+
if (process.env.NODE_ENV === "development" && debug && debug !== "profile") log(`Found fontFamily native: ${style1.fontFamily}`, faceInfo);
|
|
761
884
|
}
|
|
762
885
|
if (styleState.style) styleState.style = normalizeNativeStyle(styleState.style);
|
|
763
886
|
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-pre-result`;
|
|
@@ -773,6 +896,56 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
773
896
|
}
|
|
774
897
|
if (hasProvenance) setStyleTokenProvenance(styleState.style, provenance);
|
|
775
898
|
}
|
|
899
|
+
var direct = styleState;
|
|
900
|
+
var prevStyle = direct.flatPrevStyle;
|
|
901
|
+
if (prevStyle && styleState.style && !direct.flatStyleChanged && Object.keys(prevStyle).length === Object.keys(styleState.style).length) {
|
|
902
|
+
var previousTransform = prevStyle.transform;
|
|
903
|
+
var nextTransform = styleState.style.transform;
|
|
904
|
+
var transformMatches = previousTransform === nextTransform;
|
|
905
|
+
if (!transformMatches && Array.isArray(previousTransform) && Array.isArray(nextTransform) && previousTransform.length === nextTransform.length) {
|
|
906
|
+
transformMatches = true;
|
|
907
|
+
for (var index1 = 0; index1 < nextTransform.length; index1++) {
|
|
908
|
+
var previousPart = previousTransform[index1];
|
|
909
|
+
var nextPart = nextTransform[index1];
|
|
910
|
+
if (previousPart === nextPart) continue;
|
|
911
|
+
if (!previousPart || !nextPart || typeof previousPart !== "object" || typeof nextPart !== "object") {
|
|
912
|
+
transformMatches = false;
|
|
913
|
+
break;
|
|
914
|
+
}
|
|
915
|
+
var keys = Object.keys(nextPart);
|
|
916
|
+
if (keys.length !== Object.keys(previousPart).length) {
|
|
917
|
+
transformMatches = false;
|
|
918
|
+
break;
|
|
919
|
+
}
|
|
920
|
+
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
|
|
921
|
+
try {
|
|
922
|
+
var _loop = function() {
|
|
923
|
+
var key9 = _step1.value;
|
|
924
|
+
var previousValue = previousPart[key9];
|
|
925
|
+
var nextValue = nextPart[key9];
|
|
926
|
+
if (previousValue !== nextValue && !(Array.isArray(previousValue) && Array.isArray(nextValue) && previousValue.length === nextValue.length && nextValue.every(function(value, valueIndex) {
|
|
927
|
+
return value === previousValue[valueIndex];
|
|
928
|
+
}))) {
|
|
929
|
+
transformMatches = false;
|
|
930
|
+
return "break";
|
|
931
|
+
}
|
|
932
|
+
};
|
|
933
|
+
for (var _iterator1 = keys[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) if (_loop() === "break") break;
|
|
934
|
+
} catch (err) {
|
|
935
|
+
_didIteratorError1 = true;
|
|
936
|
+
_iteratorError1 = err;
|
|
937
|
+
} finally {
|
|
938
|
+
try {
|
|
939
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) _iterator1.return();
|
|
940
|
+
} finally {
|
|
941
|
+
if (_didIteratorError1) throw _iteratorError1;
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
if (!transformMatches) break;
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
if (transformMatches) styleState.style = prevStyle;
|
|
948
|
+
}
|
|
776
949
|
var result = {
|
|
777
950
|
hasMedia,
|
|
778
951
|
fontFamily: styleState.fontFamily,
|
|
@@ -784,6 +957,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
784
957
|
mediaGroups,
|
|
785
958
|
overriddenContextProps: styleState.overriddenContextProps
|
|
786
959
|
};
|
|
960
|
+
if (nativeTextMetrics) result.nativeTextMetrics = nativeTextMetrics;
|
|
787
961
|
if (effectiveTransition != null) result.effectiveTransition = effectiveTransition;
|
|
788
962
|
if (conditionalStates) result.programStates = conditionalStates;
|
|
789
963
|
if (usesSafeArea) result.usesSafeArea = true;
|
|
@@ -799,8 +973,8 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
799
973
|
if (frontendContainerType !== void 0) result.frontendContainerType = frontendContainerType;
|
|
800
974
|
if (!noMergeStyle) {
|
|
801
975
|
if (!asChildExceptStyleLike) {
|
|
802
|
-
var
|
|
803
|
-
if (
|
|
976
|
+
var style2 = styleState.style;
|
|
977
|
+
if (style2) viewProps.style = style2;
|
|
804
978
|
}
|
|
805
979
|
}
|
|
806
980
|
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
@@ -828,7 +1002,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
828
1002
|
var stylePieceStaticConfig = {
|
|
829
1003
|
acceptsClassName: true,
|
|
830
1004
|
isText: true,
|
|
831
|
-
validStyles:
|
|
1005
|
+
validStyles: stylePropsInput
|
|
832
1006
|
};
|
|
833
1007
|
var compileStylePieceRuntime = function(piece, layer) {};
|
|
834
1008
|
setStylePieceCompiler(compileStylePieceRuntime);
|
|
@@ -855,6 +1029,34 @@ function resolveStylePiece(styleState, piece) {
|
|
|
855
1029
|
themeCache.set(theme, resolved);
|
|
856
1030
|
return resolved;
|
|
857
1031
|
}
|
|
1032
|
+
function writeStyleSlot(slots, slot, source, sourceLayer) {
|
|
1033
|
+
var list = slots.get(slot);
|
|
1034
|
+
if (!list) slots.set(slot, list = []);
|
|
1035
|
+
var flags = source[7] & 31;
|
|
1036
|
+
var identity = source[3];
|
|
1037
|
+
var condition = source[2];
|
|
1038
|
+
for (var index = 0; index < list.length; index++) {
|
|
1039
|
+
var entry = list[index];
|
|
1040
|
+
var entryFlags = entry[7] & 31;
|
|
1041
|
+
if ((entryFlags & (recordInline | recordCSS)) !== (flags & (recordInline | recordCSS))) {
|
|
1042
|
+
if (sourceLayer === sourceLayerStyle && entry[7] >> 5 === sourceLayerStyle && entry[0] === source[0] && !condition && !entry[2]) list.splice(index--, 1);
|
|
1043
|
+
continue;
|
|
1044
|
+
}
|
|
1045
|
+
if (entry[0] !== source[0]) continue;
|
|
1046
|
+
if (flags & recordDefault) {
|
|
1047
|
+
if (!(entryFlags & recordDefault) && (!entry[2] || entry[3] === identity)) return;
|
|
1048
|
+
} else if (entryFlags & recordDefault && (!condition || entry[3] === identity)) {
|
|
1049
|
+
list.splice(index--, 1);
|
|
1050
|
+
continue;
|
|
1051
|
+
}
|
|
1052
|
+
if (entry[3] === identity) {
|
|
1053
|
+
list.splice(index, 1);
|
|
1054
|
+
break;
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
source[7] = flags | sourceLayer << 5;
|
|
1058
|
+
list.push(source);
|
|
1059
|
+
}
|
|
858
1060
|
function mergeStyle(styleState, key, val) {
|
|
859
1061
|
arguments.length > 3 && arguments[3] !== void 0 && arguments[3];
|
|
860
1062
|
var originalVal = arguments.length > 4 ? arguments[4] : void 0;
|
|
@@ -874,10 +1076,24 @@ function mergeStyle(styleState, key, val) {
|
|
|
874
1076
|
addTransformValue(styleState.transformAccumulator, key, val);
|
|
875
1077
|
} else {
|
|
876
1078
|
var out = val;
|
|
1079
|
+
if (key === "lineHeight") styleState.nativeLineHeight = typeof out === "number" && isVariable(originalVal) && typeof originalVal.val === "number" ? `${out}px` : out;
|
|
1080
|
+
else if (typeof out === "string") {
|
|
1081
|
+
if (out.includes("cqi") || out.includes("cqw")) {
|
|
1082
|
+
var _styleState2, _styleState3;
|
|
1083
|
+
((_styleState2 = styleState).flatGroupKeys || (_styleState2.flatGroupKeys = /* @__PURE__ */ new Set())).add("@");
|
|
1084
|
+
((_styleState3 = styleState).flatGroupMedia || (_styleState3.flatGroupMedia = /* @__PURE__ */ new Set())).add("@");
|
|
1085
|
+
}
|
|
1086
|
+
out = resolveNativeUnits(key, out, styleState);
|
|
1087
|
+
}
|
|
877
1088
|
if (staticConfig.isInput && key in nativeTextInputColorProps) viewProps[nativeTextInputColorProps[key]] = out;
|
|
878
1089
|
else {
|
|
879
|
-
var
|
|
880
|
-
|
|
1090
|
+
var _styleState4;
|
|
1091
|
+
var direct = styleState;
|
|
1092
|
+
if (direct.flatPrevStyle) {
|
|
1093
|
+
direct.flatStyleKeyCount = (direct.flatStyleKeyCount || 0) + 1;
|
|
1094
|
+
if (!direct.flatStyleChanged && direct.flatPrevStyle[key] !== out) direct.flatStyleChanged = true;
|
|
1095
|
+
}
|
|
1096
|
+
(_styleState4 = styleState).style || (_styleState4.style = {});
|
|
881
1097
|
styleState.style[key] = out;
|
|
882
1098
|
if (shouldTrackStyleTokenProvenance) recordStyleTokenProvenance(styleState, key, originalVal);
|
|
883
1099
|
}
|
|
@@ -888,8 +1104,8 @@ function recordStyleTokenProvenance(styleState, key, originalVal) {
|
|
|
888
1104
|
var tokenName = typeof originalVal === "string" ? originalVal : "";
|
|
889
1105
|
if (tokenName) {
|
|
890
1106
|
var slash = tokenName.lastIndexOf("/");
|
|
891
|
-
var opacity = slash === -1 ? NaN :
|
|
892
|
-
if (
|
|
1107
|
+
var opacity = slash === -1 ? NaN : +tokenName.slice(slash + 1);
|
|
1108
|
+
if (opacity % 1 === 0 && opacity >= 0 && opacity <= 100) tokenName = tokenName.slice(0, slash);
|
|
893
1109
|
}
|
|
894
1110
|
if (tokenName !== "" && (tokenName in styleState.theme || tokenName in (((_styleState_conf_themes = styleState.conf.themes) === null || _styleState_conf_themes === void 0 ? void 0 : _styleState_conf_themes[styleState.flatThemeName || ""]) || {}) || Object.values(styleState.conf.tokensParsed).some(function(category) {
|
|
895
1111
|
return tokenName in category;
|
|
@@ -940,31 +1156,32 @@ var recordDefault = 8;
|
|
|
940
1156
|
var recordCSS = 16;
|
|
941
1157
|
function writeStyleRecord(state, property, value, cursor, original, flags) {
|
|
942
1158
|
var conditionOverride = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : -1;
|
|
943
|
-
var
|
|
1159
|
+
var _direct_flatPass, _direct_flatPass1;
|
|
944
1160
|
var _direct;
|
|
945
1161
|
var condition = conditionOverride !== -1 ? conditionOverride : cursor ? cursor[conditionValue] : 0;
|
|
946
1162
|
var identity = cursor ? cursor[conditionKey] : "";
|
|
947
|
-
|
|
948
|
-
|
|
1163
|
+
if (value === "unset" && identity !== "") {
|
|
1164
|
+
value = void 0;
|
|
1165
|
+
original = void 0;
|
|
1166
|
+
flags |= recordRetract;
|
|
1167
|
+
}
|
|
1168
|
+
var direct = state;
|
|
1169
|
+
var slots = (_direct = direct).flatSlots || (_direct.flatSlots = /* @__PURE__ */ new Map());
|
|
1170
|
+
var sourceLayer = ((_direct_flatPass = direct.flatPass) === null || _direct_flatPass === void 0 ? void 0 : _direct_flatPass[passSourceLayer]) || 0;
|
|
1171
|
+
if (direct.flatInlineStyleProp) flags |= recordInline;
|
|
1172
|
+
var cssSlot = property.startsWith("transition") ? "transition" : property;
|
|
1173
|
+
var slot = flags & recordInline && cssSlot !== property ? property : cssSlot;
|
|
949
1174
|
var list = slots.get(slot);
|
|
950
1175
|
if (!list) slots.set(slot, list = []);
|
|
951
|
-
|
|
952
|
-
var
|
|
953
|
-
var
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
if (!(entryFlags & recordDefault) && (!entry[2] || entry[3] === identity)) return;
|
|
958
|
-
} else if (entryFlags & recordDefault && (!condition || entry[3] === identity)) {
|
|
959
|
-
list.splice(index--, 1);
|
|
960
|
-
continue;
|
|
961
|
-
}
|
|
962
|
-
if (entry[3] === identity) {
|
|
963
|
-
list.splice(index, 1);
|
|
964
|
-
break;
|
|
1176
|
+
if (sourceLayer === sourceLayerStyle && !condition) {
|
|
1177
|
+
var other = slot === cssSlot ? list : slots.get(flags & recordInline ? cssSlot : property);
|
|
1178
|
+
if (other) for (var index = 0; index < other.length; index++) {
|
|
1179
|
+
var entry = other[index];
|
|
1180
|
+
var entryFlags = entry[7];
|
|
1181
|
+
if (entry[0] === property && !entry[2] && entryFlags >> 5 === sourceLayerStyle && (entryFlags & (recordInline | recordCSS)) !== (flags & (recordInline | recordCSS))) other.splice(index--, 1);
|
|
965
1182
|
}
|
|
966
1183
|
}
|
|
967
|
-
|
|
1184
|
+
writeStyleSlot(slots, slot, [
|
|
968
1185
|
property,
|
|
969
1186
|
value,
|
|
970
1187
|
condition,
|
|
@@ -972,8 +1189,10 @@ function writeStyleRecord(state, property, value, cursor, original, flags) {
|
|
|
972
1189
|
cursor ? cursor[conditionSelector] : "",
|
|
973
1190
|
cursor ? cursor[conditionWrappers] : void 0,
|
|
974
1191
|
original,
|
|
975
|
-
flags
|
|
976
|
-
|
|
1192
|
+
flags,
|
|
1193
|
+
void 0,
|
|
1194
|
+
!sourceLayer && ((_direct_flatPass1 = direct.flatPass) === null || _direct_flatPass1 === void 0 ? void 0 : _direct_flatPass1[passVariantOutput])
|
|
1195
|
+
], sourceLayer);
|
|
977
1196
|
}
|
|
978
1197
|
function streamWriteInline(state, property, value, cursor, original) {
|
|
979
1198
|
var normalize = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : property === "lineHeight", conditionOverride = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : -1, force = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : false;
|
|
@@ -981,6 +1200,7 @@ function streamWriteInline(state, property, value, cursor, original) {
|
|
|
981
1200
|
}
|
|
982
1201
|
function completeResolvedStyles(state) {
|
|
983
1202
|
var merge = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : mergeStyle;
|
|
1203
|
+
var _direct;
|
|
984
1204
|
var direct = state;
|
|
985
1205
|
var shadow = direct.flatWebShadow;
|
|
986
1206
|
if (shadow && (direct.flatBoxShadowSequence || 0) <= shadow[4]) {
|
|
@@ -1003,6 +1223,7 @@ function completeResolvedStyles(state) {
|
|
|
1003
1223
|
}
|
|
1004
1224
|
var slots = direct.flatSlots;
|
|
1005
1225
|
if (!slots) return;
|
|
1226
|
+
var capture = state.staticConfig.isHOC ? (_direct = direct).flatCapturedSlots || (_direct.flatCapturedSlots = /* @__PURE__ */ new Map()) : void 0;
|
|
1006
1227
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
1007
1228
|
try {
|
|
1008
1229
|
for (var _iterator = slots[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
@@ -1034,7 +1255,45 @@ function completeResolvedStyles(state) {
|
|
|
1034
1255
|
}
|
|
1035
1256
|
}
|
|
1036
1257
|
}
|
|
1037
|
-
if (cssEntries)
|
|
1258
|
+
if (cssEntries) {
|
|
1259
|
+
registerAtomicSlot(direct, property, cssEntries);
|
|
1260
|
+
if (capture) {
|
|
1261
|
+
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
|
|
1262
|
+
try {
|
|
1263
|
+
for (var _iterator1 = cssEntries[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
|
|
1264
|
+
var entry1 = _step1.value;
|
|
1265
|
+
entry1[7] = entry1[7] | recordCSS;
|
|
1266
|
+
if (!(entry1[2] & 12)) continue;
|
|
1267
|
+
var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
|
|
1268
|
+
try {
|
|
1269
|
+
for (var _iterator2 = cssEntries[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
|
1270
|
+
var sibling = _step2.value;
|
|
1271
|
+
if (sibling[0] === entry1[0]) sibling[8] = true;
|
|
1272
|
+
}
|
|
1273
|
+
} catch (err) {
|
|
1274
|
+
_didIteratorError2 = true;
|
|
1275
|
+
_iteratorError2 = err;
|
|
1276
|
+
} finally {
|
|
1277
|
+
try {
|
|
1278
|
+
if (!_iteratorNormalCompletion2 && _iterator2.return != null) _iterator2.return();
|
|
1279
|
+
} finally {
|
|
1280
|
+
if (_didIteratorError2) throw _iteratorError2;
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
} catch (err) {
|
|
1285
|
+
_didIteratorError1 = true;
|
|
1286
|
+
_iteratorError1 = err;
|
|
1287
|
+
} finally {
|
|
1288
|
+
try {
|
|
1289
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) _iterator1.return();
|
|
1290
|
+
} finally {
|
|
1291
|
+
if (_didIteratorError1) throw _iteratorError1;
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
capture.set(property, cssEntries);
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1038
1297
|
if (inlineWinner) if (inlineWinner[7] & recordRetract) {
|
|
1039
1298
|
if (state.style) delete state.style[inlineWinner[0]];
|
|
1040
1299
|
} else merge(state, inlineWinner[0], inlineWinner[1], !(inlineWinner[7] & recordNormalize), inlineWinner[6] !== void 0 ? inlineWinner[6] : inlineWinner[1]);
|
|
@@ -1071,7 +1330,7 @@ function emitUnderCondition(state, property, value, cursor, originalValue, conte
|
|
|
1071
1330
|
return condition;
|
|
1072
1331
|
}
|
|
1073
1332
|
var formatScanFailure = function(failure, source, failureIndex) {
|
|
1074
|
-
return failure === "invalid-character" ? `"${source[failureIndex]}" would end the declaration or rule` : failure === "unterminated-string" ? "an unterminated string" : failure === "unterminated-comment" ? "an unterminated \"/*\" comment" : failure === "stray-comment-close" ? "a stray \"*/\"" : "an unterminated \"(\"";
|
|
1333
|
+
return failure === "invalid-character" ? `"${source[failureIndex]}" would end the declaration or rule` : failure === "unterminated-string" ? "an unterminated string" : failure === "unterminated-comment" ? "an unterminated \"/*\" comment" : failure === "stray-comment-close" ? "a stray \"*/\"" : failure === "over-deep-clause" ? `a clause with more than ${grammarMaxNonPlatformDepth} non-platform conditions` : "an unterminated \"(\"";
|
|
1075
1334
|
};
|
|
1076
1335
|
var warnScanFailure = function(property, source, failure, failureIndex) {
|
|
1077
1336
|
if (process.env.NODE_ENV === "development") warnRefusedValue(property, source, formatScanFailure(failure, source, failureIndex));
|
|
@@ -1097,17 +1356,29 @@ var valueCaches = /* @__PURE__ */ new WeakMap();
|
|
|
1097
1356
|
var valueCacheEntries = 0;
|
|
1098
1357
|
var valueCacheRoot = {};
|
|
1099
1358
|
var parsedSlices = /* @__PURE__ */ new WeakMap();
|
|
1100
|
-
var
|
|
1359
|
+
var cssWideColorKeywords = /* @__PURE__ */ new Set([
|
|
1360
|
+
"inherit",
|
|
1361
|
+
"initial",
|
|
1362
|
+
"unset",
|
|
1363
|
+
"revert",
|
|
1364
|
+
"revert-layer",
|
|
1365
|
+
"currentcolor",
|
|
1366
|
+
"transparent"
|
|
1367
|
+
]);
|
|
1368
|
+
var shadowRecipeProperties = /* @__PURE__ */ new Set([
|
|
1369
|
+
"boxShadow",
|
|
1370
|
+
"textShadow",
|
|
1371
|
+
"filter"
|
|
1372
|
+
]);
|
|
1101
1373
|
function configuredValue(state, property, raw) {
|
|
1102
|
-
var embedded = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false;
|
|
1103
|
-
var _maps;
|
|
1374
|
+
var embedded = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false, nativeColors = arguments.length > 4 ? arguments[4] : void 0;
|
|
1104
1375
|
var grammar = getConfigRevisionState(state.conf);
|
|
1105
1376
|
var name = raw;
|
|
1106
1377
|
var opacity;
|
|
1107
1378
|
var slash = raw.lastIndexOf("/");
|
|
1108
1379
|
if (slash > 0) {
|
|
1109
|
-
var amount =
|
|
1110
|
-
if (
|
|
1380
|
+
var amount = +raw.slice(slash + 1);
|
|
1381
|
+
if (amount % 1 === 0 && amount >= 0 && amount <= 100) {
|
|
1111
1382
|
name = raw.slice(0, slash);
|
|
1112
1383
|
opacity = amount;
|
|
1113
1384
|
}
|
|
@@ -1117,36 +1388,33 @@ function configuredValue(state, property, raw) {
|
|
|
1117
1388
|
state.flatUsesSafeArea = true;
|
|
1118
1389
|
return safeArea;
|
|
1119
1390
|
}
|
|
1120
|
-
var fontProperty =
|
|
1121
|
-
if (fontProperty === void 0) {
|
|
1122
|
-
fontProperty = property.startsWith("font") || property === "lineHeight" || property === "letterSpacing";
|
|
1123
|
-
fontProperties.set(property, fontProperty);
|
|
1124
|
-
}
|
|
1125
|
-
var revision = grammar.revision;
|
|
1126
|
-
if (state.conf !== valueCacheConf || revision !== valueCacheRevision) {
|
|
1127
|
-
valueCacheConf = state.conf;
|
|
1128
|
-
valueCacheRevision = revision;
|
|
1129
|
-
valueCaches = /* @__PURE__ */ new WeakMap();
|
|
1130
|
-
valueCacheEntries = 0;
|
|
1131
|
-
state.flatValueScope = void 0;
|
|
1132
|
-
}
|
|
1391
|
+
var fontProperty = property.startsWith("font") || property === "lineHeight" || property === "letterSpacing";
|
|
1133
1392
|
var resolveValues = state.styleProps.resolveValues;
|
|
1134
|
-
var
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
var
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1393
|
+
var byRaw;
|
|
1394
|
+
if (!fontProperty && !nativeColors) {
|
|
1395
|
+
var _maps;
|
|
1396
|
+
var revision = grammar.revision;
|
|
1397
|
+
if (state.conf !== valueCacheConf || revision !== valueCacheRevision) {
|
|
1398
|
+
valueCacheConf = state.conf;
|
|
1399
|
+
valueCacheRevision = revision;
|
|
1400
|
+
valueCaches = /* @__PURE__ */ new WeakMap();
|
|
1401
|
+
valueCacheEntries = 0;
|
|
1402
|
+
state.flatValueScope = void 0;
|
|
1403
|
+
}
|
|
1404
|
+
var direct = state;
|
|
1405
|
+
var scope = direct.flatValueScope;
|
|
1406
|
+
if (scope === void 0) {
|
|
1407
|
+
var themeObject = state.theme && typeof state.theme === "object" ? state.theme : valueCacheRoot;
|
|
1408
|
+
var byScope = valueCaches.get(themeObject);
|
|
1409
|
+
if (!byScope) valueCaches.set(themeObject, byScope = /* @__PURE__ */ new Map());
|
|
1410
|
+
var scopeKey = `${state.flatThemeName || ""}${resolveValues}`;
|
|
1411
|
+
scope = byScope.get(scopeKey);
|
|
1412
|
+
if (!scope) byScope.set(scopeKey, scope = /* @__PURE__ */ new Map());
|
|
1413
|
+
direct.flatValueScope = scope;
|
|
1414
|
+
}
|
|
1415
|
+
var maps = scope.get(property);
|
|
1416
|
+
if (maps === void 0) scope.set(property, maps = { direct: /* @__PURE__ */ new Map() });
|
|
1417
|
+
byRaw = embedded ? (_maps = maps).embedded || (_maps.embedded = /* @__PURE__ */ new Map()) : maps.direct;
|
|
1150
1418
|
var known = byRaw.get(raw);
|
|
1151
1419
|
if (known !== void 0 || byRaw.has(raw)) return known;
|
|
1152
1420
|
}
|
|
@@ -1187,25 +1455,108 @@ function configuredValue(state, property, raw) {
|
|
|
1187
1455
|
}
|
|
1188
1456
|
if (process.env.NODE_ENV === "development") {
|
|
1189
1457
|
var _state_conf_tokensParsed_color1;
|
|
1190
|
-
var category1 = grammar.tokenCategory(property);
|
|
1191
|
-
if (category1 && category1 !== "color" && ((_state_conf_tokensParsed_color1 = state.conf.tokensParsed.color) === null || _state_conf_tokensParsed_color1 === void 0 ? void 0 : _state_conf_tokensParsed_color1[name])) warnOnce(`"${name}" contributes to "color", not "${property}"`);
|
|
1458
|
+
var category1 = grammar.tokenCategory(property) || grammar.tokenCategory(state.conf.shorthands[property] || property);
|
|
1459
|
+
if (category1 && category1 !== "color" && category1 !== "boxShadow" && category1 !== "textShadow" && ((_state_conf_tokensParsed_color1 = state.conf.tokensParsed.color) === null || _state_conf_tokensParsed_color1 === void 0 ? void 0 : _state_conf_tokensParsed_color1[name])) warnOnce(`"${name}" contributes to "color", not "${property}"`);
|
|
1460
|
+
if (!value && !fontProperty) {
|
|
1461
|
+
if (name.charCodeAt(0) === 36 || raw.charCodeAt(0) === 36) {
|
|
1462
|
+
var suggested = name.charCodeAt(0) === 36 ? name.slice(1) : raw.slice(1);
|
|
1463
|
+
warnOnce(`v2-token:${property}=${raw}`, `${property}="${raw}": v3 tokens have no "$" prefix, did you mean "${suggested}"?`);
|
|
1464
|
+
} else if ((category1 === "size" || category1 === "space" || category1 === "radius" || category1 === "zIndex") && /^-?\d+(?:\.\d+)?$/.test(name)) {
|
|
1465
|
+
var nearest;
|
|
1466
|
+
var minDistance = Infinity;
|
|
1467
|
+
var rawNum = Number(name);
|
|
1468
|
+
var tokens = category1 ? state.conf.tokensParsed[category1] : void 0;
|
|
1469
|
+
if (tokens && Number.isFinite(rawNum)) for (var key in tokens) {
|
|
1470
|
+
var _tokens_key;
|
|
1471
|
+
var val = (_tokens_key = tokens[key]) === null || _tokens_key === void 0 ? void 0 : _tokens_key.val;
|
|
1472
|
+
var valNum = typeof val === "number" ? val : Number(val);
|
|
1473
|
+
if (Number.isFinite(valNum)) {
|
|
1474
|
+
var dist = Math.abs(valNum - rawNum);
|
|
1475
|
+
if (dist < minDistance) {
|
|
1476
|
+
minDistance = dist;
|
|
1477
|
+
nearest = key;
|
|
1478
|
+
}
|
|
1479
|
+
}
|
|
1480
|
+
}
|
|
1481
|
+
if (nearest) warnOnce(`numeric-token:${property}=${raw}`, `${property}="${raw}" was passed to CSS as-is${category1 === "zIndex" ? "" : " with px units"}${nearest ? `; nearest token is "${nearest}"` : ""}`);
|
|
1482
|
+
} else if (category1 === "color" && /^[a-zA-Z0-9-]+$/.test(name) && /[a-zA-Z]/.test(name)) {
|
|
1483
|
+
var lower = name.toLowerCase();
|
|
1484
|
+
if (!namedCssColors.has(lower) && !cssWideColorKeywords.has(lower)) {
|
|
1485
|
+
var themeKeys = [];
|
|
1486
|
+
if (state.theme && typeof state.theme === "object") for (var k in state.theme) themeKeys.push(k);
|
|
1487
|
+
if (state.conf.themes) {
|
|
1488
|
+
var active = state.conf.themes[state.flatThemeName || ""];
|
|
1489
|
+
if (active) for (var k1 in active) themeKeys.push(k1);
|
|
1490
|
+
else for (var t in state.conf.themes) for (var k2 in state.conf.themes[t]) themeKeys.push(k2);
|
|
1491
|
+
}
|
|
1492
|
+
var bestMatch;
|
|
1493
|
+
var minDistance1 = 3;
|
|
1494
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
1495
|
+
try {
|
|
1496
|
+
for (var _iterator = themeKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
1497
|
+
var key1 = _step.value;
|
|
1498
|
+
if (Math.abs(key1.length - name.length) > 2) continue;
|
|
1499
|
+
var m = name.length;
|
|
1500
|
+
var n = key1.length;
|
|
1501
|
+
var d = [];
|
|
1502
|
+
for (var i = 0; i <= m; i++) d[i] = i;
|
|
1503
|
+
for (var j = 1; j <= n; j++) {
|
|
1504
|
+
var prev = d[0];
|
|
1505
|
+
d[0] = j;
|
|
1506
|
+
for (var i1 = 1; i1 <= m; i1++) {
|
|
1507
|
+
var temp = d[i1];
|
|
1508
|
+
d[i1] = name[i1 - 1] === key1[j - 1] ? prev : Math.min(prev, d[i1], d[i1 - 1]) + 1;
|
|
1509
|
+
prev = temp;
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
var dist1 = d[m];
|
|
1513
|
+
if (dist1 <= 2 && dist1 < minDistance1) {
|
|
1514
|
+
minDistance1 = dist1;
|
|
1515
|
+
bestMatch = key1;
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
} catch (err) {
|
|
1519
|
+
_didIteratorError = true;
|
|
1520
|
+
_iteratorError = err;
|
|
1521
|
+
} finally {
|
|
1522
|
+
try {
|
|
1523
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
|
|
1524
|
+
} finally {
|
|
1525
|
+
if (_didIteratorError) throw _iteratorError;
|
|
1526
|
+
}
|
|
1527
|
+
}
|
|
1528
|
+
warnOnce(`unknown-color:${property}=${raw}`, bestMatch ? `unknown color "${name}", did you mean "${bestMatch}"?` : `unknown color "${name}"`);
|
|
1529
|
+
}
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1192
1532
|
}
|
|
1193
1533
|
var out = raw;
|
|
1194
1534
|
if (isVariable(value)) {
|
|
1195
|
-
out = resolveValues === "except-theme" && fromTheme ? `${THEME_REF_PREFIX}${lookupName}${opacity !== void 0 ? `/${opacity}` : ""}` : resolveVariableValue(property, value, resolveValues);
|
|
1535
|
+
out = resolveValues === "except-theme" && fromTheme ? `${THEME_REF_PREFIX}${lookupName}${opacity !== void 0 ? `/${opacity}` : ""}` : resolveVariableValue(nativeColors ? "color" : property, value, resolveValues);
|
|
1196
1536
|
if (opacity !== void 0) {
|
|
1197
1537
|
var _normalizeColor;
|
|
1198
1538
|
out = (_normalizeColor = normalizeColor(out, opacity / 100)) !== null && _normalizeColor !== void 0 ? _normalizeColor : out;
|
|
1199
1539
|
}
|
|
1200
1540
|
}
|
|
1541
|
+
if (nativeColors && out && typeof out === "object") {
|
|
1542
|
+
var reference = `__tamagui_native_color_${nativeColors.size}`;
|
|
1543
|
+
nativeColors.set(reference, out);
|
|
1544
|
+
out = reference;
|
|
1545
|
+
}
|
|
1201
1546
|
if (embedded && out === raw) {
|
|
1202
1547
|
var usedSafeArea = state.flatUsesSafeArea;
|
|
1203
1548
|
out = grammar.embeddedTokens(raw, function(word) {
|
|
1204
|
-
|
|
1549
|
+
var resolved = configuredValue(state, property, word, false, nativeColors);
|
|
1550
|
+
if (resolved !== word || !shadowRecipeProperties.has(property) || !/^[a-z][\w-]*$/i.test(word)) return resolved;
|
|
1551
|
+
if (word === "currentColor") {
|
|
1552
|
+
var inherited = configuredValue(state, "color", "color", false, nativeColors);
|
|
1553
|
+
return inherited === "color" ? word : inherited;
|
|
1554
|
+
}
|
|
1555
|
+
return configuredValue(state, "color", word, false, nativeColors);
|
|
1205
1556
|
});
|
|
1206
1557
|
if (!usedSafeArea && state.flatUsesSafeArea) return out;
|
|
1207
1558
|
}
|
|
1208
|
-
if (!fontProperty && !fromTheme) if (valueCacheEntries > 8192) {
|
|
1559
|
+
if (!fontProperty && !fromTheme && !nativeColors) if (valueCacheEntries > 8192) {
|
|
1209
1560
|
valueCaches = /* @__PURE__ */ new WeakMap();
|
|
1210
1561
|
valueCacheEntries = 0;
|
|
1211
1562
|
} else {
|
|
@@ -1216,19 +1567,22 @@ function configuredValue(state, property, raw) {
|
|
|
1216
1567
|
}
|
|
1217
1568
|
function ownsSourceLayer(state, property) {
|
|
1218
1569
|
var conditional = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
|
|
1219
|
-
var _direct_flatPass;
|
|
1570
|
+
var _direct_flatPass, _direct_flatPass1;
|
|
1220
1571
|
var _direct;
|
|
1221
1572
|
var direct = state;
|
|
1222
1573
|
var layer = ((_direct_flatPass = direct.flatPass) === null || _direct_flatPass === void 0 ? void 0 : _direct_flatPass[passSourceLayer]) || 0;
|
|
1223
1574
|
var layers = (_direct = direct).flatPropertyLayers || (_direct.flatPropertyLayers = /* @__PURE__ */ new Map());
|
|
1224
1575
|
var previous = layers.get(property);
|
|
1225
|
-
if (
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1576
|
+
if (!layer && !conditional && !((_direct_flatPass1 = direct.flatPass) === null || _direct_flatPass1 === void 0 ? void 0 : _direct_flatPass1[passVariantOutput])) {
|
|
1577
|
+
var _direct_flatSlots;
|
|
1578
|
+
var entries = (_direct_flatSlots = direct.flatSlots) === null || _direct_flatSlots === void 0 ? void 0 : _direct_flatSlots.get(property);
|
|
1579
|
+
if (entries) {
|
|
1580
|
+
for (var index = entries.length; index--;) if (entries[index][0] === property && entries[index][9]) entries.splice(index, 1);
|
|
1230
1581
|
}
|
|
1231
|
-
}
|
|
1582
|
+
}
|
|
1583
|
+
if (previous > layer) return false;
|
|
1584
|
+
if (conditional && previous !== layer) return true;
|
|
1585
|
+
if (previous < layer) clearDirectStyle(state, property);
|
|
1232
1586
|
layers.set(property, layer);
|
|
1233
1587
|
return true;
|
|
1234
1588
|
}
|
|
@@ -1244,9 +1598,21 @@ function emitProperty(state, property, value, cursor, originalValue, contextOnly
|
|
|
1244
1598
|
var theme = cursor ? cursor[conditionTheme] : "";
|
|
1245
1599
|
if (theme) {
|
|
1246
1600
|
if (supportsDynamicColorIOS && isColorStyleKey(property)) {
|
|
1247
|
-
var _direct
|
|
1248
|
-
var
|
|
1249
|
-
schemes
|
|
1601
|
+
var _direct;
|
|
1602
|
+
var colors = (_direct = direct).flatDynamicColors || (_direct.flatDynamicColors = {});
|
|
1603
|
+
var schemes = colors[property];
|
|
1604
|
+
if (!schemes) {
|
|
1605
|
+
var _direct_flatSlots_get_find, _direct_flatSlots_get, _direct_flatSlots;
|
|
1606
|
+
schemes = colors[property] = {};
|
|
1607
|
+
var base = (_direct_flatSlots = direct.flatSlots) === null || _direct_flatSlots === void 0 ? void 0 : (_direct_flatSlots_get = _direct_flatSlots.get(property)) === null || _direct_flatSlots_get === void 0 ? void 0 : (_direct_flatSlots_get_find = _direct_flatSlots_get.find(function(entry) {
|
|
1608
|
+
return !entry[2];
|
|
1609
|
+
})) === null || _direct_flatSlots_get_find === void 0 ? void 0 : _direct_flatSlots_get_find[1];
|
|
1610
|
+
if (base !== void 0) {
|
|
1611
|
+
schemes.light = extractValueFromDynamic(base, "light");
|
|
1612
|
+
schemes.dark = extractValueFromDynamic(base, "dark");
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
schemes[theme] = extractValueFromDynamic(value, theme);
|
|
1250
1616
|
streamWriteInline(state, property, { dynamic: { ...schemes } }, cursor, originalValue, true, condition & 1 ? condition : condition + 1);
|
|
1251
1617
|
return;
|
|
1252
1618
|
}
|
|
@@ -1283,6 +1649,10 @@ function emitProperty(state, property, value, cursor, originalValue, contextOnly
|
|
|
1283
1649
|
addTransformValue(state.transformAccumulator, property, value);
|
|
1284
1650
|
return;
|
|
1285
1651
|
}
|
|
1652
|
+
if (property === "transition" && condition & 12 && !state.staticConfig.isHOC && state.styleProps.isAnimated) {
|
|
1653
|
+
streamWriteInline(state, property, value, cursor, originalValue, false, -1, true);
|
|
1654
|
+
return;
|
|
1655
|
+
}
|
|
1286
1656
|
var shouldPromoteAnimatedStyle = canGenerateCSS && !condition && !state.flatShouldDoClasses && !state.styleProps.noMergeStyle && state.styleProps.isAnimated && ((_state_animationDriver = state.animationDriver) === null || _state_animationDriver === void 0 ? void 0 : _state_animationDriver.inputStyle) === "css" && property in nonAnimatableStyleProps;
|
|
1287
1657
|
if (canGenerateCSS && (state.flatShouldDoClasses || shouldPromoteAnimatedStyle)) {
|
|
1288
1658
|
writeStyleRecord(state, property, value, cursor, originalValue, shouldPromoteAnimatedStyle ? recordCSS : 0);
|
|
@@ -1291,10 +1661,11 @@ function emitProperty(state, property, value, cursor, originalValue, contextOnly
|
|
|
1291
1661
|
streamWriteInline(state, property, value, cursor, originalValue);
|
|
1292
1662
|
}
|
|
1293
1663
|
function numericUnitValue(value, first, second) {
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1664
|
+
return value.length > first.length && (value.endsWith(first) || value.endsWith(second)) ? +value.slice(0, -first.length) : NaN;
|
|
1665
|
+
}
|
|
1666
|
+
function resolveNumericValue(value) {
|
|
1667
|
+
var numeric = numericUnitValue(value, "px", "dp");
|
|
1668
|
+
return isFinite(numeric) ? numeric : isFinite(numeric = +value) ? numeric : value;
|
|
1298
1669
|
}
|
|
1299
1670
|
function emitBorder(state, property, raw, cursor, originalValue, contextOnly) {
|
|
1300
1671
|
if (property === "borderBlock" || property === "borderInline") {
|
|
@@ -1349,13 +1720,12 @@ function emitTextDecoration(state, raw, cursor, originalValue, contextOnly) {
|
|
|
1349
1720
|
}
|
|
1350
1721
|
}
|
|
1351
1722
|
function emitResolved(state, property, raw, cursor, originalValue, contextOnly) {
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
emitProperty(state, property, value, cursor, originalValue, contextOnly);
|
|
1723
|
+
emitProperty(state, property, resolveValue(state, property, raw), cursor, originalValue, contextOnly);
|
|
1724
|
+
}
|
|
1725
|
+
function resolveValue(state, property, raw, nativeColors) {
|
|
1726
|
+
var value = typeof raw === "string" ? configuredValue(state, property, raw, true, nativeColors) : raw;
|
|
1727
|
+
if (typeof value === "string" && value !== "" && property !== "lineHeight") value = resolveNumericValue(value);
|
|
1728
|
+
return value;
|
|
1359
1729
|
}
|
|
1360
1730
|
function shadowUnit(part) {
|
|
1361
1731
|
return typeof part === "number" ? `${part}px` : part || "0px";
|
|
@@ -1363,7 +1733,13 @@ function shadowUnit(part) {
|
|
|
1363
1733
|
function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
|
|
1364
1734
|
var condition = cursor ? cursor[conditionValue] : 0;
|
|
1365
1735
|
var grammar = getConfigRevisionState(state.conf);
|
|
1366
|
-
if (isVariable(raw))
|
|
1736
|
+
if (isVariable(raw)) {
|
|
1737
|
+
raw = resolveVariableValue(property, raw, state.styleProps.resolveValues);
|
|
1738
|
+
if (property === "lineHeight") {
|
|
1739
|
+
emitProperty(state, property, raw, cursor, originalValue, contextOnly);
|
|
1740
|
+
return;
|
|
1741
|
+
}
|
|
1742
|
+
}
|
|
1367
1743
|
if (typeof raw === "string" && (property === "transition" || property === "transitionProperty")) raw = grammar.normalizeTransition(raw);
|
|
1368
1744
|
if ((property === "borderWidth" || property === "borderTopWidth" || property === "borderRightWidth" || property === "borderBottomWidth" || property === "borderLeftWidth") && state.styleProps.noNormalize !== false) writeStyleRecord(state, "borderStyle", "solid", cursor, originalValue, recordDefault);
|
|
1369
1745
|
if (grammar.propertyKind(property) === 5) {
|
|
@@ -1378,7 +1754,7 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
|
|
|
1378
1754
|
}
|
|
1379
1755
|
if (property === "transform") {
|
|
1380
1756
|
if (canGenerateCSS && state.flatShouldDoClasses && Array.isArray(raw)) raw = transformsToString(raw);
|
|
1381
|
-
if (typeof raw === "string") {
|
|
1757
|
+
if (typeof raw === "string" && true) {
|
|
1382
1758
|
var transform = parseNativeTransform(raw);
|
|
1383
1759
|
if (transform) {
|
|
1384
1760
|
emitProperty(state, property, transform, cursor, originalValue, contextOnly);
|
|
@@ -1396,7 +1772,7 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
|
|
|
1396
1772
|
}
|
|
1397
1773
|
if (typeof raw === "string" && property === "background") {
|
|
1398
1774
|
var parts = splitComponents(raw);
|
|
1399
|
-
if (parts.length === 1 && !startsValueFunction(parts[0])) {
|
|
1775
|
+
if (parts.length === 1 && (!startsValueFunction(parts[0]) || classifyBorderComponents(parts[0]).color)) {
|
|
1400
1776
|
emitResolved(state, "backgroundColor", parts[0], cursor, originalValue, contextOnly);
|
|
1401
1777
|
return;
|
|
1402
1778
|
}
|
|
@@ -1406,7 +1782,7 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
|
|
|
1406
1782
|
if (property === "x" || property === "y" || property === "scale" || property === "scaleX" || property === "scaleY" || property === "rotate") {
|
|
1407
1783
|
var value2 = typeof raw === "string" ? configuredValue(state, property, raw) : raw;
|
|
1408
1784
|
if (typeof value2 === "string" && !value2.startsWith(THEME_REF_PREFIX)) {
|
|
1409
|
-
if (property === "rotate" && !
|
|
1785
|
+
if (property === "rotate" && !isFinite(numericUnitValue(value2, "deg", "rad")) && true) {
|
|
1410
1786
|
if (process.env.NODE_ENV === "development") warnOnce(`native transform "${property}" cannot represent "${value2}"; dropping it`);
|
|
1411
1787
|
if (condition & 1) {
|
|
1412
1788
|
removeTransformValue(state.transformAccumulator, property);
|
|
@@ -1414,9 +1790,7 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
|
|
|
1414
1790
|
}
|
|
1415
1791
|
return;
|
|
1416
1792
|
}
|
|
1417
|
-
|
|
1418
|
-
if (Number.isFinite(unitValue)) value2 = unitValue;
|
|
1419
|
-
else if (Number.isFinite(Number(value2))) value2 = Number(value2);
|
|
1793
|
+
value2 = resolveNumericValue(value2);
|
|
1420
1794
|
}
|
|
1421
1795
|
if (!canGenerateCSS || !state.flatShouldDoClasses) {
|
|
1422
1796
|
emitProperty(state, property, value2, cursor, originalValue, contextOnly);
|
|
@@ -1448,19 +1822,14 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
|
|
|
1448
1822
|
}
|
|
1449
1823
|
return;
|
|
1450
1824
|
}
|
|
1451
|
-
var
|
|
1452
|
-
|
|
1453
|
-
if (typeof value3 === "string") {
|
|
1454
|
-
var unitValue1 = numericUnitValue(value3, "px", "dp");
|
|
1455
|
-
if (Number.isFinite(unitValue1)) value3 = unitValue1;
|
|
1456
|
-
else if (value3 !== "" && Number.isFinite(Number(value3))) value3 = Number(value3);
|
|
1457
|
-
}
|
|
1825
|
+
var nativeColors = typeof raw === "string" && (property === "backgroundImage" || property === "boxShadow" || property === "textShadow") ? /* @__PURE__ */ new Map() : void 0;
|
|
1826
|
+
var value3 = resolveValue(state, property, raw, nativeColors);
|
|
1458
1827
|
if (canGenerateCSS && state.flatShouldDoClasses && property === "boxShadow" && !condition) {
|
|
1459
1828
|
state.flatBoxShadow = value3;
|
|
1460
1829
|
state.flatBoxShadowSequence = frameSequence + 1;
|
|
1461
1830
|
}
|
|
1462
1831
|
if (typeof value3 === "string" && (property === "backgroundImage" || property === "boxShadow" || property === "textShadow")) {
|
|
1463
|
-
var parsed = parseNativeStyle(property, value3);
|
|
1832
|
+
var parsed = parseNativeStyle(property, value3, nativeColors);
|
|
1464
1833
|
if (parsed) {
|
|
1465
1834
|
if (property === "textShadow") {
|
|
1466
1835
|
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
|
|
@@ -1482,6 +1851,7 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
|
|
|
1482
1851
|
} else emitProperty(state, property === "backgroundImage" ? "experimental_backgroundImage" : property, parsed, cursor, originalValue, contextOnly);
|
|
1483
1852
|
return;
|
|
1484
1853
|
}
|
|
1854
|
+
if (property === "backgroundImage" || property === "textShadow") return;
|
|
1485
1855
|
}
|
|
1486
1856
|
if (property === "fontVariant" && typeof value3 === "string") {
|
|
1487
1857
|
var variants = [];
|
|
@@ -1494,25 +1864,42 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
|
|
|
1494
1864
|
}
|
|
1495
1865
|
value3 = variants;
|
|
1496
1866
|
}
|
|
1867
|
+
if (!cursor && !state.styleProps.noExpand) {
|
|
1868
|
+
var logicals = nativeShorthandLogicals[property];
|
|
1869
|
+
var slots = state.flatSlots;
|
|
1870
|
+
if (logicals && slots) for (var index1 = 0; index1 < logicals.length; index1++) {
|
|
1871
|
+
var list = slots.get(logicals[index1]);
|
|
1872
|
+
if (!list) continue;
|
|
1873
|
+
for (var entry = list.length; entry--;) if (list[entry][3] === "") list.splice(entry, 1);
|
|
1874
|
+
if (!list.length) clearDirectStyle(state, logicals[index1]);
|
|
1875
|
+
}
|
|
1876
|
+
}
|
|
1497
1877
|
var expanded = !state.styleProps.noExpand ? expandStyle(property, value3, state.conf.settings.styleCompat || "web") : null;
|
|
1498
1878
|
if (!expanded) {
|
|
1499
1879
|
emitProperty(state, property, value3, cursor, originalValue, contextOnly);
|
|
1500
1880
|
return;
|
|
1501
1881
|
}
|
|
1502
|
-
if (typeof raw === "string" && expanded.length > 1) {
|
|
1882
|
+
if (typeof raw === "string" && expanded.length > 1 && expanded.every(function(entry2) {
|
|
1883
|
+
return entry2[1] === expanded[0][1];
|
|
1884
|
+
})) {
|
|
1503
1885
|
var parts1 = splitComponents(raw);
|
|
1504
1886
|
if (parts1.length > 0 && parts1.length <= (expanded.length === 4 ? 4 : 2)) {
|
|
1505
|
-
for (var
|
|
1506
|
-
var partIndex =
|
|
1507
|
-
emitResolved(state, expanded[
|
|
1887
|
+
for (var index2 = 0; index2 < expanded.length; index2++) {
|
|
1888
|
+
var partIndex = index2 === 0 || parts1.length === 1 ? 0 : index2 === 1 || index2 === 3 && parts1.length < 4 ? 1 : index2 === 2 && parts1.length < 3 ? 0 : index2;
|
|
1889
|
+
emitResolved(state, expanded[index2][0], parts1[partIndex], cursor, originalValue, contextOnly);
|
|
1508
1890
|
}
|
|
1509
1891
|
return;
|
|
1510
1892
|
}
|
|
1511
1893
|
}
|
|
1512
|
-
for (var
|
|
1894
|
+
for (var index3 = 0; index3 < expanded.length; index3++) emitProperty(state, expanded[index3][0], expanded[index3][1], cursor, originalValue, contextOnly);
|
|
1895
|
+
}
|
|
1896
|
+
function emitConditionalValue(state, property, payload, condition, source, sink, mode, contextOnly) {
|
|
1897
|
+
if (sink) sink(payload, condition, source);
|
|
1898
|
+
else if (condition) emitUnderCondition(state, property, payload, condition, mode === 2 || state.staticConfig.isHOC || state.styleProps.stylePieceEntries ? payload : void 0, contextOnly, mode, source);
|
|
1899
|
+
else emitValue(state, property, payload, null, payload, contextOnly);
|
|
1513
1900
|
}
|
|
1514
1901
|
function walkConditionalValue(state, property, value, parent, sink) {
|
|
1515
|
-
var warnMode = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : 0;
|
|
1902
|
+
var warnMode = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : 0, contextOnly = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : false;
|
|
1516
1903
|
var parentCondition = parent || null;
|
|
1517
1904
|
var hasBase = false;
|
|
1518
1905
|
var conditions = 0;
|
|
@@ -1520,13 +1907,18 @@ function walkConditionalValue(state, property, value, parent, sink) {
|
|
|
1520
1907
|
if (typeof value === "string") {
|
|
1521
1908
|
var parsed = getConfigRevisionState(state.conf).parseFlatValue(value);
|
|
1522
1909
|
var [segments, failure, failureIndex] = parsed;
|
|
1910
|
+
if (process.env.NODE_ENV === "development") {
|
|
1911
|
+
if (getSetting("styleValueSyntax") === "object") {
|
|
1912
|
+
if (segments.length > 5 || segments.length >= 5 && segments[2] !== -1 || value.includes(":")) warnOnce(`syntax:string:${property}=${value}`, `string syntax is disabled by config (styleValueSyntax: 'object'); received "${property}=${value}"`);
|
|
1913
|
+
}
|
|
1914
|
+
}
|
|
1523
1915
|
var slices = parsedSlices.get(parsed);
|
|
1524
1916
|
if (slices === void 0) parsedSlices.set(parsed, slices = []);
|
|
1525
1917
|
var chainCount = segments.length / 5 - 1;
|
|
1526
1918
|
if (property === "aspectRatio" && chainCount === 1) {
|
|
1527
|
-
var left =
|
|
1528
|
-
var right =
|
|
1529
|
-
if (left > 0 && right > 0 &&
|
|
1919
|
+
var left = +value.slice(segments[7], segments[8]);
|
|
1920
|
+
var right = +value.slice(segments[5], segments[6]);
|
|
1921
|
+
if (left > 0 && right > 0 && isFinite(left) && isFinite(right)) return false;
|
|
1530
1922
|
}
|
|
1531
1923
|
for (var index = 0; index < segments.length; index += 5) {
|
|
1532
1924
|
var start = segments[index];
|
|
@@ -1538,10 +1930,10 @@ function walkConditionalValue(state, property, value, parent, sink) {
|
|
|
1538
1930
|
var _slices, _index;
|
|
1539
1931
|
var _;
|
|
1540
1932
|
var payload = (_ = (_slices = slices)[_index = index]) !== null && _ !== void 0 ? _ : _slices[_index] = value.slice(start, end);
|
|
1541
|
-
|
|
1933
|
+
emitConditionalValue(state, property, payload, parentCondition, payload, sink, warnMode, contextOnly);
|
|
1542
1934
|
hasBase = true;
|
|
1543
1935
|
} else if (process.env.NODE_ENV !== "production" && warnMode && !chainCount && (failure === "invalid-character" || failure === "stray-comment-close")) {
|
|
1544
|
-
|
|
1936
|
+
emitConditionalValue(state, property, value, parentCondition, value, sink, warnMode, contextOnly);
|
|
1545
1937
|
hasBase = true;
|
|
1546
1938
|
} else if (warnMode) warnScanFailure(property, value, failure, failureIndex);
|
|
1547
1939
|
}
|
|
@@ -1567,34 +1959,40 @@ function walkConditionalValue(state, property, value, parent, sink) {
|
|
|
1567
1959
|
if (cursor[conditionValue] & conditionResolvedFlag || warnMode) {
|
|
1568
1960
|
var _slices2, _index1;
|
|
1569
1961
|
var _2;
|
|
1570
|
-
|
|
1962
|
+
emitConditionalValue(state, property, (_2 = (_slices2 = slices)[_index1 = index1]) !== null && _2 !== void 0 ? _2 : _slices2[_index1] = value.slice(start1, end1), cursor, value, sink, warnMode, contextOnly);
|
|
1571
1963
|
}
|
|
1572
1964
|
}
|
|
1573
1965
|
if (process.env.NODE_ENV !== "production") lastPayload = value.slice(lastPayloadStart);
|
|
1574
1966
|
} else {
|
|
1575
|
-
if (!value ||
|
|
1967
|
+
if (!value || typeof value !== "object" || Array.isArray(value) || isVariable(value) || !classifyConditionalObject(value, state)) return false;
|
|
1968
|
+
if (process.env.NODE_ENV === "development") {
|
|
1969
|
+
if (getSetting("styleValueSyntax") === "string") warnOnce(`syntax:object:${property}=${JSON.stringify(value)}`, `object-form conditional syntax is disabled by config (styleValueSyntax: 'string'); received "${property}"`);
|
|
1970
|
+
}
|
|
1576
1971
|
if (value.default != null) {
|
|
1577
|
-
|
|
1972
|
+
emitConditionalValue(state, property, value.default, parentCondition, value.default, sink, warnMode, contextOnly);
|
|
1578
1973
|
hasBase = true;
|
|
1579
1974
|
}
|
|
1580
1975
|
for (var key in value) {
|
|
1581
1976
|
if (key === "default" || value[key] == null) continue;
|
|
1582
1977
|
var cursor1 = conditionFromKey(state, key, parentCondition);
|
|
1583
1978
|
conditions |= cursor1[conditionValue];
|
|
1584
|
-
if (cursor1[conditionValue] & conditionResolvedFlag || warnMode)
|
|
1979
|
+
if (cursor1[conditionValue] & conditionResolvedFlag || warnMode) emitConditionalValue(state, property, value[key], cursor1, value[key], sink, warnMode, contextOnly);
|
|
1585
1980
|
}
|
|
1586
1981
|
}
|
|
1587
|
-
if (warnMode && process.env.NODE_ENV === "development" && typeof value === "string" && !hasBase && conditions && getConfigRevisionState(state.conf).tokenCategory(property) && splitComponents(lastPayload).length > 1) warnOnce(`${property}="${value}" has multiple values after its first conditional. Write the base value before the first conditional.`);
|
|
1588
|
-
if (warnMode === 1 &&
|
|
1589
|
-
var _state_flatPropertyLayers;
|
|
1982
|
+
if (warnMode && process.env.NODE_ENV === "development" && typeof value === "string" && !hasBase && conditions && getConfigRevisionState(state.conf).tokenCategory(property) && getConfigRevisionState(state.conf).propertyKind(property) !== 8 && property !== "boxShadow" && property !== "textShadow" && property !== "fontFamily" && property !== "gap" && splitComponents(lastPayload).length > 1) warnOnce(`${property}="${value}" has multiple values after its first conditional. Write the base value before the first conditional.`);
|
|
1983
|
+
if (warnMode === 1 && conditions & 12 && !hasBase) {
|
|
1590
1984
|
var resting = property === "opacity" || property.startsWith("scale") ? 1 : property === "rotate" ? "0deg" : property === "x" || property === "y" ? 0 : null;
|
|
1591
|
-
|
|
1985
|
+
var layers = state.flatPropertyLayers;
|
|
1986
|
+
var owned = !canGenerateCSS || !state.flatShouldDoClasses ? layers === null || layers === void 0 ? void 0 : layers.has(property) : property === "scale" ? (layers === null || layers === void 0 ? void 0 : layers.has("--t-scale-x")) || (layers === null || layers === void 0 ? void 0 : layers.has("--t-scale-y")) : layers === null || layers === void 0 ? void 0 : layers.has(property === "x" ? "--t-x" : property === "y" ? "--t-y" : property === "scaleX" ? "--t-scale-x" : property === "scaleY" ? "--t-scale-y" : property);
|
|
1987
|
+
if (resting !== null && !owned) emitConditionalValue(state, property, resting, parentCondition, resting, sink, warnMode, contextOnly);
|
|
1592
1988
|
}
|
|
1593
1989
|
return true;
|
|
1594
1990
|
}
|
|
1595
1991
|
function contributeValue(state, property, value, originalValue) {
|
|
1596
1992
|
var contextOnly = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false, condition = arguments.length > 5 ? arguments[5] : void 0;
|
|
1597
1993
|
var _state_flatPass;
|
|
1994
|
+
if (!contextOnly && isRemovedVendorStyleProp(property) && !(state.staticConfig.validStyles && property in state.staticConfig.validStyles)) return;
|
|
1995
|
+
if (!contextOnly && !(property in (state.staticConfig.validStyles || (state.staticConfig.isInput ? stylePropsInput : state.staticConfig.isText ? stylePropsText : validStyles))) && property in stylePropsAll) return;
|
|
1598
1996
|
if (condition !== void 0) {
|
|
1599
1997
|
var _directState_flatPass;
|
|
1600
1998
|
var parent = ((_directState_flatPass = state.flatPass) === null || _directState_flatPass === void 0 ? void 0 : _directState_flatPass[passParentCursor]) || null;
|
|
@@ -1605,14 +2003,12 @@ function contributeValue(state, property, value, originalValue) {
|
|
|
1605
2003
|
if (!(condition[conditionValue] & conditionResolvedFlag)) setConditionUnresolved(effective);
|
|
1606
2004
|
commitCondition(effective);
|
|
1607
2005
|
} else effective = condition;
|
|
1608
|
-
if (typeof value !== "string" && walkConditionalValue(state, property, value, effective,
|
|
1609
|
-
return emitUnderCondition(state, property, payload, cursor, payload, contextOnly, 2, source);
|
|
1610
|
-
}, 2)) return true;
|
|
2006
|
+
if (typeof value !== "string" && walkConditionalValue(state, property, value, effective, null, 2, contextOnly)) return true;
|
|
1611
2007
|
emitUnderCondition(state, property, value, effective, originalValue, contextOnly, 2, value);
|
|
1612
2008
|
return true;
|
|
1613
2009
|
}
|
|
1614
2010
|
var compositeKind = 0;
|
|
1615
|
-
if (compositeKind > 0 && compositeKind < 6 && (typeof value === "string" && value.indexOf(":") !== -1 || value &&
|
|
2011
|
+
if (compositeKind > 0 && compositeKind < 6 && (typeof value === "string" && value.indexOf(":") !== -1 || value && typeof value === "object" && !Array.isArray(value) && !isVariable(value) && classifyConditionalObject(value, state))) {
|
|
1616
2012
|
if (process.env.NODE_ENV === "development") warnOnce(`conditional "${property}" needs its composite property; dropping it`);
|
|
1617
2013
|
return true;
|
|
1618
2014
|
}
|
|
@@ -1639,9 +2035,7 @@ function contributeValue(state, property, value, originalValue) {
|
|
|
1639
2035
|
return true;
|
|
1640
2036
|
}
|
|
1641
2037
|
}
|
|
1642
|
-
if (walkConditionalValue(state, property, value, ((_state_flatPass = state.flatPass) === null || _state_flatPass === void 0 ? void 0 : _state_flatPass[passParentCursor]) || null,
|
|
1643
|
-
return cursor ? emitUnderCondition(state, property, payload, cursor, void 0, contextOnly, 1, source) : emitValue(state, property, payload, null, payload, contextOnly);
|
|
1644
|
-
}, 1)) return true;
|
|
2038
|
+
if (walkConditionalValue(state, property, value, ((_state_flatPass = state.flatPass) === null || _state_flatPass === void 0 ? void 0 : _state_flatPass[passParentCursor]) || null, null, 1, contextOnly)) return true;
|
|
1645
2039
|
if (value != null) {
|
|
1646
2040
|
emitAtParentCondition(state, property, value, originalValue !== null && originalValue !== void 0 ? originalValue : value, contextOnly);
|
|
1647
2041
|
return true;
|
|
@@ -1650,19 +2044,22 @@ function contributeValue(state, property, value, originalValue) {
|
|
|
1650
2044
|
}
|
|
1651
2045
|
function clearDirectStyle(state, property) {
|
|
1652
2046
|
var _direct_flatAtomics;
|
|
2047
|
+
if (property === "lineHeight") state.nativeLineHeight = void 0;
|
|
1653
2048
|
var direct = state;
|
|
2049
|
+
if (direct.flatDynamicColors) delete direct.flatDynamicColors[property];
|
|
1654
2050
|
var propertyKind = getConfigRevisionState(state.conf).propertyKind(property);
|
|
1655
2051
|
var atomicKey = property.startsWith("transition") ? "transition" : propertyKind > 0 && propertyKind < 5 ? "boxShadow" : propertyKind === 6 ? "textShadow" : propertyKind === 5 ? "transform" : property;
|
|
1656
2052
|
var slot = atomicKey;
|
|
1657
2053
|
(_direct_flatAtomics = direct.flatAtomics) === null || _direct_flatAtomics === void 0 || _direct_flatAtomics.delete(slot);
|
|
1658
2054
|
if (direct.flatSlots) {
|
|
1659
|
-
if (slot !== atomicKey) {
|
|
2055
|
+
if (slot !== atomicKey || atomicKey === "flex") {
|
|
1660
2056
|
var entries = direct.flatSlots.get(slot);
|
|
1661
2057
|
if (entries) {
|
|
1662
2058
|
for (var index = entries.length; index--;) if (entries[index][0] === atomicKey) entries.splice(index, 1);
|
|
2059
|
+
if (!entries.length) direct.flatSlots.delete(slot);
|
|
1663
2060
|
}
|
|
1664
2061
|
}
|
|
1665
|
-
direct.flatSlots.delete(atomicKey);
|
|
2062
|
+
if (atomicKey !== "flex") direct.flatSlots.delete(atomicKey);
|
|
1666
2063
|
}
|
|
1667
2064
|
if (atomicKey === "transform") state.transformAccumulator = void 0;
|
|
1668
2065
|
if (state.style) delete state.style[atomicKey];
|
|
@@ -1678,9 +2075,12 @@ function emitVariantStyle(state, key, value, original, condition, disabled) {
|
|
|
1678
2075
|
((_state = state).overriddenContextProps || (_state.overriddenContextProps = {}))[key] = ((_state1 = state).originalContextPropValues || (_state1.originalContextPropValues = {}))[key] = original;
|
|
1679
2076
|
}
|
|
1680
2077
|
var parent = pass[passParentCursor];
|
|
2078
|
+
var parentVariantOutput = pass[passVariantOutput];
|
|
1681
2079
|
pass[passParentCursor] = condition;
|
|
2080
|
+
pass[passVariantOutput] = true;
|
|
1682
2081
|
contributeProp(pass, key, value, original, disabled);
|
|
1683
2082
|
pass[passParentCursor] = parent;
|
|
2083
|
+
pass[passVariantOutput] = parentVariantOutput;
|
|
1684
2084
|
}
|
|
1685
2085
|
function getFontFamilyFromNameOrVariable(input, conf) {
|
|
1686
2086
|
if (isVariable(input)) {
|