@tamagui/web 2.7.7 → 3.0.0-beta.1093.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Tamagui.cjs +44 -53
- package/dist/cjs/Tamagui.native.cjs +123 -0
- package/dist/cjs/Tamagui.native.js +93 -96
- package/dist/cjs/Tamagui.native.js.map +1 -1
- package/dist/cjs/_withNativeStyle.cjs +80 -0
- package/dist/cjs/_withNativeStyle.native.cjs +85 -0
- package/dist/cjs/_withNativeStyle.native.js +87 -0
- package/dist/cjs/_withNativeStyle.native.js.map +1 -0
- package/dist/cjs/_withStableStyle.cjs +58 -54
- package/dist/cjs/_withStableStyle.native.cjs +88 -0
- package/dist/cjs/_withStableStyle.native.js +65 -57
- package/dist/cjs/_withStableStyle.native.js.map +1 -1
- package/dist/cjs/config.cjs +126 -133
- package/dist/cjs/config.native.cjs +199 -0
- package/dist/cjs/config.native.js +163 -173
- package/dist/cjs/config.native.js.map +1 -1
- package/dist/cjs/constants/constants.cjs +17 -19
- package/dist/cjs/constants/constants.native.cjs +40 -0
- package/dist/cjs/constants/constants.native.js +17 -18
- package/dist/cjs/constants/constants.native.js.map +1 -1
- package/dist/cjs/constants/isDevTools.cjs +20 -24
- package/dist/cjs/constants/isDevTools.native.cjs +33 -0
- package/dist/cjs/constants/isDevTools.native.js +22 -25
- package/dist/cjs/constants/isDevTools.native.js.map +1 -1
- package/dist/cjs/contexts/ComponentContext.cjs +31 -25
- package/dist/cjs/contexts/ComponentContext.native.cjs +49 -0
- package/dist/cjs/contexts/ComponentContext.native.js +32 -25
- package/dist/cjs/contexts/ComponentContext.native.js.map +1 -1
- package/dist/cjs/contexts/GroupContext.cjs +14 -18
- package/dist/cjs/contexts/GroupContext.native.cjs +27 -0
- package/dist/cjs/contexts/GroupContext.native.js +15 -18
- package/dist/cjs/contexts/GroupContext.native.js.map +1 -1
- package/dist/cjs/createComponent.cjs +1002 -1022
- package/dist/cjs/createComponent.native.cjs +1164 -0
- package/dist/cjs/createComponent.native.js +1099 -1001
- package/dist/cjs/createComponent.native.js.map +1 -1
- package/dist/cjs/createFont.cjs +40 -36
- package/dist/cjs/createFont.native.cjs +56 -0
- package/dist/cjs/createFont.native.js +43 -38
- package/dist/cjs/createFont.native.js.map +1 -1
- package/dist/cjs/createShorthands.cjs +15 -19
- package/dist/cjs/createShorthands.native.cjs +28 -0
- package/dist/cjs/createShorthands.native.js +15 -18
- package/dist/cjs/createShorthands.native.js.map +1 -1
- package/dist/cjs/createStyledHOC.cjs +104 -0
- package/dist/cjs/createStyledHOC.native.cjs +107 -0
- package/dist/cjs/createStyledHOC.native.js +109 -0
- package/dist/cjs/createStyledHOC.native.js.map +1 -0
- package/dist/cjs/createTamagui.cjs +287 -224
- package/dist/cjs/createTamagui.native.cjs +354 -0
- package/dist/cjs/createTamagui.native.js +321 -272
- package/dist/cjs/createTamagui.native.js.map +1 -1
- package/dist/cjs/createTokens.cjs +27 -19
- package/dist/cjs/createTokens.native.cjs +42 -0
- package/dist/cjs/createTokens.native.js +28 -19
- package/dist/cjs/createTokens.native.js.map +1 -1
- package/dist/cjs/createVariable.cjs +85 -90
- package/dist/cjs/createVariable.native.cjs +130 -0
- package/dist/cjs/createVariable.native.js +97 -106
- package/dist/cjs/createVariable.native.js.map +1 -1
- package/dist/cjs/createVariables.cjs +49 -60
- package/dist/cjs/createVariables.native.cjs +66 -0
- package/dist/cjs/createVariables.native.js +51 -66
- package/dist/cjs/createVariables.native.js.map +1 -1
- package/dist/cjs/defaultComponentState.cjs +28 -30
- package/dist/cjs/defaultComponentState.native.cjs +47 -0
- package/dist/cjs/defaultComponentState.native.js +28 -29
- package/dist/cjs/defaultComponentState.native.js.map +1 -1
- package/dist/cjs/dom/adapters.cjs +95 -0
- package/dist/cjs/dom/adapters.native.cjs +116 -0
- package/dist/cjs/dom/adapters.native.js +118 -0
- package/dist/cjs/dom/adapters.native.js.map +1 -0
- package/dist/cjs/dom/contract.cjs +16 -0
- package/dist/cjs/dom/contract.native.cjs +18 -0
- package/dist/cjs/dom/contract.native.js +20 -0
- package/dist/cjs/dom/contract.native.js.map +1 -0
- package/dist/cjs/dom/domEventProps.native.cjs +56 -0
- package/dist/cjs/dom/domEventProps.native.js +58 -0
- package/dist/cjs/dom/domEventProps.native.js.map +1 -0
- package/dist/cjs/dom/html.cjs +630 -0
- package/dist/cjs/dom/html.native.cjs +951 -0
- package/dist/cjs/dom/html.native.js +953 -0
- package/dist/cjs/dom/html.native.js.map +1 -0
- package/dist/cjs/dom/htmlRuntime.native.cjs +176 -0
- package/dist/cjs/dom/htmlRuntime.native.js +178 -0
- package/dist/cjs/dom/htmlRuntime.native.js.map +1 -0
- package/dist/cjs/dom/index.cjs +28 -0
- package/dist/cjs/dom/index.native.cjs +41 -0
- package/dist/cjs/dom/index.native.js +43 -0
- package/dist/cjs/dom/index.native.js.map +1 -0
- package/dist/cjs/dom/primitives.native.cjs +642 -0
- package/dist/cjs/dom/primitives.native.js +644 -0
- package/dist/cjs/dom/primitives.native.js.map +1 -0
- package/dist/cjs/dom/standalone.cjs +33 -0
- package/dist/cjs/dom/standalone.native.cjs +39 -0
- package/dist/cjs/dom/standalone.native.js +41 -0
- package/dist/cjs/dom/standalone.native.js.map +1 -0
- package/dist/cjs/dom/standaloneHtml.cjs +75 -0
- package/dist/cjs/dom/standaloneHtml.native.cjs +77 -0
- package/dist/cjs/dom/standaloneHtml.native.js +79 -0
- package/dist/cjs/dom/standaloneHtml.native.js.map +1 -0
- package/dist/cjs/dom/styleTypes.cjs +16 -0
- package/dist/cjs/dom/styleTypes.native.cjs +18 -0
- package/dist/cjs/dom/styleTypes.native.js +20 -0
- package/dist/cjs/dom/styleTypes.native.js.map +1 -0
- package/dist/cjs/eventDetails.cjs +38 -0
- package/dist/cjs/eventDetails.native.cjs +40 -0
- package/dist/cjs/eventDetails.native.js +42 -0
- package/dist/cjs/eventDetails.native.js.map +1 -0
- package/dist/cjs/eventHandling.cjs +29 -31
- package/dist/cjs/eventHandling.native.cjs +191 -0
- package/dist/cjs/eventHandling.native.js +158 -188
- package/dist/cjs/eventHandling.native.js.map +1 -1
- package/dist/cjs/helpers/borderComponents.cjs +62 -0
- package/dist/cjs/helpers/borderComponents.native.cjs +82 -0
- package/dist/cjs/helpers/borderComponents.native.js +84 -0
- package/dist/cjs/helpers/borderComponents.native.js.map +1 -0
- package/dist/cjs/helpers/componentDisplayName.cjs +24 -0
- package/dist/cjs/helpers/componentDisplayName.native.cjs +26 -0
- package/dist/cjs/helpers/componentDisplayName.native.js +28 -0
- package/dist/cjs/helpers/componentDisplayName.native.js.map +1 -0
- package/dist/cjs/helpers/configVariables.cjs +79 -0
- package/dist/cjs/helpers/configVariables.native.cjs +82 -0
- package/dist/cjs/helpers/configVariables.native.js +84 -0
- package/dist/cjs/helpers/configVariables.native.js.map +1 -0
- package/dist/cjs/helpers/consoleLog.native.cjs +30 -0
- package/dist/cjs/helpers/consoleLog.native.js +16 -17
- package/dist/cjs/helpers/consoleLog.native.js.map +1 -1
- package/dist/cjs/helpers/createDesignSystem.cjs +146 -152
- package/dist/cjs/helpers/createDesignSystem.native.cjs +195 -0
- package/dist/cjs/helpers/createDesignSystem.native.js +167 -205
- package/dist/cjs/helpers/createDesignSystem.native.js.map +1 -1
- package/dist/cjs/helpers/createStyledContext.cjs +64 -84
- package/dist/cjs/helpers/createStyledContext.native.cjs +88 -0
- package/dist/cjs/helpers/createStyledContext.native.js +69 -88
- package/dist/cjs/helpers/createStyledContext.native.js.map +1 -1
- package/dist/cjs/helpers/defaultAnimationDriver.cjs +23 -32
- package/dist/cjs/helpers/defaultAnimationDriver.native.cjs +46 -0
- package/dist/cjs/helpers/defaultAnimationDriver.native.js +32 -48
- package/dist/cjs/helpers/defaultAnimationDriver.native.js.map +1 -1
- package/dist/cjs/helpers/defaultOffset.cjs +16 -20
- package/dist/cjs/helpers/defaultOffset.native.cjs +29 -0
- package/dist/cjs/helpers/defaultOffset.native.js +16 -19
- package/dist/cjs/helpers/defaultOffset.native.js.map +1 -1
- package/dist/cjs/helpers/expandStyle.cjs +150 -84
- package/dist/cjs/helpers/expandStyle.native.cjs +185 -0
- package/dist/cjs/helpers/expandStyle.native.js +153 -124
- package/dist/cjs/helpers/expandStyle.native.js.map +1 -1
- package/dist/cjs/helpers/expandStyles.cjs +21 -25
- package/dist/cjs/helpers/expandStyles.native.cjs +46 -0
- package/dist/cjs/helpers/expandStyles.native.js +28 -31
- package/dist/cjs/helpers/expandStyles.native.js.map +1 -1
- package/dist/cjs/helpers/extractPseudoState.cjs +44 -0
- package/dist/cjs/helpers/extractPseudoState.native.cjs +47 -0
- package/dist/cjs/helpers/extractPseudoState.native.js +49 -0
- package/dist/cjs/helpers/extractPseudoState.native.js.map +1 -0
- 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.cjs +69 -0
- package/dist/cjs/helpers/formatDiagnostic.native.cjs +74 -0
- package/dist/cjs/helpers/formatDiagnostic.native.js +76 -0
- package/dist/cjs/helpers/formatDiagnostic.native.js.map +1 -0
- package/dist/cjs/helpers/getCSSStylesAtomic.cjs +242 -193
- package/dist/cjs/helpers/getCSSStylesAtomic.native.cjs +45 -0
- package/dist/cjs/helpers/getCSSStylesAtomic.native.js +29 -20
- package/dist/cjs/helpers/getCSSStylesAtomic.native.js.map +1 -1
- package/dist/cjs/helpers/getCSSStylesAtomicCompiled.cjs +44 -0
- package/dist/cjs/helpers/getCSSStylesAtomicCompiled.native.cjs +48 -0
- package/dist/cjs/helpers/getCSSStylesAtomicCompiled.native.js +50 -0
- package/dist/cjs/helpers/getCSSStylesAtomicCompiled.native.js.map +1 -0
- package/dist/cjs/helpers/getDynamicVal.cjs +48 -52
- package/dist/cjs/helpers/getDynamicVal.native.cjs +71 -0
- package/dist/cjs/helpers/getDynamicVal.native.js +48 -51
- package/dist/cjs/helpers/getDynamicVal.native.js.map +1 -1
- package/dist/cjs/helpers/getExpandedShorthands.cjs +16 -30
- package/dist/cjs/helpers/getExpandedShorthands.native.cjs +31 -0
- package/dist/cjs/helpers/getExpandedShorthands.native.js +17 -30
- package/dist/cjs/helpers/getExpandedShorthands.native.js.map +1 -1
- package/dist/cjs/helpers/getShorthandValue.cjs +16 -20
- package/dist/cjs/helpers/getShorthandValue.native.cjs +32 -0
- package/dist/cjs/helpers/getShorthandValue.native.js +18 -21
- package/dist/cjs/helpers/getShorthandValue.native.js.map +1 -1
- package/dist/cjs/helpers/getSplitStyles.cjs +1623 -919
- package/dist/cjs/helpers/getSplitStyles.native.cjs +1835 -0
- package/dist/cjs/helpers/getSplitStyles.native.js +1800 -948
- package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/cjs/helpers/getThemeCSSRules.cjs +105 -109
- package/dist/cjs/helpers/getThemeCSSRules.native.cjs +28 -0
- package/dist/cjs/helpers/getThemeCSSRules.native.js +15 -18
- package/dist/cjs/helpers/getThemeCSSRules.native.js.map +1 -1
- package/dist/cjs/helpers/grammarConfig.cjs +276 -0
- package/dist/cjs/helpers/grammarConfig.native.cjs +412 -0
- package/dist/cjs/helpers/grammarConfig.native.js +414 -0
- package/dist/cjs/helpers/grammarConfig.native.js.map +1 -0
- package/dist/cjs/helpers/insertStyleRule.cjs +253 -184
- package/dist/cjs/helpers/insertStyleRule.native.cjs +223 -0
- package/dist/cjs/helpers/insertStyleRule.native.js +189 -68
- package/dist/cjs/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/cjs/helpers/isObj.cjs +22 -16
- package/dist/cjs/helpers/isObj.native.cjs +38 -0
- package/dist/cjs/helpers/isObj.native.js +24 -22
- package/dist/cjs/helpers/isObj.native.js.map +1 -1
- package/dist/cjs/helpers/isTamaguiComponent.cjs +17 -21
- package/dist/cjs/helpers/isTamaguiComponent.native.cjs +29 -0
- package/dist/cjs/helpers/isTamaguiComponent.native.js +17 -20
- package/dist/cjs/helpers/isTamaguiComponent.native.js.map +1 -1
- package/dist/cjs/helpers/isTamaguiElement.cjs +19 -28
- package/dist/cjs/helpers/isTamaguiElement.native.cjs +36 -0
- package/dist/cjs/helpers/isTamaguiElement.native.js +19 -27
- package/dist/cjs/helpers/isTamaguiElement.native.js.map +1 -1
- package/dist/cjs/helpers/log.cjs +24 -27
- package/dist/cjs/helpers/log.native.cjs +39 -0
- package/dist/cjs/helpers/log.native.js +25 -27
- package/dist/cjs/helpers/log.native.js.map +1 -1
- package/dist/cjs/helpers/mainThreadPressEvents.cjs +14 -18
- package/dist/cjs/helpers/mainThreadPressEvents.native.cjs +155 -0
- package/dist/cjs/helpers/mainThreadPressEvents.native.js +138 -142
- package/dist/cjs/helpers/mainThreadPressEvents.native.js.map +1 -1
- package/dist/cjs/helpers/matchMedia.cjs +21 -23
- package/dist/cjs/helpers/matchMedia.native.cjs +68 -0
- package/dist/cjs/helpers/matchMedia.native.js +49 -41
- package/dist/cjs/helpers/matchMedia.native.js.map +1 -1
- package/dist/cjs/helpers/mediaObjectToString.cjs +34 -38
- package/dist/cjs/helpers/mediaObjectToString.native.cjs +52 -0
- package/dist/cjs/helpers/mediaObjectToString.native.js +37 -40
- package/dist/cjs/helpers/mediaObjectToString.native.js.map +1 -1
- package/dist/cjs/helpers/mediaState.cjs +34 -43
- package/dist/cjs/helpers/mediaState.native.cjs +52 -0
- package/dist/cjs/helpers/mediaState.native.js +37 -46
- package/dist/cjs/helpers/mediaState.native.js.map +1 -1
- package/dist/cjs/helpers/mergeProps.cjs +50 -63
- package/dist/cjs/helpers/mergeProps.native.cjs +68 -0
- package/dist/cjs/helpers/mergeProps.native.js +53 -70
- package/dist/cjs/helpers/mergeProps.native.js.map +1 -1
- package/dist/cjs/helpers/mergeRenderElementProps.cjs +17 -23
- package/dist/cjs/helpers/mergeRenderElementProps.native.cjs +31 -0
- package/dist/cjs/helpers/mergeRenderElementProps.native.js +17 -22
- package/dist/cjs/helpers/mergeRenderElementProps.native.js.map +1 -1
- package/dist/cjs/helpers/mergeSlotStyleProps.cjs +34 -38
- package/dist/cjs/helpers/mergeSlotStyleProps.native.cjs +50 -0
- package/dist/cjs/helpers/mergeSlotStyleProps.native.js +34 -37
- package/dist/cjs/helpers/mergeSlotStyleProps.native.js.map +1 -1
- package/dist/cjs/helpers/mergeVariants.cjs +82 -41
- package/dist/cjs/helpers/mergeVariants.native.cjs +130 -0
- package/dist/cjs/helpers/mergeVariants.native.js +118 -42
- package/dist/cjs/helpers/mergeVariants.native.js.map +1 -1
- package/dist/cjs/helpers/nativeOnlyProps.cjs +46 -51
- package/dist/cjs/helpers/nativeOnlyProps.native.cjs +59 -0
- package/dist/cjs/helpers/nativeOnlyProps.native.js +46 -50
- package/dist/cjs/helpers/nativeOnlyProps.native.js.map +1 -1
- package/dist/cjs/helpers/nativeStyleEngine.cjs +269 -0
- package/dist/cjs/helpers/nativeStyleEngine.native.cjs +400 -0
- package/dist/cjs/helpers/nativeStyleEngine.native.js +402 -0
- package/dist/cjs/helpers/nativeStyleEngine.native.js.map +1 -0
- package/dist/cjs/helpers/nativeTransitionTarget.cjs +26 -0
- package/dist/cjs/helpers/nativeTransitionTarget.native.cjs +42 -0
- package/dist/cjs/helpers/nativeTransitionTarget.native.js +44 -0
- package/dist/cjs/helpers/nativeTransitionTarget.native.js.map +1 -0
- package/dist/cjs/helpers/normalizeColor.cjs +22 -35
- package/dist/cjs/helpers/normalizeColor.native.cjs +49 -0
- package/dist/cjs/helpers/normalizeColor.native.js +32 -34
- package/dist/cjs/helpers/normalizeColor.native.js.map +1 -1
- package/dist/cjs/helpers/normalizeShadow.cjs +25 -39
- package/dist/cjs/helpers/normalizeShadow.native.cjs +41 -0
- package/dist/cjs/helpers/normalizeShadow.native.js +26 -37
- package/dist/cjs/helpers/normalizeShadow.native.js.map +1 -1
- package/dist/cjs/helpers/normalizeStyle.cjs +59 -61
- package/dist/cjs/helpers/normalizeStyle.native.cjs +93 -0
- package/dist/cjs/helpers/normalizeStyle.native.js +76 -79
- package/dist/cjs/helpers/normalizeStyle.native.js.map +1 -1
- package/dist/cjs/helpers/normalizeValueWithProperty.cjs +42 -41
- package/dist/cjs/helpers/normalizeValueWithProperty.native.cjs +60 -0
- package/dist/cjs/helpers/normalizeValueWithProperty.native.js +45 -46
- package/dist/cjs/helpers/normalizeValueWithProperty.native.js.map +1 -1
- package/dist/cjs/helpers/noteOnce.cjs +31 -0
- package/dist/cjs/helpers/noteOnce.native.cjs +33 -0
- package/dist/cjs/helpers/noteOnce.native.js +35 -0
- package/dist/cjs/helpers/noteOnce.native.js.map +1 -0
- package/dist/cjs/helpers/objectIdentityKey.cjs +30 -34
- package/dist/cjs/helpers/objectIdentityKey.native.cjs +44 -0
- package/dist/cjs/helpers/objectIdentityKey.native.js +31 -39
- package/dist/cjs/helpers/objectIdentityKey.native.js.map +1 -1
- package/dist/cjs/helpers/parseBorderShorthand.cjs +15 -19
- package/dist/cjs/helpers/parseBorderShorthand.native.cjs +65 -0
- package/dist/cjs/helpers/parseBorderShorthand.native.js +50 -69
- package/dist/cjs/helpers/parseBorderShorthand.native.js.map +1 -1
- package/dist/cjs/helpers/parseNativeStyle.native.cjs +205 -0
- package/dist/cjs/helpers/parseNativeStyle.native.js +182 -165
- package/dist/cjs/helpers/parseNativeStyle.native.js.map +1 -1
- package/dist/cjs/helpers/parseNativeTransform.native.cjs +67 -0
- package/dist/cjs/helpers/parseNativeTransform.native.js +69 -0
- package/dist/cjs/helpers/parseNativeTransform.native.js.map +1 -0
- package/dist/cjs/helpers/parseOutlineShorthand.cjs +15 -19
- package/dist/cjs/helpers/parseOutlineShorthand.native.cjs +44 -0
- package/dist/cjs/helpers/parseOutlineShorthand.native.js +31 -65
- package/dist/cjs/helpers/parseOutlineShorthand.native.js.map +1 -1
- package/dist/cjs/helpers/pointerEvents.cjs +14 -18
- package/dist/cjs/helpers/pointerEvents.native.cjs +131 -0
- package/dist/cjs/helpers/pointerEvents.native.js +116 -144
- package/dist/cjs/helpers/pointerEvents.native.js.map +1 -1
- package/dist/cjs/helpers/proxyThemeToParents.cjs +46 -48
- package/dist/cjs/helpers/proxyThemeToParents.native.cjs +167 -0
- package/dist/cjs/helpers/proxyThemeToParents.native.js +150 -142
- package/dist/cjs/helpers/proxyThemeToParents.native.js.map +1 -1
- package/dist/cjs/helpers/registerCSSVariable.cjs +97 -60
- package/dist/cjs/helpers/registerCSSVariable.native.cjs +135 -0
- package/dist/cjs/helpers/registerCSSVariable.native.js +113 -61
- package/dist/cjs/helpers/registerCSSVariable.native.js.map +1 -1
- package/dist/cjs/helpers/resolveAnimationDriver.cjs +27 -26
- package/dist/cjs/helpers/resolveAnimationDriver.native.cjs +40 -0
- package/dist/cjs/helpers/resolveAnimationDriver.native.js +27 -26
- package/dist/cjs/helpers/resolveAnimationDriver.native.js.map +1 -1
- package/dist/cjs/helpers/resolveNativeUnits.cjs +32 -0
- package/dist/cjs/helpers/resolveNativeUnits.native.cjs +168 -0
- package/dist/cjs/helpers/resolveNativeUnits.native.js +170 -0
- package/dist/cjs/helpers/resolveNativeUnits.native.js.map +1 -0
- package/dist/cjs/helpers/resolveRem.cjs +17 -19
- package/dist/cjs/helpers/resolveRem.native.cjs +53 -0
- package/dist/cjs/helpers/resolveRem.native.js +34 -38
- package/dist/cjs/helpers/resolveRem.native.js.map +1 -1
- package/dist/cjs/helpers/resolveSafeArea.cjs +50 -25
- package/dist/cjs/helpers/resolveSafeArea.native.cjs +129 -0
- package/dist/cjs/helpers/resolveSafeArea.native.js +114 -29
- package/dist/cjs/helpers/resolveSafeArea.native.js.map +1 -1
- package/dist/cjs/helpers/resolveSafeAreaVariable.cjs +33 -0
- package/dist/cjs/helpers/resolveSafeAreaVariable.native.cjs +51 -0
- package/dist/cjs/helpers/resolveSafeAreaVariable.native.js +53 -0
- package/dist/cjs/helpers/resolveSafeAreaVariable.native.js.map +1 -0
- package/dist/cjs/helpers/resolveVariableValue.cjs +34 -0
- package/dist/cjs/helpers/resolveVariableValue.native.cjs +38 -0
- package/dist/cjs/helpers/resolveVariableValue.native.js +40 -0
- package/dist/cjs/helpers/resolveVariableValue.native.js.map +1 -0
- package/dist/cjs/helpers/resolveVariantStyle.cjs +57 -0
- package/dist/cjs/helpers/resolveVariantStyle.native.cjs +63 -0
- package/dist/cjs/helpers/resolveVariantStyle.native.js +65 -0
- package/dist/cjs/helpers/resolveVariantStyle.native.js.map +1 -0
- package/dist/cjs/helpers/setElementProps.cjs +16 -20
- package/dist/cjs/helpers/setElementProps.native.cjs +34 -0
- package/dist/cjs/helpers/setElementProps.native.js +21 -24
- package/dist/cjs/helpers/setElementProps.native.js.map +1 -1
- package/dist/cjs/helpers/skipProps.cjs +32 -29
- package/dist/cjs/helpers/skipProps.native.cjs +51 -0
- package/dist/cjs/helpers/skipProps.native.js +32 -28
- package/dist/cjs/helpers/skipProps.native.js.map +1 -1
- package/dist/cjs/helpers/sortString.cjs +14 -18
- package/dist/cjs/helpers/sortString.native.cjs +28 -0
- package/dist/cjs/helpers/sortString.native.js +16 -19
- package/dist/cjs/helpers/sortString.native.js.map +1 -1
- package/dist/cjs/helpers/splitStyleProps.cjs +46 -0
- package/dist/cjs/helpers/splitStyleProps.native.cjs +49 -0
- package/dist/cjs/helpers/splitStyleProps.native.js +51 -0
- package/dist/cjs/helpers/splitStyleProps.native.js.map +1 -0
- package/dist/cjs/helpers/styleFrontend.cjs +46 -0
- package/dist/cjs/helpers/styleFrontend.native.cjs +48 -0
- package/dist/cjs/helpers/styleFrontend.native.js +50 -0
- package/dist/cjs/helpers/styleFrontend.native.js.map +1 -0
- package/dist/cjs/helpers/styleOriginalValues.cjs +14 -18
- package/dist/cjs/helpers/styleOriginalValues.native.cjs +26 -0
- package/dist/cjs/helpers/styleOriginalValues.native.js +15 -18
- package/dist/cjs/helpers/styleOriginalValues.native.js.map +1 -1
- package/dist/cjs/helpers/styleProvenance.cjs +25 -27
- package/dist/cjs/helpers/styleProvenance.native.cjs +43 -0
- package/dist/cjs/helpers/styleProvenance.native.js +25 -26
- package/dist/cjs/helpers/styleProvenance.native.js.map +1 -1
- package/dist/cjs/helpers/styleStaticConfig.cjs +27 -0
- package/dist/cjs/helpers/styleStaticConfig.native.cjs +29 -0
- package/dist/cjs/helpers/styleStaticConfig.native.js +31 -0
- package/dist/cjs/helpers/styleStaticConfig.native.js.map +1 -0
- package/dist/cjs/helpers/styleStaticConfigCore.cjs +107 -0
- package/dist/cjs/helpers/styleStaticConfigCore.native.cjs +127 -0
- package/dist/cjs/helpers/styleStaticConfigCore.native.js +129 -0
- package/dist/cjs/helpers/styleStaticConfigCore.native.js.map +1 -0
- package/dist/cjs/helpers/styleToCSS.cjs +59 -0
- package/dist/cjs/helpers/styleToCSS.native.cjs +26 -0
- package/dist/cjs/helpers/styleToCSS.native.js +28 -0
- package/dist/cjs/helpers/styleToCSS.native.js.map +1 -0
- package/dist/cjs/helpers/styledDynamic.cjs +161 -0
- package/dist/cjs/helpers/styledDynamic.native.cjs +192 -0
- package/dist/cjs/helpers/styledDynamic.native.js +194 -0
- package/dist/cjs/helpers/styledDynamic.native.js.map +1 -0
- package/dist/cjs/helpers/subscribeToContextGroup.cjs +110 -94
- package/dist/cjs/helpers/subscribeToContextGroup.native.cjs +186 -0
- package/dist/cjs/helpers/subscribeToContextGroup.native.js +169 -138
- package/dist/cjs/helpers/subscribeToContextGroup.native.js.map +1 -1
- package/dist/cjs/helpers/themeRef.cjs +41 -0
- package/dist/cjs/helpers/themeRef.native.cjs +43 -0
- package/dist/cjs/helpers/themeRef.native.js +45 -0
- package/dist/cjs/helpers/themeRef.native.js.map +1 -0
- package/dist/cjs/helpers/themeUpdateState.cjs +24 -0
- package/dist/cjs/helpers/themeUpdateState.native.cjs +26 -0
- package/dist/cjs/helpers/themeUpdateState.native.js +28 -0
- package/dist/cjs/helpers/themeUpdateState.native.js.map +1 -0
- package/dist/cjs/helpers/themes.cjs +29 -34
- package/dist/cjs/helpers/themes.native.cjs +43 -0
- package/dist/cjs/helpers/themes.native.js +29 -33
- package/dist/cjs/helpers/themes.native.js.map +1 -1
- package/dist/cjs/helpers/timer.cjs +15 -21
- package/dist/cjs/helpers/timer.native.cjs +30 -0
- package/dist/cjs/helpers/timer.native.js +17 -22
- package/dist/cjs/helpers/timer.native.js.map +1 -1
- package/dist/cjs/helpers/tokenCategories.cjs +40 -0
- package/dist/cjs/helpers/tokenCategories.native.cjs +42 -0
- package/dist/cjs/helpers/tokenCategories.native.js +44 -0
- package/dist/cjs/helpers/tokenCategories.native.js.map +1 -0
- package/dist/cjs/helpers/transformsToString.cjs +24 -31
- package/dist/cjs/helpers/transformsToString.native.cjs +55 -0
- package/dist/cjs/helpers/transformsToString.native.js +41 -30
- package/dist/cjs/helpers/transformsToString.native.js.map +1 -1
- package/dist/cjs/helpers/variableValue.cjs +71 -0
- package/dist/cjs/helpers/variableValue.native.cjs +111 -0
- package/dist/cjs/helpers/variableValue.native.js +113 -0
- package/dist/cjs/helpers/variableValue.native.js.map +1 -0
- package/dist/cjs/helpers/variables.cjs +568 -0
- package/dist/cjs/helpers/variables.native.cjs +806 -0
- package/dist/cjs/helpers/variables.native.js +808 -0
- package/dist/cjs/helpers/variables.native.js.map +1 -0
- package/dist/cjs/helpers/warnOnce.cjs +38 -0
- package/dist/cjs/helpers/warnOnce.native.cjs +42 -0
- package/dist/cjs/helpers/warnOnce.native.js +44 -0
- package/dist/cjs/helpers/warnOnce.native.js.map +1 -0
- package/dist/cjs/helpers/webPropsToSkip.cjs +14 -18
- package/dist/cjs/helpers/webPropsToSkip.native.cjs +67 -0
- package/dist/cjs/helpers/webPropsToSkip.native.js +53 -62
- package/dist/cjs/helpers/webPropsToSkip.native.js.map +1 -1
- package/dist/cjs/helpers/wrapStyleTags.cjs +46 -48
- package/dist/cjs/helpers/wrapStyleTags.native.cjs +31 -0
- package/dist/cjs/helpers/wrapStyleTags.native.js +18 -18
- package/dist/cjs/helpers/wrapStyleTags.native.js.map +1 -1
- package/dist/cjs/hooks/doesRootSchemeMatchSystem.cjs +15 -19
- package/dist/cjs/hooks/doesRootSchemeMatchSystem.native.cjs +31 -0
- package/dist/cjs/hooks/doesRootSchemeMatchSystem.native.js +16 -19
- package/dist/cjs/hooks/doesRootSchemeMatchSystem.native.js.map +1 -1
- package/dist/cjs/hooks/getThemeProxied.cjs +60 -58
- package/dist/cjs/hooks/getThemeProxied.native.cjs +123 -0
- package/dist/cjs/hooks/getThemeProxied.native.js +97 -79
- package/dist/cjs/hooks/getThemeProxied.native.js.map +1 -1
- package/dist/cjs/hooks/isOptimizedForFirstRender.cjs +27 -0
- package/dist/cjs/hooks/isOptimizedForFirstRender.native.cjs +29 -0
- package/dist/cjs/hooks/isOptimizedForFirstRender.native.js +31 -0
- package/dist/cjs/hooks/isOptimizedForFirstRender.native.js.map +1 -0
- package/dist/cjs/hooks/useAnimationDriver.cjs +51 -0
- package/dist/cjs/hooks/useAnimationDriver.native.cjs +59 -0
- package/dist/cjs/hooks/useAnimationDriver.native.js +61 -0
- package/dist/cjs/hooks/useAnimationDriver.native.js.map +1 -0
- package/dist/cjs/hooks/useComponentState.cjs +178 -200
- package/dist/cjs/hooks/useComponentState.native.cjs +212 -0
- package/dist/cjs/hooks/useComponentState.native.js +190 -211
- package/dist/cjs/hooks/useComponentState.native.js.map +1 -1
- package/dist/cjs/hooks/useDisableSSR.cjs +15 -19
- package/dist/cjs/hooks/useDisableSSR.native.cjs +30 -0
- package/dist/cjs/hooks/useDisableSSR.native.js +16 -19
- package/dist/cjs/hooks/useDisableSSR.native.js.map +1 -1
- package/dist/cjs/hooks/useIsTouchDevice.cjs +15 -19
- package/dist/cjs/hooks/useIsTouchDevice.native.cjs +30 -0
- package/dist/cjs/hooks/useIsTouchDevice.native.js +16 -19
- package/dist/cjs/hooks/useIsTouchDevice.native.js.map +1 -1
- package/dist/cjs/hooks/useMedia.cjs +317 -257
- package/dist/cjs/hooks/useMedia.native.cjs +519 -0
- package/dist/cjs/hooks/useMedia.native.js +470 -307
- package/dist/cjs/hooks/useMedia.native.js.map +1 -1
- package/dist/cjs/hooks/usePortalThemeState.cjs +40 -0
- package/dist/cjs/hooks/usePortalThemeState.native.cjs +42 -0
- package/dist/cjs/hooks/usePortalThemeState.native.js +44 -0
- package/dist/cjs/hooks/usePortalThemeState.native.js.map +1 -0
- package/dist/cjs/hooks/useSplitStyles.cjs +42 -0
- package/dist/cjs/hooks/useSplitStyles.native.cjs +42 -0
- package/dist/cjs/hooks/useSplitStyles.native.js +44 -0
- package/dist/cjs/hooks/useSplitStyles.native.js.map +1 -0
- package/dist/cjs/hooks/useStyle.cjs +30 -0
- package/dist/cjs/hooks/useStyle.native.cjs +32 -0
- package/dist/cjs/hooks/useStyle.native.js +34 -0
- package/dist/cjs/hooks/useStyle.native.js.map +1 -0
- package/dist/cjs/hooks/useTheme.cjs +40 -49
- package/dist/cjs/hooks/useTheme.native.cjs +64 -0
- package/dist/cjs/hooks/useTheme.native.js +43 -52
- package/dist/cjs/hooks/useTheme.native.js.map +1 -1
- package/dist/cjs/hooks/useThemeName.cjs +19 -25
- package/dist/cjs/hooks/useThemeName.native.cjs +38 -0
- package/dist/cjs/hooks/useThemeName.native.js +22 -27
- package/dist/cjs/hooks/useThemeName.native.js.map +1 -1
- package/dist/cjs/hooks/useThemeState.cjs +282 -368
- package/dist/cjs/hooks/useThemeState.native.cjs +378 -0
- package/dist/cjs/hooks/useThemeState.native.js +334 -477
- package/dist/cjs/hooks/useThemeState.native.js.map +1 -1
- package/dist/cjs/index.cjs +233 -105
- package/dist/cjs/index.native.cjs +255 -0
- package/dist/cjs/index.native.js +234 -105
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/inject-styles.cjs +24 -31
- package/dist/cjs/inject-styles.native.cjs +38 -0
- package/dist/cjs/inject-styles.native.js +25 -31
- package/dist/cjs/inject-styles.native.js.map +1 -1
- package/dist/cjs/insertFont.cjs +60 -61
- package/dist/cjs/insertFont.native.cjs +79 -0
- package/dist/cjs/insertFont.native.js +54 -54
- package/dist/cjs/insertFont.native.js.map +1 -1
- package/dist/cjs/interfaces/CSSColorNames.cjs +166 -11
- package/dist/cjs/interfaces/CSSColorNames.native.cjs +175 -0
- package/dist/cjs/interfaces/CSSColorNames.native.js +166 -10
- package/dist/cjs/interfaces/CSSColorNames.native.js.map +1 -1
- package/dist/cjs/interfaces/GetRef.cjs +9 -11
- package/dist/cjs/interfaces/GetRef.native.cjs +18 -0
- package/dist/cjs/interfaces/GetRef.native.js +9 -10
- package/dist/cjs/interfaces/GetRef.native.js.map +1 -1
- package/dist/cjs/interfaces/RNExclusiveTypes.cjs +9 -11
- package/dist/cjs/interfaces/RNExclusiveTypes.native.cjs +18 -0
- package/dist/cjs/interfaces/RNExclusiveTypes.native.js +9 -10
- package/dist/cjs/interfaces/RNExclusiveTypes.native.js.map +1 -1
- package/dist/cjs/interfaces/TamaguiComponentEvents.cjs +9 -11
- package/dist/cjs/interfaces/TamaguiComponentEvents.native.cjs +18 -0
- package/dist/cjs/interfaces/TamaguiComponentEvents.native.js +9 -10
- package/dist/cjs/interfaces/TamaguiComponentEvents.native.js.map +1 -1
- package/dist/cjs/interfaces/TamaguiComponentPropsBaseBase.cjs +9 -11
- package/dist/cjs/interfaces/TamaguiComponentPropsBaseBase.native.cjs +18 -0
- package/dist/cjs/interfaces/TamaguiComponentPropsBaseBase.native.js +9 -10
- package/dist/cjs/interfaces/TamaguiComponentPropsBaseBase.native.js.map +1 -1
- package/dist/cjs/internal-runtime.cjs +123 -0
- package/dist/cjs/internal-runtime.native.cjs +125 -0
- package/dist/cjs/internal-runtime.native.js +127 -0
- package/dist/cjs/internal-runtime.native.js.map +1 -0
- package/dist/cjs/internalRuntimeTypes.cjs +16 -0
- package/dist/cjs/internalRuntimeTypes.native.cjs +18 -0
- package/dist/cjs/internalRuntimeTypes.native.js +20 -0
- package/dist/cjs/internalRuntimeTypes.native.js.map +1 -0
- package/dist/cjs/setupHooks.cjs +16 -18
- package/dist/cjs/setupHooks.native.cjs +32 -0
- package/dist/cjs/setupHooks.native.js +16 -17
- package/dist/cjs/setupHooks.native.js.map +1 -1
- package/dist/cjs/setupReactNative.cjs +14 -44
- package/dist/cjs/setupReactNative.native.cjs +53 -0
- package/dist/cjs/setupReactNative.native.js +38 -41
- package/dist/cjs/setupReactNative.native.js.map +1 -1
- package/dist/cjs/static-resolve.cjs +230 -0
- package/dist/cjs/static-resolve.native.cjs +236 -0
- package/dist/cjs/static-resolve.native.js +238 -0
- package/dist/cjs/static-resolve.native.js.map +1 -0
- package/dist/cjs/style.cjs +91 -0
- package/dist/cjs/style.native.cjs +94 -0
- package/dist/cjs/style.native.js +96 -0
- package/dist/cjs/style.native.js.map +1 -0
- package/dist/cjs/styled.cjs +110 -143
- package/dist/cjs/styled.native.cjs +133 -0
- package/dist/cjs/styled.native.js +115 -145
- package/dist/cjs/styled.native.js.map +1 -1
- package/dist/cjs/theme-update.cjs +19 -0
- package/dist/cjs/theme-update.native.cjs +21 -0
- package/dist/cjs/theme-update.native.js +23 -0
- package/dist/cjs/theme-update.native.js.map +1 -0
- package/dist/cjs/type-utils.cjs +9 -11
- package/dist/cjs/type-utils.native.cjs +18 -0
- package/dist/cjs/type-utils.native.js +9 -10
- package/dist/cjs/type-utils.native.js.map +1 -1
- package/dist/cjs/types.cjs +21 -11
- package/dist/cjs/types.native.cjs +30 -0
- package/dist/cjs/types.native.js +21 -10
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/cjs/views/ConfigRevisionCheck.cjs +68 -0
- package/dist/cjs/views/ConfigRevisionCheck.native.cjs +73 -0
- package/dist/cjs/views/ConfigRevisionCheck.native.js +75 -0
- package/dist/cjs/views/ConfigRevisionCheck.native.js.map +1 -0
- package/dist/cjs/views/Configuration.cjs +26 -35
- package/dist/cjs/views/Configuration.native.cjs +46 -0
- package/dist/cjs/views/Configuration.native.js +27 -35
- package/dist/cjs/views/Configuration.native.js.map +1 -1
- package/dist/cjs/views/FontLanguage.cjs +20 -29
- package/dist/cjs/views/FontLanguage.native.cjs +46 -0
- package/dist/cjs/views/FontLanguage.native.js +27 -38
- package/dist/cjs/views/FontLanguage.native.js.map +1 -1
- package/dist/cjs/views/SafeAreaTracker.cjs +32 -0
- package/dist/cjs/views/SafeAreaTracker.native.cjs +36 -0
- package/dist/cjs/views/SafeAreaTracker.native.js +38 -0
- package/dist/cjs/views/SafeAreaTracker.native.js.map +1 -0
- package/dist/cjs/views/Slot.cjs +51 -59
- package/dist/cjs/views/Slot.native.cjs +77 -0
- package/dist/cjs/views/Slot.native.js +52 -59
- package/dist/cjs/views/Slot.native.js.map +1 -1
- package/dist/cjs/views/TamaguiProvider.cjs +69 -76
- package/dist/cjs/views/TamaguiProvider.native.cjs +98 -0
- package/dist/cjs/views/TamaguiProvider.native.js +68 -76
- package/dist/cjs/views/TamaguiProvider.native.js.map +1 -1
- package/dist/cjs/views/TamaguiRoot.cjs +46 -61
- package/dist/cjs/views/TamaguiRoot.native.cjs +28 -0
- package/dist/cjs/views/TamaguiRoot.native.js +15 -18
- package/dist/cjs/views/TamaguiRoot.native.js.map +1 -1
- package/dist/cjs/views/Text.cjs +50 -46
- package/dist/cjs/views/Text.native.cjs +49 -0
- package/dist/cjs/views/Text.native.js +34 -36
- package/dist/cjs/views/Text.native.js.map +1 -1
- package/dist/cjs/views/Theme.cjs +117 -167
- package/dist/cjs/views/Theme.native.cjs +159 -0
- package/dist/cjs/views/Theme.native.js +127 -173
- package/dist/cjs/views/Theme.native.js.map +1 -1
- package/dist/cjs/views/ThemeDebug.cjs +73 -81
- package/dist/cjs/views/ThemeDebug.native.cjs +30 -0
- package/dist/cjs/views/ThemeDebug.native.js +16 -23
- package/dist/cjs/views/ThemeDebug.native.js.map +1 -1
- package/dist/cjs/views/ThemeProvider.cjs +34 -39
- package/dist/cjs/views/ThemeProvider.native.cjs +43 -0
- package/dist/cjs/views/ThemeProvider.native.js +25 -28
- package/dist/cjs/views/ThemeProvider.native.js.map +1 -1
- package/dist/cjs/views/ThemeUpdate.cjs +82 -0
- package/dist/cjs/views/ThemeUpdate.native.cjs +84 -0
- package/dist/cjs/views/ThemeUpdate.native.js +86 -0
- package/dist/cjs/views/ThemeUpdate.native.js.map +1 -0
- package/dist/cjs/views/View.cjs +21 -18
- package/dist/cjs/views/View.native.cjs +38 -0
- package/dist/cjs/views/View.native.js +21 -17
- package/dist/cjs/views/View.native.js.map +1 -1
- package/dist/esm/Tamagui.mjs +27 -27
- package/dist/esm/Tamagui.mjs.map +1 -1
- package/dist/esm/Tamagui.native.js +76 -71
- package/dist/esm/Tamagui.native.js.map +1 -1
- package/dist/esm/_withNativeStyle.mjs +55 -0
- package/dist/esm/_withNativeStyle.mjs.map +1 -0
- package/dist/esm/_withNativeStyle.native.js +58 -0
- package/dist/esm/_withNativeStyle.native.js.map +1 -0
- package/dist/esm/_withStableStyle.mjs +44 -29
- package/dist/esm/_withStableStyle.mjs.map +1 -1
- package/dist/esm/_withStableStyle.native.js +51 -33
- package/dist/esm/_withStableStyle.native.js.map +1 -1
- package/dist/esm/config.mjs +97 -100
- package/dist/esm/config.mjs.map +1 -1
- package/dist/esm/config.native.js +122 -129
- package/dist/esm/config.native.js.map +1 -1
- package/dist/esm/constants/constants.mjs +1 -0
- package/dist/esm/constants/constants.mjs.map +1 -1
- package/dist/esm/constants/constants.native.js +1 -0
- package/dist/esm/constants/constants.native.js.map +1 -1
- package/dist/esm/constants/isDevTools.mjs +7 -6
- package/dist/esm/constants/isDevTools.mjs.map +1 -1
- package/dist/esm/constants/isDevTools.native.js +9 -8
- package/dist/esm/constants/isDevTools.native.js.map +1 -1
- package/dist/esm/contexts/ComponentContext.mjs +18 -8
- package/dist/esm/contexts/ComponentContext.mjs.map +1 -1
- package/dist/esm/contexts/ComponentContext.native.js +19 -9
- package/dist/esm/contexts/ComponentContext.native.js.map +1 -1
- package/dist/esm/contexts/GroupContext.mjs +2 -0
- package/dist/esm/contexts/GroupContext.mjs.map +1 -1
- package/dist/esm/contexts/GroupContext.native.js +3 -1
- package/dist/esm/contexts/GroupContext.native.js.map +1 -1
- package/dist/esm/createComponent.mjs +992 -996
- package/dist/esm/createComponent.mjs.map +1 -1
- package/dist/esm/createComponent.native.js +1091 -979
- package/dist/esm/createComponent.native.js.map +1 -1
- package/dist/esm/createFont.mjs +27 -18
- package/dist/esm/createFont.mjs.map +1 -1
- package/dist/esm/createFont.native.js +30 -21
- package/dist/esm/createFont.native.js.map +1 -1
- package/dist/esm/createShorthands.mjs +2 -1
- package/dist/esm/createShorthands.mjs.map +1 -1
- package/dist/esm/createShorthands.native.js +2 -1
- package/dist/esm/createShorthands.native.js.map +1 -1
- package/dist/esm/createStyledHOC.mjs +79 -0
- package/dist/esm/createStyledHOC.mjs.map +1 -0
- package/dist/esm/createStyledHOC.native.js +80 -0
- package/dist/esm/createStyledHOC.native.js.map +1 -0
- package/dist/esm/createTamagui.mjs +275 -207
- package/dist/esm/createTamagui.mjs.map +1 -1
- package/dist/esm/createTamagui.native.js +309 -255
- package/dist/esm/createTamagui.native.js.map +1 -1
- package/dist/esm/createTokens.mjs +15 -1
- package/dist/esm/createTokens.mjs.map +1 -1
- package/dist/esm/createTokens.native.js +16 -2
- package/dist/esm/createTokens.native.js.map +1 -1
- package/dist/esm/createVariable.mjs +66 -65
- package/dist/esm/createVariable.mjs.map +1 -1
- package/dist/esm/createVariable.native.js +77 -81
- package/dist/esm/createVariable.native.js.map +1 -1
- package/dist/esm/createVariables.mjs +37 -42
- package/dist/esm/createVariables.mjs.map +1 -1
- package/dist/esm/createVariables.native.js +38 -48
- package/dist/esm/createVariables.native.js.map +1 -1
- package/dist/esm/defaultComponentState.mjs +13 -12
- package/dist/esm/defaultComponentState.mjs.map +1 -1
- package/dist/esm/defaultComponentState.native.js +13 -12
- package/dist/esm/defaultComponentState.native.js.map +1 -1
- package/dist/esm/dom/adapters.mjs +67 -0
- package/dist/esm/dom/adapters.mjs.map +1 -0
- package/dist/esm/dom/adapters.native.js +86 -0
- package/dist/esm/dom/adapters.native.js.map +1 -0
- package/dist/esm/dom/contract.mjs +0 -0
- package/dist/esm/dom/contract.native.js +0 -0
- package/dist/esm/dom/domEventProps.native.js +34 -0
- package/dist/esm/dom/domEventProps.native.js.map +1 -0
- package/dist/esm/dom/html.mjs +611 -0
- package/dist/esm/dom/html.mjs.map +1 -0
- package/dist/esm/dom/html.native.js +930 -0
- package/dist/esm/dom/html.native.js.map +1 -0
- package/dist/esm/dom/htmlRuntime.native.js +152 -0
- package/dist/esm/dom/htmlRuntime.native.js.map +1 -0
- package/dist/esm/dom/index.mjs +4 -0
- package/dist/esm/dom/index.native.js +5 -0
- package/dist/esm/dom/primitives.native.js +609 -0
- package/dist/esm/dom/primitives.native.js.map +1 -0
- package/dist/esm/dom/standalone.mjs +10 -0
- package/dist/esm/dom/standalone.mjs.map +1 -0
- package/dist/esm/dom/standalone.native.js +14 -0
- package/dist/esm/dom/standalone.native.js.map +1 -0
- package/dist/esm/dom/standaloneHtml.mjs +56 -0
- package/dist/esm/dom/standaloneHtml.mjs.map +1 -0
- package/dist/esm/dom/standaloneHtml.native.js +56 -0
- package/dist/esm/dom/standaloneHtml.native.js.map +1 -0
- package/dist/esm/dom/styleTypes.mjs +0 -0
- package/dist/esm/dom/styleTypes.native.js +0 -0
- package/dist/esm/eventDetails.mjs +18 -0
- package/dist/esm/eventDetails.mjs.map +1 -0
- package/dist/esm/eventDetails.native.js +18 -0
- package/dist/esm/eventDetails.native.js.map +1 -0
- package/dist/esm/eventHandling.mjs +14 -13
- package/dist/esm/eventHandling.mjs.map +1 -1
- package/dist/esm/eventHandling.native.js +141 -163
- package/dist/esm/eventHandling.native.js.map +1 -1
- package/dist/esm/helpers/borderComponents.mjs +37 -0
- package/dist/esm/helpers/borderComponents.mjs.map +1 -0
- package/dist/esm/helpers/borderComponents.native.js +55 -0
- package/dist/esm/helpers/borderComponents.native.js.map +1 -0
- package/dist/esm/helpers/componentDisplayName.mjs +4 -0
- package/dist/esm/helpers/componentDisplayName.mjs.map +1 -0
- package/dist/esm/helpers/componentDisplayName.native.js +4 -0
- package/dist/esm/helpers/componentDisplayName.native.js.map +1 -0
- package/dist/esm/helpers/configVariables.mjs +60 -0
- package/dist/esm/helpers/configVariables.mjs.map +1 -0
- package/dist/esm/helpers/configVariables.native.js +61 -0
- package/dist/esm/helpers/configVariables.native.js.map +1 -0
- package/dist/esm/helpers/consoleLog.native.js +2 -1
- package/dist/esm/helpers/consoleLog.native.js.map +1 -1
- package/dist/esm/helpers/createDesignSystem.mjs +133 -134
- package/dist/esm/helpers/createDesignSystem.mjs.map +1 -1
- package/dist/esm/helpers/createDesignSystem.native.js +151 -186
- package/dist/esm/helpers/createDesignSystem.native.js.map +1 -1
- package/dist/esm/helpers/createStyledContext.mjs +49 -58
- package/dist/esm/helpers/createStyledContext.mjs.map +1 -1
- package/dist/esm/helpers/createStyledContext.native.js +54 -63
- package/dist/esm/helpers/createStyledContext.native.js.map +1 -1
- package/dist/esm/helpers/defaultAnimationDriver.mjs +10 -14
- package/dist/esm/helpers/defaultAnimationDriver.mjs.map +1 -1
- package/dist/esm/helpers/defaultAnimationDriver.native.js +19 -31
- package/dist/esm/helpers/defaultAnimationDriver.native.js.map +1 -1
- package/dist/esm/helpers/defaultOffset.mjs +3 -2
- package/dist/esm/helpers/defaultOffset.mjs.map +1 -1
- package/dist/esm/helpers/defaultOffset.native.js +3 -2
- package/dist/esm/helpers/defaultOffset.native.js.map +1 -1
- package/dist/esm/helpers/expandStyle.mjs +138 -66
- package/dist/esm/helpers/expandStyle.mjs.map +1 -1
- package/dist/esm/helpers/expandStyle.native.js +141 -107
- package/dist/esm/helpers/expandStyle.native.js.map +1 -1
- package/dist/esm/helpers/expandStyles.mjs +9 -7
- package/dist/esm/helpers/expandStyles.mjs.map +1 -1
- package/dist/esm/helpers/expandStyles.native.js +16 -14
- package/dist/esm/helpers/expandStyles.native.js.map +1 -1
- package/dist/esm/helpers/extractPseudoState.mjs +24 -0
- package/dist/esm/helpers/extractPseudoState.mjs.map +1 -0
- package/dist/esm/helpers/extractPseudoState.native.js +25 -0
- package/dist/esm/helpers/extractPseudoState.native.js.map +1 -0
- 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.mjs +49 -0
- package/dist/esm/helpers/formatDiagnostic.mjs.map +1 -0
- package/dist/esm/helpers/formatDiagnostic.native.js +52 -0
- package/dist/esm/helpers/formatDiagnostic.native.js.map +1 -0
- package/dist/esm/helpers/getCSSStylesAtomic.mjs +224 -177
- package/dist/esm/helpers/getCSSStylesAtomic.mjs.map +1 -1
- package/dist/esm/helpers/getCSSStylesAtomic.native.js +9 -4
- package/dist/esm/helpers/getCSSStylesAtomic.native.js.map +1 -1
- package/dist/esm/helpers/getCSSStylesAtomicCompiled.mjs +16 -0
- package/dist/esm/helpers/getCSSStylesAtomicCompiled.mjs.map +1 -0
- package/dist/esm/helpers/getCSSStylesAtomicCompiled.native.js +18 -0
- package/dist/esm/helpers/getCSSStylesAtomicCompiled.native.js.map +1 -0
- package/dist/esm/helpers/getDynamicVal.mjs +32 -33
- package/dist/esm/helpers/getDynamicVal.mjs.map +1 -1
- package/dist/esm/helpers/getDynamicVal.native.js +32 -33
- package/dist/esm/helpers/getDynamicVal.native.js.map +1 -1
- package/dist/esm/helpers/getExpandedShorthands.mjs +5 -12
- package/dist/esm/helpers/getExpandedShorthands.mjs.map +1 -1
- package/dist/esm/helpers/getExpandedShorthands.native.js +6 -13
- package/dist/esm/helpers/getExpandedShorthands.native.js.map +1 -1
- package/dist/esm/helpers/getShorthandValue.mjs +4 -2
- package/dist/esm/helpers/getShorthandValue.mjs.map +1 -1
- package/dist/esm/helpers/getShorthandValue.native.js +6 -4
- package/dist/esm/helpers/getShorthandValue.native.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.mjs +1605 -893
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +1786 -916
- package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/esm/helpers/getThemeCSSRules.mjs +94 -92
- package/dist/esm/helpers/getThemeCSSRules.mjs.map +1 -1
- package/dist/esm/helpers/getThemeCSSRules.native.js +2 -1
- package/dist/esm/helpers/getThemeCSSRules.native.js.map +1 -1
- package/dist/esm/helpers/grammarConfig.mjs +253 -0
- package/dist/esm/helpers/grammarConfig.mjs.map +1 -0
- package/dist/esm/helpers/grammarConfig.native.js +387 -0
- package/dist/esm/helpers/grammarConfig.native.js.map +1 -0
- package/dist/esm/helpers/insertStyleRule.mjs +232 -160
- package/dist/esm/helpers/insertStyleRule.mjs.map +1 -1
- package/dist/esm/helpers/insertStyleRule.native.js +135 -27
- package/dist/esm/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/esm/helpers/isObj.mjs +10 -2
- package/dist/esm/helpers/isObj.mjs.map +1 -1
- package/dist/esm/helpers/isObj.native.js +11 -8
- package/dist/esm/helpers/isObj.native.js.map +1 -1
- package/dist/esm/helpers/isTamaguiComponent.mjs +4 -3
- package/dist/esm/helpers/isTamaguiComponent.mjs.map +1 -1
- package/dist/esm/helpers/isTamaguiComponent.native.js +4 -3
- package/dist/esm/helpers/isTamaguiComponent.native.js.map +1 -1
- package/dist/esm/helpers/isTamaguiElement.mjs +4 -2
- package/dist/esm/helpers/isTamaguiElement.mjs.map +1 -1
- package/dist/esm/helpers/isTamaguiElement.native.js +4 -2
- package/dist/esm/helpers/isTamaguiElement.native.js.map +1 -1
- package/dist/esm/helpers/log.mjs +12 -9
- package/dist/esm/helpers/log.mjs.map +1 -1
- package/dist/esm/helpers/log.native.js +13 -10
- package/dist/esm/helpers/log.native.js.map +1 -1
- package/dist/esm/helpers/mainThreadPressEvents.mjs +1 -0
- package/dist/esm/helpers/mainThreadPressEvents.mjs.map +1 -1
- package/dist/esm/helpers/mainThreadPressEvents.native.js +126 -125
- package/dist/esm/helpers/mainThreadPressEvents.native.js.map +1 -1
- package/dist/esm/helpers/matchMedia.mjs +7 -6
- package/dist/esm/helpers/matchMedia.mjs.map +1 -1
- package/dist/esm/helpers/matchMedia.native.js +36 -25
- package/dist/esm/helpers/matchMedia.native.js.map +1 -1
- package/dist/esm/helpers/mediaObjectToString.mjs +21 -20
- package/dist/esm/helpers/mediaObjectToString.mjs.map +1 -1
- package/dist/esm/helpers/mediaObjectToString.native.js +24 -23
- package/dist/esm/helpers/mediaObjectToString.native.js.map +1 -1
- package/dist/esm/helpers/mediaState.mjs +18 -24
- package/dist/esm/helpers/mediaState.mjs.map +1 -1
- package/dist/esm/helpers/mediaState.native.js +20 -27
- package/dist/esm/helpers/mediaState.native.js.map +1 -1
- package/dist/esm/helpers/mergeProps.mjs +37 -47
- package/dist/esm/helpers/mergeProps.mjs.map +1 -1
- package/dist/esm/helpers/mergeProps.native.js +39 -54
- package/dist/esm/helpers/mergeProps.native.js.map +1 -1
- package/dist/esm/helpers/mergeRenderElementProps.mjs +5 -5
- package/dist/esm/helpers/mergeRenderElementProps.mjs.map +1 -1
- package/dist/esm/helpers/mergeRenderElementProps.native.js +5 -5
- package/dist/esm/helpers/mergeRenderElementProps.native.js.map +1 -1
- package/dist/esm/helpers/mergeSlotStyleProps.mjs +22 -20
- package/dist/esm/helpers/mergeSlotStyleProps.mjs.map +1 -1
- package/dist/esm/helpers/mergeSlotStyleProps.native.js +22 -20
- package/dist/esm/helpers/mergeSlotStyleProps.native.js.map +1 -1
- package/dist/esm/helpers/mergeVariants.mjs +70 -23
- package/dist/esm/helpers/mergeVariants.mjs.map +1 -1
- package/dist/esm/helpers/mergeVariants.native.js +106 -25
- package/dist/esm/helpers/mergeVariants.native.js.map +1 -1
- package/dist/esm/helpers/nativeOnlyProps.mjs +33 -33
- package/dist/esm/helpers/nativeOnlyProps.mjs.map +1 -1
- package/dist/esm/helpers/nativeOnlyProps.native.js +33 -33
- package/dist/esm/helpers/nativeOnlyProps.native.js.map +1 -1
- package/dist/esm/helpers/nativeStyleEngine.mjs +237 -0
- package/dist/esm/helpers/nativeStyleEngine.mjs.map +1 -0
- package/dist/esm/helpers/nativeStyleEngine.native.js +366 -0
- package/dist/esm/helpers/nativeStyleEngine.native.js.map +1 -0
- package/dist/esm/helpers/nativeTransitionTarget.mjs +6 -0
- package/dist/esm/helpers/nativeTransitionTarget.mjs.map +1 -0
- package/dist/esm/helpers/nativeTransitionTarget.native.js +21 -0
- package/dist/esm/helpers/nativeTransitionTarget.native.js.map +1 -0
- package/dist/esm/helpers/normalizeColor.mjs +11 -18
- package/dist/esm/helpers/normalizeColor.mjs.map +1 -1
- package/dist/esm/helpers/normalizeColor.native.js +19 -19
- package/dist/esm/helpers/normalizeColor.native.js.map +1 -1
- package/dist/esm/helpers/normalizeShadow.mjs +13 -21
- package/dist/esm/helpers/normalizeShadow.mjs.map +1 -1
- package/dist/esm/helpers/normalizeShadow.native.js +14 -20
- package/dist/esm/helpers/normalizeShadow.native.js.map +1 -1
- package/dist/esm/helpers/normalizeStyle.mjs +47 -43
- package/dist/esm/helpers/normalizeStyle.mjs.map +1 -1
- package/dist/esm/helpers/normalizeStyle.native.js +64 -62
- package/dist/esm/helpers/normalizeStyle.native.js.map +1 -1
- package/dist/esm/helpers/normalizeValueWithProperty.mjs +30 -23
- package/dist/esm/helpers/normalizeValueWithProperty.mjs.map +1 -1
- package/dist/esm/helpers/normalizeValueWithProperty.native.js +32 -28
- package/dist/esm/helpers/normalizeValueWithProperty.native.js.map +1 -1
- package/dist/esm/helpers/noteOnce.mjs +11 -0
- package/dist/esm/helpers/noteOnce.mjs.map +1 -0
- package/dist/esm/helpers/noteOnce.native.js +11 -0
- package/dist/esm/helpers/noteOnce.native.js.map +1 -0
- package/dist/esm/helpers/objectIdentityKey.mjs +18 -17
- package/dist/esm/helpers/objectIdentityKey.mjs.map +1 -1
- package/dist/esm/helpers/objectIdentityKey.native.js +18 -22
- package/dist/esm/helpers/objectIdentityKey.native.js.map +1 -1
- package/dist/esm/helpers/parseBorderShorthand.mjs +2 -1
- package/dist/esm/helpers/parseBorderShorthand.mjs.map +1 -1
- package/dist/esm/helpers/parseBorderShorthand.native.js +38 -55
- package/dist/esm/helpers/parseBorderShorthand.native.js.map +1 -1
- package/dist/esm/helpers/parseNativeStyle.native.js +167 -146
- package/dist/esm/helpers/parseNativeStyle.native.js.map +1 -1
- package/dist/esm/helpers/parseNativeTransform.native.js +45 -0
- package/dist/esm/helpers/parseNativeTransform.native.js.map +1 -0
- package/dist/esm/helpers/parseOutlineShorthand.mjs +2 -1
- package/dist/esm/helpers/parseOutlineShorthand.mjs.map +1 -1
- package/dist/esm/helpers/parseOutlineShorthand.native.js +19 -48
- package/dist/esm/helpers/parseOutlineShorthand.native.js.map +1 -1
- package/dist/esm/helpers/pointerEvents.mjs +1 -0
- package/dist/esm/helpers/pointerEvents.mjs.map +1 -1
- package/dist/esm/helpers/pointerEvents.native.js +104 -127
- package/dist/esm/helpers/pointerEvents.native.js.map +1 -1
- package/dist/esm/helpers/proxyThemeToParents.mjs +32 -31
- package/dist/esm/helpers/proxyThemeToParents.mjs.map +1 -1
- package/dist/esm/helpers/proxyThemeToParents.native.js +136 -126
- package/dist/esm/helpers/proxyThemeToParents.native.js.map +1 -1
- package/dist/esm/helpers/registerCSSVariable.mjs +76 -39
- package/dist/esm/helpers/registerCSSVariable.mjs.map +1 -1
- package/dist/esm/helpers/registerCSSVariable.native.js +95 -44
- package/dist/esm/helpers/registerCSSVariable.native.js.map +1 -1
- package/dist/esm/helpers/resolveAnimationDriver.mjs +14 -8
- package/dist/esm/helpers/resolveAnimationDriver.mjs.map +1 -1
- package/dist/esm/helpers/resolveAnimationDriver.native.js +14 -9
- 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 +142 -0
- package/dist/esm/helpers/resolveNativeUnits.native.js.map +1 -0
- package/dist/esm/helpers/resolveRem.mjs +3 -2
- package/dist/esm/helpers/resolveRem.mjs.map +1 -1
- package/dist/esm/helpers/resolveRem.native.js +21 -22
- package/dist/esm/helpers/resolveRem.native.js.map +1 -1
- package/dist/esm/helpers/resolveSafeArea.mjs +38 -8
- package/dist/esm/helpers/resolveSafeArea.mjs.map +1 -1
- package/dist/esm/helpers/resolveSafeArea.native.js +101 -15
- package/dist/esm/helpers/resolveSafeArea.native.js.map +1 -1
- package/dist/esm/helpers/resolveSafeAreaVariable.mjs +10 -0
- package/dist/esm/helpers/resolveSafeAreaVariable.mjs.map +1 -0
- package/dist/esm/helpers/resolveSafeAreaVariable.native.js +27 -0
- package/dist/esm/helpers/resolveSafeAreaVariable.native.js.map +1 -0
- package/dist/esm/helpers/resolveVariableValue.mjs +15 -0
- package/dist/esm/helpers/resolveVariableValue.mjs.map +1 -0
- package/dist/esm/helpers/resolveVariableValue.native.js +17 -0
- package/dist/esm/helpers/resolveVariableValue.native.js.map +1 -0
- package/dist/esm/helpers/resolveVariantStyle.mjs +38 -0
- package/dist/esm/helpers/resolveVariantStyle.mjs.map +1 -0
- package/dist/esm/helpers/resolveVariantStyle.native.js +42 -0
- package/dist/esm/helpers/resolveVariantStyle.native.js.map +1 -0
- package/dist/esm/helpers/setElementProps.mjs +4 -2
- package/dist/esm/helpers/setElementProps.mjs.map +1 -1
- package/dist/esm/helpers/setElementProps.native.js +8 -7
- package/dist/esm/helpers/setElementProps.native.js.map +1 -1
- package/dist/esm/helpers/skipProps.mjs +20 -14
- package/dist/esm/helpers/skipProps.mjs.map +1 -1
- package/dist/esm/helpers/skipProps.native.js +20 -14
- package/dist/esm/helpers/skipProps.native.js.map +1 -1
- package/dist/esm/helpers/sortString.mjs +1 -0
- package/dist/esm/helpers/sortString.mjs.map +1 -1
- package/dist/esm/helpers/sortString.native.js +3 -2
- package/dist/esm/helpers/sortString.native.js.map +1 -1
- package/dist/esm/helpers/splitStyleProps.mjs +27 -0
- package/dist/esm/helpers/splitStyleProps.mjs.map +1 -0
- package/dist/esm/helpers/splitStyleProps.native.js +28 -0
- package/dist/esm/helpers/splitStyleProps.native.js.map +1 -0
- package/dist/esm/helpers/styleFrontend.mjs +23 -0
- package/dist/esm/helpers/styleFrontend.mjs.map +1 -0
- package/dist/esm/helpers/styleFrontend.native.js +23 -0
- package/dist/esm/helpers/styleFrontend.native.js.map +1 -0
- package/dist/esm/helpers/styleOriginalValues.mjs +2 -1
- package/dist/esm/helpers/styleOriginalValues.mjs.map +1 -1
- package/dist/esm/helpers/styleOriginalValues.native.js +2 -1
- package/dist/esm/helpers/styleOriginalValues.native.js.map +1 -1
- package/dist/esm/helpers/styleProvenance.mjs +10 -9
- package/dist/esm/helpers/styleProvenance.mjs.map +1 -1
- package/dist/esm/helpers/styleProvenance.native.js +10 -9
- package/dist/esm/helpers/styleProvenance.native.js.map +1 -1
- package/dist/esm/helpers/styleStaticConfig.mjs +8 -0
- package/dist/esm/helpers/styleStaticConfig.mjs.map +1 -0
- package/dist/esm/helpers/styleStaticConfig.native.js +8 -0
- package/dist/esm/helpers/styleStaticConfig.native.js.map +1 -0
- package/dist/esm/helpers/styleStaticConfigCore.mjs +88 -0
- package/dist/esm/helpers/styleStaticConfigCore.mjs.map +1 -0
- package/dist/esm/helpers/styleStaticConfigCore.native.js +106 -0
- package/dist/esm/helpers/styleStaticConfigCore.native.js.map +1 -0
- package/dist/esm/helpers/styleToCSS.mjs +40 -0
- package/dist/esm/helpers/styleToCSS.mjs.map +1 -0
- package/dist/esm/helpers/styleToCSS.native.js +4 -0
- package/dist/esm/helpers/styleToCSS.native.js.map +1 -0
- package/dist/esm/helpers/styledDynamic.mjs +137 -0
- package/dist/esm/helpers/styledDynamic.mjs.map +1 -0
- package/dist/esm/helpers/styledDynamic.native.js +166 -0
- package/dist/esm/helpers/styledDynamic.native.js.map +1 -0
- package/dist/esm/helpers/subscribeToContextGroup.mjs +98 -79
- package/dist/esm/helpers/subscribeToContextGroup.mjs.map +1 -1
- package/dist/esm/helpers/subscribeToContextGroup.native.js +157 -124
- package/dist/esm/helpers/subscribeToContextGroup.native.js.map +1 -1
- package/dist/esm/helpers/themeRef.mjs +17 -0
- package/dist/esm/helpers/themeRef.mjs.map +1 -0
- package/dist/esm/helpers/themeRef.native.js +17 -0
- package/dist/esm/helpers/themeRef.native.js.map +1 -0
- package/dist/esm/helpers/themeUpdateState.mjs +4 -0
- package/dist/esm/helpers/themeUpdateState.mjs.map +1 -0
- package/dist/esm/helpers/themeUpdateState.native.js +4 -0
- package/dist/esm/helpers/themeUpdateState.native.js.map +1 -0
- package/dist/esm/helpers/themes.mjs +17 -16
- package/dist/esm/helpers/themes.mjs.map +1 -1
- package/dist/esm/helpers/themes.native.js +17 -16
- package/dist/esm/helpers/themes.native.js.map +1 -1
- package/dist/esm/helpers/timer.mjs +9 -5
- package/dist/esm/helpers/timer.mjs.map +1 -1
- package/dist/esm/helpers/timer.native.js +9 -5
- package/dist/esm/helpers/timer.native.js.map +1 -1
- package/dist/esm/helpers/tokenCategories.mjs +20 -0
- package/dist/esm/helpers/tokenCategories.mjs.map +1 -0
- package/dist/esm/helpers/tokenCategories.native.js +20 -0
- package/dist/esm/helpers/tokenCategories.native.js.map +1 -0
- package/dist/esm/helpers/transformsToString.mjs +12 -13
- package/dist/esm/helpers/transformsToString.mjs.map +1 -1
- package/dist/esm/helpers/transformsToString.native.js +29 -13
- package/dist/esm/helpers/transformsToString.native.js.map +1 -1
- package/dist/esm/helpers/variableValue.mjs +49 -0
- package/dist/esm/helpers/variableValue.mjs.map +1 -0
- package/dist/esm/helpers/variableValue.native.js +87 -0
- package/dist/esm/helpers/variableValue.native.js.map +1 -0
- package/dist/esm/helpers/variables.mjs +542 -0
- package/dist/esm/helpers/variables.mjs.map +1 -0
- package/dist/esm/helpers/variables.native.js +778 -0
- package/dist/esm/helpers/variables.native.js.map +1 -0
- package/dist/esm/helpers/warnOnce.mjs +15 -0
- package/dist/esm/helpers/warnOnce.mjs.map +1 -0
- package/dist/esm/helpers/warnOnce.native.js +17 -0
- package/dist/esm/helpers/warnOnce.native.js.map +1 -0
- package/dist/esm/helpers/webPropsToSkip.mjs +1 -0
- package/dist/esm/helpers/webPropsToSkip.mjs.map +1 -1
- package/dist/esm/helpers/webPropsToSkip.native.js +41 -45
- package/dist/esm/helpers/webPropsToSkip.native.js.map +1 -1
- package/dist/esm/helpers/wrapStyleTags.mjs +34 -30
- package/dist/esm/helpers/wrapStyleTags.mjs.map +1 -1
- package/dist/esm/helpers/wrapStyleTags.native.js +4 -1
- package/dist/esm/helpers/wrapStyleTags.native.js.map +1 -1
- package/dist/esm/hooks/doesRootSchemeMatchSystem.mjs +2 -1
- package/dist/esm/hooks/doesRootSchemeMatchSystem.mjs.map +1 -1
- package/dist/esm/hooks/doesRootSchemeMatchSystem.native.js +4 -2
- package/dist/esm/hooks/doesRootSchemeMatchSystem.native.js.map +1 -1
- package/dist/esm/hooks/getThemeProxied.mjs +47 -40
- package/dist/esm/hooks/getThemeProxied.mjs.map +1 -1
- package/dist/esm/hooks/getThemeProxied.native.js +85 -62
- package/dist/esm/hooks/getThemeProxied.native.js.map +1 -1
- package/dist/esm/hooks/isOptimizedForFirstRender.mjs +8 -0
- package/dist/esm/hooks/isOptimizedForFirstRender.mjs.map +1 -0
- package/dist/esm/hooks/isOptimizedForFirstRender.native.js +8 -0
- package/dist/esm/hooks/isOptimizedForFirstRender.native.js.map +1 -0
- package/dist/esm/hooks/useAnimationDriver.mjs +26 -0
- package/dist/esm/hooks/useAnimationDriver.mjs.map +1 -0
- package/dist/esm/hooks/useAnimationDriver.native.js +32 -0
- package/dist/esm/hooks/useAnimationDriver.native.js.map +1 -0
- package/dist/esm/hooks/useComponentState.mjs +167 -183
- package/dist/esm/hooks/useComponentState.mjs.map +1 -1
- package/dist/esm/hooks/useComponentState.native.js +178 -194
- package/dist/esm/hooks/useComponentState.native.js.map +1 -1
- package/dist/esm/hooks/useDisableSSR.mjs +3 -1
- package/dist/esm/hooks/useDisableSSR.mjs.map +1 -1
- package/dist/esm/hooks/useDisableSSR.native.js +4 -2
- package/dist/esm/hooks/useDisableSSR.native.js.map +1 -1
- package/dist/esm/hooks/useIsTouchDevice.mjs +3 -1
- package/dist/esm/hooks/useIsTouchDevice.mjs.map +1 -1
- package/dist/esm/hooks/useIsTouchDevice.native.js +4 -2
- package/dist/esm/hooks/useIsTouchDevice.native.js.map +1 -1
- package/dist/esm/hooks/useMedia.mjs +299 -233
- package/dist/esm/hooks/useMedia.mjs.map +1 -1
- package/dist/esm/hooks/useMedia.native.js +451 -283
- package/dist/esm/hooks/useMedia.native.js.map +1 -1
- package/dist/esm/hooks/usePortalThemeState.mjs +21 -0
- package/dist/esm/hooks/usePortalThemeState.mjs.map +1 -0
- package/dist/esm/hooks/usePortalThemeState.native.js +21 -0
- package/dist/esm/hooks/usePortalThemeState.native.js.map +1 -0
- package/dist/esm/hooks/useSplitStyles.mjs +17 -0
- package/dist/esm/hooks/useSplitStyles.mjs.map +1 -0
- package/dist/esm/hooks/useSplitStyles.native.js +14 -0
- package/dist/esm/hooks/useSplitStyles.native.js.map +1 -0
- package/dist/esm/hooks/useStyle.mjs +11 -0
- package/dist/esm/hooks/useStyle.mjs.map +1 -0
- package/dist/esm/hooks/useStyle.native.js +11 -0
- package/dist/esm/hooks/useStyle.native.js.map +1 -0
- package/dist/esm/hooks/useTheme.mjs +27 -32
- package/dist/esm/hooks/useTheme.mjs.map +1 -1
- package/dist/esm/hooks/useTheme.native.js +30 -36
- package/dist/esm/hooks/useTheme.native.js.map +1 -1
- package/dist/esm/hooks/useThemeName.mjs +7 -7
- package/dist/esm/hooks/useThemeName.mjs.map +1 -1
- package/dist/esm/hooks/useThemeName.native.js +10 -10
- package/dist/esm/hooks/useThemeName.native.js.map +1 -1
- package/dist/esm/hooks/useThemeState.mjs +261 -349
- package/dist/esm/hooks/useThemeState.mjs.map +1 -1
- package/dist/esm/hooks/useThemeState.native.js +312 -458
- package/dist/esm/hooks/useThemeState.native.js.map +1 -1
- package/dist/esm/index.js +64 -72
- package/dist/esm/index.mjs +64 -72
- package/dist/esm/index.native.js +64 -72
- package/dist/esm/inject-styles.mjs +11 -13
- package/dist/esm/inject-styles.mjs.map +1 -1
- package/dist/esm/inject-styles.native.js +12 -14
- package/dist/esm/inject-styles.native.js.map +1 -1
- package/dist/esm/insertFont.mjs +44 -41
- package/dist/esm/insertFont.mjs.map +1 -1
- package/dist/esm/insertFont.native.js +38 -35
- package/dist/esm/insertFont.native.js.map +1 -1
- package/dist/esm/interfaces/CSSColorNames.mjs +151 -0
- package/dist/esm/interfaces/CSSColorNames.mjs.map +1 -1
- package/dist/esm/interfaces/CSSColorNames.native.js +151 -0
- package/dist/esm/interfaces/CSSColorNames.native.js.map +1 -1
- package/dist/esm/interfaces/GetRef.mjs +0 -2
- package/dist/esm/interfaces/GetRef.native.js +0 -2
- package/dist/esm/interfaces/RNExclusiveTypes.mjs +0 -2
- package/dist/esm/interfaces/RNExclusiveTypes.native.js +0 -2
- package/dist/esm/interfaces/TamaguiComponentEvents.mjs +0 -2
- package/dist/esm/interfaces/TamaguiComponentEvents.native.js +0 -2
- package/dist/esm/interfaces/TamaguiComponentPropsBaseBase.mjs +0 -2
- package/dist/esm/interfaces/TamaguiComponentPropsBaseBase.native.js +0 -2
- package/dist/esm/internal-runtime.mjs +83 -0
- package/dist/esm/internal-runtime.mjs.map +1 -0
- package/dist/esm/internal-runtime.native.js +83 -0
- package/dist/esm/internal-runtime.native.js.map +1 -0
- package/dist/esm/internalRuntimeTypes.mjs +0 -0
- package/dist/esm/internalRuntimeTypes.native.js +0 -0
- package/dist/esm/setupHooks.mjs +2 -1
- package/dist/esm/setupHooks.mjs.map +1 -1
- package/dist/esm/setupHooks.native.js +2 -1
- package/dist/esm/setupHooks.native.js.map +1 -1
- package/dist/esm/setupReactNative.mjs +2 -27
- package/dist/esm/setupReactNative.mjs.map +1 -1
- package/dist/esm/setupReactNative.native.js +25 -24
- package/dist/esm/setupReactNative.native.js.map +1 -1
- package/dist/esm/static-resolve.mjs +196 -0
- package/dist/esm/static-resolve.mjs.map +1 -0
- package/dist/esm/static-resolve.native.js +200 -0
- package/dist/esm/static-resolve.native.js.map +1 -0
- package/dist/esm/style.mjs +58 -0
- package/dist/esm/style.mjs.map +1 -0
- package/dist/esm/style.native.js +59 -0
- package/dist/esm/style.native.js.map +1 -0
- package/dist/esm/styled.mjs +97 -128
- package/dist/esm/styled.mjs.map +1 -1
- package/dist/esm/styled.native.js +101 -130
- package/dist/esm/styled.native.js.map +1 -1
- package/dist/esm/theme-update.mjs +3 -0
- package/dist/esm/theme-update.native.js +3 -0
- package/dist/esm/type-utils.mjs +0 -2
- package/dist/esm/type-utils.native.js +0 -2
- package/dist/esm/types.mjs +3 -0
- package/dist/esm/types.mjs.map +1 -1
- package/dist/esm/types.native.js +3 -0
- package/dist/esm/types.native.js.map +1 -1
- package/dist/esm/views/ConfigRevisionCheck.mjs +43 -0
- package/dist/esm/views/ConfigRevisionCheck.mjs.map +1 -0
- package/dist/esm/views/ConfigRevisionCheck.native.js +46 -0
- package/dist/esm/views/ConfigRevisionCheck.native.js.map +1 -0
- package/dist/esm/views/Configuration.mjs +11 -9
- package/dist/esm/views/Configuration.mjs.map +1 -1
- package/dist/esm/views/Configuration.native.js +13 -11
- package/dist/esm/views/Configuration.native.js.map +1 -1
- package/dist/esm/views/FontLanguage.mjs +8 -11
- package/dist/esm/views/FontLanguage.mjs.map +1 -1
- package/dist/esm/views/FontLanguage.native.js +13 -14
- package/dist/esm/views/FontLanguage.native.js.map +1 -1
- package/dist/esm/views/SafeAreaTracker.mjs +9 -0
- package/dist/esm/views/SafeAreaTracker.mjs.map +1 -0
- package/dist/esm/views/SafeAreaTracker.native.js +12 -0
- package/dist/esm/views/SafeAreaTracker.native.js.map +1 -0
- package/dist/esm/views/Slot.mjs +39 -44
- package/dist/esm/views/Slot.mjs.map +1 -1
- package/dist/esm/views/Slot.native.js +41 -46
- package/dist/esm/views/Slot.native.js.map +1 -1
- package/dist/esm/views/TamaguiProvider.mjs +54 -50
- package/dist/esm/views/TamaguiProvider.mjs.map +1 -1
- package/dist/esm/views/TamaguiProvider.native.js +52 -51
- package/dist/esm/views/TamaguiProvider.native.js.map +1 -1
- package/dist/esm/views/TamaguiRoot.mjs +31 -35
- package/dist/esm/views/TamaguiRoot.mjs.map +1 -1
- package/dist/esm/views/TamaguiRoot.native.js +2 -1
- package/dist/esm/views/TamaguiRoot.native.js.map +1 -1
- package/dist/esm/views/Text.mjs +38 -31
- package/dist/esm/views/Text.mjs.map +1 -1
- package/dist/esm/views/Text.native.js +19 -21
- package/dist/esm/views/Text.native.js.map +1 -1
- package/dist/esm/views/Theme.mjs +102 -145
- package/dist/esm/views/Theme.mjs.map +1 -1
- package/dist/esm/views/Theme.native.js +113 -152
- package/dist/esm/views/Theme.native.js.map +1 -1
- package/dist/esm/views/ThemeDebug.mjs +61 -63
- package/dist/esm/views/ThemeDebug.mjs.map +1 -1
- package/dist/esm/views/ThemeDebug.native.js +3 -6
- package/dist/esm/views/ThemeDebug.native.js.map +1 -1
- package/dist/esm/views/ThemeProvider.mjs +21 -20
- package/dist/esm/views/ThemeProvider.mjs.map +1 -1
- package/dist/esm/views/ThemeProvider.native.js +12 -10
- package/dist/esm/views/ThemeProvider.native.js.map +1 -1
- package/dist/esm/views/ThemeUpdate.mjs +54 -0
- package/dist/esm/views/ThemeUpdate.mjs.map +1 -0
- package/dist/esm/views/ThemeUpdate.native.js +53 -0
- package/dist/esm/views/ThemeUpdate.native.js.map +1 -0
- package/dist/esm/views/View.mjs +9 -3
- package/dist/esm/views/View.mjs.map +1 -1
- package/dist/esm/views/View.native.js +9 -3
- package/dist/esm/views/View.native.js.map +1 -1
- package/internal-runtime/index.cjs +2 -0
- package/internal-runtime/index.js +4 -0
- package/internal-runtime/index.native.js +2 -0
- package/package.json +71 -18
- package/reset.css +15 -12
- package/src/_withNativeStyle.tsx +84 -0
- package/src/_withStableStyle.tsx +61 -43
- package/src/config.ts +34 -36
- package/src/contexts/ComponentContext.tsx +25 -8
- package/src/createComponent.tsx +628 -265
- package/src/createStyledHOC.tsx +137 -0
- package/src/createTamagui.ts +181 -92
- package/src/createTokens.ts +16 -0
- package/src/createVariable.ts +17 -12
- package/src/createVariables.ts +5 -17
- package/src/dom/adapters.ts +99 -0
- package/src/dom/contract.ts +60 -0
- package/src/dom/domEventProps.native.ts +40 -0
- package/src/dom/html.native.tsx +1412 -0
- package/src/dom/html.tsx +887 -0
- package/src/dom/htmlRuntime.native.tsx +230 -0
- package/src/dom/index.native.ts +28 -0
- package/src/dom/index.ts +16 -0
- package/src/dom/primitives.native.tsx +658 -0
- package/src/dom/standalone.ts +107 -0
- package/src/dom/standaloneHtml.ts +104 -0
- package/src/dom/styleTypes.ts +620 -0
- package/src/eventDetails.ts +85 -0
- package/src/eventHandling.native.ts +16 -16
- package/src/helpers/borderComponents.ts +62 -0
- package/src/helpers/componentDisplayName.ts +3 -0
- package/src/helpers/configVariables.ts +64 -0
- package/src/helpers/createDesignSystem.ts +127 -89
- package/src/helpers/createStyledContext.tsx +85 -43
- package/src/helpers/defaultAnimationDriver.tsx +0 -5
- package/src/helpers/expandStyle.ts +49 -2
- package/src/helpers/extractPseudoState.ts +32 -0
- package/src/helpers/fluid.ts +66 -0
- package/src/helpers/formatDiagnostic.ts +69 -0
- package/src/helpers/getCSSStylesAtomic.native.ts +7 -3
- package/src/helpers/getCSSStylesAtomic.ts +306 -166
- package/src/helpers/getCSSStylesAtomicCompiled.ts +21 -0
- package/src/helpers/getDynamicVal.ts +4 -0
- package/src/helpers/getExpandedShorthands.ts +0 -17
- package/src/helpers/getSplitStyles.tsx +3231 -1599
- package/src/helpers/getThemeCSSRules.ts +16 -1
- package/src/helpers/grammarConfig.ts +369 -0
- package/src/helpers/insertStyleRule.tsx +109 -24
- package/src/helpers/isObj.ts +8 -0
- package/src/helpers/isTamaguiComponent.tsx +2 -5
- package/src/helpers/isTamaguiElement.tsx +2 -3
- package/src/helpers/log.ts +12 -11
- package/src/helpers/matchMedia.native.ts +16 -1
- package/src/helpers/mediaState.ts +18 -32
- package/src/helpers/mergeProps.ts +2 -32
- package/src/helpers/mergeVariants.ts +80 -21
- package/src/helpers/nativeOnlyProps.ts +0 -1
- package/src/helpers/nativeStyleEngine.ts +385 -0
- package/src/helpers/nativeTransitionTarget.native.ts +22 -0
- package/src/helpers/nativeTransitionTarget.ts +6 -0
- package/src/helpers/normalizeColor.native.ts +2 -3
- package/src/helpers/normalizeColor.ts +4 -14
- package/src/helpers/normalizeShadow.native.ts +1 -1
- package/src/helpers/normalizeStyle.ts +26 -15
- package/src/helpers/normalizeValueWithProperty.ts +18 -11
- package/src/helpers/noteOnce.ts +9 -0
- package/src/helpers/parseBorderShorthand.native.ts +23 -45
- package/src/helpers/parseNativeStyle.native.ts +238 -0
- package/src/helpers/parseNativeTransform.native.ts +35 -0
- package/src/helpers/parseOutlineShorthand.native.ts +9 -40
- package/src/helpers/proxyThemeToParents.ts +11 -1
- package/src/helpers/registerCSSVariable.ts +52 -4
- package/src/helpers/resolveAnimationDriver.ts +16 -13
- package/src/helpers/resolveNativeUnits.native.ts +187 -0
- package/src/helpers/resolveNativeUnits.ts +10 -0
- package/src/helpers/resolveRem.native.ts +25 -26
- package/src/helpers/resolveRem.ts +1 -1
- package/src/helpers/resolveSafeArea.native.ts +90 -10
- package/src/helpers/resolveSafeArea.ts +46 -7
- package/src/helpers/resolveSafeAreaVariable.native.ts +28 -0
- package/src/helpers/resolveSafeAreaVariable.ts +10 -0
- package/src/helpers/resolveVariableValue.ts +31 -0
- package/src/helpers/resolveVariantStyle.ts +77 -0
- package/src/helpers/skipProps.ts +11 -3
- package/src/helpers/splitStyleProps.ts +166 -0
- package/src/helpers/styleFrontend.ts +143 -0
- package/src/helpers/styleProvenance.ts +17 -2
- package/src/helpers/styleStaticConfig.ts +21 -0
- package/src/helpers/styleStaticConfigCore.ts +110 -0
- package/src/helpers/styleToCSS.native.ts +1 -0
- package/src/helpers/styleToCSS.ts +43 -0
- package/src/helpers/styledDynamic.ts +192 -0
- package/src/helpers/subscribeToContextGroup.tsx +46 -7
- package/src/helpers/themeRef.ts +34 -0
- package/src/helpers/themeUpdateState.ts +27 -0
- package/src/helpers/themes.ts +9 -10
- package/src/helpers/tokenCategories.ts +54 -0
- package/src/helpers/transformsToString.ts +18 -16
- package/src/helpers/variableValue.ts +50 -0
- package/src/helpers/variables.ts +856 -0
- package/src/helpers/warnOnce.ts +47 -0
- package/src/helpers/webPropsToSkip.native.ts +7 -8
- package/src/helpers/wrapStyleTags.tsx +4 -2
- package/src/hooks/getThemeProxied.ts +139 -101
- package/src/hooks/isOptimizedForFirstRender.native.ts +7 -0
- package/src/hooks/isOptimizedForFirstRender.ts +7 -0
- package/src/hooks/useAnimationDriver.ts +56 -0
- package/src/hooks/useComponentState.ts +128 -174
- package/src/hooks/useMedia.tsx +258 -131
- package/src/hooks/usePortalThemeState.ts +34 -0
- package/src/hooks/useSplitStyles.tsx +41 -0
- package/src/hooks/useStyle.ts +10 -0
- package/src/hooks/useTheme.tsx +20 -7
- package/src/hooks/useThemeState.ts +185 -332
- package/src/index.ts +328 -70
- package/src/insertFont.ts +9 -5
- package/src/interfaces/CSSColorNames.tsx +152 -149
- package/src/interfaces/RNExclusiveTypes.ts +2 -1
- package/src/interfaces/TamaguiComponentEvents.tsx +0 -1
- package/src/interfaces/TamaguiComponentPropsBaseBase.tsx +2 -4
- package/src/internal-runtime.ts +169 -0
- package/src/internalRuntimeTypes.ts +18 -0
- package/src/setupHooks.ts +9 -1
- package/src/setupReactNative.ts +7 -30
- package/src/static-resolve.ts +403 -0
- package/src/style.ts +97 -0
- package/src/styled.tsx +290 -416
- package/src/theme-update.ts +2 -0
- package/src/types.tsx +813 -610
- package/src/views/ConfigRevisionCheck.tsx +55 -0
- package/src/views/SafeAreaTracker.native.tsx +10 -0
- package/src/views/SafeAreaTracker.tsx +7 -0
- package/src/views/Slot.tsx +3 -2
- package/src/views/TamaguiProvider.tsx +36 -24
- package/src/views/Text.tsx +33 -23
- package/src/views/Theme.tsx +62 -46
- package/src/views/ThemeDebug.tsx +0 -2
- package/src/views/ThemeProvider.tsx +6 -5
- package/src/views/ThemeUpdate.tsx +90 -0
- package/src/views/View.tsx +12 -4
- package/types/Tamagui.d.ts.map +1 -1
- package/types/_withNativeStyle.d.ts +5 -0
- package/types/_withNativeStyle.d.ts.map +1 -0
- package/types/_withStableStyle.d.ts +1 -1
- package/types/_withStableStyle.d.ts.map +1 -1
- package/types/config.d.ts +22 -32
- 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/createFont.d.ts.map +1 -1
- package/types/createStyledHOC.d.ts +4 -0
- package/types/createStyledHOC.d.ts.map +1 -0
- package/types/createTamagui.d.ts +2 -1
- package/types/createTamagui.d.ts.map +1 -1
- package/types/createTokens.d.ts.map +1 -1
- package/types/createVariable.d.ts +0 -2
- package/types/createVariable.d.ts.map +1 -1
- package/types/createVariables.d.ts.map +1 -1
- package/types/dom/adapters.d.ts +42 -0
- package/types/dom/adapters.d.ts.map +1 -0
- package/types/dom/contract.d.ts +48 -0
- package/types/dom/contract.d.ts.map +1 -0
- package/types/dom/domEventProps.native.d.ts +7 -0
- package/types/dom/domEventProps.native.d.ts.map +1 -0
- package/types/dom/html.d.ts +58 -0
- package/types/dom/html.d.ts.map +1 -0
- package/types/dom/html.native.d.ts +67 -0
- package/types/dom/html.native.d.ts.map +1 -0
- package/types/dom/htmlRuntime.native.d.ts +63 -0
- package/types/dom/htmlRuntime.native.d.ts.map +1 -0
- package/types/dom/index.d.ts +11 -0
- package/types/dom/index.d.ts.map +1 -0
- package/types/dom/index.native.d.ts +12 -0
- package/types/dom/index.native.d.ts.map +1 -0
- package/types/dom/primitives.native.d.ts +43 -0
- package/types/dom/primitives.native.d.ts.map +1 -0
- package/types/dom/standalone.d.ts +89 -0
- package/types/dom/standalone.d.ts.map +1 -0
- package/types/dom/standaloneHtml.d.ts +67 -0
- package/types/dom/standaloneHtml.d.ts.map +1 -0
- package/types/dom/styleTypes.d.ts +486 -0
- package/types/dom/styleTypes.d.ts.map +1 -0
- package/types/eventDetails.d.ts +12 -0
- package/types/eventDetails.d.ts.map +1 -0
- package/types/helpers/borderComponents.d.ts +10 -0
- package/types/helpers/borderComponents.d.ts.map +1 -0
- package/types/helpers/componentDisplayName.d.ts +2 -0
- package/types/helpers/componentDisplayName.d.ts.map +1 -0
- package/types/helpers/configVariables.d.ts +3 -0
- package/types/helpers/configVariables.d.ts.map +1 -0
- package/types/helpers/createDesignSystem.d.ts +24 -6
- package/types/helpers/createDesignSystem.d.ts.map +1 -1
- package/types/helpers/createStyledContext.d.ts +29 -2
- package/types/helpers/createStyledContext.d.ts.map +1 -1
- package/types/helpers/defaultAnimationDriver.d.ts.map +1 -1
- package/types/helpers/defaultOffset.d.ts.map +1 -1
- package/types/helpers/expandStyle.d.ts.map +1 -1
- package/types/helpers/extractPseudoState.d.ts +14 -0
- package/types/helpers/extractPseudoState.d.ts.map +1 -0
- package/types/helpers/fluid.d.ts +21 -0
- package/types/helpers/fluid.d.ts.map +1 -0
- package/types/helpers/formatDiagnostic.d.ts +2 -0
- package/types/helpers/formatDiagnostic.d.ts.map +1 -0
- package/types/helpers/getCSSStylesAtomic.d.ts +29 -6
- package/types/helpers/getCSSStylesAtomic.d.ts.map +1 -1
- package/types/helpers/getCSSStylesAtomic.native.d.ts +11 -3
- package/types/helpers/getCSSStylesAtomic.native.d.ts.map +1 -1
- package/types/helpers/getCSSStylesAtomicCompiled.d.ts +9 -0
- package/types/helpers/getCSSStylesAtomicCompiled.d.ts.map +1 -0
- package/types/helpers/getDynamicVal.d.ts +1 -1
- package/types/helpers/getDynamicVal.d.ts.map +1 -1
- package/types/helpers/getExpandedShorthands.d.ts +0 -5
- package/types/helpers/getExpandedShorthands.d.ts.map +1 -1
- package/types/helpers/getShorthandValue.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts +14 -8
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/getThemeCSSRules.d.ts.map +1 -1
- package/types/helpers/grammarConfig.d.ts +41 -0
- package/types/helpers/grammarConfig.d.ts.map +1 -0
- package/types/helpers/insertStyleRule.d.ts +4 -1
- package/types/helpers/insertStyleRule.d.ts.map +1 -1
- package/types/helpers/isObj.d.ts +1 -0
- package/types/helpers/isObj.d.ts.map +1 -1
- package/types/helpers/isTamaguiComponent.d.ts +1 -1
- package/types/helpers/isTamaguiComponent.d.ts.map +1 -1
- package/types/helpers/isTamaguiElement.d.ts +1 -1
- package/types/helpers/isTamaguiElement.d.ts.map +1 -1
- package/types/helpers/log.d.ts.map +1 -1
- package/types/helpers/matchMedia.d.ts +1 -1
- package/types/helpers/matchMedia.native.d.ts.map +1 -1
- package/types/helpers/mediaState.d.ts +5 -2
- package/types/helpers/mediaState.d.ts.map +1 -1
- package/types/helpers/mergeProps.d.ts +0 -2
- package/types/helpers/mergeProps.d.ts.map +1 -1
- package/types/helpers/mergeVariants.d.ts +1 -1
- package/types/helpers/mergeVariants.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/nativeStyleEngine.d.ts +77 -0
- package/types/helpers/nativeStyleEngine.d.ts.map +1 -0
- package/types/helpers/nativeTransitionTarget.d.ts +3 -0
- package/types/helpers/nativeTransitionTarget.d.ts.map +1 -0
- package/types/helpers/nativeTransitionTarget.native.d.ts +3 -0
- package/types/helpers/nativeTransitionTarget.native.d.ts.map +1 -0
- package/types/helpers/normalizeColor.d.ts +0 -6
- package/types/helpers/normalizeColor.d.ts.map +1 -1
- package/types/helpers/normalizeColor.native.d.ts.map +1 -1
- package/types/helpers/normalizeShadow.d.ts.map +1 -1
- package/types/helpers/normalizeShadow.native.d.ts.map +1 -1
- package/types/helpers/normalizeStyle.d.ts +2 -2
- package/types/helpers/normalizeStyle.d.ts.map +1 -1
- package/types/helpers/normalizeValueWithProperty.d.ts.map +1 -1
- package/types/helpers/noteOnce.d.ts +2 -0
- package/types/helpers/noteOnce.d.ts.map +1 -0
- package/types/helpers/parseBorderShorthand.native.d.ts +1 -0
- package/types/helpers/parseBorderShorthand.native.d.ts.map +1 -1
- package/types/helpers/parseNativeStyle.native.d.ts +14 -0
- package/types/helpers/parseNativeStyle.native.d.ts.map +1 -0
- package/types/helpers/parseNativeTransform.native.d.ts +2 -0
- package/types/helpers/parseNativeTransform.native.d.ts.map +1 -0
- package/types/helpers/parseOutlineShorthand.native.d.ts.map +1 -1
- package/types/helpers/proxyThemeToParents.d.ts +1 -1
- package/types/helpers/proxyThemeToParents.d.ts.map +1 -1
- package/types/helpers/registerCSSVariable.d.ts +12 -0
- package/types/helpers/registerCSSVariable.d.ts.map +1 -1
- package/types/helpers/resolveAnimationDriver.d.ts +4 -4
- package/types/helpers/resolveAnimationDriver.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 +15 -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/resolveSafeArea.d.ts +1 -1
- package/types/helpers/resolveSafeArea.d.ts.map +1 -1
- package/types/helpers/resolveSafeArea.native.d.ts +2 -1
- package/types/helpers/resolveSafeArea.native.d.ts.map +1 -1
- package/types/helpers/resolveSafeAreaVariable.d.ts +3 -0
- package/types/helpers/resolveSafeAreaVariable.d.ts.map +1 -0
- package/types/helpers/resolveSafeAreaVariable.native.d.ts +3 -0
- package/types/helpers/resolveSafeAreaVariable.native.d.ts.map +1 -0
- package/types/helpers/resolveVariableValue.d.ts +3 -0
- package/types/helpers/resolveVariableValue.d.ts.map +1 -0
- package/types/helpers/resolveVariantStyle.d.ts +3 -0
- package/types/helpers/resolveVariantStyle.d.ts.map +1 -0
- package/types/helpers/setElementProps.d.ts.map +1 -1
- package/types/helpers/skipProps.d.ts +5 -2
- package/types/helpers/skipProps.d.ts.map +1 -1
- package/types/helpers/sortString.d.ts +1 -1
- package/types/helpers/sortString.d.ts.map +1 -1
- package/types/helpers/splitStyleProps.d.ts +44 -0
- package/types/helpers/splitStyleProps.d.ts.map +1 -0
- package/types/helpers/styleFrontend.d.ts +102 -0
- package/types/helpers/styleFrontend.d.ts.map +1 -0
- package/types/helpers/styleProvenance.d.ts +14 -1
- package/types/helpers/styleProvenance.d.ts.map +1 -1
- package/types/helpers/styleStaticConfig.d.ts +14 -0
- package/types/helpers/styleStaticConfig.d.ts.map +1 -0
- package/types/helpers/styleStaticConfigCore.d.ts +4 -0
- package/types/helpers/styleStaticConfigCore.d.ts.map +1 -0
- package/types/helpers/styleToCSS.d.ts +2 -0
- package/types/helpers/styleToCSS.d.ts.map +1 -0
- package/types/helpers/styleToCSS.native.d.ts +2 -0
- package/types/helpers/styleToCSS.native.d.ts.map +1 -0
- package/types/helpers/styledDynamic.d.ts +18 -0
- package/types/helpers/styledDynamic.d.ts.map +1 -0
- package/types/helpers/subscribeToContextGroup.d.ts +1 -0
- package/types/helpers/subscribeToContextGroup.d.ts.map +1 -1
- package/types/helpers/themeRef.d.ts +22 -0
- package/types/helpers/themeRef.d.ts.map +1 -0
- package/types/helpers/themeUpdateState.d.ts +23 -0
- package/types/helpers/themeUpdateState.d.ts.map +1 -0
- package/types/helpers/themes.d.ts.map +1 -1
- package/types/helpers/tokenCategories.d.ts +4 -0
- package/types/helpers/tokenCategories.d.ts.map +1 -0
- package/types/helpers/transformsToString.d.ts.map +1 -1
- package/types/helpers/variableValue.d.ts +4 -0
- package/types/helpers/variableValue.d.ts.map +1 -0
- package/types/helpers/variables.d.ts +73 -0
- package/types/helpers/variables.d.ts.map +1 -0
- package/types/helpers/warnOnce.d.ts +20 -0
- package/types/helpers/warnOnce.d.ts.map +1 -0
- package/types/helpers/webPropsToSkip.native.d.ts +68 -62
- package/types/helpers/webPropsToSkip.native.d.ts.map +1 -1
- package/types/helpers/wrapStyleTags.d.ts +1 -1
- package/types/helpers/wrapStyleTags.d.ts.map +1 -1
- package/types/hooks/getThemeProxied.d.ts +1 -1
- package/types/hooks/getThemeProxied.d.ts.map +1 -1
- package/types/hooks/isOptimizedForFirstRender.d.ts +2 -0
- package/types/hooks/isOptimizedForFirstRender.d.ts.map +1 -0
- package/types/hooks/isOptimizedForFirstRender.native.d.ts +2 -0
- package/types/hooks/isOptimizedForFirstRender.native.d.ts.map +1 -0
- package/types/hooks/useAnimationDriver.d.ts +7 -0
- package/types/hooks/useAnimationDriver.d.ts.map +1 -0
- package/types/hooks/useComponentState.d.ts +6 -4
- package/types/hooks/useComponentState.d.ts.map +1 -1
- package/types/hooks/useMedia.d.ts +14 -12
- package/types/hooks/useMedia.d.ts.map +1 -1
- package/types/hooks/usePortalThemeState.d.ts +15 -0
- package/types/hooks/usePortalThemeState.d.ts.map +1 -0
- package/types/hooks/useSplitStyles.d.ts +3 -0
- package/types/hooks/useSplitStyles.d.ts.map +1 -0
- package/types/hooks/useStyle.d.ts +4 -0
- package/types/hooks/useStyle.d.ts.map +1 -0
- package/types/hooks/useTheme.d.ts +1 -1
- package/types/hooks/useTheme.d.ts.map +1 -1
- package/types/hooks/useThemeState.d.ts +13 -3
- package/types/hooks/useThemeState.d.ts.map +1 -1
- package/types/index.d.ts +63 -70
- package/types/index.d.ts.map +1 -1
- package/types/inject-styles.d.ts.map +1 -1
- package/types/insertFont.d.ts.map +1 -1
- package/types/interfaces/CSSColorNames.d.ts +2 -1
- package/types/interfaces/CSSColorNames.d.ts.map +1 -1
- package/types/interfaces/RNExclusiveTypes.d.ts +2 -2
- package/types/interfaces/RNExclusiveTypes.d.ts.map +1 -1
- package/types/interfaces/TamaguiComponentEvents.d.ts +0 -1
- package/types/interfaces/TamaguiComponentEvents.d.ts.map +1 -1
- package/types/interfaces/TamaguiComponentPropsBaseBase.d.ts +2 -4
- package/types/interfaces/TamaguiComponentPropsBaseBase.d.ts.map +1 -1
- package/types/internal-runtime.d.ts +56 -0
- package/types/internal-runtime.d.ts.map +1 -0
- package/types/internalRuntimeTypes.d.ts +11 -0
- package/types/internalRuntimeTypes.d.ts.map +1 -0
- package/types/setupHooks.d.ts +1 -1
- package/types/setupHooks.d.ts.map +1 -1
- package/types/setupReactNative.d.ts +2 -3
- package/types/setupReactNative.d.ts.map +1 -1
- package/types/static-resolve.d.ts +79 -0
- package/types/static-resolve.d.ts.map +1 -0
- package/types/style.d.ts +18 -0
- package/types/style.d.ts.map +1 -0
- package/types/styled.d.ts +41 -41
- package/types/styled.d.ts.map +1 -1
- package/types/theme-update.d.ts +3 -0
- package/types/theme-update.d.ts.map +1 -0
- package/types/types.d.ts +575 -309
- package/types/types.d.ts.map +1 -1
- package/types/views/ConfigRevisionCheck.d.ts +6 -0
- package/types/views/ConfigRevisionCheck.d.ts.map +1 -0
- package/types/views/Configuration.d.ts +1 -1
- package/types/views/Configuration.d.ts.map +1 -1
- package/types/views/FontLanguage.d.ts +4 -4
- package/types/views/FontLanguage.d.ts.map +1 -1
- package/types/views/FontLanguage.native.d.ts +2 -1
- package/types/views/FontLanguage.native.d.ts.map +1 -1
- package/types/views/SafeAreaTracker.d.ts +3 -0
- package/types/views/SafeAreaTracker.d.ts.map +1 -0
- package/types/views/SafeAreaTracker.native.d.ts +3 -0
- package/types/views/SafeAreaTracker.native.d.ts.map +1 -0
- package/types/views/Slot.d.ts +7 -7
- package/types/views/Slot.d.ts.map +1 -1
- package/types/views/TamaguiProvider.d.ts +2 -1
- package/types/views/TamaguiProvider.d.ts.map +1 -1
- package/types/views/TamaguiRoot.d.ts +1 -1
- package/types/views/TamaguiRoot.d.ts.map +1 -1
- package/types/views/Text.d.ts +6 -2
- package/types/views/Text.d.ts.map +1 -1
- package/types/views/Theme.d.ts +3 -8
- package/types/views/Theme.d.ts.map +1 -1
- package/types/views/ThemeDebug.d.ts.map +1 -1
- package/types/views/ThemeProvider.d.ts +1 -1
- package/types/views/ThemeProvider.d.ts.map +1 -1
- package/types/views/ThemeUpdate.d.ts +15 -0
- package/types/views/ThemeUpdate.d.ts.map +1 -0
- package/types/views/View.d.ts +8 -2
- package/types/views/View.d.ts.map +1 -1
- package/.turbo/turbo-build.log +0 -2
- package/.turbo/turbo-test$colon$web.log +0 -25
- package/dist/cjs/animationDriverTypes.test-d.cjs +0 -77
- package/dist/cjs/animationDriverTypes.test-d.native.js +0 -80
- package/dist/cjs/animationDriverTypes.test-d.native.js.map +0 -1
- package/dist/cjs/constants/accessibilityDirectMap.cjs +0 -36
- package/dist/cjs/constants/accessibilityDirectMap.native.js +0 -39
- package/dist/cjs/constants/accessibilityDirectMap.native.js.map +0 -1
- package/dist/cjs/helpers/createMediaStyle.cjs +0 -127
- package/dist/cjs/helpers/createMediaStyle.native.js +0 -140
- package/dist/cjs/helpers/createMediaStyle.native.js.map +0 -1
- package/dist/cjs/helpers/getDefaultProps.cjs +0 -43
- package/dist/cjs/helpers/getDefaultProps.native.js +0 -47
- package/dist/cjs/helpers/getDefaultProps.native.js.map +0 -1
- package/dist/cjs/helpers/getFontLanguage.cjs +0 -28
- package/dist/cjs/helpers/getFontLanguage.native.js +0 -33
- package/dist/cjs/helpers/getFontLanguage.native.js.map +0 -1
- package/dist/cjs/helpers/getGroupPropParts.cjs +0 -54
- package/dist/cjs/helpers/getGroupPropParts.native.js +0 -59
- package/dist/cjs/helpers/getGroupPropParts.native.js.map +0 -1
- package/dist/cjs/helpers/getTokenForKey.cjs +0 -174
- package/dist/cjs/helpers/getTokenForKey.native.js +0 -186
- package/dist/cjs/helpers/getTokenForKey.native.js.map +0 -1
- package/dist/cjs/helpers/getVariantExtras.cjs +0 -85
- package/dist/cjs/helpers/getVariantExtras.native.js +0 -89
- package/dist/cjs/helpers/getVariantExtras.native.js.map +0 -1
- package/dist/cjs/helpers/isActivePlatform.cjs +0 -40
- package/dist/cjs/helpers/isActivePlatform.native.js +0 -43
- package/dist/cjs/helpers/isActivePlatform.native.js.map +0 -1
- package/dist/cjs/helpers/isActiveTheme.cjs +0 -31
- package/dist/cjs/helpers/isActiveTheme.native.js +0 -34
- package/dist/cjs/helpers/isActiveTheme.native.js.map +0 -1
- package/dist/cjs/helpers/normalizeStylePropKeys.cjs +0 -28
- package/dist/cjs/helpers/normalizeStylePropKeys.native.js +0 -42
- package/dist/cjs/helpers/normalizeStylePropKeys.native.js.map +0 -1
- package/dist/cjs/helpers/parseNativeStyle.cjs +0 -167
- package/dist/cjs/helpers/platformResolveValue.cjs +0 -38
- package/dist/cjs/helpers/platformResolveValue.native.js +0 -74
- package/dist/cjs/helpers/platformResolveValue.native.js.map +0 -1
- package/dist/cjs/helpers/propMapper.cjs +0 -281
- package/dist/cjs/helpers/propMapper.native.js +0 -381
- package/dist/cjs/helpers/propMapper.native.js.map +0 -1
- package/dist/cjs/helpers/proxyThemeVariables.cjs +0 -38
- package/dist/cjs/helpers/proxyThemeVariables.native.js +0 -43
- package/dist/cjs/helpers/proxyThemeVariables.native.js.map +0 -1
- package/dist/cjs/helpers/pseudoDescriptors.cjs +0 -82
- package/dist/cjs/helpers/pseudoDescriptors.native.js +0 -85
- package/dist/cjs/helpers/pseudoDescriptors.native.js.map +0 -1
- package/dist/cjs/helpers/pseudoTransitions.cjs +0 -83
- package/dist/cjs/helpers/pseudoTransitions.native.js +0 -88
- package/dist/cjs/helpers/pseudoTransitions.native.js.map +0 -1
- package/dist/cjs/helpers/resolveCompoundTokens.cjs +0 -41
- package/dist/cjs/helpers/resolveCompoundTokens.native.js +0 -44
- package/dist/cjs/helpers/resolveCompoundTokens.native.js.map +0 -1
- package/dist/cjs/helpers/themeable.cjs +0 -114
- package/dist/cjs/helpers/themeable.native.js +0 -119
- package/dist/cjs/helpers/themeable.native.js.map +0 -1
- package/dist/cjs/helpers/useRenderElement.cjs +0 -53
- package/dist/cjs/helpers/useRenderElement.native.js +0 -60
- package/dist/cjs/helpers/useRenderElement.native.js.map +0 -1
- package/dist/cjs/hooks/useProps.cjs +0 -120
- package/dist/cjs/hooks/useProps.native.js +0 -125
- package/dist/cjs/hooks/useProps.native.js.map +0 -1
- package/dist/cjs/opacityModifier.test-d.cjs +0 -36
- package/dist/cjs/opacityModifier.test-d.native.js +0 -39
- package/dist/cjs/opacityModifier.test-d.native.js.map +0 -1
- package/dist/cjs/styledHtml.test-d.cjs +0 -187
- package/dist/cjs/styledHtml.test-d.native.js +0 -190
- package/dist/cjs/styledHtml.test-d.native.js.map +0 -1
- package/dist/cjs/styledNonStyleProps.test-d.cjs +0 -63
- package/dist/cjs/styledNonStyleProps.test-d.native.js +0 -66
- package/dist/cjs/styledNonStyleProps.test-d.native.js.map +0 -1
- package/dist/esm/animationDriverTypes.test-d.mjs +0 -78
- package/dist/esm/animationDriverTypes.test-d.mjs.map +0 -1
- package/dist/esm/animationDriverTypes.test-d.native.js +0 -78
- package/dist/esm/animationDriverTypes.test-d.native.js.map +0 -1
- package/dist/esm/constants/accessibilityDirectMap.mjs +0 -7
- package/dist/esm/constants/accessibilityDirectMap.mjs.map +0 -1
- package/dist/esm/constants/accessibilityDirectMap.native.js +0 -7
- package/dist/esm/constants/accessibilityDirectMap.native.js.map +0 -1
- package/dist/esm/helpers/createMediaStyle.mjs +0 -100
- package/dist/esm/helpers/createMediaStyle.mjs.map +0 -1
- package/dist/esm/helpers/createMediaStyle.native.js +0 -110
- package/dist/esm/helpers/createMediaStyle.native.js.map +0 -1
- package/dist/esm/helpers/getDefaultProps.mjs +0 -18
- package/dist/esm/helpers/getDefaultProps.mjs.map +0 -1
- package/dist/esm/helpers/getDefaultProps.native.js +0 -19
- package/dist/esm/helpers/getDefaultProps.native.js.map +0 -1
- package/dist/esm/helpers/getFontLanguage.mjs +0 -3
- package/dist/esm/helpers/getFontLanguage.mjs.map +0 -1
- package/dist/esm/helpers/getFontLanguage.native.js +0 -5
- package/dist/esm/helpers/getFontLanguage.native.js.map +0 -1
- package/dist/esm/helpers/getGroupPropParts.mjs +0 -29
- package/dist/esm/helpers/getGroupPropParts.mjs.map +0 -1
- package/dist/esm/helpers/getGroupPropParts.native.js +0 -31
- package/dist/esm/helpers/getGroupPropParts.native.js.map +0 -1
- package/dist/esm/helpers/getTokenForKey.mjs +0 -146
- package/dist/esm/helpers/getTokenForKey.mjs.map +0 -1
- package/dist/esm/helpers/getTokenForKey.native.js +0 -155
- package/dist/esm/helpers/getTokenForKey.native.js.map +0 -1
- package/dist/esm/helpers/getVariantExtras.mjs +0 -59
- package/dist/esm/helpers/getVariantExtras.mjs.map +0 -1
- package/dist/esm/helpers/getVariantExtras.native.js +0 -60
- package/dist/esm/helpers/getVariantExtras.native.js.map +0 -1
- package/dist/esm/helpers/isActivePlatform.mjs +0 -14
- package/dist/esm/helpers/isActivePlatform.mjs.map +0 -1
- package/dist/esm/helpers/isActivePlatform.native.js +0 -14
- package/dist/esm/helpers/isActivePlatform.native.js.map +0 -1
- package/dist/esm/helpers/isActiveTheme.mjs +0 -6
- package/dist/esm/helpers/isActiveTheme.mjs.map +0 -1
- package/dist/esm/helpers/isActiveTheme.native.js +0 -6
- package/dist/esm/helpers/isActiveTheme.native.js.map +0 -1
- package/dist/esm/helpers/normalizeStylePropKeys.mjs +0 -3
- package/dist/esm/helpers/normalizeStylePropKeys.mjs.map +0 -1
- package/dist/esm/helpers/normalizeStylePropKeys.native.js +0 -14
- package/dist/esm/helpers/normalizeStylePropKeys.native.js.map +0 -1
- package/dist/esm/helpers/parseNativeStyle.mjs +0 -142
- package/dist/esm/helpers/parseNativeStyle.mjs.map +0 -1
- package/dist/esm/helpers/platformResolveValue.mjs +0 -13
- package/dist/esm/helpers/platformResolveValue.mjs.map +0 -1
- package/dist/esm/helpers/platformResolveValue.native.js +0 -46
- package/dist/esm/helpers/platformResolveValue.native.js.map +0 -1
- package/dist/esm/helpers/propMapper.mjs +0 -251
- package/dist/esm/helpers/propMapper.mjs.map +0 -1
- package/dist/esm/helpers/propMapper.native.js +0 -350
- package/dist/esm/helpers/propMapper.native.js.map +0 -1
- package/dist/esm/helpers/proxyThemeVariables.mjs +0 -13
- package/dist/esm/helpers/proxyThemeVariables.mjs.map +0 -1
- package/dist/esm/helpers/proxyThemeVariables.native.js +0 -15
- package/dist/esm/helpers/proxyThemeVariables.native.js.map +0 -1
- package/dist/esm/helpers/pseudoDescriptors.mjs +0 -54
- package/dist/esm/helpers/pseudoDescriptors.mjs.map +0 -1
- package/dist/esm/helpers/pseudoDescriptors.native.js +0 -54
- package/dist/esm/helpers/pseudoDescriptors.native.js.map +0 -1
- package/dist/esm/helpers/pseudoTransitions.mjs +0 -57
- package/dist/esm/helpers/pseudoTransitions.mjs.map +0 -1
- package/dist/esm/helpers/pseudoTransitions.native.js +0 -59
- package/dist/esm/helpers/pseudoTransitions.native.js.map +0 -1
- package/dist/esm/helpers/resolveCompoundTokens.mjs +0 -16
- package/dist/esm/helpers/resolveCompoundTokens.mjs.map +0 -1
- package/dist/esm/helpers/resolveCompoundTokens.native.js +0 -16
- package/dist/esm/helpers/resolveCompoundTokens.native.js.map +0 -1
- package/dist/esm/helpers/themeable.mjs +0 -79
- package/dist/esm/helpers/themeable.mjs.map +0 -1
- package/dist/esm/helpers/themeable.native.js +0 -80
- package/dist/esm/helpers/themeable.native.js.map +0 -1
- package/dist/esm/helpers/useRenderElement.mjs +0 -26
- package/dist/esm/helpers/useRenderElement.mjs.map +0 -1
- package/dist/esm/helpers/useRenderElement.native.js +0 -31
- package/dist/esm/helpers/useRenderElement.native.js.map +0 -1
- package/dist/esm/hooks/useProps.mjs +0 -82
- package/dist/esm/hooks/useProps.mjs.map +0 -1
- package/dist/esm/hooks/useProps.native.js +0 -84
- package/dist/esm/hooks/useProps.native.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js.map +0 -1
- package/dist/esm/interfaces/GetRef.mjs.map +0 -1
- package/dist/esm/interfaces/GetRef.native.js.map +0 -1
- package/dist/esm/interfaces/RNExclusiveTypes.mjs.map +0 -1
- package/dist/esm/interfaces/RNExclusiveTypes.native.js.map +0 -1
- package/dist/esm/interfaces/TamaguiComponentEvents.mjs.map +0 -1
- package/dist/esm/interfaces/TamaguiComponentEvents.native.js.map +0 -1
- package/dist/esm/interfaces/TamaguiComponentPropsBaseBase.mjs.map +0 -1
- package/dist/esm/interfaces/TamaguiComponentPropsBaseBase.native.js.map +0 -1
- package/dist/esm/opacityModifier.test-d.mjs +0 -37
- package/dist/esm/opacityModifier.test-d.mjs.map +0 -1
- package/dist/esm/opacityModifier.test-d.native.js +0 -37
- package/dist/esm/opacityModifier.test-d.native.js.map +0 -1
- package/dist/esm/styledHtml.test-d.mjs +0 -188
- package/dist/esm/styledHtml.test-d.mjs.map +0 -1
- package/dist/esm/styledHtml.test-d.native.js +0 -188
- package/dist/esm/styledHtml.test-d.native.js.map +0 -1
- package/dist/esm/styledNonStyleProps.test-d.mjs +0 -64
- package/dist/esm/styledNonStyleProps.test-d.mjs.map +0 -1
- package/dist/esm/styledNonStyleProps.test-d.native.js +0 -64
- package/dist/esm/styledNonStyleProps.test-d.native.js.map +0 -1
- package/dist/esm/type-utils.mjs.map +0 -1
- package/dist/esm/type-utils.native.js.map +0 -1
- package/src/animationDriverTypes.test-d.ts +0 -332
- package/src/constants/accessibilityDirectMap.native.tsx +0 -10
- package/src/constants/accessibilityDirectMap.tsx +0 -11
- package/src/helpers/createMediaStyle.ts +0 -167
- package/src/helpers/getDefaultProps.ts +0 -28
- package/src/helpers/getFontLanguage.ts +0 -2
- package/src/helpers/getGroupPropParts.ts +0 -46
- package/src/helpers/getTokenForKey.ts +0 -236
- package/src/helpers/getVariantExtras.tsx +0 -68
- package/src/helpers/isActivePlatform.ts +0 -43
- package/src/helpers/isActiveTheme.ts +0 -4
- package/src/helpers/normalizeStylePropKeys.native.ts +0 -12
- package/src/helpers/normalizeStylePropKeys.ts +0 -3
- package/src/helpers/parseNativeStyle.ts +0 -193
- package/src/helpers/platformResolveValue.native.ts +0 -75
- package/src/helpers/platformResolveValue.ts +0 -26
- package/src/helpers/propMapper.ts +0 -459
- package/src/helpers/proxyThemeVariables.tsx +0 -13
- package/src/helpers/pseudoDescriptors.ts +0 -74
- package/src/helpers/pseudoTransitions.ts +0 -97
- package/src/helpers/resolveCompoundTokens.ts +0 -28
- package/src/helpers/themeable.tsx +0 -104
- package/src/helpers/useRenderElement.tsx +0 -73
- package/src/hooks/useProps.tsx +0 -158
- package/src/opacityModifier.test-d.ts +0 -65
- package/src/styledHtml.test-d.ts +0 -286
- package/src/styledNonStyleProps.test-d.ts +0 -106
- package/tsconfig.json +0 -44
- package/tsconfig.test.json +0 -9
- package/types/constants/accessibilityDirectMap.d.ts +0 -6
- package/types/constants/accessibilityDirectMap.d.ts.map +0 -1
- package/types/constants/accessibilityDirectMap.native.d.ts +0 -6
- package/types/constants/accessibilityDirectMap.native.d.ts.map +0 -1
- package/types/helpers/createMediaStyle.d.ts +0 -5
- package/types/helpers/createMediaStyle.d.ts.map +0 -1
- package/types/helpers/getDefaultProps.d.ts +0 -3
- package/types/helpers/getDefaultProps.d.ts.map +0 -1
- package/types/helpers/getFontLanguage.d.ts +0 -2
- package/types/helpers/getFontLanguage.d.ts.map +0 -1
- package/types/helpers/getGroupPropParts.d.ts +0 -7
- package/types/helpers/getGroupPropParts.d.ts.map +0 -1
- package/types/helpers/getTokenForKey.d.ts +0 -6
- package/types/helpers/getTokenForKey.d.ts.map +0 -1
- package/types/helpers/getVariantExtras.d.ts +0 -4
- package/types/helpers/getVariantExtras.d.ts.map +0 -1
- package/types/helpers/isActivePlatform.d.ts +0 -16
- package/types/helpers/isActivePlatform.d.ts.map +0 -1
- package/types/helpers/isActiveTheme.d.ts +0 -2
- package/types/helpers/isActiveTheme.d.ts.map +0 -1
- package/types/helpers/normalizeStylePropKeys.d.ts +0 -2
- package/types/helpers/normalizeStylePropKeys.d.ts.map +0 -1
- package/types/helpers/normalizeStylePropKeys.native.d.ts +0 -13
- package/types/helpers/normalizeStylePropKeys.native.d.ts.map +0 -1
- package/types/helpers/parseNativeStyle.d.ts +0 -14
- package/types/helpers/parseNativeStyle.d.ts.map +0 -1
- package/types/helpers/platformResolveValue.d.ts +0 -6
- package/types/helpers/platformResolveValue.d.ts.map +0 -1
- package/types/helpers/platformResolveValue.native.d.ts +0 -7
- package/types/helpers/platformResolveValue.native.d.ts.map +0 -1
- package/types/helpers/propMapper.d.ts +0 -5
- package/types/helpers/propMapper.d.ts.map +0 -1
- package/types/helpers/proxyThemeVariables.d.ts +0 -2
- package/types/helpers/proxyThemeVariables.d.ts.map +0 -1
- package/types/helpers/pseudoDescriptors.d.ts +0 -51
- package/types/helpers/pseudoDescriptors.d.ts.map +0 -1
- package/types/helpers/pseudoTransitions.d.ts +0 -29
- package/types/helpers/pseudoTransitions.d.ts.map +0 -1
- package/types/helpers/resolveCompoundTokens.d.ts +0 -9
- package/types/helpers/resolveCompoundTokens.d.ts.map +0 -1
- package/types/helpers/themeable.d.ts +0 -3
- package/types/helpers/themeable.d.ts.map +0 -1
- package/types/helpers/useRenderElement.d.ts +0 -13
- package/types/helpers/useRenderElement.d.ts.map +0 -1
- package/types/hooks/useProps.d.ts +0 -41
- package/types/hooks/useProps.d.ts.map +0 -1
- package/vitest.config.d.ts +0 -3
- package/vitest.config.d.ts.map +0 -1
- package/vitest.config.ts +0 -14
|
@@ -1,907 +1,1619 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import { getTransitionResolver } from "@tamagui/animation-helpers/transitionResolver";
|
|
2
|
+
import { isClient } from "@tamagui/constants";
|
|
3
|
+
import { nonAnimatableStyleProps, stylePropsAll, stylePropsInput, stylePropsText, stylePropsTransform, validStyles } from "@tamagui/helpers";
|
|
4
|
+
import { addTransformValue, createTransformAccumulator, finalizeTransformAccumulator, getTransformPartKeys, removeTransformValue } from "@tamagui/style-grammar/runtime";
|
|
5
|
+
import { getConfig, getConfigMaybe } from "../config.mjs";
|
|
5
6
|
import { isDevTools } from "../constants/isDevTools.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
7
|
+
import { defaultComponentStateMounted } from "../defaultComponentState.mjs";
|
|
8
|
+
import { isVariable } from "../createVariable.mjs";
|
|
9
|
+
import { stylePieceSymbol } from "../types.mjs";
|
|
10
|
+
import { addComposition, canGenerateCSS, flushDirectStyles, registerAtomicSlot } from "./getCSSStylesAtomic.mjs";
|
|
11
|
+
import { splitComponents, startsValueFunction } from "./borderComponents.mjs";
|
|
12
|
+
import { getConfigRevisionState } from "./grammarConfig.mjs";
|
|
13
|
+
import { mediaKeyMatch, mediaState } from "./mediaState.mjs";
|
|
14
|
+
import { getStyleStaticConfig } from "./styleStaticConfig.mjs";
|
|
15
|
+
import { mergeFrontendCondition } from "./styleFrontend.mjs";
|
|
16
|
+
import { warnOnce, warnRefusedValue } from "./warnOnce.mjs";
|
|
17
|
+
import { getDynamicEnv } from "./styledDynamic.mjs";
|
|
18
|
+
import { getRulesForIdentifier, insertStyleRules, shouldInsertStyleRules } from "./insertStyleRule.mjs";
|
|
16
19
|
import { log } from "./log.mjs";
|
|
20
|
+
import { normalizeColor } from "./normalizeColor.mjs";
|
|
17
21
|
import { normalizeValueWithProperty } from "./normalizeValueWithProperty.mjs";
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { skipProps } from "./skipProps.mjs";
|
|
21
|
-
import { sortString } from "./sortString.mjs";
|
|
22
|
+
import { resolveVariableValue } from "./resolveVariableValue.mjs";
|
|
23
|
+
import { HOC_CLASSNAME_MARKER, skipProps } from "./skipProps.mjs";
|
|
22
24
|
import { styleOriginalValues } from "./styleOriginalValues.mjs";
|
|
23
25
|
import { STYLE_TOKEN_PROVENANCE_KEY, getStyleTokenProvenance, setStyleTokenProvenance } from "./styleProvenance.mjs";
|
|
26
|
+
import { THEME_REF_PREFIX } from "./themeRef.mjs";
|
|
24
27
|
import { transformsToString } from "./transformsToString.mjs";
|
|
28
|
+
import { isStylePiece, isStylePieceCacheable, setStylePieceCompiler, setStylePieceResolver } from "../style.mjs";
|
|
29
|
+
|
|
30
|
+
export * from "./tokenCategories.mjs"
|
|
31
|
+
|
|
25
32
|
const shouldTrackStyleTokenProvenance = process.env.NODE_ENV === "development" && process.env.TAMAGUI_ENABLE_STYLE_TOKEN_PROVENANCE === "1";
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
isReactNative,
|
|
57
|
-
inlineProps,
|
|
58
|
-
inlineWhenUnflattened,
|
|
59
|
-
parentStaticConfig,
|
|
60
|
-
acceptsClassName
|
|
61
|
-
} = staticConfig;
|
|
62
|
-
const viewProps = {};
|
|
63
|
-
const mediaState$1 = styleProps.mediaState || mediaState;
|
|
64
|
-
const shouldDoClasses = acceptsClassName && isWeb && !styleProps.noClass;
|
|
65
|
-
const rulesToInsert = {};
|
|
66
|
-
const classNames = {};
|
|
67
|
-
props.space;
|
|
68
|
-
let pseudos = null;
|
|
69
|
-
let hasMedia = false;
|
|
70
|
-
let dynamicThemeAccess;
|
|
71
|
-
let pseudoGroups;
|
|
72
|
-
let mediaGroups;
|
|
73
|
-
let className = props.className || "";
|
|
74
|
-
let mediaStylesSeen = 0;
|
|
75
|
-
const validStyles$1 = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? stylePropsText : validStyles);
|
|
76
|
-
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-setup`;
|
|
77
|
-
const styleState = {
|
|
78
|
-
classNames,
|
|
79
|
-
conf,
|
|
80
|
-
props,
|
|
81
|
-
styleProps,
|
|
82
|
-
componentState,
|
|
83
|
-
staticConfig,
|
|
84
|
-
style: null,
|
|
85
|
-
theme,
|
|
86
|
-
usedKeys: {},
|
|
87
|
-
viewProps,
|
|
88
|
-
context: componentContext,
|
|
89
|
-
debug,
|
|
90
|
-
animationDriver: driver
|
|
91
|
-
};
|
|
92
|
-
if (process.env.IS_STATIC === "is_static") {
|
|
93
|
-
const {
|
|
94
|
-
fallbackProps
|
|
95
|
-
} = styleProps;
|
|
96
|
-
if (fallbackProps) styleState.props = new Proxy(props, {
|
|
97
|
-
get(_, key, val) {
|
|
98
|
-
if (!Reflect.has(props, key)) return Reflect.get(fallbackProps, key);
|
|
99
|
-
return Reflect.get(props, key);
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`style-state`;
|
|
104
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose" && isClient) {
|
|
105
|
-
if (isDevTools) {
|
|
106
|
-
console.groupCollapsed("🔹 getSplitStyles 👇");
|
|
107
|
-
log({
|
|
108
|
-
props,
|
|
109
|
-
staticConfig,
|
|
110
|
-
shouldDoClasses,
|
|
111
|
-
styleProps,
|
|
112
|
-
rulesToInsert,
|
|
113
|
-
componentState,
|
|
114
|
-
styleState,
|
|
115
|
-
theme: {
|
|
116
|
-
...theme
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
const {
|
|
122
|
-
asChild
|
|
123
|
-
} = props;
|
|
124
|
-
const {
|
|
125
|
-
accept
|
|
126
|
-
} = staticConfig;
|
|
127
|
-
const {
|
|
128
|
-
noSkip,
|
|
129
|
-
disableExpandShorthands,
|
|
130
|
-
noExpand,
|
|
131
|
-
styledContext
|
|
132
|
-
} = styleProps;
|
|
133
|
-
const {
|
|
134
|
-
webContainerType
|
|
135
|
-
} = conf.settings;
|
|
136
|
-
const parentVariants = parentStaticConfig?.variants;
|
|
137
|
-
for (const keyOg in props) {
|
|
138
|
-
let keyInit = keyOg;
|
|
139
|
-
let valInit = props[keyInit];
|
|
140
|
-
if (keyInit === "children") {
|
|
141
|
-
viewProps[keyInit] = valInit;
|
|
142
|
-
continue;
|
|
143
|
-
}
|
|
144
|
-
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`before-prop-${keyInit}`;
|
|
145
|
-
if (process.env.NODE_ENV === "test" && keyInit === "jestAnimatedStyle") continue;
|
|
146
|
-
if (accept) {
|
|
147
|
-
const accepted = accept[keyInit];
|
|
148
|
-
if ((accepted === "style" || accepted === "textStyle") && valInit && typeof valInit === "object") {
|
|
149
|
-
viewProps[keyInit] = getSubStyle(styleState, keyInit, valInit, styleProps.noClass);
|
|
150
|
-
continue;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
if (!disableExpandShorthands) {
|
|
154
|
-
if (keyInit in shorthands) keyInit = shorthands[keyInit];
|
|
155
|
-
}
|
|
156
|
-
if (keyInit === "className") continue;
|
|
157
|
-
if (asChild) {
|
|
158
|
-
const defaults = getDefaultProps(staticConfig);
|
|
159
|
-
if (defaults) {
|
|
160
|
-
const defaultVal = defaults[keyOg] ?? defaults[keyInit];
|
|
161
|
-
if (defaultVal !== void 0 && valInit === defaultVal) continue;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
if (keyInit in skipProps && !noSkip && !isHOC) {
|
|
165
|
-
if (keyInit === "group") {
|
|
166
|
-
const identifier = `t_group_${valInit}`;
|
|
167
|
-
addStyleToInsertRules(rulesToInsert, ["container", void 0, identifier, void 0, [`.${identifier} { container-name: ${valInit}; container-type: ${webContainerType || "inline-size"}; }`]]);
|
|
168
|
-
}
|
|
169
|
-
if (keyInit === "transition" && typeof valInit === "string") {
|
|
170
|
-
const animationConfig = driver?.animations?.[valInit];
|
|
171
|
-
if (animationConfig && driver?.outputStyle === "css" && process.env.IS_STATIC === "is_static") valInit = `all ${animationConfig}`;else if (animationConfig) continue;
|
|
172
|
-
} else continue;
|
|
173
|
-
}
|
|
174
|
-
let isValidStyleKeyInit = isValidStyleKey(keyInit, validStyles$1, accept);
|
|
175
|
-
if (staticConfig.isReactNative && keyInit.startsWith("data-")) {
|
|
176
|
-
keyInit = keyInit.replace("data-", "");
|
|
177
|
-
viewProps["dataSet"] ||= {};
|
|
178
|
-
viewProps["dataSet"][keyInit] = valInit;
|
|
179
|
-
continue;
|
|
180
|
-
}
|
|
181
|
-
if (!noExpand) {
|
|
182
|
-
if (keyInit === "disabled" && valInit === true) {
|
|
183
|
-
viewProps["aria-disabled"] = true;
|
|
184
|
-
if (isInput || elementType === "button" || elementType === "form" || elementType === "input" || elementType === "select" || elementType === "textarea") viewProps.disabled = true;
|
|
185
|
-
if (!variants?.disabled) continue;
|
|
186
|
-
}
|
|
187
|
-
if (keyInit === "testID") {
|
|
188
|
-
if (isReactNative) viewProps.testID = valInit;else {
|
|
189
|
-
viewProps["data-testid"] = valInit;
|
|
190
|
-
if (styleProps.isAnimated && driver?.isReactNative) viewProps.testID = valInit;
|
|
191
|
-
}
|
|
192
|
-
continue;
|
|
193
|
-
}
|
|
194
|
-
if (keyInit === "id") {
|
|
195
|
-
viewProps.id = valInit;
|
|
196
|
-
continue;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
let isVariant = !isValidStyleKeyInit && variants && keyInit in variants;
|
|
200
|
-
const isStyleLikeKey = isValidStyleKeyInit || isVariant;
|
|
201
|
-
let isPseudo = keyInit in validPseudoKeys;
|
|
202
|
-
let isMedia = !isStyleLikeKey && !isPseudo ? getMediaKey(keyInit) : false;
|
|
203
|
-
let isMediaOrPseudo = Boolean(isMedia || isPseudo);
|
|
204
|
-
if (isMediaOrPseudo && isMedia === "group") keyInit = normalizeGroupKey(keyInit, groupContext);
|
|
205
|
-
const isStyleProp = isValidStyleKeyInit || isMediaOrPseudo || isVariant && !noExpand;
|
|
206
|
-
if (shouldSkipNativeHoverProp(keyInit, isMedia)) continue;
|
|
207
|
-
if (isStyleProp && (asChild === "except-style" || asChild === "except-style-web")) continue;
|
|
208
|
-
const shouldPassProp = !isStyleProp && isHOC || isHOC && parentVariants && keyInit in parentVariants || inlineProps?.has(keyInit);
|
|
209
|
-
const parentVariant = parentVariants?.[keyInit];
|
|
210
|
-
const isHOCShouldPassThrough = Boolean(isHOC && (isValidStyleKeyInit || isMediaOrPseudo || parentVariant || keyInit in skipProps));
|
|
211
|
-
const shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
|
|
212
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
213
|
-
console.groupCollapsed(` \u{1F511} ${keyOg}${keyInit !== keyOg ? ` (shorthand for ${keyInit})` : ""} ${shouldPassThrough ? "(pass)" : ""}`);
|
|
214
|
-
log({
|
|
215
|
-
isVariant,
|
|
216
|
-
valInit,
|
|
217
|
-
shouldPassProp
|
|
218
|
-
});
|
|
219
|
-
if (isClient) log({
|
|
220
|
-
variants,
|
|
221
|
-
variant: variants?.[keyInit],
|
|
222
|
-
isVariant,
|
|
223
|
-
isHOCShouldPassThrough,
|
|
224
|
-
usedKeys: {
|
|
225
|
-
...styleState.usedKeys
|
|
226
|
-
},
|
|
227
|
-
parentStaticConfig
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
if (shouldPassThrough) {
|
|
231
|
-
passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo);
|
|
232
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") console.groupEnd();
|
|
233
|
-
if (!isVariant) continue;
|
|
234
|
-
}
|
|
235
|
-
if (!noSkip) {
|
|
236
|
-
if (keyInit in skipProps && !(keyInit === "transition" && typeof valInit === "string" && !driver?.animations?.[valInit])) {
|
|
237
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") console.groupEnd();
|
|
238
|
-
continue;
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
if (isText || isInput) {
|
|
242
|
-
if (valInit && (keyInit === "fontFamily" || keyInit === shorthands["fontFamily"]) && valInit in conf.fontsParsed) styleState.fontFamily = valInit;
|
|
243
|
-
}
|
|
244
|
-
const disablePropMap = isMediaOrPseudo || !isStyleLikeKey;
|
|
245
|
-
propMapper(keyInit, valInit, styleState, disablePropMap, (key, val, originalVal) => {
|
|
246
|
-
const isStyledContextProp = styledContext && key in styledContext;
|
|
247
|
-
if (!isHOC && disablePropMap && !isStyledContextProp && !isMediaOrPseudo) {
|
|
248
|
-
viewProps[key] = val;
|
|
249
|
-
return;
|
|
250
|
-
}
|
|
251
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
252
|
-
console.groupCollapsed(" 💠 expanded", keyInit, "=>", key);
|
|
253
|
-
log(val);
|
|
254
|
-
console.groupEnd();
|
|
255
|
-
}
|
|
256
|
-
if (val == null) return;
|
|
257
|
-
if (!isHOC && isValidStyleKey(key, validStyles$1, accept) || false) {
|
|
258
|
-
mergeStyle(styleState, key, val, 1, false, originalVal);
|
|
259
|
-
return;
|
|
260
|
-
}
|
|
261
|
-
isPseudo = key in validPseudoKeys;
|
|
262
|
-
isMedia = isPseudo ? false : getMediaKey(key);
|
|
263
|
-
isMediaOrPseudo = Boolean(isMedia || isPseudo);
|
|
264
|
-
isVariant = variants && key in variants;
|
|
265
|
-
if (isMedia === "group") key = normalizeGroupKey(key, groupContext);
|
|
266
|
-
if (shouldSkipNativeHoverProp(key, isMedia)) return;
|
|
267
|
-
if (inlineProps?.has(key) || process.env.IS_STATIC === "is_static" && inlineWhenUnflattened?.has(key)) viewProps[key] = props[key] ?? val;
|
|
268
|
-
if (styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo || parentStaticConfig?.variants?.[keyInit])) {
|
|
269
|
-
passDownProp(viewProps, key, val, isMediaOrPseudo);
|
|
270
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
271
|
-
console.groupCollapsed(` - passing down prop ${key}`);
|
|
272
|
-
log({
|
|
273
|
-
val,
|
|
274
|
-
after: {
|
|
275
|
-
...viewProps[key]
|
|
276
|
-
}
|
|
277
|
-
});
|
|
278
|
-
console.groupEnd();
|
|
279
|
-
}
|
|
280
|
-
return;
|
|
281
|
-
}
|
|
282
|
-
if (isPseudo) {
|
|
283
|
-
if (!val) return;
|
|
284
|
-
const pseudoStyleObject = getSubStyle(styleState, key, val, styleProps.noClass && !(process.env.IS_STATIC === "is_static"));
|
|
285
|
-
if (!shouldDoClasses || process.env.IS_STATIC === "is_static") {
|
|
286
|
-
pseudos ||= {};
|
|
287
|
-
pseudos[key] ||= {};
|
|
288
|
-
if (process.env.IS_STATIC === "is_static") {
|
|
289
|
-
Object.assign(pseudos[key], pseudoStyleObject);
|
|
290
|
-
return;
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
const descriptor = pseudoDescriptors[key];
|
|
294
|
-
const isEnter = key === "enterStyle";
|
|
295
|
-
const isExit = key === "exitStyle";
|
|
296
|
-
if (!descriptor) return;
|
|
297
|
-
if (shouldDoClasses && !isExit) {
|
|
298
|
-
const pseudoStyles = getStyleAtomic(pseudoStyleObject, descriptor);
|
|
299
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") console.info("pseudo:", key, pseudoStyleObject, pseudoStyles);
|
|
300
|
-
for (const psuedoStyle of pseudoStyles) {
|
|
301
|
-
const fullKey = `${psuedoStyle[StyleObjectProperty]}${"-"}${descriptor.name}`;
|
|
302
|
-
addStyleToInsertRules(rulesToInsert, psuedoStyle);
|
|
303
|
-
classNames[fullKey] = psuedoStyle[StyleObjectIdentifier];
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
if (!shouldDoClasses || isExit || isEnter) {
|
|
307
|
-
let isDisabled = componentState[descriptor.stateKey || descriptor.name] === false;
|
|
308
|
-
if (isExit) isDisabled = !styleProps.isExiting;
|
|
309
|
-
if (isEnter && componentState.unmounted === false) isDisabled = true;
|
|
310
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
311
|
-
console.groupCollapsed("pseudo", key, {
|
|
312
|
-
isDisabled
|
|
313
|
-
});
|
|
314
|
-
log({
|
|
315
|
-
pseudoStyleObject,
|
|
316
|
-
isDisabled,
|
|
317
|
-
descriptor,
|
|
318
|
-
componentState
|
|
319
|
-
});
|
|
320
|
-
console.groupEnd();
|
|
321
|
-
}
|
|
322
|
-
const importance = descriptor.priority;
|
|
323
|
-
const pseudoOriginalValues = styleOriginalValues.get(pseudoStyleObject);
|
|
324
|
-
for (const pkey in pseudoStyleObject) {
|
|
325
|
-
const val2 = pseudoStyleObject[pkey];
|
|
326
|
-
if (isDisabled) applyDefaultStyle(pkey, styleState);else {
|
|
327
|
-
const curImportance = styleState.usedKeys[pkey] || 0;
|
|
328
|
-
const shouldMerge = importance >= curImportance;
|
|
329
|
-
if (shouldMerge) {
|
|
330
|
-
if (process.env.IS_STATIC === "is_static") {
|
|
331
|
-
pseudos ||= {};
|
|
332
|
-
pseudos[key] ||= {};
|
|
333
|
-
pseudos[key][pkey] = val2;
|
|
334
|
-
}
|
|
335
|
-
mergeStyle(styleState, pkey, val2, importance, false, pseudoOriginalValues?.[pkey]);
|
|
336
|
-
}
|
|
337
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") log(" subKey", pkey, shouldMerge, {
|
|
338
|
-
importance,
|
|
339
|
-
curImportance,
|
|
340
|
-
pkey,
|
|
341
|
-
val: val2
|
|
342
|
-
});
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
if (!isDisabled) for (const key2 in val) {
|
|
346
|
-
const k = shorthands[key2] || key2;
|
|
347
|
-
styleState.usedKeys[k] = Math.max(importance, styleState.usedKeys[k] || 0);
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
return;
|
|
351
|
-
}
|
|
352
|
-
if (isMedia) {
|
|
353
|
-
if (!val) return;
|
|
354
|
-
const mediaKeyShort = key.slice(isMedia == "theme" ? 7 : 1);
|
|
355
|
-
hasMedia ||= true;
|
|
356
|
-
if (val["space"] || !shouldDoClasses || styleProps.willBeAnimated) {
|
|
357
|
-
if (!hasMedia || typeof hasMedia === "boolean") hasMedia = /* @__PURE__ */new Set();
|
|
358
|
-
hasMedia.add(mediaKeyShort);
|
|
359
|
-
}
|
|
360
|
-
if (isMedia === "platform") {
|
|
361
|
-
if (!isActivePlatform(key)) return;
|
|
362
|
-
}
|
|
363
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") log(` \u{1F4FA} ${key}`, {
|
|
364
|
-
key,
|
|
365
|
-
val,
|
|
366
|
-
props,
|
|
367
|
-
shouldDoClasses,
|
|
368
|
-
acceptsClassName,
|
|
369
|
-
componentState,
|
|
370
|
-
mediaState: mediaState$1
|
|
371
|
-
});
|
|
372
|
-
const priority = mediaStylesSeen;
|
|
373
|
-
mediaStylesSeen += 1;
|
|
374
|
-
if (process.env.IS_STATIC === "is_static" && isMedia === true) {
|
|
375
|
-
const mediaStyle = getSubStyle(styleState, key, val, true);
|
|
376
|
-
styleState.style ||= {};
|
|
377
|
-
const existing = styleState.style[key];
|
|
378
|
-
styleState.style[key] = existing ? Object.assign(existing, mediaStyle) : mediaStyle;
|
|
379
|
-
return;
|
|
380
|
-
}
|
|
381
|
-
if (shouldDoClasses) {
|
|
382
|
-
const mediaStyles = getCSSStylesAtomic(getSubStyle(styleState, key, val, false));
|
|
383
|
-
for (const style of mediaStyles) {
|
|
384
|
-
const property = style[StyleObjectProperty];
|
|
385
|
-
const isSubStyle = property[0] === "$";
|
|
386
|
-
if (isSubStyle && !isActivePlatform(property)) continue;
|
|
387
|
-
const out = createMediaStyle(style, mediaKeyShort, mediaQueryConfig, isMedia, false, priority);
|
|
388
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") log(`\u{1F4FA} media style:`, out);
|
|
389
|
-
const subKey = isSubStyle ? style[2] : "";
|
|
390
|
-
const fullKey = `${style[StyleObjectProperty]}${subKey}${"-"}${mediaKeyShort}${style[StyleObjectPseudo] || ""}`;
|
|
391
|
-
addStyleToInsertRules(rulesToInsert, out);
|
|
392
|
-
classNames[fullKey] = out[StyleObjectIdentifier];
|
|
393
|
-
}
|
|
394
|
-
} else {
|
|
395
|
-
let mergeMediaStyle = function (key2, val2, originalVal2) {
|
|
396
|
-
styleState.style ||= {};
|
|
397
|
-
if (mergeMediaByImportance(styleState, mediaKeyShort, key2, val2, mediaState$1[mediaKeyShort], importanceBump, debug, originalVal2) && key2 === "fontFamily") styleState.fontFamily = mediaStyle.fontFamily;
|
|
398
|
-
};
|
|
399
|
-
const isThemeMedia = isMedia === "theme";
|
|
400
|
-
const isGroupMedia = isMedia === "group";
|
|
401
|
-
const isPlatformMedia = isMedia === "platform";
|
|
402
|
-
if (!isThemeMedia && !isPlatformMedia && !isGroupMedia) {
|
|
403
|
-
if (!mediaState$1[mediaKeyShort]) {
|
|
404
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") log(` \u{1F4FA} \u274C DISABLED ${mediaKeyShort}`);
|
|
405
|
-
return;
|
|
406
|
-
}
|
|
407
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") log(` \u{1F4FA} \u2705 ENABLED ${mediaKeyShort}`);
|
|
408
|
-
}
|
|
409
|
-
const mediaStyle = getSubStyle(styleState, key, val, true);
|
|
410
|
-
let importanceBump = 0;
|
|
411
|
-
if (isThemeMedia) {
|
|
412
|
-
dynamicThemeAccess = true;
|
|
413
|
-
if (!(themeName === mediaKeyShort || themeName.startsWith(mediaKeyShort))) return;
|
|
414
|
-
} else if (isGroupMedia) {
|
|
415
|
-
const groupInfo = getGroupPropParts(mediaKeyShort);
|
|
416
|
-
const groupName = groupInfo.name;
|
|
417
|
-
const groupState = groupContext?.[groupName]?.state;
|
|
418
|
-
const groupPseudoKey = groupInfo.pseudo;
|
|
419
|
-
const groupMediaKey = groupInfo.media;
|
|
420
|
-
if (!groupState) {
|
|
421
|
-
if (process.env.NODE_ENV === "development" && debug) log(`No parent with group prop, skipping styles: ${groupName}`);
|
|
422
|
-
pseudoGroups ||= /* @__PURE__ */new Set();
|
|
423
|
-
return;
|
|
424
|
-
}
|
|
425
|
-
const componentGroupState = componentState.group?.[groupName];
|
|
426
|
-
if (groupMediaKey) {
|
|
427
|
-
mediaGroups ||= /* @__PURE__ */new Set();
|
|
428
|
-
mediaGroups.add(groupMediaKey);
|
|
429
|
-
const mediaState2 = componentGroupState?.media;
|
|
430
|
-
let isActive = mediaState2?.[groupMediaKey];
|
|
431
|
-
if (!mediaState2 && groupState.layout) isActive = mediaKeyMatch(groupMediaKey, groupState.layout);
|
|
432
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") log(` \u{1F3D8}\uFE0F GROUP media ${groupMediaKey} active? ${isActive}`, {
|
|
433
|
-
...mediaState2,
|
|
434
|
-
usedKeys: {
|
|
435
|
-
...styleState.usedKeys
|
|
436
|
-
}
|
|
437
|
-
});
|
|
438
|
-
if (!isActive) {
|
|
439
|
-
for (const pkey in mediaStyle) applyDefaultStyle(pkey, styleState);
|
|
440
|
-
return;
|
|
441
|
-
}
|
|
442
|
-
importanceBump = 2;
|
|
443
|
-
}
|
|
444
|
-
if (groupPseudoKey) {
|
|
445
|
-
pseudoGroups ||= /* @__PURE__ */new Set();
|
|
446
|
-
pseudoGroups.add(groupName);
|
|
447
|
-
const componentGroupPseudoState = (componentGroupState || groupContext?.[groupName].state)?.pseudo;
|
|
448
|
-
const isActive = componentGroupPseudoState?.[groupPseudoKey];
|
|
449
|
-
const priority2 = pseudoPriorities[groupPseudoKey];
|
|
450
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") log(` \u{1F3D8}\uFE0F GROUP pseudo ${groupMediaKey} active? ${isActive}, priority ${priority2}`, {
|
|
451
|
-
componentGroupPseudoState: {
|
|
452
|
-
...componentGroupPseudoState
|
|
453
|
-
},
|
|
454
|
-
usedKeys: {
|
|
455
|
-
...styleState.usedKeys
|
|
456
|
-
}
|
|
457
|
-
});
|
|
458
|
-
if (!isActive) {
|
|
459
|
-
for (const pkey in mediaStyle) applyDefaultStyle(pkey, styleState);
|
|
460
|
-
return;
|
|
461
|
-
}
|
|
462
|
-
importanceBump = priority2;
|
|
463
|
-
}
|
|
464
|
-
} else if (isPlatformMedia) importanceBump = getPlatformSpecificityBump(mediaKeyShort);
|
|
465
|
-
const mediaOriginalValues = styleOriginalValues.get(mediaStyle);
|
|
466
|
-
if (isGroupMedia && mediaStyle.transition) {
|
|
467
|
-
styleState.pseudoTransitions ||= {};
|
|
468
|
-
styleState.pseudoTransitions[`$${mediaKeyShort}`] = mediaStyle.transition;
|
|
469
|
-
}
|
|
470
|
-
for (const subKey in mediaStyle) {
|
|
471
|
-
if (subKey === "space") continue;
|
|
472
|
-
if (subKey[0] === "$") {
|
|
473
|
-
const subMediaType = getMediaKey(subKey);
|
|
474
|
-
if (subMediaType === "platform") {
|
|
475
|
-
if (!isActivePlatform(subKey)) continue;
|
|
476
|
-
} else if (subMediaType === "theme") {
|
|
477
|
-
if (!isActiveTheme(subKey, themeName)) continue;
|
|
478
|
-
} else if (subMediaType === true) {
|
|
479
|
-
if (!mediaState$1[subKey.slice(1)]) continue;
|
|
480
|
-
}
|
|
481
|
-
const nestedVal = mediaStyle[subKey];
|
|
482
|
-
const subOriginalValues = styleOriginalValues.get(nestedVal);
|
|
483
|
-
const outerBase = !!mediaState$1[mediaKeyShort] ? getMediaKeyImportance(mediaKeyShort) : defaultMediaImportance;
|
|
484
|
-
let innerBase;
|
|
485
|
-
if (subMediaType === "platform") innerBase = defaultMediaImportance + getPlatformSpecificityBump(subKey.slice(1));else if (subMediaType === true) innerBase = getMediaKeyImportance(subKey.slice(1));else innerBase = defaultMediaImportance;
|
|
486
|
-
const nestedImportance = outerBase + importanceBump + innerBase + 1;
|
|
487
|
-
for (const subSubKey in nestedVal) {
|
|
488
|
-
const expandedKey = shorthands[subSubKey] || subSubKey;
|
|
489
|
-
const {
|
|
490
|
-
usedKeys
|
|
491
|
-
} = styleState;
|
|
492
|
-
if (usedKeys[expandedKey] && usedKeys[expandedKey] > nestedImportance) continue;
|
|
493
|
-
styleState.style ||= {};
|
|
494
|
-
mergeStyle(styleState, expandedKey, nestedVal[subSubKey], nestedImportance, false, subOriginalValues?.[subSubKey]);
|
|
495
|
-
if (expandedKey === "fontFamily") styleState.fontFamily = nestedVal[subSubKey];
|
|
496
|
-
}
|
|
497
|
-
} else mergeMediaStyle(subKey, mediaStyle[subKey], mediaOriginalValues?.[subKey]);
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
return;
|
|
501
|
-
}
|
|
502
|
-
if (!isVariant) {
|
|
503
|
-
if (isStyledContextProp) return;
|
|
504
|
-
viewProps[key] = val;
|
|
505
|
-
}
|
|
506
|
-
});
|
|
507
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
508
|
-
try {
|
|
509
|
-
log(` \u2714\uFE0F expand complete`, keyInit);
|
|
510
|
-
log("style", {
|
|
511
|
-
...styleState.style
|
|
512
|
-
});
|
|
513
|
-
log("viewProps", {
|
|
514
|
-
...viewProps
|
|
515
|
-
});
|
|
516
|
-
log("transforms", {
|
|
517
|
-
...styleState.flatTransforms
|
|
518
|
-
});
|
|
519
|
-
} catch {}
|
|
520
|
-
console.groupEnd();
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-propsend`;
|
|
524
|
-
if (!(styleProps.noNormalize === false)) {
|
|
525
|
-
if (styleState.style) {
|
|
526
|
-
fixStyles(styleState.style);
|
|
527
|
-
if (!styleProps.noExpand && !styleProps.noMergeStyle) {
|
|
528
|
-
if (isWeb && (isReactNative ? driver?.inputStyle !== "css" : true)) styleToCSS(styleState.style);
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
if (styleState.flatTransforms) {
|
|
532
|
-
styleState.style ||= {};
|
|
533
|
-
mergeFlatTransforms(styleState.style, styleState.flatTransforms);
|
|
534
|
-
}
|
|
535
|
-
if (parentSplitStyles) {
|
|
536
|
-
if (shouldDoClasses) for (const key in parentSplitStyles.classNames) {
|
|
537
|
-
const val = parentSplitStyles.classNames[key];
|
|
538
|
-
if (styleState.style && key in styleState.style || key in classNames) continue;
|
|
539
|
-
classNames[key] = val;
|
|
540
|
-
}
|
|
541
|
-
if (!shouldDoClasses) for (const key in parentSplitStyles.style) {
|
|
542
|
-
if (key in classNames || styleState.style && key in styleState.style) continue;
|
|
543
|
-
styleState.style ||= {};
|
|
544
|
-
styleState.style[key] = parentSplitStyles.style[key];
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
if (!styleProps.noNormalize && !staticConfig.isReactNative && !staticConfig.isHOC && (!styleProps.isAnimated || driver?.inputStyle === "css") && Array.isArray(styleState.style?.transform)) styleState.style.transform = transformsToString(styleState.style.transform);
|
|
549
|
-
if (!styleProps.noMergeStyle && styleState.style && shouldDoClasses) {
|
|
550
|
-
let retainedStyles;
|
|
551
|
-
let shouldRetain = false;
|
|
552
|
-
if (styleState.style["$$css"]) {} else {
|
|
553
|
-
const atomic = getCSSStylesAtomic(styleState.style);
|
|
554
|
-
for (const atomicStyle of atomic) {
|
|
555
|
-
const [key, value, identifier] = atomicStyle;
|
|
556
|
-
const isAnimatedAndTransitionOnly = styleProps.isAnimated && styleProps.noClass && props.animateOnly?.includes(key);
|
|
557
|
-
const nonAnimatedTransitionOnly = !isAnimatedAndTransitionOnly && !styleProps.isAnimated && isClient && driver?.outputStyle === "css" && props.animateOnly?.includes(key);
|
|
558
|
-
if (isAnimatedAndTransitionOnly) {
|
|
559
|
-
retainedStyles ||= {};
|
|
560
|
-
retainedStyles[key] = styleState.style[key];
|
|
561
|
-
} else if (nonAnimatedTransitionOnly) {
|
|
562
|
-
retainedStyles ||= {};
|
|
563
|
-
retainedStyles[key] = value;
|
|
564
|
-
shouldRetain = true;
|
|
565
|
-
} else {
|
|
566
|
-
addStyleToInsertRules(rulesToInsert, atomicStyle);
|
|
567
|
-
classNames[key] = identifier;
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
if (process.env.NODE_ENV === "development" && props.debug === "verbose") {
|
|
571
|
-
console.groupCollapsed(`\u{1F539} getSplitStyles final style object`);
|
|
572
|
-
console.info(styleState.style);
|
|
573
|
-
console.info(`retainedStyles`, retainedStyles);
|
|
574
|
-
console.groupEnd();
|
|
575
|
-
}
|
|
576
|
-
if (shouldRetain || !(process.env.IS_STATIC === "is_static")) styleState.style = retainedStyles || {};
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
if (!styleProps.noMergeStyle && styleState.style && !shouldDoClasses && styleProps.isAnimated && !driver?.isReactNative) {
|
|
580
|
-
if (!styleState.style["$$css"]) {
|
|
581
|
-
const toConvert = {};
|
|
582
|
-
let hasProps = false;
|
|
583
|
-
props.animateOnly;
|
|
584
|
-
for (const key in styleState.style) if (key in nonAnimatableStyleProps) {
|
|
585
|
-
toConvert[key] = styleState.style[key];
|
|
586
|
-
delete styleState.style[key];
|
|
587
|
-
hasProps = true;
|
|
588
|
-
}
|
|
589
|
-
if (hasProps) {
|
|
590
|
-
const atomic = getCSSStylesAtomic(toConvert);
|
|
591
|
-
for (const atomicStyle of atomic) {
|
|
592
|
-
addStyleToInsertRules(rulesToInsert, atomicStyle);
|
|
593
|
-
classNames[atomicStyle[StyleObjectProperty]] = atomicStyle[StyleObjectIdentifier];
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
const styleProp = props.style;
|
|
599
|
-
if (!styleProps.noMergeStyle && styleProp) if (isHOC) viewProps.style = normalizeStyle(styleProp);else {
|
|
600
|
-
const isArray = Array.isArray(styleProp);
|
|
601
|
-
const len = isArray ? styleProp.length : 1;
|
|
602
|
-
for (let i = 0; i < len; i++) {
|
|
603
|
-
const style = isArray ? styleProp[i] : styleProp;
|
|
604
|
-
if (style) if (style["$$css"]) Object.assign(styleState.classNames, style);else {
|
|
605
|
-
styleState.style ||= {};
|
|
606
|
-
const normalized = normalizeStyle(style);
|
|
607
|
-
Object.assign(styleState.style, normalized);
|
|
608
|
-
if (shouldTrackStyleTokenProvenance) {
|
|
609
|
-
const styleOriginals = styleOriginalValues.get(normalized);
|
|
610
|
-
for (const k in normalized) recordStyleTokenProvenance(styleState, k, styleOriginals?.[k]);
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-pre-result`;
|
|
616
|
-
if (shouldTrackStyleTokenProvenance && styleState.style && styleState.tokenProvenance) {
|
|
617
|
-
const provenance = {};
|
|
618
|
-
let hasProvenance = false;
|
|
619
|
-
for (const key in styleState.tokenProvenance) {
|
|
620
|
-
provenance[key] = {
|
|
621
|
-
token: styleState.tokenProvenance[key],
|
|
622
|
-
theme: themeName
|
|
623
|
-
};
|
|
624
|
-
hasProvenance = true;
|
|
625
|
-
}
|
|
626
|
-
if (hasProvenance) setStyleTokenProvenance(styleState.style, provenance);
|
|
627
|
-
}
|
|
628
|
-
const result = {
|
|
629
|
-
hasMedia,
|
|
630
|
-
fontFamily: styleState.fontFamily,
|
|
631
|
-
viewProps,
|
|
632
|
-
style: styleState.style,
|
|
633
|
-
pseudos,
|
|
634
|
-
classNames,
|
|
635
|
-
rulesToInsert,
|
|
636
|
-
dynamicThemeAccess,
|
|
637
|
-
pseudoGroups,
|
|
638
|
-
mediaGroups,
|
|
639
|
-
overriddenContextProps: styleState.overriddenContextProps,
|
|
640
|
-
pseudoTransitions: styleState.pseudoTransitions
|
|
641
|
-
};
|
|
642
|
-
const asChildExceptStyleLike = asChild === "except-style" || asChild === "except-style-web";
|
|
643
|
-
if (!styleProps.noMergeStyle) {
|
|
644
|
-
if (!asChildExceptStyleLike) {
|
|
645
|
-
const style = styleState.style;
|
|
646
|
-
{
|
|
647
|
-
let fontFamily = isText || isInput ? styleState.fontFamily : null;
|
|
648
|
-
if (fontFamily && fontFamily[0] === "$") fontFamily = fontFamily.slice(1);
|
|
649
|
-
const fontFamilyClassName = fontFamily ? `font_${fontFamily}` : "";
|
|
650
|
-
const groupClassName = props.group ? `t_group_${props.group}` : "";
|
|
651
|
-
const componentNameFinal = props.componentName || staticConfig.componentName;
|
|
652
|
-
const componentNameClassName = props.asChild || !componentNameFinal || componentNameFinal === "Text" ? "" : `is_${componentNameFinal}`;
|
|
653
|
-
let classList = [];
|
|
654
|
-
if (componentNameClassName) classList.push(componentNameClassName);
|
|
655
|
-
if (!isText) classList.push("is_View");else classList.push("is_Text");
|
|
656
|
-
if (fontFamilyClassName) classList.push(fontFamilyClassName);
|
|
657
|
-
if (classNames) classList.push(Object.values(classNames).join(" "));
|
|
658
|
-
if (groupClassName) classList.push(groupClassName);
|
|
659
|
-
if (props.className) classList.push(props.className);
|
|
660
|
-
const finalClassName = classList.join(" ");
|
|
661
|
-
const needsCssStyles = isReactNative || styleProps.isAnimated && driver?.isReactNative;
|
|
662
|
-
if (styleProps.isAnimated && driver?.inputStyle === "css") {
|
|
663
|
-
viewProps.className = finalClassName;
|
|
664
|
-
if (style) viewProps.style = style;
|
|
665
|
-
} else if (needsCssStyles) {
|
|
666
|
-
let cnStyles;
|
|
667
|
-
for (const name of finalClassName.split(" ")) {
|
|
668
|
-
cnStyles ||= {
|
|
669
|
-
$$css: true
|
|
670
|
-
};
|
|
671
|
-
cnStyles[name] = name;
|
|
672
|
-
}
|
|
673
|
-
viewProps.style = cnStyles ? [...(Array.isArray(style) ? style : [style]), cnStyles] : [style];
|
|
674
|
-
} else {
|
|
675
|
-
if (finalClassName) viewProps.className = finalClassName;
|
|
676
|
-
if (style) viewProps.style = style;
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
682
|
-
if (isClient && isDevTools) {
|
|
683
|
-
console.groupEnd();
|
|
684
|
-
console.groupCollapsed("🔹 getSplitStyles ===>");
|
|
685
|
-
try {
|
|
686
|
-
const logs = {
|
|
687
|
-
...result,
|
|
688
|
-
className,
|
|
689
|
-
componentState,
|
|
690
|
-
viewProps,
|
|
691
|
-
rulesToInsert,
|
|
692
|
-
parentSplitStyles
|
|
693
|
-
};
|
|
694
|
-
for (const key in logs) log(key, logs[key]);
|
|
695
|
-
} catch {}
|
|
696
|
-
console.groupEnd();
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-done`;
|
|
700
|
-
return result;
|
|
701
|
-
};
|
|
702
|
-
function mergeFlatTransforms(target, flatTransforms) {
|
|
703
|
-
Object.entries(flatTransforms).sort(([a], [b]) => sortString(a, b)).forEach(([key, val]) => {
|
|
704
|
-
mergeTransform(target, key, val, true);
|
|
705
|
-
});
|
|
706
|
-
}
|
|
707
|
-
function mergeStyle(styleState, key, val, importance, disableNormalize = false, originalVal) {
|
|
708
|
-
const {
|
|
709
|
-
viewProps,
|
|
710
|
-
styleProps,
|
|
711
|
-
staticConfig,
|
|
712
|
-
usedKeys
|
|
713
|
-
} = styleState;
|
|
714
|
-
if ((usedKeys[key] || 0) > importance) return;
|
|
715
|
-
const contextProps = staticConfig.context?.props || staticConfig.parentStaticConfig?.context?.props;
|
|
716
|
-
if (contextProps && key in contextProps) {
|
|
717
|
-
styleState.overriddenContextProps ||= {};
|
|
718
|
-
const originalFromState = styleState.originalContextPropValues?.[key];
|
|
719
|
-
styleState.overriddenContextProps[key] = originalVal ?? originalFromState ?? val;
|
|
720
|
-
}
|
|
721
|
-
if (key in stylePropsTransform) {
|
|
722
|
-
styleState.flatTransforms ||= {};
|
|
723
|
-
usedKeys[key] = importance;
|
|
724
|
-
styleState.flatTransforms[key] = val;
|
|
725
|
-
} else {
|
|
726
|
-
const out = isWeb && !disableNormalize && !styleProps.noNormalize ? normalizeValueWithProperty(val, key) : val;
|
|
727
|
-
if (staticConfig.accept && key in staticConfig.accept) viewProps[key] = out;else {
|
|
728
|
-
styleState.style ||= {};
|
|
729
|
-
usedKeys[key] = importance;
|
|
730
|
-
styleState.style[key] = key === "transform" && Array.isArray(out) ? [...out] : out;
|
|
731
|
-
if (shouldTrackStyleTokenProvenance) recordStyleTokenProvenance(styleState, key, originalVal);
|
|
732
|
-
}
|
|
733
|
-
}
|
|
33
|
+
const conditionValue = 0;
|
|
34
|
+
const conditionPlatform = 1;
|
|
35
|
+
const conditionKey = 2;
|
|
36
|
+
const conditionSelector = 3;
|
|
37
|
+
const conditionTheme = 4;
|
|
38
|
+
const conditionWrappers = 5;
|
|
39
|
+
const conditionAtoms = 6;
|
|
40
|
+
const conditionRanks = 7;
|
|
41
|
+
const conditionResolvedFlag = 16;
|
|
42
|
+
const conditionPlatformPseudoFlag = 32;
|
|
43
|
+
function createCondition(parent) {
|
|
44
|
+
return parent ? [
|
|
45
|
+
parent[conditionValue] & 63,
|
|
46
|
+
parent[conditionPlatform],
|
|
47
|
+
"",
|
|
48
|
+
parent[conditionSelector],
|
|
49
|
+
parent[conditionTheme],
|
|
50
|
+
parent[conditionWrappers].slice(),
|
|
51
|
+
parent[conditionAtoms].slice(),
|
|
52
|
+
parent[conditionRanks].slice()
|
|
53
|
+
] : [
|
|
54
|
+
19,
|
|
55
|
+
0,
|
|
56
|
+
"",
|
|
57
|
+
"",
|
|
58
|
+
"",
|
|
59
|
+
[],
|
|
60
|
+
[],
|
|
61
|
+
[]
|
|
62
|
+
];
|
|
734
63
|
}
|
|
735
|
-
function
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
64
|
+
function setConditionUnresolved(condition, name = "") {
|
|
65
|
+
condition[conditionValue] &= -17;
|
|
66
|
+
if (process.env.NODE_ENV !== "production") condition.problem ||= name;
|
|
67
|
+
}
|
|
68
|
+
function appendConditionWrapper(condition, wrapper) {
|
|
69
|
+
const wrappers = condition[conditionWrappers];
|
|
70
|
+
if (!wrappers.includes(wrapper)) wrappers.push(wrapper);
|
|
71
|
+
}
|
|
72
|
+
function resolveConditionModifier(state, condition, authored) {
|
|
73
|
+
const modifier = getConfigRevisionState(state.conf).resolveCondition(authored);
|
|
74
|
+
if (!modifier) {
|
|
75
|
+
setConditionUnresolved(condition, authored);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
const [name, kind, rank] = modifier;
|
|
79
|
+
const atoms = condition[conditionAtoms];
|
|
80
|
+
let atomIndex = 0;
|
|
81
|
+
while (atomIndex < atoms.length && atoms[atomIndex] < name) atomIndex++;
|
|
82
|
+
if (atoms[atomIndex] === name) return;
|
|
83
|
+
for (let index = atoms.length; index > atomIndex; index--) atoms[index] = atoms[index - 1];
|
|
84
|
+
atoms[atomIndex] = name;
|
|
85
|
+
if (kind === 3) {
|
|
86
|
+
condition[conditionPlatform] = Math.max(condition[conditionPlatform], rank);
|
|
87
|
+
if (!modifier[6]) condition[conditionValue] &= -4;
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
const precedence = kind === 2 ? 1 + Math.min(rank, 63) : kind === 6 ? 65 + Math.min(rank, 63) : kind === 4 ? 129 : kind === 5 ? 161 + rank : 225 + rank;
|
|
91
|
+
const ranks = condition[conditionRanks];
|
|
92
|
+
let rankIndex = 0;
|
|
93
|
+
while (rankIndex < ranks.length && ranks[rankIndex] >= precedence) rankIndex++;
|
|
94
|
+
for (let index = ranks.length; index > rankIndex; index--) ranks[index] = ranks[index - 1];
|
|
95
|
+
ranks[rankIndex] = precedence;
|
|
96
|
+
const buildCSS = canGenerateCSS && state.flatShouldDoClasses;
|
|
97
|
+
if (kind === 2) {
|
|
98
|
+
const query = modifier[3];
|
|
99
|
+
if (!query) return setConditionUnresolved(condition, name);
|
|
100
|
+
if (buildCSS) appendConditionWrapper(condition, `@media ${query}`);
|
|
101
|
+
if (!state.flatMediaState?.[name]) condition[conditionValue] &= -2;
|
|
102
|
+
(state.flatMediaKeys ||= /* @__PURE__ */ new Set()).add(name);
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
if (kind === 4) {
|
|
106
|
+
if (buildCSS) condition[conditionSelector] += `:where(.t_${name}, .t_${name} *)`;
|
|
107
|
+
if (state.flatThemeName !== name && state.flatThemeName?.startsWith(`${name}_`) !== true) condition[conditionValue] &= -2;
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
if (kind === 6) {
|
|
111
|
+
const size = modifier[4];
|
|
112
|
+
const containerName = modifier[5];
|
|
113
|
+
const groupName = `@${containerName}`;
|
|
114
|
+
if (buildCSS) {
|
|
115
|
+
const query = modifier[3];
|
|
116
|
+
appendConditionWrapper(condition, containerName ? `@container ${containerName} ${query}` : `@container ${query}`);
|
|
117
|
+
}
|
|
118
|
+
const component = state.componentState.group?.[groupName];
|
|
119
|
+
const context = state.flatGroupContext?.[groupName];
|
|
120
|
+
if (process.env.NODE_ENV === "development" && containerName && !component && !context && state.flatGroupContext?.[containerName]) warnOnce(`group-container:${containerName}`, `@${size}/${containerName}: targets group="${containerName}", but groups no longer establish query containers. Add container="${containerName}" to that group.`);
|
|
121
|
+
if (!(component?.media?.[size] ?? (context?.state.layout && mediaKeyMatch(size, context.state.layout)))) condition[conditionValue] &= -2;
|
|
122
|
+
(state.flatGroupKeys ||= /* @__PURE__ */ new Set()).add(groupName);
|
|
123
|
+
(state.flatGroupMedia ||= /* @__PURE__ */ new Set()).add(size);
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
const selector = modifier[3];
|
|
127
|
+
if (kind === 5) {
|
|
128
|
+
const groupName = modifier[4];
|
|
129
|
+
if (buildCSS) condition[conditionSelector] += `:where(.t_group_${groupName}${selector} *)`;
|
|
130
|
+
const component = state.componentState.group?.[groupName];
|
|
131
|
+
const context = state.flatGroupContext?.[groupName];
|
|
132
|
+
if (!(component?.pseudo ?? context?.state.pseudo)?.[modifier[5]]) condition[conditionValue] &= -2;
|
|
133
|
+
(state.flatGroupKeys ||= /* @__PURE__ */ new Set()).add(groupName);
|
|
134
|
+
} else {
|
|
135
|
+
if (rank === 0 || rank === 2 || rank === 4) condition[conditionValue] |= conditionPlatformPseudoFlag;
|
|
136
|
+
else if (rank === 6) condition[conditionValue] |= 4;
|
|
137
|
+
else if (rank === 7) condition[conditionValue] |= 8;
|
|
138
|
+
if (buildCSS) condition[conditionSelector] += `:where(${selector}${selector[0] === "." ? `, ${selector} *` : ""})`;
|
|
139
|
+
const component = state.componentState;
|
|
140
|
+
if (!(rank === 1 ? component.focusWithin : rank === 3 ? component.focusVisible : rank === 4 ? component.press || component.pressIn : rank === 5 ? component.disabled || state.props.disabled : rank === 6 ? component.unmounted : rank === 7 ? state.styleProps.isExiting : component[name])) condition[conditionValue] &= -2;
|
|
141
|
+
if (selector[0] === ":") (state.flatStateKeys ||= /* @__PURE__ */ new Set()).add(name);
|
|
142
|
+
}
|
|
143
|
+
if (rank === 0 && buildCSS) appendConditionWrapper(condition, "@media (hover: hover)");
|
|
144
|
+
}
|
|
145
|
+
function resolveConditionText(state, condition, text) {
|
|
146
|
+
let start = 0;
|
|
147
|
+
for (let index = 0; index <= text.length; index++) {
|
|
148
|
+
if (index !== text.length && text.charCodeAt(index) !== 58) continue;
|
|
149
|
+
if (index === start) {
|
|
150
|
+
setConditionUnresolved(condition);
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
if (!(condition[conditionValue] & conditionResolvedFlag)) return;
|
|
154
|
+
resolveConditionModifier(state, condition, text.slice(start, index));
|
|
155
|
+
start = index + 1;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
function commitCondition(condition) {
|
|
159
|
+
if (!(condition[conditionValue] & conditionResolvedFlag)) {
|
|
160
|
+
condition[conditionValue] = 0;
|
|
161
|
+
return 0;
|
|
162
|
+
}
|
|
163
|
+
condition[conditionKey] = condition[conditionAtoms].join(":");
|
|
164
|
+
const ranks = condition[conditionRanks];
|
|
165
|
+
const depth = ranks.length;
|
|
166
|
+
if (depth > 5) {
|
|
167
|
+
if (process.env.NODE_ENV !== "production") throw new Error(`a flat value clause supports at most 5 non-platform conditions; received ${depth} in "${condition[conditionKey]}:"`);
|
|
168
|
+
return 0;
|
|
169
|
+
}
|
|
170
|
+
let precedence = condition[conditionPlatform] * 6 + depth;
|
|
171
|
+
for (let index = 0; index < 5; index++) precedence = precedence * 256 + (ranks[index] || 0);
|
|
172
|
+
const value = precedence * 256 + condition[conditionValue];
|
|
173
|
+
condition[conditionValue] = value;
|
|
174
|
+
return value;
|
|
175
|
+
}
|
|
176
|
+
function conditionFromKey(state, key, parent) {
|
|
177
|
+
if (!key) return createCondition(parent);
|
|
178
|
+
if (!parent) {
|
|
179
|
+
const direct = state;
|
|
180
|
+
let cache = direct.flatConditions;
|
|
181
|
+
if (cache === void 0 || direct.flatConditionsClassed !== state.flatShouldDoClasses) {
|
|
182
|
+
cache = direct.flatConditions = /* @__PURE__ */ new Map();
|
|
183
|
+
direct.flatConditionsClassed = state.flatShouldDoClasses;
|
|
184
|
+
}
|
|
185
|
+
const known = cache.get(key);
|
|
186
|
+
if (known !== void 0) return known;
|
|
187
|
+
const resolved = createCondition(null);
|
|
188
|
+
resolveConditionText(state, resolved, key);
|
|
189
|
+
commitCondition(resolved);
|
|
190
|
+
cache.set(key, resolved);
|
|
191
|
+
return resolved;
|
|
192
|
+
}
|
|
193
|
+
const condition = createCondition(parent);
|
|
194
|
+
resolveConditionText(state, condition, key);
|
|
195
|
+
commitCondition(condition);
|
|
196
|
+
return condition;
|
|
197
|
+
}
|
|
198
|
+
function classifyConditionalObject(value, state, isChain, firstCondition) {
|
|
199
|
+
if ("default" in value) return -1;
|
|
200
|
+
for (const key in value) {
|
|
201
|
+
if (!key.length) return 0;
|
|
202
|
+
if (!state) return isChain?.(key) ? 1 : 0;
|
|
203
|
+
const condition = firstCondition || createCondition();
|
|
204
|
+
resolveConditionText(state, condition, key);
|
|
205
|
+
return commitCondition(condition);
|
|
206
|
+
}
|
|
207
|
+
return 0;
|
|
208
|
+
}
|
|
209
|
+
const passClassName = 20;
|
|
210
|
+
const passShouldDoClasses = 21;
|
|
211
|
+
const passContainerValue = 22;
|
|
212
|
+
const passContainerName = 23;
|
|
213
|
+
const passContainerType = 24;
|
|
214
|
+
const passFrontendGroup = 25;
|
|
215
|
+
const passFrontendContainer = 26;
|
|
216
|
+
const passFrontendContainerType = 27;
|
|
217
|
+
const passSourceLayer = 28;
|
|
218
|
+
const passParentCursor = 29;
|
|
219
|
+
const passMapSourceKey = 30;
|
|
220
|
+
const passFlags = 13;
|
|
221
|
+
const sourceLayerBase = 0;
|
|
222
|
+
const sourceLayerVariant = 1;
|
|
223
|
+
const sourceLayerResolver = 2;
|
|
224
|
+
const sourceLayerProps = 3;
|
|
225
|
+
const sourceLayerStyle = 4;
|
|
226
|
+
const passNoSkipFlag = 1;
|
|
227
|
+
const passDisableShorthandsFlag = 2;
|
|
228
|
+
const passNoExpandFlag = 4;
|
|
229
|
+
const passNoMergeFlag = 8;
|
|
230
|
+
const passHocFlag = 16;
|
|
231
|
+
const passTextFlag = 32;
|
|
232
|
+
const passInputFlag = 64;
|
|
233
|
+
const passAsChildStyleFlag = 128;
|
|
234
|
+
function isValidStyleKey(key, validStyles) {
|
|
235
|
+
return key in validStyles;
|
|
236
|
+
}
|
|
237
|
+
function effectiveLifecycleKeys(keys) {
|
|
238
|
+
if (!keys) return;
|
|
239
|
+
const out = /* @__PURE__ */ new Set();
|
|
240
|
+
for (const key of keys) out.add(key === "--t-x" || key === "--t-y" ? "translate" : key === "--t-scale-x" || key === "--t-scale-y" ? "scale" : key);
|
|
241
|
+
return out;
|
|
242
|
+
}
|
|
243
|
+
function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false) {
|
|
244
|
+
const [styleState, conf, props, viewProps, , validStyles, neverSkipProps, variants, inlineProps, parentVariants, styleFrontend, styledContext, styledContextKeys, flags, debug, , defaultProps, driverAnimations, driverOutputStyle, elementType] = pass;
|
|
245
|
+
const noSkip = Boolean(flags & passNoSkipFlag);
|
|
246
|
+
const disableExpandShorthands = Boolean(flags & passDisableShorthandsFlag);
|
|
247
|
+
const noExpand = Boolean(flags & passNoExpandFlag);
|
|
248
|
+
const noMergeStyle = Boolean(flags & passNoMergeFlag);
|
|
249
|
+
const isHOC = Boolean(flags & passHocFlag);
|
|
250
|
+
const isText = Boolean(flags & passTextFlag);
|
|
251
|
+
const isInput = Boolean(flags & passInputFlag);
|
|
252
|
+
const shorthands = conf.shorthands;
|
|
253
|
+
const shouldSkipDirectProps = !noSkip && !isHOC;
|
|
254
|
+
const shouldCheckSkipProps = !noSkip;
|
|
255
|
+
const asChildExceptStyleLike = Boolean(flags & passAsChildStyleFlag);
|
|
256
|
+
const isTextOrInput = isText || isInput;
|
|
257
|
+
const hocParentVariants = isHOC ? parentVariants : void 0;
|
|
258
|
+
let keyInit = keyOg;
|
|
259
|
+
let valInit = valOg;
|
|
260
|
+
if (keyInit === "children") {
|
|
261
|
+
viewProps[keyInit] = valInit;
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
if (keyInit === "ref") return;
|
|
265
|
+
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`before-prop-${keyInit}`;
|
|
266
|
+
if (process.env.NODE_ENV === "test" && keyInit === "jestAnimatedStyle") return;
|
|
267
|
+
if (!disableExpandShorthands) {
|
|
268
|
+
if (keyInit in shorthands) keyInit = shorthands[keyInit];
|
|
269
|
+
}
|
|
270
|
+
if (keyInit === "className") {
|
|
271
|
+
if (pass[passParentCursor]) {
|
|
272
|
+
if (typeof valInit === "string") pass[passClassName] = `${pass[passClassName]} ${valInit}`.trim();
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
if (typeof valInit === "string" && valInit && true) {
|
|
276
|
+
if (noMergeStyle) {
|
|
277
|
+
viewProps.className = valInit;
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
const resolveClassName = styleFrontend?.resolveClassName;
|
|
281
|
+
let composedProps = null;
|
|
282
|
+
const sink = (entry) => {
|
|
283
|
+
const property = entry[0];
|
|
284
|
+
const condition2 = entry[2];
|
|
285
|
+
if (property.charCodeAt(0) === 95 && property.charCodeAt(1) === 95) {
|
|
286
|
+
composedProps ||= {};
|
|
287
|
+
composedProps[property] = mergeFrontendCondition(composedProps[property], entry[1], condition2);
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
if (condition2 !== void 0) {
|
|
291
|
+
if (isValidStyleKey(property, validStyles)) contributeValue(styleState, property, entry[1], void 0, false, condition2);
|
|
292
|
+
else if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${property}" is not a valid style on this component; the frontend value is dropped.`);
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
if (property === "group") pass[passFrontendGroup] = entry[1];
|
|
296
|
+
else if (property === "container") pass[passFrontendContainer] = entry[1];
|
|
297
|
+
else if (property === "containerType") pass[passFrontendContainerType] = entry[1];
|
|
298
|
+
contributeProp(pass, property, entry[1]);
|
|
299
|
+
};
|
|
300
|
+
let start = 0;
|
|
301
|
+
for (let index = 0; index <= valInit.length; index++) {
|
|
302
|
+
if (index !== valInit.length && valInit.charCodeAt(index) > 32) continue;
|
|
303
|
+
if (index === start) {
|
|
304
|
+
start = index + 1;
|
|
305
|
+
continue;
|
|
306
|
+
}
|
|
307
|
+
const candidate = valInit.slice(start, index);
|
|
308
|
+
const preserveRaw = resolveClassName ? resolveClassName(candidate, conf, sink) : true;
|
|
309
|
+
if (preserveRaw === null) {
|
|
310
|
+
if (process.env.NODE_ENV === "development") warnOnce(`[tamagui] frontend candidate "${candidate}" is unavailable on this platform and was dropped.`);
|
|
311
|
+
} else if (preserveRaw) {
|
|
312
|
+
pass[passClassName] = pass[passClassName] ? `${pass[passClassName]} ${candidate}` : candidate;
|
|
313
|
+
if (resolveClassName) {
|
|
314
|
+
if (pass[passShouldDoClasses]) {
|
|
315
|
+
completeResolvedStyles(styleState);
|
|
316
|
+
flushDirectStyles(styleState, true);
|
|
317
|
+
}
|
|
318
|
+
pass[passShouldDoClasses] = false;
|
|
319
|
+
styleState.flatShouldDoClasses = false;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
start = index + 1;
|
|
323
|
+
}
|
|
324
|
+
if (composedProps) {
|
|
325
|
+
const composed = styleFrontend.compose?.(composedProps);
|
|
326
|
+
for (const property in composed) contributeProp(pass, property, composed[property]);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
if (keyInit === HOC_CLASSNAME_MARKER) {
|
|
332
|
+
if (valInit) {
|
|
333
|
+
const [hocClassNames, hocSlots] = valInit;
|
|
334
|
+
const direct = styleState;
|
|
335
|
+
const layers = direct.flatPropertyLayers ||= /* @__PURE__ */ new Map();
|
|
336
|
+
for (const property in hocClassNames) {
|
|
337
|
+
if (hocSlots?.has(property)) continue;
|
|
338
|
+
clearDirectStyle(styleState, property);
|
|
339
|
+
styleState.classNames[property] = hocClassNames[property];
|
|
340
|
+
layers.set(property, pass[passSourceLayer]);
|
|
341
|
+
}
|
|
342
|
+
if (hocSlots) {
|
|
343
|
+
const slots = direct.flatSlots ||= /* @__PURE__ */ new Map();
|
|
344
|
+
for (const [slot, entries] of hocSlots) for (const entry of entries) {
|
|
345
|
+
if (!ownsSourceLayer(styleState, entry[0], !!entry[2])) continue;
|
|
346
|
+
writeCapturedStyleRecord(slots, slot, entry, pass[passSourceLayer]);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
return;
|
|
351
|
+
}
|
|
352
|
+
if (keyInit === "style") {
|
|
353
|
+
if (!valInit) return;
|
|
354
|
+
if (noMergeStyle) {
|
|
355
|
+
viewProps.style = valInit;
|
|
356
|
+
return;
|
|
357
|
+
}
|
|
358
|
+
const layerBeforeStyle = pass[passSourceLayer];
|
|
359
|
+
pass[passSourceLayer] = sourceLayerStyle;
|
|
360
|
+
const isArray = Array.isArray(valInit);
|
|
361
|
+
const length = isArray ? valInit.length : 1;
|
|
362
|
+
for (let index = 0; index < length; index++) {
|
|
363
|
+
const style = isArray ? valInit[index] : valInit;
|
|
364
|
+
if (!style) continue;
|
|
365
|
+
if (isStylePiece(style)) {
|
|
366
|
+
if (styleState.flatShouldDoClasses && applyStylePieceClasses(styleState, style, sourceLayerStyle)) continue;
|
|
367
|
+
const resolvedPiece = resolveStylePiece(styleState, style);
|
|
368
|
+
const pieceOriginals = shouldTrackStyleTokenProvenance ? styleOriginalValues.get(style[stylePieceSymbol].styleObject) : void 0;
|
|
369
|
+
for (const key in resolvedPiece) {
|
|
370
|
+
if (resolvedPiece[key] == null) continue;
|
|
371
|
+
contributeValue(styleState, key, resolvedPiece[key], pieceOriginals?.[key]);
|
|
372
|
+
}
|
|
373
|
+
continue;
|
|
374
|
+
}
|
|
375
|
+
const styleOriginals = shouldTrackStyleTokenProvenance ? styleOriginalValues.get(style) : void 0;
|
|
376
|
+
for (const key in style) {
|
|
377
|
+
if (style[key] == null) continue;
|
|
378
|
+
if (key === "containerName") pass[passContainerName] = style[key];
|
|
379
|
+
else if (key === "containerType") pass[passContainerType] = style[key];
|
|
380
|
+
contributeValue(styleState, key, style[key], styleOriginals?.[key]);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
pass[passSourceLayer] = layerBeforeStyle;
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
if (defaultProps) {
|
|
387
|
+
const defaultVal = defaultProps[keyOg] ?? defaultProps[keyInit];
|
|
388
|
+
if (defaultVal !== void 0 && valInit === defaultVal) return;
|
|
389
|
+
}
|
|
390
|
+
if (keyInit in skipProps && shouldSkipDirectProps && !neverSkipProps?.[keyInit]) {
|
|
391
|
+
if (keyInit === "container") pass[passContainerValue] = valInit;
|
|
392
|
+
if (keyInit === "transition" && typeof valInit === "string") {
|
|
393
|
+
const transitions = getTransitionResolver();
|
|
394
|
+
const resolved = transitions?.resolve(valInit, { animations: driverAnimations });
|
|
395
|
+
if (resolved?.fused) if (driverOutputStyle === "css" && process.env.IS_STATIC === "is_static") valInit = transitions.toCSS(resolved) ?? valInit;
|
|
396
|
+
else return;
|
|
397
|
+
} else return;
|
|
398
|
+
}
|
|
399
|
+
let isValidStyleKeyInit = isValidStyleKey(keyInit, validStyles);
|
|
400
|
+
if (keyInit.startsWith("data-")) {
|
|
401
|
+
viewProps[keyInit] = valInit;
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
if (!noExpand) {
|
|
405
|
+
if (keyInit === "disabled" && valInit === true) {
|
|
406
|
+
viewProps["aria-disabled"] = true;
|
|
407
|
+
if (isInput || elementType === "button" || elementType === "form" || elementType === "input" || elementType === "select" || elementType === "textarea") viewProps.disabled = true;
|
|
408
|
+
if (!variants?.disabled) return;
|
|
409
|
+
}
|
|
410
|
+
if (keyInit === "testID") {
|
|
411
|
+
viewProps["data-testid"] = valInit;
|
|
412
|
+
return;
|
|
413
|
+
}
|
|
414
|
+
if (keyInit === "id") {
|
|
415
|
+
viewProps.id = valInit;
|
|
416
|
+
return;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
if (isValidStyleKeyInit && valInit == null && keyOg in props) {
|
|
420
|
+
clearDirectStyle(styleState, keyInit);
|
|
421
|
+
if (styledContextKeys?.has(keyInit)) (styleState.overriddenContextProps ||= {})[keyInit] = valInit;
|
|
422
|
+
return;
|
|
423
|
+
}
|
|
424
|
+
let isVariant = !isValidStyleKeyInit && variants && keyInit in variants;
|
|
425
|
+
const isStyleProp = isValidStyleKeyInit || isVariant && !noExpand;
|
|
426
|
+
if (isStyleProp && asChildExceptStyleLike) return;
|
|
427
|
+
const shouldPassProp = !isStyleProp && isHOC || hocParentVariants && keyInit in hocParentVariants || inlineProps?.has(keyInit);
|
|
428
|
+
const parentVariant = parentVariants?.[keyInit];
|
|
429
|
+
const isHOCShouldPassThrough = Boolean(isHOC && (parentVariant || keyInit in skipProps));
|
|
430
|
+
const shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
|
|
431
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
432
|
+
console.groupCollapsed(` \u{1F511} ${keyOg}${keyInit !== keyOg ? ` (shorthand for ${keyInit})` : ""} ${shouldPassThrough ? "(pass)" : ""}`);
|
|
433
|
+
log({
|
|
434
|
+
isVariant,
|
|
435
|
+
valInit,
|
|
436
|
+
shouldPassProp
|
|
437
|
+
});
|
|
438
|
+
if (isClient) log({
|
|
439
|
+
variants,
|
|
440
|
+
variant: variants?.[keyInit],
|
|
441
|
+
isVariant,
|
|
442
|
+
isHOCShouldPassThrough,
|
|
443
|
+
parentStaticConfig: pass[15]
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
if (shouldPassThrough) {
|
|
447
|
+
if (keyInit in viewProps) delete viewProps[keyInit];
|
|
448
|
+
viewProps[keyInit] = valInit;
|
|
449
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose") console.groupEnd();
|
|
450
|
+
if (!isVariant) return;
|
|
451
|
+
}
|
|
452
|
+
if (shouldCheckSkipProps && !neverSkipProps?.[keyInit]) {
|
|
453
|
+
if (keyInit in skipProps && !(keyInit === "transition" && typeof valInit === "string" && !getTransitionResolver()?.resolve(valInit, { animations: driverAnimations }).fused)) {
|
|
454
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose") console.groupEnd();
|
|
455
|
+
return;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
if (isTextOrInput) {
|
|
459
|
+
if (valInit && (keyInit === "fontFamily" || keyInit === shorthands["fontFamily"]) && valInit in conf.fontsParsed) styleState.fontFamily = valInit;
|
|
460
|
+
}
|
|
461
|
+
if (isValidStyleKeyInit && valInit != null && !(variants && keyInit in variants) && !(styledContextKeys?.has(keyInit) || styledContext && keyInit in styledContext)) {
|
|
462
|
+
contributeValue(styleState, keyInit, valInit, originalOg);
|
|
463
|
+
return;
|
|
464
|
+
}
|
|
465
|
+
if (variants && keyInit in variants && !noExpand && !disabled) {
|
|
466
|
+
const previousLayer = pass[passSourceLayer];
|
|
467
|
+
pass[passSourceLayer] = previousLayer ? sourceLayerVariant : sourceLayerBase;
|
|
468
|
+
pass[passMapSourceKey] = keyInit;
|
|
469
|
+
const variantConfig = styleState.flatStyleStaticConfig;
|
|
470
|
+
variantConfig.variantStyleResolver?.(styleState, variantConfig.variants, keyInit, valInit, keyInit, pass[passParentCursor]);
|
|
471
|
+
pass[passSourceLayer] = previousLayer;
|
|
472
|
+
return;
|
|
473
|
+
}
|
|
474
|
+
const isStyledContextProp = !isHOC && (styledContextKeys?.has(keyInit) || styledContext && keyInit in styledContext);
|
|
475
|
+
if (isStyledContextProp) {
|
|
476
|
+
(styleState.overriddenContextProps ||= {})[keyInit] = originalOg;
|
|
477
|
+
(styleState.originalContextPropValues ||= {})[keyInit] = originalOg;
|
|
478
|
+
}
|
|
479
|
+
const isHostStyleKey = isValidStyleKeyInit || false;
|
|
480
|
+
if (isHostStyleKey || isStyledContextProp) {
|
|
481
|
+
contributeValue(styleState, keyInit, valInit, originalOg, !isHostStyleKey);
|
|
482
|
+
return;
|
|
483
|
+
}
|
|
484
|
+
const condition = pass[passParentCursor];
|
|
485
|
+
if (condition) {
|
|
486
|
+
if (isHOC) {
|
|
487
|
+
const previous = viewProps[keyInit];
|
|
488
|
+
const transport = previous && typeof previous === "object" && !Array.isArray(previous) && "default" in previous ? previous : { default: previous };
|
|
489
|
+
transport[condition[conditionKey]] = valInit;
|
|
490
|
+
viewProps[keyInit] = transport;
|
|
491
|
+
} 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.`);
|
|
492
|
+
return;
|
|
493
|
+
}
|
|
494
|
+
if (keyInit in stylePropsAll) {
|
|
495
|
+
if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${keyInit}" is a text style prop and this component is not text \u2014 it would render on neither platform. Use a Text-based component, or html.* for raw web elements.`);
|
|
496
|
+
return;
|
|
497
|
+
}
|
|
498
|
+
viewProps[keyInit] = valInit;
|
|
499
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
500
|
+
try {
|
|
501
|
+
log(` \u2714\uFE0F expand complete`, keyInit);
|
|
502
|
+
log("style", { ...styleState.style });
|
|
503
|
+
log("viewProps", { ...viewProps });
|
|
504
|
+
log("transforms", styleState.transformAccumulator);
|
|
505
|
+
} catch {}
|
|
506
|
+
console.groupEnd();
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
const getSplitStyles = (props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, componentContext, groupContext, elementType, startedUnhydrated, debug, animationDriver, styleStaticConfig) => {
|
|
510
|
+
const conf = getConfig();
|
|
511
|
+
styleStaticConfig ||= getStyleStaticConfig(staticConfig, conf);
|
|
512
|
+
const driver = animationDriver || componentContext?.animationDriver || conf.animations;
|
|
513
|
+
const driverAnimations = driver?.animations;
|
|
514
|
+
const driverInputStyle = driver?.inputStyle;
|
|
515
|
+
const driverOutputStyle = driver?.outputStyle;
|
|
516
|
+
const resolvedDriver = driver?.isStub ? null : driver;
|
|
517
|
+
if (props.passThrough) return null;
|
|
518
|
+
const { shorthands } = conf;
|
|
519
|
+
const { isHOC, isText, isInput, inlineProps, parentStaticConfig, acceptsClassName } = staticConfig;
|
|
520
|
+
const variants = styleStaticConfig.variants;
|
|
521
|
+
const viewProps = {};
|
|
522
|
+
const mediaState$1 = styleProps.mediaState || mediaState;
|
|
523
|
+
let shouldDoClasses = !process.env.TAMAGUI_DID_OUTPUT_CSS && acceptsClassName && !styleProps.noClass;
|
|
524
|
+
const rulesToInsert = {};
|
|
525
|
+
const classNames = {};
|
|
526
|
+
let hasMedia = false;
|
|
527
|
+
let pseudoGroups;
|
|
528
|
+
let mediaGroups;
|
|
529
|
+
const staticPassthroughClassName = styleStaticConfig.passthroughClassName || "";
|
|
530
|
+
let className = staticPassthroughClassName;
|
|
531
|
+
if (staticPassthroughClassName) shouldDoClasses = false;
|
|
532
|
+
const validStyles$1 = staticConfig.validStyles || (staticConfig.isInput ? stylePropsInput : staticConfig.isText ? stylePropsText : validStyles);
|
|
533
|
+
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-setup`;
|
|
534
|
+
const styleState = {
|
|
535
|
+
classNames,
|
|
536
|
+
conf,
|
|
537
|
+
props,
|
|
538
|
+
styleProps,
|
|
539
|
+
componentState,
|
|
540
|
+
staticConfig,
|
|
541
|
+
style: null,
|
|
542
|
+
theme,
|
|
543
|
+
viewProps,
|
|
544
|
+
context: componentContext,
|
|
545
|
+
debug,
|
|
546
|
+
flatRulesToInsert: rulesToInsert,
|
|
547
|
+
flatShouldDoClasses: shouldDoClasses,
|
|
548
|
+
flatThemeName: themeName,
|
|
549
|
+
flatMediaState: mediaState$1,
|
|
550
|
+
flatGroupContext: groupContext,
|
|
551
|
+
animationDriver: resolvedDriver
|
|
552
|
+
};
|
|
553
|
+
styleState.flatStyleStaticConfig = styleStaticConfig;
|
|
554
|
+
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`style-state`;
|
|
555
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose" && isClient) {
|
|
556
|
+
if (isDevTools) {
|
|
557
|
+
console.groupCollapsed("🔹 getSplitStyles 👇");
|
|
558
|
+
log({
|
|
559
|
+
props,
|
|
560
|
+
staticConfig,
|
|
561
|
+
shouldDoClasses,
|
|
562
|
+
styleProps,
|
|
563
|
+
rulesToInsert,
|
|
564
|
+
componentState,
|
|
565
|
+
styleState,
|
|
566
|
+
theme: { ...theme }
|
|
567
|
+
});
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
const { asChild } = props;
|
|
571
|
+
const { neverSkipProps } = staticConfig;
|
|
572
|
+
const { noSkip, disableExpandShorthands, noExpand, noClass, noMergeStyle, noNormalize, isAnimated, styledContext } = styleProps;
|
|
573
|
+
const styledContextKeys = styleStaticConfig.styledContextKeys;
|
|
574
|
+
const styleFrontend = staticConfig.styleFrontend;
|
|
575
|
+
let frontendGroup;
|
|
576
|
+
let frontendContainer;
|
|
577
|
+
let frontendContainerType;
|
|
578
|
+
const processedProps = props;
|
|
579
|
+
const parentVariants = parentStaticConfig ? getStyleStaticConfig(parentStaticConfig, conf).variants : void 0;
|
|
580
|
+
const defaultProps = asChild ? styleStaticConfig.defaultProps : void 0;
|
|
581
|
+
const asChildExceptStyleLike = asChild === "except-style" || asChild === "except-style-web";
|
|
582
|
+
let containerValue;
|
|
583
|
+
let containerName;
|
|
584
|
+
let containerType;
|
|
585
|
+
containerName = processedProps.containerName;
|
|
586
|
+
containerType = processedProps.containerType;
|
|
587
|
+
const pass = [
|
|
588
|
+
styleState,
|
|
589
|
+
conf,
|
|
590
|
+
props,
|
|
591
|
+
viewProps,
|
|
592
|
+
staticConfig,
|
|
593
|
+
validStyles$1,
|
|
594
|
+
neverSkipProps,
|
|
595
|
+
variants,
|
|
596
|
+
inlineProps,
|
|
597
|
+
parentVariants,
|
|
598
|
+
styleFrontend,
|
|
599
|
+
styledContext,
|
|
600
|
+
styledContextKeys,
|
|
601
|
+
(noSkip ? passNoSkipFlag : 0) | (disableExpandShorthands ? passDisableShorthandsFlag : 0) | (noExpand ? passNoExpandFlag : 0) | (noMergeStyle ? passNoMergeFlag : 0) | (isHOC ? passHocFlag : 0) | (isText ? passTextFlag : 0) | (isInput ? passInputFlag : 0) | (asChildExceptStyleLike ? passAsChildStyleFlag : 0),
|
|
602
|
+
debug,
|
|
603
|
+
parentStaticConfig,
|
|
604
|
+
defaultProps,
|
|
605
|
+
driverAnimations,
|
|
606
|
+
driverOutputStyle,
|
|
607
|
+
elementType,
|
|
608
|
+
className,
|
|
609
|
+
shouldDoClasses,
|
|
610
|
+
containerValue,
|
|
611
|
+
containerName,
|
|
612
|
+
containerType,
|
|
613
|
+
frontendGroup,
|
|
614
|
+
frontendContainer,
|
|
615
|
+
frontendContainerType
|
|
616
|
+
];
|
|
617
|
+
styleState.flatPass = pass;
|
|
618
|
+
let conditionalStates = null;
|
|
619
|
+
let usesSafeArea = false;
|
|
620
|
+
const baseStyle = styleStaticConfig.baseStyle;
|
|
621
|
+
const baseVariantProps = styleStaticConfig.baseVariantProps;
|
|
622
|
+
const appliesBaseStyle = baseStyle && !processedProps.asChild;
|
|
623
|
+
pass[passSourceLayer] = sourceLayerBase;
|
|
624
|
+
let appliedBaseStylePieces;
|
|
625
|
+
if (appliesBaseStyle && baseVariantProps) {
|
|
626
|
+
let callerKeys;
|
|
627
|
+
for (const key in baseVariantProps) if (Object.hasOwn(processedProps, key) && processedProps[key] !== baseVariantProps[key]) (callerKeys ||= /* @__PURE__ */ new Set()).add(key);
|
|
628
|
+
styleState.flatCallerVariantKeys = callerKeys;
|
|
629
|
+
}
|
|
630
|
+
if (appliesBaseStyle) for (const key in baseStyle) {
|
|
631
|
+
const baseValue = baseVariantProps && Object.hasOwn(baseVariantProps, key) && Object.hasOwn(processedProps, key) ? processedProps[key] : baseStyle[key];
|
|
632
|
+
const expandedKey = shorthands[key] || key;
|
|
633
|
+
if ((isText || isInput) && baseValue && expandedKey === "fontFamily" && baseValue in conf.fontsParsed) styleState.fontFamily = baseValue;
|
|
634
|
+
const piece = styleStaticConfig.baseStylePieces?.[key];
|
|
635
|
+
if (piece && styleState.flatShouldDoClasses) {
|
|
636
|
+
if (!appliedBaseStylePieces?.has(piece)) {
|
|
637
|
+
if (applyStylePieceClasses(styleState, piece, sourceLayerBase)) (appliedBaseStylePieces ||= /* @__PURE__ */ new Set()).add(piece);
|
|
638
|
+
}
|
|
639
|
+
if (appliedBaseStylePieces?.has(piece)) continue;
|
|
640
|
+
}
|
|
641
|
+
contributeProp(pass, key, baseValue);
|
|
642
|
+
}
|
|
643
|
+
pass[passSourceLayer] = sourceLayerProps;
|
|
644
|
+
for (const key in processedProps) {
|
|
645
|
+
if (appliesBaseStyle && baseVariantProps && Object.hasOwn(baseVariantProps, key)) continue;
|
|
646
|
+
contributeProp(pass, key, processedProps[key]);
|
|
647
|
+
}
|
|
648
|
+
const resolvers = staticConfig.resolvers;
|
|
649
|
+
if (resolvers && !noExpand) {
|
|
650
|
+
const prevSourceLayer = pass[passSourceLayer];
|
|
651
|
+
pass[passSourceLayer] = sourceLayerResolver;
|
|
652
|
+
const flagsBefore = pass[passFlags];
|
|
653
|
+
pass[passFlags] = flagsBefore | passNoExpandFlag;
|
|
654
|
+
const env = getDynamicEnv(styleState);
|
|
655
|
+
for (let index = 0; index < resolvers.length; index++) {
|
|
656
|
+
const resolved = resolvers[index](processedProps, env);
|
|
657
|
+
if (resolved) for (const key in resolved) {
|
|
658
|
+
if (resolved[key] == null) continue;
|
|
659
|
+
contributeProp(pass, key, resolved[key]);
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
pass[passFlags] = flagsBefore;
|
|
663
|
+
pass[passSourceLayer] = prevSourceLayer;
|
|
664
|
+
}
|
|
665
|
+
className = pass[passClassName];
|
|
666
|
+
shouldDoClasses = pass[passShouldDoClasses];
|
|
667
|
+
containerValue = pass[passContainerValue];
|
|
668
|
+
containerName = pass[passContainerName];
|
|
669
|
+
containerType = pass[passContainerType];
|
|
670
|
+
frontendGroup = pass[passFrontendGroup];
|
|
671
|
+
frontendContainer = pass[passFrontendContainer];
|
|
672
|
+
frontendContainerType = pass[passFrontendContainerType];
|
|
673
|
+
if (containerValue) {
|
|
674
|
+
containerName ??= typeof containerValue === "string" ? containerValue : void 0;
|
|
675
|
+
containerType ??= "inline-size";
|
|
676
|
+
contributeValue(styleState, containerName ? "container" : "containerType", containerName ? `${containerName} / ${containerType}` : containerType);
|
|
677
|
+
}
|
|
678
|
+
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-propsend`;
|
|
679
|
+
conditionalStates = styleState.flatStateKeys || null;
|
|
680
|
+
usesSafeArea = !!styleState.flatUsesSafeArea;
|
|
681
|
+
hasMedia = styleState.flatMediaKeys?.size ? styleState.flatMediaKeys : false;
|
|
682
|
+
pseudoGroups = styleState.flatGroupKeys?.size ? styleState.flatGroupKeys : void 0;
|
|
683
|
+
mediaGroups = styleState.flatGroupMedia?.size ? styleState.flatGroupMedia : void 0;
|
|
684
|
+
if (styleProps.canPlatformPseudo && styleState.flatHasPlatformPseudo) {
|
|
685
|
+
shouldDoClasses = false;
|
|
686
|
+
styleState.flatShouldDoClasses = false;
|
|
687
|
+
if (styleState.transformAccumulator) {
|
|
688
|
+
mergeStyle(styleState, "transform", finalizeTransformAccumulator(styleState.transformAccumulator), true);
|
|
689
|
+
styleState.transformAccumulator = void 0;
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
if (styleProps.stylePieceEntries) {
|
|
693
|
+
const slots = styleState.flatSlots;
|
|
694
|
+
if (slots) for (const [slot, entries] of slots) styleProps.stylePieceEntries[slot] = entries;
|
|
695
|
+
}
|
|
696
|
+
completeResolvedStyles(styleState);
|
|
697
|
+
if (styleState.flatGroupKeys?.size) pseudoGroups = styleState.flatGroupKeys;
|
|
698
|
+
if (styleState.flatGroupMedia?.size) mediaGroups = styleState.flatGroupMedia;
|
|
699
|
+
if (styleProps.isStatic) for (const property in classNames) {
|
|
700
|
+
const identifier = classNames[property];
|
|
701
|
+
if (rulesToInsert[identifier]) continue;
|
|
702
|
+
const rules = getRulesForIdentifier(identifier);
|
|
703
|
+
if (rules) rulesToInsert[identifier] = [
|
|
704
|
+
property,
|
|
705
|
+
"",
|
|
706
|
+
identifier,
|
|
707
|
+
void 0,
|
|
708
|
+
rules
|
|
709
|
+
];
|
|
710
|
+
}
|
|
711
|
+
const effectiveTransition = styleState.style?.transition;
|
|
712
|
+
if (effectiveTransition != null && styleState.style && driverOutputStyle !== "css") delete styleState.style.transition;
|
|
713
|
+
if (!(noNormalize === false)) {
|
|
714
|
+
if (styleState.transformAccumulator && !styleState.flatShouldDoClasses) {
|
|
715
|
+
styleState.style ||= {};
|
|
716
|
+
styleState.style.transform = finalizeTransformAccumulator(styleState.transformAccumulator);
|
|
717
|
+
}
|
|
718
|
+
if (parentSplitStyles) {
|
|
719
|
+
if (shouldDoClasses) for (const key in parentSplitStyles.classNames) {
|
|
720
|
+
const val = parentSplitStyles.classNames[key];
|
|
721
|
+
if (styleState.style && key in styleState.style || key in classNames) continue;
|
|
722
|
+
classNames[key] = val;
|
|
723
|
+
}
|
|
724
|
+
if (!shouldDoClasses) for (const key in parentSplitStyles.style) {
|
|
725
|
+
if (key in classNames || styleState.style && key in styleState.style) continue;
|
|
726
|
+
styleState.style ||= {};
|
|
727
|
+
styleState.style[key] = parentSplitStyles.style[key];
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
if (!noNormalize && !isHOC && (!isAnimated || driverInputStyle === "css") && Array.isArray(styleState.style?.transform)) styleState.style.transform = transformsToString(styleState.style.transform);
|
|
732
|
+
flushDirectStyles(styleState);
|
|
733
|
+
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-pre-result`;
|
|
734
|
+
if (shouldTrackStyleTokenProvenance && styleState.style && styleState.tokenProvenance) {
|
|
735
|
+
const provenance = {};
|
|
736
|
+
let hasProvenance = false;
|
|
737
|
+
for (const key in styleState.tokenProvenance) {
|
|
738
|
+
provenance[key] = {
|
|
739
|
+
token: styleState.tokenProvenance[key],
|
|
740
|
+
theme: themeName
|
|
741
|
+
};
|
|
742
|
+
hasProvenance = true;
|
|
743
|
+
}
|
|
744
|
+
if (hasProvenance) setStyleTokenProvenance(styleState.style, provenance);
|
|
745
|
+
}
|
|
746
|
+
const result = {
|
|
747
|
+
hasMedia,
|
|
748
|
+
fontFamily: styleState.fontFamily,
|
|
749
|
+
viewProps,
|
|
750
|
+
style: styleState.style,
|
|
751
|
+
classNames,
|
|
752
|
+
rulesToInsert,
|
|
753
|
+
pseudoGroups,
|
|
754
|
+
mediaGroups,
|
|
755
|
+
overriddenContextProps: styleState.overriddenContextProps
|
|
756
|
+
};
|
|
757
|
+
if (effectiveTransition != null) result.effectiveTransition = effectiveTransition;
|
|
758
|
+
if (conditionalStates) result.programStates = conditionalStates;
|
|
759
|
+
if (usesSafeArea) result.usesSafeArea = true;
|
|
760
|
+
if (styleState.flatDynamicThemeAccess) result.dynamicThemeAccess = true;
|
|
761
|
+
if (styleState.flatEnterKeys || styleState.flatExitKeys) result.programLifecycleStyleKeys = {
|
|
762
|
+
enter: effectiveLifecycleKeys(styleState.flatEnterKeys),
|
|
763
|
+
exit: effectiveLifecycleKeys(styleState.flatExitKeys)
|
|
764
|
+
};
|
|
765
|
+
if (styleState.flatHasEnterStyle) result.hasEnterStyle = true;
|
|
766
|
+
if (styleState.flatHasPlatformPseudo) result.platformPseudo = true;
|
|
767
|
+
if (frontendGroup !== void 0) result.frontendGroup = frontendGroup;
|
|
768
|
+
if (frontendContainer !== void 0) result.frontendContainer = frontendContainer;
|
|
769
|
+
if (frontendContainerType !== void 0) result.frontendContainerType = frontendContainerType;
|
|
770
|
+
if (!noMergeStyle) {
|
|
771
|
+
if (!asChildExceptStyleLike) {
|
|
772
|
+
const style = styleState.style;
|
|
773
|
+
{
|
|
774
|
+
const fontFamily = isText || isInput ? styleState.fontFamily : null;
|
|
775
|
+
const fontFamilyClassName = fontFamily ? `font_${fontFamily}` : "";
|
|
776
|
+
const group = props.group ?? frontendGroup;
|
|
777
|
+
const groupClassName = group ? `t_group_${group}` : "";
|
|
778
|
+
let finalClassName = isText ? "is_Text" : "is_View";
|
|
779
|
+
if (fontFamilyClassName) finalClassName += ` ${fontFamilyClassName}`;
|
|
780
|
+
let hasPropertyClassNames = false;
|
|
781
|
+
if (classNames) for (const key in classNames) {
|
|
782
|
+
hasPropertyClassNames = true;
|
|
783
|
+
if (!isHOC) finalClassName += ` ${classNames[key]}`;
|
|
784
|
+
}
|
|
785
|
+
if (groupClassName) finalClassName += ` ${groupClassName}`;
|
|
786
|
+
if (className) finalClassName += ` ${className}`;
|
|
787
|
+
if (isHOC && hasPropertyClassNames) viewProps[HOC_CLASSNAME_MARKER] = [classNames, styleState.flatCapturedSlots];
|
|
788
|
+
if (finalClassName) viewProps.className = finalClassName;
|
|
789
|
+
if (style) viewProps.style = style;
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
794
|
+
if (isClient && isDevTools) {
|
|
795
|
+
console.groupEnd();
|
|
796
|
+
console.groupCollapsed("🔹 getSplitStyles ===>");
|
|
797
|
+
try {
|
|
798
|
+
const logs = {
|
|
799
|
+
...props.__tamaguiStyleDebugReceipt && { receipt: props.__tamaguiStyleDebugReceipt },
|
|
800
|
+
...result,
|
|
801
|
+
className,
|
|
802
|
+
componentState,
|
|
803
|
+
viewProps,
|
|
804
|
+
rulesToInsert,
|
|
805
|
+
parentSplitStyles
|
|
806
|
+
};
|
|
807
|
+
for (const key in logs) log(key, logs[key]);
|
|
808
|
+
} catch {}
|
|
809
|
+
console.groupEnd();
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-done`;
|
|
813
|
+
return result;
|
|
816
814
|
};
|
|
817
|
-
const
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
const res = getSplitStyles(a, b, c, d, e, f, g, h, i, j, k, l, m);
|
|
822
|
-
useInsertEffectCompat(() => {
|
|
823
|
-
if (res) insertStyleRules(res.rulesToInsert);
|
|
824
|
-
}, [res?.rulesToInsert]);
|
|
825
|
-
return res;
|
|
815
|
+
const stylePieceStaticConfig = {
|
|
816
|
+
acceptsClassName: true,
|
|
817
|
+
isText: true,
|
|
818
|
+
validStyles: stylePropsAll
|
|
826
819
|
};
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
}
|
|
836
|
-
const
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
820
|
+
const compiledStylePieces = /* @__PURE__ */ new WeakMap();
|
|
821
|
+
const compileStylePieceRuntime = (piece, layer) => {
|
|
822
|
+
const conf = getConfigMaybe();
|
|
823
|
+
if (!conf) return;
|
|
824
|
+
const themeName = Object.keys(conf.themes)[0] || "";
|
|
825
|
+
const theme = conf.themes[themeName] || {};
|
|
826
|
+
const definition = piece[stylePieceSymbol].styleObject;
|
|
827
|
+
const isBase = layer === "base";
|
|
828
|
+
const slots = {};
|
|
829
|
+
const split = getSplitStyles(isBase ? {} : { style: definition }, isBase ? {
|
|
830
|
+
...stylePieceStaticConfig,
|
|
831
|
+
baseStyle: definition,
|
|
832
|
+
disableBaseStylePiece: true
|
|
833
|
+
} : stylePieceStaticConfig, theme, themeName, defaultComponentStateMounted, {
|
|
834
|
+
isAnimated: false,
|
|
835
|
+
resolveValues: "variable",
|
|
836
|
+
stylePieceEntries: slots
|
|
837
|
+
});
|
|
838
|
+
if (!split) return;
|
|
839
|
+
const directClassNames = {};
|
|
840
|
+
for (const key in split.classNames) if (!(key in slots)) directClassNames[key] = split.classNames[key];
|
|
841
|
+
compiledStylePieces.set(piece, {
|
|
842
|
+
slots,
|
|
843
|
+
directClassNames,
|
|
844
|
+
programStates: split.programStates,
|
|
845
|
+
mediaKeys: split.hasMedia instanceof Set ? split.hasMedia : void 0,
|
|
846
|
+
pseudoGroups: split.pseudoGroups,
|
|
847
|
+
mediaGroups: split.mediaGroups,
|
|
848
|
+
dynamicThemeAccess: split.dynamicThemeAccess
|
|
849
|
+
});
|
|
850
|
+
const byKey = piece[stylePieceSymbol].byKey;
|
|
851
|
+
let className = "";
|
|
852
|
+
for (const key in split.classNames) {
|
|
853
|
+
const identifier = split.classNames[key];
|
|
854
|
+
byKey[key] = identifier;
|
|
855
|
+
className = className ? `${className} ${identifier}` : identifier;
|
|
856
|
+
}
|
|
857
|
+
piece.className = className;
|
|
858
|
+
if (isClient) insertStyleRules(split.rulesToInsert);
|
|
852
859
|
};
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
860
|
+
setStylePieceCompiler(compileStylePieceRuntime);
|
|
861
|
+
setStylePieceResolver((piece, theme, themeName) => {
|
|
862
|
+
return getSplitStyles({ style: piece }, stylePieceStaticConfig, theme, themeName, defaultComponentStateMounted, {
|
|
863
|
+
isAnimated: false,
|
|
864
|
+
resolveValues: "value"
|
|
865
|
+
})?.style || {};
|
|
866
|
+
});
|
|
867
|
+
const resolvedStylePieceCache = /* @__PURE__ */ new WeakMap();
|
|
868
|
+
function resolveStylePiece(styleState, piece) {
|
|
869
|
+
const definition = piece[stylePieceSymbol].styleObject;
|
|
870
|
+
if (!isStylePieceCacheable(piece)) return resolveStyleObject(styleState, definition);
|
|
871
|
+
let themeCache = resolvedStylePieceCache.get(piece);
|
|
872
|
+
if (!themeCache) {
|
|
873
|
+
themeCache = /* @__PURE__ */ new WeakMap();
|
|
874
|
+
resolvedStylePieceCache.set(piece, themeCache);
|
|
875
|
+
}
|
|
876
|
+
const theme = styleState.theme;
|
|
877
|
+
const cached = themeCache.get(theme);
|
|
878
|
+
if (cached) return cached;
|
|
879
|
+
const resolved = resolveStyleObject(styleState, definition);
|
|
880
|
+
themeCache.set(theme, resolved);
|
|
881
|
+
return resolved;
|
|
882
|
+
}
|
|
883
|
+
function applyStylePieceClasses(styleState, piece, sourceLayer) {
|
|
884
|
+
let compiled = compiledStylePieces.get(piece);
|
|
885
|
+
if (!compiled && getConfigMaybe()) {
|
|
886
|
+
compileStylePieceRuntime(piece, "style");
|
|
887
|
+
compiled = compiledStylePieces.get(piece);
|
|
888
|
+
}
|
|
889
|
+
if (compiled) {
|
|
890
|
+
const direct2 = styleState;
|
|
891
|
+
const slots = direct2.flatSlots ||= /* @__PURE__ */ new Map();
|
|
892
|
+
for (const slot in compiled.slots) for (const entry of compiled.slots[slot]) {
|
|
893
|
+
const property = entry[0];
|
|
894
|
+
if (!ownsSourceLayer(styleState, property, !!entry[2])) continue;
|
|
895
|
+
writeCapturedStyleRecord(slots, slot, entry, sourceLayer);
|
|
896
|
+
}
|
|
897
|
+
if (compiled.programStates) {
|
|
898
|
+
const target = styleState.flatStateKeys ||= /* @__PURE__ */ new Set();
|
|
899
|
+
for (const key of compiled.programStates) target.add(key);
|
|
900
|
+
}
|
|
901
|
+
if (compiled.mediaKeys) {
|
|
902
|
+
const target = styleState.flatMediaKeys ||= /* @__PURE__ */ new Set();
|
|
903
|
+
for (const key of compiled.mediaKeys) target.add(key);
|
|
904
|
+
}
|
|
905
|
+
if (compiled.pseudoGroups) {
|
|
906
|
+
const target = styleState.flatGroupKeys ||= /* @__PURE__ */ new Set();
|
|
907
|
+
for (const key of compiled.pseudoGroups) target.add(key);
|
|
908
|
+
}
|
|
909
|
+
if (compiled.mediaGroups) {
|
|
910
|
+
const target = styleState.flatGroupMedia ||= /* @__PURE__ */ new Set();
|
|
911
|
+
for (const key of compiled.mediaGroups) target.add(key);
|
|
912
|
+
}
|
|
913
|
+
if (compiled.dynamicThemeAccess) direct2.flatDynamicThemeAccess = true;
|
|
914
|
+
for (const property in compiled.directClassNames) styleState.classNames[property] = compiled.directClassNames[property];
|
|
915
|
+
return true;
|
|
916
|
+
}
|
|
917
|
+
const byKey = piece[stylePieceSymbol].byKey;
|
|
918
|
+
const direct = styleState;
|
|
919
|
+
const layers = direct.flatPropertyLayers ||= /* @__PURE__ */ new Map();
|
|
920
|
+
let applied = false;
|
|
921
|
+
for (const property in byKey) {
|
|
922
|
+
const previousLayer = layers.get(property);
|
|
923
|
+
if (previousLayer !== void 0 && previousLayer > sourceLayer) continue;
|
|
924
|
+
clearDirectStyle(styleState, property);
|
|
925
|
+
styleState.classNames[property] = byKey[property];
|
|
926
|
+
layers.set(property, sourceLayer);
|
|
927
|
+
const identifier = byKey[property];
|
|
928
|
+
const fallbackRules = getRulesForIdentifier(identifier);
|
|
929
|
+
const shouldInsert = styleState.styleProps.isStatic || shouldInsertStyleRules(identifier);
|
|
930
|
+
if (fallbackRules && shouldInsert) styleState.flatRulesToInsert[identifier] = [
|
|
931
|
+
property,
|
|
932
|
+
"",
|
|
933
|
+
identifier,
|
|
934
|
+
void 0,
|
|
935
|
+
fallbackRules
|
|
936
|
+
];
|
|
937
|
+
applied = true;
|
|
938
|
+
}
|
|
939
|
+
return applied;
|
|
940
|
+
}
|
|
941
|
+
function writeCapturedStyleRecord(slots, slot, source, sourceLayer) {
|
|
942
|
+
let list = slots.get(slot);
|
|
943
|
+
if (!list) slots.set(slot, list = []);
|
|
944
|
+
const flags = source[7] & 31;
|
|
945
|
+
const identity = source[3];
|
|
946
|
+
const condition = source[2];
|
|
947
|
+
for (let index = 0; index < list.length; index++) {
|
|
948
|
+
const entry = list[index];
|
|
949
|
+
const entryFlags = entry[7] & 31;
|
|
950
|
+
if ((entryFlags & (recordInline | recordCSS)) !== (flags & (recordInline | recordCSS))) continue;
|
|
951
|
+
if (entry[0] !== source[0]) continue;
|
|
952
|
+
if (flags & recordDefault) {
|
|
953
|
+
if (!(entryFlags & recordDefault) && (!entry[2] || entry[3] === identity)) return;
|
|
954
|
+
} else if (entryFlags & recordDefault && (!condition || entry[3] === identity)) {
|
|
955
|
+
list.splice(index--, 1);
|
|
956
|
+
continue;
|
|
957
|
+
}
|
|
958
|
+
if (entry[3] === identity) {
|
|
959
|
+
list.splice(index, 1);
|
|
960
|
+
break;
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
const next = [...source];
|
|
964
|
+
next[7] = flags | sourceLayer << 5;
|
|
965
|
+
list.push(next);
|
|
966
|
+
}
|
|
967
|
+
function mergeStyle(styleState, key, val, disableNormalize = false, originalVal) {
|
|
968
|
+
const { viewProps, styleProps, staticConfig } = styleState;
|
|
969
|
+
if (styleState.flatStyleStaticConfig.styledContextKeys?.has(key)) {
|
|
970
|
+
styleState.overriddenContextProps ||= {};
|
|
971
|
+
const originalFromState = styleState.originalContextPropValues?.[key];
|
|
972
|
+
styleState.overriddenContextProps[key] = originalVal ?? originalFromState ?? val;
|
|
973
|
+
}
|
|
974
|
+
if (key === "transform" || key in stylePropsTransform) {
|
|
975
|
+
styleState.transformAccumulator ||= createTransformAccumulator();
|
|
976
|
+
addTransformValue(styleState.transformAccumulator, key, val);
|
|
977
|
+
} else {
|
|
978
|
+
let out = !disableNormalize && !styleProps.noNormalize ? normalizeValueWithProperty(val, key) : val;
|
|
979
|
+
styleState.style ||= {};
|
|
980
|
+
styleState.style[key] = out;
|
|
981
|
+
if (shouldTrackStyleTokenProvenance) recordStyleTokenProvenance(styleState, key, originalVal);
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
function recordStyleTokenProvenance(styleState, key, originalVal) {
|
|
985
|
+
let tokenName = typeof originalVal === "string" ? originalVal : "";
|
|
986
|
+
if (tokenName) {
|
|
987
|
+
const slash = tokenName.lastIndexOf("/");
|
|
988
|
+
const opacity = slash === -1 ? NaN : Number(tokenName.slice(slash + 1));
|
|
989
|
+
if (Number.isInteger(opacity) && opacity >= 0 && opacity <= 100) tokenName = tokenName.slice(0, slash);
|
|
990
|
+
}
|
|
991
|
+
if (tokenName !== "" && (tokenName in styleState.theme || tokenName in (styleState.conf.themes?.[styleState.flatThemeName || ""] || {}) || Object.values(styleState.conf.tokensParsed).some((category) => tokenName in category))) (styleState.tokenProvenance ||= {})[key] = originalVal;
|
|
992
|
+
else if (styleState.tokenProvenance && key in styleState.tokenProvenance) delete styleState.tokenProvenance[key];
|
|
993
|
+
}
|
|
994
|
+
const resolveStyleObject = (styleState, styleIn) => {
|
|
995
|
+
const { conf, styleProps } = styleState;
|
|
996
|
+
const styleOut = {};
|
|
997
|
+
let originalValues;
|
|
998
|
+
const styleInOriginalValues = styleOriginalValues.get(styleIn);
|
|
999
|
+
const childState = {
|
|
1000
|
+
...styleState,
|
|
1001
|
+
classNames: {},
|
|
1002
|
+
flatShouldDoClasses: false,
|
|
1003
|
+
props: styleIn,
|
|
1004
|
+
style: styleOut,
|
|
1005
|
+
transformAccumulator: void 0
|
|
1006
|
+
};
|
|
1007
|
+
childState.flatAtomics = void 0;
|
|
1008
|
+
childState.flatSlots = void 0;
|
|
1009
|
+
childState.flatPropertyLayers = void 0;
|
|
1010
|
+
const mergeAccepted = (_state, key, value, disableNormalize, originalValue) => {
|
|
1011
|
+
styleOut[key] = disableNormalize || styleProps.noNormalize ? value : normalizeValueWithProperty(value, key);
|
|
1012
|
+
const trackedOriginal = styleInOriginalValues?.[key] ?? originalValue;
|
|
1013
|
+
if (trackedOriginal !== void 0) (originalValues ||= {})[key] = trackedOriginal;
|
|
1014
|
+
};
|
|
1015
|
+
for (let key in styleIn) {
|
|
1016
|
+
const value = styleIn[key];
|
|
1017
|
+
key = conf.shorthands[key] || key;
|
|
1018
|
+
if (key in skipProps || value == null) continue;
|
|
1019
|
+
contributeValue(childState, key, value);
|
|
1020
|
+
}
|
|
1021
|
+
completeResolvedStyles(childState, mergeAccepted);
|
|
1022
|
+
if (childState.transformAccumulator) styleOut.transform = finalizeTransformAccumulator(childState.transformAccumulator);
|
|
1023
|
+
if (originalValues) styleOriginalValues.set(styleOut, originalValues);
|
|
1024
|
+
return styleOut;
|
|
859
1025
|
};
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
1026
|
+
let frameSequence = 0;
|
|
1027
|
+
const recordInline = 1;
|
|
1028
|
+
const recordNormalize = 2;
|
|
1029
|
+
const recordRetract = 4;
|
|
1030
|
+
const recordDefault = 8;
|
|
1031
|
+
const recordCSS = 16;
|
|
1032
|
+
const webRTLRenames = {
|
|
1033
|
+
paddingStart: "paddingInlineStart",
|
|
1034
|
+
paddingEnd: "paddingInlineEnd",
|
|
1035
|
+
marginStart: "marginInlineStart",
|
|
1036
|
+
marginEnd: "marginInlineEnd",
|
|
1037
|
+
borderStartWidth: "borderInlineStartWidth",
|
|
1038
|
+
borderEndWidth: "borderInlineEndWidth",
|
|
1039
|
+
borderStartColor: "borderInlineStartColor",
|
|
1040
|
+
borderEndColor: "borderInlineEndColor",
|
|
1041
|
+
borderStartStyle: "borderInlineStartStyle",
|
|
1042
|
+
borderEndStyle: "borderInlineEndStyle",
|
|
1043
|
+
borderTopStartRadius: "borderStartStartRadius",
|
|
1044
|
+
borderTopEndRadius: "borderStartEndRadius",
|
|
1045
|
+
borderBottomStartRadius: "borderEndStartRadius",
|
|
1046
|
+
borderBottomEndRadius: "borderEndEndRadius",
|
|
1047
|
+
start: "insetInlineStart",
|
|
1048
|
+
end: "insetInlineEnd"
|
|
863
1049
|
};
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
function
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
}
|
|
906
|
-
|
|
1050
|
+
const webStyleProperties = /* @__PURE__ */ new Map();
|
|
1051
|
+
function webStyleProperty(property) {
|
|
1052
|
+
let web = webStyleProperties.get(property);
|
|
1053
|
+
if (web === void 0) {
|
|
1054
|
+
web = webRTLRenames[property] || (property === "writingDirection" ? "direction" : property.endsWith("Horizontal") ? `${property.slice(0, -10)}Inline` : property.endsWith("Vertical") ? `${property.slice(0, -8)}Block` : property);
|
|
1055
|
+
webStyleProperties.set(property, web);
|
|
1056
|
+
}
|
|
1057
|
+
return web;
|
|
1058
|
+
}
|
|
1059
|
+
const styleSlots = /* @__PURE__ */ new Map();
|
|
1060
|
+
function styleSlot(property) {
|
|
1061
|
+
let slot = styleSlots.get(property);
|
|
1062
|
+
if (slot === void 0) styleSlots.set(property, slot = classifyStyleSlot(property));
|
|
1063
|
+
return slot;
|
|
1064
|
+
}
|
|
1065
|
+
function classifyStyleSlot(property) {
|
|
1066
|
+
return property.startsWith("border") ? property.includes("Radius") ? "borderRadius" : "border" : property.startsWith("margin") ? "margin" : property.startsWith("padding") ? "padding" : property.startsWith("background") ? "background" : property.startsWith("textDecoration") ? "textDecoration" : property.includes("flex") ? "flex" : property.startsWith("transition") ? "transition" : property.startsWith("overflow") ? "overflow" : property === "top" || property === "right" || property === "bottom" || property === "left" || property.startsWith("inset") ? "inset" : property;
|
|
1067
|
+
}
|
|
1068
|
+
function writeStyleRecord(state, property, value, cursor, original, flags, conditionOverride = -1) {
|
|
1069
|
+
const condition = conditionOverride !== -1 ? conditionOverride : cursor ? cursor[conditionValue] : 0;
|
|
1070
|
+
const identity = cursor ? cursor[conditionKey] : "";
|
|
1071
|
+
const direct = state;
|
|
1072
|
+
const slots = direct.flatSlots ||= /* @__PURE__ */ new Map();
|
|
1073
|
+
const slot = canGenerateCSS && (state.flatShouldDoClasses || flags & recordCSS) ? styleSlot(property) : property.startsWith("transition") ? "transition" : property;
|
|
1074
|
+
let list = slots.get(slot);
|
|
1075
|
+
if (!list) slots.set(slot, list = []);
|
|
1076
|
+
for (let index = 0; index < list.length; index++) {
|
|
1077
|
+
const entry = list[index];
|
|
1078
|
+
const entryFlags = entry[7];
|
|
1079
|
+
if ((entryFlags & 17) !== (flags & 17)) continue;
|
|
1080
|
+
if (entry[0] !== property) 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
|
+
list.push([
|
|
1093
|
+
property,
|
|
1094
|
+
value,
|
|
1095
|
+
condition,
|
|
1096
|
+
identity,
|
|
1097
|
+
cursor ? cursor[conditionSelector] : "",
|
|
1098
|
+
cursor ? cursor[conditionWrappers] : void 0,
|
|
1099
|
+
original,
|
|
1100
|
+
flags | (state.flatPass?.[passSourceLayer] || 0) << 5
|
|
1101
|
+
]);
|
|
1102
|
+
}
|
|
1103
|
+
function streamWriteInline(state, property, value, cursor, original, normalize = property === "lineHeight", conditionOverride = -1, force = false) {
|
|
1104
|
+
writeStyleRecord(state, property, value, cursor, original, (normalize ? recordNormalize : 0) | (force ? recordInline : 0), conditionOverride);
|
|
1105
|
+
}
|
|
1106
|
+
function completeResolvedStyles(state, merge = mergeStyle) {
|
|
1107
|
+
const direct = state;
|
|
1108
|
+
const shadow = direct.flatWebShadow;
|
|
1109
|
+
if (shadow && (direct.flatBoxShadowSequence || 0) <= shadow[4]) {
|
|
1110
|
+
const offset = shadow[1] || {
|
|
1111
|
+
width: 0,
|
|
1112
|
+
height: 0
|
|
1113
|
+
};
|
|
1114
|
+
const color = normalizeColor(shadow[0], shadow[2] ?? 1);
|
|
1115
|
+
if (color) {
|
|
1116
|
+
const next = `${shadowUnit(offset.width)} ${shadowUnit(offset.height)} ${shadowUnit(shadow[3])} ${color}`;
|
|
1117
|
+
emitProperty(state, "boxShadow", direct.flatBoxShadow ? `${direct.flatBoxShadow}, ${next}` : next, null, shadow[5], shadow[6]);
|
|
1118
|
+
}
|
|
1119
|
+
direct.flatWebShadow = void 0;
|
|
1120
|
+
}
|
|
1121
|
+
if (state.flatShouldDoClasses && state.transformAccumulator) {
|
|
1122
|
+
const transform = finalizeTransformAccumulator(state.transformAccumulator);
|
|
1123
|
+
state.transformAccumulator = void 0;
|
|
1124
|
+
writeStyleRecord(state, "transform", Array.isArray(transform) ? transformsToString(transform) : transform, null, transform, 0);
|
|
1125
|
+
}
|
|
1126
|
+
const slots = direct.flatSlots;
|
|
1127
|
+
if (!slots) return;
|
|
1128
|
+
const capture = state.staticConfig.isHOC ? direct.flatCapturedSlots ||= /* @__PURE__ */ new Map() : void 0;
|
|
1129
|
+
for (const [property, entries] of slots) {
|
|
1130
|
+
let cssEntries;
|
|
1131
|
+
let inlineWinner;
|
|
1132
|
+
let importance = -1;
|
|
1133
|
+
for (let index = 0; index < entries.length; index++) {
|
|
1134
|
+
const entry = entries[index];
|
|
1135
|
+
const flags = entry[7];
|
|
1136
|
+
if (flags & recordCSS || state.flatShouldDoClasses && !(flags & recordInline)) {
|
|
1137
|
+
cssEntries ||= [];
|
|
1138
|
+
const precedence = entry[2] ? Math.floor(entry[2] / 256) : -1;
|
|
1139
|
+
const layer = flags >> 5;
|
|
1140
|
+
let index2 = cssEntries.length;
|
|
1141
|
+
while (index2 > 0) {
|
|
1142
|
+
const before = cssEntries[index2 - 1];
|
|
1143
|
+
const beforeLayer = before[7] >> 5;
|
|
1144
|
+
if (beforeLayer < layer || beforeLayer === layer && (before[2] ? Math.floor(before[2] / 256) : -1) <= precedence) break;
|
|
1145
|
+
index2--;
|
|
1146
|
+
}
|
|
1147
|
+
if (index2 === cssEntries.length) cssEntries.push(entry);
|
|
1148
|
+
else cssEntries.splice(index2, 0, entry);
|
|
1149
|
+
} else if (!entry[2] || entry[2] & 1) {
|
|
1150
|
+
const next = entry[2] ? Math.floor(entry[2] / 256) : 0;
|
|
1151
|
+
if (next >= importance) {
|
|
1152
|
+
importance = next;
|
|
1153
|
+
inlineWinner = entry;
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
if (cssEntries) {
|
|
1158
|
+
registerAtomicSlot(direct, property, cssEntries);
|
|
1159
|
+
if (capture) {
|
|
1160
|
+
for (const entry of cssEntries) entry[7] = entry[7] | recordCSS;
|
|
1161
|
+
capture.set(property, cssEntries);
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
if (inlineWinner) if (inlineWinner[7] & recordRetract) {
|
|
1165
|
+
if (state.style) delete state.style[inlineWinner[0]];
|
|
1166
|
+
} else merge(state, inlineWinner[0], inlineWinner[1], !(inlineWinner[7] & recordNormalize), inlineWinner[6] !== void 0 ? inlineWinner[6] : inlineWinner[1]);
|
|
1167
|
+
}
|
|
1168
|
+
direct.flatSlots = void 0;
|
|
1169
|
+
}
|
|
1170
|
+
function emitAtParentCondition(state, property, value, originalValue, contextOnly) {
|
|
1171
|
+
const cursor = state.flatPass?.[passParentCursor];
|
|
1172
|
+
if (cursor) emitUnderCondition(state, property, value, cursor, originalValue, contextOnly, 0, value);
|
|
1173
|
+
else emitValue(state, property, value, null, originalValue, contextOnly);
|
|
1174
|
+
}
|
|
1175
|
+
function emitUnderCondition(state, property, value, cursor, originalValue, contextOnly, warnMode, warnSource) {
|
|
1176
|
+
const condition = cursor[conditionValue];
|
|
1177
|
+
if (!(condition & conditionResolvedFlag)) {
|
|
1178
|
+
if (warnMode && process.env.NODE_ENV !== "production") warnRefusedValue(property, warnSource, `unknown modifier "${cursor.problem}"`);
|
|
1179
|
+
return 0;
|
|
1180
|
+
}
|
|
1181
|
+
emitValue(state, property, value, cursor, warnMode === 2 ? originalValue : originalValue ?? value, contextOnly);
|
|
1182
|
+
if (condition & 2) {
|
|
1183
|
+
if (condition & 4) state.flatHasEnterStyle = true;
|
|
1184
|
+
if (condition & conditionPlatformPseudoFlag) state.flatHasPlatformPseudo = true;
|
|
1185
|
+
}
|
|
1186
|
+
return condition;
|
|
1187
|
+
}
|
|
1188
|
+
const formatScanFailure = (failure, source, failureIndex) => 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 \"(\"";
|
|
1189
|
+
const warnScanFailure = (property, source, failure, failureIndex) => {
|
|
1190
|
+
if (process.env.NODE_ENV === "development") warnRefusedValue(property, source, formatScanFailure(failure, source, failureIndex));
|
|
1191
|
+
};
|
|
1192
|
+
let valueCacheConf;
|
|
1193
|
+
let valueCacheRevision = -1;
|
|
1194
|
+
let valueCaches = /* @__PURE__ */ new WeakMap();
|
|
1195
|
+
let valueCacheEntries = 0;
|
|
1196
|
+
const valueCacheRoot = {};
|
|
1197
|
+
const parsedSlices = /* @__PURE__ */ new WeakMap();
|
|
1198
|
+
function configuredValue(state, property, raw, embedded = false) {
|
|
1199
|
+
const grammar = getConfigRevisionState(state.conf);
|
|
1200
|
+
let name = raw;
|
|
1201
|
+
let opacity;
|
|
1202
|
+
const slash = raw.lastIndexOf("/");
|
|
1203
|
+
if (slash > 0) {
|
|
1204
|
+
const amount = Number(raw.slice(slash + 1));
|
|
1205
|
+
if (Number.isInteger(amount) && amount >= 0 && amount <= 100) {
|
|
1206
|
+
name = raw.slice(0, slash);
|
|
1207
|
+
opacity = amount;
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
const safeArea = grammar.safeAreaVariable(name);
|
|
1211
|
+
if (safeArea !== void 0) {
|
|
1212
|
+
state.flatUsesSafeArea = true;
|
|
1213
|
+
return safeArea;
|
|
1214
|
+
}
|
|
1215
|
+
const fontProperty = property.startsWith("font") || property === "lineHeight" || property === "letterSpacing";
|
|
1216
|
+
const resolveValues = state.styleProps.resolveValues;
|
|
1217
|
+
let byRaw;
|
|
1218
|
+
if (!fontProperty) {
|
|
1219
|
+
const revision = grammar.revision;
|
|
1220
|
+
if (state.conf !== valueCacheConf || revision !== valueCacheRevision) {
|
|
1221
|
+
valueCacheConf = state.conf;
|
|
1222
|
+
valueCacheRevision = revision;
|
|
1223
|
+
valueCaches = /* @__PURE__ */ new WeakMap();
|
|
1224
|
+
valueCacheEntries = 0;
|
|
1225
|
+
state.flatValueScope = void 0;
|
|
1226
|
+
}
|
|
1227
|
+
const direct = state;
|
|
1228
|
+
let scope = direct.flatValueScope;
|
|
1229
|
+
if (scope === void 0) {
|
|
1230
|
+
const themeObject = state.theme && typeof state.theme === "object" ? state.theme : valueCacheRoot;
|
|
1231
|
+
let byScope = valueCaches.get(themeObject);
|
|
1232
|
+
if (!byScope) valueCaches.set(themeObject, byScope = /* @__PURE__ */ new Map());
|
|
1233
|
+
const scopeKey = `${state.flatThemeName || ""}${resolveValues}`;
|
|
1234
|
+
scope = byScope.get(scopeKey);
|
|
1235
|
+
if (!scope) byScope.set(scopeKey, scope = /* @__PURE__ */ new Map());
|
|
1236
|
+
direct.flatValueScope = scope;
|
|
1237
|
+
}
|
|
1238
|
+
let maps = scope.get(property);
|
|
1239
|
+
if (maps === void 0) scope.set(property, maps = { direct: /* @__PURE__ */ new Map() });
|
|
1240
|
+
byRaw = embedded ? maps.embedded ||= /* @__PURE__ */ new Map() : maps.direct;
|
|
1241
|
+
const known = byRaw.get(raw);
|
|
1242
|
+
if (known !== void 0 || byRaw.has(raw)) return known;
|
|
1243
|
+
}
|
|
1244
|
+
let lookupName = name.charCodeAt(0) === 36 ? name.slice(1) : name;
|
|
1245
|
+
let value;
|
|
1246
|
+
let fromTheme = false;
|
|
1247
|
+
if (property === "fontFamily") value = state.conf.fontsParsed[lookupName]?.family;
|
|
1248
|
+
else {
|
|
1249
|
+
const fontKey = property === "fontSize" ? "size" : property === "fontWeight" ? "weight" : property === "lineHeight" || property === "letterSpacing" ? property : "";
|
|
1250
|
+
if (fontKey) value = (state.conf.fontsParsed[state.fontFamily || state.conf.defaultFontToken] || state.conf.fontsParsed[state.conf.defaultFontToken])?.[fontKey]?.[lookupName];
|
|
1251
|
+
else {
|
|
1252
|
+
const category = grammar.tokenCategory(property);
|
|
1253
|
+
const dot = lookupName.indexOf(".");
|
|
1254
|
+
if (dot !== -1) {
|
|
1255
|
+
const prefix = lookupName.slice(0, dot);
|
|
1256
|
+
if (!category || prefix === category || prefix === "color") lookupName = lookupName.slice(dot + 1);
|
|
1257
|
+
}
|
|
1258
|
+
value = category ? state.conf.tokensParsed[category]?.[lookupName] : void 0;
|
|
1259
|
+
if (!value) {
|
|
1260
|
+
const first = lookupName.charCodeAt(0);
|
|
1261
|
+
if (category || !(first >= 48 && first <= 57 || first === 43 || first === 45 || first === 46)) {
|
|
1262
|
+
value = state.theme?.[lookupName] || state.conf.themes?.[state.flatThemeName || ""]?.[lookupName];
|
|
1263
|
+
fromTheme = !!value;
|
|
1264
|
+
if (!value && !category) value = state.conf.tokensParsed.space?.[lookupName] || state.conf.tokensParsed.color?.[lookupName];
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
if (process.env.NODE_ENV === "development") {
|
|
1270
|
+
const category = grammar.tokenCategory(property);
|
|
1271
|
+
if (category && category !== "color" && state.conf.tokensParsed.color?.[name]) warnOnce(`"${name}" contributes to "color", not "${property}"`);
|
|
1272
|
+
}
|
|
1273
|
+
let out = raw;
|
|
1274
|
+
if (isVariable(value)) {
|
|
1275
|
+
out = resolveValues === "except-theme" && fromTheme ? `${THEME_REF_PREFIX}${lookupName}${opacity !== void 0 ? `/${opacity}` : ""}` : resolveVariableValue(property, value, resolveValues);
|
|
1276
|
+
if (opacity !== void 0) out = `color-mix(in srgb, ${out} ${opacity}%, transparent)`;
|
|
1277
|
+
}
|
|
1278
|
+
if (embedded && out === raw) {
|
|
1279
|
+
const usedSafeArea = state.flatUsesSafeArea;
|
|
1280
|
+
out = grammar.embeddedTokens(raw, (word) => configuredValue(state, property, word));
|
|
1281
|
+
if (!usedSafeArea && state.flatUsesSafeArea) return out;
|
|
1282
|
+
}
|
|
1283
|
+
if (!fontProperty && !fromTheme) if (valueCacheEntries > 8192) {
|
|
1284
|
+
valueCaches = /* @__PURE__ */ new WeakMap();
|
|
1285
|
+
valueCacheEntries = 0;
|
|
1286
|
+
} else {
|
|
1287
|
+
valueCacheEntries++;
|
|
1288
|
+
byRaw.set(raw, out);
|
|
1289
|
+
}
|
|
1290
|
+
return out;
|
|
1291
|
+
}
|
|
1292
|
+
function ownsSourceLayer(state, property, conditional = false) {
|
|
1293
|
+
const direct = state;
|
|
1294
|
+
const layer = direct.flatPass?.[passSourceLayer] || 0;
|
|
1295
|
+
const layers = direct.flatPropertyLayers ||= /* @__PURE__ */ new Map();
|
|
1296
|
+
const previous = layers.get(property);
|
|
1297
|
+
if (previous !== void 0) {
|
|
1298
|
+
if (previous > layer) return false;
|
|
1299
|
+
if (previous < layer) {
|
|
1300
|
+
if (conditional) return true;
|
|
1301
|
+
clearDirectStyle(state, property);
|
|
1302
|
+
}
|
|
1303
|
+
} else if (conditional) return true;
|
|
1304
|
+
layers.set(property, layer);
|
|
1305
|
+
return true;
|
|
1306
|
+
}
|
|
1307
|
+
function emitProperty(state, property, value, cursor, originalValue, contextOnly) {
|
|
1308
|
+
if (!ownsSourceLayer(state, property, cursor !== null)) return;
|
|
1309
|
+
const direct = state;
|
|
1310
|
+
const condition = cursor ? cursor[conditionValue] : 0;
|
|
1311
|
+
if (condition && (!(condition & 2) || !(condition & 1) && !(canGenerateCSS && state.flatShouldDoClasses) && true)) return;
|
|
1312
|
+
if (value === false && !condition) {
|
|
1313
|
+
clearDirectStyle(state, property);
|
|
1314
|
+
if (direct.flatStyleStaticConfig?.styledContextKeys?.has(property)) (state.overriddenContextProps ||= {})[property] = false;
|
|
1315
|
+
return;
|
|
1316
|
+
}
|
|
1317
|
+
if (condition & 4) (state.flatEnterKeys ||= /* @__PURE__ */ new Set()).add(property);
|
|
1318
|
+
if (condition & 8) (state.flatExitKeys ||= /* @__PURE__ */ new Set()).add(property);
|
|
1319
|
+
cursor && cursor[conditionTheme];
|
|
1320
|
+
if (contextOnly) {
|
|
1321
|
+
if (!condition || condition & 1) (state.overriddenContextProps ||= {})[property] = originalValue;
|
|
1322
|
+
return;
|
|
1323
|
+
}
|
|
1324
|
+
if (canGenerateCSS && state.flatShouldDoClasses && !condition && property === "transform") {
|
|
1325
|
+
if (process.env.NODE_ENV === "development" && state.transformAccumulator) for (const part of getTransformPartKeys(state.transformAccumulator)) warnOnce(`legacy transform part "${part}" is dropped because "transform" owns the property`);
|
|
1326
|
+
state.transformAccumulator ||= createTransformAccumulator();
|
|
1327
|
+
addTransformValue(state.transformAccumulator, property, value);
|
|
1328
|
+
return;
|
|
1329
|
+
}
|
|
1330
|
+
const shouldPromoteAnimatedStyle = canGenerateCSS && !condition && !state.flatShouldDoClasses && !state.styleProps.noMergeStyle && state.styleProps.isAnimated && state.animationDriver?.inputStyle === "css" && property in nonAnimatableStyleProps;
|
|
1331
|
+
if (canGenerateCSS && (state.flatShouldDoClasses || shouldPromoteAnimatedStyle)) {
|
|
1332
|
+
writeStyleRecord(state, property, value, cursor, originalValue, shouldPromoteAnimatedStyle ? recordCSS : 0);
|
|
1333
|
+
return;
|
|
1334
|
+
}
|
|
1335
|
+
streamWriteInline(state, property, value, cursor, originalValue);
|
|
1336
|
+
}
|
|
1337
|
+
function numericUnitValue(value, first, second) {
|
|
1338
|
+
return value.length > first.length && (value.endsWith(first) || value.endsWith(second)) ? +value.slice(0, -first.length) : NaN;
|
|
1339
|
+
}
|
|
1340
|
+
function resolveNumericValue(value) {
|
|
1341
|
+
const unitValue = numericUnitValue(value, "px", "dp");
|
|
1342
|
+
if (Number.isFinite(unitValue)) return unitValue;
|
|
1343
|
+
const numeric = +value;
|
|
1344
|
+
return Number.isFinite(numeric) ? numeric : value;
|
|
1345
|
+
}
|
|
1346
|
+
function emitResolved(state, property, raw, cursor, originalValue, contextOnly) {
|
|
1347
|
+
emitProperty(state, property, resolveValue(state, property, raw), cursor, originalValue, contextOnly);
|
|
1348
|
+
}
|
|
1349
|
+
function resolveValue(state, property, raw) {
|
|
1350
|
+
let value = typeof raw === "string" ? configuredValue(state, property, raw, true) : raw;
|
|
1351
|
+
if (!state.flatShouldDoClasses && typeof value === "string" && value !== "") value = resolveNumericValue(value);
|
|
1352
|
+
return value;
|
|
1353
|
+
}
|
|
1354
|
+
function shadowUnit(part) {
|
|
1355
|
+
return typeof part === "number" ? `${part}px` : part || "0px";
|
|
1356
|
+
}
|
|
1357
|
+
function emitWebTextShadow(state, property, value, originalValue, contextOnly) {
|
|
1358
|
+
const shadow = state.flatTextShadow ||= {};
|
|
1359
|
+
shadow[property] = value;
|
|
1360
|
+
const offset = shadow.textShadowOffset || {
|
|
1361
|
+
width: 0,
|
|
1362
|
+
height: 0
|
|
1363
|
+
};
|
|
1364
|
+
if (!shadow.textShadowColor) return;
|
|
1365
|
+
emitProperty(state, "textShadow", `${shadowUnit(offset.width)} ${shadowUnit(offset.height)} ${shadowUnit(shadow.textShadowRadius)} ${shadow.textShadowColor}`, null, originalValue, contextOnly);
|
|
1366
|
+
}
|
|
1367
|
+
function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
|
|
1368
|
+
const condition = cursor ? cursor[conditionValue] : 0;
|
|
1369
|
+
const grammar = getConfigRevisionState(state.conf);
|
|
1370
|
+
property = webStyleProperty(property);
|
|
1371
|
+
if (property === "backdropFilter") emitValue(state, "WebkitBackdropFilter", raw, cursor, originalValue, contextOnly);
|
|
1372
|
+
if (isVariable(raw)) raw = resolveVariableValue(property, raw, state.styleProps.resolveValues);
|
|
1373
|
+
if (typeof raw === "string" && (property === "transition" || property === "transitionProperty")) raw = grammar.normalizeTransition(raw);
|
|
1374
|
+
if ((property === "borderWidth" || property === "borderTopWidth" || property === "borderRightWidth" || property === "borderBottomWidth" || property === "borderLeftWidth") && state.styleProps.noNormalize !== false) writeStyleRecord(state, property.slice(0, -5) + "Style", "solid", cursor, originalValue, recordDefault);
|
|
1375
|
+
const propertyKind = grammar.propertyKind(property);
|
|
1376
|
+
if (propertyKind >= 7 && typeof raw === "string") {
|
|
1377
|
+
const composite = grammar.compositeValue(property, raw, state, configuredValue);
|
|
1378
|
+
if (composite !== void 0) {
|
|
1379
|
+
emitProperty(state, property, composite, cursor, originalValue, contextOnly);
|
|
1380
|
+
return;
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
if (propertyKind === 5) {
|
|
1384
|
+
const value2 = typeof raw === "string" ? configuredValue(state, property, raw) : raw;
|
|
1385
|
+
if (canGenerateCSS && state.flatShouldDoClasses && !condition) {
|
|
1386
|
+
state.transformAccumulator ||= createTransformAccumulator();
|
|
1387
|
+
addTransformValue(state.transformAccumulator, property, value2);
|
|
1388
|
+
} else if (condition && canGenerateCSS && state.flatShouldDoClasses) emitProperty(state, "transform", `${property}(${value2})`, cursor, originalValue, contextOnly);
|
|
1389
|
+
else streamWriteInline(state, property, value2, cursor, originalValue, true);
|
|
1390
|
+
return;
|
|
1391
|
+
}
|
|
1392
|
+
{
|
|
1393
|
+
const webShadowPart = propertyKind < 5 ? propertyKind : 0;
|
|
1394
|
+
if (webShadowPart || propertyKind === 6) {
|
|
1395
|
+
const value2 = typeof raw === "string" ? configuredValue(state, property, raw) : raw;
|
|
1396
|
+
if (state.styleProps.noNormalize !== false) if (webShadowPart) {
|
|
1397
|
+
const shadow = state.flatWebShadow ||= [];
|
|
1398
|
+
shadow[webShadowPart - 1] = value2;
|
|
1399
|
+
shadow[4] = ++frameSequence;
|
|
1400
|
+
shadow[5] = originalValue;
|
|
1401
|
+
shadow[6] = contextOnly;
|
|
1402
|
+
} else emitWebTextShadow(state, property, value2, originalValue, contextOnly);
|
|
1403
|
+
else streamWriteInline(state, property, value2, cursor, originalValue, true, -1, true);
|
|
1404
|
+
return;
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
if (property === "transform") {
|
|
1408
|
+
if (canGenerateCSS && state.flatShouldDoClasses && Array.isArray(raw)) raw = transformsToString(raw);
|
|
1409
|
+
}
|
|
1410
|
+
if (typeof raw === "string" && property === "background") {
|
|
1411
|
+
const parts = splitComponents(raw);
|
|
1412
|
+
if (parts.length === 1 && !startsValueFunction(parts[0])) {
|
|
1413
|
+
emitResolved(state, "backgroundColor", parts[0], cursor, originalValue, contextOnly);
|
|
1414
|
+
return;
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
if (property === "x" || property === "y" || property === "scale" || property === "scaleX" || property === "scaleY" || property === "rotate") {
|
|
1418
|
+
let value2 = typeof raw === "string" ? configuredValue(state, property, raw) : raw;
|
|
1419
|
+
if (!state.flatShouldDoClasses && typeof value2 === "string" && !value2.startsWith(THEME_REF_PREFIX)) {
|
|
1420
|
+
if (property === "rotate" && !Number.isFinite(numericUnitValue(value2, "deg", "rad")) && !startsValueFunction(value2)) {
|
|
1421
|
+
if (process.env.NODE_ENV === "development") warnOnce(`native transform "${property}" cannot represent "${value2}"; dropping it`);
|
|
1422
|
+
if (condition & 1) {
|
|
1423
|
+
removeTransformValue(state.transformAccumulator, property);
|
|
1424
|
+
writeStyleRecord(state, property, void 0, cursor, void 0, recordRetract);
|
|
1425
|
+
}
|
|
1426
|
+
return;
|
|
1427
|
+
}
|
|
1428
|
+
value2 = resolveNumericValue(value2);
|
|
1429
|
+
}
|
|
1430
|
+
if (!canGenerateCSS || !state.flatShouldDoClasses) {
|
|
1431
|
+
emitProperty(state, property, value2, cursor, originalValue, contextOnly);
|
|
1432
|
+
return;
|
|
1433
|
+
}
|
|
1434
|
+
const targets = property === "scale" ? ["--t-scale-x", "--t-scale-y"] : [property === "x" ? "--t-x" : property === "y" ? "--t-y" : property === "scaleX" ? "--t-scale-x" : property === "scaleY" ? "--t-scale-y" : "rotate"];
|
|
1435
|
+
for (const target of targets) {
|
|
1436
|
+
let targetValue = value2;
|
|
1437
|
+
if (typeof targetValue === "number") {
|
|
1438
|
+
if (target === "--t-x" || target === "--t-y") targetValue = `${targetValue}px`;
|
|
1439
|
+
else if (target === "rotate") targetValue = `${targetValue}deg`;
|
|
1440
|
+
}
|
|
1441
|
+
emitProperty(state, target, targetValue, cursor, originalValue, contextOnly);
|
|
1442
|
+
if (target === "--t-x" || target === "--t-y") addComposition(state, "translate");
|
|
1443
|
+
else if (target.startsWith("--t-scale")) addComposition(state, "scale");
|
|
1444
|
+
}
|
|
1445
|
+
return;
|
|
1446
|
+
}
|
|
1447
|
+
if (property === "borderRadius" && !state.flatShouldDoClasses && !condition) {
|
|
1448
|
+
if (typeof raw === "string") emitResolved(state, property, raw, cursor, originalValue, contextOnly);
|
|
1449
|
+
else emitProperty(state, property, raw, cursor, originalValue, contextOnly);
|
|
1450
|
+
return;
|
|
1451
|
+
}
|
|
1452
|
+
let value = resolveValue(state, property, raw);
|
|
1453
|
+
if (canGenerateCSS && state.flatShouldDoClasses && property === "boxShadow" && !condition) {
|
|
1454
|
+
state.flatBoxShadow = value;
|
|
1455
|
+
state.flatBoxShadowSequence = frameSequence + 1;
|
|
1456
|
+
}
|
|
1457
|
+
if (!state.styleProps.noExpand && property === "flex" && typeof value === "number") {
|
|
1458
|
+
const compat = state.conf.settings.styleCompat;
|
|
1459
|
+
value = value === -1 ? "0 auto" : compat === "legacy" ? `${value} auto` : compat && compat !== "web" ? value > 0 ? `${value} 0 0` : `0 ${-value} auto` : value < 0 ? value : `${value} 0px`;
|
|
1460
|
+
}
|
|
1461
|
+
emitProperty(state, property, value, cursor, originalValue, contextOnly);
|
|
1462
|
+
}
|
|
1463
|
+
function emitConditionalValue(state, property, payload, condition, source, sink, mode, contextOnly) {
|
|
1464
|
+
if (sink) sink(payload, condition, source);
|
|
1465
|
+
else if (condition) emitUnderCondition(state, property, payload, condition, mode === 2 ? payload : void 0, contextOnly, mode, source);
|
|
1466
|
+
else emitValue(state, property, payload, null, payload, contextOnly);
|
|
1467
|
+
}
|
|
1468
|
+
function walkConditionalValue(state, property, value, parent, sink, warnMode = 0, contextOnly = false) {
|
|
1469
|
+
const parentCondition = parent || null;
|
|
1470
|
+
let hasBase = false;
|
|
1471
|
+
let conditions = 0;
|
|
1472
|
+
let lastPayload = "";
|
|
1473
|
+
if (typeof value === "string") {
|
|
1474
|
+
const parsed = getConfigRevisionState(state.conf).parseFlatValue(value);
|
|
1475
|
+
const [segments, failure, failureIndex] = parsed;
|
|
1476
|
+
let slices = parsedSlices.get(parsed);
|
|
1477
|
+
if (slices === void 0) parsedSlices.set(parsed, slices = []);
|
|
1478
|
+
const chainCount = segments.length / 5 - 1;
|
|
1479
|
+
if (property === "aspectRatio" && chainCount === 1) {
|
|
1480
|
+
const left = Number(value.slice(segments[7], segments[8]));
|
|
1481
|
+
const right = Number(value.slice(segments[5], segments[6]));
|
|
1482
|
+
if (left > 0 && right > 0 && Number.isFinite(left) && Number.isFinite(right)) return false;
|
|
1483
|
+
}
|
|
1484
|
+
for (let index = 0; index < segments.length; index += 5) {
|
|
1485
|
+
const start = segments[index];
|
|
1486
|
+
const end = segments[index + 1];
|
|
1487
|
+
const flags = segments[index + 4];
|
|
1488
|
+
if (!(flags & 1)) continue;
|
|
1489
|
+
if (start === end) continue;
|
|
1490
|
+
if (flags & 2) {
|
|
1491
|
+
const payload = slices[index] ??= value.slice(start, end);
|
|
1492
|
+
emitConditionalValue(state, property, payload, parentCondition, payload, sink, warnMode, contextOnly);
|
|
1493
|
+
hasBase = true;
|
|
1494
|
+
} else if (process.env.NODE_ENV !== "production" && warnMode && !chainCount && (failure === "invalid-character" || failure === "stray-comment-close")) {
|
|
1495
|
+
emitConditionalValue(state, property, value, parentCondition, value, sink, warnMode, contextOnly);
|
|
1496
|
+
hasBase = true;
|
|
1497
|
+
} else if (warnMode) warnScanFailure(property, value, failure, failureIndex);
|
|
1498
|
+
}
|
|
1499
|
+
let lastPayloadStart = 0;
|
|
1500
|
+
for (let index = 0; index < segments.length; index += 5) {
|
|
1501
|
+
const start = segments[index];
|
|
1502
|
+
const end = segments[index + 1];
|
|
1503
|
+
const flags = segments[index + 4];
|
|
1504
|
+
if (flags & 1) continue;
|
|
1505
|
+
if (!(flags & 4) || !(flags & 2)) {
|
|
1506
|
+
if (warnMode) warnScanFailure(property, value, failure, failureIndex);
|
|
1507
|
+
continue;
|
|
1508
|
+
}
|
|
1509
|
+
lastPayloadStart = start;
|
|
1510
|
+
if (start === end) {
|
|
1511
|
+
if (warnMode && process.env.NODE_ENV === "development") warnRefusedValue(property, value, "a conditional clause has no value");
|
|
1512
|
+
continue;
|
|
1513
|
+
}
|
|
1514
|
+
const cursor = conditionFromKey(state, slices[index + 2] ??= value.slice(segments[index + 2], segments[index + 3]), parentCondition);
|
|
1515
|
+
conditions |= cursor[conditionValue];
|
|
1516
|
+
if (cursor[conditionValue] & conditionResolvedFlag || warnMode) emitConditionalValue(state, property, slices[index] ??= value.slice(start, end), cursor, value, sink, warnMode, contextOnly);
|
|
1517
|
+
}
|
|
1518
|
+
if (process.env.NODE_ENV !== "production") lastPayload = value.slice(lastPayloadStart);
|
|
1519
|
+
} else {
|
|
1520
|
+
if (!value || typeof value !== "object" || Array.isArray(value) || isVariable(value) || !classifyConditionalObject(value, state)) return false;
|
|
1521
|
+
if (value.default != null) {
|
|
1522
|
+
emitConditionalValue(state, property, value.default, parentCondition, value.default, sink, warnMode, contextOnly);
|
|
1523
|
+
hasBase = true;
|
|
1524
|
+
}
|
|
1525
|
+
for (const key in value) {
|
|
1526
|
+
if (key === "default" || value[key] == null) continue;
|
|
1527
|
+
const cursor = conditionFromKey(state, key, parentCondition);
|
|
1528
|
+
conditions |= cursor[conditionValue];
|
|
1529
|
+
if (cursor[conditionValue] & conditionResolvedFlag || warnMode) emitConditionalValue(state, property, value[key], cursor, value[key], sink, warnMode, contextOnly);
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
if (warnMode && process.env.NODE_ENV === "development" && typeof value === "string" && !hasBase && conditions && getConfigRevisionState(state.conf).tokenCategory(property) && splitComponents(lastPayload).length > 1) warnOnce(`${property}="${value}" has multiple values after its first conditional. Write the base value before the first conditional.`);
|
|
1533
|
+
if (warnMode === 1 && (!canGenerateCSS || !state.flatShouldDoClasses) && conditions & 12 && !hasBase) {
|
|
1534
|
+
const resting = property === "opacity" || property.startsWith("scale") ? 1 : property === "rotate" ? "0deg" : property === "x" || property === "y" ? 0 : null;
|
|
1535
|
+
if (resting !== null && !state.flatPropertyLayers?.has(property)) emitConditionalValue(state, property, resting, parentCondition, resting, sink, warnMode, contextOnly);
|
|
1536
|
+
}
|
|
1537
|
+
return true;
|
|
1538
|
+
}
|
|
1539
|
+
function contributeValue(state, property, value, originalValue, contextOnly = false, condition) {
|
|
1540
|
+
if (condition !== void 0) {
|
|
1541
|
+
const parent2 = state.flatPass?.[passParentCursor] || null;
|
|
1542
|
+
let effective;
|
|
1543
|
+
if (typeof condition === "string") effective = conditionFromKey(state, condition, parent2);
|
|
1544
|
+
else if (parent2) {
|
|
1545
|
+
effective = conditionFromKey(state, condition[conditionKey], parent2);
|
|
1546
|
+
if (!(condition[conditionValue] & conditionResolvedFlag)) setConditionUnresolved(effective);
|
|
1547
|
+
commitCondition(effective);
|
|
1548
|
+
} else effective = condition;
|
|
1549
|
+
if (typeof value !== "string" && walkConditionalValue(state, property, value, effective, null, 2, contextOnly)) return true;
|
|
1550
|
+
emitUnderCondition(state, property, value, effective, originalValue, contextOnly, 2, value);
|
|
1551
|
+
return true;
|
|
1552
|
+
}
|
|
1553
|
+
const compositeKind = getConfigRevisionState(state.conf).propertyKind(property);
|
|
1554
|
+
if (compositeKind > 0 && compositeKind < 6 && (typeof value === "string" && value.indexOf(":") !== -1 || value && typeof value === "object" && !Array.isArray(value) && !isVariable(value) && classifyConditionalObject(value, state))) {
|
|
1555
|
+
if (process.env.NODE_ENV === "development") warnOnce(`conditional "${property}" needs its composite property; dropping it`);
|
|
1556
|
+
return true;
|
|
1557
|
+
}
|
|
1558
|
+
if (value === "safe") {
|
|
1559
|
+
const expanded = getConfigRevisionState(state.conf).expandSafeArea(property);
|
|
1560
|
+
if (expanded) {
|
|
1561
|
+
state.flatUsesSafeArea = true;
|
|
1562
|
+
for (const [key, resolved] of expanded) emitAtParentCondition(state, key, resolved, originalValue ?? value, contextOnly);
|
|
1563
|
+
return true;
|
|
1564
|
+
}
|
|
1565
|
+
}
|
|
1566
|
+
if (walkConditionalValue(state, property, value, state.flatPass?.[passParentCursor] || null, null, 1, contextOnly)) return true;
|
|
1567
|
+
if (value != null) {
|
|
1568
|
+
emitAtParentCondition(state, property, value, originalValue ?? value, contextOnly);
|
|
1569
|
+
return true;
|
|
1570
|
+
}
|
|
1571
|
+
return false;
|
|
1572
|
+
}
|
|
1573
|
+
function clearDirectStyle(state, property) {
|
|
1574
|
+
const direct = state;
|
|
1575
|
+
property = webStyleProperty(property);
|
|
1576
|
+
const propertyKind = getConfigRevisionState(state.conf).propertyKind(property);
|
|
1577
|
+
const atomicKey = property.startsWith("transition") ? "transition" : propertyKind > 0 && propertyKind < 5 ? "boxShadow" : propertyKind === 6 ? "textShadow" : propertyKind === 5 ? "transform" : property;
|
|
1578
|
+
const slot = styleSlot(atomicKey);
|
|
1579
|
+
direct.flatAtomics?.delete(slot);
|
|
1580
|
+
if (direct.flatSlots) {
|
|
1581
|
+
if (slot !== atomicKey) {
|
|
1582
|
+
const entries = direct.flatSlots.get(slot);
|
|
1583
|
+
if (entries) {
|
|
1584
|
+
for (let index = entries.length; index--;) if (entries[index][0] === atomicKey) entries.splice(index, 1);
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
direct.flatSlots.delete(atomicKey);
|
|
1588
|
+
}
|
|
1589
|
+
if (atomicKey === "transform") state.transformAccumulator = void 0;
|
|
1590
|
+
if (state.style) delete state.style[atomicKey];
|
|
1591
|
+
delete state.classNames[atomicKey];
|
|
1592
|
+
delete state.classNames[slot];
|
|
1593
|
+
}
|
|
1594
|
+
function emitVariantStyle(state, key, value, original, condition, disabled) {
|
|
1595
|
+
const pass = state.flatPass;
|
|
1596
|
+
if (key !== pass[passMapSourceKey] && state.flatCallerVariantKeys?.has(key)) return;
|
|
1597
|
+
if (state.flatStyleStaticConfig.styledContextKeys?.has(key)) (state.overriddenContextProps ||= {})[key] = (state.originalContextPropValues ||= {})[key] = original;
|
|
1598
|
+
const parent = pass[passParentCursor];
|
|
1599
|
+
pass[passParentCursor] = condition;
|
|
1600
|
+
contributeProp(pass, key, value, original, disabled);
|
|
1601
|
+
pass[passParentCursor] = parent;
|
|
1602
|
+
}
|
|
1603
|
+
function getFontFamilyFromNameOrVariable(input, conf) {
|
|
1604
|
+
if (isVariable(input)) {
|
|
1605
|
+
const val = variableToFontNameCache.get(input);
|
|
1606
|
+
if (val) return val;
|
|
1607
|
+
for (const key in conf.fontsParsed) {
|
|
1608
|
+
const familyVariable = conf.fontsParsed[key].family;
|
|
1609
|
+
if (isVariable(familyVariable)) {
|
|
1610
|
+
variableToFontNameCache.set(familyVariable, key);
|
|
1611
|
+
if (familyVariable === input) return key;
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
} else if (typeof input === "string" && input in conf.fontsParsed) return input;
|
|
1615
|
+
}
|
|
1616
|
+
const variableToFontNameCache = /* @__PURE__ */ new WeakMap();
|
|
1617
|
+
|
|
1618
|
+
export { STYLE_TOKEN_PROVENANCE_KEY, emitVariantStyle, getFontFamilyFromNameOrVariable, getSplitStyles, getStyleStaticConfig, getStyleTokenProvenance, isValidStyleKey, styleOriginalValues, walkConditionalValue };
|
|
907
1619
|
//# sourceMappingURL=getSplitStyles.mjs.map
|