@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/types/types.d.ts
CHANGED
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
import type { StyleObject } from '@tamagui/helpers';
|
|
2
|
+
import type { CoreStateModifierName, TransformAccumulator } from '@tamagui/style-grammar/runtime';
|
|
2
3
|
import type { Properties } from 'csstype';
|
|
3
|
-
import type { CSSProperties, ComponentType, Context,
|
|
4
|
-
import type { PressableProps, Text as RNText, TextStyle as RNTextStyle, TextProps as ReactTextProps, View, ViewProps, ViewStyle } from 'react-native';
|
|
4
|
+
import type { CSSProperties, ComponentType, Context, Dispatch, FunctionComponent, HTMLAttributes, ProviderExoticComponent, Ref as ReactRef, ReactNode, RefObject, SetStateAction } from 'react';
|
|
5
|
+
import type { FontVariant, PressableProps, Text as RNText, TextStyle as RNTextStyle, TextProps as ReactTextProps, View, ViewProps, ViewStyle } from '@tamagui/react-native-types';
|
|
6
|
+
import type { NativeStyleEngineLinkHandle } from './helpers/nativeStyleEngine';
|
|
7
|
+
import type { StyleFrontend } from './helpers/styleFrontend';
|
|
5
8
|
import type { CSSColorNames } from './interfaces/CSSColorNames';
|
|
6
9
|
import type { RNOnlyProps } from './interfaces/RNExclusiveTypes';
|
|
7
10
|
export type SizeKeys = 'width' | 'height' | 'minWidth' | 'minHeight' | 'maxWidth' | 'maxHeight' | 'shadowRadius';
|
|
8
|
-
export type ColorKeys = 'color' | 'backgroundColor' | 'borderColor' | 'borderBottomColor' | 'borderTopColor' | 'borderLeftColor' | 'borderRightColor' | 'shadowColor' | 'outlineColor' | 'textShadowColor' | 'borderBlockColor' | 'borderBlockEndColor' | 'borderBlockStartColor' | 'borderInlineColor' | 'borderInlineStartColor' | 'borderInlineEndColor';
|
|
11
|
+
export type ColorKeys = 'color' | 'backgroundColor' | 'borderColor' | 'borderBottomColor' | 'borderTopColor' | 'borderLeftColor' | 'borderRightColor' | 'shadowColor' | 'outlineColor' | 'textShadowColor' | 'borderBlockColor' | 'borderBlockEndColor' | 'borderBlockStartColor' | 'borderInlineColor' | 'borderInlineStartColor' | 'borderInlineEndColor' | 'borderEndColor' | 'borderStartColor' | 'textDecorationColor' | 'caretColor';
|
|
9
12
|
export type SpaceKeys = 'space' | 'padding' | 'paddingHorizontal' | 'paddingVertical' | 'paddingLeft' | 'paddingTop' | 'paddingBottom' | 'paddingLeft' | 'paddingRight' | 'paddingEnd' | 'paddingStart' | 'margin' | 'marginHorizontal' | 'marginVertical' | 'marginLeft' | 'marginTop' | 'marginBottom' | 'marginLeft' | 'marginRight' | 'marginEnd' | 'marginStart' | 'marginBlock' | 'marginBlockStart' | 'marginBlockEnd' | 'marginInline' | 'marginInlineStart' | 'marginInlineEnd' | 'paddingBlock' | 'paddingBlockStart' | 'paddingBlockEnd' | 'paddingInline' | 'paddingInlineStart' | 'paddingInlineEnd' | 'x' | 'y' | 'gap' | 'rowGap' | 'columnGap' | 'scale' | 'scaleX' | 'scaleY' | 'borderTopEndRadius' | 'borderTopLeftRadius' | 'borderTopRightRadius' | 'borderTopStartRadius' | 'borderBottomEndRadius' | 'borderBottomLeftRadius' | 'borderBottomRightRadius' | 'borderBottomStartRadius' | 'borderBottomWidth' | 'borderLeftWidth' | 'borderRadius' | 'borderRightWidth' | 'borderTopEndRadius' | 'borderTopLeftRadius' | 'borderTopRightRadius' | 'borderEndWidth' | 'borderStartWidth' | 'borderTopStartRadius' | 'borderTopWidth' | 'borderWidth' | 'left' | 'top' | 'right' | 'bottom' | 'shadowOffset' | 'borderBlockWidth' | 'borderBlockStartWidth' | 'borderBlockEndWidth' | 'borderInlineWidth' | 'borderInlineStartWidth' | 'borderInlineEndWidth';
|
|
10
|
-
export type StyledContext<Props extends Record<string, any> = any> = Context<Props> & {
|
|
13
|
+
export type StyledContext<Props extends Record<string, any> = any, ConsumedKeys extends keyof Props & string = keyof Props & string> = Context<Props> & {
|
|
11
14
|
context: Context<Props>;
|
|
12
15
|
props: Record<string, any> | undefined;
|
|
16
|
+
propKeys?: readonly ConsumedKeys[];
|
|
13
17
|
Provider: ProviderExoticComponent<Partial<Props | undefined> & {
|
|
14
18
|
children?: ReactNode;
|
|
15
19
|
scope?: string;
|
|
16
20
|
}>;
|
|
17
21
|
useStyledContext: (scope?: string) => Props;
|
|
18
22
|
};
|
|
23
|
+
export type StyledContextOptions<Props extends Record<string, any>, ConsumedKeys extends keyof Props & string = keyof Props & string> = {
|
|
24
|
+
keys?: readonly ConsumedKeys[];
|
|
25
|
+
namespace?: string;
|
|
26
|
+
};
|
|
19
27
|
export type TamaguiComponentState = {
|
|
20
28
|
unmounted: boolean | 'should-enter';
|
|
21
29
|
disabled?: boolean;
|
|
@@ -62,10 +70,6 @@ export type TamaguiComponentPropsBaseBase = {
|
|
|
62
70
|
* If given a theme it will only apply to this element, instead of passing down to children
|
|
63
71
|
*/
|
|
64
72
|
themeShallow?: boolean;
|
|
65
|
-
/**
|
|
66
|
-
* If true, component themes will not be applied
|
|
67
|
-
*/
|
|
68
|
-
unstyled?: boolean;
|
|
69
73
|
/**
|
|
70
74
|
* Same as the web id property for setting a uid on an element
|
|
71
75
|
*/
|
|
@@ -90,16 +94,20 @@ export type TamaguiComponentPropsBaseBase = {
|
|
|
90
94
|
* Marks this component as a group for use in styling children based on parents named group
|
|
91
95
|
* See: https://tamagui.dev/docs/intro/props
|
|
92
96
|
*/
|
|
93
|
-
group?: GroupNames | boolean;
|
|
97
|
+
group?: GroupNames | (string & {}) | boolean;
|
|
94
98
|
/**
|
|
95
|
-
*
|
|
96
|
-
*
|
|
99
|
+
* Marks this component as an inline-size query container. A string names the
|
|
100
|
+
* container for matching `@sm/name:` clauses.
|
|
97
101
|
*/
|
|
98
|
-
|
|
102
|
+
container?: boolean | (string & {});
|
|
99
103
|
/**
|
|
100
|
-
*
|
|
104
|
+
* Works alongside container. On native, children using container sizing can
|
|
105
|
+
* be hidden until the parent is measured.
|
|
106
|
+
* See: https://tamagui.dev/docs/intro/props
|
|
101
107
|
*/
|
|
102
|
-
|
|
108
|
+
untilMeasured?: 'hide' | 'show';
|
|
109
|
+
/** web: forwards to the HTML name attribute. */
|
|
110
|
+
name?: string;
|
|
103
111
|
/**
|
|
104
112
|
* Used for controlling the order of focus with keyboard or assistive device enavigation
|
|
105
113
|
* See https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
|
|
@@ -113,6 +121,12 @@ export type TamaguiComponentPropsBaseBase = {
|
|
|
113
121
|
* Disable all compiler optimization
|
|
114
122
|
*/
|
|
115
123
|
disableOptimization?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Opt this component out of the experimental native style fast path
|
|
126
|
+
* (setNativeStyleEngine); it re-renders through React on theme/media
|
|
127
|
+
* changes like normal
|
|
128
|
+
*/
|
|
129
|
+
disableNativeStyle?: boolean;
|
|
116
130
|
/**
|
|
117
131
|
* Forces the pseudo style state to be on
|
|
118
132
|
*/
|
|
@@ -179,7 +193,7 @@ export interface WebOnlyPressEvents {
|
|
|
179
193
|
onPointerCancel?: DivAttributes['onPointerCancel'];
|
|
180
194
|
}
|
|
181
195
|
export type { MediaStyleObject, StyleObject } from '@tamagui/helpers';
|
|
182
|
-
type FontFamilies = FontTokens
|
|
196
|
+
type FontFamilies = FontTokens;
|
|
183
197
|
export type LanguageContextType = Partial<{
|
|
184
198
|
[key in FontFamilies]: FontLanguages | 'default';
|
|
185
199
|
}>;
|
|
@@ -189,12 +203,13 @@ export type FontLanguageProps = LanguageContextType & {
|
|
|
189
203
|
export type ThemeProviderProps = {
|
|
190
204
|
className?: string;
|
|
191
205
|
defaultTheme: string | null | undefined;
|
|
192
|
-
/** @deprecated moved to createTamagui({ settings: { disableRootThemeClass } }) */
|
|
193
|
-
disableRootThemeClass?: boolean;
|
|
194
|
-
/** @deprecated moved to createTamagui({ settings: { themeClassNameOnRoot } }) */
|
|
195
|
-
themeClassNameOnRoot?: boolean;
|
|
196
206
|
children?: any;
|
|
197
|
-
|
|
207
|
+
/**
|
|
208
|
+
* This provider is mounted inside a page it does not own, so it must not write
|
|
209
|
+
* its theme class onto `html` or `body`. Its theme class goes on its own node
|
|
210
|
+
* instead. Set by the generated zero-runtime island entry.
|
|
211
|
+
*/
|
|
212
|
+
isSubtreeRoot?: boolean;
|
|
198
213
|
};
|
|
199
214
|
export type ThemeState = {
|
|
200
215
|
id: string;
|
|
@@ -206,6 +221,7 @@ export type ThemeState = {
|
|
|
206
221
|
isNew?: boolean;
|
|
207
222
|
parentId?: string;
|
|
208
223
|
scheme?: 'light' | 'dark';
|
|
224
|
+
schemeAuthored?: boolean;
|
|
209
225
|
};
|
|
210
226
|
export interface Variable<A = any> {
|
|
211
227
|
isVar: true;
|
|
@@ -224,7 +240,6 @@ export interface PxValue {
|
|
|
224
240
|
needsPx: true;
|
|
225
241
|
}
|
|
226
242
|
export type ColorScheme = 'light' | 'dark';
|
|
227
|
-
export type IsMediaType = boolean | 'platform' | 'theme' | 'group';
|
|
228
243
|
export type MaybeTamaguiComponent<A = any> = TamaguiComponent<A> | React.FC<A>;
|
|
229
244
|
type MeasureOnSuccessCallback = (x: number, y: number, width: number, height: number, pageX: number, pageY: number) => void;
|
|
230
245
|
type MeasureInWindowOnSuccessCallback = (x: number, y: number, width: number, height: number) => void;
|
|
@@ -279,8 +294,11 @@ export type TamaguiProjectInfo = {
|
|
|
279
294
|
nameToPaths: NameToPaths;
|
|
280
295
|
};
|
|
281
296
|
export type DivAttributes = HTMLAttributes<HTMLDivElement>;
|
|
282
|
-
export type ReactComponentWithRef<Props, Ref> =
|
|
297
|
+
export type ReactComponentWithRef<Props, Ref> = ComponentType<Props & {
|
|
298
|
+
ref?: ReactRef<Ref>;
|
|
299
|
+
}>;
|
|
283
300
|
export type ComponentSetStateShallow = React.Dispatch<React.SetStateAction<Partial<TamaguiComponentState>>>;
|
|
301
|
+
export type ComponentSetState = Dispatch<SetStateAction<TamaguiComponentState>>;
|
|
284
302
|
export type ComponentContextI = {
|
|
285
303
|
disableSSR?: boolean;
|
|
286
304
|
inText: boolean;
|
|
@@ -298,11 +316,17 @@ export type ComponentContextI = {
|
|
|
298
316
|
};
|
|
299
317
|
export type TamaguiComponentStateRef = {
|
|
300
318
|
startedUnhydrated: boolean;
|
|
319
|
+
optimizeForFirstRender?: boolean;
|
|
301
320
|
host?: TamaguiElement;
|
|
302
321
|
composedRef?: (x: TamaguiElement) => void;
|
|
322
|
+
composedForwardedRef?: React.Ref<TamaguiElement>;
|
|
323
|
+
attachedForwardedRef?: React.Ref<TamaguiElement>;
|
|
303
324
|
willHydrate?: boolean;
|
|
304
325
|
hasMeasured?: boolean;
|
|
305
326
|
hasAnimated?: boolean;
|
|
327
|
+
shouldRegisterPresence?: boolean;
|
|
328
|
+
didFinalizeInitialStyleFrame?: boolean;
|
|
329
|
+
initialStyleFrameUnmounted?: TamaguiComponentState['unmounted'];
|
|
306
330
|
themeShallow?: boolean;
|
|
307
331
|
hasEverThemed?: boolean | 'wrapped';
|
|
308
332
|
hasEverResetPresence?: boolean;
|
|
@@ -311,12 +335,15 @@ export type TamaguiComponentStateRef = {
|
|
|
311
335
|
isListeningToTheme?: boolean;
|
|
312
336
|
unPress?: Function;
|
|
313
337
|
setStateShallow?: ComponentSetStateShallow;
|
|
338
|
+
setState?: ComponentSetState;
|
|
314
339
|
baseSetStateShallow?: ComponentSetStateShallow;
|
|
340
|
+
themeNeedsUpdate?: () => boolean;
|
|
315
341
|
useStyleListener?: UseStyleListener;
|
|
316
342
|
updateStyleListener?: () => void;
|
|
317
343
|
group?: ComponentGroupEmitter;
|
|
318
344
|
nextState?: TamaguiComponentState;
|
|
319
345
|
nextMedia?: UseMediaState;
|
|
346
|
+
avoidReRenders?: boolean;
|
|
320
347
|
mediaEmitCleanup?: () => void;
|
|
321
348
|
prevPseudoState?: {
|
|
322
349
|
hover?: boolean;
|
|
@@ -328,6 +355,15 @@ export type TamaguiComponentStateRef = {
|
|
|
328
355
|
focus?: boolean;
|
|
329
356
|
}>;
|
|
330
357
|
};
|
|
358
|
+
nativeLink?: NativeStyleEngineLinkHandle | null;
|
|
359
|
+
nativeStyleUpdate?: (next: ThemeState) => boolean;
|
|
360
|
+
nativeUpdateProxy?: (next: ThemeState) => boolean;
|
|
361
|
+
nativePushedStates?: Set<string>;
|
|
362
|
+
nativeActiveState?: string;
|
|
363
|
+
nativeMediaUpdate?: (onMiss?: () => void) => boolean;
|
|
364
|
+
nativeMediaQueued?: boolean;
|
|
365
|
+
nativeThemeState?: ThemeState;
|
|
366
|
+
nativePushedKeys?: Set<string>;
|
|
331
367
|
};
|
|
332
368
|
export type ComponentGroupEmitter = {
|
|
333
369
|
listeners: Set<GroupStateListener>;
|
|
@@ -341,6 +377,7 @@ export type WidthHeight = {
|
|
|
341
377
|
export type ChildGroupState = {
|
|
342
378
|
pseudo?: PseudoGroupState;
|
|
343
379
|
media?: Record<MediaQueryKey extends number ? never : MediaQueryKey, boolean>;
|
|
380
|
+
layout?: WidthHeight;
|
|
344
381
|
};
|
|
345
382
|
export type ComponentGroupState = {
|
|
346
383
|
pseudo?: PseudoGroupState;
|
|
@@ -374,6 +411,13 @@ export type DisposeFn = () => void;
|
|
|
374
411
|
export type ConfigListener = (conf: TamaguiInternalConfig) => void;
|
|
375
412
|
export type VariableVal = number | string | Variable | VariableValGeneric | PxValue;
|
|
376
413
|
export type VariableColorVal = string | Variable;
|
|
414
|
+
export type VariableValIn = string | number | PxValue;
|
|
415
|
+
export type GenericVariables = {
|
|
416
|
+
[key: string]: VariableValIn | {
|
|
417
|
+
light: VariableValIn;
|
|
418
|
+
dark: VariableValIn;
|
|
419
|
+
};
|
|
420
|
+
};
|
|
377
421
|
type GenericKey = string;
|
|
378
422
|
export type CreateTokens<Val extends VariableVal = VariableVal> = Record<string, {
|
|
379
423
|
[key: GenericKey]: Val;
|
|
@@ -481,7 +525,7 @@ export type CreateTamaguiConfig<A extends GenericTokens, B extends GenericThemes
|
|
|
481
525
|
};
|
|
482
526
|
shorthands: C;
|
|
483
527
|
media: D;
|
|
484
|
-
animations:
|
|
528
|
+
animations: AnimationDriverLike<E> | AnimationsConfigObject;
|
|
485
529
|
animationDriverKeys?: AnimDriverKeys;
|
|
486
530
|
settings: H;
|
|
487
531
|
};
|
|
@@ -491,7 +535,7 @@ type RemoveLanguagePostfixes<F extends GenericFonts> = {
|
|
|
491
535
|
[Key in OmitLanguagePostfix<keyof F>]: F[Key];
|
|
492
536
|
};
|
|
493
537
|
type GetLanguagePostfixes<F extends GenericFonts> = GetLanguagePostfix<keyof F>;
|
|
494
|
-
type ConfProps<A, B, C, D, E, F, I> = {
|
|
538
|
+
type ConfProps<A, B, C, D, E, F, I, V = undefined> = {
|
|
495
539
|
tokens?: A;
|
|
496
540
|
themes?: B;
|
|
497
541
|
shorthands?: C;
|
|
@@ -499,6 +543,15 @@ type ConfProps<A, B, C, D, E, F, I> = {
|
|
|
499
543
|
animations?: E;
|
|
500
544
|
fonts?: F;
|
|
501
545
|
settings?: I;
|
|
546
|
+
variables?: V;
|
|
547
|
+
};
|
|
548
|
+
type VariableValInScheme<V> = V extends {
|
|
549
|
+
light: infer L;
|
|
550
|
+
} ? L : V;
|
|
551
|
+
type ThemesWithVariables<B, V> = [V] extends [undefined] ? B : [keyof V] extends [never] ? B : {
|
|
552
|
+
[N in keyof B]: B[N] & {
|
|
553
|
+
[K in keyof V & string]: VariableValInScheme<V[K]> extends PxValue ? number : VariableValInScheme<V[K]>;
|
|
554
|
+
};
|
|
502
555
|
};
|
|
503
556
|
type EmptyTokens = {
|
|
504
557
|
color: {};
|
|
@@ -514,40 +567,41 @@ type EmptyAnimations = {};
|
|
|
514
567
|
type EmptyFonts = {};
|
|
515
568
|
type EmptyTamaguiSettings = {
|
|
516
569
|
allowedStyleValues: false;
|
|
517
|
-
autocompleteSpecificTokens: 'except-special';
|
|
518
570
|
};
|
|
519
|
-
type ExtractAnimationConfig<E> = E extends
|
|
520
|
-
default:
|
|
571
|
+
type ExtractAnimationConfig<E> = E extends AnimationDriverLike<infer Config> ? Config : E extends {
|
|
572
|
+
default: AnimationDriverLike<infer Config>;
|
|
521
573
|
} ? Config : E extends GenericAnimations ? E : EmptyAnimations;
|
|
522
|
-
type ExtractAnimationDriverKeys<E> = E extends
|
|
523
|
-
default:
|
|
574
|
+
type ExtractAnimationDriverKeys<E> = E extends AnimationDriverLike<any> ? 'default' : E extends {
|
|
575
|
+
default: AnimationDriverLike<any>;
|
|
524
576
|
} ? Extract<keyof E, string> : 'default';
|
|
525
|
-
export type InferTamaguiConfig<Conf> = Conf extends ConfProps<infer A, infer B, infer C, infer D, infer E, infer F, infer H> ? TamaguiInternalConfig<A extends GenericTokens ? A : EmptyTokens, B extends GenericThemes ? B : EmptyThemes, C extends GenericShorthands ? C : EmptyShorthands, D extends GenericMedia ? D : EmptyMedia, ExtractAnimationConfig<E>, F extends GenericFonts ? F : EmptyFonts, H extends GenericTamaguiSettings ? H : EmptyTamaguiSettings, ExtractAnimationDriverKeys<E>>
|
|
577
|
+
export type InferTamaguiConfig<Conf> = Conf extends ConfProps<infer A, infer B, infer C, infer D, infer E, infer F, infer H, infer V> ? TamaguiInternalConfig<A extends GenericTokens ? A : EmptyTokens, B extends GenericThemes ? ThemesWithVariables<B, V> : EmptyThemes, C extends GenericShorthands ? C : EmptyShorthands, D extends GenericMedia ? D : EmptyMedia, ExtractAnimationConfig<E>, F extends GenericFonts ? F : EmptyFonts, H extends GenericTamaguiSettings ? H : EmptyTamaguiSettings, ExtractAnimationDriverKeys<E>> & (Conf extends {
|
|
578
|
+
sizes: infer S;
|
|
579
|
+
} ? {
|
|
580
|
+
sizes: S;
|
|
581
|
+
} : {}) : unknown;
|
|
526
582
|
export type GenericTamaguiConfig = CreateTamaguiConfig<GenericTokens, GenericThemes, GenericShorthands, GenericMedia, GenericAnimations, GenericFonts>;
|
|
527
|
-
type
|
|
528
|
-
type BaseThemeDefinitions = TamaguiConfig['themes'][
|
|
583
|
+
export type RootThemeName<TK extends keyof Themes = keyof Themes> = TK extends string ? string extends TK ? never : TK extends `${string}_${string}` ? never : TK : never;
|
|
584
|
+
type BaseThemeDefinitions = TamaguiConfig['themes'][RootThemeName];
|
|
529
585
|
type GenericThemeDefinition = TamaguiConfig['themes'][keyof TamaguiConfig['themes']];
|
|
530
586
|
export type ThemeDefinition = BaseThemeDefinitions extends never ? GenericThemeDefinition : BaseThemeDefinitions;
|
|
531
587
|
export type ThemeKeys = keyof ThemeDefinition;
|
|
532
588
|
export type ThemeParsed = {
|
|
533
589
|
[key in ThemeKeys]: CoerceToVariable<ThemeDefinition[key]>;
|
|
534
590
|
};
|
|
591
|
+
/**
|
|
592
|
+
* Prop names `<Theme>` owns. Inline values are authored on `<ThemeUpdate>`.
|
|
593
|
+
*/
|
|
594
|
+
export type ReservedThemePropName = '_isRoot' | 'children' | 'className' | 'contain' | 'debug' | 'deopt' | 'disable' | 'disable-child-theme' | 'forceClassName' | '_themeUpdate' | 'name' | 'nativeUpdate' | 'needsUpdate' | 'passThrough' | 'shallow';
|
|
535
595
|
export type Tokens = TamaguiConfig['tokens'];
|
|
536
596
|
export type TokensParsed = {
|
|
537
|
-
[Key in keyof Required<Tokens>]:
|
|
597
|
+
[Key in keyof Required<Tokens>]: TokenifyRecord<NonNullable<Tokens[Key]>>;
|
|
538
598
|
};
|
|
539
|
-
type TokenPrefixed<A extends {
|
|
540
|
-
[key: string]: any;
|
|
541
|
-
}> = {
|
|
542
|
-
[Key in Ensure$Prefix<keyof A> | keyof A]: A[keyof A];
|
|
543
|
-
};
|
|
544
|
-
type Ensure$Prefix<A extends string | number | symbol> = A extends string | number | boolean ? A extends `$${string | number}` ? A : `$${A}` : never;
|
|
545
|
-
export type TokensMerged = TokensParsed & Tokens;
|
|
546
599
|
export type Shorthands = TamaguiConfig['shorthands'];
|
|
547
600
|
export type Media = TamaguiConfig['media'];
|
|
548
601
|
export type Themes = TamaguiConfig['themes'];
|
|
549
|
-
|
|
550
|
-
export type
|
|
602
|
+
type BuiltInSubThemeName = 'inverse';
|
|
603
|
+
export type ThemeName = Exclude<GetAltThemeNames<keyof Themes> | BuiltInSubThemeName, number>;
|
|
604
|
+
export type ThemeTokens = GetTokenString<ThemeKeys>;
|
|
551
605
|
type GetAnimationsFromDriver<T> = T extends {
|
|
552
606
|
animations: infer A;
|
|
553
607
|
} ? Extract<keyof A, string> : never;
|
|
@@ -564,9 +618,7 @@ export type FontLanguages = ArrayIntersection<TamaguiConfig['fontLanguages']>;
|
|
|
564
618
|
export interface ThemeProps {
|
|
565
619
|
className?: string;
|
|
566
620
|
name?: Exclude<ThemeName, number> | null;
|
|
567
|
-
componentName?: string;
|
|
568
621
|
children?: any;
|
|
569
|
-
reset?: boolean;
|
|
570
622
|
debug?: DebugProp;
|
|
571
623
|
forceClassName?: boolean;
|
|
572
624
|
shallow?: boolean;
|
|
@@ -576,7 +628,14 @@ export type UseThemeWithStateProps = ThemeProps & {
|
|
|
576
628
|
passThrough?: boolean;
|
|
577
629
|
disable?: boolean;
|
|
578
630
|
needsUpdate?: () => boolean;
|
|
579
|
-
|
|
631
|
+
/** opaque internal value patch created by `<ThemeUpdate>` */
|
|
632
|
+
_themeUpdate?: import('./helpers/themeUpdateState').ThemeUpdateState;
|
|
633
|
+
/**
|
|
634
|
+
* native fast path (experimental): called on a theme update instead of
|
|
635
|
+
* re-rendering; return true when the update was committed natively so the
|
|
636
|
+
* re-render is skipped. never called for forced updates.
|
|
637
|
+
*/
|
|
638
|
+
nativeUpdate?: (next: ThemeState) => boolean;
|
|
580
639
|
};
|
|
581
640
|
type ArrayIntersection<A extends any[]> = A[keyof A];
|
|
582
641
|
type GetAltThemeNames<S> = (S extends `${infer Theme}_${infer Alt}` ? Theme | GetAltThemeNames<Alt> : S) | S;
|
|
@@ -593,7 +652,6 @@ type AllowedStyleValuesSettingPerCategory = {
|
|
|
593
652
|
color?: AllowedStyleValuesSettingColor;
|
|
594
653
|
};
|
|
595
654
|
type AllowedStyleValuesSetting = AllowedValueSettingBase | AllowedStyleValuesSettingPerCategory;
|
|
596
|
-
type AutocompleteSpecificTokensSetting = boolean | 'except-special';
|
|
597
655
|
export interface GenericTamaguiSettings {
|
|
598
656
|
/**
|
|
599
657
|
* controls style semantics where React Native/Yoga and CSS differ.
|
|
@@ -642,19 +700,6 @@ export interface GenericTamaguiSettings {
|
|
|
642
700
|
*
|
|
643
701
|
*/
|
|
644
702
|
allowedStyleValues?: AllowedStyleValuesSetting;
|
|
645
|
-
/**
|
|
646
|
-
* Set up if "specific tokens" ($color.name) are added to the types where
|
|
647
|
-
* tokens are allowed. The VSCode autocomplete puts specific tokens above the
|
|
648
|
-
* regular ones, which leads to worse DX. If true this setting removes the
|
|
649
|
-
* specific token from types for the defined categories.
|
|
650
|
-
*
|
|
651
|
-
* If set to "except-special", specific tokens will autocomplete only if they
|
|
652
|
-
* don't normally use one of the special token groups: space, size, radius,
|
|
653
|
-
* zIndex, color.
|
|
654
|
-
*
|
|
655
|
-
* @default except-special
|
|
656
|
-
*/
|
|
657
|
-
autocompleteSpecificTokens?: AutocompleteSpecificTokensSetting;
|
|
658
703
|
/**
|
|
659
704
|
* On iOS, this enables a mode where Tamagui returns color values using
|
|
660
705
|
* `DynamicColorIOS` This is a React Native built in feature, you can read the
|
|
@@ -675,10 +720,25 @@ export interface GenericTamaguiSettings {
|
|
|
675
720
|
*/
|
|
676
721
|
fastSchemeChange?: boolean;
|
|
677
722
|
/**
|
|
678
|
-
*
|
|
679
|
-
*
|
|
723
|
+
* Chooses whether Tamagui optimizes component renders for granular updates or
|
|
724
|
+
* for the lowest first-render overhead.
|
|
725
|
+
*
|
|
726
|
+
* - "updates" tracks the theme and media keys each component reads so changes
|
|
727
|
+
* only re-render consumers of those values.
|
|
728
|
+
* - "first-render" skips per-key tracking and uses coarse theme and media
|
|
729
|
+
* subscriptions. Theme and media changes still apply, but may re-render
|
|
730
|
+
* every Tamagui component under the changed provider.
|
|
731
|
+
*
|
|
732
|
+
* This is a startup-level setting. Set it when creating the Tamagui config
|
|
733
|
+
* and do not change it while the app is running.
|
|
734
|
+
*
|
|
735
|
+
* Defaults per platform: web defaults to "updates" (granular theme/media
|
|
736
|
+
* changes matter most), native defaults to "first-render" (initial render
|
|
737
|
+
* speed matters most, and full-tree re-renders are cheaper without the DOM).
|
|
738
|
+
*
|
|
739
|
+
* @default "updates" on web, "first-render" on native
|
|
680
740
|
*/
|
|
681
|
-
|
|
741
|
+
optimizeFor?: 'updates' | 'first-render';
|
|
682
742
|
/**
|
|
683
743
|
* Only allow shorthands when enabled. Recommended to be true to avoid having
|
|
684
744
|
* two ways to style the same property.
|
|
@@ -769,10 +829,10 @@ export type BaseStyleProps = {
|
|
|
769
829
|
* Animation drivers config - can be a single driver or named drivers object.
|
|
770
830
|
* If object, must include a 'default' key.
|
|
771
831
|
*/
|
|
772
|
-
export type AnimationsConfig =
|
|
832
|
+
export type AnimationsConfig = AnimationDriverLike<any> | AnimationsConfigObject;
|
|
773
833
|
export type AnimationsConfigObject = {
|
|
774
|
-
default:
|
|
775
|
-
[key: string]:
|
|
834
|
+
default: AnimationDriverLike<any>;
|
|
835
|
+
[key: string]: AnimationDriverLike<any>;
|
|
776
836
|
};
|
|
777
837
|
export type CreateTamaguiProps = {
|
|
778
838
|
reactNative?: any;
|
|
@@ -795,7 +855,21 @@ export type CreateTamaguiProps = {
|
|
|
795
855
|
[key: string]: string | number | Variable;
|
|
796
856
|
};
|
|
797
857
|
};
|
|
858
|
+
/**
|
|
859
|
+
* Custom variables: merged into every base theme at createTamagui time, so
|
|
860
|
+
* they resolve like theme keys everywhere (bare names in style props, useTheme(),
|
|
861
|
+
* CSS variable emission) and can be redefined per-subtree via `<Theme>` props.
|
|
862
|
+
* Values may reference theme keys or tokens by bare name or
|
|
863
|
+
* be literals; per-scheme values via { light, dark }.
|
|
864
|
+
*/
|
|
865
|
+
variables?: GenericVariables;
|
|
798
866
|
settings?: Partial<GenericTamaguiSettings>;
|
|
867
|
+
/**
|
|
868
|
+
* Named control sizes (`xs sm md lg xl` in the default configs). Each is a
|
|
869
|
+
* recipe of token keys that every sized component reads; `default` names the
|
|
870
|
+
* one `size={true}` resolves to.
|
|
871
|
+
*/
|
|
872
|
+
sizes?: GenericSizes;
|
|
799
873
|
/**
|
|
800
874
|
* Web-only: define text-selection CSS
|
|
801
875
|
*/
|
|
@@ -803,10 +877,6 @@ export type CreateTamaguiProps = {
|
|
|
803
877
|
backgroundColor?: any;
|
|
804
878
|
color?: any;
|
|
805
879
|
};
|
|
806
|
-
defaultProps?: Record<string, any> & {
|
|
807
|
-
Text?: TextProps;
|
|
808
|
-
View?: StackNonStyleProps & StackStyle;
|
|
809
|
-
};
|
|
810
880
|
};
|
|
811
881
|
export type GetCSS = (opts?: {
|
|
812
882
|
separator?: string;
|
|
@@ -825,16 +895,34 @@ export type TamaguiInternalConfig<A extends GenericTokens = GenericTokens, B ext
|
|
|
825
895
|
userShorthands: C;
|
|
826
896
|
reactNative?: any;
|
|
827
897
|
fontSizeTokens: Set<string>;
|
|
828
|
-
specificTokens: Record<string, Variable>;
|
|
829
898
|
settings: Omit<GenericTamaguiSettings, keyof G> & G;
|
|
830
899
|
defaultFont?: string;
|
|
831
900
|
defaultFontToken: `${string}`;
|
|
832
|
-
animationDrivers?: Record<string,
|
|
901
|
+
animationDrivers?: Record<string, AnimationDriverLike | null>;
|
|
833
902
|
};
|
|
834
903
|
export type GetAnimationKeys<A extends GenericTamaguiConfig> = keyof A['animations'];
|
|
835
904
|
export type UnionableString = string & {};
|
|
836
905
|
export type UnionableNumber = number & {};
|
|
837
906
|
type GenericFontKey = string | number | symbol;
|
|
907
|
+
/** a named control size: a recipe of token keys, never a height */
|
|
908
|
+
export type SizeSpec = {
|
|
909
|
+
/** font.size / font.lineHeight key, resolved against the component's font */
|
|
910
|
+
fontSize: string;
|
|
911
|
+
/** tokens.space keys */
|
|
912
|
+
paddingX: string;
|
|
913
|
+
paddingY: string;
|
|
914
|
+
/** tokens.radius key */
|
|
915
|
+
radius: string;
|
|
916
|
+
/** tokens.space key for the gap between icon and text; defaults to paddingY */
|
|
917
|
+
gap?: string;
|
|
918
|
+
/** icon px override; defaults to the font size rounded up to the 4px grid */
|
|
919
|
+
icon?: number;
|
|
920
|
+
};
|
|
921
|
+
export type GenericSizes = {
|
|
922
|
+
/** the name `size={true}` resolves to */
|
|
923
|
+
default: string;
|
|
924
|
+
[name: string]: SizeSpec | string;
|
|
925
|
+
};
|
|
838
926
|
export type GenericFont<Key extends GenericFontKey = GenericFontKey> = {
|
|
839
927
|
size: {
|
|
840
928
|
[key in Key]: number | Variable;
|
|
@@ -869,33 +957,19 @@ export type MediaQueryObject = {
|
|
|
869
957
|
[key: string]: string | number | string;
|
|
870
958
|
};
|
|
871
959
|
export type MediaQueryKey = keyof Media;
|
|
872
|
-
export type MediaPropKeys = `$${MediaQueryKey}`;
|
|
873
960
|
export type MediaQueryState = {
|
|
874
961
|
[key in MediaQueryKey]: boolean;
|
|
875
962
|
};
|
|
876
|
-
export type ThemeMediaKeys<TK extends keyof Themes = keyof Themes> = TK extends string ? string extends TK ? never : TK extends `${string}_${string}` ? never : `$theme-${TK}` : never;
|
|
877
|
-
export type PlatformMediaKeys = `$platform-${AllPlatforms}`;
|
|
878
963
|
export interface TypeOverride {
|
|
879
964
|
groupNames(): 1;
|
|
880
965
|
animationDrivers(): 1;
|
|
881
966
|
}
|
|
882
967
|
export type GroupNames = ReturnType<TypeOverride['groupNames']> extends 1 ? never : ReturnType<TypeOverride['groupNames']>;
|
|
883
|
-
type
|
|
884
|
-
export type GroupMediaKeys = `$group-${GroupNames}` | `$group-${GroupNames}-${ParentMediaStates}` | `$group-${GroupNames}-${MediaQueryKey}` | `$group-${GroupNames}-${MediaQueryKey}-${ParentMediaStates}` | `$group-${ParentMediaStates}` | `$group-${MediaQueryKey}` | `$group-${MediaQueryKey}-${ParentMediaStates}`;
|
|
885
|
-
export type WithMediaProps<A> = {
|
|
886
|
-
[Key in MediaPropKeys | GroupMediaKeys | ThemeMediaKeys | PlatformMediaKeys]?: Key extends MediaPropKeys ? A & {
|
|
887
|
-
[Key in PlatformMediaKeys]?: AddWebOnlyStyleProps<A>;
|
|
888
|
-
} : Key extends `$platform-web` ? AddWebOnlyStyleProps<A> & {
|
|
889
|
-
[Key in MediaPropKeys]?: AddWebOnlyStyleProps<A>;
|
|
890
|
-
} : A & {
|
|
891
|
-
[Key in MediaPropKeys]?: A;
|
|
892
|
-
};
|
|
893
|
-
};
|
|
894
|
-
export type AddWebOnlyStyleProps<A> = Partial<CSSProperties> & Partial<WebOnlyValidStyleValues> & {
|
|
968
|
+
export type AddWebOnlyStyleProps<A> = Partial<Omit<CSSProperties, keyof WebOnlyValidStyleValues>> & Partial<WebOnlyValidStyleValues> & {
|
|
895
969
|
[K in Exclude<keyof A, keyof CSSProperties>]?: A[K];
|
|
896
970
|
};
|
|
897
971
|
export type WebOnlyValidStyleValues = {
|
|
898
|
-
position: '-webkit-sticky';
|
|
972
|
+
position: CSSProperties['position'] | '-webkit-sticky';
|
|
899
973
|
};
|
|
900
974
|
export type MediaQueries = {
|
|
901
975
|
[key in MediaQueryKey]: MediaQueryObject;
|
|
@@ -912,44 +986,95 @@ export interface MediaQueryList {
|
|
|
912
986
|
export type MatchMedia = (query: string) => MediaQueryList;
|
|
913
987
|
export type AnimationConfigType = any;
|
|
914
988
|
/**
|
|
915
|
-
*
|
|
916
|
-
*
|
|
989
|
+
* Low-level spring physics. A projection of `duration` + `bounce`, not a second
|
|
990
|
+
* way to configure a spring: whichever you author, the other is derived, and
|
|
991
|
+
* every driver ends up with the same motion.
|
|
992
|
+
*
|
|
993
|
+
* Reach for this only when you are porting a config you already tuned.
|
|
917
994
|
*/
|
|
918
995
|
export type TransitionSpringConfig = {
|
|
919
996
|
stiffness?: number;
|
|
920
997
|
damping?: number;
|
|
921
998
|
mass?: number;
|
|
922
|
-
tension?: number;
|
|
923
|
-
friction?: number;
|
|
924
999
|
velocity?: number;
|
|
925
1000
|
overshootClamping?: boolean;
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
1001
|
+
restDisplacementThreshold?: number;
|
|
1002
|
+
restSpeedThreshold?: number;
|
|
1003
|
+
};
|
|
1004
|
+
/**
|
|
1005
|
+
* A transition value: the name of a configured driver animation, or a CSS
|
|
1006
|
+
* transition string such as `200ms`, `200ms ease-out`, or
|
|
1007
|
+
* `opacity 150ms, transform 300ms`.
|
|
1008
|
+
*
|
|
1009
|
+
* Springs get a CSS-shaped function of their own: `spring(300ms, 0.4)` is a
|
|
1010
|
+
* 300ms spring with a bounce of 0.4. It works everywhere a timing function
|
|
1011
|
+
* does, including on the web, where it compiles to a `linear()` easing.
|
|
1012
|
+
*
|
|
1013
|
+
* A bare string that exactly matches a configured animation name is that
|
|
1014
|
+
* preset; everything else is CSS. `(string & {})` keeps preset names in
|
|
1015
|
+
* autocomplete instead of collapsing the union to plain `string`.
|
|
1016
|
+
*/
|
|
1017
|
+
export type TransitionValue = TransitionKeys | (string & {});
|
|
1018
|
+
/**
|
|
1019
|
+
* The settings half of a transition object. Anything else in the object is a
|
|
1020
|
+
* style property name carrying its own transition.
|
|
1021
|
+
*/
|
|
1022
|
+
export type TransitionConfig = {
|
|
1023
|
+
/** a configured animation to start from */
|
|
1024
|
+
preset?: TransitionKeys;
|
|
1025
|
+
/** milliseconds, or a CSS time like `'200ms'` */
|
|
1026
|
+
duration?: number | string;
|
|
1027
|
+
/**
|
|
1028
|
+
* Makes it a spring. `0` is critically damped (no overshoot), approaching
|
|
1029
|
+
* `1` is loose and oscillating, negative is sluggish. `duration` stays the
|
|
1030
|
+
* perceptual "how fast does this feel" number either way.
|
|
1031
|
+
*/
|
|
1032
|
+
bounce?: number;
|
|
1033
|
+
/** any CSS timing function. Mutually exclusive with `bounce`. */
|
|
1034
|
+
easing?: string;
|
|
1035
|
+
/** milliseconds, or a CSS time */
|
|
1036
|
+
delay?: number | string;
|
|
1037
|
+
behavior?: 'normal' | 'allow-discrete';
|
|
1038
|
+
/** the CSS `transition-property` list these settings apply to */
|
|
1039
|
+
properties?: string;
|
|
1040
|
+
spring?: TransitionSpringConfig;
|
|
1041
|
+
/** the transition to use while mounting, if it differs */
|
|
1042
|
+
enter?: TransitionProp;
|
|
1043
|
+
/** the transition to use while unmounting, if it differs */
|
|
1044
|
+
exit?: TransitionProp;
|
|
1045
|
+
};
|
|
1046
|
+
/**
|
|
1047
|
+
* `transition` accepts a string or an object, and nothing else.
|
|
1048
|
+
*
|
|
1049
|
+
* ```tsx
|
|
1050
|
+
* transition="bouncy" // a configured preset
|
|
1051
|
+
* transition="200ms ease-out" // css
|
|
1052
|
+
* transition="opacity 150ms, transform spring(300ms, 0.4)"
|
|
1053
|
+
* transition={{ duration: 200, bounce: 0.15 }}
|
|
1054
|
+
* transition={{ preset: 'bouncy', opacity: '150ms' }} // per-property override
|
|
1055
|
+
* ```
|
|
1056
|
+
*
|
|
1057
|
+
* Per-property keys are later CSS entries, so they win for that property and
|
|
1058
|
+
* inherit nothing from the base, exactly as
|
|
1059
|
+
* `transition: all 200ms, opacity 150ms` behaves in a stylesheet.
|
|
1060
|
+
*/
|
|
1061
|
+
export type TransitionProp = TransitionValue | (TransitionConfig & {
|
|
1062
|
+
[property: string]: TransitionValue | TransitionConfig | unknown;
|
|
1063
|
+
});
|
|
1064
|
+
/**
|
|
1065
|
+
* Emitted by the animation driver at the start and end of a transition.
|
|
1066
|
+
*
|
|
1067
|
+
* `cause` is `enter` when the component mounts into an AnimatePresence, `exit`
|
|
1068
|
+
* when it unmounts, and `update` for any style change while it stays mounted.
|
|
1069
|
+
* On the `end` phase, `finished` is `false` when the transition was interrupted
|
|
1070
|
+
* (e.g. an exit canceled by a re-enter, or an update superseded by another).
|
|
1071
|
+
*/
|
|
1072
|
+
export type TransitionEvent = {
|
|
1073
|
+
phase: 'start' | 'end';
|
|
1074
|
+
cause: 'enter' | 'exit' | 'update';
|
|
1075
|
+
finished?: boolean;
|
|
1076
|
+
};
|
|
1077
|
+
export type OnTransition = (event: TransitionEvent) => void;
|
|
953
1078
|
/**
|
|
954
1079
|
* Tokens
|
|
955
1080
|
*/
|
|
@@ -978,50 +1103,53 @@ export type ThemeValueFallbackSize = GetThemeValueFallbackFor<AllowedValueSettin
|
|
|
978
1103
|
export type ThemeValueFallbackColor = ThemeValueFallback | GetThemeValueFallbackFor<AllowedValueSettingColor, never, SomewhatSpecificColorValue, UnionableString | UnionableNumber, WebStyleValueUniversal>;
|
|
979
1104
|
export type ThemeValueFallbackRadius = ThemeValueFallback | GetThemeValueFallbackFor<AllowedValueSettingRadius, never, UnionableNumber, UnionableNumber, WebStyleValueUniversal>;
|
|
980
1105
|
export type ThemeValueFallbackZIndex = ThemeValueFallback | GetThemeValueFallbackFor<AllowedValueSettingZIndex, never, UnionableNumber, UnionableNumber, WebStyleValueUniversal>;
|
|
981
|
-
export type GetTokenString<A> = A extends
|
|
982
|
-
|
|
983
|
-
export type
|
|
984
|
-
|
|
985
|
-
} ?
|
|
986
|
-
export type
|
|
987
|
-
export type
|
|
988
|
-
type
|
|
989
|
-
type
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
export type
|
|
993
|
-
export type
|
|
994
|
-
export type
|
|
995
|
-
|
|
996
|
-
|
|
1106
|
+
export type GetTokenString<A> = A extends string | number ? `${A}` : string;
|
|
1107
|
+
/** the names in `config.sizes` (`xs sm md lg xl` in the default configs) */
|
|
1108
|
+
export type SizeName = TamaguiConfig extends {
|
|
1109
|
+
sizes: infer S;
|
|
1110
|
+
} ? Exclude<Extract<keyof S, string>, 'default'> : never;
|
|
1111
|
+
export type Size = ThemeValueFallbackSize | GetTokenString<keyof Tokens['size']> | SizeName | (string & {}) | true;
|
|
1112
|
+
export type SizeTokens = Size;
|
|
1113
|
+
export type Space = GetTokenString<keyof Tokens['space']> | ThemeValueFallbackSpace | true;
|
|
1114
|
+
export type SpaceTokens = Space;
|
|
1115
|
+
type ColorTokenBase = GetTokenString<keyof Tokens['color']> | GetTokenString<keyof ThemeParsed>;
|
|
1116
|
+
type TokenWithOpacity = `${string}/${number}`;
|
|
1117
|
+
export type Color = ColorTokenBase | CSSColorNames | TokenWithOpacity | (string & {});
|
|
1118
|
+
export type ColorTokens = Color;
|
|
1119
|
+
export type ZIndex = GetTokenString<keyof Tokens['zIndex']> | ThemeValueFallbackZIndex | number | true;
|
|
1120
|
+
export type ZIndexTokens = ZIndex;
|
|
1121
|
+
export type Radius = GetTokenString<keyof Tokens['radius']> | ThemeValueFallbackRadius | number | RemString | true;
|
|
1122
|
+
export type RadiusTokens = Radius;
|
|
1123
|
+
export type Token = GetTokenString<keyof Tokens['radius']> | GetTokenString<keyof Tokens['zIndex']> | GetTokenString<keyof Tokens['color']> | GetTokenString<keyof Tokens['space']> | GetTokenString<keyof Tokens['size']>;
|
|
997
1124
|
export type ColorStyleProp = ThemeValueFallbackColor | ColorTokens;
|
|
998
1125
|
type DefaultFont = TamaguiSettings['defaultFont'];
|
|
999
1126
|
export type Fonts = DefaultFont extends string ? TamaguiConfig['fonts'][DefaultFont] : never;
|
|
1000
1127
|
export type Font = ParseFont<Fonts>;
|
|
1001
1128
|
export type GetTokenFontKeysFor<A extends 'size' | 'weight' | 'letterSpacing' | 'family' | 'lineHeight' | 'transform' | 'style' | 'color'> = keyof TamaguiConfig['fonts']['body'][A];
|
|
1002
1129
|
export type FontTokens = GetTokenString<keyof TamaguiConfig['fonts']>;
|
|
1003
|
-
export type FontFamilyTokens =
|
|
1004
|
-
export type
|
|
1005
|
-
export type
|
|
1130
|
+
export type FontFamilyTokens = FontTokens;
|
|
1131
|
+
export type FontSize = GetTokenString<GetTokenFontKeysFor<'size'>> | number | RemString | true;
|
|
1132
|
+
export type FontSizeTokens = FontSize;
|
|
1133
|
+
export type FontLineHeightTokens = GetTokenString<GetTokenFontKeysFor<'lineHeight'>> | number | RemString;
|
|
1006
1134
|
export type FontWeightValues = `${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}00` | 'bold' | 'normal';
|
|
1007
|
-
export type FontWeightTokens =
|
|
1008
|
-
type FontColorTokenBase =
|
|
1135
|
+
export type FontWeightTokens = GetTokenString<GetTokenFontKeysFor<'weight'>> | FontWeightValues;
|
|
1136
|
+
type FontColorTokenBase = GetTokenString<GetTokenFontKeysFor<'color'>>;
|
|
1009
1137
|
export type FontColorTokens = FontColorTokenBase | number | TokenWithOpacity;
|
|
1010
|
-
export type FontLetterSpacingTokens =
|
|
1011
|
-
export type FontStyleTokens =
|
|
1012
|
-
export type FontTransformTokens =
|
|
1138
|
+
export type FontLetterSpacingTokens = GetTokenString<GetTokenFontKeysFor<'letterSpacing'>> | number | RemString;
|
|
1139
|
+
export type FontStyleTokens = GetTokenString<GetTokenFontKeysFor<'style'>> | RNTextStyle['fontStyle'];
|
|
1140
|
+
export type FontTransformTokens = GetTokenString<GetTokenFontKeysFor<'transform'>> | RNTextStyle['textTransform'];
|
|
1013
1141
|
export type ParseFont<A extends GenericFont> = {
|
|
1014
|
-
size:
|
|
1015
|
-
lineHeight:
|
|
1016
|
-
letterSpacing:
|
|
1017
|
-
weight:
|
|
1018
|
-
family:
|
|
1019
|
-
style:
|
|
1020
|
-
transform:
|
|
1021
|
-
color:
|
|
1022
|
-
face:
|
|
1023
|
-
};
|
|
1024
|
-
export type
|
|
1142
|
+
size: TokenifyRecord<A['size']>;
|
|
1143
|
+
lineHeight: TokenParsedIfExists<A['lineHeight']>;
|
|
1144
|
+
letterSpacing: TokenParsedIfExists<A['letterSpacing']>;
|
|
1145
|
+
weight: TokenParsedIfExists<A['weight']>;
|
|
1146
|
+
family: TokenParsedIfExists<A['family']>;
|
|
1147
|
+
style: TokenParsedIfExists<A['style']>;
|
|
1148
|
+
transform: TokenParsedIfExists<A['transform']>;
|
|
1149
|
+
color: TokenParsedIfExists<A['color']>;
|
|
1150
|
+
face: TokenParsedIfExists<A['face']>;
|
|
1151
|
+
};
|
|
1152
|
+
export type TokenParsedIfExists<A> = A extends Record<string, any> ? TokenifyRecord<A> : {};
|
|
1025
1153
|
export type ThemeValueByCategory<K extends string | number | symbol> = K extends 'theme' ? ThemeTokens : K extends 'size' ? SizeTokens : K extends 'font' ? FontTokens : K extends 'fontSize' ? FontSizeTokens : K extends 'space' ? SpaceTokens : K extends 'color' ? ColorTokens : K extends 'zIndex' ? ZIndexTokens : K extends 'radius' ? RadiusTokens : K extends 'lineHeight' ? FontLineHeightTokens : K extends 'fontWeight' ? FontWeightTokens : K extends 'letterSpacing' ? FontLetterSpacingTokens : K extends keyof Tokens ? GetTokenString<keyof Tokens[K]> : never;
|
|
1026
1154
|
export type FontKeys = 'fontFamily';
|
|
1027
1155
|
export type FontSizeKeys = 'fontSize';
|
|
@@ -1033,13 +1161,49 @@ export type OpacityKeys = 'opacity';
|
|
|
1033
1161
|
export type ThemeValueGet<K extends string | number | symbol> = K extends 'theme' ? ThemeTokens : K extends SizeKeys ? SizeTokens : K extends FontKeys ? FontTokens : K extends FontSizeKeys ? FontSizeTokens : K extends `${`border${string | ''}Radius`}` ? RadiusTokens : K extends SpaceKeys ? K extends 'shadowOffset' ? {
|
|
1034
1162
|
width: SpaceTokens;
|
|
1035
1163
|
height: SpaceTokens;
|
|
1036
|
-
} : SpaceTokens : K extends ColorKeys ? ColorTokens | ThemeValueFallbackColor : K extends ZIndexKeys ? ZIndexTokens : K extends LineHeightKeys ? FontLineHeightTokens : K extends FontWeightKeys ? FontWeightTokens : K extends FontLetterSpacingKeys ? FontLetterSpacingTokens : K extends OpacityKeys ?
|
|
1037
|
-
export type GetThemeValueForKey<K extends string | symbol | number> = ThemeValueGet<K> | ThemeValueFallback
|
|
1038
|
-
autocompleteSpecificTokens: infer Val;
|
|
1039
|
-
} ? Val extends true | undefined ? SpecificTokens : never : never);
|
|
1164
|
+
} : SpaceTokens : K extends ColorKeys ? ColorTokens | ThemeValueFallbackColor : K extends ZIndexKeys ? ZIndexTokens : K extends LineHeightKeys ? FontLineHeightTokens : K extends FontWeightKeys ? FontWeightTokens : K extends FontLetterSpacingKeys ? FontLetterSpacingTokens : K extends OpacityKeys ? ThemeValueFallback : never;
|
|
1165
|
+
export type GetThemeValueForKey<K extends string | symbol | number> = ThemeValueGet<K> | ThemeValueFallback;
|
|
1040
1166
|
export type SafeAreaValueKeys = 'padding' | 'paddingTop' | 'paddingBottom' | 'paddingLeft' | 'paddingRight' | 'paddingHorizontal' | 'paddingVertical' | 'paddingStart' | 'paddingEnd' | 'paddingBlock' | 'paddingInline' | 'paddingBlockStart' | 'paddingBlockEnd' | 'paddingInlineStart' | 'paddingInlineEnd' | 'margin' | 'marginTop' | 'marginBottom' | 'marginLeft' | 'marginRight' | 'marginHorizontal' | 'marginVertical' | 'marginStart' | 'marginEnd' | 'marginBlock' | 'marginInline' | 'marginBlockStart' | 'marginBlockEnd' | 'marginInlineStart' | 'marginInlineEnd' | 'inset' | 'top' | 'bottom' | 'left' | 'right' | 'start' | 'end';
|
|
1167
|
+
/**
|
|
1168
|
+
* Flat values: every style prop accepts either a clause-bearing string
|
|
1169
|
+
* (`bg="red hover:blue"`, `p="4 sm:6"`) or its flat object equivalent
|
|
1170
|
+
* (`bg={{ default: 'red', hover: 'blue' }}`). `(string & {})` admits the broad
|
|
1171
|
+
* string without collapsing the token/literal unions, so autocomplete
|
|
1172
|
+
* survives (design record, "Types and editor tooling"). Candidate and
|
|
1173
|
+
* modifier validation is the compiler's and language service's job.
|
|
1174
|
+
*/
|
|
1175
|
+
type ClauseModifierName = (MediaQueryKey & string) | RootThemeName | CoreStateModifierName | `group-${CoreStateModifierName}` | AllPlatforms;
|
|
1176
|
+
/**
|
|
1177
|
+
* Object keys have no `(string & {})` escape hatch the way string values do,
|
|
1178
|
+
* so the container (`@sm`, `@sm/card`) and named-group (`group-hover/card`)
|
|
1179
|
+
* spellings need their own single-template arms.
|
|
1180
|
+
*/
|
|
1181
|
+
type FlatClauseName = ClauseModifierName | `${ClauseModifierName}:${string}` | `@${string}` | `group-${CoreStateModifierName}/${string}`;
|
|
1182
|
+
/**
|
|
1183
|
+
* The structured twin of a flat clause string. It stays deliberately
|
|
1184
|
+
* non-recursive: the condition chain is the key, and every leaf keeps the
|
|
1185
|
+
* style property's value type. `(string & {})` rides along on each leaf for
|
|
1186
|
+
* the same reason it does on the whole value: the string form accepts any
|
|
1187
|
+
* payload text, and without it two `FlatStyleValue`s that differ only by
|
|
1188
|
+
* string members ('unset', a fallback union) stop being assignable across
|
|
1189
|
+
* package boundaries.
|
|
1190
|
+
*/
|
|
1191
|
+
export type FlatStyleObject<T> = {
|
|
1192
|
+
default?: T | (string & {});
|
|
1193
|
+
} & {
|
|
1194
|
+
[K in FlatClauseName]?: T | (string & {});
|
|
1195
|
+
};
|
|
1196
|
+
/**
|
|
1197
|
+
* The string arm stays at base values only: `(string & {})` admits every
|
|
1198
|
+
* clause string, and structured clause completion comes from the object
|
|
1199
|
+
* form's keys (and the language-service plugin for strings). A per-prop
|
|
1200
|
+
* `${modifier}:` prefix union used to ride along for first-prefix
|
|
1201
|
+
* completion; it multiplied across the whole component prop graph and the
|
|
1202
|
+
* object form made it redundant.
|
|
1203
|
+
*/
|
|
1204
|
+
export type FlatStyleValue<T> = T | FlatStyleObject<T> | (string & {});
|
|
1041
1205
|
export type WithThemeValues<T extends object> = {
|
|
1042
|
-
[K in keyof T]: (ThemeValueGet<K> extends never ? K extends keyof ExtraBaseProps ? T[K] : T[K] | 'unset' : GetThemeValueForKey<K> | Exclude<T[K], string> | 'unset') | (K extends SafeAreaValueKeys ? 'safe' : never);
|
|
1206
|
+
[K in keyof T]: (ThemeValueGet<K> extends never ? K extends keyof ExtraBaseProps ? T[K] : FlatStyleValue<T[K] | 'unset'> : FlatStyleValue<GetThemeValueForKey<K> | Exclude<T[K], string> | 'unset'>) | (K extends SafeAreaValueKeys ? 'safe' : never);
|
|
1043
1207
|
};
|
|
1044
1208
|
export type NarrowShorthands = Narrow<Shorthands>;
|
|
1045
1209
|
export type Longhands = NarrowShorthands[keyof NarrowShorthands];
|
|
@@ -1049,38 +1213,12 @@ type ShorthandLonghandProps = 'borderWidth' | 'borderStyle' | 'borderColor' | 'o
|
|
|
1049
1213
|
export type WithShorthands<StyleProps> = {
|
|
1050
1214
|
[Key in keyof Shorthands]?: Shorthands[Key] extends keyof StyleProps ? StyleProps[Shorthands[Key]] | null : undefined;
|
|
1051
1215
|
};
|
|
1052
|
-
export type PseudoStyleWithTransition<A> = A & {
|
|
1053
|
-
transition?: TransitionProp | null;
|
|
1054
|
-
};
|
|
1055
|
-
export type WithPseudoProps<A> = {
|
|
1056
|
-
hoverStyle?: PseudoStyleWithTransition<A> | null;
|
|
1057
|
-
pressStyle?: PseudoStyleWithTransition<A> | null;
|
|
1058
|
-
focusStyle?: PseudoStyleWithTransition<A> | null;
|
|
1059
|
-
focusWithinStyle?: PseudoStyleWithTransition<A> | null;
|
|
1060
|
-
focusVisibleStyle?: PseudoStyleWithTransition<A> | null;
|
|
1061
|
-
disabledStyle?: PseudoStyleWithTransition<A> | null;
|
|
1062
|
-
exitStyle?: PseudoStyleWithTransition<A> | null;
|
|
1063
|
-
enterStyle?: PseudoStyleWithTransition<A> | null;
|
|
1064
|
-
};
|
|
1065
|
-
export type PseudoTransitions = Partial<Record<keyof WithPseudoProps<any>, TransitionProp | null>> & {
|
|
1066
|
-
[key: `$group-${string}-${'hover' | 'press' | 'focus'}`]: TransitionProp | null | undefined;
|
|
1067
|
-
};
|
|
1068
|
-
export type PseudoPropKeys = keyof WithPseudoProps<any>;
|
|
1069
|
-
export type PseudoStyles = {
|
|
1070
|
-
hoverStyle?: ViewStyle;
|
|
1071
|
-
pressStyle?: ViewStyle;
|
|
1072
|
-
focusStyle?: ViewStyle;
|
|
1073
|
-
focusWithinStyle?: ViewStyle;
|
|
1074
|
-
focusVisibleStyle?: ViewStyle;
|
|
1075
|
-
disabledStyle?: ViewStyle;
|
|
1076
|
-
enterStyle?: ViewStyle;
|
|
1077
|
-
exitStyle?: ViewStyle;
|
|
1078
|
-
};
|
|
1079
1216
|
export type AllPlatforms = 'web' | 'native' | 'android' | 'ios' | 'tv' | 'androidtv' | 'tvos';
|
|
1080
1217
|
type MaybeOmitLonghands<A> = OnlyShorthandStyleProps extends true ? Omit<A, ShorthandLonghandProps> : A;
|
|
1081
|
-
export type
|
|
1082
|
-
|
|
1083
|
-
|
|
1218
|
+
export type WithFlatVariantValues<Variants> = {
|
|
1219
|
+
[Key in keyof Variants]?: FlatStyleValue<NonNullable<Variants[Key]>>;
|
|
1220
|
+
};
|
|
1221
|
+
export type WithThemeAndShorthands<A extends object, Variants = {}> = OnlyAllowShorthands extends true ? WithThemeValues<MaybeOmitLonghands<Omit<A, Longhands>>> & WithFlatVariantValues<Variants> & WithShorthands<WithThemeValues<A>> : WithThemeValues<MaybeOmitLonghands<A>> & WithFlatVariantValues<Variants> & WithShorthands<WithThemeValues<A>>;
|
|
1084
1222
|
/**
|
|
1085
1223
|
* Base style-only props (no media, pseudo):
|
|
1086
1224
|
*/
|
|
@@ -1108,15 +1246,19 @@ export interface TransformStyleProps {
|
|
|
1108
1246
|
rotateX?: `${number}deg` | UnionableString;
|
|
1109
1247
|
rotateZ?: `${number}deg` | UnionableString;
|
|
1110
1248
|
}
|
|
1111
|
-
type BoxShadowPreset = '0 0' | '0 1px 2px' | '0 1px 2px 0' | '0 1px 2px
|
|
1249
|
+
type BoxShadowPreset = '0 0' | '0 1px 2px' | '0 1px 2px 0' | '0 1px 2px shadow-color' | '0 1px 3px 0 shadow-color' | '0 4px 6px -1px shadow-color' | 'inset 0 2px 4px shadow-color' | 'none';
|
|
1112
1250
|
export type BoxShadowValue = BoxShadowPreset | (string & {});
|
|
1113
|
-
type FilterPreset = 'blur(4px)' | 'brightness(1.2)' | 'contrast(1.2)' | 'drop-shadow(0 4px 8px
|
|
1251
|
+
type FilterPreset = 'blur(4px)' | 'brightness(1.2)' | 'contrast(1.2)' | 'drop-shadow(0 4px 8px shadow-color)' | 'grayscale(1)' | 'hue-rotate(90deg)' | 'invert(1)' | 'opacity(0.5)' | 'saturate(1.5)' | 'sepia(1)' | 'none';
|
|
1114
1252
|
export type FilterValue = FilterPreset | (string & {});
|
|
1115
|
-
type BorderPreset = '1px solid' | '1px solid
|
|
1253
|
+
type BorderPreset = '1px solid' | '1px solid border-color' | '2px dashed border-color' | '1px dotted red' | 'none';
|
|
1116
1254
|
export type BorderValue = BorderPreset | (string & {});
|
|
1117
|
-
type OutlinePreset = '1px solid' | '1px solid
|
|
1255
|
+
type OutlinePreset = '1px solid' | '1px solid outline-color' | '2px dashed outline-color' | '1px dotted red' | 'none';
|
|
1118
1256
|
export type OutlineValue = OutlinePreset | (string & {});
|
|
1119
1257
|
interface ExtraStyleProps {
|
|
1258
|
+
/**
|
|
1259
|
+
* Text color, or a web-scoped color clause on a View.
|
|
1260
|
+
*/
|
|
1261
|
+
color?: ColorStyleProp;
|
|
1120
1262
|
/**
|
|
1121
1263
|
* Controls the curve style of rounded corners.
|
|
1122
1264
|
* - 'circular': Standard circular arc corners (default)
|
|
@@ -1150,7 +1292,7 @@ interface ExtraStyleProps {
|
|
|
1150
1292
|
*/
|
|
1151
1293
|
outlineWidth?: SpaceValue;
|
|
1152
1294
|
/**
|
|
1153
|
-
* CSS outline shorthand string. Supports tokens: "2px solid
|
|
1295
|
+
* CSS outline shorthand string. Supports tokens: "2px solid outline-color"
|
|
1154
1296
|
* Expands to outlineWidth, outlineStyle, outlineColor on native.
|
|
1155
1297
|
* Works on web and native.
|
|
1156
1298
|
*/
|
|
@@ -1164,9 +1306,17 @@ interface ExtraStyleProps {
|
|
|
1164
1306
|
*/
|
|
1165
1307
|
backdropFilter?: Properties['backdropFilter'];
|
|
1166
1308
|
/**
|
|
1167
|
-
*
|
|
1309
|
+
* Works on web and native. Native lowers a single color value to
|
|
1310
|
+
* backgroundColor and drops url()/gradient/multi-part values it can't express.
|
|
1311
|
+
*
|
|
1312
|
+
* The v6 shorthands map `bg` here rather than to `backgroundColor`, because
|
|
1313
|
+
* the background family splits a value like `url(x.png) color1` across
|
|
1314
|
+
* backgroundImage and backgroundColor. Color tokens lead the union so `bg`
|
|
1315
|
+
* completes them; `Properties['background']` keeps the CSS shorthand
|
|
1316
|
+
* keywords. Adding this key to `ColorKeys` instead would erase that second
|
|
1317
|
+
* arm, since that path runs the value type through `Exclude<T[K], string>`.
|
|
1168
1318
|
*/
|
|
1169
|
-
background?: Properties['background'];
|
|
1319
|
+
background?: ColorTokens | Properties['background'];
|
|
1170
1320
|
/**
|
|
1171
1321
|
* Web-only style property. Will be omitted on native.
|
|
1172
1322
|
*/
|
|
@@ -1188,16 +1338,40 @@ interface ExtraStyleProps {
|
|
|
1188
1338
|
*/
|
|
1189
1339
|
backgroundSize?: Properties['backgroundSize'];
|
|
1190
1340
|
/**
|
|
1191
|
-
* CSS box-shadow string. Supports tokens: "0 4px 8px
|
|
1341
|
+
* CSS box-shadow string. Supports tokens: "0 4px 8px shadow-color"
|
|
1192
1342
|
* Works on web and native (RN 0.76+).
|
|
1193
1343
|
*/
|
|
1194
1344
|
boxShadow?: BoxShadowValue;
|
|
1195
1345
|
/**
|
|
1196
|
-
* CSS border shorthand string. Supports tokens: "1px solid
|
|
1346
|
+
* CSS border shorthand string. Supports tokens: "1px solid border-color"
|
|
1197
1347
|
* Expands to borderWidth, borderStyle, borderColor.
|
|
1198
1348
|
* Works on web and native. On native, applies to all sides.
|
|
1199
1349
|
*/
|
|
1200
1350
|
border?: BorderValue;
|
|
1351
|
+
/**
|
|
1352
|
+
* CSS logical border shorthand string, like `border` for the block axis.
|
|
1353
|
+
* Splits to the CSS logical longhands on web; native has no logical border
|
|
1354
|
+
* properties, so it is diagnosed and dropped there rather than approximated.
|
|
1355
|
+
*/
|
|
1356
|
+
borderBlock?: BorderValue;
|
|
1357
|
+
/**
|
|
1358
|
+
* CSS logical border shorthand string, like `border` for the inline axis.
|
|
1359
|
+
* Splits to the CSS logical longhands on web; native has no logical border
|
|
1360
|
+
* properties, so it is diagnosed and dropped there rather than approximated.
|
|
1361
|
+
*/
|
|
1362
|
+
borderInline?: BorderValue;
|
|
1363
|
+
/**
|
|
1364
|
+
* Web-only style property. Will be omitted on native.
|
|
1365
|
+
*/
|
|
1366
|
+
overflowWrap?: Properties['overflowWrap'];
|
|
1367
|
+
/**
|
|
1368
|
+
* Web-only legacy alias of overflowWrap. Will be omitted on native.
|
|
1369
|
+
*/
|
|
1370
|
+
wordWrap?: Properties['wordWrap'];
|
|
1371
|
+
/**
|
|
1372
|
+
* Web-only style property. Will be omitted on native.
|
|
1373
|
+
*/
|
|
1374
|
+
resize?: Properties['resize'];
|
|
1201
1375
|
/**
|
|
1202
1376
|
* Web-only style property. Will be omitted on native.
|
|
1203
1377
|
*/
|
|
@@ -1206,6 +1380,14 @@ interface ExtraStyleProps {
|
|
|
1206
1380
|
* Web-only style property. Will be omitted on native.
|
|
1207
1381
|
*/
|
|
1208
1382
|
overflowY?: Properties['overflowY'];
|
|
1383
|
+
/**
|
|
1384
|
+
* Web-only text wrapping strategy. Will be omitted on native.
|
|
1385
|
+
*/
|
|
1386
|
+
textWrap?: Properties['textWrap'];
|
|
1387
|
+
/**
|
|
1388
|
+
* Web visibility. Native lowers hidden visibility to opacity and pointer events.
|
|
1389
|
+
*/
|
|
1390
|
+
visibility?: Properties['visibility'];
|
|
1209
1391
|
pointerEvents?: ViewProps['pointerEvents'];
|
|
1210
1392
|
/**
|
|
1211
1393
|
* The point at which transforms originate from.
|
|
@@ -1260,10 +1442,6 @@ interface ExtraStyleProps {
|
|
|
1260
1442
|
* Web-only style property. Will be omitted on native.
|
|
1261
1443
|
*/
|
|
1262
1444
|
float?: Properties['float'];
|
|
1263
|
-
/**
|
|
1264
|
-
* Web-only style property. Will be omitted on native.
|
|
1265
|
-
*/
|
|
1266
|
-
content?: Properties['content'];
|
|
1267
1445
|
/**
|
|
1268
1446
|
* Web-only style property. Will be omitted on native.
|
|
1269
1447
|
*/
|
|
@@ -1376,6 +1554,12 @@ interface ExtraStyleProps {
|
|
|
1376
1554
|
* Web-only style property. Will be omitted on native.
|
|
1377
1555
|
*/
|
|
1378
1556
|
containerType?: Properties['containerType'];
|
|
1557
|
+
/**
|
|
1558
|
+
* Names this element as a query container for `@sm/name:`-style clauses.
|
|
1559
|
+
* Lowers to CSS `container-name` on web; on native it configures the
|
|
1560
|
+
* container context instead of emitting a style.
|
|
1561
|
+
*/
|
|
1562
|
+
containerName?: string;
|
|
1379
1563
|
/**
|
|
1380
1564
|
* Web-only style property. Will be omitted on native.
|
|
1381
1565
|
*/
|
|
@@ -1464,16 +1648,16 @@ interface ExtraBaseProps {
|
|
|
1464
1648
|
* See: https://tamagui.dev/docs/core/animations
|
|
1465
1649
|
*/
|
|
1466
1650
|
transition?: TransitionProp | null;
|
|
1467
|
-
/**
|
|
1468
|
-
* Pass an array of strings containing the long style property names
|
|
1469
|
-
* which will be exclusively transitioned.
|
|
1470
|
-
*/
|
|
1471
|
-
animateOnly?: string[];
|
|
1472
1651
|
/**
|
|
1473
1652
|
* If you'd like this component to not attach to the nearest parent AnimatePresence,
|
|
1474
1653
|
* set this to `false` and it will pass through to the next animated child.
|
|
1475
1654
|
*/
|
|
1476
1655
|
animatePresence?: boolean;
|
|
1656
|
+
/**
|
|
1657
|
+
* Called by the animation driver at the start and end of each transition
|
|
1658
|
+
* (enter, exit, or an in-place style update). See `TransitionEvent`.
|
|
1659
|
+
*/
|
|
1660
|
+
onTransition?: OnTransition;
|
|
1477
1661
|
/**
|
|
1478
1662
|
* Avoids as much work as possible and passes through the children with no changes.
|
|
1479
1663
|
* Advanced: Useful for adapting to other element when you want to avoid re-parenting.
|
|
@@ -1486,7 +1670,14 @@ interface ExtendedBaseProps extends TransformStyleProps, ExtendBaseTextProps, Ex
|
|
|
1486
1670
|
}
|
|
1487
1671
|
export interface StackStyleBase extends Omit<ViewStyle, keyof ExtendedBaseProps | 'elevation'>, ExtendedBaseProps {
|
|
1488
1672
|
}
|
|
1489
|
-
export interface TextStylePropsBase extends Omit<RNTextStyle, keyof ExtendedBaseProps>, ExtendedBaseProps {
|
|
1673
|
+
export interface TextStylePropsBase extends Omit<RNTextStyle, keyof ExtendedBaseProps | 'fontVariant'>, ExtendedBaseProps {
|
|
1674
|
+
/**
|
|
1675
|
+
* react-native types this as a mutable `FontVariant[]`, which an `as const` variant
|
|
1676
|
+
* definition can't satisfy — and a variants object that misses its constraint is
|
|
1677
|
+
* silently discarded whole, taking every variant on the component with it (#2787).
|
|
1678
|
+
* react-native types `transform` as readonly for the same reason.
|
|
1679
|
+
*/
|
|
1680
|
+
fontVariant?: readonly FontVariant[];
|
|
1490
1681
|
ellipsis?: boolean;
|
|
1491
1682
|
numberOfLines?: number;
|
|
1492
1683
|
textDecorationDistance?: number;
|
|
@@ -1494,42 +1685,53 @@ export interface TextStylePropsBase extends Omit<RNTextStyle, keyof ExtendedBase
|
|
|
1494
1685
|
whiteSpace?: Properties['whiteSpace'];
|
|
1495
1686
|
wordWrap?: Properties['wordWrap'];
|
|
1496
1687
|
/**
|
|
1497
|
-
* CSS text-shadow string. Supports tokens: "2px 2px 4px
|
|
1688
|
+
* CSS text-shadow string. Supports tokens: "2px 2px 4px shadow-color"
|
|
1498
1689
|
* On native, only a single shadow is supported.
|
|
1499
1690
|
*/
|
|
1500
1691
|
textShadow?: string;
|
|
1692
|
+
/**
|
|
1693
|
+
* CSS text-decoration shorthand string ("underline dotted red").
|
|
1694
|
+
* Splits to line/style/color; on native the three RN longhand props.
|
|
1695
|
+
*/
|
|
1696
|
+
textDecoration?: string;
|
|
1697
|
+
/**
|
|
1698
|
+
* CSS font shorthand string ("italic bold 16px/1.5 Inter").
|
|
1699
|
+
* Splits by the CSS micro-syntax; ambiguous forms stay unparsed.
|
|
1700
|
+
*/
|
|
1701
|
+
font?: string;
|
|
1501
1702
|
}
|
|
1502
1703
|
type LooseCombinedObjects<A extends object, B extends object> = A | B | (A & B);
|
|
1503
1704
|
export interface StackNonStyleProps extends Omit<ViewProps, 'hitSlop' | 'pointerEvents' | 'display' | 'children' | keyof TamaguiComponentPropsBaseBase | RNOnlyProps | keyof ExtendBaseStackProps | 'style' | 'onFocus' | 'onBlur' | 'onPointerCancel' | 'onPointerDown' | 'onPointerMove' | 'onPointerUp'>, ExtendBaseStackProps, TamaguiComponentPropsBase {
|
|
1504
1705
|
style?: StyleProp<LooseCombinedObjects<React.CSSProperties, ViewStyle>>;
|
|
1505
1706
|
}
|
|
1506
|
-
export type StackStyle =
|
|
1507
|
-
export interface TextNonStyleProps extends Omit<ReactTextProps, 'children' | keyof WebOnlyPressEvents | RNOnlyProps | keyof ExtendBaseTextProps | 'style'>, ExtendBaseTextProps, TamaguiComponentPropsBase {
|
|
1707
|
+
export type StackStyle = WithThemeAndShorthands<StackStyleBase>;
|
|
1708
|
+
export interface TextNonStyleProps extends Omit<ReactTextProps, 'children' | keyof WebOnlyPressEvents | RNOnlyProps | keyof ExtendBaseTextProps | 'style' | 'selectable' | 'numberOfLines' | 'pointerEvents'>, ExtendBaseTextProps, TamaguiComponentPropsBase {
|
|
1508
1709
|
style?: StyleProp<LooseCombinedObjects<React.CSSProperties, RNTextStyle>>;
|
|
1509
1710
|
}
|
|
1510
|
-
export type TextStyle =
|
|
1711
|
+
export type TextStyle = WithThemeAndShorthands<TextStylePropsBase>;
|
|
1511
1712
|
export type TextProps = TextNonStyleProps & TextStyle;
|
|
1512
1713
|
export interface ThemeableProps {
|
|
1513
1714
|
theme?: ThemeName | null;
|
|
1514
|
-
themeReset?: boolean;
|
|
1515
|
-
componentName?: string;
|
|
1516
1715
|
debug?: DebugProp;
|
|
1517
1716
|
}
|
|
1518
|
-
export type
|
|
1717
|
+
export type StyledHOCOptions = {
|
|
1519
1718
|
disableTheme?: boolean;
|
|
1719
|
+
displayName?: string;
|
|
1520
1720
|
staticConfig?: Partial<StaticConfig>;
|
|
1521
1721
|
};
|
|
1522
|
-
export type
|
|
1523
|
-
export type GetFinalProps<NonStyleProps, StylePropsBase, Variants> = Omit<NonStyleProps, keyof StylePropsBase | keyof Variants> & (StylePropsBase extends object ?
|
|
1524
|
-
export type TamaguiComponent<Props = any, Ref = any, NonStyledProps = {}, BaseStyles extends object = {}, Variants = {}, ParentStaticProperties = {}> =
|
|
1722
|
+
export type StyledHOCMergedProps<Props, CustomProps> = keyof CustomProps extends never ? Props : Omit<Props, keyof CustomProps> & CustomProps;
|
|
1723
|
+
export type GetFinalProps<NonStyleProps, StylePropsBase, Variants> = Omit<NonStyleProps, keyof StylePropsBase | keyof Variants> & (StylePropsBase extends object ? WithThemeAndShorthands<StylePropsBase, Variants> : {});
|
|
1724
|
+
export type TamaguiComponent<Props = any, Ref = any, NonStyledProps = {}, BaseStyles extends object = {}, Variants = {}, ParentStaticProperties = {}> = FunctionComponent<(Props extends TamaDefer ? GetFinalProps<NonStyledProps, BaseStyles, Variants> : Props) & {
|
|
1725
|
+
ref?: ReactRef<Ref>;
|
|
1726
|
+
}> & StaticComponentObject<Props, Ref, NonStyledProps, BaseStyles, Variants, ParentStaticProperties> & Omit<ParentStaticProperties, 'staticConfig'> & {
|
|
1525
1727
|
__tama: [Props, Ref, NonStyledProps, BaseStyles, Variants, ParentStaticProperties];
|
|
1526
1728
|
};
|
|
1527
|
-
export type InferGenericComponentProps<A> = A extends ComponentType<infer Props> ? Props : A extends
|
|
1729
|
+
export type InferGenericComponentProps<A> = A extends ComponentType<infer Props> ? Props : A extends ReactComponentWithRef<infer P, any> ? P : A extends new (props: infer Props) => any ? Props : {};
|
|
1528
1730
|
export type InferStyledProps<A extends StylableComponent, B extends StaticConfigPublic> = A extends {
|
|
1529
1731
|
__tama: any;
|
|
1530
1732
|
} ? GetProps<A> : GetFinalProps<InferGenericComponentProps<A>, GetBaseStyles<{}, B>, {}>;
|
|
1531
1733
|
/** Like InferStyledProps but returns only style props (no non-styled props or variants). */
|
|
1532
|
-
export type InferStyleProps<A extends StylableComponent, B extends StaticConfigPublic> =
|
|
1734
|
+
export type InferStyleProps<A extends StylableComponent, B extends StaticConfigPublic> = WithThemeAndShorthands<GetBaseStyles<A, B>, {}>;
|
|
1533
1735
|
export type GetProps<A extends StylableComponent> = A extends {
|
|
1534
1736
|
__tama: [
|
|
1535
1737
|
infer Props,
|
|
@@ -1562,7 +1764,12 @@ export type GetStaticConfig<A, Extra = {}> = A extends {
|
|
|
1562
1764
|
} ? B & Extra : Extra;
|
|
1563
1765
|
export type StaticComponentObject<Props, Ref, NonStyledProps, BaseStyles extends object, VariantProps, ParentStaticProperties> = {
|
|
1564
1766
|
staticConfig: StaticConfig;
|
|
1565
|
-
|
|
1767
|
+
/**
|
|
1768
|
+
* chain a component resolver: receives the complete props plus the style
|
|
1769
|
+
* env, returns a style fragment applied above variants and below call-site
|
|
1770
|
+
* props. Returns a NEW component; the original is untouched.
|
|
1771
|
+
*/
|
|
1772
|
+
resolve(resolver: StyledResolver<Props extends TamaDefer ? GetFinalProps<NonStyledProps, BaseStyles, VariantProps> : Props, WithThemeAndShorthands<BaseStyles, {}>>): TamaguiComponent<Props, Ref, NonStyledProps, BaseStyles, VariantProps, ParentStaticProperties>;
|
|
1566
1773
|
};
|
|
1567
1774
|
export type TamaguiComponentExpectingVariants<Props = {}, Variants extends object = {}> = TamaguiComponent<Props, any, any, any, Variants>;
|
|
1568
1775
|
export type TamaguiProviderProps = Omit<ThemeProviderProps, 'children'> & {
|
|
@@ -1576,10 +1783,9 @@ export type TamaguiProviderProps = Omit<ThemeProviderProps, 'children'> & {
|
|
|
1576
1783
|
left: number;
|
|
1577
1784
|
};
|
|
1578
1785
|
};
|
|
1579
|
-
export type PropMappedValue = [string, any, any?][] | undefined;
|
|
1786
|
+
export type PropMappedValue = [string, any, any?, string?][] | undefined;
|
|
1580
1787
|
export type GetStyleState = {
|
|
1581
1788
|
style: TextStyle | null;
|
|
1582
|
-
usedKeys: Record<string, number>;
|
|
1583
1789
|
classNames: ClassNamesObject;
|
|
1584
1790
|
staticConfig: StaticConfig;
|
|
1585
1791
|
theme: ThemeParsed;
|
|
@@ -1592,24 +1798,40 @@ export type GetStyleState = {
|
|
|
1592
1798
|
avoidMergeTransform?: boolean;
|
|
1593
1799
|
fontFamily?: string;
|
|
1594
1800
|
debug?: DebugProp;
|
|
1595
|
-
|
|
1801
|
+
transformAccumulator?: TransformAccumulator;
|
|
1802
|
+
flatRulesToInsert?: RulesToInsert;
|
|
1803
|
+
flatShouldDoClasses?: boolean;
|
|
1804
|
+
flatThemeName?: string;
|
|
1805
|
+
flatMediaState?: Record<string, boolean | undefined>;
|
|
1806
|
+
flatGroupContext?: AllGroupContexts | null;
|
|
1807
|
+
flatConditionOrder?: number;
|
|
1808
|
+
flatStateKeys?: Set<string>;
|
|
1809
|
+
flatMediaKeys?: Set<string>;
|
|
1810
|
+
flatGroupKeys?: Set<string>;
|
|
1811
|
+
flatGroupMedia?: Set<string>;
|
|
1812
|
+
flatEnterKeys?: Set<string>;
|
|
1813
|
+
flatExitKeys?: Set<string>;
|
|
1814
|
+
flatHasEnterStyle?: boolean;
|
|
1815
|
+
flatHasPlatformPseudo?: boolean;
|
|
1816
|
+
flatUsesSafeArea?: boolean;
|
|
1596
1817
|
overriddenContextProps?: Record<string, any>;
|
|
1597
1818
|
originalContextPropValues?: Record<string, any>;
|
|
1598
1819
|
tokenProvenance?: Record<string, string>;
|
|
1599
|
-
pseudoTransitions?: PseudoTransitions | null;
|
|
1600
1820
|
animationDriver?: AnimationDriver | null;
|
|
1601
1821
|
};
|
|
1602
1822
|
export type StyleResolver<Response = PropMappedValue> = (key: string, value: any, props: SplitStyleProps, state: GetStyleState, parentVariantKey: string) => Response;
|
|
1603
|
-
export type PropMapper = (key: string, value: any, state: GetStyleState, disabled: boolean,
|
|
1823
|
+
export type PropMapper = (key: string, value: any, state: GetStyleState, disabled: boolean, parentCondition?: number, fallbackOriginal?: any) => void;
|
|
1604
1824
|
export type GenericVariantDefinitions = {
|
|
1605
|
-
[key: string]: {
|
|
1606
|
-
[key: string]:
|
|
1825
|
+
[key: string]: StyledDynamic<any> | {
|
|
1826
|
+
[key: string]: StaticStyleInput | {
|
|
1607
1827
|
[key: string]: any;
|
|
1608
1828
|
};
|
|
1609
1829
|
};
|
|
1610
1830
|
};
|
|
1611
1831
|
export type StaticConfigPublic = {
|
|
1612
1832
|
defaultProps?: Record<string, any>;
|
|
1833
|
+
/** Static class input supplied to styled(Component, baseClassName, ...). */
|
|
1834
|
+
baseClassName?: StaticStyleInput;
|
|
1613
1835
|
/**
|
|
1614
1836
|
* (compiler) If you need to pass context or something, prevents from ever
|
|
1615
1837
|
* flattening. The 'jsx' option means it will never flatten. if you
|
|
@@ -1630,28 +1852,21 @@ export type StaticConfigPublic = {
|
|
|
1630
1852
|
validStyles?: {
|
|
1631
1853
|
[key: string]: boolean;
|
|
1632
1854
|
};
|
|
1633
|
-
/**
|
|
1634
|
-
* Accept Tamagui tokens for these props (key for the prop key, val for the token category)
|
|
1635
|
-
*/
|
|
1636
|
-
accept?: {
|
|
1637
|
-
[key: string]: keyof Tokens | 'style' | 'textStyle';
|
|
1638
|
-
};
|
|
1639
1855
|
/**
|
|
1640
1856
|
* (compiler) If these props are encountered, leave them un-extracted.
|
|
1641
1857
|
*/
|
|
1642
1858
|
inlineProps?: Set<string>;
|
|
1643
1859
|
/**
|
|
1644
|
-
*
|
|
1645
|
-
*
|
|
1860
|
+
* Props that reach `Component` even though the platform prop-skip list drops
|
|
1861
|
+
* them. The native DOM primitives build their own event payloads, so a DOM
|
|
1862
|
+
* frame's `onClick` is the primitive's input, not a web-only prop.
|
|
1646
1863
|
*/
|
|
1647
|
-
|
|
1864
|
+
neverSkipProps?: Record<string, 1>;
|
|
1648
1865
|
/**
|
|
1649
1866
|
* Auto-detected, but can override. Wraps children to space them on top
|
|
1650
1867
|
*/
|
|
1651
1868
|
isZStack?: boolean;
|
|
1652
|
-
/**
|
|
1653
|
-
* Auto-detect, but can override, passes styles properly to react-native-web
|
|
1654
|
-
*/
|
|
1869
|
+
/** Native-only marker for components backed by a React Native host. */
|
|
1655
1870
|
isReactNative?: boolean;
|
|
1656
1871
|
/**
|
|
1657
1872
|
* By default if styled() doesn't recognize a parent Tamagui component or specific react-native views,
|
|
@@ -1663,15 +1878,21 @@ export type StaticConfigPublic = {
|
|
|
1663
1878
|
* memoizes component, rarely useful except mostly style components that don't take children
|
|
1664
1879
|
*/
|
|
1665
1880
|
memo?: boolean;
|
|
1881
|
+
contextProps?: readonly string[];
|
|
1666
1882
|
};
|
|
1667
1883
|
type StaticConfigBase = StaticConfigPublic & {
|
|
1668
1884
|
Component?: FunctionComponent<any> & StaticComponentObject<any, any, any, any, any, any>;
|
|
1885
|
+
displayName?: string;
|
|
1886
|
+
baseStyle?: Record<string, any>;
|
|
1669
1887
|
variants?: GenericVariantDefinitions;
|
|
1670
|
-
context?: StyledContext;
|
|
1671
1888
|
/**
|
|
1672
|
-
*
|
|
1889
|
+
* component resolvers added via `.resolve`, parent-first. Run after the
|
|
1890
|
+
* props walk at their own precedence tier (above variants, below call-site
|
|
1891
|
+
* props); a later resolver wins within the tier.
|
|
1673
1892
|
*/
|
|
1674
|
-
|
|
1893
|
+
resolvers?: StyledResolver[];
|
|
1894
|
+
context?: StyledContext;
|
|
1895
|
+
contextProps?: readonly string[];
|
|
1675
1896
|
/**
|
|
1676
1897
|
* Merges into defaultProps later on, used internally only
|
|
1677
1898
|
*/
|
|
@@ -1687,30 +1908,89 @@ type StaticConfigBase = StaticConfigPublic & {
|
|
|
1687
1908
|
*/
|
|
1688
1909
|
isHOC?: boolean;
|
|
1689
1910
|
isStyledHOC?: boolean;
|
|
1911
|
+
/**
|
|
1912
|
+
* The immutable authoring syntax of this component, set by the package that
|
|
1913
|
+
* created it and inherited by styled() descendants. Absent means the regular
|
|
1914
|
+
* Tamagui frontend (see `regularStyleFrontend`).
|
|
1915
|
+
*/
|
|
1916
|
+
styleFrontend?: StyleFrontend;
|
|
1917
|
+
/**
|
|
1918
|
+
* Raw classes from `baseClassName` that the frontend did not claim, produced by
|
|
1919
|
+
* the descriptor's `normalizeStaticConfig`. They stay a class string so the app's
|
|
1920
|
+
* own CSS still applies them, and stay out of `baseStyle` because that object
|
|
1921
|
+
* holds styles only.
|
|
1922
|
+
*/
|
|
1923
|
+
passthroughClassName?: string;
|
|
1690
1924
|
};
|
|
1691
1925
|
export type StaticConfig = StaticConfigBase & {
|
|
1692
1926
|
parentStaticConfig?: StaticConfigBase;
|
|
1693
1927
|
};
|
|
1694
|
-
export type
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1928
|
+
export type ViewStyleObject = TextStyle;
|
|
1929
|
+
/** Shared registry symbol carried by runtime/compiled `style()` pieces. */
|
|
1930
|
+
export declare const stylePieceSymbol: symbol;
|
|
1931
|
+
/** A statically-shaped style accepted by `style()`. */
|
|
1932
|
+
export type StaticShapeStyle = TextStyle;
|
|
1933
|
+
/**
|
|
1934
|
+
* Per-property style fragment. `byKey` keeps later tiers subtractable; the
|
|
1935
|
+
* authored object is retained for native and inline-JS resolution.
|
|
1936
|
+
*/
|
|
1937
|
+
export type StylePiece = {
|
|
1938
|
+
className: string;
|
|
1939
|
+
[key: symbol]: {
|
|
1940
|
+
byKey: Record<string, string>;
|
|
1941
|
+
styleObject: StaticShapeStyle;
|
|
1942
|
+
};
|
|
1943
|
+
};
|
|
1702
1944
|
/**
|
|
1703
1945
|
* --------------------------------------------
|
|
1704
1946
|
* variants
|
|
1705
1947
|
* --------------------------------------------
|
|
1706
1948
|
*/
|
|
1707
|
-
export type StylableComponent = TamaguiComponent | ComponentType<any> |
|
|
1708
|
-
|
|
1949
|
+
export type StylableComponent = TamaguiComponent | ComponentType<any> | ReactComponentWithRef<any, any> | (new (props: any) => any);
|
|
1950
|
+
/**
|
|
1951
|
+
* brand for `styled.dynamic` carriers stored in `variants`. Shared registry
|
|
1952
|
+
* symbol so multiple copies of the package agree on what is a carrier.
|
|
1953
|
+
*/
|
|
1954
|
+
export declare const styledDynamicSymbol: unique symbol;
|
|
1955
|
+
/**
|
|
1956
|
+
* environment handed to `styled.dynamic` callbacks and component `.resolve`
|
|
1957
|
+
* resolvers. Never includes props for dynamics: a dynamic is a pure function
|
|
1958
|
+
* of its value, which is what makes per-clause invocation sound.
|
|
1959
|
+
*/
|
|
1960
|
+
export type StyledDynamicEnv = {
|
|
1961
|
+
fonts: TamaguiConfig['fonts'];
|
|
1962
|
+
tokens: TokensParsed;
|
|
1963
|
+
theme: Themes extends {
|
|
1964
|
+
[key: string]: infer B;
|
|
1965
|
+
} ? B : unknown;
|
|
1966
|
+
fontFamily?: FontFamilyTokens;
|
|
1967
|
+
font?: Font;
|
|
1968
|
+
sizes?: GenericSizes;
|
|
1969
|
+
};
|
|
1970
|
+
/** bare `styled.dynamic<T>()`: a typed prop consumed by styling, given style by `.resolve` */
|
|
1971
|
+
export interface StyledDynamicProp<Val = any> {
|
|
1972
|
+
[styledDynamicSymbol]: true;
|
|
1973
|
+
/** phantom carrying the accepted value type; never set at runtime */
|
|
1974
|
+
__value?: Val;
|
|
1975
|
+
}
|
|
1976
|
+
/** `styled.dynamic<T>(fn)`: value -> style fragment, invoked per clause payload */
|
|
1977
|
+
export interface StyledDynamicFn<Val = any, Output extends object = Record<string, any>> {
|
|
1978
|
+
(value: Val, env: StyledDynamicEnv): Partial<Output> | null | undefined;
|
|
1979
|
+
[styledDynamicSymbol]: true;
|
|
1980
|
+
}
|
|
1981
|
+
export type StyledDynamic<Val = any, Output extends object = Record<string, any>> = StyledDynamicProp<Val> | StyledDynamicFn<Val, Output>;
|
|
1982
|
+
/**
|
|
1983
|
+
* a component resolver added via `.resolve`: complete merged props -> style
|
|
1984
|
+
* fragment, applied above variants and below call-site props. undefined
|
|
1985
|
+
* values mean absent (fall through to lower tiers).
|
|
1986
|
+
*/
|
|
1987
|
+
export type StyledResolver<Props = Record<string, any>, Output extends object = Record<string, any>> = (props: Props, env: StyledDynamicEnv) => Partial<Output> | null | undefined;
|
|
1709
1988
|
export type VariantDefinitions<Parent extends StylableComponent = TamaguiComponent, StaticConfig extends StaticConfigPublic = Parent extends {
|
|
1710
1989
|
__tama: [any, any, any, any, any, infer S];
|
|
1711
1990
|
} ? S : {}, MyProps extends object = Partial<GetVariantProps<Parent, StaticConfig['isText'] extends true ? true : StaticConfig['isInput'] extends true ? true : false>>, Val = any> = VariantDefinitionFromProps<MyProps, Val> & {
|
|
1712
1991
|
_isEmpty?: 1;
|
|
1713
1992
|
};
|
|
1993
|
+
export type StaticStyleInput = string;
|
|
1714
1994
|
export type GetVariantProps<A extends StylableComponent, IsText extends boolean | undefined> = A extends {
|
|
1715
1995
|
__tama: [
|
|
1716
1996
|
infer Props,
|
|
@@ -1720,47 +2000,14 @@ export type GetVariantProps<A extends StylableComponent, IsText extends boolean
|
|
|
1720
2000
|
infer VariantProps,
|
|
1721
2001
|
any
|
|
1722
2002
|
];
|
|
1723
|
-
} ? Props extends TamaDefer ? GetFinalProps<NonStyledProps, BaseStyles, VariantProps> : Props :
|
|
2003
|
+
} ? Props extends TamaDefer ? GetFinalProps<NonStyledProps, BaseStyles, VariantProps> : Props : WithThemeAndShorthands<IsText extends true ? TextStylePropsBase : StackStyleBase>;
|
|
1724
2004
|
export type VariantDefinitionFromProps<MyProps, Val> = MyProps extends object ? {
|
|
1725
|
-
[propName: string]:
|
|
1726
|
-
[Key in
|
|
1727
|
-
}
|
|
1728
|
-
[Key in string | number | 'true' | 'false']?: MyProps | VariantSpreadFunction<MyProps, Val>;
|
|
1729
|
-
} & {
|
|
1730
|
-
[Key in VariantTypeKeys]?: Key extends ':number' ? VariantSpreadFunction<MyProps, number> : Key extends ':boolean' ? VariantSpreadFunction<MyProps, boolean> : Key extends ':string' ? VariantSpreadFunction<MyProps, string> : never;
|
|
1731
|
-
});
|
|
2005
|
+
[propName: string]: StyledDynamic<any, MyProps> | {
|
|
2006
|
+
[Key in string | number | 'true' | 'false']?: MyProps | StaticStyleInput;
|
|
2007
|
+
};
|
|
1732
2008
|
} : {};
|
|
1733
2009
|
export type GenericStackVariants = VariantDefinitionFromProps<StackNonStyleProps & StackStyle, any>;
|
|
1734
2010
|
export type GenericTextVariants = VariantDefinitionFromProps<TextProps, any>;
|
|
1735
|
-
export type VariantSpreadExtras<Props> = {
|
|
1736
|
-
fonts: TamaguiConfig['fonts'];
|
|
1737
|
-
tokens: TokensParsed;
|
|
1738
|
-
theme: Themes extends {
|
|
1739
|
-
[key: string]: infer B;
|
|
1740
|
-
} ? B : unknown;
|
|
1741
|
-
props: Props;
|
|
1742
|
-
fontFamily?: FontFamilyTokens;
|
|
1743
|
-
font?: Font;
|
|
1744
|
-
};
|
|
1745
|
-
type PropLike = {
|
|
1746
|
-
[key: string]: any;
|
|
1747
|
-
};
|
|
1748
|
-
export type VariantSpreadFunction<Props extends PropLike, Val = any> = (val: Val, config: VariantSpreadExtras<Props>) => {
|
|
1749
|
-
[Key in keyof Props]: Props[Key] | Variable | VariableVal;
|
|
1750
|
-
} | null | undefined;
|
|
1751
|
-
export type VariantTypeKeys = ':string' | ':boolean' | ':number';
|
|
1752
|
-
export type GetVariantValues<Key> = Key extends `...${infer VariantSpread}` ? ThemeValueByCategory<VariantSpread> : Key extends 'true' | 'false' ? boolean : Key extends ':string' ? string : Key extends ':boolean' ? boolean : Key extends ':number' ? number : Key;
|
|
1753
|
-
export type FontSizeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, FontSizeTokens>;
|
|
1754
|
-
export type SizeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, SizeTokens>;
|
|
1755
|
-
export type SpaceVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, SpaceTokens>;
|
|
1756
|
-
export type ColorVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, ColorTokens>;
|
|
1757
|
-
export type FontLineHeightVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, FontLineHeightTokens>;
|
|
1758
|
-
export type FontLetterSpacingVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, FontLetterSpacingTokens>;
|
|
1759
|
-
export type FontStyleVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, FontStyleTokens>;
|
|
1760
|
-
export type FontTransformVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, FontTransformTokens>;
|
|
1761
|
-
export type ZIndexVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, ZIndexTokens>;
|
|
1762
|
-
export type RadiusVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, RadiusTokens>;
|
|
1763
|
-
export type ThemeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, ThemeTokens>;
|
|
1764
2011
|
/**
|
|
1765
2012
|
* --------------------------------------------
|
|
1766
2013
|
* end variants
|
|
@@ -1768,6 +2015,11 @@ export type ThemeVariantSpreadFunction<A extends PropLike> = VariantSpreadFuncti
|
|
|
1768
2015
|
*/
|
|
1769
2016
|
export type ResolveVariableAs = 'auto' | 'value' | 'variable' | 'none' | 'web' | 'except-theme';
|
|
1770
2017
|
export type SplitStyleProps = {
|
|
2018
|
+
/** Internal: extraction must carry rules even when module evaluation inserted them. */
|
|
2019
|
+
isStatic?: boolean;
|
|
2020
|
+
/** Internal: captures pre-parsed style-piece slots before atomic completion. */
|
|
2021
|
+
stylePieceEntries?: Record<string, any[]>;
|
|
2022
|
+
displayName?: string;
|
|
1771
2023
|
styledContext?: Record<string, any>;
|
|
1772
2024
|
mediaState?: Record<string, boolean>;
|
|
1773
2025
|
noClass?: boolean;
|
|
@@ -1777,13 +2029,11 @@ export type SplitStyleProps = {
|
|
|
1777
2029
|
noMergeStyle?: boolean;
|
|
1778
2030
|
resolveValues?: ResolveVariableAs;
|
|
1779
2031
|
disableExpandShorthands?: boolean;
|
|
1780
|
-
fallbackProps?: Record<string, any>;
|
|
1781
2032
|
hasTextAncestor?: boolean;
|
|
1782
2033
|
willBeAnimated?: boolean;
|
|
2034
|
+
canPlatformPseudo?: boolean;
|
|
1783
2035
|
isAnimated: boolean;
|
|
1784
2036
|
isExiting?: boolean;
|
|
1785
|
-
exitVariant?: string;
|
|
1786
|
-
enterVariant?: string;
|
|
1787
2037
|
};
|
|
1788
2038
|
export interface PresenceContextProps {
|
|
1789
2039
|
id: string;
|
|
@@ -1792,15 +2042,15 @@ export interface PresenceContextProps {
|
|
|
1792
2042
|
onExitComplete?: (id: string) => void;
|
|
1793
2043
|
initial?: false | string | string[];
|
|
1794
2044
|
custom?: any;
|
|
1795
|
-
exitVariant?: string | null;
|
|
1796
|
-
enterVariant?: string | null;
|
|
1797
|
-
enterExitVariant?: string | null;
|
|
1798
2045
|
}
|
|
1799
2046
|
type SafeToRemoveCallback = () => void;
|
|
1800
2047
|
type AlwaysPresent = [true, null, null];
|
|
1801
2048
|
type Present = [true, undefined, PresenceContextProps];
|
|
1802
2049
|
type NotPresent = [false, SafeToRemoveCallback, PresenceContextProps];
|
|
1803
2050
|
export type UsePresenceResult = AlwaysPresent | Present | NotPresent;
|
|
2051
|
+
export type PresenceRegistration = {
|
|
2052
|
+
shouldRegisterPresence?: boolean;
|
|
2053
|
+
};
|
|
1804
2054
|
type AnimationConfig = {
|
|
1805
2055
|
[key: string]: any;
|
|
1806
2056
|
};
|
|
@@ -1831,8 +2081,7 @@ export type UseAnimatedNumberReaction<V extends UniversalAnimatedNumber<any> = U
|
|
|
1831
2081
|
export type UseAnimatedNumberStyle<V extends UniversalAnimatedNumber<any> = UniversalAnimatedNumber<any>> = (val: V, getStyle: (current: any) => any) => any;
|
|
1832
2082
|
export type UseAnimatedNumbersStyle<V extends UniversalAnimatedNumber<any> = UniversalAnimatedNumber<any>> = (vals: V[], getStyle: (...currentValues: any[]) => any) => any;
|
|
1833
2083
|
export type UseAnimatedNumber<N extends UniversalAnimatedNumber<any> = UniversalAnimatedNumber<any>> = (initial: number) => N;
|
|
1834
|
-
|
|
1835
|
-
isReactNative?: boolean;
|
|
2084
|
+
type AnimationDriverBase<A extends AnimationConfig = AnimationConfig> = {
|
|
1836
2085
|
/** What style format the driver expects as input: 'css' (CSS variables) or 'value' (resolved values) */
|
|
1837
2086
|
inputStyle?: 'css' | 'value';
|
|
1838
2087
|
/** How the driver outputs styles: 'css' (className-based) or 'inline' (style object) */
|
|
@@ -1840,28 +2089,37 @@ export type AnimationDriver<A extends AnimationConfig = AnimationConfig> = {
|
|
|
1840
2089
|
needsCustomComponent?: boolean;
|
|
1841
2090
|
avoidReRenders?: boolean;
|
|
1842
2091
|
onMount?: () => void;
|
|
2092
|
+
animations: A;
|
|
2093
|
+
View?: any;
|
|
2094
|
+
Text?: any;
|
|
2095
|
+
};
|
|
2096
|
+
export type AnimationDriver<A extends AnimationConfig = AnimationConfig> = AnimationDriverBase<A> & {
|
|
1843
2097
|
/** When true, this is a stub driver with no real animation support */
|
|
1844
2098
|
isStub?: boolean;
|
|
1845
2099
|
useAnimations: UseAnimationHook;
|
|
1846
|
-
usePresence: () => UsePresenceResult;
|
|
2100
|
+
usePresence: (registration?: PresenceRegistration) => UsePresenceResult;
|
|
1847
2101
|
ResetPresence: (props: {
|
|
1848
2102
|
children?: React.ReactNode;
|
|
1849
2103
|
disabled?: boolean;
|
|
1850
2104
|
}) => React.ReactNode;
|
|
2105
|
+
};
|
|
2106
|
+
export type AnimationDriverWithAnimatedNumbers<A extends AnimationConfig = AnimationConfig> = AnimationDriver<A> & {
|
|
1851
2107
|
useAnimatedNumber: UseAnimatedNumber;
|
|
1852
2108
|
useAnimatedNumberStyle: UseAnimatedNumberStyle;
|
|
1853
|
-
useAnimatedNumbersStyle
|
|
2109
|
+
useAnimatedNumbersStyle: UseAnimatedNumbersStyle;
|
|
1854
2110
|
useAnimatedNumberReaction: UseAnimatedNumberReaction;
|
|
1855
|
-
animations: A;
|
|
1856
|
-
View?: any;
|
|
1857
|
-
Text?: any;
|
|
1858
2111
|
};
|
|
2112
|
+
export type AnimationDriverStub<A extends AnimationConfig = AnimationConfig> = AnimationDriverBase<A> & {
|
|
2113
|
+
isStub: true;
|
|
2114
|
+
};
|
|
2115
|
+
export type AnimationDriverLike<A extends AnimationConfig = AnimationConfig> = AnimationDriver<A> | AnimationDriverStub<A>;
|
|
1859
2116
|
export type UseAnimationProps = TamaguiComponentPropsBase & Record<string, any>;
|
|
1860
2117
|
type UseStyleListener = (nextStyle: Record<string, unknown>, effectiveTransition?: TransitionProp | null, pseudoActive?: boolean) => void;
|
|
1861
2118
|
export type UseStyleEmitter = (cb: UseStyleListener) => void;
|
|
1862
2119
|
export type UseAnimationHook = (props: {
|
|
1863
2120
|
style: Record<string, any>;
|
|
1864
2121
|
props: Record<string, any>;
|
|
2122
|
+
styleState?: GetStyleResult | null;
|
|
1865
2123
|
presence?: UsePresenceResult | null;
|
|
1866
2124
|
staticConfig: StaticConfig;
|
|
1867
2125
|
styleProps: SplitStyleProps;
|
|
@@ -1869,21 +2127,19 @@ export type UseAnimationHook = (props: {
|
|
|
1869
2127
|
useStyleEmitter?: UseStyleEmitter;
|
|
1870
2128
|
theme: ThemeParsed;
|
|
1871
2129
|
themeName: string;
|
|
1872
|
-
pseudos: WithPseudoProps<ViewStyle> | null;
|
|
1873
2130
|
stateRef: {
|
|
1874
2131
|
current: TamaguiComponentStateRef;
|
|
1875
2132
|
};
|
|
1876
|
-
|
|
2133
|
+
onTransition?: OnTransition;
|
|
1877
2134
|
delay?: number;
|
|
1878
2135
|
}) => null | {
|
|
1879
|
-
style?:
|
|
2136
|
+
style?: unknown;
|
|
1880
2137
|
className?: string;
|
|
1881
2138
|
ref?: any;
|
|
1882
2139
|
};
|
|
1883
2140
|
export type GestureReponderEvent = Exclude<View['props']['onResponderMove'], void> extends (event: infer Event) => void ? Event : never;
|
|
1884
2141
|
export type RulesToInsert = Record<string, StyleObject>;
|
|
1885
2142
|
export type GetStyleResult = {
|
|
1886
|
-
pseudos?: PseudoStyles | null;
|
|
1887
2143
|
style: ViewStyle | null;
|
|
1888
2144
|
classNames: ClassNamesObject;
|
|
1889
2145
|
rulesToInsert: RulesToInsert;
|
|
@@ -1891,12 +2147,22 @@ export type GetStyleResult = {
|
|
|
1891
2147
|
fontFamily: string | undefined;
|
|
1892
2148
|
space?: any;
|
|
1893
2149
|
hasMedia: boolean | Set<string>;
|
|
1894
|
-
dynamicThemeAccess?: boolean;
|
|
1895
2150
|
pseudoGroups?: Set<string>;
|
|
1896
2151
|
mediaGroups?: Set<string>;
|
|
2152
|
+
dynamicThemeAccess?: boolean;
|
|
1897
2153
|
overriddenContextProps?: Record<string, any>;
|
|
1898
|
-
|
|
2154
|
+
programStates?: Set<string>;
|
|
2155
|
+
usesSafeArea?: true;
|
|
1899
2156
|
effectiveTransition?: TransitionProp | null;
|
|
2157
|
+
programLifecycleStyleKeys?: {
|
|
2158
|
+
enter?: Set<string>;
|
|
2159
|
+
exit?: Set<string>;
|
|
2160
|
+
};
|
|
2161
|
+
hasEnterStyle?: true;
|
|
2162
|
+
platformPseudo?: true;
|
|
2163
|
+
frontendGroup?: boolean | string;
|
|
2164
|
+
frontendContainer?: boolean | string;
|
|
2165
|
+
frontendContainerType?: string;
|
|
1900
2166
|
};
|
|
1901
2167
|
export type ClassNamesObject = Record<string, string>;
|
|
1902
2168
|
export type ModifyTamaguiComponentStyleProps<Comp extends TamaguiComponent, ChangedProps extends object> = Comp extends TamaguiComponent<infer A, infer B, infer C, infer D, infer E> ? A extends object ? TamaguiComponent<Omit<A, keyof ChangedProps> & ChangedProps, B, C, D, E> : never : never;
|
|
@@ -1921,7 +2187,7 @@ export interface RecursiveArray<T> extends Array<T | ReadonlyArray<T> | Recursiv
|
|
|
1921
2187
|
export type RegisteredStyle<T> = number & {
|
|
1922
2188
|
__registeredStyleBrand: T;
|
|
1923
2189
|
};
|
|
1924
|
-
export type StyleProp<T> = T | RegisteredStyle<T> | RecursiveArray<T | RegisteredStyle<T> | Falsy> | Falsy;
|
|
2190
|
+
export type StyleProp<T> = T | StylePiece | RegisteredStyle<T> | RecursiveArray<T | StylePiece | RegisteredStyle<T> | Falsy> | Falsy;
|
|
1925
2191
|
export type FillInFont<A extends GenericFont, DefaultKeys extends string | number> = {
|
|
1926
2192
|
family: string;
|
|
1927
2193
|
lineHeight: FillInFontValues<A, 'lineHeight', DefaultKeys>;
|