@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
|
@@ -1,201 +1,166 @@
|
|
|
1
1
|
import { isWeb } from "@tamagui/constants";
|
|
2
|
-
import { getVariableVariable, isVariable } from "../createVariable.native.js";
|
|
3
2
|
import { registerCSSVariable, variableToCSS } from "./registerCSSVariable.native.js";
|
|
4
3
|
import { getThemeCSSRules } from "./getThemeCSSRules.native.js";
|
|
5
|
-
|
|
6
|
-
var tokenKey = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "$true";
|
|
7
|
-
var props = ["font-family: var(--f-family)"];
|
|
8
|
-
var getVarRef = function (obj) {
|
|
9
|
-
var val = obj === null || obj === void 0 ? void 0 : obj[tokenKey];
|
|
10
|
-
if (isVariable(val)) return getVariableVariable(val);
|
|
11
|
-
};
|
|
12
|
-
var letterSpacing = getVarRef(fontParsed.letterSpacing);
|
|
13
|
-
if (letterSpacing) props.push(`letter-spacing: ${letterSpacing}`);
|
|
14
|
-
var lineHeight = getVarRef(fontParsed.lineHeight);
|
|
15
|
-
if (lineHeight) props.push(`line-height: ${lineHeight}`);
|
|
16
|
-
var fontStyle = getVarRef(fontParsed.style);
|
|
17
|
-
if (fontStyle) props.push(`font-style: ${fontStyle}`);
|
|
18
|
-
var fontWeight = getVarRef(fontParsed.weight);
|
|
19
|
-
if (fontWeight) props.push(`font-weight: ${fontWeight}`);
|
|
20
|
-
return props;
|
|
21
|
-
}
|
|
4
|
+
|
|
22
5
|
function createTokenCSS(tokens, shouldTokenCategoryHaveUnits) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
return declarations;
|
|
70
|
-
}
|
|
71
|
-
return [];
|
|
6
|
+
if (!process.env.TAMAGUI_DID_OUTPUT_CSS) {
|
|
7
|
+
var declarations = [];
|
|
8
|
+
var sortedTokenKeys = Object.keys(tokens).sort();
|
|
9
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
10
|
+
try {
|
|
11
|
+
for (var _iterator = sortedTokenKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
12
|
+
var key = _step.value;
|
|
13
|
+
var sortedSubKeys = Object.keys(tokens[key]).sort();
|
|
14
|
+
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
|
|
15
|
+
try {
|
|
16
|
+
for (var _iterator1 = sortedSubKeys[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
|
|
17
|
+
var skey = _step1.value;
|
|
18
|
+
var variable = tokens[key][skey];
|
|
19
|
+
if (isWeb) {
|
|
20
|
+
registerCSSVariable(variable);
|
|
21
|
+
var variableNeedsPx = variable.needsPx === true;
|
|
22
|
+
var categoryNeedsPx = shouldTokenCategoryHaveUnits(key);
|
|
23
|
+
var shouldBeUnitless = !(variableNeedsPx || categoryNeedsPx);
|
|
24
|
+
declarations.push(variableToCSS(variable, shouldBeUnitless));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
} catch (err) {
|
|
28
|
+
_didIteratorError1 = true;
|
|
29
|
+
_iteratorError1 = err;
|
|
30
|
+
} finally {
|
|
31
|
+
try {
|
|
32
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) _iterator1.return();
|
|
33
|
+
} finally {
|
|
34
|
+
if (_didIteratorError1) throw _iteratorError1;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
} catch (err) {
|
|
39
|
+
_didIteratorError = true;
|
|
40
|
+
_iteratorError = err;
|
|
41
|
+
} finally {
|
|
42
|
+
try {
|
|
43
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
|
|
44
|
+
} finally {
|
|
45
|
+
if (_didIteratorError) throw _iteratorError;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return declarations;
|
|
49
|
+
}
|
|
50
|
+
return [];
|
|
72
51
|
}
|
|
73
52
|
function createFontCSS(fontsParsed, registerFontVariables) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
return fontDeclarations;
|
|
105
|
-
}
|
|
106
|
-
return {};
|
|
53
|
+
if (!process.env.TAMAGUI_DID_OUTPUT_CSS) {
|
|
54
|
+
var fontDeclarations = {};
|
|
55
|
+
if (!fontsParsed) return fontDeclarations;
|
|
56
|
+
var sortedFontKeys = Object.keys(fontsParsed).sort();
|
|
57
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
58
|
+
try {
|
|
59
|
+
for (var _iterator = sortedFontKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
60
|
+
var key = _step.value;
|
|
61
|
+
var fontParsed = fontsParsed[key];
|
|
62
|
+
var [name, language] = key.includes("_") ? key.split("_") : [key];
|
|
63
|
+
fontDeclarations[key] = {
|
|
64
|
+
name,
|
|
65
|
+
declarations: registerFontVariables(fontParsed),
|
|
66
|
+
language,
|
|
67
|
+
fontParsed
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
} catch (err) {
|
|
71
|
+
_didIteratorError = true;
|
|
72
|
+
_iteratorError = err;
|
|
73
|
+
} finally {
|
|
74
|
+
try {
|
|
75
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
|
|
76
|
+
} finally {
|
|
77
|
+
if (_didIteratorError) throw _iteratorError;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return fontDeclarations;
|
|
81
|
+
}
|
|
82
|
+
return {};
|
|
107
83
|
}
|
|
108
84
|
function buildCSSRuleSets(declarations, fontDeclarations) {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
85
|
+
var defaultFontToken = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "";
|
|
86
|
+
if (!process.env.TAMAGUI_DID_OUTPUT_CSS) {
|
|
87
|
+
let declarationsToRuleSet2 = function(decs) {
|
|
88
|
+
return `:root${arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ""} {${sep}${[...decs].join(`;${sep}`)}
|
|
113
89
|
}`;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
var sharedSelectors = [...fontSelectors, ".is_View"].join(", ");
|
|
151
|
-
cssRuleSets.push(`${sharedSelectors} {${fontProps.join("; ")}}`);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
return cssRuleSets;
|
|
155
|
-
}
|
|
156
|
-
return [];
|
|
90
|
+
};
|
|
91
|
+
var cssRuleSets = [];
|
|
92
|
+
var sep = " ";
|
|
93
|
+
if (declarations.length) cssRuleSets.push(declarationsToRuleSet2(declarations));
|
|
94
|
+
var fontSelectors = [];
|
|
95
|
+
var sortedFontDeclarationKeys = Object.keys(fontDeclarations).sort();
|
|
96
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
97
|
+
try {
|
|
98
|
+
for (var _iterator = sortedFontDeclarationKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
99
|
+
var { name, declarations: _$declarations, language = "default" } = fontDeclarations[_step.value];
|
|
100
|
+
var fontSelector = `.font_${name}`;
|
|
101
|
+
fontSelectors.push(fontSelector);
|
|
102
|
+
var langSelector = `:root .t_lang-${name}-${language} ${fontSelector}`;
|
|
103
|
+
var specificRuleSet = declarationsToRuleSet2(_$declarations, language === "default" ? ` ${fontSelector}, ${langSelector}` : langSelector);
|
|
104
|
+
cssRuleSets.push(specificRuleSet);
|
|
105
|
+
}
|
|
106
|
+
} catch (err) {
|
|
107
|
+
_didIteratorError = true;
|
|
108
|
+
_iteratorError = err;
|
|
109
|
+
} finally {
|
|
110
|
+
try {
|
|
111
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
|
|
112
|
+
} finally {
|
|
113
|
+
if (_didIteratorError) throw _iteratorError;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
if (fontSelectors.length) {
|
|
117
|
+
var defaultFont = fontDeclarations[defaultFontToken];
|
|
118
|
+
if (defaultFont === null || defaultFont === void 0 ? void 0 : defaultFont.fontParsed) {
|
|
119
|
+
var sharedSelectors = `:where(${[...fontSelectors, ".is_View"].join(", ")})`;
|
|
120
|
+
cssRuleSets.push(`${sharedSelectors} {font-family: var(--f-family)}`);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return cssRuleSets;
|
|
124
|
+
}
|
|
125
|
+
return [];
|
|
157
126
|
}
|
|
158
127
|
function createThemeCSS(dedupedThemes, configIn) {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
return themeRuleSets;
|
|
191
|
-
}
|
|
192
|
-
return [];
|
|
128
|
+
if (!process.env.TAMAGUI_DID_OUTPUT_CSS) {
|
|
129
|
+
var themeRuleSets = [];
|
|
130
|
+
if (isWeb) {
|
|
131
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
132
|
+
try {
|
|
133
|
+
for (var _iterator = dedupedThemes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
134
|
+
var { names, theme } = _step.value;
|
|
135
|
+
var nextRules = getThemeCSSRules({
|
|
136
|
+
config: configIn,
|
|
137
|
+
themeName: names[0],
|
|
138
|
+
names,
|
|
139
|
+
theme
|
|
140
|
+
});
|
|
141
|
+
themeRuleSets = [...themeRuleSets, ...nextRules];
|
|
142
|
+
}
|
|
143
|
+
} catch (err) {
|
|
144
|
+
_didIteratorError = true;
|
|
145
|
+
_iteratorError = err;
|
|
146
|
+
} finally {
|
|
147
|
+
try {
|
|
148
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
|
|
149
|
+
} finally {
|
|
150
|
+
if (_didIteratorError) throw _iteratorError;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return themeRuleSets;
|
|
155
|
+
}
|
|
156
|
+
return [];
|
|
193
157
|
}
|
|
194
158
|
function getCSS(themeConfig) {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
159
|
+
arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
|
|
160
|
+
arguments.length > 2 && arguments[2];
|
|
161
|
+
if (!process.env.TAMAGUI_DID_OUTPUT_CSS && false);
|
|
162
|
+
return "";
|
|
199
163
|
}
|
|
200
|
-
|
|
164
|
+
|
|
165
|
+
export { buildCSSRuleSets, createFontCSS, createThemeCSS, createTokenCSS, getCSS };
|
|
201
166
|
//# sourceMappingURL=createDesignSystem.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isWeb","getVariableVariable","isVariable","registerCSSVariable","variableToCSS","getThemeCSSRules","getFontPropertyDeclarations","fontParsed","tokenKey","arguments","length","props","getVarRef","obj","val","letterSpacing","push","lineHeight","fontStyle","style","fontWeight","weight","createTokenCSS","tokens","shouldTokenCategoryHaveUnits","process","env","TAMAGUI_DID_OUTPUT_CSS","declarations","sortedTokenKeys","Object","keys","sort","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Symbol","iterator","_step","next","done","key","value","sortedSubKeys","_iteratorNormalCompletion1","_didIteratorError1","_iteratorError1","_iterator1","_step1","skey","variable","variableNeedsPx","needsPx","categoryNeedsPx","shouldBeUnitless","err","return","createFontCSS","fontsParsed","registerFontVariables","fontDeclarations","sortedFontKeys","name","language","includes","split","fontVars","slice","buildCSSRuleSets","defaultFontToken","declarationsToRuleSet2","decs","sep","join","cssRuleSets","fontSelectors","sortedFontDeclarationKeys","_$declarations","fontSelector","langSelector","specificRuleSet","firstFont","fontProps","sharedSelectors","createThemeCSS","dedupedThemes","configIn","themeRuleSets","names","theme","nextRules","config","themeName","getCSS","themeConfig"],"sources":["createDesignSystem.native.js"],"sourcesContent":["import { isWeb } from \"@tamagui/constants\";\nimport { getVariableVariable, isVariable } from \"../createVariable\";\nimport { registerCSSVariable, variableToCSS } from \"./registerCSSVariable\";\nimport { getThemeCSSRules } from \"./getThemeCSSRules\";\n\nfunction getFontPropertyDeclarations(fontParsed) {\n\tvar tokenKey = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : \"$true\";\n\tvar props = [\"font-family: var(--f-family)\"];\n\tvar getVarRef = function(obj) {\n\t\tvar val = obj === null || obj === void 0 ? void 0 : obj[tokenKey];\n\t\tif (isVariable(val)) return getVariableVariable(val);\n\t};\n\tvar letterSpacing = getVarRef(fontParsed.letterSpacing);\n\tif (letterSpacing) props.push(`letter-spacing: ${letterSpacing}`);\n\tvar lineHeight = getVarRef(fontParsed.lineHeight);\n\tif (lineHeight) props.push(`line-height: ${lineHeight}`);\n\tvar fontStyle = getVarRef(fontParsed.style);\n\tif (fontStyle) props.push(`font-style: ${fontStyle}`);\n\tvar fontWeight = getVarRef(fontParsed.weight);\n\tif (fontWeight) props.push(`font-weight: ${fontWeight}`);\n\treturn props;\n}\nfunction createTokenCSS(tokens, shouldTokenCategoryHaveUnits) {\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS) {\n\t\tvar declarations = [];\n\t\tvar sortedTokenKeys = Object.keys(tokens).sort();\n\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\ttry {\n\t\t\tfor (var _iterator = sortedTokenKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\tvar key = _step.value;\n\t\t\t\tvar sortedSubKeys = Object.keys(tokens[key]).sort();\n\t\t\t\tvar _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n\t\t\t\ttry {\n\t\t\t\t\tfor (var _iterator1 = sortedSubKeys[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n\t\t\t\t\t\tvar skey = _step1.value;\n\t\t\t\t\t\tvar variable = tokens[key][skey];\n\t\t\t\t\t\tif (isWeb) {\n\t\t\t\t\t\t\tregisterCSSVariable(variable);\n\t\t\t\t\t\t\tvar variableNeedsPx = variable.needsPx === true;\n\t\t\t\t\t\t\tvar categoryNeedsPx = shouldTokenCategoryHaveUnits(key);\n\t\t\t\t\t\t\tvar shouldBeUnitless = !(variableNeedsPx || categoryNeedsPx);\n\t\t\t\t\t\t\tdeclarations.push(variableToCSS(variable, shouldBeUnitless));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (err) {\n\t\t\t\t\t_didIteratorError1 = true;\n\t\t\t\t\t_iteratorError1 = err;\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (!_iteratorNormalCompletion1 && _iterator1.return != null) _iterator1.return();\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif (_didIteratorError1) throw _iteratorError1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t_didIteratorError = true;\n\t\t\t_iteratorError = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t}\n\t\t}\n\t\treturn declarations;\n\t}\n\treturn [];\n}\nfunction createFontCSS(fontsParsed, registerFontVariables) {\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS) {\n\t\tvar fontDeclarations = {};\n\t\tif (!fontsParsed) return fontDeclarations;\n\t\tvar sortedFontKeys = Object.keys(fontsParsed).sort();\n\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\ttry {\n\t\t\tfor (var _iterator = sortedFontKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\tvar key = _step.value;\n\t\t\t\tvar fontParsed = fontsParsed[key];\n\t\t\t\tvar [name, language] = key.includes(\"_\") ? key.split(\"_\") : [key];\n\t\t\t\tvar fontVars = registerFontVariables(fontParsed);\n\t\t\t\tfontDeclarations[key] = {\n\t\t\t\t\tname: name.slice(1),\n\t\t\t\t\tdeclarations: fontVars,\n\t\t\t\t\tlanguage,\n\t\t\t\t\tfontParsed\n\t\t\t\t};\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t_didIteratorError = true;\n\t\t\t_iteratorError = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t}\n\t\t}\n\t\treturn fontDeclarations;\n\t}\n\treturn {};\n}\nfunction buildCSSRuleSets(declarations, fontDeclarations) {\n\tvar defaultFontToken = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : \"$true\";\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS) {\n\t\tlet declarationsToRuleSet2 = function(decs) {\n\t\t\treturn `:root${arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : \"\"} {${sep}${[...decs].join(`;${sep}`)}\n}`;\n\t\t};\n\t\tvar cssRuleSets = [];\n\t\tvar sep = \" \";\n\t\tif (declarations.length) cssRuleSets.push(declarationsToRuleSet2(declarations));\n\t\tvar fontSelectors = [];\n\t\tvar sortedFontDeclarationKeys = Object.keys(fontDeclarations).sort();\n\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\ttry {\n\t\t\tfor (var _iterator = sortedFontDeclarationKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\tvar { name, declarations: _$declarations, language = \"default\" } = fontDeclarations[_step.value];\n\t\t\t\tvar fontSelector = `.font_${name}`;\n\t\t\t\tfontSelectors.push(fontSelector);\n\t\t\t\tvar langSelector = `:root .t_lang-${name}-${language} ${fontSelector}`;\n\t\t\t\tvar specificRuleSet = declarationsToRuleSet2(_$declarations, language === \"default\" ? ` ${fontSelector}, ${langSelector}` : langSelector);\n\t\t\t\tcssRuleSets.push(specificRuleSet);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t_didIteratorError = true;\n\t\t\t_iteratorError = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t}\n\t\t}\n\t\tif (fontSelectors.length) {\n\t\t\tvar firstFont = fontDeclarations[sortedFontDeclarationKeys[0]];\n\t\t\tif (firstFont === null || firstFont === void 0 ? void 0 : firstFont.fontParsed) {\n\t\t\t\tvar fontProps = getFontPropertyDeclarations(firstFont.fontParsed, defaultFontToken);\n\t\t\t\tvar sharedSelectors = [...fontSelectors, \".is_View\"].join(\", \");\n\t\t\t\tcssRuleSets.push(`${sharedSelectors} {${fontProps.join(\"; \")}}`);\n\t\t\t}\n\t\t}\n\t\treturn cssRuleSets;\n\t}\n\treturn [];\n}\nfunction createThemeCSS(dedupedThemes, configIn) {\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS) {\n\t\tvar themeRuleSets = [];\n\t\tif (isWeb) {\n\t\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\t\ttry {\n\t\t\t\tfor (var _iterator = dedupedThemes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\tvar { names, theme } = _step.value;\n\t\t\t\t\tvar nextRules = getThemeCSSRules({\n\t\t\t\t\t\tconfig: configIn,\n\t\t\t\t\t\tthemeName: names[0],\n\t\t\t\t\t\tnames,\n\t\t\t\t\t\ttheme\n\t\t\t\t\t});\n\t\t\t\t\tthemeRuleSets = [...themeRuleSets, ...nextRules];\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError = true;\n\t\t\t\t_iteratorError = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn themeRuleSets;\n\t}\n\treturn [];\n}\nfunction getCSS(themeConfig) {\n\targuments.length > 1 && arguments[1] !== void 0 && arguments[1];\n\targuments.length > 2 && arguments[2];\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS && false);\n\treturn \"\";\n}\n\nexport { buildCSSRuleSets, createFontCSS, createThemeCSS, createTokenCSS, getCSS, getFontPropertyDeclarations };"],"mappings":"AAAA,S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AAID,SAAS,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,IAAIA,SAAS,CAAC,CAAC,CAAC;EAC/DA,SAAS,CAACC,MAAM,GAAG,CAAC,IAAID,SAAS,CAAC,CAAC,CAAC;EACpC,IAAI,CAACgB,OAAO,CAACC,GAAG,CAACC,sBAAsB,IAAI,KAAK,EAAC;EACjD,OAAO,EAAE;AACV;AAEA,SAAS0C,gBAAgB,EAAEX,aAAa,EAAE2B,cAAc,EAAE/D,cAAc,EAAEwE,MAAM,EAAExF,2BAA2B","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"createDesignSystem.native.js","names":[],"sources":["esm/helpers/createDesignSystem.native.js"],"sourcesContent":["import { isWeb } from \"@tamagui/constants\";\nimport { registerCSSVariable, variableToCSS } from \"./registerCSSVariable\";\nimport { getThemeCSSRules } from \"./getThemeCSSRules\";\n\nfunction createTokenCSS(tokens, shouldTokenCategoryHaveUnits) {\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS) {\n\t\tvar declarations = [];\n\t\tvar sortedTokenKeys = Object.keys(tokens).sort();\n\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\ttry {\n\t\t\tfor (var _iterator = sortedTokenKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\tvar key = _step.value;\n\t\t\t\tvar sortedSubKeys = Object.keys(tokens[key]).sort();\n\t\t\t\tvar _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n\t\t\t\ttry {\n\t\t\t\t\tfor (var _iterator1 = sortedSubKeys[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n\t\t\t\t\t\tvar skey = _step1.value;\n\t\t\t\t\t\tvar variable = tokens[key][skey];\n\t\t\t\t\t\tif (isWeb) {\n\t\t\t\t\t\t\tregisterCSSVariable(variable);\n\t\t\t\t\t\t\tvar variableNeedsPx = variable.needsPx === true;\n\t\t\t\t\t\t\tvar categoryNeedsPx = shouldTokenCategoryHaveUnits(key);\n\t\t\t\t\t\t\tvar shouldBeUnitless = !(variableNeedsPx || categoryNeedsPx);\n\t\t\t\t\t\t\tdeclarations.push(variableToCSS(variable, shouldBeUnitless));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (err) {\n\t\t\t\t\t_didIteratorError1 = true;\n\t\t\t\t\t_iteratorError1 = err;\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (!_iteratorNormalCompletion1 && _iterator1.return != null) _iterator1.return();\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif (_didIteratorError1) throw _iteratorError1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t_didIteratorError = true;\n\t\t\t_iteratorError = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t}\n\t\t}\n\t\treturn declarations;\n\t}\n\treturn [];\n}\nfunction createFontCSS(fontsParsed, registerFontVariables) {\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS) {\n\t\tvar fontDeclarations = {};\n\t\tif (!fontsParsed) return fontDeclarations;\n\t\tvar sortedFontKeys = Object.keys(fontsParsed).sort();\n\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\ttry {\n\t\t\tfor (var _iterator = sortedFontKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\tvar key = _step.value;\n\t\t\t\tvar fontParsed = fontsParsed[key];\n\t\t\t\tvar [name, language] = key.includes(\"_\") ? key.split(\"_\") : [key];\n\t\t\t\tfontDeclarations[key] = {\n\t\t\t\t\tname,\n\t\t\t\t\tdeclarations: registerFontVariables(fontParsed),\n\t\t\t\t\tlanguage,\n\t\t\t\t\tfontParsed\n\t\t\t\t};\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t_didIteratorError = true;\n\t\t\t_iteratorError = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t}\n\t\t}\n\t\treturn fontDeclarations;\n\t}\n\treturn {};\n}\nfunction buildCSSRuleSets(declarations, fontDeclarations) {\n\tvar defaultFontToken = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : \"\";\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS) {\n\t\tlet declarationsToRuleSet2 = function(decs) {\n\t\t\treturn `:root${arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : \"\"} {${sep}${[...decs].join(`;${sep}`)}\n}`;\n\t\t};\n\t\tvar cssRuleSets = [];\n\t\tvar sep = \" \";\n\t\tif (declarations.length) cssRuleSets.push(declarationsToRuleSet2(declarations));\n\t\tvar fontSelectors = [];\n\t\tvar sortedFontDeclarationKeys = Object.keys(fontDeclarations).sort();\n\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\ttry {\n\t\t\tfor (var _iterator = sortedFontDeclarationKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\tvar { name, declarations: _$declarations, language = \"default\" } = fontDeclarations[_step.value];\n\t\t\t\tvar fontSelector = `.font_${name}`;\n\t\t\t\tfontSelectors.push(fontSelector);\n\t\t\t\tvar langSelector = `:root .t_lang-${name}-${language} ${fontSelector}`;\n\t\t\t\tvar specificRuleSet = declarationsToRuleSet2(_$declarations, language === \"default\" ? ` ${fontSelector}, ${langSelector}` : langSelector);\n\t\t\t\tcssRuleSets.push(specificRuleSet);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t_didIteratorError = true;\n\t\t\t_iteratorError = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t}\n\t\t}\n\t\tif (fontSelectors.length) {\n\t\t\tvar defaultFont = fontDeclarations[defaultFontToken];\n\t\t\tif (defaultFont === null || defaultFont === void 0 ? void 0 : defaultFont.fontParsed) {\n\t\t\t\tvar sharedSelectors = `:where(${[...fontSelectors, \".is_View\"].join(\", \")})`;\n\t\t\t\tcssRuleSets.push(`${sharedSelectors} {font-family: var(--f-family)}`);\n\t\t\t}\n\t\t}\n\t\treturn cssRuleSets;\n\t}\n\treturn [];\n}\nfunction createThemeCSS(dedupedThemes, configIn) {\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS) {\n\t\tvar themeRuleSets = [];\n\t\tif (isWeb) {\n\t\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\t\ttry {\n\t\t\t\tfor (var _iterator = dedupedThemes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\tvar { names, theme } = _step.value;\n\t\t\t\t\tvar nextRules = getThemeCSSRules({\n\t\t\t\t\t\tconfig: configIn,\n\t\t\t\t\t\tthemeName: names[0],\n\t\t\t\t\t\tnames,\n\t\t\t\t\t\ttheme\n\t\t\t\t\t});\n\t\t\t\t\tthemeRuleSets = [...themeRuleSets, ...nextRules];\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError = true;\n\t\t\t\t_iteratorError = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn themeRuleSets;\n\t}\n\treturn [];\n}\nfunction getCSS(themeConfig) {\n\targuments.length > 1 && arguments[1] !== void 0 && arguments[1];\n\targuments.length > 2 && arguments[2];\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS && false);\n\treturn \"\";\n}\n\nexport { buildCSSRuleSets, createFontCSS, createThemeCSS, createTokenCSS, getCSS };"],"mappings":";;;;;AAIA,SAAS,eAAe,QAAQ,8BAA8B;CAC7D,IAAI,CAAC,QAAQ,IAAI,wBAAwB;EACxC,IAAI,eAAe,CAAC;EACpB,IAAI,kBAAkB,OAAO,KAAK,MAAM,EAAE,KAAK;EAC/C,IAAI,4BAA4B,MAAM,oBAAoB,OAAO,iBAAiB,KAAK;EACvF,IAAI;GACH,KAAK,IAAI,YAAY,gBAAgB,OAAO,UAAU,GAAG,OAAO,EAAE,6BAA6B,QAAQ,UAAU,KAAK,GAAG,OAAO,4BAA4B,MAAM;IACjK,IAAI,MAAM,MAAM;IAChB,IAAI,gBAAgB,OAAO,KAAK,OAAO,IAAI,EAAE,KAAK;IAClD,IAAI,6BAA6B,MAAM,qBAAqB,OAAO,kBAAkB,KAAK;IAC1F,IAAI;KACH,KAAK,IAAI,aAAa,cAAc,OAAO,UAAU,GAAG,QAAQ,EAAE,8BAA8B,SAAS,WAAW,KAAK,GAAG,OAAO,6BAA6B,MAAM;MACrK,IAAI,OAAO,OAAO;MAClB,IAAI,WAAW,OAAO,KAAK;MAC3B,IAAI,OAAO;OACV,oBAAoB,QAAQ;OAC5B,IAAI,kBAAkB,SAAS,YAAY;OAC3C,IAAI,kBAAkB,6BAA6B,GAAG;OACtD,IAAI,mBAAmB,EAAE,mBAAmB;OAC5C,aAAa,KAAK,cAAc,UAAU,gBAAgB,CAAC;MAC5D;KACD;IACD,SAAS,KAAK;KACb,qBAAqB;KACrB,kBAAkB;IACnB,UAAU;KACT,IAAI;MACH,IAAI,CAAC,8BAA8B,WAAW,UAAU,MAA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O;CACR;CACA,OAAO,CAAC;AACT;AACA,SAAS,eAAe,eAAe,UAAU;CAChD,IAAI,CAAC,QAAQ,IAAI,wBAAwB;EACxC,IAAI,gBAAgB,CAAC;EACrB,IAAI,OAAO;GACV,IAAI,4BAA4B,MAAM,oBAAoB,OAAO,iBAAiB,KAAK;GACvF,IAAI;IACH,KAAK,IAAI,YAAY,cAAc,OAAO,UAAU,GAAG,OAAO,EAAE,6BAA6B,QAAQ,UAAU,KAAK,GAAG,OAAO,4BAA4B,MAAM;KAC/J,IAAI,EAAE,OAAO,UAAU,MAAM;KAC7B,IAAI,YAAY,iBAAiB;MAChC,QAAQ;MACR,WAAW,MAAM;MACjB;MACA;KACD,CAAC;KACD,gBAAgB,CAAC,GAAG,eAAe,GAAG,SAAS;IAChD;GACD,SAAS,KAAK;IACb,oBAAoB;IACpB,iBAAiB;GAClB,UAAU;IACT,IAAI;KACH,IAAI,CAAC,6BAA6B,UAAU,UAAU,MAAM,UAAU,OAAO;IAC9E,UAAU;KACT,IAAI,mBAAmB,MAAM;IAC9B;GACD;EACD;EACA,OAAO;CACR;CACA,OAAO,CAAC;AACT;AACA,SAAS,OAAO,aAAa;CAC5B,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,KAAK,UAAU;CAC7D,UAAU,SAAS,KAAK,UAAU;CAClC,IAAI,CAAC,QAAQ,IAAI,0BAA0B;CAC3C,OAAO;AACR"}
|
|
@@ -1,65 +1,64 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { isPlainObject } from "./isObj.mjs";
|
|
2
3
|
import { mergeProps } from "./mergeProps.mjs";
|
|
3
4
|
import { objectIdentityKey } from "./objectIdentityKey.mjs";
|
|
4
5
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
const createStyledContext = (defaultValues, namespace = "") => {
|
|
6
|
-
"use no memo";
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
7
|
+
const createStyledContext = ((defaultValues, namespaceOrOptions = "") => {
|
|
8
|
+
"use no memo";
|
|
9
|
+
const createReactContext = React[Math.random() ? "createContext" : "createContext"];
|
|
10
|
+
const useReactMemo = React[Math.random() ? "useMemo" : "useMemo"];
|
|
11
|
+
const useReactContext = React[Math.random() ? "useContext" : "useContext"];
|
|
12
|
+
const namespace = typeof namespaceOrOptions === "string" ? namespaceOrOptions : namespaceOrOptions.namespace || "";
|
|
13
|
+
const propKeys = typeof namespaceOrOptions === "string" ? isPlainObject(defaultValues) ? Object.keys(defaultValues) : void 0 : namespaceOrOptions.keys || (isPlainObject(defaultValues) ? Object.keys(defaultValues) : void 0);
|
|
14
|
+
const OGContext = createReactContext(defaultValues);
|
|
15
|
+
const OGProvider = OGContext.Provider;
|
|
16
|
+
const Context = OGContext;
|
|
17
|
+
const scopedContexts = /* @__PURE__ */ new Map();
|
|
18
|
+
const LastScopeInNamespace = createReactContext(namespace);
|
|
19
|
+
function getOrCreateScopedContext(scope) {
|
|
20
|
+
let ScopedContext = scopedContexts.get(scope);
|
|
21
|
+
if (!ScopedContext) {
|
|
22
|
+
ScopedContext = createReactContext(defaultValues);
|
|
23
|
+
scopedContexts.set(scope, ScopedContext);
|
|
24
|
+
}
|
|
25
|
+
return ScopedContext;
|
|
26
|
+
}
|
|
27
|
+
const getNamespacedScope = (scope) => namespace ? `${namespace}--${scope}` : scope;
|
|
28
|
+
const Provider = ({ children, scope: scopeIn, __disableMergeDefaultValues, ...values }) => {
|
|
29
|
+
const scope = getNamespacedScope(scopeIn);
|
|
30
|
+
const next = useReactMemo(() => {
|
|
31
|
+
if (__disableMergeDefaultValues) {
|
|
32
|
+
return values;
|
|
33
|
+
}
|
|
34
|
+
return mergeProps(defaultValues || {}, values);
|
|
35
|
+
}, [objectIdentityKey(values)]);
|
|
36
|
+
let ScopedProvider = OGProvider;
|
|
37
|
+
if (scope) {
|
|
38
|
+
ScopedProvider = getOrCreateScopedContext(scope).Provider;
|
|
39
|
+
}
|
|
40
|
+
return /* @__PURE__ */ jsx(LastScopeInNamespace.Provider, {
|
|
41
|
+
value: scope,
|
|
42
|
+
children: /* @__PURE__ */ jsx(ScopedProvider, {
|
|
43
|
+
value: next,
|
|
44
|
+
children
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
const useStyledContext = (scopeIn = "") => {
|
|
49
|
+
const lastScopeInNamespace = useReactContext(LastScopeInNamespace);
|
|
50
|
+
const scope = namespace ? scopeIn ? getNamespacedScope(scopeIn) : lastScopeInNamespace : scopeIn;
|
|
51
|
+
const context = scope ? getOrCreateScopedContext(scope) : OGContext;
|
|
52
|
+
const value = useReactContext(context);
|
|
53
|
+
return value;
|
|
54
|
+
};
|
|
55
|
+
Context.Provider = Provider;
|
|
56
|
+
Context.props = defaultValues;
|
|
57
|
+
Context.propKeys = propKeys;
|
|
58
|
+
Context.context = OGContext;
|
|
59
|
+
Context.useStyledContext = useStyledContext;
|
|
60
|
+
return Context;
|
|
61
|
+
});
|
|
62
|
+
|
|
64
63
|
export { createStyledContext };
|
|
65
64
|
//# sourceMappingURL=createStyledContext.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"file":"createStyledContext.js","names":[],"sources":["esm/helpers/createStyledContext.js"],"sourcesContent":["import React from \"react\";\nimport { isPlainObject } from \"./isObj\";\nimport { mergeProps } from \"./mergeProps\";\nimport { objectIdentityKey } from \"./objectIdentityKey\";\nimport { jsx } from \"react/jsx-runtime\";\nconst createStyledContext = ((defaultValues, namespaceOrOptions = \"\") => {\n \"use no memo\";\n const createReactContext = React[Math.random() ? \"createContext\" : \"createContext\"];\n const useReactMemo = React[Math.random() ? \"useMemo\" : \"useMemo\"];\n const useReactContext = React[Math.random() ? \"useContext\" : \"useContext\"];\n const namespace = typeof namespaceOrOptions === \"string\" ? namespaceOrOptions : namespaceOrOptions.namespace || \"\";\n const propKeys = typeof namespaceOrOptions === \"string\" ? isPlainObject(defaultValues) ? Object.keys(defaultValues) : void 0 : namespaceOrOptions.keys || (isPlainObject(defaultValues) ? Object.keys(defaultValues) : void 0);\n const OGContext = createReactContext(defaultValues);\n const OGProvider = OGContext.Provider;\n const Context = OGContext;\n const scopedContexts = /* @__PURE__ */ new Map();\n const LastScopeInNamespace = createReactContext(namespace);\n function getOrCreateScopedContext(scope) {\n let ScopedContext = scopedContexts.get(scope);\n if (!ScopedContext) {\n ScopedContext = createReactContext(defaultValues);\n scopedContexts.set(scope, ScopedContext);\n }\n return ScopedContext;\n }\n const getNamespacedScope = (scope) => namespace ? `${namespace}--${scope}` : scope;\n const Provider = ({\n children,\n scope: scopeIn,\n // performance: avoid creating objects\n __disableMergeDefaultValues,\n ...values\n }) => {\n const scope = getNamespacedScope(scopeIn);\n const next = useReactMemo(() => {\n if (__disableMergeDefaultValues) {\n return values;\n }\n return mergeProps(defaultValues || {}, values);\n }, [objectIdentityKey(values)]);\n let ScopedProvider = OGProvider;\n if (scope) {\n ScopedProvider = getOrCreateScopedContext(scope).Provider;\n }\n return /* @__PURE__ */ jsx(LastScopeInNamespace.Provider, { value: scope, children: /* @__PURE__ */ jsx(ScopedProvider, { value: next, children }) });\n };\n const useStyledContext = (scopeIn = \"\") => {\n const lastScopeInNamespace = useReactContext(LastScopeInNamespace);\n const scope = namespace ? scopeIn ? getNamespacedScope(scopeIn) : lastScopeInNamespace : scopeIn;\n const context = scope ? getOrCreateScopedContext(scope) : OGContext;\n const value = useReactContext(context);\n return value;\n };\n Context.Provider = Provider;\n Context.props = defaultValues;\n Context.propKeys = propKeys;\n Context.context = OGContext;\n Context.useStyledContext = useStyledContext;\n return Context;\n});\nexport {\n createStyledContext\n};\n//# sourceMappingURL=createStyledContext.js.map\n"],"mappings":";;;;;;;AAKA,MAAM,wBAAwB,eAAe,qBAAqB,OAAO;CACvE;CACA,MAAM,qBAAqB,MAAM,KAAK,OAAO,IAAI,kBAAkB;CACnE,MAAM,eAAe,MAAM,KAAK,OAAO,IAAI,YAAY;CACvD,MAAM,kBAAkB,MAAM,KAAK,OAAO,IAAI,eAAe;CAC7D,MAAM,YAAY,OAAO,uBAAuB,WAAW,qBAAqB,mBAAmB,aAAa;CAChH,MAAM,WAAW,OAAO,uBAAuB,WAAW,cAAc,aAAa,IAAI,OAAO,KAAK,aAAa,IAAI,KAAK,IAAI,mBAAmB,SAAS,cAAc,aAAa,IAAI,OAAO,KAAK,aAAa,IAAI,KAAK;CAC5N,MAAM,YAAY,mBAAmB,aAAa;CAClD,MAAM,aAAa,UAAU;CAC7B,MAAM,UAAU;CAChB,MAAM,iCAAiC,IAAI,IAAI;CAC/C,MAAM,uBAAuB,mBAAmB,SAAS;CACzD,SAAS,yBAAyB,OAAO;EACvC,IAAI,gBAAgB,eAAe,IAAI,KAAK;EAC5C,IAAI,CAAC,eAAe;GAClB,gBAAgB,mBAAmB,aAAa;GAChD,eAAe,IAAI,OAAO,aAAa;EACzC;EACA,OAAO;CACT;CACA,MAAM,sBAAsB,UAAU,YAAY,GA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