@tamagui/web 3.0.0-beta.807.1 → 3.0.0-beta.881.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/config.cjs +1 -1
- package/dist/cjs/config.native.cjs +1 -1
- package/dist/cjs/config.native.js +1 -1
- package/dist/cjs/config.native.js.map +1 -1
- package/dist/cjs/createComponent.cjs +40 -19
- package/dist/cjs/createComponent.native.cjs +42 -21
- package/dist/cjs/createComponent.native.js +42 -21
- package/dist/cjs/createComponent.native.js.map +1 -1
- package/dist/cjs/createStyledHOC.cjs +54 -4
- package/dist/cjs/createStyledHOC.native.cjs +55 -4
- package/dist/cjs/createStyledHOC.native.js +55 -4
- package/dist/cjs/createStyledHOC.native.js.map +1 -1
- package/dist/cjs/createTokens.cjs +1 -1
- package/dist/cjs/createTokens.native.cjs +1 -1
- package/dist/cjs/createTokens.native.js +1 -1
- package/dist/cjs/createTokens.native.js.map +1 -1
- package/dist/cjs/createVariable.cjs +0 -10
- package/dist/cjs/createVariable.native.cjs +0 -10
- package/dist/cjs/createVariable.native.js +0 -10
- package/dist/cjs/createVariable.native.js.map +1 -1
- package/dist/cjs/dom/html.cjs +147 -99
- package/dist/cjs/dom/htmlRuntime.native.cjs +6 -2
- package/dist/cjs/dom/htmlRuntime.native.js +6 -2
- package/dist/cjs/dom/htmlRuntime.native.js.map +1 -1
- package/dist/cjs/dom/primitives.native.cjs +16 -13
- package/dist/cjs/dom/primitives.native.js +16 -13
- package/dist/cjs/dom/primitives.native.js.map +1 -1
- package/dist/cjs/helpers/borderComponents.cjs +62 -0
- package/dist/cjs/helpers/borderComponents.native.cjs +82 -0
- package/dist/cjs/helpers/borderComponents.native.js +84 -0
- package/dist/cjs/helpers/borderComponents.native.js.map +1 -0
- package/dist/cjs/helpers/componentDisplayName.cjs +1 -11
- package/dist/cjs/helpers/componentDisplayName.native.cjs +1 -11
- package/dist/cjs/helpers/componentDisplayName.native.js +1 -11
- package/dist/cjs/helpers/componentDisplayName.native.js.map +1 -1
- package/dist/cjs/helpers/createDesignSystem.cjs +0 -2
- package/dist/cjs/helpers/createStyledContext.cjs +10 -18
- package/dist/cjs/helpers/createStyledContext.native.cjs +14 -18
- package/dist/cjs/helpers/createStyledContext.native.js +14 -18
- package/dist/cjs/helpers/createStyledContext.native.js.map +1 -1
- package/dist/cjs/helpers/formatDiagnostic.cjs +8 -10
- package/dist/cjs/helpers/formatDiagnostic.native.cjs +8 -10
- package/dist/cjs/helpers/formatDiagnostic.native.js +8 -10
- package/dist/cjs/helpers/formatDiagnostic.native.js.map +1 -1
- package/dist/cjs/helpers/getCSSStylesAtomic.cjs +133 -114
- package/dist/cjs/helpers/getCSSStylesAtomic.native.cjs +11 -3
- package/dist/cjs/helpers/getCSSStylesAtomic.native.js +11 -3
- package/dist/cjs/helpers/getCSSStylesAtomic.native.js.map +1 -1
- package/dist/cjs/helpers/getCSSStylesAtomicCompiled.cjs +13 -1
- package/dist/cjs/helpers/getCSSStylesAtomicCompiled.native.cjs +15 -1
- package/dist/cjs/helpers/getCSSStylesAtomicCompiled.native.js +15 -1
- package/dist/cjs/helpers/getCSSStylesAtomicCompiled.native.js.map +1 -1
- package/dist/cjs/helpers/getDynamicVal.cjs +5 -1
- package/dist/cjs/helpers/getDynamicVal.native.cjs +5 -1
- package/dist/cjs/helpers/getDynamicVal.native.js +5 -1
- package/dist/cjs/helpers/getDynamicVal.native.js.map +1 -1
- package/dist/cjs/helpers/getSplitStyles.cjs +1063 -2168
- package/dist/cjs/helpers/getSplitStyles.native.cjs +1115 -2515
- package/dist/cjs/helpers/getSplitStyles.native.js +1115 -2515
- package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/cjs/helpers/grammarConfig.cjs +163 -1
- package/dist/cjs/helpers/grammarConfig.native.cjs +186 -1
- package/dist/cjs/helpers/grammarConfig.native.js +186 -1
- package/dist/cjs/helpers/grammarConfig.native.js.map +1 -1
- package/dist/cjs/helpers/insertStyleRule.cjs +5 -1
- package/dist/cjs/helpers/insertStyleRule.native.cjs +7 -1
- package/dist/cjs/helpers/insertStyleRule.native.js +7 -1
- package/dist/cjs/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/cjs/helpers/log.cjs +9 -8
- package/dist/cjs/helpers/log.native.cjs +9 -8
- package/dist/cjs/helpers/log.native.js +9 -8
- package/dist/cjs/helpers/log.native.js.map +1 -1
- package/dist/cjs/helpers/mergeVariants.cjs +44 -13
- package/dist/cjs/helpers/mergeVariants.native.cjs +79 -14
- package/dist/cjs/helpers/mergeVariants.native.js +79 -14
- package/dist/cjs/helpers/mergeVariants.native.js.map +1 -1
- package/dist/cjs/helpers/nativeOnlyProps.cjs +0 -1
- package/dist/cjs/helpers/nativeOnlyProps.native.cjs +0 -1
- package/dist/cjs/helpers/nativeOnlyProps.native.js +0 -1
- package/dist/cjs/helpers/nativeOnlyProps.native.js.map +1 -1
- package/dist/cjs/helpers/nativeStyleEngine.cjs +34 -14
- package/dist/cjs/helpers/nativeStyleEngine.native.cjs +36 -14
- package/dist/cjs/helpers/nativeStyleEngine.native.js +36 -14
- package/dist/cjs/helpers/nativeStyleEngine.native.js.map +1 -1
- package/dist/cjs/helpers/normalizeValueWithProperty.cjs +7 -8
- package/dist/cjs/helpers/normalizeValueWithProperty.native.cjs +9 -8
- package/dist/cjs/helpers/normalizeValueWithProperty.native.js +9 -8
- package/dist/cjs/helpers/normalizeValueWithProperty.native.js.map +1 -1
- package/dist/cjs/helpers/parseBorderShorthand.native.cjs +25 -56
- package/dist/cjs/helpers/parseBorderShorthand.native.js +25 -56
- package/dist/cjs/helpers/parseBorderShorthand.native.js.map +1 -1
- package/dist/cjs/helpers/parseOutlineShorthand.native.cjs +9 -49
- package/dist/cjs/helpers/parseOutlineShorthand.native.js +9 -49
- package/dist/cjs/helpers/parseOutlineShorthand.native.js.map +1 -1
- package/dist/cjs/helpers/resolveSafeArea.cjs +35 -100
- package/dist/cjs/helpers/resolveVariantStyle.cjs +57 -0
- package/dist/cjs/helpers/resolveVariantStyle.native.cjs +67 -0
- package/dist/cjs/helpers/resolveVariantStyle.native.js +69 -0
- package/dist/cjs/helpers/resolveVariantStyle.native.js.map +1 -0
- package/dist/cjs/helpers/splitStyleProps.cjs +46 -0
- package/dist/cjs/helpers/splitStyleProps.native.cjs +49 -0
- package/dist/cjs/helpers/splitStyleProps.native.js +51 -0
- package/dist/cjs/helpers/splitStyleProps.native.js.map +1 -0
- package/dist/cjs/helpers/{getDefaultProps.native.cjs → styleStaticConfig.cjs} +7 -8
- package/dist/cjs/helpers/{getDefaultProps.native.js → styleStaticConfig.native.cjs} +7 -8
- package/dist/cjs/helpers/styleStaticConfig.native.js +31 -0
- package/dist/cjs/helpers/styleStaticConfig.native.js.map +1 -0
- package/dist/cjs/helpers/styleStaticConfigCore.cjs +107 -0
- package/dist/cjs/helpers/styleStaticConfigCore.native.cjs +127 -0
- package/dist/cjs/helpers/styleStaticConfigCore.native.js +129 -0
- package/dist/cjs/helpers/styleStaticConfigCore.native.js.map +1 -0
- package/dist/cjs/helpers/styledDynamic.cjs +160 -0
- package/dist/cjs/helpers/styledDynamic.native.cjs +195 -0
- package/dist/cjs/helpers/styledDynamic.native.js +197 -0
- package/dist/cjs/helpers/styledDynamic.native.js.map +1 -0
- package/dist/cjs/helpers/tokenCategories.cjs +12 -74
- package/dist/cjs/helpers/tokenCategories.native.cjs +12 -76
- package/dist/cjs/helpers/tokenCategories.native.js +12 -76
- package/dist/cjs/helpers/tokenCategories.native.js.map +1 -1
- package/dist/cjs/helpers/variableValue.cjs +17 -12
- package/dist/cjs/helpers/variableValue.native.cjs +46 -23
- package/dist/cjs/helpers/variableValue.native.js +46 -23
- package/dist/cjs/helpers/variableValue.native.js.map +1 -1
- package/dist/cjs/helpers/warnOnce.cjs +5 -4
- package/dist/cjs/helpers/warnOnce.native.cjs +6 -4
- package/dist/cjs/helpers/warnOnce.native.js +6 -4
- package/dist/cjs/helpers/warnOnce.native.js.map +1 -1
- package/dist/cjs/hooks/useAnimationDriver.cjs +2 -2
- package/dist/cjs/hooks/useAnimationDriver.native.cjs +2 -2
- package/dist/cjs/hooks/useAnimationDriver.native.js +2 -2
- package/dist/cjs/hooks/useAnimationDriver.native.js.map +1 -1
- package/dist/cjs/hooks/useComponentState.cjs +41 -82
- package/dist/cjs/hooks/useComponentState.native.cjs +45 -84
- package/dist/cjs/hooks/useComponentState.native.js +45 -84
- package/dist/cjs/hooks/useComponentState.native.js.map +1 -1
- package/dist/cjs/hooks/useMedia.cjs +2 -2
- package/dist/cjs/hooks/useMedia.native.cjs +2 -2
- package/dist/cjs/hooks/useMedia.native.js +2 -2
- package/dist/cjs/hooks/useMedia.native.js.map +1 -1
- package/dist/cjs/hooks/useSplitStyles.cjs +2 -2
- package/dist/cjs/hooks/useSplitStyles.native.cjs +2 -2
- package/dist/cjs/hooks/useSplitStyles.native.js +2 -2
- package/dist/cjs/hooks/useSplitStyles.native.js.map +1 -1
- package/dist/cjs/{helpers/getDefaultProps.cjs → hooks/useStyle.cjs} +10 -4
- package/dist/cjs/{helpers/directStyleCSS.native.js → hooks/useStyle.native.cjs} +16 -6
- package/dist/cjs/hooks/useStyle.native.js +34 -0
- package/dist/cjs/hooks/useStyle.native.js.map +1 -0
- package/dist/cjs/hooks/useThemeState.cjs +25 -90
- package/dist/cjs/hooks/useThemeState.native.cjs +34 -94
- package/dist/cjs/hooks/useThemeState.native.js +34 -94
- package/dist/cjs/hooks/useThemeState.native.js.map +1 -1
- package/dist/cjs/index.cjs +9 -12
- package/dist/cjs/index.native.cjs +9 -12
- package/dist/cjs/index.native.js +9 -12
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/internal-runtime.cjs +8 -7
- package/dist/cjs/internal-runtime.native.cjs +8 -7
- package/dist/cjs/internal-runtime.native.js +8 -7
- package/dist/cjs/internal-runtime.native.js.map +1 -1
- package/dist/cjs/static-resolve.cjs +8 -7
- package/dist/cjs/static-resolve.native.cjs +8 -7
- package/dist/cjs/static-resolve.native.js +8 -7
- package/dist/cjs/static-resolve.native.js.map +1 -1
- package/dist/cjs/style.cjs +91 -0
- package/dist/cjs/style.native.cjs +98 -0
- package/dist/cjs/style.native.js +100 -0
- package/dist/cjs/style.native.js.map +1 -0
- package/dist/cjs/styled.cjs +15 -62
- package/dist/cjs/styled.native.cjs +15 -64
- package/dist/cjs/styled.native.js +15 -64
- package/dist/cjs/styled.native.js.map +1 -1
- package/dist/cjs/types.cjs +4 -22
- package/dist/cjs/types.native.cjs +4 -22
- package/dist/cjs/types.native.js +4 -22
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/cjs/views/TamaguiProvider.cjs +1 -2
- package/dist/cjs/views/TamaguiProvider.native.cjs +1 -2
- package/dist/cjs/views/TamaguiProvider.native.js +1 -2
- package/dist/cjs/views/TamaguiProvider.native.js.map +1 -1
- package/dist/cjs/views/Text.cjs +21 -14
- package/dist/cjs/views/Text.native.cjs +5 -2
- package/dist/cjs/views/Text.native.js +5 -2
- package/dist/cjs/views/Text.native.js.map +1 -1
- package/dist/cjs/views/Theme.cjs +2 -2
- package/dist/cjs/views/Theme.native.cjs +2 -2
- package/dist/cjs/views/Theme.native.js +2 -2
- package/dist/cjs/views/Theme.native.js.map +1 -1
- package/dist/cjs/views/ThemeDebug.cjs +1 -4
- package/dist/cjs/views/View.cjs +4 -2
- package/dist/cjs/views/View.native.cjs +4 -2
- package/dist/cjs/views/View.native.js +4 -2
- package/dist/cjs/views/View.native.js.map +1 -1
- package/dist/esm/config.mjs +1 -1
- package/dist/esm/config.mjs.map +1 -1
- package/dist/esm/config.native.js +1 -1
- package/dist/esm/config.native.js.map +1 -1
- package/dist/esm/createComponent.mjs +41 -20
- package/dist/esm/createComponent.mjs.map +1 -1
- package/dist/esm/createComponent.native.js +43 -22
- package/dist/esm/createComponent.native.js.map +1 -1
- package/dist/esm/createStyledHOC.mjs +55 -5
- package/dist/esm/createStyledHOC.mjs.map +1 -1
- package/dist/esm/createStyledHOC.native.js +56 -5
- package/dist/esm/createStyledHOC.native.js.map +1 -1
- package/dist/esm/createTokens.mjs +1 -1
- package/dist/esm/createTokens.mjs.map +1 -1
- package/dist/esm/createTokens.native.js +1 -1
- package/dist/esm/createTokens.native.js.map +1 -1
- package/dist/esm/createVariable.mjs +1 -9
- package/dist/esm/createVariable.mjs.map +1 -1
- package/dist/esm/createVariable.native.js +1 -9
- package/dist/esm/createVariable.native.js.map +1 -1
- package/dist/esm/dom/html.mjs +147 -99
- package/dist/esm/dom/html.mjs.map +1 -1
- package/dist/esm/dom/htmlRuntime.native.js +7 -3
- package/dist/esm/dom/htmlRuntime.native.js.map +1 -1
- package/dist/esm/dom/primitives.native.js +16 -13
- package/dist/esm/dom/primitives.native.js.map +1 -1
- package/dist/esm/helpers/borderComponents.mjs +37 -0
- package/dist/esm/helpers/borderComponents.mjs.map +1 -0
- package/dist/esm/helpers/borderComponents.native.js +55 -0
- package/dist/esm/helpers/borderComponents.native.js.map +1 -0
- package/dist/esm/helpers/componentDisplayName.mjs +1 -8
- package/dist/esm/helpers/componentDisplayName.mjs.map +1 -1
- package/dist/esm/helpers/componentDisplayName.native.js +1 -8
- package/dist/esm/helpers/componentDisplayName.native.js.map +1 -1
- package/dist/esm/helpers/createDesignSystem.mjs +0 -2
- package/dist/esm/helpers/createDesignSystem.mjs.map +1 -1
- package/dist/esm/helpers/createStyledContext.mjs +10 -18
- package/dist/esm/helpers/createStyledContext.mjs.map +1 -1
- package/dist/esm/helpers/createStyledContext.native.js +14 -18
- package/dist/esm/helpers/createStyledContext.native.js.map +1 -1
- package/dist/esm/helpers/formatDiagnostic.mjs +8 -10
- package/dist/esm/helpers/formatDiagnostic.mjs.map +1 -1
- package/dist/esm/helpers/formatDiagnostic.native.js +8 -10
- package/dist/esm/helpers/formatDiagnostic.native.js.map +1 -1
- package/dist/esm/helpers/getCSSStylesAtomic.mjs +131 -114
- package/dist/esm/helpers/getCSSStylesAtomic.mjs.map +1 -1
- package/dist/esm/helpers/getCSSStylesAtomic.native.js +7 -4
- package/dist/esm/helpers/getCSSStylesAtomic.native.js.map +1 -1
- package/dist/esm/helpers/getCSSStylesAtomicCompiled.mjs +8 -1
- package/dist/esm/helpers/getCSSStylesAtomicCompiled.mjs.map +1 -1
- package/dist/esm/helpers/getCSSStylesAtomicCompiled.native.js +10 -1
- package/dist/esm/helpers/getCSSStylesAtomicCompiled.native.js.map +1 -1
- package/dist/esm/helpers/getDynamicVal.mjs +5 -1
- package/dist/esm/helpers/getDynamicVal.mjs.map +1 -1
- package/dist/esm/helpers/getDynamicVal.native.js +5 -1
- package/dist/esm/helpers/getDynamicVal.native.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.mjs +1052 -2151
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +1090 -2481
- package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/esm/helpers/grammarConfig.mjs +164 -2
- package/dist/esm/helpers/grammarConfig.mjs.map +1 -1
- package/dist/esm/helpers/grammarConfig.native.js +187 -2
- package/dist/esm/helpers/grammarConfig.native.js.map +1 -1
- package/dist/esm/helpers/insertStyleRule.mjs +5 -2
- package/dist/esm/helpers/insertStyleRule.mjs.map +1 -1
- package/dist/esm/helpers/insertStyleRule.native.js +7 -2
- package/dist/esm/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/esm/helpers/log.mjs +9 -8
- package/dist/esm/helpers/log.mjs.map +1 -1
- package/dist/esm/helpers/log.native.js +9 -8
- package/dist/esm/helpers/log.native.js.map +1 -1
- package/dist/esm/helpers/mergeVariants.mjs +44 -13
- package/dist/esm/helpers/mergeVariants.mjs.map +1 -1
- package/dist/esm/helpers/mergeVariants.native.js +79 -14
- package/dist/esm/helpers/mergeVariants.native.js.map +1 -1
- package/dist/esm/helpers/nativeOnlyProps.mjs +0 -1
- package/dist/esm/helpers/nativeOnlyProps.mjs.map +1 -1
- package/dist/esm/helpers/nativeOnlyProps.native.js +0 -1
- package/dist/esm/helpers/nativeOnlyProps.native.js.map +1 -1
- package/dist/esm/helpers/nativeStyleEngine.mjs +34 -15
- package/dist/esm/helpers/nativeStyleEngine.mjs.map +1 -1
- package/dist/esm/helpers/nativeStyleEngine.native.js +36 -15
- package/dist/esm/helpers/nativeStyleEngine.native.js.map +1 -1
- package/dist/esm/helpers/normalizeValueWithProperty.mjs +7 -8
- package/dist/esm/helpers/normalizeValueWithProperty.mjs.map +1 -1
- package/dist/esm/helpers/normalizeValueWithProperty.native.js +9 -8
- package/dist/esm/helpers/normalizeValueWithProperty.native.js.map +1 -1
- package/dist/esm/helpers/parseBorderShorthand.native.js +23 -56
- package/dist/esm/helpers/parseBorderShorthand.native.js.map +1 -1
- package/dist/esm/helpers/parseOutlineShorthand.native.js +10 -49
- package/dist/esm/helpers/parseOutlineShorthand.native.js.map +1 -1
- package/dist/esm/helpers/resolveSafeArea.mjs +35 -97
- package/dist/esm/helpers/resolveSafeArea.mjs.map +1 -1
- package/dist/esm/helpers/resolveVariantStyle.mjs +38 -0
- package/dist/esm/helpers/resolveVariantStyle.mjs.map +1 -0
- package/dist/esm/helpers/resolveVariantStyle.native.js +46 -0
- package/dist/esm/helpers/resolveVariantStyle.native.js.map +1 -0
- package/dist/esm/helpers/splitStyleProps.mjs +27 -0
- package/dist/esm/helpers/splitStyleProps.mjs.map +1 -0
- package/dist/esm/helpers/splitStyleProps.native.js +28 -0
- package/dist/esm/helpers/splitStyleProps.native.js.map +1 -0
- package/dist/esm/helpers/styleStaticConfig.mjs +8 -0
- package/dist/esm/helpers/styleStaticConfig.mjs.map +1 -0
- package/dist/esm/helpers/styleStaticConfig.native.js +8 -0
- package/dist/esm/helpers/styleStaticConfig.native.js.map +1 -0
- package/dist/esm/helpers/styleStaticConfigCore.mjs +88 -0
- package/dist/esm/helpers/styleStaticConfigCore.mjs.map +1 -0
- package/dist/esm/helpers/styleStaticConfigCore.native.js +106 -0
- package/dist/esm/helpers/styleStaticConfigCore.native.js.map +1 -0
- package/dist/esm/helpers/styledDynamic.mjs +136 -0
- package/dist/esm/helpers/styledDynamic.mjs.map +1 -0
- package/dist/esm/helpers/styledDynamic.native.js +169 -0
- package/dist/esm/helpers/styledDynamic.native.js.map +1 -0
- package/dist/esm/helpers/tokenCategories.mjs +12 -72
- package/dist/esm/helpers/tokenCategories.mjs.map +1 -1
- package/dist/esm/helpers/tokenCategories.native.js +12 -74
- package/dist/esm/helpers/tokenCategories.native.js.map +1 -1
- package/dist/esm/helpers/variableValue.mjs +17 -12
- package/dist/esm/helpers/variableValue.mjs.map +1 -1
- package/dist/esm/helpers/variableValue.native.js +46 -23
- package/dist/esm/helpers/variableValue.native.js.map +1 -1
- package/dist/esm/helpers/warnOnce.mjs +5 -4
- package/dist/esm/helpers/warnOnce.mjs.map +1 -1
- package/dist/esm/helpers/warnOnce.native.js +6 -4
- package/dist/esm/helpers/warnOnce.native.js.map +1 -1
- package/dist/esm/hooks/useAnimationDriver.mjs +2 -2
- package/dist/esm/hooks/useAnimationDriver.mjs.map +1 -1
- package/dist/esm/hooks/useAnimationDriver.native.js +2 -2
- package/dist/esm/hooks/useAnimationDriver.native.js.map +1 -1
- package/dist/esm/hooks/useComponentState.mjs +41 -82
- package/dist/esm/hooks/useComponentState.mjs.map +1 -1
- package/dist/esm/hooks/useComponentState.native.js +45 -84
- package/dist/esm/hooks/useComponentState.native.js.map +1 -1
- package/dist/esm/hooks/useMedia.mjs +2 -2
- package/dist/esm/hooks/useMedia.mjs.map +1 -1
- package/dist/esm/hooks/useMedia.native.js +2 -2
- package/dist/esm/hooks/useMedia.native.js.map +1 -1
- package/dist/esm/hooks/useSplitStyles.mjs +2 -2
- package/dist/esm/hooks/useSplitStyles.mjs.map +1 -1
- package/dist/esm/hooks/useSplitStyles.native.js +2 -2
- package/dist/esm/hooks/useSplitStyles.native.js.map +1 -1
- package/dist/esm/hooks/useStyle.mjs +11 -0
- package/dist/esm/hooks/useStyle.mjs.map +1 -0
- package/dist/esm/hooks/useStyle.native.js +11 -0
- package/dist/esm/hooks/useStyle.native.js.map +1 -0
- package/dist/esm/hooks/useThemeState.mjs +25 -90
- package/dist/esm/hooks/useThemeState.mjs.map +1 -1
- package/dist/esm/hooks/useThemeState.native.js +34 -94
- package/dist/esm/hooks/useThemeState.native.js.map +1 -1
- package/dist/esm/index.js +8 -8
- package/dist/esm/index.mjs +8 -8
- package/dist/esm/index.native.js +8 -8
- package/dist/esm/internal-runtime.mjs +8 -7
- package/dist/esm/internal-runtime.mjs.map +1 -1
- package/dist/esm/internal-runtime.native.js +8 -7
- package/dist/esm/internal-runtime.native.js.map +1 -1
- package/dist/esm/static-resolve.mjs +11 -9
- package/dist/esm/static-resolve.mjs.map +1 -1
- package/dist/esm/static-resolve.native.js +11 -9
- package/dist/esm/static-resolve.native.js.map +1 -1
- package/dist/esm/style.mjs +58 -0
- package/dist/esm/style.mjs.map +1 -0
- package/dist/esm/style.native.js +63 -0
- package/dist/esm/style.native.js.map +1 -0
- package/dist/esm/styled.mjs +17 -62
- package/dist/esm/styled.mjs.map +1 -1
- package/dist/esm/styled.native.js +17 -64
- package/dist/esm/styled.native.js.map +1 -1
- package/dist/esm/types.mjs +3 -21
- package/dist/esm/types.mjs.map +1 -1
- package/dist/esm/types.native.js +3 -21
- package/dist/esm/types.native.js.map +1 -1
- package/dist/esm/views/TamaguiProvider.mjs +1 -2
- package/dist/esm/views/TamaguiProvider.mjs.map +1 -1
- package/dist/esm/views/TamaguiProvider.native.js +1 -2
- package/dist/esm/views/TamaguiProvider.native.js.map +1 -1
- package/dist/esm/views/Text.mjs +21 -14
- package/dist/esm/views/Text.mjs.map +1 -1
- package/dist/esm/views/Text.native.js +4 -2
- package/dist/esm/views/Text.native.js.map +1 -1
- package/dist/esm/views/Theme.mjs +2 -2
- package/dist/esm/views/Theme.mjs.map +1 -1
- package/dist/esm/views/Theme.native.js +2 -2
- package/dist/esm/views/Theme.native.js.map +1 -1
- package/dist/esm/views/ThemeDebug.mjs +1 -4
- package/dist/esm/views/ThemeDebug.mjs.map +1 -1
- package/dist/esm/views/View.mjs +4 -2
- package/dist/esm/views/View.mjs.map +1 -1
- package/dist/esm/views/View.native.js +4 -2
- package/dist/esm/views/View.native.js.map +1 -1
- package/package.json +15 -15
- package/src/config.ts +1 -1
- package/src/createComponent.tsx +62 -31
- package/src/createStyledHOC.tsx +56 -9
- package/src/createTokens.ts +1 -1
- package/src/createVariable.ts +0 -10
- package/src/dom/html.tsx +778 -877
- package/src/dom/htmlRuntime.native.tsx +7 -3
- package/src/dom/primitives.native.tsx +30 -39
- package/src/helpers/borderComponents.ts +62 -0
- package/src/helpers/componentDisplayName.ts +0 -11
- package/src/helpers/createDesignSystem.ts +0 -2
- package/src/helpers/createStyledContext.tsx +15 -53
- package/src/helpers/formatDiagnostic.ts +11 -13
- package/src/helpers/getCSSStylesAtomic.native.ts +6 -3
- package/src/helpers/getCSSStylesAtomic.ts +197 -206
- package/src/helpers/getCSSStylesAtomicCompiled.ts +13 -1
- package/src/helpers/getDynamicVal.ts +4 -0
- package/src/helpers/getSplitStyles.tsx +2058 -4052
- package/src/helpers/grammarConfig.ts +218 -1
- package/src/helpers/insertStyleRule.tsx +4 -2
- package/src/helpers/log.ts +12 -11
- package/src/helpers/mergeVariants.ts +55 -18
- package/src/helpers/nativeOnlyProps.ts +0 -1
- package/src/helpers/nativeStyleEngine.ts +55 -14
- package/src/helpers/normalizeValueWithProperty.ts +10 -12
- package/src/helpers/parseBorderShorthand.native.ts +23 -45
- package/src/helpers/parseOutlineShorthand.native.ts +9 -40
- package/src/helpers/resolveSafeArea.ts +34 -101
- package/src/helpers/resolveVariantStyle.ts +77 -0
- package/src/helpers/splitStyleProps.ts +166 -0
- package/src/helpers/styleFrontend.ts +16 -9
- package/src/helpers/styleStaticConfig.ts +21 -0
- package/src/helpers/styleStaticConfigCore.ts +110 -0
- package/src/helpers/styledDynamic.ts +191 -0
- package/src/helpers/tokenCategories.ts +32 -88
- package/src/helpers/variableValue.ts +20 -15
- package/src/helpers/warnOnce.ts +5 -4
- package/src/hooks/useAnimationDriver.ts +6 -2
- package/src/hooks/useComponentState.ts +55 -183
- package/src/hooks/useMedia.tsx +10 -8
- package/src/hooks/useSplitStyles.tsx +17 -2
- package/src/hooks/useStyle.ts +10 -0
- package/src/hooks/useTheme.tsx +1 -1
- package/src/hooks/useThemeState.ts +51 -264
- package/src/index.ts +14 -10
- package/src/internal-runtime.ts +10 -9
- package/src/internalRuntimeTypes.ts +1 -0
- package/src/static-resolve.ts +25 -18
- package/src/style.ts +97 -0
- package/src/styled.tsx +46 -332
- package/src/types.tsx +107 -192
- package/src/views/TamaguiProvider.tsx +0 -2
- package/src/views/Text.tsx +26 -21
- package/src/views/Theme.tsx +10 -8
- package/src/views/ThemeDebug.tsx +0 -1
- package/src/views/View.tsx +6 -7
- package/types/createComponent.d.ts.map +1 -1
- package/types/createStyledHOC.d.ts.map +1 -1
- package/types/createVariable.d.ts +0 -2
- package/types/createVariable.d.ts.map +1 -1
- package/types/dom/html.d.ts.map +1 -1
- package/types/dom/htmlRuntime.native.d.ts.map +1 -1
- package/types/dom/primitives.native.d.ts.map +1 -1
- package/types/helpers/borderComponents.d.ts +10 -0
- package/types/helpers/borderComponents.d.ts.map +1 -0
- package/types/helpers/componentDisplayName.d.ts +0 -3
- package/types/helpers/componentDisplayName.d.ts.map +1 -1
- package/types/helpers/createDesignSystem.d.ts.map +1 -1
- package/types/helpers/createStyledContext.d.ts.map +1 -1
- package/types/helpers/formatDiagnostic.d.ts.map +1 -1
- package/types/helpers/getCSSStylesAtomic.d.ts +25 -22
- package/types/helpers/getCSSStylesAtomic.d.ts.map +1 -1
- package/types/helpers/getCSSStylesAtomic.native.d.ts +5 -0
- package/types/helpers/getCSSStylesAtomic.native.d.ts.map +1 -1
- package/types/helpers/getCSSStylesAtomicCompiled.d.ts +6 -1
- package/types/helpers/getCSSStylesAtomicCompiled.d.ts.map +1 -1
- package/types/helpers/getDynamicVal.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts +9 -11
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/grammarConfig.d.ts +25 -2
- package/types/helpers/grammarConfig.d.ts.map +1 -1
- package/types/helpers/insertStyleRule.d.ts +1 -0
- package/types/helpers/insertStyleRule.d.ts.map +1 -1
- package/types/helpers/log.d.ts.map +1 -1
- package/types/helpers/mergeVariants.d.ts.map +1 -1
- package/types/helpers/nativeOnlyProps.d.ts +0 -1
- package/types/helpers/nativeOnlyProps.d.ts.map +1 -1
- package/types/helpers/nativeStyleEngine.d.ts +6 -0
- package/types/helpers/nativeStyleEngine.d.ts.map +1 -1
- package/types/helpers/normalizeValueWithProperty.d.ts.map +1 -1
- package/types/helpers/parseBorderShorthand.native.d.ts +1 -0
- package/types/helpers/parseBorderShorthand.native.d.ts.map +1 -1
- package/types/helpers/parseOutlineShorthand.native.d.ts.map +1 -1
- package/types/helpers/resolveSafeArea.d.ts +0 -1
- package/types/helpers/resolveSafeArea.d.ts.map +1 -1
- package/types/helpers/resolveVariantStyle.d.ts +3 -0
- package/types/helpers/resolveVariantStyle.d.ts.map +1 -0
- package/types/helpers/splitStyleProps.d.ts +44 -0
- package/types/helpers/splitStyleProps.d.ts.map +1 -0
- package/types/helpers/styleFrontend.d.ts +7 -9
- package/types/helpers/styleFrontend.d.ts.map +1 -1
- package/types/helpers/styleStaticConfig.d.ts +14 -0
- package/types/helpers/styleStaticConfig.d.ts.map +1 -0
- package/types/helpers/styleStaticConfigCore.d.ts +4 -0
- package/types/helpers/styleStaticConfigCore.d.ts.map +1 -0
- package/types/helpers/styledDynamic.d.ts +18 -0
- package/types/helpers/styledDynamic.d.ts.map +1 -0
- package/types/helpers/tokenCategories.d.ts +0 -1
- package/types/helpers/tokenCategories.d.ts.map +1 -1
- package/types/helpers/variableValue.d.ts.map +1 -1
- package/types/helpers/warnOnce.d.ts.map +1 -1
- package/types/helpers/webPropsToSkip.native.d.ts +68 -68
- package/types/hooks/useAnimationDriver.d.ts.map +1 -1
- package/types/hooks/useComponentState.d.ts.map +1 -1
- package/types/hooks/useMedia.d.ts.map +1 -1
- package/types/hooks/useSplitStyles.d.ts.map +1 -1
- package/types/hooks/useStyle.d.ts +4 -0
- package/types/hooks/useStyle.d.ts.map +1 -0
- package/types/hooks/useThemeState.d.ts +1 -11
- package/types/hooks/useThemeState.d.ts.map +1 -1
- package/types/index.d.ts +8 -8
- package/types/index.d.ts.map +1 -1
- package/types/internal-runtime.d.ts.map +1 -1
- package/types/internalRuntimeTypes.d.ts +1 -1
- package/types/internalRuntimeTypes.d.ts.map +1 -1
- package/types/static-resolve.d.ts +2 -2
- package/types/static-resolve.d.ts.map +1 -1
- package/types/style.d.ts +18 -0
- package/types/style.d.ts.map +1 -0
- package/types/styled.d.ts +12 -48
- package/types/styled.d.ts.map +1 -1
- package/types/types.d.ts +75 -60
- package/types/types.d.ts.map +1 -1
- package/types/views/TamaguiProvider.d.ts +1 -1
- package/types/views/TamaguiProvider.d.ts.map +1 -1
- package/types/views/Text.d.ts.map +1 -1
- package/types/views/Theme.d.ts.map +1 -1
- package/types/views/ThemeDebug.d.ts.map +1 -1
- package/types/views/View.d.ts.map +1 -1
- package/dist/cjs/helpers/directStyleCSS.cjs +0 -348
- package/dist/cjs/helpers/directStyleCSS.native.cjs +0 -20
- package/dist/cjs/helpers/directStyleCSS.native.js.map +0 -1
- package/dist/cjs/helpers/directStyleCSSCompiled.cjs +0 -40
- package/dist/cjs/helpers/directStyleCSSCompiled.native.cjs +0 -46
- package/dist/cjs/helpers/directStyleCSSCompiled.native.js +0 -48
- package/dist/cjs/helpers/directStyleCSSCompiled.native.js.map +0 -1
- package/dist/cjs/helpers/getDefaultProps.native.js.map +0 -1
- package/dist/cjs/helpers/getVariantExtras.cjs +0 -91
- package/dist/cjs/helpers/getVariantExtras.native.cjs +0 -94
- package/dist/cjs/helpers/getVariantExtras.native.js +0 -96
- package/dist/cjs/helpers/getVariantExtras.native.js.map +0 -1
- package/dist/cjs/helpers/themeable.cjs +0 -92
- package/dist/cjs/helpers/themeable.native.cjs +0 -95
- package/dist/cjs/helpers/themeable.native.js +0 -97
- package/dist/cjs/helpers/themeable.native.js.map +0 -1
- package/dist/cjs/hooks/useProps.cjs +0 -129
- package/dist/cjs/hooks/useProps.native.cjs +0 -135
- package/dist/cjs/hooks/useProps.native.js +0 -137
- package/dist/cjs/hooks/useProps.native.js.map +0 -1
- package/dist/esm/helpers/directStyleCSS.mjs +0 -320
- package/dist/esm/helpers/directStyleCSS.mjs.map +0 -1
- package/dist/esm/helpers/directStyleCSS.native.js +0 -1
- package/dist/esm/helpers/directStyleCSSCompiled.mjs +0 -11
- package/dist/esm/helpers/directStyleCSSCompiled.mjs.map +0 -1
- package/dist/esm/helpers/directStyleCSSCompiled.native.js +0 -15
- package/dist/esm/helpers/directStyleCSSCompiled.native.js.map +0 -1
- package/dist/esm/helpers/getDefaultProps.mjs +0 -4
- package/dist/esm/helpers/getDefaultProps.mjs.map +0 -1
- package/dist/esm/helpers/getDefaultProps.native.js +0 -6
- package/dist/esm/helpers/getDefaultProps.native.js.map +0 -1
- package/dist/esm/helpers/getVariantExtras.mjs +0 -69
- package/dist/esm/helpers/getVariantExtras.mjs.map +0 -1
- package/dist/esm/helpers/getVariantExtras.native.js +0 -70
- package/dist/esm/helpers/getVariantExtras.native.js.map +0 -1
- package/dist/esm/helpers/themeable.mjs +0 -67
- package/dist/esm/helpers/themeable.mjs.map +0 -1
- package/dist/esm/helpers/themeable.native.js +0 -68
- package/dist/esm/helpers/themeable.native.js.map +0 -1
- package/dist/esm/hooks/useProps.mjs +0 -100
- package/dist/esm/hooks/useProps.mjs.map +0 -1
- package/dist/esm/hooks/useProps.native.js +0 -104
- package/dist/esm/hooks/useProps.native.js.map +0 -1
- package/src/helpers/directStyleCSS.native.ts +0 -1
- package/src/helpers/directStyleCSS.ts +0 -534
- package/src/helpers/directStyleCSSCompiled.ts +0 -32
- package/src/helpers/getDefaultProps.ts +0 -3
- package/src/helpers/getVariantExtras.tsx +0 -95
- package/src/helpers/themeable.tsx +0 -96
- package/src/hooks/useProps.tsx +0 -186
- package/types/helpers/directStyleCSS.d.ts +0 -28
- package/types/helpers/directStyleCSS.d.ts.map +0 -1
- package/types/helpers/directStyleCSS.native.d.ts +0 -2
- package/types/helpers/directStyleCSS.native.d.ts.map +0 -1
- package/types/helpers/directStyleCSSCompiled.d.ts +0 -10
- package/types/helpers/directStyleCSSCompiled.d.ts.map +0 -1
- package/types/helpers/getDefaultProps.d.ts +0 -3
- package/types/helpers/getDefaultProps.d.ts.map +0 -1
- package/types/helpers/getVariantExtras.d.ts +0 -4
- package/types/helpers/getVariantExtras.d.ts.map +0 -1
- package/types/helpers/themeable.d.ts +0 -3
- package/types/helpers/themeable.d.ts.map +0 -1
- package/types/hooks/useProps.d.ts +0 -39
- package/types/hooks/useProps.d.ts.map +0 -1
package/dist/cjs/config.cjs
CHANGED
|
@@ -138,7 +138,7 @@ const useTokens = getTokens;
|
|
|
138
138
|
const getThemes = () => getConfigFromGlobalOrLocal().themes;
|
|
139
139
|
const updateConfig = (key, value) => {
|
|
140
140
|
const config = getConfigFromGlobalOrLocal();
|
|
141
|
-
if (!config || !
|
|
141
|
+
if (!config || key === "__proto__" || !(key in config)) {
|
|
142
142
|
return;
|
|
143
143
|
}
|
|
144
144
|
Object.assign(config[key], value);
|
|
@@ -152,7 +152,7 @@ var getThemes = function() {
|
|
|
152
152
|
};
|
|
153
153
|
var updateConfig = function(key, value) {
|
|
154
154
|
var config = getConfigFromGlobalOrLocal();
|
|
155
|
-
if (!config || !
|
|
155
|
+
if (!config || key === "__proto__" || !(key in config)) {
|
|
156
156
|
return;
|
|
157
157
|
}
|
|
158
158
|
Object.assign(config[key], value);
|
|
@@ -152,7 +152,7 @@ var getThemes = function() {
|
|
|
152
152
|
};
|
|
153
153
|
var updateConfig = function(key, value) {
|
|
154
154
|
var config = getConfigFromGlobalOrLocal();
|
|
155
|
-
if (!config || !
|
|
155
|
+
if (!config || key === "__proto__" || !(key in config)) {
|
|
156
156
|
return;
|
|
157
157
|
}
|
|
158
158
|
Object.assign(config[key], value);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.native.js","names":[],"sources":["cjs/config.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar config_exports = {};\n__export(config_exports, {\n devConfig: () => devConfig,\n getConfig: () => getConfig,\n getConfigMaybe: () => getConfigMaybe,\n getFont: () => getFont,\n getSetting: () => getSetting,\n getStyleCompat: () => getStyleCompat,\n getThemes: () => getThemes,\n getToken: () => getToken,\n getTokenObject: () => getTokenObject,\n getTokenValue: () => getTokenValue,\n getTokens: () => getTokens,\n loadAnimationDriver: () => loadAnimationDriver,\n setConfig: () => setConfig,\n setConfigFont: () => setConfigFont,\n setTokens: () => setTokens,\n setupDev: () => setupDev,\n updateConfig: () => updateConfig,\n useTokens: () => useTokens\n});\nmodule.exports = __toCommonJS(config_exports);\nvar import_constants = require(\"@tamagui/constants\");\nvar import_constants2 = require(\"./constants/constants\");\nvar import_formatDiagnostic = require(\"./helpers/formatDiagnostic\");\nvar import_grammarConfig = require(\"./helpers/grammarConfig\");\nvar conf;\nvar setConfigCalledByThisInstance = false;\nvar haventCalledErrorMessage = process.env.NODE_ENV === \"development\" ? `\nHaven't called createTamagui yet. ${import_constants2.MISSING_THEME_MESSAGE}\n` : `\\u274C Error 001`;\nvar getConfigFromGlobalOrLocal = function() {\n if (conf) {\n return conf;\n }\n if (globalThis.__tamaguiConfig) {\n if (process.env.NODE_ENV === \"development\" && !globalThis.__tamaguiHasWarnedGlobalFallback && !globalThis.__tamaguiPendingCheck) {\n globalThis.__tamaguiPendingCheck = true;\n setTimeout(function() {\n if (!setConfigCalledByThisInstance && !globalThis.__tamaguiHasWarnedGlobalFallback) {\n globalThis.__tamaguiHasWarnedGlobalFallback = true;\n console.warn(`\\u26A0\\uFE0F\\u26A0\\uFE0F\\u26A0\\uFE0F\\u26A0\\uFE0F\\u26A0\\uFE0F\n\nTamagui: Using global config fallback. This may indicate duplicate tamagui instances (e.g., from Vite SSR bundling). This is handled automatically, but likely causes issues!\n\n\\u26A0\\uFE0F\\u26A0\\uFE0F\\u26A0\\uFE0F\\u26A0\\uFE0F\\u26A0\\uFE0F`);\n }\n globalThis.__tamaguiPendingCheck = false;\n }, 500);\n }\n return globalThis.__tamaguiConfig;\n }\n return null;\n};\nvar getSetting = function(key) {\n var config = getConfigFromGlobalOrLocal();\n if (process.env.NODE_ENV === \"development\") {\n if (!config) throw new Error(haventCalledErrorMessage);\n }\n var _config_settings_key;\n return (_config_settings_key = config.settings[key]) !== null && _config_settings_key !== void 0 ? _config_settings_key : (\n // @ts-expect-error\n config[key]\n );\n};\nfunction getStyleCompat() {\n var config = getConfigFromGlobalOrLocal();\n var _config_settings_styleCompat;\n return ((_config_settings_styleCompat = config === null || config === void 0 ? void 0 : config.settings.styleCompat) !== null && _config_settings_styleCompat !== void 0 ? _config_settings_styleCompat : config === null || config === void 0 ? void 0 : config.styleCompat) || \"web\";\n}\nvar setConfig = function(next) {\n setConfigCalledByThisInstance = true;\n var previous = conf;\n var previousGlobal = globalThis.__tamaguiConfig;\n (0, import_grammarConfig.prepareConfigRevision)(next);\n if (conf !== previous || globalThis.__tamaguiConfig !== previousGlobal) return;\n conf = next;\n globalThis.__tamaguiConfig = next;\n};\nvar setConfigFont = function(name, font, fontParsed) {\n var config = getConfigFromGlobalOrLocal();\n if (process.env.NODE_ENV === \"development\") {\n if (!config) throw new Error(haventCalledErrorMessage);\n }\n config.fonts[name] = font;\n config.fontsParsed[name] = fontParsed;\n (0, import_grammarConfig.prepareConfigRevision)(config);\n};\nvar getConfig = function() {\n var config = getConfigFromGlobalOrLocal();\n if (!config) {\n throw new Error((0, import_formatDiagnostic.formatDiagnostic)(\"Err0\", \"TamaguiConfig\", \"no config is available\", \"Call createTamagui before rendering and deduplicate Tamagui package versions\", \"config\", config));\n }\n return config;\n};\nvar getConfigMaybe = function() {\n return getConfigFromGlobalOrLocal();\n};\nvar tokens;\nfunction setTokens(next) {\n tokens = next;\n}\nvar getTokensParsed = function() {\n var _getConfigFromGlobalOrLocal;\n var _getConfigFromGlobalOrLocal_tokensParsed;\n return (_getConfigFromGlobalOrLocal_tokensParsed = (_getConfigFromGlobalOrLocal = getConfigFromGlobalOrLocal()) === null || _getConfigFromGlobalOrLocal === void 0 ? void 0 : _getConfigFromGlobalOrLocal.tokensParsed) !== null && _getConfigFromGlobalOrLocal_tokensParsed !== void 0 ? _getConfigFromGlobalOrLocal_tokensParsed : tokens;\n};\nvar getTokens = function() {\n if (process.env.NODE_ENV === \"development\") {\n if (!getConfigFromGlobalOrLocal()) throw new Error(haventCalledErrorMessage);\n }\n return getTokensParsed();\n};\nvar getTokenObject = function(value, group) {\n var _tokens_group, _tokens_;\n var tokens2 = getTokensParsed();\n return group ? (_tokens_group = tokens2[group]) === null || _tokens_group === void 0 ? void 0 : _tokens_group[value] : (_tokens_ = tokens2[Object.keys(tokens2).find(function(cat) {\n return tokens2[cat][value];\n }) || \"\"]) === null || _tokens_ === void 0 ? void 0 : _tokens_[value];\n};\nvar getToken = function(value, group) {\n var useVariable = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : import_constants.isWeb;\n var token = getTokenObject(value, group);\n return useVariable ? token === null || token === void 0 ? void 0 : token.variable : token === null || token === void 0 ? void 0 : token.val;\n};\nvar getTokenValue = function(value, group) {\n if (value === \"unset\" || value === \"auto\") return;\n return getToken(value, group, false);\n};\nvar useTokens = getTokens;\nvar getThemes = function() {\n return getConfigFromGlobalOrLocal().themes;\n};\nvar updateConfig = function(key, value) {\n var config = getConfigFromGlobalOrLocal();\n if (!config || !Object.prototype.hasOwnProperty.call(config, key)) {\n return;\n }\n Object.assign(config[key], value);\n (0, import_grammarConfig.prepareConfigRevision)(config);\n};\nvar getFont = function(name) {\n var _Object_entries_find;\n var conf2 = getConfig();\n var _conf_fontsParsed_name;\n return (_conf_fontsParsed_name = conf2.fontsParsed[name]) !== null && _conf_fontsParsed_name !== void 0 ? _conf_fontsParsed_name : (_Object_entries_find = Object.entries(conf2.fontsParsed).find(function(param) {\n var [k] = param;\n var _conf_fontsParsed_k_family, _conf_fontsParsed_k;\n return ((_conf_fontsParsed_k = conf2.fontsParsed[k]) === null || _conf_fontsParsed_k === void 0 ? void 0 : (_conf_fontsParsed_k_family = _conf_fontsParsed_k.family) === null || _conf_fontsParsed_k_family === void 0 ? void 0 : _conf_fontsParsed_k_family[\"val\"]) === name;\n })) === null || _Object_entries_find === void 0 ? void 0 : _Object_entries_find[1];\n};\nvar devConfig;\nfunction setupDev(conf2) {\n if (process.env.NODE_ENV === \"development\") {\n devConfig = conf2;\n }\n}\nfunction loadAnimationDriver(name, driver) {\n var config = getConfigFromGlobalOrLocal();\n if (!config) {\n if (process.env.NODE_ENV === \"development\") {\n console.warn(\"loadAnimationDriver called before createTamagui\");\n }\n return;\n }\n if (config.animations && !(\"default\" in config.animations)) {\n ;\n config.animations = {\n default: config.animations\n };\n }\n if (config.animations) {\n ;\n config.animations[name] = driver;\n } else {\n ;\n config.animations = {\n default: driver,\n [name]: driver\n };\n }\n}\n//# sourceMappingURL=config.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UA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IAAI,aAAa,eAAe;GAC1C,QAAQ,KAAK,iDAAiD;EAChE;EACA;CACF;CACA,IAAI,OAAO,cAAc,EAAE,aAAa,OAAO,aAAa;EAC1D;EACA,OAAO,aAAa,EAClB,SAAS,OAAO,WAClB;CACF;CACA,IAAI,OAAO,YAAY;EACrB;EACA,OAAO,WAAW,QAAQ;CAC5B,OAAO;EACL;EACA,OAAO,aAAa;GAClB,SAAS;IACR,OAAO;EACV;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"config.native.js","names":[],"sources":["cjs/config.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar config_exports = {};\n__export(config_exports, {\n devConfig: () => devConfig,\n getConfig: () => getConfig,\n getConfigMaybe: () => getConfigMaybe,\n getFont: () => getFont,\n getSetting: () => getSetting,\n getStyleCompat: () => getStyleCompat,\n getThemes: () => getThemes,\n getToken: () => getToken,\n getTokenObject: () => getTokenObject,\n getTokenValue: () => getTokenValue,\n getTokens: () => getTokens,\n loadAnimationDriver: () => loadAnimationDriver,\n setConfig: () => setConfig,\n setConfigFont: () => setConfigFont,\n setTokens: () => setTokens,\n setupDev: () => setupDev,\n updateConfig: () => updateConfig,\n useTokens: () => useTokens\n});\nmodule.exports = __toCommonJS(config_exports);\nvar import_constants = require(\"@tamagui/constants\");\nvar import_constants2 = require(\"./constants/constants\");\nvar import_formatDiagnostic = require(\"./helpers/formatDiagnostic\");\nvar import_grammarConfig = require(\"./helpers/grammarConfig\");\nvar conf;\nvar setConfigCalledByThisInstance = false;\nvar haventCalledErrorMessage = process.env.NODE_ENV === \"development\" ? `\nHaven't called createTamagui yet. ${import_constants2.MISSING_THEME_MESSAGE}\n` : `\\u274C Error 001`;\nvar getConfigFromGlobalOrLocal = function() {\n if (conf) {\n return conf;\n }\n if (globalThis.__tamaguiConfig) {\n if (process.env.NODE_ENV === \"development\" && !globalThis.__tamaguiHasWarnedGlobalFallback && !globalThis.__tamaguiPendingCheck) {\n globalThis.__tamaguiPendingCheck = true;\n setTimeout(function() {\n if (!setConfigCalledByThisInstance && !globalThis.__tamaguiHasWarnedGlobalFallback) {\n globalThis.__tamaguiHasWarnedGlobalFallback = true;\n console.warn(`\\u26A0\\uFE0F\\u26A0\\uFE0F\\u26A0\\uFE0F\\u26A0\\uFE0F\\u26A0\\uFE0F\n\nTamagui: Using global config fallback. This may indicate duplicate tamagui instances (e.g., from Vite SSR bundling). This is handled automatically, but likely causes issues!\n\n\\u26A0\\uFE0F\\u26A0\\uFE0F\\u26A0\\uFE0F\\u26A0\\uFE0F\\u26A0\\uFE0F`);\n }\n globalThis.__tamaguiPendingCheck = false;\n }, 500);\n }\n return globalThis.__tamaguiConfig;\n }\n return null;\n};\nvar getSetting = function(key) {\n var config = getConfigFromGlobalOrLocal();\n if (process.env.NODE_ENV === \"development\") {\n if (!config) throw new Error(haventCalledErrorMessage);\n }\n var _config_settings_key;\n return (_config_settings_key = config.settings[key]) !== null && _config_settings_key !== void 0 ? _config_settings_key : (\n // @ts-expect-error\n config[key]\n );\n};\nfunction getStyleCompat() {\n var config = getConfigFromGlobalOrLocal();\n var _config_settings_styleCompat;\n return ((_config_settings_styleCompat = config === null || config === void 0 ? void 0 : config.settings.styleCompat) !== null && _config_settings_styleCompat !== void 0 ? _config_settings_styleCompat : config === null || config === void 0 ? void 0 : config.styleCompat) || \"web\";\n}\nvar setConfig = function(next) {\n setConfigCalledByThisInstance = true;\n var previous = conf;\n var previousGlobal = globalThis.__tamaguiConfig;\n (0, import_grammarConfig.prepareConfigRevision)(next);\n if (conf !== previous || globalThis.__tamaguiConfig !== previousGlobal) return;\n conf = next;\n globalThis.__tamaguiConfig = next;\n};\nvar setConfigFont = function(name, font, fontParsed) {\n var config = getConfigFromGlobalOrLocal();\n if (process.env.NODE_ENV === \"development\") {\n if (!config) throw new Error(haventCalledErrorMessage);\n }\n config.fonts[name] = font;\n config.fontsParsed[name] = fontParsed;\n (0, import_grammarConfig.prepareConfigRevision)(config);\n};\nvar getConfig = function() {\n var config = getConfigFromGlobalOrLocal();\n if (!config) {\n throw new Error((0, import_formatDiagnostic.formatDiagnostic)(\"Err0\", \"TamaguiConfig\", \"no config is available\", \"Call createTamagui before rendering and deduplicate Tamagui package versions\", \"config\", config));\n }\n return config;\n};\nvar getConfigMaybe = function() {\n return getConfigFromGlobalOrLocal();\n};\nvar tokens;\nfunction setTokens(next) {\n tokens = next;\n}\nvar getTokensParsed = function() {\n var _getConfigFromGlobalOrLocal;\n var _getConfigFromGlobalOrLocal_tokensParsed;\n return (_getConfigFromGlobalOrLocal_tokensParsed = (_getConfigFromGlobalOrLocal = getConfigFromGlobalOrLocal()) === null || _getConfigFromGlobalOrLocal === void 0 ? void 0 : _getConfigFromGlobalOrLocal.tokensParsed) !== null && _getConfigFromGlobalOrLocal_tokensParsed !== void 0 ? _getConfigFromGlobalOrLocal_tokensParsed : tokens;\n};\nvar getTokens = function() {\n if (process.env.NODE_ENV === \"development\") {\n if (!getConfigFromGlobalOrLocal()) throw new Error(haventCalledErrorMessage);\n }\n return getTokensParsed();\n};\nvar getTokenObject = function(value, group) {\n var _tokens_group, _tokens_;\n var tokens2 = getTokensParsed();\n return group ? (_tokens_group = tokens2[group]) === null || _tokens_group === void 0 ? void 0 : _tokens_group[value] : (_tokens_ = tokens2[Object.keys(tokens2).find(function(cat) {\n return tokens2[cat][value];\n }) || \"\"]) === null || _tokens_ === void 0 ? void 0 : _tokens_[value];\n};\nvar getToken = function(value, group) {\n var useVariable = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : import_constants.isWeb;\n var token = getTokenObject(value, group);\n return useVariable ? token === null || token === void 0 ? void 0 : token.variable : token === null || token === void 0 ? void 0 : token.val;\n};\nvar getTokenValue = function(value, group) {\n if (value === \"unset\" || value === \"auto\") return;\n return getToken(value, group, false);\n};\nvar useTokens = getTokens;\nvar getThemes = function() {\n return getConfigFromGlobalOrLocal().themes;\n};\nvar updateConfig = function(key, value) {\n var config = getConfigFromGlobalOrLocal();\n if (!config || key === \"__proto__\" || !(key in config)) {\n return;\n }\n Object.assign(config[key], value);\n (0, import_grammarConfig.prepareConfigRevision)(config);\n};\nvar getFont = function(name) {\n var _Object_entries_find;\n var conf2 = getConfig();\n var _conf_fontsParsed_name;\n return (_conf_fontsParsed_name = conf2.fontsParsed[name]) !== null && _conf_fontsParsed_name !== void 0 ? _conf_fontsParsed_name : (_Object_entries_find = Object.entries(conf2.fontsParsed).find(function(param) {\n var [k] = param;\n var _conf_fontsParsed_k_family, _conf_fontsParsed_k;\n return ((_conf_fontsParsed_k = conf2.fontsParsed[k]) === null || _conf_fontsParsed_k === void 0 ? void 0 : (_conf_fontsParsed_k_family = _conf_fontsParsed_k.family) === null || _conf_fontsParsed_k_family === void 0 ? void 0 : _conf_fontsParsed_k_family[\"val\"]) === name;\n })) === null || _Object_entries_find === void 0 ? void 0 : _Object_entries_find[1];\n};\nvar devConfig;\nfunction setupDev(conf2) {\n if (process.env.NODE_ENV === \"development\") {\n devConfig = conf2;\n }\n}\nfunction loadAnimationDriver(name, driver) {\n var config = getConfigFromGlobalOrLocal();\n if (!config) {\n if (process.env.NODE_ENV === \"development\") {\n console.warn(\"loadAnimationDriver called before createTamagui\");\n }\n return;\n }\n if (config.animations && !(\"default\" in config.animations)) {\n ;\n config.animations = {\n default: config.animations\n };\n }\n if (config.animations) {\n ;\n config.animations[name] = driver;\n } else {\n ;\n config.animations = {\n default: driver,\n [name]: driver\n };\n }\n}\n//# sourceMappingURL=config.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,iBAAiB,CAAC;AACtB,SAAS,gBAAgB;CACvB,iBAAiB;CACjB,iBAAiB;CACjB,sBAAsB;CACtB,eAAe;CACf,kBAAkB;CAClB,sBAAsB;CACtB,iBAAiB;CACjB,gBAAgB;CAChB,sBAAsB;CACtB,qBAAqB;CACrB,iBAAiB;CACjB,2BAA2B;CAC3B,iBAAiB;CACjB,qBAAqB;CACrB,iBAAiB;CACjB,gBAAgB;CAChB,oBAAoB;CACpB,iBAAiB;AACnB,CAAC;AACD,OAAO,UAAU,aAAa,cAAc;AAC5C,IAAI,mBAAmB,QAAQ,oBAAoB;AACnD,IAAI,oBAAoB,QAAQ,iCAAuB;AACvD,IAAI,0BAA0B,QAAQ,sCAA4B;AAClE,IAA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AACA,IAAI;AACJ,SAAS,SAAS,OAAO;CACvB,IAAI,QAAQ,IAAI,aAAa,eAAe;EAC1C,YAAY;CACd;AACF;AACA,SAAS,oBAAoB,MAAM,QAAQ;CACzC,IAAI,SAAS,2BAA2B;CACxC,IAAI,CAAC,QAAQ;EACX,IAAI,QAAQ,IAAI,aAAa,eAAe;GAC1C,QAAQ,KAAK,iDAAiD;EAChE;EACA;CACF;CACA,IAAI,OAAO,cAAc,EAAE,aAAa,OAAO,aAAa;EAC1D;EACA,OAAO,aAAa,EAClB,SAAS,OAAO,WAClB;CACF;CACA,IAAI,OAAO,YAAY;EACrB;EACA,OAAO,WAAW,QAAQ;CAC5B,OAAO;EACL;EACA,OAAO,aAAa;GAClB,SAAS;IACR,OAAO;EACV;CACF;AACF"}
|
|
@@ -43,9 +43,10 @@ var import_GroupContext = require("./contexts/GroupContext.cjs");
|
|
|
43
43
|
var import_createVariable = require("./createVariable.cjs");
|
|
44
44
|
var import_defaultComponentState = require("./defaultComponentState.cjs");
|
|
45
45
|
var import_eventHandling = require("./eventHandling.cjs");
|
|
46
|
-
var import_getDefaultProps = require("./helpers/getDefaultProps.cjs");
|
|
47
46
|
var import_componentDisplayName = require("./helpers/componentDisplayName.cjs");
|
|
48
47
|
var import_getSplitStyles = require("./helpers/getSplitStyles.cjs");
|
|
48
|
+
var import_grammarConfig = require("./helpers/grammarConfig.cjs");
|
|
49
|
+
var import_styleStaticConfig = require("./helpers/styleStaticConfig.cjs");
|
|
49
50
|
require("./helpers/nativeStyleEngine.cjs");
|
|
50
51
|
require("./hooks/getThemeProxied.cjs");
|
|
51
52
|
var import_log = require("./helpers/log.cjs");
|
|
@@ -187,21 +188,35 @@ if (import_constants.isWeb && typeof document !== "undefined") {
|
|
|
187
188
|
});
|
|
188
189
|
}
|
|
189
190
|
function createComponent(staticConfig) {
|
|
190
|
-
if (process.env.TAMAGUI_RUNTIME === "zero") throw new Error(`[tamagui zero-runtime] createComponent ran in a zero-runtime graph. No Tamagui component renderer ships in this mode, so a component reference survived compilation. Fix the site or move the owning module to a declared full-runtime island.`);
|
|
191
|
-
(0, import_getSplitStyles.prepareStyleStaticConfig)(staticConfig);
|
|
191
|
+
if (process.env.TAMAGUI_RUNTIME === "zero") throw new Error(process.env.NODE_ENV !== "production" ? `[tamagui zero-runtime] createComponent ran in a zero-runtime graph. No Tamagui component renderer ships in this mode, so a component reference survived compilation. Fix the site or move the owning module to a declared full-runtime island.` : "❌ Error 010");
|
|
192
192
|
let config = null;
|
|
193
193
|
let resolvedDefaultProps;
|
|
194
|
-
let
|
|
195
|
-
|
|
196
|
-
const styledContextKeys = styledContextPropKeys ? new Set(styledContextPropKeys) : void 0;
|
|
194
|
+
let resolvedStyleRevision = -1;
|
|
195
|
+
let resolvedStyleStaticConfig;
|
|
197
196
|
const { Component, isText, isHOC } = staticConfig;
|
|
198
197
|
let res;
|
|
198
|
+
const { displayName } = staticConfig;
|
|
199
199
|
const component = (propsInWithRef) => {
|
|
200
200
|
"use no memo";
|
|
201
|
-
const displayName = res[import_componentDisplayName.componentDisplayName];
|
|
202
201
|
const forwardedRef = propsInWithRef.ref;
|
|
203
202
|
const propsIn = propsInWithRef;
|
|
204
203
|
config = config || (0, import_config.getConfig)();
|
|
204
|
+
const styleRevision = (0, import_grammarConfig.getConfigRevisionState)(config).revision;
|
|
205
|
+
if (resolvedStyleRevision !== styleRevision) {
|
|
206
|
+
resolvedStyleRevision = styleRevision;
|
|
207
|
+
const nextStyleStaticConfig = (0, import_styleStaticConfig.getStyleStaticConfig)(staticConfig, config);
|
|
208
|
+
resolvedStyleStaticConfig = nextStyleStaticConfig;
|
|
209
|
+
resolvedDefaultProps = nextStyleStaticConfig.defaultProps;
|
|
210
|
+
if (import_constants.isWeb && !staticConfig.isText && config.settings.defaultPosition === "relative" && nextStyleStaticConfig.baseStyle?.position === void 0) resolvedStyleStaticConfig = {
|
|
211
|
+
...nextStyleStaticConfig,
|
|
212
|
+
baseStyle: {
|
|
213
|
+
position: "relative",
|
|
214
|
+
...nextStyleStaticConfig.baseStyle
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
const styleStaticConfig = resolvedStyleStaticConfig;
|
|
219
|
+
styleStaticConfig.styledContextKeys;
|
|
205
220
|
const internalID = process.env.NODE_ENV === "development" ? import_react.default.useId() : "";
|
|
206
221
|
if (process.env.NODE_ENV === "development") {
|
|
207
222
|
if (startVisualizer) {
|
|
@@ -229,14 +244,6 @@ function createComponent(staticConfig) {
|
|
|
229
244
|
if (process.env.NODE_ENV === "development" && !time && globalThis.time) time = globalThis.time;
|
|
230
245
|
if (process.env.NODE_ENV === "development" && time) time`non-tamagui time (ignore)`;
|
|
231
246
|
let props = propsIn;
|
|
232
|
-
if (!didResolveDefaultProps) {
|
|
233
|
-
didResolveDefaultProps = true;
|
|
234
|
-
const staticDefaultProps = (0, import_getDefaultProps.getDefaultProps)(staticConfig);
|
|
235
|
-
resolvedDefaultProps = import_constants.isWeb && !isText && config.settings.defaultPosition === "relative" && staticDefaultProps?.position === void 0 ? staticDefaultProps ? {
|
|
236
|
-
position: "relative",
|
|
237
|
-
...staticDefaultProps
|
|
238
|
-
} : { position: "relative" } : staticDefaultProps;
|
|
239
|
-
}
|
|
240
247
|
const [nextProps, overrides] = (0, import_mergeProps.mergeComponentProps)(resolvedDefaultProps, styledContextValue, propsIn);
|
|
241
248
|
props = nextProps;
|
|
242
249
|
overriddenContextProps = overrides;
|
|
@@ -416,12 +423,11 @@ ${banner}
|
|
|
416
423
|
willBeAnimated,
|
|
417
424
|
canPlatformPseudo: componentState.platformPseudo,
|
|
418
425
|
displayName,
|
|
419
|
-
styledContext: styledContextValue
|
|
420
|
-
styledContextKeys
|
|
426
|
+
styledContext: styledContextValue
|
|
421
427
|
};
|
|
422
428
|
const themeName = themeState?.name || "";
|
|
423
429
|
if (process.env.NODE_ENV === "development" && time) time`split-styles-prepare`;
|
|
424
|
-
const splitStyles = (0, import_useSplitStyles.useSplitStyles)(props, staticConfig, theme, themeName, state, styleProps, null, componentContext, groupContextParent, elementType, startedUnhydrated, debugProp, animationDriver);
|
|
430
|
+
const splitStyles = (0, import_useSplitStyles.useSplitStyles)(props, staticConfig, theme, themeName, state, styleProps, null, componentContext, groupContextParent, elementType, startedUnhydrated, debugProp, animationDriver, styleStaticConfig);
|
|
425
431
|
const finalizedComponentState = componentState.finalizeStyleFlags(!!splitStyles?.hasEnterStyle, !!splitStyles?.platformPseudo);
|
|
426
432
|
hasEnterStyle = finalizedComponentState.hasEnterStyle;
|
|
427
433
|
isAnimated = finalizedComponentState.isAnimated;
|
|
@@ -518,7 +524,7 @@ ${banner}
|
|
|
518
524
|
const nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, theme, themeName, updatedState, mediaState2 ? {
|
|
519
525
|
...styleProps,
|
|
520
526
|
mediaState: mediaState2
|
|
521
|
-
} : styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp, animationDriver);
|
|
527
|
+
} : styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp, animationDriver, styleStaticConfig);
|
|
522
528
|
const effectiveTransition = nextStyles?.effectiveTransition ?? props.transition ?? (platformPseudo ? "0ms" : void 0);
|
|
523
529
|
stateRef.current.prevPseudoState = (0, import_extractPseudoState.extractPseudoState)(updatedState);
|
|
524
530
|
const hasActivePseudo = Boolean(updatedState.hover || updatedState.press || updatedState.pressIn || updatedState.focus || updatedState.focusWithin);
|
|
@@ -1002,6 +1008,21 @@ ${banner}
|
|
|
1002
1008
|
res = component;
|
|
1003
1009
|
res = import_react.default.memo(res);
|
|
1004
1010
|
res.staticConfig = staticConfig;
|
|
1011
|
+
res.resolve = (resolver) => {
|
|
1012
|
+
const next = createComponent({
|
|
1013
|
+
...staticConfig,
|
|
1014
|
+
resolvers: staticConfig.resolvers ? [...staticConfig.resolvers, resolver] : [resolver]
|
|
1015
|
+
});
|
|
1016
|
+
for (const key in res) {
|
|
1017
|
+
if (key === "propTypes" || key in next) continue;
|
|
1018
|
+
next[key] = res[key];
|
|
1019
|
+
}
|
|
1020
|
+
return next;
|
|
1021
|
+
};
|
|
1022
|
+
if (displayName) {
|
|
1023
|
+
res.displayName = displayName;
|
|
1024
|
+
res[import_componentDisplayName.componentDisplayName] = displayName;
|
|
1025
|
+
}
|
|
1005
1026
|
return res;
|
|
1006
1027
|
}
|
|
1007
1028
|
const fromPx = (val) => {
|
|
@@ -46,9 +46,10 @@ var import_GroupContext = require("./contexts/GroupContext.native.js");
|
|
|
46
46
|
var import_createVariable = require("./createVariable.native.js");
|
|
47
47
|
var import_defaultComponentState = require("./defaultComponentState.native.js");
|
|
48
48
|
var import_eventHandling = require("./eventHandling.native.js");
|
|
49
|
-
var import_getDefaultProps = require("./helpers/getDefaultProps.native.js");
|
|
50
49
|
var import_componentDisplayName = require("./helpers/componentDisplayName.native.js");
|
|
51
50
|
var import_getSplitStyles = require("./helpers/getSplitStyles.native.js");
|
|
51
|
+
var import_grammarConfig = require("./helpers/grammarConfig.native.js");
|
|
52
|
+
var import_styleStaticConfig = require("./helpers/styleStaticConfig.native.js");
|
|
52
53
|
var import_nativeStyleEngine = require("./helpers/nativeStyleEngine.native.js");
|
|
53
54
|
var import_getThemeProxied = require("./hooks/getThemeProxied.native.js");
|
|
54
55
|
var import_log = require("./helpers/log.native.js");
|
|
@@ -116,24 +117,38 @@ if (import_constants.isWeb && typeof document !== "undefined") {
|
|
|
116
117
|
});
|
|
117
118
|
}
|
|
118
119
|
function createComponent(staticConfig) {
|
|
119
|
-
|
|
120
|
-
if (process.env.TAMAGUI_RUNTIME === "zero") throw new Error(`[tamagui zero-runtime] createComponent ran in a zero-runtime graph. No Tamagui component renderer ships in this mode, so a component reference survived compilation. Fix the site or move the owning module to a declared full-runtime island.`);
|
|
121
|
-
(0, import_getSplitStyles.prepareStyleStaticConfig)(staticConfig);
|
|
120
|
+
if (process.env.TAMAGUI_RUNTIME === "zero") throw new Error(process.env.NODE_ENV !== "production" ? `[tamagui zero-runtime] createComponent ran in a zero-runtime graph. No Tamagui component renderer ships in this mode, so a component reference survived compilation. Fix the site or move the owning module to a declared full-runtime island.` : "❌ Error 010");
|
|
122
121
|
var config = null;
|
|
123
122
|
var resolvedDefaultProps;
|
|
124
|
-
var
|
|
125
|
-
var
|
|
126
|
-
var styledContextKeys = styledContextPropKeys ? new Set(styledContextPropKeys) : void 0;
|
|
123
|
+
var resolvedStyleRevision = -1;
|
|
124
|
+
var resolvedStyleStaticConfig;
|
|
127
125
|
var { Component, isText, isHOC } = staticConfig;
|
|
128
126
|
var res;
|
|
127
|
+
var { displayName } = staticConfig;
|
|
129
128
|
var component = function(propsInWithRef) {
|
|
130
129
|
"use no memo";
|
|
131
130
|
var _hooks_usePropsTransform, _staticConfig_neverSkipProps;
|
|
132
131
|
var _stateRef_current;
|
|
133
|
-
var displayName = res[import_componentDisplayName.componentDisplayName];
|
|
134
132
|
var forwardedRef = propsInWithRef.ref;
|
|
135
133
|
var propsIn = propsInWithRef;
|
|
136
134
|
config = config || (0, import_config.getConfig)();
|
|
135
|
+
var styleRevision = (0, import_grammarConfig.getConfigRevisionState)(config).revision;
|
|
136
|
+
if (resolvedStyleRevision !== styleRevision) {
|
|
137
|
+
var _nextStyleStaticConfig_baseStyle;
|
|
138
|
+
resolvedStyleRevision = styleRevision;
|
|
139
|
+
var nextStyleStaticConfig = (0, import_styleStaticConfig.getStyleStaticConfig)(staticConfig, config);
|
|
140
|
+
resolvedStyleStaticConfig = nextStyleStaticConfig;
|
|
141
|
+
resolvedDefaultProps = nextStyleStaticConfig.defaultProps;
|
|
142
|
+
if (import_constants.isWeb && !staticConfig.isText && config.settings.defaultPosition === "relative" && ((_nextStyleStaticConfig_baseStyle = nextStyleStaticConfig.baseStyle) === null || _nextStyleStaticConfig_baseStyle === void 0 ? void 0 : _nextStyleStaticConfig_baseStyle.position) === void 0) resolvedStyleStaticConfig = {
|
|
143
|
+
...nextStyleStaticConfig,
|
|
144
|
+
baseStyle: {
|
|
145
|
+
position: "relative",
|
|
146
|
+
...nextStyleStaticConfig.baseStyle
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
var styleStaticConfig = resolvedStyleStaticConfig;
|
|
151
|
+
styleStaticConfig.styledContextKeys;
|
|
137
152
|
var internalID = process.env.NODE_ENV === "development" ? import_react.default.useId() : "";
|
|
138
153
|
if (process.env.NODE_ENV === "development") {
|
|
139
154
|
if (startVisualizer) {
|
|
@@ -172,14 +187,6 @@ function createComponent(staticConfig) {
|
|
|
172
187
|
if (process.env.NODE_ENV === "development" && !time && globalThis.time) time = globalThis.time;
|
|
173
188
|
if (process.env.NODE_ENV === "development" && time) time`non-tamagui time (ignore)`;
|
|
174
189
|
var props = propsIn;
|
|
175
|
-
if (!didResolveDefaultProps) {
|
|
176
|
-
didResolveDefaultProps = true;
|
|
177
|
-
var staticDefaultProps = (0, import_getDefaultProps.getDefaultProps)(staticConfig);
|
|
178
|
-
resolvedDefaultProps = import_constants.isWeb && !isText && config.settings.defaultPosition === "relative" && (staticDefaultProps === null || staticDefaultProps === void 0 ? void 0 : staticDefaultProps.position) === void 0 ? staticDefaultProps ? {
|
|
179
|
-
position: "relative",
|
|
180
|
-
...staticDefaultProps
|
|
181
|
-
} : { position: "relative" } : staticDefaultProps;
|
|
182
|
-
}
|
|
183
190
|
var [nextProps, overrides] = (0, import_mergeProps.mergeComponentProps)(resolvedDefaultProps, styledContextValue, propsIn);
|
|
184
191
|
props = nextProps;
|
|
185
192
|
overriddenContextProps = overrides;
|
|
@@ -378,12 +385,11 @@ ${banner}
|
|
|
378
385
|
willBeAnimated,
|
|
379
386
|
canPlatformPseudo: componentState.platformPseudo,
|
|
380
387
|
displayName,
|
|
381
|
-
styledContext: styledContextValue
|
|
382
|
-
styledContextKeys
|
|
388
|
+
styledContext: styledContextValue
|
|
383
389
|
};
|
|
384
390
|
var themeName = (themeState === null || themeState === void 0 ? void 0 : themeState.name) || "";
|
|
385
391
|
if (process.env.NODE_ENV === "development" && time) time`split-styles-prepare`;
|
|
386
|
-
var splitStyles = (0, import_useSplitStyles.useSplitStyles)(props, staticConfig, theme, themeName, state, styleProps, null, componentContext, groupContextParent, elementType, startedUnhydrated, debugProp, animationDriver);
|
|
392
|
+
var splitStyles = (0, import_useSplitStyles.useSplitStyles)(props, staticConfig, theme, themeName, state, styleProps, null, componentContext, groupContextParent, elementType, startedUnhydrated, debugProp, animationDriver, styleStaticConfig);
|
|
387
393
|
var finalizedComponentState = componentState.finalizeStyleFlags(!!(splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.hasEnterStyle), !!(splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.platformPseudo));
|
|
388
394
|
hasEnterStyle = finalizedComponentState.hasEnterStyle;
|
|
389
395
|
isAnimated = finalizedComponentState.isAnimated;
|
|
@@ -497,7 +503,7 @@ ${banner}
|
|
|
497
503
|
var nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, proxiedTheme, stateName, state, {
|
|
498
504
|
...styleProps,
|
|
499
505
|
mediaState: (0, import_mediaState.getMedia)()
|
|
500
|
-
}, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp, animationDriver);
|
|
506
|
+
}, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp, animationDriver, styleStaticConfig);
|
|
501
507
|
if (!(nextStyles === null || nextStyles === void 0 ? void 0 : nextStyles.style)) return false;
|
|
502
508
|
pushViewState(stateName, nextStyles.style);
|
|
503
509
|
return true;
|
|
@@ -586,7 +592,7 @@ ${banner}
|
|
|
586
592
|
var nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, theme, themeName, updatedState, mediaState2 ? {
|
|
587
593
|
...styleProps,
|
|
588
594
|
mediaState: mediaState2
|
|
589
|
-
} : styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp, animationDriver);
|
|
595
|
+
} : styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp, animationDriver, styleStaticConfig);
|
|
590
596
|
var _nextStyles_effectiveTransition, _ref5;
|
|
591
597
|
var effectiveTransition2 = (_ref5 = (_nextStyles_effectiveTransition = nextStyles === null || nextStyles === void 0 ? void 0 : nextStyles.effectiveTransition) !== null && _nextStyles_effectiveTransition !== void 0 ? _nextStyles_effectiveTransition : props.transition) !== null && _ref5 !== void 0 ? _ref5 : platformPseudo ? "0ms" : void 0;
|
|
592
598
|
stateRef.current.prevPseudoState = (0, import_extractPseudoState.extractPseudoState)(updatedState);
|
|
@@ -1105,6 +1111,21 @@ ${banner}
|
|
|
1105
1111
|
res = component;
|
|
1106
1112
|
res = /* @__PURE__ */ import_react.default.memo(res);
|
|
1107
1113
|
res.staticConfig = staticConfig;
|
|
1114
|
+
res.resolve = function(resolver) {
|
|
1115
|
+
var next = createComponent({
|
|
1116
|
+
...staticConfig,
|
|
1117
|
+
resolvers: staticConfig.resolvers ? [...staticConfig.resolvers, resolver] : [resolver]
|
|
1118
|
+
});
|
|
1119
|
+
for (var key in res) {
|
|
1120
|
+
if (key === "propTypes" || key in next) continue;
|
|
1121
|
+
next[key] = res[key];
|
|
1122
|
+
}
|
|
1123
|
+
return next;
|
|
1124
|
+
};
|
|
1125
|
+
if (displayName) {
|
|
1126
|
+
res.displayName = displayName;
|
|
1127
|
+
res[import_componentDisplayName.componentDisplayName] = displayName;
|
|
1128
|
+
}
|
|
1108
1129
|
return res;
|
|
1109
1130
|
}
|
|
1110
1131
|
var fromPx = function(val) {
|
|
@@ -46,9 +46,10 @@ var import_GroupContext = require("./contexts/GroupContext.native.js");
|
|
|
46
46
|
var import_createVariable = require("./createVariable.native.js");
|
|
47
47
|
var import_defaultComponentState = require("./defaultComponentState.native.js");
|
|
48
48
|
var import_eventHandling = require("./eventHandling.native.js");
|
|
49
|
-
var import_getDefaultProps = require("./helpers/getDefaultProps.native.js");
|
|
50
49
|
var import_componentDisplayName = require("./helpers/componentDisplayName.native.js");
|
|
51
50
|
var import_getSplitStyles = require("./helpers/getSplitStyles.native.js");
|
|
51
|
+
var import_grammarConfig = require("./helpers/grammarConfig.native.js");
|
|
52
|
+
var import_styleStaticConfig = require("./helpers/styleStaticConfig.native.js");
|
|
52
53
|
var import_nativeStyleEngine = require("./helpers/nativeStyleEngine.native.js");
|
|
53
54
|
var import_getThemeProxied = require("./hooks/getThemeProxied.native.js");
|
|
54
55
|
var import_log = require("./helpers/log.native.js");
|
|
@@ -116,24 +117,38 @@ if (import_constants.isWeb && typeof document !== "undefined") {
|
|
|
116
117
|
});
|
|
117
118
|
}
|
|
118
119
|
function createComponent(staticConfig) {
|
|
119
|
-
|
|
120
|
-
if (process.env.TAMAGUI_RUNTIME === "zero") throw new Error(`[tamagui zero-runtime] createComponent ran in a zero-runtime graph. No Tamagui component renderer ships in this mode, so a component reference survived compilation. Fix the site or move the owning module to a declared full-runtime island.`);
|
|
121
|
-
(0, import_getSplitStyles.prepareStyleStaticConfig)(staticConfig);
|
|
120
|
+
if (process.env.TAMAGUI_RUNTIME === "zero") throw new Error(process.env.NODE_ENV !== "production" ? `[tamagui zero-runtime] createComponent ran in a zero-runtime graph. No Tamagui component renderer ships in this mode, so a component reference survived compilation. Fix the site or move the owning module to a declared full-runtime island.` : "❌ Error 010");
|
|
122
121
|
var config = null;
|
|
123
122
|
var resolvedDefaultProps;
|
|
124
|
-
var
|
|
125
|
-
var
|
|
126
|
-
var styledContextKeys = styledContextPropKeys ? new Set(styledContextPropKeys) : void 0;
|
|
123
|
+
var resolvedStyleRevision = -1;
|
|
124
|
+
var resolvedStyleStaticConfig;
|
|
127
125
|
var { Component, isText, isHOC } = staticConfig;
|
|
128
126
|
var res;
|
|
127
|
+
var { displayName } = staticConfig;
|
|
129
128
|
var component = function(propsInWithRef) {
|
|
130
129
|
"use no memo";
|
|
131
130
|
var _hooks_usePropsTransform, _staticConfig_neverSkipProps;
|
|
132
131
|
var _stateRef_current;
|
|
133
|
-
var displayName = res[import_componentDisplayName.componentDisplayName];
|
|
134
132
|
var forwardedRef = propsInWithRef.ref;
|
|
135
133
|
var propsIn = propsInWithRef;
|
|
136
134
|
config = config || (0, import_config.getConfig)();
|
|
135
|
+
var styleRevision = (0, import_grammarConfig.getConfigRevisionState)(config).revision;
|
|
136
|
+
if (resolvedStyleRevision !== styleRevision) {
|
|
137
|
+
var _nextStyleStaticConfig_baseStyle;
|
|
138
|
+
resolvedStyleRevision = styleRevision;
|
|
139
|
+
var nextStyleStaticConfig = (0, import_styleStaticConfig.getStyleStaticConfig)(staticConfig, config);
|
|
140
|
+
resolvedStyleStaticConfig = nextStyleStaticConfig;
|
|
141
|
+
resolvedDefaultProps = nextStyleStaticConfig.defaultProps;
|
|
142
|
+
if (import_constants.isWeb && !staticConfig.isText && config.settings.defaultPosition === "relative" && ((_nextStyleStaticConfig_baseStyle = nextStyleStaticConfig.baseStyle) === null || _nextStyleStaticConfig_baseStyle === void 0 ? void 0 : _nextStyleStaticConfig_baseStyle.position) === void 0) resolvedStyleStaticConfig = {
|
|
143
|
+
...nextStyleStaticConfig,
|
|
144
|
+
baseStyle: {
|
|
145
|
+
position: "relative",
|
|
146
|
+
...nextStyleStaticConfig.baseStyle
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
var styleStaticConfig = resolvedStyleStaticConfig;
|
|
151
|
+
styleStaticConfig.styledContextKeys;
|
|
137
152
|
var internalID = process.env.NODE_ENV === "development" ? import_react.default.useId() : "";
|
|
138
153
|
if (process.env.NODE_ENV === "development") {
|
|
139
154
|
if (startVisualizer) {
|
|
@@ -172,14 +187,6 @@ function createComponent(staticConfig) {
|
|
|
172
187
|
if (process.env.NODE_ENV === "development" && !time && globalThis.time) time = globalThis.time;
|
|
173
188
|
if (process.env.NODE_ENV === "development" && time) time`non-tamagui time (ignore)`;
|
|
174
189
|
var props = propsIn;
|
|
175
|
-
if (!didResolveDefaultProps) {
|
|
176
|
-
didResolveDefaultProps = true;
|
|
177
|
-
var staticDefaultProps = (0, import_getDefaultProps.getDefaultProps)(staticConfig);
|
|
178
|
-
resolvedDefaultProps = import_constants.isWeb && !isText && config.settings.defaultPosition === "relative" && (staticDefaultProps === null || staticDefaultProps === void 0 ? void 0 : staticDefaultProps.position) === void 0 ? staticDefaultProps ? {
|
|
179
|
-
position: "relative",
|
|
180
|
-
...staticDefaultProps
|
|
181
|
-
} : { position: "relative" } : staticDefaultProps;
|
|
182
|
-
}
|
|
183
190
|
var [nextProps, overrides] = (0, import_mergeProps.mergeComponentProps)(resolvedDefaultProps, styledContextValue, propsIn);
|
|
184
191
|
props = nextProps;
|
|
185
192
|
overriddenContextProps = overrides;
|
|
@@ -378,12 +385,11 @@ ${banner}
|
|
|
378
385
|
willBeAnimated,
|
|
379
386
|
canPlatformPseudo: componentState.platformPseudo,
|
|
380
387
|
displayName,
|
|
381
|
-
styledContext: styledContextValue
|
|
382
|
-
styledContextKeys
|
|
388
|
+
styledContext: styledContextValue
|
|
383
389
|
};
|
|
384
390
|
var themeName = (themeState === null || themeState === void 0 ? void 0 : themeState.name) || "";
|
|
385
391
|
if (process.env.NODE_ENV === "development" && time) time`split-styles-prepare`;
|
|
386
|
-
var splitStyles = (0, import_useSplitStyles.useSplitStyles)(props, staticConfig, theme, themeName, state, styleProps, null, componentContext, groupContextParent, elementType, startedUnhydrated, debugProp, animationDriver);
|
|
392
|
+
var splitStyles = (0, import_useSplitStyles.useSplitStyles)(props, staticConfig, theme, themeName, state, styleProps, null, componentContext, groupContextParent, elementType, startedUnhydrated, debugProp, animationDriver, styleStaticConfig);
|
|
387
393
|
var finalizedComponentState = componentState.finalizeStyleFlags(!!(splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.hasEnterStyle), !!(splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.platformPseudo));
|
|
388
394
|
hasEnterStyle = finalizedComponentState.hasEnterStyle;
|
|
389
395
|
isAnimated = finalizedComponentState.isAnimated;
|
|
@@ -497,7 +503,7 @@ ${banner}
|
|
|
497
503
|
var nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, proxiedTheme, stateName, state, {
|
|
498
504
|
...styleProps,
|
|
499
505
|
mediaState: (0, import_mediaState.getMedia)()
|
|
500
|
-
}, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp, animationDriver);
|
|
506
|
+
}, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp, animationDriver, styleStaticConfig);
|
|
501
507
|
if (!(nextStyles === null || nextStyles === void 0 ? void 0 : nextStyles.style)) return false;
|
|
502
508
|
pushViewState(stateName, nextStyles.style);
|
|
503
509
|
return true;
|
|
@@ -586,7 +592,7 @@ ${banner}
|
|
|
586
592
|
var nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, theme, themeName, updatedState, mediaState2 ? {
|
|
587
593
|
...styleProps,
|
|
588
594
|
mediaState: mediaState2
|
|
589
|
-
} : styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp, animationDriver);
|
|
595
|
+
} : styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp, animationDriver, styleStaticConfig);
|
|
590
596
|
var _nextStyles_effectiveTransition, _ref5;
|
|
591
597
|
var effectiveTransition2 = (_ref5 = (_nextStyles_effectiveTransition = nextStyles === null || nextStyles === void 0 ? void 0 : nextStyles.effectiveTransition) !== null && _nextStyles_effectiveTransition !== void 0 ? _nextStyles_effectiveTransition : props.transition) !== null && _ref5 !== void 0 ? _ref5 : platformPseudo ? "0ms" : void 0;
|
|
592
598
|
stateRef.current.prevPseudoState = (0, import_extractPseudoState.extractPseudoState)(updatedState);
|
|
@@ -1105,6 +1111,21 @@ ${banner}
|
|
|
1105
1111
|
res = component;
|
|
1106
1112
|
res = /* @__PURE__ */ import_react.default.memo(res);
|
|
1107
1113
|
res.staticConfig = staticConfig;
|
|
1114
|
+
res.resolve = function(resolver) {
|
|
1115
|
+
var next = createComponent({
|
|
1116
|
+
...staticConfig,
|
|
1117
|
+
resolvers: staticConfig.resolvers ? [...staticConfig.resolvers, resolver] : [resolver]
|
|
1118
|
+
});
|
|
1119
|
+
for (var key in res) {
|
|
1120
|
+
if (key === "propTypes" || key in next) continue;
|
|
1121
|
+
next[key] = res[key];
|
|
1122
|
+
}
|
|
1123
|
+
return next;
|
|
1124
|
+
};
|
|
1125
|
+
if (displayName) {
|
|
1126
|
+
res.displayName = displayName;
|
|
1127
|
+
res[import_componentDisplayName.componentDisplayName] = displayName;
|
|
1128
|
+
}
|
|
1108
1129
|
return res;
|
|
1109
1130
|
}
|
|
1110
1131
|
var fromPx = function(val) {
|