@tamagui/web 2.7.7 → 3.0.0-beta.643.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 +45 -53
- package/dist/cjs/Tamagui.native.cjs +124 -0
- package/dist/cjs/Tamagui.native.js +94 -96
- package/dist/cjs/Tamagui.native.js.map +1 -1
- package/dist/cjs/_withNativeStyle.cjs +81 -0
- package/dist/cjs/_withNativeStyle.native.cjs +86 -0
- package/dist/cjs/_withNativeStyle.native.js +88 -0
- package/dist/cjs/_withNativeStyle.native.js.map +1 -0
- package/dist/cjs/_withStableStyle.cjs +59 -54
- package/dist/cjs/_withStableStyle.native.cjs +93 -0
- package/dist/cjs/_withStableStyle.native.js +70 -57
- package/dist/cjs/_withStableStyle.native.js.map +1 -1
- package/dist/cjs/config.cjs +120 -133
- package/dist/cjs/config.native.cjs +193 -0
- package/dist/cjs/config.native.js +157 -173
- package/dist/cjs/config.native.js.map +1 -1
- package/dist/cjs/constants/accessibilityDirectMap.cjs +19 -20
- package/dist/cjs/constants/accessibilityDirectMap.native.cjs +37 -0
- package/dist/cjs/constants/accessibilityDirectMap.native.js +19 -19
- package/dist/cjs/constants/accessibilityDirectMap.native.js.map +1 -1
- package/dist/cjs/constants/constants.cjs +18 -19
- package/dist/cjs/constants/constants.native.cjs +41 -0
- package/dist/cjs/constants/constants.native.js +18 -18
- package/dist/cjs/constants/constants.native.js.map +1 -1
- package/dist/cjs/constants/isDevTools.cjs +21 -24
- package/dist/cjs/constants/isDevTools.native.cjs +34 -0
- package/dist/cjs/constants/isDevTools.native.js +23 -25
- package/dist/cjs/constants/isDevTools.native.js.map +1 -1
- package/dist/cjs/contexts/ComponentContext.cjs +32 -25
- package/dist/cjs/contexts/ComponentContext.native.cjs +50 -0
- package/dist/cjs/contexts/ComponentContext.native.js +33 -25
- package/dist/cjs/contexts/ComponentContext.native.js.map +1 -1
- package/dist/cjs/contexts/GroupContext.cjs +15 -18
- package/dist/cjs/contexts/GroupContext.native.cjs +28 -0
- package/dist/cjs/contexts/GroupContext.native.js +16 -18
- package/dist/cjs/contexts/GroupContext.native.js.map +1 -1
- package/dist/cjs/createComponent.cjs +967 -1017
- package/dist/cjs/createComponent.native.cjs +1144 -0
- package/dist/cjs/createComponent.native.js +1072 -994
- package/dist/cjs/createComponent.native.js.map +1 -1
- package/dist/cjs/createFont.cjs +41 -36
- package/dist/cjs/createFont.native.cjs +57 -0
- package/dist/cjs/createFont.native.js +44 -38
- package/dist/cjs/createFont.native.js.map +1 -1
- package/dist/cjs/createShorthands.cjs +16 -19
- package/dist/cjs/createShorthands.native.cjs +29 -0
- package/dist/cjs/createShorthands.native.js +16 -18
- package/dist/cjs/createShorthands.native.js.map +1 -1
- package/dist/cjs/createStyledHOC.cjs +55 -0
- package/dist/cjs/createStyledHOC.native.cjs +57 -0
- package/dist/cjs/createStyledHOC.native.js +59 -0
- package/dist/cjs/createStyledHOC.native.js.map +1 -0
- package/dist/cjs/createTamagui.cjs +269 -224
- package/dist/cjs/createTamagui.native.cjs +335 -0
- package/dist/cjs/createTamagui.native.js +302 -272
- package/dist/cjs/createTamagui.native.js.map +1 -1
- package/dist/cjs/createTokens.cjs +28 -19
- package/dist/cjs/createTokens.native.cjs +47 -0
- package/dist/cjs/createTokens.native.js +33 -19
- package/dist/cjs/createTokens.native.js.map +1 -1
- package/dist/cjs/createVariable.cjs +92 -86
- package/dist/cjs/createVariable.native.cjs +145 -0
- package/dist/cjs/createVariable.native.js +106 -100
- package/dist/cjs/createVariable.native.js.map +1 -1
- package/dist/cjs/createVariables.cjs +50 -60
- package/dist/cjs/createVariables.native.cjs +71 -0
- package/dist/cjs/createVariables.native.js +54 -64
- package/dist/cjs/createVariables.native.js.map +1 -1
- package/dist/cjs/defaultComponentState.cjs +29 -30
- package/dist/cjs/defaultComponentState.native.cjs +48 -0
- package/dist/cjs/defaultComponentState.native.js +29 -29
- package/dist/cjs/defaultComponentState.native.js.map +1 -1
- package/dist/cjs/dom/adapters.cjs +96 -0
- package/dist/cjs/dom/adapters.native.cjs +117 -0
- package/dist/cjs/dom/adapters.native.js +119 -0
- package/dist/cjs/dom/adapters.native.js.map +1 -0
- package/dist/cjs/dom/contract.cjs +17 -0
- package/dist/cjs/dom/contract.native.cjs +19 -0
- package/dist/cjs/dom/contract.native.js +21 -0
- package/dist/cjs/dom/contract.native.js.map +1 -0
- package/dist/cjs/dom/domEventProps.native.cjs +57 -0
- package/dist/cjs/dom/domEventProps.native.js +59 -0
- package/dist/cjs/dom/domEventProps.native.js.map +1 -0
- package/dist/cjs/dom/html.cjs +583 -0
- package/dist/cjs/dom/html.native.cjs +952 -0
- package/dist/cjs/dom/html.native.js +954 -0
- package/dist/cjs/dom/html.native.js.map +1 -0
- package/dist/cjs/dom/htmlRuntime.native.cjs +168 -0
- package/dist/cjs/dom/htmlRuntime.native.js +170 -0
- package/dist/cjs/dom/htmlRuntime.native.js.map +1 -0
- package/dist/cjs/dom/index.cjs +29 -0
- package/dist/cjs/dom/index.native.cjs +42 -0
- package/dist/cjs/dom/index.native.js +44 -0
- package/dist/cjs/dom/index.native.js.map +1 -0
- package/dist/cjs/dom/primitives.native.cjs +644 -0
- package/dist/cjs/dom/primitives.native.js +646 -0
- package/dist/cjs/dom/primitives.native.js.map +1 -0
- package/dist/cjs/dom/standalone.cjs +34 -0
- package/dist/cjs/dom/standalone.native.cjs +40 -0
- package/dist/cjs/dom/standalone.native.js +42 -0
- package/dist/cjs/dom/standalone.native.js.map +1 -0
- package/dist/cjs/dom/standaloneHtml.cjs +76 -0
- package/dist/cjs/dom/standaloneHtml.native.cjs +78 -0
- package/dist/cjs/dom/standaloneHtml.native.js +80 -0
- package/dist/cjs/dom/standaloneHtml.native.js.map +1 -0
- package/dist/cjs/dom/styleTypes.cjs +17 -0
- package/dist/cjs/dom/styleTypes.native.cjs +19 -0
- package/dist/cjs/dom/styleTypes.native.js +21 -0
- package/dist/cjs/dom/styleTypes.native.js.map +1 -0
- package/dist/cjs/eventDetails.cjs +39 -0
- package/dist/cjs/eventDetails.native.cjs +41 -0
- package/dist/cjs/eventDetails.native.js +43 -0
- package/dist/cjs/eventDetails.native.js.map +1 -0
- package/dist/cjs/eventHandling.cjs +30 -31
- package/dist/cjs/eventHandling.native.cjs +192 -0
- package/dist/cjs/eventHandling.native.js +159 -188
- package/dist/cjs/eventHandling.native.js.map +1 -1
- package/dist/cjs/helpers/componentDisplayName.cjs +35 -0
- package/dist/cjs/helpers/componentDisplayName.native.cjs +37 -0
- package/dist/cjs/helpers/componentDisplayName.native.js +39 -0
- package/dist/cjs/helpers/componentDisplayName.native.js.map +1 -0
- package/dist/cjs/helpers/consoleLog.native.cjs +31 -0
- package/dist/cjs/helpers/consoleLog.native.js +17 -17
- package/dist/cjs/helpers/consoleLog.native.js.map +1 -1
- package/dist/cjs/helpers/createDesignSystem.cjs +147 -150
- package/dist/cjs/helpers/createDesignSystem.native.cjs +196 -0
- package/dist/cjs/helpers/createDesignSystem.native.js +168 -205
- package/dist/cjs/helpers/createDesignSystem.native.js.map +1 -1
- package/dist/cjs/helpers/createStyledContext.cjs +73 -84
- package/dist/cjs/helpers/createStyledContext.native.cjs +97 -0
- package/dist/cjs/helpers/createStyledContext.native.js +78 -88
- package/dist/cjs/helpers/createStyledContext.native.js.map +1 -1
- package/dist/cjs/helpers/defaultAnimationDriver.cjs +29 -32
- package/dist/cjs/helpers/defaultAnimationDriver.native.cjs +60 -0
- package/dist/cjs/helpers/defaultAnimationDriver.native.js +46 -48
- package/dist/cjs/helpers/defaultAnimationDriver.native.js.map +1 -1
- package/dist/cjs/helpers/defaultOffset.cjs +17 -20
- package/dist/cjs/helpers/defaultOffset.native.cjs +30 -0
- package/dist/cjs/helpers/defaultOffset.native.js +17 -19
- package/dist/cjs/helpers/defaultOffset.native.js.map +1 -1
- package/dist/cjs/helpers/directStyle.cjs +940 -0
- package/dist/cjs/helpers/directStyle.native.cjs +1145 -0
- package/dist/cjs/helpers/directStyle.native.js +1147 -0
- package/dist/cjs/helpers/directStyle.native.js.map +1 -0
- package/dist/cjs/helpers/expandStyle.cjs +132 -84
- package/dist/cjs/helpers/expandStyle.native.cjs +186 -0
- package/dist/cjs/helpers/expandStyle.native.js +154 -124
- package/dist/cjs/helpers/expandStyle.native.js.map +1 -1
- package/dist/cjs/helpers/expandStyles.cjs +22 -25
- package/dist/cjs/helpers/expandStyles.native.cjs +47 -0
- package/dist/cjs/helpers/expandStyles.native.js +29 -31
- package/dist/cjs/helpers/expandStyles.native.js.map +1 -1
- package/dist/cjs/helpers/extractPseudoState.cjs +45 -0
- package/dist/cjs/helpers/extractPseudoState.native.cjs +48 -0
- package/dist/cjs/helpers/extractPseudoState.native.js +50 -0
- package/dist/cjs/helpers/extractPseudoState.native.js.map +1 -0
- package/dist/cjs/helpers/formatDiagnostic.cjs +69 -0
- package/dist/cjs/helpers/formatDiagnostic.native.cjs +78 -0
- package/dist/cjs/helpers/formatDiagnostic.native.js +80 -0
- package/dist/cjs/helpers/formatDiagnostic.native.js.map +1 -0
- package/dist/cjs/helpers/frontendProgram.cjs +44 -0
- package/dist/cjs/helpers/frontendProgram.native.cjs +50 -0
- package/dist/cjs/helpers/frontendProgram.native.js +52 -0
- package/dist/cjs/helpers/frontendProgram.native.js.map +1 -0
- package/dist/cjs/helpers/getCSSStylesAtomic.cjs +200 -190
- package/dist/cjs/helpers/getCSSStylesAtomic.native.cjs +38 -0
- package/dist/cjs/helpers/getCSSStylesAtomic.native.js +21 -19
- package/dist/cjs/helpers/getCSSStylesAtomic.native.js.map +1 -1
- package/dist/cjs/helpers/getDefaultProps.cjs +15 -33
- package/dist/cjs/helpers/getDefaultProps.native.cjs +29 -0
- package/dist/cjs/helpers/getDefaultProps.native.js +17 -33
- package/dist/cjs/helpers/getDefaultProps.native.js.map +1 -1
- package/dist/cjs/helpers/getDynamicVal.cjs +45 -52
- package/dist/cjs/helpers/getDynamicVal.native.cjs +68 -0
- package/dist/cjs/helpers/getDynamicVal.native.js +45 -51
- package/dist/cjs/helpers/getDynamicVal.native.js.map +1 -1
- package/dist/cjs/helpers/getExpandedShorthands.cjs +17 -30
- package/dist/cjs/helpers/getExpandedShorthands.native.cjs +32 -0
- package/dist/cjs/helpers/getExpandedShorthands.native.js +18 -30
- package/dist/cjs/helpers/getExpandedShorthands.native.js.map +1 -1
- package/dist/cjs/helpers/getFontLanguage.cjs +15 -18
- package/dist/cjs/helpers/getFontLanguage.native.cjs +29 -0
- package/dist/cjs/helpers/getFontLanguage.native.js +17 -19
- package/dist/cjs/helpers/getFontLanguage.native.js.map +1 -1
- package/dist/cjs/helpers/getShorthandValue.cjs +17 -20
- package/dist/cjs/helpers/getShorthandValue.native.cjs +33 -0
- package/dist/cjs/helpers/getShorthandValue.native.js +19 -21
- package/dist/cjs/helpers/getShorthandValue.native.js.map +1 -1
- package/dist/cjs/helpers/getSplitStyles.cjs +711 -894
- package/dist/cjs/helpers/getSplitStyles.native.cjs +845 -0
- package/dist/cjs/helpers/getSplitStyles.native.js +788 -926
- package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/cjs/helpers/getThemeCSSRules.cjs +106 -109
- package/dist/cjs/helpers/getThemeCSSRules.native.cjs +29 -0
- package/dist/cjs/helpers/getThemeCSSRules.native.js +16 -18
- package/dist/cjs/helpers/getThemeCSSRules.native.js.map +1 -1
- package/dist/cjs/helpers/getVariantExtras.cjs +71 -69
- package/dist/cjs/helpers/getVariantExtras.native.cjs +90 -0
- package/dist/cjs/helpers/getVariantExtras.native.js +72 -69
- package/dist/cjs/helpers/getVariantExtras.native.js.map +1 -1
- package/dist/cjs/helpers/grammarConfig.cjs +73 -0
- package/dist/cjs/helpers/grammarConfig.native.cjs +151 -0
- package/dist/cjs/helpers/grammarConfig.native.js +153 -0
- package/dist/cjs/helpers/grammarConfig.native.js.map +1 -0
- package/dist/cjs/helpers/insertStyleRule.cjs +249 -184
- package/dist/cjs/helpers/insertStyleRule.native.cjs +159 -0
- package/dist/cjs/helpers/insertStyleRule.native.js +120 -63
- package/dist/cjs/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/cjs/helpers/isObj.cjs +23 -16
- package/dist/cjs/helpers/isObj.native.cjs +43 -0
- package/dist/cjs/helpers/isObj.native.js +27 -20
- package/dist/cjs/helpers/isObj.native.js.map +1 -1
- package/dist/cjs/helpers/isTamaguiComponent.cjs +18 -21
- package/dist/cjs/helpers/isTamaguiComponent.native.cjs +30 -0
- package/dist/cjs/helpers/isTamaguiComponent.native.js +18 -20
- package/dist/cjs/helpers/isTamaguiComponent.native.js.map +1 -1
- package/dist/cjs/helpers/isTamaguiElement.cjs +20 -28
- package/dist/cjs/helpers/isTamaguiElement.native.cjs +37 -0
- package/dist/cjs/helpers/isTamaguiElement.native.js +20 -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 +15 -18
- package/dist/cjs/helpers/mainThreadPressEvents.native.cjs +156 -0
- package/dist/cjs/helpers/mainThreadPressEvents.native.js +139 -142
- package/dist/cjs/helpers/mainThreadPressEvents.native.js.map +1 -1
- package/dist/cjs/helpers/matchMedia.cjs +22 -23
- package/dist/cjs/helpers/matchMedia.native.cjs +69 -0
- package/dist/cjs/helpers/matchMedia.native.js +50 -41
- package/dist/cjs/helpers/matchMedia.native.js.map +1 -1
- package/dist/cjs/helpers/mediaObjectToString.cjs +35 -38
- package/dist/cjs/helpers/mediaObjectToString.native.cjs +53 -0
- package/dist/cjs/helpers/mediaObjectToString.native.js +38 -40
- package/dist/cjs/helpers/mediaObjectToString.native.js.map +1 -1
- package/dist/cjs/helpers/mediaState.cjs +23 -43
- package/dist/cjs/helpers/mediaState.native.cjs +41 -0
- package/dist/cjs/helpers/mediaState.native.js +26 -46
- package/dist/cjs/helpers/mediaState.native.js.map +1 -1
- package/dist/cjs/helpers/mergeProps.cjs +51 -63
- package/dist/cjs/helpers/mergeProps.native.cjs +69 -0
- package/dist/cjs/helpers/mergeProps.native.js +54 -70
- package/dist/cjs/helpers/mergeProps.native.js.map +1 -1
- package/dist/cjs/helpers/mergeRenderElementProps.cjs +18 -23
- package/dist/cjs/helpers/mergeRenderElementProps.native.cjs +32 -0
- package/dist/cjs/helpers/mergeRenderElementProps.native.js +18 -22
- package/dist/cjs/helpers/mergeRenderElementProps.native.js.map +1 -1
- package/dist/cjs/helpers/mergeSlotStyleProps.cjs +35 -38
- package/dist/cjs/helpers/mergeSlotStyleProps.native.cjs +51 -0
- package/dist/cjs/helpers/mergeSlotStyleProps.native.js +35 -37
- package/dist/cjs/helpers/mergeSlotStyleProps.native.js.map +1 -1
- package/dist/cjs/helpers/mergeVariants.cjs +52 -41
- package/dist/cjs/helpers/mergeVariants.native.cjs +66 -0
- package/dist/cjs/helpers/mergeVariants.native.js +54 -42
- package/dist/cjs/helpers/mergeVariants.native.js.map +1 -1
- package/dist/cjs/helpers/nativeOnlyProps.cjs +48 -51
- package/dist/cjs/helpers/nativeOnlyProps.native.cjs +61 -0
- package/dist/cjs/helpers/nativeOnlyProps.native.js +48 -50
- package/dist/cjs/helpers/nativeOnlyProps.native.js.map +1 -1
- package/dist/cjs/helpers/nativeStyleEngine.cjs +209 -0
- package/dist/cjs/helpers/nativeStyleEngine.native.cjs +303 -0
- package/dist/cjs/helpers/nativeStyleEngine.native.js +305 -0
- package/dist/cjs/helpers/nativeStyleEngine.native.js.map +1 -0
- package/dist/cjs/helpers/nativeTransitionTarget.cjs +27 -0
- package/dist/cjs/helpers/nativeTransitionTarget.native.cjs +43 -0
- package/dist/cjs/helpers/nativeTransitionTarget.native.js +45 -0
- package/dist/cjs/helpers/nativeTransitionTarget.native.js.map +1 -0
- package/dist/cjs/helpers/normalizeColor.cjs +23 -35
- package/dist/cjs/helpers/normalizeColor.native.cjs +50 -0
- package/dist/cjs/helpers/normalizeColor.native.js +33 -34
- package/dist/cjs/helpers/normalizeColor.native.js.map +1 -1
- package/dist/cjs/helpers/normalizeShadow.cjs +26 -39
- package/dist/cjs/helpers/normalizeShadow.native.cjs +42 -0
- package/dist/cjs/helpers/normalizeShadow.native.js +27 -37
- package/dist/cjs/helpers/normalizeShadow.native.js.map +1 -1
- package/dist/cjs/helpers/normalizeStyle.cjs +45 -60
- package/dist/cjs/helpers/normalizeStyle.native.cjs +80 -0
- package/dist/cjs/helpers/normalizeStyle.native.js +63 -79
- package/dist/cjs/helpers/normalizeStyle.native.js.map +1 -1
- package/dist/cjs/helpers/normalizeStylePropKeys.cjs +15 -18
- package/dist/cjs/helpers/normalizeStylePropKeys.native.cjs +38 -0
- package/dist/cjs/helpers/normalizeStylePropKeys.native.js +25 -27
- package/dist/cjs/helpers/normalizeStylePropKeys.native.js.map +1 -1
- package/dist/cjs/helpers/normalizeValueWithProperty.cjs +42 -39
- package/dist/cjs/helpers/normalizeValueWithProperty.native.cjs +64 -0
- package/dist/cjs/helpers/normalizeValueWithProperty.native.js +45 -42
- package/dist/cjs/helpers/normalizeValueWithProperty.native.js.map +1 -1
- package/dist/cjs/helpers/noteOnce.cjs +32 -0
- package/dist/cjs/helpers/noteOnce.native.cjs +34 -0
- package/dist/cjs/helpers/noteOnce.native.js +36 -0
- package/dist/cjs/helpers/noteOnce.native.js.map +1 -0
- package/dist/cjs/helpers/objectIdentityKey.cjs +31 -34
- package/dist/cjs/helpers/objectIdentityKey.native.cjs +49 -0
- package/dist/cjs/helpers/objectIdentityKey.native.js +34 -37
- package/dist/cjs/helpers/objectIdentityKey.native.js.map +1 -1
- package/dist/cjs/helpers/parseBorderShorthand.cjs +16 -19
- package/dist/cjs/helpers/parseBorderShorthand.native.cjs +97 -0
- package/dist/cjs/helpers/parseBorderShorthand.native.js +84 -71
- 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 +68 -0
- package/dist/cjs/helpers/parseNativeTransform.native.js +70 -0
- package/dist/cjs/helpers/parseNativeTransform.native.js.map +1 -0
- package/dist/cjs/helpers/parseOutlineShorthand.cjs +16 -19
- package/dist/cjs/helpers/parseOutlineShorthand.native.cjs +85 -0
- package/dist/cjs/helpers/parseOutlineShorthand.native.js +72 -65
- package/dist/cjs/helpers/parseOutlineShorthand.native.js.map +1 -1
- package/dist/cjs/helpers/pointerEvents.cjs +15 -18
- package/dist/cjs/helpers/pointerEvents.native.cjs +132 -0
- package/dist/cjs/helpers/pointerEvents.native.js +117 -144
- package/dist/cjs/helpers/pointerEvents.native.js.map +1 -1
- package/dist/cjs/helpers/propMapper.cjs +338 -252
- package/dist/cjs/helpers/propMapper.native.cjs +506 -0
- package/dist/cjs/helpers/propMapper.native.js +475 -348
- package/dist/cjs/helpers/propMapper.native.js.map +1 -1
- package/dist/cjs/helpers/proxyThemeToParents.cjs +40 -47
- package/dist/cjs/helpers/proxyThemeToParents.native.cjs +143 -0
- package/dist/cjs/helpers/proxyThemeToParents.native.js +125 -141
- package/dist/cjs/helpers/proxyThemeToParents.native.js.map +1 -1
- package/dist/cjs/helpers/registerCSSVariable.cjs +106 -60
- package/dist/cjs/helpers/registerCSSVariable.native.cjs +144 -0
- package/dist/cjs/helpers/registerCSSVariable.native.js +122 -61
- package/dist/cjs/helpers/registerCSSVariable.native.js.map +1 -1
- package/dist/cjs/helpers/resolveAnimationDriver.cjs +28 -26
- package/dist/cjs/helpers/resolveAnimationDriver.native.cjs +45 -0
- package/dist/cjs/helpers/resolveAnimationDriver.native.js +32 -26
- package/dist/cjs/helpers/resolveAnimationDriver.native.js.map +1 -1
- package/dist/cjs/helpers/resolveRem.cjs +18 -19
- package/dist/cjs/helpers/resolveRem.native.cjs +57 -0
- package/dist/cjs/helpers/resolveRem.native.js +37 -37
- package/dist/cjs/helpers/resolveRem.native.js.map +1 -1
- package/dist/cjs/helpers/resolveSafeArea.cjs +114 -23
- package/dist/cjs/helpers/resolveSafeArea.native.cjs +130 -0
- package/dist/cjs/helpers/resolveSafeArea.native.js +115 -29
- package/dist/cjs/helpers/resolveSafeArea.native.js.map +1 -1
- package/dist/cjs/helpers/resolveSafeAreaVariable.cjs +34 -0
- package/dist/cjs/helpers/resolveSafeAreaVariable.native.cjs +52 -0
- package/dist/cjs/helpers/resolveSafeAreaVariable.native.js +54 -0
- package/dist/cjs/helpers/resolveSafeAreaVariable.native.js.map +1 -0
- package/dist/cjs/helpers/resolveVariableValue.cjs +35 -0
- package/dist/cjs/helpers/resolveVariableValue.native.cjs +39 -0
- package/dist/cjs/helpers/resolveVariableValue.native.js +41 -0
- package/dist/cjs/helpers/resolveVariableValue.native.js.map +1 -0
- package/dist/cjs/helpers/setElementProps.cjs +17 -20
- package/dist/cjs/helpers/setElementProps.native.cjs +35 -0
- package/dist/cjs/helpers/setElementProps.native.js +22 -24
- package/dist/cjs/helpers/setElementProps.native.js.map +1 -1
- package/dist/cjs/helpers/skipProps.cjs +31 -31
- package/dist/cjs/helpers/skipProps.native.cjs +48 -0
- package/dist/cjs/helpers/skipProps.native.js +31 -30
- package/dist/cjs/helpers/skipProps.native.js.map +1 -1
- package/dist/cjs/helpers/sortString.cjs +15 -18
- package/dist/cjs/helpers/sortString.native.cjs +29 -0
- package/dist/cjs/helpers/sortString.native.js +17 -19
- package/dist/cjs/helpers/sortString.native.js.map +1 -1
- package/dist/cjs/helpers/styleFrontend.cjs +31 -0
- package/dist/cjs/helpers/styleFrontend.native.cjs +35 -0
- package/dist/cjs/helpers/styleFrontend.native.js +37 -0
- package/dist/cjs/helpers/styleFrontend.native.js.map +1 -0
- package/dist/cjs/helpers/styleOriginalValues.cjs +15 -18
- package/dist/cjs/helpers/styleOriginalValues.native.cjs +27 -0
- package/dist/cjs/helpers/styleOriginalValues.native.js +16 -18
- package/dist/cjs/helpers/styleOriginalValues.native.js.map +1 -1
- package/dist/cjs/helpers/styleProvenance.cjs +26 -27
- package/dist/cjs/helpers/styleProvenance.native.cjs +44 -0
- package/dist/cjs/helpers/styleProvenance.native.js +26 -26
- package/dist/cjs/helpers/styleProvenance.native.js.map +1 -1
- package/dist/cjs/helpers/subscribeToContextGroup.cjs +77 -96
- package/dist/cjs/helpers/subscribeToContextGroup.native.cjs +133 -0
- package/dist/cjs/helpers/subscribeToContextGroup.native.js +118 -140
- package/dist/cjs/helpers/subscribeToContextGroup.native.js.map +1 -1
- package/dist/cjs/helpers/themeRef.cjs +42 -0
- package/dist/cjs/helpers/themeRef.native.cjs +48 -0
- package/dist/cjs/helpers/themeRef.native.js +50 -0
- package/dist/cjs/helpers/themeRef.native.js.map +1 -0
- package/dist/cjs/helpers/themeable.cjs +76 -97
- package/dist/cjs/helpers/themeable.native.cjs +96 -0
- package/dist/cjs/helpers/themeable.native.js +76 -97
- package/dist/cjs/helpers/themeable.native.js.map +1 -1
- package/dist/cjs/helpers/themes.cjs +30 -34
- package/dist/cjs/helpers/themes.native.cjs +44 -0
- package/dist/cjs/helpers/themes.native.js +30 -33
- package/dist/cjs/helpers/themes.native.js.map +1 -1
- package/dist/cjs/helpers/timer.cjs +16 -21
- package/dist/cjs/helpers/timer.native.cjs +31 -0
- package/dist/cjs/helpers/timer.native.js +18 -22
- package/dist/cjs/helpers/timer.native.js.map +1 -1
- package/dist/cjs/helpers/tokenCategories.cjs +103 -0
- package/dist/cjs/helpers/tokenCategories.native.cjs +107 -0
- package/dist/cjs/helpers/tokenCategories.native.js +109 -0
- package/dist/cjs/helpers/tokenCategories.native.js.map +1 -0
- package/dist/cjs/helpers/transformsToString.cjs +25 -31
- package/dist/cjs/helpers/transformsToString.native.cjs +56 -0
- package/dist/cjs/helpers/transformsToString.native.js +42 -30
- package/dist/cjs/helpers/transformsToString.native.js.map +1 -1
- package/dist/cjs/helpers/useRenderElement.cjs +34 -39
- package/dist/cjs/helpers/useRenderElement.native.cjs +54 -0
- package/dist/cjs/helpers/useRenderElement.native.js +38 -42
- package/dist/cjs/helpers/useRenderElement.native.js.map +1 -1
- package/dist/cjs/helpers/variables.cjs +611 -0
- package/dist/cjs/helpers/variables.native.cjs +873 -0
- package/dist/cjs/helpers/variables.native.js +875 -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 +41 -0
- package/dist/cjs/helpers/warnOnce.native.js +43 -0
- package/dist/cjs/helpers/warnOnce.native.js.map +1 -0
- package/dist/cjs/helpers/webPropsToSkip.cjs +15 -18
- package/dist/cjs/helpers/webPropsToSkip.native.cjs +68 -0
- package/dist/cjs/helpers/webPropsToSkip.native.js +54 -62
- package/dist/cjs/helpers/webPropsToSkip.native.js.map +1 -1
- package/dist/cjs/helpers/wrapStyleTags.cjs +45 -48
- package/dist/cjs/helpers/wrapStyleTags.native.cjs +30 -0
- package/dist/cjs/helpers/wrapStyleTags.native.js +16 -17
- package/dist/cjs/helpers/wrapStyleTags.native.js.map +1 -1
- package/dist/cjs/hooks/doesRootSchemeMatchSystem.cjs +16 -19
- package/dist/cjs/hooks/doesRootSchemeMatchSystem.native.cjs +32 -0
- package/dist/cjs/hooks/doesRootSchemeMatchSystem.native.js +17 -19
- package/dist/cjs/hooks/doesRootSchemeMatchSystem.native.js.map +1 -1
- package/dist/cjs/hooks/getThemeProxied.cjs +61 -58
- package/dist/cjs/hooks/getThemeProxied.native.cjs +124 -0
- package/dist/cjs/hooks/getThemeProxied.native.js +98 -79
- package/dist/cjs/hooks/getThemeProxied.native.js.map +1 -1
- package/dist/cjs/hooks/isOptimizedForFirstRender.cjs +28 -0
- package/dist/cjs/hooks/isOptimizedForFirstRender.native.cjs +30 -0
- package/dist/cjs/hooks/isOptimizedForFirstRender.native.js +32 -0
- package/dist/cjs/hooks/isOptimizedForFirstRender.native.js.map +1 -0
- package/dist/cjs/hooks/useAnimationDriver.cjs +46 -0
- package/dist/cjs/hooks/useAnimationDriver.native.cjs +54 -0
- package/dist/cjs/hooks/useAnimationDriver.native.js +56 -0
- package/dist/cjs/hooks/useAnimationDriver.native.js.map +1 -0
- package/dist/cjs/hooks/useComponentState.cjs +215 -199
- package/dist/cjs/hooks/useComponentState.native.cjs +250 -0
- package/dist/cjs/hooks/useComponentState.native.js +225 -208
- package/dist/cjs/hooks/useComponentState.native.js.map +1 -1
- package/dist/cjs/hooks/useDisableSSR.cjs +16 -19
- package/dist/cjs/hooks/useDisableSSR.native.cjs +31 -0
- package/dist/cjs/hooks/useDisableSSR.native.js +17 -19
- package/dist/cjs/hooks/useDisableSSR.native.js.map +1 -1
- package/dist/cjs/hooks/useIsTouchDevice.cjs +16 -19
- package/dist/cjs/hooks/useIsTouchDevice.native.cjs +31 -0
- package/dist/cjs/hooks/useIsTouchDevice.native.js +17 -19
- package/dist/cjs/hooks/useIsTouchDevice.native.js.map +1 -1
- package/dist/cjs/hooks/useMedia.cjs +329 -256
- package/dist/cjs/hooks/useMedia.native.cjs +532 -0
- package/dist/cjs/hooks/useMedia.native.js +481 -305
- package/dist/cjs/hooks/useMedia.native.js.map +1 -1
- package/dist/cjs/hooks/usePortalThemeState.cjs +41 -0
- package/dist/cjs/hooks/usePortalThemeState.native.cjs +43 -0
- package/dist/cjs/hooks/usePortalThemeState.native.js +45 -0
- package/dist/cjs/hooks/usePortalThemeState.native.js.map +1 -0
- package/dist/cjs/hooks/useProps.cjs +96 -88
- package/dist/cjs/hooks/useProps.native.cjs +134 -0
- package/dist/cjs/hooks/useProps.native.js +100 -89
- package/dist/cjs/hooks/useProps.native.js.map +1 -1
- package/dist/cjs/hooks/useTheme.cjs +41 -49
- package/dist/cjs/hooks/useTheme.native.cjs +65 -0
- package/dist/cjs/hooks/useTheme.native.js +44 -52
- package/dist/cjs/hooks/useTheme.native.js.map +1 -1
- package/dist/cjs/hooks/useThemeName.cjs +20 -25
- package/dist/cjs/hooks/useThemeName.native.cjs +39 -0
- package/dist/cjs/hooks/useThemeName.native.js +23 -27
- package/dist/cjs/hooks/useThemeName.native.js.map +1 -1
- package/dist/cjs/hooks/useThemeState.cjs +347 -364
- package/dist/cjs/hooks/useThemeState.native.cjs +442 -0
- package/dist/cjs/hooks/useThemeState.native.js +394 -473
- package/dist/cjs/hooks/useThemeState.native.js.map +1 -1
- package/dist/cjs/index.cjs +62 -45
- package/dist/cjs/index.native.cjs +144 -0
- package/dist/cjs/index.native.js +62 -44
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/inject-styles.cjs +25 -31
- package/dist/cjs/inject-styles.native.cjs +39 -0
- package/dist/cjs/inject-styles.native.js +26 -31
- package/dist/cjs/inject-styles.native.js.map +1 -1
- package/dist/cjs/insertFont.cjs +61 -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 +167 -11
- package/dist/cjs/interfaces/CSSColorNames.native.cjs +176 -0
- package/dist/cjs/interfaces/CSSColorNames.native.js +167 -10
- package/dist/cjs/interfaces/CSSColorNames.native.js.map +1 -1
- package/dist/cjs/interfaces/GetRef.cjs +10 -11
- package/dist/cjs/interfaces/GetRef.native.cjs +19 -0
- package/dist/cjs/interfaces/GetRef.native.js +10 -10
- package/dist/cjs/interfaces/GetRef.native.js.map +1 -1
- package/dist/cjs/interfaces/RNExclusiveTypes.cjs +10 -11
- package/dist/cjs/interfaces/RNExclusiveTypes.native.cjs +19 -0
- package/dist/cjs/interfaces/RNExclusiveTypes.native.js +10 -10
- package/dist/cjs/interfaces/RNExclusiveTypes.native.js.map +1 -1
- package/dist/cjs/interfaces/TamaguiComponentEvents.cjs +10 -11
- package/dist/cjs/interfaces/TamaguiComponentEvents.native.cjs +19 -0
- package/dist/cjs/interfaces/TamaguiComponentEvents.native.js +10 -10
- package/dist/cjs/interfaces/TamaguiComponentEvents.native.js.map +1 -1
- package/dist/cjs/interfaces/TamaguiComponentPropsBaseBase.cjs +10 -11
- package/dist/cjs/interfaces/TamaguiComponentPropsBaseBase.native.cjs +19 -0
- package/dist/cjs/interfaces/TamaguiComponentPropsBaseBase.native.js +10 -10
- package/dist/cjs/interfaces/TamaguiComponentPropsBaseBase.native.js.map +1 -1
- package/dist/cjs/internal-runtime.cjs +76 -0
- package/dist/cjs/internal-runtime.native.cjs +78 -0
- package/dist/cjs/internal-runtime.native.js +80 -0
- package/dist/cjs/internal-runtime.native.js.map +1 -0
- package/dist/cjs/internalRuntimeTypes.cjs +17 -0
- package/dist/cjs/internalRuntimeTypes.native.cjs +19 -0
- package/dist/cjs/internalRuntimeTypes.native.js +21 -0
- package/dist/cjs/internalRuntimeTypes.native.js.map +1 -0
- package/dist/cjs/setupHooks.cjs +17 -18
- package/dist/cjs/setupHooks.native.cjs +33 -0
- package/dist/cjs/setupHooks.native.js +17 -17
- package/dist/cjs/setupHooks.native.js.map +1 -1
- package/dist/cjs/setupReactNative.cjs +40 -41
- package/dist/cjs/setupReactNative.native.cjs +56 -0
- package/dist/cjs/setupReactNative.native.js +41 -41
- package/dist/cjs/setupReactNative.native.js.map +1 -1
- package/dist/cjs/styled.cjs +170 -141
- package/dist/cjs/styled.native.cjs +198 -0
- package/dist/cjs/styled.native.js +179 -144
- package/dist/cjs/styled.native.js.map +1 -1
- package/dist/cjs/type-utils.cjs +10 -11
- package/dist/cjs/type-utils.native.cjs +19 -0
- package/dist/cjs/type-utils.native.js +10 -10
- package/dist/cjs/type-utils.native.js.map +1 -1
- package/dist/cjs/types.cjs +40 -11
- package/dist/cjs/types.native.cjs +49 -0
- package/dist/cjs/types.native.js +40 -10
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/cjs/views/ConfigRevisionCheck.cjs +69 -0
- package/dist/cjs/views/ConfigRevisionCheck.native.cjs +74 -0
- package/dist/cjs/views/ConfigRevisionCheck.native.js +76 -0
- package/dist/cjs/views/ConfigRevisionCheck.native.js.map +1 -0
- package/dist/cjs/views/Configuration.cjs +27 -35
- package/dist/cjs/views/Configuration.native.cjs +47 -0
- package/dist/cjs/views/Configuration.native.js +28 -35
- package/dist/cjs/views/Configuration.native.js.map +1 -1
- package/dist/cjs/views/FontLanguage.cjs +21 -29
- package/dist/cjs/views/FontLanguage.native.cjs +47 -0
- package/dist/cjs/views/FontLanguage.native.js +28 -38
- package/dist/cjs/views/FontLanguage.native.js.map +1 -1
- package/dist/cjs/views/SafeAreaTracker.cjs +33 -0
- package/dist/cjs/views/SafeAreaTracker.native.cjs +37 -0
- package/dist/cjs/views/SafeAreaTracker.native.js +39 -0
- package/dist/cjs/views/SafeAreaTracker.native.js.map +1 -0
- package/dist/cjs/views/Slot.cjs +52 -59
- package/dist/cjs/views/Slot.native.cjs +78 -0
- package/dist/cjs/views/Slot.native.js +53 -59
- package/dist/cjs/views/Slot.native.js.map +1 -1
- package/dist/cjs/views/TamaguiProvider.cjs +74 -75
- package/dist/cjs/views/TamaguiProvider.native.cjs +104 -0
- package/dist/cjs/views/TamaguiProvider.native.js +73 -75
- package/dist/cjs/views/TamaguiProvider.native.js.map +1 -1
- package/dist/cjs/views/TamaguiRoot.cjs +47 -61
- package/dist/cjs/views/TamaguiRoot.native.cjs +29 -0
- package/dist/cjs/views/TamaguiRoot.native.js +16 -18
- package/dist/cjs/views/TamaguiRoot.native.js.map +1 -1
- package/dist/cjs/views/Text.cjs +44 -46
- package/dist/cjs/views/Text.native.cjs +47 -0
- package/dist/cjs/views/Text.native.js +33 -37
- package/dist/cjs/views/Text.native.js.map +1 -1
- package/dist/cjs/views/Theme.cjs +141 -166
- package/dist/cjs/views/Theme.native.cjs +171 -0
- package/dist/cjs/views/Theme.native.js +138 -172
- package/dist/cjs/views/Theme.native.js.map +1 -1
- package/dist/cjs/views/ThemeDebug.cjs +77 -81
- package/dist/cjs/views/ThemeDebug.native.cjs +31 -0
- package/dist/cjs/views/ThemeDebug.native.js +17 -23
- package/dist/cjs/views/ThemeDebug.native.js.map +1 -1
- package/dist/cjs/views/ThemeProvider.cjs +35 -39
- package/dist/cjs/views/ThemeProvider.native.cjs +44 -0
- package/dist/cjs/views/ThemeProvider.native.js +26 -28
- package/dist/cjs/views/ThemeProvider.native.js.map +1 -1
- package/dist/cjs/views/View.cjs +21 -19
- package/dist/cjs/views/View.native.cjs +37 -0
- package/dist/cjs/views/View.native.js +22 -19
- 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 +55 -33
- package/dist/esm/_withStableStyle.native.js.map +1 -1
- package/dist/esm/config.mjs +90 -100
- package/dist/esm/config.mjs.map +1 -1
- package/dist/esm/config.native.js +115 -129
- package/dist/esm/config.native.js.map +1 -1
- package/dist/esm/constants/accessibilityDirectMap.mjs +1 -0
- package/dist/esm/constants/accessibilityDirectMap.mjs.map +1 -1
- package/dist/esm/constants/accessibilityDirectMap.native.js +1 -0
- package/dist/esm/constants/accessibilityDirectMap.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 +953 -988
- package/dist/esm/createComponent.mjs.map +1 -1
- package/dist/esm/createComponent.native.js +1061 -970
- 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 +29 -0
- package/dist/esm/createStyledHOC.mjs.map +1 -0
- package/dist/esm/createStyledHOC.native.js +29 -0
- package/dist/esm/createStyledHOC.native.js.map +1 -0
- package/dist/esm/createTamagui.mjs +256 -207
- package/dist/esm/createTamagui.mjs.map +1 -1
- package/dist/esm/createTamagui.native.js +289 -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 +20 -2
- package/dist/esm/createTokens.native.js.map +1 -1
- package/dist/esm/createVariable.mjs +69 -60
- package/dist/esm/createVariable.mjs.map +1 -1
- package/dist/esm/createVariable.native.js +83 -75
- 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 +41 -47
- 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 +563 -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 +143 -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 +610 -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/componentDisplayName.mjs +11 -0
- package/dist/esm/helpers/componentDisplayName.mjs.map +1 -0
- package/dist/esm/helpers/componentDisplayName.native.js +11 -0
- package/dist/esm/helpers/componentDisplayName.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 -132
- 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 +57 -58
- package/dist/esm/helpers/createStyledContext.mjs.map +1 -1
- package/dist/esm/helpers/createStyledContext.native.js +62 -63
- package/dist/esm/helpers/createStyledContext.native.js.map +1 -1
- package/dist/esm/helpers/defaultAnimationDriver.mjs +15 -14
- package/dist/esm/helpers/defaultAnimationDriver.mjs.map +1 -1
- package/dist/esm/helpers/defaultAnimationDriver.native.js +32 -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/directStyle.mjs +907 -0
- package/dist/esm/helpers/directStyle.mjs.map +1 -0
- package/dist/esm/helpers/directStyle.native.js +1112 -0
- package/dist/esm/helpers/directStyle.native.js.map +1 -0
- package/dist/esm/helpers/expandStyle.mjs +119 -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/formatDiagnostic.mjs +48 -0
- package/dist/esm/helpers/formatDiagnostic.mjs.map +1 -0
- package/dist/esm/helpers/formatDiagnostic.native.js +55 -0
- package/dist/esm/helpers/formatDiagnostic.native.js.map +1 -0
- package/dist/esm/helpers/frontendProgram.mjs +20 -0
- package/dist/esm/helpers/frontendProgram.mjs.map +1 -0
- package/dist/esm/helpers/frontendProgram.native.js +24 -0
- package/dist/esm/helpers/frontendProgram.native.js.map +1 -0
- package/dist/esm/helpers/getCSSStylesAtomic.mjs +186 -173
- package/dist/esm/helpers/getCSSStylesAtomic.mjs.map +1 -1
- package/dist/esm/helpers/getCSSStylesAtomic.native.js +5 -3
- package/dist/esm/helpers/getCSSStylesAtomic.native.js.map +1 -1
- package/dist/esm/helpers/getDefaultProps.mjs +2 -16
- package/dist/esm/helpers/getDefaultProps.mjs.map +1 -1
- package/dist/esm/helpers/getDefaultProps.native.js +3 -16
- package/dist/esm/helpers/getDefaultProps.native.js.map +1 -1
- package/dist/esm/helpers/getDynamicVal.mjs +28 -33
- package/dist/esm/helpers/getDynamicVal.mjs.map +1 -1
- package/dist/esm/helpers/getDynamicVal.native.js +28 -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/getFontLanguage.mjs +2 -1
- package/dist/esm/helpers/getFontLanguage.mjs.map +1 -1
- package/dist/esm/helpers/getFontLanguage.native.js +3 -2
- package/dist/esm/helpers/getFontLanguage.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 +695 -868
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +773 -899
- 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/getVariantExtras.mjs +57 -52
- package/dist/esm/helpers/getVariantExtras.mjs.map +1 -1
- package/dist/esm/helpers/getVariantExtras.native.js +58 -53
- package/dist/esm/helpers/getVariantExtras.native.js.map +1 -1
- package/dist/esm/helpers/grammarConfig.mjs +53 -0
- package/dist/esm/helpers/grammarConfig.mjs.map +1 -0
- package/dist/esm/helpers/grammarConfig.native.js +129 -0
- package/dist/esm/helpers/grammarConfig.native.js.map +1 -0
- package/dist/esm/helpers/insertStyleRule.mjs +228 -160
- package/dist/esm/helpers/insertStyleRule.mjs.map +1 -1
- package/dist/esm/helpers/insertStyleRule.native.js +61 -24
- 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 +13 -6
- 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 +11 -9
- package/dist/esm/helpers/log.mjs.map +1 -1
- package/dist/esm/helpers/log.native.js +12 -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 +7 -24
- package/dist/esm/helpers/mediaState.mjs.map +1 -1
- package/dist/esm/helpers/mediaState.native.js +9 -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 +39 -23
- package/dist/esm/helpers/mergeVariants.mjs.map +1 -1
- package/dist/esm/helpers/mergeVariants.native.js +41 -25
- package/dist/esm/helpers/mergeVariants.native.js.map +1 -1
- package/dist/esm/helpers/nativeOnlyProps.mjs +34 -33
- package/dist/esm/helpers/nativeOnlyProps.mjs.map +1 -1
- package/dist/esm/helpers/nativeOnlyProps.native.js +34 -33
- package/dist/esm/helpers/nativeOnlyProps.native.js.map +1 -1
- package/dist/esm/helpers/nativeStyleEngine.mjs +178 -0
- package/dist/esm/helpers/nativeStyleEngine.mjs.map +1 -0
- package/dist/esm/helpers/nativeStyleEngine.native.js +270 -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 +32 -42
- package/dist/esm/helpers/normalizeStyle.mjs.map +1 -1
- package/dist/esm/helpers/normalizeStyle.native.js +50 -62
- package/dist/esm/helpers/normalizeStyle.native.js.map +1 -1
- package/dist/esm/helpers/normalizeStylePropKeys.mjs +1 -0
- package/dist/esm/helpers/normalizeStylePropKeys.mjs.map +1 -1
- package/dist/esm/helpers/normalizeStylePropKeys.native.js +11 -10
- package/dist/esm/helpers/normalizeStylePropKeys.native.js.map +1 -1
- package/dist/esm/helpers/normalizeValueWithProperty.mjs +29 -21
- package/dist/esm/helpers/normalizeValueWithProperty.mjs.map +1 -1
- package/dist/esm/helpers/normalizeValueWithProperty.native.js +32 -25
- 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 +20 -20
- 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 +70 -54
- package/dist/esm/helpers/parseBorderShorthand.native.js.map +1 -1
- package/dist/esm/helpers/parseNativeStyle.native.js +166 -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 +58 -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/propMapper.mjs +325 -234
- package/dist/esm/helpers/propMapper.mjs.map +1 -1
- package/dist/esm/helpers/propMapper.native.js +462 -332
- package/dist/esm/helpers/propMapper.native.js.map +1 -1
- package/dist/esm/helpers/proxyThemeToParents.mjs +25 -30
- package/dist/esm/helpers/proxyThemeToParents.mjs.map +1 -1
- package/dist/esm/helpers/proxyThemeToParents.native.js +110 -125
- package/dist/esm/helpers/proxyThemeToParents.native.js.map +1 -1
- package/dist/esm/helpers/registerCSSVariable.mjs +84 -39
- package/dist/esm/helpers/registerCSSVariable.mjs.map +1 -1
- package/dist/esm/helpers/registerCSSVariable.native.js +103 -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 +18 -9
- package/dist/esm/helpers/resolveAnimationDriver.native.js.map +1 -1
- package/dist/esm/helpers/resolveRem.mjs +3 -2
- package/dist/esm/helpers/resolveRem.mjs.map +1 -1
- package/dist/esm/helpers/resolveRem.native.js +23 -21
- package/dist/esm/helpers/resolveRem.native.js.map +1 -1
- package/dist/esm/helpers/resolveSafeArea.mjs +101 -9
- 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/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 +18 -13
- package/dist/esm/helpers/skipProps.mjs.map +1 -1
- package/dist/esm/helpers/skipProps.native.js +18 -13
- 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/styleFrontend.mjs +6 -0
- package/dist/esm/helpers/styleFrontend.mjs.map +1 -0
- package/dist/esm/helpers/styleFrontend.native.js +8 -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/subscribeToContextGroup.mjs +64 -78
- package/dist/esm/helpers/subscribeToContextGroup.mjs.map +1 -1
- package/dist/esm/helpers/subscribeToContextGroup.native.js +105 -123
- 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 +21 -0
- package/dist/esm/helpers/themeRef.native.js.map +1 -0
- package/dist/esm/helpers/themeable.mjs +59 -71
- package/dist/esm/helpers/themeable.mjs.map +1 -1
- package/dist/esm/helpers/themeable.native.js +61 -73
- package/dist/esm/helpers/themeable.native.js.map +1 -1
- 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 +80 -0
- package/dist/esm/helpers/tokenCategories.mjs.map +1 -0
- package/dist/esm/helpers/tokenCategories.native.js +82 -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/useRenderElement.mjs +19 -19
- package/dist/esm/helpers/useRenderElement.mjs.map +1 -1
- package/dist/esm/helpers/useRenderElement.native.js +24 -24
- package/dist/esm/helpers/useRenderElement.native.js.map +1 -1
- package/dist/esm/helpers/variables.mjs +581 -0
- package/dist/esm/helpers/variables.mjs.map +1 -0
- package/dist/esm/helpers/variables.native.js +841 -0
- package/dist/esm/helpers/variables.native.js.map +1 -0
- package/dist/esm/helpers/warnOnce.mjs +14 -0
- package/dist/esm/helpers/warnOnce.mjs.map +1 -0
- package/dist/esm/helpers/warnOnce.native.js +15 -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 +32 -30
- package/dist/esm/helpers/wrapStyleTags.mjs.map +1 -1
- package/dist/esm/helpers/wrapStyleTags.native.js +1 -0
- 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 +20 -0
- package/dist/esm/hooks/useAnimationDriver.mjs.map +1 -0
- package/dist/esm/hooks/useAnimationDriver.native.js +26 -0
- package/dist/esm/hooks/useAnimationDriver.native.js.map +1 -0
- package/dist/esm/hooks/useComponentState.mjs +202 -181
- package/dist/esm/hooks/useComponentState.mjs.map +1 -1
- package/dist/esm/hooks/useComponentState.native.js +212 -191
- 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 +310 -231
- package/dist/esm/hooks/useMedia.mjs.map +1 -1
- package/dist/esm/hooks/useMedia.native.js +462 -281
- 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/useProps.mjs +78 -62
- package/dist/esm/hooks/useProps.mjs.map +1 -1
- package/dist/esm/hooks/useProps.native.js +82 -64
- package/dist/esm/hooks/useProps.native.js.map +1 -1
- 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 +324 -345
- package/dist/esm/hooks/useThemeState.mjs.map +1 -1
- package/dist/esm/hooks/useThemeState.native.js +370 -454
- package/dist/esm/hooks/useThemeState.native.js.map +1 -1
- package/dist/esm/index.js +145 -72
- package/dist/esm/index.mjs +145 -72
- package/dist/esm/index.native.js +145 -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 +37 -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 +45 -0
- package/dist/esm/internal-runtime.mjs.map +1 -0
- package/dist/esm/internal-runtime.native.js +45 -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 +26 -23
- package/dist/esm/setupReactNative.mjs.map +1 -1
- package/dist/esm/setupReactNative.native.js +27 -24
- package/dist/esm/setupReactNative.native.js.map +1 -1
- package/dist/esm/styled.mjs +156 -126
- package/dist/esm/styled.mjs.map +1 -1
- package/dist/esm/styled.native.js +164 -129
- package/dist/esm/styled.native.js.map +1 -1
- package/dist/esm/type-utils.mjs +0 -2
- package/dist/esm/type-utils.native.js +0 -2
- package/dist/esm/types.mjs +21 -0
- package/dist/esm/types.mjs.map +1 -1
- package/dist/esm/types.native.js +21 -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 +58 -49
- package/dist/esm/views/TamaguiProvider.mjs.map +1 -1
- package/dist/esm/views/TamaguiProvider.native.js +56 -50
- 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 +32 -32
- package/dist/esm/views/Text.mjs.map +1 -1
- package/dist/esm/views/Text.native.js +19 -23
- package/dist/esm/views/Text.native.js.map +1 -1
- package/dist/esm/views/Theme.mjs +123 -144
- package/dist/esm/views/Theme.mjs.map +1 -1
- package/dist/esm/views/Theme.native.js +120 -151
- package/dist/esm/views/Theme.native.js.map +1 -1
- package/dist/esm/views/ThemeDebug.mjs +64 -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/View.mjs +9 -5
- package/dist/esm/views/View.mjs.map +1 -1
- package/dist/esm/views/View.native.js +9 -5
- 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 +47 -15
- package/reset.css +1 -9
- package/src/_withNativeStyle.tsx +84 -0
- package/src/_withStableStyle.tsx +61 -43
- package/src/config.ts +26 -35
- package/src/contexts/ComponentContext.tsx +25 -8
- package/src/createComponent.tsx +482 -160
- package/src/createStyledHOC.tsx +88 -0
- package/src/createTamagui.ts +125 -78
- package/src/createTokens.ts +16 -0
- package/src/createVariable.ts +17 -2
- 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 +1405 -0
- package/src/dom/html.tsx +979 -0
- package/src/dom/htmlRuntime.native.tsx +220 -0
- package/src/dom/index.native.ts +28 -0
- package/src/dom/index.ts +16 -0
- package/src/dom/primitives.native.tsx +667 -0
- package/src/dom/standalone.ts +107 -0
- package/src/dom/standaloneHtml.ts +104 -0
- package/src/dom/styleTypes.ts +637 -0
- package/src/eventDetails.ts +85 -0
- package/src/eventHandling.native.ts +16 -16
- package/src/helpers/componentDisplayName.ts +14 -0
- package/src/helpers/createDesignSystem.ts +127 -87
- package/src/helpers/createStyledContext.tsx +87 -7
- package/src/helpers/directStyle.ts +1746 -0
- package/src/helpers/expandStyle.ts +17 -2
- package/src/helpers/extractPseudoState.ts +32 -0
- package/src/helpers/formatDiagnostic.ts +68 -0
- package/src/helpers/frontendProgram.ts +48 -0
- package/src/helpers/getCSSStylesAtomic.native.ts +1 -0
- package/src/helpers/getCSSStylesAtomic.ts +154 -95
- package/src/helpers/getDefaultProps.ts +1 -26
- package/src/helpers/getExpandedShorthands.ts +0 -17
- package/src/helpers/getSplitStyles.tsx +757 -1019
- package/src/helpers/getThemeCSSRules.ts +16 -1
- package/src/helpers/getVariantExtras.tsx +23 -8
- package/src/helpers/grammarConfig.ts +78 -0
- package/src/helpers/insertStyleRule.tsx +97 -19
- package/src/helpers/isObj.ts +8 -0
- package/src/helpers/isTamaguiComponent.tsx +2 -5
- package/src/helpers/isTamaguiElement.tsx +2 -3
- package/src/helpers/matchMedia.native.ts +16 -1
- package/src/helpers/mediaState.ts +4 -33
- package/src/helpers/mergeProps.ts +2 -32
- package/src/helpers/mergeVariants.ts +39 -17
- package/src/helpers/nativeStyleEngine.ts +291 -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 +1 -15
- package/src/helpers/normalizeValueWithProperty.ts +10 -1
- package/src/helpers/noteOnce.ts +9 -0
- package/src/helpers/{parseNativeStyle.ts → parseNativeStyle.native.ts} +50 -10
- package/src/helpers/parseNativeTransform.native.ts +35 -0
- package/src/helpers/propMapper.ts +347 -134
- package/src/helpers/registerCSSVariable.ts +80 -10
- package/src/helpers/resolveAnimationDriver.ts +16 -13
- package/src/helpers/resolveSafeArea.native.ts +90 -10
- package/src/helpers/resolveSafeArea.ts +113 -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/skipProps.ts +8 -2
- package/src/helpers/styleFrontend.ts +104 -0
- package/src/helpers/styleProvenance.ts +17 -2
- package/src/helpers/themeRef.ts +34 -0
- package/src/helpers/themeable.tsx +4 -12
- package/src/helpers/themes.ts +9 -10
- package/src/helpers/tokenCategories.ts +104 -0
- package/src/helpers/transformsToString.ts +18 -16
- package/src/helpers/variables.ts +901 -0
- package/src/helpers/warnOnce.ts +47 -0
- package/src/helpers/webPropsToSkip.native.ts +7 -8
- package/src/helpers/wrapStyleTags.tsx +3 -1
- package/src/hooks/getThemeProxied.ts +136 -101
- package/src/hooks/isOptimizedForFirstRender.native.ts +7 -0
- package/src/hooks/isOptimizedForFirstRender.ts +7 -0
- package/src/hooks/useAnimationDriver.ts +37 -0
- package/src/hooks/useComponentState.ts +99 -24
- package/src/hooks/useMedia.tsx +260 -119
- package/src/hooks/usePortalThemeState.ts +34 -0
- package/src/hooks/useProps.tsx +34 -10
- package/src/hooks/useTheme.tsx +19 -6
- package/src/hooks/useThemeState.ts +204 -129
- package/src/index.ts +32 -6
- package/src/insertFont.ts +4 -4
- package/src/interfaces/CSSColorNames.tsx +152 -149
- package/src/interfaces/RNExclusiveTypes.ts +1 -0
- package/src/interfaces/TamaguiComponentEvents.tsx +0 -1
- package/src/interfaces/TamaguiComponentPropsBaseBase.tsx +2 -4
- package/src/internal-runtime.ts +107 -0
- package/src/internalRuntimeTypes.ts +22 -0
- package/src/setupHooks.ts +9 -1
- package/src/styled.tsx +302 -175
- package/src/types.tsx +650 -471
- 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 +21 -8
- package/src/views/Text.tsx +15 -10
- package/src/views/Theme.tsx +112 -41
- package/src/views/ThemeDebug.tsx +0 -1
- package/src/views/ThemeProvider.tsx +6 -5
- package/src/views/View.tsx +16 -7
- 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.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 +54 -0
- package/types/dom/html.d.ts.map +1 -0
- package/types/dom/html.native.d.ts +63 -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 +494 -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/componentDisplayName.d.ts +5 -0
- package/types/helpers/componentDisplayName.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/defaultOffset.d.ts.map +1 -1
- package/types/helpers/directStyle.d.ts +35 -0
- package/types/helpers/directStyle.d.ts.map +1 -0
- 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/formatDiagnostic.d.ts +2 -0
- package/types/helpers/formatDiagnostic.d.ts.map +1 -0
- package/types/helpers/frontendProgram.d.ts +10 -0
- package/types/helpers/frontendProgram.d.ts.map +1 -0
- package/types/helpers/getCSSStylesAtomic.d.ts +3 -4
- package/types/helpers/getCSSStylesAtomic.d.ts.map +1 -1
- package/types/helpers/getCSSStylesAtomic.native.d.ts +6 -3
- package/types/helpers/getCSSStylesAtomic.native.d.ts.map +1 -1
- package/types/helpers/getDefaultProps.d.ts +1 -1
- package/types/helpers/getDefaultProps.d.ts.map +1 -1
- package/types/helpers/getDynamicVal.d.ts +1 -1
- package/types/helpers/getExpandedShorthands.d.ts +0 -5
- package/types/helpers/getExpandedShorthands.d.ts.map +1 -1
- package/types/helpers/getFontLanguage.d.ts.map +1 -1
- package/types/helpers/getShorthandValue.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts +5 -5
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/getThemeCSSRules.d.ts.map +1 -1
- package/types/helpers/getVariantExtras.d.ts.map +1 -1
- package/types/helpers/grammarConfig.d.ts +9 -0
- package/types/helpers/grammarConfig.d.ts.map +1 -0
- package/types/helpers/insertStyleRule.d.ts +3 -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/matchMedia.d.ts +1 -1
- package/types/helpers/matchMedia.native.d.ts.map +1 -1
- package/types/helpers/mediaState.d.ts +1 -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.map +1 -1
- package/types/helpers/nativeStyleEngine.d.ts +69 -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 +1 -1
- package/types/helpers/normalizeStyle.d.ts.map +1 -1
- package/types/helpers/normalizeStylePropKeys.native.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/{parseNativeStyle.d.ts → parseNativeStyle.native.d.ts} +1 -1
- 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/propMapper.d.ts +2 -1
- package/types/helpers/propMapper.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/resolveSafeArea.d.ts +2 -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/setElementProps.d.ts.map +1 -1
- package/types/helpers/skipProps.d.ts +3 -1
- 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/styleFrontend.d.ts +87 -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/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/themeable.d.ts +1 -1
- package/types/helpers/themeable.d.ts.map +1 -1
- package/types/helpers/themes.d.ts.map +1 -1
- package/types/helpers/tokenCategories.d.ts +5 -0
- package/types/helpers/tokenCategories.d.ts.map +1 -0
- package/types/helpers/transformsToString.d.ts.map +1 -1
- package/types/helpers/variables.d.ts +90 -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 +63 -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 +5 -4
- package/types/hooks/useComponentState.d.ts.map +1 -1
- package/types/hooks/useMedia.d.ts +13 -7
- 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/useProps.d.ts +1 -3
- package/types/hooks/useProps.d.ts.map +1 -1
- package/types/hooks/useTheme.d.ts +1 -1
- package/types/hooks/useTheme.d.ts.map +1 -1
- package/types/hooks/useThemeState.d.ts +26 -3
- package/types/hooks/useThemeState.d.ts.map +1 -1
- package/types/index.d.ts +14 -7
- package/types/index.d.ts.map +1 -1
- package/types/inject-styles.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 +1 -1
- 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 +33 -0
- package/types/internal-runtime.d.ts.map +1 -0
- package/types/internalRuntimeTypes.d.ts +16 -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/styled.d.ts +47 -12
- package/types/styled.d.ts.map +1 -1
- package/types/types.d.ts +392 -231
- 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 +16 -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/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/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/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/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/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/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/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/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/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/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/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/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/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/helpers/createMediaStyle.ts +0 -167
- package/src/helpers/getGroupPropParts.ts +0 -46
- package/src/helpers/getTokenForKey.ts +0 -236
- package/src/helpers/isActivePlatform.ts +0 -43
- package/src/helpers/isActiveTheme.ts +0 -4
- package/src/helpers/platformResolveValue.native.ts +0 -75
- package/src/helpers/platformResolveValue.ts +0 -26
- 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/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/helpers/createMediaStyle.d.ts +0 -5
- package/types/helpers/createMediaStyle.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/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/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/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/vitest.config.d.ts +0 -3
- package/vitest.config.d.ts.map +0 -1
- package/vitest.config.ts +0 -14
package/src/types.tsx
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import type { StyleObject } from '@tamagui/helpers'
|
|
2
|
+
import type { CoreStateModifierName } from '@tamagui/style-grammar/runtime'
|
|
2
3
|
import type { Properties } from 'csstype'
|
|
3
4
|
import type {
|
|
4
5
|
CSSProperties,
|
|
5
6
|
ComponentType,
|
|
6
7
|
Context,
|
|
7
|
-
ForwardRefExoticComponent,
|
|
8
|
-
ForwardRefRenderFunction,
|
|
9
8
|
FunctionComponent,
|
|
10
9
|
HTMLAttributes,
|
|
11
10
|
ProviderExoticComponent,
|
|
11
|
+
Ref as ReactRef,
|
|
12
12
|
ReactNode,
|
|
13
|
-
RefAttributes,
|
|
14
13
|
RefObject,
|
|
15
14
|
} from 'react'
|
|
16
15
|
import type {
|
|
@@ -23,6 +22,8 @@ import type {
|
|
|
23
22
|
ViewStyle,
|
|
24
23
|
} from 'react-native'
|
|
25
24
|
|
|
25
|
+
import type { NativeStyleEngineLinkHandle } from './helpers/nativeStyleEngine'
|
|
26
|
+
import type { StyleFrontend } from './helpers/styleFrontend'
|
|
26
27
|
import type { CSSColorNames } from './interfaces/CSSColorNames'
|
|
27
28
|
import type { RNOnlyProps } from './interfaces/RNExclusiveTypes'
|
|
28
29
|
|
|
@@ -52,6 +53,13 @@ export type ColorKeys =
|
|
|
52
53
|
| 'borderInlineColor'
|
|
53
54
|
| 'borderInlineStartColor'
|
|
54
55
|
| 'borderInlineEndColor'
|
|
56
|
+
// these four resolve theme colors at runtime (tokenCategories.color in
|
|
57
|
+
// @tamagui/helpers) and were missing here, so they typechecked via
|
|
58
|
+
// `(string & {})` while offering no token autocomplete at all
|
|
59
|
+
| 'borderEndColor'
|
|
60
|
+
| 'borderStartColor'
|
|
61
|
+
| 'textDecorationColor'
|
|
62
|
+
| 'caretColor'
|
|
55
63
|
|
|
56
64
|
export type SpaceKeys =
|
|
57
65
|
| 'space'
|
|
@@ -127,9 +135,13 @@ export type SpaceKeys =
|
|
|
127
135
|
| 'borderInlineStartWidth'
|
|
128
136
|
| 'borderInlineEndWidth'
|
|
129
137
|
|
|
130
|
-
export type StyledContext<
|
|
138
|
+
export type StyledContext<
|
|
139
|
+
Props extends Record<string, any> = any,
|
|
140
|
+
ConsumedKeys extends keyof Props & string = keyof Props & string,
|
|
141
|
+
> = Context<Props> & {
|
|
131
142
|
context: Context<Props>
|
|
132
143
|
props: Record<string, any> | undefined
|
|
144
|
+
propKeys?: readonly ConsumedKeys[]
|
|
133
145
|
Provider: ProviderExoticComponent<
|
|
134
146
|
Partial<Props | undefined> & {
|
|
135
147
|
children?: ReactNode
|
|
@@ -140,6 +152,14 @@ export type StyledContext<Props extends Record<string, any> = any> = Context<Pro
|
|
|
140
152
|
useStyledContext: (scope?: string) => Props
|
|
141
153
|
}
|
|
142
154
|
|
|
155
|
+
export type StyledContextOptions<
|
|
156
|
+
Props extends Record<string, any>,
|
|
157
|
+
ConsumedKeys extends keyof Props & string = keyof Props & string,
|
|
158
|
+
> = {
|
|
159
|
+
keys?: readonly ConsumedKeys[]
|
|
160
|
+
namespace?: string
|
|
161
|
+
}
|
|
162
|
+
|
|
143
163
|
export type TamaguiComponentState = {
|
|
144
164
|
unmounted: boolean | 'should-enter'
|
|
145
165
|
disabled?: boolean
|
|
@@ -263,11 +283,6 @@ export type TamaguiComponentPropsBaseBase = {
|
|
|
263
283
|
*/
|
|
264
284
|
themeShallow?: boolean
|
|
265
285
|
|
|
266
|
-
/**
|
|
267
|
-
* If true, component themes will not be applied
|
|
268
|
-
*/
|
|
269
|
-
unstyled?: boolean
|
|
270
|
-
|
|
271
286
|
/**
|
|
272
287
|
* Same as the web id property for setting a uid on an element
|
|
273
288
|
*/
|
|
@@ -300,7 +315,15 @@ export type TamaguiComponentPropsBaseBase = {
|
|
|
300
315
|
* Marks this component as a group for use in styling children based on parents named group
|
|
301
316
|
* See: https://tamagui.dev/docs/intro/props
|
|
302
317
|
*/
|
|
303
|
-
group?: GroupNames | boolean
|
|
318
|
+
group?: GroupNames | (string & {}) | boolean
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Marks this component as a query container: the shorthand for an unnamed
|
|
322
|
+
* `containerType="inline-size"` container that `@sm:`-style clauses in
|
|
323
|
+
* children measure against. Use the `containerName` / `containerType` style
|
|
324
|
+
* properties for named or full-size containers.
|
|
325
|
+
*/
|
|
326
|
+
container?: boolean
|
|
304
327
|
|
|
305
328
|
/**
|
|
306
329
|
* Works only alongside group, when children of the group are using container based sizing on native you can hide them until parent is measured.
|
|
@@ -308,10 +331,8 @@ export type TamaguiComponentPropsBaseBase = {
|
|
|
308
331
|
*/
|
|
309
332
|
untilMeasured?: 'hide' | 'show'
|
|
310
333
|
|
|
311
|
-
/**
|
|
312
|
-
|
|
313
|
-
*/
|
|
314
|
-
componentName?: string
|
|
334
|
+
/** web: forwards to the HTML name attribute. */
|
|
335
|
+
name?: string
|
|
315
336
|
|
|
316
337
|
/**
|
|
317
338
|
* Used for controlling the order of focus with keyboard or assistive device enavigation
|
|
@@ -329,6 +350,13 @@ export type TamaguiComponentPropsBaseBase = {
|
|
|
329
350
|
*/
|
|
330
351
|
disableOptimization?: boolean
|
|
331
352
|
|
|
353
|
+
/**
|
|
354
|
+
* Opt this component out of the experimental native style fast path
|
|
355
|
+
* (setNativeStyleEngine); it re-renders through React on theme/media
|
|
356
|
+
* changes like normal
|
|
357
|
+
*/
|
|
358
|
+
disableNativeStyle?: boolean
|
|
359
|
+
|
|
332
360
|
/**
|
|
333
361
|
* Forces the pseudo style state to be on
|
|
334
362
|
*/
|
|
@@ -414,7 +442,7 @@ export interface WebOnlyPressEvents {
|
|
|
414
442
|
|
|
415
443
|
export type { MediaStyleObject, StyleObject } from '@tamagui/helpers'
|
|
416
444
|
|
|
417
|
-
type FontFamilies = FontTokens
|
|
445
|
+
type FontFamilies = FontTokens
|
|
418
446
|
|
|
419
447
|
export type LanguageContextType = Partial<{
|
|
420
448
|
[key in FontFamilies]: FontLanguages | 'default'
|
|
@@ -427,12 +455,14 @@ export type FontLanguageProps = LanguageContextType & {
|
|
|
427
455
|
export type ThemeProviderProps = {
|
|
428
456
|
className?: string
|
|
429
457
|
defaultTheme: string | null | undefined
|
|
430
|
-
/** @deprecated moved to createTamagui({ settings: { disableRootThemeClass } }) */
|
|
431
|
-
disableRootThemeClass?: boolean
|
|
432
|
-
/** @deprecated moved to createTamagui({ settings: { themeClassNameOnRoot } }) */
|
|
433
|
-
themeClassNameOnRoot?: boolean
|
|
434
458
|
children?: any
|
|
435
459
|
reset?: boolean
|
|
460
|
+
/**
|
|
461
|
+
* This provider is mounted inside a page it does not own, so it must not write
|
|
462
|
+
* its theme class onto `html` or `body`. Its theme class goes on its own node
|
|
463
|
+
* instead. Set by the generated zero-runtime island entry.
|
|
464
|
+
*/
|
|
465
|
+
isSubtreeRoot?: boolean
|
|
436
466
|
}
|
|
437
467
|
|
|
438
468
|
export type ThemeState = {
|
|
@@ -474,8 +504,6 @@ export interface PxValue {
|
|
|
474
504
|
|
|
475
505
|
export type ColorScheme = 'light' | 'dark'
|
|
476
506
|
|
|
477
|
-
export type IsMediaType = boolean | 'platform' | 'theme' | 'group'
|
|
478
|
-
|
|
479
507
|
export type MaybeTamaguiComponent<A = any> = TamaguiComponent<A> | React.FC<A>
|
|
480
508
|
|
|
481
509
|
type MeasureOnSuccessCallback = (
|
|
@@ -571,8 +599,8 @@ export type TamaguiProjectInfo = {
|
|
|
571
599
|
|
|
572
600
|
export type DivAttributes = HTMLAttributes<HTMLDivElement>
|
|
573
601
|
|
|
574
|
-
export type ReactComponentWithRef<Props, Ref> =
|
|
575
|
-
Props &
|
|
602
|
+
export type ReactComponentWithRef<Props, Ref> = ComponentType<
|
|
603
|
+
Props & { ref?: ReactRef<Ref> }
|
|
576
604
|
>
|
|
577
605
|
|
|
578
606
|
// needs to be cb style for subscribeToContextGroup to be able to poke through to last state
|
|
@@ -593,6 +621,7 @@ export type ComponentContextI = {
|
|
|
593
621
|
|
|
594
622
|
export type TamaguiComponentStateRef = {
|
|
595
623
|
startedUnhydrated: boolean
|
|
624
|
+
optimizeForFirstRender?: boolean
|
|
596
625
|
|
|
597
626
|
host?: TamaguiElement
|
|
598
627
|
composedRef?: (x: TamaguiElement) => void
|
|
@@ -611,6 +640,7 @@ export type TamaguiComponentStateRef = {
|
|
|
611
640
|
// kept on its own field so the avoidReRenders wrapper (which overwrites
|
|
612
641
|
// `setStateShallow`) can capture this as its real-re-render escape hatch.
|
|
613
642
|
baseSetStateShallow?: ComponentSetStateShallow
|
|
643
|
+
themeNeedsUpdate?: () => boolean
|
|
614
644
|
useStyleListener?: UseStyleListener
|
|
615
645
|
updateStyleListener?: () => void
|
|
616
646
|
|
|
@@ -622,6 +652,10 @@ export type TamaguiComponentStateRef = {
|
|
|
622
652
|
nextState?: TamaguiComponentState
|
|
623
653
|
nextMedia?: UseMediaState
|
|
624
654
|
|
|
655
|
+
// avoidReRenders latched on first render (animationDriver derives from the
|
|
656
|
+
// per-render animatedBy prop; hooks gated on it must keep a stable count)
|
|
657
|
+
avoidReRenders?: boolean
|
|
658
|
+
|
|
625
659
|
// cleanup function for media emit listener
|
|
626
660
|
mediaEmitCleanup?: () => void
|
|
627
661
|
|
|
@@ -632,6 +666,32 @@ export type TamaguiComponentStateRef = {
|
|
|
632
666
|
focus?: boolean
|
|
633
667
|
groups?: Record<string, { hover?: boolean; press?: boolean; focus?: boolean }>
|
|
634
668
|
}
|
|
669
|
+
|
|
670
|
+
// native fast path (experimental): engine link handle for the host view,
|
|
671
|
+
// the per-render themed-style updater, its stable proxy handed to
|
|
672
|
+
// useThemeState, and the set of theme names already pushed to the engine
|
|
673
|
+
// since the last render (reset every render, so cached native state props
|
|
674
|
+
// can never outlive the props/state that produced them)
|
|
675
|
+
nativeLink?: NativeStyleEngineLinkHandle | null
|
|
676
|
+
nativeStyleUpdate?: (next: ThemeState) => boolean
|
|
677
|
+
nativeUpdateProxy?: (next: ThemeState) => boolean
|
|
678
|
+
nativePushedStates?: Set<string>
|
|
679
|
+
// the state name currently committed for this view (by the render or the
|
|
680
|
+
// last intercepted update): an update resolving to the same name is a no-op
|
|
681
|
+
nativeActiveState?: string
|
|
682
|
+
// media interception: recompute styles under the current theme when a
|
|
683
|
+
// relevant media key flips (useMedia's subscription calls this before
|
|
684
|
+
// forcing a re-render, passing that re-render as the miss fallback);
|
|
685
|
+
// recomputes coalesce per event turn via nativeMediaQueued, and
|
|
686
|
+
// nativeThemeState tracks the last theme handled natively so the recompute
|
|
687
|
+
// uses it instead of the stale render capture
|
|
688
|
+
nativeMediaUpdate?: (onMiss?: () => void) => boolean
|
|
689
|
+
nativeMediaQueued?: boolean
|
|
690
|
+
nativeThemeState?: ThemeState
|
|
691
|
+
// union of style keys pushed to the engine since link: keys present before
|
|
692
|
+
// but absent from the next push are sent as null (reset-to-default),
|
|
693
|
+
// matching what a real re-render's style diff would do
|
|
694
|
+
nativePushedKeys?: Set<string>
|
|
635
695
|
}
|
|
636
696
|
|
|
637
697
|
export type ComponentGroupEmitter = {
|
|
@@ -698,6 +758,13 @@ export type ConfigListener = (conf: TamaguiInternalConfig) => void
|
|
|
698
758
|
export type VariableVal = number | string | Variable | VariableValGeneric | PxValue
|
|
699
759
|
export type VariableColorVal = string | Variable
|
|
700
760
|
|
|
761
|
+
// values accepted by createTamagui({ variables }) and inline <Theme> props
|
|
762
|
+
export type VariableValIn = string | number | PxValue
|
|
763
|
+
|
|
764
|
+
export type GenericVariables = {
|
|
765
|
+
[key: string]: VariableValIn | { light: VariableValIn; dark: VariableValIn }
|
|
766
|
+
}
|
|
767
|
+
|
|
701
768
|
type GenericKey = string
|
|
702
769
|
|
|
703
770
|
export type CreateTokens<Val extends VariableVal = VariableVal> = Record<
|
|
@@ -843,7 +910,7 @@ export type CreateTamaguiConfig<
|
|
|
843
910
|
// Support both single driver and multi-driver config
|
|
844
911
|
// Multi-driver: { default: cssDriver, spring: motiDriver }
|
|
845
912
|
// Single: AnimationDriver<E>
|
|
846
|
-
animations:
|
|
913
|
+
animations: AnimationDriverLike<E> | AnimationsConfigObject
|
|
847
914
|
// phantom type for preserving driver keys - never set at runtime, only for type inference
|
|
848
915
|
animationDriverKeys?: AnimDriverKeys
|
|
849
916
|
settings: H
|
|
@@ -873,7 +940,7 @@ type GetLanguagePostfixes<F extends GenericFonts> = GetLanguagePostfix<keyof F>
|
|
|
873
940
|
// body_en: any
|
|
874
941
|
// }>['fonts']
|
|
875
942
|
|
|
876
|
-
type ConfProps<A, B, C, D, E, F, I> = {
|
|
943
|
+
type ConfProps<A, B, C, D, E, F, I, V = undefined> = {
|
|
877
944
|
tokens?: A
|
|
878
945
|
themes?: B
|
|
879
946
|
shorthands?: C
|
|
@@ -881,8 +948,25 @@ type ConfProps<A, B, C, D, E, F, I> = {
|
|
|
881
948
|
animations?: E
|
|
882
949
|
fonts?: F
|
|
883
950
|
settings?: I
|
|
951
|
+
variables?: V
|
|
884
952
|
}
|
|
885
953
|
|
|
954
|
+
// config-declared custom variables become keys on every base theme, so they
|
|
955
|
+
// flow into ThemeKeys/ThemeParsed and theme-value autocompletion with no separate
|
|
956
|
+
// augmentation surface
|
|
957
|
+
type VariableValInScheme<V> = V extends { light: infer L } ? L : V
|
|
958
|
+
type ThemesWithVariables<B, V> = [V] extends [undefined]
|
|
959
|
+
? B
|
|
960
|
+
: [keyof V] extends [never]
|
|
961
|
+
? B
|
|
962
|
+
: {
|
|
963
|
+
[N in keyof B]: B[N] & {
|
|
964
|
+
[K in keyof V & string]: VariableValInScheme<V[K]> extends PxValue
|
|
965
|
+
? number
|
|
966
|
+
: VariableValInScheme<V[K]>
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
|
|
886
970
|
type EmptyTokens = {
|
|
887
971
|
color: {}
|
|
888
972
|
space: {}
|
|
@@ -898,14 +982,13 @@ type EmptyFonts = {}
|
|
|
898
982
|
|
|
899
983
|
type EmptyTamaguiSettings = {
|
|
900
984
|
allowedStyleValues: false
|
|
901
|
-
autocompleteSpecificTokens: 'except-special'
|
|
902
985
|
}
|
|
903
986
|
|
|
904
987
|
// Helper to extract animation config from AnimationDriver<Config> or multi-driver object
|
|
905
988
|
type ExtractAnimationConfig<E> =
|
|
906
|
-
E extends
|
|
989
|
+
E extends AnimationDriverLike<infer Config>
|
|
907
990
|
? Config
|
|
908
|
-
: E extends { default:
|
|
991
|
+
: E extends { default: AnimationDriverLike<infer Config> }
|
|
909
992
|
? Config
|
|
910
993
|
: E extends GenericAnimations
|
|
911
994
|
? E
|
|
@@ -915,17 +998,26 @@ type ExtractAnimationConfig<E> =
|
|
|
915
998
|
// Single driver: returns 'default'
|
|
916
999
|
// Multi-driver { default: x, css: y }: returns 'default' | 'css'
|
|
917
1000
|
type ExtractAnimationDriverKeys<E> =
|
|
918
|
-
E extends
|
|
1001
|
+
E extends AnimationDriverLike<any>
|
|
919
1002
|
? 'default'
|
|
920
|
-
: E extends { default:
|
|
1003
|
+
: E extends { default: AnimationDriverLike<any> }
|
|
921
1004
|
? Extract<keyof E, string>
|
|
922
1005
|
: 'default'
|
|
923
1006
|
|
|
924
1007
|
export type InferTamaguiConfig<Conf> =
|
|
925
|
-
Conf extends ConfProps<
|
|
1008
|
+
Conf extends ConfProps<
|
|
1009
|
+
infer A,
|
|
1010
|
+
infer B,
|
|
1011
|
+
infer C,
|
|
1012
|
+
infer D,
|
|
1013
|
+
infer E,
|
|
1014
|
+
infer F,
|
|
1015
|
+
infer H,
|
|
1016
|
+
infer V
|
|
1017
|
+
>
|
|
926
1018
|
? TamaguiInternalConfig<
|
|
927
1019
|
A extends GenericTokens ? A : EmptyTokens,
|
|
928
|
-
B extends GenericThemes ? B : EmptyThemes,
|
|
1020
|
+
B extends GenericThemes ? ThemesWithVariables<B, V> : EmptyThemes,
|
|
929
1021
|
C extends GenericShorthands ? C : EmptyShorthands,
|
|
930
1022
|
D extends GenericMedia ? D : EmptyMedia,
|
|
931
1023
|
ExtractAnimationConfig<E>,
|
|
@@ -946,12 +1038,14 @@ export type GenericTamaguiConfig = CreateTamaguiConfig<
|
|
|
946
1038
|
>
|
|
947
1039
|
|
|
948
1040
|
// try and find the top level types as they can be supersets:
|
|
949
|
-
type
|
|
950
|
-
?
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
1041
|
+
export type RootThemeName<TK extends keyof Themes = keyof Themes> = TK extends string
|
|
1042
|
+
? string extends TK
|
|
1043
|
+
? never
|
|
1044
|
+
: TK extends `${string}_${string}`
|
|
1045
|
+
? never
|
|
1046
|
+
: TK
|
|
1047
|
+
: never
|
|
1048
|
+
type BaseThemeDefinitions = TamaguiConfig['themes'][RootThemeName]
|
|
955
1049
|
type GenericThemeDefinition = TamaguiConfig['themes'][keyof TamaguiConfig['themes']]
|
|
956
1050
|
export type ThemeDefinition = BaseThemeDefinitions extends never
|
|
957
1051
|
? GenericThemeDefinition
|
|
@@ -961,32 +1055,49 @@ export type ThemeParsed = {
|
|
|
961
1055
|
[key in ThemeKeys]: CoerceToVariable<ThemeDefinition[key]>
|
|
962
1056
|
}
|
|
963
1057
|
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
export type TokensParsed = {
|
|
967
|
-
[Key in keyof Required<Tokens>]: TokenPrefixed<Tokens[Key]>
|
|
1058
|
+
type InlineThemeValues = {
|
|
1059
|
+
[Key in ThemeKeys]?: VariableValIn
|
|
968
1060
|
}
|
|
969
1061
|
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
}
|
|
1062
|
+
/**
|
|
1063
|
+
* Prop names `<Theme>` owns. Every other prop it receives is read as a theme
|
|
1064
|
+
* key, so a theme key or a `createTamagui({ variables })` entry can't use one
|
|
1065
|
+
* of these names. development builds report the collision.
|
|
1066
|
+
*/
|
|
1067
|
+
export type ReservedThemePropName =
|
|
1068
|
+
| '_isRoot'
|
|
1069
|
+
| 'children'
|
|
1070
|
+
| 'className'
|
|
1071
|
+
| 'contain'
|
|
1072
|
+
| 'debug'
|
|
1073
|
+
| 'deopt'
|
|
1074
|
+
| 'disable'
|
|
1075
|
+
| 'disable-child-theme'
|
|
1076
|
+
| 'forceClassName'
|
|
1077
|
+
| 'inlineClassName'
|
|
1078
|
+
| 'inlineValues'
|
|
1079
|
+
| 'name'
|
|
1080
|
+
| 'nativeUpdate'
|
|
1081
|
+
| 'needsUpdate'
|
|
1082
|
+
| 'passThrough'
|
|
1083
|
+
| 'reset'
|
|
1084
|
+
| 'shallow'
|
|
973
1085
|
|
|
974
|
-
type
|
|
975
|
-
| string
|
|
976
|
-
| number
|
|
977
|
-
| boolean
|
|
978
|
-
? A extends `$${string | number}`
|
|
979
|
-
? A
|
|
980
|
-
: `$${A}`
|
|
981
|
-
: never
|
|
1086
|
+
export type Tokens = TamaguiConfig['tokens']
|
|
982
1087
|
|
|
983
|
-
export type
|
|
1088
|
+
export type TokensParsed = {
|
|
1089
|
+
[Key in keyof Required<Tokens>]: TokenifyRecord<NonNullable<Tokens[Key]>>
|
|
1090
|
+
}
|
|
984
1091
|
|
|
985
1092
|
export type Shorthands = TamaguiConfig['shorthands']
|
|
986
1093
|
export type Media = TamaguiConfig['media']
|
|
987
1094
|
export type Themes = TamaguiConfig['themes']
|
|
988
|
-
|
|
989
|
-
export type
|
|
1095
|
+
type BuiltInSubThemeName = 'inverse'
|
|
1096
|
+
export type ThemeName = Exclude<
|
|
1097
|
+
GetAltThemeNames<keyof Themes> | BuiltInSubThemeName,
|
|
1098
|
+
number
|
|
1099
|
+
>
|
|
1100
|
+
export type ThemeTokens = GetTokenString<ThemeKeys>
|
|
990
1101
|
// Animation names (slow, fast, bouncy) for the `transition` prop
|
|
991
1102
|
// Extract animation keys from the driver's `animations` property
|
|
992
1103
|
// The AnimationDriver<Config> has an `animations: Config` property
|
|
@@ -1032,7 +1143,6 @@ export type FontLanguages = ArrayIntersection<TamaguiConfig['fontLanguages']>
|
|
|
1032
1143
|
export interface ThemeProps {
|
|
1033
1144
|
className?: string
|
|
1034
1145
|
name?: Exclude<ThemeName, number> | null
|
|
1035
|
-
componentName?: string
|
|
1036
1146
|
children?: any
|
|
1037
1147
|
reset?: boolean
|
|
1038
1148
|
debug?: DebugProp
|
|
@@ -1049,7 +1159,19 @@ export type UseThemeWithStateProps = ThemeProps & {
|
|
|
1049
1159
|
passThrough?: boolean
|
|
1050
1160
|
disable?: boolean
|
|
1051
1161
|
needsUpdate?: () => boolean
|
|
1052
|
-
|
|
1162
|
+
/** inline theme layer: patches merged over the parent theme */
|
|
1163
|
+
inlineValues?: {
|
|
1164
|
+
values?: InlineThemeValues
|
|
1165
|
+
themes?: { [Name in ThemeName]?: InlineThemeValues }
|
|
1166
|
+
}
|
|
1167
|
+
/** the `tvar_` class carrying this layer's custom properties on web */
|
|
1168
|
+
inlineClassName?: string
|
|
1169
|
+
/**
|
|
1170
|
+
* native fast path (experimental): called on a theme update instead of
|
|
1171
|
+
* re-rendering; return true when the update was committed natively so the
|
|
1172
|
+
* re-render is skipped. never called for forced updates.
|
|
1173
|
+
*/
|
|
1174
|
+
nativeUpdate?: (next: ThemeState) => boolean
|
|
1053
1175
|
}
|
|
1054
1176
|
|
|
1055
1177
|
type ArrayIntersection<A extends any[]> = A[keyof A]
|
|
@@ -1082,8 +1204,6 @@ type AllowedStyleValuesSetting =
|
|
|
1082
1204
|
| AllowedValueSettingBase
|
|
1083
1205
|
| AllowedStyleValuesSettingPerCategory
|
|
1084
1206
|
|
|
1085
|
-
type AutocompleteSpecificTokensSetting = boolean | 'except-special'
|
|
1086
|
-
|
|
1087
1207
|
export interface GenericTamaguiSettings {
|
|
1088
1208
|
/**
|
|
1089
1209
|
* controls style semantics where React Native/Yoga and CSS differ.
|
|
@@ -1137,20 +1257,6 @@ export interface GenericTamaguiSettings {
|
|
|
1137
1257
|
*/
|
|
1138
1258
|
allowedStyleValues?: AllowedStyleValuesSetting
|
|
1139
1259
|
|
|
1140
|
-
/**
|
|
1141
|
-
* Set up if "specific tokens" ($color.name) are added to the types where
|
|
1142
|
-
* tokens are allowed. The VSCode autocomplete puts specific tokens above the
|
|
1143
|
-
* regular ones, which leads to worse DX. If true this setting removes the
|
|
1144
|
-
* specific token from types for the defined categories.
|
|
1145
|
-
*
|
|
1146
|
-
* If set to "except-special", specific tokens will autocomplete only if they
|
|
1147
|
-
* don't normally use one of the special token groups: space, size, radius,
|
|
1148
|
-
* zIndex, color.
|
|
1149
|
-
*
|
|
1150
|
-
* @default except-special
|
|
1151
|
-
*/
|
|
1152
|
-
autocompleteSpecificTokens?: AutocompleteSpecificTokensSetting
|
|
1153
|
-
|
|
1154
1260
|
/**
|
|
1155
1261
|
* On iOS, this enables a mode where Tamagui returns color values using
|
|
1156
1262
|
* `DynamicColorIOS` This is a React Native built in feature, you can read the
|
|
@@ -1171,6 +1277,27 @@ export interface GenericTamaguiSettings {
|
|
|
1171
1277
|
*/
|
|
1172
1278
|
fastSchemeChange?: boolean
|
|
1173
1279
|
|
|
1280
|
+
/**
|
|
1281
|
+
* Chooses whether Tamagui optimizes component renders for granular updates or
|
|
1282
|
+
* for the lowest first-render overhead.
|
|
1283
|
+
*
|
|
1284
|
+
* - "updates" tracks the theme and media keys each component reads so changes
|
|
1285
|
+
* only re-render consumers of those values.
|
|
1286
|
+
* - "first-render" skips per-key tracking and uses coarse theme and media
|
|
1287
|
+
* subscriptions. Theme and media changes still apply, but may re-render
|
|
1288
|
+
* every Tamagui component under the changed provider.
|
|
1289
|
+
*
|
|
1290
|
+
* This is a startup-level setting. Set it when creating the Tamagui config
|
|
1291
|
+
* and do not change it while the app is running.
|
|
1292
|
+
*
|
|
1293
|
+
* Defaults per platform: web defaults to "updates" (granular theme/media
|
|
1294
|
+
* changes matter most), native defaults to "first-render" (initial render
|
|
1295
|
+
* speed matters most, and full-tree re-renders are cheaper without the DOM).
|
|
1296
|
+
*
|
|
1297
|
+
* @default "updates" on web, "first-render" on native
|
|
1298
|
+
*/
|
|
1299
|
+
optimizeFor?: 'updates' | 'first-render'
|
|
1300
|
+
|
|
1174
1301
|
/**
|
|
1175
1302
|
* On Web, this allows changing the behavior of container groups which by
|
|
1176
1303
|
* default uses `container-type: inline-size`.
|
|
@@ -1286,11 +1413,11 @@ export type BaseStyleProps = {
|
|
|
1286
1413
|
* Animation drivers config - can be a single driver or named drivers object.
|
|
1287
1414
|
* If object, must include a 'default' key.
|
|
1288
1415
|
*/
|
|
1289
|
-
export type AnimationsConfig =
|
|
1416
|
+
export type AnimationsConfig = AnimationDriverLike<any> | AnimationsConfigObject
|
|
1290
1417
|
|
|
1291
1418
|
export type AnimationsConfigObject = {
|
|
1292
|
-
default:
|
|
1293
|
-
[key: string]:
|
|
1419
|
+
default: AnimationDriverLike<any>
|
|
1420
|
+
[key: string]: AnimationDriverLike<any>
|
|
1294
1421
|
}
|
|
1295
1422
|
|
|
1296
1423
|
export type CreateTamaguiProps = {
|
|
@@ -1315,6 +1442,15 @@ export type CreateTamaguiProps = {
|
|
|
1315
1442
|
}
|
|
1316
1443
|
}
|
|
1317
1444
|
|
|
1445
|
+
/**
|
|
1446
|
+
* Custom variables: merged into every base theme at createTamagui time, so
|
|
1447
|
+
* they resolve like theme keys everywhere (bare names in style props, useTheme(),
|
|
1448
|
+
* CSS variable emission) and can be redefined per-subtree via `<Theme>` props.
|
|
1449
|
+
* Values may reference theme keys or tokens by bare name or
|
|
1450
|
+
* be literals; per-scheme values via { light, dark }.
|
|
1451
|
+
*/
|
|
1452
|
+
variables?: GenericVariables
|
|
1453
|
+
|
|
1318
1454
|
settings?: Partial<GenericTamaguiSettings>
|
|
1319
1455
|
|
|
1320
1456
|
/**
|
|
@@ -1324,11 +1460,6 @@ export type CreateTamaguiProps = {
|
|
|
1324
1460
|
backgroundColor?: any
|
|
1325
1461
|
color?: any
|
|
1326
1462
|
}
|
|
1327
|
-
|
|
1328
|
-
defaultProps?: Record<string, any> & {
|
|
1329
|
-
Text?: TextProps
|
|
1330
|
-
View?: StackNonStyleProps & StackStyle
|
|
1331
|
-
}
|
|
1332
1463
|
}
|
|
1333
1464
|
|
|
1334
1465
|
export type GetCSS = (opts?: {
|
|
@@ -1353,7 +1484,6 @@ export type TamaguiInternalConfig<
|
|
|
1353
1484
|
Omit<CreateTamaguiConfig<A, B, C, D, E, F, G, AnimDriverKeys>, 'tokens'> & {
|
|
1354
1485
|
// TODO need to make it this but this breaks types, revisit
|
|
1355
1486
|
// animations: E //AnimationDriver<E>
|
|
1356
|
-
// with $ prefixes for fast lookups (one time cost at startup vs every render)
|
|
1357
1487
|
tokens: Tokenify<A>
|
|
1358
1488
|
tokensParsed: Tokenify<A>
|
|
1359
1489
|
themeConfig: any
|
|
@@ -1365,7 +1495,6 @@ export type TamaguiInternalConfig<
|
|
|
1365
1495
|
userShorthands: C
|
|
1366
1496
|
reactNative?: any
|
|
1367
1497
|
fontSizeTokens: Set<string>
|
|
1368
|
-
specificTokens: Record<string, Variable>
|
|
1369
1498
|
settings: Omit<GenericTamaguiSettings, keyof G> & G
|
|
1370
1499
|
defaultFont?: string
|
|
1371
1500
|
defaultFontToken: `${string}`
|
|
@@ -1404,24 +1533,8 @@ export type GenericFont<Key extends GenericFontKey = GenericFontKey> = {
|
|
|
1404
1533
|
// media
|
|
1405
1534
|
export type MediaQueryObject = { [key: string]: string | number | string }
|
|
1406
1535
|
export type MediaQueryKey = keyof Media
|
|
1407
|
-
export type MediaPropKeys = `$${MediaQueryKey}`
|
|
1408
1536
|
export type MediaQueryState = { [key in MediaQueryKey]: boolean }
|
|
1409
1537
|
|
|
1410
|
-
// guard against a loose `Themes` whose `keyof` collapses to `string` (e.g. a config
|
|
1411
|
-
// whose themes type carries a string index signature). without this, TK becomes `string`
|
|
1412
|
-
// and ThemeMediaKeys becomes `$theme-${string}`, which collapses the whole WithMediaProps
|
|
1413
|
-
// mapped type into a `[key: string]` index signature that then swallows non-style props
|
|
1414
|
-
// like onPress/children. see issue #4010
|
|
1415
|
-
export type ThemeMediaKeys<TK extends keyof Themes = keyof Themes> = TK extends string
|
|
1416
|
-
? string extends TK
|
|
1417
|
-
? never
|
|
1418
|
-
: TK extends `${string}_${string}`
|
|
1419
|
-
? never
|
|
1420
|
-
: `$theme-${TK}`
|
|
1421
|
-
: never
|
|
1422
|
-
|
|
1423
|
-
export type PlatformMediaKeys = `$platform-${AllPlatforms}`
|
|
1424
|
-
|
|
1425
1538
|
export interface TypeOverride {
|
|
1426
1539
|
groupNames(): 1
|
|
1427
1540
|
animationDrivers(): 1
|
|
@@ -1432,39 +1545,15 @@ export type GroupNames =
|
|
|
1432
1545
|
? never
|
|
1433
1546
|
: ReturnType<TypeOverride['groupNames']>
|
|
1434
1547
|
|
|
1435
|
-
type
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
| `$group-${GroupNames}`
|
|
1439
|
-
| `$group-${GroupNames}-${ParentMediaStates}`
|
|
1440
|
-
| `$group-${GroupNames}-${MediaQueryKey}`
|
|
1441
|
-
| `$group-${GroupNames}-${MediaQueryKey}-${ParentMediaStates}`
|
|
1442
|
-
| `$group-${ParentMediaStates}`
|
|
1443
|
-
| `$group-${MediaQueryKey}`
|
|
1444
|
-
| `$group-${MediaQueryKey}-${ParentMediaStates}`
|
|
1445
|
-
|
|
1446
|
-
export type WithMediaProps<A> = {
|
|
1447
|
-
[Key in
|
|
1448
|
-
| MediaPropKeys
|
|
1449
|
-
| GroupMediaKeys
|
|
1450
|
-
| ThemeMediaKeys
|
|
1451
|
-
| PlatformMediaKeys]?: Key extends MediaPropKeys
|
|
1452
|
-
? A & {
|
|
1453
|
-
// TODO we can support $theme- inside media queries here if we change to ThemeMediaKeys | PlatformMediaKeys
|
|
1454
|
-
[Key in PlatformMediaKeys]?: AddWebOnlyStyleProps<A>
|
|
1455
|
-
}
|
|
1456
|
-
: Key extends `$platform-web`
|
|
1457
|
-
? AddWebOnlyStyleProps<A> & { [Key in MediaPropKeys]?: AddWebOnlyStyleProps<A> }
|
|
1458
|
-
: A & { [Key in MediaPropKeys]?: A }
|
|
1459
|
-
}
|
|
1460
|
-
|
|
1461
|
-
export type AddWebOnlyStyleProps<A> = Partial<CSSProperties> &
|
|
1548
|
+
export type AddWebOnlyStyleProps<A> = Partial<
|
|
1549
|
+
Omit<CSSProperties, keyof WebOnlyValidStyleValues>
|
|
1550
|
+
> &
|
|
1462
1551
|
Partial<WebOnlyValidStyleValues> & {
|
|
1463
1552
|
[K in Exclude<keyof A, keyof CSSProperties>]?: A[K]
|
|
1464
1553
|
}
|
|
1465
1554
|
|
|
1466
1555
|
export type WebOnlyValidStyleValues = {
|
|
1467
|
-
position: '-webkit-sticky'
|
|
1556
|
+
position: CSSProperties['position'] | '-webkit-sticky'
|
|
1468
1557
|
}
|
|
1469
1558
|
|
|
1470
1559
|
export type MediaQueries = {
|
|
@@ -1506,18 +1595,27 @@ export type TransitionSpringConfig = {
|
|
|
1506
1595
|
speed?: number
|
|
1507
1596
|
}
|
|
1508
1597
|
|
|
1598
|
+
/**
|
|
1599
|
+
* A transition value: the name of a configured driver animation, or a raw CSS
|
|
1600
|
+
* transition string such as `200ms` or `200ms hover:400ms`. The runtime accepts
|
|
1601
|
+
* both — a name that is not a configured preset is treated as CSS — so the type
|
|
1602
|
+
* must too. `(string & {})` keeps the preset names in autocomplete instead of
|
|
1603
|
+
* collapsing the union to plain `string`.
|
|
1604
|
+
*/
|
|
1605
|
+
export type TransitionValue = TransitionKeys | (string & {})
|
|
1606
|
+
|
|
1509
1607
|
export type TransitionProp =
|
|
1510
|
-
|
|
|
1608
|
+
| TransitionValue
|
|
1511
1609
|
| ({
|
|
1512
|
-
default?:
|
|
1513
|
-
enter?:
|
|
1514
|
-
exit?:
|
|
1610
|
+
default?: TransitionValue
|
|
1611
|
+
enter?: TransitionValue
|
|
1612
|
+
exit?: TransitionValue
|
|
1515
1613
|
delay?: number
|
|
1516
1614
|
} & TransitionSpringConfig & {
|
|
1517
1615
|
[key: string]:
|
|
1518
|
-
|
|
|
1616
|
+
| TransitionValue
|
|
1519
1617
|
| {
|
|
1520
|
-
type:
|
|
1618
|
+
type: TransitionValue
|
|
1521
1619
|
[key: string]: any
|
|
1522
1620
|
}
|
|
1523
1621
|
| number
|
|
@@ -1525,16 +1623,16 @@ export type TransitionProp =
|
|
|
1525
1623
|
| undefined
|
|
1526
1624
|
})
|
|
1527
1625
|
| [
|
|
1528
|
-
|
|
1626
|
+
TransitionValue,
|
|
1529
1627
|
{
|
|
1530
1628
|
delay?: number
|
|
1531
|
-
enter?:
|
|
1532
|
-
exit?:
|
|
1629
|
+
enter?: TransitionValue
|
|
1630
|
+
exit?: TransitionValue
|
|
1533
1631
|
} & TransitionSpringConfig & {
|
|
1534
1632
|
[key: string]:
|
|
1535
|
-
|
|
|
1633
|
+
| TransitionValue
|
|
1536
1634
|
| {
|
|
1537
|
-
type?:
|
|
1635
|
+
type?: TransitionValue
|
|
1538
1636
|
[key: string]: any
|
|
1539
1637
|
}
|
|
1540
1638
|
| number
|
|
@@ -1543,6 +1641,22 @@ export type TransitionProp =
|
|
|
1543
1641
|
},
|
|
1544
1642
|
]
|
|
1545
1643
|
|
|
1644
|
+
/**
|
|
1645
|
+
* Emitted by the animation driver at the start and end of a transition.
|
|
1646
|
+
*
|
|
1647
|
+
* `cause` is `enter` when the component mounts into an AnimatePresence, `exit`
|
|
1648
|
+
* when it unmounts, and `update` for any style change while it stays mounted.
|
|
1649
|
+
* On the `end` phase, `finished` is `false` when the transition was interrupted
|
|
1650
|
+
* (e.g. an exit canceled by a re-enter, or an update superseded by another).
|
|
1651
|
+
*/
|
|
1652
|
+
export type TransitionEvent = {
|
|
1653
|
+
phase: 'start' | 'end'
|
|
1654
|
+
cause: 'enter' | 'exit' | 'update'
|
|
1655
|
+
finished?: boolean
|
|
1656
|
+
}
|
|
1657
|
+
|
|
1658
|
+
export type OnTransition = (event: TransitionEvent) => void
|
|
1659
|
+
|
|
1546
1660
|
/**
|
|
1547
1661
|
* Tokens
|
|
1548
1662
|
*/
|
|
@@ -1673,85 +1787,64 @@ export type ThemeValueFallbackZIndex =
|
|
|
1673
1787
|
WebStyleValueUniversal
|
|
1674
1788
|
>
|
|
1675
1789
|
|
|
1676
|
-
export type GetTokenString<A> = A extends
|
|
1677
|
-
? A
|
|
1678
|
-
: A extends string | number
|
|
1679
|
-
? `$${A}`
|
|
1680
|
-
: `$${string}`
|
|
1681
|
-
|
|
1682
|
-
export type SpecificTokens<
|
|
1683
|
-
Record = Tokens,
|
|
1684
|
-
RK extends keyof Record = keyof Record,
|
|
1685
|
-
> = RK extends string
|
|
1686
|
-
? `$${RK}.${keyof Record[RK] extends string | number
|
|
1687
|
-
? // remove any $ prefix so instead of $size.$sm its $size.sm
|
|
1688
|
-
keyof Record[RK] extends `$${infer X}`
|
|
1689
|
-
? X
|
|
1690
|
-
: keyof Record[RK]
|
|
1691
|
-
: never}`
|
|
1692
|
-
: never
|
|
1693
|
-
|
|
1694
|
-
// defaults to except-special
|
|
1695
|
-
export type SpecificTokensSpecial = TamaguiSettings extends {
|
|
1696
|
-
autocompleteSpecificTokens: infer Val
|
|
1697
|
-
}
|
|
1698
|
-
? Val extends 'except-special' | undefined
|
|
1699
|
-
? never
|
|
1700
|
-
: SpecificTokens
|
|
1701
|
-
: SpecificTokens
|
|
1790
|
+
export type GetTokenString<A> = A extends string | number ? `${A}` : string
|
|
1702
1791
|
|
|
1703
|
-
export type
|
|
1704
|
-
| SpecificTokensSpecial
|
|
1792
|
+
export type Size =
|
|
1705
1793
|
| ThemeValueFallbackSize
|
|
1706
1794
|
| GetTokenString<keyof Tokens['size']>
|
|
1795
|
+
| (string & {})
|
|
1796
|
+
| true
|
|
1707
1797
|
|
|
1708
|
-
export type
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1798
|
+
export type SizeTokens = Size
|
|
1799
|
+
|
|
1800
|
+
export type Space = GetTokenString<keyof Tokens['space']> | ThemeValueFallbackSpace | true
|
|
1801
|
+
|
|
1802
|
+
export type SpaceTokens = Space
|
|
1712
1803
|
|
|
1713
1804
|
// base color token strings (before opacity modifier)
|
|
1714
1805
|
type ColorTokenBase =
|
|
1715
|
-
| SpecificTokensSpecial
|
|
1716
1806
|
| GetTokenString<keyof Tokens['color']>
|
|
1717
1807
|
| GetTokenString<keyof ThemeParsed>
|
|
1718
1808
|
|
|
1719
1809
|
// keep this non-expanded. using `${ColorTokenBase}/${number}` preserves stricter
|
|
1720
1810
|
// token names, but large user token/theme unions hit TS2590.
|
|
1721
|
-
type TokenWithOpacity =
|
|
1811
|
+
type TokenWithOpacity = `${string}/${number}`
|
|
1722
1812
|
|
|
1723
|
-
export type
|
|
1813
|
+
export type Color =
|
|
1724
1814
|
| ColorTokenBase
|
|
1725
1815
|
| CSSColorNames
|
|
1726
|
-
// opacity modifier:
|
|
1816
|
+
// opacity modifier: token/50
|
|
1727
1817
|
| TokenWithOpacity
|
|
1818
|
+
// clause-bearing values are intentionally open-ended; the language service
|
|
1819
|
+
// validates the grammar without materializing a combinatorial type union
|
|
1820
|
+
| (string & {})
|
|
1821
|
+
|
|
1822
|
+
export type ColorTokens = Color
|
|
1728
1823
|
|
|
1729
|
-
export type
|
|
1730
|
-
| SpecificTokensSpecial
|
|
1824
|
+
export type ZIndex =
|
|
1731
1825
|
| GetTokenString<keyof Tokens['zIndex']>
|
|
1732
1826
|
| ThemeValueFallbackZIndex
|
|
1733
1827
|
| number
|
|
1828
|
+
| true
|
|
1829
|
+
|
|
1830
|
+
export type ZIndexTokens = ZIndex
|
|
1734
1831
|
|
|
1735
|
-
export type
|
|
1736
|
-
| SpecificTokensSpecial
|
|
1832
|
+
export type Radius =
|
|
1737
1833
|
| GetTokenString<keyof Tokens['radius']>
|
|
1738
1834
|
| ThemeValueFallbackRadius
|
|
1739
1835
|
| number
|
|
1740
1836
|
| RemString
|
|
1837
|
+
| true
|
|
1741
1838
|
|
|
1742
|
-
export type
|
|
1839
|
+
export type RadiusTokens = Radius
|
|
1840
|
+
|
|
1841
|
+
export type Token =
|
|
1743
1842
|
| GetTokenString<keyof Tokens['radius']>
|
|
1744
1843
|
| GetTokenString<keyof Tokens['zIndex']>
|
|
1745
1844
|
| GetTokenString<keyof Tokens['color']>
|
|
1746
1845
|
| GetTokenString<keyof Tokens['space']>
|
|
1747
1846
|
| GetTokenString<keyof Tokens['size']>
|
|
1748
1847
|
|
|
1749
|
-
export type Token =
|
|
1750
|
-
| NonSpecificTokens
|
|
1751
|
-
| (TamaguiSettings extends { autocompleteSpecificTokens: false }
|
|
1752
|
-
? never
|
|
1753
|
-
: SpecificTokens)
|
|
1754
|
-
|
|
1755
1848
|
export type ColorStyleProp = ThemeValueFallbackColor | ColorTokens
|
|
1756
1849
|
|
|
1757
1850
|
// fonts
|
|
@@ -1777,47 +1870,52 @@ export type GetTokenFontKeysFor<
|
|
|
1777
1870
|
|
|
1778
1871
|
export type FontTokens = GetTokenString<keyof TamaguiConfig['fonts']>
|
|
1779
1872
|
export type FontFamilyTokens = GetTokenString<GetTokenFontKeysFor<'family'>>
|
|
1780
|
-
export type
|
|
1873
|
+
export type FontSize =
|
|
1781
1874
|
| GetTokenString<GetTokenFontKeysFor<'size'>>
|
|
1782
1875
|
| number
|
|
1783
1876
|
| RemString
|
|
1877
|
+
| true
|
|
1878
|
+
|
|
1879
|
+
export type FontSizeTokens = FontSize
|
|
1784
1880
|
export type FontLineHeightTokens =
|
|
1785
|
-
|
|
|
1881
|
+
| GetTokenString<GetTokenFontKeysFor<'lineHeight'>>
|
|
1786
1882
|
| number
|
|
1787
1883
|
| RemString
|
|
1788
1884
|
export type FontWeightValues =
|
|
1789
1885
|
| `${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}00`
|
|
1790
1886
|
| 'bold'
|
|
1791
1887
|
| 'normal'
|
|
1792
|
-
export type FontWeightTokens =
|
|
1888
|
+
export type FontWeightTokens =
|
|
1889
|
+
| GetTokenString<GetTokenFontKeysFor<'weight'>>
|
|
1890
|
+
| FontWeightValues
|
|
1793
1891
|
// font color tokens also support the opacity modifier
|
|
1794
|
-
type FontColorTokenBase =
|
|
1892
|
+
type FontColorTokenBase = GetTokenString<GetTokenFontKeysFor<'color'>>
|
|
1795
1893
|
export type FontColorTokens = FontColorTokenBase | number | TokenWithOpacity
|
|
1796
1894
|
export type FontLetterSpacingTokens =
|
|
1797
|
-
|
|
|
1895
|
+
| GetTokenString<GetTokenFontKeysFor<'letterSpacing'>>
|
|
1798
1896
|
| number
|
|
1799
1897
|
| RemString
|
|
1800
1898
|
export type FontStyleTokens =
|
|
1801
|
-
|
|
|
1899
|
+
| GetTokenString<GetTokenFontKeysFor<'style'>>
|
|
1802
1900
|
| RNTextStyle['fontStyle']
|
|
1803
1901
|
export type FontTransformTokens =
|
|
1804
|
-
|
|
|
1902
|
+
| GetTokenString<GetTokenFontKeysFor<'transform'>>
|
|
1805
1903
|
| RNTextStyle['textTransform']
|
|
1806
1904
|
|
|
1807
1905
|
export type ParseFont<A extends GenericFont> = {
|
|
1808
|
-
size:
|
|
1809
|
-
lineHeight:
|
|
1810
|
-
letterSpacing:
|
|
1811
|
-
weight:
|
|
1812
|
-
family:
|
|
1813
|
-
style:
|
|
1814
|
-
transform:
|
|
1815
|
-
color:
|
|
1816
|
-
face:
|
|
1906
|
+
size: TokenifyRecord<A['size']>
|
|
1907
|
+
lineHeight: TokenParsedIfExists<A['lineHeight']>
|
|
1908
|
+
letterSpacing: TokenParsedIfExists<A['letterSpacing']>
|
|
1909
|
+
weight: TokenParsedIfExists<A['weight']>
|
|
1910
|
+
family: TokenParsedIfExists<A['family']>
|
|
1911
|
+
style: TokenParsedIfExists<A['style']>
|
|
1912
|
+
transform: TokenParsedIfExists<A['transform']>
|
|
1913
|
+
color: TokenParsedIfExists<A['color']>
|
|
1914
|
+
face: TokenParsedIfExists<A['face']>
|
|
1817
1915
|
}
|
|
1818
1916
|
|
|
1819
|
-
export type
|
|
1820
|
-
A extends Record<string, any> ?
|
|
1917
|
+
export type TokenParsedIfExists<A> =
|
|
1918
|
+
A extends Record<string, any> ? TokenifyRecord<A> : {}
|
|
1821
1919
|
|
|
1822
1920
|
//
|
|
1823
1921
|
// adds theme short values to relevant props
|
|
@@ -1883,17 +1981,12 @@ export type ThemeValueGet<K extends string | number | symbol> = K extends 'theme
|
|
|
1883
1981
|
: K extends FontLetterSpacingKeys
|
|
1884
1982
|
? FontLetterSpacingTokens
|
|
1885
1983
|
: K extends OpacityKeys
|
|
1886
|
-
?
|
|
1984
|
+
? ThemeValueFallback
|
|
1887
1985
|
: never
|
|
1888
1986
|
|
|
1889
1987
|
export type GetThemeValueForKey<K extends string | symbol | number> =
|
|
1890
1988
|
| ThemeValueGet<K>
|
|
1891
1989
|
| ThemeValueFallback
|
|
1892
|
-
| (TamaguiSettings extends { autocompleteSpecificTokens: infer Val }
|
|
1893
|
-
? Val extends true | undefined
|
|
1894
|
-
? SpecificTokens
|
|
1895
|
-
: never
|
|
1896
|
-
: never)
|
|
1897
1990
|
|
|
1898
1991
|
// keys that accept the first-class "safe" value (-> env(safe-area-inset-*) on
|
|
1899
1992
|
// web, numeric insets on native). must mirror propEdges in resolveSafeArea.ts.
|
|
@@ -1937,13 +2030,37 @@ export type SafeAreaValueKeys =
|
|
|
1937
2030
|
| 'start'
|
|
1938
2031
|
| 'end'
|
|
1939
2032
|
|
|
2033
|
+
/**
|
|
2034
|
+
* Flat values: every style prop accepts a clause-bearing string
|
|
2035
|
+
* (`bg="red hover:blue"`, `p="4 sm:6"`). `(string & {})` admits the broad
|
|
2036
|
+
* string without collapsing the token/literal unions, so autocomplete
|
|
2037
|
+
* survives (design record, "Types and editor tooling"). Candidate and
|
|
2038
|
+
* modifier validation is the compiler's and language service's job.
|
|
2039
|
+
*/
|
|
2040
|
+
type ClauseModifierName =
|
|
2041
|
+
| (MediaQueryKey & string)
|
|
2042
|
+
| RootThemeName
|
|
2043
|
+
| CoreStateModifierName
|
|
2044
|
+
| `group-${CoreStateModifierName}`
|
|
2045
|
+
| AllPlatforms
|
|
2046
|
+
|
|
2047
|
+
/**
|
|
2048
|
+
* Keep type-provided clause completion to the first modifier prefix. Adding
|
|
2049
|
+
* base values, payloads, or another modifier creates large unions throughout
|
|
2050
|
+
* the component prop graph and makes tsserver rebuild them after every edit.
|
|
2051
|
+
* The language-service plugin owns completion after the first prefix.
|
|
2052
|
+
*/
|
|
2053
|
+
type FlatClausePrefix = `${ClauseModifierName}:`
|
|
2054
|
+
|
|
2055
|
+
export type FlatStyleValue<T> = T | FlatClausePrefix | (string & {})
|
|
2056
|
+
|
|
1940
2057
|
export type WithThemeValues<T extends object> = {
|
|
1941
2058
|
[K in keyof T]:
|
|
1942
2059
|
| (ThemeValueGet<K> extends never
|
|
1943
2060
|
? K extends keyof ExtraBaseProps
|
|
1944
2061
|
? T[K]
|
|
1945
|
-
: T[K] | 'unset'
|
|
1946
|
-
: GetThemeValueForKey<K> | Exclude<T[K], string> | 'unset')
|
|
2062
|
+
: FlatStyleValue<T[K] | 'unset'>
|
|
2063
|
+
: FlatStyleValue<GetThemeValueForKey<K> | Exclude<T[K], string> | 'unset'>)
|
|
1947
2064
|
| (K extends SafeAreaValueKeys ? 'safe' : never)
|
|
1948
2065
|
}
|
|
1949
2066
|
|
|
@@ -1974,46 +2091,6 @@ export type WithShorthands<StyleProps> = {
|
|
|
1974
2091
|
: undefined
|
|
1975
2092
|
}
|
|
1976
2093
|
|
|
1977
|
-
// adds pseudo props
|
|
1978
|
-
// PseudoStyleWithTransition allows transition inside pseudo-style props for enter/exit timing
|
|
1979
|
-
export type PseudoStyleWithTransition<A> = A & { transition?: TransitionProp | null }
|
|
1980
|
-
|
|
1981
|
-
export type WithPseudoProps<A> = {
|
|
1982
|
-
hoverStyle?: PseudoStyleWithTransition<A> | null
|
|
1983
|
-
pressStyle?: PseudoStyleWithTransition<A> | null
|
|
1984
|
-
focusStyle?: PseudoStyleWithTransition<A> | null
|
|
1985
|
-
focusWithinStyle?: PseudoStyleWithTransition<A> | null
|
|
1986
|
-
focusVisibleStyle?: PseudoStyleWithTransition<A> | null
|
|
1987
|
-
disabledStyle?: PseudoStyleWithTransition<A> | null
|
|
1988
|
-
exitStyle?: PseudoStyleWithTransition<A> | null
|
|
1989
|
-
enterStyle?: PseudoStyleWithTransition<A> | null
|
|
1990
|
-
}
|
|
1991
|
-
|
|
1992
|
-
// type for transitions extracted from pseudo-style props (e.g., hoverStyle.transition)
|
|
1993
|
-
// includes $group-*-hover, $group-*-press, $group-*-focus patterns
|
|
1994
|
-
export type PseudoTransitions = Partial<
|
|
1995
|
-
Record<keyof WithPseudoProps<any>, TransitionProp | null>
|
|
1996
|
-
> & {
|
|
1997
|
-
// allow $group-{name}-{pseudo} keys dynamically
|
|
1998
|
-
[key: `$group-${string}-${'hover' | 'press' | 'focus'}`]:
|
|
1999
|
-
| TransitionProp
|
|
2000
|
-
| null
|
|
2001
|
-
| undefined
|
|
2002
|
-
}
|
|
2003
|
-
|
|
2004
|
-
export type PseudoPropKeys = keyof WithPseudoProps<any>
|
|
2005
|
-
|
|
2006
|
-
export type PseudoStyles = {
|
|
2007
|
-
hoverStyle?: ViewStyle
|
|
2008
|
-
pressStyle?: ViewStyle
|
|
2009
|
-
focusStyle?: ViewStyle
|
|
2010
|
-
focusWithinStyle?: ViewStyle
|
|
2011
|
-
focusVisibleStyle?: ViewStyle
|
|
2012
|
-
disabledStyle?: ViewStyle
|
|
2013
|
-
enterStyle?: ViewStyle
|
|
2014
|
-
exitStyle?: ViewStyle
|
|
2015
|
-
}
|
|
2016
|
-
|
|
2017
2094
|
export type AllPlatforms =
|
|
2018
2095
|
| 'web'
|
|
2019
2096
|
| 'native'
|
|
@@ -2041,24 +2118,6 @@ export type WithThemeAndShorthands<
|
|
|
2041
2118
|
WithShorthands<WithThemeValues<A>>
|
|
2042
2119
|
: WithThemeValues<MaybeOmitLonghands<A>> & Variants & WithShorthands<WithThemeValues<A>>
|
|
2043
2120
|
|
|
2044
|
-
//
|
|
2045
|
-
// combines all of theme, shorthands, pseudos...
|
|
2046
|
-
//
|
|
2047
|
-
export type WithThemeShorthandsAndPseudos<
|
|
2048
|
-
A extends object,
|
|
2049
|
-
Variants = {},
|
|
2050
|
-
> = WithThemeAndShorthands<A, Variants> &
|
|
2051
|
-
WithPseudoProps<WithThemeAndShorthands<A, Variants>>
|
|
2052
|
-
|
|
2053
|
-
//
|
|
2054
|
-
// ... media queries and animations
|
|
2055
|
-
//
|
|
2056
|
-
export type WithThemeShorthandsPseudosMedia<
|
|
2057
|
-
A extends object,
|
|
2058
|
-
Variants = {},
|
|
2059
|
-
> = WithThemeShorthandsAndPseudos<A, Variants> &
|
|
2060
|
-
WithMediaProps<WithThemeShorthandsAndPseudos<A, Variants>>
|
|
2061
|
-
|
|
2062
2121
|
/**
|
|
2063
2122
|
* Base style-only props (no media, pseudo):
|
|
2064
2123
|
*/
|
|
@@ -2098,14 +2157,14 @@ type BoxShadowPreset =
|
|
|
2098
2157
|
| '0 0' // offset only
|
|
2099
2158
|
| '0 1px 2px' // offset + blur
|
|
2100
2159
|
| '0 1px 2px 0' // offset + blur + spread
|
|
2101
|
-
| '0 1px 2px
|
|
2102
|
-
| '0 1px 3px 0
|
|
2103
|
-
| '0 4px 6px -1px
|
|
2104
|
-
| 'inset 0 2px 4px
|
|
2160
|
+
| '0 1px 2px shadow-color' // offset + blur + color token
|
|
2161
|
+
| '0 1px 3px 0 shadow-color' // offset + blur + spread + color token
|
|
2162
|
+
| '0 4px 6px -1px shadow-color' // negative spread
|
|
2163
|
+
| 'inset 0 2px 4px shadow-color' // inset
|
|
2105
2164
|
| 'none'
|
|
2106
2165
|
|
|
2107
|
-
// Box Shadow - CSS string format (e.g. "0 4px 8px
|
|
2108
|
-
// Supports embedded
|
|
2166
|
+
// Box Shadow - CSS string format (e.g. "0 4px 8px shadow-color")
|
|
2167
|
+
// Supports embedded bare tokens that get resolved at runtime
|
|
2109
2168
|
export type BoxShadowValue = BoxShadowPreset | (string & {})
|
|
2110
2169
|
|
|
2111
2170
|
// filter presets - one example per function for autocomplete hints
|
|
@@ -2113,7 +2172,7 @@ type FilterPreset =
|
|
|
2113
2172
|
| 'blur(4px)'
|
|
2114
2173
|
| 'brightness(1.2)'
|
|
2115
2174
|
| 'contrast(1.2)'
|
|
2116
|
-
| 'drop-shadow(0 4px 8px
|
|
2175
|
+
| 'drop-shadow(0 4px 8px shadow-color)'
|
|
2117
2176
|
| 'grayscale(1)'
|
|
2118
2177
|
| 'hue-rotate(90deg)'
|
|
2119
2178
|
| 'invert(1)'
|
|
@@ -2123,18 +2182,18 @@ type FilterPreset =
|
|
|
2123
2182
|
| 'none'
|
|
2124
2183
|
|
|
2125
2184
|
// Filter - CSS string format (e.g. "blur(10px) brightness(1.2)")
|
|
2126
|
-
// Supports embedded
|
|
2185
|
+
// Supports embedded bare tokens that get resolved at runtime
|
|
2127
2186
|
export type FilterValue = FilterPreset | (string & {})
|
|
2128
2187
|
|
|
2129
2188
|
// border shorthand presets - examples for autocomplete hints
|
|
2130
2189
|
type BorderPreset =
|
|
2131
2190
|
| '1px solid' // width + style
|
|
2132
|
-
| '1px solid
|
|
2133
|
-
| '2px dashed
|
|
2191
|
+
| '1px solid border-color' // width + style + color token
|
|
2192
|
+
| '2px dashed border-color' // width + style + color
|
|
2134
2193
|
| '1px dotted red' // width + style + color
|
|
2135
2194
|
| 'none'
|
|
2136
2195
|
|
|
2137
|
-
// Border - CSS shorthand string format (e.g. "1px solid
|
|
2196
|
+
// Border - CSS shorthand string format (e.g. "1px solid border-color")
|
|
2138
2197
|
// Expands to borderWidth, borderStyle, borderColor on web and native
|
|
2139
2198
|
// Note: on native, only supports a single border (all sides)
|
|
2140
2199
|
export type BorderValue = BorderPreset | (string & {})
|
|
@@ -2142,16 +2201,20 @@ export type BorderValue = BorderPreset | (string & {})
|
|
|
2142
2201
|
// outline shorthand presets - examples for autocomplete hints
|
|
2143
2202
|
type OutlinePreset =
|
|
2144
2203
|
| '1px solid' // width + style
|
|
2145
|
-
| '1px solid
|
|
2146
|
-
| '2px dashed
|
|
2204
|
+
| '1px solid outline-color' // width + style + color token
|
|
2205
|
+
| '2px dashed outline-color' // width + style + color
|
|
2147
2206
|
| '1px dotted red' // width + style + color
|
|
2148
2207
|
| 'none'
|
|
2149
2208
|
|
|
2150
|
-
// Outline - CSS shorthand string format (e.g. "2px solid
|
|
2209
|
+
// Outline - CSS shorthand string format (e.g. "2px solid outline-color")
|
|
2151
2210
|
// Expands to outlineWidth, outlineStyle, outlineColor on native
|
|
2152
2211
|
export type OutlineValue = OutlinePreset | (string & {})
|
|
2153
2212
|
|
|
2154
2213
|
interface ExtraStyleProps {
|
|
2214
|
+
/**
|
|
2215
|
+
* Text color, or a web-scoped color clause on a View.
|
|
2216
|
+
*/
|
|
2217
|
+
color?: ColorStyleProp
|
|
2155
2218
|
/**
|
|
2156
2219
|
* Controls the curve style of rounded corners.
|
|
2157
2220
|
* - 'circular': Standard circular arc corners (default)
|
|
@@ -2185,7 +2248,7 @@ interface ExtraStyleProps {
|
|
|
2185
2248
|
*/
|
|
2186
2249
|
outlineWidth?: SpaceValue
|
|
2187
2250
|
/**
|
|
2188
|
-
* CSS outline shorthand string. Supports tokens: "2px solid
|
|
2251
|
+
* CSS outline shorthand string. Supports tokens: "2px solid outline-color"
|
|
2189
2252
|
* Expands to outlineWidth, outlineStyle, outlineColor on native.
|
|
2190
2253
|
* Works on web and native.
|
|
2191
2254
|
*/
|
|
@@ -2199,9 +2262,17 @@ interface ExtraStyleProps {
|
|
|
2199
2262
|
*/
|
|
2200
2263
|
backdropFilter?: Properties['backdropFilter']
|
|
2201
2264
|
/**
|
|
2202
|
-
*
|
|
2265
|
+
* Works on web and native. Native lowers a single color value to
|
|
2266
|
+
* backgroundColor and drops url()/gradient/multi-part values it can't express.
|
|
2267
|
+
*
|
|
2268
|
+
* The v6 shorthands map `bg` here rather than to `backgroundColor`, because
|
|
2269
|
+
* the background family splits a value like `url(x.png) color1` across
|
|
2270
|
+
* backgroundImage and backgroundColor. Color tokens lead the union so `bg`
|
|
2271
|
+
* completes them; `Properties['background']` keeps the CSS shorthand
|
|
2272
|
+
* keywords. Adding this key to `ColorKeys` instead would erase that second
|
|
2273
|
+
* arm, since that path runs the value type through `Exclude<T[K], string>`.
|
|
2203
2274
|
*/
|
|
2204
|
-
background?: Properties['background']
|
|
2275
|
+
background?: ColorTokens | Properties['background']
|
|
2205
2276
|
/**
|
|
2206
2277
|
* Web-only style property. Will be omitted on native.
|
|
2207
2278
|
*/
|
|
@@ -2224,16 +2295,40 @@ interface ExtraStyleProps {
|
|
|
2224
2295
|
backgroundSize?: Properties['backgroundSize']
|
|
2225
2296
|
// boxSizing - provided by RN's ViewStyle
|
|
2226
2297
|
/**
|
|
2227
|
-
* CSS box-shadow string. Supports tokens: "0 4px 8px
|
|
2298
|
+
* CSS box-shadow string. Supports tokens: "0 4px 8px shadow-color"
|
|
2228
2299
|
* Works on web and native (RN 0.76+).
|
|
2229
2300
|
*/
|
|
2230
2301
|
boxShadow?: BoxShadowValue
|
|
2231
2302
|
/**
|
|
2232
|
-
* CSS border shorthand string. Supports tokens: "1px solid
|
|
2303
|
+
* CSS border shorthand string. Supports tokens: "1px solid border-color"
|
|
2233
2304
|
* Expands to borderWidth, borderStyle, borderColor.
|
|
2234
2305
|
* Works on web and native. On native, applies to all sides.
|
|
2235
2306
|
*/
|
|
2236
2307
|
border?: BorderValue
|
|
2308
|
+
/**
|
|
2309
|
+
* CSS logical border shorthand string, like `border` for the block axis.
|
|
2310
|
+
* Splits to the CSS logical longhands on web; native has no logical border
|
|
2311
|
+
* properties, so it is diagnosed and dropped there rather than approximated.
|
|
2312
|
+
*/
|
|
2313
|
+
borderBlock?: BorderValue
|
|
2314
|
+
/**
|
|
2315
|
+
* CSS logical border shorthand string, like `border` for the inline axis.
|
|
2316
|
+
* Splits to the CSS logical longhands on web; native has no logical border
|
|
2317
|
+
* properties, so it is diagnosed and dropped there rather than approximated.
|
|
2318
|
+
*/
|
|
2319
|
+
borderInline?: BorderValue
|
|
2320
|
+
/**
|
|
2321
|
+
* Web-only style property. Will be omitted on native.
|
|
2322
|
+
*/
|
|
2323
|
+
overflowWrap?: Properties['overflowWrap']
|
|
2324
|
+
/**
|
|
2325
|
+
* Web-only legacy alias of overflowWrap. Will be omitted on native.
|
|
2326
|
+
*/
|
|
2327
|
+
wordWrap?: Properties['wordWrap']
|
|
2328
|
+
/**
|
|
2329
|
+
* Web-only style property. Will be omitted on native.
|
|
2330
|
+
*/
|
|
2331
|
+
resize?: Properties['resize']
|
|
2237
2332
|
/**
|
|
2238
2333
|
* Web-only style property. Will be omitted on native.
|
|
2239
2334
|
*/
|
|
@@ -2242,6 +2337,14 @@ interface ExtraStyleProps {
|
|
|
2242
2337
|
* Web-only style property. Will be omitted on native.
|
|
2243
2338
|
*/
|
|
2244
2339
|
overflowY?: Properties['overflowY']
|
|
2340
|
+
/**
|
|
2341
|
+
* Web-only text wrapping strategy. Will be omitted on native.
|
|
2342
|
+
*/
|
|
2343
|
+
textWrap?: Properties['textWrap']
|
|
2344
|
+
/**
|
|
2345
|
+
* Web visibility. Native lowers hidden visibility to opacity and pointer events.
|
|
2346
|
+
*/
|
|
2347
|
+
visibility?: Properties['visibility']
|
|
2245
2348
|
|
|
2246
2349
|
pointerEvents?: ViewProps['pointerEvents']
|
|
2247
2350
|
|
|
@@ -2309,10 +2412,6 @@ interface ExtraStyleProps {
|
|
|
2309
2412
|
* Web-only style property. Will be omitted on native.
|
|
2310
2413
|
*/
|
|
2311
2414
|
float?: Properties['float']
|
|
2312
|
-
/**
|
|
2313
|
-
* Web-only style property. Will be omitted on native.
|
|
2314
|
-
*/
|
|
2315
|
-
content?: Properties['content']
|
|
2316
2415
|
/**
|
|
2317
2416
|
* Web-only style property. Will be omitted on native.
|
|
2318
2417
|
*/
|
|
@@ -2426,6 +2525,12 @@ interface ExtraStyleProps {
|
|
|
2426
2525
|
* Web-only style property. Will be omitted on native.
|
|
2427
2526
|
*/
|
|
2428
2527
|
containerType?: Properties['containerType']
|
|
2528
|
+
/**
|
|
2529
|
+
* Names this element as a query container for `@sm/name:`-style clauses.
|
|
2530
|
+
* Lowers to CSS `container-name` on web; on native it configures the
|
|
2531
|
+
* container context instead of emitting a style.
|
|
2532
|
+
*/
|
|
2533
|
+
containerName?: string
|
|
2429
2534
|
/**
|
|
2430
2535
|
* Web-only style property. Will be omitted on native.
|
|
2431
2536
|
*/
|
|
@@ -2529,6 +2634,12 @@ interface ExtraBaseProps {
|
|
|
2529
2634
|
*/
|
|
2530
2635
|
animatePresence?: boolean
|
|
2531
2636
|
|
|
2637
|
+
/**
|
|
2638
|
+
* Called by the animation driver at the start and end of each transition
|
|
2639
|
+
* (enter, exit, or an in-place style update). See `TransitionEvent`.
|
|
2640
|
+
*/
|
|
2641
|
+
onTransition?: OnTransition
|
|
2642
|
+
|
|
2532
2643
|
/**
|
|
2533
2644
|
* Avoids as much work as possible and passes through the children with no changes.
|
|
2534
2645
|
* Advanced: Useful for adapting to other element when you want to avoid re-parenting.
|
|
@@ -2560,14 +2671,24 @@ export interface TextStylePropsBase
|
|
|
2560
2671
|
whiteSpace?: Properties['whiteSpace']
|
|
2561
2672
|
wordWrap?: Properties['wordWrap']
|
|
2562
2673
|
/**
|
|
2563
|
-
* CSS text-shadow string. Supports tokens: "2px 2px 4px
|
|
2674
|
+
* CSS text-shadow string. Supports tokens: "2px 2px 4px shadow-color"
|
|
2564
2675
|
* On native, only a single shadow is supported.
|
|
2565
2676
|
*/
|
|
2566
2677
|
textShadow?: string
|
|
2678
|
+
/**
|
|
2679
|
+
* CSS text-decoration shorthand string ("underline dotted red").
|
|
2680
|
+
* Splits to line/style/color; on native the three RN longhand props.
|
|
2681
|
+
*/
|
|
2682
|
+
textDecoration?: string
|
|
2683
|
+
/**
|
|
2684
|
+
* CSS font shorthand string ("italic bold 16px/1.5 Inter").
|
|
2685
|
+
* Splits by the CSS micro-syntax; ambiguous forms stay unparsed.
|
|
2686
|
+
*/
|
|
2687
|
+
font?: string
|
|
2567
2688
|
}
|
|
2568
2689
|
|
|
2569
2690
|
//
|
|
2570
|
-
//
|
|
2691
|
+
// View
|
|
2571
2692
|
//
|
|
2572
2693
|
|
|
2573
2694
|
type LooseCombinedObjects<A extends object, B extends object> = A | B | (A & B)
|
|
@@ -2582,7 +2703,6 @@ type LooseCombinedObjects<A extends object, B extends object> = A | B | (A & B)
|
|
|
2582
2703
|
// - accessibilityViewIsModal → aria-modal
|
|
2583
2704
|
// - accessibilityLiveRegion → aria-live
|
|
2584
2705
|
// - accessible → tabIndex={0}
|
|
2585
|
-
// - focusable → tabIndex
|
|
2586
2706
|
// - nativeID → id
|
|
2587
2707
|
|
|
2588
2708
|
export interface StackNonStyleProps
|
|
@@ -2612,7 +2732,7 @@ export interface StackNonStyleProps
|
|
|
2612
2732
|
style?: StyleProp<LooseCombinedObjects<React.CSSProperties, ViewStyle>>
|
|
2613
2733
|
}
|
|
2614
2734
|
|
|
2615
|
-
export type StackStyle =
|
|
2735
|
+
export type StackStyle = WithThemeAndShorthands<StackStyleBase>
|
|
2616
2736
|
|
|
2617
2737
|
//
|
|
2618
2738
|
// Text props
|
|
@@ -2628,6 +2748,9 @@ export interface TextNonStyleProps
|
|
|
2628
2748
|
| RNOnlyProps
|
|
2629
2749
|
| keyof ExtendBaseTextProps
|
|
2630
2750
|
| 'style'
|
|
2751
|
+
// web-standard `userSelect` is the one authoring name; core maps it to
|
|
2752
|
+
// RN's `selectable` prop on native
|
|
2753
|
+
| 'selectable'
|
|
2631
2754
|
>,
|
|
2632
2755
|
ExtendBaseTextProps,
|
|
2633
2756
|
TamaguiComponentPropsBase {
|
|
@@ -2635,55 +2758,34 @@ export interface TextNonStyleProps
|
|
|
2635
2758
|
style?: StyleProp<LooseCombinedObjects<React.CSSProperties, RNTextStyle>>
|
|
2636
2759
|
}
|
|
2637
2760
|
|
|
2638
|
-
export type TextStyle =
|
|
2761
|
+
export type TextStyle = WithThemeAndShorthands<TextStylePropsBase>
|
|
2639
2762
|
|
|
2640
2763
|
export type TextProps = TextNonStyleProps & TextStyle
|
|
2641
2764
|
|
|
2642
2765
|
export interface ThemeableProps {
|
|
2643
2766
|
theme?: ThemeName | null
|
|
2644
2767
|
themeReset?: boolean
|
|
2645
|
-
componentName?: string
|
|
2646
2768
|
debug?: DebugProp
|
|
2647
2769
|
}
|
|
2648
2770
|
|
|
2649
|
-
export type
|
|
2771
|
+
export type StyledHOCOptions = {
|
|
2650
2772
|
disableTheme?: boolean
|
|
2773
|
+
displayName?: string
|
|
2651
2774
|
staticConfig?: Partial<StaticConfig>
|
|
2652
2775
|
}
|
|
2653
2776
|
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
ParentStaticProperties,
|
|
2661
|
-
> = <
|
|
2662
|
-
CustomProps extends object | void = void,
|
|
2663
|
-
MergedProps = CustomProps extends void
|
|
2664
|
-
? Props
|
|
2665
|
-
: Omit<Props, keyof CustomProps> & CustomProps,
|
|
2666
|
-
FunctionDef extends ForwardRefRenderFunction<Ref, MergedProps> =
|
|
2667
|
-
ForwardRefRenderFunction<Ref, MergedProps>,
|
|
2668
|
-
>(
|
|
2669
|
-
a: FunctionDef,
|
|
2670
|
-
options?: StyleableOptions
|
|
2671
|
-
) => TamaguiComponent<
|
|
2672
|
-
MergedProps,
|
|
2673
|
-
Ref,
|
|
2674
|
-
NonStyledProps & CustomProps,
|
|
2675
|
-
BaseStyles,
|
|
2676
|
-
VariantProps,
|
|
2677
|
-
ParentStaticProperties
|
|
2678
|
-
>
|
|
2777
|
+
// merges an annotated render-fn props type over the wrapped component's props.
|
|
2778
|
+
// when the render fn param is unannotated CustomProps stays {} and the wrapped
|
|
2779
|
+
// component's props pass through untouched.
|
|
2780
|
+
export type StyledHOCMergedProps<Props, CustomProps> = keyof CustomProps extends never
|
|
2781
|
+
? Props
|
|
2782
|
+
: Omit<Props, keyof CustomProps> & CustomProps
|
|
2679
2783
|
|
|
2680
2784
|
export type GetFinalProps<NonStyleProps, StylePropsBase, Variants> = Omit<
|
|
2681
2785
|
NonStyleProps,
|
|
2682
2786
|
keyof StylePropsBase | keyof Variants
|
|
2683
2787
|
> &
|
|
2684
|
-
(StylePropsBase extends object
|
|
2685
|
-
? WithThemeShorthandsPseudosMedia<StylePropsBase, Variants>
|
|
2686
|
-
: {})
|
|
2788
|
+
(StylePropsBase extends object ? WithThemeAndShorthands<StylePropsBase, Variants> : {})
|
|
2687
2789
|
|
|
2688
2790
|
export type TamaguiComponent<
|
|
2689
2791
|
Props = any,
|
|
@@ -2692,11 +2794,10 @@ export type TamaguiComponent<
|
|
|
2692
2794
|
BaseStyles extends object = {},
|
|
2693
2795
|
Variants = {},
|
|
2694
2796
|
ParentStaticProperties = {},
|
|
2695
|
-
> =
|
|
2797
|
+
> = FunctionComponent<
|
|
2696
2798
|
(Props extends TamaDefer
|
|
2697
2799
|
? GetFinalProps<NonStyledProps, BaseStyles, Variants>
|
|
2698
|
-
: Props) &
|
|
2699
|
-
RefAttributes<Ref>
|
|
2800
|
+
: Props) & { ref?: ReactRef<Ref> }
|
|
2700
2801
|
> &
|
|
2701
2802
|
StaticComponentObject<
|
|
2702
2803
|
Props,
|
|
@@ -2706,20 +2807,18 @@ export type TamaguiComponent<
|
|
|
2706
2807
|
Variants,
|
|
2707
2808
|
ParentStaticProperties
|
|
2708
2809
|
> &
|
|
2709
|
-
Omit<ParentStaticProperties, 'staticConfig'
|
|
2810
|
+
Omit<ParentStaticProperties, 'staticConfig'> & {
|
|
2710
2811
|
__tama: [Props, Ref, NonStyledProps, BaseStyles, Variants, ParentStaticProperties]
|
|
2711
2812
|
}
|
|
2712
2813
|
|
|
2713
2814
|
export type InferGenericComponentProps<A> =
|
|
2714
2815
|
A extends ComponentType<infer Props>
|
|
2715
2816
|
? Props
|
|
2716
|
-
: A extends
|
|
2817
|
+
: A extends ReactComponentWithRef<infer P, any>
|
|
2717
2818
|
? P
|
|
2718
|
-
: A extends
|
|
2719
|
-
?
|
|
2720
|
-
:
|
|
2721
|
-
? Props
|
|
2722
|
-
: {}
|
|
2819
|
+
: A extends new (props: infer Props) => any
|
|
2820
|
+
? Props
|
|
2821
|
+
: {}
|
|
2723
2822
|
|
|
2724
2823
|
export type InferStyledProps<
|
|
2725
2824
|
A extends StylableComponent,
|
|
@@ -2734,7 +2833,7 @@ export type InferStyledProps<
|
|
|
2734
2833
|
export type InferStyleProps<
|
|
2735
2834
|
A extends StylableComponent,
|
|
2736
2835
|
B extends StaticConfigPublic,
|
|
2737
|
-
> =
|
|
2836
|
+
> = WithThemeAndShorthands<GetBaseStyles<A, B>, {}>
|
|
2738
2837
|
|
|
2739
2838
|
export type GetProps<A extends StylableComponent> = A extends {
|
|
2740
2839
|
__tama: [
|
|
@@ -2795,20 +2894,6 @@ export type StaticComponentObject<
|
|
|
2795
2894
|
ParentStaticProperties,
|
|
2796
2895
|
> = {
|
|
2797
2896
|
staticConfig: StaticConfig
|
|
2798
|
-
|
|
2799
|
-
/*
|
|
2800
|
-
* If you want your HOC of a styled() component to also be able to be styled(), you need this to wrap it.
|
|
2801
|
-
*/
|
|
2802
|
-
styleable: Styleable<
|
|
2803
|
-
Props extends TamaDefer
|
|
2804
|
-
? GetFinalProps<NonStyledProps, BaseStyles, VariantProps>
|
|
2805
|
-
: Props,
|
|
2806
|
-
Ref,
|
|
2807
|
-
NonStyledProps,
|
|
2808
|
-
BaseStyles,
|
|
2809
|
-
VariantProps,
|
|
2810
|
-
ParentStaticProperties
|
|
2811
|
-
>
|
|
2812
2897
|
}
|
|
2813
2898
|
|
|
2814
2899
|
export type TamaguiComponentExpectingVariants<
|
|
@@ -2823,11 +2908,12 @@ export type TamaguiProviderProps = Omit<ThemeProviderProps, 'children'> & {
|
|
|
2823
2908
|
insets?: { top: number; right: number; bottom: number; left: number }
|
|
2824
2909
|
}
|
|
2825
2910
|
|
|
2826
|
-
|
|
2911
|
+
// entry[3] is the raw modifier source of a conditional variant clause
|
|
2912
|
+
// (`"sm"` in `density="compact sm:roomy"`), present only on clause entries
|
|
2913
|
+
export type PropMappedValue = [string, any, any?, string?][] | undefined
|
|
2827
2914
|
|
|
2828
2915
|
export type GetStyleState = {
|
|
2829
2916
|
style: TextStyle | null
|
|
2830
|
-
usedKeys: Record<string, number>
|
|
2831
2917
|
classNames: ClassNamesObject
|
|
2832
2918
|
staticConfig: StaticConfig
|
|
2833
2919
|
theme: ThemeParsed
|
|
@@ -2841,17 +2927,30 @@ export type GetStyleState = {
|
|
|
2841
2927
|
fontFamily?: string
|
|
2842
2928
|
debug?: DebugProp
|
|
2843
2929
|
flatTransforms?: Record<string, any>
|
|
2930
|
+
// direct flat-value scan context and its subscription output
|
|
2931
|
+
flatRulesToInsert?: RulesToInsert
|
|
2932
|
+
flatShouldDoClasses?: boolean
|
|
2933
|
+
flatThemeName?: string
|
|
2934
|
+
flatMediaState?: Record<string, boolean | undefined>
|
|
2935
|
+
flatGroupContext?: AllGroupContexts | null
|
|
2936
|
+
flatConditionOrder?: number
|
|
2937
|
+
flatActiveConditions?: Record<string, true>
|
|
2938
|
+
flatStateKeys?: Set<string>
|
|
2939
|
+
flatMediaKeys?: Set<string>
|
|
2940
|
+
flatGroupKeys?: Set<string>
|
|
2941
|
+
flatGroupMedia?: Set<string>
|
|
2942
|
+
flatEnterKeys?: Set<string>
|
|
2943
|
+
flatExitKeys?: Set<string>
|
|
2944
|
+
flatUsesSafeArea?: boolean
|
|
2844
2945
|
// Track style values that override context props (for issues #3670, #3676)
|
|
2845
2946
|
overriddenContextProps?: Record<string, any>
|
|
2846
|
-
// Track original token values
|
|
2947
|
+
// Track original token values before they get resolved to CSS vars
|
|
2847
2948
|
// This is used to preserve token strings in overriddenContextProps
|
|
2848
2949
|
originalContextPropValues?: Record<string, any>
|
|
2849
|
-
// opt-in dev-tools token provenance: original token string
|
|
2950
|
+
// opt-in dev-tools token provenance: original token string
|
|
2850
2951
|
// for each winning base style key, cleared on literal override. stamped onto
|
|
2851
2952
|
// the final style object as non-enumerable metadata (see helpers/styleProvenance).
|
|
2852
2953
|
tokenProvenance?: Record<string, string>
|
|
2853
|
-
// Transitions extracted from pseudo-style props (e.g., hoverStyle.transition)
|
|
2854
|
-
pseudoTransitions?: PseudoTransitions | null
|
|
2855
2954
|
// Resolved animation driver (respects animatedBy prop)
|
|
2856
2955
|
animationDriver?: AnimationDriver | null
|
|
2857
2956
|
}
|
|
@@ -2869,22 +2968,40 @@ export type PropMapper = (
|
|
|
2869
2968
|
value: any,
|
|
2870
2969
|
state: GetStyleState,
|
|
2871
2970
|
disabled: boolean,
|
|
2872
|
-
map: (key: string, val: any, originalVal?: any) => void
|
|
2971
|
+
map: (key: string, val: any, originalVal?: any, conditionSource?: string) => void
|
|
2873
2972
|
) => void
|
|
2874
2973
|
|
|
2875
2974
|
export type GenericVariantDefinitions = {
|
|
2876
2975
|
[key: string]: {
|
|
2877
2976
|
[key: string]:
|
|
2878
2977
|
| ((a: any, b: any) => any)
|
|
2978
|
+
| StaticStyleInput
|
|
2879
2979
|
| {
|
|
2880
2980
|
[key: string]: any
|
|
2881
2981
|
}
|
|
2882
2982
|
}
|
|
2883
2983
|
}
|
|
2884
2984
|
|
|
2985
|
+
export type CompoundVariantDefinition<
|
|
2986
|
+
MatchProps extends Record<string, any> = Record<string, any>,
|
|
2987
|
+
StyleProps extends Record<string, any> = Record<string, any>,
|
|
2988
|
+
> = {
|
|
2989
|
+
[Key in keyof MatchProps]?: MatchProps[Key] | readonly MatchProps[Key][]
|
|
2990
|
+
} & {
|
|
2991
|
+
style: StyleProps | StaticStyleInput
|
|
2992
|
+
}
|
|
2993
|
+
|
|
2994
|
+
export type GenericCompoundVariant = CompoundVariantDefinition<
|
|
2995
|
+
Record<string, any>,
|
|
2996
|
+
Record<string, any>
|
|
2997
|
+
>
|
|
2998
|
+
|
|
2885
2999
|
export type StaticConfigPublic = {
|
|
2886
3000
|
defaultProps?: Record<string, any>
|
|
2887
3001
|
|
|
3002
|
+
/** Static class input supplied to styled(Component, baseClassName, ...). */
|
|
3003
|
+
baseClassName?: StaticStyleInput
|
|
3004
|
+
|
|
2888
3005
|
/**
|
|
2889
3006
|
* (compiler) If you need to pass context or something, prevents from ever
|
|
2890
3007
|
* flattening. The 'jsx' option means it will never flatten. if you
|
|
@@ -2920,10 +3037,11 @@ export type StaticConfigPublic = {
|
|
|
2920
3037
|
inlineProps?: Set<string>
|
|
2921
3038
|
|
|
2922
3039
|
/**
|
|
2923
|
-
*
|
|
2924
|
-
*
|
|
3040
|
+
* Props that reach `Component` even though the platform prop-skip list drops
|
|
3041
|
+
* them. The native DOM primitives build their own event payloads, so a DOM
|
|
3042
|
+
* frame's `onClick` is the primitive's input, not a web-only prop.
|
|
2925
3043
|
*/
|
|
2926
|
-
|
|
3044
|
+
neverSkipProps?: Record<string, 1>
|
|
2927
3045
|
|
|
2928
3046
|
/**
|
|
2929
3047
|
* Auto-detected, but can override. Wraps children to space them on top
|
|
@@ -2946,19 +3064,24 @@ export type StaticConfigPublic = {
|
|
|
2946
3064
|
* memoizes component, rarely useful except mostly style components that don't take children
|
|
2947
3065
|
*/
|
|
2948
3066
|
memo?: boolean
|
|
3067
|
+
|
|
3068
|
+
compoundVariants?: readonly GenericCompoundVariant[]
|
|
3069
|
+
|
|
3070
|
+
contextProps?: readonly string[]
|
|
2949
3071
|
}
|
|
2950
3072
|
|
|
2951
3073
|
type StaticConfigBase = StaticConfigPublic & {
|
|
2952
3074
|
Component?: FunctionComponent<any> & StaticComponentObject<any, any, any, any, any, any>
|
|
2953
3075
|
|
|
3076
|
+
baseStyle?: Record<string, any>
|
|
3077
|
+
|
|
2954
3078
|
variants?: GenericVariantDefinitions
|
|
2955
3079
|
|
|
3080
|
+
compoundVariants?: readonly GenericCompoundVariant[]
|
|
3081
|
+
|
|
2956
3082
|
context?: StyledContext
|
|
2957
3083
|
|
|
2958
|
-
|
|
2959
|
-
* Used for applying sub theme style
|
|
2960
|
-
*/
|
|
2961
|
-
componentName?: string
|
|
3084
|
+
contextProps?: readonly string[]
|
|
2962
3085
|
|
|
2963
3086
|
/**
|
|
2964
3087
|
* Merges into defaultProps later on, used internally only
|
|
@@ -2975,24 +3098,30 @@ type StaticConfigBase = StaticConfigPublic & {
|
|
|
2975
3098
|
*/
|
|
2976
3099
|
isHOC?: boolean
|
|
2977
3100
|
|
|
2978
|
-
//
|
|
3101
|
+
// Tracks when styled() wraps a HOC that already wraps styled().
|
|
2979
3102
|
isStyledHOC?: boolean
|
|
3103
|
+
|
|
3104
|
+
/**
|
|
3105
|
+
* The immutable authoring syntax of this component, set by the package that
|
|
3106
|
+
* created it and inherited by styled() descendants. Absent means the regular
|
|
3107
|
+
* Tamagui frontend (see `regularStyleFrontend`).
|
|
3108
|
+
*/
|
|
3109
|
+
styleFrontend?: StyleFrontend
|
|
3110
|
+
|
|
3111
|
+
/**
|
|
3112
|
+
* Raw classes from `baseClassName` that the frontend did not claim, produced by
|
|
3113
|
+
* the descriptor's `normalizeStaticConfig`. They stay a class string so the app's
|
|
3114
|
+
* own CSS still applies them, and stay out of `baseStyle` because that object
|
|
3115
|
+
* holds styles only.
|
|
3116
|
+
*/
|
|
3117
|
+
passthroughClassName?: string
|
|
2980
3118
|
}
|
|
2981
3119
|
|
|
2982
3120
|
export type StaticConfig = StaticConfigBase & {
|
|
2983
3121
|
parentStaticConfig?: StaticConfigBase
|
|
2984
3122
|
}
|
|
2985
3123
|
|
|
2986
|
-
export type
|
|
2987
|
-
| TextStyle
|
|
2988
|
-
| (TextStyle & {
|
|
2989
|
-
hoverStyle?: TextStyle
|
|
2990
|
-
pressStyle?: TextStyle
|
|
2991
|
-
focusStyle?: TextStyle
|
|
2992
|
-
focusWithinStyle?: TextStyle
|
|
2993
|
-
focusVisibleStyle?: TextStyle
|
|
2994
|
-
disabledStyle?: TextStyle
|
|
2995
|
-
})
|
|
3124
|
+
export type ViewStyleObject = TextStyle
|
|
2996
3125
|
|
|
2997
3126
|
/**
|
|
2998
3127
|
* --------------------------------------------
|
|
@@ -3003,22 +3132,100 @@ export type ViewStyleWithPseudos =
|
|
|
3003
3132
|
export type StylableComponent =
|
|
3004
3133
|
| TamaguiComponent
|
|
3005
3134
|
| ComponentType<any>
|
|
3006
|
-
| ForwardRefExoticComponent<any>
|
|
3007
3135
|
| ReactComponentWithRef<any, any>
|
|
3008
3136
|
| (new (props: any) => any)
|
|
3009
3137
|
|
|
3010
|
-
export
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3138
|
+
export const variantResolverNames = [
|
|
3139
|
+
'Size',
|
|
3140
|
+
'Space',
|
|
3141
|
+
'Color',
|
|
3142
|
+
'Radius',
|
|
3143
|
+
'ZIndex',
|
|
3144
|
+
'Theme',
|
|
3145
|
+
'FontSize',
|
|
3146
|
+
'FontStyle',
|
|
3147
|
+
'FontTransform',
|
|
3148
|
+
'FontLineHeight',
|
|
3149
|
+
'FontLetterSpacing',
|
|
3150
|
+
'number',
|
|
3151
|
+
'string',
|
|
3152
|
+
'boolean',
|
|
3153
|
+
'any',
|
|
3154
|
+
] as const
|
|
3155
|
+
|
|
3156
|
+
export type VariantResolverName = (typeof variantResolverNames)[number]
|
|
3157
|
+
|
|
3158
|
+
type TrimWhitespace = ' ' | '\n' | '\t' | '\r' | '\v' | '\f'
|
|
3159
|
+
|
|
3160
|
+
type Trim<S extends string> = S extends `${TrimWhitespace}${infer Next}`
|
|
3161
|
+
? Trim<Next>
|
|
3162
|
+
: S extends `${infer Next}${TrimWhitespace}`
|
|
3163
|
+
? Trim<Next>
|
|
3164
|
+
: S
|
|
3165
|
+
|
|
3166
|
+
type ValidateVariantResolverKey<Key extends string> =
|
|
3167
|
+
Trim<Key> extends `${infer Left}|${infer Right}`
|
|
3168
|
+
? Trim<Left> extends VariantResolverName
|
|
3169
|
+
? ValidateVariantResolverKey<Right> extends never
|
|
3170
|
+
? never
|
|
3171
|
+
: Key
|
|
3172
|
+
: never
|
|
3173
|
+
: Trim<Key> extends VariantResolverName
|
|
3174
|
+
? Key
|
|
3175
|
+
: never
|
|
3176
|
+
|
|
3177
|
+
export type VariantResolverKey<Key extends string = string> = Key extends string
|
|
3178
|
+
? ValidateVariantResolverKey<Key>
|
|
3179
|
+
: never
|
|
3180
|
+
|
|
3181
|
+
type VariantResolverValueForName<Name extends string> = Name extends 'Size'
|
|
3182
|
+
? Size
|
|
3183
|
+
: Name extends 'Space'
|
|
3184
|
+
? Space
|
|
3185
|
+
: Name extends 'Color'
|
|
3186
|
+
? Color
|
|
3187
|
+
: Name extends 'Radius'
|
|
3188
|
+
? Radius
|
|
3189
|
+
: Name extends 'ZIndex'
|
|
3190
|
+
? ZIndex
|
|
3191
|
+
: Name extends 'Theme'
|
|
3192
|
+
? ThemeTokens
|
|
3193
|
+
: Name extends 'FontSize'
|
|
3194
|
+
? FontSize
|
|
3195
|
+
: Name extends 'FontStyle'
|
|
3196
|
+
? FontStyleTokens
|
|
3197
|
+
: Name extends 'FontTransform'
|
|
3198
|
+
? FontTransformTokens
|
|
3199
|
+
: Name extends 'FontLineHeight'
|
|
3200
|
+
? FontLineHeightTokens
|
|
3201
|
+
: Name extends 'FontLetterSpacing'
|
|
3202
|
+
? FontLetterSpacingTokens
|
|
3203
|
+
: Name extends 'number'
|
|
3204
|
+
? number
|
|
3205
|
+
: Name extends 'string'
|
|
3206
|
+
? string
|
|
3207
|
+
: Name extends 'boolean'
|
|
3208
|
+
? boolean
|
|
3209
|
+
: Name extends 'any'
|
|
3210
|
+
? any
|
|
3211
|
+
: never
|
|
3212
|
+
|
|
3213
|
+
export type VariantResolverValue<Key extends string> =
|
|
3214
|
+
Trim<Key> extends `${infer Left}|${infer Right}`
|
|
3215
|
+
? VariantResolverValueForName<Trim<Left>> | VariantResolverValue<Right>
|
|
3216
|
+
: VariantResolverValueForName<Trim<Key>>
|
|
3217
|
+
|
|
3218
|
+
export function createVariantResolver<
|
|
3219
|
+
Key extends string,
|
|
3220
|
+
Props extends PropLike = PropLike,
|
|
3221
|
+
Resolver extends VariantSpreadFunction<Props, VariantResolverValue<Key>> =
|
|
3222
|
+
VariantSpreadFunction<Props, VariantResolverValue<Key>>,
|
|
3223
|
+
>(
|
|
3224
|
+
key: string extends Key ? never : Key & VariantResolverKey<Key>,
|
|
3225
|
+
resolver: Resolver
|
|
3226
|
+
): Resolver {
|
|
3227
|
+
return resolver
|
|
3228
|
+
}
|
|
3022
3229
|
|
|
3023
3230
|
export type VariantDefinitions<
|
|
3024
3231
|
Parent extends StylableComponent = TamaguiComponent,
|
|
@@ -3042,6 +3249,8 @@ export type VariantDefinitions<
|
|
|
3042
3249
|
_isEmpty?: 1
|
|
3043
3250
|
}
|
|
3044
3251
|
|
|
3252
|
+
export type StaticStyleInput = string
|
|
3253
|
+
|
|
3045
3254
|
export type GetVariantProps<
|
|
3046
3255
|
A extends StylableComponent,
|
|
3047
3256
|
IsText extends boolean | undefined,
|
|
@@ -3058,51 +3267,18 @@ export type GetVariantProps<
|
|
|
3058
3267
|
? Props extends TamaDefer
|
|
3059
3268
|
? GetFinalProps<NonStyledProps, BaseStyles, VariantProps>
|
|
3060
3269
|
: Props
|
|
3061
|
-
:
|
|
3062
|
-
IsText extends true ? TextStylePropsBase : StackStyleBase
|
|
3063
|
-
>
|
|
3270
|
+
: WithThemeAndShorthands<IsText extends true ? TextStylePropsBase : StackStyleBase>
|
|
3064
3271
|
|
|
3065
3272
|
export type VariantDefinitionFromProps<MyProps, Val> = MyProps extends object
|
|
3066
3273
|
? {
|
|
3067
3274
|
[propName: string]:
|
|
3068
3275
|
| VariantSpreadFunction<MyProps, Val>
|
|
3069
|
-
|
|
|
3070
|
-
[Key in SpreadKeys]?: Key extends '...fontSize'
|
|
3071
|
-
? FontSizeVariantSpreadFunction<MyProps>
|
|
3072
|
-
: Key extends '...size'
|
|
3073
|
-
? SizeVariantSpreadFunction<MyProps>
|
|
3074
|
-
: Key extends '...space'
|
|
3075
|
-
? SpaceVariantSpreadFunction<MyProps>
|
|
3076
|
-
: Key extends '...color'
|
|
3077
|
-
? ColorVariantSpreadFunction<MyProps>
|
|
3078
|
-
: Key extends '...lineHeight'
|
|
3079
|
-
? FontLineHeightVariantSpreadFunction<MyProps>
|
|
3080
|
-
: Key extends '...fontTransform'
|
|
3081
|
-
? FontTransformVariantSpreadFunction<MyProps>
|
|
3082
|
-
: Key extends '...fontStyle'
|
|
3083
|
-
? FontStyleVariantSpreadFunction<MyProps>
|
|
3084
|
-
: Key extends '...letterSpacing'
|
|
3085
|
-
? FontLetterSpacingVariantSpreadFunction<MyProps>
|
|
3086
|
-
: Key extends '...zIndex'
|
|
3087
|
-
? ZIndexVariantSpreadFunction<MyProps>
|
|
3088
|
-
: Key extends '...radius'
|
|
3089
|
-
? RadiusVariantSpreadFunction<MyProps>
|
|
3090
|
-
: Key extends '...theme'
|
|
3091
|
-
? ThemeVariantSpreadFunction<MyProps>
|
|
3092
|
-
: never
|
|
3093
|
-
} & {
|
|
3276
|
+
| {
|
|
3094
3277
|
[Key in string | number | 'true' | 'false']?:
|
|
3095
3278
|
| MyProps
|
|
3096
3279
|
| VariantSpreadFunction<MyProps, Val>
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
? VariantSpreadFunction<MyProps, number>
|
|
3100
|
-
: Key extends ':boolean'
|
|
3101
|
-
? VariantSpreadFunction<MyProps, boolean>
|
|
3102
|
-
: Key extends ':string'
|
|
3103
|
-
? VariantSpreadFunction<MyProps, string>
|
|
3104
|
-
: never
|
|
3105
|
-
})
|
|
3280
|
+
| StaticStyleInput
|
|
3281
|
+
}
|
|
3106
3282
|
}
|
|
3107
3283
|
: {}
|
|
3108
3284
|
|
|
@@ -3133,20 +3309,6 @@ export type VariantSpreadFunction<Props extends PropLike, Val = any> = (
|
|
|
3133
3309
|
| null
|
|
3134
3310
|
| undefined
|
|
3135
3311
|
|
|
3136
|
-
export type VariantTypeKeys = ':string' | ':boolean' | ':number'
|
|
3137
|
-
|
|
3138
|
-
export type GetVariantValues<Key> = Key extends `...${infer VariantSpread}`
|
|
3139
|
-
? ThemeValueByCategory<VariantSpread>
|
|
3140
|
-
: Key extends 'true' | 'false'
|
|
3141
|
-
? boolean
|
|
3142
|
-
: Key extends ':string'
|
|
3143
|
-
? string
|
|
3144
|
-
: Key extends ':boolean'
|
|
3145
|
-
? boolean
|
|
3146
|
-
: Key extends ':number'
|
|
3147
|
-
? number
|
|
3148
|
-
: Key
|
|
3149
|
-
|
|
3150
3312
|
export type FontSizeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<
|
|
3151
3313
|
A,
|
|
3152
3314
|
FontSizeTokens
|
|
@@ -3201,6 +3363,7 @@ export type ResolveVariableAs =
|
|
|
3201
3363
|
| 'except-theme'
|
|
3202
3364
|
|
|
3203
3365
|
export type SplitStyleProps = {
|
|
3366
|
+
displayName?: string
|
|
3204
3367
|
styledContext?: Record<string, any>
|
|
3205
3368
|
mediaState?: Record<string, boolean>
|
|
3206
3369
|
noClass?: boolean
|
|
@@ -3216,8 +3379,6 @@ export type SplitStyleProps = {
|
|
|
3216
3379
|
willBeAnimated?: boolean // we need to track media queries even before animation
|
|
3217
3380
|
isAnimated: boolean
|
|
3218
3381
|
isExiting?: boolean
|
|
3219
|
-
exitVariant?: string
|
|
3220
|
-
enterVariant?: string
|
|
3221
3382
|
}
|
|
3222
3383
|
|
|
3223
3384
|
// Presence
|
|
@@ -3229,9 +3390,6 @@ export interface PresenceContextProps {
|
|
|
3229
3390
|
onExitComplete?: (id: string) => void
|
|
3230
3391
|
initial?: false | string | string[]
|
|
3231
3392
|
custom?: any
|
|
3232
|
-
exitVariant?: string | null
|
|
3233
|
-
enterVariant?: string | null
|
|
3234
|
-
enterExitVariant?: string | null
|
|
3235
3393
|
}
|
|
3236
3394
|
|
|
3237
3395
|
type SafeToRemoveCallback = () => void
|
|
@@ -3247,9 +3405,7 @@ type AnimationConfig = {
|
|
|
3247
3405
|
[key: string]: any
|
|
3248
3406
|
}
|
|
3249
3407
|
|
|
3250
|
-
//
|
|
3251
|
-
// this is useful only in limited scenarios like `Sheet`, but necessary in those cases
|
|
3252
|
-
// TODO: make css driver compatible with this?
|
|
3408
|
+
// adapter between driver implementations for imperative number => style mapping
|
|
3253
3409
|
|
|
3254
3410
|
export type AnimatedNumberStrategy =
|
|
3255
3411
|
// only values shared between reanimated/react-native for now
|
|
@@ -3294,7 +3450,7 @@ export type UseAnimatedNumber<
|
|
|
3294
3450
|
N extends UniversalAnimatedNumber<any> = UniversalAnimatedNumber<any>,
|
|
3295
3451
|
> = (initial: number) => N
|
|
3296
3452
|
|
|
3297
|
-
|
|
3453
|
+
type AnimationDriverBase<A extends AnimationConfig = AnimationConfig> = {
|
|
3298
3454
|
isReactNative?: boolean
|
|
3299
3455
|
/** What style format the driver expects as input: 'css' (CSS variables) or 'value' (resolved values) */
|
|
3300
3456
|
inputStyle?: 'css' | 'value'
|
|
@@ -3303,23 +3459,36 @@ export type AnimationDriver<A extends AnimationConfig = AnimationConfig> = {
|
|
|
3303
3459
|
needsCustomComponent?: boolean
|
|
3304
3460
|
avoidReRenders?: boolean
|
|
3305
3461
|
onMount?: () => void
|
|
3306
|
-
/** When true, this is a stub driver with no real animation support */
|
|
3307
|
-
isStub?: boolean
|
|
3308
|
-
useAnimations: UseAnimationHook
|
|
3309
|
-
usePresence: () => UsePresenceResult
|
|
3310
|
-
ResetPresence: (props: {
|
|
3311
|
-
children?: React.ReactNode
|
|
3312
|
-
disabled?: boolean
|
|
3313
|
-
}) => React.ReactNode
|
|
3314
|
-
useAnimatedNumber: UseAnimatedNumber
|
|
3315
|
-
useAnimatedNumberStyle: UseAnimatedNumberStyle
|
|
3316
|
-
useAnimatedNumbersStyle?: UseAnimatedNumbersStyle
|
|
3317
|
-
useAnimatedNumberReaction: UseAnimatedNumberReaction
|
|
3318
3462
|
animations: A
|
|
3319
3463
|
View?: any
|
|
3320
3464
|
Text?: any
|
|
3321
3465
|
}
|
|
3322
3466
|
|
|
3467
|
+
export type AnimationDriver<A extends AnimationConfig = AnimationConfig> =
|
|
3468
|
+
AnimationDriverBase<A> & {
|
|
3469
|
+
/** When true, this is a stub driver with no real animation support */
|
|
3470
|
+
isStub?: boolean
|
|
3471
|
+
useAnimations: UseAnimationHook
|
|
3472
|
+
usePresence: () => UsePresenceResult
|
|
3473
|
+
ResetPresence: (props: {
|
|
3474
|
+
children?: React.ReactNode
|
|
3475
|
+
disabled?: boolean
|
|
3476
|
+
}) => React.ReactNode
|
|
3477
|
+
useAnimatedNumber: UseAnimatedNumber
|
|
3478
|
+
useAnimatedNumberStyle: UseAnimatedNumberStyle
|
|
3479
|
+
useAnimatedNumbersStyle: UseAnimatedNumbersStyle
|
|
3480
|
+
useAnimatedNumberReaction: UseAnimatedNumberReaction
|
|
3481
|
+
}
|
|
3482
|
+
|
|
3483
|
+
export type AnimationDriverStub<A extends AnimationConfig = AnimationConfig> =
|
|
3484
|
+
AnimationDriverBase<A> & {
|
|
3485
|
+
isStub: true
|
|
3486
|
+
}
|
|
3487
|
+
|
|
3488
|
+
export type AnimationDriverLike<A extends AnimationConfig = AnimationConfig> =
|
|
3489
|
+
| AnimationDriver<A>
|
|
3490
|
+
| AnimationDriverStub<A>
|
|
3491
|
+
|
|
3323
3492
|
export type UseAnimationProps = TamaguiComponentPropsBase & Record<string, any>
|
|
3324
3493
|
|
|
3325
3494
|
type UseStyleListener = (
|
|
@@ -3335,6 +3504,7 @@ export type UseStyleEmitter = (cb: UseStyleListener) => void
|
|
|
3335
3504
|
export type UseAnimationHook = (props: {
|
|
3336
3505
|
style: Record<string, any>
|
|
3337
3506
|
props: Record<string, any>
|
|
3507
|
+
styleState?: GetStyleResult | null
|
|
3338
3508
|
presence?: UsePresenceResult | null
|
|
3339
3509
|
staticConfig: StaticConfig
|
|
3340
3510
|
styleProps: SplitStyleProps
|
|
@@ -3342,12 +3512,11 @@ export type UseAnimationHook = (props: {
|
|
|
3342
3512
|
useStyleEmitter?: UseStyleEmitter
|
|
3343
3513
|
theme: ThemeParsed
|
|
3344
3514
|
themeName: string
|
|
3345
|
-
pseudos: WithPseudoProps<ViewStyle> | null
|
|
3346
3515
|
stateRef: { current: TamaguiComponentStateRef }
|
|
3347
|
-
|
|
3516
|
+
onTransition?: OnTransition
|
|
3348
3517
|
delay?: number
|
|
3349
3518
|
}) => null | {
|
|
3350
|
-
style?:
|
|
3519
|
+
style?: unknown
|
|
3351
3520
|
className?: string
|
|
3352
3521
|
ref?: any
|
|
3353
3522
|
}
|
|
@@ -3360,7 +3529,6 @@ export type GestureReponderEvent =
|
|
|
3360
3529
|
export type RulesToInsert = Record<string, StyleObject>
|
|
3361
3530
|
|
|
3362
3531
|
export type GetStyleResult = {
|
|
3363
|
-
pseudos?: PseudoStyles | null
|
|
3364
3532
|
style: ViewStyle | null
|
|
3365
3533
|
classNames: ClassNamesObject
|
|
3366
3534
|
rulesToInsert: RulesToInsert
|
|
@@ -3368,15 +3536,26 @@ export type GetStyleResult = {
|
|
|
3368
3536
|
fontFamily: string | undefined
|
|
3369
3537
|
space?: any // SpaceTokens?
|
|
3370
3538
|
hasMedia: boolean | Set<string>
|
|
3371
|
-
dynamicThemeAccess?: boolean
|
|
3372
3539
|
pseudoGroups?: Set<string>
|
|
3373
3540
|
mediaGroups?: Set<string>
|
|
3541
|
+
dynamicThemeAccess?: boolean
|
|
3374
3542
|
// Style values that override context props (for issues #3670, #3676)
|
|
3375
3543
|
overriddenContextProps?: Record<string, any>
|
|
3376
|
-
//
|
|
3377
|
-
|
|
3378
|
-
//
|
|
3544
|
+
// interaction states referenced by flat-value clauses, so createComponent
|
|
3545
|
+
// attaches the matching event handlers. the field name remains for the
|
|
3546
|
+
// compiler host contract.
|
|
3547
|
+
programStates?: Set<string>
|
|
3548
|
+
// subscribe this component to live safe-area insets
|
|
3549
|
+
usesSafeArea?: true
|
|
3550
|
+
// the transition selected by active flat-value clauses
|
|
3379
3551
|
effectiveTransition?: TransitionProp | null
|
|
3552
|
+
// css properties controlled by active lifecycle clauses. internal
|
|
3553
|
+
// animation-driver metadata; authored condition objects never enter
|
|
3554
|
+
// this contract.
|
|
3555
|
+
programLifecycleStyleKeys?: {
|
|
3556
|
+
enter?: Set<string>
|
|
3557
|
+
exit?: Set<string>
|
|
3558
|
+
}
|
|
3380
3559
|
}
|
|
3381
3560
|
|
|
3382
3561
|
export type ClassNamesObject = Record<string, string>
|