@tamagui/web 3.0.0-beta.924.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
|
@@ -34,6 +34,7 @@ __export(getSplitStyles_exports, {
|
|
|
34
34
|
walkConditionalValue: () => walkConditionalValue
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(getSplitStyles_exports);
|
|
37
|
+
var import_transitionResolver = require("@tamagui/animation-helpers/transitionResolver");
|
|
37
38
|
var import_constants = require("@tamagui/constants");
|
|
38
39
|
var import_helpers = require("@tamagui/helpers");
|
|
39
40
|
var import_runtime = require("@tamagui/style-grammar/runtime");
|
|
@@ -49,6 +50,7 @@ var import_expandStyles = require("./expandStyles.native.js");
|
|
|
49
50
|
var import_grammarConfig = require("./grammarConfig.native.js");
|
|
50
51
|
var import_mediaState = require("./mediaState.native.js");
|
|
51
52
|
var import_styleStaticConfig = require("./styleStaticConfig.native.js");
|
|
53
|
+
var import_styleFrontend = require("./styleFrontend.native.js");
|
|
52
54
|
var import_nativeStyleEngine = require("./nativeStyleEngine.native.js");
|
|
53
55
|
var import_warnOnce = require("./warnOnce.native.js");
|
|
54
56
|
var import_getDynamicVal = require("./getDynamicVal.native.js");
|
|
@@ -57,8 +59,11 @@ var import_insertStyleRule = require("./insertStyleRule.native.js");
|
|
|
57
59
|
var import_log = require("./log.native.js");
|
|
58
60
|
var import_normalizeColor = require("./normalizeColor.native.js");
|
|
59
61
|
var import_normalizeValueWithProperty = require("./normalizeValueWithProperty.native.js");
|
|
62
|
+
var import_nativeTextMetrics = require("./nativeTextMetrics.native.js");
|
|
63
|
+
var import_isTamaguiElement = require("./isTamaguiElement.native.js");
|
|
60
64
|
var import_parseNativeStyle = require("./parseNativeStyle.native.js");
|
|
61
65
|
var import_parseNativeTransform = require("./parseNativeTransform.native.js");
|
|
66
|
+
var import_resolveNativeUnits = require("./resolveNativeUnits.native.js");
|
|
62
67
|
var import_resolveVariableValue = require("./resolveVariableValue.native.js");
|
|
63
68
|
var import_skipProps = require("./skipProps.native.js");
|
|
64
69
|
var import_styleOriginalValues = require("./styleOriginalValues.native.js");
|
|
@@ -68,10 +73,6 @@ var import_transformsToString = require("./transformsToString.native.js");
|
|
|
68
73
|
var import_style = require("../style.native.js");
|
|
69
74
|
var import_styleProvenance2 = require("./styleProvenance.native.js");
|
|
70
75
|
__reExport(getSplitStyles_exports, require("./tokenCategories.native.js"), module.exports);
|
|
71
|
-
function _type_of(obj) {
|
|
72
|
-
"@swc/helpers - typeof";
|
|
73
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
74
|
-
}
|
|
75
76
|
var shouldTrackStyleTokenProvenance = process.env.NODE_ENV === "development" && process.env.TAMAGUI_ENABLE_STYLE_TOKEN_PROVENANCE === "1";
|
|
76
77
|
var conditionValue = 0;
|
|
77
78
|
var conditionPlatform = 1;
|
|
@@ -273,6 +274,7 @@ var passFrontendContainerType = 27;
|
|
|
273
274
|
var passSourceLayer = 28;
|
|
274
275
|
var passParentCursor = 29;
|
|
275
276
|
var passMapSourceKey = 30;
|
|
277
|
+
var passVariantOutput = 31;
|
|
276
278
|
var passFlags = 13;
|
|
277
279
|
var sourceLayerBase = 0;
|
|
278
280
|
var sourceLayerVariant = 1;
|
|
@@ -287,6 +289,9 @@ var passHocFlag = 16;
|
|
|
287
289
|
var passTextFlag = 32;
|
|
288
290
|
var passInputFlag = 64;
|
|
289
291
|
var passAsChildStyleFlag = 128;
|
|
292
|
+
function isRemovedVendorStyleProp(property) {
|
|
293
|
+
return /^(Webkit|Moz|ms)[A-Z]/.test(property) && !(property in import_helpers.stylePropsAll);
|
|
294
|
+
}
|
|
290
295
|
function isValidStyleKey(key, validStyles) {
|
|
291
296
|
return key in validStyles;
|
|
292
297
|
}
|
|
@@ -326,7 +331,6 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
326
331
|
var shouldCheckSkipProps = !noSkip;
|
|
327
332
|
var asChildExceptStyleLike = Boolean(flags & passAsChildStyleFlag);
|
|
328
333
|
var isTextOrInput = isText || isInput;
|
|
329
|
-
var hocParentVariants = isHOC ? parentVariants : void 0;
|
|
330
334
|
var keyInit = keyOg;
|
|
331
335
|
var valInit = valOg;
|
|
332
336
|
if (keyInit === "children") {
|
|
@@ -348,17 +352,24 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
348
352
|
return;
|
|
349
353
|
}
|
|
350
354
|
var resolveClassName = styleFrontend === null || styleFrontend === void 0 ? void 0 : styleFrontend.resolveClassName;
|
|
351
|
-
var
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
355
|
+
var composedProps = null;
|
|
356
|
+
var sink = function(entry2) {
|
|
357
|
+
var property3 = entry2[0];
|
|
358
|
+
var condition2 = entry2[2];
|
|
359
|
+
if (property3.charCodeAt(0) === 95 && property3.charCodeAt(1) === 95) {
|
|
360
|
+
composedProps || (composedProps = {});
|
|
361
|
+
composedProps[property3] = (0, import_styleFrontend.mergeFrontendCondition)(composedProps[property3], entry2[1], condition2);
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
364
|
+
if (condition2 !== void 0) {
|
|
365
|
+
if (isValidStyleKey(property3, validStyles)) contributeValue(styleState, property3, entry2[1], void 0, false, condition2);
|
|
366
|
+
else if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${property3}" is not a valid style on this component; the frontend value is dropped.`);
|
|
367
|
+
return;
|
|
361
368
|
}
|
|
369
|
+
if (property3 === "group") pass[passFrontendGroup] = entry2[1];
|
|
370
|
+
else if (property3 === "container") pass[passFrontendContainer] = entry2[1];
|
|
371
|
+
else if (property3 === "containerType") pass[passFrontendContainerType] = entry2[1];
|
|
372
|
+
contributeProp(pass, property3, entry2[1]);
|
|
362
373
|
};
|
|
363
374
|
var start = 0;
|
|
364
375
|
for (var index = 0; index <= valInit.length; index++) {
|
|
@@ -384,17 +395,69 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
384
395
|
}
|
|
385
396
|
start = index + 1;
|
|
386
397
|
}
|
|
398
|
+
if (composedProps) {
|
|
399
|
+
var _styleFrontend_compose;
|
|
400
|
+
var composed = (_styleFrontend_compose = styleFrontend.compose) === null || _styleFrontend_compose === void 0 ? void 0 : _styleFrontend_compose.call(styleFrontend, composedProps);
|
|
401
|
+
for (var property in composed) contributeProp(pass, property, composed[property]);
|
|
402
|
+
}
|
|
387
403
|
}
|
|
388
404
|
return;
|
|
389
405
|
}
|
|
390
406
|
if (keyInit === import_skipProps.HOC_CLASSNAME_MARKER) {
|
|
391
|
-
if (valInit
|
|
407
|
+
if (valInit) {
|
|
392
408
|
var _direct;
|
|
393
|
-
var
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
409
|
+
var [hocClassNames, hocSlots] = valInit;
|
|
410
|
+
var direct = styleState;
|
|
411
|
+
var layers = (_direct = direct).flatPropertyLayers || (_direct.flatPropertyLayers = /* @__PURE__ */ new Map());
|
|
412
|
+
for (var property1 in hocClassNames) {
|
|
413
|
+
if (hocSlots === null || hocSlots === void 0 ? void 0 : hocSlots.has(property1)) continue;
|
|
414
|
+
clearDirectStyle(styleState, property1);
|
|
415
|
+
styleState.classNames[property1] = hocClassNames[property1];
|
|
416
|
+
layers.set(property1, pass[passSourceLayer]);
|
|
417
|
+
}
|
|
418
|
+
if (hocSlots) {
|
|
419
|
+
var _direct1;
|
|
420
|
+
var slots = (_direct1 = direct).flatSlots || (_direct1.flatSlots = /* @__PURE__ */ new Map());
|
|
421
|
+
var markerLayer = pass[passSourceLayer];
|
|
422
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
423
|
+
try {
|
|
424
|
+
for (var _iterator = hocSlots[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
425
|
+
var [slot, entries] = _step.value;
|
|
426
|
+
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
|
|
427
|
+
try {
|
|
428
|
+
for (var _iterator1 = entries[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
|
|
429
|
+
var entry = _step1.value;
|
|
430
|
+
pass[passSourceLayer] = Math.max(entry[7] >> 5, sourceLayerResolver);
|
|
431
|
+
if (!ownsSourceLayer(styleState, entry[0], !!entry[2])) continue;
|
|
432
|
+
if (!isHOC && styleState.styleProps.isAnimated && (slot === "transition" || entry[8]) && !(entry[0] in import_helpers.nonAnimatableStyleProps)) {
|
|
433
|
+
var _styleState_animationDriver;
|
|
434
|
+
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];
|
|
435
|
+
var value = ((_styleState_animationDriver = styleState.animationDriver) === null || _styleState_animationDriver === void 0 ? void 0 : _styleState_animationDriver.inputStyle) === "value" ? entry[6] : entry[1];
|
|
436
|
+
entry[3] ? contributeValue(styleState, property2, value, entry[6], false, entry[3]) : emitValue(styleState, property2, value, null, entry[6], false);
|
|
437
|
+
} else writeStyleSlot(slots, slot, [...entry], pass[passSourceLayer]);
|
|
438
|
+
}
|
|
439
|
+
} catch (err) {
|
|
440
|
+
_didIteratorError1 = true;
|
|
441
|
+
_iteratorError1 = err;
|
|
442
|
+
} finally {
|
|
443
|
+
try {
|
|
444
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) _iterator1.return();
|
|
445
|
+
} finally {
|
|
446
|
+
if (_didIteratorError1) throw _iteratorError1;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
} catch (err) {
|
|
451
|
+
_didIteratorError = true;
|
|
452
|
+
_iteratorError = err;
|
|
453
|
+
} finally {
|
|
454
|
+
try {
|
|
455
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
|
|
456
|
+
} finally {
|
|
457
|
+
if (_didIteratorError) throw _iteratorError;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
pass[passSourceLayer] = markerLayer;
|
|
398
461
|
}
|
|
399
462
|
}
|
|
400
463
|
return;
|
|
@@ -422,9 +485,23 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
422
485
|
continue;
|
|
423
486
|
}
|
|
424
487
|
var styleOriginals = shouldTrackStyleTokenProvenance ? import_styleOriginalValues.styleOriginalValues.get(style) : void 0;
|
|
425
|
-
for (var
|
|
426
|
-
|
|
427
|
-
|
|
488
|
+
for (var authoredKey in style) {
|
|
489
|
+
var value1 = style[authoredKey];
|
|
490
|
+
if (value1 == null) continue;
|
|
491
|
+
var key1 = disableExpandShorthands ? authoredKey : shorthands[authoredKey] || authoredKey;
|
|
492
|
+
var inline = !styleState.styleProps.stylePieceEntries;
|
|
493
|
+
if (inline) {
|
|
494
|
+
if (typeof value1 === "string") {
|
|
495
|
+
var [segments] = (0, import_grammarConfig.getConfigRevisionState)(conf).parseFlatValue(value1);
|
|
496
|
+
for (var index2 = 4; index2 < segments.length; index2 += 5) if (!(segments[index2] & 1)) {
|
|
497
|
+
inline = false;
|
|
498
|
+
break;
|
|
499
|
+
}
|
|
500
|
+
} else if (value1 && typeof value1 === "object" && !Array.isArray(value1) && !(0, import_createVariable.isVariable)(value1) && classifyConditionalObject(value1, styleState) !== 0) inline = false;
|
|
501
|
+
}
|
|
502
|
+
styleState.flatInlineStyleProp = inline;
|
|
503
|
+
contributeValue(styleState, key1, value1, styleOriginals === null || styleOriginals === void 0 ? void 0 : styleOriginals[authoredKey]);
|
|
504
|
+
styleState.flatInlineStyleProp = false;
|
|
428
505
|
}
|
|
429
506
|
}
|
|
430
507
|
pass[passSourceLayer] = layerBeforeStyle;
|
|
@@ -435,18 +512,29 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
435
512
|
var defaultVal = (_defaultProps_keyOg = defaultProps[keyOg]) !== null && _defaultProps_keyOg !== void 0 ? _defaultProps_keyOg : defaultProps[keyInit];
|
|
436
513
|
if (defaultVal !== void 0 && valInit === defaultVal) return;
|
|
437
514
|
}
|
|
515
|
+
if (process.env.NODE_ENV === "development") {
|
|
516
|
+
if (!isValidStyleKey(keyInit, validStyles) && (keyInit === "animation" || !(keyInit in import_helpers.stylePropsAll)) && (!variants || !(keyInit in variants))) {
|
|
517
|
+
var replacement;
|
|
518
|
+
if (keyInit === "animation") replacement = "transition=";
|
|
519
|
+
else if (keyInit === "hoverStyle") replacement = "hover: clause";
|
|
520
|
+
else if (keyInit === "pressStyle") replacement = "press: clause";
|
|
521
|
+
else if (keyInit === "focusStyle") replacement = "focus: clause";
|
|
522
|
+
else if (keyInit === "enterStyle") replacement = "enter: clause";
|
|
523
|
+
else if (keyInit === "exitStyle") replacement = "exit: clause";
|
|
524
|
+
else if (keyInit.charCodeAt(0) === 36 && keyInit.length > 1) replacement = `${keyInit.slice(1)}: clause`;
|
|
525
|
+
if (replacement) (0, import_warnOnce.warnOnce)(`v2-prop:${keyInit}`, `prop "${keyInit}" was removed in v3; use ${replacement}`);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
438
528
|
var isNativeInputColor = isInput && keyInit in import_nativeStyleEngine.nativeTextInputColorProps;
|
|
439
529
|
if (!isNativeInputColor && keyInit in import_skipProps.skipProps && shouldSkipDirectProps && !(neverSkipProps === null || neverSkipProps === void 0 ? void 0 : neverSkipProps[keyInit])) if (keyInit === "transition" && typeof valInit === "string") return;
|
|
440
530
|
else return;
|
|
441
531
|
var isValidStyleKeyInit = isValidStyleKey(keyInit, validStyles);
|
|
532
|
+
if (keyInit === "userSelect") {
|
|
533
|
+
if (isText) viewProps.selectable = valInit !== "none";
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
442
536
|
if (!isValidStyleKeyInit) {
|
|
443
|
-
if (
|
|
444
|
-
if (keyInit === "elevationAndroid") return;
|
|
445
|
-
}
|
|
446
|
-
if (keyInit === "userSelect") {
|
|
447
|
-
keyInit = "selectable";
|
|
448
|
-
valInit = valInit !== "none";
|
|
449
|
-
} else if (keyInit === "textOverflow") {
|
|
537
|
+
if (keyInit === "textOverflow") {
|
|
450
538
|
if (isText && valInit === "ellipsis") {
|
|
451
539
|
var _viewProps, _viewProps1;
|
|
452
540
|
var _numberOfLines;
|
|
@@ -457,12 +545,15 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
457
545
|
return;
|
|
458
546
|
} else if (keyInit.startsWith("data-")) return;
|
|
459
547
|
}
|
|
548
|
+
if (pass[passVariantOutput] && !isValidStyleKeyInit && !keyInit.startsWith("aria-") && !(keyInit in import_helpers.stylePropsAll) && !(keyInit in import_skipProps.skipProps) && !(variants && keyInit in variants) && !(parentVariants && keyInit in parentVariants) && !(styledContextKeys === null || styledContextKeys === void 0 ? void 0 : styledContextKeys.has(keyInit)) && !(styledContext && keyInit in styledContext)) {
|
|
549
|
+
if (process.env.NODE_ENV === "development") (0, import_warnOnce.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.`);
|
|
550
|
+
return;
|
|
551
|
+
}
|
|
460
552
|
var isVariant = !isValidStyleKeyInit && variants && keyInit in variants;
|
|
461
553
|
var isStyleProp = isValidStyleKeyInit || isVariant && !noExpand;
|
|
462
554
|
if (isStyleProp && asChildExceptStyleLike) return;
|
|
463
|
-
var shouldPassProp = !isStyleProp && isHOC ||
|
|
464
|
-
var
|
|
465
|
-
var isHOCShouldPassThrough = Boolean(isHOC && (parentVariant || keyInit in import_skipProps.skipProps));
|
|
555
|
+
var shouldPassProp = !isStyleProp && isHOC || isHOC && keyInit === "disabled" || parentVariants && keyInit in parentVariants || (inlineProps === null || inlineProps === void 0 ? void 0 : inlineProps.has(keyInit));
|
|
556
|
+
var isHOCShouldPassThrough = isHOC && keyInit in import_skipProps.skipProps;
|
|
466
557
|
var shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
|
|
467
558
|
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
468
559
|
console.groupCollapsed(` \u{1F511} ${keyOg}${keyInit !== keyOg ? ` (shorthand for ${keyInit})` : ""} ${shouldPassThrough ? "(pass)" : ""}`);
|
|
@@ -486,7 +577,8 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
486
577
|
if (!isVariant) return;
|
|
487
578
|
}
|
|
488
579
|
if (!isNativeInputColor && shouldCheckSkipProps && !(neverSkipProps === null || neverSkipProps === void 0 ? void 0 : neverSkipProps[keyInit])) {
|
|
489
|
-
|
|
580
|
+
var _getTransitionResolver;
|
|
581
|
+
if (keyInit in import_skipProps.skipProps && !(keyInit === "transition" && typeof valInit === "string" && !((_getTransitionResolver = (0, import_transitionResolver.getTransitionResolver)()) === null || _getTransitionResolver === void 0 ? void 0 : _getTransitionResolver.resolve(valInit, { animations: driverAnimations }).fused))) {
|
|
490
582
|
if (process.env.NODE_ENV === "development" && debug === "verbose") console.groupEnd();
|
|
491
583
|
return;
|
|
492
584
|
}
|
|
@@ -519,22 +611,22 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
519
611
|
if (valInit === "unset") {
|
|
520
612
|
var expanded = (0, import_expandStyle.expandStyle)(keyInit, valInit, conf.settings.styleCompat || "web");
|
|
521
613
|
clearDirectStyle(styleState, keyInit);
|
|
522
|
-
if (expanded) for (var
|
|
523
|
-
} else contributeValue(styleState, keyInit, valInit, originalOg, !isHostStyleKey);
|
|
614
|
+
if (expanded) for (var index3 = 0; index3 < expanded.length; index3++) clearDirectStyle(styleState, expanded[index3][0]);
|
|
615
|
+
} else contributeValue(styleState, keyInit, valInit, originalOg, !isHostStyleKey || isStyledContextProp && typeof valInit === "boolean");
|
|
524
616
|
return;
|
|
525
617
|
}
|
|
526
618
|
var condition = pass[passParentCursor];
|
|
527
619
|
if (condition) {
|
|
528
620
|
if (isHOC) {
|
|
529
621
|
var previous = viewProps[keyInit];
|
|
530
|
-
var transport = previous &&
|
|
622
|
+
var transport = previous && typeof previous === "object" && !Array.isArray(previous) && "default" in previous ? previous : { default: previous };
|
|
531
623
|
transport[condition[conditionKey]] = valInit;
|
|
532
624
|
viewProps[keyInit] = transport;
|
|
533
625
|
} 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.`);
|
|
534
626
|
return;
|
|
535
627
|
}
|
|
536
|
-
if (keyInit in import_helpers.stylePropsAll) {
|
|
537
|
-
if (process.env.NODE_ENV === "development"
|
|
628
|
+
if (keyInit in import_helpers.stylePropsAll || isRemovedVendorStyleProp(keyInit)) {
|
|
629
|
+
if (process.env.NODE_ENV === "development" && false);
|
|
538
630
|
return;
|
|
539
631
|
}
|
|
540
632
|
viewProps[keyInit] = valInit;
|
|
@@ -549,7 +641,7 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
549
641
|
}
|
|
550
642
|
}
|
|
551
643
|
var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, componentContext, groupContext, elementType, startedUnhydrated, debug, animationDriver, styleStaticConfig) {
|
|
552
|
-
var _styleState_flatMediaKeys, _styleState_flatGroupKeys, _styleState_flatGroupMedia, _styleState_style;
|
|
644
|
+
var _staticConfig_Component_staticConfig, _staticConfig_Component, _styleState_flatMediaKeys, _styleState_flatGroupKeys, _styleState_flatGroupMedia, _styleState_flatGroupKeys1, _styleState_flatGroupMedia1, _styleState_style;
|
|
553
645
|
var conf = (0, import_config.getConfig)();
|
|
554
646
|
styleStaticConfig || (styleStaticConfig = (0, import_styleStaticConfig.getStyleStaticConfig)(staticConfig, conf));
|
|
555
647
|
var driver = animationDriver || (componentContext === null || componentContext === void 0 ? void 0 : componentContext.animationDriver) || conf.animations;
|
|
@@ -563,7 +655,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
563
655
|
var variants = styleStaticConfig.variants;
|
|
564
656
|
var viewProps = {};
|
|
565
657
|
var mediaState = styleProps.mediaState || import_mediaState.mediaState;
|
|
566
|
-
var shouldDoClasses =
|
|
658
|
+
var shouldDoClasses = process.env.TAMAGUI_RUNTIME !== "island" && acceptsClassName && false;
|
|
567
659
|
var rulesToInsert = void 0;
|
|
568
660
|
var classNames = {};
|
|
569
661
|
var hasMedia = false;
|
|
@@ -594,6 +686,12 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
594
686
|
animationDriver: resolvedDriver
|
|
595
687
|
};
|
|
596
688
|
styleState.flatStyleStaticConfig = styleStaticConfig;
|
|
689
|
+
var prev = styleProps.prevStyle;
|
|
690
|
+
if (prev) {
|
|
691
|
+
styleState.flatPrevStyle = prev;
|
|
692
|
+
styleState.flatStyleChanged = false;
|
|
693
|
+
styleState.flatStyleKeyCount = 0;
|
|
694
|
+
}
|
|
597
695
|
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`style-state`;
|
|
598
696
|
if (process.env.NODE_ENV === "development" && debug === "verbose" && import_constants.isClient) {
|
|
599
697
|
if (import_isDevTools.isDevTools) {
|
|
@@ -619,7 +717,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
619
717
|
var frontendContainer;
|
|
620
718
|
var frontendContainerType;
|
|
621
719
|
var processedProps = props;
|
|
622
|
-
var parentVariants =
|
|
720
|
+
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;
|
|
623
721
|
var defaultProps = asChild ? styleStaticConfig.defaultProps : void 0;
|
|
624
722
|
var asChildExceptStyleLike = asChild === "except-style" || asChild === "except-style-web";
|
|
625
723
|
var containerValue;
|
|
@@ -641,7 +739,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
641
739
|
styledContextKeys,
|
|
642
740
|
(noSkip ? passNoSkipFlag : 0) | (disableExpandShorthands ? passDisableShorthandsFlag : 0) | (noExpand ? passNoExpandFlag : 0) | (noMergeStyle ? passNoMergeFlag : 0) | (isHOC ? passHocFlag : 0) | (isText ? passTextFlag : 0) | (isInput ? passInputFlag : 0) | (asChildExceptStyleLike ? passAsChildStyleFlag : 0),
|
|
643
741
|
debug,
|
|
644
|
-
parentStaticConfig,
|
|
742
|
+
process.env.NODE_ENV === "development" ? parentStaticConfig : void 0,
|
|
645
743
|
defaultProps,
|
|
646
744
|
driverAnimations,
|
|
647
745
|
driverOutputStyle,
|
|
@@ -682,6 +780,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
682
780
|
}
|
|
683
781
|
var resolvers = staticConfig.resolvers;
|
|
684
782
|
if (resolvers && !noExpand) {
|
|
783
|
+
var prevSourceLayer = pass[passSourceLayer];
|
|
685
784
|
pass[passSourceLayer] = sourceLayerResolver;
|
|
686
785
|
var flagsBefore = pass[passFlags];
|
|
687
786
|
pass[passFlags] = flagsBefore | passNoExpandFlag;
|
|
@@ -694,6 +793,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
694
793
|
}
|
|
695
794
|
}
|
|
696
795
|
pass[passFlags] = flagsBefore;
|
|
796
|
+
pass[passSourceLayer] = prevSourceLayer;
|
|
697
797
|
}
|
|
698
798
|
className = pass[passClassName];
|
|
699
799
|
shouldDoClasses = pass[passShouldDoClasses];
|
|
@@ -739,6 +839,8 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
739
839
|
}
|
|
740
840
|
}
|
|
741
841
|
completeResolvedStyles(styleState);
|
|
842
|
+
if ((_styleState_flatGroupKeys1 = styleState.flatGroupKeys) === null || _styleState_flatGroupKeys1 === void 0 ? void 0 : _styleState_flatGroupKeys1.size) pseudoGroups = styleState.flatGroupKeys;
|
|
843
|
+
if ((_styleState_flatGroupMedia1 = styleState.flatGroupMedia) === null || _styleState_flatGroupMedia1 === void 0 ? void 0 : _styleState_flatGroupMedia1.size) mediaGroups = styleState.flatGroupMedia;
|
|
742
844
|
if (styleProps.isStatic) for (var property in classNames) {
|
|
743
845
|
var identifier = classNames[property];
|
|
744
846
|
if (rulesToInsert[identifier]) continue;
|
|
@@ -773,26 +875,47 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
773
875
|
}
|
|
774
876
|
}
|
|
775
877
|
}
|
|
878
|
+
var nativeTextMetrics;
|
|
879
|
+
var _styleState_style2;
|
|
776
880
|
if (viewProps.tabIndex === 0) {
|
|
777
881
|
var _viewProps;
|
|
778
882
|
var _accessible;
|
|
779
883
|
(_accessible = (_viewProps = viewProps).accessible) !== null && _accessible !== void 0 || (_viewProps.accessible = true);
|
|
780
884
|
}
|
|
781
|
-
|
|
782
|
-
|
|
885
|
+
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)) {
|
|
886
|
+
var _parentSplitStyles_nativeTextMetrics;
|
|
887
|
+
var _styleState2;
|
|
888
|
+
var style = (_styleState2 = styleState).style || (_styleState2.style = {});
|
|
889
|
+
var _styleState_nativeLineHeight;
|
|
890
|
+
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;
|
|
891
|
+
if (typeof lineHeight === "string") {
|
|
892
|
+
var length = (0, import_resolveNativeUnits.resolveNativeUnits)("lineHeight", lineHeight, styleState);
|
|
893
|
+
if (typeof length === "number") lineHeight = `${length}px`;
|
|
894
|
+
}
|
|
895
|
+
nativeTextMetrics = (0, import_nativeTextMetrics.resolveTextMetrics)(style, lineHeight, componentContext, styleProps.isStatic, !staticConfig.isDOM && !(processedProps.asChild && (0, import_isTamaguiElement.isTamaguiElement)(processedProps.children)));
|
|
896
|
+
if (staticConfig.isDOM) viewProps.__textMetrics = nativeTextMetrics;
|
|
897
|
+
var directText = styleState;
|
|
898
|
+
var prevTextStyle = directText.flatPrevStyle;
|
|
899
|
+
if (prevTextStyle && !directText.flatStyleChanged) {
|
|
900
|
+
var resolvedTextStyle = styleState.style;
|
|
901
|
+
if (resolvedTextStyle && (resolvedTextStyle.fontSize !== prevTextStyle.fontSize || resolvedTextStyle.lineHeight !== prevTextStyle.lineHeight)) directText.flatStyleChanged = true;
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
var style1 = styleState.style;
|
|
905
|
+
if (style1 === null || style1 === void 0 ? void 0 : style1.fontFamily) {
|
|
783
906
|
var _getFont;
|
|
784
|
-
var faceInfo = (_getFont = (0, import_config.getFont)(
|
|
907
|
+
var faceInfo = (_getFont = (0, import_config.getFont)(style1.fontFamily)) === null || _getFont === void 0 ? void 0 : _getFont.face;
|
|
785
908
|
if (faceInfo) {
|
|
786
909
|
var _faceInfo_style_fontWeight_, _faceInfo_style_fontWeight;
|
|
787
|
-
var overrideFace = (_faceInfo_style_fontWeight = faceInfo[
|
|
910
|
+
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;
|
|
788
911
|
if (overrideFace) {
|
|
789
|
-
|
|
912
|
+
style1.fontFamily = overrideFace;
|
|
790
913
|
styleState.fontFamily = overrideFace;
|
|
791
|
-
delete
|
|
792
|
-
delete
|
|
914
|
+
delete style1.fontWeight;
|
|
915
|
+
delete style1.fontStyle;
|
|
793
916
|
}
|
|
794
917
|
}
|
|
795
|
-
if (process.env.NODE_ENV === "development" && debug && debug !== "profile") (0, import_log.log)(`Found fontFamily native: ${
|
|
918
|
+
if (process.env.NODE_ENV === "development" && debug && debug !== "profile") (0, import_log.log)(`Found fontFamily native: ${style1.fontFamily}`, faceInfo);
|
|
796
919
|
}
|
|
797
920
|
if (styleState.style) styleState.style = (0, import_nativeStyleEngine.normalizeNativeStyle)(styleState.style);
|
|
798
921
|
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-pre-result`;
|
|
@@ -808,6 +931,56 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
808
931
|
}
|
|
809
932
|
if (hasProvenance) (0, import_styleProvenance.setStyleTokenProvenance)(styleState.style, provenance);
|
|
810
933
|
}
|
|
934
|
+
var direct = styleState;
|
|
935
|
+
var prevStyle = direct.flatPrevStyle;
|
|
936
|
+
if (prevStyle && styleState.style && !direct.flatStyleChanged && Object.keys(prevStyle).length === Object.keys(styleState.style).length) {
|
|
937
|
+
var previousTransform = prevStyle.transform;
|
|
938
|
+
var nextTransform = styleState.style.transform;
|
|
939
|
+
var transformMatches = previousTransform === nextTransform;
|
|
940
|
+
if (!transformMatches && Array.isArray(previousTransform) && Array.isArray(nextTransform) && previousTransform.length === nextTransform.length) {
|
|
941
|
+
transformMatches = true;
|
|
942
|
+
for (var index1 = 0; index1 < nextTransform.length; index1++) {
|
|
943
|
+
var previousPart = previousTransform[index1];
|
|
944
|
+
var nextPart = nextTransform[index1];
|
|
945
|
+
if (previousPart === nextPart) continue;
|
|
946
|
+
if (!previousPart || !nextPart || typeof previousPart !== "object" || typeof nextPart !== "object") {
|
|
947
|
+
transformMatches = false;
|
|
948
|
+
break;
|
|
949
|
+
}
|
|
950
|
+
var keys = Object.keys(nextPart);
|
|
951
|
+
if (keys.length !== Object.keys(previousPart).length) {
|
|
952
|
+
transformMatches = false;
|
|
953
|
+
break;
|
|
954
|
+
}
|
|
955
|
+
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
|
|
956
|
+
try {
|
|
957
|
+
var _loop = function() {
|
|
958
|
+
var key9 = _step1.value;
|
|
959
|
+
var previousValue = previousPart[key9];
|
|
960
|
+
var nextValue = nextPart[key9];
|
|
961
|
+
if (previousValue !== nextValue && !(Array.isArray(previousValue) && Array.isArray(nextValue) && previousValue.length === nextValue.length && nextValue.every(function(value, valueIndex) {
|
|
962
|
+
return value === previousValue[valueIndex];
|
|
963
|
+
}))) {
|
|
964
|
+
transformMatches = false;
|
|
965
|
+
return "break";
|
|
966
|
+
}
|
|
967
|
+
};
|
|
968
|
+
for (var _iterator1 = keys[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) if (_loop() === "break") break;
|
|
969
|
+
} catch (err) {
|
|
970
|
+
_didIteratorError1 = true;
|
|
971
|
+
_iteratorError1 = err;
|
|
972
|
+
} finally {
|
|
973
|
+
try {
|
|
974
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) _iterator1.return();
|
|
975
|
+
} finally {
|
|
976
|
+
if (_didIteratorError1) throw _iteratorError1;
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
if (!transformMatches) break;
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
if (transformMatches) styleState.style = prevStyle;
|
|
983
|
+
}
|
|
811
984
|
var result = {
|
|
812
985
|
hasMedia,
|
|
813
986
|
fontFamily: styleState.fontFamily,
|
|
@@ -819,6 +992,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
819
992
|
mediaGroups,
|
|
820
993
|
overriddenContextProps: styleState.overriddenContextProps
|
|
821
994
|
};
|
|
995
|
+
if (nativeTextMetrics) result.nativeTextMetrics = nativeTextMetrics;
|
|
822
996
|
if (effectiveTransition != null) result.effectiveTransition = effectiveTransition;
|
|
823
997
|
if (conditionalStates) result.programStates = conditionalStates;
|
|
824
998
|
if (usesSafeArea) result.usesSafeArea = true;
|
|
@@ -834,8 +1008,8 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
834
1008
|
if (frontendContainerType !== void 0) result.frontendContainerType = frontendContainerType;
|
|
835
1009
|
if (!noMergeStyle) {
|
|
836
1010
|
if (!asChildExceptStyleLike) {
|
|
837
|
-
var
|
|
838
|
-
if (
|
|
1011
|
+
var style2 = styleState.style;
|
|
1012
|
+
if (style2) viewProps.style = style2;
|
|
839
1013
|
}
|
|
840
1014
|
}
|
|
841
1015
|
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
@@ -863,7 +1037,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
863
1037
|
var stylePieceStaticConfig = {
|
|
864
1038
|
acceptsClassName: true,
|
|
865
1039
|
isText: true,
|
|
866
|
-
validStyles: import_helpers.
|
|
1040
|
+
validStyles: import_helpers.stylePropsInput
|
|
867
1041
|
};
|
|
868
1042
|
var compileStylePieceRuntime = function(piece, layer) {};
|
|
869
1043
|
(0, import_style.setStylePieceCompiler)(compileStylePieceRuntime);
|
|
@@ -890,6 +1064,34 @@ function resolveStylePiece(styleState, piece) {
|
|
|
890
1064
|
themeCache.set(theme, resolved);
|
|
891
1065
|
return resolved;
|
|
892
1066
|
}
|
|
1067
|
+
function writeStyleSlot(slots, slot, source, sourceLayer) {
|
|
1068
|
+
var list = slots.get(slot);
|
|
1069
|
+
if (!list) slots.set(slot, list = []);
|
|
1070
|
+
var flags = source[7] & 31;
|
|
1071
|
+
var identity = source[3];
|
|
1072
|
+
var condition = source[2];
|
|
1073
|
+
for (var index = 0; index < list.length; index++) {
|
|
1074
|
+
var entry = list[index];
|
|
1075
|
+
var entryFlags = entry[7] & 31;
|
|
1076
|
+
if ((entryFlags & (recordInline | recordCSS)) !== (flags & (recordInline | recordCSS))) {
|
|
1077
|
+
if (sourceLayer === sourceLayerStyle && entry[7] >> 5 === sourceLayerStyle && entry[0] === source[0] && !condition && !entry[2]) list.splice(index--, 1);
|
|
1078
|
+
continue;
|
|
1079
|
+
}
|
|
1080
|
+
if (entry[0] !== source[0]) continue;
|
|
1081
|
+
if (flags & recordDefault) {
|
|
1082
|
+
if (!(entryFlags & recordDefault) && (!entry[2] || entry[3] === identity)) return;
|
|
1083
|
+
} else if (entryFlags & recordDefault && (!condition || entry[3] === identity)) {
|
|
1084
|
+
list.splice(index--, 1);
|
|
1085
|
+
continue;
|
|
1086
|
+
}
|
|
1087
|
+
if (entry[3] === identity) {
|
|
1088
|
+
list.splice(index, 1);
|
|
1089
|
+
break;
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
source[7] = flags | sourceLayer << 5;
|
|
1093
|
+
list.push(source);
|
|
1094
|
+
}
|
|
893
1095
|
function mergeStyle(styleState, key, val) {
|
|
894
1096
|
arguments.length > 3 && arguments[3] !== void 0 && arguments[3];
|
|
895
1097
|
var originalVal = arguments.length > 4 ? arguments[4] : void 0;
|
|
@@ -909,10 +1111,24 @@ function mergeStyle(styleState, key, val) {
|
|
|
909
1111
|
(0, import_runtime.addTransformValue)(styleState.transformAccumulator, key, val);
|
|
910
1112
|
} else {
|
|
911
1113
|
var out = val;
|
|
1114
|
+
if (key === "lineHeight") styleState.nativeLineHeight = typeof out === "number" && (0, import_createVariable.isVariable)(originalVal) && typeof originalVal.val === "number" ? `${out}px` : out;
|
|
1115
|
+
else if (typeof out === "string") {
|
|
1116
|
+
if (out.includes("cqi") || out.includes("cqw")) {
|
|
1117
|
+
var _styleState2, _styleState3;
|
|
1118
|
+
((_styleState2 = styleState).flatGroupKeys || (_styleState2.flatGroupKeys = /* @__PURE__ */ new Set())).add("@");
|
|
1119
|
+
((_styleState3 = styleState).flatGroupMedia || (_styleState3.flatGroupMedia = /* @__PURE__ */ new Set())).add("@");
|
|
1120
|
+
}
|
|
1121
|
+
out = (0, import_resolveNativeUnits.resolveNativeUnits)(key, out, styleState);
|
|
1122
|
+
}
|
|
912
1123
|
if (staticConfig.isInput && key in import_nativeStyleEngine.nativeTextInputColorProps) viewProps[import_nativeStyleEngine.nativeTextInputColorProps[key]] = out;
|
|
913
1124
|
else {
|
|
914
|
-
var
|
|
915
|
-
|
|
1125
|
+
var _styleState4;
|
|
1126
|
+
var direct = styleState;
|
|
1127
|
+
if (direct.flatPrevStyle) {
|
|
1128
|
+
direct.flatStyleKeyCount = (direct.flatStyleKeyCount || 0) + 1;
|
|
1129
|
+
if (!direct.flatStyleChanged && direct.flatPrevStyle[key] !== out) direct.flatStyleChanged = true;
|
|
1130
|
+
}
|
|
1131
|
+
(_styleState4 = styleState).style || (_styleState4.style = {});
|
|
916
1132
|
styleState.style[key] = out;
|
|
917
1133
|
if (shouldTrackStyleTokenProvenance) recordStyleTokenProvenance(styleState, key, originalVal);
|
|
918
1134
|
}
|
|
@@ -923,8 +1139,8 @@ function recordStyleTokenProvenance(styleState, key, originalVal) {
|
|
|
923
1139
|
var tokenName = typeof originalVal === "string" ? originalVal : "";
|
|
924
1140
|
if (tokenName) {
|
|
925
1141
|
var slash = tokenName.lastIndexOf("/");
|
|
926
|
-
var opacity = slash === -1 ? NaN :
|
|
927
|
-
if (
|
|
1142
|
+
var opacity = slash === -1 ? NaN : +tokenName.slice(slash + 1);
|
|
1143
|
+
if (opacity % 1 === 0 && opacity >= 0 && opacity <= 100) tokenName = tokenName.slice(0, slash);
|
|
928
1144
|
}
|
|
929
1145
|
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) {
|
|
930
1146
|
return tokenName in category;
|
|
@@ -975,31 +1191,32 @@ var recordDefault = 8;
|
|
|
975
1191
|
var recordCSS = 16;
|
|
976
1192
|
function writeStyleRecord(state, property, value, cursor, original, flags) {
|
|
977
1193
|
var conditionOverride = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : -1;
|
|
978
|
-
var
|
|
1194
|
+
var _direct_flatPass, _direct_flatPass1;
|
|
979
1195
|
var _direct;
|
|
980
1196
|
var condition = conditionOverride !== -1 ? conditionOverride : cursor ? cursor[conditionValue] : 0;
|
|
981
1197
|
var identity = cursor ? cursor[conditionKey] : "";
|
|
982
|
-
|
|
983
|
-
|
|
1198
|
+
if (value === "unset" && identity !== "") {
|
|
1199
|
+
value = void 0;
|
|
1200
|
+
original = void 0;
|
|
1201
|
+
flags |= recordRetract;
|
|
1202
|
+
}
|
|
1203
|
+
var direct = state;
|
|
1204
|
+
var slots = (_direct = direct).flatSlots || (_direct.flatSlots = /* @__PURE__ */ new Map());
|
|
1205
|
+
var sourceLayer = ((_direct_flatPass = direct.flatPass) === null || _direct_flatPass === void 0 ? void 0 : _direct_flatPass[passSourceLayer]) || 0;
|
|
1206
|
+
if (direct.flatInlineStyleProp) flags |= recordInline;
|
|
1207
|
+
var cssSlot = property.startsWith("transition") ? "transition" : property;
|
|
1208
|
+
var slot = flags & recordInline && cssSlot !== property ? property : cssSlot;
|
|
984
1209
|
var list = slots.get(slot);
|
|
985
1210
|
if (!list) slots.set(slot, list = []);
|
|
986
|
-
|
|
987
|
-
var
|
|
988
|
-
var
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
if (!(entryFlags & recordDefault) && (!entry[2] || entry[3] === identity)) return;
|
|
993
|
-
} else if (entryFlags & recordDefault && (!condition || entry[3] === identity)) {
|
|
994
|
-
list.splice(index--, 1);
|
|
995
|
-
continue;
|
|
996
|
-
}
|
|
997
|
-
if (entry[3] === identity) {
|
|
998
|
-
list.splice(index, 1);
|
|
999
|
-
break;
|
|
1211
|
+
if (sourceLayer === sourceLayerStyle && !condition) {
|
|
1212
|
+
var other = slot === cssSlot ? list : slots.get(flags & recordInline ? cssSlot : property);
|
|
1213
|
+
if (other) for (var index = 0; index < other.length; index++) {
|
|
1214
|
+
var entry = other[index];
|
|
1215
|
+
var entryFlags = entry[7];
|
|
1216
|
+
if (entry[0] === property && !entry[2] && entryFlags >> 5 === sourceLayerStyle && (entryFlags & (recordInline | recordCSS)) !== (flags & (recordInline | recordCSS))) other.splice(index--, 1);
|
|
1000
1217
|
}
|
|
1001
1218
|
}
|
|
1002
|
-
|
|
1219
|
+
writeStyleSlot(slots, slot, [
|
|
1003
1220
|
property,
|
|
1004
1221
|
value,
|
|
1005
1222
|
condition,
|
|
@@ -1007,8 +1224,10 @@ function writeStyleRecord(state, property, value, cursor, original, flags) {
|
|
|
1007
1224
|
cursor ? cursor[conditionSelector] : "",
|
|
1008
1225
|
cursor ? cursor[conditionWrappers] : void 0,
|
|
1009
1226
|
original,
|
|
1010
|
-
flags
|
|
1011
|
-
|
|
1227
|
+
flags,
|
|
1228
|
+
void 0,
|
|
1229
|
+
!sourceLayer && ((_direct_flatPass1 = direct.flatPass) === null || _direct_flatPass1 === void 0 ? void 0 : _direct_flatPass1[passVariantOutput])
|
|
1230
|
+
], sourceLayer);
|
|
1012
1231
|
}
|
|
1013
1232
|
function streamWriteInline(state, property, value, cursor, original) {
|
|
1014
1233
|
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;
|
|
@@ -1016,6 +1235,7 @@ function streamWriteInline(state, property, value, cursor, original) {
|
|
|
1016
1235
|
}
|
|
1017
1236
|
function completeResolvedStyles(state) {
|
|
1018
1237
|
var merge = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : mergeStyle;
|
|
1238
|
+
var _direct;
|
|
1019
1239
|
var direct = state;
|
|
1020
1240
|
var shadow = direct.flatWebShadow;
|
|
1021
1241
|
if (shadow && (direct.flatBoxShadowSequence || 0) <= shadow[4]) {
|
|
@@ -1038,6 +1258,7 @@ function completeResolvedStyles(state) {
|
|
|
1038
1258
|
}
|
|
1039
1259
|
var slots = direct.flatSlots;
|
|
1040
1260
|
if (!slots) return;
|
|
1261
|
+
var capture = state.staticConfig.isHOC ? (_direct = direct).flatCapturedSlots || (_direct.flatCapturedSlots = /* @__PURE__ */ new Map()) : void 0;
|
|
1041
1262
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
1042
1263
|
try {
|
|
1043
1264
|
for (var _iterator = slots[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
@@ -1069,7 +1290,45 @@ function completeResolvedStyles(state) {
|
|
|
1069
1290
|
}
|
|
1070
1291
|
}
|
|
1071
1292
|
}
|
|
1072
|
-
if (cssEntries)
|
|
1293
|
+
if (cssEntries) {
|
|
1294
|
+
(0, import_getCSSStylesAtomic.registerAtomicSlot)(direct, property, cssEntries);
|
|
1295
|
+
if (capture) {
|
|
1296
|
+
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
|
|
1297
|
+
try {
|
|
1298
|
+
for (var _iterator1 = cssEntries[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
|
|
1299
|
+
var entry1 = _step1.value;
|
|
1300
|
+
entry1[7] = entry1[7] | recordCSS;
|
|
1301
|
+
if (!(entry1[2] & 12)) continue;
|
|
1302
|
+
var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
|
|
1303
|
+
try {
|
|
1304
|
+
for (var _iterator2 = cssEntries[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
|
1305
|
+
var sibling = _step2.value;
|
|
1306
|
+
if (sibling[0] === entry1[0]) sibling[8] = true;
|
|
1307
|
+
}
|
|
1308
|
+
} catch (err) {
|
|
1309
|
+
_didIteratorError2 = true;
|
|
1310
|
+
_iteratorError2 = err;
|
|
1311
|
+
} finally {
|
|
1312
|
+
try {
|
|
1313
|
+
if (!_iteratorNormalCompletion2 && _iterator2.return != null) _iterator2.return();
|
|
1314
|
+
} finally {
|
|
1315
|
+
if (_didIteratorError2) throw _iteratorError2;
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
} catch (err) {
|
|
1320
|
+
_didIteratorError1 = true;
|
|
1321
|
+
_iteratorError1 = err;
|
|
1322
|
+
} finally {
|
|
1323
|
+
try {
|
|
1324
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) _iterator1.return();
|
|
1325
|
+
} finally {
|
|
1326
|
+
if (_didIteratorError1) throw _iteratorError1;
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
capture.set(property, cssEntries);
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1073
1332
|
if (inlineWinner) if (inlineWinner[7] & recordRetract) {
|
|
1074
1333
|
if (state.style) delete state.style[inlineWinner[0]];
|
|
1075
1334
|
} else merge(state, inlineWinner[0], inlineWinner[1], !(inlineWinner[7] & recordNormalize), inlineWinner[6] !== void 0 ? inlineWinner[6] : inlineWinner[1]);
|
|
@@ -1106,7 +1365,7 @@ function emitUnderCondition(state, property, value, cursor, originalValue, conte
|
|
|
1106
1365
|
return condition;
|
|
1107
1366
|
}
|
|
1108
1367
|
var formatScanFailure = function(failure, source, failureIndex) {
|
|
1109
|
-
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 \"(\"";
|
|
1368
|
+
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 ${import_runtime.grammarMaxNonPlatformDepth} non-platform conditions` : "an unterminated \"(\"";
|
|
1110
1369
|
};
|
|
1111
1370
|
var warnScanFailure = function(property, source, failure, failureIndex) {
|
|
1112
1371
|
if (process.env.NODE_ENV === "development") (0, import_warnOnce.warnRefusedValue)(property, source, formatScanFailure(failure, source, failureIndex));
|
|
@@ -1132,17 +1391,29 @@ var valueCaches = /* @__PURE__ */ new WeakMap();
|
|
|
1132
1391
|
var valueCacheEntries = 0;
|
|
1133
1392
|
var valueCacheRoot = {};
|
|
1134
1393
|
var parsedSlices = /* @__PURE__ */ new WeakMap();
|
|
1135
|
-
var
|
|
1394
|
+
var cssWideColorKeywords = /* @__PURE__ */ new Set([
|
|
1395
|
+
"inherit",
|
|
1396
|
+
"initial",
|
|
1397
|
+
"unset",
|
|
1398
|
+
"revert",
|
|
1399
|
+
"revert-layer",
|
|
1400
|
+
"currentcolor",
|
|
1401
|
+
"transparent"
|
|
1402
|
+
]);
|
|
1403
|
+
var shadowRecipeProperties = /* @__PURE__ */ new Set([
|
|
1404
|
+
"boxShadow",
|
|
1405
|
+
"textShadow",
|
|
1406
|
+
"filter"
|
|
1407
|
+
]);
|
|
1136
1408
|
function configuredValue(state, property, raw) {
|
|
1137
|
-
var embedded = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false;
|
|
1138
|
-
var _maps;
|
|
1409
|
+
var embedded = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false, nativeColors = arguments.length > 4 ? arguments[4] : void 0;
|
|
1139
1410
|
var grammar = (0, import_grammarConfig.getConfigRevisionState)(state.conf);
|
|
1140
1411
|
var name = raw;
|
|
1141
1412
|
var opacity;
|
|
1142
1413
|
var slash = raw.lastIndexOf("/");
|
|
1143
1414
|
if (slash > 0) {
|
|
1144
|
-
var amount =
|
|
1145
|
-
if (
|
|
1415
|
+
var amount = +raw.slice(slash + 1);
|
|
1416
|
+
if (amount % 1 === 0 && amount >= 0 && amount <= 100) {
|
|
1146
1417
|
name = raw.slice(0, slash);
|
|
1147
1418
|
opacity = amount;
|
|
1148
1419
|
}
|
|
@@ -1152,36 +1423,33 @@ function configuredValue(state, property, raw) {
|
|
|
1152
1423
|
state.flatUsesSafeArea = true;
|
|
1153
1424
|
return safeArea;
|
|
1154
1425
|
}
|
|
1155
|
-
var fontProperty =
|
|
1156
|
-
if (fontProperty === void 0) {
|
|
1157
|
-
fontProperty = property.startsWith("font") || property === "lineHeight" || property === "letterSpacing";
|
|
1158
|
-
fontProperties.set(property, fontProperty);
|
|
1159
|
-
}
|
|
1160
|
-
var revision = grammar.revision;
|
|
1161
|
-
if (state.conf !== valueCacheConf || revision !== valueCacheRevision) {
|
|
1162
|
-
valueCacheConf = state.conf;
|
|
1163
|
-
valueCacheRevision = revision;
|
|
1164
|
-
valueCaches = /* @__PURE__ */ new WeakMap();
|
|
1165
|
-
valueCacheEntries = 0;
|
|
1166
|
-
state.flatValueScope = void 0;
|
|
1167
|
-
}
|
|
1426
|
+
var fontProperty = property.startsWith("font") || property === "lineHeight" || property === "letterSpacing";
|
|
1168
1427
|
var resolveValues = state.styleProps.resolveValues;
|
|
1169
|
-
var
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
var
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1428
|
+
var byRaw;
|
|
1429
|
+
if (!fontProperty && !nativeColors) {
|
|
1430
|
+
var _maps;
|
|
1431
|
+
var revision = grammar.revision;
|
|
1432
|
+
if (state.conf !== valueCacheConf || revision !== valueCacheRevision) {
|
|
1433
|
+
valueCacheConf = state.conf;
|
|
1434
|
+
valueCacheRevision = revision;
|
|
1435
|
+
valueCaches = /* @__PURE__ */ new WeakMap();
|
|
1436
|
+
valueCacheEntries = 0;
|
|
1437
|
+
state.flatValueScope = void 0;
|
|
1438
|
+
}
|
|
1439
|
+
var direct = state;
|
|
1440
|
+
var scope = direct.flatValueScope;
|
|
1441
|
+
if (scope === void 0) {
|
|
1442
|
+
var themeObject = state.theme && typeof state.theme === "object" ? state.theme : valueCacheRoot;
|
|
1443
|
+
var byScope = valueCaches.get(themeObject);
|
|
1444
|
+
if (!byScope) valueCaches.set(themeObject, byScope = /* @__PURE__ */ new Map());
|
|
1445
|
+
var scopeKey = `${state.flatThemeName || ""}${resolveValues}`;
|
|
1446
|
+
scope = byScope.get(scopeKey);
|
|
1447
|
+
if (!scope) byScope.set(scopeKey, scope = /* @__PURE__ */ new Map());
|
|
1448
|
+
direct.flatValueScope = scope;
|
|
1449
|
+
}
|
|
1450
|
+
var maps = scope.get(property);
|
|
1451
|
+
if (maps === void 0) scope.set(property, maps = { direct: /* @__PURE__ */ new Map() });
|
|
1452
|
+
byRaw = embedded ? (_maps = maps).embedded || (_maps.embedded = /* @__PURE__ */ new Map()) : maps.direct;
|
|
1185
1453
|
var known = byRaw.get(raw);
|
|
1186
1454
|
if (known !== void 0 || byRaw.has(raw)) return known;
|
|
1187
1455
|
}
|
|
@@ -1222,25 +1490,108 @@ function configuredValue(state, property, raw) {
|
|
|
1222
1490
|
}
|
|
1223
1491
|
if (process.env.NODE_ENV === "development") {
|
|
1224
1492
|
var _state_conf_tokensParsed_color1;
|
|
1225
|
-
var category1 = grammar.tokenCategory(property);
|
|
1226
|
-
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])) (0, import_warnOnce.warnOnce)(`"${name}" contributes to "color", not "${property}"`);
|
|
1493
|
+
var category1 = grammar.tokenCategory(property) || grammar.tokenCategory(state.conf.shorthands[property] || property);
|
|
1494
|
+
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])) (0, import_warnOnce.warnOnce)(`"${name}" contributes to "color", not "${property}"`);
|
|
1495
|
+
if (!value && !fontProperty) {
|
|
1496
|
+
if (name.charCodeAt(0) === 36 || raw.charCodeAt(0) === 36) {
|
|
1497
|
+
var suggested = name.charCodeAt(0) === 36 ? name.slice(1) : raw.slice(1);
|
|
1498
|
+
(0, import_warnOnce.warnOnce)(`v2-token:${property}=${raw}`, `${property}="${raw}": v3 tokens have no "$" prefix, did you mean "${suggested}"?`);
|
|
1499
|
+
} else if ((category1 === "size" || category1 === "space" || category1 === "radius" || category1 === "zIndex") && /^-?\d+(?:\.\d+)?$/.test(name)) {
|
|
1500
|
+
var nearest;
|
|
1501
|
+
var minDistance = Infinity;
|
|
1502
|
+
var rawNum = Number(name);
|
|
1503
|
+
var tokens = category1 ? state.conf.tokensParsed[category1] : void 0;
|
|
1504
|
+
if (tokens && Number.isFinite(rawNum)) for (var key in tokens) {
|
|
1505
|
+
var _tokens_key;
|
|
1506
|
+
var val = (_tokens_key = tokens[key]) === null || _tokens_key === void 0 ? void 0 : _tokens_key.val;
|
|
1507
|
+
var valNum = typeof val === "number" ? val : Number(val);
|
|
1508
|
+
if (Number.isFinite(valNum)) {
|
|
1509
|
+
var dist = Math.abs(valNum - rawNum);
|
|
1510
|
+
if (dist < minDistance) {
|
|
1511
|
+
minDistance = dist;
|
|
1512
|
+
nearest = key;
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1516
|
+
if (nearest) (0, import_warnOnce.warnOnce)(`numeric-token:${property}=${raw}`, `${property}="${raw}" was passed to CSS as-is${category1 === "zIndex" ? "" : " with px units"}${nearest ? `; nearest token is "${nearest}"` : ""}`);
|
|
1517
|
+
} else if (category1 === "color" && /^[a-zA-Z0-9-]+$/.test(name) && /[a-zA-Z]/.test(name)) {
|
|
1518
|
+
var lower = name.toLowerCase();
|
|
1519
|
+
if (!import_runtime.namedCssColors.has(lower) && !cssWideColorKeywords.has(lower)) {
|
|
1520
|
+
var themeKeys = [];
|
|
1521
|
+
if (state.theme && typeof state.theme === "object") for (var k in state.theme) themeKeys.push(k);
|
|
1522
|
+
if (state.conf.themes) {
|
|
1523
|
+
var active = state.conf.themes[state.flatThemeName || ""];
|
|
1524
|
+
if (active) for (var k1 in active) themeKeys.push(k1);
|
|
1525
|
+
else for (var t in state.conf.themes) for (var k2 in state.conf.themes[t]) themeKeys.push(k2);
|
|
1526
|
+
}
|
|
1527
|
+
var bestMatch;
|
|
1528
|
+
var minDistance1 = 3;
|
|
1529
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
1530
|
+
try {
|
|
1531
|
+
for (var _iterator = themeKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
1532
|
+
var key1 = _step.value;
|
|
1533
|
+
if (Math.abs(key1.length - name.length) > 2) continue;
|
|
1534
|
+
var m = name.length;
|
|
1535
|
+
var n = key1.length;
|
|
1536
|
+
var d = [];
|
|
1537
|
+
for (var i = 0; i <= m; i++) d[i] = i;
|
|
1538
|
+
for (var j = 1; j <= n; j++) {
|
|
1539
|
+
var prev = d[0];
|
|
1540
|
+
d[0] = j;
|
|
1541
|
+
for (var i1 = 1; i1 <= m; i1++) {
|
|
1542
|
+
var temp = d[i1];
|
|
1543
|
+
d[i1] = name[i1 - 1] === key1[j - 1] ? prev : Math.min(prev, d[i1], d[i1 - 1]) + 1;
|
|
1544
|
+
prev = temp;
|
|
1545
|
+
}
|
|
1546
|
+
}
|
|
1547
|
+
var dist1 = d[m];
|
|
1548
|
+
if (dist1 <= 2 && dist1 < minDistance1) {
|
|
1549
|
+
minDistance1 = dist1;
|
|
1550
|
+
bestMatch = key1;
|
|
1551
|
+
}
|
|
1552
|
+
}
|
|
1553
|
+
} catch (err) {
|
|
1554
|
+
_didIteratorError = true;
|
|
1555
|
+
_iteratorError = err;
|
|
1556
|
+
} finally {
|
|
1557
|
+
try {
|
|
1558
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
|
|
1559
|
+
} finally {
|
|
1560
|
+
if (_didIteratorError) throw _iteratorError;
|
|
1561
|
+
}
|
|
1562
|
+
}
|
|
1563
|
+
(0, import_warnOnce.warnOnce)(`unknown-color:${property}=${raw}`, bestMatch ? `unknown color "${name}", did you mean "${bestMatch}"?` : `unknown color "${name}"`);
|
|
1564
|
+
}
|
|
1565
|
+
}
|
|
1566
|
+
}
|
|
1227
1567
|
}
|
|
1228
1568
|
var out = raw;
|
|
1229
1569
|
if ((0, import_createVariable.isVariable)(value)) {
|
|
1230
|
-
out = resolveValues === "except-theme" && fromTheme ? `${import_themeRef.THEME_REF_PREFIX}${lookupName}${opacity !== void 0 ? `/${opacity}` : ""}` : (0, import_resolveVariableValue.resolveVariableValue)(property, value, resolveValues);
|
|
1570
|
+
out = resolveValues === "except-theme" && fromTheme ? `${import_themeRef.THEME_REF_PREFIX}${lookupName}${opacity !== void 0 ? `/${opacity}` : ""}` : (0, import_resolveVariableValue.resolveVariableValue)(nativeColors ? "color" : property, value, resolveValues);
|
|
1231
1571
|
if (opacity !== void 0) {
|
|
1232
1572
|
var _normalizeColor;
|
|
1233
1573
|
out = (_normalizeColor = (0, import_normalizeColor.normalizeColor)(out, opacity / 100)) !== null && _normalizeColor !== void 0 ? _normalizeColor : out;
|
|
1234
1574
|
}
|
|
1235
1575
|
}
|
|
1576
|
+
if (nativeColors && out && typeof out === "object") {
|
|
1577
|
+
var reference = `__tamagui_native_color_${nativeColors.size}`;
|
|
1578
|
+
nativeColors.set(reference, out);
|
|
1579
|
+
out = reference;
|
|
1580
|
+
}
|
|
1236
1581
|
if (embedded && out === raw) {
|
|
1237
1582
|
var usedSafeArea = state.flatUsesSafeArea;
|
|
1238
1583
|
out = grammar.embeddedTokens(raw, function(word) {
|
|
1239
|
-
|
|
1584
|
+
var resolved = configuredValue(state, property, word, false, nativeColors);
|
|
1585
|
+
if (resolved !== word || !shadowRecipeProperties.has(property) || !/^[a-z][\w-]*$/i.test(word)) return resolved;
|
|
1586
|
+
if (word === "currentColor") {
|
|
1587
|
+
var inherited = configuredValue(state, "color", "color", false, nativeColors);
|
|
1588
|
+
return inherited === "color" ? word : inherited;
|
|
1589
|
+
}
|
|
1590
|
+
return configuredValue(state, "color", word, false, nativeColors);
|
|
1240
1591
|
});
|
|
1241
1592
|
if (!usedSafeArea && state.flatUsesSafeArea) return out;
|
|
1242
1593
|
}
|
|
1243
|
-
if (!fontProperty && !fromTheme) if (valueCacheEntries > 8192) {
|
|
1594
|
+
if (!fontProperty && !fromTheme && !nativeColors) if (valueCacheEntries > 8192) {
|
|
1244
1595
|
valueCaches = /* @__PURE__ */ new WeakMap();
|
|
1245
1596
|
valueCacheEntries = 0;
|
|
1246
1597
|
} else {
|
|
@@ -1251,19 +1602,22 @@ function configuredValue(state, property, raw) {
|
|
|
1251
1602
|
}
|
|
1252
1603
|
function ownsSourceLayer(state, property) {
|
|
1253
1604
|
var conditional = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
|
|
1254
|
-
var _direct_flatPass;
|
|
1605
|
+
var _direct_flatPass, _direct_flatPass1;
|
|
1255
1606
|
var _direct;
|
|
1256
1607
|
var direct = state;
|
|
1257
1608
|
var layer = ((_direct_flatPass = direct.flatPass) === null || _direct_flatPass === void 0 ? void 0 : _direct_flatPass[passSourceLayer]) || 0;
|
|
1258
1609
|
var layers = (_direct = direct).flatPropertyLayers || (_direct.flatPropertyLayers = /* @__PURE__ */ new Map());
|
|
1259
1610
|
var previous = layers.get(property);
|
|
1260
|
-
if (
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1611
|
+
if (!layer && !conditional && !((_direct_flatPass1 = direct.flatPass) === null || _direct_flatPass1 === void 0 ? void 0 : _direct_flatPass1[passVariantOutput])) {
|
|
1612
|
+
var _direct_flatSlots;
|
|
1613
|
+
var entries = (_direct_flatSlots = direct.flatSlots) === null || _direct_flatSlots === void 0 ? void 0 : _direct_flatSlots.get(property);
|
|
1614
|
+
if (entries) {
|
|
1615
|
+
for (var index = entries.length; index--;) if (entries[index][0] === property && entries[index][9]) entries.splice(index, 1);
|
|
1265
1616
|
}
|
|
1266
|
-
}
|
|
1617
|
+
}
|
|
1618
|
+
if (previous > layer) return false;
|
|
1619
|
+
if (conditional && previous !== layer) return true;
|
|
1620
|
+
if (previous < layer) clearDirectStyle(state, property);
|
|
1267
1621
|
layers.set(property, layer);
|
|
1268
1622
|
return true;
|
|
1269
1623
|
}
|
|
@@ -1279,9 +1633,21 @@ function emitProperty(state, property, value, cursor, originalValue, contextOnly
|
|
|
1279
1633
|
var theme = cursor ? cursor[conditionTheme] : "";
|
|
1280
1634
|
if (theme) {
|
|
1281
1635
|
if (import_constants.supportsDynamicColorIOS && (0, import_getDynamicVal.isColorStyleKey)(property)) {
|
|
1282
|
-
var _direct
|
|
1283
|
-
var
|
|
1284
|
-
schemes
|
|
1636
|
+
var _direct;
|
|
1637
|
+
var colors = (_direct = direct).flatDynamicColors || (_direct.flatDynamicColors = {});
|
|
1638
|
+
var schemes = colors[property];
|
|
1639
|
+
if (!schemes) {
|
|
1640
|
+
var _direct_flatSlots_get_find, _direct_flatSlots_get, _direct_flatSlots;
|
|
1641
|
+
schemes = colors[property] = {};
|
|
1642
|
+
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) {
|
|
1643
|
+
return !entry[2];
|
|
1644
|
+
})) === null || _direct_flatSlots_get_find === void 0 ? void 0 : _direct_flatSlots_get_find[1];
|
|
1645
|
+
if (base !== void 0) {
|
|
1646
|
+
schemes.light = (0, import_getDynamicVal.extractValueFromDynamic)(base, "light");
|
|
1647
|
+
schemes.dark = (0, import_getDynamicVal.extractValueFromDynamic)(base, "dark");
|
|
1648
|
+
}
|
|
1649
|
+
}
|
|
1650
|
+
schemes[theme] = (0, import_getDynamicVal.extractValueFromDynamic)(value, theme);
|
|
1285
1651
|
streamWriteInline(state, property, { dynamic: { ...schemes } }, cursor, originalValue, true, condition & 1 ? condition : condition + 1);
|
|
1286
1652
|
return;
|
|
1287
1653
|
}
|
|
@@ -1318,6 +1684,10 @@ function emitProperty(state, property, value, cursor, originalValue, contextOnly
|
|
|
1318
1684
|
(0, import_runtime.addTransformValue)(state.transformAccumulator, property, value);
|
|
1319
1685
|
return;
|
|
1320
1686
|
}
|
|
1687
|
+
if (property === "transition" && condition & 12 && !state.staticConfig.isHOC && state.styleProps.isAnimated) {
|
|
1688
|
+
streamWriteInline(state, property, value, cursor, originalValue, false, -1, true);
|
|
1689
|
+
return;
|
|
1690
|
+
}
|
|
1321
1691
|
var shouldPromoteAnimatedStyle = import_getCSSStylesAtomic.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 import_helpers.nonAnimatableStyleProps;
|
|
1322
1692
|
if (import_getCSSStylesAtomic.canGenerateCSS && (state.flatShouldDoClasses || shouldPromoteAnimatedStyle)) {
|
|
1323
1693
|
writeStyleRecord(state, property, value, cursor, originalValue, shouldPromoteAnimatedStyle ? recordCSS : 0);
|
|
@@ -1326,10 +1696,11 @@ function emitProperty(state, property, value, cursor, originalValue, contextOnly
|
|
|
1326
1696
|
streamWriteInline(state, property, value, cursor, originalValue);
|
|
1327
1697
|
}
|
|
1328
1698
|
function numericUnitValue(value, first, second) {
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1699
|
+
return value.length > first.length && (value.endsWith(first) || value.endsWith(second)) ? +value.slice(0, -first.length) : NaN;
|
|
1700
|
+
}
|
|
1701
|
+
function resolveNumericValue(value) {
|
|
1702
|
+
var numeric = numericUnitValue(value, "px", "dp");
|
|
1703
|
+
return isFinite(numeric) ? numeric : isFinite(numeric = +value) ? numeric : value;
|
|
1333
1704
|
}
|
|
1334
1705
|
function emitBorder(state, property, raw, cursor, originalValue, contextOnly) {
|
|
1335
1706
|
if (property === "borderBlock" || property === "borderInline") {
|
|
@@ -1384,13 +1755,12 @@ function emitTextDecoration(state, raw, cursor, originalValue, contextOnly) {
|
|
|
1384
1755
|
}
|
|
1385
1756
|
}
|
|
1386
1757
|
function emitResolved(state, property, raw, cursor, originalValue, contextOnly) {
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
emitProperty(state, property, value, cursor, originalValue, contextOnly);
|
|
1758
|
+
emitProperty(state, property, resolveValue(state, property, raw), cursor, originalValue, contextOnly);
|
|
1759
|
+
}
|
|
1760
|
+
function resolveValue(state, property, raw, nativeColors) {
|
|
1761
|
+
var value = typeof raw === "string" ? configuredValue(state, property, raw, true, nativeColors) : raw;
|
|
1762
|
+
if (typeof value === "string" && value !== "" && property !== "lineHeight") value = resolveNumericValue(value);
|
|
1763
|
+
return value;
|
|
1394
1764
|
}
|
|
1395
1765
|
function shadowUnit(part) {
|
|
1396
1766
|
return typeof part === "number" ? `${part}px` : part || "0px";
|
|
@@ -1398,7 +1768,13 @@ function shadowUnit(part) {
|
|
|
1398
1768
|
function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
|
|
1399
1769
|
var condition = cursor ? cursor[conditionValue] : 0;
|
|
1400
1770
|
var grammar = (0, import_grammarConfig.getConfigRevisionState)(state.conf);
|
|
1401
|
-
if ((0, import_createVariable.isVariable)(raw))
|
|
1771
|
+
if ((0, import_createVariable.isVariable)(raw)) {
|
|
1772
|
+
raw = (0, import_resolveVariableValue.resolveVariableValue)(property, raw, state.styleProps.resolveValues);
|
|
1773
|
+
if (property === "lineHeight") {
|
|
1774
|
+
emitProperty(state, property, raw, cursor, originalValue, contextOnly);
|
|
1775
|
+
return;
|
|
1776
|
+
}
|
|
1777
|
+
}
|
|
1402
1778
|
if (typeof raw === "string" && (property === "transition" || property === "transitionProperty")) raw = grammar.normalizeTransition(raw);
|
|
1403
1779
|
if ((property === "borderWidth" || property === "borderTopWidth" || property === "borderRightWidth" || property === "borderBottomWidth" || property === "borderLeftWidth") && state.styleProps.noNormalize !== false) writeStyleRecord(state, "borderStyle", "solid", cursor, originalValue, recordDefault);
|
|
1404
1780
|
if (grammar.propertyKind(property) === 5) {
|
|
@@ -1413,7 +1789,7 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
|
|
|
1413
1789
|
}
|
|
1414
1790
|
if (property === "transform") {
|
|
1415
1791
|
if (import_getCSSStylesAtomic.canGenerateCSS && state.flatShouldDoClasses && Array.isArray(raw)) raw = (0, import_transformsToString.transformsToString)(raw);
|
|
1416
|
-
if (typeof raw === "string") {
|
|
1792
|
+
if (typeof raw === "string" && true) {
|
|
1417
1793
|
var transform = (0, import_parseNativeTransform.parseNativeTransform)(raw);
|
|
1418
1794
|
if (transform) {
|
|
1419
1795
|
emitProperty(state, property, transform, cursor, originalValue, contextOnly);
|
|
@@ -1431,7 +1807,7 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
|
|
|
1431
1807
|
}
|
|
1432
1808
|
if (typeof raw === "string" && property === "background") {
|
|
1433
1809
|
var parts = (0, import_borderComponents.splitComponents)(raw);
|
|
1434
|
-
if (parts.length === 1 && !(0, import_borderComponents.startsValueFunction)(parts[0])) {
|
|
1810
|
+
if (parts.length === 1 && (!(0, import_borderComponents.startsValueFunction)(parts[0]) || (0, import_borderComponents.classifyBorderComponents)(parts[0]).color)) {
|
|
1435
1811
|
emitResolved(state, "backgroundColor", parts[0], cursor, originalValue, contextOnly);
|
|
1436
1812
|
return;
|
|
1437
1813
|
}
|
|
@@ -1441,7 +1817,7 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
|
|
|
1441
1817
|
if (property === "x" || property === "y" || property === "scale" || property === "scaleX" || property === "scaleY" || property === "rotate") {
|
|
1442
1818
|
var value2 = typeof raw === "string" ? configuredValue(state, property, raw) : raw;
|
|
1443
1819
|
if (typeof value2 === "string" && !value2.startsWith(import_themeRef.THEME_REF_PREFIX)) {
|
|
1444
|
-
if (property === "rotate" && !
|
|
1820
|
+
if (property === "rotate" && !isFinite(numericUnitValue(value2, "deg", "rad")) && true) {
|
|
1445
1821
|
if (process.env.NODE_ENV === "development") (0, import_warnOnce.warnOnce)(`native transform "${property}" cannot represent "${value2}"; dropping it`);
|
|
1446
1822
|
if (condition & 1) {
|
|
1447
1823
|
(0, import_runtime.removeTransformValue)(state.transformAccumulator, property);
|
|
@@ -1449,9 +1825,7 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
|
|
|
1449
1825
|
}
|
|
1450
1826
|
return;
|
|
1451
1827
|
}
|
|
1452
|
-
|
|
1453
|
-
if (Number.isFinite(unitValue)) value2 = unitValue;
|
|
1454
|
-
else if (Number.isFinite(Number(value2))) value2 = Number(value2);
|
|
1828
|
+
value2 = resolveNumericValue(value2);
|
|
1455
1829
|
}
|
|
1456
1830
|
if (!import_getCSSStylesAtomic.canGenerateCSS || !state.flatShouldDoClasses) {
|
|
1457
1831
|
emitProperty(state, property, value2, cursor, originalValue, contextOnly);
|
|
@@ -1483,19 +1857,14 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
|
|
|
1483
1857
|
}
|
|
1484
1858
|
return;
|
|
1485
1859
|
}
|
|
1486
|
-
var
|
|
1487
|
-
|
|
1488
|
-
if (typeof value3 === "string") {
|
|
1489
|
-
var unitValue1 = numericUnitValue(value3, "px", "dp");
|
|
1490
|
-
if (Number.isFinite(unitValue1)) value3 = unitValue1;
|
|
1491
|
-
else if (value3 !== "" && Number.isFinite(Number(value3))) value3 = Number(value3);
|
|
1492
|
-
}
|
|
1860
|
+
var nativeColors = typeof raw === "string" && (property === "backgroundImage" || property === "boxShadow" || property === "textShadow") ? /* @__PURE__ */ new Map() : void 0;
|
|
1861
|
+
var value3 = resolveValue(state, property, raw, nativeColors);
|
|
1493
1862
|
if (import_getCSSStylesAtomic.canGenerateCSS && state.flatShouldDoClasses && property === "boxShadow" && !condition) {
|
|
1494
1863
|
state.flatBoxShadow = value3;
|
|
1495
1864
|
state.flatBoxShadowSequence = frameSequence + 1;
|
|
1496
1865
|
}
|
|
1497
1866
|
if (typeof value3 === "string" && (property === "backgroundImage" || property === "boxShadow" || property === "textShadow")) {
|
|
1498
|
-
var parsed = (0, import_parseNativeStyle.parseNativeStyle)(property, value3);
|
|
1867
|
+
var parsed = (0, import_parseNativeStyle.parseNativeStyle)(property, value3, nativeColors);
|
|
1499
1868
|
if (parsed) {
|
|
1500
1869
|
if (property === "textShadow") {
|
|
1501
1870
|
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
|
|
@@ -1517,6 +1886,7 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
|
|
|
1517
1886
|
} else emitProperty(state, property === "backgroundImage" ? "experimental_backgroundImage" : property, parsed, cursor, originalValue, contextOnly);
|
|
1518
1887
|
return;
|
|
1519
1888
|
}
|
|
1889
|
+
if (property === "backgroundImage" || property === "textShadow") return;
|
|
1520
1890
|
}
|
|
1521
1891
|
if (property === "fontVariant" && typeof value3 === "string") {
|
|
1522
1892
|
var variants = [];
|
|
@@ -1529,25 +1899,42 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
|
|
|
1529
1899
|
}
|
|
1530
1900
|
value3 = variants;
|
|
1531
1901
|
}
|
|
1902
|
+
if (!cursor && !state.styleProps.noExpand) {
|
|
1903
|
+
var logicals = import_expandStyle.nativeShorthandLogicals[property];
|
|
1904
|
+
var slots = state.flatSlots;
|
|
1905
|
+
if (logicals && slots) for (var index1 = 0; index1 < logicals.length; index1++) {
|
|
1906
|
+
var list = slots.get(logicals[index1]);
|
|
1907
|
+
if (!list) continue;
|
|
1908
|
+
for (var entry = list.length; entry--;) if (list[entry][3] === "") list.splice(entry, 1);
|
|
1909
|
+
if (!list.length) clearDirectStyle(state, logicals[index1]);
|
|
1910
|
+
}
|
|
1911
|
+
}
|
|
1532
1912
|
var expanded = !state.styleProps.noExpand ? (0, import_expandStyle.expandStyle)(property, value3, state.conf.settings.styleCompat || "web") : null;
|
|
1533
1913
|
if (!expanded) {
|
|
1534
1914
|
emitProperty(state, property, value3, cursor, originalValue, contextOnly);
|
|
1535
1915
|
return;
|
|
1536
1916
|
}
|
|
1537
|
-
if (typeof raw === "string" && expanded.length > 1) {
|
|
1917
|
+
if (typeof raw === "string" && expanded.length > 1 && expanded.every(function(entry2) {
|
|
1918
|
+
return entry2[1] === expanded[0][1];
|
|
1919
|
+
})) {
|
|
1538
1920
|
var parts1 = (0, import_borderComponents.splitComponents)(raw);
|
|
1539
1921
|
if (parts1.length > 0 && parts1.length <= (expanded.length === 4 ? 4 : 2)) {
|
|
1540
|
-
for (var
|
|
1541
|
-
var partIndex =
|
|
1542
|
-
emitResolved(state, expanded[
|
|
1922
|
+
for (var index2 = 0; index2 < expanded.length; index2++) {
|
|
1923
|
+
var partIndex = index2 === 0 || parts1.length === 1 ? 0 : index2 === 1 || index2 === 3 && parts1.length < 4 ? 1 : index2 === 2 && parts1.length < 3 ? 0 : index2;
|
|
1924
|
+
emitResolved(state, expanded[index2][0], parts1[partIndex], cursor, originalValue, contextOnly);
|
|
1543
1925
|
}
|
|
1544
1926
|
return;
|
|
1545
1927
|
}
|
|
1546
1928
|
}
|
|
1547
|
-
for (var
|
|
1929
|
+
for (var index3 = 0; index3 < expanded.length; index3++) emitProperty(state, expanded[index3][0], expanded[index3][1], cursor, originalValue, contextOnly);
|
|
1930
|
+
}
|
|
1931
|
+
function emitConditionalValue(state, property, payload, condition, source, sink, mode, contextOnly) {
|
|
1932
|
+
if (sink) sink(payload, condition, source);
|
|
1933
|
+
else if (condition) emitUnderCondition(state, property, payload, condition, mode === 2 || state.staticConfig.isHOC || state.styleProps.stylePieceEntries ? payload : void 0, contextOnly, mode, source);
|
|
1934
|
+
else emitValue(state, property, payload, null, payload, contextOnly);
|
|
1548
1935
|
}
|
|
1549
1936
|
function walkConditionalValue(state, property, value, parent, sink) {
|
|
1550
|
-
var warnMode = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : 0;
|
|
1937
|
+
var warnMode = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : 0, contextOnly = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : false;
|
|
1551
1938
|
var parentCondition = parent || null;
|
|
1552
1939
|
var hasBase = false;
|
|
1553
1940
|
var conditions = 0;
|
|
@@ -1555,13 +1942,18 @@ function walkConditionalValue(state, property, value, parent, sink) {
|
|
|
1555
1942
|
if (typeof value === "string") {
|
|
1556
1943
|
var parsed = (0, import_grammarConfig.getConfigRevisionState)(state.conf).parseFlatValue(value);
|
|
1557
1944
|
var [segments, failure, failureIndex] = parsed;
|
|
1945
|
+
if (process.env.NODE_ENV === "development") {
|
|
1946
|
+
if ((0, import_config.getSetting)("styleValueSyntax") === "object") {
|
|
1947
|
+
if (segments.length > 5 || segments.length >= 5 && segments[2] !== -1 || value.includes(":")) (0, import_warnOnce.warnOnce)(`syntax:string:${property}=${value}`, `string syntax is disabled by config (styleValueSyntax: 'object'); received "${property}=${value}"`);
|
|
1948
|
+
}
|
|
1949
|
+
}
|
|
1558
1950
|
var slices = parsedSlices.get(parsed);
|
|
1559
1951
|
if (slices === void 0) parsedSlices.set(parsed, slices = []);
|
|
1560
1952
|
var chainCount = segments.length / 5 - 1;
|
|
1561
1953
|
if (property === "aspectRatio" && chainCount === 1) {
|
|
1562
|
-
var left =
|
|
1563
|
-
var right =
|
|
1564
|
-
if (left > 0 && right > 0 &&
|
|
1954
|
+
var left = +value.slice(segments[7], segments[8]);
|
|
1955
|
+
var right = +value.slice(segments[5], segments[6]);
|
|
1956
|
+
if (left > 0 && right > 0 && isFinite(left) && isFinite(right)) return false;
|
|
1565
1957
|
}
|
|
1566
1958
|
for (var index = 0; index < segments.length; index += 5) {
|
|
1567
1959
|
var start = segments[index];
|
|
@@ -1573,10 +1965,10 @@ function walkConditionalValue(state, property, value, parent, sink) {
|
|
|
1573
1965
|
var _slices, _index;
|
|
1574
1966
|
var _;
|
|
1575
1967
|
var payload = (_ = (_slices = slices)[_index = index]) !== null && _ !== void 0 ? _ : _slices[_index] = value.slice(start, end);
|
|
1576
|
-
|
|
1968
|
+
emitConditionalValue(state, property, payload, parentCondition, payload, sink, warnMode, contextOnly);
|
|
1577
1969
|
hasBase = true;
|
|
1578
1970
|
} else if (process.env.NODE_ENV !== "production" && warnMode && !chainCount && (failure === "invalid-character" || failure === "stray-comment-close")) {
|
|
1579
|
-
|
|
1971
|
+
emitConditionalValue(state, property, value, parentCondition, value, sink, warnMode, contextOnly);
|
|
1580
1972
|
hasBase = true;
|
|
1581
1973
|
} else if (warnMode) warnScanFailure(property, value, failure, failureIndex);
|
|
1582
1974
|
}
|
|
@@ -1602,34 +1994,40 @@ function walkConditionalValue(state, property, value, parent, sink) {
|
|
|
1602
1994
|
if (cursor[conditionValue] & conditionResolvedFlag || warnMode) {
|
|
1603
1995
|
var _slices2, _index1;
|
|
1604
1996
|
var _2;
|
|
1605
|
-
|
|
1997
|
+
emitConditionalValue(state, property, (_2 = (_slices2 = slices)[_index1 = index1]) !== null && _2 !== void 0 ? _2 : _slices2[_index1] = value.slice(start1, end1), cursor, value, sink, warnMode, contextOnly);
|
|
1606
1998
|
}
|
|
1607
1999
|
}
|
|
1608
2000
|
if (process.env.NODE_ENV !== "production") lastPayload = value.slice(lastPayloadStart);
|
|
1609
2001
|
} else {
|
|
1610
|
-
if (!value ||
|
|
2002
|
+
if (!value || typeof value !== "object" || Array.isArray(value) || (0, import_createVariable.isVariable)(value) || !classifyConditionalObject(value, state)) return false;
|
|
2003
|
+
if (process.env.NODE_ENV === "development") {
|
|
2004
|
+
if ((0, import_config.getSetting)("styleValueSyntax") === "string") (0, import_warnOnce.warnOnce)(`syntax:object:${property}=${JSON.stringify(value)}`, `object-form conditional syntax is disabled by config (styleValueSyntax: 'string'); received "${property}"`);
|
|
2005
|
+
}
|
|
1611
2006
|
if (value.default != null) {
|
|
1612
|
-
|
|
2007
|
+
emitConditionalValue(state, property, value.default, parentCondition, value.default, sink, warnMode, contextOnly);
|
|
1613
2008
|
hasBase = true;
|
|
1614
2009
|
}
|
|
1615
2010
|
for (var key in value) {
|
|
1616
2011
|
if (key === "default" || value[key] == null) continue;
|
|
1617
2012
|
var cursor1 = conditionFromKey(state, key, parentCondition);
|
|
1618
2013
|
conditions |= cursor1[conditionValue];
|
|
1619
|
-
if (cursor1[conditionValue] & conditionResolvedFlag || warnMode)
|
|
2014
|
+
if (cursor1[conditionValue] & conditionResolvedFlag || warnMode) emitConditionalValue(state, property, value[key], cursor1, value[key], sink, warnMode, contextOnly);
|
|
1620
2015
|
}
|
|
1621
2016
|
}
|
|
1622
|
-
if (warnMode && process.env.NODE_ENV === "development" && typeof value === "string" && !hasBase && conditions && (0, import_grammarConfig.getConfigRevisionState)(state.conf).tokenCategory(property) && (0, import_borderComponents.splitComponents)(lastPayload).length > 1) (0, import_warnOnce.warnOnce)(`${property}="${value}" has multiple values after its first conditional. Write the base value before the first conditional.`);
|
|
1623
|
-
if (warnMode === 1 &&
|
|
1624
|
-
var _state_flatPropertyLayers;
|
|
2017
|
+
if (warnMode && process.env.NODE_ENV === "development" && typeof value === "string" && !hasBase && conditions && (0, import_grammarConfig.getConfigRevisionState)(state.conf).tokenCategory(property) && (0, import_grammarConfig.getConfigRevisionState)(state.conf).propertyKind(property) !== 8 && property !== "boxShadow" && property !== "textShadow" && property !== "fontFamily" && property !== "gap" && (0, import_borderComponents.splitComponents)(lastPayload).length > 1) (0, import_warnOnce.warnOnce)(`${property}="${value}" has multiple values after its first conditional. Write the base value before the first conditional.`);
|
|
2018
|
+
if (warnMode === 1 && conditions & 12 && !hasBase) {
|
|
1625
2019
|
var resting = property === "opacity" || property.startsWith("scale") ? 1 : property === "rotate" ? "0deg" : property === "x" || property === "y" ? 0 : null;
|
|
1626
|
-
|
|
2020
|
+
var layers = state.flatPropertyLayers;
|
|
2021
|
+
var owned = !import_getCSSStylesAtomic.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);
|
|
2022
|
+
if (resting !== null && !owned) emitConditionalValue(state, property, resting, parentCondition, resting, sink, warnMode, contextOnly);
|
|
1627
2023
|
}
|
|
1628
2024
|
return true;
|
|
1629
2025
|
}
|
|
1630
2026
|
function contributeValue(state, property, value, originalValue) {
|
|
1631
2027
|
var contextOnly = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false, condition = arguments.length > 5 ? arguments[5] : void 0;
|
|
1632
2028
|
var _state_flatPass;
|
|
2029
|
+
if (!contextOnly && isRemovedVendorStyleProp(property) && !(state.staticConfig.validStyles && property in state.staticConfig.validStyles)) return;
|
|
2030
|
+
if (!contextOnly && !(property in (state.staticConfig.validStyles || (state.staticConfig.isInput ? import_helpers.stylePropsInput : state.staticConfig.isText ? import_helpers.stylePropsText : import_helpers.validStyles))) && property in import_helpers.stylePropsAll) return;
|
|
1633
2031
|
if (condition !== void 0) {
|
|
1634
2032
|
var _directState_flatPass;
|
|
1635
2033
|
var parent = ((_directState_flatPass = state.flatPass) === null || _directState_flatPass === void 0 ? void 0 : _directState_flatPass[passParentCursor]) || null;
|
|
@@ -1640,14 +2038,12 @@ function contributeValue(state, property, value, originalValue) {
|
|
|
1640
2038
|
if (!(condition[conditionValue] & conditionResolvedFlag)) setConditionUnresolved(effective);
|
|
1641
2039
|
commitCondition(effective);
|
|
1642
2040
|
} else effective = condition;
|
|
1643
|
-
if (typeof value !== "string" && walkConditionalValue(state, property, value, effective,
|
|
1644
|
-
return emitUnderCondition(state, property, payload, cursor, payload, contextOnly, 2, source);
|
|
1645
|
-
}, 2)) return true;
|
|
2041
|
+
if (typeof value !== "string" && walkConditionalValue(state, property, value, effective, null, 2, contextOnly)) return true;
|
|
1646
2042
|
emitUnderCondition(state, property, value, effective, originalValue, contextOnly, 2, value);
|
|
1647
2043
|
return true;
|
|
1648
2044
|
}
|
|
1649
2045
|
var compositeKind = 0;
|
|
1650
|
-
if (compositeKind > 0 && compositeKind < 6 && (typeof value === "string" && value.indexOf(":") !== -1 || value &&
|
|
2046
|
+
if (compositeKind > 0 && compositeKind < 6 && (typeof value === "string" && value.indexOf(":") !== -1 || value && typeof value === "object" && !Array.isArray(value) && !(0, import_createVariable.isVariable)(value) && classifyConditionalObject(value, state))) {
|
|
1651
2047
|
if (process.env.NODE_ENV === "development") (0, import_warnOnce.warnOnce)(`conditional "${property}" needs its composite property; dropping it`);
|
|
1652
2048
|
return true;
|
|
1653
2049
|
}
|
|
@@ -1674,9 +2070,7 @@ function contributeValue(state, property, value, originalValue) {
|
|
|
1674
2070
|
return true;
|
|
1675
2071
|
}
|
|
1676
2072
|
}
|
|
1677
|
-
if (walkConditionalValue(state, property, value, ((_state_flatPass = state.flatPass) === null || _state_flatPass === void 0 ? void 0 : _state_flatPass[passParentCursor]) || null,
|
|
1678
|
-
return cursor ? emitUnderCondition(state, property, payload, cursor, void 0, contextOnly, 1, source) : emitValue(state, property, payload, null, payload, contextOnly);
|
|
1679
|
-
}, 1)) return true;
|
|
2073
|
+
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;
|
|
1680
2074
|
if (value != null) {
|
|
1681
2075
|
emitAtParentCondition(state, property, value, originalValue !== null && originalValue !== void 0 ? originalValue : value, contextOnly);
|
|
1682
2076
|
return true;
|
|
@@ -1685,19 +2079,22 @@ function contributeValue(state, property, value, originalValue) {
|
|
|
1685
2079
|
}
|
|
1686
2080
|
function clearDirectStyle(state, property) {
|
|
1687
2081
|
var _direct_flatAtomics;
|
|
2082
|
+
if (property === "lineHeight") state.nativeLineHeight = void 0;
|
|
1688
2083
|
var direct = state;
|
|
2084
|
+
if (direct.flatDynamicColors) delete direct.flatDynamicColors[property];
|
|
1689
2085
|
var propertyKind = (0, import_grammarConfig.getConfigRevisionState)(state.conf).propertyKind(property);
|
|
1690
2086
|
var atomicKey = property.startsWith("transition") ? "transition" : propertyKind > 0 && propertyKind < 5 ? "boxShadow" : propertyKind === 6 ? "textShadow" : propertyKind === 5 ? "transform" : property;
|
|
1691
2087
|
var slot = atomicKey;
|
|
1692
2088
|
(_direct_flatAtomics = direct.flatAtomics) === null || _direct_flatAtomics === void 0 || _direct_flatAtomics.delete(slot);
|
|
1693
2089
|
if (direct.flatSlots) {
|
|
1694
|
-
if (slot !== atomicKey) {
|
|
2090
|
+
if (slot !== atomicKey || atomicKey === "flex") {
|
|
1695
2091
|
var entries = direct.flatSlots.get(slot);
|
|
1696
2092
|
if (entries) {
|
|
1697
2093
|
for (var index = entries.length; index--;) if (entries[index][0] === atomicKey) entries.splice(index, 1);
|
|
2094
|
+
if (!entries.length) direct.flatSlots.delete(slot);
|
|
1698
2095
|
}
|
|
1699
2096
|
}
|
|
1700
|
-
direct.flatSlots.delete(atomicKey);
|
|
2097
|
+
if (atomicKey !== "flex") direct.flatSlots.delete(atomicKey);
|
|
1701
2098
|
}
|
|
1702
2099
|
if (atomicKey === "transform") state.transformAccumulator = void 0;
|
|
1703
2100
|
if (state.style) delete state.style[atomicKey];
|
|
@@ -1713,9 +2110,12 @@ function emitVariantStyle(state, key, value, original, condition, disabled) {
|
|
|
1713
2110
|
((_state = state).overriddenContextProps || (_state.overriddenContextProps = {}))[key] = ((_state1 = state).originalContextPropValues || (_state1.originalContextPropValues = {}))[key] = original;
|
|
1714
2111
|
}
|
|
1715
2112
|
var parent = pass[passParentCursor];
|
|
2113
|
+
var parentVariantOutput = pass[passVariantOutput];
|
|
1716
2114
|
pass[passParentCursor] = condition;
|
|
2115
|
+
pass[passVariantOutput] = true;
|
|
1717
2116
|
contributeProp(pass, key, value, original, disabled);
|
|
1718
2117
|
pass[passParentCursor] = parent;
|
|
2118
|
+
pass[passVariantOutput] = parentVariantOutput;
|
|
1719
2119
|
}
|
|
1720
2120
|
function getFontFamilyFromNameOrVariable(input, conf) {
|
|
1721
2121
|
if ((0, import_createVariable.isVariable)(input)) {
|