@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
package/src/types.tsx
CHANGED
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
import type { StyleObject } from '@tamagui/helpers'
|
|
2
|
+
import type {
|
|
3
|
+
CoreStateModifierName,
|
|
4
|
+
TransformAccumulator,
|
|
5
|
+
} from '@tamagui/style-grammar/runtime'
|
|
2
6
|
import type { Properties } from 'csstype'
|
|
3
7
|
import type {
|
|
4
8
|
CSSProperties,
|
|
5
9
|
ComponentType,
|
|
6
10
|
Context,
|
|
7
|
-
|
|
8
|
-
ForwardRefRenderFunction,
|
|
11
|
+
Dispatch,
|
|
9
12
|
FunctionComponent,
|
|
10
13
|
HTMLAttributes,
|
|
11
14
|
ProviderExoticComponent,
|
|
15
|
+
Ref as ReactRef,
|
|
12
16
|
ReactNode,
|
|
13
|
-
RefAttributes,
|
|
14
17
|
RefObject,
|
|
18
|
+
SetStateAction,
|
|
15
19
|
} from 'react'
|
|
16
20
|
import type {
|
|
21
|
+
FontVariant,
|
|
17
22
|
PressableProps,
|
|
18
23
|
Text as RNText,
|
|
19
24
|
TextStyle as RNTextStyle,
|
|
@@ -21,8 +26,10 @@ import type {
|
|
|
21
26
|
View,
|
|
22
27
|
ViewProps,
|
|
23
28
|
ViewStyle,
|
|
24
|
-
} from 'react-native'
|
|
29
|
+
} from '@tamagui/react-native-types'
|
|
25
30
|
|
|
31
|
+
import type { NativeStyleEngineLinkHandle } from './helpers/nativeStyleEngine'
|
|
32
|
+
import type { StyleFrontend } from './helpers/styleFrontend'
|
|
26
33
|
import type { CSSColorNames } from './interfaces/CSSColorNames'
|
|
27
34
|
import type { RNOnlyProps } from './interfaces/RNExclusiveTypes'
|
|
28
35
|
|
|
@@ -52,6 +59,13 @@ export type ColorKeys =
|
|
|
52
59
|
| 'borderInlineColor'
|
|
53
60
|
| 'borderInlineStartColor'
|
|
54
61
|
| 'borderInlineEndColor'
|
|
62
|
+
// these four resolve theme colors at runtime (tokenCategories.color in
|
|
63
|
+
// @tamagui/helpers) and were missing here, so they typechecked via
|
|
64
|
+
// `(string & {})` while offering no token autocomplete at all
|
|
65
|
+
| 'borderEndColor'
|
|
66
|
+
| 'borderStartColor'
|
|
67
|
+
| 'textDecorationColor'
|
|
68
|
+
| 'caretColor'
|
|
55
69
|
|
|
56
70
|
export type SpaceKeys =
|
|
57
71
|
| 'space'
|
|
@@ -127,9 +141,13 @@ export type SpaceKeys =
|
|
|
127
141
|
| 'borderInlineStartWidth'
|
|
128
142
|
| 'borderInlineEndWidth'
|
|
129
143
|
|
|
130
|
-
export type StyledContext<
|
|
144
|
+
export type StyledContext<
|
|
145
|
+
Props extends Record<string, any> = any,
|
|
146
|
+
ConsumedKeys extends keyof Props & string = keyof Props & string,
|
|
147
|
+
> = Context<Props> & {
|
|
131
148
|
context: Context<Props>
|
|
132
149
|
props: Record<string, any> | undefined
|
|
150
|
+
propKeys?: readonly ConsumedKeys[]
|
|
133
151
|
Provider: ProviderExoticComponent<
|
|
134
152
|
Partial<Props | undefined> & {
|
|
135
153
|
children?: ReactNode
|
|
@@ -140,6 +158,14 @@ export type StyledContext<Props extends Record<string, any> = any> = Context<Pro
|
|
|
140
158
|
useStyledContext: (scope?: string) => Props
|
|
141
159
|
}
|
|
142
160
|
|
|
161
|
+
export type StyledContextOptions<
|
|
162
|
+
Props extends Record<string, any>,
|
|
163
|
+
ConsumedKeys extends keyof Props & string = keyof Props & string,
|
|
164
|
+
> = {
|
|
165
|
+
keys?: readonly ConsumedKeys[]
|
|
166
|
+
namespace?: string
|
|
167
|
+
}
|
|
168
|
+
|
|
143
169
|
export type TamaguiComponentState = {
|
|
144
170
|
unmounted: boolean | 'should-enter'
|
|
145
171
|
disabled?: boolean
|
|
@@ -263,11 +289,6 @@ export type TamaguiComponentPropsBaseBase = {
|
|
|
263
289
|
*/
|
|
264
290
|
themeShallow?: boolean
|
|
265
291
|
|
|
266
|
-
/**
|
|
267
|
-
* If true, component themes will not be applied
|
|
268
|
-
*/
|
|
269
|
-
unstyled?: boolean
|
|
270
|
-
|
|
271
292
|
/**
|
|
272
293
|
* Same as the web id property for setting a uid on an element
|
|
273
294
|
*/
|
|
@@ -300,18 +321,23 @@ export type TamaguiComponentPropsBaseBase = {
|
|
|
300
321
|
* Marks this component as a group for use in styling children based on parents named group
|
|
301
322
|
* See: https://tamagui.dev/docs/intro/props
|
|
302
323
|
*/
|
|
303
|
-
group?: GroupNames | boolean
|
|
324
|
+
group?: GroupNames | (string & {}) | boolean
|
|
304
325
|
|
|
305
326
|
/**
|
|
306
|
-
*
|
|
307
|
-
*
|
|
327
|
+
* Marks this component as an inline-size query container. A string names the
|
|
328
|
+
* container for matching `@sm/name:` clauses.
|
|
308
329
|
*/
|
|
309
|
-
|
|
330
|
+
container?: boolean | (string & {})
|
|
310
331
|
|
|
311
332
|
/**
|
|
312
|
-
*
|
|
333
|
+
* Works alongside container. On native, children using container sizing can
|
|
334
|
+
* be hidden until the parent is measured.
|
|
335
|
+
* See: https://tamagui.dev/docs/intro/props
|
|
313
336
|
*/
|
|
314
|
-
|
|
337
|
+
untilMeasured?: 'hide' | 'show'
|
|
338
|
+
|
|
339
|
+
/** web: forwards to the HTML name attribute. */
|
|
340
|
+
name?: string
|
|
315
341
|
|
|
316
342
|
/**
|
|
317
343
|
* Used for controlling the order of focus with keyboard or assistive device enavigation
|
|
@@ -329,6 +355,13 @@ export type TamaguiComponentPropsBaseBase = {
|
|
|
329
355
|
*/
|
|
330
356
|
disableOptimization?: boolean
|
|
331
357
|
|
|
358
|
+
/**
|
|
359
|
+
* Opt this component out of the experimental native style fast path
|
|
360
|
+
* (setNativeStyleEngine); it re-renders through React on theme/media
|
|
361
|
+
* changes like normal
|
|
362
|
+
*/
|
|
363
|
+
disableNativeStyle?: boolean
|
|
364
|
+
|
|
332
365
|
/**
|
|
333
366
|
* Forces the pseudo style state to be on
|
|
334
367
|
*/
|
|
@@ -414,7 +447,7 @@ export interface WebOnlyPressEvents {
|
|
|
414
447
|
|
|
415
448
|
export type { MediaStyleObject, StyleObject } from '@tamagui/helpers'
|
|
416
449
|
|
|
417
|
-
type FontFamilies = FontTokens
|
|
450
|
+
type FontFamilies = FontTokens
|
|
418
451
|
|
|
419
452
|
export type LanguageContextType = Partial<{
|
|
420
453
|
[key in FontFamilies]: FontLanguages | 'default'
|
|
@@ -427,12 +460,13 @@ export type FontLanguageProps = LanguageContextType & {
|
|
|
427
460
|
export type ThemeProviderProps = {
|
|
428
461
|
className?: string
|
|
429
462
|
defaultTheme: string | null | undefined
|
|
430
|
-
/** @deprecated moved to createTamagui({ settings: { disableRootThemeClass } }) */
|
|
431
|
-
disableRootThemeClass?: boolean
|
|
432
|
-
/** @deprecated moved to createTamagui({ settings: { themeClassNameOnRoot } }) */
|
|
433
|
-
themeClassNameOnRoot?: boolean
|
|
434
463
|
children?: any
|
|
435
|
-
|
|
464
|
+
/**
|
|
465
|
+
* This provider is mounted inside a page it does not own, so it must not write
|
|
466
|
+
* its theme class onto `html` or `body`. Its theme class goes on its own node
|
|
467
|
+
* instead. Set by the generated zero-runtime island entry.
|
|
468
|
+
*/
|
|
469
|
+
isSubtreeRoot?: boolean
|
|
436
470
|
}
|
|
437
471
|
|
|
438
472
|
export type ThemeState = {
|
|
@@ -451,6 +485,12 @@ export type ThemeState = {
|
|
|
451
485
|
isNew?: boolean
|
|
452
486
|
parentId?: string
|
|
453
487
|
scheme?: 'light' | 'dark'
|
|
488
|
+
// true when a `<Theme name="light_blue">` at or above this state named its
|
|
489
|
+
// scheme outright, rather than inheriting the scheme from the root. Only such
|
|
490
|
+
// a state may emit the scheme-qualified `t_light_blue` class; everything else
|
|
491
|
+
// stays scheme-relative so server output renders correctly under either root
|
|
492
|
+
// scheme. Cumulative: once an ancestor pins, descendants stay pinned.
|
|
493
|
+
schemeAuthored?: boolean
|
|
454
494
|
}
|
|
455
495
|
|
|
456
496
|
export interface Variable<A = any> {
|
|
@@ -474,8 +514,6 @@ export interface PxValue {
|
|
|
474
514
|
|
|
475
515
|
export type ColorScheme = 'light' | 'dark'
|
|
476
516
|
|
|
477
|
-
export type IsMediaType = boolean | 'platform' | 'theme' | 'group'
|
|
478
|
-
|
|
479
517
|
export type MaybeTamaguiComponent<A = any> = TamaguiComponent<A> | React.FC<A>
|
|
480
518
|
|
|
481
519
|
type MeasureOnSuccessCallback = (
|
|
@@ -567,12 +605,12 @@ export type TamaguiProjectInfo = {
|
|
|
567
605
|
nameToPaths: NameToPaths
|
|
568
606
|
}
|
|
569
607
|
|
|
570
|
-
// base props
|
|
608
|
+
// base props accepted by createComponent in addition to the selected host's props
|
|
571
609
|
|
|
572
610
|
export type DivAttributes = HTMLAttributes<HTMLDivElement>
|
|
573
611
|
|
|
574
|
-
export type ReactComponentWithRef<Props, Ref> =
|
|
575
|
-
Props &
|
|
612
|
+
export type ReactComponentWithRef<Props, Ref> = ComponentType<
|
|
613
|
+
Props & { ref?: ReactRef<Ref> }
|
|
576
614
|
>
|
|
577
615
|
|
|
578
616
|
// needs to be cb style for subscribeToContextGroup to be able to poke through to last state
|
|
@@ -580,6 +618,8 @@ export type ComponentSetStateShallow = React.Dispatch<
|
|
|
580
618
|
React.SetStateAction<Partial<TamaguiComponentState>>
|
|
581
619
|
>
|
|
582
620
|
|
|
621
|
+
export type ComponentSetState = Dispatch<SetStateAction<TamaguiComponentState>>
|
|
622
|
+
|
|
583
623
|
export type ComponentContextI = {
|
|
584
624
|
disableSSR?: boolean
|
|
585
625
|
inText: boolean
|
|
@@ -593,12 +633,22 @@ export type ComponentContextI = {
|
|
|
593
633
|
|
|
594
634
|
export type TamaguiComponentStateRef = {
|
|
595
635
|
startedUnhydrated: boolean
|
|
636
|
+
optimizeForFirstRender?: boolean
|
|
596
637
|
|
|
597
638
|
host?: TamaguiElement
|
|
598
639
|
composedRef?: (x: TamaguiElement) => void
|
|
640
|
+
// the forwarded ref composedRef writes to right now, read at attach time so the
|
|
641
|
+
// cached callback never pins the first render's ref
|
|
642
|
+
composedForwardedRef?: React.Ref<TamaguiElement>
|
|
643
|
+
// the forwarded ref composedRef last handed the host to, so a swap can be
|
|
644
|
+
// detected without a render-phase "previous" pointer (see createComponent)
|
|
645
|
+
attachedForwardedRef?: React.Ref<TamaguiElement>
|
|
599
646
|
willHydrate?: boolean
|
|
600
647
|
hasMeasured?: boolean
|
|
601
648
|
hasAnimated?: boolean
|
|
649
|
+
shouldRegisterPresence?: boolean
|
|
650
|
+
didFinalizeInitialStyleFrame?: boolean
|
|
651
|
+
initialStyleFrameUnmounted?: TamaguiComponentState['unmounted']
|
|
602
652
|
themeShallow?: boolean
|
|
603
653
|
hasEverThemed?: boolean | 'wrapped'
|
|
604
654
|
hasEverResetPresence?: boolean
|
|
@@ -607,10 +657,12 @@ export type TamaguiComponentStateRef = {
|
|
|
607
657
|
isListeningToTheme?: boolean
|
|
608
658
|
unPress?: Function
|
|
609
659
|
setStateShallow?: ComponentSetStateShallow
|
|
660
|
+
setState?: ComponentSetState
|
|
610
661
|
// hoisted base shallow-setter that always calls the real React setState.
|
|
611
662
|
// kept on its own field so the avoidReRenders wrapper (which overwrites
|
|
612
663
|
// `setStateShallow`) can capture this as its real-re-render escape hatch.
|
|
613
664
|
baseSetStateShallow?: ComponentSetStateShallow
|
|
665
|
+
themeNeedsUpdate?: () => boolean
|
|
614
666
|
useStyleListener?: UseStyleListener
|
|
615
667
|
updateStyleListener?: () => void
|
|
616
668
|
|
|
@@ -622,6 +674,10 @@ export type TamaguiComponentStateRef = {
|
|
|
622
674
|
nextState?: TamaguiComponentState
|
|
623
675
|
nextMedia?: UseMediaState
|
|
624
676
|
|
|
677
|
+
// avoidReRenders latched on first render (animationDriver derives from the
|
|
678
|
+
// per-render animatedBy prop; hooks gated on it must keep a stable count)
|
|
679
|
+
avoidReRenders?: boolean
|
|
680
|
+
|
|
625
681
|
// cleanup function for media emit listener
|
|
626
682
|
mediaEmitCleanup?: () => void
|
|
627
683
|
|
|
@@ -632,6 +688,32 @@ export type TamaguiComponentStateRef = {
|
|
|
632
688
|
focus?: boolean
|
|
633
689
|
groups?: Record<string, { hover?: boolean; press?: boolean; focus?: boolean }>
|
|
634
690
|
}
|
|
691
|
+
|
|
692
|
+
// native fast path (experimental): engine link handle for the host view,
|
|
693
|
+
// the per-render themed-style updater, its stable proxy handed to
|
|
694
|
+
// useThemeState, and the set of theme names already pushed to the engine
|
|
695
|
+
// since the last render (reset every render, so cached native state props
|
|
696
|
+
// can never outlive the props/state that produced them)
|
|
697
|
+
nativeLink?: NativeStyleEngineLinkHandle | null
|
|
698
|
+
nativeStyleUpdate?: (next: ThemeState) => boolean
|
|
699
|
+
nativeUpdateProxy?: (next: ThemeState) => boolean
|
|
700
|
+
nativePushedStates?: Set<string>
|
|
701
|
+
// the state name currently committed for this view (by the render or the
|
|
702
|
+
// last intercepted update): an update resolving to the same name is a no-op
|
|
703
|
+
nativeActiveState?: string
|
|
704
|
+
// media interception: recompute styles under the current theme when a
|
|
705
|
+
// relevant media key flips (useMedia's subscription calls this before
|
|
706
|
+
// forcing a re-render, passing that re-render as the miss fallback);
|
|
707
|
+
// recomputes coalesce per event turn via nativeMediaQueued, and
|
|
708
|
+
// nativeThemeState tracks the last theme handled natively so the recompute
|
|
709
|
+
// uses it instead of the stale render capture
|
|
710
|
+
nativeMediaUpdate?: (onMiss?: () => void) => boolean
|
|
711
|
+
nativeMediaQueued?: boolean
|
|
712
|
+
nativeThemeState?: ThemeState
|
|
713
|
+
// union of style keys pushed to the engine since link: keys present before
|
|
714
|
+
// but absent from the next push are sent as null (reset-to-default),
|
|
715
|
+
// matching what a real re-render's style diff would do
|
|
716
|
+
nativePushedKeys?: Set<string>
|
|
635
717
|
}
|
|
636
718
|
|
|
637
719
|
export type ComponentGroupEmitter = {
|
|
@@ -648,6 +730,7 @@ export type WidthHeight = {
|
|
|
648
730
|
export type ChildGroupState = {
|
|
649
731
|
pseudo?: PseudoGroupState
|
|
650
732
|
media?: Record<MediaQueryKey extends number ? never : MediaQueryKey, boolean>
|
|
733
|
+
layout?: WidthHeight
|
|
651
734
|
}
|
|
652
735
|
|
|
653
736
|
export type ComponentGroupState = {
|
|
@@ -698,6 +781,13 @@ export type ConfigListener = (conf: TamaguiInternalConfig) => void
|
|
|
698
781
|
export type VariableVal = number | string | Variable | VariableValGeneric | PxValue
|
|
699
782
|
export type VariableColorVal = string | Variable
|
|
700
783
|
|
|
784
|
+
// values accepted by createTamagui({ variables }) and inline <Theme> props
|
|
785
|
+
export type VariableValIn = string | number | PxValue
|
|
786
|
+
|
|
787
|
+
export type GenericVariables = {
|
|
788
|
+
[key: string]: VariableValIn | { light: VariableValIn; dark: VariableValIn }
|
|
789
|
+
}
|
|
790
|
+
|
|
701
791
|
type GenericKey = string
|
|
702
792
|
|
|
703
793
|
export type CreateTokens<Val extends VariableVal = VariableVal> = Record<
|
|
@@ -843,7 +933,7 @@ export type CreateTamaguiConfig<
|
|
|
843
933
|
// Support both single driver and multi-driver config
|
|
844
934
|
// Multi-driver: { default: cssDriver, spring: motiDriver }
|
|
845
935
|
// Single: AnimationDriver<E>
|
|
846
|
-
animations:
|
|
936
|
+
animations: AnimationDriverLike<E> | AnimationsConfigObject
|
|
847
937
|
// phantom type for preserving driver keys - never set at runtime, only for type inference
|
|
848
938
|
animationDriverKeys?: AnimDriverKeys
|
|
849
939
|
settings: H
|
|
@@ -873,7 +963,7 @@ type GetLanguagePostfixes<F extends GenericFonts> = GetLanguagePostfix<keyof F>
|
|
|
873
963
|
// body_en: any
|
|
874
964
|
// }>['fonts']
|
|
875
965
|
|
|
876
|
-
type ConfProps<A, B, C, D, E, F, I> = {
|
|
966
|
+
type ConfProps<A, B, C, D, E, F, I, V = undefined> = {
|
|
877
967
|
tokens?: A
|
|
878
968
|
themes?: B
|
|
879
969
|
shorthands?: C
|
|
@@ -881,8 +971,25 @@ type ConfProps<A, B, C, D, E, F, I> = {
|
|
|
881
971
|
animations?: E
|
|
882
972
|
fonts?: F
|
|
883
973
|
settings?: I
|
|
974
|
+
variables?: V
|
|
884
975
|
}
|
|
885
976
|
|
|
977
|
+
// config-declared custom variables become keys on every base theme, so they
|
|
978
|
+
// flow into ThemeKeys/ThemeParsed and theme-value autocompletion with no separate
|
|
979
|
+
// augmentation surface
|
|
980
|
+
type VariableValInScheme<V> = V extends { light: infer L } ? L : V
|
|
981
|
+
type ThemesWithVariables<B, V> = [V] extends [undefined]
|
|
982
|
+
? B
|
|
983
|
+
: [keyof V] extends [never]
|
|
984
|
+
? B
|
|
985
|
+
: {
|
|
986
|
+
[N in keyof B]: B[N] & {
|
|
987
|
+
[K in keyof V & string]: VariableValInScheme<V[K]> extends PxValue
|
|
988
|
+
? number
|
|
989
|
+
: VariableValInScheme<V[K]>
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
|
|
886
993
|
type EmptyTokens = {
|
|
887
994
|
color: {}
|
|
888
995
|
space: {}
|
|
@@ -898,14 +1005,13 @@ type EmptyFonts = {}
|
|
|
898
1005
|
|
|
899
1006
|
type EmptyTamaguiSettings = {
|
|
900
1007
|
allowedStyleValues: false
|
|
901
|
-
autocompleteSpecificTokens: 'except-special'
|
|
902
1008
|
}
|
|
903
1009
|
|
|
904
1010
|
// Helper to extract animation config from AnimationDriver<Config> or multi-driver object
|
|
905
1011
|
type ExtractAnimationConfig<E> =
|
|
906
|
-
E extends
|
|
1012
|
+
E extends AnimationDriverLike<infer Config>
|
|
907
1013
|
? Config
|
|
908
|
-
: E extends { default:
|
|
1014
|
+
: E extends { default: AnimationDriverLike<infer Config> }
|
|
909
1015
|
? Config
|
|
910
1016
|
: E extends GenericAnimations
|
|
911
1017
|
? E
|
|
@@ -915,24 +1021,35 @@ type ExtractAnimationConfig<E> =
|
|
|
915
1021
|
// Single driver: returns 'default'
|
|
916
1022
|
// Multi-driver { default: x, css: y }: returns 'default' | 'css'
|
|
917
1023
|
type ExtractAnimationDriverKeys<E> =
|
|
918
|
-
E extends
|
|
1024
|
+
E extends AnimationDriverLike<any>
|
|
919
1025
|
? 'default'
|
|
920
|
-
: E extends { default:
|
|
1026
|
+
: E extends { default: AnimationDriverLike<any> }
|
|
921
1027
|
? Extract<keyof E, string>
|
|
922
1028
|
: 'default'
|
|
923
1029
|
|
|
924
1030
|
export type InferTamaguiConfig<Conf> =
|
|
925
|
-
Conf extends ConfProps<
|
|
1031
|
+
Conf extends ConfProps<
|
|
1032
|
+
infer A,
|
|
1033
|
+
infer B,
|
|
1034
|
+
infer C,
|
|
1035
|
+
infer D,
|
|
1036
|
+
infer E,
|
|
1037
|
+
infer F,
|
|
1038
|
+
infer H,
|
|
1039
|
+
infer V
|
|
1040
|
+
>
|
|
926
1041
|
? TamaguiInternalConfig<
|
|
927
1042
|
A extends GenericTokens ? A : EmptyTokens,
|
|
928
|
-
B extends GenericThemes ? B : EmptyThemes,
|
|
1043
|
+
B extends GenericThemes ? ThemesWithVariables<B, V> : EmptyThemes,
|
|
929
1044
|
C extends GenericShorthands ? C : EmptyShorthands,
|
|
930
1045
|
D extends GenericMedia ? D : EmptyMedia,
|
|
931
1046
|
ExtractAnimationConfig<E>,
|
|
932
1047
|
F extends GenericFonts ? F : EmptyFonts,
|
|
933
1048
|
H extends GenericTamaguiSettings ? H : EmptyTamaguiSettings,
|
|
934
1049
|
ExtractAnimationDriverKeys<E>
|
|
935
|
-
>
|
|
1050
|
+
> &
|
|
1051
|
+
// keep the literal size names so `size="md"` autocompletes
|
|
1052
|
+
(Conf extends { sizes: infer S } ? { sizes: S } : {})
|
|
936
1053
|
: unknown
|
|
937
1054
|
|
|
938
1055
|
// for use in creation functions so it doesnt get overwritten
|
|
@@ -946,12 +1063,14 @@ export type GenericTamaguiConfig = CreateTamaguiConfig<
|
|
|
946
1063
|
>
|
|
947
1064
|
|
|
948
1065
|
// try and find the top level types as they can be supersets:
|
|
949
|
-
type
|
|
950
|
-
?
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
1066
|
+
export type RootThemeName<TK extends keyof Themes = keyof Themes> = TK extends string
|
|
1067
|
+
? string extends TK
|
|
1068
|
+
? never
|
|
1069
|
+
: TK extends `${string}_${string}`
|
|
1070
|
+
? never
|
|
1071
|
+
: TK
|
|
1072
|
+
: never
|
|
1073
|
+
type BaseThemeDefinitions = TamaguiConfig['themes'][RootThemeName]
|
|
955
1074
|
type GenericThemeDefinition = TamaguiConfig['themes'][keyof TamaguiConfig['themes']]
|
|
956
1075
|
export type ThemeDefinition = BaseThemeDefinitions extends never
|
|
957
1076
|
? GenericThemeDefinition
|
|
@@ -961,32 +1080,41 @@ export type ThemeParsed = {
|
|
|
961
1080
|
[key in ThemeKeys]: CoerceToVariable<ThemeDefinition[key]>
|
|
962
1081
|
}
|
|
963
1082
|
|
|
1083
|
+
/**
|
|
1084
|
+
* Prop names `<Theme>` owns. Inline values are authored on `<ThemeUpdate>`.
|
|
1085
|
+
*/
|
|
1086
|
+
export type ReservedThemePropName =
|
|
1087
|
+
| '_isRoot'
|
|
1088
|
+
| 'children'
|
|
1089
|
+
| 'className'
|
|
1090
|
+
| 'contain'
|
|
1091
|
+
| 'debug'
|
|
1092
|
+
| 'deopt'
|
|
1093
|
+
| 'disable'
|
|
1094
|
+
| 'disable-child-theme'
|
|
1095
|
+
| 'forceClassName'
|
|
1096
|
+
| '_themeUpdate'
|
|
1097
|
+
| 'name'
|
|
1098
|
+
| 'nativeUpdate'
|
|
1099
|
+
| 'needsUpdate'
|
|
1100
|
+
| 'passThrough'
|
|
1101
|
+
| 'shallow'
|
|
1102
|
+
|
|
964
1103
|
export type Tokens = TamaguiConfig['tokens']
|
|
965
1104
|
|
|
966
1105
|
export type TokensParsed = {
|
|
967
|
-
[Key in keyof Required<Tokens>]:
|
|
968
|
-
}
|
|
969
|
-
|
|
970
|
-
type TokenPrefixed<A extends { [key: string]: any }> = {
|
|
971
|
-
[Key in Ensure$Prefix<keyof A> | keyof A]: A[keyof A]
|
|
1106
|
+
[Key in keyof Required<Tokens>]: TokenifyRecord<NonNullable<Tokens[Key]>>
|
|
972
1107
|
}
|
|
973
1108
|
|
|
974
|
-
type Ensure$Prefix<A extends string | number | symbol> = A extends
|
|
975
|
-
| string
|
|
976
|
-
| number
|
|
977
|
-
| boolean
|
|
978
|
-
? A extends `$${string | number}`
|
|
979
|
-
? A
|
|
980
|
-
: `$${A}`
|
|
981
|
-
: never
|
|
982
|
-
|
|
983
|
-
export type TokensMerged = TokensParsed & Tokens
|
|
984
|
-
|
|
985
1109
|
export type Shorthands = TamaguiConfig['shorthands']
|
|
986
1110
|
export type Media = TamaguiConfig['media']
|
|
987
1111
|
export type Themes = TamaguiConfig['themes']
|
|
988
|
-
|
|
989
|
-
export type
|
|
1112
|
+
type BuiltInSubThemeName = 'inverse'
|
|
1113
|
+
export type ThemeName = Exclude<
|
|
1114
|
+
GetAltThemeNames<keyof Themes> | BuiltInSubThemeName,
|
|
1115
|
+
number
|
|
1116
|
+
>
|
|
1117
|
+
export type ThemeTokens = GetTokenString<ThemeKeys>
|
|
990
1118
|
// Animation names (slow, fast, bouncy) for the `transition` prop
|
|
991
1119
|
// Extract animation keys from the driver's `animations` property
|
|
992
1120
|
// The AnimationDriver<Config> has an `animations: Config` property
|
|
@@ -1032,9 +1160,7 @@ export type FontLanguages = ArrayIntersection<TamaguiConfig['fontLanguages']>
|
|
|
1032
1160
|
export interface ThemeProps {
|
|
1033
1161
|
className?: string
|
|
1034
1162
|
name?: Exclude<ThemeName, number> | null
|
|
1035
|
-
componentName?: string
|
|
1036
1163
|
children?: any
|
|
1037
|
-
reset?: boolean
|
|
1038
1164
|
debug?: DebugProp
|
|
1039
1165
|
// on the web, for portals we need to re-insert className
|
|
1040
1166
|
forceClassName?: boolean
|
|
@@ -1049,7 +1175,14 @@ export type UseThemeWithStateProps = ThemeProps & {
|
|
|
1049
1175
|
passThrough?: boolean
|
|
1050
1176
|
disable?: boolean
|
|
1051
1177
|
needsUpdate?: () => boolean
|
|
1052
|
-
|
|
1178
|
+
/** opaque internal value patch created by `<ThemeUpdate>` */
|
|
1179
|
+
_themeUpdate?: import('./helpers/themeUpdateState').ThemeUpdateState
|
|
1180
|
+
/**
|
|
1181
|
+
* native fast path (experimental): called on a theme update instead of
|
|
1182
|
+
* re-rendering; return true when the update was committed natively so the
|
|
1183
|
+
* re-render is skipped. never called for forced updates.
|
|
1184
|
+
*/
|
|
1185
|
+
nativeUpdate?: (next: ThemeState) => boolean
|
|
1053
1186
|
}
|
|
1054
1187
|
|
|
1055
1188
|
type ArrayIntersection<A extends any[]> = A[keyof A]
|
|
@@ -1082,8 +1215,6 @@ type AllowedStyleValuesSetting =
|
|
|
1082
1215
|
| AllowedValueSettingBase
|
|
1083
1216
|
| AllowedStyleValuesSettingPerCategory
|
|
1084
1217
|
|
|
1085
|
-
type AutocompleteSpecificTokensSetting = boolean | 'except-special'
|
|
1086
|
-
|
|
1087
1218
|
export interface GenericTamaguiSettings {
|
|
1088
1219
|
/**
|
|
1089
1220
|
* controls style semantics where React Native/Yoga and CSS differ.
|
|
@@ -1137,20 +1268,6 @@ export interface GenericTamaguiSettings {
|
|
|
1137
1268
|
*/
|
|
1138
1269
|
allowedStyleValues?: AllowedStyleValuesSetting
|
|
1139
1270
|
|
|
1140
|
-
/**
|
|
1141
|
-
* Set up if "specific tokens" ($color.name) are added to the types where
|
|
1142
|
-
* tokens are allowed. The VSCode autocomplete puts specific tokens above the
|
|
1143
|
-
* regular ones, which leads to worse DX. If true this setting removes the
|
|
1144
|
-
* specific token from types for the defined categories.
|
|
1145
|
-
*
|
|
1146
|
-
* If set to "except-special", specific tokens will autocomplete only if they
|
|
1147
|
-
* don't normally use one of the special token groups: space, size, radius,
|
|
1148
|
-
* zIndex, color.
|
|
1149
|
-
*
|
|
1150
|
-
* @default except-special
|
|
1151
|
-
*/
|
|
1152
|
-
autocompleteSpecificTokens?: AutocompleteSpecificTokensSetting
|
|
1153
|
-
|
|
1154
1271
|
/**
|
|
1155
1272
|
* On iOS, this enables a mode where Tamagui returns color values using
|
|
1156
1273
|
* `DynamicColorIOS` This is a React Native built in feature, you can read the
|
|
@@ -1172,17 +1289,25 @@ export interface GenericTamaguiSettings {
|
|
|
1172
1289
|
fastSchemeChange?: boolean
|
|
1173
1290
|
|
|
1174
1291
|
/**
|
|
1175
|
-
*
|
|
1176
|
-
*
|
|
1292
|
+
* Chooses whether Tamagui optimizes component renders for granular updates or
|
|
1293
|
+
* for the lowest first-render overhead.
|
|
1294
|
+
*
|
|
1295
|
+
* - "updates" tracks the theme and media keys each component reads so changes
|
|
1296
|
+
* only re-render consumers of those values.
|
|
1297
|
+
* - "first-render" skips per-key tracking and uses coarse theme and media
|
|
1298
|
+
* subscriptions. Theme and media changes still apply, but may re-render
|
|
1299
|
+
* every Tamagui component under the changed provider.
|
|
1300
|
+
*
|
|
1301
|
+
* This is a startup-level setting. Set it when creating the Tamagui config
|
|
1302
|
+
* and do not change it while the app is running.
|
|
1303
|
+
*
|
|
1304
|
+
* Defaults per platform: web defaults to "updates" (granular theme/media
|
|
1305
|
+
* changes matter most), native defaults to "first-render" (initial render
|
|
1306
|
+
* speed matters most, and full-tree re-renders are cheaper without the DOM).
|
|
1307
|
+
*
|
|
1308
|
+
* @default "updates" on web, "first-render" on native
|
|
1177
1309
|
*/
|
|
1178
|
-
|
|
1179
|
-
| 'normal'
|
|
1180
|
-
| 'size'
|
|
1181
|
-
| 'inline-size'
|
|
1182
|
-
| 'inherit'
|
|
1183
|
-
| 'initial'
|
|
1184
|
-
| 'revert'
|
|
1185
|
-
| 'revert-layer'
|
|
1310
|
+
optimizeFor?: 'updates' | 'first-render'
|
|
1186
1311
|
|
|
1187
1312
|
/**
|
|
1188
1313
|
* Only allow shorthands when enabled. Recommended to be true to avoid having
|
|
@@ -1286,11 +1411,11 @@ export type BaseStyleProps = {
|
|
|
1286
1411
|
* Animation drivers config - can be a single driver or named drivers object.
|
|
1287
1412
|
* If object, must include a 'default' key.
|
|
1288
1413
|
*/
|
|
1289
|
-
export type AnimationsConfig =
|
|
1414
|
+
export type AnimationsConfig = AnimationDriverLike<any> | AnimationsConfigObject
|
|
1290
1415
|
|
|
1291
1416
|
export type AnimationsConfigObject = {
|
|
1292
|
-
default:
|
|
1293
|
-
[key: string]:
|
|
1417
|
+
default: AnimationDriverLike<any>
|
|
1418
|
+
[key: string]: AnimationDriverLike<any>
|
|
1294
1419
|
}
|
|
1295
1420
|
|
|
1296
1421
|
export type CreateTamaguiProps = {
|
|
@@ -1315,8 +1440,24 @@ export type CreateTamaguiProps = {
|
|
|
1315
1440
|
}
|
|
1316
1441
|
}
|
|
1317
1442
|
|
|
1443
|
+
/**
|
|
1444
|
+
* Custom variables: merged into every base theme at createTamagui time, so
|
|
1445
|
+
* they resolve like theme keys everywhere (bare names in style props, useTheme(),
|
|
1446
|
+
* CSS variable emission) and can be redefined per-subtree via `<Theme>` props.
|
|
1447
|
+
* Values may reference theme keys or tokens by bare name or
|
|
1448
|
+
* be literals; per-scheme values via { light, dark }.
|
|
1449
|
+
*/
|
|
1450
|
+
variables?: GenericVariables
|
|
1451
|
+
|
|
1318
1452
|
settings?: Partial<GenericTamaguiSettings>
|
|
1319
1453
|
|
|
1454
|
+
/**
|
|
1455
|
+
* Named control sizes (`xs sm md lg xl` in the default configs). Each is a
|
|
1456
|
+
* recipe of token keys that every sized component reads; `default` names the
|
|
1457
|
+
* one `size={true}` resolves to.
|
|
1458
|
+
*/
|
|
1459
|
+
sizes?: GenericSizes
|
|
1460
|
+
|
|
1320
1461
|
/**
|
|
1321
1462
|
* Web-only: define text-selection CSS
|
|
1322
1463
|
*/
|
|
@@ -1324,11 +1465,6 @@ export type CreateTamaguiProps = {
|
|
|
1324
1465
|
backgroundColor?: any
|
|
1325
1466
|
color?: any
|
|
1326
1467
|
}
|
|
1327
|
-
|
|
1328
|
-
defaultProps?: Record<string, any> & {
|
|
1329
|
-
Text?: TextProps
|
|
1330
|
-
View?: StackNonStyleProps & StackStyle
|
|
1331
|
-
}
|
|
1332
1468
|
}
|
|
1333
1469
|
|
|
1334
1470
|
export type GetCSS = (opts?: {
|
|
@@ -1353,7 +1489,6 @@ export type TamaguiInternalConfig<
|
|
|
1353
1489
|
Omit<CreateTamaguiConfig<A, B, C, D, E, F, G, AnimDriverKeys>, 'tokens'> & {
|
|
1354
1490
|
// TODO need to make it this but this breaks types, revisit
|
|
1355
1491
|
// animations: E //AnimationDriver<E>
|
|
1356
|
-
// with $ prefixes for fast lookups (one time cost at startup vs every render)
|
|
1357
1492
|
tokens: Tokenify<A>
|
|
1358
1493
|
tokensParsed: Tokenify<A>
|
|
1359
1494
|
themeConfig: any
|
|
@@ -1365,13 +1500,12 @@ export type TamaguiInternalConfig<
|
|
|
1365
1500
|
userShorthands: C
|
|
1366
1501
|
reactNative?: any
|
|
1367
1502
|
fontSizeTokens: Set<string>
|
|
1368
|
-
specificTokens: Record<string, Variable>
|
|
1369
1503
|
settings: Omit<GenericTamaguiSettings, keyof G> & G
|
|
1370
1504
|
defaultFont?: string
|
|
1371
1505
|
defaultFontToken: `${string}`
|
|
1372
1506
|
// multi-driver animation config (e.g., { default: motionDriver, css: cssDriver })
|
|
1373
1507
|
// used for component-level driver selection via animatedBy prop
|
|
1374
|
-
animationDrivers?: Record<string,
|
|
1508
|
+
animationDrivers?: Record<string, AnimationDriverLike | null>
|
|
1375
1509
|
}
|
|
1376
1510
|
|
|
1377
1511
|
export type GetAnimationKeys<A extends GenericTamaguiConfig> = keyof A['animations']
|
|
@@ -1382,6 +1516,27 @@ export type UnionableNumber = number & {}
|
|
|
1382
1516
|
|
|
1383
1517
|
type GenericFontKey = string | number | symbol
|
|
1384
1518
|
|
|
1519
|
+
/** a named control size: a recipe of token keys, never a height */
|
|
1520
|
+
export type SizeSpec = {
|
|
1521
|
+
/** font.size / font.lineHeight key, resolved against the component's font */
|
|
1522
|
+
fontSize: string
|
|
1523
|
+
/** tokens.space keys */
|
|
1524
|
+
paddingX: string
|
|
1525
|
+
paddingY: string
|
|
1526
|
+
/** tokens.radius key */
|
|
1527
|
+
radius: string
|
|
1528
|
+
/** tokens.space key for the gap between icon and text; defaults to paddingY */
|
|
1529
|
+
gap?: string
|
|
1530
|
+
/** icon px override; defaults to the font size rounded up to the 4px grid */
|
|
1531
|
+
icon?: number
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
export type GenericSizes = {
|
|
1535
|
+
/** the name `size={true}` resolves to */
|
|
1536
|
+
default: string
|
|
1537
|
+
[name: string]: SizeSpec | string
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1385
1540
|
export type GenericFont<Key extends GenericFontKey = GenericFontKey> = {
|
|
1386
1541
|
size: { [key in Key]: number | Variable }
|
|
1387
1542
|
family?: string | Variable
|
|
@@ -1404,24 +1559,8 @@ export type GenericFont<Key extends GenericFontKey = GenericFontKey> = {
|
|
|
1404
1559
|
// media
|
|
1405
1560
|
export type MediaQueryObject = { [key: string]: string | number | string }
|
|
1406
1561
|
export type MediaQueryKey = keyof Media
|
|
1407
|
-
export type MediaPropKeys = `$${MediaQueryKey}`
|
|
1408
1562
|
export type MediaQueryState = { [key in MediaQueryKey]: boolean }
|
|
1409
1563
|
|
|
1410
|
-
// guard against a loose `Themes` whose `keyof` collapses to `string` (e.g. a config
|
|
1411
|
-
// whose themes type carries a string index signature). without this, TK becomes `string`
|
|
1412
|
-
// and ThemeMediaKeys becomes `$theme-${string}`, which collapses the whole WithMediaProps
|
|
1413
|
-
// mapped type into a `[key: string]` index signature that then swallows non-style props
|
|
1414
|
-
// like onPress/children. see issue #4010
|
|
1415
|
-
export type ThemeMediaKeys<TK extends keyof Themes = keyof Themes> = TK extends string
|
|
1416
|
-
? string extends TK
|
|
1417
|
-
? never
|
|
1418
|
-
: TK extends `${string}_${string}`
|
|
1419
|
-
? never
|
|
1420
|
-
: `$theme-${TK}`
|
|
1421
|
-
: never
|
|
1422
|
-
|
|
1423
|
-
export type PlatformMediaKeys = `$platform-${AllPlatforms}`
|
|
1424
|
-
|
|
1425
1564
|
export interface TypeOverride {
|
|
1426
1565
|
groupNames(): 1
|
|
1427
1566
|
animationDrivers(): 1
|
|
@@ -1432,39 +1571,15 @@ export type GroupNames =
|
|
|
1432
1571
|
? never
|
|
1433
1572
|
: ReturnType<TypeOverride['groupNames']>
|
|
1434
1573
|
|
|
1435
|
-
type
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
| `$group-${GroupNames}`
|
|
1439
|
-
| `$group-${GroupNames}-${ParentMediaStates}`
|
|
1440
|
-
| `$group-${GroupNames}-${MediaQueryKey}`
|
|
1441
|
-
| `$group-${GroupNames}-${MediaQueryKey}-${ParentMediaStates}`
|
|
1442
|
-
| `$group-${ParentMediaStates}`
|
|
1443
|
-
| `$group-${MediaQueryKey}`
|
|
1444
|
-
| `$group-${MediaQueryKey}-${ParentMediaStates}`
|
|
1445
|
-
|
|
1446
|
-
export type WithMediaProps<A> = {
|
|
1447
|
-
[Key in
|
|
1448
|
-
| MediaPropKeys
|
|
1449
|
-
| GroupMediaKeys
|
|
1450
|
-
| ThemeMediaKeys
|
|
1451
|
-
| PlatformMediaKeys]?: Key extends MediaPropKeys
|
|
1452
|
-
? A & {
|
|
1453
|
-
// TODO we can support $theme- inside media queries here if we change to ThemeMediaKeys | PlatformMediaKeys
|
|
1454
|
-
[Key in PlatformMediaKeys]?: AddWebOnlyStyleProps<A>
|
|
1455
|
-
}
|
|
1456
|
-
: Key extends `$platform-web`
|
|
1457
|
-
? AddWebOnlyStyleProps<A> & { [Key in MediaPropKeys]?: AddWebOnlyStyleProps<A> }
|
|
1458
|
-
: A & { [Key in MediaPropKeys]?: A }
|
|
1459
|
-
}
|
|
1460
|
-
|
|
1461
|
-
export type AddWebOnlyStyleProps<A> = Partial<CSSProperties> &
|
|
1574
|
+
export type AddWebOnlyStyleProps<A> = Partial<
|
|
1575
|
+
Omit<CSSProperties, keyof WebOnlyValidStyleValues>
|
|
1576
|
+
> &
|
|
1462
1577
|
Partial<WebOnlyValidStyleValues> & {
|
|
1463
1578
|
[K in Exclude<keyof A, keyof CSSProperties>]?: A[K]
|
|
1464
1579
|
}
|
|
1465
1580
|
|
|
1466
1581
|
export type WebOnlyValidStyleValues = {
|
|
1467
|
-
position: '-webkit-sticky'
|
|
1582
|
+
position: CSSProperties['position'] | '-webkit-sticky'
|
|
1468
1583
|
}
|
|
1469
1584
|
|
|
1470
1585
|
export type MediaQueries = {
|
|
@@ -1482,66 +1597,106 @@ export type MatchMedia = (query: string) => MediaQueryList
|
|
|
1482
1597
|
|
|
1483
1598
|
// createComponent props helpers
|
|
1484
1599
|
|
|
1485
|
-
// transition="bouncy"
|
|
1486
|
-
// transition={['bouncy', { }]}
|
|
1487
|
-
// { all: 'name' }
|
|
1488
|
-
|
|
1489
1600
|
// TODO can override for better types
|
|
1490
1601
|
export type AnimationConfigType = any
|
|
1491
1602
|
|
|
1492
1603
|
/**
|
|
1493
|
-
*
|
|
1494
|
-
*
|
|
1604
|
+
* Low-level spring physics. A projection of `duration` + `bounce`, not a second
|
|
1605
|
+
* way to configure a spring: whichever you author, the other is derived, and
|
|
1606
|
+
* every driver ends up with the same motion.
|
|
1607
|
+
*
|
|
1608
|
+
* Reach for this only when you are porting a config you already tuned.
|
|
1495
1609
|
*/
|
|
1496
1610
|
export type TransitionSpringConfig = {
|
|
1497
1611
|
stiffness?: number
|
|
1498
1612
|
damping?: number
|
|
1499
1613
|
mass?: number
|
|
1500
|
-
tension?: number
|
|
1501
|
-
friction?: number
|
|
1502
1614
|
velocity?: number
|
|
1503
1615
|
overshootClamping?: boolean
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1616
|
+
restDisplacementThreshold?: number
|
|
1617
|
+
restSpeedThreshold?: number
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
/**
|
|
1621
|
+
* A transition value: the name of a configured driver animation, or a CSS
|
|
1622
|
+
* transition string such as `200ms`, `200ms ease-out`, or
|
|
1623
|
+
* `opacity 150ms, transform 300ms`.
|
|
1624
|
+
*
|
|
1625
|
+
* Springs get a CSS-shaped function of their own: `spring(300ms, 0.4)` is a
|
|
1626
|
+
* 300ms spring with a bounce of 0.4. It works everywhere a timing function
|
|
1627
|
+
* does, including on the web, where it compiles to a `linear()` easing.
|
|
1628
|
+
*
|
|
1629
|
+
* A bare string that exactly matches a configured animation name is that
|
|
1630
|
+
* preset; everything else is CSS. `(string & {})` keeps preset names in
|
|
1631
|
+
* autocomplete instead of collapsing the union to plain `string`.
|
|
1632
|
+
*/
|
|
1633
|
+
export type TransitionValue = TransitionKeys | (string & {})
|
|
1634
|
+
|
|
1635
|
+
/**
|
|
1636
|
+
* The settings half of a transition object. Anything else in the object is a
|
|
1637
|
+
* style property name carrying its own transition.
|
|
1638
|
+
*/
|
|
1639
|
+
export type TransitionConfig = {
|
|
1640
|
+
/** a configured animation to start from */
|
|
1641
|
+
preset?: TransitionKeys
|
|
1642
|
+
/** milliseconds, or a CSS time like `'200ms'` */
|
|
1643
|
+
duration?: number | string
|
|
1644
|
+
/**
|
|
1645
|
+
* Makes it a spring. `0` is critically damped (no overshoot), approaching
|
|
1646
|
+
* `1` is loose and oscillating, negative is sluggish. `duration` stays the
|
|
1647
|
+
* perceptual "how fast does this feel" number either way.
|
|
1648
|
+
*/
|
|
1649
|
+
bounce?: number
|
|
1650
|
+
/** any CSS timing function. Mutually exclusive with `bounce`. */
|
|
1651
|
+
easing?: string
|
|
1652
|
+
/** milliseconds, or a CSS time */
|
|
1653
|
+
delay?: number | string
|
|
1654
|
+
behavior?: 'normal' | 'allow-discrete'
|
|
1655
|
+
/** the CSS `transition-property` list these settings apply to */
|
|
1656
|
+
properties?: string
|
|
1657
|
+
spring?: TransitionSpringConfig
|
|
1658
|
+
/** the transition to use while mounting, if it differs */
|
|
1659
|
+
enter?: TransitionProp
|
|
1660
|
+
/** the transition to use while unmounting, if it differs */
|
|
1661
|
+
exit?: TransitionProp
|
|
1507
1662
|
}
|
|
1508
1663
|
|
|
1664
|
+
/**
|
|
1665
|
+
* `transition` accepts a string or an object, and nothing else.
|
|
1666
|
+
*
|
|
1667
|
+
* ```tsx
|
|
1668
|
+
* transition="bouncy" // a configured preset
|
|
1669
|
+
* transition="200ms ease-out" // css
|
|
1670
|
+
* transition="opacity 150ms, transform spring(300ms, 0.4)"
|
|
1671
|
+
* transition={{ duration: 200, bounce: 0.15 }}
|
|
1672
|
+
* transition={{ preset: 'bouncy', opacity: '150ms' }} // per-property override
|
|
1673
|
+
* ```
|
|
1674
|
+
*
|
|
1675
|
+
* Per-property keys are later CSS entries, so they win for that property and
|
|
1676
|
+
* inherit nothing from the base, exactly as
|
|
1677
|
+
* `transition: all 200ms, opacity 150ms` behaves in a stylesheet.
|
|
1678
|
+
*/
|
|
1509
1679
|
export type TransitionProp =
|
|
1510
|
-
|
|
|
1511
|
-
| ({
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
delay?: number
|
|
1531
|
-
enter?: TransitionKeys
|
|
1532
|
-
exit?: TransitionKeys
|
|
1533
|
-
} & TransitionSpringConfig & {
|
|
1534
|
-
[key: string]:
|
|
1535
|
-
| TransitionKeys
|
|
1536
|
-
| {
|
|
1537
|
-
type?: TransitionKeys
|
|
1538
|
-
[key: string]: any
|
|
1539
|
-
}
|
|
1540
|
-
| number
|
|
1541
|
-
| boolean
|
|
1542
|
-
| undefined
|
|
1543
|
-
},
|
|
1544
|
-
]
|
|
1680
|
+
| TransitionValue
|
|
1681
|
+
| (TransitionConfig & {
|
|
1682
|
+
[property: string]: TransitionValue | TransitionConfig | unknown
|
|
1683
|
+
})
|
|
1684
|
+
|
|
1685
|
+
/**
|
|
1686
|
+
* Emitted by the animation driver at the start and end of a transition.
|
|
1687
|
+
*
|
|
1688
|
+
* `cause` is `enter` when the component mounts into an AnimatePresence, `exit`
|
|
1689
|
+
* when it unmounts, and `update` for any style change while it stays mounted.
|
|
1690
|
+
* On the `end` phase, `finished` is `false` when the transition was interrupted
|
|
1691
|
+
* (e.g. an exit canceled by a re-enter, or an update superseded by another).
|
|
1692
|
+
*/
|
|
1693
|
+
export type TransitionEvent = {
|
|
1694
|
+
phase: 'start' | 'end'
|
|
1695
|
+
cause: 'enter' | 'exit' | 'update'
|
|
1696
|
+
finished?: boolean
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
export type OnTransition = (event: TransitionEvent) => void
|
|
1545
1700
|
|
|
1546
1701
|
/**
|
|
1547
1702
|
* Tokens
|
|
@@ -1673,85 +1828,70 @@ export type ThemeValueFallbackZIndex =
|
|
|
1673
1828
|
WebStyleValueUniversal
|
|
1674
1829
|
>
|
|
1675
1830
|
|
|
1676
|
-
export type GetTokenString<A> = A extends
|
|
1677
|
-
? A
|
|
1678
|
-
: A extends string | number
|
|
1679
|
-
? `$${A}`
|
|
1680
|
-
: `$${string}`
|
|
1681
|
-
|
|
1682
|
-
export type SpecificTokens<
|
|
1683
|
-
Record = Tokens,
|
|
1684
|
-
RK extends keyof Record = keyof Record,
|
|
1685
|
-
> = RK extends string
|
|
1686
|
-
? `$${RK}.${keyof Record[RK] extends string | number
|
|
1687
|
-
? // remove any $ prefix so instead of $size.$sm its $size.sm
|
|
1688
|
-
keyof Record[RK] extends `$${infer X}`
|
|
1689
|
-
? X
|
|
1690
|
-
: keyof Record[RK]
|
|
1691
|
-
: never}`
|
|
1692
|
-
: never
|
|
1831
|
+
export type GetTokenString<A> = A extends string | number ? `${A}` : string
|
|
1693
1832
|
|
|
1694
|
-
|
|
1695
|
-
export type
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
? Val extends 'except-special' | undefined
|
|
1699
|
-
? never
|
|
1700
|
-
: SpecificTokens
|
|
1701
|
-
: SpecificTokens
|
|
1833
|
+
/** the names in `config.sizes` (`xs sm md lg xl` in the default configs) */
|
|
1834
|
+
export type SizeName = TamaguiConfig extends { sizes: infer S }
|
|
1835
|
+
? Exclude<Extract<keyof S, string>, 'default'>
|
|
1836
|
+
: never
|
|
1702
1837
|
|
|
1703
|
-
export type
|
|
1704
|
-
| SpecificTokensSpecial
|
|
1838
|
+
export type Size =
|
|
1705
1839
|
| ThemeValueFallbackSize
|
|
1706
1840
|
| GetTokenString<keyof Tokens['size']>
|
|
1841
|
+
| SizeName
|
|
1842
|
+
| (string & {})
|
|
1843
|
+
| true
|
|
1707
1844
|
|
|
1708
|
-
export type
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1845
|
+
export type SizeTokens = Size
|
|
1846
|
+
|
|
1847
|
+
export type Space = GetTokenString<keyof Tokens['space']> | ThemeValueFallbackSpace | true
|
|
1848
|
+
|
|
1849
|
+
export type SpaceTokens = Space
|
|
1712
1850
|
|
|
1713
1851
|
// base color token strings (before opacity modifier)
|
|
1714
1852
|
type ColorTokenBase =
|
|
1715
|
-
| SpecificTokensSpecial
|
|
1716
1853
|
| GetTokenString<keyof Tokens['color']>
|
|
1717
1854
|
| GetTokenString<keyof ThemeParsed>
|
|
1718
1855
|
|
|
1719
1856
|
// keep this non-expanded. using `${ColorTokenBase}/${number}` preserves stricter
|
|
1720
1857
|
// token names, but large user token/theme unions hit TS2590.
|
|
1721
|
-
type TokenWithOpacity =
|
|
1858
|
+
type TokenWithOpacity = `${string}/${number}`
|
|
1722
1859
|
|
|
1723
|
-
export type
|
|
1860
|
+
export type Color =
|
|
1724
1861
|
| ColorTokenBase
|
|
1725
1862
|
| CSSColorNames
|
|
1726
|
-
// opacity modifier:
|
|
1863
|
+
// opacity modifier: token/50
|
|
1727
1864
|
| TokenWithOpacity
|
|
1865
|
+
// clause-bearing values are intentionally open-ended; the language service
|
|
1866
|
+
// validates the grammar without materializing a combinatorial type union
|
|
1867
|
+
| (string & {})
|
|
1728
1868
|
|
|
1729
|
-
export type
|
|
1730
|
-
|
|
1869
|
+
export type ColorTokens = Color
|
|
1870
|
+
|
|
1871
|
+
export type ZIndex =
|
|
1731
1872
|
| GetTokenString<keyof Tokens['zIndex']>
|
|
1732
1873
|
| ThemeValueFallbackZIndex
|
|
1733
1874
|
| number
|
|
1875
|
+
| true
|
|
1876
|
+
|
|
1877
|
+
export type ZIndexTokens = ZIndex
|
|
1734
1878
|
|
|
1735
|
-
export type
|
|
1736
|
-
| SpecificTokensSpecial
|
|
1879
|
+
export type Radius =
|
|
1737
1880
|
| GetTokenString<keyof Tokens['radius']>
|
|
1738
1881
|
| ThemeValueFallbackRadius
|
|
1739
1882
|
| number
|
|
1740
1883
|
| RemString
|
|
1884
|
+
| true
|
|
1885
|
+
|
|
1886
|
+
export type RadiusTokens = Radius
|
|
1741
1887
|
|
|
1742
|
-
export type
|
|
1888
|
+
export type Token =
|
|
1743
1889
|
| GetTokenString<keyof Tokens['radius']>
|
|
1744
1890
|
| GetTokenString<keyof Tokens['zIndex']>
|
|
1745
1891
|
| GetTokenString<keyof Tokens['color']>
|
|
1746
1892
|
| GetTokenString<keyof Tokens['space']>
|
|
1747
1893
|
| GetTokenString<keyof Tokens['size']>
|
|
1748
1894
|
|
|
1749
|
-
export type Token =
|
|
1750
|
-
| NonSpecificTokens
|
|
1751
|
-
| (TamaguiSettings extends { autocompleteSpecificTokens: false }
|
|
1752
|
-
? never
|
|
1753
|
-
: SpecificTokens)
|
|
1754
|
-
|
|
1755
1895
|
export type ColorStyleProp = ThemeValueFallbackColor | ColorTokens
|
|
1756
1896
|
|
|
1757
1897
|
// fonts
|
|
@@ -1776,48 +1916,53 @@ export type GetTokenFontKeysFor<
|
|
|
1776
1916
|
> = keyof TamaguiConfig['fonts']['body'][A]
|
|
1777
1917
|
|
|
1778
1918
|
export type FontTokens = GetTokenString<keyof TamaguiConfig['fonts']>
|
|
1779
|
-
export type FontFamilyTokens =
|
|
1780
|
-
export type
|
|
1919
|
+
export type FontFamilyTokens = FontTokens
|
|
1920
|
+
export type FontSize =
|
|
1781
1921
|
| GetTokenString<GetTokenFontKeysFor<'size'>>
|
|
1782
1922
|
| number
|
|
1783
1923
|
| RemString
|
|
1924
|
+
| true
|
|
1925
|
+
|
|
1926
|
+
export type FontSizeTokens = FontSize
|
|
1784
1927
|
export type FontLineHeightTokens =
|
|
1785
|
-
|
|
|
1928
|
+
| GetTokenString<GetTokenFontKeysFor<'lineHeight'>>
|
|
1786
1929
|
| number
|
|
1787
1930
|
| RemString
|
|
1788
1931
|
export type FontWeightValues =
|
|
1789
1932
|
| `${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}00`
|
|
1790
1933
|
| 'bold'
|
|
1791
1934
|
| 'normal'
|
|
1792
|
-
export type FontWeightTokens =
|
|
1935
|
+
export type FontWeightTokens =
|
|
1936
|
+
| GetTokenString<GetTokenFontKeysFor<'weight'>>
|
|
1937
|
+
| FontWeightValues
|
|
1793
1938
|
// font color tokens also support the opacity modifier
|
|
1794
|
-
type FontColorTokenBase =
|
|
1939
|
+
type FontColorTokenBase = GetTokenString<GetTokenFontKeysFor<'color'>>
|
|
1795
1940
|
export type FontColorTokens = FontColorTokenBase | number | TokenWithOpacity
|
|
1796
1941
|
export type FontLetterSpacingTokens =
|
|
1797
|
-
|
|
|
1942
|
+
| GetTokenString<GetTokenFontKeysFor<'letterSpacing'>>
|
|
1798
1943
|
| number
|
|
1799
1944
|
| RemString
|
|
1800
1945
|
export type FontStyleTokens =
|
|
1801
|
-
|
|
|
1946
|
+
| GetTokenString<GetTokenFontKeysFor<'style'>>
|
|
1802
1947
|
| RNTextStyle['fontStyle']
|
|
1803
1948
|
export type FontTransformTokens =
|
|
1804
|
-
|
|
|
1949
|
+
| GetTokenString<GetTokenFontKeysFor<'transform'>>
|
|
1805
1950
|
| RNTextStyle['textTransform']
|
|
1806
1951
|
|
|
1807
1952
|
export type ParseFont<A extends GenericFont> = {
|
|
1808
|
-
size:
|
|
1809
|
-
lineHeight:
|
|
1810
|
-
letterSpacing:
|
|
1811
|
-
weight:
|
|
1812
|
-
family:
|
|
1813
|
-
style:
|
|
1814
|
-
transform:
|
|
1815
|
-
color:
|
|
1816
|
-
face:
|
|
1953
|
+
size: TokenifyRecord<A['size']>
|
|
1954
|
+
lineHeight: TokenParsedIfExists<A['lineHeight']>
|
|
1955
|
+
letterSpacing: TokenParsedIfExists<A['letterSpacing']>
|
|
1956
|
+
weight: TokenParsedIfExists<A['weight']>
|
|
1957
|
+
family: TokenParsedIfExists<A['family']>
|
|
1958
|
+
style: TokenParsedIfExists<A['style']>
|
|
1959
|
+
transform: TokenParsedIfExists<A['transform']>
|
|
1960
|
+
color: TokenParsedIfExists<A['color']>
|
|
1961
|
+
face: TokenParsedIfExists<A['face']>
|
|
1817
1962
|
}
|
|
1818
1963
|
|
|
1819
|
-
export type
|
|
1820
|
-
A extends Record<string, any> ?
|
|
1964
|
+
export type TokenParsedIfExists<A> =
|
|
1965
|
+
A extends Record<string, any> ? TokenifyRecord<A> : {}
|
|
1821
1966
|
|
|
1822
1967
|
//
|
|
1823
1968
|
// adds theme short values to relevant props
|
|
@@ -1883,17 +2028,12 @@ export type ThemeValueGet<K extends string | number | symbol> = K extends 'theme
|
|
|
1883
2028
|
: K extends FontLetterSpacingKeys
|
|
1884
2029
|
? FontLetterSpacingTokens
|
|
1885
2030
|
: K extends OpacityKeys
|
|
1886
|
-
?
|
|
2031
|
+
? ThemeValueFallback
|
|
1887
2032
|
: never
|
|
1888
2033
|
|
|
1889
2034
|
export type GetThemeValueForKey<K extends string | symbol | number> =
|
|
1890
2035
|
| ThemeValueGet<K>
|
|
1891
2036
|
| ThemeValueFallback
|
|
1892
|
-
| (TamaguiSettings extends { autocompleteSpecificTokens: infer Val }
|
|
1893
|
-
? Val extends true | undefined
|
|
1894
|
-
? SpecificTokens
|
|
1895
|
-
: never
|
|
1896
|
-
: never)
|
|
1897
2037
|
|
|
1898
2038
|
// keys that accept the first-class "safe" value (-> env(safe-area-inset-*) on
|
|
1899
2039
|
// web, numeric insets on native). must mirror propEdges in resolveSafeArea.ts.
|
|
@@ -1937,13 +2077,62 @@ export type SafeAreaValueKeys =
|
|
|
1937
2077
|
| 'start'
|
|
1938
2078
|
| 'end'
|
|
1939
2079
|
|
|
2080
|
+
/**
|
|
2081
|
+
* Flat values: every style prop accepts either a clause-bearing string
|
|
2082
|
+
* (`bg="red hover:blue"`, `p="4 sm:6"`) or its flat object equivalent
|
|
2083
|
+
* (`bg={{ default: 'red', hover: 'blue' }}`). `(string & {})` admits the broad
|
|
2084
|
+
* string without collapsing the token/literal unions, so autocomplete
|
|
2085
|
+
* survives (design record, "Types and editor tooling"). Candidate and
|
|
2086
|
+
* modifier validation is the compiler's and language service's job.
|
|
2087
|
+
*/
|
|
2088
|
+
type ClauseModifierName =
|
|
2089
|
+
| (MediaQueryKey & string)
|
|
2090
|
+
| RootThemeName
|
|
2091
|
+
| CoreStateModifierName
|
|
2092
|
+
| `group-${CoreStateModifierName}`
|
|
2093
|
+
| AllPlatforms
|
|
2094
|
+
|
|
2095
|
+
/**
|
|
2096
|
+
* Object keys have no `(string & {})` escape hatch the way string values do,
|
|
2097
|
+
* so the container (`@sm`, `@sm/card`) and named-group (`group-hover/card`)
|
|
2098
|
+
* spellings need their own single-template arms.
|
|
2099
|
+
*/
|
|
2100
|
+
type FlatClauseName =
|
|
2101
|
+
| ClauseModifierName
|
|
2102
|
+
| `${ClauseModifierName}:${string}`
|
|
2103
|
+
| `@${string}`
|
|
2104
|
+
| `group-${CoreStateModifierName}/${string}`
|
|
2105
|
+
|
|
2106
|
+
/**
|
|
2107
|
+
* The structured twin of a flat clause string. It stays deliberately
|
|
2108
|
+
* non-recursive: the condition chain is the key, and every leaf keeps the
|
|
2109
|
+
* style property's value type. `(string & {})` rides along on each leaf for
|
|
2110
|
+
* the same reason it does on the whole value: the string form accepts any
|
|
2111
|
+
* payload text, and without it two `FlatStyleValue`s that differ only by
|
|
2112
|
+
* string members ('unset', a fallback union) stop being assignable across
|
|
2113
|
+
* package boundaries.
|
|
2114
|
+
*/
|
|
2115
|
+
export type FlatStyleObject<T> = { default?: T | (string & {}) } & {
|
|
2116
|
+
[K in FlatClauseName]?: T | (string & {})
|
|
2117
|
+
}
|
|
2118
|
+
|
|
2119
|
+
/**
|
|
2120
|
+
* The string arm stays at base values only: `(string & {})` admits every
|
|
2121
|
+
* clause string, and structured clause completion comes from the object
|
|
2122
|
+
* form's keys (and the language-service plugin for strings). A per-prop
|
|
2123
|
+
* `${modifier}:` prefix union used to ride along for first-prefix
|
|
2124
|
+
* completion; it multiplied across the whole component prop graph and the
|
|
2125
|
+
* object form made it redundant.
|
|
2126
|
+
*/
|
|
2127
|
+
export type FlatStyleValue<T> = T | FlatStyleObject<T> | (string & {})
|
|
2128
|
+
|
|
1940
2129
|
export type WithThemeValues<T extends object> = {
|
|
1941
2130
|
[K in keyof T]:
|
|
1942
2131
|
| (ThemeValueGet<K> extends never
|
|
1943
2132
|
? K extends keyof ExtraBaseProps
|
|
1944
2133
|
? T[K]
|
|
1945
|
-
: T[K] | 'unset'
|
|
1946
|
-
: GetThemeValueForKey<K> | Exclude<T[K], string> | 'unset')
|
|
2134
|
+
: FlatStyleValue<T[K] | 'unset'>
|
|
2135
|
+
: FlatStyleValue<GetThemeValueForKey<K> | Exclude<T[K], string> | 'unset'>)
|
|
1947
2136
|
| (K extends SafeAreaValueKeys ? 'safe' : never)
|
|
1948
2137
|
}
|
|
1949
2138
|
|
|
@@ -1974,46 +2163,6 @@ export type WithShorthands<StyleProps> = {
|
|
|
1974
2163
|
: undefined
|
|
1975
2164
|
}
|
|
1976
2165
|
|
|
1977
|
-
// adds pseudo props
|
|
1978
|
-
// PseudoStyleWithTransition allows transition inside pseudo-style props for enter/exit timing
|
|
1979
|
-
export type PseudoStyleWithTransition<A> = A & { transition?: TransitionProp | null }
|
|
1980
|
-
|
|
1981
|
-
export type WithPseudoProps<A> = {
|
|
1982
|
-
hoverStyle?: PseudoStyleWithTransition<A> | null
|
|
1983
|
-
pressStyle?: PseudoStyleWithTransition<A> | null
|
|
1984
|
-
focusStyle?: PseudoStyleWithTransition<A> | null
|
|
1985
|
-
focusWithinStyle?: PseudoStyleWithTransition<A> | null
|
|
1986
|
-
focusVisibleStyle?: PseudoStyleWithTransition<A> | null
|
|
1987
|
-
disabledStyle?: PseudoStyleWithTransition<A> | null
|
|
1988
|
-
exitStyle?: PseudoStyleWithTransition<A> | null
|
|
1989
|
-
enterStyle?: PseudoStyleWithTransition<A> | null
|
|
1990
|
-
}
|
|
1991
|
-
|
|
1992
|
-
// type for transitions extracted from pseudo-style props (e.g., hoverStyle.transition)
|
|
1993
|
-
// includes $group-*-hover, $group-*-press, $group-*-focus patterns
|
|
1994
|
-
export type PseudoTransitions = Partial<
|
|
1995
|
-
Record<keyof WithPseudoProps<any>, TransitionProp | null>
|
|
1996
|
-
> & {
|
|
1997
|
-
// allow $group-{name}-{pseudo} keys dynamically
|
|
1998
|
-
[key: `$group-${string}-${'hover' | 'press' | 'focus'}`]:
|
|
1999
|
-
| TransitionProp
|
|
2000
|
-
| null
|
|
2001
|
-
| undefined
|
|
2002
|
-
}
|
|
2003
|
-
|
|
2004
|
-
export type PseudoPropKeys = keyof WithPseudoProps<any>
|
|
2005
|
-
|
|
2006
|
-
export type PseudoStyles = {
|
|
2007
|
-
hoverStyle?: ViewStyle
|
|
2008
|
-
pressStyle?: ViewStyle
|
|
2009
|
-
focusStyle?: ViewStyle
|
|
2010
|
-
focusWithinStyle?: ViewStyle
|
|
2011
|
-
focusVisibleStyle?: ViewStyle
|
|
2012
|
-
disabledStyle?: ViewStyle
|
|
2013
|
-
enterStyle?: ViewStyle
|
|
2014
|
-
exitStyle?: ViewStyle
|
|
2015
|
-
}
|
|
2016
|
-
|
|
2017
2166
|
export type AllPlatforms =
|
|
2018
2167
|
| 'web'
|
|
2019
2168
|
| 'native'
|
|
@@ -2032,32 +2181,25 @@ type MaybeOmitLonghands<A> = OnlyShorthandStyleProps extends true
|
|
|
2032
2181
|
? Omit<A, ShorthandLonghandProps>
|
|
2033
2182
|
: A
|
|
2034
2183
|
|
|
2184
|
+
// variant props at the call site take the same conditional forms as style
|
|
2185
|
+
// values: density="compact sm:roomy" and density={{ default: 'compact', sm: 'roomy' }}.
|
|
2186
|
+
// the widening happens only here, at the final public props, so every
|
|
2187
|
+
// definition-side type (defaultVariants, inheritance)
|
|
2188
|
+
// keeps the exact branch-key unions
|
|
2189
|
+
export type WithFlatVariantValues<Variants> = {
|
|
2190
|
+
[Key in keyof Variants]?: FlatStyleValue<NonNullable<Variants[Key]>>
|
|
2191
|
+
}
|
|
2192
|
+
|
|
2035
2193
|
export type WithThemeAndShorthands<
|
|
2036
2194
|
A extends object,
|
|
2037
2195
|
Variants = {},
|
|
2038
2196
|
> = OnlyAllowShorthands extends true
|
|
2039
2197
|
? WithThemeValues<MaybeOmitLonghands<Omit<A, Longhands>>> &
|
|
2040
|
-
Variants &
|
|
2198
|
+
WithFlatVariantValues<Variants> &
|
|
2199
|
+
WithShorthands<WithThemeValues<A>>
|
|
2200
|
+
: WithThemeValues<MaybeOmitLonghands<A>> &
|
|
2201
|
+
WithFlatVariantValues<Variants> &
|
|
2041
2202
|
WithShorthands<WithThemeValues<A>>
|
|
2042
|
-
: WithThemeValues<MaybeOmitLonghands<A>> & Variants & WithShorthands<WithThemeValues<A>>
|
|
2043
|
-
|
|
2044
|
-
//
|
|
2045
|
-
// combines all of theme, shorthands, pseudos...
|
|
2046
|
-
//
|
|
2047
|
-
export type WithThemeShorthandsAndPseudos<
|
|
2048
|
-
A extends object,
|
|
2049
|
-
Variants = {},
|
|
2050
|
-
> = WithThemeAndShorthands<A, Variants> &
|
|
2051
|
-
WithPseudoProps<WithThemeAndShorthands<A, Variants>>
|
|
2052
|
-
|
|
2053
|
-
//
|
|
2054
|
-
// ... media queries and animations
|
|
2055
|
-
//
|
|
2056
|
-
export type WithThemeShorthandsPseudosMedia<
|
|
2057
|
-
A extends object,
|
|
2058
|
-
Variants = {},
|
|
2059
|
-
> = WithThemeShorthandsAndPseudos<A, Variants> &
|
|
2060
|
-
WithMediaProps<WithThemeShorthandsAndPseudos<A, Variants>>
|
|
2061
2203
|
|
|
2062
2204
|
/**
|
|
2063
2205
|
* Base style-only props (no media, pseudo):
|
|
@@ -2098,14 +2240,14 @@ type BoxShadowPreset =
|
|
|
2098
2240
|
| '0 0' // offset only
|
|
2099
2241
|
| '0 1px 2px' // offset + blur
|
|
2100
2242
|
| '0 1px 2px 0' // offset + blur + spread
|
|
2101
|
-
| '0 1px 2px
|
|
2102
|
-
| '0 1px 3px 0
|
|
2103
|
-
| '0 4px 6px -1px
|
|
2104
|
-
| 'inset 0 2px 4px
|
|
2243
|
+
| '0 1px 2px shadow-color' // offset + blur + color token
|
|
2244
|
+
| '0 1px 3px 0 shadow-color' // offset + blur + spread + color token
|
|
2245
|
+
| '0 4px 6px -1px shadow-color' // negative spread
|
|
2246
|
+
| 'inset 0 2px 4px shadow-color' // inset
|
|
2105
2247
|
| 'none'
|
|
2106
2248
|
|
|
2107
|
-
// Box Shadow - CSS string format (e.g. "0 4px 8px
|
|
2108
|
-
// Supports embedded
|
|
2249
|
+
// Box Shadow - CSS string format (e.g. "0 4px 8px shadow-color")
|
|
2250
|
+
// Supports embedded bare tokens that get resolved at runtime
|
|
2109
2251
|
export type BoxShadowValue = BoxShadowPreset | (string & {})
|
|
2110
2252
|
|
|
2111
2253
|
// filter presets - one example per function for autocomplete hints
|
|
@@ -2113,7 +2255,7 @@ type FilterPreset =
|
|
|
2113
2255
|
| 'blur(4px)'
|
|
2114
2256
|
| 'brightness(1.2)'
|
|
2115
2257
|
| 'contrast(1.2)'
|
|
2116
|
-
| 'drop-shadow(0 4px 8px
|
|
2258
|
+
| 'drop-shadow(0 4px 8px shadow-color)'
|
|
2117
2259
|
| 'grayscale(1)'
|
|
2118
2260
|
| 'hue-rotate(90deg)'
|
|
2119
2261
|
| 'invert(1)'
|
|
@@ -2123,18 +2265,18 @@ type FilterPreset =
|
|
|
2123
2265
|
| 'none'
|
|
2124
2266
|
|
|
2125
2267
|
// Filter - CSS string format (e.g. "blur(10px) brightness(1.2)")
|
|
2126
|
-
// Supports embedded
|
|
2268
|
+
// Supports embedded bare tokens that get resolved at runtime
|
|
2127
2269
|
export type FilterValue = FilterPreset | (string & {})
|
|
2128
2270
|
|
|
2129
2271
|
// border shorthand presets - examples for autocomplete hints
|
|
2130
2272
|
type BorderPreset =
|
|
2131
2273
|
| '1px solid' // width + style
|
|
2132
|
-
| '1px solid
|
|
2133
|
-
| '2px dashed
|
|
2274
|
+
| '1px solid border-color' // width + style + color token
|
|
2275
|
+
| '2px dashed border-color' // width + style + color
|
|
2134
2276
|
| '1px dotted red' // width + style + color
|
|
2135
2277
|
| 'none'
|
|
2136
2278
|
|
|
2137
|
-
// Border - CSS shorthand string format (e.g. "1px solid
|
|
2279
|
+
// Border - CSS shorthand string format (e.g. "1px solid border-color")
|
|
2138
2280
|
// Expands to borderWidth, borderStyle, borderColor on web and native
|
|
2139
2281
|
// Note: on native, only supports a single border (all sides)
|
|
2140
2282
|
export type BorderValue = BorderPreset | (string & {})
|
|
@@ -2142,16 +2284,20 @@ export type BorderValue = BorderPreset | (string & {})
|
|
|
2142
2284
|
// outline shorthand presets - examples for autocomplete hints
|
|
2143
2285
|
type OutlinePreset =
|
|
2144
2286
|
| '1px solid' // width + style
|
|
2145
|
-
| '1px solid
|
|
2146
|
-
| '2px dashed
|
|
2287
|
+
| '1px solid outline-color' // width + style + color token
|
|
2288
|
+
| '2px dashed outline-color' // width + style + color
|
|
2147
2289
|
| '1px dotted red' // width + style + color
|
|
2148
2290
|
| 'none'
|
|
2149
2291
|
|
|
2150
|
-
// Outline - CSS shorthand string format (e.g. "2px solid
|
|
2292
|
+
// Outline - CSS shorthand string format (e.g. "2px solid outline-color")
|
|
2151
2293
|
// Expands to outlineWidth, outlineStyle, outlineColor on native
|
|
2152
2294
|
export type OutlineValue = OutlinePreset | (string & {})
|
|
2153
2295
|
|
|
2154
2296
|
interface ExtraStyleProps {
|
|
2297
|
+
/**
|
|
2298
|
+
* Text color, or a web-scoped color clause on a View.
|
|
2299
|
+
*/
|
|
2300
|
+
color?: ColorStyleProp
|
|
2155
2301
|
/**
|
|
2156
2302
|
* Controls the curve style of rounded corners.
|
|
2157
2303
|
* - 'circular': Standard circular arc corners (default)
|
|
@@ -2185,7 +2331,7 @@ interface ExtraStyleProps {
|
|
|
2185
2331
|
*/
|
|
2186
2332
|
outlineWidth?: SpaceValue
|
|
2187
2333
|
/**
|
|
2188
|
-
* CSS outline shorthand string. Supports tokens: "2px solid
|
|
2334
|
+
* CSS outline shorthand string. Supports tokens: "2px solid outline-color"
|
|
2189
2335
|
* Expands to outlineWidth, outlineStyle, outlineColor on native.
|
|
2190
2336
|
* Works on web and native.
|
|
2191
2337
|
*/
|
|
@@ -2199,9 +2345,17 @@ interface ExtraStyleProps {
|
|
|
2199
2345
|
*/
|
|
2200
2346
|
backdropFilter?: Properties['backdropFilter']
|
|
2201
2347
|
/**
|
|
2202
|
-
*
|
|
2348
|
+
* Works on web and native. Native lowers a single color value to
|
|
2349
|
+
* backgroundColor and drops url()/gradient/multi-part values it can't express.
|
|
2350
|
+
*
|
|
2351
|
+
* The v6 shorthands map `bg` here rather than to `backgroundColor`, because
|
|
2352
|
+
* the background family splits a value like `url(x.png) color1` across
|
|
2353
|
+
* backgroundImage and backgroundColor. Color tokens lead the union so `bg`
|
|
2354
|
+
* completes them; `Properties['background']` keeps the CSS shorthand
|
|
2355
|
+
* keywords. Adding this key to `ColorKeys` instead would erase that second
|
|
2356
|
+
* arm, since that path runs the value type through `Exclude<T[K], string>`.
|
|
2203
2357
|
*/
|
|
2204
|
-
background?: Properties['background']
|
|
2358
|
+
background?: ColorTokens | Properties['background']
|
|
2205
2359
|
/**
|
|
2206
2360
|
* Web-only style property. Will be omitted on native.
|
|
2207
2361
|
*/
|
|
@@ -2224,16 +2378,40 @@ interface ExtraStyleProps {
|
|
|
2224
2378
|
backgroundSize?: Properties['backgroundSize']
|
|
2225
2379
|
// boxSizing - provided by RN's ViewStyle
|
|
2226
2380
|
/**
|
|
2227
|
-
* CSS box-shadow string. Supports tokens: "0 4px 8px
|
|
2381
|
+
* CSS box-shadow string. Supports tokens: "0 4px 8px shadow-color"
|
|
2228
2382
|
* Works on web and native (RN 0.76+).
|
|
2229
2383
|
*/
|
|
2230
2384
|
boxShadow?: BoxShadowValue
|
|
2231
2385
|
/**
|
|
2232
|
-
* CSS border shorthand string. Supports tokens: "1px solid
|
|
2386
|
+
* CSS border shorthand string. Supports tokens: "1px solid border-color"
|
|
2233
2387
|
* Expands to borderWidth, borderStyle, borderColor.
|
|
2234
2388
|
* Works on web and native. On native, applies to all sides.
|
|
2235
2389
|
*/
|
|
2236
2390
|
border?: BorderValue
|
|
2391
|
+
/**
|
|
2392
|
+
* CSS logical border shorthand string, like `border` for the block axis.
|
|
2393
|
+
* Splits to the CSS logical longhands on web; native has no logical border
|
|
2394
|
+
* properties, so it is diagnosed and dropped there rather than approximated.
|
|
2395
|
+
*/
|
|
2396
|
+
borderBlock?: BorderValue
|
|
2397
|
+
/**
|
|
2398
|
+
* CSS logical border shorthand string, like `border` for the inline axis.
|
|
2399
|
+
* Splits to the CSS logical longhands on web; native has no logical border
|
|
2400
|
+
* properties, so it is diagnosed and dropped there rather than approximated.
|
|
2401
|
+
*/
|
|
2402
|
+
borderInline?: BorderValue
|
|
2403
|
+
/**
|
|
2404
|
+
* Web-only style property. Will be omitted on native.
|
|
2405
|
+
*/
|
|
2406
|
+
overflowWrap?: Properties['overflowWrap']
|
|
2407
|
+
/**
|
|
2408
|
+
* Web-only legacy alias of overflowWrap. Will be omitted on native.
|
|
2409
|
+
*/
|
|
2410
|
+
wordWrap?: Properties['wordWrap']
|
|
2411
|
+
/**
|
|
2412
|
+
* Web-only style property. Will be omitted on native.
|
|
2413
|
+
*/
|
|
2414
|
+
resize?: Properties['resize']
|
|
2237
2415
|
/**
|
|
2238
2416
|
* Web-only style property. Will be omitted on native.
|
|
2239
2417
|
*/
|
|
@@ -2242,6 +2420,14 @@ interface ExtraStyleProps {
|
|
|
2242
2420
|
* Web-only style property. Will be omitted on native.
|
|
2243
2421
|
*/
|
|
2244
2422
|
overflowY?: Properties['overflowY']
|
|
2423
|
+
/**
|
|
2424
|
+
* Web-only text wrapping strategy. Will be omitted on native.
|
|
2425
|
+
*/
|
|
2426
|
+
textWrap?: Properties['textWrap']
|
|
2427
|
+
/**
|
|
2428
|
+
* Web visibility. Native lowers hidden visibility to opacity and pointer events.
|
|
2429
|
+
*/
|
|
2430
|
+
visibility?: Properties['visibility']
|
|
2245
2431
|
|
|
2246
2432
|
pointerEvents?: ViewProps['pointerEvents']
|
|
2247
2433
|
|
|
@@ -2309,10 +2495,6 @@ interface ExtraStyleProps {
|
|
|
2309
2495
|
* Web-only style property. Will be omitted on native.
|
|
2310
2496
|
*/
|
|
2311
2497
|
float?: Properties['float']
|
|
2312
|
-
/**
|
|
2313
|
-
* Web-only style property. Will be omitted on native.
|
|
2314
|
-
*/
|
|
2315
|
-
content?: Properties['content']
|
|
2316
2498
|
/**
|
|
2317
2499
|
* Web-only style property. Will be omitted on native.
|
|
2318
2500
|
*/
|
|
@@ -2426,6 +2608,12 @@ interface ExtraStyleProps {
|
|
|
2426
2608
|
* Web-only style property. Will be omitted on native.
|
|
2427
2609
|
*/
|
|
2428
2610
|
containerType?: Properties['containerType']
|
|
2611
|
+
/**
|
|
2612
|
+
* Names this element as a query container for `@sm/name:`-style clauses.
|
|
2613
|
+
* Lowers to CSS `container-name` on web; on native it configures the
|
|
2614
|
+
* container context instead of emitting a style.
|
|
2615
|
+
*/
|
|
2616
|
+
containerName?: string
|
|
2429
2617
|
/**
|
|
2430
2618
|
* Web-only style property. Will be omitted on native.
|
|
2431
2619
|
*/
|
|
@@ -2517,18 +2705,18 @@ interface ExtraBaseProps {
|
|
|
2517
2705
|
*/
|
|
2518
2706
|
transition?: TransitionProp | null
|
|
2519
2707
|
|
|
2520
|
-
/**
|
|
2521
|
-
* Pass an array of strings containing the long style property names
|
|
2522
|
-
* which will be exclusively transitioned.
|
|
2523
|
-
*/
|
|
2524
|
-
animateOnly?: string[]
|
|
2525
|
-
|
|
2526
2708
|
/**
|
|
2527
2709
|
* If you'd like this component to not attach to the nearest parent AnimatePresence,
|
|
2528
2710
|
* set this to `false` and it will pass through to the next animated child.
|
|
2529
2711
|
*/
|
|
2530
2712
|
animatePresence?: boolean
|
|
2531
2713
|
|
|
2714
|
+
/**
|
|
2715
|
+
* Called by the animation driver at the start and end of each transition
|
|
2716
|
+
* (enter, exit, or an in-place style update). See `TransitionEvent`.
|
|
2717
|
+
*/
|
|
2718
|
+
onTransition?: OnTransition
|
|
2719
|
+
|
|
2532
2720
|
/**
|
|
2533
2721
|
* Avoids as much work as possible and passes through the children with no changes.
|
|
2534
2722
|
* Advanced: Useful for adapting to other element when you want to avoid re-parenting.
|
|
@@ -2552,7 +2740,14 @@ export interface StackStyleBase
|
|
|
2552
2740
|
extends Omit<ViewStyle, keyof ExtendedBaseProps | 'elevation'>, ExtendedBaseProps {}
|
|
2553
2741
|
|
|
2554
2742
|
export interface TextStylePropsBase
|
|
2555
|
-
extends Omit<RNTextStyle, keyof ExtendedBaseProps>, ExtendedBaseProps {
|
|
2743
|
+
extends Omit<RNTextStyle, keyof ExtendedBaseProps | 'fontVariant'>, ExtendedBaseProps {
|
|
2744
|
+
/**
|
|
2745
|
+
* react-native types this as a mutable `FontVariant[]`, which an `as const` variant
|
|
2746
|
+
* definition can't satisfy — and a variants object that misses its constraint is
|
|
2747
|
+
* silently discarded whole, taking every variant on the component with it (#2787).
|
|
2748
|
+
* react-native types `transform` as readonly for the same reason.
|
|
2749
|
+
*/
|
|
2750
|
+
fontVariant?: readonly FontVariant[]
|
|
2556
2751
|
ellipsis?: boolean
|
|
2557
2752
|
numberOfLines?: number
|
|
2558
2753
|
textDecorationDistance?: number
|
|
@@ -2560,14 +2755,24 @@ export interface TextStylePropsBase
|
|
|
2560
2755
|
whiteSpace?: Properties['whiteSpace']
|
|
2561
2756
|
wordWrap?: Properties['wordWrap']
|
|
2562
2757
|
/**
|
|
2563
|
-
* CSS text-shadow string. Supports tokens: "2px 2px 4px
|
|
2758
|
+
* CSS text-shadow string. Supports tokens: "2px 2px 4px shadow-color"
|
|
2564
2759
|
* On native, only a single shadow is supported.
|
|
2565
2760
|
*/
|
|
2566
2761
|
textShadow?: string
|
|
2762
|
+
/**
|
|
2763
|
+
* CSS text-decoration shorthand string ("underline dotted red").
|
|
2764
|
+
* Splits to line/style/color; on native the three RN longhand props.
|
|
2765
|
+
*/
|
|
2766
|
+
textDecoration?: string
|
|
2767
|
+
/**
|
|
2768
|
+
* CSS font shorthand string ("italic bold 16px/1.5 Inter").
|
|
2769
|
+
* Splits by the CSS micro-syntax; ambiguous forms stay unparsed.
|
|
2770
|
+
*/
|
|
2771
|
+
font?: string
|
|
2567
2772
|
}
|
|
2568
2773
|
|
|
2569
2774
|
//
|
|
2570
|
-
//
|
|
2775
|
+
// View
|
|
2571
2776
|
//
|
|
2572
2777
|
|
|
2573
2778
|
type LooseCombinedObjects<A extends object, B extends object> = A | B | (A & B)
|
|
@@ -2582,7 +2787,6 @@ type LooseCombinedObjects<A extends object, B extends object> = A | B | (A & B)
|
|
|
2582
2787
|
// - accessibilityViewIsModal → aria-modal
|
|
2583
2788
|
// - accessibilityLiveRegion → aria-live
|
|
2584
2789
|
// - accessible → tabIndex={0}
|
|
2585
|
-
// - focusable → tabIndex
|
|
2586
2790
|
// - nativeID → id
|
|
2587
2791
|
|
|
2588
2792
|
export interface StackNonStyleProps
|
|
@@ -2612,7 +2816,7 @@ export interface StackNonStyleProps
|
|
|
2612
2816
|
style?: StyleProp<LooseCombinedObjects<React.CSSProperties, ViewStyle>>
|
|
2613
2817
|
}
|
|
2614
2818
|
|
|
2615
|
-
export type StackStyle =
|
|
2819
|
+
export type StackStyle = WithThemeAndShorthands<StackStyleBase>
|
|
2616
2820
|
|
|
2617
2821
|
//
|
|
2618
2822
|
// Text props
|
|
@@ -2628,6 +2832,13 @@ export interface TextNonStyleProps
|
|
|
2628
2832
|
| RNOnlyProps
|
|
2629
2833
|
| keyof ExtendBaseTextProps
|
|
2630
2834
|
| 'style'
|
|
2835
|
+
// web-standard `userSelect` is the one authoring name; core maps it to
|
|
2836
|
+
// RN's `selectable` prop on native
|
|
2837
|
+
| 'selectable'
|
|
2838
|
+
// the style side owns these as flat-value style props; intersecting
|
|
2839
|
+
// RN's plain unions would strip the clause string and object forms
|
|
2840
|
+
| 'numberOfLines'
|
|
2841
|
+
| 'pointerEvents'
|
|
2631
2842
|
>,
|
|
2632
2843
|
ExtendBaseTextProps,
|
|
2633
2844
|
TamaguiComponentPropsBase {
|
|
@@ -2635,55 +2846,33 @@ export interface TextNonStyleProps
|
|
|
2635
2846
|
style?: StyleProp<LooseCombinedObjects<React.CSSProperties, RNTextStyle>>
|
|
2636
2847
|
}
|
|
2637
2848
|
|
|
2638
|
-
export type TextStyle =
|
|
2849
|
+
export type TextStyle = WithThemeAndShorthands<TextStylePropsBase>
|
|
2639
2850
|
|
|
2640
2851
|
export type TextProps = TextNonStyleProps & TextStyle
|
|
2641
2852
|
|
|
2642
2853
|
export interface ThemeableProps {
|
|
2643
2854
|
theme?: ThemeName | null
|
|
2644
|
-
themeReset?: boolean
|
|
2645
|
-
componentName?: string
|
|
2646
2855
|
debug?: DebugProp
|
|
2647
2856
|
}
|
|
2648
2857
|
|
|
2649
|
-
export type
|
|
2858
|
+
export type StyledHOCOptions = {
|
|
2650
2859
|
disableTheme?: boolean
|
|
2860
|
+
displayName?: string
|
|
2651
2861
|
staticConfig?: Partial<StaticConfig>
|
|
2652
2862
|
}
|
|
2653
2863
|
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
ParentStaticProperties,
|
|
2661
|
-
> = <
|
|
2662
|
-
CustomProps extends object | void = void,
|
|
2663
|
-
MergedProps = CustomProps extends void
|
|
2664
|
-
? Props
|
|
2665
|
-
: Omit<Props, keyof CustomProps> & CustomProps,
|
|
2666
|
-
FunctionDef extends ForwardRefRenderFunction<Ref, MergedProps> =
|
|
2667
|
-
ForwardRefRenderFunction<Ref, MergedProps>,
|
|
2668
|
-
>(
|
|
2669
|
-
a: FunctionDef,
|
|
2670
|
-
options?: StyleableOptions
|
|
2671
|
-
) => TamaguiComponent<
|
|
2672
|
-
MergedProps,
|
|
2673
|
-
Ref,
|
|
2674
|
-
NonStyledProps & CustomProps,
|
|
2675
|
-
BaseStyles,
|
|
2676
|
-
VariantProps,
|
|
2677
|
-
ParentStaticProperties
|
|
2678
|
-
>
|
|
2864
|
+
// merges an annotated render-fn props type over the wrapped component's props.
|
|
2865
|
+
// when the render fn param is unannotated CustomProps stays {} and the wrapped
|
|
2866
|
+
// component's props pass through untouched.
|
|
2867
|
+
export type StyledHOCMergedProps<Props, CustomProps> = keyof CustomProps extends never
|
|
2868
|
+
? Props
|
|
2869
|
+
: Omit<Props, keyof CustomProps> & CustomProps
|
|
2679
2870
|
|
|
2680
2871
|
export type GetFinalProps<NonStyleProps, StylePropsBase, Variants> = Omit<
|
|
2681
2872
|
NonStyleProps,
|
|
2682
2873
|
keyof StylePropsBase | keyof Variants
|
|
2683
2874
|
> &
|
|
2684
|
-
(StylePropsBase extends object
|
|
2685
|
-
? WithThemeShorthandsPseudosMedia<StylePropsBase, Variants>
|
|
2686
|
-
: {})
|
|
2875
|
+
(StylePropsBase extends object ? WithThemeAndShorthands<StylePropsBase, Variants> : {})
|
|
2687
2876
|
|
|
2688
2877
|
export type TamaguiComponent<
|
|
2689
2878
|
Props = any,
|
|
@@ -2692,11 +2881,10 @@ export type TamaguiComponent<
|
|
|
2692
2881
|
BaseStyles extends object = {},
|
|
2693
2882
|
Variants = {},
|
|
2694
2883
|
ParentStaticProperties = {},
|
|
2695
|
-
> =
|
|
2884
|
+
> = FunctionComponent<
|
|
2696
2885
|
(Props extends TamaDefer
|
|
2697
2886
|
? GetFinalProps<NonStyledProps, BaseStyles, Variants>
|
|
2698
|
-
: Props) &
|
|
2699
|
-
RefAttributes<Ref>
|
|
2887
|
+
: Props) & { ref?: ReactRef<Ref> }
|
|
2700
2888
|
> &
|
|
2701
2889
|
StaticComponentObject<
|
|
2702
2890
|
Props,
|
|
@@ -2706,20 +2894,18 @@ export type TamaguiComponent<
|
|
|
2706
2894
|
Variants,
|
|
2707
2895
|
ParentStaticProperties
|
|
2708
2896
|
> &
|
|
2709
|
-
Omit<ParentStaticProperties, 'staticConfig'
|
|
2897
|
+
Omit<ParentStaticProperties, 'staticConfig'> & {
|
|
2710
2898
|
__tama: [Props, Ref, NonStyledProps, BaseStyles, Variants, ParentStaticProperties]
|
|
2711
2899
|
}
|
|
2712
2900
|
|
|
2713
2901
|
export type InferGenericComponentProps<A> =
|
|
2714
2902
|
A extends ComponentType<infer Props>
|
|
2715
2903
|
? Props
|
|
2716
|
-
: A extends
|
|
2904
|
+
: A extends ReactComponentWithRef<infer P, any>
|
|
2717
2905
|
? P
|
|
2718
|
-
: A extends
|
|
2719
|
-
?
|
|
2720
|
-
:
|
|
2721
|
-
? Props
|
|
2722
|
-
: {}
|
|
2906
|
+
: A extends new (props: infer Props) => any
|
|
2907
|
+
? Props
|
|
2908
|
+
: {}
|
|
2723
2909
|
|
|
2724
2910
|
export type InferStyledProps<
|
|
2725
2911
|
A extends StylableComponent,
|
|
@@ -2734,7 +2920,7 @@ export type InferStyledProps<
|
|
|
2734
2920
|
export type InferStyleProps<
|
|
2735
2921
|
A extends StylableComponent,
|
|
2736
2922
|
B extends StaticConfigPublic,
|
|
2737
|
-
> =
|
|
2923
|
+
> = WithThemeAndShorthands<GetBaseStyles<A, B>, {}>
|
|
2738
2924
|
|
|
2739
2925
|
export type GetProps<A extends StylableComponent> = A extends {
|
|
2740
2926
|
__tama: [
|
|
@@ -2796,13 +2982,20 @@ export type StaticComponentObject<
|
|
|
2796
2982
|
> = {
|
|
2797
2983
|
staticConfig: StaticConfig
|
|
2798
2984
|
|
|
2799
|
-
|
|
2800
|
-
*
|
|
2985
|
+
/**
|
|
2986
|
+
* chain a component resolver: receives the complete props plus the style
|
|
2987
|
+
* env, returns a style fragment applied above variants and below call-site
|
|
2988
|
+
* props. Returns a NEW component; the original is untouched.
|
|
2801
2989
|
*/
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2990
|
+
resolve(
|
|
2991
|
+
resolver: StyledResolver<
|
|
2992
|
+
Props extends TamaDefer
|
|
2993
|
+
? GetFinalProps<NonStyledProps, BaseStyles, VariantProps>
|
|
2994
|
+
: Props,
|
|
2995
|
+
WithThemeAndShorthands<BaseStyles, {}>
|
|
2996
|
+
>
|
|
2997
|
+
): TamaguiComponent<
|
|
2998
|
+
Props,
|
|
2806
2999
|
Ref,
|
|
2807
3000
|
NonStyledProps,
|
|
2808
3001
|
BaseStyles,
|
|
@@ -2823,11 +3016,12 @@ export type TamaguiProviderProps = Omit<ThemeProviderProps, 'children'> & {
|
|
|
2823
3016
|
insets?: { top: number; right: number; bottom: number; left: number }
|
|
2824
3017
|
}
|
|
2825
3018
|
|
|
2826
|
-
|
|
3019
|
+
// entry[3] is the raw modifier source of a conditional variant clause
|
|
3020
|
+
// (`"sm"` in `density="compact sm:roomy"`), present only on clause entries
|
|
3021
|
+
export type PropMappedValue = [string, any, any?, string?][] | undefined
|
|
2827
3022
|
|
|
2828
3023
|
export type GetStyleState = {
|
|
2829
3024
|
style: TextStyle | null
|
|
2830
|
-
usedKeys: Record<string, number>
|
|
2831
3025
|
classNames: ClassNamesObject
|
|
2832
3026
|
staticConfig: StaticConfig
|
|
2833
3027
|
theme: ThemeParsed
|
|
@@ -2840,18 +3034,32 @@ export type GetStyleState = {
|
|
|
2840
3034
|
avoidMergeTransform?: boolean
|
|
2841
3035
|
fontFamily?: string
|
|
2842
3036
|
debug?: DebugProp
|
|
2843
|
-
|
|
3037
|
+
transformAccumulator?: TransformAccumulator
|
|
3038
|
+
// direct flat-value scan context and its subscription output
|
|
3039
|
+
flatRulesToInsert?: RulesToInsert
|
|
3040
|
+
flatShouldDoClasses?: boolean
|
|
3041
|
+
flatThemeName?: string
|
|
3042
|
+
flatMediaState?: Record<string, boolean | undefined>
|
|
3043
|
+
flatGroupContext?: AllGroupContexts | null
|
|
3044
|
+
flatConditionOrder?: number
|
|
3045
|
+
flatStateKeys?: Set<string>
|
|
3046
|
+
flatMediaKeys?: Set<string>
|
|
3047
|
+
flatGroupKeys?: Set<string>
|
|
3048
|
+
flatGroupMedia?: Set<string>
|
|
3049
|
+
flatEnterKeys?: Set<string>
|
|
3050
|
+
flatExitKeys?: Set<string>
|
|
3051
|
+
flatHasEnterStyle?: boolean
|
|
3052
|
+
flatHasPlatformPseudo?: boolean
|
|
3053
|
+
flatUsesSafeArea?: boolean
|
|
2844
3054
|
// Track style values that override context props (for issues #3670, #3676)
|
|
2845
3055
|
overriddenContextProps?: Record<string, any>
|
|
2846
|
-
// Track original token values
|
|
3056
|
+
// Track original token values before they get resolved to CSS vars
|
|
2847
3057
|
// This is used to preserve token strings in overriddenContextProps
|
|
2848
3058
|
originalContextPropValues?: Record<string, any>
|
|
2849
|
-
// opt-in dev-tools token provenance: original token string
|
|
3059
|
+
// opt-in dev-tools token provenance: original token string
|
|
2850
3060
|
// for each winning base style key, cleared on literal override. stamped onto
|
|
2851
3061
|
// the final style object as non-enumerable metadata (see helpers/styleProvenance).
|
|
2852
3062
|
tokenProvenance?: Record<string, string>
|
|
2853
|
-
// Transitions extracted from pseudo-style props (e.g., hoverStyle.transition)
|
|
2854
|
-
pseudoTransitions?: PseudoTransitions | null
|
|
2855
3063
|
// Resolved animation driver (respects animatedBy prop)
|
|
2856
3064
|
animationDriver?: AnimationDriver | null
|
|
2857
3065
|
}
|
|
@@ -2869,22 +3077,28 @@ export type PropMapper = (
|
|
|
2869
3077
|
value: any,
|
|
2870
3078
|
state: GetStyleState,
|
|
2871
3079
|
disabled: boolean,
|
|
2872
|
-
|
|
3080
|
+
parentCondition?: number,
|
|
3081
|
+
fallbackOriginal?: any
|
|
2873
3082
|
) => void
|
|
2874
3083
|
|
|
2875
3084
|
export type GenericVariantDefinitions = {
|
|
2876
|
-
[key: string]:
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
3085
|
+
[key: string]:
|
|
3086
|
+
| StyledDynamic<any>
|
|
3087
|
+
| {
|
|
3088
|
+
[key: string]:
|
|
3089
|
+
| StaticStyleInput
|
|
3090
|
+
| {
|
|
3091
|
+
[key: string]: any
|
|
3092
|
+
}
|
|
3093
|
+
}
|
|
2883
3094
|
}
|
|
2884
3095
|
|
|
2885
3096
|
export type StaticConfigPublic = {
|
|
2886
3097
|
defaultProps?: Record<string, any>
|
|
2887
3098
|
|
|
3099
|
+
/** Static class input supplied to styled(Component, baseClassName, ...). */
|
|
3100
|
+
baseClassName?: StaticStyleInput
|
|
3101
|
+
|
|
2888
3102
|
/**
|
|
2889
3103
|
* (compiler) If you need to pass context or something, prevents from ever
|
|
2890
3104
|
* flattening. The 'jsx' option means it will never flatten. if you
|
|
@@ -2907,32 +3121,24 @@ export type StaticConfigPublic = {
|
|
|
2907
3121
|
*/
|
|
2908
3122
|
validStyles?: { [key: string]: boolean }
|
|
2909
3123
|
|
|
2910
|
-
/**
|
|
2911
|
-
* Accept Tamagui tokens for these props (key for the prop key, val for the token category)
|
|
2912
|
-
*/
|
|
2913
|
-
accept?: {
|
|
2914
|
-
[key: string]: keyof Tokens | 'style' | 'textStyle'
|
|
2915
|
-
}
|
|
2916
|
-
|
|
2917
3124
|
/**
|
|
2918
3125
|
* (compiler) If these props are encountered, leave them un-extracted.
|
|
2919
3126
|
*/
|
|
2920
3127
|
inlineProps?: Set<string>
|
|
2921
3128
|
|
|
2922
3129
|
/**
|
|
2923
|
-
*
|
|
2924
|
-
*
|
|
3130
|
+
* Props that reach `Component` even though the platform prop-skip list drops
|
|
3131
|
+
* them. The native DOM primitives build their own event payloads, so a DOM
|
|
3132
|
+
* frame's `onClick` is the primitive's input, not a web-only prop.
|
|
2925
3133
|
*/
|
|
2926
|
-
|
|
3134
|
+
neverSkipProps?: Record<string, 1>
|
|
2927
3135
|
|
|
2928
3136
|
/**
|
|
2929
3137
|
* Auto-detected, but can override. Wraps children to space them on top
|
|
2930
3138
|
*/
|
|
2931
3139
|
isZStack?: boolean
|
|
2932
3140
|
|
|
2933
|
-
/**
|
|
2934
|
-
* Auto-detect, but can override, passes styles properly to react-native-web
|
|
2935
|
-
*/
|
|
3141
|
+
/** Native-only marker for components backed by a React Native host. */
|
|
2936
3142
|
isReactNative?: boolean
|
|
2937
3143
|
|
|
2938
3144
|
/**
|
|
@@ -2946,19 +3152,29 @@ export type StaticConfigPublic = {
|
|
|
2946
3152
|
* memoizes component, rarely useful except mostly style components that don't take children
|
|
2947
3153
|
*/
|
|
2948
3154
|
memo?: boolean
|
|
3155
|
+
|
|
3156
|
+
contextProps?: readonly string[]
|
|
2949
3157
|
}
|
|
2950
3158
|
|
|
2951
3159
|
type StaticConfigBase = StaticConfigPublic & {
|
|
2952
3160
|
Component?: FunctionComponent<any> & StaticComponentObject<any, any, any, any, any, any>
|
|
2953
3161
|
|
|
2954
|
-
|
|
3162
|
+
displayName?: string
|
|
2955
3163
|
|
|
2956
|
-
|
|
3164
|
+
baseStyle?: Record<string, any>
|
|
3165
|
+
|
|
3166
|
+
variants?: GenericVariantDefinitions
|
|
2957
3167
|
|
|
2958
3168
|
/**
|
|
2959
|
-
*
|
|
3169
|
+
* component resolvers added via `.resolve`, parent-first. Run after the
|
|
3170
|
+
* props walk at their own precedence tier (above variants, below call-site
|
|
3171
|
+
* props); a later resolver wins within the tier.
|
|
2960
3172
|
*/
|
|
2961
|
-
|
|
3173
|
+
resolvers?: StyledResolver[]
|
|
3174
|
+
|
|
3175
|
+
context?: StyledContext
|
|
3176
|
+
|
|
3177
|
+
contextProps?: readonly string[]
|
|
2962
3178
|
|
|
2963
3179
|
/**
|
|
2964
3180
|
* Merges into defaultProps later on, used internally only
|
|
@@ -2975,24 +3191,48 @@ type StaticConfigBase = StaticConfigPublic & {
|
|
|
2975
3191
|
*/
|
|
2976
3192
|
isHOC?: boolean
|
|
2977
3193
|
|
|
2978
|
-
//
|
|
3194
|
+
// Tracks when styled() wraps a HOC that already wraps styled().
|
|
2979
3195
|
isStyledHOC?: boolean
|
|
3196
|
+
|
|
3197
|
+
/**
|
|
3198
|
+
* The immutable authoring syntax of this component, set by the package that
|
|
3199
|
+
* created it and inherited by styled() descendants. Absent means the regular
|
|
3200
|
+
* Tamagui frontend (see `regularStyleFrontend`).
|
|
3201
|
+
*/
|
|
3202
|
+
styleFrontend?: StyleFrontend
|
|
3203
|
+
|
|
3204
|
+
/**
|
|
3205
|
+
* Raw classes from `baseClassName` that the frontend did not claim, produced by
|
|
3206
|
+
* the descriptor's `normalizeStaticConfig`. They stay a class string so the app's
|
|
3207
|
+
* own CSS still applies them, and stay out of `baseStyle` because that object
|
|
3208
|
+
* holds styles only.
|
|
3209
|
+
*/
|
|
3210
|
+
passthroughClassName?: string
|
|
2980
3211
|
}
|
|
2981
3212
|
|
|
2982
3213
|
export type StaticConfig = StaticConfigBase & {
|
|
2983
3214
|
parentStaticConfig?: StaticConfigBase
|
|
2984
3215
|
}
|
|
2985
3216
|
|
|
2986
|
-
export type
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
3217
|
+
export type ViewStyleObject = TextStyle
|
|
3218
|
+
|
|
3219
|
+
/** Shared registry symbol carried by runtime/compiled `style()` pieces. */
|
|
3220
|
+
export const stylePieceSymbol: symbol = Symbol.for('tamagui.stylePiece')
|
|
3221
|
+
|
|
3222
|
+
/** A statically-shaped style accepted by `style()`. */
|
|
3223
|
+
export type StaticShapeStyle = TextStyle
|
|
3224
|
+
|
|
3225
|
+
/**
|
|
3226
|
+
* Per-property style fragment. `byKey` keeps later tiers subtractable; the
|
|
3227
|
+
* authored object is retained for native and inline-JS resolution.
|
|
3228
|
+
*/
|
|
3229
|
+
export type StylePiece = {
|
|
3230
|
+
className: string
|
|
3231
|
+
[key: symbol]: {
|
|
3232
|
+
byKey: Record<string, string>
|
|
3233
|
+
styleObject: StaticShapeStyle
|
|
3234
|
+
}
|
|
3235
|
+
}
|
|
2996
3236
|
|
|
2997
3237
|
/**
|
|
2998
3238
|
* --------------------------------------------
|
|
@@ -3003,22 +3243,55 @@ export type ViewStyleWithPseudos =
|
|
|
3003
3243
|
export type StylableComponent =
|
|
3004
3244
|
| TamaguiComponent
|
|
3005
3245
|
| ComponentType<any>
|
|
3006
|
-
| ForwardRefExoticComponent<any>
|
|
3007
3246
|
| ReactComponentWithRef<any, any>
|
|
3008
3247
|
| (new (props: any) => any)
|
|
3009
3248
|
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3249
|
+
/**
|
|
3250
|
+
* brand for `styled.dynamic` carriers stored in `variants`. Shared registry
|
|
3251
|
+
* symbol so multiple copies of the package agree on what is a carrier.
|
|
3252
|
+
*/
|
|
3253
|
+
export const styledDynamicSymbol = Symbol.for('tamagui.styledDynamic')
|
|
3254
|
+
|
|
3255
|
+
/**
|
|
3256
|
+
* environment handed to `styled.dynamic` callbacks and component `.resolve`
|
|
3257
|
+
* resolvers. Never includes props for dynamics: a dynamic is a pure function
|
|
3258
|
+
* of its value, which is what makes per-clause invocation sound.
|
|
3259
|
+
*/
|
|
3260
|
+
export type StyledDynamicEnv = {
|
|
3261
|
+
fonts: TamaguiConfig['fonts']
|
|
3262
|
+
tokens: TokensParsed
|
|
3263
|
+
theme: Themes extends { [key: string]: infer B } ? B : unknown
|
|
3264
|
+
fontFamily?: FontFamilyTokens
|
|
3265
|
+
font?: Font
|
|
3266
|
+
sizes?: GenericSizes
|
|
3267
|
+
}
|
|
3268
|
+
|
|
3269
|
+
/** bare `styled.dynamic<T>()`: a typed prop consumed by styling, given style by `.resolve` */
|
|
3270
|
+
export interface StyledDynamicProp<Val = any> {
|
|
3271
|
+
[styledDynamicSymbol]: true
|
|
3272
|
+
/** phantom carrying the accepted value type; never set at runtime */
|
|
3273
|
+
__value?: Val
|
|
3274
|
+
}
|
|
3275
|
+
|
|
3276
|
+
/** `styled.dynamic<T>(fn)`: value -> style fragment, invoked per clause payload */
|
|
3277
|
+
export interface StyledDynamicFn<Val = any, Output extends object = Record<string, any>> {
|
|
3278
|
+
(value: Val, env: StyledDynamicEnv): Partial<Output> | null | undefined
|
|
3279
|
+
[styledDynamicSymbol]: true
|
|
3280
|
+
}
|
|
3281
|
+
|
|
3282
|
+
export type StyledDynamic<Val = any, Output extends object = Record<string, any>> =
|
|
3283
|
+
| StyledDynamicProp<Val>
|
|
3284
|
+
| StyledDynamicFn<Val, Output>
|
|
3285
|
+
|
|
3286
|
+
/**
|
|
3287
|
+
* a component resolver added via `.resolve`: complete merged props -> style
|
|
3288
|
+
* fragment, applied above variants and below call-site props. undefined
|
|
3289
|
+
* values mean absent (fall through to lower tiers).
|
|
3290
|
+
*/
|
|
3291
|
+
export type StyledResolver<
|
|
3292
|
+
Props = Record<string, any>,
|
|
3293
|
+
Output extends object = Record<string, any>,
|
|
3294
|
+
> = (props: Props, env: StyledDynamicEnv) => Partial<Output> | null | undefined
|
|
3022
3295
|
|
|
3023
3296
|
export type VariantDefinitions<
|
|
3024
3297
|
Parent extends StylableComponent = TamaguiComponent,
|
|
@@ -3042,6 +3315,8 @@ export type VariantDefinitions<
|
|
|
3042
3315
|
_isEmpty?: 1
|
|
3043
3316
|
}
|
|
3044
3317
|
|
|
3318
|
+
export type StaticStyleInput = string
|
|
3319
|
+
|
|
3045
3320
|
export type GetVariantProps<
|
|
3046
3321
|
A extends StylableComponent,
|
|
3047
3322
|
IsText extends boolean | undefined,
|
|
@@ -3058,51 +3333,15 @@ export type GetVariantProps<
|
|
|
3058
3333
|
? Props extends TamaDefer
|
|
3059
3334
|
? GetFinalProps<NonStyledProps, BaseStyles, VariantProps>
|
|
3060
3335
|
: Props
|
|
3061
|
-
:
|
|
3062
|
-
IsText extends true ? TextStylePropsBase : StackStyleBase
|
|
3063
|
-
>
|
|
3336
|
+
: WithThemeAndShorthands<IsText extends true ? TextStylePropsBase : StackStyleBase>
|
|
3064
3337
|
|
|
3065
3338
|
export type VariantDefinitionFromProps<MyProps, Val> = MyProps extends object
|
|
3066
3339
|
? {
|
|
3067
3340
|
[propName: string]:
|
|
3068
|
-
|
|
|
3069
|
-
|
|
|
3070
|
-
[Key in
|
|
3071
|
-
|
|
3072
|
-
: Key extends '...size'
|
|
3073
|
-
? SizeVariantSpreadFunction<MyProps>
|
|
3074
|
-
: Key extends '...space'
|
|
3075
|
-
? SpaceVariantSpreadFunction<MyProps>
|
|
3076
|
-
: Key extends '...color'
|
|
3077
|
-
? ColorVariantSpreadFunction<MyProps>
|
|
3078
|
-
: Key extends '...lineHeight'
|
|
3079
|
-
? FontLineHeightVariantSpreadFunction<MyProps>
|
|
3080
|
-
: Key extends '...fontTransform'
|
|
3081
|
-
? FontTransformVariantSpreadFunction<MyProps>
|
|
3082
|
-
: Key extends '...fontStyle'
|
|
3083
|
-
? FontStyleVariantSpreadFunction<MyProps>
|
|
3084
|
-
: Key extends '...letterSpacing'
|
|
3085
|
-
? FontLetterSpacingVariantSpreadFunction<MyProps>
|
|
3086
|
-
: Key extends '...zIndex'
|
|
3087
|
-
? ZIndexVariantSpreadFunction<MyProps>
|
|
3088
|
-
: Key extends '...radius'
|
|
3089
|
-
? RadiusVariantSpreadFunction<MyProps>
|
|
3090
|
-
: Key extends '...theme'
|
|
3091
|
-
? ThemeVariantSpreadFunction<MyProps>
|
|
3092
|
-
: never
|
|
3093
|
-
} & {
|
|
3094
|
-
[Key in string | number | 'true' | 'false']?:
|
|
3095
|
-
| MyProps
|
|
3096
|
-
| VariantSpreadFunction<MyProps, Val>
|
|
3097
|
-
} & {
|
|
3098
|
-
[Key in VariantTypeKeys]?: Key extends ':number'
|
|
3099
|
-
? VariantSpreadFunction<MyProps, number>
|
|
3100
|
-
: Key extends ':boolean'
|
|
3101
|
-
? VariantSpreadFunction<MyProps, boolean>
|
|
3102
|
-
: Key extends ':string'
|
|
3103
|
-
? VariantSpreadFunction<MyProps, string>
|
|
3104
|
-
: never
|
|
3105
|
-
})
|
|
3341
|
+
| StyledDynamic<any, MyProps>
|
|
3342
|
+
| {
|
|
3343
|
+
[Key in string | number | 'true' | 'false']?: MyProps | StaticStyleInput
|
|
3344
|
+
}
|
|
3106
3345
|
}
|
|
3107
3346
|
: {}
|
|
3108
3347
|
|
|
@@ -3112,80 +3351,6 @@ export type GenericStackVariants = VariantDefinitionFromProps<
|
|
|
3112
3351
|
>
|
|
3113
3352
|
export type GenericTextVariants = VariantDefinitionFromProps<TextProps, any>
|
|
3114
3353
|
|
|
3115
|
-
export type VariantSpreadExtras<Props> = {
|
|
3116
|
-
fonts: TamaguiConfig['fonts']
|
|
3117
|
-
tokens: TokensParsed
|
|
3118
|
-
theme: Themes extends { [key: string]: infer B } ? B : unknown
|
|
3119
|
-
props: Props
|
|
3120
|
-
fontFamily?: FontFamilyTokens
|
|
3121
|
-
font?: Font
|
|
3122
|
-
}
|
|
3123
|
-
|
|
3124
|
-
type PropLike = { [key: string]: any }
|
|
3125
|
-
|
|
3126
|
-
export type VariantSpreadFunction<Props extends PropLike, Val = any> = (
|
|
3127
|
-
val: Val,
|
|
3128
|
-
config: VariantSpreadExtras<Props>
|
|
3129
|
-
) =>
|
|
3130
|
-
| {
|
|
3131
|
-
[Key in keyof Props]: Props[Key] | Variable | VariableVal
|
|
3132
|
-
}
|
|
3133
|
-
| null
|
|
3134
|
-
| undefined
|
|
3135
|
-
|
|
3136
|
-
export type VariantTypeKeys = ':string' | ':boolean' | ':number'
|
|
3137
|
-
|
|
3138
|
-
export type GetVariantValues<Key> = Key extends `...${infer VariantSpread}`
|
|
3139
|
-
? ThemeValueByCategory<VariantSpread>
|
|
3140
|
-
: Key extends 'true' | 'false'
|
|
3141
|
-
? boolean
|
|
3142
|
-
: Key extends ':string'
|
|
3143
|
-
? string
|
|
3144
|
-
: Key extends ':boolean'
|
|
3145
|
-
? boolean
|
|
3146
|
-
: Key extends ':number'
|
|
3147
|
-
? number
|
|
3148
|
-
: Key
|
|
3149
|
-
|
|
3150
|
-
export type FontSizeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<
|
|
3151
|
-
A,
|
|
3152
|
-
FontSizeTokens
|
|
3153
|
-
>
|
|
3154
|
-
export type SizeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<
|
|
3155
|
-
A,
|
|
3156
|
-
SizeTokens
|
|
3157
|
-
>
|
|
3158
|
-
export type SpaceVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<
|
|
3159
|
-
A,
|
|
3160
|
-
SpaceTokens
|
|
3161
|
-
>
|
|
3162
|
-
export type ColorVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<
|
|
3163
|
-
A,
|
|
3164
|
-
ColorTokens
|
|
3165
|
-
>
|
|
3166
|
-
export type FontLineHeightVariantSpreadFunction<A extends PropLike> =
|
|
3167
|
-
VariantSpreadFunction<A, FontLineHeightTokens>
|
|
3168
|
-
export type FontLetterSpacingVariantSpreadFunction<A extends PropLike> =
|
|
3169
|
-
VariantSpreadFunction<A, FontLetterSpacingTokens>
|
|
3170
|
-
export type FontStyleVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<
|
|
3171
|
-
A,
|
|
3172
|
-
FontStyleTokens
|
|
3173
|
-
>
|
|
3174
|
-
export type FontTransformVariantSpreadFunction<A extends PropLike> =
|
|
3175
|
-
VariantSpreadFunction<A, FontTransformTokens>
|
|
3176
|
-
export type ZIndexVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<
|
|
3177
|
-
A,
|
|
3178
|
-
ZIndexTokens
|
|
3179
|
-
>
|
|
3180
|
-
export type RadiusVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<
|
|
3181
|
-
A,
|
|
3182
|
-
RadiusTokens
|
|
3183
|
-
>
|
|
3184
|
-
export type ThemeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<
|
|
3185
|
-
A,
|
|
3186
|
-
ThemeTokens
|
|
3187
|
-
>
|
|
3188
|
-
|
|
3189
3354
|
/**
|
|
3190
3355
|
* --------------------------------------------
|
|
3191
3356
|
* end variants
|
|
@@ -3201,6 +3366,11 @@ export type ResolveVariableAs =
|
|
|
3201
3366
|
| 'except-theme'
|
|
3202
3367
|
|
|
3203
3368
|
export type SplitStyleProps = {
|
|
3369
|
+
/** Internal: extraction must carry rules even when module evaluation inserted them. */
|
|
3370
|
+
isStatic?: boolean
|
|
3371
|
+
/** Internal: captures pre-parsed style-piece slots before atomic completion. */
|
|
3372
|
+
stylePieceEntries?: Record<string, any[]>
|
|
3373
|
+
displayName?: string
|
|
3204
3374
|
styledContext?: Record<string, any>
|
|
3205
3375
|
mediaState?: Record<string, boolean>
|
|
3206
3376
|
noClass?: boolean
|
|
@@ -3210,14 +3380,12 @@ export type SplitStyleProps = {
|
|
|
3210
3380
|
noMergeStyle?: boolean
|
|
3211
3381
|
resolveValues?: ResolveVariableAs
|
|
3212
3382
|
disableExpandShorthands?: boolean
|
|
3213
|
-
fallbackProps?: Record<string, any>
|
|
3214
3383
|
hasTextAncestor?: boolean
|
|
3215
3384
|
// for animations
|
|
3216
3385
|
willBeAnimated?: boolean // we need to track media queries even before animation
|
|
3386
|
+
canPlatformPseudo?: boolean
|
|
3217
3387
|
isAnimated: boolean
|
|
3218
3388
|
isExiting?: boolean
|
|
3219
|
-
exitVariant?: string
|
|
3220
|
-
enterVariant?: string
|
|
3221
3389
|
}
|
|
3222
3390
|
|
|
3223
3391
|
// Presence
|
|
@@ -3229,9 +3397,6 @@ export interface PresenceContextProps {
|
|
|
3229
3397
|
onExitComplete?: (id: string) => void
|
|
3230
3398
|
initial?: false | string | string[]
|
|
3231
3399
|
custom?: any
|
|
3232
|
-
exitVariant?: string | null
|
|
3233
|
-
enterVariant?: string | null
|
|
3234
|
-
enterExitVariant?: string | null
|
|
3235
3400
|
}
|
|
3236
3401
|
|
|
3237
3402
|
type SafeToRemoveCallback = () => void
|
|
@@ -3241,15 +3406,17 @@ type NotPresent = [false, SafeToRemoveCallback, PresenceContextProps]
|
|
|
3241
3406
|
|
|
3242
3407
|
export type UsePresenceResult = AlwaysPresent | Present | NotPresent
|
|
3243
3408
|
|
|
3409
|
+
export type PresenceRegistration = {
|
|
3410
|
+
shouldRegisterPresence?: boolean
|
|
3411
|
+
}
|
|
3412
|
+
|
|
3244
3413
|
// Animations:
|
|
3245
3414
|
|
|
3246
3415
|
type AnimationConfig = {
|
|
3247
3416
|
[key: string]: any
|
|
3248
3417
|
}
|
|
3249
3418
|
|
|
3250
|
-
//
|
|
3251
|
-
// this is useful only in limited scenarios like `Sheet`, but necessary in those cases
|
|
3252
|
-
// TODO: make css driver compatible with this?
|
|
3419
|
+
// adapter between driver implementations for imperative number => style mapping
|
|
3253
3420
|
|
|
3254
3421
|
export type AnimatedNumberStrategy =
|
|
3255
3422
|
// only values shared between reanimated/react-native for now
|
|
@@ -3294,8 +3461,7 @@ export type UseAnimatedNumber<
|
|
|
3294
3461
|
N extends UniversalAnimatedNumber<any> = UniversalAnimatedNumber<any>,
|
|
3295
3462
|
> = (initial: number) => N
|
|
3296
3463
|
|
|
3297
|
-
|
|
3298
|
-
isReactNative?: boolean
|
|
3464
|
+
type AnimationDriverBase<A extends AnimationConfig = AnimationConfig> = {
|
|
3299
3465
|
/** What style format the driver expects as input: 'css' (CSS variables) or 'value' (resolved values) */
|
|
3300
3466
|
inputStyle?: 'css' | 'value'
|
|
3301
3467
|
/** How the driver outputs styles: 'css' (className-based) or 'inline' (style object) */
|
|
@@ -3303,23 +3469,41 @@ export type AnimationDriver<A extends AnimationConfig = AnimationConfig> = {
|
|
|
3303
3469
|
needsCustomComponent?: boolean
|
|
3304
3470
|
avoidReRenders?: boolean
|
|
3305
3471
|
onMount?: () => void
|
|
3306
|
-
/** When true, this is a stub driver with no real animation support */
|
|
3307
|
-
isStub?: boolean
|
|
3308
|
-
useAnimations: UseAnimationHook
|
|
3309
|
-
usePresence: () => UsePresenceResult
|
|
3310
|
-
ResetPresence: (props: {
|
|
3311
|
-
children?: React.ReactNode
|
|
3312
|
-
disabled?: boolean
|
|
3313
|
-
}) => React.ReactNode
|
|
3314
|
-
useAnimatedNumber: UseAnimatedNumber
|
|
3315
|
-
useAnimatedNumberStyle: UseAnimatedNumberStyle
|
|
3316
|
-
useAnimatedNumbersStyle?: UseAnimatedNumbersStyle
|
|
3317
|
-
useAnimatedNumberReaction: UseAnimatedNumberReaction
|
|
3318
3472
|
animations: A
|
|
3319
3473
|
View?: any
|
|
3320
3474
|
Text?: any
|
|
3321
3475
|
}
|
|
3322
3476
|
|
|
3477
|
+
export type AnimationDriver<A extends AnimationConfig = AnimationConfig> =
|
|
3478
|
+
AnimationDriverBase<A> & {
|
|
3479
|
+
/** When true, this is a stub driver with no real animation support */
|
|
3480
|
+
isStub?: boolean
|
|
3481
|
+
useAnimations: UseAnimationHook
|
|
3482
|
+
usePresence: (registration?: PresenceRegistration) => UsePresenceResult
|
|
3483
|
+
ResetPresence: (props: {
|
|
3484
|
+
children?: React.ReactNode
|
|
3485
|
+
disabled?: boolean
|
|
3486
|
+
}) => React.ReactNode
|
|
3487
|
+
}
|
|
3488
|
+
|
|
3489
|
+
export type AnimationDriverWithAnimatedNumbers<
|
|
3490
|
+
A extends AnimationConfig = AnimationConfig,
|
|
3491
|
+
> = AnimationDriver<A> & {
|
|
3492
|
+
useAnimatedNumber: UseAnimatedNumber
|
|
3493
|
+
useAnimatedNumberStyle: UseAnimatedNumberStyle
|
|
3494
|
+
useAnimatedNumbersStyle: UseAnimatedNumbersStyle
|
|
3495
|
+
useAnimatedNumberReaction: UseAnimatedNumberReaction
|
|
3496
|
+
}
|
|
3497
|
+
|
|
3498
|
+
export type AnimationDriverStub<A extends AnimationConfig = AnimationConfig> =
|
|
3499
|
+
AnimationDriverBase<A> & {
|
|
3500
|
+
isStub: true
|
|
3501
|
+
}
|
|
3502
|
+
|
|
3503
|
+
export type AnimationDriverLike<A extends AnimationConfig = AnimationConfig> =
|
|
3504
|
+
| AnimationDriver<A>
|
|
3505
|
+
| AnimationDriverStub<A>
|
|
3506
|
+
|
|
3323
3507
|
export type UseAnimationProps = TamaguiComponentPropsBase & Record<string, any>
|
|
3324
3508
|
|
|
3325
3509
|
type UseStyleListener = (
|
|
@@ -3335,6 +3519,7 @@ export type UseStyleEmitter = (cb: UseStyleListener) => void
|
|
|
3335
3519
|
export type UseAnimationHook = (props: {
|
|
3336
3520
|
style: Record<string, any>
|
|
3337
3521
|
props: Record<string, any>
|
|
3522
|
+
styleState?: GetStyleResult | null
|
|
3338
3523
|
presence?: UsePresenceResult | null
|
|
3339
3524
|
staticConfig: StaticConfig
|
|
3340
3525
|
styleProps: SplitStyleProps
|
|
@@ -3342,12 +3527,11 @@ export type UseAnimationHook = (props: {
|
|
|
3342
3527
|
useStyleEmitter?: UseStyleEmitter
|
|
3343
3528
|
theme: ThemeParsed
|
|
3344
3529
|
themeName: string
|
|
3345
|
-
pseudos: WithPseudoProps<ViewStyle> | null
|
|
3346
3530
|
stateRef: { current: TamaguiComponentStateRef }
|
|
3347
|
-
|
|
3531
|
+
onTransition?: OnTransition
|
|
3348
3532
|
delay?: number
|
|
3349
3533
|
}) => null | {
|
|
3350
|
-
style?:
|
|
3534
|
+
style?: unknown
|
|
3351
3535
|
className?: string
|
|
3352
3536
|
ref?: any
|
|
3353
3537
|
}
|
|
@@ -3360,7 +3544,6 @@ export type GestureReponderEvent =
|
|
|
3360
3544
|
export type RulesToInsert = Record<string, StyleObject>
|
|
3361
3545
|
|
|
3362
3546
|
export type GetStyleResult = {
|
|
3363
|
-
pseudos?: PseudoStyles | null
|
|
3364
3547
|
style: ViewStyle | null
|
|
3365
3548
|
classNames: ClassNamesObject
|
|
3366
3549
|
rulesToInsert: RulesToInsert
|
|
@@ -3368,15 +3551,34 @@ export type GetStyleResult = {
|
|
|
3368
3551
|
fontFamily: string | undefined
|
|
3369
3552
|
space?: any // SpaceTokens?
|
|
3370
3553
|
hasMedia: boolean | Set<string>
|
|
3371
|
-
dynamicThemeAccess?: boolean
|
|
3372
3554
|
pseudoGroups?: Set<string>
|
|
3373
3555
|
mediaGroups?: Set<string>
|
|
3556
|
+
dynamicThemeAccess?: boolean
|
|
3374
3557
|
// Style values that override context props (for issues #3670, #3676)
|
|
3375
3558
|
overriddenContextProps?: Record<string, any>
|
|
3376
|
-
//
|
|
3377
|
-
|
|
3378
|
-
//
|
|
3559
|
+
// interaction states referenced by flat-value clauses, so createComponent
|
|
3560
|
+
// attaches the matching event handlers. the field name remains for the
|
|
3561
|
+
// compiler host contract.
|
|
3562
|
+
programStates?: Set<string>
|
|
3563
|
+
// subscribe this component to live safe-area insets
|
|
3564
|
+
usesSafeArea?: true
|
|
3565
|
+
// the transition selected by active flat-value clauses
|
|
3379
3566
|
effectiveTransition?: TransitionProp | null
|
|
3567
|
+
// css properties controlled by active lifecycle clauses. internal
|
|
3568
|
+
// animation-driver metadata; authored condition objects never enter
|
|
3569
|
+
// this contract.
|
|
3570
|
+
programLifecycleStyleKeys?: {
|
|
3571
|
+
enter?: Set<string>
|
|
3572
|
+
exit?: Set<string>
|
|
3573
|
+
}
|
|
3574
|
+
hasEnterStyle?: true
|
|
3575
|
+
platformPseudo?: true
|
|
3576
|
+
// behavior-bearing frontend candidates discovered by the same className
|
|
3577
|
+
// walk as styles. createComponent consumes these before it builds descendant
|
|
3578
|
+
// group/container context; they are never forwarded to the host.
|
|
3579
|
+
frontendGroup?: boolean | string
|
|
3580
|
+
frontendContainer?: boolean | string
|
|
3581
|
+
frontendContainerType?: string
|
|
3380
3582
|
}
|
|
3381
3583
|
|
|
3382
3584
|
export type ClassNamesObject = Record<string, string>
|
|
@@ -3423,8 +3625,9 @@ export type RegisteredStyle<T> = number & { __registeredStyleBrand: T }
|
|
|
3423
3625
|
|
|
3424
3626
|
export type StyleProp<T> =
|
|
3425
3627
|
| T
|
|
3628
|
+
| StylePiece
|
|
3426
3629
|
| RegisteredStyle<T>
|
|
3427
|
-
| RecursiveArray<T | RegisteredStyle<T> | Falsy>
|
|
3630
|
+
| RecursiveArray<T | StylePiece | RegisteredStyle<T> | Falsy>
|
|
3428
3631
|
| Falsy
|
|
3429
3632
|
|
|
3430
3633
|
export type FillInFont<A extends GenericFont, DefaultKeys extends string | number> = {
|